Tagged with " Programming"
Python unescape javascript escapped UTF8 sequence
尋找這種答案很浪費生命,記錄下來 print "".join([(len(i)>0 and unichr(int(i,16)) or "") for i in url.split('%u')])
簡體 UTF8 -> 繁體/正體 UTF8
Encode-CNmap 是好朋友 雖然字表沒有完整,但是大部份都有轉換成功,而且使用上也不錯簡單 轉換文字檔案: cnmap -u2cb5 utf8.txt > utf8-cntrad.txt 對於懶得在 Python 下面 implement 繁簡轉換的人(me?)實在很好用: import commands s = commands.getoutput("echo '简体中文' [...]
Python-pycurl Note
import pycurl c = pycurl.Curl() c.setopt(pycurl.URL, "http://blog.tarotoast.com/") import StringIO b = StringIO.StringIO() c.setopt(pycurl.WRITEFUNCTION, b.write) c.setopt(pycurl.USERAGENT, "Mozilla/4.0 (compatible; MSIE 7.0; Windows [...]
| M | T | W | T | F | S | S |
|---|---|---|---|---|---|---|
| « Mar | ||||||
| 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 | 31 | |||
Categories
- Bioinformatics (1)
- 當我們同宅一起 (12)
- Family (16)
- Footprints + Diary (150)
- 2005 Summer Road Trip (9)
- 2005 X'Mas Seattle (8)
- 2006 Summer (14)
- 2006 Winter Caribbean (1)
- College (Mesa) (2)
- College (UCSD) (23)
- High School (US) (2)
- Recreation (8)
- Fun+Humor (32)
- Interests (10)
- IT (98)
- recipe (1)
- Reflection (37)
- Server Diary (37)
- ffmud.net (1)
- lmj.tw (3)
- slicehost (1)
- tarotoast.com (11)
- twfamily.org (2)
- tworz.org (1)
- software (1)
