2014年1月7日
摘要: 转载自:http://libai.math.ncu.edu.tw/bcc16/6/putty/puttyt.htmlTerminal panelTerminal 面板可調整 PuTTY 對於模擬終端機的設定。[Terminal]‧[Keyboard] ‧[Bell]Terminal:Terminal 選項:Autowrap mode initially on :當此選項為開啟的時候,假使有個文件,此文件中有句子超過螢幕所能顯示的範圍時,它會自動輸出至下一行。DEC Origin Mode initially on :遠端伺服器可藉由此選項去控制 PuTTY 對於螢幕所顯示的範圍,通常情況之下並 阅读全文
posted @ 2014-01-07 15:50 turtle_fly 阅读(410) 评论(0) 推荐(0) 编辑
2013年8月25日
摘要: 本文环境:Python 2.7一个类的三个对象实例的属性被同时修改有段代码如下:class task_queue: queue=[] def append(self,obj): self.queue.append(obj) def print_queue(self): print self.queue if __name__=="__main__": a=task_queue() b=task_queue() c=task_queue() a.append('tc_1') ... 阅读全文
posted @ 2013-08-25 11:46 turtle_fly 阅读(62762) 评论(1) 推荐(2) 编辑
摘要: 本文环境:Python 2.7使用 print obj 而非 print(obj)一些背景sys.stdout 与 print当我们在 Python 中打印对象调用 print obj 时候,事实上是调用了 sys.stdout.write(obj+'\n')print 将你需要的内容打印到了控制台,然后追加了一个换行符print 会调用 sys.stdout 的 write 方法以下两行在事实上等价:sys.stdout.write('hello'+'\n')print 'hello'sys.stdin 与 raw_input当 阅读全文
posted @ 2013-08-25 10:45 turtle_fly 阅读(100715) 评论(2) 推荐(9) 编辑
2013年7月15日
摘要: 转载自:http://www.lingcc.com/2011/12/15/11902/#sec-1日常使用python编程时,为了用某个代码模块,通常需要在代码中先import相应的module。那么python的import是如何工作的呢?Table of Contents1 如何使用import2 import语句针对单个模块文件的工作方式3 import语句针对模块包的工作方式4 总结及深入阅读5 参考1如何使用import对于大型的软件项目,模块化的管理非常有必要.于是在现如今的面向对象语言中,都有相应的机制来应对这一问题.如C++中的namespace, Java中的package, 阅读全文
posted @ 2013-07-15 18:01 turtle_fly 阅读(1097) 评论(0) 推荐(1) 编辑
2013年5月30日
摘要: Linux ProcessView Process StateWe can view Linux process by ps or top, major difference between them is that,ps shows a static state at that time point, while top dynamically shows process statusThere's a field called "S" or "STAT" in ps & top echo.These two fields indica 阅读全文
posted @ 2013-05-30 22:01 turtle_fly 阅读(858) 评论(0) 推荐(0) 编辑
2013年3月18日
摘要: 来自于crifan的一篇文章,便于参考:Linux系统中的根文件系统,Root FileSystem,简称为rootfs;关于rootfs,之前一直很迷惑,不知道所要表达的真正的含义;即便是通过buildroot自己建立了相关的rootfs之后,还是没能很明白的理解,到底rootfs是啥。现在,突然,有那么一点明白了。rootfs,其实就是,针对特定的操作系统的架构,一种实现的形式;具体表现为,特定的文件夹,文件夹之间的关系,即组织架构,以及特定的各种文件;再详细解释为:Linux中的rootfs,就是那些文件夹和文件,包括什么根文件目录’/’系统相关的配置文件目录/etc存放系统启动相关配置 阅读全文
posted @ 2013-03-18 17:06 turtle_fly 阅读(3160) 评论(0) 推荐(0) 编辑
2013年3月13日
摘要: 问题/home/ffv/Downloads/tools/arm-2009q3/arm-none-linux-gnueabi/bin/../arm-none-linux-gnueabi/libc/lib/libc.so.6 section .tbss mismatches non-TLS reference in libz.a(gzio.o)/home/ffv/Downloads/tools/arm-2009q3/arm-none-linux-gnueabi/bin/../arm-none-linux-gnueabi/libc/lib/libc.so.6: could not read symb 阅读全文
posted @ 2013-03-13 16:05 turtle_fly 阅读(1725) 评论(0) 推荐(0) 编辑
摘要: 转载自:http://bbs.phpchina.com/blog-191373-187668.html方法1这两天在构建一个应用的使用用到了maven,由于project很大,足足有700多个 pom.xml文件,更郁闷的是在很多pom.xml文件里都单独指定了资源库的url,我需要把这些资源库的url统一指定到nexus本地中央库.手 工一个个改文件配置有点不太实际,所以google了一下,找到批量替换文件内容的好方法,命令结构如下:find -name '要查找的文件名' | xargs perl -pi -e 's|被替换的字符串|替换后的字符串|g'下面 阅读全文
posted @ 2013-03-13 11:03 turtle_fly 阅读(8038) 评论(0) 推荐(1) 编辑
2013年2月5日
摘要: The general steps to build linux kernel is:1. Preparation2. Kernel configuration3.Make and install kernel image and modulesHere I use linux-3.4.28 on Ubuntu 12.04 LTS to make a demo.The cmd to check kernel rev is:$ uname --kernel-releasePreparation1. Download kernel source from: www.kernel.org.Linux 阅读全文
posted @ 2013-02-05 18:30 turtle_fly 阅读(839) 评论(0) 推荐(0) 编辑
2013年1月11日
摘要: 服务器使用的是 Ubuntu 12.04 LTS如果能远程桌面的话,就能更快的看到配置效果了,所以先岔开一截推荐一篇远程桌面的文章:http://www.cnblogs.com/xdzone/archive/2011/03/10/1979644.html我最受用的一行是从 Windows 远程桌面 ... 阅读全文
posted @ 2013-01-11 15:59 turtle_fly 阅读(1937) 评论(0) 推荐(0) 编辑