scala> val m = List(List("a","b"),List("c","d"))
m: List[List[String]] = List(List(a, b), List(c, d))
scala> m.flatten
res8: List[String] = List(a, b, c, d)
scala> val n = List(List(1,2),List(3,...
分类:
其他好文 时间:
2015-03-19 20:24:00
阅读次数:
824
1. 写service类package com.datatrans.demo; public class HelloServiceNew { public String sayHelloNew(){ return "hello"; } ...
分类:
Web程序 时间:
2015-03-19 20:16:08
阅读次数:
179
public class ArrayDemo01 { public static void main(String[]args){ int score[]=null; score=new int[3]; System.out.println("score[0]="+score[0]); Sy...
分类:
编程语言 时间:
2015-03-19 20:15:11
阅读次数:
158
IOS开发-文件管理(二)五、Plist文件String方式添加NSString *path=[NSHomeDirectory() stringByAppendingPathComponent:@"Array.plist"];NSString *content=@"abcd";[contect wr...
分类:
移动开发 时间:
2015-03-19 20:11:17
阅读次数:
169
实体类excelimport java.util.List;/** * 功能: * 描述: * @author * @date 2015-3-19 下午5:15:48 */public class Excel { private String fileName;//sheet的名称 p...
分类:
其他好文 时间:
2015-03-19 19:55:40
阅读次数:
149
一、 现象var name = new Array(); typeof(name) // 为string 类型var name = new Array('a' , 'b' , 'c');typeof(name) // 为string 类型name.length // 长度为3 , 理解为...
分类:
Web程序 时间:
2015-03-19 19:54:07
阅读次数:
144
题目描述: Fraction to Recurring Decimal Given two integers representing the numerator and denominator of a fraction, return the fraction in string format....
分类:
其他好文 时间:
2015-03-19 19:49:21
阅读次数:
178
一、结构体中的静态方法示例:structAccount{
varowner:String=""
staticvarinterestRate:Double=0.688
staticfuncinterestBy(amount:Double)->Double{
returninterestRate*amount;
}
funcmessageWith(amount:Double)->String{
varinterest=Account.interestBy(amount)
r..
分类:
其他好文 时间:
2015-03-19 18:39:06
阅读次数:
140
要在自定义类型中使用移动算法,需要在元素中提供移动赋值运算符,移动赋值运算符和std::move()详见《c++高级编程》第9章
class mystring
{
public:
string mstr;
mystring(){}
mystring(const string &str) :mstr(str){}
mystring& operator=(mystring&& r...
分类:
移动开发 时间:
2015-03-19 18:33:03
阅读次数:
130
package com.someorg;public class Logger { public static void info(String something) { int lineNo = getCurrentLineNumber(); String met...
分类:
编程语言 时间:
2015-03-19 18:22:42
阅读次数:
197