<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-5758875416626340717</id><updated>2012-01-30T22:54:11.736+08:00</updated><category term='大型網站架構'/><category term='Blog技巧'/><category term='call_user_func_array'/><category term='html5'/><category term='博客來折價卷'/><category term='rsync'/><category term='api chart(統計圖)'/><category term='底圖置中'/><category term='mangoDB'/><category term='php gmail'/><category term='http_auth'/><category term='簡轉繁'/><category term='Zend Framework'/><category term='遊戲'/><category term='instr'/><category term='p3p'/><category term='register_globals'/><category term='周星馳'/><category term='php_error'/><category term='pdo'/><category term='BBQ'/><category term='try catch'/><category term='電子書'/><category term='MongoDB'/><category term='firefox'/><category term='狂牛症'/><category term='$_SERVER'/><category term='php經驗'/><category term='openfire'/><category term='酒桶山'/><category term='考題'/><category term='cakephp'/><category term='Hudson'/><category term='scp'/><category term='rnvb'/><category term='.htaccess'/><category term='grrep'/><category term='jquery option hide'/><category term='raid'/><category term='程式專案'/><category term='php草稿'/><category term='perl程式'/><category term='http-referer'/><category term='crontab'/><category term='wget'/><category term='unixtime'/><category term='php縮圖'/><category term='asp'/><category term='facebook'/><category term='xml'/><category term='mktime'/><category term='tag設計'/><category term='CSS'/><category term='mysql'/><category term='特殊符號'/><category term='建立資料庫'/><category term='網路密技'/><category term='codeigniter'/><category term='防火牆'/><category term='工作紀錄'/><category term='Session'/><category term='大家一起來捐款'/><category term='php function'/><category term='php_class'/><category term='免費'/><category term='flex'/><category term='密鑰交換演算法'/><category term='xsd:dateTime'/><category term='資安論壇'/><category term='生活'/><category term='phpExcel'/><category term='Smarty'/><category term='OSC'/><category term='dns'/><category term='月光森林'/><category term='解析度'/><category term='濾水壺'/><category term='html'/><category term='Eclipse'/><category term='ie7'/><category term='stock'/><category term='expect'/><category term='design'/><category term='pear'/><category term='文字雲'/><category term='ubuntu'/><category term='學習連結'/><category term='XSS'/><category term='prototype'/><category term='json'/><category term='google'/><category term='jquery 筆記'/><category term='台中'/><category term='mail'/><category term='精選笑話'/><category term='javascript'/><category term='CDATA'/><category term='IE_JS_debug'/><category term='網頁程式必備'/><category term='preg_natch'/><category term='iframe'/><category term='VirtualBox'/><category term='perl'/><category term='電腦比較'/><category term='ipad'/><category term='wol'/><category term='javascript function'/><category term='curl'/><category term='jquery select change'/><category term='HipHop'/><category term='K-Lite'/><category term='memcache'/><category term='SqlLite'/><category term='SOFU'/><category term='pcntl_signal'/><category term='locate'/><category term='jquery plugin'/><category term='http headers'/><category term='find'/><category term='xm'/><category term='win7'/><category term='xcopy'/><category term='spark'/><category term='xoops'/><category term='phpPowerPoint'/><category term='iconv'/><category term='csv匯入'/><category term='SSL'/><category term='filezilla'/><category term='正規式'/><category term='memory leak'/><category term='影片'/><category term='外包接案經驗'/><category term='apache'/><category term='股票'/><category term='get_magic_quotes_gpc'/><category term='ant'/><category term='ecshop'/><category term='soap'/><category term='netstat'/><category term='firephp'/><category term='php'/><category term='REST'/><category term='ajax'/><category term='explain'/><category term='HTTP_VIA'/><category term='php Excel'/><category term='ssh'/><category term='actionscript3.0'/><category term='oop'/><category term='usb可開機'/><category term='解毒'/><category term='法蝶藝術廚房'/><category term='msql'/><category term='Tsung'/><category term='join'/><category term='titanium'/><category term='position'/><category term='常用javascript'/><category term='Excel Web'/><category term='Open Source'/><category term='jquery'/><category term='group_concat'/><category term='GeoIP'/><category term='readbeanphp'/><category term='cgi'/><category term='utc'/><category term='Mootools'/><category term='MLB術語'/><category term='Linux'/><category term='adsense'/><category term='Proxy'/><category term='mod_rewrite'/><category term='htaccess'/><category term='OpenId範例'/><category term='RewriteRule'/><category term='HTTP_X_FORWARDED_FOR'/><category term='httponly'/><category term='ftp'/><title type='text'>PHP 程式 學習 筆記本</title><subtitle type='html'>個人學習程式與網路收集資料BLOG，期待與大家教學相長...
「設計的核心是溝通」
「溝通的核心是故事」</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://calos-tw.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://calos-tw.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default?start-index=101&amp;max-results=100'/><author><name>千江有水千江月</name><uri>http://www.blogger.com/profile/09457834533843066844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>758</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-5758875416626340717.post-2667241749919760344</id><published>2012-01-26T16:00:00.000+08:00</published><updated>2012-01-29T14:25:11.860+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='酒桶山'/><category scheme='http://www.blogger.com/atom/ns#' term='台中'/><category scheme='http://www.blogger.com/atom/ns#' term='月光森林'/><category scheme='http://www.blogger.com/atom/ns#' term='法蝶藝術廚房'/><title type='text'>[台中][酒桶山]春節出遊</title><summary type='text'>初四終於才敢出遊，否則過年在台灣總是走到都是大型停車場，根本是浪費時間與生命.  
後來選了離娘家近一點的地方出去走走。
酒桶山離台中真的不遠， 到是有空可以去走走晃晃。
光上山至少就有6-7公里的山路要開，到了山上後，有兩家餐廳：法蝶藝術廚房，月光森林
不過我們選擇如下：　


藍天，陽傘


點了德國豬腳前菜



景觀還不錯



過年嘛，車還不少



有民宿小木屋喔



這景還不錯





"月光森林" 餐廳的全貌，藍天好藍，真是令人心曠神儀


藍天　樹葉　陽光






最重要的春節菜單，看也知道不便宜，所以阿，春節不要隨便出遊。



月光森林菜單


</summary><link rel='replies' type='application/atom+xml' href='http://calos-tw.blogspot.com/feeds/2667241749919760344/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5758875416626340717&amp;postID=2667241749919760344&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/2667241749919760344'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/2667241749919760344'/><link rel='alternate' type='text/html' href='http://calos-tw.blogspot.com/2012/01/blog-post_26.html' title='[台中][酒桶山]春節出遊'/><author><name>千江有水千江月</name><uri>http://www.blogger.com/profile/09457834533843066844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/-D9FEWzqaSdg/TyTgMj9UCWI/AAAAAAAAD3M/XX9Yw5nq4FU/s72-c/P1020628-1.JPG' height='72' width='72'/><thr:total>0</thr:total><georss:featurename>411台灣台中市太平區山田路長青巷26號</georss:featurename><georss:point>24.137973 120.817832</georss:point><georss:box>23.674291999999998 120.186118 24.601654 121.449546</georss:box></entry><entry><id>tag:blogger.com,1999:blog-5758875416626340717.post-7860074075229030829</id><published>2012-01-12T15:46:00.003+08:00</published><updated>2012-01-12T15:46:51.770+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>鳥哥: Linux 檔案與目錄管理</title><summary type='text'>人老了, 還是記起來, 日後比較容易找. 1. 目錄與路徑
 
 　　1.1 相對路徑與絕對路徑
 　　1.2 目錄的相關操作： cd, pwd, 
  mkdir, rmdir
 　　1.3 關於執行檔路徑的變數： $PATH
 
2. 檔案與目錄管理
 
 　　2.1 檔案與目錄的檢視： ls
 　　2.2 複製、刪除與移動： cp, rm, mv
 　　2.3 取得路徑的檔案名稱與目錄名稱
 
3. 檔案內容查閱：
 
 　　3.1 直接檢視檔案內容： cat, 
  tac, nl
 　　3.2 可翻頁檢視： more, less
 　　3.3 資料擷取： head, tail
 　　3.4 非純文字檔： od
 　　3.5 修改檔案時間與建置新檔： touch
 
4. 檔案與目錄的預設權限與隱藏權限
 
 　　4.1 檔案預設權限：umask
 　　4.2 檔案隱藏屬性： </summary><link rel='replies' type='application/atom+xml' href='http://calos-tw.blogspot.com/feeds/7860074075229030829/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5758875416626340717&amp;postID=7860074075229030829&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/7860074075229030829'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/7860074075229030829'/><link rel='alternate' type='text/html' href='http://calos-tw.blogspot.com/2012/01/linux.html' title='鳥哥: Linux 檔案與目錄管理'/><author><name>千江有水千江月</name><uri>http://www.blogger.com/profile/09457834533843066844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5758875416626340717.post-5914713564367162811</id><published>2012-01-06T11:51:00.000+08:00</published><updated>2012-01-06T11:54:55.509+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='濾水壺'/><title type='text'>市售「家用濾水壺」過濾效能檢測結果彙整表</title><summary type='text'>這樣看起來好像國外跟國內品牌, 差異沒有很高.
這是消基會做的報告, 給大家參考. 網址在此: http://www.bsmi.gov.tw/wSite/ct?xItem=39179&amp;ctNode=1510&amp;mp=3
&lt;!--[if gte mso 9]&gt;
 
  Normal
  0
  
  
  
  0
  2
  
  false
  false
  false
  
  EN-US
  ZH-TW
  X-NONE
  
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
  
  MicrosoftInternetExplorer4
  
   
   
   
   
   
   
   
   
   
   
   
  
&lt;![endif]--&gt;&lt;!--[if gte </summary><link rel='replies' type='application/atom+xml' href='http://calos-tw.blogspot.com/feeds/5914713564367162811/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5758875416626340717&amp;postID=5914713564367162811&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/5914713564367162811'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/5914713564367162811'/><link rel='alternate' type='text/html' href='http://calos-tw.blogspot.com/2012/01/blog-post.html' title='市售「家用濾水壺」過濾效能檢測結果彙整表'/><author><name>千江有水千江月</name><uri>http://www.blogger.com/profile/09457834533843066844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5758875416626340717.post-6999600440466924651</id><published>2012-01-03T15:46:00.004+08:00</published><updated>2012-01-03T15:46:36.377+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='REST'/><category scheme='http://www.blogger.com/atom/ns#' term='php'/><title type='text'>[引用] PHP RESTful 測試</title><summary type='text'>用php 模擬 RESTful 的使用 
來源網站: http://studio.zeuik.com/?p=1044

     class RESTful {
        
         const IS_GET    = "get";
         const IS_POST    = "post";
         const IS_PUT    = "put";
         const IS_DELETE = "delete";
     
         public static function get($key, $default_value = "") {
             return isset($_GET[$key])?$_GET[$key]: $default_value;
         }
        
         </summary><link rel='replies' type='application/atom+xml' href='http://calos-tw.blogspot.com/feeds/6999600440466924651/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5758875416626340717&amp;postID=6999600440466924651&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/6999600440466924651'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/6999600440466924651'/><link rel='alternate' type='text/html' href='http://calos-tw.blogspot.com/2012/01/php-restful.html' title='[引用] PHP RESTful 測試'/><author><name>千江有水千江月</name><uri>http://www.blogger.com/profile/09457834533843066844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5758875416626340717.post-5356077652173147442</id><published>2012-01-02T15:02:00.002+08:00</published><updated>2012-01-02T15:03:48.999+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='html5'/><title type='text'>HTML5 必備Tags,Event Handler Attributes,Browser Support</title><summary type='text'>
HTML5 Cheat Sheet By InMotion Hosting - A Virtual Private Servers Provider


HTML5 Cheat Sheet By InMotion Hosting - A Web Hosting Provider


HTML5 Cheat Sheet By InMotion Hosting - A Dedicated Server Provider</summary><link rel='replies' type='application/atom+xml' href='http://calos-tw.blogspot.com/feeds/5356077652173147442/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5758875416626340717&amp;postID=5356077652173147442&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/5356077652173147442'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/5356077652173147442'/><link rel='alternate' type='text/html' href='http://calos-tw.blogspot.com/2012/01/html5-tagsevent-handler.html' title='HTML5 必備Tags,Event Handler Attributes,Browser Support'/><author><name>千江有水千江月</name><uri>http://www.blogger.com/profile/09457834533843066844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5758875416626340717.post-7620327924547760751</id><published>2012-01-01T11:51:00.000+08:00</published><updated>2012-01-18T12:26:53.291+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ecshop'/><title type='text'>美安Rid 與 Ecshop 串接</title><summary type='text'>美安串接Ecshop 解釋流程: 

美安RID主要是從美安網站導過來的網址會帶一筆rid 編號. 

若是user 註冊後, 該編號也會帶到user 的個人資料內, 往後user 下訂單, 
該user 有美安Rid, 您在後台訂單列表, 也會看到美安RID. 

前端步驟(1):再加入會員時,若是從帶有美安Rid,會顯示在註冊頁面. 





前端步驟(2):再加入會員時,若是從帶有美安Rid,會顯示在註冊頁面. 





後台步驟(1):後台可以在會員列表看到,會員具有美安Rid 的欄位. 





後台步驟(2):查看會員明細時,也會看到美安Rid. 





後台步驟(3):具有美安Rid的會員, 訂購商品時,改筆訂單也會帶入美安Rid. 





後台步驟(4):訂單明細內也有美安Rid. 



</summary><link rel='replies' type='application/atom+xml' href='http://calos-tw.blogspot.com/feeds/7620327924547760751/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5758875416626340717&amp;postID=7620327924547760751&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/7620327924547760751'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/7620327924547760751'/><link rel='alternate' type='text/html' href='http://calos-tw.blogspot.com/2012/01/rid-ecshop.html' title='美安Rid 與 Ecshop 串接'/><author><name>千江有水千江月</name><uri>http://www.blogger.com/profile/09457834533843066844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5758875416626340717.post-6117880181113113752</id><published>2011-12-28T16:09:00.001+08:00</published><updated>2011-12-28T16:09:05.024+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><category scheme='http://www.blogger.com/atom/ns#' term='netstat'/><title type='text'>[引用]Linux 開關服務查詢流程.</title><summary type='text'>引用來源: http://puremonkey2010.blogspot.com/2010/12/linux-port.html
其實 port 是由某些程式所啟動的，所以要關閉某些 port 時，那就直接將某個程式給他關閉就是了！ 那關閉的方法你當然可以使用 kill 
，不過，畢竟不是正統的解決之道，因為 kill 這個指令通常具有強制關閉某些程式的功能，但我們想要正常的關閉該程式啊！ 所以，就利用系統給我們的
 script 來關閉就好了啊。 在此同時，我們就得再來稍微複習一下，一般傳統的服務有哪幾種類型？ 

stand alone 與 super daemon 
在鳥哥的 Linux 私房菜 -- 基礎學習篇內談到， 在一般正常的 Linux 系統環境下，服務的啟動與管理主要有兩種方式： 




* stand alone
顧名思義，stand alone </summary><link rel='replies' type='application/atom+xml' href='http://calos-tw.blogspot.com/feeds/6117880181113113752/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5758875416626340717&amp;postID=6117880181113113752&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/6117880181113113752'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/6117880181113113752'/><link rel='alternate' type='text/html' href='http://calos-tw.blogspot.com/2011/12/linux.html' title='[引用]Linux 開關服務查詢流程.'/><author><name>千江有水千江月</name><uri>http://www.blogger.com/profile/09457834533843066844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5758875416626340717.post-7065588800047403011</id><published>2011-12-23T17:36:00.000+08:00</published><updated>2011-12-23T17:36:00.661+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='正規式'/><title type='text'>Pattern Modifiers - 規則表達式的修飾符</title><summary type='text'>下面是當前規則表達式裡可用的修飾. 括號內的名字是那些修飾符的內部 PCRE 名字.i (PCRE_CASELESS)如果設置了這個修飾符, 則表達式不區分大小寫.m (PCRE_MULTILINE)默認的, PCRE 認為目標字符串值是單行字符串 (即使他確實包含多行). 行開始標記 (^) 只匹配字符串的開始部分, 而行結束標記 ($) 只匹配字符串的尾部,或者一個結束行(除非指定 E 修飾符). 這個和 Perl 裡面一樣.如果設定了這個修飾符, 行開始和行結束結構分別匹配在目標字符串任何新行的當前位置後面的或者以前的, 和每一個開始和結束一樣. 這個等於 Perl 裡面的 /m 修飾符. 如果目標字符串沒有 "n" 字符, 或者模式裡沒有 ^ 或 $ ,這個修飾符不起作用.s (PCRE_DOTALL)如果設置這個修飾符, 模式裡的一個"點"將匹配所有字符, 包括換行. 沒有他,</summary><link rel='replies' type='application/atom+xml' href='http://calos-tw.blogspot.com/feeds/7065588800047403011/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5758875416626340717&amp;postID=7065588800047403011&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/7065588800047403011'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/7065588800047403011'/><link rel='alternate' type='text/html' href='http://calos-tw.blogspot.com/2011/12/pattern-modifiers.html' title='Pattern Modifiers - 規則表達式的修飾符'/><author><name>千江有水千江月</name><uri>http://www.blogger.com/profile/09457834533843066844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5758875416626340717.post-7066363528274871407</id><published>2011-12-22T14:07:00.000+08:00</published><updated>2011-12-28T12:19:40.019+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='jquery option hide'/><category scheme='http://www.blogger.com/atom/ns#' term='jquery'/><category scheme='http://www.blogger.com/atom/ns#' term='jquery select change'/><title type='text'>[jquery] 解決 IE 瀏覽器不能使用 change , 與 option 不能 hide()</title><summary type='text'>IE瀏覽器一直以來對於Select 的 change 一直是有問題的. 

試過了網路上的一些方法, 結果最後只能用這種方法來解決是最恰當的,
 就是 select 上加 onchange , 如此一來才能完全模擬出 $.change 的效果.

 另外 IE 很賤的是 select 下的 option 不能去 hide() , 只能 remove() 或是 attr('disabled',true) . 


所以看來只能以此種方式處理, 勉強差強人意.
在其他瀏覽器正常的,
我只能說IE 你真是好樣的. 


Html:

&lt;select onchange="type_7_change(this)" id="type_7" name="type_7"&gt;
&lt;option value=""&gt;請選擇...&lt;/option&gt;
&lt;option value="69"&gt;A-執行費用&lt;/option</summary><link rel='replies' type='application/atom+xml' href='http://calos-tw.blogspot.com/feeds/7066363528274871407/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5758875416626340717&amp;postID=7066363528274871407&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/7066363528274871407'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/7066363528274871407'/><link rel='alternate' type='text/html' href='http://calos-tw.blogspot.com/2011/12/jquery-ie-chanhe-option-hide.html' title='[jquery] 解決 IE 瀏覽器不能使用 change , 與 option 不能 hide()'/><author><name>千江有水千江月</name><uri>http://www.blogger.com/profile/09457834533843066844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5758875416626340717.post-244068708755630983</id><published>2011-12-21T12:18:00.001+08:00</published><updated>2011-12-21T12:20:38.480+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ecshop'/><title type='text'>透過AJAX方式動態更新 ECShop 購物車商品頁面的數量</title><summary type='text'>用戶進入echsop購物流程的時候當需要更改購物車裡的商品數量的時候必須要手動點擊更新按鈕.

以下是通過AJAX方式來動態更新ECShop購物車頁面商品數量的解決辦法
一、前端頁面部分(flow.dwt)
在商品數量的input框添加對應的js函數

&lt;INPUT  onblur="changePrice(document.getElementById('goods_number_{$goods.rec_id}').value,{$goods.rec_id})" name="goods_number[{$goods.rec_id}]" id="goods_number_{$goods.rec_id}" value="{$goods.goods_number}"  id="ECS_FORMBUY"/&gt;

在文件最後添加一段js

&lt;script type="text/javascript</summary><link rel='replies' type='application/atom+xml' href='http://calos-tw.blogspot.com/feeds/244068708755630983/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5758875416626340717&amp;postID=244068708755630983&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/244068708755630983'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/244068708755630983'/><link rel='alternate' type='text/html' href='http://calos-tw.blogspot.com/2011/12/ajax-ecshop.html' title='透過AJAX方式動態更新 ECShop 購物車商品頁面的數量'/><author><name>千江有水千江月</name><uri>http://www.blogger.com/profile/09457834533843066844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5758875416626340717.post-2771925918746760103</id><published>2011-12-21T11:40:00.003+08:00</published><updated>2011-12-21T11:50:28.870+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='.htaccess'/><title type='text'>[.htaccess] 設定記錄</title><summary type='text'>老了, 記憶力越來越不可靠, 還是要記錄下來.
用途: 把前端帶有  xx 或 zh-TW/xx 或 zh-CN/xx 或 ja/xx 而後面接downloadstart 導到 $1 頁面.
RewriteRule ^(xx|zh-TW/xx|zh-CN/xx|ja/xx)/downloadstart.*$  $1/ [L]

用途: 過濾 REQUEST_URI 不等於 上面三個 RewriteCond 就導引到 /download/xxx.exe
RewriteCond %{REQUEST_URI} !oem/.+\.exe$ [NC]
RewriteCond %{REQUEST_URI} !pro/.+\.exe$ [NC]
RewriteCond %{REQUEST_URI} !test.exe$ [NC]
RewriteRule ^(.+)\.exe$ /download/</summary><link rel='replies' type='application/atom+xml' href='http://calos-tw.blogspot.com/feeds/2771925918746760103/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5758875416626340717&amp;postID=2771925918746760103&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/2771925918746760103'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/2771925918746760103'/><link rel='alternate' type='text/html' href='http://calos-tw.blogspot.com/2011/12/htaccess.html' title='[.htaccess] 設定記錄'/><author><name>千江有水千江月</name><uri>http://www.blogger.com/profile/09457834533843066844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5758875416626340717.post-6143906168793734954</id><published>2011-12-19T17:48:00.001+08:00</published><updated>2011-12-19T17:51:23.573+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ssh'/><category scheme='http://www.blogger.com/atom/ns#' term='scp'/><title type='text'>[Scp 指令使用] 透過 SSH 傳送檔案</title><summary type='text'>在兩台主機間傳送檔案時，用 ftp 指令很方便，但另一個較為安全的做法是透過 SSH 來傳送，而且使用上十分簡單 ，只要使用 scp 指令則可。
假如你要把 /home/user/ 目錄下所有 .php 副檔名的檔案，傳送到主機 192.168.10.10 的 /home/user/ 下面，登入名稱是 user，可以輸入:


scp /home/user/*.php user@192.168.10.10:/home/user/



PS: 紅色: 來源目錄    藍色: 目的目錄
另外要注意, 就是目的主機是否有開啟 22 port 去對外, 若是沒有會回傳錯誤訊息.


然後系統會詢問你連接密碼，輸入正確密碼後就可以傳送了，但當然用來傳送的帳號需要有合法權限在遠端目錄寫入資料。

若是目的主機不是使用預設22 Port而是用 22222 , 那就必須要用的 -P 參數了. 

</summary><link rel='replies' type='application/atom+xml' href='http://calos-tw.blogspot.com/feeds/6143906168793734954/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5758875416626340717&amp;postID=6143906168793734954&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/6143906168793734954'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/6143906168793734954'/><link rel='alternate' type='text/html' href='http://calos-tw.blogspot.com/2011/12/scp-ssh.html' title='[Scp 指令使用] 透過 SSH 傳送檔案'/><author><name>千江有水千江月</name><uri>http://www.blogger.com/profile/09457834533843066844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5758875416626340717.post-5971912648307296274</id><published>2011-12-12T16:45:00.001+08:00</published><updated>2011-12-13T13:53:31.480+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='facebook'/><category scheme='http://www.blogger.com/atom/ns#' term='ecshop'/><title type='text'>[原創]透過Facebook 登入(login) ecsohp</title><summary type='text'>總算完成了Ecshop 與 Facebook 會員整合功能. 
可以透過Facebook 去登入 Ecshop 的帳號.

Facebook 登入測試網站1. 登入FB
2. 自動註冊與登入ECshop

</summary><link rel='replies' type='application/atom+xml' href='http://calos-tw.blogspot.com/feeds/5971912648307296274/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5758875416626340717&amp;postID=5971912648307296274&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/5971912648307296274'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/5971912648307296274'/><link rel='alternate' type='text/html' href='http://calos-tw.blogspot.com/2011/12/facebook-ecsohp.html' title='[原創]透過Facebook 登入(login) ecsohp'/><author><name>千江有水千江月</name><uri>http://www.blogger.com/profile/09457834533843066844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5758875416626340717.post-8294515028951604376</id><published>2011-12-09T13:35:00.001+08:00</published><updated>2011-12-09T13:58:57.679+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='學習連結'/><title type='text'>很多不錯的 CSS3 與 HTML5 Link</title><summary type='text'>很不錯的對於CSS與HTML的學習.

最常用的10種CSS BUG解決方法與技巧 - 各大瀏覽器兼容 很重要.
CSS 防止表格被內容撐開 記下來.
15 個實用的 HTML5 與 CSS 教學和速查表 很多新東西.
18 個超實用 css 編寫技巧 確實在記下來.
超適合新手學習的 CSS 教學文章 （觀唸完整且易懂） 不只是新手,老手記憶力差偶而也要回味一下.
你必須知道的 28 個 HTML5 的全新特色與技術 參考看看,順便練練英文.
HTML5入門教學 果然HTML5離我們越來越近了.
PHP: 將 CSS 檔 做排版的程式(inline, formatter) 這東西用的到嗎? 或許有一天吧.
快速將 DOCTYPE 等標籤 轉換成 HTML5 格式 很實用, 一定要看.
</summary><link rel='replies' type='application/atom+xml' href='http://calos-tw.blogspot.com/feeds/8294515028951604376/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5758875416626340717&amp;postID=8294515028951604376&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/8294515028951604376'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/8294515028951604376'/><link rel='alternate' type='text/html' href='http://calos-tw.blogspot.com/2011/12/css3-html5-link.html' title='很多不錯的 CSS3 與 HTML5 Link'/><author><name>千江有水千江月</name><uri>http://www.blogger.com/profile/09457834533843066844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5758875416626340717.post-3943318208299615003</id><published>2011-12-09T12:11:00.001+08:00</published><updated>2011-12-09T12:14:27.555+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='html5'/><title type='text'>[引用]HTML5 模板</title><summary type='text'>出處: http://inspire.twgg.org/c/programming/html-css/

沒想到還有這種東西, 先存下來了~^.^

&lt;!doctype html&gt;
&lt;!-- simplified doctype works for all previous versions of HTML as well --&gt; 
&lt;!-- Paul Irish's technique for targeting IE, modified to only target IE6, applied to the html element instead of body --&gt;
&lt;!--[if lt IE 7 ]&gt;
&lt;html lang="en" class="no-js ie6"&gt;&lt;![endif]--&gt;
&lt;!--[if (gt IE 6)|!(IE)]&gt;
&lt;!--&gt;

&lt;html </summary><link rel='replies' type='application/atom+xml' href='http://calos-tw.blogspot.com/feeds/3943318208299615003/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5758875416626340717&amp;postID=3943318208299615003&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/3943318208299615003'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/3943318208299615003'/><link rel='alternate' type='text/html' href='http://calos-tw.blogspot.com/2011/12/html5.html' title='[引用]HTML5 模板'/><author><name>千江有水千江月</name><uri>http://www.blogger.com/profile/09457834533843066844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5758875416626340717.post-428166345347357876</id><published>2011-12-05T13:50:00.001+08:00</published><updated>2011-12-05T14:01:47.310+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='win7'/><title type='text'>[Win7] 如何關閉視窗拖到上方或左上, 該視窗就自動最大化.</title><summary type='text'>個人對於Win7 最不能忍受的, 有時候將視窗不小心移到上面, 他就自己給我放到最大.

下列有辦法解決這個問題了: 


執行 Register Editor 或 點選左下角，然後在下方搜尋列鍵入：regedit 
照到下列這個位置：HKEY_CURRENT_USER\Control Panel\Desktop


編輯這個值 WindowArrangementActive, 設定它的值為 0.

 


關閉regedit 並且重新開機. 




來源網站</summary><link rel='replies' type='application/atom+xml' href='http://calos-tw.blogspot.com/feeds/428166345347357876/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5758875416626340717&amp;postID=428166345347357876&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/428166345347357876'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/428166345347357876'/><link rel='alternate' type='text/html' href='http://calos-tw.blogspot.com/2011/12/win7.html' title='[Win7] 如何關閉視窗拖到上方或左上, 該視窗就自動最大化.'/><author><name>千江有水千江月</name><uri>http://www.blogger.com/profile/09457834533843066844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5758875416626340717.post-7877898210462328855</id><published>2011-11-29T18:11:00.001+08:00</published><updated>2011-11-29T18:11:28.037+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='mysql'/><title type='text'>Mysql 操作語法</title><summary type='text'>
  

      操作功能
      SQL 語法 
      
說    明
 
    

      建立資料庫
      create database  
        資料庫名稱;
      
    

      列出所有資料庫
      show databases;  
      
    

      刪除資料庫
      drop database  
        資料庫名稱; 
      
    

      使用資料庫
      use 資料庫名稱; 
      
    

      建立資料表
      create table 資料表名稱(
sn integer auto_increment primary key,
name char(20),
mail char(50),
home char(50),
</summary><link rel='replies' type='application/atom+xml' href='http://calos-tw.blogspot.com/feeds/7877898210462328855/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5758875416626340717&amp;postID=7877898210462328855&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/7877898210462328855'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/7877898210462328855'/><link rel='alternate' type='text/html' href='http://calos-tw.blogspot.com/2011/11/mysql.html' title='Mysql 操作語法'/><author><name>千江有水千江月</name><uri>http://www.blogger.com/profile/09457834533843066844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5758875416626340717.post-8144651866306444188</id><published>2011-11-18T01:23:00.001+08:00</published><updated>2011-11-18T10:37:11.464+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ecshop'/><title type='text'>4步驟完美解決ECSHOP與JQUERY衝突的辦法</title><summary type='text'>ECSHOP與JQUERY衝突的問題由來已久, 不過每個版型可能都要改

1、修改文件：/js/transport.js

在文件最後面增加下面Code：
if (Object.prototype.toJSONString){ var oldToJSONString = Object.toJSONString; Object.prototype.toJSONString = function(){ if (arguments.length &gt; 0){ return false; }else{ return oldToJSONString.apply(this, arguments); } } }

2、修改文件:/js/compare.js
尋找Code：

this.timer = window.setInterval(this.relocation.bind(this), 50);
</summary><link rel='replies' type='application/atom+xml' href='http://calos-tw.blogspot.com/feeds/8144651866306444188/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5758875416626340717&amp;postID=8144651866306444188&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/8144651866306444188'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/8144651866306444188'/><link rel='alternate' type='text/html' href='http://calos-tw.blogspot.com/2011/11/5ecshopjquery.html' title='4步驟完美解決ECSHOP與JQUERY衝突的辦法'/><author><name>千江有水千江月</name><uri>http://www.blogger.com/profile/09457834533843066844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5758875416626340717.post-6016927228400100881</id><published>2011-11-14T12:23:00.001+08:00</published><updated>2011-11-14T12:31:36.489+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='CDATA'/><title type='text'>[引用]javascript CDATA的意義</title><summary type='text'>
來源:http://www.cnblogs.com/scugzbc/archive/2008/07/13/1242063.html

CDATA 內部的所有東西都會被解析器忽略。
假如文本中包含了大量的 "&lt;" 和 "&amp;" 字符 - 就像編程代碼中經常出現的情況一樣 - 那麼這個 XML 元素就可以被定義為一個 CDATA 部分。
CDATA 區段開始於 ""：

&lt;script type="text/javascript"&gt;
&lt;![CDATA[
function compare(a,b)
{
if (a &lt; b)
   {alert("a小於b");}
else if (a&gt;b)
   {alert("a大於b");}
else
   {alert("a等於b");}
}
]]&gt;
&lt;/script&gt;




在上面的例子中，在 CDATA 區段中的所有東西都會被解析器忽略。

關於 </summary><link rel='replies' type='application/atom+xml' href='http://calos-tw.blogspot.com/feeds/6016927228400100881/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5758875416626340717&amp;postID=6016927228400100881&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/6016927228400100881'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/6016927228400100881'/><link rel='alternate' type='text/html' href='http://calos-tw.blogspot.com/2011/11/javascript-cdata.html' title='[引用]javascript CDATA的意義'/><author><name>千江有水千江月</name><uri>http://www.blogger.com/profile/09457834533843066844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5758875416626340717.post-4571034858894651265</id><published>2011-11-11T13:33:00.001+08:00</published><updated>2011-11-11T13:34:42.886+08:00</updated><title type='text'>[引用]設計師內心的黑暗口白</title><summary type='text'>好貼切的圖啊 , 也適用於程式設計。




</summary><link rel='replies' type='application/atom+xml' href='http://calos-tw.blogspot.com/feeds/4571034858894651265/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5758875416626340717&amp;postID=4571034858894651265&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/4571034858894651265'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/4571034858894651265'/><link rel='alternate' type='text/html' href='http://calos-tw.blogspot.com/2011/11/blog-post.html' title='[引用]設計師內心的黑暗口白'/><author><name>千江有水千江月</name><uri>http://www.blogger.com/profile/09457834533843066844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5758875416626340717.post-8664604868600690751</id><published>2011-11-09T10:22:00.000+08:00</published><updated>2011-11-09T10:23:54.193+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Proxy'/><category scheme='http://www.blogger.com/atom/ns#' term='HTTP_X_FORWARDED_FOR'/><category scheme='http://www.blogger.com/atom/ns#' term='GeoIP'/><category scheme='http://www.blogger.com/atom/ns#' term='HTTP_VIA'/><title type='text'>了解$_SERVER["HTTP_X_FORWARDED_FOR"] 跟 GeoIP 的使用方法</title><summary type='text'>這邊有詳細的解說:GeoIP + PHP 完整教學


一般都會用PHP的$SERVER['REMOTE_ADDR']來抓取訪客的IP位址，
可是REMOTE_ADDR不能抓取到有經過proxy(代理伺服器)訪客的真實IP，
所以搭配利用$SERVER['HTTP_X_FORWARDED_FOR']，
可以將所有訪客主機經過的代理主機IP記錄下來，
便可抓到有經過Proxy 訪客的真實IP。


include('geoip.inc.php');
$ip = $_SERVER["HTTP_X_FORWARDED_FOR"] ? $_SERVER["HTTP_X_FORWARDED_FOR"] : $_SERVER["REMOTE_ADDR"];
$ipexplode = explode(",",$ip);
$ip = $ipexplode[0];
$gi = geoip_open('</summary><link rel='replies' type='application/atom+xml' href='http://calos-tw.blogspot.com/feeds/8664604868600690751/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5758875416626340717&amp;postID=8664604868600690751&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/8664604868600690751'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/8664604868600690751'/><link rel='alternate' type='text/html' href='http://calos-tw.blogspot.com/2011/11/serverhttpxforwardedfor-geoip.html' title='了解$_SERVER[&quot;HTTP_X_FORWARDED_FOR&quot;] 跟 GeoIP 的使用方法'/><author><name>千江有水千江月</name><uri>http://www.blogger.com/profile/09457834533843066844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5758875416626340717.post-3444324930671461915</id><published>2011-10-17T10:51:00.000+08:00</published><updated>2011-12-30T13:28:47.681+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='curl'/><category scheme='http://www.blogger.com/atom/ns#' term='php'/><title type='text'>[引用]PHP 使用 CURL 同步抓取多個網頁</title><summary type='text'>引用來源:Tsung's Blog
一般 CURL 抓網頁的方法, 是一頁一頁抓, 假設要抓 4頁, 所費時間各別是 5,10,7,5 秒, 那全部總合所花的時間就是 5 + 10 + 7 + 5 = 27 秒.
若能同時間去抓取多個網頁, 所花費的時間 5,10,7,5 秒, 全部總合所花的時間是 10 秒.(花費最多時間的秒數)
於 JavaScript 可使用 AJAX 的 async(YAHOO.util.Connect.asyncRequest) 來達成, 於 PHP 可以用 CURL 來達成此 Multi-Threading 的效果.


官方文件: PHP: curl_multi_init





程式(async.php)

function async_get_url($url_array, $wait_usec = 0)
{
    if (!is_array($</summary><link rel='replies' type='application/atom+xml' href='http://calos-tw.blogspot.com/feeds/3444324930671461915/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5758875416626340717&amp;postID=3444324930671461915&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/3444324930671461915'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/3444324930671461915'/><link rel='alternate' type='text/html' href='http://calos-tw.blogspot.com/2011/10/php-curl.html' title='[引用]PHP 使用 CURL 同步抓取多個網頁'/><author><name>千江有水千江月</name><uri>http://www.blogger.com/profile/09457834533843066844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5758875416626340717.post-1981071311931746595</id><published>2011-10-17T10:50:00.000+08:00</published><updated>2011-10-17T10:50:33.806+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='mysql'/><title type='text'>線上環境的 MySQL 預設值修改(Jeremy 建議)</title><summary type='text'>MySQL 灌好後, 有某些預設值是有爭議的(或者說, 是很沒意義的), Jeremy 提出了幾點建議~ 
下述取自 Jeremy Zawodny 的文章: Fixing Poor MySQL Default Configuration Values. 
直接取重點, 就是把下面這幾行加到 /etc/mysql/my.cnf 最後面, 或者 /etc/mysql/conf.d/jeremy.cnf 裡. 

max_connect_errors = 1844674407370954751
connect_timeout = 20
skip-name-resolve
slave_net_timeout = 30

為何要加這些, 可以參考原文, 或者參考 DK 此篇文章: 無論如何都應該修改的 MySQL 預設值.</summary><link rel='replies' type='application/atom+xml' href='http://calos-tw.blogspot.com/feeds/1981071311931746595/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5758875416626340717&amp;postID=1981071311931746595&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/1981071311931746595'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/1981071311931746595'/><link rel='alternate' type='text/html' href='http://calos-tw.blogspot.com/2011/10/mysql-jeremy.html' title='線上環境的 MySQL 預設值修改(Jeremy 建議)'/><author><name>千江有水千江月</name><uri>http://www.blogger.com/profile/09457834533843066844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5758875416626340717.post-2090861517925996483</id><published>2011-10-17T10:49:00.000+08:00</published><updated>2011-10-17T10:49:21.701+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Excel Web'/><title type='text'>Generating Excel files from web - line breaks in cells</title><summary type='text'>http://weblogs.asp.net/michu/archive/2004/06/15/155851.aspx 
 
http://yilinliu.blogspot.com/2010/08/htmlcss-html-excel.html 
 
br {mso-data-placement:same-cell;}
 
使用xml 匯出至Excel
http://msdn.microsoft.com/en-us/library/bb226687%28v=office.11%29.aspx </summary><link rel='replies' type='application/atom+xml' href='http://calos-tw.blogspot.com/feeds/2090861517925996483/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5758875416626340717&amp;postID=2090861517925996483&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/2090861517925996483'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/2090861517925996483'/><link rel='alternate' type='text/html' href='http://calos-tw.blogspot.com/2011/10/generating-excel-files-from-web-line.html' title='Generating Excel files from web - line breaks in cells'/><author><name>千江有水千江月</name><uri>http://www.blogger.com/profile/09457834533843066844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5758875416626340717.post-5578905778425294987</id><published>2011-10-14T17:33:00.001+08:00</published><updated>2011-10-14T17:43:48.044+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='文字雲'/><title type='text'>分析你的文字雲圖.</title><summary type='text'>


本網站的文字雲圖.真是有趣的網站.


可以分析的資料還不少喔: 






</summary><link rel='replies' type='application/atom+xml' href='http://calos-tw.blogspot.com/feeds/5578905778425294987/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5758875416626340717&amp;postID=5578905778425294987&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/5578905778425294987'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/5578905778425294987'/><link rel='alternate' type='text/html' href='http://calos-tw.blogspot.com/2011/10/blog-post.html' title='分析你的文字雲圖.'/><author><name>千江有水千江月</name><uri>http://www.blogger.com/profile/09457834533843066844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5758875416626340717.post-3678633138240073121</id><published>2011-10-14T10:32:00.000+08:00</published><updated>2011-10-14T10:46:12.975+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='MongoDB'/><title type='text'>[引用]MongoDB 對應 Mysql 語法</title><summary type='text'>原文: http://blog.nosqlfan.com/html/287.html
MongoDB躍躍欲試，這篇簡單的文章可以幫助你更快的進入角色。

查詢：

MySQL:
SELECT * FROM user

Mongo:
db.user.find()


MySQL:
SELECT * FROM user WHERE name = 'starlee'

Mongo:
db.user.find({'name' : 'starlee'})

插入：

MySQL:
INSERT INOT user (`name`, `age`) values ('starlee',25)

Mongo:
db.user.insert({'name' : 'starlee', 'age' : 25})

如果你想在MySQL裡添加一個字段，你必須：
ALTER TABLE user….
但在</summary><link rel='replies' type='application/atom+xml' href='http://calos-tw.blogspot.com/feeds/3678633138240073121/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5758875416626340717&amp;postID=3678633138240073121&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/3678633138240073121'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/3678633138240073121'/><link rel='alternate' type='text/html' href='http://calos-tw.blogspot.com/2011/10/mongodb-mysql.html' title='[引用]MongoDB 對應 Mysql 語法'/><author><name>千江有水千江月</name><uri>http://www.blogger.com/profile/09457834533843066844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5758875416626340717.post-850756669205444395</id><published>2011-10-12T13:54:00.000+08:00</published><updated>2011-10-12T13:54:18.146+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='CSS'/><title type='text'>[引用]CSS 排版觀念 position 參數說明</title><summary type='text'>引用來源: 


http://my-web-design.blogspot.com/2007/10/css-divposition.html

                  CSS 排版觀念 position 參數說明                  
             position 參數

/ 參數說明             absolute             relative             static(預設值)             fixed           
             中文意義             絕對位置             相對位置             靜態位置             固定位置           
             畫面位置參考基準             父元素內容區邊界</summary><link rel='replies' type='application/atom+xml' href='http://calos-tw.blogspot.com/feeds/850756669205444395/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5758875416626340717&amp;postID=850756669205444395&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/850756669205444395'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/850756669205444395'/><link rel='alternate' type='text/html' href='http://calos-tw.blogspot.com/2011/10/css-position.html' title='[引用]CSS 排版觀念 position 參數說明'/><author><name>千江有水千江月</name><uri>http://www.blogger.com/profile/09457834533843066844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5758875416626340717.post-2616089599045963020</id><published>2011-10-11T18:59:00.002+08:00</published><updated>2011-10-11T19:01:53.100+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='CSS'/><title type='text'>Adding * To Required Field Using CSS</title><summary type='text'>很實用的CSS :  


HTML: 

&lt;label class="required" for="username"&gt;Email address&lt;/label&gt;



CSS:

.required
{
background-image:url(/path/to/your/images/dir/required-field.png);
background-position:top right;
background-repeat:no-repeat;
padding-right:10px;
}


參考文章:http://www.techchorus.net/adding-required-zendform-field-using-css


圖片:required-field.png</summary><link rel='replies' type='application/atom+xml' href='http://calos-tw.blogspot.com/feeds/2616089599045963020/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5758875416626340717&amp;postID=2616089599045963020&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/2616089599045963020'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/2616089599045963020'/><link rel='alternate' type='text/html' href='http://calos-tw.blogspot.com/2011/10/adding-to-required-field-using-css.html' title='Adding * To Required Field Using CSS'/><author><name>千江有水千江月</name><uri>http://www.blogger.com/profile/09457834533843066844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5758875416626340717.post-4703970001278513929</id><published>2011-10-10T16:22:00.000+08:00</published><updated>2011-10-10T16:25:00.956+08:00</updated><title type='text'>[ECSHOP] 郵局進度查詢BUG</title><summary type='text'>includes/modules/shipping/postoffice.php


將下列紅色部分替換即可:

action="http://postserv.post.gov.tw/webpost/CSController?cmd=POS4001_1&amp;_MENU_ID=189&amp;_SYS_ID=D&amp;_ACTIVE_ID=190"


function query($invoice_sn)
    {
        $form_str = '商品透過郵局發出&lt;form name="form1" action="http://postserv.post.gov.tw/WebMailNslookup/askBlueStar" method="post" target=_blank&gt;';
        $form_str .= '&lt;input type="hidden" name="</summary><link rel='replies' type='application/atom+xml' href='http://calos-tw.blogspot.com/feeds/4703970001278513929/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5758875416626340717&amp;postID=4703970001278513929&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/4703970001278513929'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/4703970001278513929'/><link rel='alternate' type='text/html' href='http://calos-tw.blogspot.com/2011/10/ecshop-bug.html' title='[ECSHOP] 郵局進度查詢BUG'/><author><name>千江有水千江月</name><uri>http://www.blogger.com/profile/09457834533843066844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5758875416626340717.post-7494144748237113784</id><published>2011-10-06T10:51:00.001+08:00</published><updated>2011-10-12T14:39:20.980+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='html5'/><title type='text'>讓IE支援HTML5 Tag 的方法</title><summary type='text'>之前在IE8下測試, 居然發現部分HTML 的元素不支援.
需要添加下列JS 才能順利支援. 讓IE(包括IE6)支持HTML5元素，我們需要在HTML頭部添加以下JavaScript，這是一個簡單的document.createElement聲明，利用條件註釋針對IE在對像中創建對應的節點。
在&lt;head&gt;&lt;/head&gt; 中加入下面Code 



&lt;!--[if lt IE 9]&gt; 
&lt;script&gt; 
document.createElement("header"); 
document.createElement("footer"); 
document.createElement("nav"); 
document.createElement("article"); 
document. createElement("section"); 
&lt;/script&gt; 
&lt;![</summary><link rel='replies' type='application/atom+xml' href='http://calos-tw.blogspot.com/feeds/7494144748237113784/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5758875416626340717&amp;postID=7494144748237113784&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/7494144748237113784'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/7494144748237113784'/><link rel='alternate' type='text/html' href='http://calos-tw.blogspot.com/2011/10/iehtml5-tag.html' title='讓IE支援HTML5 Tag 的方法'/><author><name>千江有水千江月</name><uri>http://www.blogger.com/profile/09457834533843066844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5758875416626340717.post-3636309735225713944</id><published>2011-10-04T18:12:00.001+08:00</published><updated>2011-10-05T18:24:16.877+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='expect'/><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><category scheme='http://www.blogger.com/atom/ns#' term='ssh'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>[Linux] Telnet tftpput ssh - expect操作</title><summary type='text'>首先先安裝EXPECT 
sudo apt-get install expect

Login telnet :

#!/usr/bin/expect
spawn telnet 192.168.1.1
expect Login:
send root\r
expect Password:
send password\r
interact
  

tftpput  :

#!/usr/bin/expect
spawn tftp 192.168.1.1
expect tftp&gt;
send bin\r
expect tftp&gt;
send "put $argv\r"
expect tftp&gt;
send quit\r
interact
  

這樣使用 tftpput FILENAME 


SSH LOGIN  :

#!/usr/bin/expect -f
# Expect script to </summary><link rel='replies' type='application/atom+xml' href='http://calos-tw.blogspot.com/feeds/3636309735225713944/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5758875416626340717&amp;postID=3636309735225713944&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/3636309735225713944'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/3636309735225713944'/><link rel='alternate' type='text/html' href='http://calos-tw.blogspot.com/2011/10/linux-telnet-expect-tftpput.html' title='[Linux] Telnet tftpput ssh - expect操作'/><author><name>千江有水千江月</name><uri>http://www.blogger.com/profile/09457834533843066844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5758875416626340717.post-8703533162653825111</id><published>2011-10-04T15:40:00.000+08:00</published><updated>2011-10-04T15:47:38.264+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ecshop'/><title type='text'>[ECSHOP] Remove Powered By Ecshop</title><summary type='text'>找到下列目錄的檔案
includes/lib_main.php 大約143行找到：

 $page_title = $GLOBALS['_CFG']['shop_title'] . ' - ' . 'Powered by ECShop';

改成 :

$page_title = $GLOBALS['_CFG']['shop_title'] ;




去掉footer的方法：

第一步：刪除整個 js\common.js 在261行上的 onload = function() 函數
具體的是從：261 至 353 行（適用於2.7.2，其他版本類似）

第二步：去掉 themes\你選擇的模板\library\page_footer.lbi 中的輸出代碼；==============去掉以下代碼即可==============
{foreach from=$lang.p_y item=</summary><link rel='replies' type='application/atom+xml' href='http://calos-tw.blogspot.com/feeds/8703533162653825111/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5758875416626340717&amp;postID=8703533162653825111&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/8703533162653825111'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/8703533162653825111'/><link rel='alternate' type='text/html' href='http://calos-tw.blogspot.com/2011/10/ecshop-powered-by-ecshop.html' title='[ECSHOP] Remove Powered By Ecshop'/><author><name>千江有水千江月</name><uri>http://www.blogger.com/profile/09457834533843066844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5758875416626340717.post-1514852792636195384</id><published>2011-09-28T11:24:00.000+08:00</published><updated>2011-09-28T11:24:43.357+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='考題'/><title type='text'>關於Javascript 考題</title><summary type='text'>
1. 解釋jsonp 為何?



ANS : 
什麼是JSONP：JSONP(JSON with Padding)是一個非官方的協議，它允許在服務器端集成Script tags
返回至客戶端，通過javascript callback的形式實現[跨網域訪問]（這僅僅是JSONP簡單的實現形式）。
由於 JSON 只是一種含有簡單括號結構的純文本，因此許多通道都可以交換 JSON 消息。
因為同源策略的限制(上述提到的安全性問題)，我們不能在與外部服務器進行通信的時候使用
XMLHttpRequest。而JSONP是一種可以繞過同源策略的方法，即通過使用 JSON 與 &lt;script&gt;
標記相結合的方法，從服務端直接返回可執行的JavaScript函數調用或者 JavaScript對象。

------------------------------------------------</summary><link rel='replies' type='application/atom+xml' href='http://calos-tw.blogspot.com/feeds/1514852792636195384/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5758875416626340717&amp;postID=1514852792636195384&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/1514852792636195384'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/1514852792636195384'/><link rel='alternate' type='text/html' href='http://calos-tw.blogspot.com/2011/09/javascript.html' title='關於Javascript 考題'/><author><name>千江有水千江月</name><uri>http://www.blogger.com/profile/09457834533843066844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5758875416626340717.post-2670366086403828303</id><published>2011-09-23T10:49:00.000+08:00</published><updated>2011-09-23T13:58:31.232+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='jquery'/><category scheme='http://www.blogger.com/atom/ns#' term='ajax'/><category scheme='http://www.blogger.com/atom/ns#' term='BBQ'/><title type='text'>[引用] 用Jquery 做 Ajax 上一頁下一頁.</title><summary type='text'>來源: 黑暗執行緒但很不幸地，IE7(或IE8/9開相容模式)對location.hash特性支援不夠完整，hash改變時並不會在瀏覽歷史中產生記錄，因此需要透過加入隱藏式iframe等特殊手法來克服，自己處理跨瀏覽器議題太辛苦，有個很好用的jQuery外掛BBQ(不是中秋烤肉巴比Q，是Back Button &amp; Query)可以讓我們輕鬆寫出跨瀏覽器版的AJAX回上頁功能。
&lt;!DOCTYPE html&gt;
 
&lt;html&gt;
&lt;head&gt;
    &lt;title&gt;AJAX GoBack&lt;/title&gt;
    &lt;script src="Scripts/jquery-1.6.3.js" type="text/javascript"&gt; &lt;/script&gt;
    &lt;script src="Scripts/jquery.ba-bbq.js" type="text/javascript"&gt; &lt;/</summary><link rel='replies' type='application/atom+xml' href='http://calos-tw.blogspot.com/feeds/2670366086403828303/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5758875416626340717&amp;postID=2670366086403828303&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/2670366086403828303'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/2670366086403828303'/><link rel='alternate' type='text/html' href='http://calos-tw.blogspot.com/2011/09/jquery-ajax.html' title='[引用] 用Jquery 做 Ajax 上一頁下一頁.'/><author><name>千江有水千江月</name><uri>http://www.blogger.com/profile/09457834533843066844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5758875416626340717.post-7971766414647916193</id><published>2011-09-23T00:02:00.001+08:00</published><updated>2011-11-10T23:33:08.411+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ecshop'/><title type='text'>[原創]完美改造 Ecshop 銀行匯款,匯款通知跟後台管理匯款頁面</title><summary type='text'>
Ecshop 最為人詬病的就是 user 訂購後, 沒有很正式的填寫匯款資料的頁面. 
所以做了以下的修改與調整, 應該會比較好, 倒是花了不少功夫修改資料庫與頁面:



1.會員的訂單頁面內：　







2.User匯款頁面：







3.後台匯款管理頁面：

</summary><link rel='replies' type='application/atom+xml' href='http://calos-tw.blogspot.com/feeds/7971766414647916193/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5758875416626340717&amp;postID=7971766414647916193&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/7971766414647916193'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/7971766414647916193'/><link rel='alternate' type='text/html' href='http://calos-tw.blogspot.com/2011/09/ecshop.html' title='[原創]完美改造 Ecshop 銀行匯款,匯款通知跟後台管理匯款頁面'/><author><name>千江有水千江月</name><uri>http://www.blogger.com/profile/09457834533843066844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5758875416626340717.post-3210846327857945055</id><published>2011-09-22T17:14:00.001+08:00</published><updated>2011-09-22T17:15:17.415+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='get_magic_quotes_gpc'/><category scheme='http://www.blogger.com/atom/ns#' term='php'/><title type='text'>檢查get_magic_quotes_gpc 將 POST 的資料再重組成 URL</title><summary type='text'>檢查是否有 get_magic_quotes_gpc 函數. 
若是有則 加個 stripslashes 去過濾該值. 


if(function_exists('get_magic_quotes_gpc')) 
{ $get_magic_quotes_exits = true;   } 
foreach ($_POST as $key =&gt; $value) 
// Handle escape characters， which depends on setting of magic quotes
{ 
  if($get_magic_quotes_exists == true &amp;&amp; get_magic_quotes_gpc() == 1)   { 
      $value = urlencode(stripslashes($value)); 
  } else { 
      $</summary><link rel='replies' type='application/atom+xml' href='http://calos-tw.blogspot.com/feeds/3210846327857945055/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5758875416626340717&amp;postID=3210846327857945055&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/3210846327857945055'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/3210846327857945055'/><link rel='alternate' type='text/html' href='http://calos-tw.blogspot.com/2011/09/getmagicquotesgpc-post-url.html' title='檢查get_magic_quotes_gpc 將 POST 的資料再重組成 URL'/><author><name>千江有水千江月</name><uri>http://www.blogger.com/profile/09457834533843066844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5758875416626340717.post-5745586997311428823</id><published>2011-09-21T16:11:00.000+08:00</published><updated>2011-09-22T09:28:01.237+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='正規式'/><category scheme='http://www.blogger.com/atom/ns#' term='xm'/><category scheme='http://www.blogger.com/atom/ns#' term='php'/><title type='text'>php 取代 htmlspecialchars 函數 xml 中會用到.</title><summary type='text'>取代 htmlspecialchars 函數 . 因為若是重複置換 &amp; 每次都會被置換成 &amp;amp; 
所以 原本 &lt; 變成 &amp;lt; , 再經一次轉換就變成 &amp;amp;lt; 在第二次就變成 &amp;amp;amp;lt;

function html_for_xml ($str){
    	$str = str_replace('&lt;','&amp;lt;',$str);
    	$str = str_replace('&gt;','&amp;gt;',$str);
    	$str = str_replace('"','&amp;quot;',$str);
    	$str = str_replace('\'','&amp;#039;',$str);		
    	return preg_replace('/&amp;(?!lt;|gt;|quot;|#039;|amp;)/eis','&amp;amp;',$str);	    
 </summary><link rel='replies' type='application/atom+xml' href='http://calos-tw.blogspot.com/feeds/5745586997311428823/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5758875416626340717&amp;postID=5745586997311428823&amp;isPopup=true' title='2 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/5745586997311428823'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/5745586997311428823'/><link rel='alternate' type='text/html' href='http://calos-tw.blogspot.com/2011/09/php-htmlspecialchars-xml.html' title='php 取代 htmlspecialchars 函數 xml 中會用到.'/><author><name>千江有水千江月</name><uri>http://www.blogger.com/profile/09457834533843066844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5758875416626340717.post-953814897412145148</id><published>2011-09-14T15:51:00.003+08:00</published><updated>2011-10-13T13:51:08.928+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='.htaccess'/><title type='text'>[引用].htaccess ErrorDocument 使用方式</title><summary type='text'>







來源:http://businesswing.net/webdesign/php-htaccess_to_do_system_protection/
網站伺服器在不能回應使用者需求下，會產生各種錯誤訊息，這些錯誤訊息均有一個代碼，我們來瞧瞧這代碼所代表的意義：

 

   回應代碼
   回應內容
   代表意義
  

 
401
   Authorization failed
   授權失敗。使用者輸入的帳號密碼無法得到授權。
403
   Forbidden
   存取控制機制拒絕使用者的請求，也就是說你不可以讀取這個檔案。
404
  File not found
  被要求的網頁不存在於這個伺服器上，找不到檔案。
500
  Internal Server Error
  伺服器內部錯誤；可能是網站伺服器或PHP出了問題。
501
  Not </summary><link rel='replies' type='application/atom+xml' href='http://calos-tw.blogspot.com/feeds/953814897412145148/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5758875416626340717&amp;postID=953814897412145148&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/953814897412145148'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/953814897412145148'/><link rel='alternate' type='text/html' href='http://calos-tw.blogspot.com/2011/09/htaccess-errordocument.html' title='[引用].htaccess ErrorDocument 使用方式'/><author><name>千江有水千江月</name><uri>http://www.blogger.com/profile/09457834533843066844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5758875416626340717.post-6611374754765346515</id><published>2011-09-09T11:26:00.001+08:00</published><updated>2011-09-09T11:29:58.939+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='php'/><title type='text'>[PHP]免費簡易Task程式 -&gt; mytinytodo</title><summary type='text'>一直以來都使用Google行事曆中tasks，
缺點就是無法分類，於是找到了簡單的todo List程式
http://www.mytinytodo.net



1.簡潔的AJAX介面，支援MySQL與SQLite

2.可設定公開瀏覽的分類
3.有行動裝置版本UI






















附註：Mobile UI需要在網址後帶入pda參數，如果想要自動判斷可以在index.php中加入下面的自動轉頁




if(isset($_SERVER['HTTP_USER_AGENT'])){
	$l=array('Android','iPhone','iPad');
	foreach($l as $item){
		if(stripos($_SERVER['HTTP_USER_AGENT'],$item)!==false &amp;amp;&amp;amp; !isset($_GET[</summary><link rel='replies' type='application/atom+xml' href='http://calos-tw.blogspot.com/feeds/6611374754765346515/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5758875416626340717&amp;postID=6611374754765346515&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/6611374754765346515'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/6611374754765346515'/><link rel='alternate' type='text/html' href='http://calos-tw.blogspot.com/2011/09/phptask-mytinytodo.html' title='[PHP]免費簡易Task程式 -&gt; mytinytodo'/><author><name>千江有水千江月</name><uri>http://www.blogger.com/profile/09457834533843066844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5758875416626340717.post-2293895178782583871</id><published>2011-09-08T17:22:00.001+08:00</published><updated>2011-09-09T11:31:03.518+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='codeigniter'/><title type='text'>[CodeIgniter]Email 標題中文太長會產生亂碼</title><summary type='text'>
用CI發送郵件的Class 在中文標題太長的情況下會出現亂碼，解決方法如下：

打開 libraries/Email.php  找到：function subject($subject)


    public function subject($subject) 
    { 
            $subject = $this-&gt;_prep_q_encoding($subject); 
            $this-&gt;_set_header('Subject', $subject); 
            return $this; 
    } 


修改為：


    public function subject($subject) 
    { 
            //$subject = $this-&gt;_prep_q_encoding($</summary><link rel='replies' type='application/atom+xml' href='http://calos-tw.blogspot.com/feeds/2293895178782583871/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5758875416626340717&amp;postID=2293895178782583871&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/2293895178782583871'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/2293895178782583871'/><link rel='alternate' type='text/html' href='http://calos-tw.blogspot.com/2011/09/codeigniteremail.html' title='[CodeIgniter]Email 標題中文太長會產生亂碼'/><author><name>千江有水千江月</name><uri>http://www.blogger.com/profile/09457834533843066844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5758875416626340717.post-3054822858926626662</id><published>2011-09-08T12:20:00.000+08:00</published><updated>2011-09-08T12:20:22.675+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='php'/><title type='text'>用 PHP 讀取和編寫 XML DOM</title><summary type='text'>













有許多技術可用於用 PHP 讀取和編寫 XML。本文提供了三種方法讀取 XML：使用 DOM 庫、使用 SAX 解析器和使用正則表達式。還介紹了使用 DOM 和 PHP 文本模板編寫 XML。
用 PHP 讀取和編寫可擴展標記語言（XML）看起來可能有點恐怖。實際上，XML 和它的所有相關技術可能是恐怖的，但是用 PHP 讀取和編寫 XML 不一定是項恐怖的任務。首先，需要學習一點關於 XML 的知識 —— 它是什麼，用它做什麼。然後，需要學習如何用 PHP 讀取和編寫 XML，而有許多種方式可以做這件事。
本文提供了 XML 的簡短入門，然後解釋如何用 PHP 讀取和編寫 XML。
什麼是 XML？
XML 是一種數據存儲格式。它沒有定義保存什麼數據，也沒有定義數據的格式。XML 只是定義了標記和這些標記的屬性。格式良好的 XML 標記看起來像這樣：
</summary><link rel='replies' type='application/atom+xml' href='http://calos-tw.blogspot.com/feeds/3054822858926626662/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5758875416626340717&amp;postID=3054822858926626662&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/3054822858926626662'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/3054822858926626662'/><link rel='alternate' type='text/html' href='http://calos-tw.blogspot.com/2007/05/php-xml-dom.html' title='用 PHP 讀取和編寫 XML DOM'/><author><name>千江有水千江月</name><uri>http://www.blogger.com/profile/09457834533843066844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5758875416626340717.post-8400229535100626891</id><published>2011-09-07T18:39:00.001+08:00</published><updated>2011-09-07T18:40:48.137+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><category scheme='http://www.blogger.com/atom/ns#' term='crontab'/><title type='text'>用shell 來執行 wget</title><summary type='text'>有時候設定Cron 時, 若是使用php 去跑, 有些環境變數要針對 Cron 來改寫. 
所以或許可以使用wget 來取代. 
cronWget.sh 程式碼:
=============================================
isLog=$1        
TargetURL=$2
LogFile=/var/log/cron.log
tmpLogFile=/var/log/cron.log.tmp
export LANG=en_US

if [ "$isLog" = "1" ]; then
  /usr/bin/wget -q -t 1 -O $tmpLogFile --no-check-certificate $TargetURL

  # append log file
  echo "----------END" &gt;&gt; $LogFile
  cat </summary><link rel='replies' type='application/atom+xml' href='http://calos-tw.blogspot.com/feeds/8400229535100626891/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5758875416626340717&amp;postID=8400229535100626891&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/8400229535100626891'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/8400229535100626891'/><link rel='alternate' type='text/html' href='http://calos-tw.blogspot.com/2011/09/shell-wget.html' title='用shell 來執行 wget'/><author><name>千江有水千江月</name><uri>http://www.blogger.com/profile/09457834533843066844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5758875416626340717.post-4276251187440424250</id><published>2011-09-05T11:32:00.005+08:00</published><updated>2011-09-05T11:32:54.417+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='mysql'/><title type='text'>在MySQL裡讓中文依筆畫排序</title><summary type='text'>為了因應多語系的網頁設計,在資料庫應用上都會採用UTF-8來做為資料編碼.不過UTF-8編碼的中文字卻不能依照中文字的筆劃來做排序.然而這個筆劃排序問題,在Big5編碼下是可以辦到的.SELECT * FROM `user` ORDER BY CONVERT(`user_name` USING big5) DESC</summary><link rel='replies' type='application/atom+xml' href='http://calos-tw.blogspot.com/feeds/4276251187440424250/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5758875416626340717&amp;postID=4276251187440424250&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/4276251187440424250'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/4276251187440424250'/><link rel='alternate' type='text/html' href='http://calos-tw.blogspot.com/2011/09/mysql.html' title='在MySQL裡讓中文依筆畫排序'/><author><name>千江有水千江月</name><uri>http://www.blogger.com/profile/09457834533843066844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5758875416626340717.post-8304575142909483594</id><published>2011-09-02T10:01:00.000+08:00</published><updated>2011-09-02T10:01:44.397+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tsung'/><title type='text'>Tsung Install (for UBUNTU 10.10 )</title><summary type='text'>wget http://tsung.erlang-projects.org/dist/ubuntu/tsung_1.3.3-1_all.deb
sudo dpkg -i tsung_1.3.3-1_all.deb 
sudo apt-get install erlang-nox 
sudo apt-get install gnuplot libtemplate-perl

SSH 
ssh-keygen -t rsa -P '' 
cat .ssh/id_rsa.pub | ssh user@Server "cat - &gt;&gt; .ssh/authorized_keys"


(1)修改/etc/security/limits.conf 
*    soft    nofile   65535
*    hard   nofile   65535

(2)修改/etc/profile  </summary><link rel='replies' type='application/atom+xml' href='http://calos-tw.blogspot.com/feeds/8304575142909483594/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5758875416626340717&amp;postID=8304575142909483594&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/8304575142909483594'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/8304575142909483594'/><link rel='alternate' type='text/html' href='http://calos-tw.blogspot.com/2011/09/tsung-install-for-ubuntu-1010.html' title='Tsung Install (for UBUNTU 10.10 )'/><author><name>千江有水千江月</name><uri>http://www.blogger.com/profile/09457834533843066844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5758875416626340717.post-8999981239999629584</id><published>2011-08-24T10:47:00.000+08:00</published><updated>2011-08-24T10:47:36.302+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='MLB術語'/><title type='text'>MLB 術語</title><summary type='text'>球隊===================================
投手 Pitcher / P 
捕手 Catcher / C 
一壘手 First-Base Man / 1B 
二壘手 Second-Base Man / 2B 
三壘手 Third-Base Man / 3B 
游擊手 Shortstop / SS 
左外野 Left-Fielder / LF 
中外野 Center-Fielder / CF 
右外野 Right-Fielder / RF 
指定打者 Designated Hitter / DH
代打 Pinch Hitter / PH
代跑 Pinch Runner / PR
紀錄的代號==============================A / assists / 助殺 
AB / at bats / 打數 
AL / American </summary><link rel='replies' type='application/atom+xml' href='http://calos-tw.blogspot.com/feeds/8999981239999629584/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5758875416626340717&amp;postID=8999981239999629584&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/8999981239999629584'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/8999981239999629584'/><link rel='alternate' type='text/html' href='http://calos-tw.blogspot.com/2011/08/mlb.html' title='MLB 術語'/><author><name>千江有水千江月</name><uri>http://www.blogger.com/profile/09457834533843066844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5758875416626340717.post-7535976107242059651</id><published>2011-08-19T14:39:00.003+08:00</published><updated>2011-08-21T23:44:56.861+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ecshop'/><title type='text'>[自創]Ecshop 超商取貨模組 2.7.2</title><summary type='text'>環境：
ECSHOP 2.7.2 版 (繁中版)

修改流程：1. 後台:新增一個超商配送模組.
2. 前台顯示超商取貨. 並且若是點選超商取貨，就會出現超商店名與店號輸入欄位。(圖1)　
3. 若是user 點選超商取貨，但未填寫超商店名與店號，就會無法送出訂單，並且出現 "提醒"。
4. 後台: 訂單列表-&gt;訂單信息 可以看到超商取貨的店名與店號.(圖2) 
這次修改部分，不單單只是增加配送模組就可以了，還需要新增資料庫欄位,修改模板跟 js 部分的判斷與警示. 


前台配送方式顯示: (圖1)

後台訂單顯示: (圖2)



</summary><link rel='replies' type='application/atom+xml' href='http://calos-tw.blogspot.com/feeds/7535976107242059651/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5758875416626340717&amp;postID=7535976107242059651&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/7535976107242059651'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/7535976107242059651'/><link rel='alternate' type='text/html' href='http://calos-tw.blogspot.com/2011/08/ecshop-272.html' title='[自創]Ecshop 超商取貨模組 2.7.2'/><author><name>千江有水千江月</name><uri>http://www.blogger.com/profile/09457834533843066844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5758875416626340717.post-7167021859743755093</id><published>2011-08-11T14:13:00.001+08:00</published><updated>2011-08-11T14:14:15.783+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='CSS'/><title type='text'>CSS 強制縮圖</title><summary type='text'>為避免使用者插入過大圖片，可利用CSS來將之強制縮圖！

div. className img {
max-width: 500px;
width:expression(this.width &gt; 500? "500px" : this.width);
overflow:hidden;
}

div. className img中的500則是指定圖片寬度上限，超過此上限，會強制縮到500px，這樣就不用擔心被圖稱破版面了。
「max-width」IE不支援，所以才用CSS Expression來讓IE縮放寬度
IE 8 版本在標準模式下，不再支援CSS Expression</summary><link rel='replies' type='application/atom+xml' href='http://calos-tw.blogspot.com/feeds/7167021859743755093/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5758875416626340717&amp;postID=7167021859743755093&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/7167021859743755093'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/7167021859743755093'/><link rel='alternate' type='text/html' href='http://calos-tw.blogspot.com/2011/08/css.html' title='CSS 強制縮圖'/><author><name>千江有水千江月</name><uri>http://www.blogger.com/profile/09457834533843066844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5758875416626340717.post-573303139310707476</id><published>2011-08-01T12:07:00.002+08:00</published><updated>2011-08-01T12:19:05.512+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>[引用]理解Linux系統負荷</title><summary type='text'> 一、查看系統負荷
如果你的電腦很慢，你或許想查看一下，它的工作量是否太大了。在Linux系統中，我們一般使用uptime命令查看（w命令和top命令也行）。（另外，它們在蘋果公司的Mac電腦上也適用。）你在終端窗口鍵入uptime，系統會返回一行信息。這行信息的後半部分，顯示"load average"，它的意思是"系統的平均負荷"，裡面有三個數字，我們可以從中判斷系統負荷是大還是小。為什麼會有三個數字呢？你從手冊中查到，它們的意思分別是1分鐘、5分鐘、15分鐘內系統的平均負荷。如果你繼續看手冊，它還會告訴你，當CPU完全空閒的時候，平均負荷為0；當CPU工作量飽和的時候，平均負荷為1。那麼很顯然，"load average"的值越低，比如等於0.2或0.3，就說明電腦的工作量越小，系統負荷比較輕。但是，什麼時候能看出系統負荷比較重呢？等於1的時候，還是等於0.5或等於1.5的時候？</summary><link rel='replies' type='application/atom+xml' href='http://calos-tw.blogspot.com/feeds/573303139310707476/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5758875416626340717&amp;postID=573303139310707476&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/573303139310707476'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/573303139310707476'/><link rel='alternate' type='text/html' href='http://calos-tw.blogspot.com/2011/08/linux.html' title='[引用]理解Linux系統負荷'/><author><name>千江有水千江月</name><uri>http://www.blogger.com/profile/09457834533843066844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5758875416626340717.post-2970449334960789846</id><published>2011-07-21T12:07:00.001+08:00</published><updated>2011-07-21T12:08:01.112+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='php縮圖'/><category scheme='http://www.blogger.com/atom/ns#' term='php'/><title type='text'>[引用]PHP 縮圖、截圖、翻轉的程式</title><summary type='text'>引用來源PHP 要截圖片的某個區塊(截圖)
PHP 縮圖
PHP 等比例縮圖程式
PHP 縮圖、截圖、翻轉 程式有個 Open Source 的專案, 把這些都寫成一個物件, 可以很方便的操作使用.官方網站: PHP Thumbnailer
使用範例: PHP Thumbnailer Basic Usage
</summary><link rel='replies' type='application/atom+xml' href='http://calos-tw.blogspot.com/feeds/2970449334960789846/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5758875416626340717&amp;postID=2970449334960789846&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/2970449334960789846'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/2970449334960789846'/><link rel='alternate' type='text/html' href='http://calos-tw.blogspot.com/2011/07/php.html' title='[引用]PHP 縮圖、截圖、翻轉的程式'/><author><name>千江有水千江月</name><uri>http://www.blogger.com/profile/09457834533843066844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5758875416626340717.post-2253917093027120510</id><published>2011-07-13T17:19:00.002+08:00</published><updated>2011-07-13T17:21:52.925+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='mysql'/><title type='text'>[MySQL] 時間函數操作.</title><summary type='text'>若是你的資料庫時間是使用UNIX 時間戳記來記錄. 
要在MySql 下就需要用到 FROM_UNIXTIME 此函數來轉換. 
再搭配 year() , month() ,quarter(), week() .

一、年度查詢
查詢 本年度的數據
SELECT *
FROM Statistics
WHERE year( FROM_UNIXTIME( `CreateTime` ) ) = year( curdate() )


二、查詢季度數據
查詢數據附帶季度數
SELECT Id, quarter( FROM_UNIXTIME( `CreateTime` ) ) 
FROM `Statistics`

其他的同前面部分：查詢 本季度的數據
SELECT *
FROM Statistics
WHERE quarter( FROM_UNIXTIME( CreateTime ) ) = </summary><link rel='replies' type='application/atom+xml' href='http://calos-tw.blogspot.com/feeds/2253917093027120510/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5758875416626340717&amp;postID=2253917093027120510&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/2253917093027120510'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/2253917093027120510'/><link rel='alternate' type='text/html' href='http://calos-tw.blogspot.com/2011/07/mysql.html' title='[MySQL] 時間函數操作.'/><author><name>千江有水千江月</name><uri>http://www.blogger.com/profile/09457834533843066844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5758875416626340717.post-6218968962144017419</id><published>2011-06-16T16:32:00.000+08:00</published><updated>2011-06-16T16:32:11.956+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='php'/><title type='text'>[PHP] call_user_func_array () 呼叫function and Class</title><summary type='text'>call_user_func_array() 神奇的PHP 內建函數. 


function foobar($arg, $arg2) {
    echo __FUNCTION__, " got $arg and $arg2\n";
}
class foo {
    function bar($arg, $arg2) {
        echo __METHOD__, " got $arg and $arg2\n";
    }
}


// Call the foobar() function with 2 arguments
call_user_func_array("foobar", array("one", "two"));

// Call the $foo-&gt;bar() method with 2 arguments
$foo = new foo;
</summary><link rel='replies' type='application/atom+xml' href='http://calos-tw.blogspot.com/feeds/6218968962144017419/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5758875416626340717&amp;postID=6218968962144017419&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/6218968962144017419'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/6218968962144017419'/><link rel='alternate' type='text/html' href='http://calos-tw.blogspot.com/2011/06/php-calluserfuncarray-function-and.html' title='[PHP] call_user_func_array () 呼叫function and Class'/><author><name>千江有水千江月</name><uri>http://www.blogger.com/profile/09457834533843066844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5758875416626340717.post-595207039973682001</id><published>2011-06-16T13:54:00.001+08:00</published><updated>2011-06-16T13:55:20.153+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='正規式'/><title type='text'>[正規式] 複習 (?:) (?=) (?!) 的使用</title><summary type='text'>不常使用 (?:) (?=) (?!)  
請看下列範例:

$a = 'Windows2000'; 
var_dump(preg_match('/Windows(?:95|98|NT|2000)/',$a ,$m));
print_r($m);

結果: 
int(1) Array ( [0] =&gt; Windows2000 ) ;


$a = 'Windows2000'; 
var_dump(preg_match('/Windows(?=95|98|NT|2000)/',$a ,$m));
print_r($m);

結果: 
int(1) Array ( [0] =&gt; Windows ) 


$a = 'Windows2000'; 
var_dump(preg_match('/Windows(?!95|98|NT|2000)/',$a ,$m));
print_r($m);

</summary><link rel='replies' type='application/atom+xml' href='http://calos-tw.blogspot.com/feeds/595207039973682001/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5758875416626340717&amp;postID=595207039973682001&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/595207039973682001'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/595207039973682001'/><link rel='alternate' type='text/html' href='http://calos-tw.blogspot.com/2011/06/blog-post.html' title='[正規式] 複習 (?:) (?=) (?!) 的使用'/><author><name>千江有水千江月</name><uri>http://www.blogger.com/profile/09457834533843066844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5758875416626340717.post-3804444982352234597</id><published>2011-06-13T14:58:00.003+08:00</published><updated>2011-06-13T15:56:41.998+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='titanium'/><title type='text'>[Titanium][ERROR] Error locating JDK: set $JAVA_HOME or put javac and jarsigner on your $PATH</title><summary type='text'>出現這問題, 應該是java 路徑錯誤~
我自己電腦的路徑 :
出現這錯誤,應該是Java 路徑錯誤.
需要去windows 環境設定 .
例如: 我的路徑 :C:\Program Files\Java\jdk1.6.0_26\bin
加進去Path 就可以啦~ 

話不多說只接看圖吧~~ 




參考網站:http://www.rkblog.rk.edu.pl/w/p/configuring-android-sdk-and-titanium-developer/
</summary><link rel='replies' type='application/atom+xml' href='http://calos-tw.blogspot.com/feeds/3804444982352234597/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5758875416626340717&amp;postID=3804444982352234597&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/3804444982352234597'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/3804444982352234597'/><link rel='alternate' type='text/html' href='http://calos-tw.blogspot.com/2011/06/titaniumerror-error-locating-jdk-set.html' title='[Titanium][ERROR] Error locating JDK: set $JAVA_HOME or put javac and jarsigner on your $PATH'/><author><name>千江有水千江月</name><uri>http://www.blogger.com/profile/09457834533843066844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-DjUbHSHl56c/TfW1nx5FTyI/AAAAAAAAD0E/xP-pPyp3Txw/s72-c/%25E6%259C%25AA%25E5%2591%25BD%25E5%2590%258D.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5758875416626340717.post-8698487775635946272</id><published>2011-06-13T14:41:00.001+08:00</published><updated>2011-06-13T14:43:15.623+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='titanium'/><title type='text'>[Titanium]解決 Couldn't find abd.exe or android.bat in your SDK's "tools" directory</title><summary type='text'>由於最近在Android SDK的改變文件結構.
需要打下列DOS指令即可. 


Dos Command :  
cd C:\Program Files (x86)\Android\android-sdk-windows\tools (PS:若是Vista or Xp 則目錄為C:\Program Files\Android\android-sdk)



mklink adb.exe ..\platform-tools\adb.exemklink AdbWinApi.dll ..\platform-tools\AdbWinApi.dll























參考來源</summary><link rel='replies' type='application/atom+xml' href='http://calos-tw.blogspot.com/feeds/8698487775635946272/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5758875416626340717&amp;postID=8698487775635946272&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/8698487775635946272'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/8698487775635946272'/><link rel='alternate' type='text/html' href='http://calos-tw.blogspot.com/2011/06/titanium-couldnt-find-abdexe-or.html' title='[Titanium]解決 Couldn&apos;t find abd.exe or android.bat in your SDK&apos;s &quot;tools&quot; directory'/><author><name>千江有水千江月</name><uri>http://www.blogger.com/profile/09457834533843066844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-P0Saa4Hh52w/TfWuQWYxdQI/AAAAAAAADz8/mP2fFhxipyo/s72-c/android_packages-screenshot_13.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5758875416626340717.post-3532011510317245174</id><published>2011-06-02T15:03:00.000+08:00</published><updated>2011-06-02T15:03:07.483+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><title type='text'>跑Javascript迴圈執行AJAX呼叫-日期運算</title><summary type='text'>來源 : 暗黑執行緒
記起來, javascript Date 的操作. 


&lt;html&gt;
&lt;head&gt;
    &lt;script src="jquery.js" type="text/javascript"&gt;&lt;/script&gt;
    &lt;script type="text/javascript"&gt;
        $(function () {
            //準備從1/1做到5/31
            var d = new Date(2011, 0, 1);
            var june = new Date(2011, 5, 1);
            //將待處理的日期放進Array中
            var jobQueue = [];
            while (d &lt; june) {
                </summary><link rel='replies' type='application/atom+xml' href='http://calos-tw.blogspot.com/feeds/3532011510317245174/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5758875416626340717&amp;postID=3532011510317245174&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/3532011510317245174'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/3532011510317245174'/><link rel='alternate' type='text/html' href='http://calos-tw.blogspot.com/2011/06/javascriptajax.html' title='跑Javascript迴圈執行AJAX呼叫-日期運算'/><author><name>千江有水千江月</name><uri>http://www.blogger.com/profile/09457834533843066844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5758875416626340717.post-8614027008936862770</id><published>2011-06-02T00:19:00.001+08:00</published><updated>2011-12-23T17:26:24.626+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='正規式'/><title type='text'>[php] 正規式收集</title><summary type='text'>// 過濾中文字
preg_replace('/[\x{4e00}-\x{9fa5}]+/isu' , '' , $matches[2])
//過濾html 中img 的src
preg_replace( '/(&lt;img\s*.*?src\s*=)\s*[\'"](.*?)\s*[\'"](.*?&gt;)/is' ,"$2" ,$v);
//過濾html 中a 的href
preg_replace( '/(&lt;a\s*.*?href\s*=)\s*[\'"](.*?)\s*[\'"](.*?&gt;)(.*?)(&lt;\/a&gt;)/is' ,"$1\"$link\"$3$content$5" ,$m[0]);

在javascript中:

var str = "php编程";
if (/^[\u4e00-\u9fa5]+$/.test(str)) {
alert("该字符串全部是中文");
} else</summary><link rel='replies' type='application/atom+xml' href='http://calos-tw.blogspot.com/feeds/8614027008936862770/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5758875416626340717&amp;postID=8614027008936862770&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/8614027008936862770'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/8614027008936862770'/><link rel='alternate' type='text/html' href='http://calos-tw.blogspot.com/2011/06/php.html' title='[php] 正規式收集'/><author><name>千江有水千江月</name><uri>http://www.blogger.com/profile/09457834533843066844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5758875416626340717.post-3265952780436281673</id><published>2011-06-01T10:04:00.000+08:00</published><updated>2011-06-01T10:04:19.466+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='php'/><title type='text'>[引用]PHP 將 文字 轉換成 &amp;#xxxxx; UNICODE 碼</title><summary type='text'>將中文字轉換成 &amp;#xxxxx; UNICODE 碼, 主要的用途在於, 不用擔心有顯示不出來的文字.

引用來源


&lt;?php
$str = '我';

/* 將 '我' 轉換成 '25105' 或 '&amp;#25105;' */
// 使用 iconv
$unicode_html = base_convert(bin2hex(iconv('UTF-8', 'UCS-4', $str)), 16, 10); // 25105

// 使用 mb_convert_encoding
$unicode_html = base_convert(bin2hex(mb_convert_encoding($str, 'ucs-4', 'utf-8')), 16, 10); // 25105

// 補上 &amp;#xxxxx;
$unicode_html = '&amp;#' . base_convert(</summary><link rel='replies' type='application/atom+xml' href='http://calos-tw.blogspot.com/feeds/3265952780436281673/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5758875416626340717&amp;postID=3265952780436281673&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/3265952780436281673'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/3265952780436281673'/><link rel='alternate' type='text/html' href='http://calos-tw.blogspot.com/2011/06/php-unicode.html' title='[引用]PHP 將 文字 轉換成 &amp;#xxxxx; UNICODE 碼'/><author><name>千江有水千江月</name><uri>http://www.blogger.com/profile/09457834533843066844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5758875416626340717.post-8322464073951365172</id><published>2011-05-26T10:15:00.001+08:00</published><updated>2011-05-26T10:16:18.599+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='股票'/><title type='text'>99%投資人不知道的操作祕訣</title><summary type='text'>楚狂人 的部落格 
提醒自己...記下來.
大家都知道只有15%的人是在股市中長期有獲利的，高達85%的投資人在遇到空頭的時候會把原本多頭賺的全部賠掉還倒賠，賠掉房子、車子、老婆孩子的也時常聽到。為什麼會這樣？除了大家朗朗上口的該停損不停損以外，我覺得主要是因為大部份投資人都不知道一個輕鬆成為常勝軍的祕訣。那個祕訣就是......進場資金比例應該和指數價位相反舉例來說6000點以下，進場十成，6000~7000最多進場八成，7000~8000最多進場六成，8000~9000最多進場四成，9000點以上最多進場兩成。這樣做的原因是台股大概以6000為中線，6000以下買進股票勝率非常高，而且時常可以找到漲倍股，這時當然應該選定好股票就十成資金進場，反過來講到了9000點以上，以台股歷史來說這時已經是相對高點，如果還是動輒十成資金梭哈，只要行情一反轉就會大賠。如果改成9000</summary><link rel='replies' type='application/atom+xml' href='http://calos-tw.blogspot.com/feeds/8322464073951365172/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5758875416626340717&amp;postID=8322464073951365172&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/8322464073951365172'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/8322464073951365172'/><link rel='alternate' type='text/html' href='http://calos-tw.blogspot.com/2011/05/99.html' title='99%投資人不知道的操作祕訣'/><author><name>千江有水千江月</name><uri>http://www.blogger.com/profile/09457834533843066844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5758875416626340717.post-135008274167589192</id><published>2011-05-25T13:45:00.003+08:00</published><updated>2011-05-26T09:19:43.423+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='遊戲'/><title type='text'>QWOP 小游戲. 你跑得到終點嗎?</title><summary type='text'>可以再智障一點的遊戲~
利用 : QW 控制大腿 
利用 : OP 控制小腿
最佳紀錄: 44.8M


 </summary><link rel='replies' type='application/atom+xml' href='http://calos-tw.blogspot.com/feeds/135008274167589192/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5758875416626340717&amp;postID=135008274167589192&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/135008274167589192'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/135008274167589192'/><link rel='alternate' type='text/html' href='http://calos-tw.blogspot.com/2011/05/qwop.html' title='QWOP 小游戲. 你跑得到終點嗎?'/><author><name>千江有水千江月</name><uri>http://www.blogger.com/profile/09457834533843066844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5758875416626340717.post-1422046314267724309</id><published>2011-05-24T17:47:00.000+08:00</published><updated>2011-05-24T17:47:11.199+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='jquery plugin'/><category scheme='http://www.blogger.com/atom/ns#' term='jquery'/><title type='text'>jQuery Plugin insertContent-在文本框游標位置插入內容並選中</title><summary type='text'>在輸入框中插入一些符號或是元件的plugin. 
值得收藏.


使用方式: 
$(文本域選擇器).insertContent("插入的內容");
$(文本域選擇器).insertContent("插入的內容"，數值); 
//根據數值選中插入文本內容兩邊的邊界

來源網址
Demo:http://www.css88.com/demo/insertContent/

/**
 * Created by 愚人碼頭 .
 * User: 愚人碼頭
 * Date: 11-5-19
 * Time: 上午10:24
 * 更多查看http://www.css88.com/archives/3627
 */
//在光標位置插入內容
(function($) {
    $.fn.extend({
        insertContent: function(myValue, t) {
</summary><link rel='replies' type='application/atom+xml' href='http://calos-tw.blogspot.com/feeds/1422046314267724309/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5758875416626340717&amp;postID=1422046314267724309&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/1422046314267724309'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/1422046314267724309'/><link rel='alternate' type='text/html' href='http://calos-tw.blogspot.com/2011/05/jquery-plugin-insertcontent.html' title='jQuery Plugin insertContent-在文本框游標位置插入內容並選中'/><author><name>千江有水千江月</name><uri>http://www.blogger.com/profile/09457834533843066844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5758875416626340717.post-5016158860934082347</id><published>2011-05-24T17:14:00.003+08:00</published><updated>2011-05-24T17:47:45.495+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='jquery plugin'/><category scheme='http://www.blogger.com/atom/ns#' term='jquery'/><title type='text'>jQuery Masonry Plugin - 版型工具</title><summary type='text'>應用網站: http://pinterest.com/

Masonry 官網

由下圖即可看出, 使用 Masonry 的差異了. 


jQuery Masonry參數：來源


$('#wrapper').masonry({

singleMode: false,
// 禁用測量每個浮動元素的寬度。
// 如果浮動元素具有相同的寬度，設置為true。
// 默認： false

columnWidth: 240,
// 1列網格的寬度，單位為像素（px）。
// 默認： 第一個浮動元素外寬度。

itemSelector: '.box:visible',
// 附加選擇器，用來指定哪些元素包裹的元素會重新排列。

resizeable: true,
// 綁定一個 Masonry 訪問 用來 窗口 resize時佈局平滑流動.
// 默認：true

animate: true,
</summary><link rel='replies' type='application/atom+xml' href='http://calos-tw.blogspot.com/feeds/5016158860934082347/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5758875416626340717&amp;postID=5016158860934082347&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/5016158860934082347'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/5016158860934082347'/><link rel='alternate' type='text/html' href='http://calos-tw.blogspot.com/2011/05/jquery-masonry-plugin.html' title='jQuery Masonry Plugin - 版型工具'/><author><name>千江有水千江月</name><uri>http://www.blogger.com/profile/09457834533843066844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5758875416626340717.post-8330627611478102742</id><published>2011-05-24T09:23:00.002+08:00</published><updated>2011-05-24T11:03:42.602+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='股票'/><title type='text'>胡立陽 教你如何搶反彈</title><summary type='text'>大跌之後的反彈是「真」還是「假」。搶反彈要符合的2個條件：a.       今日反彈的幅度，已經超過昨日跌幅的50%以上。b.      今日的成交量，較昨日成交量高出20%以上。   如果大跌之後的反彈幅度，不及上述2點，那表示還有另一波低點會出現。   如何搶反彈舉例如下：  
交易日漲跌幅成交金額(億元)
3/1-50100
3/2-3080
3/3-4090
3/4+3080
3/5+10110
3/6+1580
   a.(30+10+15)&lt;(50+30+40)/2   b. (80+110+80)&lt;(100+80+80)x1.2   計算結果顯示3/4-3/6反彈不符合上述搶反彈條件，故投資人3/7不要急著搶進。
交易日漲跌幅成交金額(億元)
9/1-60100
9/2-40104
9/3+70130
   a.70&gt; (60+40)/2   b. (100+104) /2</summary><link rel='replies' type='application/atom+xml' href='http://calos-tw.blogspot.com/feeds/8330627611478102742/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5758875416626340717&amp;postID=8330627611478102742&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/8330627611478102742'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/8330627611478102742'/><link rel='alternate' type='text/html' href='http://calos-tw.blogspot.com/2011/05/blog-post.html' title='胡立陽 教你如何搶反彈'/><author><name>千江有水千江月</name><uri>http://www.blogger.com/profile/09457834533843066844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5758875416626340717.post-3956398498429334594</id><published>2011-05-23T17:57:00.003+08:00</published><updated>2011-05-23T18:11:47.437+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Blog技巧'/><title type='text'>[Google Blogger]依標籤分類的相關文章(related posts)功能</title><summary type='text'>參考網站 : 這邊

首先, 先到版面配置 --&gt; 修改HTML --&gt; 打勾展開小裝置範本.
找到下面資料: 
&lt;div&gt;&lt;data:post.body/&gt;&lt;/div&gt;

後面塞入: (自己有修改, 若是該標籤沒有任何文章, 則不顯示該標籤.) 

&lt;!-- Edit start --&gt;
&lt;b:if cond='data:blog.pageType == &amp;quot;item&amp;quot;'&gt;
&lt;div class='similiar'&gt;
&lt;!-- *****************http://hoctro.blogspot.com*****Jan,2007******************
--&gt;
&lt;!-- *****************Related Articles by Labels - Take Two******************
--&gt;

&lt;!--
</summary><link rel='replies' type='application/atom+xml' href='http://calos-tw.blogspot.com/feeds/3956398498429334594/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5758875416626340717&amp;postID=3956398498429334594&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/3956398498429334594'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/3956398498429334594'/><link rel='alternate' type='text/html' href='http://calos-tw.blogspot.com/2011/05/google-bloggerrelated-posts.html' title='[Google Blogger]依標籤分類的相關文章(related posts)功能'/><author><name>千江有水千江月</name><uri>http://www.blogger.com/profile/09457834533843066844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5758875416626340717.post-980067622316765264</id><published>2011-05-20T11:52:00.000+08:00</published><updated>2011-05-20T11:52:47.898+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='底圖置中'/><category scheme='http://www.blogger.com/atom/ns#' term='facebook'/><title type='text'>Facebook 底圖圖片置中法.</title><summary type='text'>底圖圖片置中, 讓底圖不變型, 又能置中.


 
.s_img{
height:80px;
width:80px;
background-color:#ffffff;
background-position:center 25%;
background-repeat:no-repeat;
}

 
&lt;img src="image/1px.gif" style="background-image: url('img_url');" border="0" class="s_img" /&gt;
</summary><link rel='replies' type='application/atom+xml' href='http://calos-tw.blogspot.com/feeds/980067622316765264/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5758875416626340717&amp;postID=980067622316765264&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/980067622316765264'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/980067622316765264'/><link rel='alternate' type='text/html' href='http://calos-tw.blogspot.com/2011/05/facebook.html' title='Facebook 底圖圖片置中法.'/><author><name>千江有水千江月</name><uri>http://www.blogger.com/profile/09457834533843066844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5758875416626340717.post-4903223586069824023</id><published>2011-05-11T16:42:00.002+08:00</published><updated>2011-05-11T16:47:19.524+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='unixtime'/><category scheme='http://www.blogger.com/atom/ns#' term='utc'/><title type='text'>[javascript] UNIX Time 轉換 格式</title><summary type='text'>用js 取得 UNIX Time :

var foo = new Date();    Unixtime = parseInt(foo.getTime() / 1000);
unix_to_time(Unixtime , 0 ); // 第一個變數 UnixTime ,第二個變數 時差. (例如: 台灣 +8 );

結果: 2011-05-11 16:42:45
 
function unix_to_time(unixtime , hour ){
unixtime = parseInt(unixtime,10) + (hour*3600);
return new Date(unixtime*1000).formatDate('yyyy-MM-dd hh:mm:ss');   
}

Date.prototype.formatDate = function(format) {
var </summary><link rel='replies' type='application/atom+xml' href='http://calos-tw.blogspot.com/feeds/4903223586069824023/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5758875416626340717&amp;postID=4903223586069824023&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/4903223586069824023'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/4903223586069824023'/><link rel='alternate' type='text/html' href='http://calos-tw.blogspot.com/2011/05/javascript-unix-time.html' title='[javascript] UNIX Time 轉換 格式'/><author><name>千江有水千江月</name><uri>http://www.blogger.com/profile/09457834533843066844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5758875416626340717.post-6227667028253678720</id><published>2011-04-28T12:26:00.002+08:00</published><updated>2011-05-25T11:51:39.496+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='jquery plugin'/><category scheme='http://www.blogger.com/atom/ns#' term='jquery'/><title type='text'>[jquery] $.temp 遞歸用法</title><summary type='text'>$.temp 是一個很好用的 template plugin 
不過通常做 template 會需要用到遞歸方式, 所以只好用下列函數來傳回html code.


function get_template (type , data ){
    $.template( "template", $('#tmp_'+type).html());    
    return $("&lt;div /&gt;").append($.tmpl( "template",data)).html();
}


Plugin : http://api.jquery.com/jquery.tmpl</summary><link rel='replies' type='application/atom+xml' href='http://calos-tw.blogspot.com/feeds/6227667028253678720/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5758875416626340717&amp;postID=6227667028253678720&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/6227667028253678720'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/6227667028253678720'/><link rel='alternate' type='text/html' href='http://calos-tw.blogspot.com/2011/04/jquery-temp.html' title='[jquery] $.temp 遞歸用法'/><author><name>千江有水千江月</name><uri>http://www.blogger.com/profile/09457834533843066844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5758875416626340717.post-8702170511067745468</id><published>2011-04-22T14:05:00.006+08:00</published><updated>2011-04-22T14:47:02.590+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>[ubuntu] 自動刪除幾天前備份檔案shell 程式</title><summary type='text'>因為有個資料夾內, 有備份sql 的資料, 但是又擔心, 若是一直砍, 哪天資料備份故障, 這樣檔案還是會被砍光. 
因此加了個判斷.
該資料夾內檔案若是高於5筆 , 才進行刪除動作.
程式如下:
------------------------------------------------------------------------
#!/bin/sh
file_num=$(find /home/xxx/secret/*.bak |wc -l);
if [ $file_num -gt 5 ]; then
find /home/xxx/secret/*.bak -type f -mtime +6 |xargs --no-run-if-empty rm -rf
fi
-----------------------------------------------------------</summary><link rel='replies' type='application/atom+xml' href='http://calos-tw.blogspot.com/feeds/8702170511067745468/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5758875416626340717&amp;postID=8702170511067745468&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/8702170511067745468'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/8702170511067745468'/><link rel='alternate' type='text/html' href='http://calos-tw.blogspot.com/2011/04/ubuntu-6shell.html' title='[ubuntu] 自動刪除幾天前備份檔案shell 程式'/><author><name>千江有水千江月</name><uri>http://www.blogger.com/profile/09457834533843066844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5758875416626340717.post-4465240355316494247</id><published>2011-04-15T09:33:00.000+08:00</published><updated>2011-04-15T09:33:02.570+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='codeigniter'/><title type='text'>[Codeigniter] Email Class send Microsoft Exchange server 發生錯誤解決方法.</title><summary type='text'>使用 CI 1.7.3 版本 Email Class 透過SMTP (Exchange Server) 送信.  發生錯誤.
如下:
[send_mail_helper] 
error 220 twowa.XXX.com Microsoft ESMTP MAIL Service ready at Thu, 14 Apr 2011 18:58:40 +0800
hello: 
The following SMTP error was encountered: 
Failed to send AUTH LOGIN command. Error: 
from: The following SMTP error was encountered: 
to: The following SMTP error was encountered: 
data: The following SMTP </summary><link rel='replies' type='application/atom+xml' href='http://calos-tw.blogspot.com/feeds/4465240355316494247/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5758875416626340717&amp;postID=4465240355316494247&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/4465240355316494247'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/4465240355316494247'/><link rel='alternate' type='text/html' href='http://calos-tw.blogspot.com/2011/04/codeigniter-email-class-send-microsoft.html' title='[Codeigniter] Email Class send Microsoft Exchange server 發生錯誤解決方法.'/><author><name>千江有水千江月</name><uri>http://www.blogger.com/profile/09457834533843066844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5758875416626340717.post-8984604248916090746</id><published>2011-04-14T18:34:00.006+08:00</published><updated>2011-04-14T18:40:29.712+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='xcopy'/><title type='text'>[windows] Xcopy BACKUP.BAT</title><summary type='text'>使用方式: 將下列 程式開始後面, 存成 backup.bat , 然後拿掉你要執行的那一行 rem , 即可.
程式開始: 

rem ----- 檔案名稱 : BACKUP.BAT -------------------------------------------------------
rem ----- 用途 : 利用 XCOPY 和 .BAT 功能做備份 ----------------------------------------

rem ----- 將 BACKUP.BAT ?#91;入 系統排?#123; ( 可以手動排入 [開始][程式集][啟動] 中 ) ------
rem at 23:00 /every:s,m,t,w,th,f,sa "d:\LU\BACKUP.bat"

rem ----- XCOPY 用法 可用 "XCOPY /?" 查詢 -----</summary><link rel='replies' type='application/atom+xml' href='http://calos-tw.blogspot.com/feeds/8984604248916090746/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5758875416626340717&amp;postID=8984604248916090746&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/8984604248916090746'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/8984604248916090746'/><link rel='alternate' type='text/html' href='http://calos-tw.blogspot.com/2011/04/windows-xcopy-backupbat.html' title='[windows] Xcopy BACKUP.BAT'/><author><name>千江有水千江月</name><uri>http://www.blogger.com/profile/09457834533843066844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5758875416626340717.post-4722848180108980722</id><published>2011-04-13T11:25:00.000+08:00</published><updated>2011-04-13T11:25:45.141+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='mysql'/><title type='text'>[引用] Mysql engine type : Myisam  Innodb  memory</title><summary type='text'>來源: http://miggo.pixnet.net/blog/post/30855147
Mysql的 Engine Type有幾種常用到的，以下是
MySQL 5.0 Reference Manual中之資料，邊看邊快速的紀錄一下各項的差異和使用時機
設定引擎建，議用 ENGINE = MyISAM 方式指定，Type = 為較舊的方法(也支援)

 
■    MyISAM : 
  1.效能優，預設引擎，為 Mysql最早使用的引擎
2.使用MyISAM將具備三種 檔案：
        .frm (table format)  .MYD(data file)  .MYI(index file)
3.所有資料是以low byte first儲存，數字型key是以high byte first儲存以利索引
4.支援大檔 ( &gt; 63 bit)
5.支援42億(2^32次方) </summary><link rel='replies' type='application/atom+xml' href='http://calos-tw.blogspot.com/feeds/4722848180108980722/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5758875416626340717&amp;postID=4722848180108980722&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/4722848180108980722'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/4722848180108980722'/><link rel='alternate' type='text/html' href='http://calos-tw.blogspot.com/2011/04/mysql-engine-type-myisam-innodb-memory.html' title='[引用] Mysql engine type : Myisam  Innodb  memory'/><author><name>千江有水千江月</name><uri>http://www.blogger.com/profile/09457834533843066844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5758875416626340717.post-6850853581430878909</id><published>2011-04-07T17:13:00.001+08:00</published><updated>2011-04-07T17:13:39.007+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='call_user_func_array'/><category scheme='http://www.blogger.com/atom/ns#' term='php'/><title type='text'>[PHP] call_user_func_array 介紹</title><summary type='text'>使用 call_user_func_array 來call 自己設定的function . 


helper_call_custom_function('test');

function helper_call_custom_function( $p_function, $p_args_array ) {
$t_function = 'custom_function_override_' . $p_function;

if( !function_exists( $t_function ) ) {
$t_function = 'custom_function_default_' . $p_function;
}

return call_user_func_array( $t_function, $p_args_array );
}

function </summary><link rel='replies' type='application/atom+xml' href='http://calos-tw.blogspot.com/feeds/6850853581430878909/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5758875416626340717&amp;postID=6850853581430878909&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/6850853581430878909'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/6850853581430878909'/><link rel='alternate' type='text/html' href='http://calos-tw.blogspot.com/2011/04/php-calluserfuncarray.html' title='[PHP] call_user_func_array 介紹'/><author><name>千江有水千江月</name><uri>http://www.blogger.com/profile/09457834533843066844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5758875416626340717.post-9186263058063681545</id><published>2011-04-01T19:28:00.001+08:00</published><updated>2011-04-01T19:34:39.675+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='xoops'/><title type='text'>Xoops Tadnews 2.0 RC9  修正 module.css , reset.css 找不到的問題.</title><summary type='text'>用firebug 看 發現 module.css and reset.css 找不到. 
因為找不到造成每次網頁速度卡到了. 
解答:
找到下列這支檔案
modules\tadnews\index.php 
約 389 行.
$xoopsTpl-&gt;assign( "css" , "&lt;link rel='alternate' type='application/rss+xml' title='".$xoopsModule-&gt;getVar('name')."' href='".XOOPS_URL."/modules/".$xoopsModule-&gt;getVar('dirname')."/rss.php?ncsn={$ncsn}' /&gt;\n&lt;link rel='stylesheet' type='text/css' media='screen' href='module.css' /&gt;\n&lt;</summary><link rel='replies' type='application/atom+xml' href='http://calos-tw.blogspot.com/feeds/9186263058063681545/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5758875416626340717&amp;postID=9186263058063681545&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/9186263058063681545'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/9186263058063681545'/><link rel='alternate' type='text/html' href='http://calos-tw.blogspot.com/2011/04/xoops-tadnews-20-rc9-modulecss-resetcss.html' title='Xoops Tadnews 2.0 RC9  修正 module.css , reset.css 找不到的問題.'/><author><name>千江有水千江月</name><uri>http://www.blogger.com/profile/09457834533843066844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5758875416626340717.post-4328492856918426656</id><published>2011-04-01T18:48:00.000+08:00</published><updated>2011-04-01T18:48:03.252+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='.htaccess'/><title type='text'>.htaccess 快取網站圖片, js , CSS , png ,gif</title><summary type='text'>利用 .htaccess 來達成 圖片與js 檔案 304 cache .


# 快取一年
&lt;FilesMatch "\.(ico|pdf|flv)$"&gt;
Header set Cache-Control "max-age=29030400, public"
&lt;/FilesMatch&gt;
# 快取一周
&lt;FilesMatch "\.(jpg|jpeg|png|gif|swf)$"&gt;
Header set Cache-Control "max-age=604800, public"
&lt;/FilesMatch&gt;
# 快取二天
&lt;FilesMatch "\.(xml|txt|css|js)$"&gt;
Header set Cache-Control "max-age=172800, proxy-revalidate"
&lt;/FilesMatch&gt;
# 快取一分鐘
&lt;FilesMatch "\.(</summary><link rel='replies' type='application/atom+xml' href='http://calos-tw.blogspot.com/feeds/4328492856918426656/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5758875416626340717&amp;postID=4328492856918426656&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/4328492856918426656'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/4328492856918426656'/><link rel='alternate' type='text/html' href='http://calos-tw.blogspot.com/2011/04/htaccess-js-css-png-gif.html' title='.htaccess 快取網站圖片, js , CSS , png ,gif'/><author><name>千江有水千江月</name><uri>http://www.blogger.com/profile/09457834533843066844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5758875416626340717.post-8961704897417888843</id><published>2011-03-28T14:28:00.002+08:00</published><updated>2011-04-12T10:08:23.735+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='wol'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>[Ubuntu] 設定 Wake On Lan 網路喚醒</title><summary type='text'>
透過NAS 來 wake on lan  另一台ubuntu 的server .
這台ubuntu 的server 主要是做 Raid1 , rsync NAS 內的部分資料. 因為只是一般電腦組成的ubuntu 所以經不起24小時開機(因為power 已經在之前使用3-4年後掛點過), 所以透過NAS 執行crontab 去執行php 程式去喚醒他. 
// 安裝 ethtool 工具
$ sudo atp-get install ethtool  
$ sudo ethtool eth0Settings for eth0:
    Supported ports: [ TP ]
    Supported link modes:   10baseT/Half 10baseT/Full 
                            100baseT/Half </summary><link rel='replies' type='application/atom+xml' href='http://calos-tw.blogspot.com/feeds/8961704897417888843/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5758875416626340717&amp;postID=8961704897417888843&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/8961704897417888843'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/8961704897417888843'/><link rel='alternate' type='text/html' href='http://calos-tw.blogspot.com/2011/03/ubuntu-wake-on-lan.html' title='[Ubuntu] 設定 Wake On Lan 網路喚醒'/><author><name>千江有水千江月</name><uri>http://www.blogger.com/profile/09457834533843066844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5758875416626340717.post-6943747685072574021</id><published>2011-03-11T13:17:00.001+08:00</published><updated>2011-04-14T15:01:15.481+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='K-Lite'/><category scheme='http://www.blogger.com/atom/ns#' term='rnvb'/><title type='text'>[問題解決][win7]K-Lite發生Audio: RealAudio COOK 44100Hz stereo 錯誤, 播rm, rmvb檔沒聲音</title><summary type='text'>Audio: RealAudio COOK 44100Hz stereo

AM_MEDIA_TYPE:
majortype: MEDIATYPE_Audio {xxxx}
subtype: Unknown GUID Name {xxxx}
formattype: FORMAT_WaveFormatEx {xxxx}
bFixedSizeSamples: 1
bTemporalCompression: 1
lSampleSize: 14880

解決辦法: 官網的回答
1.請下載下面zip檔
下載DLL檔
2.將這五個檔案: cook.dll, pncrt.dll, sipr3260.dll, drv33260.dll, drv43260.dll 
3.放到這個目錄下 C:\Windows</summary><link rel='replies' type='application/atom+xml' href='http://calos-tw.blogspot.com/feeds/6943747685072574021/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5758875416626340717&amp;postID=6943747685072574021&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/6943747685072574021'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/6943747685072574021'/><link rel='alternate' type='text/html' href='http://calos-tw.blogspot.com/2011/03/win7k-liteaudio-realaudio-cook-44100hz.html' title='[問題解決][win7]K-Lite發生Audio: RealAudio COOK 44100Hz stereo 錯誤, 播rm, rmvb檔沒聲音'/><author><name>千江有水千江月</name><uri>http://www.blogger.com/profile/09457834533843066844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5758875416626340717.post-2578245060182462181</id><published>2011-03-08T12:33:00.000+08:00</published><updated>2011-03-08T12:33:57.478+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='xoops'/><title type='text'>[xoops] 修正 userinfo.php?uid=1</title><summary type='text'>在google 上搜尋自己的網站. 居然發現可以不用登入就看到userinfo.php?uid=1 的內容.

所以修改了一下userinfo.php 這檔案.
找到下列這一行: 
include_once $GLOBALS['xoops']-&gt;path('class/module.textsanitizer.php');
後面新增:

if (!is_object($xoopsUser)){
 redirect_header('index.php', 3, _NOPERM);
}

若是你要更嚴格一點, 只有自己才能看帳號資訊,那就改成下列一行:

if (!is_object($xoopsUser) &amp;&amp; $xoopsUser['vars']['uid']['value'] == intval($_GET['uid'])){
 redirect_header('index.php',</summary><link rel='replies' type='application/atom+xml' href='http://calos-tw.blogspot.com/feeds/2578245060182462181/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5758875416626340717&amp;postID=2578245060182462181&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/2578245060182462181'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/2578245060182462181'/><link rel='alternate' type='text/html' href='http://calos-tw.blogspot.com/2011/03/xoops-userinfophpuid1.html' title='[xoops] 修正 userinfo.php?uid=1'/><author><name>千江有水千江月</name><uri>http://www.blogger.com/profile/09457834533843066844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5758875416626340717.post-5684444510932044781</id><published>2011-03-04T19:33:00.000+08:00</published><updated>2011-03-04T19:36:18.989+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='xml'/><title type='text'>XML 簡介</title><summary type='text'>簡介

* XML是用來建立描述結構化資料標示語言的語言。
* 與資料無關的格式。
* 開放，可讓人讀取的資料格式，看起來像是HTML。
* 能避免瀏覽器或是其他中介軟體，自行增加特定的HTML標籤。
* 具擴展性，不像HTML有固定的格式。

語法規則

範例：

&lt;?xml version="1.0" encoding="ISO-8859-1"?&gt;
&lt;note&gt;
&lt;to&gt;Tove&lt;/to&gt;
&lt;from&gt;Jani&lt;/from&gt;
&lt;heading&gt;Reminder&lt;/heading&gt;
&lt;body&gt;Don't forget me this weekend!&lt;/body&gt;
&lt;/note&gt;

規則1：必須以XML文件宣告為起始
&lt;?xml version="1.0" encoding="ISO-8859-1"?&gt;
這叫 XML宣告(declaration)，更有學問的稱呼為 前言(prolog</summary><link rel='replies' type='application/atom+xml' href='http://calos-tw.blogspot.com/feeds/5684444510932044781/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5758875416626340717&amp;postID=5684444510932044781&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/5684444510932044781'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/5684444510932044781'/><link rel='alternate' type='text/html' href='http://calos-tw.blogspot.com/2011/03/xml.html' title='XML 簡介'/><author><name>千江有水千江月</name><uri>http://www.blogger.com/profile/09457834533843066844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5758875416626340717.post-1846756208140585403</id><published>2011-03-04T18:34:00.000+08:00</published><updated>2011-03-04T18:34:03.053+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>Linux diff  and colordiff</title><summary type='text'>來源

* diff -u file1 file2 | colordiff
* diff -u file1 file2 | colordiff | less -R
* 直接寫 alias diff=colordiff 進 .bashrc, 就可以直接 diff -u file1 file2 | less -R 囉~
* 加上 -u 的參數, 不同的地方會以 +/- 來區分, 會比較好看.
安裝: apt-get install colordiff 即可</summary><link rel='replies' type='application/atom+xml' href='http://calos-tw.blogspot.com/feeds/1846756208140585403/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5758875416626340717&amp;postID=1846756208140585403&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/1846756208140585403'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/1846756208140585403'/><link rel='alternate' type='text/html' href='http://calos-tw.blogspot.com/2011/03/linux-diff-and-colordiff.html' title='Linux diff  and colordiff'/><author><name>千江有水千江月</name><uri>http://www.blogger.com/profile/09457834533843066844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5758875416626340717.post-2635118500186356930</id><published>2011-03-04T18:02:00.000+08:00</published><updated>2011-03-04T18:03:08.803+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='VirtualBox'/><title type='text'>VirtualBox  (安裝、複製 Clone dvi Img)</title><summary type='text'>Linux : 
1. sudo apt-get install virtualbox-ose virtualbox-ose-modules-2.6.22-14-generic
2.  
* cat /dev/cdrom &gt;&gt; xp.iso
或 使用 dd
* dd if=/dev/cdrom of=~/xp.iso
* dd if=/dev/dvd of=~/xp.iso
3. 複製vdi 
vboxmanage clonevdi ~/.VirtualBox/xp.vdi ~/.VirtualBox/xp-update.vdi # 預設路徑

Windows :
下載 CloneVDI 
 官方網站</summary><link rel='replies' type='application/atom+xml' href='http://calos-tw.blogspot.com/feeds/2635118500186356930/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5758875416626340717&amp;postID=2635118500186356930&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/2635118500186356930'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/2635118500186356930'/><link rel='alternate' type='text/html' href='http://calos-tw.blogspot.com/2011/03/virtualbox-clone-dvi-img.html' title='VirtualBox  (安裝、複製 Clone dvi Img)'/><author><name>千江有水千江月</name><uri>http://www.blogger.com/profile/09457834533843066844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5758875416626340717.post-3979618572538257581</id><published>2011-03-02T10:44:00.000+08:00</published><updated>2011-03-02T10:46:32.373+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><category scheme='http://www.blogger.com/atom/ns#' term='ssh'/><title type='text'>[引用]Linux 透過 SSH SOCKS 連線 來 使用 Firefox / Pidgin(MSN, GTalk..)</title><summary type='text'>文章來源

現在不少醫院都有無線網路, 但是使用後, 體驗被限制只有開 80, 443 Port 的感覺. 
但是我在這邊最少要待三天, 陪產(n天) + 生產完(3~7天), 至少要讓 SSH、MSN 能通才行. 
 註1: 於 Ubuntu Linux, Windows 可以利用 Putty 來達成. 
註2: 此篇重點 sudo ssh -D 80 user@example.com -p 443
註3: 在醫院連國外網站(ex: YouTube 被擋掉的話),透過自己的 Server 當 Proxy 會快很多. XD 
 基礎環境 首先, 要先找好朋友, 幫忙弄台 Server, 讓 ssh port 加開 80 或 443 Port. (沒有這個, 後續就不用玩了. XD) 
vim /etc/ssh/sshd_config  Port 22 # 於這下面加上下述即可.
Port</summary><link rel='replies' type='application/atom+xml' href='http://calos-tw.blogspot.com/feeds/3979618572538257581/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5758875416626340717&amp;postID=3979618572538257581&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/3979618572538257581'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/3979618572538257581'/><link rel='alternate' type='text/html' href='http://calos-tw.blogspot.com/2011/03/linux-ssh-socks-firefox-pidginmsn-gtalk.html' title='[引用]Linux 透過 SSH SOCKS 連線 來 使用 Firefox / Pidgin(MSN, GTalk..)'/><author><name>千江有水千江月</name><uri>http://www.blogger.com/profile/09457834533843066844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5758875416626340717.post-1366606153839948366</id><published>2011-03-01T12:15:00.000+08:00</published><updated>2011-03-01T12:15:26.847+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='HipHop'/><title type='text'>Facebook性能大提升的秘密：HipHop</title><summary type='text'>Facebook神秘的PHP項目HipHop for PHP終於揭開面紗。 這個項目由一個PHP到C++的轉換程序，一個重新實現的PHP運行庫，和許多常用PHP擴展的重寫版本構成，目的是旨在加速和優化PHP。用 Facebook官方博客 （無法直接訪問）上項目負責人趙海平（北大1987屆遺傳與分子生物專業，普林斯頓計算機科學博士）的話說，HipHop項目對Facebook影響巨大。 它目前已經支撐了Facebook 90%的Web流量。 由於HipHop，Facebook Web服務器上的CPU使用平均減少了50%，從而大大減少了服務器的需求。 為了讓這一改進也惠及社區，他們決定將之開源，希望能夠進一步幫助提高更多大型複雜PHP網站的可伸縮性。
PHP和Facebook的問題眾所周知，Facebook的前端主要是用PHP寫的。趙海平說，過去六年Facebook從PHP語言的進展上獲益良多</summary><link rel='replies' type='application/atom+xml' href='http://calos-tw.blogspot.com/feeds/1366606153839948366/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5758875416626340717&amp;postID=1366606153839948366&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/1366606153839948366'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/1366606153839948366'/><link rel='alternate' type='text/html' href='http://calos-tw.blogspot.com/2011/02/facebookhiphop.html' title='Facebook性能大提升的秘密：HipHop'/><author><name>千江有水千江月</name><uri>http://www.blogger.com/profile/09457834533843066844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5758875416626340717.post-4841331678019350598</id><published>2011-03-01T12:06:00.000+08:00</published><updated>2011-03-01T12:10:32.485+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='php'/><category scheme='http://www.blogger.com/atom/ns#' term='readbeanphp'/><title type='text'>ReadBeanPHP</title><summary type='text'>RedBeanPHP 是一種直接透過程式去管理資料庫的一個函數, 不得不對他的使用方法感到新奇.


//引用

require("rb.php");


//設定, 預設 sqllite
R::setup();  


SQLite platform independent
R::setup("sqlite:database.txt"); 


//MySQL 設定
R::setup("mysql:host=localhost;dbname=oodb",$user,$pass);


//PostgreSQL設定
 R::setup("pgsql:host=localhost dbname=oodb",$user,$pass);



整合 Codeigniter </summary><link rel='replies' type='application/atom+xml' href='http://calos-tw.blogspot.com/feeds/4841331678019350598/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5758875416626340717&amp;postID=4841331678019350598&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/4841331678019350598'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/4841331678019350598'/><link rel='alternate' type='text/html' href='http://calos-tw.blogspot.com/2011/02/readbeanphp.html' title='ReadBeanPHP'/><author><name>千江有水千江月</name><uri>http://www.blogger.com/profile/09457834533843066844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5758875416626340717.post-7094997051952620505</id><published>2011-02-24T12:16:00.000+08:00</published><updated>2011-03-04T18:47:07.749+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><category scheme='http://www.blogger.com/atom/ns#' term='ssh'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>SSH 遠端登入免密碼 by RSA</title><summary type='text'>$ ssh-keygen -t rsa 再client 端產生密鑰 .  持續enter 一直按就可以產生.
  另外 若是打這樣 連後面 enter 都不用按 ssh-keygen -t rsa -P '' 
# id_rsa.pub = public key.
# id_rsa = private key.
$ cat .ssh/id_rsa.pub | ssh user@Server "cat - &gt;&gt; .ssh/authorized_keys"
# user= 登入user 帳號
# Server = Domain name or IP address.


參考來源: http://jonny.ubuntu-tw.net/2010/06/ssh-by-rsa.html</summary><link rel='replies' type='application/atom+xml' href='http://calos-tw.blogspot.com/feeds/7094997051952620505/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5758875416626340717&amp;postID=7094997051952620505&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/7094997051952620505'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/7094997051952620505'/><link rel='alternate' type='text/html' href='http://calos-tw.blogspot.com/2011/02/ssh-by-rsa.html' title='SSH 遠端登入免密碼 by RSA'/><author><name>千江有水千江月</name><uri>http://www.blogger.com/profile/09457834533843066844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5758875416626340717.post-2982660885795205733</id><published>2011-02-23T10:49:00.000+08:00</published><updated>2011-02-23T10:49:44.006+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>[引用]Ubuntu Linux 挑選最佳的 Mirror Site</title><summary type='text'>來源
最近 tw.archive.ubuntu.com 經常連不上, 所以先暫時把這個換掉. (於 "更新管理員" 看到 "上次更新套件資訊是 7天前"...)

要換掉 tw.archive.ubuntu.com, 其他的 Mirror site list 在哪裡? 另外, 有那麼多的 Mirror site, 要如何挑選呢?

Ubuntu Linux 挑選最佳的 Mirror Site (Repository) 的步驟
cp /etc/apt/sources.list /etc/apt/sources.list.20110222 # 備份
Synaptic -&gt; 設定 -&gt; 套件庫 # 或直接 sudo /usr/bin/software-properties-gtk
軟體來源 -&gt; Tab 選 "Ubuntu 軟體"
找到 下載自 "用於 台灣 的伺服器" 這欄位, 點選下拉, </summary><link rel='replies' type='application/atom+xml' href='http://calos-tw.blogspot.com/feeds/2982660885795205733/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5758875416626340717&amp;postID=2982660885795205733&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/2982660885795205733'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/2982660885795205733'/><link rel='alternate' type='text/html' href='http://calos-tw.blogspot.com/2011/02/ubuntu-linux-mirror-site.html' title='[引用]Ubuntu Linux 挑選最佳的 Mirror Site'/><author><name>千江有水千江月</name><uri>http://www.blogger.com/profile/09457834533843066844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5758875416626340717.post-933710450910950131</id><published>2011-02-17T19:48:00.000+08:00</published><updated>2011-02-17T19:49:56.725+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='php'/><title type='text'>[PHP] 刪除路徑下所有檔案與目錄, 模擬 rm -rf</title><summary type='text'>當你php 無法執行 exec('rm -rf') 指令去刪除目錄下所有檔案與目錄時, 只好靠程式啦~ 

$log = '/home/logs/2011';
SureRemoveDir($log , true); // 第二個參數: true 連 2011 目錄也刪除
function SureRemoveDir($dir, $DeleteMe) {
if(!$dh = @opendir($dir)) return;
while (false !== ($obj = readdir($dh))) {
if($obj=='.' || $obj=='..') continue;
if (!@unlink($dir.'/'.$obj)) SureRemoveDir($dir.'/'.$obj, true);
}
if ($DeleteMe){
closedir($dh);
@rmdir($</summary><link rel='replies' type='application/atom+xml' href='http://calos-tw.blogspot.com/feeds/933710450910950131/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5758875416626340717&amp;postID=933710450910950131&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/933710450910950131'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/933710450910950131'/><link rel='alternate' type='text/html' href='http://calos-tw.blogspot.com/2011/02/php-rm-rf.html' title='[PHP] 刪除路徑下所有檔案與目錄, 模擬 rm -rf'/><author><name>千江有水千江月</name><uri>http://www.blogger.com/profile/09457834533843066844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5758875416626340717.post-1309884891022559946</id><published>2011-02-11T15:54:00.000+08:00</published><updated>2011-02-11T15:54:45.810+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='php'/><title type='text'>[引述]PHP程式使用 Windows Server AD 認證身份</title><summary type='text'>來源
Windows Server AD 說穿了就是一個 LADP 伺服器，可讓您將資訊儲存在目錄服務中，在資料庫中進行查詢，並可以使用他來作為身份的認證授權。

使用PHP撰寫程式難免會遇到需要作身份認證的問題，除了自行撰寫這部份程式的選擇外，PHP 的函式庫中亦提供了標準的 LDAP 函式，如果公司組織中已經有架設 Windows 2K/2003 網域的環境 ，將身份認證的工作交由 Windows AD 亦是一個不錯的選擇。

案例環境說明：
1.公司組織內有一個Windows 網域，名稱為： domain.com。
2.domain.com 的網域有兩部網域主控站(DC)分別為：dc.domain.com、dc2.domain.com。
3.PHP版本：5.1.4

PHP程式碼範例：
以下的程式範例為精簡版，帳號和密碼不可為空的


&lt;?php

$domain = '</summary><link rel='replies' type='application/atom+xml' href='http://calos-tw.blogspot.com/feeds/1309884891022559946/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5758875416626340717&amp;postID=1309884891022559946&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/1309884891022559946'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/1309884891022559946'/><link rel='alternate' type='text/html' href='http://calos-tw.blogspot.com/2011/02/php-windows-server-ad.html' title='[引述]PHP程式使用 Windows Server AD 認證身份'/><author><name>千江有水千江月</name><uri>http://www.blogger.com/profile/09457834533843066844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5758875416626340717.post-7931771497310566797</id><published>2011-02-10T14:45:00.000+08:00</published><updated>2011-02-10T14:48:39.173+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='網頁程式必備'/><title type='text'>網頁程式必備圖表CSS, Javascript, php, Mysql, Color,  mod_rewirte</title><summary type='text'>mod_rewrite
Color



JAVASCRIPT

MYSQL
PHP

HTML Character




</summary><link rel='replies' type='application/atom+xml' href='http://calos-tw.blogspot.com/feeds/7931771497310566797/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5758875416626340717&amp;postID=7931771497310566797&amp;isPopup=true' title='1 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/7931771497310566797'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/7931771497310566797'/><link rel='alternate' type='text/html' href='http://calos-tw.blogspot.com/2011/02/css-javascript-php-mysql-color.html' title='網頁程式必備圖表CSS, Javascript, php, Mysql, Color,  mod_rewirte'/><author><name>千江有水千江月</name><uri>http://www.blogger.com/profile/09457834533843066844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5758875416626340717.post-2312139535735182877</id><published>2011-01-28T16:26:00.000+08:00</published><updated>2011-01-28T16:26:40.107+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='php'/><category scheme='http://www.blogger.com/atom/ns#' term='pcntl_signal'/><title type='text'>[引用]PHP: pcntl_signal</title><summary type='text'>PHP: pcntl_signal - Manual
Note: Currently, this module will not function on non-Unix platforms (Windows). 
來源

&lt;?php
// tick use required as of PHP 4.3.0
declare(ticks = 1);

function sig_handler($signo)    // signal handler function
{
        switch ($signo)
        {
                case SIGTERM:   // handle shutdown tasks, kill, kill -15
                        print "SIGTERM\n";
</summary><link rel='replies' type='application/atom+xml' href='http://calos-tw.blogspot.com/feeds/2312139535735182877/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5758875416626340717&amp;postID=2312139535735182877&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/2312139535735182877'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/2312139535735182877'/><link rel='alternate' type='text/html' href='http://calos-tw.blogspot.com/2011/01/php-pcntlsignal.html' title='[引用]PHP: pcntl_signal'/><author><name>千江有水千江月</name><uri>http://www.blogger.com/profile/09457834533843066844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5758875416626340717.post-5914559394493590591</id><published>2011-01-25T15:33:00.000+08:00</published><updated>2011-01-25T15:35:37.749+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='php function'/><category scheme='http://www.blogger.com/atom/ns#' term='php'/><title type='text'>[PHP]讀取多筆 RSS feed</title><summary type='text'>來源網站

&lt;?php
//RSS源地址列表數組
$rssfeed = array("http://www.blog-dragon.com/feed",
"http://rss.sina.com.cn/news/allnews/sports.xml",
"http://ent.163.com/special/00031K7Q/rss_toutiao.xml",
"http://tech.163.com/special/00091JPQ/techimportant.xml");

//設置編碼為UTF-8
header('Content-Type:text/html;charset= UTF-8');

for($i=0;$i&lt;sizeof($rssfeed);$i++){//分解開始
$buff = "";
$rss_str="";
//打開rss地址，並讀取，讀取失敗則中止
$fp =</summary><link rel='replies' type='application/atom+xml' href='http://calos-tw.blogspot.com/feeds/5914559394493590591/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5758875416626340717&amp;postID=5914559394493590591&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/5914559394493590591'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/5914559394493590591'/><link rel='alternate' type='text/html' href='http://calos-tw.blogspot.com/2011/01/php-rss-feed.html' title='[PHP]讀取多筆 RSS feed'/><author><name>千江有水千江月</name><uri>http://www.blogger.com/profile/09457834533843066844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5758875416626340717.post-774604627768436408</id><published>2011-01-21T11:18:00.000+08:00</published><updated>2011-01-21T11:19:22.181+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='mangoDB'/><category scheme='http://www.blogger.com/atom/ns#' term='mysql'/><category scheme='http://www.blogger.com/atom/ns#' term='memcache'/><category scheme='http://www.blogger.com/atom/ns#' term='php'/><category scheme='http://www.blogger.com/atom/ns#' term='資安論壇'/><title type='text'>資安論壇：【資料庫 (Database、SQL) 安全討論版】</title><summary type='text'>
[研究][問題] Cassandra + PHP + thrift 安裝(Fedora 14 x86) 
[研究][問題] Cassandra + PHP + thrift 安裝(CentOS 5.5 x86) 
Twitter：為何棄用MySQL轉而使用NoSQL 
[問]專題走向，實際應用及需求技術。 
甲骨文終止MySQL對Windows 2000及IBM i平台支援 
[研究] Cassandra 0.7.0 Cluster 架設 (CentOS 5.5x86/Fedora 14x86)
[研究] Memcached 分散式的快取系統安裝 (CentOS 5.5 x86)
[研究] Memcached + PHP + MySQL 安裝 (CentOS 5.5 x86)
[研究] MongoDB 安裝 (CentOS 5.5 x86) 
[研究] Neo4j 1.2 NoSQL</summary><link rel='replies' type='application/atom+xml' href='http://calos-tw.blogspot.com/feeds/774604627768436408/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5758875416626340717&amp;postID=774604627768436408&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/774604627768436408'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/774604627768436408'/><link rel='alternate' type='text/html' href='http://calos-tw.blogspot.com/2011/01/databasesql.html' title='資安論壇：【資料庫 (Database、SQL) 安全討論版】'/><author><name>千江有水千江月</name><uri>http://www.blogger.com/profile/09457834533843066844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5758875416626340717.post-5731010029179660920</id><published>2011-01-18T18:46:00.002+08:00</published><updated>2011-06-23T10:25:35.952+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='xsd:dateTime'/><category scheme='http://www.blogger.com/atom/ns#' term='xml'/><category scheme='http://www.blogger.com/atom/ns#' term='php'/><title type='text'>[php] xsd:dateTime 格式轉換</title><summary type='text'>2011-01-18T16:00:00.000Z這什麼鬼格式啊~  
請參考這邊


$t = '2011-01-18T16:00:00.000Z';
echo date('Y-m-d H:i:s',&amp;nbsp; strtotime($t)+ 3600*8 )&amp;nbsp; ; // 台北+8小時
</summary><link rel='replies' type='application/atom+xml' href='http://calos-tw.blogspot.com/feeds/5731010029179660920/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5758875416626340717&amp;postID=5731010029179660920&amp;isPopup=true' title='2 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/5731010029179660920'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/5731010029179660920'/><link rel='alternate' type='text/html' href='http://calos-tw.blogspot.com/2011/01/php-xsddatetime.html' title='[php] xsd:dateTime 格式轉換'/><author><name>千江有水千江月</name><uri>http://www.blogger.com/profile/09457834533843066844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5758875416626340717.post-2114482840770774009</id><published>2011-01-18T15:40:00.000+08:00</published><updated>2011-01-18T15:42:50.791+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='preg_natch'/><category scheme='http://www.blogger.com/atom/ns#' term='php'/><title type='text'>preg_match 錯誤訊息.</title><summary type='text'>preg_match() [function.preg-match]: Unknown modifier '/' 
記起來, 不然爾而會耍一下白吃.

原因是: 
$a = 'http://xxx.xxx.xxx/xxx/'; 
$pattern = '|'.$a.'(\d+)|is';
preg_match( $pattern, $res, $m )

正確:變數要加 preg_quote 過濾變數. 

$pattern = '|' . preg_quote($a,'/') . '(\d+)|is';
preg_match( $pattern, $res, $m )</summary><link rel='replies' type='application/atom+xml' href='http://calos-tw.blogspot.com/feeds/2114482840770774009/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5758875416626340717&amp;postID=2114482840770774009&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/2114482840770774009'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/2114482840770774009'/><link rel='alternate' type='text/html' href='http://calos-tw.blogspot.com/2011/01/pregmatch.html' title='preg_match 錯誤訊息.'/><author><name>千江有水千江月</name><uri>http://www.blogger.com/profile/09457834533843066844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5758875416626340717.post-526645076192687701</id><published>2011-01-12T14:02:00.000+08:00</published><updated>2011-01-12T14:02:10.466+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='openfire'/><category scheme='http://www.blogger.com/atom/ns#' term='spark'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>ubuntu install spark command</title><summary type='text'>就下列三行指令
先下載 Spark2.5.8
$ tar -xzf spark_2_5_8.tar.gz
$ cd Spark
$ ./starter

記起來...</summary><link rel='replies' type='application/atom+xml' href='http://calos-tw.blogspot.com/feeds/526645076192687701/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5758875416626340717&amp;postID=526645076192687701&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/526645076192687701'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/526645076192687701'/><link rel='alternate' type='text/html' href='http://calos-tw.blogspot.com/2011/01/ubuntu-install-spark-command.html' title='ubuntu install spark command'/><author><name>千江有水千江月</name><uri>http://www.blogger.com/profile/09457834533843066844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5758875416626340717.post-7115587622393098701</id><published>2011-01-11T12:10:00.000+08:00</published><updated>2011-01-11T12:10:25.310+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='javascript function'/><title type='text'>捕捉xxs 攻擊.</title><summary type='text'>設置陷阱實時捕捉跨站測試者，搞跨站的人總習慣用alert來確認是否存在跨站，如果你要監控是否有人在測試你的網站xss的話，可以在你要監控的頁面裡hook alert函數，記錄alert調用情況

&lt;script type="text/javascript"&gt;
&lt;!--
function log(s) {
    var img = new Image();
    img.style.width = img.style.height = 0;
    img.src = "http://yousite.com/log.php?caller=" + encodeURIComponent(s);
}

var _alert = alert;
window.alert = function(s) {
    log(alert.caller);
    _alert(s);
}
//--&gt;
&lt;</summary><link rel='replies' type='application/atom+xml' href='http://calos-tw.blogspot.com/feeds/7115587622393098701/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5758875416626340717&amp;postID=7115587622393098701&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/7115587622393098701'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/7115587622393098701'/><link rel='alternate' type='text/html' href='http://calos-tw.blogspot.com/2011/01/xxs.html' title='捕捉xxs 攻擊.'/><author><name>千江有水千江月</name><uri>http://www.blogger.com/profile/09457834533843066844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5758875416626340717.post-9093799181176317317</id><published>2011-01-04T18:20:00.000+08:00</published><updated>2011-01-04T18:26:52.348+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='正規式'/><category scheme='http://www.blogger.com/atom/ns#' term='php'/><title type='text'>[php] 正規式 貪婪模式</title><summary type='text'>差一個 ? 結果截然不同.
preg_match('!&lt;OperationResultError&gt;(.*?)&lt;/OperationResultError&gt;!is',$str,$m);

$str =  '&lt;Errors&gt;
&lt;OperationResultError&gt;Validation error: Card.WorkProductName is empty or its content is incorrect.&lt;/OperationResultError&gt;&lt;OperationResultError&gt;Validation error: Defect.Name is empty or its content is incorrect.&lt;/OperationResultError&gt;&lt;/Errors&gt;'; 
preg_match('!&lt;OperationResultError&gt;(.*?)&lt;/</summary><link rel='replies' type='application/atom+xml' href='http://calos-tw.blogspot.com/feeds/9093799181176317317/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5758875416626340717&amp;postID=9093799181176317317&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/9093799181176317317'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/9093799181176317317'/><link rel='alternate' type='text/html' href='http://calos-tw.blogspot.com/2011/01/php_04.html' title='[php] 正規式 貪婪模式'/><author><name>千江有水千江月</name><uri>http://www.blogger.com/profile/09457834533843066844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5758875416626340717.post-6753697451048416566</id><published>2011-01-04T15:00:00.000+08:00</published><updated>2011-01-05T11:04:11.046+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='php function'/><title type='text'>[PHP]  上傳檔案過濾檔名特殊字元</title><summary type='text'>安全性考量 : 

function clean_file_name($filename)
{
$bad = array(
"&lt;!--",
"--&gt;",
"'",
"&lt;",
"&gt;",
'"',
'&amp;',
'$',
'=',
';',
'?',
'/',
"%20",
"%22",
"%3c",  // &lt;
"%253c",  // &lt;
"%3e",   // &gt;
"%0e",   // &gt;
"%28",   // (
"%29",   // )
"%2528",  // (
"%26",   // &amp;
"%24",   // $
"%3f",   // ?
"%3b",   // ;
"%3d"  // =
);

$filename = str_replace($bad, '', $filename);

return stripslashes($filename);
}
</summary><link rel='replies' type='application/atom+xml' href='http://calos-tw.blogspot.com/feeds/6753697451048416566/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5758875416626340717&amp;postID=6753697451048416566&amp;isPopup=true' title='2 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/6753697451048416566'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/6753697451048416566'/><link rel='alternate' type='text/html' href='http://calos-tw.blogspot.com/2011/01/php.html' title='[PHP]  上傳檔案過濾檔名特殊字元'/><author><name>千江有水千江月</name><uri>http://www.blogger.com/profile/09457834533843066844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5758875416626340717.post-1406847362775032799</id><published>2010-12-28T17:00:00.000+08:00</published><updated>2010-12-28T17:00:14.199+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='jquery 筆記'/><category scheme='http://www.blogger.com/atom/ns#' term='jquery'/><title type='text'>[jquery]Bind</title><summary type='text'>Bind 用法:
1.綁定並且alert()出, mouse x 與 y 的值

$(document).ready(function() {
  $('#foo').bind('click', function(event) {
    alert('The mouse cursor is at ('
      + event.pageX + ', ' + event.pageY + ')');
  });
});


2.還可以一次放入兩個event 去 toggleClass.

$('#foo').bind('mouseenter mouseleave', function() {
  $(this).toggleClass('entered');
});


3. jQuery 1.4 之後可以這樣用 

$('#foo').bind({
  click: function(</summary><link rel='replies' type='application/atom+xml' href='http://calos-tw.blogspot.com/feeds/1406847362775032799/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5758875416626340717&amp;postID=1406847362775032799&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/1406847362775032799'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/1406847362775032799'/><link rel='alternate' type='text/html' href='http://calos-tw.blogspot.com/2010/12/jquerybind.html' title='[jquery]Bind'/><author><name>千江有水千江月</name><uri>http://www.blogger.com/profile/09457834533843066844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5758875416626340717.post-7814948412990684697</id><published>2010-12-27T14:45:00.000+08:00</published><updated>2010-12-27T14:45:45.078+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ftp'/><category scheme='http://www.blogger.com/atom/ns#' term='filezilla'/><title type='text'>FTP傳輸一定要注意使用二進制模式！</title><summary type='text'>出處:

今天一個問題困擾了我一下午，剛剛才解決。我要上傳一個PHP程序，其中用了sqlite數據庫，沒想到上傳完以後無論如何也不能用，總是數據庫查詢失敗。我登錄上SSH，把幾乎每個php都調試了一遍，還是沒法解決。最終請來T.G.大牛幫助，才發現服務器上的sqlite數據庫與本地的 MD5值不一樣。於是我又用Filezilla吧數據庫上傳了一遍，沒想到的是，MD5值仍然和本地的文件不同。這時我突然想起了以前用gcc在 Windows下強制輸出\n而不是\r\n的窘境，於是把Filezilla的上傳模式從“自動選擇”改成了“二進制模式”，再次上傳，問題終於解決了。

FTP傳輸的兩種模式

1．ASCII傳輸方式：

假定用戶正在拷貝的文件包含的簡單ASCII碼文本，如果在遠程機器上運行的不是UNIX，當文件傳輸時ftp</summary><link rel='replies' type='application/atom+xml' href='http://calos-tw.blogspot.com/feeds/7814948412990684697/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5758875416626340717&amp;postID=7814948412990684697&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/7814948412990684697'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/7814948412990684697'/><link rel='alternate' type='text/html' href='http://calos-tw.blogspot.com/2010/12/ftp.html' title='FTP傳輸一定要注意使用二進制模式！'/><author><name>千江有水千江月</name><uri>http://www.blogger.com/profile/09457834533843066844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5758875416626340717.post-9050647973239436947</id><published>2010-12-15T11:01:00.000+08:00</published><updated>2010-12-15T11:01:41.154+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='facebook'/><title type='text'>[Facebook] OpenGraph 開發</title><summary type='text'>參考網站
Demo App

 
&lt;html xmlns:og="http://opengraphprotocol.org/schema/" xmlns:fb="http://www.facebook.com/2008/fbml"&gt;
  &lt;head&gt;
    &lt;title&gt;Jason's Lab&lt;/title&gt;
    &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt;
   &lt;meta property="og:title" content="Jason's Lab"/&gt;
    &lt;meta property="og:site_name" content="Jason's Lab"/&gt;
    &lt;meta property="fb:app_id" content="338288188206"/&gt;
</summary><link rel='replies' type='application/atom+xml' href='http://calos-tw.blogspot.com/feeds/9050647973239436947/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5758875416626340717&amp;postID=9050647973239436947&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/9050647973239436947'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/9050647973239436947'/><link rel='alternate' type='text/html' href='http://calos-tw.blogspot.com/2010/12/facebook-opengraph.html' title='[Facebook] OpenGraph 開發'/><author><name>千江有水千江月</name><uri>http://www.blogger.com/profile/09457834533843066844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5758875416626340717.post-7180763419250876564</id><published>2010-11-26T11:44:00.000+08:00</published><updated>2010-11-26T11:46:40.709+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='jquery'/><title type='text'>[jquery] 技巧</title><summary type='text'>triggerHandler-觸發handler

var refreshFrame = function() {
$('#frame').load('http://reddit.com');
};
$('.button').click(refreshFrame);
refreshFrame();

//可以改成;

$('.button').click(function() {
$('#frame').load('/page/frame.html');
}).triggerHandler('click');

// You can also use a shortcut
$('.button').click(function() {
$('#frame').load('/page/frame.html');
}).click();



Custom events - 客製化事件.

</summary><link rel='replies' type='application/atom+xml' href='http://calos-tw.blogspot.com/feeds/7180763419250876564/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5758875416626340717&amp;postID=7180763419250876564&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/7180763419250876564'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5758875416626340717/posts/default/7180763419250876564'/><link rel='alternate' type='text/html' href='http://calos-tw.blogspot.com/2010/11/jquery.html' title='[jquery] 技巧'/><author><name>千江有水千江月</name><uri>http://www.blogger.com/profile/09457834533843066844</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
