自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

白乔专栏

资深代码研究员,大数据爱好者

  • 博客(15)
  • 资源 (14)
  • 收藏
  • 关注

原创 scala学习笔记:变量声明中的模式

先看个正常的写法:scala> val x = 1x: Int = 1体会一下元组的写法:scala> val (x,y,z)=(1,2,3)x: Int = 1y: Int = 2z: Int = 3再来体会一个Array的匹配:scala> val Array(x,y,_)=Array(1,2,3)x: Int = 1y: Int = 2很好理解嘛!调用了Array伴生对象的unap

2015-02-28 17:49:05 3105

原创 scala学习笔记:理解并行集合par

scala> (1 to 5).foreach(println(_))12345scala> (1 to 5).par.foreach(println(_))12345以下代码获取到参与并行计算的线程:scala> (0 to 10000).collect{case _ => Thread.currentThread.getName}.distinctres53: scala.

2015-02-28 17:00:40 9245

转载 快速了解Scala技术栈

http://www.infoq.com/cn/articles/scala-technology/我无可救药地成为了Scala的超级粉丝。在我使用Scala开发项目以及编写框架后,它就仿佛凝聚成为一个巨大的黑洞,吸引力使我不得不飞向它,以至于开始背离Java。固然Java 8为Java阵营增添了一丝亮色,却是望眼欲穿,千呼万唤始出来。而Scala程序员,却早就在享受lambda、高阶函数、tra

2015-02-28 16:13:53 2671

原创 scala学习笔记:控制抽象

def repeat(n:Int)(action: =>Unit)=for(i<-1 to n)actionvar i = 0repeat(5){println(i=i+1)}另外一个例子:scala> def until(condition: =>Boolean)(action: =>Unit) { | if(!condition){ | action | un

2015-02-28 15:25:30 1845

转载 scala中的call-by-name和call-by-value

http://www.jianshu.com/p/93eefcb61d4fval和def的区别在scala中,可以用val和def前缀来定义变量,例如: val x = 1 def y = “foo”这两者的区别在于:val定义值时,会做call-by-value操作,def则会做call-by-name操作。例如: // 这是一个死循环 def loop: Boolean = loop

2015-02-27 13:16:27 3422

原创 scala学习笔记:各种奇怪的写法

Unit函数的定义: def foo()={println("hi")} 等号可以省略: def foo(){println("hi")}update方法: x(y) = z 相当于: x.update(y, z)单参数方法的调用: xObject yMethod zParameter 相当于: xObject.yMethod(zParameter)

2015-02-26 22:01:27 1719

原创 scala学习笔记:match与unapply()

编写如下代码:object MatchTest { def foo(a : Any) : String = { a match { case 1 => "int:1" case x : Int if (x > 50) => "int(>50):" + x c

2015-02-26 14:09:21 3430

原创 scala学习笔记:无参函数

scala> def repeat(times:Int)(run:()=>Unit)=for(i<-1 to times)run()repeat: (times: Int)(run: () => Unit)Unitscala> repeat(2){println("haha~~~")}<console>:9: error: type mismatch; found : Unit requ

2015-02-12 17:50:10 2075

转载 scala学习笔记:函数与方法

http://stackoverflow.com/questions/2529184/difference-between-method-and-function-in-scalaA Function Type is (roughly) a type of the form (T1, ..., Tn) => U, which is a shorthand for the trait Functio

2015-02-12 17:31:05 824

原创 scala学习笔记:理解函数

定义一个函数:scala> def foo(x:Int)=x*2foo: (x: Int)Int这个函数的类型是Int=>Int:scala> var bar = foo _bar: Int => Int = <function1>scala> var bar:(Int)=>Int = foobar: Int => Int = <function1>可以直接定义指向匿名函数的变量:scala>

2015-02-12 11:20:43 735

原创 scala学习笔记:理解类继承

scala> import scala.reflect._import scala.reflect._scala> class Person(@BeanProperty var name: String, val gender: Boolean=true){}defined class Personscala> val p = new Person("bluejoe")p: Person =

2015-02-09 20:55:49 792

原创 scala学习笔记:理解lazy值

scala> var counter = 0counter: Int = 0scala> def foo = {counter = 1; counter}foo: Intscala> val value1 = foo; lazy val value2 = foo; def value3 = foovalue1: Int = 1value2: Int = <lazy>value3: Int

2015-02-08 18:44:50 2010

原创 scala学习笔记:match表达式

写了一个超级长的表达式,估计不是最简洁的:scala> def foo(ch:Any)=ch match { case true=>"male";case false=>"female";case i:Int if(i==0)=>"female";case i:Int if(i!=0)=>"female";case str:String=>if(str!="male"

2015-02-06 21:30:00 1119

原创 scala学习笔记:集合

scala> 1 to 10res9: scala.collection.immutable.Range.Inclusive = Range(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)scala> List(1,2,3,4)res10: List[Int] = List(1, 2, 3, 4)scala> (1 to 10).map(_*3).filter(_%2==1).re

2015-02-06 08:47:41 924

原创 scala学习笔记:高阶函数

scala> def power(y:Double)=(x:Double)=>Math.pow(x,y)warning: there were 1 deprecation warnings; re-run with -deprecation for detailspower: (y: Double)Double => Doublescala> val square=power(2)squar

2015-02-06 08:37:12 1479

pdsh-2.26源文件

pdsh的全称是parallel distributed shell,与pssh类似,pdsh可并行执行对远程目标主机的操作,在有批量执行命令或分发任务的运维需求时,使用这个命令可达到事半功倍的效果。同时,pdsh还支持交互模式,当要执行的命令不确定时,可直接进入pdsh命令行,非常方便。

2017-02-06

oauth2的示例工程源代码spring-security-oauth-samples(含war包)

oauth2的示例工程源代码,含build好的war包 来源于github,但build会很耗时间 直接取出2个target目录下的war文件 改名为tonr2.war和sparklr2.war 置于webapps下 启动tomcat后,访问http://localhost:8080/tonr2 即可体验演示工程

2016-02-15

java反编译器的GUI版本:jd-gui

很好的java反编译器,忘掉eclipse插件吧:) 本人的eclipse无论安装哪种java反编译器,总是失败~~~ 绝望中找到jd-gui jd-gui可以关联上eclipse中的.class文件 并自动在左侧的目录视图中打开class文件所在的目录 同时支持各个class之间的跳转 http://jd.benow.ca/

2015-02-25

spring security oauth2的client演示包tonr2

spring security oauth2的client演示包tonr2,所有的jar都齐全了

2014-10-09

spring-security-oauth2下的sparklr2的war包

spring-security-oauth2下的sparklr2的war包,官方的没有现成的war包,需要使用maven打包,这个是打包好的

2014-10-09

HTTPAnalyzer v7.rar

HTTPAnalyzer v7 很好的HTTP通讯监控窗口,可用来调试

2014-09-16

bigdata架构白皮书

bigdata架构白皮书,bigdata是开源的RDF数据库

2014-08-30

Jena-HBase - A Distributed, Scalable and Efficient RDF Triple Store

基于Jena的分布式RDF数据库实现,可自由伸缩,三元组

2014-08-11

jena-arq2.9

jena arq 2.9的源码下载 semantic web RDF处理中间件

2013-12-16

spring-security-oath2自带sample的sparklr的war版

spring-security-oath2自带sample的sparklr的war版 好不容易mvn成功的,供下载!

2013-08-26

spring-security-oath2自带sample的tonr的war版

spring-security-oath2自带sample的tonr的war版 好不容易mvn成功的,供下载!

2013-08-26

jsecurity-0.9.0

JSecurity是一个强大、灵活的Java开源安全框架。它能够简捷地处理认证、授权,集成session管理和单点登录(SSO:single sign-on)。

2008-11-10

微软VisualStudio2008提供的图片集

微软VisualStudio2008提供的图片集

2008-09-17

FlashNow!动画浏览器

类似于ACDSee浏览/查看双界面的Flash动画播放器,方便快捷的播放控制,可以直接在地址栏输入flash动画的URL,可以随意保存本地/远端Flash文件,支持flash多格式转换,支持全屏播放,支持浏览预览;

2006-03-16

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除