上一页 1 2 3 4 5 6 7 8 9 ··· 17 下一页

2014年3月18日

摘要: 经验总结:首先要把cobertura.jar包含ant的classpath路径中,其次要求它包含在测试用例的classpath中;使用cobertura做代码覆盖率测试中出现的问题:覆盖率始终为0,不论是否有可用的测试用例都如此;解决问题的历程:第一步:在被测工程中增加了一个很简单的方法,在测试工程中增加了一个对前述方法的测试,发现覆盖度仍为0,由此确定是使用cobertura的方法有问题,而不是... 阅读全文
posted @ 2014-03-18 08:14 leechau 阅读(590) 评论(0) 推荐(0) 编辑
摘要: google: public telnet server listfor example:telnet nethack.alt.orgssh nethack@alt.org 阅读全文
posted @ 2014-03-18 08:14 leechau 阅读(234) 评论(0) 推荐(0) 编辑
摘要: Compared aria2c, axel and wget, aria2c is the best. It support multi-thread download (with "-s ") and resume partially downloaded files automatically (you have to use "-c" in wget for this function). ... 阅读全文
posted @ 2014-03-18 08:14 leechau 阅读(194) 评论(0) 推荐(0) 编辑
摘要: System.arraycopy是复制数组的一个常用工具,它在游标处如何分为两个是一个需要注意的问题,例如下面的示例代码: byte [] src = { 104, 101, 108, 108, 111 }; int endPos = 2; byte [] dest = new byte [endPos]; byte [] surplus = new byte [src. length - e... 阅读全文
posted @ 2014-03-18 08:13 leechau 阅读(142) 评论(0) 推荐(0) 编辑
摘要: U盘上的多系统启动工具,Windows上YUMI比较好,Ubuntu上MultiSystem用法复杂,unetbootin是另外一款,需要安装p7zip(apt-get install p7zip-full),不能做多个Live CD在一个U盘上,安装新系统前要格式化USB盘,否则安装无效。用YUMI制作包含小马PE 2013版(XMPE2013.ISO)、Windows 7安装盘和Ubuntu ... 阅读全文
posted @ 2014-03-18 08:13 leechau 阅读(302) 评论(0) 推荐(0) 编辑
摘要: 向邮件列表中发邮件时,要求邮件格式必须是纯文本格式的,在thunderbird中,邮件格式(plain text或者html格式)在【工具->账户设置->[账户名称]->通讯录】下的“以HTML格式编写消息”中设置,英文版此开关的位置是【Tools -> Account Settings -> [Account Name]-> Composition & Addressing -> Compose... 阅读全文
posted @ 2014-03-18 08:13 leechau 阅读(828) 评论(0) 推荐(0) 编辑
摘要: 这一问题O' Reilly出版的"Learning Python" 2nd Edition的 13.4 节有专门论述,对于不可变(immutabe)对象,函数参数(这里是x和y)只是函数(这里是change)名字空间里对象(这里是0和[3,4])的一个新名字,当x=1时,x指向了一个新对象,外层的X与0之间的引用关系不受影响,类似于Pascal的 “值传递”,对于可变(mutable)对象,由于不... 阅读全文
posted @ 2014-03-18 08:13 leechau 阅读(704) 评论(0) 推荐(0) 编辑
摘要: 用户确定线程号qth和时间范围[qst, qet];读入文本文件; 将有效行标志位vline设为false; 读入第一行数据,判断是否为日志输出;若是:提取线程号thread_no和时间cur_time,将vline设为true;否则:若vline=true,输出该行否则忽略该行;若线程号不是qth 忽略该行; 若cur_time<qst忽略该行; 输出本行数据,循环读入下一行文本; 用grep ... 阅读全文
posted @ 2014-03-18 08:13 leechau 阅读(124) 评论(0) 推荐(0) 编辑
摘要: lscpucat /proc/cpuinfo对绝大多数Linux适用,lscpu更简练cat /proc/cpuinfo下面是一个实例:processor : 0 vendor_id : GenuineIntel cpu family : 6 model : 26 model name : Intel(R) Xeon(R) CPU X5550 @ 2.67GHz stepping ... 阅读全文
posted @ 2014-03-18 08:13 leechau 阅读(587) 评论(0) 推荐(0) 编辑
摘要: VIM的自带的脚本功能很强,但只能用在VIM自己上,如果让它支持Python脚本,那简直就无敌了,这个想法当然不是我想出来的,应该说英雄所见略同,于是乎vim7.2就内建了对python2.4的支持,这么有前途的功能当然得尝尝鲜啦,下面就是实现过程: 1 检查vim是否支持python;用:version命令,找其中的“python/dyn”一项,如果前面是加号,表示支持,如果是减号,就另找一个... 阅读全文
posted @ 2014-03-18 08:12 leechau 阅读(613) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 ··· 17 下一页

导航