<?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-37462156</id><updated>2012-02-12T16:11:26.152+08:00</updated><category term='生活'/><category term='音樂'/><category term='computer graphics'/><category term='ironpython'/><category term='OSGi'/><category term='JAVA'/><category term='財務管理'/><category term='twisted'/><category term='python'/><category term='讀書心得'/><category term='English'/><category term='Travel'/><category term='Linux'/><category term='mac'/><category term='windows'/><category term='GAE'/><category term='ffmpeg'/><category term='django'/><category term='日劇'/><category term='C\C++'/><category term='Japanese'/><category term='運動'/><category term='OS'/><title type='text'>Georg's Life 佐治人生</title><subtitle type='html'>對於生活的態度，決定了你我的高度。
        Attitude decides your altitude.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://globlalala.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://globlalala.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>georg.</name><uri>http://www.blogger.com/profile/07768077195331360084</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='26' src='http://1.bp.blogspot.com/-HyKCaICVlaA/TvG9JQsMdfI/AAAAAAAAAKk/DwID366FYl4/s1600/268465_2278058554773_1348043792_2671804_1618138_n.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>87</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-37462156.post-5674219635045397167</id><published>2012-02-11T21:43:00.000+08:00</published><updated>2012-02-12T11:52:12.908+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C\C++'/><category scheme='http://www.blogger.com/atom/ns#' term='ffmpeg'/><category scheme='http://www.blogger.com/atom/ns#' term='讀書心得'/><title type='text'>[讀書心得] ffmpeg tutorial (二) Drawing images to screen</title><summary type='text'>這集介紹透過 ffmpeg 將 stream 轉為 Images 輸出, 採用的是 SDL (Simple Direct Layer).
  SDL 的簡單說明:
     (1) Simple DirectMedia Layer
     (2) written by c, but C++ compatible.
     (3) cross-platform (Linux, Windows, Windows CE, BeOS, MacOS, Mac OS X, FreeBSD, OpenBSD, BSD/OS, Solaris and QNX)
     (4) low level access to hardware device, ex. keyboard, audio, mose, joystick, 3D hardware(via OpenGL), 2D video </summary><link rel='replies' type='application/atom+xml' href='http://globlalala.blogspot.com/feeds/5674219635045397167/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://globlalala.blogspot.com/2012/02/ffmpeg-tutorial-drawing-images-to.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/5674219635045397167'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/5674219635045397167'/><link rel='alternate' type='text/html' href='http://globlalala.blogspot.com/2012/02/ffmpeg-tutorial-drawing-images-to.html' title='[讀書心得] ffmpeg tutorial (二) Drawing images to screen'/><author><name>georg.</name><uri>http://www.blogger.com/profile/07768077195331360084</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='26' src='http://1.bp.blogspot.com/-HyKCaICVlaA/TvG9JQsMdfI/AAAAAAAAAKk/DwID366FYl4/s1600/268465_2278058554773_1348043792_2671804_1618138_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37462156.post-7215480369797447911</id><published>2012-02-11T20:10:00.002+08:00</published><updated>2012-02-11T20:10:36.526+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Japanese'/><title type='text'>[Japanese] （轉）日文學習心得</title><summary type='text'>參考網址

1. 一天都別中斷，哪怕只有１０分鐘
2. 若是厭倦了，改用其他方式像是廣播、音樂
3. 隨時記下並背熟常用的套句
4. 盡可能心譯你接觸到的東西，像是廣告或話題
5. 抄錄、記憶句子跟慣用語要用第一人稱
6. 學外語好比攻碉堡，必須四面八方向它圍攻：報紙、廣播、電影、演講、課本、聊天等。
7. 敢說出口

日語學習順口溜 學習日語不能急，慢慢悠悠出才子，一天三詞一個句，一年就是一千詞，三年學會九百句，勝過大專沒問題。 學習日語不能聽，開口才能練真功，一詞讀上一百遍，一分鐘內可搞完，聽力憑的是機器，無法練成鐵嘴皮。 日語敬語特別難，日本人也很為難，何況我們異國人，拋在腦後先別問，抓住簡體練半年，再練敬語也不完。 語句子有特點，就像農民壘磚牆，句子主幹是單詞，助詞粘單詞的泥，初學不要講順序，能粘一起就表意。 動詞簡單有規律，變變詞尾就可以，自動他動分兩類，</summary><link rel='replies' type='application/atom+xml' href='http://globlalala.blogspot.com/feeds/7215480369797447911/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://globlalala.blogspot.com/2012/02/japanese.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/7215480369797447911'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/7215480369797447911'/><link rel='alternate' type='text/html' href='http://globlalala.blogspot.com/2012/02/japanese.html' title='[Japanese] （轉）日文學習心得'/><author><name>georg.</name><uri>http://www.blogger.com/profile/07768077195331360084</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='26' src='http://1.bp.blogspot.com/-HyKCaICVlaA/TvG9JQsMdfI/AAAAAAAAAKk/DwID366FYl4/s1600/268465_2278058554773_1348043792_2671804_1618138_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37462156.post-4182519394485992275</id><published>2012-02-09T09:54:00.001+08:00</published><updated>2012-02-11T21:58:08.382+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C\C++'/><category scheme='http://www.blogger.com/atom/ns#' term='ffmpeg'/><category scheme='http://www.blogger.com/atom/ns#' term='讀書心得'/><title type='text'>[讀書心得] ffmpeg tutorial (一) Making Screencaps</title><summary type='text'>Media files 種類分成 music, image, video.

每個 file 自身又稱為 container, 各自的格式如下：

  -music container : AIFF(mac), WAV(windows), XMF(extensible music format), etc.

  -image container : TIFF, FITS, etc.

  -video container : 3GP, AVI, ASF, Matroska, Quick Time, MPEG, MP4, RM, etc.





container type 決定了 儲存於 file 的資訊(這不廢話...)

container 由 streams (audio/video) 所構成, 每個 stream又可以分成數個 frames.

其中 streams 被各種</summary><link rel='replies' type='application/atom+xml' href='http://globlalala.blogspot.com/feeds/4182519394485992275/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://globlalala.blogspot.com/2012/02/ffmpeg-tutorial.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/4182519394485992275'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/4182519394485992275'/><link rel='alternate' type='text/html' href='http://globlalala.blogspot.com/2012/02/ffmpeg-tutorial.html' title='[讀書心得] ffmpeg tutorial (一) Making Screencaps'/><author><name>georg.</name><uri>http://www.blogger.com/profile/07768077195331360084</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='26' src='http://1.bp.blogspot.com/-HyKCaICVlaA/TvG9JQsMdfI/AAAAAAAAAKk/DwID366FYl4/s1600/268465_2278058554773_1348043792_2671804_1618138_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37462156.post-1164224088543927818</id><published>2012-02-05T18:19:00.000+08:00</published><updated>2012-02-05T18:19:44.363+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='windows'/><title type='text'>[windows] wamp 啟動錯誤（Aestan Tray Menu error）</title><summary type='text'>今天下午在裝WAMP時跳出一個錯誤視窗: "Aestan Tray Menu has stopped working" blah blah... 

網路找到一堆解法大致上是
(1) navigator 設定錯誤 (主要是IE6跟IE的路徑問題, 我把他改成chrome沒問題就不鳥他了)
(2) Port 80, 443被占用. 可以使用 command "netstat -ab" 檢查.
(3) 少裝了 VC++ redistributable. (從 stackoverflow 上得知)

本來還想說自己各別裝好了, 好在可以work.. lol
主要原因還是因為那台電腦作業系統重灌, 少了什麼我也不知道... windows環境就是這樣(茶...</summary><link rel='replies' type='application/atom+xml' href='http://globlalala.blogspot.com/feeds/1164224088543927818/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://globlalala.blogspot.com/2012/02/windows-wamp-aestan-tray-menu-error.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/1164224088543927818'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/1164224088543927818'/><link rel='alternate' type='text/html' href='http://globlalala.blogspot.com/2012/02/windows-wamp-aestan-tray-menu-error.html' title='[windows] wamp 啟動錯誤（Aestan Tray Menu error）'/><author><name>georg.</name><uri>http://www.blogger.com/profile/07768077195331360084</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='26' src='http://1.bp.blogspot.com/-HyKCaICVlaA/TvG9JQsMdfI/AAAAAAAAAKk/DwID366FYl4/s1600/268465_2278058554773_1348043792_2671804_1618138_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37462156.post-4607233093097826319</id><published>2012-02-04T15:54:00.000+08:00</published><updated>2012-02-04T18:57:16.924+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='django'/><category scheme='http://www.blogger.com/atom/ns#' term='python'/><title type='text'>[django] views</title><summary type='text'>Views:
    主要是針對webpage的部份,指的是各種不同類的view, ex. homepage, archive page 等等,
    大多是用來提供特定的functions或templates.

django裡透過 ROOT_URLCONF(settings.py) 設定URLConf.
For example,

MyApp/
    .__init__
    models.py
    urls.py
    views.py


(1) 設定 ROOT_URLCONF = 'MyApp.urls'
(2) 撰寫 urls.py, 增加欲提供服務的 urlpatterns
         urlpatterns = ( regular expression, python callback function [, optional dictionary] )</summary><link rel='replies' type='application/atom+xml' href='http://globlalala.blogspot.com/feeds/4607233093097826319/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://globlalala.blogspot.com/2012/02/django-views.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/4607233093097826319'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/4607233093097826319'/><link rel='alternate' type='text/html' href='http://globlalala.blogspot.com/2012/02/django-views.html' title='[django] views'/><author><name>georg.</name><uri>http://www.blogger.com/profile/07768077195331360084</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='26' src='http://1.bp.blogspot.com/-HyKCaICVlaA/TvG9JQsMdfI/AAAAAAAAAKk/DwID366FYl4/s1600/268465_2278058554773_1348043792_2671804_1618138_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37462156.post-6179096464783014266</id><published>2012-02-03T15:46:00.001+08:00</published><updated>2012-02-03T16:02:03.456+08:00</updated><title type='text'>test test test</title><summary type='text'>


</summary><link rel='replies' type='application/atom+xml' href='http://globlalala.blogspot.com/feeds/6179096464783014266/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://globlalala.blogspot.com/2012/02/test-test-test.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/6179096464783014266'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/6179096464783014266'/><link rel='alternate' type='text/html' href='http://globlalala.blogspot.com/2012/02/test-test-test.html' title='test test test'/><author><name>georg.</name><uri>http://www.blogger.com/profile/07768077195331360084</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='26' src='http://1.bp.blogspot.com/-HyKCaICVlaA/TvG9JQsMdfI/AAAAAAAAAKk/DwID366FYl4/s1600/268465_2278058554773_1348043792_2671804_1618138_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37462156.post-512016619920076124</id><published>2012-02-03T09:33:00.002+08:00</published><updated>2012-02-03T09:54:53.018+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='讀書心得'/><title type='text'>[QList] iApp, DLNA, Lua</title><summary type='text'>1. 寫iphone/ipad app不是只有 object-c, 原來也有提供其他語言的 SDK, 像是angry bird就是用Corona(Lua)寫的. 不過既然是SDK, 肯定就會有功能上的限制, 就看各自需求了.

2. Lua 是一種 script, 可以很容易被C/C++使用, 反之也可以使用C/C++函數. (這感覺是linux下我們寫c調用shell script的方式?! windows下寫.bat?! 不過它可以反過來用 c/c++涵式真是威猛! 有空瞧瞧)

3. 有空找個 iPhone JB試試.

4. iOS上作streaming還是脫離不開ffmpeg(茶...)  ffmepg4iphone 開源碼

5.  Oplayer 作者的blog

6. DLNA 似乎目前仍是移動終端多媒體共享的最佳解決方案.... 似乎家電大廠、網路通訊業、</summary><link rel='replies' type='application/atom+xml' href='http://globlalala.blogspot.com/feeds/512016619920076124/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://globlalala.blogspot.com/2012/02/news.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/512016619920076124'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/512016619920076124'/><link rel='alternate' type='text/html' href='http://globlalala.blogspot.com/2012/02/news.html' title='[QList] iApp, DLNA, Lua'/><author><name>georg.</name><uri>http://www.blogger.com/profile/07768077195331360084</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='26' src='http://1.bp.blogspot.com/-HyKCaICVlaA/TvG9JQsMdfI/AAAAAAAAAKk/DwID366FYl4/s1600/268465_2278058554773_1348043792_2671804_1618138_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37462156.post-171149134856847970</id><published>2012-01-16T10:52:00.002+08:00</published><updated>2012-01-16T10:52:23.461+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><title type='text'>[Linux] .bashrc vs .bash_profile</title><summary type='text'>.bashrc: profile for non-login shells
ex. use terminal

.bash_profile: profile for login shells
 ex. use local console, ssh

most people create .bash_profile the way as the below:
(1)
if [-f ~/.bashrc];
then
source ~/.bashrc
fi

(2)
or create a symbolic link to ~/.bashrc
</summary><link rel='replies' type='application/atom+xml' href='http://globlalala.blogspot.com/feeds/171149134856847970/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://globlalala.blogspot.com/2012/01/linux-bashrc-vs-bashprofile.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/171149134856847970'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/171149134856847970'/><link rel='alternate' type='text/html' href='http://globlalala.blogspot.com/2012/01/linux-bashrc-vs-bashprofile.html' title='[Linux] .bashrc vs .bash_profile'/><author><name>georg.</name><uri>http://www.blogger.com/profile/07768077195331360084</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='26' src='http://1.bp.blogspot.com/-HyKCaICVlaA/TvG9JQsMdfI/AAAAAAAAAKk/DwID366FYl4/s1600/268465_2278058554773_1348043792_2671804_1618138_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37462156.post-202569745536914356</id><published>2012-01-16T07:42:00.000+08:00</published><updated>2012-01-16T07:42:33.397+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='生活'/><title type='text'>[生活] Entrepreneur 必須學會的九個特質</title><summary type='text'>從 Techchrunch 讀到的, 覺得講的不錯, 紀錄一下...

1. Failure 
    我想這是要說 to risk failure, 要有不害怕失敗的勇氣.

2. Prophetic
    我覺得這句話很棒: I thought it is only a matter of time until home viewing is as easy and economical as
desirable. 對未來有所規劃的話, 一切都只是按部就班而已.

3. Flexible
     當然啦, 規劃是隨時間而做調整的... every entrepreneur recognize mistake quickly and transition their business accordingly. ( The catch-phrase is that the </summary><link rel='replies' type='application/atom+xml' href='http://globlalala.blogspot.com/feeds/202569745536914356/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://globlalala.blogspot.com/2012/01/entrepreneur.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/202569745536914356'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/202569745536914356'/><link rel='alternate' type='text/html' href='http://globlalala.blogspot.com/2012/01/entrepreneur.html' title='[生活] Entrepreneur 必須學會的九個特質'/><author><name>georg.</name><uri>http://www.blogger.com/profile/07768077195331360084</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='26' src='http://1.bp.blogspot.com/-HyKCaICVlaA/TvG9JQsMdfI/AAAAAAAAAKk/DwID366FYl4/s1600/268465_2278058554773_1348043792_2671804_1618138_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37462156.post-2004973082322318730</id><published>2012-01-14T11:52:00.002+08:00</published><updated>2012-01-14T11:52:21.857+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='OS'/><title type='text'>[OS]Strong reference/Weak reference</title><summary type='text'>剛在看 iphone manual 看到 strong pointer / weak pointer 這部分, 應該就是指GC處理時常見字眼: strong reference / weak reference, 這裡複習一下.

每個object都會有個 counter 來紀錄它被reference幾次, 然後GC根據counter決定是否回收記憶體.
counter 有三種值: Null, 0, P(&gt;0)
當 counter = P, strong reference
當 counter = null, GC 已回收
當 counter = 0, weak reference
一般疑問是為為什麼需要weak reference?  這篇說得很詳細{.net記憶體管理之弱參考}
簡言之就是希望物件在被GC回收前, 給他機會轉為 strong reference, 而不是馬上領便當.
</summary><link rel='replies' type='application/atom+xml' href='http://globlalala.blogspot.com/feeds/2004973082322318730/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://globlalala.blogspot.com/2012/01/osstrong-referenceweak-reference.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/2004973082322318730'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/2004973082322318730'/><link rel='alternate' type='text/html' href='http://globlalala.blogspot.com/2012/01/osstrong-referenceweak-reference.html' title='[OS]Strong reference/Weak reference'/><author><name>georg.</name><uri>http://www.blogger.com/profile/07768077195331360084</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='26' src='http://1.bp.blogspot.com/-HyKCaICVlaA/TvG9JQsMdfI/AAAAAAAAAKk/DwID366FYl4/s1600/268465_2278058554773_1348043792_2671804_1618138_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37462156.post-3287865529666682839</id><published>2012-01-04T19:35:00.000+08:00</published><updated>2012-01-04T19:35:56.794+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Travel'/><title type='text'>[Travel] 馬六甲二日遊</title><summary type='text'>
名稱  Self-guided Travel in Melaka
時間  12/31-01/01
地點  Melaka, Malaysia
內容  待補</summary><link rel='replies' type='application/atom+xml' href='http://globlalala.blogspot.com/feeds/3287865529666682839/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://globlalala.blogspot.com/2012/01/travel_04.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/3287865529666682839'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/3287865529666682839'/><link rel='alternate' type='text/html' href='http://globlalala.blogspot.com/2012/01/travel_04.html' title='[Travel] 馬六甲二日遊'/><author><name>georg.</name><uri>http://www.blogger.com/profile/07768077195331360084</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='26' src='http://1.bp.blogspot.com/-HyKCaICVlaA/TvG9JQsMdfI/AAAAAAAAAKk/DwID366FYl4/s1600/268465_2278058554773_1348043792_2671804_1618138_n.jpg'/></author><thr:total>0</thr:total><georss:featurename>Melaka, Malaysia</georss:featurename><georss:point>2.205685 102.256155</georss:point><georss:box>2.07875 102.09822650000001 2.33262 102.4140835</georss:box></entry><entry><id>tag:blogger.com,1999:blog-37462156.post-3943547593243144770</id><published>2012-01-04T19:33:00.002+08:00</published><updated>2012-01-04T19:33:47.478+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Travel'/><title type='text'>[Travel] 泰國六天自助</title><summary type='text'>名稱  Self-guided Travel in Bangkok
時間  12/22-12/26
地點  Bangkok, Thailand
內容  待補
</summary><link rel='replies' type='application/atom+xml' href='http://globlalala.blogspot.com/feeds/3943547593243144770/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://globlalala.blogspot.com/2012/01/travel.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/3943547593243144770'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/3943547593243144770'/><link rel='alternate' type='text/html' href='http://globlalala.blogspot.com/2012/01/travel.html' title='[Travel] 泰國六天自助'/><author><name>georg.</name><uri>http://www.blogger.com/profile/07768077195331360084</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='26' src='http://1.bp.blogspot.com/-HyKCaICVlaA/TvG9JQsMdfI/AAAAAAAAAKk/DwID366FYl4/s1600/268465_2278058554773_1348043792_2671804_1618138_n.jpg'/></author><thr:total>0</thr:total><georss:featurename>Thailand</georss:featurename><georss:point>15.870032 100.992541</georss:point><georss:box>7.771245 90.885119 23.968819 111.099963</georss:box></entry><entry><id>tag:blogger.com,1999:blog-37462156.post-8821805989279255087</id><published>2011-12-18T20:29:00.002+08:00</published><updated>2011-12-18T20:33:19.710+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Japanese'/><title type='text'>[JP] 大塚愛-ユメクイ</title><summary type='text'>大塚愛( おおつか　あい)－是在看Tokyo Friend時知道她，這部片也才５集，內容其實都忘光了（應該是在講對於追求夢想的二三事 lol），可對於裡面大塚愛唱的兩首歌印象深刻－除了フランズ外就是ユメクイ啦。

ユメクイ食夢膜 

僕は今夢旅の中                             (我正在夢的旅途中)

あの星の島までも飛んでゆてる     (就算那個星之島也能飛的到)

手のりウタうたう僕のユメクイ         (手上的歌、我的食夢膜)

キミのそばにもタトリつける             (也能到妳的身邊)

最初に描いた夢を思い出せなく      (最初描繪的夢想想不出)

なったのは大人になったから          (之後是在成為大人之後)

右か左かでいつまでも迷って          (向左？向右？一直迷網著)

太陽が反転するまでしゃべりこんだ</summary><link rel='replies' type='application/atom+xml' href='http://globlalala.blogspot.com/feeds/8821805989279255087/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://globlalala.blogspot.com/2011/12/jp.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/8821805989279255087'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/8821805989279255087'/><link rel='alternate' type='text/html' href='http://globlalala.blogspot.com/2011/12/jp.html' title='[JP] 大塚愛-ユメクイ'/><author><name>georg.</name><uri>http://www.blogger.com/profile/07768077195331360084</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='26' src='http://1.bp.blogspot.com/-HyKCaICVlaA/TvG9JQsMdfI/AAAAAAAAAKk/DwID366FYl4/s1600/268465_2278058554773_1348043792_2671804_1618138_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37462156.post-6644802934318360131</id><published>2011-12-18T19:36:00.000+08:00</published><updated>2011-12-18T19:47:11.826+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='生活'/><title type='text'>[服飾] 烏節路心得</title><summary type='text'>前陣子大概是因為christmas要來了，打算到時候特價大買特買，所以花好多時間在了解市面上的品牌還有他的價位。其實逛街挺累的，但有新的發現、特別是買到滿意的式樣就是很爽。

來紀錄一下常見的品牌（依一般價格區分）

(1)CottonOn, Giordano, Hang Ten, NET, Denizen, Uniqlo

(2)Muji, G2000, GAP, Zara, H&amp;M

(3)Levis, Wrangler, Timberland, A&amp;F, Desigual

(4)Guess, Superdry, Banana Republic, Lacoste

(5)Nudie, Paul Smith, Diesel, TOD's, Armani, R&amp;F, Tommy Hilfiger,  Brooks brothers, CK, G-Star raw, Hermes

</summary><link rel='replies' type='application/atom+xml' href='http://globlalala.blogspot.com/feeds/6644802934318360131/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://globlalala.blogspot.com/2011/12/blog-post.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/6644802934318360131'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/6644802934318360131'/><link rel='alternate' type='text/html' href='http://globlalala.blogspot.com/2011/12/blog-post.html' title='[服飾] 烏節路心得'/><author><name>georg.</name><uri>http://www.blogger.com/profile/07768077195331360084</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='26' src='http://1.bp.blogspot.com/-HyKCaICVlaA/TvG9JQsMdfI/AAAAAAAAAKk/DwID366FYl4/s1600/268465_2278058554773_1348043792_2671804_1618138_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37462156.post-8723088105429309152</id><published>2011-12-09T16:56:00.001+08:00</published><updated>2011-12-18T14:42:36.554+08:00</updated><title type='text'>[python] pymongo</title><summary type='text'>紀錄一下閱讀pymongodb manual

What is MongoDB:
   1. a single service
        =&gt; 其實跟MySQL一樣: CONNECT, DEAL, CLOSE.
   2. collections-based, not table-based
        =&gt; JSON格式, 可以任意插入資料, 不用照TABLE來區分.
   3. less schema

        =&gt; 這裡不太懂，不過我想應該是指若要修改每一筆資料，要增加或刪除某個資料型態，直接做就好了。

   4. No need  to learn other language
=&gt; 其實之前寫的RDB語法早忘光光了，但在MongoDB我只要告訴它部份資料，它就會回傳有該資料型態的collections
   5. well-supported in PHP
</summary><link rel='replies' type='application/atom+xml' href='http://globlalala.blogspot.com/feeds/8723088105429309152/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://globlalala.blogspot.com/2011/12/python-pymongo.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/8723088105429309152'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/8723088105429309152'/><link rel='alternate' type='text/html' href='http://globlalala.blogspot.com/2011/12/python-pymongo.html' title='[python] pymongo'/><author><name>georg.</name><uri>http://www.blogger.com/profile/07768077195331360084</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='26' src='http://1.bp.blogspot.com/-HyKCaICVlaA/TvG9JQsMdfI/AAAAAAAAAKk/DwID366FYl4/s1600/268465_2278058554773_1348043792_2671804_1618138_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37462156.post-2487521710696130259</id><published>2011-12-05T12:31:00.001+08:00</published><updated>2011-12-05T13:51:54.117+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><category scheme='http://www.blogger.com/atom/ns#' term='python'/><title type='text'>[Linux]Django + lighty 安裝</title><summary type='text'>紀錄一下安裝流程
(0) Python 2.6
      flup (python library for fastCGI)
(1) Lighttpd
  # apt-get install lighttpd
(2) Django
  # wget xxx
  # python setup.py install
(3) 修改lighttpd.config
  # vi /etc/lighttpd/lighttpd.conf
       (a)增加 mod_fastcgi (順序要在mod_access, mod_rewrite之後, mod_accesslog之前)
       (b)修改預設路徑  server.document-root  "/home/xxx"
       (c)指定fastcgi.server的處理方式



fastcgi.server = ( "/</summary><link rel='replies' type='application/atom+xml' href='http://globlalala.blogspot.com/feeds/2487521710696130259/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://globlalala.blogspot.com/2011/12/linuxdjango-lighty.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/2487521710696130259'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/2487521710696130259'/><link rel='alternate' type='text/html' href='http://globlalala.blogspot.com/2011/12/linuxdjango-lighty.html' title='[Linux]Django + lighty 安裝'/><author><name>georg.</name><uri>http://www.blogger.com/profile/07768077195331360084</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='26' src='http://1.bp.blogspot.com/-HyKCaICVlaA/TvG9JQsMdfI/AAAAAAAAAKk/DwID366FYl4/s1600/268465_2278058554773_1348043792_2671804_1618138_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37462156.post-4852121628852593168</id><published>2011-12-03T16:54:00.001+08:00</published><updated>2011-12-03T17:32:51.576+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><category scheme='http://www.blogger.com/atom/ns#' term='mac'/><title type='text'>[Linux] User/Group management in Debian</title><summary type='text'>之前才為弄懂管理Mac User/Group遮騰了個晚上, Linux亦然 =..=

先紀錄一下在Mac上找到的方式: 使用 command dscl

ex.dscl . list /Groupsdscl . create /Users/$myNamedscl . create /Users/$myName UniqueID XXXdscl . create /Users/$myName PrimaryGroupID YYYdscl . create /Users/$myName NFSHomeDirectory /Local/Users/$myNamedscl . passwd $myName  IMPWDmkdir /Local/Users/$myNamedscl . append /Groups/MYG GroupMembership $myNamechown $myName:</summary><link rel='replies' type='application/atom+xml' href='http://globlalala.blogspot.com/feeds/4852121628852593168/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://globlalala.blogspot.com/2011/12/linux-usergroup-management-in-debian.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/4852121628852593168'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/4852121628852593168'/><link rel='alternate' type='text/html' href='http://globlalala.blogspot.com/2011/12/linux-usergroup-management-in-debian.html' title='[Linux] User/Group management in Debian'/><author><name>georg.</name><uri>http://www.blogger.com/profile/07768077195331360084</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='26' src='http://1.bp.blogspot.com/-HyKCaICVlaA/TvG9JQsMdfI/AAAAAAAAAKk/DwID366FYl4/s1600/268465_2278058554773_1348043792_2671804_1618138_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37462156.post-5042994517864542872</id><published>2011-12-03T11:30:00.001+08:00</published><updated>2011-12-03T15:28:12.692+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><title type='text'>[Linux] Server比較</title><summary type='text'>想到一般opensource使用的server有apache, lighttpd跟nginx, 可要比較卻不知道有哪些該注意的, 這邊紀錄一下.
(市面上常用的web servers)

1. Apache是process-based, nginx跟lighttpd是event-based.
   差別: asynchronous
   event-based優勢: less memory used, scalability
2. 一般web server擁有的feature:
   2.1 Static file serving
   2.2 SSL/TLS support
   2.3 Virtual hosts
   2.4 Reverse proxying
   2.5 Load balancing
   2.6 Compression
   2.7 Access </summary><link rel='replies' type='application/atom+xml' href='http://globlalala.blogspot.com/feeds/5042994517864542872/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://globlalala.blogspot.com/2011/12/linux-server.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/5042994517864542872'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/5042994517864542872'/><link rel='alternate' type='text/html' href='http://globlalala.blogspot.com/2011/12/linux-server.html' title='[Linux] Server比較'/><author><name>georg.</name><uri>http://www.blogger.com/profile/07768077195331360084</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='26' src='http://1.bp.blogspot.com/-HyKCaICVlaA/TvG9JQsMdfI/AAAAAAAAAKk/DwID366FYl4/s1600/268465_2278058554773_1348043792_2671804_1618138_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37462156.post-2148195564648290573</id><published>2011-11-26T19:49:00.001+08:00</published><updated>2011-11-27T09:30:28.967+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><title type='text'>[Linux] sshd 無法啟動 &amp; 權限</title><summary type='text'>Version: Linux debian 2.6.26-2-686  i686 GNU/Linux



[Question] 在將Debian網路設定為Bridge mode, ping成功後發現ssh都沒起來, 執行 
/etc/init.d/ssh start 顯示 "Starting OpenBSD Secure Shell server: sshd /var/run/sshd must be owned by root and not group or world-writable" 錯誤.

[Answer] google後說是/var/run/sshd 這個 folder的問題, 於是刪除後重新執行 /etc/init.d/ssh start 就可以了. 不過我檢查了刪除前後的folder屬性發現都一樣, 無法執行真是詭異... Orz...





[Question</summary><link rel='replies' type='application/atom+xml' href='http://globlalala.blogspot.com/feeds/2148195564648290573/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://globlalala.blogspot.com/2011/11/linux-sshd.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/2148195564648290573'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/2148195564648290573'/><link rel='alternate' type='text/html' href='http://globlalala.blogspot.com/2011/11/linux-sshd.html' title='[Linux] sshd 無法啟動 &amp; 權限'/><author><name>georg.</name><uri>http://www.blogger.com/profile/07768077195331360084</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='26' src='http://1.bp.blogspot.com/-HyKCaICVlaA/TvG9JQsMdfI/AAAAAAAAAKk/DwID366FYl4/s1600/268465_2278058554773_1348043792_2671804_1618138_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37462156.post-4609401437191285690</id><published>2011-11-26T14:06:00.001+08:00</published><updated>2011-11-27T10:01:15.704+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='English'/><title type='text'>[Eng]Vocabulary</title><summary type='text'>1. end up
2. hand out flyers
3. that's brutal. That's pretty harsh.
4. panic attack
5. toll free number = free number for companies or service


Jamaica
    is the 3rd largest island in Caribbean, tropical with hot and humid weather, and owns numerous ecosystems. Due to being located in the hurricane belt of Atlantic ocean, it sometimes confronts storm damage.
There are about 2.7 million </summary><link rel='replies' type='application/atom+xml' href='http://globlalala.blogspot.com/feeds/4609401437191285690/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://globlalala.blogspot.com/2011/11/engvocabulary.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/4609401437191285690'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/4609401437191285690'/><link rel='alternate' type='text/html' href='http://globlalala.blogspot.com/2011/11/engvocabulary.html' title='[Eng]Vocabulary'/><author><name>georg.</name><uri>http://www.blogger.com/profile/07768077195331360084</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='26' src='http://1.bp.blogspot.com/-HyKCaICVlaA/TvG9JQsMdfI/AAAAAAAAAKk/DwID366FYl4/s1600/268465_2278058554773_1348043792_2671804_1618138_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37462156.post-690934802833140647</id><published>2011-11-18T21:29:00.001+08:00</published><updated>2011-11-18T22:01:38.988+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='GAE'/><title type='text'>[GAE] 判別使用者使用哪個裝置連線</title><summary type='text'>其實一開始的問題只是想知道client IP, webapp2 API找了老半天沒有, 結果是在更底層的webOb (TMD...)

Anyway, 剛好手邊有iphone, ipad, imac 跟 asus nb, 就來紀錄一下各自的 User-Agent...
Apple的browser都是 safari, asus我用IE, Chrome, FF

Safari:
    iphone(iOS5) - Mozilla/5.0 (iPhone; CPU iPhone OS 5_0_1 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Version/5.1 Mobile/9A405 Safari/7534.48.3
    ipad(iOS5) - Mozilla/5.0 (iPad; CPU iPhone OS 5_0_</summary><link rel='replies' type='application/atom+xml' href='http://globlalala.blogspot.com/feeds/690934802833140647/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://globlalala.blogspot.com/2011/11/gae.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/690934802833140647'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/690934802833140647'/><link rel='alternate' type='text/html' href='http://globlalala.blogspot.com/2011/11/gae.html' title='[GAE] 判別使用者使用哪個裝置連線'/><author><name>georg.</name><uri>http://www.blogger.com/profile/07768077195331360084</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='26' src='http://1.bp.blogspot.com/-HyKCaICVlaA/TvG9JQsMdfI/AAAAAAAAAKk/DwID366FYl4/s1600/268465_2278058554773_1348043792_2671804_1618138_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37462156.post-6222247932075253644</id><published>2011-11-17T18:02:00.001+08:00</published><updated>2011-11-17T21:58:03.085+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='GAE'/><title type='text'>[GAE] 使用 webapp2 發生 Server Error</title><summary type='text'>Event: 改用webapp2時發生Server Error
Reason:
   webapp2 在 appspot 僅提供 python27 runtime使用.
Correction:
   In app.yaml,
      runtime: python27

Reference:
 連結一

另外, python27 runtime 不允許 threadsafe的選項?! 不知道為什麼...紀錄一下, 有空再追。</summary><link rel='replies' type='application/atom+xml' href='http://globlalala.blogspot.com/feeds/6222247932075253644/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://globlalala.blogspot.com/2011/11/gae-webapp2-server-error.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/6222247932075253644'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/6222247932075253644'/><link rel='alternate' type='text/html' href='http://globlalala.blogspot.com/2011/11/gae-webapp2-server-error.html' title='[GAE] 使用 webapp2 發生 Server Error'/><author><name>georg.</name><uri>http://www.blogger.com/profile/07768077195331360084</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='26' src='http://1.bp.blogspot.com/-HyKCaICVlaA/TvG9JQsMdfI/AAAAAAAAAKk/DwID366FYl4/s1600/268465_2278058554773_1348043792_2671804_1618138_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37462156.post-8337229578586907665</id><published>2011-10-03T13:32:00.001+08:00</published><updated>2011-10-03T13:32:18.517+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='財務管理'/><title type='text'>[財務] cross listing</title><summary type='text'>Cross-listing, dual-listing, 直接跨境上市
 A company's securities are listed on more than one exchange for the purpose of adding liquidity to shares and allowing investors greater choice in where they can trade their shares.

一間上市公司在多於一個交易所掛牌買賣，稱為雙重上市或雙邊上市，其主要原因是想增加股份的交投量，以及更易於集資。</summary><link rel='replies' type='application/atom+xml' href='http://globlalala.blogspot.com/feeds/8337229578586907665/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://globlalala.blogspot.com/2011/10/cross-listing.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/8337229578586907665'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/8337229578586907665'/><link rel='alternate' type='text/html' href='http://globlalala.blogspot.com/2011/10/cross-listing.html' title='[財務] cross listing'/><author><name>georg.</name><uri>http://www.blogger.com/profile/07768077195331360084</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='26' src='http://1.bp.blogspot.com/-HyKCaICVlaA/TvG9JQsMdfI/AAAAAAAAAKk/DwID366FYl4/s1600/268465_2278058554773_1348043792_2671804_1618138_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37462156.post-3241561956793170200</id><published>2011-09-22T09:26:00.002+08:00</published><updated>2011-09-22T09:27:05.301+08:00</updated><title type='text'>English Learning</title><summary type='text'>Bilingual
  It means the ability to use two languages with equal or nearly equal fluency. Why is it gradually important to today's corporate world? That might be China. With China cementing its status as an economic powerhouse, it has become more crucial than ever to be able to communicate effectively in both English and Chinese languages.
  Now some schools in the Asia are preparing intakes to </summary><link rel='replies' type='application/atom+xml' href='http://globlalala.blogspot.com/feeds/3241561956793170200/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://globlalala.blogspot.com/2011/09/english-learning.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/3241561956793170200'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/3241561956793170200'/><link rel='alternate' type='text/html' href='http://globlalala.blogspot.com/2011/09/english-learning.html' title='English Learning'/><author><name>georg.</name><uri>http://www.blogger.com/profile/07768077195331360084</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='26' src='http://1.bp.blogspot.com/-HyKCaICVlaA/TvG9JQsMdfI/AAAAAAAAAKk/DwID366FYl4/s1600/268465_2278058554773_1348043792_2671804_1618138_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37462156.post-8850500030292738352</id><published>2011-09-20T17:24:00.000+08:00</published><updated>2011-09-20T17:24:54.146+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='mac'/><title type='text'>[mac]設定root帳號 跟 設定path環境變數</title><summary type='text'>IOS Version 10.6.8 

(1) Enable Root Account
設定主要參考這篇
System preference -&gt; accounts -&gt; click Login Options -&gt; unlock -&gt; click Join -&gt; click Open Directory Utility -&gt; unlock -&gt; Edit -&gt; Enable Root User

(2) 設定 path 環境變數
一般我們都是用 export, 但每次開啟都要重設定很麻煩
在 MAC, 編輯 ~/.bash_profile 
ex. 設定python path



1PATH="${PATH}:/path/to/some/cool/package/:/path/to/another/cool/package/"




2export PATH




3




</summary><link rel='replies' type='application/atom+xml' href='http://globlalala.blogspot.com/feeds/8850500030292738352/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://globlalala.blogspot.com/2011/09/macroot-path.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/8850500030292738352'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/8850500030292738352'/><link rel='alternate' type='text/html' href='http://globlalala.blogspot.com/2011/09/macroot-path.html' title='[mac]設定root帳號 跟 設定path環境變數'/><author><name>georg.</name><uri>http://www.blogger.com/profile/07768077195331360084</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='26' src='http://1.bp.blogspot.com/-HyKCaICVlaA/TvG9JQsMdfI/AAAAAAAAAKk/DwID366FYl4/s1600/268465_2278058554773_1348043792_2671804_1618138_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37462156.post-1496898201515023820</id><published>2011-07-17T02:20:00.000+08:00</published><updated>2011-07-17T02:20:44.447+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='生活'/><title type='text'>[生活] murmur</title><summary type='text'>又好一陣子沒上來寫東西了, 也不知道在忙什麼 Orz
除了趕DLNA交付外就是在準備VISA需要的文件跟念日文英文, 
一個人有太多興趣實在不是什麼好事情, 因為努力的方向過於分散,導致各項目標累積起來的成就有限.
ANYWAY還是會朝著與網路相關的領域前進吧, 不管是工作還是研究方向, 畢竟這是吃飯的傢伙.</summary><link rel='replies' type='application/atom+xml' href='http://globlalala.blogspot.com/feeds/1496898201515023820/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://globlalala.blogspot.com/2011/07/murmur.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/1496898201515023820'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/1496898201515023820'/><link rel='alternate' type='text/html' href='http://globlalala.blogspot.com/2011/07/murmur.html' title='[生活] murmur'/><author><name>georg.</name><uri>http://www.blogger.com/profile/07768077195331360084</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='26' src='http://1.bp.blogspot.com/-HyKCaICVlaA/TvG9JQsMdfI/AAAAAAAAAKk/DwID366FYl4/s1600/268465_2278058554773_1348043792_2671804_1618138_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37462156.post-6805485775115501802</id><published>2011-06-24T11:17:00.000+08:00</published><updated>2011-06-24T11:17:36.323+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C\C++'/><title type='text'>[C] 關於static variable的宣告</title><summary type='text'>static variable跟一般variable的宣告方式, 差別是在程式執行開始到結束之前都存在記憶體中.

(1)當static variable為Local variable時:
void myFunc(int n)
{
  static int num = 0;
  num += n;
}
=&gt; num在宣告為static後, 儘管離開myFunc()後仍會一直存在, 而且每次執行myFunc會進行num的累加(而不是從0開始)

(2)當static variable為global variable時:
當在a.c中宣告 static int num = 0後, num只能被a.c這個檔案所引用, 而不能被其他.c或.h檔使用(即無法在其他檔案中宣告extern int num;)
(NOTE)若在.h檔中宣告int num; 表示每個引用的.c檔會發生錯誤(</summary><link rel='replies' type='application/atom+xml' href='http://globlalala.blogspot.com/feeds/6805485775115501802/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://globlalala.blogspot.com/2011/06/c-static-variable.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/6805485775115501802'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/6805485775115501802'/><link rel='alternate' type='text/html' href='http://globlalala.blogspot.com/2011/06/c-static-variable.html' title='[C] 關於static variable的宣告'/><author><name>georg.</name><uri>http://www.blogger.com/profile/07768077195331360084</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='26' src='http://1.bp.blogspot.com/-HyKCaICVlaA/TvG9JQsMdfI/AAAAAAAAAKk/DwID366FYl4/s1600/268465_2278058554773_1348043792_2671804_1618138_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37462156.post-3864869713457833974</id><published>2011-06-19T14:18:00.000+08:00</published><updated>2011-06-19T14:18:21.699+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C\C++'/><title type='text'>[c] 涵式的指標參數</title><summary type='text'>平常寫一個指標參數都很直覺得寫, 今天想到一個有趣的記法, 在這裡筆記一下..

最基本的是我們要傳 reference of variable時:
1: int a;
2: rewrite(&amp;a);
3: void rewrite(int *a);
若忘記參數要怎宣告, 想到一個很有趣的記法就是, 由右往左推:
a. 在2時傳入a的位址, 勢必以 *a型態記錄
b. 而參考1, a是type int, 所以宣告 int.
=&gt; "int *a"

ex.
1: char *str=NULL;
2: rename(&amp;str);
3: void rename(char **str2);
str是個pointer, 存一個type char的address
在rename()中傳入一個address -&gt; *str
又str是一個char * -&gt; char**str

&amp;str == </summary><link rel='replies' type='application/atom+xml' href='http://globlalala.blogspot.com/feeds/3864869713457833974/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://globlalala.blogspot.com/2011/06/c.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/3864869713457833974'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/3864869713457833974'/><link rel='alternate' type='text/html' href='http://globlalala.blogspot.com/2011/06/c.html' title='[c] 涵式的指標參數'/><author><name>georg.</name><uri>http://www.blogger.com/profile/07768077195331360084</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='26' src='http://1.bp.blogspot.com/-HyKCaICVlaA/TvG9JQsMdfI/AAAAAAAAAKk/DwID366FYl4/s1600/268465_2278058554773_1348043792_2671804_1618138_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37462156.post-6767710844835855906</id><published>2011-04-23T21:42:00.003+08:00</published><updated>2011-04-23T21:44:26.389+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='日劇'/><title type='text'>[日劇] BOSS</title><summary type='text'>

BOSS, 2009春季日劇, 是由天海祐希、戶田惠梨香跟主野內豐主演的刑事犯罪類.
據說已經出到第二部, 目前PPS看到是EP2了, 可我還在看第一部xD
可能以前看木村的戲太多, 覺得天海的演技真的超像木村的, 不過這是誇讚她!!!
天海在BOSS裡頭真的是帥氣又有個性, 嚴肅又不失幽默, 是為證明自己的能力會一股腦地去衝刺的人!
也符合日劇一貫熱血的風格, 但這部沒有太多人生大道理, 情節一下緊張一下搞笑, 真的是大推!!!

哈, 其實看這部時都特別注意到劇中科學檢驗局做那些聲音、影像辨識的技術, 真是神乎其技!(但真的有那麼強嗎?)
加上天海的犯罪心理分析犯人心理, 讓我想到Lie to me的Lightman 與 Mr. Brain的九十九龍介
(雖然九九很誇張根本是天才型), 但這樣的劇情實在是深得我心 =..=

看著我都想在去翻翻之前念的心理學的書, </summary><link rel='replies' type='application/atom+xml' href='http://globlalala.blogspot.com/feeds/6767710844835855906/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://globlalala.blogspot.com/2011/04/boss.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/6767710844835855906'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/6767710844835855906'/><link rel='alternate' type='text/html' href='http://globlalala.blogspot.com/2011/04/boss.html' title='[日劇] BOSS'/><author><name>georg.</name><uri>http://www.blogger.com/profile/07768077195331360084</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='26' src='http://1.bp.blogspot.com/-HyKCaICVlaA/TvG9JQsMdfI/AAAAAAAAAKk/DwID366FYl4/s1600/268465_2278058554773_1348043792_2671804_1618138_n.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://img.youtube.com/vi/uSfWAMaFuSc/default.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37462156.post-3405472590345607448</id><published>2011-04-22T00:50:00.000+08:00</published><updated>2011-04-22T00:50:51.416+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://globlalala.blogspot.com/feeds/3405472590345607448/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://globlalala.blogspot.com/2011/04/blog-post_22.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/3405472590345607448'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/3405472590345607448'/><link rel='alternate' type='text/html' href='http://globlalala.blogspot.com/2011/04/blog-post_22.html' title='[運動] 健康檢查結果'/><author><name>georg.</name><uri>http://www.blogger.com/profile/07768077195331360084</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='26' src='http://1.bp.blogspot.com/-HyKCaICVlaA/TvG9JQsMdfI/AAAAAAAAAKk/DwID366FYl4/s1600/268465_2278058554773_1348043792_2671804_1618138_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37462156.post-8064564679565298847</id><published>2011-04-19T20:09:00.001+08:00</published><updated>2011-04-19T20:10:24.672+08:00</updated><title type='text'>google phone screen</title><summary type='text'>紀念一下!

前年曾經post過這個夢幻工作的requirement, 今天能有機會作phone interview, 不枉此生了 lol
距離上一段紀錄時間是1年半, 現在看看, 應該是也沒達到那些要求, 但我很努力回答問題了今天, 剩下的就交給上帝吧!
若說這次的心得是什麼, 應該是說我覺得g社的工程師腦袋都動的狠快, 果然優秀的人都在同一個高度; 
結果如何不應該是我現在要關心的, 繼續朝著夢想前進吧!!!</summary><link rel='replies' type='application/atom+xml' href='http://globlalala.blogspot.com/feeds/8064564679565298847/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://globlalala.blogspot.com/2011/04/google-phone-screen.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/8064564679565298847'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/8064564679565298847'/><link rel='alternate' type='text/html' href='http://globlalala.blogspot.com/2011/04/google-phone-screen.html' title='google phone screen'/><author><name>georg.</name><uri>http://www.blogger.com/profile/07768077195331360084</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='26' src='http://1.bp.blogspot.com/-HyKCaICVlaA/TvG9JQsMdfI/AAAAAAAAAKk/DwID366FYl4/s1600/268465_2278058554773_1348043792_2671804_1618138_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37462156.post-3585429777946827518</id><published>2011-04-16T19:00:00.004+08:00</published><updated>2011-04-16T19:02:08.335+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='運動'/><title type='text'>[運動]國軍體能循序漸進要求標準表</title><summary type='text'>
國軍體能循序漸進要求標準表 

 項目 2分鐘仰臥起坐 2分鐘俯地挺身 3000公尺跑步
 新兵結訓 25 25 19m
 入伍3個月內 30 30 18m30s
 入伍4個月內 35 35 17m
 入伍5個月內 38 38 16m
 入伍6個月內 40 45 15m
 入伍半年以上 43 51 14m
</summary><link rel='replies' type='application/atom+xml' href='http://globlalala.blogspot.com/feeds/3585429777946827518/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://globlalala.blogspot.com/2011/04/blog-post_16.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/3585429777946827518'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/3585429777946827518'/><link rel='alternate' type='text/html' href='http://globlalala.blogspot.com/2011/04/blog-post_16.html' title='[運動]國軍體能循序漸進要求標準表'/><author><name>georg.</name><uri>http://www.blogger.com/profile/07768077195331360084</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='26' src='http://1.bp.blogspot.com/-HyKCaICVlaA/TvG9JQsMdfI/AAAAAAAAAKk/DwID366FYl4/s1600/268465_2278058554773_1348043792_2671804_1618138_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37462156.post-6502614172141433794</id><published>2011-04-16T18:47:00.019+08:00</published><updated>2011-05-26T14:00:01.374+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='運動'/><title type='text'>[運動] 紀錄表</title><summary type='text'>
 日期 運動項目 運動地點 運動時間 附註
 05/26 慢跑 內湖高工 3000M/14圈  6P.M.
跑第五跑道
 05/10 慢跑 內湖高工 3000M/18m28s   6P.M.
跑第五跑道
 05/09 慢跑 內湖高工 3000M/23m20s   6P.M.
跑第五跑道
 05/02 慢跑 內湖高工 2800M/18m32s   6:00P.M.
跑第五跑道
 04/28 慢跑 內湖高工 3000M/18m52s   6:00P.M.
跑第五跑道
 04/26 慢跑 內湖高工 3000M/19m22s   5:30P.M.
跑第四跑道
  仰臥起坐 家裡 35下/1m35s 
 04/24 慢跑 汐止運動公園 3200M/19m24s   8:30P.M.
跑第五跑道
 04/23 慢跑 汐止運動公園 3200M/21m30s   6P.M.
跑第五跑道
 04/20 </summary><link rel='replies' type='application/atom+xml' href='http://globlalala.blogspot.com/feeds/6502614172141433794/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://globlalala.blogspot.com/2011/04/blog-post.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/6502614172141433794'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/6502614172141433794'/><link rel='alternate' type='text/html' href='http://globlalala.blogspot.com/2011/04/blog-post.html' title='[運動] 紀錄表'/><author><name>georg.</name><uri>http://www.blogger.com/profile/07768077195331360084</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='26' src='http://1.bp.blogspot.com/-HyKCaICVlaA/TvG9JQsMdfI/AAAAAAAAAKk/DwID366FYl4/s1600/268465_2278058554773_1348043792_2671804_1618138_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37462156.post-3496401936131571952</id><published>2011-04-14T11:09:00.000+08:00</published><updated>2011-04-14T11:09:09.563+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JAVA'/><title type='text'>[JAVA] Maven 馬份</title><summary type='text'>Maven是一個基於POM的JAVA project automation/management tool. 透過POM可以針對JAVA Project進行build、log跟site(就是建立說明文件), 相當方便的一個玩意.(1)建立新的project    "mvn archetype:generate"    =&gt; 會以prompt方式要求輸入              archetype(採用哪個project template, 預設99),              version,              groupId(這個project是由哪個組織或公司建立, ex. arc.com.gg),              artifactId(即Project name),              package(就是Java package).     * 下</summary><link rel='replies' type='application/atom+xml' href='http://globlalala.blogspot.com/feeds/3496401936131571952/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://globlalala.blogspot.com/2011/04/java-maven.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/3496401936131571952'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/3496401936131571952'/><link rel='alternate' type='text/html' href='http://globlalala.blogspot.com/2011/04/java-maven.html' title='[JAVA] Maven 馬份'/><author><name>georg.</name><uri>http://www.blogger.com/profile/07768077195331360084</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='26' src='http://1.bp.blogspot.com/-HyKCaICVlaA/TvG9JQsMdfI/AAAAAAAAAKk/DwID366FYl4/s1600/268465_2278058554773_1348043792_2671804_1618138_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37462156.post-3653895808586245290</id><published>2011-04-13T18:38:00.001+08:00</published><updated>2011-04-13T23:30:42.574+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JAVA'/><title type='text'>[JAVA] maven, bnd note</title><summary type='text'>1. maven 作出 executable jar. 參考 CLASSPATH設定
2. ONE-JAR 的文章參考: 網址1</summary><link rel='replies' type='application/atom+xml' href='http://globlalala.blogspot.com/feeds/3653895808586245290/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://globlalala.blogspot.com/2011/04/java-maven-bnd-note.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/3653895808586245290'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/3653895808586245290'/><link rel='alternate' type='text/html' href='http://globlalala.blogspot.com/2011/04/java-maven-bnd-note.html' title='[JAVA] maven, bnd note'/><author><name>georg.</name><uri>http://www.blogger.com/profile/07768077195331360084</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='26' src='http://1.bp.blogspot.com/-HyKCaICVlaA/TvG9JQsMdfI/AAAAAAAAAKk/DwID366FYl4/s1600/268465_2278058554773_1348043792_2671804_1618138_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37462156.post-250380998161705003</id><published>2011-04-08T15:53:00.001+08:00</published><updated>2011-04-08T16:10:24.772+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JAVA'/><title type='text'>[JAVA] SecurityManager</title><summary type='text'>SecurityManager
  # import java.lang.SecurityManager;
SecurityManger允許app實做各自的security policy, 用來做access control check.
當然JVM本身也有實做自己的SecurityManger, 在執行前調用checkPermission()確認是否有執行請求的操作權限(ex. File, Socket, Net, Runtime, Property, AWT, Reflect跟Serializable), 不過一般都不會invoke它.
invoke JVM SM的方式有兩種:
   (1)在CLI下加上  "-Djava.security.manager", 安裝built-in default SM.
           ex. java -</summary><link rel='replies' type='application/atom+xml' href='http://globlalala.blogspot.com/feeds/250380998161705003/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://globlalala.blogspot.com/2011/04/java-securitymanager.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/250380998161705003'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/250380998161705003'/><link rel='alternate' type='text/html' href='http://globlalala.blogspot.com/2011/04/java-securitymanager.html' title='[JAVA] SecurityManager'/><author><name>georg.</name><uri>http://www.blogger.com/profile/07768077195331360084</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='26' src='http://1.bp.blogspot.com/-HyKCaICVlaA/TvG9JQsMdfI/AAAAAAAAAKk/DwID366FYl4/s1600/268465_2278058554773_1348043792_2671804_1618138_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37462156.post-3242573436899728877</id><published>2011-04-07T15:19:00.001+08:00</published><updated>2011-04-07T15:21:57.969+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JAVA'/><title type='text'>[JAVA] Reflect 練習</title><summary type='text'>查詢JVM的class支援哪些Methods的方法

import java.lang.reflect.Method;public class ClassCase {
 public void testClass(String name){
  try{
   Method[] ms = Class.forName(name).getDeclaredMethods();
   
   for(Method m:ms){
    System.out.println("Method:... " +m.getName());
   }
  }
  catch (Exception ex){
   ex.printStackTrace();
  }
 }
 
 public static void main(String[] args){
  //(Class.forName("</summary><link rel='replies' type='application/atom+xml' href='http://globlalala.blogspot.com/feeds/3242573436899728877/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://globlalala.blogspot.com/2011/04/java-reflect.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/3242573436899728877'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/3242573436899728877'/><link rel='alternate' type='text/html' href='http://globlalala.blogspot.com/2011/04/java-reflect.html' title='[JAVA] Reflect 練習'/><author><name>georg.</name><uri>http://www.blogger.com/profile/07768077195331360084</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='26' src='http://1.bp.blogspot.com/-HyKCaICVlaA/TvG9JQsMdfI/AAAAAAAAAKk/DwID366FYl4/s1600/268465_2278058554773_1348043792_2671804_1618138_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37462156.post-1770935157426378847</id><published>2011-03-30T15:46:00.006+08:00</published><updated>2011-03-30T15:48:21.271+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JAVA'/><title type='text'>[JAVA] ECJ</title><summary type='text'>Eclipse ecj (主要針對3.2 3.3兩個版本) - eclipse compiler for java

這是一個Eclipse內置的java compiler, 屬於JDT(Java Development tools) Core pure Batch compiler, 可以單獨下載使用.
How to use:
Version Check
gg@debian$ export JAVAC=/path/to/javavm -jar /path/to/ecj.jar
gg@debian$ $JAVAC -version
Eclipse Java Compiler 0.671, 3.2.0 release, Copyright IBM Corp 2000, 2006. All rights reserved.

Compile
gg@debian$ $JAVAC </summary><link rel='replies' type='application/atom+xml' href='http://globlalala.blogspot.com/feeds/1770935157426378847/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://globlalala.blogspot.com/2011/03/java-ecj.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/1770935157426378847'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/1770935157426378847'/><link rel='alternate' type='text/html' href='http://globlalala.blogspot.com/2011/03/java-ecj.html' title='[JAVA] ECJ'/><author><name>georg.</name><uri>http://www.blogger.com/profile/07768077195331360084</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='26' src='http://1.bp.blogspot.com/-HyKCaICVlaA/TvG9JQsMdfI/AAAAAAAAAKk/DwID366FYl4/s1600/268465_2278058554773_1348043792_2671804_1618138_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37462156.post-1647769793670298067</id><published>2011-03-29T23:37:00.006+08:00</published><updated>2011-03-29T23:45:41.665+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C\C++'/><title type='text'>[C]關於 ioctl 跟 ifreq</title><summary type='text'>ioctl() 是提供對device作input/output control的system call, 根據deivce的不同所實作的參數也不同, 但前兩個是固定的.
&lt;code&gt;int ioctl(int d, int request, ...)&lt;/code&gt;
主要有3個參數:
1. d: descriptor, 是透過open()某個device而得到的handle(linux稱descriptor而windows稱handle), 主要是描述該deivice的abstract indicator.
2. request: 根據不同的device提供的request也不同
ex. 
SIOCGIFADDRS - Gets the list of addresses associated with an interface.
SIOCGIFADDR  - gets an </summary><link rel='replies' type='application/atom+xml' href='http://globlalala.blogspot.com/feeds/1647769793670298067/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://globlalala.blogspot.com/2011/03/c-ioctl-ifreq.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/1647769793670298067'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/1647769793670298067'/><link rel='alternate' type='text/html' href='http://globlalala.blogspot.com/2011/03/c-ioctl-ifreq.html' title='[C]關於 ioctl 跟 ifreq'/><author><name>georg.</name><uri>http://www.blogger.com/profile/07768077195331360084</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='26' src='http://1.bp.blogspot.com/-HyKCaICVlaA/TvG9JQsMdfI/AAAAAAAAAKk/DwID366FYl4/s1600/268465_2278058554773_1348043792_2671804_1618138_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37462156.post-5853584083977438563</id><published>2011-03-28T15:38:00.002+08:00</published><updated>2011-03-28T15:38:59.999+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='OS'/><title type='text'>[OS] stack vs heap</title><summary type='text'>2008年10月7日星期二
Stack 及 Heap 基礎概念 作者: 蕭沖 qs.xiao@gmail.com 來源:http://aftcast.blogspot.com/這些天因為看到不少網友提到stack overflow的問題，於是想寫一篇簡單但確重要點的雜記。希望大家多多指教，也期待能對一些朋友有所幫助!1/ windows的flat 模式: 這題目要講起來可以很深，包含許多的組合語言的東西。但在此我只想說一個結果，就是因為windows是使用這樣的一個記憶體管理位址模式，所以使得每個 process都可以有私有的4G的「定址」能力，但因為windows當初要相容MIPS R4000 architecture，所以高位址的2G部份放的是kernel code，而我們的ap只能用低部份的2G，所以正確的來講，我們的程式能夠使用2G的定址能力。2/虛擬記憶體: 在80386</summary><link rel='replies' type='application/atom+xml' href='http://globlalala.blogspot.com/feeds/5853584083977438563/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://globlalala.blogspot.com/2011/03/os-stack-vs-heap.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/5853584083977438563'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/5853584083977438563'/><link rel='alternate' type='text/html' href='http://globlalala.blogspot.com/2011/03/os-stack-vs-heap.html' title='[OS] stack vs heap'/><author><name>georg.</name><uri>http://www.blogger.com/profile/07768077195331360084</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='26' src='http://1.bp.blogspot.com/-HyKCaICVlaA/TvG9JQsMdfI/AAAAAAAAAKk/DwID366FYl4/s1600/268465_2278058554773_1348043792_2671804_1618138_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37462156.post-410703030980181868</id><published>2011-03-25T00:02:00.001+08:00</published><updated>2011-03-25T00:04:23.764+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C\C++'/><title type='text'>[C] 一些data type</title><summary type='text'>今天在看一個源碼時對一個 data type "uintptr_t" 不了解, google之後發現原來他是有作用的, 來筆記一下.

從linux man page可以知道他的宣告是
typedef unsigned int unit16_t;
typedef uint16_t uintptr_t;
源自 
主要作用是為了再跨平台時, 程式碼可以保存不受破壞.
以下是在x86 debian下跑的結果
 printf("signed char:%d\n", sizeof(signed char));
printf("signed short:%d\n", sizeof(unsigned short));
printf("signed int:%d\n", sizeof(signed int));
printf("size_t:%d\n", sizeof(size_t));
printf(</summary><link rel='replies' type='application/atom+xml' href='http://globlalala.blogspot.com/feeds/410703030980181868/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://globlalala.blogspot.com/2011/03/c-data-type.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/410703030980181868'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/410703030980181868'/><link rel='alternate' type='text/html' href='http://globlalala.blogspot.com/2011/03/c-data-type.html' title='[C] 一些data type'/><author><name>georg.</name><uri>http://www.blogger.com/profile/07768077195331360084</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='26' src='http://1.bp.blogspot.com/-HyKCaICVlaA/TvG9JQsMdfI/AAAAAAAAAKk/DwID366FYl4/s1600/268465_2278058554773_1348043792_2671804_1618138_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37462156.post-8043567371635450377</id><published>2011-03-23T19:40:00.003+08:00</published><updated>2011-03-23T20:18:23.177+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='computer graphics'/><title type='text'>Computer graphics 筆記</title><summary type='text'>1. 在螢幕上, 將3D實體成現在2D的螢幕上. 簡言之, 即透過3D繪圖的演算法, 計算出投影(projection).
2. 對一個實景(scene)作 projection, 需要一些資訊, 並將這些資訊轉為數值作計算:
 $ 定義一個頂點(Vertex), 並與其他vertice組成一個mesh架構, 來描述整個scene.
 $ 每個Vertex具有許多屬性(attribute)
  * coordinate
  * normal
  * color
  * texture cordinate
 $ 由vertice間連結成的mesh, 主要有3種primitive: point, line, and triangle.
 $ 最後將這些primitives(geometric object)轉為RGB(pixels).3. 3D computer graphics</summary><link rel='replies' type='application/atom+xml' href='http://globlalala.blogspot.com/feeds/8043567371635450377/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://globlalala.blogspot.com/2011/03/computer-graphics.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/8043567371635450377'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/8043567371635450377'/><link rel='alternate' type='text/html' href='http://globlalala.blogspot.com/2011/03/computer-graphics.html' title='Computer graphics 筆記'/><author><name>georg.</name><uri>http://www.blogger.com/profile/07768077195331360084</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='26' src='http://1.bp.blogspot.com/-HyKCaICVlaA/TvG9JQsMdfI/AAAAAAAAAKk/DwID366FYl4/s1600/268465_2278058554773_1348043792_2671804_1618138_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37462156.post-3132514331178451289</id><published>2011-03-22T08:37:00.003+08:00</published><updated>2011-03-22T08:45:29.061+08:00</updated><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'>


嗯，趁著最近很有動力，要一鼓作氣!!!
我知道我想要的是什麼</summary><link rel='replies' type='application/atom+xml' href='http://globlalala.blogspot.com/feeds/3132514331178451289/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://globlalala.blogspot.com/2011/03/blog-post.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/3132514331178451289'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/3132514331178451289'/><link rel='alternate' type='text/html' href='http://globlalala.blogspot.com/2011/03/blog-post.html' title='[生活]最初的夢想'/><author><name>georg.</name><uri>http://www.blogger.com/profile/07768077195331360084</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='26' src='http://1.bp.blogspot.com/-HyKCaICVlaA/TvG9JQsMdfI/AAAAAAAAAKk/DwID366FYl4/s1600/268465_2278058554773_1348043792_2671804_1618138_n.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://img.youtube.com/vi/1XvpfIDnA9c/default.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37462156.post-1405588600969942167</id><published>2011-03-21T10:48:00.002+08:00</published><updated>2011-03-21T13:21:04.096+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C\C++'/><title type='text'>[C] 關於pointer與型態宣告</title><summary type='text'>複習一下pointer...

(1)pointer: 指標, 用來儲存資料物件的記憶體位址.
ex.
int var    = 8;
int *ptr   = &amp;var;
//儲存var位址的指標變數ptr(或說是指向變數var的指標ptr), 其var 為int type
int **pptr = &amp;ptr;   &lt;=&gt; int* (*pptr) = &amp;ptr; 
//儲存ptr位址的指標變數pptr, 其中ptr為int* type

(2)*VARIABLE_NAME 可以取出所指向的位址物件的數值.
ex.
printf("   *ptr=%d\n", *ptr); // 8
printf(" *pptr=%u\n", *pptr); // memory address of var
NOTICE 1: *pptr得到的是所存位址(即ptr的位址)的數值(ptr存的是var</summary><link rel='replies' type='application/atom+xml' href='http://globlalala.blogspot.com/feeds/1405588600969942167/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://globlalala.blogspot.com/2011/03/c-pointer.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/1405588600969942167'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/1405588600969942167'/><link rel='alternate' type='text/html' href='http://globlalala.blogspot.com/2011/03/c-pointer.html' title='[C] 關於pointer與型態宣告'/><author><name>georg.</name><uri>http://www.blogger.com/profile/07768077195331360084</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='26' src='http://1.bp.blogspot.com/-HyKCaICVlaA/TvG9JQsMdfI/AAAAAAAAAKk/DwID366FYl4/s1600/268465_2278058554773_1348043792_2671804_1618138_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37462156.post-2481175880050265078</id><published>2011-03-21T01:58:00.003+08:00</published><updated>2011-03-21T02:15:57.781+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C\C++'/><title type='text'>[C] numerical operation</title><summary type='text'>最近閒著，來複習一下數值運算...

Binary representation:
1 byte = 8 bits
可以表示 0~255 或 -128~127, 至於程式表示負數的方式, 是由硬體決定。
一般表示方式為:
a.用最高位的那個bit(the most significant bit, MSB)表示正負數
b.當MSB=0, 表示0~127, 當MSB=1, 則以2's complement看之.
ex. 00000011=3
10000001=01111111=-127 (作法: 從LSB開始,　第一個為1的bit不動,其餘的0-&gt;1, 1-&gt;0)
10000000=10000000=-128
11111111=00000001=  -1

Binary Logical Operator:
'~':
。補數運算子
。ex. ~(1001101) -&gt; 0110010
'&amp;'</summary><link rel='replies' type='application/atom+xml' href='http://globlalala.blogspot.com/feeds/2481175880050265078/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://globlalala.blogspot.com/2011/03/c-numerical-operation.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/2481175880050265078'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/2481175880050265078'/><link rel='alternate' type='text/html' href='http://globlalala.blogspot.com/2011/03/c-numerical-operation.html' title='[C] numerical operation'/><author><name>georg.</name><uri>http://www.blogger.com/profile/07768077195331360084</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='26' src='http://1.bp.blogspot.com/-HyKCaICVlaA/TvG9JQsMdfI/AAAAAAAAAKk/DwID366FYl4/s1600/268465_2278058554773_1348043792_2671804_1618138_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37462156.post-887640838711101216</id><published>2011-02-22T01:31:00.001+08:00</published><updated>2011-02-22T01:32:10.892+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C\C++'/><title type='text'>[C] 關於 shared library</title><summary type='text'>今晚來複習一下shared library的建置好了, 主要有三個步驟:
1)建立 object codes (.h跟.c檔)
2)建立 library
&gt;root#gcc -Wall -fPIC -c test.c
-Wall:顯示warning message
-fPIC:compile產生position independent code. *PIC大小寫有差異.
&gt;&gt; 產生 test.o 

&gt;root#gcc -shared -Wl,-soname,libtest.so.1 -o libtest.so.1.0 *.o
-shared:產生為shared object
-Wl:將參數傳給linker, 這裡的參數是 "-soname libtest.so.1". 需要注意的是逗號之間不可以留空白!!!
&gt;&gt; 產生 libtest.so.1.0 

3)建立 link (</summary><link rel='replies' type='application/atom+xml' href='http://globlalala.blogspot.com/feeds/887640838711101216/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://globlalala.blogspot.com/2011/02/c-shared-library.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/887640838711101216'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/887640838711101216'/><link rel='alternate' type='text/html' href='http://globlalala.blogspot.com/2011/02/c-shared-library.html' title='[C] 關於 shared library'/><author><name>georg.</name><uri>http://www.blogger.com/profile/07768077195331360084</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='26' src='http://1.bp.blogspot.com/-HyKCaICVlaA/TvG9JQsMdfI/AAAAAAAAAKk/DwID366FYl4/s1600/268465_2278058554773_1348043792_2671804_1618138_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37462156.post-7439218488279467876</id><published>2011-02-21T01:44:00.004+08:00</published><updated>2011-02-21T01:50:26.829+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='OSGi'/><title type='text'>[OSGi] 關於OSGi的啟動方式</title><summary type='text'>最近在研究OSGi這個框架，遇到一個疑問:OSGi在啟動服務的方式有哪些?
查了網路資料後，約可以分為三類:
1. 在啟動OSGi後，在console自行下install, start, stop bundles的指令.
ex. 
osgi &gt; install gg.sample
osgi &gt; start gg.sample
2. 在config.ini上，加上每個要安裝的bundles跟決定它們的狀態. 等OSGi重新啟動後，便會加入該bundles.
ex. 
osgi.bundle= ..., gg.sample@start
但上述兩者皆無法達到自動化的效果，加上當bundles要加很多的時後，這兩個方法就顯的很笨拙。

3. 另外加入一個bundle，繼承bundleActivator，然後統一控管bundle的啟動與否。 出處
不過一般我們對services的default </summary><link rel='replies' type='application/atom+xml' href='http://globlalala.blogspot.com/feeds/7439218488279467876/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://globlalala.blogspot.com/2011/02/osgi-osgidynamic-services.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/7439218488279467876'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/7439218488279467876'/><link rel='alternate' type='text/html' href='http://globlalala.blogspot.com/2011/02/osgi-osgidynamic-services.html' title='[OSGi] 關於OSGi的啟動方式'/><author><name>georg.</name><uri>http://www.blogger.com/profile/07768077195331360084</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='26' src='http://1.bp.blogspot.com/-HyKCaICVlaA/TvG9JQsMdfI/AAAAAAAAAKk/DwID366FYl4/s1600/268465_2278058554773_1348043792_2671804_1618138_n.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37462156.post-7434100213707113767</id><published>2011-02-02T12:35:00.000+08:00</published><updated>2011-02-02T12:35:07.192+08:00</updated><title type='text'>新年新希望</title><summary type='text'>距上次發文又過了兩個月, 專注力跟耐心明顯不足

要好好把握今年, 會是個決勝的一年, 要加油了</summary><link rel='replies' type='application/atom+xml' href='http://globlalala.blogspot.com/feeds/7434100213707113767/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://globlalala.blogspot.com/2011/02/blog-post.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/7434100213707113767'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/7434100213707113767'/><link rel='alternate' type='text/html' href='http://globlalala.blogspot.com/2011/02/blog-post.html' title='新年新希望'/><author><name>georg.</name><uri>http://www.blogger.com/profile/07768077195331360084</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='26' src='http://1.bp.blogspot.com/-HyKCaICVlaA/TvG9JQsMdfI/AAAAAAAAAKk/DwID366FYl4/s1600/268465_2278058554773_1348043792_2671804_1618138_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37462156.post-494295142742565030</id><published>2010-12-13T02:22:00.009+08:00</published><updated>2010-12-21T00:39:15.142+08:00</updated><title type='text'>三個月的工作心得</title><summary type='text'>似乎OJT真的是學習programming最好的方式 (像是我很久沒寫c了, 因為工作要求, 被逼著上路就只能硬幹, 現在雖說還是很嫩, 但至少練到目前trace open source時沒有閱讀障礙XD)，不過一些開發時的基礎認知我覺得還是很重要的，對一般工程師而言是common sense但我以前都不知道的事情，所以把他記錄下來。
1. 當開發或設計一個系統時, 技術主管關心的主要問題: 界面跟演算法.
開介面是為了作分工及釐清問題, 一方面是為了每個模組都可以獨力進行而不影響到別人的進度; 另一方面則是驗收時上頭僅需要根據介面實作與否確認這個程式可否正常運作(反正寫的人是真材實料還是賣柑的, 上面的也不會去care XD). 
演算法則是解決問題的方法.
==============================
下面練習兩個有趣的jQuery語法... 


$(</summary><link rel='replies' type='application/atom+xml' href='http://globlalala.blogspot.com/feeds/494295142742565030/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://globlalala.blogspot.com/2010/12/blog-post.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/494295142742565030'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/494295142742565030'/><link rel='alternate' type='text/html' href='http://globlalala.blogspot.com/2010/12/blog-post.html' title='三個月的工作心得'/><author><name>georg.</name><uri>http://www.blogger.com/profile/07768077195331360084</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='26' src='http://1.bp.blogspot.com/-HyKCaICVlaA/TvG9JQsMdfI/AAAAAAAAAKk/DwID366FYl4/s1600/268465_2278058554773_1348043792_2671804_1618138_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37462156.post-893624107449138140</id><published>2010-11-10T21:46:00.001+08:00</published><updated>2010-11-10T21:46:15.903+08:00</updated><title type='text'>Facebook API Testing</title><summary type='text'>  Allergies are annoying.   </summary><link rel='replies' type='application/atom+xml' href='http://globlalala.blogspot.com/feeds/893624107449138140/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://globlalala.blogspot.com/2010/11/facebook-api-testing.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/893624107449138140'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/893624107449138140'/><link rel='alternate' type='text/html' href='http://globlalala.blogspot.com/2010/11/facebook-api-testing.html' title='Facebook API Testing'/><author><name>georg.</name><uri>http://www.blogger.com/profile/07768077195331360084</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='26' src='http://1.bp.blogspot.com/-HyKCaICVlaA/TvG9JQsMdfI/AAAAAAAAAKk/DwID366FYl4/s1600/268465_2278058554773_1348043792_2671804_1618138_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37462156.post-834940150010002998</id><published>2010-10-02T12:56:00.002+08:00</published><updated>2010-10-02T12:57:23.728+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='English'/><title type='text'>Vocabulary &amp; Terms</title><summary type='text'>1. aerobics (a form of physical exercise, rhythmic aerobic exercise, music)
She generally does aerobics after she gets up.2,  tall tale (unusual or unbelievable story)
His 10 millions heritage is a tall tale. He is simply a  bachelor.3. burn off (get rid of)
The teacher has the boy to run around the gym to burn off his extra energy.4. anxiety (feelings of being worried)
Working out at the health </summary><link rel='replies' type='application/atom+xml' href='http://globlalala.blogspot.com/feeds/834940150010002998/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://globlalala.blogspot.com/2010/10/vocabulary-terms.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/834940150010002998'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/834940150010002998'/><link rel='alternate' type='text/html' href='http://globlalala.blogspot.com/2010/10/vocabulary-terms.html' title='Vocabulary &amp;amp; Terms'/><author><name>georg.</name><uri>http://www.blogger.com/profile/07768077195331360084</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='26' src='http://1.bp.blogspot.com/-HyKCaICVlaA/TvG9JQsMdfI/AAAAAAAAAKk/DwID366FYl4/s1600/268465_2278058554773_1348043792_2671804_1618138_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37462156.post-2383862104540358670</id><published>2010-10-02T12:30:00.000+08:00</published><updated>2010-10-02T12:31:29.681+08:00</updated><title type='text'>Tested article</title><summary type='text'>This post is from Windows Live Writer at 12:30 pm.  </summary><link rel='replies' type='application/atom+xml' href='http://globlalala.blogspot.com/feeds/2383862104540358670/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://globlalala.blogspot.com/2010/10/tested-article.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/2383862104540358670'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/2383862104540358670'/><link rel='alternate' type='text/html' href='http://globlalala.blogspot.com/2010/10/tested-article.html' title='Tested article'/><author><name>georg.</name><uri>http://www.blogger.com/profile/07768077195331360084</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='26' src='http://1.bp.blogspot.com/-HyKCaICVlaA/TvG9JQsMdfI/AAAAAAAAAKk/DwID366FYl4/s1600/268465_2278058554773_1348043792_2671804_1618138_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37462156.post-3269415430288599986</id><published>2010-10-02T12:16:00.001+08:00</published><updated>2010-10-02T12:16:54.410+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='生活'/><title type='text'>又冷掉一陣子的部落格</title><summary type='text'>其實也是都有在寫東西, 但都是在bbs上居多, 現在畢業了, 以後改成在這裡發表好了.

回想碩士班兩年念的其實不是很開心. 明明一個那麼有價值的軟體, 但大部分的時間都在跟上頭跟客戶溝通爭議, 而且在這裡存在顯著的不平等!(這就是社會的縮影吧...) 做到最後其實我也很灰心, 居然變得凡事得過且過、只想快點離開, 這不是我做事的態度阿...
唯一令人慶幸的事情, 就是認識實驗室的學長學弟們, 大家其實都很聰明也具實力, 希望大家以後都能有好的發展。

即將要開始人生第一份工作了, 找工作的這段期間其實很幸運, 只能說學歷幫了我很多, 在現在來看當初退學是個正確的選擇? 恩, 不論如何, 人都要不斷往前看, 把當下的事情做到好, 隨時都在準備等待機會...  落落長一堆也沒什麼用, 我清楚知道自己追求的是什麼便是拉。

就先這樣吧。</summary><link rel='replies' type='application/atom+xml' href='http://globlalala.blogspot.com/feeds/3269415430288599986/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://globlalala.blogspot.com/2010/10/blog-post.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/3269415430288599986'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/3269415430288599986'/><link rel='alternate' type='text/html' href='http://globlalala.blogspot.com/2010/10/blog-post.html' title='又冷掉一陣子的部落格'/><author><name>georg.</name><uri>http://www.blogger.com/profile/07768077195331360084</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='26' src='http://1.bp.blogspot.com/-HyKCaICVlaA/TvG9JQsMdfI/AAAAAAAAAKk/DwID366FYl4/s1600/268465_2278058554773_1348043792_2671804_1618138_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37462156.post-6101807065412623306</id><published>2010-04-11T09:42:00.001+08:00</published><updated>2010-04-11T09:50:00.058+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='讀書心得'/><title type='text'>[讀書心得] apple i系列不支援 adobe flash 的理由?!</title><summary type='text'>最近 iPad 出來馬上成為話題，
不過相較iPhone 的出世，iPad首賣銷售量僅只一半，但這不是我care的。

比較好奇的有兩個：1. iPad的市場跟價值在哪?  2. apple不支援adobe flash的理由何在?

先從第2項談起好了，從網路上蒐集的資訊可以歸納出3點:
0. 歷史因素：(但這點我認為影響不大啦，畢竟商場上沒有永遠的朋友與敵人)
1. OSX與Adobe Flash 間的支援性：
     apple:  Adobe 是間不知成長的保守公司，對於自家產品的不穩定及缺陷報告漠不關心
                  (ex.Apple向 Mac OS的Flash 發布的缺限報告有400多項, 但現今只修復25項 )
                 Adobe 的ASA(Adobe Software Activation) 機制在不考慮系統的保護機制下，</summary><link rel='replies' type='application/atom+xml' href='http://globlalala.blogspot.com/feeds/6101807065412623306/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://globlalala.blogspot.com/2010/04/apple-i-adobe-flash.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/6101807065412623306'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/6101807065412623306'/><link rel='alternate' type='text/html' href='http://globlalala.blogspot.com/2010/04/apple-i-adobe-flash.html' title='[讀書心得] apple i系列不支援 adobe flash 的理由?!'/><author><name>georg.</name><uri>http://www.blogger.com/profile/07768077195331360084</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='26' src='http://1.bp.blogspot.com/-HyKCaICVlaA/TvG9JQsMdfI/AAAAAAAAAKk/DwID366FYl4/s1600/268465_2278058554773_1348043792_2671804_1618138_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37462156.post-6398522700485131868</id><published>2010-04-08T01:17:00.001+08:00</published><updated>2010-04-08T01:18:31.663+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='讀書心得'/><title type='text'>[讀書心得] 程式之路</title><summary type='text'>關於寫程式這檔事，自己起初是為了個不服輸，寫到現在似乎是興趣?!
人家都說要當一個好的程式設計師至少要花1萬個小時或十年，這可真是慢慢磨。

今天大大推薦一篇文章 

【程式設計】十年自學程式設計
其中有幾點我想要記錄下來：

十年自學程式設計
　　研究學者（海斯、布盧姆）的研究說明，在許多領域，大約十年才能培養出專業技能
；包括下西洋棋、作曲、繪畫、鋼琴演奏、游泳、網球，及神經心理學和數學拓撲的研究
。似乎沒有真正的捷徑；即便是莫扎特在四歲就展露出音樂天才，在他寫出世界級的音樂
之前仍然用了超過十三年的時間。
　　再看另一種類型的代表，披頭四樂團，他們似乎是在１９６４年的艾德˙蘇利文劇場
表演，突然地成為熱門樂團首席。其實他們從１９５７年開始，就在利物浦、漢堡等地的
小型俱樂部表演了。雖然他們很早就顯現強大的吸引力，但他們具決定性的成功作品《胡
椒中士》也要到１９６７年才首次發行。</summary><link rel='replies' type='application/atom+xml' href='http://globlalala.blogspot.com/feeds/6398522700485131868/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://globlalala.blogspot.com/2010/04/blog-post.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/6398522700485131868'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/6398522700485131868'/><link rel='alternate' type='text/html' href='http://globlalala.blogspot.com/2010/04/blog-post.html' title='[讀書心得] 程式之路'/><author><name>georg.</name><uri>http://www.blogger.com/profile/07768077195331360084</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='26' src='http://1.bp.blogspot.com/-HyKCaICVlaA/TvG9JQsMdfI/AAAAAAAAAKk/DwID366FYl4/s1600/268465_2278058554773_1348043792_2671804_1618138_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37462156.post-1171553371157742467</id><published>2010-04-01T11:53:00.003+08:00</published><updated>2011-03-23T09:26:44.308+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='python'/><title type='text'>[python] 關於thread的timer</title><summary type='text'>寫MT實在很惱人，特別是讓threads定期做些事情時，一不小心就busy loop...

先前的做法都是使用os內建的sleep(),  但缺點是無法掌握程式結束的時間。前幾天偉任建議使用threading模組內建的Timer class看了做法後，它是使用Event()做為timer,  然後每次invoke一個新的thread去執行該function(其實BT源碼就是這樣做Timer了，只能說當時太弱，不懂期間的差異)

Results:
import threading
import thread
 
mutex = thread.allocate_lock()
def printm(msg):
    with mutex:
        print "[%s]" % threading.current_thread().name,"say:", msg
 
 
class</summary><link rel='replies' type='application/atom+xml' href='http://globlalala.blogspot.com/feeds/1171553371157742467/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://globlalala.blogspot.com/2010/04/python-threadtimer.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/1171553371157742467'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/1171553371157742467'/><link rel='alternate' type='text/html' href='http://globlalala.blogspot.com/2010/04/python-threadtimer.html' title='[python] 關於thread的timer'/><author><name>georg.</name><uri>http://www.blogger.com/profile/07768077195331360084</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='26' src='http://1.bp.blogspot.com/-HyKCaICVlaA/TvG9JQsMdfI/AAAAAAAAAKk/DwID366FYl4/s1600/268465_2278058554773_1348043792_2671804_1618138_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37462156.post-4357336415370802341</id><published>2010-03-01T19:22:00.002+08:00</published><updated>2011-03-23T09:27:27.672+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='python'/><title type='text'>[python] 隱藏 console</title><summary type='text'>python 要如何做到隱藏console
這個應該是屬於windows的問題吧
因為作業系統是xp 所以去找了 win32api and python相關
果然找到前人的解法


Python代码 import win32api, win32gui  
ct = win32api.GetConsoleTitle()  
hd = win32gui.FindWindow(0,ct)  
win32gui.ShowWindow(hd,0)  
很简单吧，就是获得console的handle，然后隐藏（0分别代表NULL和SW_HIDE）。启动还是用python.exe。

不過在啟動前還是得先去下載 pywin32api (我是用py26), 不然python無法找到這兩個module

唉呀越寫越上層的話，若上面的AP沒有提供解法，底層實做原理又不懂的話，是很惱人的...</summary><link rel='replies' type='application/atom+xml' href='http://globlalala.blogspot.com/feeds/4357336415370802341/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://globlalala.blogspot.com/2010/03/python-console.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/4357336415370802341'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/4357336415370802341'/><link rel='alternate' type='text/html' href='http://globlalala.blogspot.com/2010/03/python-console.html' title='[python] 隱藏 console'/><author><name>georg.</name><uri>http://www.blogger.com/profile/07768077195331360084</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='26' src='http://1.bp.blogspot.com/-HyKCaICVlaA/TvG9JQsMdfI/AAAAAAAAAKk/DwID366FYl4/s1600/268465_2278058554773_1348043792_2671804_1618138_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37462156.post-2336940269687147316</id><published>2010-03-01T13:45:00.000+08:00</published><updated>2010-03-01T13:45:42.572+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ironpython'/><title type='text'>[ironpython] AddReference</title><summary type='text'>在ironpython 中為使用 .net 函式庫, 需要加入一個reference給 .net assembly,  由此動作後 import進來的 namespace 才能夠被辨識ex. from System.IO import TextReaderclass PythonFileReader(TextReader):    def __init__(self, f):        self.f = f    def Read(self, buffer, index, count):        chars = self.f.read(count).ToCharArray()        chars.CopyTo(buffer, index)        return  len(chars)
import clrclr.AddReference('System.Xml')</summary><link rel='replies' type='application/atom+xml' href='http://globlalala.blogspot.com/feeds/2336940269687147316/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://globlalala.blogspot.com/2010/03/ironpython-addreference.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/2336940269687147316'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/2336940269687147316'/><link rel='alternate' type='text/html' href='http://globlalala.blogspot.com/2010/03/ironpython-addreference.html' title='[ironpython] AddReference'/><author><name>georg.</name><uri>http://www.blogger.com/profile/07768077195331360084</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='26' src='http://1.bp.blogspot.com/-HyKCaICVlaA/TvG9JQsMdfI/AAAAAAAAAKk/DwID366FYl4/s1600/268465_2278058554773_1348043792_2671804_1618138_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37462156.post-7408692779156955851</id><published>2010-03-01T11:34:00.001+08:00</published><updated>2010-03-01T11:35:15.508+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C\C++'/><title type='text'>[c++] namespace</title><summary type='text'>寫過一些些c++, java跟 python
但是對於物件導向(Object-Orientated) 的解釋，一直說不上話

今天來複習一下...

1. 命名空間 namespace
這是一開始寫c++時都會停住的問題，就竟什麼是命名空間? 為什麼需要有命名空間?
看了網上諸多解釋後，我自己認為是由於程式越長越大時，常會有變數、函式或類別名稱
相同的情況，甚至同類別名稱又同變數名稱等，這時後容易混淆，甚至覆蓋掉先前的定義。
c++提供一個空間的概念，即在各自的空間上定義的任何變數、函式，彼此是互斥的。
使用的方式是
namespace NAME {
    // method, variable, etc.
}

ex.
#include 
using namespace std;
namespace cat{
  int shout;
  int act;
}
namespace </summary><link rel='replies' type='application/atom+xml' href='http://globlalala.blogspot.com/feeds/7408692779156955851/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://globlalala.blogspot.com/2010/03/c-namespace.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/7408692779156955851'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/7408692779156955851'/><link rel='alternate' type='text/html' href='http://globlalala.blogspot.com/2010/03/c-namespace.html' title='[c++] namespace'/><author><name>georg.</name><uri>http://www.blogger.com/profile/07768077195331360084</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='26' src='http://1.bp.blogspot.com/-HyKCaICVlaA/TvG9JQsMdfI/AAAAAAAAAKk/DwID366FYl4/s1600/268465_2278058554773_1348043792_2671804_1618138_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37462156.post-2222962857129176671</id><published>2010-02-18T12:31:00.000+08:00</published><updated>2010-02-18T12:31:00.399+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='讀書心得'/><title type='text'>[讀書心得] 金字塔原理</title><summary type='text'>"清楚寫作唯一重要的行動，便是控制表達觀點的順序。" -- Barbara Minto

之前YEF的業師推薦了麥肯錫的一本書"金字塔原理"，是用來訓練邏輯思考與寫作的書。
因為覺得自已的邏輯思考能力的不足，偶然間想起這本書，所以在這個過年借了本來瞧瞧。

作者說一般人詞不達意有兩個原因，一個是缺乏練習、另一個則是文章的結構出了毛病。
然而對於讀者而言，最簡單的順序是先接受主要的、最抽象的觀點，接著才是次要的、支持性的觀點。基於主要的觀點永遠源自於次要的觀點，而這些觀點的最理想結構，則是源自於中心思想綁住好幾個觀點所組成的一個金字塔結構。
這些觀點彼此的關係可以是縱向 (任何一層的一個論點永遠是下面一層組成觀點的總結) ，也可以是橫向 (幾個觀點因為共同呈現一個邏輯論點而被歸類為一組)。利用 question/answer dialogue 的方式，當讀者對於某個論點基礎產生質疑時，</summary><link rel='replies' type='application/atom+xml' href='http://globlalala.blogspot.com/feeds/2222962857129176671/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://globlalala.blogspot.com/2010/02/blog-post.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/2222962857129176671'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/2222962857129176671'/><link rel='alternate' type='text/html' href='http://globlalala.blogspot.com/2010/02/blog-post.html' title='[讀書心得] 金字塔原理'/><author><name>georg.</name><uri>http://www.blogger.com/profile/07768077195331360084</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='26' src='http://1.bp.blogspot.com/-HyKCaICVlaA/TvG9JQsMdfI/AAAAAAAAAKk/DwID366FYl4/s1600/268465_2278058554773_1348043792_2671804_1618138_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37462156.post-331125437269170131</id><published>2010-02-09T01:27:00.000+08:00</published><updated>2010-02-09T01:27:17.031+08:00</updated><title type='text'>[python] naming</title><summary type='text'>python 的命名規則... 

其實從前我一直很不care這個，不過為了code的可讀性還有交接  所以還是記錄一下好了


1. lowercase_with_underscores : 用於modules 與internal variables(包括function/method variables) [ 除了__init__裡頭的參數例外。 ]

2. MixedCase  :  用於 modules 與 public properties

3.  mixedCaseExceptFirstWord : 用在 public methods 及functions

4. _lowercase_with_leading_undersore : 用在 private functions, methods, properties

5. __</summary><link rel='replies' type='application/atom+xml' href='http://globlalala.blogspot.com/feeds/331125437269170131/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://globlalala.blogspot.com/2010/02/python-naming.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/331125437269170131'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/331125437269170131'/><link rel='alternate' type='text/html' href='http://globlalala.blogspot.com/2010/02/python-naming.html' title='[python] naming'/><author><name>georg.</name><uri>http://www.blogger.com/profile/07768077195331360084</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='26' src='http://1.bp.blogspot.com/-HyKCaICVlaA/TvG9JQsMdfI/AAAAAAAAAKk/DwID366FYl4/s1600/268465_2278058554773_1348043792_2671804_1618138_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37462156.post-5021415072804142356</id><published>2010-01-26T13:27:00.001+08:00</published><updated>2010-01-26T13:28:53.931+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='生活'/><title type='text'>[生活]開發好創意的七件事</title><summary type='text'>來自 Youtube的一個影片

1. 決定腦力激盪的目的

2. 選定一個腦細胞活躍的時間

3. 擬定目標藍圖和創意發想的重點

4. 補充腦力食物，用食物解放思緒

5. 舒適空間讓思考有交流的空間

6. 書寫刺激想法、記錄網住靈感

7. 指定目標追蹤的負責人
     - 認可創意人的點子是最大的鼓勵；扼殺士氣最快的方式就是，從不執行創意人提出的好點子。


 </summary><link rel='replies' type='application/atom+xml' href='http://globlalala.blogspot.com/feeds/5021415072804142356/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://globlalala.blogspot.com/2010/01/blog-post_26.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/5021415072804142356'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/5021415072804142356'/><link rel='alternate' type='text/html' href='http://globlalala.blogspot.com/2010/01/blog-post_26.html' title='[生活]開發好創意的七件事'/><author><name>georg.</name><uri>http://www.blogger.com/profile/07768077195331360084</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='26' src='http://1.bp.blogspot.com/-HyKCaICVlaA/TvG9JQsMdfI/AAAAAAAAAKk/DwID366FYl4/s1600/268465_2278058554773_1348043792_2671804_1618138_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37462156.post-7158956731125842155</id><published>2010-01-24T13:15:00.001+08:00</published><updated>2010-01-24T13:15:39.620+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='python'/><title type='text'>[python] xmlbuilder</title><summary type='text'>最近在測試官方版的xmlbuilder

寫法有兩種
1. with

x = XMLBuilder

with x.tag_name('value', attr1_name=attr1_value, ....):
   with x.tag_name('value', attr1_name=attr1_value, ....):
     ...

這樣分層下去


2. &lt;&lt;
x &lt;&lt; (tag_name, value, {attr1_name:attr1_value, ...})
     
記錄一下</summary><link rel='replies' type='application/atom+xml' href='http://globlalala.blogspot.com/feeds/7158956731125842155/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://globlalala.blogspot.com/2010/01/python-xmlbuilder.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/7158956731125842155'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/7158956731125842155'/><link rel='alternate' type='text/html' href='http://globlalala.blogspot.com/2010/01/python-xmlbuilder.html' title='[python] xmlbuilder'/><author><name>georg.</name><uri>http://www.blogger.com/profile/07768077195331360084</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='26' src='http://1.bp.blogspot.com/-HyKCaICVlaA/TvG9JQsMdfI/AAAAAAAAAKk/DwID366FYl4/s1600/268465_2278058554773_1348043792_2671804_1618138_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37462156.post-1124031106770481083</id><published>2010-01-19T01:28:00.000+08:00</published><updated>2010-01-19T01:28:15.406+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='讀書心得'/><title type='text'>[讀書心得] 測試(二)</title><summary type='text'>接下來談的是一些關於測試的伎倆。

1. 學弟建議的code Coverage 程式碼涵蓋範圍
    這是用來計算程式碼有被執行的的比例，占的越多不表示程式碼品質好，
但占的少表示測試品質差。這就像是很多條路徑，要怎麼設計多組cases來
走完全部的路徑。

2. 邏輯涵蓋範圍
    去計算全部的邏輯運算式中，所走過的有幾個。這表示，假設一段程式碼
有6個if, else, for, ... 等等等判斷式，則至少需要6個test cases

3. 資料流程測試(我覺得稱做資料生命周期測試比較合適= =a)
    一個資料它可以分成三個型態：
    已定義- 已初始化但尚未使用
    已使用- 已在運算中
    已停用- 表式運算結束

    另外對於從 已定義-&gt;已使用中間可以插個 已進入，
    以及從 已使用-&gt;已停用中間插個 已離開，做為進一步描述。

    </summary><link rel='replies' type='application/atom+xml' href='http://globlalala.blogspot.com/feeds/1124031106770481083/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://globlalala.blogspot.com/2010/01/blog-post_19.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/1124031106770481083'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/1124031106770481083'/><link rel='alternate' type='text/html' href='http://globlalala.blogspot.com/2010/01/blog-post_19.html' title='[讀書心得] 測試(二)'/><author><name>georg.</name><uri>http://www.blogger.com/profile/07768077195331360084</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='26' src='http://1.bp.blogspot.com/-HyKCaICVlaA/TvG9JQsMdfI/AAAAAAAAAKk/DwID366FYl4/s1600/268465_2278058554773_1348043792_2671804_1618138_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37462156.post-8667276001787106409</id><published>2010-01-18T15:24:00.003+08:00</published><updated>2010-01-18T15:25:14.809+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='python'/><title type='text'>[python] Crypto</title><summary type='text'>下午試了一下Crypto的東西，來寫一下筆記

參考1


From Crypto.Cipher import DES
shared_key = '12345678'    # 這個一定要是8的倍數
obj = DES.new(shared_key, MODE_ECB)
plain_text = 'hello, welcome to the world'   # plain_text 應為8的倍數

#encrypt
padding = '$'
extra = len(plain_text) % 8 
if extra:
   plain_text += padding * (8-extra)
ciph_text = obj.encrypt(plain_text)

#decript
origin_text = obj.decrypt(ciph_text)
print </summary><link rel='replies' type='application/atom+xml' href='http://globlalala.blogspot.com/feeds/8667276001787106409/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://globlalala.blogspot.com/2010/01/python-crypto.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/8667276001787106409'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/8667276001787106409'/><link rel='alternate' type='text/html' href='http://globlalala.blogspot.com/2010/01/python-crypto.html' title='[python] Crypto'/><author><name>georg.</name><uri>http://www.blogger.com/profile/07768077195331360084</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='26' src='http://1.bp.blogspot.com/-HyKCaICVlaA/TvG9JQsMdfI/AAAAAAAAAKk/DwID366FYl4/s1600/268465_2278058554773_1348043792_2671804_1618138_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37462156.post-1779260260100484986</id><published>2010-01-15T23:26:00.000+08:00</published><updated>2010-01-15T23:26:24.938+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='讀書心得'/><title type='text'>[讀書心得] 測試(一)</title><summary type='text'>工作即將進行到測試階段，但老實說我從未做過相關工作，所以看了本書Code Complete，這裡來寫一些筆記+心得。

這本書提到測試依層次有分幾類：
1. 單元測試:  這是用來測試某一個完整類別中的函數或變數而常使用的一個方法
2. 元件測試:  用來測試一個完整類別、封裝。
3. 整合測試: 用來測試複數類別、元件或子系統。
4. 迴歸測試: 重覆已執行過的test-case，藉以找出先前測試中未察覺出的缺失。
5. 系統測試: 讓軟體在最終設定下執行，並與其他軟硬體結合，包括安全性、效能、資源損耗、計時問題以及其他無法在低階段整合中測試的問題。

其實還有一堆，像是客戶接受度、效能、設定、平台、壓力及可用性測試等等等，太多了。
知道一堆名詞後，我還是不知道怎麼著手。

一般人將測試分為兩類：黑箱測試及白箱測試，這大家都懂。
然而測試的目的為何? 測試與除錯的差異? </summary><link rel='replies' type='application/atom+xml' href='http://globlalala.blogspot.com/feeds/1779260260100484986/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://globlalala.blogspot.com/2010/01/blog-post_48.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/1779260260100484986'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/1779260260100484986'/><link rel='alternate' type='text/html' href='http://globlalala.blogspot.com/2010/01/blog-post_48.html' title='[讀書心得] 測試(一)'/><author><name>georg.</name><uri>http://www.blogger.com/profile/07768077195331360084</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='26' src='http://1.bp.blogspot.com/-HyKCaICVlaA/TvG9JQsMdfI/AAAAAAAAAKk/DwID366FYl4/s1600/268465_2278058554773_1348043792_2671804_1618138_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37462156.post-8691643141402671322</id><published>2010-01-15T01:47:00.000+08:00</published><updated>2010-01-15T01:47:16.313+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='讀書心得'/><title type='text'>[讀書心得] 關於學習這門事</title><summary type='text'>讀書這檔事，雖然大家都會，可是真要問問自己，自己學習的效率好嗎? 有沒有存在一種"正確"的學習方式，可以讓讀書這苦差事(大部分的人應該都覺得讀書很苦XD) 更有趣、更有效率?

一般人學習方式都是: 1. 看懂它  2. 確定沒有遺忘它

hmm... 在過去的念書裡，很少人會告訴我一些學習，所以我總習慣於追逐頁面上的文字在玩文字遊戲，導致花了很多時間在玩文字遊戲，這種人叫做"head-first"，表示他做任何事前習慣先將頭探出去，是指那種做事情未事先深思熟慮的人。

今天看到一些不錯的學習首則，希望之後對於自己的學習方式能多留意：
1. 盡量視覺化
    在Mr. Brain裡頭也提到了，人類對於顏色的敏感度勝於文字。而影像相較於文字對於人類更容易記憶，可以提升學習效率，甚至將回想及轉述效率提升至89% ( 根據認知學習理論中的雙通道假設，人類學習主要藉由視覺及聽覺，唉... </summary><link rel='replies' type='application/atom+xml' href='http://globlalala.blogspot.com/feeds/8691643141402671322/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://globlalala.blogspot.com/2010/01/blog-post_15.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/8691643141402671322'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/8691643141402671322'/><link rel='alternate' type='text/html' href='http://globlalala.blogspot.com/2010/01/blog-post_15.html' title='[讀書心得] 關於學習這門事'/><author><name>georg.</name><uri>http://www.blogger.com/profile/07768077195331360084</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='26' src='http://1.bp.blogspot.com/-HyKCaICVlaA/TvG9JQsMdfI/AAAAAAAAAKk/DwID366FYl4/s1600/268465_2278058554773_1348043792_2671804_1618138_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37462156.post-7832897667052161958</id><published>2010-01-12T21:03:00.003+08:00</published><updated>2010-01-12T21:05:28.840+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C\C++'/><title type='text'>[c++] 使用TinyXml</title><summary type='text'>今天跟學弟討論XML的document object 屬性數目問題。
首先回憶一下python DOM所描述的XML由上到下分成 Document -&gt; Element(s) -&gt;NodeList -&gt; Node(s)


在python 裡頭，因為Document object是minidom lib自己建的，
取出某個Node的Attr或Text很容易。


而在TinyXml 裡頭要找做到相同的事情：
0. TiXmlDocument doc('mytest.xml') 建立Document obj
1. 使用 doc.Parse('mytest_xmlstring') 讀入xml並建立XML-tree
2. 要取得Element(s)可用
    TiXmlElement *elem = doc.FirstChildElement() or
    TiXmlElement *</summary><link rel='replies' type='application/atom+xml' href='http://globlalala.blogspot.com/feeds/7832897667052161958/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://globlalala.blogspot.com/2010/01/c-tinyxml.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/7832897667052161958'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/7832897667052161958'/><link rel='alternate' type='text/html' href='http://globlalala.blogspot.com/2010/01/c-tinyxml.html' title='[c++] 使用TinyXml'/><author><name>georg.</name><uri>http://www.blogger.com/profile/07768077195331360084</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='26' src='http://1.bp.blogspot.com/-HyKCaICVlaA/TvG9JQsMdfI/AAAAAAAAAKk/DwID366FYl4/s1600/268465_2278058554773_1348043792_2671804_1618138_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37462156.post-2169122598231893372</id><published>2010-01-07T13:49:00.001+08:00</published><updated>2010-01-07T13:51:29.834+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C\C++'/><title type='text'>[c] 如何在linux上使用 getch()</title><summary type='text'>剛剛同學問我的問題，我也沒在linux上實做c，但總覺得這問題一定很常見，
所以就把他註記下來。

主要步驟是
0. include curses.h  [ getch()在裡頭 ]
1. 使用initscr() [ WINDOW *W = initscr() ]
2. ch = getch()
3. endwin()

另一個則是透過posix實做 getch()

http://heresy.spaces.live.com/blog/cns!E0070FB8ECF9015F!5092.entry</summary><link rel='replies' type='application/atom+xml' href='http://globlalala.blogspot.com/feeds/2169122598231893372/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://globlalala.blogspot.com/2010/01/c-linux-getch.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/2169122598231893372'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/2169122598231893372'/><link rel='alternate' type='text/html' href='http://globlalala.blogspot.com/2010/01/c-linux-getch.html' title='[c] 如何在linux上使用 getch()'/><author><name>georg.</name><uri>http://www.blogger.com/profile/07768077195331360084</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='26' src='http://1.bp.blogspot.com/-HyKCaICVlaA/TvG9JQsMdfI/AAAAAAAAAKk/DwID366FYl4/s1600/268465_2278058554773_1348043792_2671804_1618138_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37462156.post-2028427625914495264</id><published>2010-01-05T09:44:00.001+08:00</published><updated>2010-01-05T09:44:30.751+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='生活'/><title type='text'>[生活] 一些定理假說</title><summary type='text'>有些詞我一直記不住它真正的意思，第一個就是邊際效應 marginal effect。
今早又想到它，所以這次來寫點東西，希望能夠最後一次忘記它。

網路上是這麼形容的，他說就好比吃東西，當吃第一口的時候覺得非常好吃，
第二口的時候還不錯，等到第五、第六口的時候那種滿足感漸漸不再那麼強烈，
而邊際效應就是最後一個單位比前一的單位的效用。以上面這個例子來說，此
邊際效應是遞減的。

不過以微積分的角度，這不正好是微分的觀念嗎。
  [ f(x0+1) - f(x0) ] / 1 = [ f(x0+h) - f(x0) ] / h = f'(x=x0)
而一般分析的經濟問題常將離散型的函數(成本函數)連續化，所以成本函數
 Cost(x) 的邊際成本即是它的導函數(一次微分)。

而通常我們想求最大淨利時，邊際成本 = 邊際收益。
Profit(x) = Earn(x) - Cost(x)  </summary><link rel='replies' type='application/atom+xml' href='http://globlalala.blogspot.com/feeds/2028427625914495264/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://globlalala.blogspot.com/2010/01/blog-post.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/2028427625914495264'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/2028427625914495264'/><link rel='alternate' type='text/html' href='http://globlalala.blogspot.com/2010/01/blog-post.html' title='[生活] 一些定理假說'/><author><name>georg.</name><uri>http://www.blogger.com/profile/07768077195331360084</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='26' src='http://1.bp.blogspot.com/-HyKCaICVlaA/TvG9JQsMdfI/AAAAAAAAAKk/DwID366FYl4/s1600/268465_2278058554773_1348043792_2671804_1618138_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37462156.post-5663501977973635116</id><published>2010-01-01T13:20:00.005+08:00</published><updated>2010-01-05T09:16:20.359+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='English'/><title type='text'>[語言] GEPT 考試日期、日文考試日期</title><summary type='text'>1. GEPT中高級


2. 日文：
2010年起日本語能力試驗考試制度將有所變更，將於2級與3級間再增加一個級數，即測驗級數由四個級數改為五個級數，為N1、N2、N3、N4、N5。7月份辦理N1~N3三個級數，12月份則N1~N5五個級數全部辦理。

</summary><link rel='replies' type='application/atom+xml' href='http://globlalala.blogspot.com/feeds/5663501977973635116/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://globlalala.blogspot.com/2010/01/gept.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/5663501977973635116'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/5663501977973635116'/><link rel='alternate' type='text/html' href='http://globlalala.blogspot.com/2010/01/gept.html' title='[語言] GEPT 考試日期、日文考試日期'/><author><name>georg.</name><uri>http://www.blogger.com/profile/07768077195331360084</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='26' src='http://1.bp.blogspot.com/-HyKCaICVlaA/TvG9JQsMdfI/AAAAAAAAAKk/DwID366FYl4/s1600/268465_2278058554773_1348043792_2671804_1618138_n.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_OI6GZCmx5o4/Sz1kaWN8l8I/AAAAAAAAAFw/5hnY62CiLdI/s72-c/GEPT.bmp' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37462156.post-4355767134300730188</id><published>2009-12-14T00:21:00.001+08:00</published><updated>2009-12-14T00:22:12.502+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='python'/><title type='text'>[python] File I/O, internet framework(MT, Select, epoll, IOCP)</title><summary type='text'>這兩天又再翻新架構了 = = 
大概學長真覺得我是操人(耐操的人)....
不過這次教訓又再次提醒自己，對於不熟或一知半解的東西，千萬別拿來用。。。
(但一開始什麼都不知道的人，誰知道那能不能用.... 桿)

.................................................&lt;&lt;小抱怨一下，開始說正題好&gt;&gt;

第一個要提的是python 的FILE I/O
我每次都沒仔細搞清楚'ab', 'rb+', 'w+'... 之間的差異，想說排列組合部都那幾個... 結果誤用 = =
詳細說明可以參考 這裡 ， 至少在網路上這篇最詳細...
幾個最常用到的mode


rb
這是default值。file pointer會在offset=0的位置。開啟一個已存在的檔案並做binary read-only。





rb+
開啟一個已存在的檔案並對其做</summary><link rel='replies' type='application/atom+xml' href='http://globlalala.blogspot.com/feeds/4355767134300730188/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://globlalala.blogspot.com/2009/12/python-file-io-internet-frameworkmt.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/4355767134300730188'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/4355767134300730188'/><link rel='alternate' type='text/html' href='http://globlalala.blogspot.com/2009/12/python-file-io-internet-frameworkmt.html' title='[python] File I/O, internet framework(MT, Select, epoll, IOCP)'/><author><name>georg.</name><uri>http://www.blogger.com/profile/07768077195331360084</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='26' src='http://1.bp.blogspot.com/-HyKCaICVlaA/TvG9JQsMdfI/AAAAAAAAAKk/DwID366FYl4/s1600/268465_2278058554773_1348043792_2671804_1618138_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37462156.post-868820869681036258</id><published>2009-12-07T01:21:00.001+08:00</published><updated>2009-12-07T01:26:07.871+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='生活'/><title type='text'>[生活] 一些小習慣，讓自己更快樂</title><summary type='text'>最近學弟推薦了一部木村的日劇- 大腦先生 Mr. Brain

雖然裡頭的推理劇讓看多這款戲的我覺得有點弱，戲中犯案的方式也有點kuso，但是還是有個地方很吸引我，就是Mr. Brain的能力，關於大腦開發的一些知識。

不過這些跟我想記錄的東西無關，只是看完第二集後，到網路上搜尋大腦&amp;記憶後，找到一些覺得挺有幫助的東西，所以就寫上來提醒自己。

是關於快樂的方式。科學證明，行為操練能增進快樂，而目前最有效的練習是
1。專注於正面的事情
        每天寫下當天快樂的三件事情，並說出發生的原因。
2。練習運用性格上的長處
        可以透過一些心理測驗知道自己的長處後，每天以新的方式來實現其中一項。
3。記得感恩
        每天寫下五件令自己感恩的事情。

上面說的都需要無比的堅持阿 = = 

另外其實對我而言最重要的能量是 充足睡眠、適當運動還有經常旅行!!! XD</summary><link rel='replies' type='application/atom+xml' href='http://globlalala.blogspot.com/feeds/868820869681036258/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://globlalala.blogspot.com/2009/12/blog-post.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/868820869681036258'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/868820869681036258'/><link rel='alternate' type='text/html' href='http://globlalala.blogspot.com/2009/12/blog-post.html' title='[生活] 一些小習慣，讓自己更快樂'/><author><name>georg.</name><uri>http://www.blogger.com/profile/07768077195331360084</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='26' src='http://1.bp.blogspot.com/-HyKCaICVlaA/TvG9JQsMdfI/AAAAAAAAAKk/DwID366FYl4/s1600/268465_2278058554773_1348043792_2671804_1618138_n.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37462156.post-5605568728615740681</id><published>2009-12-06T16:40:00.006+08:00</published><updated>2011-05-04T13:37:27.981+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C\C++'/><title type='text'>[c] memory 相關的函式(memset, memcpy, memmove)</title><summary type='text'>memset

void * memset ( void * ptr, int value, size_t num );ptr      ：為destination address 的pointer
value ：想要set的值。(居然是type int. 表示是0~255(unsign char))
num   ：number of bytes
這表示一次只能set 1bytes，然後寫入num個。(這真是沒效率 囧...)
這邊說錯了, 要reset值的長度用sizeof(ptr)就好了... (05/04/2011)

memcpy

void * memcpy ( void * destination, const void * source, size_t num );這ok，不過若source在copy時被overwrite時會是問題。

memmove





void </summary><link rel='replies' type='application/atom+xml' href='http://globlalala.blogspot.com/feeds/5605568728615740681/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://globlalala.blogspot.com/2009/12/c-memory-memset-memcpy-memmove.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/5605568728615740681'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/5605568728615740681'/><link rel='alternate' type='text/html' href='http://globlalala.blogspot.com/2009/12/c-memory-memset-memcpy-memmove.html' title='[c] memory 相關的函式(memset, memcpy, memmove)'/><author><name>georg.</name><uri>http://www.blogger.com/profile/07768077195331360084</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='26' src='http://1.bp.blogspot.com/-HyKCaICVlaA/TvG9JQsMdfI/AAAAAAAAAKk/DwID366FYl4/s1600/268465_2278058554773_1348043792_2671804_1618138_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37462156.post-2580870162083401058</id><published>2009-12-04T22:53:00.002+08:00</published><updated>2009-12-07T01:25:45.303+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='生活'/><title type='text'>[生活]TDR and ECFA</title><summary type='text'>今天吃晚餐時的新聞，報導康師傅的TDR發行大家為之瘋狂與嚴凱泰對於政府簽訂ECFA拖延表示不滿。
也不知道這兩款是什麼玩意，所以就GOOGLE一下，來做點筆記。

TDR, Taiwan Depositary Receipts
1、何謂存託憑證
存託憑證是一種可轉讓的有價證券。先由上市公司或出售股東，將公司股票交付保管機構保管， 再經存託機構發行表彰該股票權利的憑證後，售予市場上有意購買之投資人。其目的係為讓國內之投資人能在當地投資外國證券，以降低直接投資國際市場的風險。俾利外國優良公司所發行之 有價證券，亦可來國內上市買賣 。

ㄜ... 其實看完只知道是某個公司發行的債券，轉交由一個保管機構發行憑證，賣給國外的投資者。不過看了很多篇後，才了解原來是指外國上市公司或股東，賣出所擁有的股票給某個國家的機構，由其發行相等股值的股票，稱為DR。而在台灣發行的就稱為TDR。

</summary><link rel='replies' type='application/atom+xml' href='http://globlalala.blogspot.com/feeds/2580870162083401058/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://globlalala.blogspot.com/2009/12/tdr-and-ecfa.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/2580870162083401058'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/2580870162083401058'/><link rel='alternate' type='text/html' href='http://globlalala.blogspot.com/2009/12/tdr-and-ecfa.html' title='[生活]TDR and ECFA'/><author><name>georg.</name><uri>http://www.blogger.com/profile/07768077195331360084</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='26' src='http://1.bp.blogspot.com/-HyKCaICVlaA/TvG9JQsMdfI/AAAAAAAAAKk/DwID366FYl4/s1600/268465_2278058554773_1348043792_2671804_1618138_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37462156.post-1440666307059885719</id><published>2009-12-04T13:43:00.001+08:00</published><updated>2009-12-04T13:49:25.965+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='python'/><title type='text'>[python] 最近工作感想</title><summary type='text'>最近寫py遇到一個很大的瓶頸，就是py25無法釋放memory而導致MemoryError，這整個讓我信心大失... 好在瑋任大大的幫忙與建議，又重拾信心。

主要是因為 py 雖有 gc，但是網路上說 py 再做 gc 時並不會釋放記憶體給 OS，即使是使用 del() 或手動 gc.collect() 都無解，導致最後 memory 被我程式吃光光。
(那篇文章說py25已解決這個問題，但是我測過後是沒有!!? 可惡...)
最後是改用py26才暫時解決問題(日後應該將memHandler列入工作項目之一)，然後也使用兩個幫助很多的工具，processexplorer 跟 guppy ，分別觀察process的行為與python內部memory使用情形。

一開始我是在網路上找尋如何觀察python記憶體使用的工具，學長推薦蠻不錯的有PythonMemoryValidator(</summary><link rel='replies' type='application/atom+xml' href='http://globlalala.blogspot.com/feeds/1440666307059885719/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://globlalala.blogspot.com/2009/12/python.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/1440666307059885719'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/1440666307059885719'/><link rel='alternate' type='text/html' href='http://globlalala.blogspot.com/2009/12/python.html' title='[python] 最近工作感想'/><author><name>georg.</name><uri>http://www.blogger.com/profile/07768077195331360084</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='26' src='http://1.bp.blogspot.com/-HyKCaICVlaA/TvG9JQsMdfI/AAAAAAAAAKk/DwID366FYl4/s1600/268465_2278058554773_1348043792_2671804_1618138_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37462156.post-6335318456913370983</id><published>2009-11-18T12:11:00.000+08:00</published><updated>2009-11-18T12:11:40.326+08:00</updated><title type='text'>google job</title><summary type='text'>雖然這輩子沒機會，但還是看一下一流公司的SE水準好了xD   期許自己不久的某一天可以達到XD



Software Engineer - Mountain ViewThis position is based in Mountain View, CA.
The area: Software EngineeringGoogle's software engineers develop the next-generation technologies for which we've become world-renowned. In addition to revolutionizing search technology, we use our world-class programming skills to innovate in a number of other areas </summary><link rel='replies' type='application/atom+xml' href='http://globlalala.blogspot.com/feeds/6335318456913370983/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://globlalala.blogspot.com/2009/11/google-job.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/6335318456913370983'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/6335318456913370983'/><link rel='alternate' type='text/html' href='http://globlalala.blogspot.com/2009/11/google-job.html' title='google job'/><author><name>georg.</name><uri>http://www.blogger.com/profile/07768077195331360084</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='26' src='http://1.bp.blogspot.com/-HyKCaICVlaA/TvG9JQsMdfI/AAAAAAAAAKk/DwID366FYl4/s1600/268465_2278058554773_1348043792_2671804_1618138_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37462156.post-4888479208034851418</id><published>2009-11-18T01:23:00.001+08:00</published><updated>2009-11-18T01:26:50.893+08:00</updated><title type='text'>[network] memcached</title><summary type='text'>memcached

狠常聽到的一個玩意，從 wiki  得知它是一使用32bit的循環冗餘檢察(CRC-32)計算key-value，並將資料分散在各台主機上的一個分散式系統。這樣講有看沒懂...
僅知道
 1. in-memory
 2. key-value

google查了後覺得較滿意的解釋是 當client端連到遠端server時, 若該server架有memcached service, 則在連上memcached後, memcached會給予它一個key, 用來map到它所需要存取的objects. 而這些objects其實是存在後端數台主機裡頭, clients借由key可以馬上知道object在哪裡!
(唉  還是要白話點我才看得懂Orz...)
更白點就是在memory存一張巨大的hashtable, client藉由將key做hash就可以得知它需要的data</summary><link rel='replies' type='application/atom+xml' href='http://globlalala.blogspot.com/feeds/4888479208034851418/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://globlalala.blogspot.com/2009/11/network-memcached.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/4888479208034851418'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/4888479208034851418'/><link rel='alternate' type='text/html' href='http://globlalala.blogspot.com/2009/11/network-memcached.html' title='[network] memcached'/><author><name>georg.</name><uri>http://www.blogger.com/profile/07768077195331360084</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='26' src='http://1.bp.blogspot.com/-HyKCaICVlaA/TvG9JQsMdfI/AAAAAAAAAKk/DwID366FYl4/s1600/268465_2278058554773_1348043792_2671804_1618138_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37462156.post-3072165396412365428</id><published>2009-11-17T23:56:00.000+08:00</published><updated>2009-11-17T23:56:03.808+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='English'/><title type='text'>[English] Words about reading</title><summary type='text'>1. paperback2. Movie tie-in      a book or frequently a trade paperback or hardcover that has a direct relationship to a specific film. Usually the cover of the book is the photography of the movie's stars, and the slogans that indicating directly to the specific movie.3. dust jacket / dust wrapper / dust cover     the dust jacket of a book is a detachable outer cover, that is often made of paper</summary><link rel='replies' type='application/atom+xml' href='http://globlalala.blogspot.com/feeds/3072165396412365428/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://globlalala.blogspot.com/2009/11/english-words-about-reading.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/3072165396412365428'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/3072165396412365428'/><link rel='alternate' type='text/html' href='http://globlalala.blogspot.com/2009/11/english-words-about-reading.html' title='[English] Words about reading'/><author><name>georg.</name><uri>http://www.blogger.com/profile/07768077195331360084</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='26' src='http://1.bp.blogspot.com/-HyKCaICVlaA/TvG9JQsMdfI/AAAAAAAAAKk/DwID366FYl4/s1600/268465_2278058554773_1348043792_2671804_1618138_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37462156.post-8114259036443144332</id><published>2009-11-14T22:15:00.001+08:00</published><updated>2009-11-15T00:24:21.442+08:00</updated><title type='text'>發佈軟體要注意的事情</title><summary type='text'>1.GPL
2.即便不是GPL, 也需要附上所使用到的Opensource License.txt
3.考慮使用NSIS發佈
4.注意redistribution 及 商業用途的問題
5. windbg</summary><link rel='replies' type='application/atom+xml' href='http://globlalala.blogspot.com/feeds/8114259036443144332/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://globlalala.blogspot.com/2009/11/blog-post_14.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/8114259036443144332'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/8114259036443144332'/><link rel='alternate' type='text/html' href='http://globlalala.blogspot.com/2009/11/blog-post_14.html' title='發佈軟體要注意的事情'/><author><name>georg.</name><uri>http://www.blogger.com/profile/07768077195331360084</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='26' src='http://1.bp.blogspot.com/-HyKCaICVlaA/TvG9JQsMdfI/AAAAAAAAAKk/DwID366FYl4/s1600/268465_2278058554773_1348043792_2671804_1618138_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37462156.post-3380197044043487588</id><published>2009-11-13T15:22:00.003+08:00</published><updated>2009-11-17T11:08:51.966+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='python'/><title type='text'>[python] tuple to list, unicode的處理</title><summary type='text'>1)在使用 *args時需要加入其他參數, 發現他是tuple type,
可是tuple無任何method, 所以需要將其轉為list, 再轉回 tuple

a = ('abc', 334, 21.21)
b = list(a)
b.append('glob')
a2=tuple(b)

2) python 的 default encoding 是 unicode (記得是2.4以後統一的規格)
這裡有詳細的介紹. unicode 可以算是其他編碼互換的中間碼, 
其格式是
上面說得很清楚, 有分成4 digits 或 8digits的unicode, 缺項補 0
The \u escape sequence is used to denote Unicode codes. 
This is somewhat like the traditional C-style \xNN to </summary><link rel='replies' type='application/atom+xml' href='http://globlalala.blogspot.com/feeds/3380197044043487588/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://globlalala.blogspot.com/2009/11/python-tuple-to-list-unicode.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/3380197044043487588'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/3380197044043487588'/><link rel='alternate' type='text/html' href='http://globlalala.blogspot.com/2009/11/python-tuple-to-list-unicode.html' title='[python] tuple to list, unicode的處理'/><author><name>georg.</name><uri>http://www.blogger.com/profile/07768077195331360084</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='26' src='http://1.bp.blogspot.com/-HyKCaICVlaA/TvG9JQsMdfI/AAAAAAAAAKk/DwID366FYl4/s1600/268465_2278058554773_1348043792_2671804_1618138_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37462156.post-2699242738968506985</id><published>2009-11-09T01:13:00.000+08:00</published><updated>2009-11-09T01:13:08.080+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='財務管理'/><title type='text'>股票評價(Stock Valuation) - 股利折現模型</title><summary type='text'>這邊討論的是股價(普通股)的評價，包括股利折現模型、成長機會模型與本益比模型。

1. 股利折現模型(The Dividend Discount Model, DDM)
股票的現金流可以分為兩個部分：股利的收入及股價的變動
先來定義
Pt：第t期的每股股價
Dt：第t期的每股股利
Rs：股利折現率(或稱為股東的必要報酬率)

當下的股票現值P0 =  D1/(1+Rs)  + P1/(1+Rs) ... (1)
一年後的股票現值 P1 = D2/(1+Rs) + P2/(1+Rs) ... (2)
將(1)代入(2)可得  P0 = D1/(1+Rs) + D2/[(1+Rs) ^2] + P2/[(1+Rs)^2]
可推得P0
= D1/(1+Rs) + D2/[(1+Rs) ^2] + D3/[(1+Rs)^3] + ... =  SIGMA(t=1, infinite)  D1/[</summary><link rel='replies' type='application/atom+xml' href='http://globlalala.blogspot.com/feeds/2699242738968506985/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://globlalala.blogspot.com/2009/11/stock-valuation.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/2699242738968506985'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/2699242738968506985'/><link rel='alternate' type='text/html' href='http://globlalala.blogspot.com/2009/11/stock-valuation.html' title='股票評價(Stock Valuation) - 股利折現模型'/><author><name>georg.</name><uri>http://www.blogger.com/profile/07768077195331360084</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='26' src='http://1.bp.blogspot.com/-HyKCaICVlaA/TvG9JQsMdfI/AAAAAAAAAKk/DwID366FYl4/s1600/268465_2278058554773_1348043792_2671804_1618138_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37462156.post-2332486000276031495</id><published>2009-11-05T01:53:00.001+08:00</published><updated>2009-11-05T02:03:56.110+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='twisted'/><category scheme='http://www.blogger.com/atom/ns#' term='python'/><title type='text'>[python] murmur</title><summary type='text'>這篇應該算是抱怨文吧。

開始使用 twisted 寫 network programming 應該有兩個月了，網路論壇裡大家都認為他很強大一定要學一下，但沒想到為了它我這幾個月熬了好幾次夜，常常被裡頭的東西搞得莫名其妙。

首先從參考文件講起... 他的API 說明文件有夠鳥，寫的不知所云(應該是說，twisted作者有他自己的命名，beginner又無法從名稱了解他到底要沖煞小....  這也跟它是even-driven有關係吧)  常翻箱到櫃才能找到你要的東西...
既然網路文件無效，那就買本書來看吧!?  O'Reilly 是有出一本twisted的書，但那本不提也罷，沒什麼內容，不過還是最好手邊要有一本(因為它可是唯一一本twisted的書 /囧\)
還有就是那個mailing lists 討論群的東西倒是值得去看看。

結論是什麼?
結論就是，想要學好twisted嗎?  </summary><link rel='replies' type='application/atom+xml' href='http://globlalala.blogspot.com/feeds/2332486000276031495/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://globlalala.blogspot.com/2009/11/python-murmur.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/2332486000276031495'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/2332486000276031495'/><link rel='alternate' type='text/html' href='http://globlalala.blogspot.com/2009/11/python-murmur.html' title='[python] murmur'/><author><name>georg.</name><uri>http://www.blogger.com/profile/07768077195331360084</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='26' src='http://1.bp.blogspot.com/-HyKCaICVlaA/TvG9JQsMdfI/AAAAAAAAAKk/DwID366FYl4/s1600/268465_2278058554773_1348043792_2671804_1618138_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37462156.post-5792816645004205823</id><published>2009-11-04T02:49:00.002+08:00</published><updated>2009-11-04T23:08:38.932+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='財務管理'/><title type='text'>[財務管理] 利率與債券</title><summary type='text'>這邊主要是講解利率(Inernet rate)與債券(Bonds)的觀念.

首先, 了解利率要先了解兩種關係
資金供給者 = landor = Savor = Investor
資金需求者 = Borrower = Firm

利率的構成要素有六:
1. 實質利率(real internet rate, r*)
    即不考慮物價影響(通貨膨脹)的利率. 主要由消費的時間偏好(對消費者而言, 延後消費可得較高利息)及實質資產(借錢的人借錢從事生產, 希望借越多利息越低)所決定。

2.通貨膨脹溢酬(Inflation Premium, IP)
   指存款人因物價上漲導致未來購買能力下降所要求的補償。
   ex. 存100塊,  利率r* = 10%, 一年後可得 110.
         若IP=15%, 則一年後只剩下 110/(1+15%) = 95.65&lt;100  </summary><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/5792816645004205823'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/5792816645004205823'/><link rel='alternate' type='text/html' href='http://globlalala.blogspot.com/2009/11/blog-post_04.html' title='[財務管理] 利率與債券'/><author><name>georg.</name><uri>http://www.blogger.com/profile/07768077195331360084</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='26' src='http://1.bp.blogspot.com/-HyKCaICVlaA/TvG9JQsMdfI/AAAAAAAAAKk/DwID366FYl4/s1600/268465_2278058554773_1348043792_2671804_1618138_n.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-37462156.post-5621571332088418418</id><published>2009-11-03T00:33:00.004+08:00</published><updated>2009-11-15T00:20:08.784+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='python'/><title type='text'>[python] 不錯的玩意, pickle與 shelve</title><summary type='text'>最近在python裡頭做 xml 與 dictionary 的格式轉換，又需要讀/寫入 database，真的搞的我暈頭轉向又不好維護。
今天看到一本好書 core python programming  提到關於 file i/o, 原來python 有些 persistent storage modules就是專門處理這些問題，像是pickle與marshal。
主要是介紹pickle，
因為marshal的差別在於marshal僅支援簡單的types(number, sequence, mapping...)
這邊說錯了，marshal主要是處理序列化的對象(serialized object), 特別是python的 pseudo-compiled code, 即 .pyc. 而一般支援 persistence module in python 主要是指pickle跟shelve</summary><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/5621571332088418418'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/5621571332088418418'/><link rel='alternate' type='text/html' href='http://globlalala.blogspot.com/2009/11/python-pickle-shelve.html' title='[python] 不錯的玩意, pickle與 shelve'/><author><name>georg.</name><uri>http://www.blogger.com/profile/07768077195331360084</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='26' src='http://1.bp.blogspot.com/-HyKCaICVlaA/TvG9JQsMdfI/AAAAAAAAAKk/DwID366FYl4/s1600/268465_2278058554773_1348043792_2671804_1618138_n.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-37462156.post-2631266904033474643</id><published>2009-11-02T23:05:00.001+08:00</published><updated>2009-11-02T23:06:52.482+08:00</updated><title type='text'>新開張囉</title><summary type='text'>我覺得每次在 bbs 寫讀書心得太累了以後改在這裡發布好了!!! 假又~</summary><link rel='replies' type='application/atom+xml' href='http://globlalala.blogspot.com/feeds/2631266904033474643/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://globlalala.blogspot.com/2009/11/blog-post_02.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/2631266904033474643'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/2631266904033474643'/><link rel='alternate' type='text/html' href='http://globlalala.blogspot.com/2009/11/blog-post_02.html' title='新開張囉'/><author><name>georg.</name><uri>http://www.blogger.com/profile/07768077195331360084</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='26' src='http://1.bp.blogspot.com/-HyKCaICVlaA/TvG9JQsMdfI/AAAAAAAAAKk/DwID366FYl4/s1600/268465_2278058554773_1348043792_2671804_1618138_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-37462156.post-6783076576219800934</id><published>2008-04-12T10:58:00.015+08:00</published><updated>2008-04-12T16:56:48.670+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='讀書心得'/><title type='text'>順著天賦作事，逆著個性作人</title><summary type='text'>順著天賦作事，讓自己回復自在的狀態，活著得很有能量。至於個性，則不可以任性妄為，若任由個性掌握局面，會讓人習慣走在老路上，沒辦法突破，開創新局......人到了某個年齡，開始對自己的命運產生好奇。偉忠先生研究各種命理解析後，發現雖人的命盤各不相同，但是若想要成功，就要「順著天賦作事，逆著個性作人」。而所謂天賦，就是自己最擅長、表現最好的事情。 順著天賦偉忠先生在民國84年時，正打算嘗試新的工作領域，探測未來更多發展可能。當時正淡出電視製作、 轉進廣播經營的領域。在台北之音的成績蒸蒸日上，但他一直冀望能有所突破。此時獵人頭公司來電，說有間跨國音樂公司想找他當總經理，洽談後，他決定參加面試，爭取在MCA台灣分公司擔任總經理的機會。疑問: 一個從未喝過洋墨水的眷村子弟，能不能生存於跨國企業?雖是生平第一次面試，而且全文是以英文回答，他仍順利拿到這個職務，並允諾會兩頭兼顧(跨國公司總經理+</summary><link rel='replies' type='application/atom+xml' href='http://globlalala.blogspot.com/feeds/6783076576219800934/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://globlalala.blogspot.com/2008/04/blog-post_12.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/6783076576219800934'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/37462156/posts/default/6783076576219800934'/><link rel='alternate' type='text/html' href='http://globlalala.blogspot.com/2008/04/blog-post_12.html' title='順著天賦作事，逆著個性作人'/><author><name>georg.</name><uri>http://www.blogger.com/profile/07768077195331360084</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='26' src='http://1.bp.blogspot.com/-HyKCaICVlaA/TvG9JQsMdfI/AAAAAAAAAKk/DwID366FYl4/s1600/268465_2278058554773_1348043792_2671804_1618138_n.jpg'/></author><thr:total>0</thr:total></entry></feed>
