Given an array of integers, every element
appears twice except for one. Find that single one. Note: Your algorithm should
have a linear runtime comple...
分类:
其他好文 时间:
2014-05-23 07:22:48
阅读次数:
241
单例设计模式用来创建唯一的对象,有些时候我们只需要一个对象,如:线程池,缓存,对话框,注册表,日志对象,等等。这就需要单例设计模式来完成。不用多说,直接上代码。public
class TestSingle { private static TestSingle single = null; pri...
分类:
其他好文 时间:
2014-05-23 03:48:01
阅读次数:
235
【题目】
Implement wildcard pattern matching with support for '?' and '*'.
'?' Matches any single character.
'*' Matches any sequence of characters (including the empty sequence).
The matching should cover the entire input string (not partial).
The functi...
分类:
其他好文 时间:
2014-05-23 00:17:12
阅读次数:
364
Given an array of integers, every element
appearstwiceexcept for one. Find that single one.Note:Your algorithm should have
a linear runtime complexity...
分类:
其他好文 时间:
2014-05-22 16:31:03
阅读次数:
194
一、下载AFNetworking.二、将AFNetworking-master下的AFNetworking目录拖入到项目中三、为项目添加Linking
to a Library or Framework CoreLocation.framework SystemConfiguration.fra.....
分类:
移动开发 时间:
2014-05-21 21:29:14
阅读次数:
413
把Git Repository建到U盘上去转 把Git
Repository建到U盘上去Git很火。原因有三:它是大神Linus
Torvalds的作品,天然地具备神二代的气质和品质;促进了生产力的发展,Git的分布式版本控制理念,并非首创,但非常适合开源社区的协作方式(不存在master-slav...
分类:
其他好文 时间:
2014-05-21 18:06:38
阅读次数:
264
1. Application Master 无法访问
点击application mater 链接,出现 http 500 错误,java.lang.Connect.exception:
问题是由于设定web ui时,50030 端口对应的ip地址为0.0.0.0,导致application master 链接无法定位。
解决办法:...
分类:
其他好文 时间:
2014-05-21 13:58:49
阅读次数:
323
1、
??
Add Two Numbers
You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two num...
分类:
其他好文 时间:
2014-05-21 10:49:10
阅读次数:
221
1,Master初始化
1.1
if (!this.stopped) {
finishInitialization(startupStatus, false);
loop();
}
1.2 finishInitialization(),这里主要完成master组件components:filesystem manager,servermanager,assig...
分类:
其他好文 时间:
2014-05-21 09:23:05
阅读次数:
269
一、VRRP的工作过程如下:1、备份组中的路由器根据优先级和IP地址确定自己在备份组中的角色。优先级高的路由器成为Master路由器;优先级低的成为Backup路由器;如果优先级相同,则IP地址大的成为Master路由器。Master路由器定期发送VRRP通告报文,通知备份组内的其他路由器自己..
分类:
其他好文 时间:
2014-05-20 19:15:04
阅读次数:
333