1 object.methods() # 列出对象的类的实例方法。即该实例的可用方法列表。puts
[].methods.grep /^re/ #列出Array以re开头的实例方法列表2 object.instance_variables()
#列出对象(Module或Class)的实例变量cl.....
分类:
其他好文 时间:
2014-05-09 04:05:02
阅读次数:
278
#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
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源码中自己定义了许多数据结构,放在mysys的目录下,源码中通常都使用这些数据结构来组织存放数据,也更容易实现跨平台。下面先来看下MySQL定义的动态数组:【源代码include/array.h
mysys/array.c】typedef struct st_dynamic_array{ ...
分类:
数据库 时间:
2014-05-08 18:10:32
阅读次数:
392
代码风格1、有关状态机的设计风格(1)状态转移单独写成一个模块。(2)状态的操作和判断写成一个模块。2、如果芯片有乘法器,可以使用*运算符。3、三态一般只在顶层使用。子模块就将inout分解。4、敏感信号列表应包括:所有输入信号,判断条件。希望通过增减信号列表实现某项逻辑功能是大错特错的。5、cas...
分类:
其他好文 时间:
2014-05-08 17:55:02
阅读次数:
233
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
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
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
详解Exchange2013客户端访问高可用当我们在考虑ExchangeServer2013的高可用时,除了一定要保证邮箱服务器高可用之外,我们也必须确保客户端访问服务器的高可用性。学完本节后我们将能够:1、为客户端访问服务器的高可用性规划软硬件;2、描述网络负载均衡(NLB);3、描述应用NL..
分类:
其他好文 时间:
2014-05-08 02:44:41
阅读次数:
681