I started learning Scala a few days before. Initially i was annoyed by the use of too many symbols in Scala. Especially i was confused by the _ and its different meaning in different places. After a few days of research(aka search), i felt better and
最近做的东西用到了infowindow,不过google提供的样式太难看了,于是想改变一下样式.看了一下好像infowindow的样式不太好改. 查了半天资料,看到一个infobox,感觉真的挺好用.提供了完整的api,样式的改变也容易.http://code.google.com/p/google-maps-utility-library-v3/wiki/Libraries里面还有其他的插件 都很好用.View example (infobox-basic.html),这是他给的一个demo,
Immutable.js offers methods to break immutable structures into subsets much like Array--for instance it has the all powerful slice()--and unlike Array it offers functional methods like take() and skip(). You get the best of both the imperative and fu
1.引入包中的全部方法 import math._ //引入包中所有方法,与java中的*类似 2.表示集合元素 val a = (1 to 10).filter(_%2==0).map(_*2) //表示集合元素 for(i <- a) println(i) 表示集合元素的元素内容,并进行计算 3.表示元组内容 val t = Tuple2(1,2) println(t._1) //打印元组内容 4.模糊匹配 val value = a //模糊匹配 val result = value ma
val scores=Map("Alice"->10,"Bob"->3,"Cindy"->8) // 获取所有的key val nameList=scores.map(_._1) // map 函数返回List println(nameList.getClass) 遍历list中的元素 nameList.foreach((x:String)=>print(x+" ")) 输出 :Alice Bob Ci