<?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:blogger='http://schemas.google.com/blogger/2008' 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-2330520166691275207</id><updated>2024-10-17T18:37:10.996+08:00</updated><category term="Android"/><category term="iOS"/><category term="3D"/><category term="Barcode"/><category term="C語言"/><category term="DDMS"/><category term="Face detection"/><category term="Objective-C"/><category term="OpenGL"/><category term="Quartz 2D"/><category term="創業"/><category term="生活應用"/><category term="組合語言"/><category term="雜談"/><title type='text'>失業人的練功房</title><subtitle type='html'>一個失業工程師在家練功的心得分享</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://dejob.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2330520166691275207/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://dejob.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Michael</name><uri>http://www.blogger.com/profile/10400970286732489798</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbWSQahEqK-6IRujlubM310_tNWuQM3X6C2kNZKInt-swvK272Rtj4iPuQZm5tIQ3ihO5_B4-Wv4RW5ErxSU6IuBkvAP62KVtkE3-kVaRnTbiUdKgWqkXN0TUyJ5DyMAc/s220/android_icon_256.png'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>15</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-2330520166691275207.post-3673907686738487573</id><published>2012-07-17T15:35:00.000+08:00</published><updated>2012-07-17T17:58:30.771+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="iOS"/><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">


離開前公司開發app已經一年了，這篇文章可能有點亂，請慎入。

也許有人以為我在離職前就已經動手在開發了，
其實--大。錯。特。錯～！！
在那之前我只會C/C++跟Java(Matlab硬要算的話也會一點)，
我是離職後才開始學Objective-C跟Cocoa Touch。

2011年整個夏天都在學這些東西跟寫sample code還有想idea。
9月才開始開發，12月才上架，而且第一次上架一波三折，
被Apple退貨了很多次(App Review Guide的條文太多了，很容易踩到)，
1.0上架的東西跟當初第一版送review的真的差很大。

不過記得上架後最開心的事情有三樣：
1. 第一天就有人下載app
2. 下載app的人來自於想都沒想過的國家，能全球的人透過app連結的感覺很妙
3. 第一次有人付費購買app
但是這樣子的快樂並沒有延續多久，因為過了新年以後的下載</summary><link rel='replies' type='application/atom+xml' href='http://dejob.blogspot.com/feeds/3673907686738487573/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://dejob.blogspot.com/2012/07/blog-post.html#comment-form' title='2 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2330520166691275207/posts/default/3673907686738487573'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2330520166691275207/posts/default/3673907686738487573'/><link rel='alternate' type='text/html' href='http://dejob.blogspot.com/2012/07/blog-post.html' title='創業一年回顧'/><author><name>Michael</name><uri>http://www.blogger.com/profile/10400970286732489798</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbWSQahEqK-6IRujlubM310_tNWuQM3X6C2kNZKInt-swvK272Rtj4iPuQZm5tIQ3ihO5_B4-Wv4RW5ErxSU6IuBkvAP62KVtkE3-kVaRnTbiUdKgWqkXN0TUyJ5DyMAc/s220/android_icon_256.png'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2330520166691275207.post-8254295986833682295</id><published>2011-10-29T01:10:00.002+08:00</published><updated>2011-10-29T01:11:44.758+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="iOS"/><category scheme="http://www.blogger.com/atom/ns#" term="Objective-C"/><category scheme="http://www.blogger.com/atom/ns#" term="Quartz 2D"/><title type='text'>What iOS Simulator does not simulate: free()</title><summary type="text">在開發iOS app時一定要用實機測試，因為simulator跟實機的行為很多地方並不相同。Simulator除了不支援某些硬體功能外，在根本的運作機制上也有不同，這篇要分享的是在memory上的運作機制。



不過我也不打算寫太長，只寫要注意的地方就好了（因為太晚了～）。

我們先來看一段將Pixel array轉成UIImage的程式碼：


// 產生要畫的圖
unsigned char *pixels = malloc(nImageSize);
/*
 * （省略繪圖步驟)
 */
// 用畫好的圖產生image用的context
CGContextRef context = CGBitmapContextCreate(pixels, width, height, ...);

// 用完的記得要還，要養成好習慣！
free(pixels);

// 產生UIImage
</summary><link rel='replies' type='application/atom+xml' href='http://dejob.blogspot.com/feeds/8254295986833682295/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://dejob.blogspot.com/2011/10/what-ios-simulator-does-not-simulate.html#comment-form' title='2 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2330520166691275207/posts/default/8254295986833682295'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2330520166691275207/posts/default/8254295986833682295'/><link rel='alternate' type='text/html' href='http://dejob.blogspot.com/2011/10/what-ios-simulator-does-not-simulate.html' title='What iOS Simulator does not simulate: free()'/><author><name>Michael</name><uri>http://www.blogger.com/profile/10400970286732489798</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbWSQahEqK-6IRujlubM310_tNWuQM3X6C2kNZKInt-swvK272Rtj4iPuQZm5tIQ3ihO5_B4-Wv4RW5ErxSU6IuBkvAP62KVtkE3-kVaRnTbiUdKgWqkXN0TUyJ5DyMAc/s220/android_icon_256.png'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2330520166691275207.post-8268811646785818261</id><published>2011-10-28T13:19:00.000+08:00</published><updated>2011-10-28T13:19:19.566+08:00</updated><title type='text'>追求細節</title><summary type="text">寫程式或是做產品跟畫漫畫其實有很多相似的地方，除了都是追求藝術外，也都講究細節。
這邊我所謂的細節不是指筆觸多精密，而是指漫畫中沒有留白的地方。



許多人看漫畫其實是在看“有圖的小說”，意思是說除了主要人物跟對白以外其實並沒有注意太多畫面上的細節（例如貼網點），而這些是使得畫面更加圓滿的必要元素；諷刺的是，當這些細節不存在時才會被人注意到似乎少了什麼東西，或是更直接一點就罵作者太混（我絕對不是在說富X）。



產品也是這麼回事，許多的小細節能使平凡的產品變得與眾不同，而堅持做出這些小細節的你也就變得與眾不同。



題外話：過度設計跟沒有細節一樣糟糕。</summary><link rel='replies' type='application/atom+xml' href='http://dejob.blogspot.com/feeds/8268811646785818261/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://dejob.blogspot.com/2011/10/blog-post.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2330520166691275207/posts/default/8268811646785818261'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2330520166691275207/posts/default/8268811646785818261'/><link rel='alternate' type='text/html' href='http://dejob.blogspot.com/2011/10/blog-post.html' title='追求細節'/><author><name>Michael</name><uri>http://www.blogger.com/profile/10400970286732489798</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbWSQahEqK-6IRujlubM310_tNWuQM3X6C2kNZKInt-swvK272Rtj4iPuQZm5tIQ3ihO5_B4-Wv4RW5ErxSU6IuBkvAP62KVtkE3-kVaRnTbiUdKgWqkXN0TUyJ5DyMAc/s220/android_icon_256.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2330520166691275207.post-1698242479667615228</id><published>2011-09-19T16:27:00.002+08:00</published><updated>2011-09-19T16:27:44.491+08:00</updated><title type='text'>[雜談] 近況更新</title><summary type="text">距離上次在這邊發文已經過了一年多了，更新一下近況順便做點記錄。

首先是...我又失業了 XD （Yeah~繼續練功~)

其實已經離開公司一陣子了，這段期間雖然也有許多公司的邀約(例如HTC)，但是都婉拒了。每次HTC打來都很想問他們&quot;我可以事情做完6點就下班嗎？&quot;
工作也好些年了，好不容易對某些事情有了熱情，於是想趁還年輕、還沒有家庭跟小孩的時候好好去闖。

之前Android也玩了幾年，最近則開始接觸Apple iOS的開發，之後也會陸續分享在iOS上的開發心得，敬請不要期待，haha。

最後就是要給自己的小提醒：

我是很討厭加班文化的人，尤其是常態加班，那簡直是慢性自殺！
台灣人總覺得衰事不會輪到自己，而我過去就因為每天熬夜寫code到最後搞壞身體，差點連命都沒了。
長期加班也會造成效率低落的惡性循環，變成晚上寫bug白天debug。
我一直期許自己能在架構以及實作上做到預防</summary><link rel='replies' type='application/atom+xml' href='http://dejob.blogspot.com/feeds/1698242479667615228/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://dejob.blogspot.com/2011/09/blog-post.html#comment-form' title='1 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2330520166691275207/posts/default/1698242479667615228'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2330520166691275207/posts/default/1698242479667615228'/><link rel='alternate' type='text/html' href='http://dejob.blogspot.com/2011/09/blog-post.html' title='[雜談] 近況更新'/><author><name>Michael</name><uri>http://www.blogger.com/profile/10400970286732489798</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbWSQahEqK-6IRujlubM310_tNWuQM3X6C2kNZKInt-swvK272Rtj4iPuQZm5tIQ3ihO5_B4-Wv4RW5ErxSU6IuBkvAP62KVtkE3-kVaRnTbiUdKgWqkXN0TUyJ5DyMAc/s220/android_icon_256.png'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2330520166691275207.post-282395942526124872</id><published>2010-08-20T00:35:00.000+08:00</published><updated>2010-08-20T00:35:29.765+08:00</updated><title type='text'>[舊稿] [Q&amp;A] Layout of blogger 版面配置</title><summary type="text">發現這篇從08年年底到現在一直在草稿狀態，雖然只有一點點，不過還是貼上來好了，因為接下來不知道什麼時候才有時間更新...

偶爾嘗試點不同的寫作風格，就先用這篇開刀好了。本來想用敘事的方式來說明一下這個blog的排版原因和某些小細節，不過寫一寫發現有點難閱讀，所以改用Q&amp;amp;A的方式看看會不會有所改善。以下是左腦跟右腦的訪談：

Q：感謝你接受我的訪問，能不能請你大概聊一下整個版面的設計理念？
A：我希望我的讀者能在第一眼就很清楚文章的位置在哪裡，尤其是使用手持式裝置（PDA、SmartPhone甚至PSP）的讀者，這樣的讀者已經愈來愈多了。當然我也想提供行動裝置版的版面，不過在Blogger現有的template下是蠻難實現的。除此之外，在右側我放了一些Gadget，主要是希望能多些人交流。

Q：那配色呢，有什麼特別的原因嗎？
A：我想藍色是很貼近科技本質的一種顏色，所以我就用它</summary><link rel='replies' type='application/atom+xml' href='http://dejob.blogspot.com/feeds/282395942526124872/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://dejob.blogspot.com/2010/08/q-layout-of-blogger.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2330520166691275207/posts/default/282395942526124872'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2330520166691275207/posts/default/282395942526124872'/><link rel='alternate' type='text/html' href='http://dejob.blogspot.com/2010/08/q-layout-of-blogger.html' title='[舊稿] [Q&amp;A] Layout of blogger 版面配置'/><author><name>Michael</name><uri>http://www.blogger.com/profile/10400970286732489798</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbWSQahEqK-6IRujlubM310_tNWuQM3X6C2kNZKInt-swvK272Rtj4iPuQZm5tIQ3ihO5_B4-Wv4RW5ErxSU6IuBkvAP62KVtkE3-kVaRnTbiUdKgWqkXN0TUyJ5DyMAc/s220/android_icon_256.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2330520166691275207.post-387280021188795545</id><published>2010-08-20T00:29:00.000+08:00</published><updated>2010-08-20T00:29:04.408+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><title type='text'>在Framework中加入自己開發的API</title><summary type="text">大家好久不見，今天要分享的是如何將自有API跟系統一起build並且能將build出來的SDK放在Eclipse裡面用，不過這招不適合要放到android market上的程式，如果是這種情況，你需要的是git並且做好管理(包括把Eclipse的sync選項打開，好像越扯越遠...)

我想很多人應該也跟我一樣，開發程式時會寫出很多共用的API(通常是utility API)，或是很多程式都會去bind同一樣一個service，而這些code(包括AIDL檔)通常會有很多份copy在各個Eclipse的project內，造成sync上的問題。這還不是主要的問題，更主要的問題在於，如果你的程式用到了hidden API，那可是連在Eclipse中build都build不過，更別想直接跑在emulator或是透過新版adb install到target上(因為Eclipse有error就無法</summary><link rel='replies' type='application/atom+xml' href='http://dejob.blogspot.com/feeds/387280021188795545/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://dejob.blogspot.com/2010/08/frameworkapi.html#comment-form' title='3 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2330520166691275207/posts/default/387280021188795545'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2330520166691275207/posts/default/387280021188795545'/><link rel='alternate' type='text/html' href='http://dejob.blogspot.com/2010/08/frameworkapi.html' title='在Framework中加入自己開發的API'/><author><name>Michael</name><uri>http://www.blogger.com/profile/10400970286732489798</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbWSQahEqK-6IRujlubM310_tNWuQM3X6C2kNZKInt-swvK272Rtj4iPuQZm5tIQ3ihO5_B4-Wv4RW5ErxSU6IuBkvAP62KVtkE3-kVaRnTbiUdKgWqkXN0TUyJ5DyMAc/s220/android_icon_256.png'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2330520166691275207.post-1897656055331702241</id><published>2009-06-15T00:39:00.002+08:00</published><updated>2009-06-15T01:13:14.519+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><title type='text'>在Eclipse下看framework的source code</title><summary type="text">參考: View Android Source Code in Eclipse

簡單來說，trace ADT的code會發現ADT會去android.jar同個目錄下的sources這個目錄找source code，
所以我們只要將android的java source code撿一撿，照package放到sources這個目錄就可以了。
所以參考link中的python script就是在幹這件事，不過我有兩點建議:
1. 在沒有make過的source code目錄下執行這個script：因為out這個目錄下有重複的java code
(而且out這個目錄有夠肥)
2. 把zippath = match.group(1).replace(&#39;.&#39;, &#39;/&#39;) + &#39;/&#39; + file改成
zippath = &#39;sources/&#39; + match.group(1).replace(&#39;.</summary><link rel='replies' type='application/atom+xml' href='http://dejob.blogspot.com/feeds/1897656055331702241/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://dejob.blogspot.com/2009/06/eclipseframeworksource-code.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2330520166691275207/posts/default/1897656055331702241'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2330520166691275207/posts/default/1897656055331702241'/><link rel='alternate' type='text/html' href='http://dejob.blogspot.com/2009/06/eclipseframeworksource-code.html' title='在Eclipse下看framework的source code'/><author><name>Michael</name><uri>http://www.blogger.com/profile/10400970286732489798</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbWSQahEqK-6IRujlubM310_tNWuQM3X6C2kNZKInt-swvK272Rtj4iPuQZm5tIQ3ihO5_B4-Wv4RW5ErxSU6IuBkvAP62KVtkE3-kVaRnTbiUdKgWqkXN0TUyJ5DyMAc/s220/android_icon_256.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2330520166691275207.post-7568804267560620874</id><published>2009-06-14T10:33:00.001+08:00</published><updated>2009-06-15T00:41:09.044+08:00</updated><title type='text'>Eclipse JEE vs Java 6 Update 14</title><summary type="text">如果你更新到Java 1.6 Update 14, 而且原本能跑的Eclipse突然不能跑的話,將eclipse.ini中的-Xmx512m改成--launcher.XXMaxPermSize所指定的size試看看,我是改成-Xmx256m就能跑了</summary><link rel='replies' type='application/atom+xml' href='http://dejob.blogspot.com/feeds/7568804267560620874/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://dejob.blogspot.com/2009/06/eclipse-jee-vs-java-6-update-14.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2330520166691275207/posts/default/7568804267560620874'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2330520166691275207/posts/default/7568804267560620874'/><link rel='alternate' type='text/html' href='http://dejob.blogspot.com/2009/06/eclipse-jee-vs-java-6-update-14.html' title='Eclipse JEE vs Java 6 Update 14'/><author><name>Michael</name><uri>http://www.blogger.com/profile/10400970286732489798</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbWSQahEqK-6IRujlubM310_tNWuQM3X6C2kNZKInt-swvK272Rtj4iPuQZm5tIQ3ihO5_B4-Wv4RW5ErxSU6IuBkvAP62KVtkE3-kVaRnTbiUdKgWqkXN0TUyJ5DyMAc/s220/android_icon_256.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2330520166691275207.post-2851120517442696283</id><published>2009-03-28T01:40:00.005+08:00</published><updated>2009-03-28T02:05:04.596+08:00</updated><title type='text'>不知不覺都變月刊了</title><summary type="text">這個月的頭條就是筆者找到工作了，從事Android UI的設計。最近發現API Demo的sample已經不夠參考了，因為不同的device跟輸入方式所需要的UI是大大不同，而API demo基本上是以手機的應用為主，今天如果我是要設計成Nettop或是TV用的UI，絕不是把畫面放大就能草草交差的事。雖然筆者滿懷雄心壯志，但是在業界打滾幾年後也知道公司根本不會有那個耐心等我好好設計架構、做user survey甚至是發好幾版的demo template；&quot;time to market&quot; kills designs，難怪路上滿滿都是山寨UI。大家也都知道現在工作難找，筆者也被凹了。對我來說，這也就只是一份工作罷了，如果可以，我還寧願自己寫程式去賣。</summary><link rel='replies' type='application/atom+xml' href='http://dejob.blogspot.com/feeds/2851120517442696283/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://dejob.blogspot.com/2009/03/blog-post.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2330520166691275207/posts/default/2851120517442696283'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2330520166691275207/posts/default/2851120517442696283'/><link rel='alternate' type='text/html' href='http://dejob.blogspot.com/2009/03/blog-post.html' title='不知不覺都變月刊了'/><author><name>Michael</name><uri>http://www.blogger.com/profile/10400970286732489798</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbWSQahEqK-6IRujlubM310_tNWuQM3X6C2kNZKInt-swvK272Rtj4iPuQZm5tIQ3ihO5_B4-Wv4RW5ErxSU6IuBkvAP62KVtkE3-kVaRnTbiUdKgWqkXN0TUyJ5DyMAc/s220/android_icon_256.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2330520166691275207.post-4519624443678385356</id><published>2009-02-18T15:29:00.000+08:00</published><updated>2009-02-18T15:29:11.083+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><title type='text'>癮科技也有Android專屬子頻道了</title><summary type="text">網址是&amp;nbsp;http://android.cool3c.com/
這是比較偏向user端的site，開發者也可以藉此觀察使用者的需求。

順便更新一下近況，歷經過年，最近的工作機會“似乎”有那麼多了一些，所以最近忙著更新自傳履歷還有K書，不管未來是做什麼工作，基本功是一直要練的。明天又要去面試了，先這樣。</summary><link rel='replies' type='application/atom+xml' href='http://dejob.blogspot.com/feeds/4519624443678385356/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://dejob.blogspot.com/2009/02/android.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2330520166691275207/posts/default/4519624443678385356'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2330520166691275207/posts/default/4519624443678385356'/><link rel='alternate' type='text/html' href='http://dejob.blogspot.com/2009/02/android.html' title='癮科技也有Android專屬子頻道了'/><author><name>Michael</name><uri>http://www.blogger.com/profile/10400970286732489798</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbWSQahEqK-6IRujlubM310_tNWuQM3X6C2kNZKInt-swvK272Rtj4iPuQZm5tIQ3ihO5_B4-Wv4RW5ErxSU6IuBkvAP62KVtkE3-kVaRnTbiUdKgWqkXN0TUyJ5DyMAc/s220/android_icon_256.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2330520166691275207.post-4907763832030516390</id><published>2009-01-04T14:52:00.010+08:00</published><updated>2009-01-06T00:54:04.880+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="C語言"/><category scheme="http://www.blogger.com/atom/ns#" term="組合語言"/><title type='text'>[C語言] Rounding 四捨五入</title><summary type="text">前陣子有公司找我去面談，結果被打槍了，心情低落了一陣子，所以一段時間沒文章。最近在實驗室BBS有學弟妹分享如何在Matlab呼叫C寫的code（因為Matlab實在跑太慢了，更不用說Mac版的），不過這不是重點，因為我的畢業論文就用過這招了，那段程式是用inline assembly做四捨五入，所以我想就來分享一點使用C語言實作Rounding（四捨五入）的各種方法與經驗。

一般人想到用C實作四捨五入，會有幾種方法？就我所知，至少有將近10種或是更多（不好意思，學藝不精），以下分享最簡單到稍難的方法，除此以外大概還有C++專屬的用法、CPU限定的用法（跟32/64-bit有關）以及使用magic number的用法，這些我就不多著墨了，有興趣的讀者可以用我前面提供的線索去找找。

1. 利用C語言中浮點數轉整數會把小數點去掉的特性，這是ANSI C裡頭制定的規格，所以大部份的平台都可以</summary><link rel='replies' type='application/atom+xml' href='http://dejob.blogspot.com/feeds/4907763832030516390/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://dejob.blogspot.com/2009/01/c-rounding.html#comment-form' title='6 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2330520166691275207/posts/default/4907763832030516390'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2330520166691275207/posts/default/4907763832030516390'/><link rel='alternate' type='text/html' href='http://dejob.blogspot.com/2009/01/c-rounding.html' title='[C語言] Rounding 四捨五入'/><author><name>Michael</name><uri>http://www.blogger.com/profile/10400970286732489798</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbWSQahEqK-6IRujlubM310_tNWuQM3X6C2kNZKInt-swvK272Rtj4iPuQZm5tIQ3ihO5_B4-Wv4RW5ErxSU6IuBkvAP62KVtkE3-kVaRnTbiUdKgWqkXN0TUyJ5DyMAc/s220/android_icon_256.png'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2330520166691275207.post-3920587574916059030</id><published>2008-12-22T21:44:00.006+08:00</published><updated>2008-12-23T13:33:19.847+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Barcode"/><category scheme="http://www.blogger.com/atom/ns#" term="生活應用"/><title type='text'>Manage items with codes 用條碼管理物品</title><summary type="text">不知道各位有沒有這種經驗，筆者小時候曾經在家裡冰箱的冷凍庫中找到兩年前的冷凍包子，每年過年冰箱都要進行一次“新陳代謝”，看起來好像沒什麼，最多就是吃壞肚子罷了，但是東西堆在冰箱內會影響氣流的流動，使得冰箱變得更為耗電，以及冷媒的消耗和加速冰箱的折損率；雖然沒有正式的統計，但是我相信全台灣堆在冰箱內的過期食物應該會造成不少多餘的碳排放。事實上，不只是冰箱內的食物可以管理（藏在冰箱內的私房錢也需要管理），所有買回家的東西，都可以管理，問題是，怎麼管理？其中一個簡單的解決方案是：透過條碼管理。拜照像手機與內建鏡頭的的筆電所賜，現在越來越容易取得商品上的Barcode。在日本，到處都可以見到印上QR Code 的商品，QR Code就是所謂的二維條碼，可以嵌入比一維條碼更多的資訊以及更高的污損容錯率（簡單來說，就是弄髒一點甚至破掉都還可以還原），這張圖就是內嵌本站網址的二維條碼：只要拿起有QR </summary><link rel='replies' type='application/atom+xml' href='http://dejob.blogspot.com/feeds/3920587574916059030/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://dejob.blogspot.com/2008/12/manage-items-with-codes.html#comment-form' title='1 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2330520166691275207/posts/default/3920587574916059030'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2330520166691275207/posts/default/3920587574916059030'/><link rel='alternate' type='text/html' href='http://dejob.blogspot.com/2008/12/manage-items-with-codes.html' title='Manage items with codes 用條碼管理物品'/><author><name>Michael</name><uri>http://www.blogger.com/profile/10400970286732489798</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbWSQahEqK-6IRujlubM310_tNWuQM3X6C2kNZKInt-swvK272Rtj4iPuQZm5tIQ3ihO5_B4-Wv4RW5ErxSU6IuBkvAP62KVtkE3-kVaRnTbiUdKgWqkXN0TUyJ5DyMAc/s220/android_icon_256.png'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-3Od9Mvih9N-sp_ZbhSXK-HRdW_eW_55wahnySVKnegw6-aURK4Dl0MQN_Hae12tXOQ1m0OYsxh7GhAWkmjbAN-99wrA9wvpY7oCmYGmlVp91ASvEAUFrKf8k3hejzYGagW7usGxyhNtE/s72-c/QRCode_dejob.png" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2330520166691275207.post-967870827154390884</id><published>2008-12-16T15:28:00.003+08:00</published><updated>2008-12-16T18:32:47.468+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><category scheme="http://www.blogger.com/atom/ns#" term="DDMS"/><title type='text'>[DDMS] Capture screen 擷取畫面</title><summary type="text">所謂工欲善其事，必先利其debugger，想要在Android上面開發程式，總免不了要跟DDMS親蜜親蜜…（快說不下去了），由於日後免不了要和大家分享使用畫面，或是有撰寫使用說明的需要，所以擷取畫面是必不可少的功能。在Android中當然可以寫個utility把Activity的畫面抓下來，不過，這種小事當然不需要用到牛刀，DDMS就可以做到了。以下的說明是在Eclipse，也就是Google官方所建議的開發環境中，使用其他IDE的話，如果沒有和DDMS結合得很好，可能需要手動把DDMS叫出來。

在Eclipse的右上角有個DDMS的tab，不過我剛裝好ADT的時候，其實並沒有找到DDMS的tab，而是像這樣：


這時候要按一下&amp;nbsp;會出現下拉式選單，選擇Others會出現這樣的視窗，然候選取DDMS按OK：


接著就會在右上角看到DDMS的圖示（如果找不到請拉一下左邊斜斜的</summary><link rel='replies' type='application/atom+xml' href='http://dejob.blogspot.com/feeds/967870827154390884/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://dejob.blogspot.com/2008/12/ddms-capture-screen.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2330520166691275207/posts/default/967870827154390884'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2330520166691275207/posts/default/967870827154390884'/><link rel='alternate' type='text/html' href='http://dejob.blogspot.com/2008/12/ddms-capture-screen.html' title='[DDMS] Capture screen 擷取畫面'/><author><name>Michael</name><uri>http://www.blogger.com/profile/10400970286732489798</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbWSQahEqK-6IRujlubM310_tNWuQM3X6C2kNZKInt-swvK272Rtj4iPuQZm5tIQ3ihO5_B4-Wv4RW5ErxSU6IuBkvAP62KVtkE3-kVaRnTbiUdKgWqkXN0TUyJ5DyMAc/s220/android_icon_256.png'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqoFyR0FDLYke2PYN_K6KiC_KMynoZZ-zpRqsRWP5Q8zyAiBpd-J9DCfqOcvZcTmf0b3mqsmNeFpzQbHrvNXHrHqtyxue3HBbOOxjSBFJLG0-UBsYYaNDcn9KynxQPIfpHIU8Y9fvrnH6O/s72-c/DDMS_1-1.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2330520166691275207.post-5100622531279543758</id><published>2008-12-13T22:23:00.008+08:00</published><updated>2009-01-06T00:55:44.572+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><category scheme="http://www.blogger.com/atom/ns#" term="Face detection"/><title type='text'>Face detection in Android</title><summary type="text">以前曾經做過Face detection的研究（雖然指導教授認為這個topic已經被做到爛了），拜數位相機普級所賜，人臉偵測一下變成了人人口袋都有的技術。人臉偵測在相機的應用上之所以普級，在我的觀察中有幾個因素：
1. 自動對焦。一般消費者用DC拍有人臉的照片（自拍或是合照），都是希望能人臉能是對焦的部份，但是過去的DC所設計的對焦點並無法完全反映出人臉所在的位置，於是常常發生脫焦的現象。人臉偵測解決了這項缺失，有些廠商更進一步發展出了微笑快門等等的應用。2. 自動曝光。除了脫焦的困擾外，另一項困擾DC使用者的還有「臉色太難看」，也就是臉色不是太白就是太黑，這也是因為早期的DC大概只有點測光、中央區域以及全域測光，雖然稍懂攝影觀念的人知道可以用曝光鎖定的方式來得到正確的曝光，但對一般使用者來說太煩複了，另一方面也不是每一台相機都提供曝光鎖定的功能，這時候人臉偵測技術就成瞭解決方案之一。3</summary><link rel='replies' type='application/atom+xml' href='http://dejob.blogspot.com/feeds/5100622531279543758/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://dejob.blogspot.com/2008/12/face-detection-in-android.html#comment-form' title='4 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2330520166691275207/posts/default/5100622531279543758'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2330520166691275207/posts/default/5100622531279543758'/><link rel='alternate' type='text/html' href='http://dejob.blogspot.com/2008/12/face-detection-in-android.html' title='Face detection in Android'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2330520166691275207.post-396579869652616460</id><published>2008-12-07T00:44:00.007+08:00</published><updated>2008-12-13T23:09:34.415+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="3D"/><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><category scheme="http://www.blogger.com/atom/ns#" term="OpenGL"/><title type='text'>Android 3D UI</title><summary type="text">最近對Android的3D部份有興趣，先請大家看看這段影片：很炫吧？Android使用OpenGL ES，在Android平台上可以同時顯示3D與2D，跟iPhone相較之下，Android賦予開發者極大的彈性。不喜歡內建的撥號程式？ 沒問題，換掉！不喜歡內建的桌面？沒問題，通通換掉！對許多開發者來說，Android平台可以說是別於iPhone的另一種天堂，但是事情就真的這麼美好嗎？ Android的3D效能如何？ 有什麼樣的極限？ 穩定性如何？ 3D的耗電量如何？這些都將是我會親自去實作與探討的部份，歡迎有興趣的同好一起來討論喔！</summary><link rel='replies' type='application/atom+xml' href='http://dejob.blogspot.com/feeds/396579869652616460/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://dejob.blogspot.com/2008/12/android-3d-ui.html#comment-form' title='1 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2330520166691275207/posts/default/396579869652616460'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2330520166691275207/posts/default/396579869652616460'/><link rel='alternate' type='text/html' href='http://dejob.blogspot.com/2008/12/android-3d-ui.html' title='Android 3D UI'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry></feed>