<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" gd:etag="W/&quot;DUIBQHo7eSp7ImA9WhRVGUg.&quot;"><id>tag:blogger.com,1999:blog-2525938585642818417</id><updated>2012-01-19T15:19:11.401+08:00</updated><category term="非日記" /><category term="Windows Mobile" /><category term="Web-Side Programming" /><category term="Java" /><category term="Android" /><category term="人生觀" /><category term="專業？" /><category term="C/C++" /><title>Lucifer - Heosphoros</title><subtitle type="html">The Angel belongs from the Hell</subtitle><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://lak4cyut.blogspot.com/feeds/posts/default" /><link rel="alternate" type="text/html" href="http://lak4cyut.blogspot.com/" /><link rel="next" type="application/atom+xml" href="http://www.blogger.com/feeds/2525938585642818417/posts/default?start-index=26&amp;max-results=25&amp;redirect=false&amp;v=2" /><author><name>Lak Fu</name><uri>https://profiles.google.com/100719355520660151286</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-KhM_1sniceE/AAAAAAAAAAI/AAAAAAAAAKo/qfjAZlQNdvM/s512-c/photo.jpg" /></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>77</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/Lucifer-Heosphoros" /><feedburner:info uri="lucifer-heosphoros" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><entry gd:etag="W/&quot;CkcNSH0zfCp7ImA9WhRXFE0.&quot;"><id>tag:blogger.com,1999:blog-2525938585642818417.post-4162422595978741650</id><published>2011-11-23T20:07:00.001+08:00</published><updated>2011-12-21T00:54:59.384+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-12-21T00:54:59.384+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Java" /><category scheme="http://www.blogger.com/atom/ns#" term="專業？" /><category scheme="http://www.blogger.com/atom/ns#" term="Android" /><title>Android Tips 開發小技巧 － Thread 無法 Interrupted！？</title><link rel="replies" type="application/atom+xml" href="http://lak4cyut.blogspot.com/feeds/4162422595978741650/comments/default" title="張貼意見" /><link rel="replies" type="text/html" href="http://lak4cyut.blogspot.com/2011/11/android-tips-thread-interrupted.html#comment-form" title="0 個意見" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2525938585642818417/posts/default/4162422595978741650?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2525938585642818417/posts/default/4162422595978741650?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Lucifer-Heosphoros/~3/ogx3nAiRRjo/android-tips-thread-interrupted.html" title="Android Tips 開發小技巧 － Thread 無法 Interrupted！？" /><author><name>Lak Fu</name><uri>https://profiles.google.com/100719355520660151286</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-KhM_1sniceE/AAAAAAAAAAI/AAAAAAAAAKo/qfjAZlQNdvM/s512-c/photo.jpg" /></author><thr:total>0</thr:total><content type="html">雖然在 Android 裡開 Thread 的機會因為一些其他方便的機制而相對的變少了些，
但依然改變不了它是一個非常重要的 class 的事實。
最近在看的一個和 Android default Gallery3D 有關的 bug 就發現了一個有趣的問題。

基本上，這個問題最大的重點就是整個程式的  code flow 被導向了一個未被我們預期的方向，
而原因分析起來，則是因為有一個 Thread 無法被好好的 interrupted 掉。
這個結果再加上不足夠的 error handle，就很足夠造成一些很難以分析的問題了。

舉個例子，你可能在 interrupted 的時後會做某些事情，但卻晚做了，造成了 null pointer exception。

那，回到正題，一切的一切都是源至於 Thread 不肯乖乖的被 Interrupted 掉，Why?

在看完整個 
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/0VarXkpbjNrcpNU98pEdljG7xII/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/0VarXkpbjNrcpNU98pEdljG7xII/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/0VarXkpbjNrcpNU98pEdljG7xII/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/0VarXkpbjNrcpNU98pEdljG7xII/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Lucifer-Heosphoros/~4/ogx3nAiRRjo" height="1" width="1"/&gt;</content><feedburner:origLink>http://lak4cyut.blogspot.com/2011/11/android-tips-thread-interrupted.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CU8DQXk5eip7ImA9WhdaGEo.&quot;"><id>tag:blogger.com,1999:blog-2525938585642818417.post-7479784793208603467</id><published>2011-10-29T15:37:00.001+08:00</published><updated>2011-10-29T15:37:50.722+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-10-29T15:37:50.722+08:00</app:edited><title>[自創] 忍者相機新功能追加</title><link rel="replies" type="application/atom+xml" href="http://lak4cyut.blogspot.com/feeds/7479784793208603467/comments/default" title="張貼意見" /><link rel="replies" type="text/html" href="http://lak4cyut.blogspot.com/2011/10/blog-post.html#comment-form" title="4 個意見" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2525938585642818417/posts/default/7479784793208603467?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2525938585642818417/posts/default/7479784793208603467?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Lucifer-Heosphoros/~3/2gZBTtn1j5I/blog-post.html" title="[自創] 忍者相機新功能追加" /><author><name>Lak Fu</name><uri>https://profiles.google.com/100719355520660151286</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-KhM_1sniceE/AAAAAAAAAAI/AAAAAAAAAKo/qfjAZlQNdvM/s512-c/photo.jpg" /></author><thr:total>4</thr:total><content type="html">雖然這個功能還沒正式上架 (10/29)，但這個功能已經在測試中了！
舒服呀！！


這次，追加的這個新功能完全沒有在預計的開發行程中。
會跑出這功能是因為和一位好友 - Ray 在 MSN 上聊天，他提到不知道能不能像 ICS 一樣，
在 Lock screen 直接開啟相機，才讓我忍不住又開工追加了這個功能。

相信說到這裡，大家都知道新功能是什麼了！
直接在 Lock Screen 進入相機程式！！！

目前完整功能都還在測試中，希望之後這個新功能可以令大家滿意。

如果對忍者相機有任何的建意，都歡迎大家多多留言。
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/ayZ7zYaZWp5CEf6CkcpFWk9gmOo/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/ayZ7zYaZWp5CEf6CkcpFWk9gmOo/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/ayZ7zYaZWp5CEf6CkcpFWk9gmOo/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/ayZ7zYaZWp5CEf6CkcpFWk9gmOo/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Lucifer-Heosphoros/~4/2gZBTtn1j5I" height="1" width="1"/&gt;</content><feedburner:origLink>http://lak4cyut.blogspot.com/2011/10/blog-post.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUICQHc8eSp7ImA9WhdTFEk.&quot;"><id>tag:blogger.com,1999:blog-2525938585642818417.post-3543436955793024366</id><published>2011-06-30T22:58:00.004+08:00</published><updated>2011-07-12T13:12:41.971+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-07-12T13:12:41.971+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="專業？" /><category scheme="http://www.blogger.com/atom/ns#" term="Android" /><title>Android Tips 開發小技巧 － 保護你的程式 By ProGuard</title><link rel="replies" type="application/atom+xml" href="http://lak4cyut.blogspot.com/feeds/3543436955793024366/comments/default" title="張貼意見" /><link rel="replies" type="text/html" href="http://lak4cyut.blogspot.com/2011/06/android-tips-by-proguard.html#comment-form" title="0 個意見" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2525938585642818417/posts/default/3543436955793024366?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2525938585642818417/posts/default/3543436955793024366?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Lucifer-Heosphoros/~3/YNXDxGHCZIU/android-tips-by-proguard.html" title="Android Tips 開發小技巧 － 保護你的程式 By ProGuard" /><author><name>Lak Fu</name><uri>https://profiles.google.com/100719355520660151286</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-KhM_1sniceE/AAAAAAAAAAI/AAAAAAAAAKo/qfjAZlQNdvM/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/-ZwCDBUH5hO4/ThW8eaii87I/AAAAAAAAAGs/dyTsEkH-VZI/s72-c/%25E6%2595%2599%25E5%25AD%25B8%25E5%259C%2596.jpg" height="72" width="72" /><thr:total>0</thr:total><content type="html">今天，來講點簡單又不簡單的小東西。   
用Java開發程式，其中一個比較麻煩也一直被討論的重點是被破解。   
而其實Java程式的反編譯程式幾乎是隨手可得的。   
在這種環境底上，程式設計師們還是需要學一些基本的手段來「盡可能」的保護一下自己。   


這篇文章要講的不是多高深多了不起的技巧，我個人不是專門研究破解及反破解等相關問題的人士。   
主要的目地是把 Android Developers 上面所教的，簡單的混淆編碼方式告訴大家。   

雖然不是什麼很了不起的保護，但，起碼是個開始，如果有興趣的朋友，也許可以繼續的研究下去，   
也其待有網友分享更好的方法。   

在Android Developer網站上面提到，假設是利用 Eclipse 來做開發，在開啟新專案後，都會出現一個檔案叫 proguard.cfg。它裡面包含了最簡單的混淆機制，基本上，
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/DH_O8q_2oTAnwCIRKBBLf5FyQMU/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/DH_O8q_2oTAnwCIRKBBLf5FyQMU/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/DH_O8q_2oTAnwCIRKBBLf5FyQMU/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/DH_O8q_2oTAnwCIRKBBLf5FyQMU/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Lucifer-Heosphoros/~4/YNXDxGHCZIU" height="1" width="1"/&gt;</content><feedburner:origLink>http://lak4cyut.blogspot.com/2011/06/android-tips-by-proguard.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkcDQ3g9eip7ImA9WhRXFE0.&quot;"><id>tag:blogger.com,1999:blog-2525938585642818417.post-723994076460969142</id><published>2011-06-01T16:08:00.002+08:00</published><updated>2011-12-21T00:54:32.662+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-12-21T00:54:32.662+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Java" /><category scheme="http://www.blogger.com/atom/ns#" term="專業？" /><category scheme="http://www.blogger.com/atom/ns#" term="Android" /><title>[自創] Android 軟體分享 - 忍者相機 Ninja Camera</title><link rel="replies" type="application/atom+xml" href="http://lak4cyut.blogspot.com/feeds/723994076460969142/comments/default" title="張貼意見" /><link rel="replies" type="text/html" href="http://lak4cyut.blogspot.com/2011/06/android-ninja-camera.html#comment-form" title="19 個意見" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2525938585642818417/posts/default/723994076460969142?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2525938585642818417/posts/default/723994076460969142?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Lucifer-Heosphoros/~3/hPEOxr2Ztwo/android-ninja-camera.html" title="[自創] Android 軟體分享 - 忍者相機 Ninja Camera" /><author><name>Lak Fu</name><uri>https://profiles.google.com/100719355520660151286</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-KhM_1sniceE/AAAAAAAAAAI/AAAAAAAAAKo/qfjAZlQNdvM/s512-c/photo.jpg" /></author><thr:total>19</thr:total><content type="html">今天跟大家分享一下小弟的一個自製軟體 - 忍者相機。
Market 的網址：https://market.android.com/details?id=com.lak.android.ninja&amp;amp;feature=search_result
主要的特色/包括以下：
．提供雙操作模式，包括「一般模式」及「桌面模式」
．桌面直接拍照/錄影
．自動切換背景錄影，錄影不會因為電話或者其他程式而中斷
．一般模式下，可無縫切換拍照/錄影(在畫面上左右滑動就可以切換)
．簡單的操作介面，讓預覽視窗盡可能最大化
．提供簡單的檔案管理，方便管理照片/影片


會寫這套軟體最主要是因為覺得目前市面上的間諜相機都做的讓自己不滿意，
多數還是需要進到程式之中，才能去開啟相機的功能。

而很多時間往往就是電光石火的一瞬間我需要拍照呀！
所以我寫了「忍者相機」，可以利用桌面小工具(Widget)來進行拍照及錄影的功能
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/TSpyfyKnM-ExlALlY3ol3y-N49c/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/TSpyfyKnM-ExlALlY3ol3y-N49c/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/TSpyfyKnM-ExlALlY3ol3y-N49c/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/TSpyfyKnM-ExlALlY3ol3y-N49c/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Lucifer-Heosphoros/~4/hPEOxr2Ztwo" height="1" width="1"/&gt;</content><feedburner:origLink>http://lak4cyut.blogspot.com/2011/06/android-ninja-camera.html</feedburner:origLink><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="enclosure" href="http://feedproxy.google.com/~r/Lucifer-Heosphoros/~5/Z6jX1vFPUo4/details" length="0" /><feedburner:origEnclosureLink>https://market.android.com/details?id=com.lak.android.ninja&amp;feature=search_result</feedburner:origEnclosureLink></entry><entry gd:etag="W/&quot;D08AQXk9fyp7ImA9WhdSEUs.&quot;"><id>tag:blogger.com,1999:blog-2525938585642818417.post-155074989319276522</id><published>2011-03-13T13:36:00.002+08:00</published><updated>2011-07-20T20:44:00.767+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-07-20T20:44:00.767+08:00</app:edited><title>Android Tips 開發小技巧 － 動態產生 ListPreference 選項</title><link rel="replies" type="application/atom+xml" href="http://lak4cyut.blogspot.com/feeds/155074989319276522/comments/default" title="張貼意見" /><link rel="replies" type="text/html" href="http://lak4cyut.blogspot.com/2011/03/android-tips-listpreference.html#comment-form" title="0 個意見" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2525938585642818417/posts/default/155074989319276522?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2525938585642818417/posts/default/155074989319276522?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Lucifer-Heosphoros/~3/nBPixkFRRSo/android-tips-listpreference.html" title="Android Tips 開發小技巧 － 動態產生 ListPreference 選項" /><author><name>Lak Fu</name><uri>https://profiles.google.com/100719355520660151286</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-KhM_1sniceE/AAAAAAAAAAI/AAAAAAAAAKo/qfjAZlQNdvM/s512-c/photo.jpg" /></author><thr:total>0</thr:total><content type="html">因為一些原因，我必需要寫一個動態的 Preference Screen，裡面的某幾個 Preference 需要依 Device 支援的程度，來顯示選項及預設值。    
我本來以為這是一個簡單的工作…  


依照我的預求，我很自然的寫了以下的程式碼：   

    pref = (ListPreference)findPreference(KEY_PREFERENCE);   
    pref.setEntries(itemMaker());   
    pref.setEntryValues(valueMaker());   
    pref.setDefaultValue(valueMaker()[0]);   
    pref.setSummary(pref.getEntry());   
    pref.setOnPreferenceChangeListener(
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/kbRtWlx0JTX8Rk5AdFBxGsWFs1A/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/kbRtWlx0JTX8Rk5AdFBxGsWFs1A/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/kbRtWlx0JTX8Rk5AdFBxGsWFs1A/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/kbRtWlx0JTX8Rk5AdFBxGsWFs1A/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Lucifer-Heosphoros/~4/nBPixkFRRSo" height="1" width="1"/&gt;</content><feedburner:origLink>http://lak4cyut.blogspot.com/2011/03/android-tips-listpreference.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkIMQ3o-fSp7ImA9Wx9bGUU.&quot;"><id>tag:blogger.com,1999:blog-2525938585642818417.post-5530571554537107819</id><published>2011-03-01T01:35:00.007+08:00</published><updated>2011-03-01T22:09:42.455+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-03-01T22:09:42.455+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="專業？" /><category scheme="http://www.blogger.com/atom/ns#" term="Android" /><title>Android Tips 開發小技巧 － Activity.runOnUiThread</title><link rel="replies" type="application/atom+xml" href="http://lak4cyut.blogspot.com/feeds/5530571554537107819/comments/default" title="張貼意見" /><link rel="replies" type="text/html" href="http://lak4cyut.blogspot.com/2011/03/android-tip-activityrunonuithread.html#comment-form" title="0 個意見" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2525938585642818417/posts/default/5530571554537107819?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2525938585642818417/posts/default/5530571554537107819?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Lucifer-Heosphoros/~3/5PXS1FBHe3o/android-tip-activityrunonuithread.html" title="Android Tips 開發小技巧 － Activity.runOnUiThread" /><author><name>Lak Fu</name><uri>https://profiles.google.com/100719355520660151286</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-KhM_1sniceE/AAAAAAAAAAI/AAAAAAAAAKo/qfjAZlQNdvM/s512-c/photo.jpg" /></author><thr:total>0</thr:total><content type="html">真的只能說，偷懶，的的確確是人類進步的原動力。    
上一篇我們討論到有關於 Handler 和 UI thread 的關係，     
這一次，我們介紹更簡單方便的小工具，讓你來更新你的 UI。


Handler 的確是很好用的東西，但有的時後，我們只是希望更新一下 UI 的畫面，其實做的事情非常單純，就像上一篇舉出來的例子一樣..
    
Handler mHandler = new Handler();     
       .     
       ....     
       .     
    mHandler.post(new Runnable() {     
        public void run()     
        {     
            TextView textBox= (TextView)getViewById(
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/xM10c-gYfZWc90SIR0ai2k9oEOg/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/xM10c-gYfZWc90SIR0ai2k9oEOg/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/xM10c-gYfZWc90SIR0ai2k9oEOg/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/xM10c-gYfZWc90SIR0ai2k9oEOg/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Lucifer-Heosphoros/~4/5PXS1FBHe3o" height="1" width="1"/&gt;</content><feedburner:origLink>http://lak4cyut.blogspot.com/2011/03/android-tip-activityrunonuithread.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkENQXo6eSp7ImA9WhdRF0U.&quot;"><id>tag:blogger.com,1999:blog-2525938585642818417.post-9075028769968724694</id><published>2011-02-25T12:55:00.007+08:00</published><updated>2011-08-08T13:18:10.411+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-08-08T13:18:10.411+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Java" /><category scheme="http://www.blogger.com/atom/ns#" term="專業？" /><category scheme="http://www.blogger.com/atom/ns#" term="Android" /><title>Android Tips 開發小技巧 － Handler.post</title><link rel="replies" type="application/atom+xml" href="http://lak4cyut.blogspot.com/feeds/9075028769968724694/comments/default" title="張貼意見" /><link rel="replies" type="text/html" href="http://lak4cyut.blogspot.com/2011/02/android-tip-handlerpost.html#comment-form" title="0 個意見" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2525938585642818417/posts/default/9075028769968724694?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2525938585642818417/posts/default/9075028769968724694?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Lucifer-Heosphoros/~3/HpOfQ-Vo188/android-tip-handlerpost.html" title="Android Tips 開發小技巧 － Handler.post" /><author><name>Lak Fu</name><uri>https://profiles.google.com/100719355520660151286</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-KhM_1sniceE/AAAAAAAAAAI/AAAAAAAAAKo/qfjAZlQNdvM/s512-c/photo.jpg" /></author><thr:total>0</thr:total><content type="html">剛接觸 Android 程式開發的人，往往容易寫出會讓整個程式停下來的 Code，
而大多數的原因其實都很單純，就只是因為你放了loading太重的程式碼在 Main thread 中，
我們可以用很簡單的方法來解決這個問題。


在 Android 的官網有很明確的定義 （通常有些特別的 API 也會在 references 中注明)，
和UI有關的任何更新及操作，都需要在UI thread完成，一般就是 Main thread。

然而當 Main thread 被某一段程式碼給綁架（花許多時間處理一段程式 ex: 很大圈的 loop)之後，你的 UI 就自然而然的無法進行更新重畫的動作。
所以，假設你的程式需要大量的計算，請習慣開一個 Thread 去處理它。

但這時後卻又會碰到一個問題。
那假設我的程式碼需要大量時間處理，但處理完之後又要控制 UI 產生對應的動作呢？
（
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/oUGcxcKGg5lDVK6vKE038BdSpMc/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/oUGcxcKGg5lDVK6vKE038BdSpMc/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/oUGcxcKGg5lDVK6vKE038BdSpMc/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/oUGcxcKGg5lDVK6vKE038BdSpMc/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Lucifer-Heosphoros/~4/HpOfQ-Vo188" height="1" width="1"/&gt;</content><feedburner:origLink>http://lak4cyut.blogspot.com/2011/02/android-tip-handlerpost.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEICQ3g-fSp7ImA9WhdSEUs.&quot;"><id>tag:blogger.com,1999:blog-2525938585642818417.post-9092735618010960405</id><published>2011-02-24T19:20:00.012+08:00</published><updated>2011-07-20T20:56:02.655+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-07-20T20:56:02.655+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Java" /><category scheme="http://www.blogger.com/atom/ns#" term="專業？" /><category scheme="http://www.blogger.com/atom/ns#" term="Android" /><title>[Java] Android 簡單的計時器程式分享 - Simple Timer</title><link rel="replies" type="application/atom+xml" href="http://lak4cyut.blogspot.com/feeds/9092735618010960405/comments/default" title="張貼意見" /><link rel="replies" type="text/html" href="http://lak4cyut.blogspot.com/2011/02/java-android-sample-timer.html#comment-form" title="0 個意見" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2525938585642818417/posts/default/9092735618010960405?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2525938585642818417/posts/default/9092735618010960405?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Lucifer-Heosphoros/~3/RUWYQlcplmw/java-android-sample-timer.html" title="[Java] Android 簡單的計時器程式分享 - Simple Timer" /><author><name>Lak Fu</name><uri>https://profiles.google.com/100719355520660151286</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-KhM_1sniceE/AAAAAAAAAAI/AAAAAAAAAKo/qfjAZlQNdvM/s512-c/photo.jpg" /></author><thr:total>0</thr:total><content type="html">最近在修改一些前人寫的 Code，越改越是沒力。
看到了一段很爛的計時器寫法，我終於受不了而抓狂了.......

下面分享我個人改寫的版本，適用於 Android，
但經過小修改，應該任何 Java 程式都可以用。

以下是在Android上寫的一個 Sample Code。
點擊數字則開始計時，再點停止。

只用了一點 Android 上的小東西，重要的部份都是利用 Java library 做的，
有興趣的人自己參考囉..

p.s 因為不想貼太多 code，所以元件的部份我就沒有用XML產生了，
真的想拿去用的人，還是建議不要直接建構元件來用。

package com.lak.android.sample;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.TimeZone;

&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/4zx0b5TcRDFn3858_pzTujKyOPE/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/4zx0b5TcRDFn3858_pzTujKyOPE/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/4zx0b5TcRDFn3858_pzTujKyOPE/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/4zx0b5TcRDFn3858_pzTujKyOPE/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Lucifer-Heosphoros/~4/RUWYQlcplmw" height="1" width="1"/&gt;</content><feedburner:origLink>http://lak4cyut.blogspot.com/2011/02/java-android-sample-timer.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEcDRX87eyp7ImA9Wx9bFUw.&quot;"><id>tag:blogger.com,1999:blog-2525938585642818417.post-3957706355350786870</id><published>2011-02-23T12:18:00.020+08:00</published><updated>2011-02-24T10:54:34.103+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-02-24T10:54:34.103+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="專業？" /><category scheme="http://www.blogger.com/atom/ns#" term="Android" /><title>Introduction to Android Dalvik - Dalvik 簡介</title><link rel="replies" type="application/atom+xml" href="http://lak4cyut.blogspot.com/feeds/3957706355350786870/comments/default" title="張貼意見" /><link rel="replies" type="text/html" href="http://lak4cyut.blogspot.com/2011/02/introduction-to-android-dalvik.html#comment-form" title="0 個意見" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2525938585642818417/posts/default/3957706355350786870?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2525938585642818417/posts/default/3957706355350786870?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Lucifer-Heosphoros/~3/eL5Ag5_LcAQ/introduction-to-android-dalvik.html" title="Introduction to Android Dalvik - Dalvik 簡介" /><author><name>Lak Fu</name><uri>https://profiles.google.com/100719355520660151286</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-KhM_1sniceE/AAAAAAAAAAI/AAAAAAAAAKo/qfjAZlQNdvM/s512-c/photo.jpg" /></author><thr:total>0</thr:total><content type="html">很久沒寫東西了，研究 Android 也大概一年的時間，
在網路上找到了不少資料，也自己研究了不少，想想，也是到了該回饋這社會的時候了。
首先，我想先來討論一下在 Android 中 Dalvik 所辨演的角色。有興趣的人也歡迎指教。


什麼是 Dalvik？簡單說，就是在Android上面運行的 Java VM。
它使用 Harmony 的 一個子集做為 Core Class library，再加上 Google 本身依據 Android 平台所做的調整。
所以在網路上爾偶會看到所謂的 “目前最先進的 Java VM" 之言，我是持保留態度的。畢竟在 Dalvik 裡面，沒有看到什麼先進的 GC 技術，沒記錯了話，JIT 也是 2.2 Froyo 之後才加進來的，說實話這真的不是什麼所謂的最先進技術。
但它的確是為了 Android 而開發的，許多小地方還是有它的巧思在，
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/JvI0fsgQMx_pukCf713mDnEJi5Y/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/JvI0fsgQMx_pukCf713mDnEJi5Y/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/JvI0fsgQMx_pukCf713mDnEJi5Y/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/JvI0fsgQMx_pukCf713mDnEJi5Y/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Lucifer-Heosphoros/~4/eL5Ag5_LcAQ" height="1" width="1"/&gt;</content><feedburner:origLink>http://lak4cyut.blogspot.com/2011/02/introduction-to-android-dalvik.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkYHQ3w4cSp7ImA9Wx9bFEg.&quot;"><id>tag:blogger.com,1999:blog-2525938585642818417.post-5525822502862157941</id><published>2009-04-09T17:21:00.002+08:00</published><updated>2011-02-23T18:48:52.239+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-02-23T18:48:52.239+08:00</app:edited><title>How to generate the .rel file with VS2005</title><link rel="replies" type="application/atom+xml" href="http://lak4cyut.blogspot.com/feeds/5525822502862157941/comments/default" title="張貼意見" /><link rel="replies" type="text/html" href="http://lak4cyut.blogspot.com/2009/04/how-to-generate-ril-file-with-vs2005.html#comment-form" title="1 個意見" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2525938585642818417/posts/default/5525822502862157941?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2525938585642818417/posts/default/5525822502862157941?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Lucifer-Heosphoros/~3/Y6rCIK559Lc/how-to-generate-ril-file-with-vs2005.html" title="How to generate the .rel file with VS2005" /><author><name>Lak Fu</name><uri>https://profiles.google.com/100719355520660151286</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-KhM_1sniceE/AAAAAAAAAAI/AAAAAAAAAKo/qfjAZlQNdvM/s512-c/photo.jpg" /></author><thr:total>1</thr:total><content type="html">今天老大交待了份工作   
聽說是要找出 generate 一個副檔名 .ril 的 file 的方法   
嗯…找了之後才發現，原來還有玄機…
   

由於在 Windows Mobile 6.5 之後，賣個沙發為了改善slot 0, 1 的 memory 使用問題，於是搞出了個 slot 60, 61 來分擔 Slot 0, 1 的負載。   

好吧，好玩的地方來了..   

什麼樣的 DLL 會被丟到那二間新房間咧？   

附上 .rel 檔就是其中的一個絛件啦..   
而且，那二間房間的最低空間是以 4KB 來算，怎麼算都比較省。   

好，廢話不多說，馬上開始找，一開始，是找到了以下的 Linker Option，   

/savebaserelocations:FileName   

但，試了半天後，有一種被豪姣的感覺..  =.=+   
.rel 
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/NDf01y69pvbVdoKz8NeQ2_VoNLU/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/NDf01y69pvbVdoKz8NeQ2_VoNLU/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/NDf01y69pvbVdoKz8NeQ2_VoNLU/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/NDf01y69pvbVdoKz8NeQ2_VoNLU/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Lucifer-Heosphoros/~4/Y6rCIK559Lc" height="1" width="1"/&gt;</content><feedburner:origLink>http://lak4cyut.blogspot.com/2009/04/how-to-generate-ril-file-with-vs2005.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkYBSX8_eSp7ImA9Wx9bFEg.&quot;"><id>tag:blogger.com,1999:blog-2525938585642818417.post-1312213970796392693</id><published>2009-04-01T09:33:00.003+08:00</published><updated>2011-02-23T18:49:18.141+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-02-23T18:49:18.141+08:00</app:edited><title>心．動</title><link rel="replies" type="application/atom+xml" href="http://lak4cyut.blogspot.com/feeds/1312213970796392693/comments/default" title="張貼意見" /><link rel="replies" type="text/html" href="http://lak4cyut.blogspot.com/2009/04/blog-post.html#comment-form" title="0 個意見" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2525938585642818417/posts/default/1312213970796392693?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2525938585642818417/posts/default/1312213970796392693?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Lucifer-Heosphoros/~3/9A-g79U-Rxw/blog-post.html" title="心．動" /><author><name>Lak Fu</name><uri>https://profiles.google.com/100719355520660151286</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-KhM_1sniceE/AAAAAAAAAAI/AAAAAAAAAKo/qfjAZlQNdvM/s512-c/photo.jpg" /></author><thr:total>0</thr:total><content type="html">感情很奇妙，它可以被不知不覺的引導   

但卻很難在刻意的情況下被控制

眼淚很神奇

很多時後，你都會覺得已到到了極限   
但就是流不出來   

卻又在已經平淡的情境下   
不經意的觸發了心中的感動，而無法停止的流下   

大喇喇的告訴自己，你在乎   

過去了，又悄悄的收起來，然後藏在更深的地方   
更深更深更難被觸發的角落   

每個人面對的都是自己想對面的一面   
但卻會無條件的感受身邊所發生的一切   

這一切的感受都會在心中，默默的引導著自己   

做出選擇   
做出改變   

但引導總是緩慢且不自覺的   

當你看見了一個選擇，看見了一個改變   
你希望往那個方向走，卻往往因為刻意而失敗   

想起王牌天神   
你能擁有一切，你能做到任何事   
但就算你能洞察看透理解這世上的一切   
包括每個人的想法   

你還是不能控制人心   

&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/sEvCKGHlMgU11i9Io7hU9zhjWEQ/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/sEvCKGHlMgU11i9Io7hU9zhjWEQ/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/sEvCKGHlMgU11i9Io7hU9zhjWEQ/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/sEvCKGHlMgU11i9Io7hU9zhjWEQ/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Lucifer-Heosphoros/~4/9A-g79U-Rxw" height="1" width="1"/&gt;</content><feedburner:origLink>http://lak4cyut.blogspot.com/2009/04/blog-post.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkcNQ3g-fSp7ImA9Wx9bFEg.&quot;"><id>tag:blogger.com,1999:blog-2525938585642818417.post-2275971438662698128</id><published>2009-03-29T15:05:00.004+08:00</published><updated>2011-02-23T18:48:12.655+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-02-23T18:48:12.655+08:00</app:edited><title>感謝九把刀</title><link rel="replies" type="application/atom+xml" href="http://lak4cyut.blogspot.com/feeds/2275971438662698128/comments/default" title="張貼意見" /><link rel="replies" type="text/html" href="http://lak4cyut.blogspot.com/2009/03/blog-post_29.html#comment-form" title="0 個意見" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2525938585642818417/posts/default/2275971438662698128?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2525938585642818417/posts/default/2275971438662698128?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Lucifer-Heosphoros/~3/pv2zgccbzxc/blog-post_29.html" title="感謝九把刀" /><author><name>Lak Fu</name><uri>https://profiles.google.com/100719355520660151286</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-KhM_1sniceE/AAAAAAAAAAI/AAAAAAAAAKo/qfjAZlQNdvM/s512-c/photo.jpg" /></author><thr:total>0</thr:total><content type="html">二個一模一樣的保特瓶   
一瓶裝了滿滿的水   
一瓶卻空空如也   

其實看起來一樣   
不是嗎

到底是滿的，或者是沒有。

除非你拿起來，感受它的重量。   

碰到了難關，發現了問題，   
急急忙忙的找尋正確的答案，找尋自己。   

其實我空掉了，就像保特瓶，空掉了，   
看起來就是沒什兩樣。   

但拿在手上，就是虛，就是輕，就是沒有份量。   

很白痴的虛張聲勢，背地裡偷偷的找自己   

自以為最熟悉的環境？夜店？   

自以為最熟悉的生活？放縱？   

自以為最熟悉的態度？耍屌？   

難怪一直怪怪的，這是我嗎？   
是，但這些東西都不是水，   

只是瓶子上面的包裝紙，只是瓶子上面寫的字。   
貼再多，寫再多，你他媽的還是空的。   

空到連我心中最深的哀傷都空掉了。   

那，水在那裡？   

仔細想想自己的人生，是從那裡開始的？
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/ZgEavo-etLWCp_dsPeDAyqZalZw/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/ZgEavo-etLWCp_dsPeDAyqZalZw/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/ZgEavo-etLWCp_dsPeDAyqZalZw/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/ZgEavo-etLWCp_dsPeDAyqZalZw/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Lucifer-Heosphoros/~4/pv2zgccbzxc" height="1" width="1"/&gt;</content><feedburner:origLink>http://lak4cyut.blogspot.com/2009/03/blog-post_29.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkMMQX4-eCp7ImA9Wx9bFEg.&quot;"><id>tag:blogger.com,1999:blog-2525938585642818417.post-1459032287886831314</id><published>2009-03-03T20:30:00.004+08:00</published><updated>2011-02-23T18:54:40.050+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-02-23T18:54:40.050+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="人生觀" /><title>初衷</title><link rel="replies" type="application/atom+xml" href="http://lak4cyut.blogspot.com/feeds/1459032287886831314/comments/default" title="張貼意見" /><link rel="replies" type="text/html" href="http://lak4cyut.blogspot.com/2009/03/blog-post.html#comment-form" title="0 個意見" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2525938585642818417/posts/default/1459032287886831314?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2525938585642818417/posts/default/1459032287886831314?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Lucifer-Heosphoros/~3/LE6d6qeSFVM/blog-post.html" title="初衷" /><author><name>Lak Fu</name><uri>https://profiles.google.com/100719355520660151286</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-KhM_1sniceE/AAAAAAAAAAI/AAAAAAAAAKo/qfjAZlQNdvM/s512-c/photo.jpg" /></author><thr:total>0</thr:total><content type="html">很容易迷失，因為人會想太多。   

但也幸好人類會書寫，所以可以記錄回頭的方向。

看了自己以前的文章，一字一句的感受。   

著相這種東西，往往是不知不覺的，   
而當你著了相，想要脫身更是不易。   

因為這時的你做了什麼都是以相為出發點，   
有跡可尋，不再了無牽掛。   

靜下來，是最重要也最難得的。   

有欲無求，才是最佳的身心狀態。   
看了自己以前的文章，也許能慢慢的感受到些什麼吧。   

夢中情人   

很久沒看了，看完後，吸了口氣，   
看見了有欲無求的自己。   

也許某些人變成了我的夢中情人，   
也許到最後和我在一起的人變成了我的夢中情人。   

但那都不應該改變我對生活的態度。   

吸引一個人靠近，靠的不是幽默，靠的不是金錢，   
不是關懷，也不是溺愛。   

而是讓他打從心底的被你的生活態度給吸引，   

&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/4pVdXqYkB-73zVrPUVU0TOPefDw/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/4pVdXqYkB-73zVrPUVU0TOPefDw/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/4pVdXqYkB-73zVrPUVU0TOPefDw/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/4pVdXqYkB-73zVrPUVU0TOPefDw/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Lucifer-Heosphoros/~4/LE6d6qeSFVM" height="1" width="1"/&gt;</content><feedburner:origLink>http://lak4cyut.blogspot.com/2009/03/blog-post.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkcBQ3oyeip7ImA9WxVbE0U.&quot;"><id>tag:blogger.com,1999:blog-2525938585642818417.post-1022480929417526870</id><published>2009-02-13T13:11:00.003+08:00</published><updated>2009-03-30T12:40:52.492+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-03-30T12:40:52.492+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="人生觀" /><title>害怕</title><link rel="replies" type="application/atom+xml" href="http://lak4cyut.blogspot.com/feeds/1022480929417526870/comments/default" title="張貼意見" /><link rel="replies" type="text/html" href="http://lak4cyut.blogspot.com/2009/02/blog-post_13.html#comment-form" title="0 個意見" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2525938585642818417/posts/default/1022480929417526870?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2525938585642818417/posts/default/1022480929417526870?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Lucifer-Heosphoros/~3/n8PCN45tmKc/blog-post_13.html" title="害怕" /><author><name>Lak Fu</name><uri>https://profiles.google.com/100719355520660151286</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-KhM_1sniceE/AAAAAAAAAAI/AAAAAAAAAKo/qfjAZlQNdvM/s512-c/photo.jpg" /></author><thr:total>0</thr:total><content type="html">人總是會有低潮期..  需要多久..如何走出來..都是問題..  但最大的問題是..    知道自己在低潮..    當人在自己茫然時，往往會做出一些所謂的「改變」..  自以為盡了很多力，去做很多事..    但其實只是一種不知所措的反射而以..    到頭來，還是得面對自己，  有人選擇就此改變，有人選擇回到過去..    而我則是想把事情搞清楚..    把以前所有對別人說過的話對自己講一次..  仔細的回想自己做過的每一件事，  下的每一個決定..    回憶自己的一言一行是一件很有趣的事..  慢慢了解到自己以前的身影..    也發現到，當別人還追著我的身影跑的時後，  我卻自己悄悄的走上了其他的路而不自覺..    我喜不喜歡這樣呢？其實也還好..  不過我感謝妳讓我發現了這件事..    在一連串的思考中，我發現了最讓我不開心的一點..    我的字典裡出現了「害怕」
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/JkWuYqihCCUv4JJ-VnxUi0GqkG8/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/JkWuYqihCCUv4JJ-VnxUi0GqkG8/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/JkWuYqihCCUv4JJ-VnxUi0GqkG8/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/JkWuYqihCCUv4JJ-VnxUi0GqkG8/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Lucifer-Heosphoros/~4/n8PCN45tmKc" height="1" width="1"/&gt;</content><feedburner:origLink>http://lak4cyut.blogspot.com/2009/02/blog-post_13.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEcGRXoyeip7ImA9WxVXEkU.&quot;"><id>tag:blogger.com,1999:blog-2525938585642818417.post-7463354717906614055</id><published>2009-02-10T23:40:00.003+08:00</published><updated>2009-02-11T00:07:04.492+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-02-11T00:07:04.492+08:00</app:edited><title>一首歌</title><link rel="replies" type="application/atom+xml" href="http://lak4cyut.blogspot.com/feeds/7463354717906614055/comments/default" title="張貼意見" /><link rel="replies" type="text/html" href="http://lak4cyut.blogspot.com/2009/02/blog-post_10.html#comment-form" title="0 個意見" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2525938585642818417/posts/default/7463354717906614055?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2525938585642818417/posts/default/7463354717906614055?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Lucifer-Heosphoros/~3/IHsEbrUlO04/blog-post_10.html" title="一首歌" /><author><name>Lak Fu</name><uri>https://profiles.google.com/100719355520660151286</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-KhM_1sniceE/AAAAAAAAAAI/AAAAAAAAAKo/qfjAZlQNdvM/s512-c/photo.jpg" /></author><thr:total>0</thr:total><content type="html">只是一首歌..一首我以前唱的很好，現在唱的很有感情的歌..願我的歌聲傳到天際..Superwoman唱了它那麼多次..第一次看完 MV .. 看到劇中人的對白 ..才發現為什麼自己會在不知不覺中這麼喜歡這首歌..=================================================SuperwomanEarly in the morning, I put breakfast at your table一夜都沒睡但我　不曾如此清醒我早餐準備了妳　愛吃的東西這次換我等妳被咖啡　的香味叫醒想要找回每天早晨　對我微笑著的妳還能夠　做些什麼代替我的歉意總是望著我　小心翼翼順著我呼吸而我竟然理所當然　讓妳精疲力盡＊You were my superwoman　安靜的在身邊　無條件給我　夢寐以求的溫柔　But I am only human　我怎麼不懂妳多寂寞　殘忍的犯了錯
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/0a52UQvHomgmDlgbffoxLm2yxVY/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/0a52UQvHomgmDlgbffoxLm2yxVY/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/0a52UQvHomgmDlgbffoxLm2yxVY/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/0a52UQvHomgmDlgbffoxLm2yxVY/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Lucifer-Heosphoros/~4/IHsEbrUlO04" height="1" width="1"/&gt;</content><feedburner:origLink>http://lak4cyut.blogspot.com/2009/02/blog-post_10.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkQER387eyp7ImA9Wx9bFEg.&quot;"><id>tag:blogger.com,1999:blog-2525938585642818417.post-5448999352973661220</id><published>2009-02-09T23:46:00.003+08:00</published><updated>2011-02-23T18:51:46.103+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-02-23T18:51:46.103+08:00</app:edited><title>King &amp; Throne</title><link rel="replies" type="application/atom+xml" href="http://lak4cyut.blogspot.com/feeds/5448999352973661220/comments/default" title="張貼意見" /><link rel="replies" type="text/html" href="http://lak4cyut.blogspot.com/2009/02/king-throne.html#comment-form" title="0 個意見" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2525938585642818417/posts/default/5448999352973661220?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2525938585642818417/posts/default/5448999352973661220?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Lucifer-Heosphoros/~3/IkL-KeybyVM/king-throne.html" title="King &amp; Throne" /><author><name>Lak Fu</name><uri>https://profiles.google.com/100719355520660151286</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-KhM_1sniceE/AAAAAAAAAAI/AAAAAAAAAKo/qfjAZlQNdvM/s512-c/photo.jpg" /></author><thr:total>0</thr:total><content type="html">一個在我生命中很要好的朋友..

講了一個小故事..短短的幾句話..

她說..

====================================

你們這些在感情中佔上風的人就像坐在王座上的國王..

永遠不知道旁邊的人站的有多酸..

也許人家站累了，想坐下來了..

============================================

但事實是什麼呢？
只有我自己最清楚..

Where is the king...這才是重點..

一直以為我變了，繞了一大圈才發現..
不是我變了，只是我在乎的東西多了一些..

到頭來，還是只發現，我會做的就是這些，
我畢竟還是只會做我自己，只能給這麼多..

一條一直存在的臨界線..
也許就在不遠的地方了..
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/oVZgi5TTFsz0z-3LgmapoBYJDoc/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/oVZgi5TTFsz0z-3LgmapoBYJDoc/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/oVZgi5TTFsz0z-3LgmapoBYJDoc/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/oVZgi5TTFsz0z-3LgmapoBYJDoc/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Lucifer-Heosphoros/~4/IkL-KeybyVM" height="1" width="1"/&gt;</content><feedburner:origLink>http://lak4cyut.blogspot.com/2009/02/king-throne.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEEERX8-eSp7ImA9WxRXFkU.&quot;"><id>tag:blogger.com,1999:blog-2525938585642818417.post-3140578058679059877</id><published>2008-10-21T22:24:00.001+08:00</published><updated>2008-10-22T22:43:24.151+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-10-22T22:43:24.151+08:00</app:edited><title>暴力！就是流氓！</title><link rel="replies" type="application/atom+xml" href="http://lak4cyut.blogspot.com/feeds/3140578058679059877/comments/default" title="張貼意見" /><link rel="replies" type="text/html" href="http://lak4cyut.blogspot.com/2008/10/blog-post.html#comment-form" title="1 個意見" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2525938585642818417/posts/default/3140578058679059877?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2525938585642818417/posts/default/3140578058679059877?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Lucifer-Heosphoros/~3/9F2-41MNWGE/blog-post.html" title="暴力！就是流氓！" /><author><name>Lak Fu</name><uri>https://profiles.google.com/100719355520660151286</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-KhM_1sniceE/AAAAAAAAAAI/AAAAAAAAAKo/qfjAZlQNdvM/s512-c/photo.jpg" /></author><thr:total>1</thr:total><content type="html">我能理解為了選舉花招百出，因為很多傢伙沒了那身份，就什都不是。     但我不能解理，為什麼會這麼甘心的盲目被人利用！     最近的新聞真的是讓人很生氣，很難過。   我不懂所謂的「本省人」「外省人」到底要被拿來炒作、分化我們族群到什麼時後，就我而言，我的世界裡早就沒有這二個名詞了，大家不都是在這塊土地上長大的人嗎？  為什麼要隨著一些狗屎政客起舞？為什麼要流血流汗的讓他們去光明正大的騙你的納稅錢！  好，這些是你們心甘情願的，你們甘心被人用三四十年前民粹的手段耍的團團轉我也沒說話。  無論在任何國家，暴力，都是應該不被贊可的！你有本事就也想辨法去讓人家打壓不了你，而不是只會在活在自己的小圈圈！用一些似是而非的言論來合理化自己的行為，丟不丟臉？我不喜歡大陸官方所做的一切，我也不是什麼親中派，我只是很討厭那些濫用暴力、民粹的王八蛋整天把「愛台灣」掛在嘴邊，
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/SqGZAexmqDiQP9cWGh0LiVdMVMM/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/SqGZAexmqDiQP9cWGh0LiVdMVMM/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/SqGZAexmqDiQP9cWGh0LiVdMVMM/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/SqGZAexmqDiQP9cWGh0LiVdMVMM/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Lucifer-Heosphoros/~4/9F2-41MNWGE" height="1" width="1"/&gt;</content><feedburner:origLink>http://lak4cyut.blogspot.com/2008/10/blog-post.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkQCQnw5cSp7ImA9Wx9bFEg.&quot;"><id>tag:blogger.com,1999:blog-2525938585642818417.post-2435541863118451224</id><published>2008-09-25T09:36:00.004+08:00</published><updated>2011-02-23T18:52:43.229+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-02-23T18:52:43.229+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="專業？" /><category scheme="http://www.blogger.com/atom/ns#" term="C/C++" /><category scheme="http://www.blogger.com/atom/ns#" term="Windows Mobile" /><title>DrawText 斷行 (automatically breaks lines)</title><link rel="replies" type="application/atom+xml" href="http://lak4cyut.blogspot.com/feeds/2435541863118451224/comments/default" title="張貼意見" /><link rel="replies" type="text/html" href="http://lak4cyut.blogspot.com/2008/09/drawtext-automatically-breaks-lines.html#comment-form" title="0 個意見" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2525938585642818417/posts/default/2435541863118451224?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2525938585642818417/posts/default/2435541863118451224?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Lucifer-Heosphoros/~3/PBp9PuLOeE4/drawtext-automatically-breaks-lines.html" title="DrawText 斷行 (automatically breaks lines)" /><author><name>Lak Fu</name><uri>https://profiles.google.com/100719355520660151286</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-KhM_1sniceE/AAAAAAAAAAI/AAAAAAAAAKo/qfjAZlQNdvM/s512-c/photo.jpg" /></author><thr:total>0</thr:total><content type="html">最近因為工作需求，終於要玩一點 UI 的東西了，
首先接觸到的就是 DrawText，看了別的部門的 sample code，
赫然發現！斷行要自己算？見鬼了！於是不死心又開始查...


其實，DrawText 是可以自已斷行！
在 M$ 的 OEM Document 裡面，查詢 DrawText 會發現 DT_WORDBREAK 這個看似和斷行有關的 option，但其實只有此 option 並不能實現換行的操作，還需要配合上另一個 option : DT_EDITCONTROL ！但該死的 Document 裡居然完全沒提到這個 option .. 果然是 M$ 的風格。

而自動斷行的關鍵所在，便是加上這個 option！會令你的 DrawText 依 rect 所給的 width (R-L) 來計算可顯示的字數，並自動將其斷行！

在這裡分享也記錄一下這件很機車的事。
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/mXIT1y6sTXfIlrVmK-Cf91Y8F9Y/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/mXIT1y6sTXfIlrVmK-Cf91Y8F9Y/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/mXIT1y6sTXfIlrVmK-Cf91Y8F9Y/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/mXIT1y6sTXfIlrVmK-Cf91Y8F9Y/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Lucifer-Heosphoros/~4/PBp9PuLOeE4" height="1" width="1"/&gt;</content><feedburner:origLink>http://lak4cyut.blogspot.com/2008/09/drawtext-automatically-breaks-lines.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkQNQnY6fyp7ImA9Wx9bFEg.&quot;"><id>tag:blogger.com,1999:blog-2525938585642818417.post-6758104803795730066</id><published>2008-09-10T23:40:00.004+08:00</published><updated>2011-02-23T18:53:13.817+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-02-23T18:53:13.817+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="專業？" /><category scheme="http://www.blogger.com/atom/ns#" term="C/C++" /><category scheme="http://www.blogger.com/atom/ns#" term="Windows Mobile" /><title>Datatype misaligment 引發的問題資料</title><link rel="replies" type="application/atom+xml" href="http://lak4cyut.blogspot.com/feeds/6758104803795730066/comments/default" title="張貼意見" /><link rel="replies" type="text/html" href="http://lak4cyut.blogspot.com/2008/09/datatype-misaligment.html#comment-form" title="0 個意見" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2525938585642818417/posts/default/6758104803795730066?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2525938585642818417/posts/default/6758104803795730066?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Lucifer-Heosphoros/~3/HXPPGUIY2MI/datatype-misaligment.html" title="Datatype misaligment 引發的問題資料" /><author><name>Lak Fu</name><uri>https://profiles.google.com/100719355520660151286</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-KhM_1sniceE/AAAAAAAAAAI/AAAAAAAAAKo/qfjAZlQNdvM/s512-c/photo.jpg" /></author><thr:total>0</thr:total><content type="html">在搞 Datatype missaligment 時收集到的一些資訊，   
記錄下來以後拿來 debug 用...
   

原來該死的 VS2005 build 出來的 calling convention 和 WM6.1 AKU builder build 出來的不同..   
從鹿那裡得到的資訊：
calling convention
APCS 是一種 calling convention ㄉ規ㄍ
ARM Procedure Call Standard
calling convention 加上一堆有ㄉ沒ㄉ以後 又叫做 ABI
MSDN 上查到的有關 Aligment 的資訊：    
http://msdn.microsoft.com/en-us/library/71kf49f1.aspx
calling convention 網路上查到的資料：    
http://
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/JAiUd9QYY7VE9y2-9n5Hhi0iKx0/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/JAiUd9QYY7VE9y2-9n5Hhi0iKx0/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/JAiUd9QYY7VE9y2-9n5Hhi0iKx0/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/JAiUd9QYY7VE9y2-9n5Hhi0iKx0/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Lucifer-Heosphoros/~4/HXPPGUIY2MI" height="1" width="1"/&gt;</content><feedburner:origLink>http://lak4cyut.blogspot.com/2008/09/datatype-misaligment.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUcESHk-eSp7ImA9WxRRFEw.&quot;"><id>tag:blogger.com,1999:blog-2525938585642818417.post-1398680729239518424</id><published>2008-09-03T00:32:00.002+08:00</published><updated>2008-09-26T15:10:09.751+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-09-26T15:10:09.751+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="非日記" /><title>Reference: MSN 網頁版 from 重灌狂人</title><link rel="replies" type="application/atom+xml" href="http://lak4cyut.blogspot.com/feeds/1398680729239518424/comments/default" title="張貼意見" /><link rel="replies" type="text/html" href="http://lak4cyut.blogspot.com/2008/09/reference-msn-from.html#comment-form" title="2 個意見" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2525938585642818417/posts/default/1398680729239518424?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2525938585642818417/posts/default/1398680729239518424?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Lucifer-Heosphoros/~3/NZ7oIN-XHUQ/reference-msn-from.html" title="Reference: MSN 網頁版 from 重灌狂人" /><author><name>Lak Fu</name><uri>https://profiles.google.com/100719355520660151286</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-KhM_1sniceE/AAAAAAAAAAI/AAAAAAAAAKo/qfjAZlQNdvM/s512-c/photo.jpg" /></author><thr:total>2</thr:total><content type="html">今天突然想到。MSN 好像可以放到 Blog 上面....在網路上找到了一些相關資料，感謝重灌狂人的詳細說明。Reference：如何在網頁、BLOG嵌入「MSN聊天視窗」？（新增：彩色面板）
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/YqN1PJiGkQTC7wMSPMPYtmljTKo/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/YqN1PJiGkQTC7wMSPMPYtmljTKo/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/YqN1PJiGkQTC7wMSPMPYtmljTKo/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/YqN1PJiGkQTC7wMSPMPYtmljTKo/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Lucifer-Heosphoros/~4/NZ7oIN-XHUQ" height="1" width="1"/&gt;</content><feedburner:origLink>http://lak4cyut.blogspot.com/2008/09/reference-msn-from.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUcGR3oyeip7ImA9WxRRFEw.&quot;"><id>tag:blogger.com,1999:blog-2525938585642818417.post-8160117613001879296</id><published>2008-09-02T23:30:00.002+08:00</published><updated>2008-09-26T15:10:26.492+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-09-26T15:10:26.492+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="非日記" /><title>瘋狂大中毒！</title><link rel="replies" type="application/atom+xml" href="http://lak4cyut.blogspot.com/feeds/8160117613001879296/comments/default" title="張貼意見" /><link rel="replies" type="text/html" href="http://lak4cyut.blogspot.com/2008/09/blog-post_02.html#comment-form" title="0 個意見" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2525938585642818417/posts/default/8160117613001879296?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2525938585642818417/posts/default/8160117613001879296?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Lucifer-Heosphoros/~3/if5WCjp6VoI/blog-post_02.html" title="瘋狂大中毒！" /><author><name>Lak Fu</name><uri>https://profiles.google.com/100719355520660151286</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-KhM_1sniceE/AAAAAAAAAAI/AAAAAAAAAKo/qfjAZlQNdvM/s512-c/photo.jpg" /></author><thr:total>0</thr:total><content type="html">最好是現在隨身碟都毒成這樣子啦！都重灌了還不放過我！還好我還有可愛的網路.....昨天火大重灌了我那個電腦，結果....冏.....毒還是又回來找我了，最誇張的是資料夾選項裡的「顯示所有檔案及資料夾」居然不能設..怎麼設都會被改回去，越弄越火大，一個不爽，開始找解毒的方式，讓我找到以下的連結：隨身碟病毒 &amp;amp; kavo 病毒 清除程式目前正在測試看看到底解不解得掉，大家幫我拜拜一下吧！
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/PmVYSd4I0ymDwaYKPlfCSc0U1KM/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/PmVYSd4I0ymDwaYKPlfCSc0U1KM/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/PmVYSd4I0ymDwaYKPlfCSc0U1KM/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/PmVYSd4I0ymDwaYKPlfCSc0U1KM/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Lucifer-Heosphoros/~4/if5WCjp6VoI" height="1" width="1"/&gt;</content><feedburner:origLink>http://lak4cyut.blogspot.com/2008/09/blog-post_02.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEQASXg6fyp7ImA9WxRTE0s.&quot;"><id>tag:blogger.com,1999:blog-2525938585642818417.post-3342644239685221956</id><published>2008-09-02T22:27:00.002+08:00</published><updated>2008-09-02T22:39:08.617+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-09-02T22:39:08.617+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="非日記" /><title>買車容易養車難！</title><link rel="replies" type="application/atom+xml" href="http://lak4cyut.blogspot.com/feeds/3342644239685221956/comments/default" title="張貼意見" /><link rel="replies" type="text/html" href="http://lak4cyut.blogspot.com/2008/09/blog-post.html#comment-form" title="0 個意見" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2525938585642818417/posts/default/3342644239685221956?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2525938585642818417/posts/default/3342644239685221956?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Lucifer-Heosphoros/~3/UZJa1HNHxuY/blog-post.html" title="買車容易養車難！" /><author><name>Lak Fu</name><uri>https://profiles.google.com/100719355520660151286</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-KhM_1sniceE/AAAAAAAAAAI/AAAAAAAAAKo/qfjAZlQNdvM/s512-c/photo.jpg" /></author><thr:total>0</thr:total><content type="html">說實在的，買車真的一點也不難...    可是，當你的車進一次保修廠，跟你說要一萬五才拿的出來的時後....     .......冏.......       更，我到底是招誰惹誰呀！        有事沒事居然車子後輪「鎖」進一支縲絲，不看還沒事，進廠一看才發現，     我的四顆輪子都平了..  =.=b 誇張，我還這樣開著車每天四處跑，     啊不就還好上星期高速公路沒開很快...  =.=b 看到那輪子我都快嚇死。  看到修那輪子要多少錢，我就更害怕了....媽的，四顆輪子要大概一萬一...  救命呀！我那裡來的一萬一呀...  進廠一次光普通的保養就快四千，加上這一萬一....再這樣下去，    真的要去賣屁股。  已經很慘了吧？不過，事情還沒結束，我們那親愛的技工突然跑過來跟我說..  「先生先生！你的後輪剎車皮跟碟片都平掉了喔！」  「那....換一換總共要多少呀？」
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/0mwMSmNlX2CwNL6pviJOatuLwBk/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/0mwMSmNlX2CwNL6pviJOatuLwBk/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/0mwMSmNlX2CwNL6pviJOatuLwBk/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/0mwMSmNlX2CwNL6pviJOatuLwBk/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Lucifer-Heosphoros/~4/UZJa1HNHxuY" height="1" width="1"/&gt;</content><feedburner:origLink>http://lak4cyut.blogspot.com/2008/09/blog-post.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkIFRX49cCp7ImA9Wx9bFEg.&quot;"><id>tag:blogger.com,1999:blog-2525938585642818417.post-703034553946487623</id><published>2008-08-29T19:52:00.005+08:00</published><updated>2011-02-23T18:55:14.068+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-02-23T18:55:14.068+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="專業？" /><category scheme="http://www.blogger.com/atom/ns#" term="C/C++" /><category scheme="http://www.blogger.com/atom/ns#" term="Windows Mobile" /><title>The trap of Blocking-mode APIs</title><link rel="replies" type="application/atom+xml" href="http://lak4cyut.blogspot.com/feeds/703034553946487623/comments/default" title="張貼意見" /><link rel="replies" type="text/html" href="http://lak4cyut.blogspot.com/2008/08/trap-of-blocking-mode-apis.html#comment-form" title="0 個意見" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2525938585642818417/posts/default/703034553946487623?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2525938585642818417/posts/default/703034553946487623?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Lucifer-Heosphoros/~3/ZEGkwAuTzg8/trap-of-blocking-mode-apis.html" title="The trap of Blocking-mode APIs" /><author><name>Lak Fu</name><uri>https://profiles.google.com/100719355520660151286</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-KhM_1sniceE/AAAAAAAAAAI/AAAAAAAAAKo/qfjAZlQNdvM/s512-c/photo.jpg" /></author><thr:total>0</thr:total><content type="html">==========  阻斷式 API 引發的陷阱  ==========
   
今天解決了一個由阻斷式 API 所引發的 bug   
而其中過程曲折離奇，特別在此做一個 note ，也和大家分享一下。 Enjoy it.   
今天在上班的時後，幫同事看了二個好玩的 issue，其中一個，因為過程有趣，特別在這裡和大家分享。
相信許多玩過 DOS 的工程師們都用過 printf (or cout) 這簡單的輸出機制來進行一些簡單的 debug 動作，    
而在 windows 時代呢？雖然沒有 console，但是我們有 IDE 的 output windows，     
printf 依然是一個簡單有力的 debug 方式。     
( 當然，在此，我並不打算談有關 exceptional 的相關機制。     
許多時後，我們只是簡單的希望 output 某些資訊來做 
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/4Uix3NmbHf5Q2pbkZmPJUCnivY8/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/4Uix3NmbHf5Q2pbkZmPJUCnivY8/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/4Uix3NmbHf5Q2pbkZmPJUCnivY8/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/4Uix3NmbHf5Q2pbkZmPJUCnivY8/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Lucifer-Heosphoros/~4/ZEGkwAuTzg8" height="1" width="1"/&gt;</content><feedburner:origLink>http://lak4cyut.blogspot.com/2008/08/trap-of-blocking-mode-apis.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkMGRno-cCp7ImA9Wx9bFEg.&quot;"><id>tag:blogger.com,1999:blog-2525938585642818417.post-7859349132274227508</id><published>2008-08-29T00:37:00.004+08:00</published><updated>2011-02-23T18:53:47.458+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-02-23T18:53:47.458+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="專業？" /><category scheme="http://www.blogger.com/atom/ns#" term="C/C++" /><title>「Design pattern」V.S「基礎觀念 &amp; 足夠的思考」</title><link rel="replies" type="application/atom+xml" href="http://lak4cyut.blogspot.com/feeds/7859349132274227508/comments/default" title="張貼意見" /><link rel="replies" type="text/html" href="http://lak4cyut.blogspot.com/2008/08/oo-oo.html#comment-form" title="2 個意見" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2525938585642818417/posts/default/7859349132274227508?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2525938585642818417/posts/default/7859349132274227508?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Lucifer-Heosphoros/~3/mBCKAw4cpr4/oo-oo.html" title="「Design pattern」V.S「基礎觀念 &amp;amp; 足夠的思考」" /><author><name>Lak Fu</name><uri>https://profiles.google.com/100719355520660151286</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-KhM_1sniceE/AAAAAAAAAAI/AAAAAAAAAKo/qfjAZlQNdvM/s512-c/photo.jpg" /></author><thr:total>2</thr:total><content type="html">最近回了 Mud 玩玩，碰到那時代的老朋友們，Passerby (鹿)也在其中。  
碰到了鹿，當然免不了又被牠電的亂七八糟。   
不過，聊了一下卻發現到。原來，很多的東西我都會，只是....我不知道它的 Termed .. 冏 ..
   
說實在的，一直以來，我就不是一個很講究 termed (術語)的人。
一來也是因為我英文很破，很多 termed 都是英文比較好講，    
二來則是我也不是什麼理論派的人，書看的也沒比人家多。
但最近卻開始慢慢了解到 termed 的重要性。
最後，居然連鹿都跟我們家老大講一樣的話。   
基本上，大意就是，假設你的 termed 不精確，則你在和別人討論事情時便需要浪費多餘的時間去解釋，這對許多情況下，都是一種很不必要的浪費。而且，在講解事項時，也還需要另外解釋半天，更是沒有效率。
所以，我也認命的接受這個說法，開始努力的惡補我的 
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/-lDA9rBBtc2Dsrz9GAs8TsuqmW4/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/-lDA9rBBtc2Dsrz9GAs8TsuqmW4/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/-lDA9rBBtc2Dsrz9GAs8TsuqmW4/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/-lDA9rBBtc2Dsrz9GAs8TsuqmW4/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Lucifer-Heosphoros/~4/mBCKAw4cpr4" height="1" width="1"/&gt;</content><feedburner:origLink>http://lak4cyut.blogspot.com/2008/08/oo-oo.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkMBQHs9fyp7ImA9Wx9bFEg.&quot;"><id>tag:blogger.com,1999:blog-2525938585642818417.post-3511401114317996629</id><published>2008-08-26T23:40:00.004+08:00</published><updated>2011-02-23T18:54:11.567+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-02-23T18:54:11.567+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="專業？" /><title>8051 組語 - 利用keypad及LCD完成的簡單的減乘除運算</title><link rel="replies" type="application/atom+xml" href="http://lak4cyut.blogspot.com/feeds/3511401114317996629/comments/default" title="張貼意見" /><link rel="replies" type="text/html" href="http://lak4cyut.blogspot.com/2008/08/8051-keypadlcd.html#comment-form" title="0 個意見" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2525938585642818417/posts/default/3511401114317996629?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2525938585642818417/posts/default/3511401114317996629?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Lucifer-Heosphoros/~3/fogqpKAkfMg/8051-keypadlcd.html" title="8051 組語 - 利用keypad及LCD完成的簡單的減乘除運算" /><author><name>Lak Fu</name><uri>https://profiles.google.com/100719355520660151286</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-KhM_1sniceE/AAAAAAAAAAI/AAAAAAAAAKo/qfjAZlQNdvM/s512-c/photo.jpg" /></author><thr:total>0</thr:total><content type="html">大約十年前，在台中勤益就讀的時後，修了 8051 的組合語言。   
這也是我那時 Implement 的作業之一，雖然沒有什麼特別了不起的功能，   
但沒想到當時為了讓同學看得懂，寫了不少的註解，現在看到真是有一種懷念的感覺。
   
一直以來，我對於自己曾經寫過的程式都沒有什麼保存的概念。    
直到我找工作被狂打槍之後，才了解到作品的重要性。     
雖然已經很多東西找不到了，但還是找到了些有趣的東西。
這是當年在學習 8051 時寫的一個作品，也因為組語這種東西不是人人都覺得它可愛，    
所以這支程式也可以是說寫出來送全班用的，所以裡面註解的很詳細。     
現在看來，也許已經沒什麼價值了，但也許還是能幫助到一些人，就貼上來吧。 \
四則運算處理器：
   
; 設計理念 ; 20H ~ 23H 為LCD顯示之值      
; 24H ~ 27H 為顯示暫存
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/8TPa4rMRbTYmWjNQqEU5lK9PTe8/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/8TPa4rMRbTYmWjNQqEU5lK9PTe8/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/8TPa4rMRbTYmWjNQqEU5lK9PTe8/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/8TPa4rMRbTYmWjNQqEU5lK9PTe8/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Lucifer-Heosphoros/~4/fogqpKAkfMg" height="1" width="1"/&gt;</content><feedburner:origLink>http://lak4cyut.blogspot.com/2008/08/8051-keypadlcd.html</feedburner:origLink></entry></feed>

