Archive for the programming category

iconv 轉換整個資料夾

星期四, 7月 26th, 2007

很久以前在 irc 上問的,$4 長輩開了示 :P

今天被問到,趕快從 google 把 log 挖出來XD

ref: http://logs.ubuntu-eu.org/freenode/2006/10/11/%23ubuntu-tw.html

vim 設定備忘 (.vimrc)

星期四, 7月 26th, 2007

.vimrc 的備份。sdcv 是星際譯王的 cmdline 版,底下的設定是透過 shift+k 呼叫。也可以改成 ydict。 :)

關於 textmateOnly 可以參考底下的鍊結。TlistToggle, pydiction 就不說明了。

http://c9s.blogspot.com/2007/06/vim-snippet.html

ref: http://plog.longwin.com.tw/files/vimrc_normal.txt

ref: http://www.vim.org/tips/tip.php?tip_id=1168

(more…)

dpaste

星期二, 7月 17th, 2007

http://dpaste.com/

程式語言專用的便利貼 :)

wxPython in Action 中譯

星期一, 7月 16th, 2007

這兩天想學 python 的 GUI 設計,於今早幸運地利用 Google 搜尋到對岸牛人的 Blog,不僅有 wxPython in Action 的完整譯文,其他還有不少有用的資料。 :D

http://www.pythontik.com/blog/default.asp?cateID=5

python - 編碼偵測

星期六, 7月 14th, 2007

最近對處理編碼的問題感到興趣,且有實際上的需要,找了一下發現這個:

Universal Encoding Detector (python-chardet)
http://chardet.feedparser.org/

在 Debian/Ubuntu 上只需經由套件庫取得 python-chardet 即可。

來試用看看。

ref: http://c9s.blogspot.com/2007/06/blog-post_23.html

python - 儲存檔案

星期六, 7月 14th, 2007
PYTHON:
  1. #!/usr/bin/env python
  2. f = open("test.txt", 'w')
  3. f.write("Hello World :D")
  4. f.close

python - 讀取檔案

星期六, 7月 14th, 2007

 

PYTHON:
  1. #!/usr/bin/env python
  2. f = open("/var/log/messages")
  3. lines = f.readlines()
  4. f.close()
  5. for line in lines:
  6. print line

Recent Posts