码迷,mamicode.com
首页 >  
搜索关键字:c reverse array stri    ( 35258个结果
调试常用的方法
1 object.methods() # 列出对象的类的实例方法。即该实例的可用方法列表。puts [].methods.grep /^re/ #列出Array以re开头的实例方法列表2 object.instance_variables() #列出对象(Module或Class)的实例变量cl.....
分类:其他好文   时间:2014-05-09 04:05:02    阅读次数:278
linux 内核源码分析 - 获取数组的大小
#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))   测试程序: #include #include struct dev { int a; char b; float c; }; struct dev devs[]= { { 1,'a',7.0, }, { 1,'a',7.0, }, { ...
分类:系统相关   时间:2014-05-09 02:10:16    阅读次数:494
误释放对象
问题一:value = [array objectAtIndex:n]; //得到一个数组中的对象[arry removeObjectAtIndex:n]; //卸载那个对象因为value得到了那个对象,但是由于另外一个拥有者release了该对象,所以其实value现在成了摇摆指针(无效数据)问题...
分类:其他好文   时间:2014-05-09 00:02:03    阅读次数:366
Objective C 代码片段(类别)
1 @interface NSString (reverse)2 3 -(NSString *) reverseString;4 5 @end 1 @implementation NSString (reverse) 2 3 -(NSString *) reverseString { 4 ...
分类:其他好文   时间:2014-05-08 23:54:31    阅读次数:438
常用判断
isset:变量是否设置,或者是否未null$var="11";isset($var);返回1isset($empty);返回0数组$arr=array();isset($arr);返回1empty:""、0、"0"、NULL、FALSE、array()、var $var;以及没有任何属性的对象都将...
分类:其他好文   时间:2014-05-08 23:43:03    阅读次数:350
MySQL源码 数据结构array
MySQL源码中自己定义了许多数据结构,放在mysys的目录下,源码中通常都使用这些数据结构来组织存放数据,也更容易实现跨平台。下面先来看下MySQL定义的动态数组:【源代码include/array.h mysys/array.c】typedef struct st_dynamic_array{ ...
分类:数据库   时间:2014-05-08 18:10:32    阅读次数:392
LeetCode——Single Number(II)
Single Number  Total Accepted: 19800 Total Submissions: 44027My Submissions Given an array of integers, every element appears twice except for one. Find that single one. Note: Your algor...
分类:其他好文   时间:2014-05-08 11:01:40    阅读次数:298
Search Insert Position
Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in or...
分类:其他好文   时间:2014-05-08 07:29:02    阅读次数:285
Leetcode | Two Sum
Given an array of integers, find two numbers such that they add up to a specific target number.The function twoSum should return indices of the two nu...
分类:其他好文   时间:2014-05-08 06:33:29    阅读次数:339
yii验证表单
1、yii框架中验证的类文件:上面红线内是验证的具体的类文件,下面的这个文件制定了类的别名。2、验证邮箱的时候默认不能为空,除了可以在模型里面设置为required外,还可以在模型的rule里面,在对应的email类里面可以看到这个allowEmpty参数。array(‘kemail‘,‘email‘,‘allowEm..
分类:其他好文   时间:2014-05-08 02:37:35    阅读次数:1080
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!