-----------------------------------------------------------------
在www.infoq.com/cn网站上看了一本书叫《ThoughtWorks文集》,里边有一章讲的是“对象健身操”,其中提到了“拒绝使用else关键字”。那么如何“拒绝使用else关键字”呢?
1、如果程序中只有一个else...
分类:
其他好文 时间:
2014-07-22 23:04:34
阅读次数:
409
So, the New Year holidays are over. Santa Claus and his colleagues can take a rest and have guests at last. When two "New Year and Christmas Men" meet, thear assistants cut out of cardboard the letter...
分类:
其他好文 时间:
2014-07-22 23:03:53
阅读次数:
521
whether two nohead-linkedlist have the same end
个人信息:就读于燕大本科软件工程专业 目前大三;
本人博客:google搜索“cqs_2012”即可;
个人爱好:酷爱数据结构和算法,希望将来从事算法工作为人民作出自己的贡献;
博客内容:在无头节点的链表里删除元素;
博客时间:2014-4-15;
编程语言:C+...
分类:
其他好文 时间:
2014-05-01 18:13:31
阅读次数:
352
在memory.c里面,遇到一个宏定义,如下:
#define CODE_SPACE(addr) ((((addr)+4095)&~4095) start_code + current->end_code)
看的第一眼,不知道,第二眼,还是不知道,纠结了半天还是不知道。
睡了一晚,今天早上再看,嘿嘿,居然看懂了。。。
这个宏定义用于判断给定的addr线...
分类:
系统相关 时间:
2014-05-01 17:54:09
阅读次数:
516
大家对va_list , va_start,va_arg,va_end
不陌生吧? 对scanf, printf类型
(如sscanf,sprintf)的带可变参数的函数的原理知道多少呢?
如果有兴趣了解的
话,推荐大家阅读: http://www.cnblogs.com/acutus/p/variable-parameter.html
当然,值得指出...
分类:
编程语言 时间:
2014-04-30 22:21:40
阅读次数:
364
问题现象:
Eclipse按装maven插件之后,每次启动Eclipse都会弹出:
Eclipse is running in a JRE, but a JDK is required
Some Maven plugins may not work when importing projects or updating source folders.
问题原因:
从提示信息上看,就是...
分类:
系统相关 时间:
2014-04-30 22:11:38
阅读次数:
382
Sliding Window
Time Limit: 12000MS
Memory Limit: 65536K
Total Submissions: 36147
Accepted: 10700
Case Time Limit: 5000MS
Description
An array of size n ≤ 106 i...
在项目中有时需要验证用户是否以post方式提交。下面是验证源码:
public boolean checkMethod(String method) {
if (request.getMethod().equalsIgnoreCase(method)) {
return true;
}
else {
...
分类:
Web程序 时间:
2014-04-29 13:34:20
阅读次数:
350
The blonde Angela has a new whim: internet chats. Of course, as any blonde, she writes her messages using the upper case. You are the moderator of Angela's favorite chat and you're fed up with her upp...
分类:
其他好文 时间:
2014-04-29 13:17:21
阅读次数:
293
实现一个登陆系统。
思路:
1 使用map,在map中的就是已经注册的了
2 使用数据结构保存用户名,是否登陆和密码
3 使用if else判断处理第一个字符串-命令
类似很多人都写的什么图书馆管理系统,什么信息系统之类的登陆控制管理,都是很简单的东西,一步一步写就不会错了,完成速度相当于打字速度。...
分类:
其他好文 时间:
2014-04-29 13:16:21
阅读次数:
298