摘要:
转自 http://s99f.blog.163.com/blog/static/351183652010104101636347/VIM 代码折叠VIM代码折叠方式可以用"foldmethod"选项来设置,如: set foldmethod=indent有6种方式来折叠代码1. manual //手工定义折叠2. indent //用缩进表示折叠3. expr //用表达式来定义折叠4. syntax //用语法高亮来定义折叠5. diff //对没有更改的文本进行折叠6. marker //用标志折叠 vim 配置文件分为全局配置文件和用户配置文件 1. 全局配置文件查找 阅读全文
阅读排行榜
Tips & Tricks
2012-11-14 17:04 by Demote, 166 阅读, 收藏,
摘要:
From: usaco trainingTips & TricksBrute force it when you canKISS: Simple is smart!Hint: focus onlimits(specified in problem statement)Waste memory when it makes your life easier (if you can get away with it)Don't delete your extra debugging output, comment it outOptimize progressively, and o 阅读全文
最近遇到的HashTable的愚蠢问题
2012-07-16 10:23 by Demote, 158 阅读, 收藏,
摘要:
1. 删除表头第一个元素时直接将头指针指向NULL,导致hash冲突链断裂 HashChain[idx] = NULL;2. 从Hash表的冲突链中删除元素时,只将该元素的前后指针改为 if(cur->hash_prev) { cur->hash_prev->hash_next = cur->hash_next; } if(cur->hash_next) { cur->hash_next->hash_prev = cur->hash_prev; }导致若该元素处于冲突链第一项时,由于表头指针仍然指向该表项,使得并没有真正删除,导致未知Bug.应该 阅读全文
用GDB调试程序(zz)
2011-11-09 10:41 by Demote, 144 阅读, 收藏,
摘要:
说明:转自:http://blog.csdn.net/haoel/作者:haoel用GDB调试程序GDB概述————GDB是GNU开源组织发布的一个强大的UNIX下的程序调试工具。或许,各位比较喜欢那种图形界面方式的,像VC、BCB等IDE的调试,但如果你是在UNIX平台下做软件,你会发现GDB这个调试工具有比VC、BCB的图形化调试器更强大的功能。所谓“寸有所长,尺有所短”就是这个道理。一般来说,GDB主要帮忙你完成下面四个方面的功能: 1、启动你的程序,可以按照你的自定义的要求随心所欲的运行程序。 2、可让被调试的程序在你所指定的调置的断点处停住。(断点可以是条件表达式) 3、当程序被停住 阅读全文
How to Hire a Programmer
2012-03-07 14:47 by Demote, 139 阅读, 收藏,
摘要:
http://www.codinghorror.com/blog/2012/03/how-to-hire-a-programmer.html 阅读全文