3SumGiven an arraySofnintegers, are there elementsa,b,cinSsuch thata+b+c= 0? Find all unique triplets in the array which gives the sum of zero.Note:El...
分类:
其他好文 时间:
2014-07-15 08:51:50
阅读次数:
231
Previously, I doubted about possible data transfer errors during file synchronization using rsync. Now, I feel relieved according to the manual:Note t...
分类:
其他好文 时间:
2014-07-15 00:38:37
阅读次数:
330
先上图:
这个UIView可以这样写:
-(id)initWithFrame:(CGRect)frame backImage:(UIImage*)image msgStr:(NSString*)txt
txtColor:(UIColor*)color{
self = [super initWithFrame:frame];
if (self)...
分类:
移动开发 时间:
2014-07-14 11:22:27
阅读次数:
246
/*方法名决定是否开启新线程(async,sync),队列类型(全局队列,串行队列)决定开启多少条线程1.快速线程调用*开启后台线程执行任务[self performSelectorInBackground:@selector(test) withObject:nil];*回到主线程执行任务[sel...
分类:
移动开发 时间:
2014-07-14 08:50:04
阅读次数:
328
Filter过滤器就是一个对所有的请求进行intercept(拦截),然后对请求进行相应的处理,或者servlet处理完成之后,对response进行处理等。而这一切,servlet永远不可能知道。Filter和Servlet的相同点1 容器也知道Filter的API一旦一个java类实现了Filt...
分类:
Web程序 时间:
2014-07-13 23:35:20
阅读次数:
357
PHP编程中经常需要用到一些服务器的一些资料,特把$_SERVER的详细参数整理下,方便以后使用。
$_SERVER['PHP_SELF'] #当前正在执行脚本的文件名,与 document root相关。
$_SERVER['argv'] #传递给该脚本的参数。
$_SERVER['argc'] #包含传递给程序的命令行参数的个数(如果运行在命令行模式)。
$_SERVER['GATEW...
分类:
Web程序 时间:
2014-07-13 18:54:34
阅读次数:
323
Given two sorted integer arrays A and B, merge B into A as one sorted array.
Note:
You may assume that A has enough space (size that is greater or equal to m + n) to hold additional elements from ...
分类:
其他好文 时间:
2014-07-13 17:21:40
阅读次数:
208
Given a binary tree, return the postorder traversal of its nodes' values.
For example:
Given binary tree {1,#,2,3},
1
2
/
3
return [3,2,1].
Note: Recursive solut...
分类:
其他好文 时间:
2014-07-13 17:18:19
阅读次数:
193
<?phpdefined(‘ACC‘)||exit(‘AccessDenied‘);//配置文件读取类classconf{protectedstatic$ins=null;protected$cfg=array(‘db‘=>‘java0620‘);publicstaticfunctiongetIns(){if(self::$ins===null){self::$ins=newself();}returnself::$ins;}finalprotectedfunction__const..
分类:
Web程序 时间:
2014-07-13 14:33:03
阅读次数:
216
Say you have an array for which the ith element is the price of a given stock on day i.
Design an algorithm to find the maximum profit. You may complete at most two transactions.
Note:
You ma...
分类:
其他好文 时间:
2014-07-13 13:55:14
阅读次数:
305