给字符串的字符和数字间加上空隔var str = 'a23dssf12ldf2lf4';function addSplit(str){ var reg = /(\D+)/g; var str = str.replace(/(\d+)/g, ' $1 '); return str.r...
分类:
其他好文 时间:
2014-07-10 12:40:38
阅读次数:
179
1 UIGraphicsBeginImageContext(self.view.bounds.size);// 设置上下文2 3 [self.view.layer renderInContext:UIGraphicsGetCurrentContext()];4 5 UIImage *image=UI...
分类:
移动开发 时间:
2014-07-10 11:01:17
阅读次数:
199
Given preorder and inorder traversal of a tree, construct the binary tree.Note:You may assume that duplicates do not exist in the tree.方法一:最先想到的就是递归,注...
分类:
其他好文 时间:
2014-07-10 09:58:40
阅读次数:
224
1 # -*-coding:gb2312-*- 2 3 #Function:测试一下多继承 4 5 class A: 6 7 def F1(self): 8 print '调用A.F1()' 9 10 def F2(self):11 ...
分类:
其他好文 时间:
2014-07-10 00:38:31
阅读次数:
367
Given an array of integers, every element appearstwiceexcept for one. Find that single one.Note:Your algorithm should have a linear runtime complexity...
分类:
其他好文 时间:
2014-07-07 23:24:09
阅读次数:
210
Given inorder and postorder traversal of a tree, construct the binary tree.Note:You may assume that duplicates do not exist in the tree.方法:在inorder中寻找...
分类:
其他好文 时间:
2014-07-07 23:18:53
阅读次数:
283
Given an array of integers, every element appearsthreetimes except for one. Find that single one.Note:Your algorithm should have a linear runtime comp...
分类:
其他好文 时间:
2014-07-07 22:57:13
阅读次数:
309
InnoDB: Operating system error number 87 in a file operation. 错误87的解决方法140628 8:10:48 [Note] Plugin 'FEDERATED' is disabled.140628 8:10:48 InnoDB: The...
分类:
数据库 时间:
2014-07-07 21:36:13
阅读次数:
810
Built-in Control Structures 内置控制结构1 if 控制结构scala的if跟java的if结构上相同,功能上也差不太多,scala的说法是,if能够返回一个值 val fileName = if (!args.isEmpty) args(0) else "default....
分类:
其他好文 时间:
2014-07-07 18:33:10
阅读次数:
169
1. 定义一个方法-(void) update{ }2. 对象注册,并关连消息[[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(update) name:@"update" object:nil]3. 在...
分类:
其他好文 时间:
2014-07-07 17:45:21
阅读次数:
312