python在交互模式下,输入命令的时候按tab键就按时间tab键的功能输出,在书写python时多有不便。把下面的代码写入一个文件tab.py,放到/usr/lib/python2.6/site-packages/下#!/usr/bin/envpython
importsys
importreadline
importrlcompleter
importatexit
importos
readline.p..
分类:
编程语言 时间:
2014-08-21 11:43:45
阅读次数:
235
Problem 31
In England the currency is made up of pound, £, and pence, p, and there are eight coins in general circulation:
1p, 2p, 5p, 10p, 20p, 50p, £1 (100p) and £2 (200p).
It is possible to ...
分类:
其他好文 时间:
2014-08-21 11:30:04
阅读次数:
169
在ubuntu上使用uwsgi部署CherryPy的应用...
分类:
其他好文 时间:
2014-08-21 11:28:34
阅读次数:
197
博客迁往:新地址(点击直达)新博客使用markdown维护,线下有版本号库,自己写的所以会定时更新同步,同一时候提供更好的导航和阅读体验csdn对markdown支持不好,所以旧版不会花时间进行同步修订,抱歉----------------------------------------------...
分类:
编程语言 时间:
2014-08-21 11:18:23
阅读次数:
271
在分析和处理选择内容时,还需注意页面的JS可能会修改DOM树结构。 (一)GitHub的使用 ????由于之前使用Win,没使用过shell的。目前只是了解。以后再补充。找到几个不错的教程 ? ? ????GitHub超...
分类:
编程语言 时间:
2014-08-21 09:55:44
阅读次数:
251
Cacti是一套基于PHP,MySQL,SNMP及RRDTool开发的网络流量监测图形分析工具。被广泛的用于对服务器的运维监控中,Cacti提供了一种插件式的管理,只要按要求写好特定的模板,那么你就可以对任何服务进行流量监控。本文就是要为大家介绍两个模板,分别是MongoDB和Redis的Cacti模板,使用它,你可以对你的MongoDB和Redis服务进行流量监控。1,升级python,此时如果...
分类:
其他好文 时间:
2014-08-21 09:49:33
阅读次数:
261
Problem 30
Surprisingly there are only three numbers that can be written as the sum of fourth powers of their digits:
1634 = 14 + 64 + 34 + 44
8208 = 84 + 24 + 04 + 84
9474 = 94 + 44 + 74 + 44...
分类:
其他好文 时间:
2014-08-21 09:48:04
阅读次数:
251
当初学 Python 时,想要弄懂 Python 的错误信息的含义可能有点复杂。这里列出了常见的的一些让你程序 crash 的运行时错误。1)忘记在if,elif,else,for,while,class,def声明末尾添加 :(导致 “SyntaxError :invalid syntax”)该错...
分类:
编程语言 时间:
2014-08-21 09:45:53
阅读次数:
269
To 十进制二进制: >>> int('110', 2) -> 6八进制: >>> int('10', 8) -> 8十六进制: >>> int('10', 16) -> 16 >>> int('1A', 16) -> 26To 十六进制:十进制: >>>hex(12) -> ‘0xc’二进制: >...
分类:
编程语言 时间:
2014-08-21 09:34:23
阅读次数:
280
Problem 29
Consider all integer combinations of ab for 2 ≤ a ≤ 5 and 2 ≤ b ≤ 5:
22=4, 23=8, 24=16, 25=32
32=9, 33=27, 34=81, 35=243
42=16, 43=64, 44=256, 45=1024
52=25, 53=125, 54=625, 55=312...
分类:
其他好文 时间:
2014-08-21 08:26:53
阅读次数:
177