Java8内置了强大的多核支持,我们在处理数据的时候,如果不充分利用多核,都好不意思跟老板打招呼。 我们经常会使用AtomicInteger来做计数器,如下所示: List<String>?words?=?Files.readAllLines(Paths.get(...
分类:
其他好文 时间:
2015-05-22 07:09:50
阅读次数:
111
//函数基本定义func 函数名(参数名:参数类型=默认值) ->返回值类型{代码块}//无参无返回值函数func hsmin(){}//单参无返回值函数func prin(st:String){ println(st)}prin("111")//111func yuanzu(tup:(St...
分类:
编程语言 时间:
2015-05-22 07:04:10
阅读次数:
133
比较难的一道题,但是还是能看懂public class Solution { public List findRepeatedDnaSequences(String s) { // ref http://blog.csdn.net/haiyi727/article/details...
分类:
其他好文 时间:
2015-05-22 07:03:52
阅读次数:
126
选择排序publicclassChooseSort{publicstaticvoidmain(String[]args){int[]x={2,332,16,575,203,4,23,11,345,32};ChooseSortcs=newChooseSort();cs.selectSort(x);for(inti=0;i<x.length;i++){System.out.print(x[i]+"");}}publicstaticvoidselectSort(int[]a){intminIndex=..
分类:
编程语言 时间:
2015-05-22 02:04:29
阅读次数:
171
You are given a string, s, and a list of words, words, that are all of the same length. Find all starting indices of substring(s) in s that is a conca...
分类:
其他好文 时间:
2015-05-22 01:52:37
阅读次数:
189
String类型是字符串的对象包装类型,可以像下面这样使用String构造函数来创建。var stringObject = new String("hello world"); String对象的方法可以在所有基本类型的字符串值中访问到。其中,继承的valueof()、toLocaleStri...
分类:
其他好文 时间:
2015-05-22 01:51:36
阅读次数:
143
Waiter.java
package com.paic.zhangqi.spring.aop;
public interface Waiter {
void greetTo(String name);
void serveTo(String name);
}
NaiveWaiter.java
package com.paic.zhangqi.spring.aop;
publi...
分类:
编程语言 时间:
2015-05-22 00:39:29
阅读次数:
182
一,测试Demo
namespace 不同编码下的中英文字符大小
{
class Program
{
static void Main(string[] args)
{
ShowCode();
}
private static void ShowCode() {...
分类:
其他好文 时间:
2015-05-22 00:35:44
阅读次数:
141
Given a stringsconsists of upper/lower-case alphabets and empty space characters' ', return the length of last word in the string.If the last word doe...
分类:
其他好文 时间:
2015-05-22 00:26:19
阅读次数:
101
安装了一个编辑器,Notepad++,这个编辑器以前在写PHP的时候就喜欢用,呵呵,现在写java也先沿用这个这个编辑器吧。代码:public class Test{ public static void main(String[] args){ System.out.print...
分类:
编程语言 时间:
2015-05-22 00:23:01
阅读次数:
160