该读书了……
Tuesday, 11. July 2006, 16:44:59
我想应该花费点时间好好看书了!
列出感兴趣的书单,也不一定都能读,不过计划是这样的!
技术部分:
-
代码大全2
-
UNIX环境高级编程第2版 W.Richard Stevens
-
编码的奥秘 Charles Petzold
非技术部分:
Tuesday, 11. July 2006, 16:44:59
Wednesday, 28. June 2006, 12:15:42
从我们赤裸裸地来到这世上的那一天起,我们开始了从无到有的积累过程;
从我们懂得追求开始,我们又开始了患得患失的梦;
从我们拥有了我们想要的一切,我们又开始了从有到无的遗失过程;
直到我们即将与世长辞的那一刻,才发现自己一无所有!
Tuesday, 27. June 2006, 08:46:41

Sunday, 25. June 2006, 15:21:09
import random
def quicksort(lst):
if len(lst) <= 1: return lst
pivot = lst[random.randrange(len(lst))]
left = [x for x in lst if x < pivot]
middle = [x for x in lst if x == pivot]
right = [x for x in lst if x > pivot]
return quicksort(left) + middle + quicksort(right)Sunday, 25. June 2006, 14:52:56
# ~/.pythonrc
# enable syntax completion
try:
import readline
except ImportError:
print "Module readline not available."
else:
import rlcompleter
readline.parse_and_bind("tab: complete")
# Add auto-completion and a stored history file of commands to your Python
# interactive interpreter. Requires Python 2.0+, readline. Autocomplete is
# bound to the Esc key by default (you can change it - see readline docs).
#
# Store the file in ~/.pystartup, and set an environment variable to point
# to it, e.g. "export PYTHONSTARTUP=/max/home/itamar/.pystartup" in bash.
#
# Note that PYTHONSTARTUP does *not* expand "~", so you have to put in the
# full path to your home directory.
import atexit
import os
import readline
import rlcompleter
historyPath = os.path.expanduser("~/.pyhistory")
historyTmp = os.path.expanduser("~/.pyhisttmp.py")
endMarkerStr= "# # # histDUMP # # #"
saveMacro= "import readline; readline.write_history_file('"+historyTmp+"'); \
print '####>>>>>>>>>>'; print ''.join(filter(lambda lineP: \
not lineP.strip().endswith('"+endMarkerStr+"'), \
open('"+historyTmp+"').readlines())[:])+'####<<<<<<<<<<'"+endMarkerStr
readline.parse_and_bind('tab: complete')
readline.parse_and_bind('\C-w: "'+saveMacro+'"')
def save_history(historyPath=historyPath, endMarkerStr=endMarkerStr):
import readline
readline.write_history_file(historyPath)
# Now filter out those line containing the saveMacro
lines= filter(lambda lineP, endMarkerStr=endMarkerStr:
not lineP.strip().endswith(endMarkerStr), open(historyPath).readlines())
open(historyPath, 'w+').write(''.join(lines))
if os.path.exists(historyPath):
readline.read_history_file(historyPath)
atexit.register(save_history)
del os, atexit, readline, rlcompleter, save_history, historyPath
del historyTmp, endMarkerStr, saveMacro
« Prev 1 2 3 4 5 6 7 8 ... 22 Next »
Showing posts 16 - 20 of 107.
anonymous
anonymous
Anonymous writes: 强烈推荐 vimim —— vim 中文输入法 http://maxiangjiang.g ...
anonymous
anonymous
anonymous
anonymous
hijack writes: 你好,请问你那有没有linux下屏幕取词的文档资料?如有能不能发给我?我在网上查了很久都没找到有 ...
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
| ||||||
| 1 | 2 | |||||
| 3 | 4 | 5 | 6 | 7 | 8 | 9 |
| 10 | 11 | 12 | 13 | 14 | 15 | 16 |
| 17 | 18 | 19 | 20 | 21 | 22 | 23 |
| 24 | 25 | 26 | 27 | 28 | 29 | 30 |
原文在这里:http://www.rayninfo.co.uk/vimtips.html