1 单纯从速度上讲 小数据量下foreach 较快,list.Foreach 由于 public
void ForEach(Action action) { if(action ==null) {
ThrowHelper.ThrowArgumentNullExce...
分类:
其他好文 时间:
2014-05-16 04:37:23
阅读次数:
224
集合基础知识——CollectionJava中集合框架由常用的Collection接口和Map接口组成,而Collection接口又有两个子接口,是List接口和Set接口,常用的集合框架由这三个类组成。List接口的功能方法List的使用最为简单,创建集合,通过add方法添加元素,get方法获取元...
分类:
编程语言 时间:
2014-05-16 04:23:01
阅读次数:
363
经历了三道树的题后,完全崩溃中,急需一道非树图的题来挽救信心。题目:反转数字。input : 123
, output : 321.思路:直接,没什么好说的。自己代码:很龊,有大量的冗余信息,还申请了一个List,虽然AC了,但有很大改进空间。public
int reverse(int x) { ...
分类:
其他好文 时间:
2014-05-15 14:22:31
阅读次数:
212
chkconfig命令主要用来更新(启动或停止)和查询系统服务的运行级信息。谨记chkconfig不是立即自动禁止或激活一个服务,它只是简单的改变了符号连接。使用语法:chkconfig
[--add][--del][--list][系统服务] 或 chkconfig [--level ][系统服务...
分类:
系统相关 时间:
2014-05-15 10:28:17
阅读次数:
406
[root@localhost ~]# chkconfig --list
显示开机可以自动启动的服务[root@localhost ~]# chkconfig --add ***
添加开机自动启动***服务[root@localhost ~]# chkconfig --del *** 删除开机自动启...
分类:
系统相关 时间:
2014-05-15 09:47:40
阅读次数:
367
当客户端请求速度远远大于服务端的处理速度,这时候就非常适合使用GuardedSuspention模式packagecn.fcl.guardendSuspension;
importjava.util.ArrayList;
importjava.util.List;
publicclassRequestQueue{
privateList<Integer>integers=newArrayList<Integer>();
..
分类:
编程语言 时间:
2014-05-15 09:08:21
阅读次数:
283
ubuntu源文件所在目录:/etc/apt/sources.list查看ubuntu版本号:sudolsb_release-a
分类:
其他好文 时间:
2014-05-15 08:40:21
阅读次数:
192
The web.config file can be used to set a
default document, or list of default documents for your website. Web.config can
be used to change the defau.....
分类:
Web程序 时间:
2014-05-15 02:21:15
阅读次数:
448
Linked List Cycle
Total Accepted: 17148 Total
Submissions: 49300My Submissions
Given a linked list, determine if it has a cycle in it.
Follow up:
Can you solve it without using extra sp...
分类:
其他好文 时间:
2014-05-15 00:13:50
阅读次数:
279
Linked List CycleGiven a linked list, determine
if it has a cycle in it.Follow up:Can you solve it without using extra
space?做完Linked List Cycle II在做这...
分类:
其他好文 时间:
2014-05-14 23:30:00
阅读次数:
399