Recent Comments
Archives
- May 2012 (8)
- April 2012 (11)
- March 2012 (10)
- February 2012 (11)
- January 2012 (5)
- December 2011 (13)
- November 2011 (12)
- October 2011 (10)
- September 2011 (7)
- August 2011 (5)
- July 2011 (11)
- June 2011 (21)
- May 2011 (22)
- April 2011 (36)
- March 2011 (43)
- February 2011 (23)
- January 2011 (24)
- December 2010 (34)
- November 2010 (19)
- October 2010 (16)
- September 2010 (15)
- August 2010 (10)
- July 2010 (12)
- June 2010 (3)
- May 2010 (3)
- April 2010 (4)
- March 2010 (8)
- February 2010 (14)
- January 2010 (13)
- December 2009 (16)
- November 2009 (28)
- October 2009 (24)
- September 2009 (12)
- August 2009 (7)
- July 2009 (10)
- June 2009 (11)
- May 2009 (22)
- April 2009 (21)
- March 2009 (18)
- February 2009 (7)
- January 2009 (32)
- December 2008 (19)
- November 2008 (12)
- October 2008 (15)
- September 2008 (14)
- August 2008 (15)
- July 2008 (18)
- June 2008 (20)
- May 2008 (19)
- April 2008 (27)
- March 2008 (22)
- February 2008 (21)
- January 2008 (15)
- December 2007 (22)
- November 2007 (17)
- October 2007 (29)
- September 2007 (31)
- August 2007 (34)
- July 2007 (31)
- June 2007 (36)
- May 2007 (23)
- April 2007 (22)
- March 2007 (30)
- February 2007 (50)
- January 2007 (75)
- December 2006 (48)
- November 2006 (59)
- October 2006 (89)
- September 2006 (29)
- August 2006 (48)
- July 2006 (14)
- June 2006 (35)
- May 2006 (62)
- April 2006 (63)
- March 2006 (72)
- February 2006 (83)
- January 2006 (56)
- December 2005 (46)
- November 2005 (60)
- October 2005 (27)
- September 2005 (54)
- August 2005 (83)
Tags
amazon android api aws bittorrent browser cdn certificate chrome cloud cloudfront cpan database dns ec2 facebook firefox freebsd google hosting html https ie image ipv6 javascript jquery js linux mobile mozilla mysql p2p performance perl php secure security ssl twitter ubuntu video web wordpress yahooCategories
- Anime (25)
- AWS (51)
- BBS (17)
- Blog (201)
- Book (18)
- Bridge (1)
- Browser (283)
- CDN (21)
- Cloud (66)
- CMS (33)
- Comic (17)
- Computer (1980)
- Computer and Network Center (32)
- CSS (31)
- Database (132)
- DNS (50)
- Editor (11)
- Financial (37)
- Firefox (149)
- Food (11)
- FreeBSD (115)
- Game (25)
- GoogleChrome (25)
- Hardware (144)
- IE (64)
- Joke (131)
- Lab (3)
- Linux (72)
- MacOS (4)
- Mail (69)
- Movie (18)
- Murmuring (2056)
- Music (37)
- MySQL (97)
- NCTU (63)
- NetBSD (7)
- Network (1486)
- OpenBSD (3)
- Opera (21)
- OS (205)
- P2P (86)
- Photo (57)
- Political (48)
- Programming (315)
- Recreation (372)
- RSS (65)
- Safari (22)
- Science (28)
- Search Engine (126)
- Security (336)
- SMS (5)
- Social (60)
- Software (1062)
- Spam (86)
- Sport (4)
- Telephone (62)
- Television (35)
- Usenet (13)
- Vim (3)
- Wiki (25)
- Windows (48)
- WWW (782)
Blogroll
Meta
Monthly Archives: April 2008
ImageShack 的 BitTorrent 下載服務
在 ImageShack Starts Free BitTorrent Download Service 這篇看到 ImageShack 開始提供 BitTorrent 下載服務了。 看了一下介面,把 torrent 檔傳上去後就會開始抓,另外一個比較特別的功能是選擇下載的檔案 (在 Windows 上的 BitTorrent 軟體還蠻常見的功能)。開 µTorrent 同時抓可以看出用的是 Transmission 1.10。目前服務在 beta,有兩個 15GB 的限制,一個是空間,一個是每個月的 HTTP 下載流量,在正式上線後可能會有修改。 丟了一個 torrent 上去測,下載到 ImageShack 的速度好像還蠻快的,不過我沒測完 :p
Zend_Json + Zend_Config + Zend_Db
如果使用 Zend_Json 放設定檔,這「可能」是一個比較好的解法: public function __construct() { $j = file_get_contents(dirname(__FILE__) . ‘/db.json’); $conf = Zend_Json::decode($j); $conf = new Zend_Config($conf['Db']); $this->rDb = Zend_Db::factory($conf->rDb); $this->wDb = Zend_Db::factory($conf->wDb); } 參考:Zend_Db 的參數 (與 Zend_Config、Zend_Json)。
Posted in Computer, Database, Murmuring, Network, Programming, Software, WWW Leave a comment
重印四庫全書
在 mclee 那邊看到台灣商務印書館打算印全套的《四庫全書》:「商務印書館要印行文淵閣四庫全書了」。 整套一千五百本,預約價是 158 萬元。如果只要其中幾本,單冊的預約價是 $1200。除了新台幣外,也接受美金下訂。不過前提是要達到 20 套才會開始印…
Posted in Book, Murmuring, Recreation Leave a comment
升級到 WordPress 2.5 的注意事項
剛剛幫別人升級時注意到的,wp-config.php 裡有一段註解是要你設定 SECRET_KEY,看起來是為了當作 private secret 用: // Change SECRET_KEY to a unique phrase. You won’t have to remember it later, // so make it long and complicated. You can visit https://www.grc.com/passwords.htm // to get a phrase generated for you, or … Continue reading
Zend_Db 的例外處理
照 Manual 所列出來的功能,Zend_Db 似乎沒有提供 INSERT … ON DUPLICATE KEY UPDATE 的功能,所以就得自己做了。 正常的作法是自己寫 SQL query 處理,但我想到的方法就是先 ->insert(),如果失敗再 ->update()。拆開來的這兩個動作會使得 MySQL 多花不少 CPU resource,但我暫時不想自己寫 SQL Query (主要是因為嫌 escape 麻煩),先放個 XXX 等以後再 tune。 問題在 ->insert() 後如果遇到 Duplicate 會丟出 Exception,用 try-catch 的方法我不是很喜歡,但稍微翻過 Zend_Db 的 code,似乎沒辦法改成 … Continue reading
Zend_Db 的參數 (與 Zend_Config、Zend_Json)
Zend_Db::factory() 可以吃兩種語法,第一種是用兩個參數指定所有的資訊,像這樣: $params = array(‘host’ => ‘localhost’, ‘username’ => ‘my_username’, ‘password’ => ‘my_password’, ‘dbname’ => ‘my_database’); $db = Zend_Db::factory(‘pdo_mysql’, $params); 第二種是吃一個參數,Zend_Config (或者繼承他的 class): $conf = Zend_Config_Ini(‘filename.ini’); $db = Zend_Db::factory($conf); 如果想把資料庫設定放在檔案裡,再用 Zend_Config 讀進來傳給 Zend_Db,目前官方有 Zend_Config_Ini 與 Zend_Config_Xml 兩種方法,不過這兩種方法我都不喜歡,用 Google 找 “Zend_Config_Yaml”,沒有什麼人在研究這個 … Continue reading
Posted in Computer, Database, Murmuring, MySQL, Network, Programming, Software, WWW Leave a comment
PIXNET Album Expander
除了幫無名小站寫以外,也幫自己公司 (PIXNET) 寫 Album Expander,這樣我自己看圖片才方便 XD 這隻程式請配合 Greasemonkey 服用:PIXNET Album Expander。 另外在 trace DOM 的時候有一些感想,照片的部份全部都是 ul + li,再用 CSS 做出來的,當初設計這個 Template 的人不賴啊 XD Update:修正了兩個問題,第一個是 Google Code 今天一直噴 502 而讀不到 jQuery,所以只好用 code.jquery.com。第二個是修正相本 .thumgBox 與 .thumbImg span 裡設定 width/height 時會產生的 bug。
Posted in Computer, CSS, Murmuring, Network, Programming, WWW 8 Comments
