随笔分类 -  pros

摘要:Python 3.3.5Debian 3.12One thing I found weird is using the following code is that the input I entered isn't displayed, even after I terminate the scr... 阅读全文

posted @ 2015-04-01 13:39 Kanone 阅读(823) 评论(0) 推荐(0)

摘要:下载颜色主题包并解压之:$ wget http://download.savannah.gnu.org/releases/color-theme/color-theme-6.6.0.tar.gz$ tar zxf ./color-theme-6.6.0.tar.gz复制文件color-theme.el和目录themes/到~/.emacs.d/下面编辑(没有则创建)~/.emacs文件,内容如下:(add-to-list 'load-path "~/.emacs.d/")(require 'color-theme)(color-theme-initializ 阅读全文

posted @ 2014-02-01 03:32 Kanone 阅读(297) 评论(0) 推荐(0)

摘要:hehe 阅读全文

posted @ 2014-02-01 02:38 Kanone 阅读(1355) 评论(0) 推荐(0)

摘要:is 操作符检验对象的同一性,测试两个对象名是否指向同一个对象任意参数: *, **函数调用中,所有的非关键字参数(name)必须首先出现,其后跟随所有的关键字参数(name=value),后白你跟着*name的形式,需要的话,最后跟着**name的形式在函数头部,参数必须以相同的顺序出现:一般参数(name),默认参数(name=value),*name, **name 阅读全文

posted @ 2013-11-24 06:43 Kanone 阅读(218) 评论(0) 推荐(0)

摘要:DebugActiveProcesswouldfailif a 32bit debugger tried to attach to a64bittarget 阅读全文

posted @ 2013-11-23 00:20 Kanone 阅读(399) 评论(0) 推荐(0)

摘要:JavaScript 作用域和作用域链 阅读全文

posted @ 2013-07-23 22:18 Kanone 阅读(527) 评论(0) 推荐(1)

摘要:参考链接:http://docs.python.org/2/howto/urllib2.html?highlight=urlopen%20timeoutThe Python support for fetching resources from the web is layered. urllib2 uses the httplib library, which in turn uses the socket library.As of Python 2.3 you can specify how long a socket should wait for a response before 阅读全文

posted @ 2013-06-08 19:32 Kanone 阅读(744) 评论(0) 推荐(0)

摘要:EVA Q已经流出了,看了下BDMV的大小,40G+,十分汗颜。决定还是先下载了OST吧。下好之后才发现里面的Booklets居然是JP2格式,这是一种比较新的图片格式,用的是JPEG2000算法,看了下文件头信息,看来放源的是用Jasper压缩的,本打算用Jasper直接生成普通的JPEG文件,但是在导入库时遇到了不少麻烦。于是换了另一种方法,用一个软件包:ImageMagick 。里面集成了很多有用的图像处理工具,而且对图像转换支持很好。里面的converter.exe就是负责转换的咯~,但是它默认不支持对某个目录下的图像进行转换。遂写了个Python脚本实现:# -*- coding: 阅读全文

posted @ 2013-04-24 04:44 Kanone 阅读(1068) 评论(0) 推荐(0)

摘要:一句话:采用eval函数计算JSON字符串时要添加额外的括号,如下:var object = eval('(' + JSON + ')'); 阅读全文

posted @ 2013-03-28 05:41 Kanone 阅读(368) 评论(2) 推荐(0)

摘要:从manual上知道了mysql_affected_rows函数当UPDATE前后的数据一样时会返回异常值,下面有个方便的解决办法,从官方munual上看到 bdobrica at gmail dot com留言的:As a solution to the problem pointed in the post reffering to mysql_affected_rows() returning 0 when you are making an update query and the fields are not modified although the query is valid, 阅读全文

posted @ 2013-03-23 02:30 Kanone 阅读(625) 评论(2) 推荐(0)

摘要:javascript函数作用域 阅读全文

posted @ 2013-03-22 15:41 Kanone 阅读(546) 评论(0) 推荐(0)

摘要:PAC文件 阅读全文

posted @ 2012-12-15 14:26 Kanone 阅读(325) 评论(0) 推荐(0)

摘要:迅雷精简版导入未完成任务 阅读全文

posted @ 2012-09-06 21:58 Kanone 阅读(2729) 评论(0) 推荐(0)

摘要:参考链接:http://www.doughellmann.com/PyMOTW/multiprocessing/basics.htmlOne difference between thethreadingandmultiprocessingexamples is the extra protection for__main__used in themultiprocessingexamples. Due to the way the new processes are started, the child process needs to be able to import the scrip 阅读全文

posted @ 2012-07-19 16:25 Kanone 阅读(211) 评论(0) 推荐(0)

摘要:参考资料:http://stackoverflow.com/questions/2774585/child-processes-created-with-python-multiprocessing-module-wont-printWell, IDLE is a strange thing. In order to "capture" everything what you write usingprintstatements orsys.stdout.write, IDLE "overrides"sys.stdoutand replaces it w 阅读全文

posted @ 2012-07-19 10:44 Kanone 阅读(1571) 评论(0) 推荐(0)

摘要:升级部署Python后发现交互模式下输入Ctrl,Alt,箭头等会出现乱码,解决如下:$sudo yum -y install readline readline-devel进入安装目录,$.configure$vim Modules/Setup //取消#readline readline.c -lreadline -ltermcap行的注释符#//su 转到root账户#make;make install 阅读全文

posted @ 2012-07-19 10:40 Kanone 阅读(356) 评论(0) 推荐(0)

摘要:最近在用Linux,为了方便装了个CentOS的虚拟机,并且一般用不着X Window,所以开机启动为了命令行模式,但是这个模式下有一个问题就是非英文的话无法正常显示。一直很苦恼这个问题,,看着屏幕上的一行行方框,,内心纠结万分。。无意间发现了PuTTY这个软件,,起初用这个只是为了方便同时打开多个终端进行操作,即用宿主机通过PuTTY连接虚拟机,后来看到晚上有解决PuTTY显示中文乱码的问题,于是居然用这个方法成功解决了~~去Window->Translation:Remote Character Set 改为UTF-8即可,效果立现哟~~ 阅读全文

posted @ 2012-03-12 13:37 Kanone 阅读(304) 评论(0) 推荐(0)

摘要:Apache服务器虚拟主机设置问题 阅读全文

posted @ 2011-12-09 21:59 Kanone 阅读(1939) 评论(0) 推荐(0)

摘要:UNIX编程 times函数 阅读全文

posted @ 2011-11-28 12:48 Kanone 阅读(343) 评论(0) 推荐(0)

摘要:volatile 阅读全文

posted @ 2011-11-04 14:08 Kanone 阅读(205) 评论(0) 推荐(0)