《重构-改善既有代码的设计》Martin Fowler 摘要: 第十章 简化函数调用
Rename Method 函数改名
改一个自表达的名字吧!骚年
Add Parameter 添加参数
某个函数需要从调用端得到更多信息。
为此函数添加一个对象参数,让该对象代价函数所需信息。并发编程大多数参数很长,不放在一个类中,因为这样你可以保证传递给函数的参数都是不可修...
分类:
其他好文 时间:
2014-06-10 15:24:00
阅读次数:
210
问题: cannot find -lnlcollect2: error: ld returned 1 exit statusmake: *** [wpa_supplicant] 错误 1解决方法:[fulinux@ubuntu wpa_supplicant]$ sudo apt-get install libnl-dev libssl-dev...
分类:
其他好文 时间:
2014-06-10 13:35:36
阅读次数:
262
VCF is a text format. It contains
meta-information lines, a header line, and then data lines each containing
information about a posittion in the geno...
分类:
其他好文 时间:
2014-06-10 11:35:34
阅读次数:
771
RMI:Remote Method
Invocation是java编程语言里,一种用于实现远程过程调用的应用程序编程接口。它使客户机上运行的程序可以调用远程服务器上的对象。参考:http://zh.wikipedia.org/wiki/Java_RMIJBI:Java
Business Integr...
分类:
其他好文 时间:
2014-06-10 10:16:20
阅读次数:
223
An IO call issynchronousif, when you call it, it
does not return until the operation is completed, or until enough time has
passed that your network s...
分类:
编程语言 时间:
2014-06-10 10:07:56
阅读次数:
273
public static Object invokeWebService(String
namespaces,String url, String method, Object[] params, Object[] paramNames) {
Object result = ...
分类:
Web程序 时间:
2014-06-10 09:46:33
阅读次数:
187
import java.awt.*;public class FrameDemo { public
static void main(String[] args) { // TODO Auto-generated method stub Frame
f=new...
分类:
其他好文 时间:
2014-06-10 09:27:25
阅读次数:
235
The oldest solution that people still use for
this problem is select(). The select() call takes three sets of fds (implemented
as bit arrays): one for...
分类:
编程语言 时间:
2014-06-10 08:26:42
阅读次数:
325
我手动配置hibernate4.3.4,测试的时候出现:
Caused by: org.hibernate.HibernateException: Connection cannot be null when 'hibernate.dialect' not set
我是按照官方文档配置的,但是官方文档的代码好像有点问题
这是官方文档里面的那个工具类的部分代码:return new Confi...
分类:
系统相关 时间:
2014-06-10 07:26:34
阅读次数:
371
在了解回调函数之前,你应该先去了解函数指针!!!
先看一个回调函数的例子:
#include
#include
void Call(void (*fp)(int) ,int x) //Call为调用者,fp为指向回调函数的函数指针
{
fp(x);
}
void CallBackFun1(int x) //CallBackFun1为回调函数
{
printf("回调函数Ca...
分类:
其他好文 时间:
2014-06-10 06:48:19
阅读次数:
171