1 const 传达的意思应该是这个变量是常量不能更改2 const 在 * 左边表示数据是const,在右边表示指针是const // char greeting[] = "hello"; char* p = greeting; //const *: const data //...
分类:
编程语言 时间:
2014-06-25 11:12:18
阅读次数:
229
1 overload a operator of a class, you can only use one para., this pointer is automatically used. class Rational { public: //not correct sinc...
分类:
其他好文 时间:
2014-06-25 11:11:37
阅读次数:
194
不知道为什么计组老师的大量课件字体是伤害视力的亮蓝色……看久了眼睛疼,想把颜色替换成保护视力一点的灰色,但是找了N久也没找到在图形界面上直接操作的方法,于是在MSDN上晃了晃,Google了一下,写了个VBA小脚本,只替换选定颜色,这样可以保留红色或者其他颜色的高亮,顺便把让人分心的花花背景也干掉。...
分类:
其他好文 时间:
2014-06-25 11:11:01
阅读次数:
502
Given a linked list, reverse the nodes of a linked listkat a time and return its modified list.If the number of nodes is not a multiple ofkthen left-o...
分类:
其他好文 时间:
2014-06-25 11:10:16
阅读次数:
163
在Intel Haswell架构里引入了Gather特性。它使得CPU可以使用向量索引存储器编址从存储器取非连续的数据元素。这些gather指令引入了一种新的存储器寻址形式,该形式由通过一个向量寄存器(XMM或YMM)所指定的一个基地址寄存器和多个索引。数据元素大小支持32位与64位,并且数据类型支...
分类:
其他好文 时间:
2014-06-25 11:09:37
阅读次数:
167
更新到Android 4.4,写了个小程序。发现运行不起来了。抛空指针异常。debug模式下,发现在onCreate方法中获取Button是null。Android 4.4把layout进行了重组,全部放到了Fragment下,在onCreate方法执行时,Fragment还没有被调用,所以在这个方...
分类:
移动开发 时间:
2014-06-25 11:08:26
阅读次数:
361
Given a string containing just the characters '(' and ')', find the length of the longest valid (well-formed) parentheses substring.For "(()", the lon...
分类:
其他好文 时间:
2014-06-25 11:07:45
阅读次数:
230
程序员生存定律这系列的目录在这里:程序员生存定律--目录喜欢从头瞄的,可以移步。------------------------------------------------------------------------------1掌握读代码的方法和技巧不管最终想成为什么,刚入行之后,一定离不...
分类:
其他好文 时间:
2014-06-25 11:05:46
阅读次数:
229
$area = array(array('id'=>1,'name'=>'安徽','parent'=>0),array('id'=>2,'name'=>'海淀','parent'=>7),array('id'=>3,'name'=>'濉溪县','parent'=>5),array('id'=>4,'...
分类:
其他好文 时间:
2014-06-25 11:05:07
阅读次数:
273
#include#include#include#includeusing namespace std;#define N 220000#define inf 0x3ffffffffffffffLLtypedef long long ll;int v[N],e[N],ne[N],nn,w[N];vo...
分类:
其他好文 时间:
2014-06-25 11:04:35
阅读次数:
268