码迷,mamicode.com
首页 >  
搜索关键字:note to self    ( 21530个结果)
php preg正则表达式
Note:反斜线在单引号字符串和双引号字符串中都有特殊含义,因此要匹配一个反斜线, 模式中必须写为 ”\\\\”。 译注: “/\\/”, 首先它作为字符串,反斜线会进行转义, 那么转义后的结果是/\/,这个才是正则表达式引擎拿到的模式, 而正则表达式引擎也认为 \ 是转义标记,它会将分隔符 / 进...
分类:Web程序   时间:2014-08-24 00:14:51    阅读次数:228
python排序
import mathclass sort: def selectSort(self, L): size = len(L) for i in range(0, size): max = L[i] index = i ...
分类:编程语言   时间:2014-08-23 22:48:11    阅读次数:205
LeetCode——4Sum
Given an array S of n integers, are there elements a, b, c, and d in S such that a + b + c + d = target? Find all unique quadruplets in the array which gives the sum of target. Note: Element...
分类:其他好文   时间:2014-08-23 16:49:21    阅读次数:166
LeetCode——3Sum
Given an array S of n integers, are there elements a, b, c in S such that a + b + c = 0? Find all unique triplets in the array which gives the sum of zero. Note: Elements in a triplet (a,b,c...
分类:其他好文   时间:2014-08-23 15:24:41    阅读次数:153
Subsets
Given a set of distinct integers, S, return all possible subsets.Note:Elements in a subset must be in non-descending order.The solution set must not c...
分类:其他好文   时间:2014-08-23 15:11:00    阅读次数:153
LeetCode: Single Number
LeetCode: Single NumberGiven an array of integers, every element appears twice except for one. Find that single one. Note:Your algorithm should have a...
分类:其他好文   时间:2014-08-23 12:38:10    阅读次数:212
Yii框架常见问题: CGridView关联表字段的filter问题解决
Model: 1. 添加filter用的属性 var $a = “”; var $b = “”; 2. 修改rules方法中的配置 array(‘……., a, b’, ‘safe’, ‘on’=>’search’); 3. 注意relations方法 public function relations() { // NOTE:...
分类:其他好文   时间:2014-08-22 21:17:29    阅读次数:315
navigationitem的背景图片和左边返回按钮 以及文字
[self.navigationController.navigationBar setBackgroundImage:imag forBarMetrics:UIBarMetricsDefault]; //button 定义你要的背景 文字 或 事件  UIBarButtonItem *leftBarButton = [[UIBarButtonItem alloc]...
分类:其他好文   时间:2014-08-22 17:57:29    阅读次数:214
photoWall自定义
- (instancetype)initWithFrame:(CGRect)frame{ self = [super initWithFrame:frame]; if (self) { _scrollView = [[UIScrollView alloc] initWith...
分类:其他好文   时间:2014-08-22 17:45:09    阅读次数:229
ios 绘制曲线走势图
- (void)drawLine{ //view是曲线的背景view UIView *view = [[UIView alloc]initWithFrame:CGRectMake(10, 0, 300, 300)]; view.backgroundColor = [UIColor whiteColor]; [self.view addSubview:vie...
分类:移动开发   时间:2014-08-22 16:29:09    阅读次数:247
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!