原创 jsoncpp操作 json

#include <iostream> //#include "json/json.h" #include "json_reader.cpp" #include "json_value.cpp" #include "json_writ

原创 rfc 2183

rfc 2183 協議

原创 Memcached 協議中文版

memcached 的客戶端使用TCP鏈接與服務器通訊。(UDP接口也同樣有效,參考後文的 "UDP協議")一個運行中的memcached服務器監視一些(可設置)端口。客戶端連接這些端口,發送命令到服務器,讀取回應,最後關

原创 python抓取指定網址鏈接並返回網址列表

import urllib2, re def fetch_links(furl,burl,stag,etag): ''' 抓取網頁新聞 @param furl 抓取網頁地址 @param burl 網頁鏈接

原创 Java語言中關鍵字strictfp的用途

Java語言中關鍵字strictfp的用途     自Java2以來,Java語言增加了一個關鍵字strictfp,雖然這個關鍵字在大多數場合比較少用,但是還是有必要了解一下。 strictfp的意思是FP-strict,也就是說精確浮

原创 URL長度的限制

摘要:衆所周知, 傳遞小量參數(在沒有其他原因,例如隱藏參數值的情況下)推薦使用GET方法,傳遞大量參數推薦使用POST方法。原因是什麼呢? 一是get傳遞的參數都是明文,安全性較低,而且URL長度有限制! 原因是傳說中GET方

原创 正則表達式的選擇、編組後向引用

選擇允許使用 '|' 字符來在兩個或多個候選項中進行選擇。通過擴展章節標題的正則表達式,可以將其擴充爲不僅僅適用於章節標題的表達式。不過,這可沒有想象的那麼直接。在使 用選擇時,將匹配'|' 字符每邊最可能的表達式。你可能認爲下面的 J

原创 How to use SBJSON and TouchJSON

http://blog.objectgraph.com/index.php/2010/02/24/how-to-use-touch-json-and-sbjson/  

原创 django 1.3+ 靜態資源的訪問

說明:        本文django的適用版本是1.3+,在1.4中測試通過.   1. setting.py中DEBUG=True時, 在setting.py中做如下設置:   import os STATIC_ROOT

原创 關於.htaccess的配置

1.開啓mod_rewrite 將#LoadModule rewrite_module modules/mod_rewrite.so 這行的#去掉 2.修改httpd.conf 1)將你的網站目錄配置中的 AllowOverride

原创 object-c 中的 Categories

http://www.otierney.net/objective-c.html#downloading

原创 Did not receive a '200 OK' response from remote server.

在使用codeigniter的xmlrpc調用時,會報錯,請在config.php文件中做如下配置:     //注意:當base_url配置爲localhost時,在使用xmlrpc時會出錯:Did not receive a '200

原创 ubuntu lamp

如果是ubuntu系統的話,直接依次運行以下命令即可。 sudo apt-get install tasksel sudo tasksel install lamp-server sudo apt-get install phpmyadm

原创 sbjson object-c

http://loopingrecursion.com/index.php?t=json-framework

原创 scala中的協變,逆變

trait Queue[+T] { ... }Prefixing a formal type parameter with a + indicates that subtyping is covariant (flexible) in tha