<?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/opensearchrss/1.0/" xmlns:georss="http://www.georss.org/georss" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0"><id>tag:blogger.com,1999:blog-9061386430991367162</id><updated>2009-11-30T01:32:40.865+08:00</updated><title type="text">Beyond those variables</title><subtitle type="html" /><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://samsharehome.blogspot.com/feeds/posts/default" /><link rel="alternate" type="text/html" href="http://samsharehome.blogspot.com/" /><link rel="hub" href="http://pubsubhubbub.appspot.com/" /><link rel="next" type="application/atom+xml" href="http://www.blogger.com/feeds/9061386430991367162/posts/default?start-index=26&amp;max-results=25" /><author><name>Sam Wang</name><uri>http://www.blogger.com/profile/10160813544320583932</uri><email>Sam.Wang.0723@gmail.com</email></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>65</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><link rel="self" href="http://feeds.feedburner.com/BeyondThoseVaribles" type="application/atom+xml" /><feedburner:feedFlare href="http://add.my.yahoo.com/rss?url=http%3A%2F%2Ffeeds.feedburner.com%2FBeyondThoseVaribles" src="http://us.i1.yimg.com/us.yimg.com/i/us/my/addtomyyahoo4.gif">Subscribe with My Yahoo!</feedburner:feedFlare><feedburner:feedFlare href="http://www.newsgator.com/ngs/subscriber/subext.aspx?url=http%3A%2F%2Ffeeds.feedburner.com%2FBeyondThoseVaribles" src="http://www.newsgator.com/images/ngsub1.gif">Subscribe with NewsGator</feedburner:feedFlare><feedburner:feedFlare href="http://feeds.my.aol.com/add.jsp?url=http%3A%2F%2Ffeeds.feedburner.com%2FBeyondThoseVaribles" src="http://o.aolcdn.com/favorites.my.aol.com/webmaster/ffclient/webroot/locale/en-US/images/myAOLButtonSmall.gif">Subscribe with My AOL</feedburner:feedFlare><feedburner:feedFlare href="http://www.bloglines.com/sub/http://feeds.feedburner.com/BeyondThoseVaribles" src="http://www.bloglines.com/images/sub_modern11.gif">Subscribe with Bloglines</feedburner:feedFlare><feedburner:feedFlare href="http://www.netvibes.com/subscribe.php?url=http%3A%2F%2Ffeeds.feedburner.com%2FBeyondThoseVaribles" src="http://www.netvibes.com/img/add2netvibes.gif">Subscribe with Netvibes</feedburner:feedFlare><feedburner:feedFlare href="http://fusion.google.com/add?feedurl=http%3A%2F%2Ffeeds.feedburner.com%2FBeyondThoseVaribles" src="http://buttons.googlesyndication.com/fusion/add.gif">Subscribe with Google</feedburner:feedFlare><feedburner:feedFlare href="http://www.pageflakes.com/subscribe.aspx?url=http%3A%2F%2Ffeeds.feedburner.com%2FBeyondThoseVaribles" src="http://www.pageflakes.com/ImageFile.ashx?instanceId=Static_4&amp;fileName=ATP_blu_91x17.gif">Subscribe with Pageflakes</feedburner:feedFlare><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><entry><id>tag:blogger.com,1999:blog-9061386430991367162.post-7453934667819532112</id><published>2009-11-25T16:45:00.001+08:00</published><updated>2009-11-25T16:47:41.606+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Cloud Computing" /><title type="text">免費的雲端防毒軟體 - Panda Cloud Antivirus</title><link rel="replies" type="application/atom+xml" href="http://samsharehome.blogspot.com/feeds/7453934667819532112/comments/default" title="張貼意見" /><link rel="replies" type="text/html" href="http://samsharehome.blogspot.com/2009/11/panda-cloud-antivirus.html#comment-form" title="0 個意見" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/9061386430991367162/posts/default/7453934667819532112" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/9061386430991367162/posts/default/7453934667819532112" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BeyondThoseVaribles/~3/bwfDeyx6Wgo/panda-cloud-antivirus.html" title="免費的雲端防毒軟體 - Panda Cloud Antivirus" /><author><name>Sam Wang</name><uri>http://www.blogger.com/profile/10160813544320583932</uri><email>Sam.Wang.0723@gmail.com</email><gd:extendedProperty xmlns:gd="http://schemas.google.com/g/2005" name="OpenSocialUserId" value="08275397744213836369" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><content type="html">
免費的雲端防毒軟體
http://www.cloudantivirus.com/en/


以「第一個沒有更新選項的防毒軟體」聞名全球的Panda Cloud Antivirus，能以最快最即時的雲端防護機制來對抗最新最危險的病毒威脅。別說不可能，藉由集體人工智慧的幫助，Panda先進的伺服器群組能在雲端收集來自世界各地用戶的惡意程式資訊，並且自動進行病毒碼辨識，進而將新的惡意程式病毒株在短短幾分鐘內歸檔完畢。集體人工智慧結合了本機電腦偵測技術與即時的雲端掃描機制，能在提供最強大防護的同時，帶給電腦最低程度的資源耗損（僅需消耗20MB的記憶體容量）。Panda Cloud Antivirus相容於Windows XP (32位元)、 Windows Vista (32位元 / 64位元) 以及Windows 7 (32位元 / 64位元) 等知名操作系統，並且廣泛支援了11國語言。


&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/-AL5cITapVWYe0_nP9poLMs2ows/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/-AL5cITapVWYe0_nP9poLMs2ows/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/-AL5cITapVWYe0_nP9poLMs2ows/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/-AL5cITapVWYe0_nP9poLMs2ows/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/BeyondThoseVaribles/~4/bwfDeyx6Wgo" height="1" width="1"/&gt;</content><feedburner:origLink>http://samsharehome.blogspot.com/2009/11/panda-cloud-antivirus.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-9061386430991367162.post-1241558207788750183</id><published>2009-11-11T17:44:00.002+08:00</published><updated>2009-11-11T17:47:41.601+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Google" /><title type="text">Google發表新的程式語言「Go」</title><link rel="replies" type="application/atom+xml" href="http://samsharehome.blogspot.com/feeds/1241558207788750183/comments/default" title="張貼意見" /><link rel="replies" type="text/html" href="http://samsharehome.blogspot.com/2009/11/googlego.html#comment-form" title="0 個意見" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/9061386430991367162/posts/default/1241558207788750183" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/9061386430991367162/posts/default/1241558207788750183" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BeyondThoseVaribles/~3/QWeEkDq3v7s/googlego.html" title="Google發表新的程式語言「Go」" /><author><name>Sam Wang</name><uri>http://www.blogger.com/profile/10160813544320583932</uri><email>Sam.Wang.0723@gmail.com</email><gd:extendedProperty xmlns:gd="http://schemas.google.com/g/2005" name="OpenSocialUserId" value="08275397744213836369" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><content type="html"> 轉載自http://www.ithome.com.tw/itadm/article.php?c=58033:

Google周一（11/10）發表了新的系統程式語言「Go」，以加速程式開發。Go結合了像是Python動態語言的開發速度，以及擁有C及C++語言等編譯語言的效能及安全性，同時也是一個開放源碼計畫。

Google表示，近十多年來運算環境變化很大，但卻沒有新興的系統語言，導致軟體開發跟不上電腦發展速度。例如有愈來愈多的開發人員不喜歡Java及 C++的笨重型態，因而轉向動態的Python與JavaScript語言，而現在受歡迎的系統語言亦未妥善支援基本的垃圾蒐集或平行運算概念。

這也使得Google認為現在值得嘗試新的語言。Go是一個並行的，具垃圾蒐集功能的語言，並可快速編譯。它在單一電腦上可於幾秒內編譯一個大型的Go程式；而且提供一個軟體架構模型以讓相依分析更容易，
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/OJj2kvCIn4uzhXm40aSX0oZicOI/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/OJj2kvCIn4uzhXm40aSX0oZicOI/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/OJj2kvCIn4uzhXm40aSX0oZicOI/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/OJj2kvCIn4uzhXm40aSX0oZicOI/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/BeyondThoseVaribles/~4/QWeEkDq3v7s" height="1" width="1"/&gt;</content><feedburner:origLink>http://samsharehome.blogspot.com/2009/11/googlego.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-9061386430991367162.post-4982531191832307403</id><published>2009-11-11T11:57:00.002+08:00</published><updated>2009-11-11T12:09:53.482+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Google App Engine" /><category scheme="http://www.blogger.com/atom/ns#" term="Django" /><category scheme="http://www.blogger.com/atom/ns#" term="Python" /><title type="text">Google IO大會上Guido van Rossum對於GAE的演講</title><link rel="replies" type="application/atom+xml" href="http://samsharehome.blogspot.com/feeds/4982531191832307403/comments/default" title="張貼意見" /><link rel="replies" type="text/html" href="http://samsharehome.blogspot.com/2009/11/google-ioguido-van-rossumgae.html#comment-form" title="0 個意見" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/9061386430991367162/posts/default/4982531191832307403" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/9061386430991367162/posts/default/4982531191832307403" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BeyondThoseVaribles/~3/1Le_hs1330o/google-ioguido-van-rossumgae.html" title="Google IO大會上Guido van Rossum對於GAE的演講" /><author><name>Sam Wang</name><uri>http://www.blogger.com/profile/10160813544320583932</uri><email>Sam.Wang.0723@gmail.com</email><gd:extendedProperty xmlns:gd="http://schemas.google.com/g/2005" name="OpenSocialUserId" value="08275397744213836369" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><content type="html">
由於python創始人Guido van Rossum被Google收錄進去...所以python可說是google開發的主力,而GAE也是基於python + django的環境改寫而成, 我們來聽聽去年Google IO大會上Guido van Rossum對於GAE的演講




然後也有介紹python的特性與其他相關部分

&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/2IYq0BGHH-g_vi3qMdCgtM_GQcE/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/2IYq0BGHH-g_vi3qMdCgtM_GQcE/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/2IYq0BGHH-g_vi3qMdCgtM_GQcE/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/2IYq0BGHH-g_vi3qMdCgtM_GQcE/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/BeyondThoseVaribles/~4/1Le_hs1330o" height="1" width="1"/&gt;</content><feedburner:origLink>http://samsharehome.blogspot.com/2009/11/google-ioguido-van-rossumgae.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-9061386430991367162.post-1053107183273995969</id><published>2009-10-17T23:26:00.002+08:00</published><updated>2009-10-17T23:32:33.186+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Flash" /><title type="text">Flash Loader 載入外部 swf 時 stage=null 的問題</title><link rel="replies" type="application/atom+xml" href="http://samsharehome.blogspot.com/feeds/1053107183273995969/comments/default" title="張貼意見" /><link rel="replies" type="text/html" href="http://samsharehome.blogspot.com/2009/10/flash-loader-swf-stagenull.html#comment-form" title="2 個意見" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/9061386430991367162/posts/default/1053107183273995969" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/9061386430991367162/posts/default/1053107183273995969" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BeyondThoseVaribles/~3/15DeM-1cKhw/flash-loader-swf-stagenull.html" title="Flash Loader 載入外部 swf 時 stage=null 的問題" /><author><name>Sam Wang</name><uri>http://www.blogger.com/profile/10160813544320583932</uri><email>Sam.Wang.0723@gmail.com</email><gd:extendedProperty xmlns:gd="http://schemas.google.com/g/2005" name="OpenSocialUserId" value="08275397744213836369" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">2</thr:total><content type="html">
剛剛寫as的時候發生一個問題，由於被載入的swf裡頭有運用stage作場景控制，故被主頁載入時出現 TypeError: Error #1009: Cannot access a property or method of a null object reference.

原因在於被載入的swf在主頁尚未將它加入至場景上時就呼叫了建構子，因此，我們可以運用以下的方法解決：

public function Page05DocumentClass()
{
    if (stage){
        initApp();
    } else {
        addEventListener(Event.ADDED_TO_STAGE, initApp);
    }
}
        
private function initApp(evt:Event=null):void

&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/eep4y5uqbNzzXFy9FmJLlphSNzQ/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/eep4y5uqbNzzXFy9FmJLlphSNzQ/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/eep4y5uqbNzzXFy9FmJLlphSNzQ/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/eep4y5uqbNzzXFy9FmJLlphSNzQ/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/BeyondThoseVaribles/~4/15DeM-1cKhw" height="1" width="1"/&gt;</content><feedburner:origLink>http://samsharehome.blogspot.com/2009/10/flash-loader-swf-stagenull.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-9061386430991367162.post-5994370099530431282</id><published>2009-09-10T10:14:00.000+08:00</published><updated>2009-09-10T10:16:40.836+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Living" /><title type="text">創造「耐心練習周期」(轉)</title><link rel="replies" type="application/atom+xml" href="http://samsharehome.blogspot.com/feeds/5994370099530431282/comments/default" title="張貼意見" /><link rel="replies" type="text/html" href="http://samsharehome.blogspot.com/2009/09/blog-post.html#comment-form" title="0 個意見" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/9061386430991367162/posts/default/5994370099530431282" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/9061386430991367162/posts/default/5994370099530431282" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BeyondThoseVaribles/~3/YL0bLQ1rCKc/blog-post.html" title="創造「耐心練習周期」(轉)" /><author><name>Sam Wang</name><uri>http://www.blogger.com/profile/10160813544320583932</uri><email>Sam.Wang.0723@gmail.com</email><gd:extendedProperty xmlns:gd="http://schemas.google.com/g/2005" name="OpenSocialUserId" value="08275397744213836369" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><content type="html">的確我是一個極度沒有耐心的人，所以要從現在開始訓練...


耐心是心的一種性質，可以藉由蓄意的練習而大幅提升。我發現可以磨練耐心的一個有效方法，就是創造真正的練習周期，也就是在心中設定練習耐心藝術的時間周期。生活本身變成了一間教室，課程叫做「耐心」。

你可以從短短的五分鐘開始，然後逐漸延長你的耐心的容忍度。剛開始的時候，不妨告訴自己：「好，接下來這五分鐘，我不要對任何事情生氣，我要保持耐心。」你將會有驚人的發現。保持耐心的企圖，尤其是你知道只要忍耐一下子，就會立刻加强耐心的容忍度。耐心是那種食髓知味的特質，你將會發現，你確實有能力保持耐心，即使時間長一點也可以。日子久了以後，你甚至會變成一個很有耐心的人。

當我們保持鎮定時，不讓自己生氣或懊惱時，就可以冷靜而堅定地控制行為，這比發怒生氣有效多了。這個讓心靈朝耐心努力的過程簡單易學，重要就是把持自己想發脾氣的情緒，不再鑽牛角尖。


&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/AEnx1Byp3L4ujD4qKD1iF_LsbVw/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/AEnx1Byp3L4ujD4qKD1iF_LsbVw/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/AEnx1Byp3L4ujD4qKD1iF_LsbVw/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/AEnx1Byp3L4ujD4qKD1iF_LsbVw/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/BeyondThoseVaribles/~4/YL0bLQ1rCKc" height="1" width="1"/&gt;</content><feedburner:origLink>http://samsharehome.blogspot.com/2009/09/blog-post.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-9061386430991367162.post-8636653563050751843</id><published>2009-07-27T21:53:00.001+08:00</published><updated>2009-07-27T22:36:51.365+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Living" /><title type="text">前瞻與創意思考</title><link rel="replies" type="application/atom+xml" href="http://samsharehome.blogspot.com/feeds/8636653563050751843/comments/default" title="張貼意見" /><link rel="replies" type="text/html" href="http://samsharehome.blogspot.com/2009/07/blog-post.html#comment-form" title="0 個意見" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/9061386430991367162/posts/default/8636653563050751843" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/9061386430991367162/posts/default/8636653563050751843" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BeyondThoseVaribles/~3/iM6-o54cu0o/blog-post.html" title="前瞻與創意思考" /><author><name>Sam Wang</name><uri>http://www.blogger.com/profile/10160813544320583932</uri><email>Sam.Wang.0723@gmail.com</email><gd:extendedProperty xmlns:gd="http://schemas.google.com/g/2005" name="OpenSocialUserId" value="08275397744213836369" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><content type="html">創新事實上是指創意加變革，單單只有創意但未付諸行動，就還不是創新。例如 明基科技董事長 李焜耀 說過“創新是一種行為的習慣，習慣獨特的方法、理念與結果，勇於做自己”，不隨波逐流，不盲從，正是創新的根源。

 但是，創新並不是突然靈光乍現就足夠，必須還得包括詳細的分析與系統化的流程一步步實現，然而時代在變，人也在變，整個外在環境都在劇烈變動，組織的管理與運作也必須改變，不過需要改變什麼？什麼需要改變？可以奇異的領導力四個“Ｅ”為其重點：

(一) Energy : 高度的幹勁
(二) Energize : 激勵他人的能力
(三) Edge : 制定艱難決策的精準度
(四) Execute : 貫徹執行達成目標的能力

由此可見創新是能夠被管理的，但如何能有效領導創新呢？身為一個創新領導的角色，該員必須要有幹勁，並能影響其他人使他們同樣有幹勁，另外必須要精準不莽撞(瞎忙)，並要真正做的到。
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/lRSgHRLh6l2r69NQ8HbUYAVD-l8/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/lRSgHRLh6l2r69NQ8HbUYAVD-l8/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/lRSgHRLh6l2r69NQ8HbUYAVD-l8/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/lRSgHRLh6l2r69NQ8HbUYAVD-l8/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/BeyondThoseVaribles/~4/iM6-o54cu0o" height="1" width="1"/&gt;</content><feedburner:origLink>http://samsharehome.blogspot.com/2009/07/blog-post.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-9061386430991367162.post-3218019401861061264</id><published>2009-06-25T22:54:00.004+08:00</published><updated>2009-06-28T01:10:01.516+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Living" /><title type="text">適當地運用研發與創新</title><link rel="replies" type="application/atom+xml" href="http://samsharehome.blogspot.com/feeds/3218019401861061264/comments/default" title="張貼意見" /><link rel="replies" type="text/html" href="http://samsharehome.blogspot.com/2009/06/blog-post.html#comment-form" title="0 個意見" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/9061386430991367162/posts/default/3218019401861061264" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/9061386430991367162/posts/default/3218019401861061264" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BeyondThoseVaribles/~3/iOToBUh2PGg/blog-post.html" title="適當地運用研發與創新" /><author><name>Sam Wang</name><uri>http://www.blogger.com/profile/10160813544320583932</uri><email>Sam.Wang.0723@gmail.com</email><gd:extendedProperty xmlns:gd="http://schemas.google.com/g/2005" name="OpenSocialUserId" value="08275397744213836369" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><content type="html">
"研發"囊括了"研究"與"發展"，並可細分為三個部分:

1. 基礎研究 - 主要為了增加科學知識，或許沒有後續的商業應用。
2. 應用研究 - 增加特定應用或需求的知識。
3. 發展 - 應用知識產生有用的實體產品。

Sam感覺大部分在台灣的中小企業都是先產生3的想法再回過頭去研究2...至於1基本上是無產值所以不太被重視。因為總是要在最短時間內得到成效，如果不好才能評估改進或淘汰，或許因應各國的風情不同會產生差異性的結果，但從過去歷史的經驗上，很多大賣的產品都不是專門為了商業利益所開發，可能是機緣巧合，也可能只是對該項事物有極大化的熱情，而促使個人與團隊不惜成本去研究，最後出乎意料的受到好評。

日前感謝"大Sam"的關照，有榮幸去參加Google Marissa Mayer的座談會，她也敘述了Google為外人津津樂道的80/20理論。Sam認為，20%
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/wuNdnGuiz-Qs79-d0EhWNog2Bbg/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/wuNdnGuiz-Qs79-d0EhWNog2Bbg/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/wuNdnGuiz-Qs79-d0EhWNog2Bbg/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/wuNdnGuiz-Qs79-d0EhWNog2Bbg/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/BeyondThoseVaribles/~4/iOToBUh2PGg" height="1" width="1"/&gt;</content><feedburner:origLink>http://samsharehome.blogspot.com/2009/06/blog-post.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-9061386430991367162.post-7251916006497954899</id><published>2009-06-06T20:16:00.002+08:00</published><updated>2009-06-06T20:24:30.704+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="iPhone" /><title type="text">Objective-C 初級讀本翻譯</title><link rel="replies" type="application/atom+xml" href="http://samsharehome.blogspot.com/feeds/7251916006497954899/comments/default" title="張貼意見" /><link rel="replies" type="text/html" href="http://samsharehome.blogspot.com/2009/06/objective-c.html#comment-form" title="2 個意見" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/9061386430991367162/posts/default/7251916006497954899" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/9061386430991367162/posts/default/7251916006497954899" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BeyondThoseVaribles/~3/HdHpjdbo2go/objective-c.html" title="Objective-C 初級讀本翻譯" /><author><name>Sam Wang</name><uri>http://www.blogger.com/profile/10160813544320583932</uri><email>Sam.Wang.0723@gmail.com</email><gd:extendedProperty xmlns:gd="http://schemas.google.com/g/2005" name="OpenSocialUserId" value="08275397744213836369" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">2</thr:total><content type="html">
由於目前 Sam 開始寫 iPhone 程式，但又完全不熟悉 Objective-C，所以只能依照 Apple dev center 內的教學流程走，當然也要從 Objective-C 的一些觀念下手，Sam 花了兩天時間將 Learning Objective-C: A Primer 這篇文章翻譯成中文，畢竟有關資源實在太少，也只能希望未來更多人能夠幫忙翻譯裡頭一些好文章，讓大家一起加入 iPhone 開發的行列。

 如果翻的不好還請多多見諒。

文章下載
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/598M5p9dpt2vqm4qWmXS7M_r-_E/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/598M5p9dpt2vqm4qWmXS7M_r-_E/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/598M5p9dpt2vqm4qWmXS7M_r-_E/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/598M5p9dpt2vqm4qWmXS7M_r-_E/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/BeyondThoseVaribles/~4/HdHpjdbo2go" height="1" width="1"/&gt;</content><feedburner:origLink>http://samsharehome.blogspot.com/2009/06/objective-c.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-9061386430991367162.post-8628493249898884156</id><published>2009-05-29T11:56:00.003+08:00</published><updated>2009-05-29T12:18:59.113+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Google App Engine" /><title type="text">Mircosoft Azure 的野心</title><link rel="replies" type="application/atom+xml" href="http://samsharehome.blogspot.com/feeds/8628493249898884156/comments/default" title="張貼意見" /><link rel="replies" type="text/html" href="http://samsharehome.blogspot.com/2009/05/mircosoft-azure.html#comment-form" title="0 個意見" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/9061386430991367162/posts/default/8628493249898884156" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/9061386430991367162/posts/default/8628493249898884156" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BeyondThoseVaribles/~3/OUSDLbJEYzE/mircosoft-azure.html" title="Mircosoft Azure 的野心" /><author><name>Sam Wang</name><uri>http://www.blogger.com/profile/10160813544320583932</uri><email>Sam.Wang.0723@gmail.com</email><gd:extendedProperty xmlns:gd="http://schemas.google.com/g/2005" name="OpenSocialUserId" value="08275397744213836369" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><content type="html">
有在注意產業相關新聞的人應該都知道微軟已經和Zend(PHP)合作了。很多人可能覺得很奇怪，也有些人認為這樣很好，讓PHP能夠更容易在Windows伺服器上使用...

哪有那麼簡單！！！

Sam 覺得微軟是為了他們的雲端平台Azure，畢竟一開始就落後了Google, Amazon, IBM，想要及時迎頭趕上是蠻麻煩的，於是乎只好搬出這招，打著PHP的光環吸引更多PHP開發者(為數驚人的高市占率)，而且其他家平台都是 Java、Python 之類的語言，較為小眾市場或不是那麼容易入門，相對的以商業角度來看，微軟下對了一步險棋。

但就Sam開發的經驗來看，PHP似乎在系統動態套件擴充部份有一點糟糕，有玩過PHP設定的人都知道要把套件 1.重新編譯(Unix-like) 2.套件檔放到lib下然後修改設定檔(Windows) ，不過雲端平台表示碰不到系統，自然就無法安裝這些東西，這是
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/X3ktX3IQqmDiL1FKBoTP0g6MOLg/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/X3ktX3IQqmDiL1FKBoTP0g6MOLg/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/X3ktX3IQqmDiL1FKBoTP0g6MOLg/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/X3ktX3IQqmDiL1FKBoTP0g6MOLg/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/BeyondThoseVaribles/~4/OUSDLbJEYzE" height="1" width="1"/&gt;</content><feedburner:origLink>http://samsharehome.blogspot.com/2009/05/mircosoft-azure.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-9061386430991367162.post-1014648674252478240</id><published>2009-05-26T17:36:00.004+08:00</published><updated>2009-05-26T18:36:10.862+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Google App Engine" /><category scheme="http://www.blogger.com/atom/ns#" term="Python" /><title type="text">GAE ( Google App Engine ) 模式為什麼將來會流行?</title><link rel="replies" type="application/atom+xml" href="http://samsharehome.blogspot.com/feeds/1014648674252478240/comments/default" title="張貼意見" /><link rel="replies" type="text/html" href="http://samsharehome.blogspot.com/2009/05/gae-google-app-engine.html#comment-form" title="1 個意見" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/9061386430991367162/posts/default/1014648674252478240" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/9061386430991367162/posts/default/1014648674252478240" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BeyondThoseVaribles/~3/STNKAdMFvJw/gae-google-app-engine.html" title="GAE ( Google App Engine ) 模式為什麼將來會流行?" /><author><name>Sam Wang</name><uri>http://www.blogger.com/profile/10160813544320583932</uri><email>Sam.Wang.0723@gmail.com</email><gd:extendedProperty xmlns:gd="http://schemas.google.com/g/2005" name="OpenSocialUserId" value="08275397744213836369" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">1</thr:total><content type="html">
一開始寫這篇文章標題時，本來想下"為甚麼GAE( Google App Engine )在台灣乏人問津..."，但是與其批判，不如說一些真正吸引廠商或老闆的條件比較實在。

講到GAE就不能不提雲端，雲泛指網路世界，其實中國把Cloud Computing稱作雲運算，但Sam還是覺得台灣翻的好，因為重點是終"端"使用者。Google之所以能夠讓用戶端幾近立即的得到搜尋結果，在於內部程式幾乎都實作了Map和Reduce方法去驅動機器讓資料中心平行同步幫您處裡，才能夠達到如此高的效率(參見Map-Reduce)。

這時候我們開始回歸到現實面，如果您擁有一家軟體開發，或目前已經在提供現上應用服務的企業(無論大小)，您會怎麼處理資料? 目前情況不外乎是砸錢設機房、買伺服器、請網管維護、負擔線路費用，或是中小企業租用虛擬伺服器。但如果以上都能省略呢? 俗話說 "打蛇打七寸"，
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/dZcQrkbFqG07-INGkG2r5r6U5X8/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/dZcQrkbFqG07-INGkG2r5r6U5X8/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/dZcQrkbFqG07-INGkG2r5r6U5X8/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/dZcQrkbFqG07-INGkG2r5r6U5X8/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/BeyondThoseVaribles/~4/STNKAdMFvJw" height="1" width="1"/&gt;</content><feedburner:origLink>http://samsharehome.blogspot.com/2009/05/gae-google-app-engine.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-9061386430991367162.post-4122957753615755306</id><published>2009-05-26T15:11:00.003+08:00</published><updated>2009-05-26T15:35:58.614+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Flash" /><title type="text">Web標準可能讓Flash過氣 ... 嗎?</title><link rel="replies" type="application/atom+xml" href="http://samsharehome.blogspot.com/feeds/4122957753615755306/comments/default" title="張貼意見" /><link rel="replies" type="text/html" href="http://samsharehome.blogspot.com/2009/05/webflash.html#comment-form" title="0 個意見" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/9061386430991367162/posts/default/4122957753615755306" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/9061386430991367162/posts/default/4122957753615755306" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BeyondThoseVaribles/~3/kmqh1GuC0QY/webflash.html" title="Web標準可能讓Flash過氣 ... 嗎?" /><author><name>Sam Wang</name><uri>http://www.blogger.com/profile/10160813544320583932</uri><email>Sam.Wang.0723@gmail.com</email><gd:extendedProperty xmlns:gd="http://schemas.google.com/g/2005" name="OpenSocialUserId" value="08275397744213836369" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><content type="html">
早上起床看到一篇文章 Opera：Web標準可能讓Flash過氣，大致上是敘述Opera的執行長說下一版HTML網路程式設計語言推出後，可能讓Adobe公司(奧多比)的Flash技術顯得多餘。

當然不可否認的 HTML 5.0 的確新增了許多讓人心動的功能，如:

‧ 本機儲存(Local storage)，在個人的電腦上儲存資料的技術。此功能可讓你在離線狀態下使用網頁電子郵件，儲存瀏覽器擴充套件的個人設定。

‧ 影像支援(Video support)，讓影片更容易嵌入網頁，並且更容易與Flash等影像技術整合。

‧ 網路工作者(Web workers)，此功能讓瀏覽器在背景執行繁雜的處理任務，讓複雜的網路程式完成任務，又能避免造成使用者介面變得太笨重。

另外還有一些標籤更詳細的定義等...不過不要忘記，就算功能再如何增加，還是在處理Client端的事情，而目前flash
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/r89ocNbxFrd9YFAPpmxswlx9z2w/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/r89ocNbxFrd9YFAPpmxswlx9z2w/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/r89ocNbxFrd9YFAPpmxswlx9z2w/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/r89ocNbxFrd9YFAPpmxswlx9z2w/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/BeyondThoseVaribles/~4/kmqh1GuC0QY" height="1" width="1"/&gt;</content><feedburner:origLink>http://samsharehome.blogspot.com/2009/05/webflash.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-9061386430991367162.post-5355822947250918358</id><published>2009-05-20T11:43:00.007+08:00</published><updated>2009-05-20T12:10:45.590+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="php" /><title type="text">學習 CakePHP</title><link rel="replies" type="application/atom+xml" href="http://samsharehome.blogspot.com/feeds/5355822947250918358/comments/default" title="張貼意見" /><link rel="replies" type="text/html" href="http://samsharehome.blogspot.com/2009/05/cakephp.html#comment-form" title="0 個意見" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/9061386430991367162/posts/default/5355822947250918358" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/9061386430991367162/posts/default/5355822947250918358" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BeyondThoseVaribles/~3/D2oiYkC3Q6c/cakephp.html" title="學習 CakePHP" /><author><name>Sam Wang</name><uri>http://www.blogger.com/profile/10160813544320583932</uri><email>Sam.Wang.0723@gmail.com</email><gd:extendedProperty xmlns:gd="http://schemas.google.com/g/2005" name="OpenSocialUserId" value="08275397744213836369" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/_uge0r2l3u1Q/ShOCumvuJBI/AAAAAAAAClo/j_XnO2dZi-8/s72-c/pic21.png" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><content type="html">
之前回絕掉一個cakePHP的案子, 實在是因為要寫報告和找資料太忙了...。
說到cakePHP, 最重要的就是 MVC(Model-View-Controller) 的設計模式, 以往由於php是比較近似於程序導向語言, 故大家都會把所有動作與畫面顯示寫在一隻程式上, 當然這樣是很方便的, 不過萬一遇到的不是網站而是大型的網路應用程式, 可能這個做法會讓你非常頭痛, 等到寫幾百隻php時回頭除錯真可形容為"欲哭無淚"。而 MVC 所指的是把 1.資料處裡 2.流程邏輯 3.畫面顯示 分開, 這樣針對不同的功能產生清晰的分類, 維護與除錯就不再是一件惱人的事。 

傳統的寫法 


MVC的寫法 



此外 cakePHP 在資料層(Model)做了物件關連映射 ORM(Object-Relational Mapping) 的處理, 可以以物件導向的方式操作資料庫欄位(做了映射, 
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/kReUFp8BIsNbTaZRRtCiPAJb7XE/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/kReUFp8BIsNbTaZRRtCiPAJb7XE/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/kReUFp8BIsNbTaZRRtCiPAJb7XE/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/kReUFp8BIsNbTaZRRtCiPAJb7XE/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/BeyondThoseVaribles/~4/D2oiYkC3Q6c" height="1" width="1"/&gt;</content><feedburner:origLink>http://samsharehome.blogspot.com/2009/05/cakephp.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-9061386430991367162.post-1076249512885964993</id><published>2009-03-30T12:35:00.003+08:00</published><updated>2009-03-30T12:51:41.034+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Python" /><title type="text">PyPdf 讀取中文Pdf亂碼問題</title><link rel="replies" type="application/atom+xml" href="http://samsharehome.blogspot.com/feeds/1076249512885964993/comments/default" title="張貼意見" /><link rel="replies" type="text/html" href="http://samsharehome.blogspot.com/2009/03/pypdf-pdf.html#comment-form" title="2 個意見" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/9061386430991367162/posts/default/1076249512885964993" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/9061386430991367162/posts/default/1076249512885964993" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BeyondThoseVaribles/~3/mDoO-mLubfw/pypdf-pdf.html" title="PyPdf 讀取中文Pdf亂碼問題" /><author><name>Sam Wang</name><uri>http://www.blogger.com/profile/10160813544320583932</uri><email>Sam.Wang.0723@gmail.com</email><gd:extendedProperty xmlns:gd="http://schemas.google.com/g/2005" name="OpenSocialUserId" value="08275397744213836369" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">2</thr:total><content type="html">
最近找論文資料常常會下載一堆相關題目的pdf檔然後慢慢消化，不過這樣實在是很浪費時間，所以週末就想說寫一隻程式搜尋資料夾中所有pdf，然後給它關鍵詞，最後能夠顯示這些關鍵詞在哪幾篇pdf的第幾頁中，如此一來就省事多了。

python的好處就是擴充套件多如過江之鯽，當然光pdf就好多個，這裡挑選的是PyPdf.

安裝完成之後先以取出內容文字為主寫出一段程式測試，測試pdf為中文big5編碼，但除了標題encode("big5")能夠正常顯示中文外，內容卻是一片亂碼，於是把每段文字拆解成char再使用hex code列印出來...

0xb8 0xea ... 這不是big5的"資"嗎?表示編碼是正確的阿!為何print就是有錯誤?

於是我使用一個範例字串 zh = "\xb8\xea" ，print出來是"資"沒錯，但 u"\xb8\xea" 加上unicode
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/jZLGPmMkhWKnzzHTeiFi_EfD-lk/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/jZLGPmMkhWKnzzHTeiFi_EfD-lk/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/jZLGPmMkhWKnzzHTeiFi_EfD-lk/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/jZLGPmMkhWKnzzHTeiFi_EfD-lk/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/BeyondThoseVaribles/~4/mDoO-mLubfw" height="1" width="1"/&gt;</content><feedburner:origLink>http://samsharehome.blogspot.com/2009/03/pypdf-pdf.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-9061386430991367162.post-2536011095523129464</id><published>2009-03-26T17:22:00.002+08:00</published><updated>2009-03-26T17:26:49.431+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Living" /><title type="text">妙事一籮筐</title><link rel="replies" type="application/atom+xml" href="http://samsharehome.blogspot.com/feeds/2536011095523129464/comments/default" title="張貼意見" /><link rel="replies" type="text/html" href="http://samsharehome.blogspot.com/2009/03/blog-post_26.html#comment-form" title="0 個意見" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/9061386430991367162/posts/default/2536011095523129464" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/9061386430991367162/posts/default/2536011095523129464" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BeyondThoseVaribles/~3/szUtKCKLZy0/blog-post_26.html" title="妙事一籮筐" /><author><name>Sam Wang</name><uri>http://www.blogger.com/profile/10160813544320583932</uri><email>Sam.Wang.0723@gmail.com</email><gd:extendedProperty xmlns:gd="http://schemas.google.com/g/2005" name="OpenSocialUserId" value="08275397744213836369" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/_uge0r2l3u1Q/SctJZZWO2hI/AAAAAAAACik/MmFcSGAVs1M/s72-c/work.png" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><content type="html">
這幾天真的很妙~

前天收到一個加拿大台灣留學生請我幫忙寫他們教授出的python作業



今天早上iCloud CEO也發了一封信請我幫忙翻譯(當然不是只有我啦, 還有很多其他中國地區使用者)


內容大概是這樣


算是為了這周平凡無奇的生活添加一點樂趣^^
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/A7TAj-Novh4Z9_EO5hoF-LGfcuc/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/A7TAj-Novh4Z9_EO5hoF-LGfcuc/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/A7TAj-Novh4Z9_EO5hoF-LGfcuc/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/A7TAj-Novh4Z9_EO5hoF-LGfcuc/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/BeyondThoseVaribles/~4/szUtKCKLZy0" height="1" width="1"/&gt;</content><feedburner:origLink>http://samsharehome.blogspot.com/2009/03/blog-post_26.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-9061386430991367162.post-4579572058191593464</id><published>2009-03-25T15:06:00.004+08:00</published><updated>2009-03-25T15:33:06.759+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Python" /><title type="text">Python RssParser with MySQL</title><link rel="replies" type="application/atom+xml" href="http://samsharehome.blogspot.com/feeds/4579572058191593464/comments/default" title="張貼意見" /><link rel="replies" type="text/html" href="http://samsharehome.blogspot.com/2009/03/python-rssparser-with-mysql.html#comment-form" title="2 個意見" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/9061386430991367162/posts/default/4579572058191593464" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/9061386430991367162/posts/default/4579572058191593464" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BeyondThoseVaribles/~3/xX5RRFB2ev4/python-rssparser-with-mysql.html" title="Python RssParser with MySQL" /><author><name>Sam Wang</name><uri>http://www.blogger.com/profile/10160813544320583932</uri><email>Sam.Wang.0723@gmail.com</email><gd:extendedProperty xmlns:gd="http://schemas.google.com/g/2005" name="OpenSocialUserId" value="08275397744213836369" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">2</thr:total><content type="html">
其實繼上次寫了python資料型態上下集之後，這次應該來寫一下迴圈與條件式等的教學，但是其實那些東西都是廢話，我下一次再把一些注意事項放上來就好了!不然難道你認為if條件式會寫成怎樣??

這次開始從實例下手，之前我寫過Java RssParser，是儲存成檔案的方式，現在用python教大家如何parse Google RSS新聞檔並儲存 發布時間、標題、連結、相關內容 等資訊到MySQL中。


把玩這支程式之前請先安裝兩個函式庫，feedparser與MySQLdb(說明)。裡頭都有安裝說明與教學。

By the way, 我的python是2.5版


sql -- 建立資料庫並使用SQL新增下列資料表



CREATE TABLE IF NOT EXISTS `FEED_MSTR` (
 `ID` int(11) NOT NULL AUTO_INCREMENT,
 `
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/RONB9e3_DSvAg_wOervIW1A29q8/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/RONB9e3_DSvAg_wOervIW1A29q8/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/RONB9e3_DSvAg_wOervIW1A29q8/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/RONB9e3_DSvAg_wOervIW1A29q8/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/BeyondThoseVaribles/~4/xX5RRFB2ev4" height="1" width="1"/&gt;</content><feedburner:origLink>http://samsharehome.blogspot.com/2009/03/python-rssparser-with-mysql.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-9061386430991367162.post-3579331187066677916</id><published>2009-03-24T16:20:00.002+08:00</published><updated>2009-03-24T16:25:35.234+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Living" /><title type="text">最新十大透支健康行業</title><link rel="replies" type="application/atom+xml" href="http://samsharehome.blogspot.com/feeds/3579331187066677916/comments/default" title="張貼意見" /><link rel="replies" type="text/html" href="http://samsharehome.blogspot.com/2009/03/blog-post_5906.html#comment-form" title="0 個意見" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/9061386430991367162/posts/default/3579331187066677916" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/9061386430991367162/posts/default/3579331187066677916" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BeyondThoseVaribles/~3/H5oiJXBUsYw/blog-post_5906.html" title="最新十大透支健康行業" /><author><name>Sam Wang</name><uri>http://www.blogger.com/profile/10160813544320583932</uri><email>Sam.Wang.0723@gmail.com</email><gd:extendedProperty xmlns:gd="http://schemas.google.com/g/2005" name="OpenSocialUserId" value="08275397744213836369" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/_uge0r2l3u1Q/SciYSWu4deI/AAAAAAAACiU/qjdFJgXnO7E/s72-c/xinsrc_4220803181304250111186.jpg" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><content type="html">
轉載自http://big5.xinhuanet.com/gate/big5/news.xinhuanet.com/health/2006-08/18/content_4977708.htm


很高興IT業榮獲榜首...說這句話的同時壽命又少了0.01歲...





但是國外工程師好像都很悠閒, 每天穿短褲, 到處有零食與電動...而且人家的創意與技術就是比我們強...
總有一天我也要打造這樣的環境...

健康透支十大行業依次為：

    1、IT

    2、企業高管(含民營企業主)

    3、媒體記者

    4、證券

    5、保險

    6、出租車司機

    7、交警

    8、銷售

    9、律師

    10、教師

    調查發現，精神壓力過大，生活節奏過快，飲食和生活不規律，是這十大行業的人群嚴重透支健康的主要原因。

    
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/dnKRVXJslPJbswHiuXYeSXT32T0/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/dnKRVXJslPJbswHiuXYeSXT32T0/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/dnKRVXJslPJbswHiuXYeSXT32T0/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/dnKRVXJslPJbswHiuXYeSXT32T0/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/BeyondThoseVaribles/~4/H5oiJXBUsYw" height="1" width="1"/&gt;</content><feedburner:origLink>http://samsharehome.blogspot.com/2009/03/blog-post_5906.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-9061386430991367162.post-1429952158503462952</id><published>2009-03-19T10:59:00.003+08:00</published><updated>2009-03-19T11:24:36.958+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Living" /><title type="text">不知道要下什麼標題</title><link rel="replies" type="application/atom+xml" href="http://samsharehome.blogspot.com/feeds/1429952158503462952/comments/default" title="張貼意見" /><link rel="replies" type="text/html" href="http://samsharehome.blogspot.com/2009/03/blog-post_19.html#comment-form" title="0 個意見" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/9061386430991367162/posts/default/1429952158503462952" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/9061386430991367162/posts/default/1429952158503462952" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BeyondThoseVaribles/~3/xOhgLpnKBGY/blog-post_19.html" title="不知道要下什麼標題" /><author><name>Sam Wang</name><uri>http://www.blogger.com/profile/10160813544320583932</uri><email>Sam.Wang.0723@gmail.com</email><gd:extendedProperty xmlns:gd="http://schemas.google.com/g/2005" name="OpenSocialUserId" value="08275397744213836369" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><content type="html">
就像美國總統歐巴馬一樣面對AIG發放紅利氣到嗆到, 今早我也發生了一樣的事, 剛出門騎車就拋錨所以只好等附近的機車行開門就把車牽過去麻煩他修一下...以下為對話(對方可能不是老闆但我還是叫老闆):


我: "老闆, 我機車掛點了可以幫我看一下嗎?"
老闆: "...."(準備開店中...)
我: "老闆, 我把機車推上去歐"(把機車推到維修區)
老闆: "你推上去幹麼...我有叫你推上去嗎?"
我: "...拍謝"(把機車倒退回去)
我: "請問大概什麼時候能好?"
老闆: "要等啦!你先留你的聯絡方式"
我: "不能幫個忙先看一下嗎?我等等還有事"
老闆: "急什麼, 留下機車鑰匙修好在和你說!"
我: "..."(留下鑰匙默默走人)


走掉得路上我越想越氣...媽的...我是叫你修免費的歐!長得一副好像我欠他的樣子!

後來中午接到電話回去看換下來的零件, 
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/cT4LGVzsQKoPN1rDfIL-cVSjXm8/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/cT4LGVzsQKoPN1rDfIL-cVSjXm8/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/cT4LGVzsQKoPN1rDfIL-cVSjXm8/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/cT4LGVzsQKoPN1rDfIL-cVSjXm8/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/BeyondThoseVaribles/~4/xOhgLpnKBGY" height="1" width="1"/&gt;</content><feedburner:origLink>http://samsharehome.blogspot.com/2009/03/blog-post_19.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-9061386430991367162.post-6315005111043950230</id><published>2009-03-09T13:10:00.003+08:00</published><updated>2009-03-09T13:27:40.438+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="php" /><title type="text">PHPMailer utf-8郵件主旨亂碼問題</title><link rel="replies" type="application/atom+xml" href="http://samsharehome.blogspot.com/feeds/6315005111043950230/comments/default" title="張貼意見" /><link rel="replies" type="text/html" href="http://samsharehome.blogspot.com/2009/03/phpmailer-utf-8.html#comment-form" title="4 個意見" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/9061386430991367162/posts/default/6315005111043950230" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/9061386430991367162/posts/default/6315005111043950230" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BeyondThoseVaribles/~3/nwom6hj9YUM/phpmailer-utf-8.html" title="PHPMailer utf-8郵件主旨亂碼問題" /><author><name>Sam Wang</name><uri>http://www.blogger.com/profile/10160813544320583932</uri><email>Sam.Wang.0723@gmail.com</email><gd:extendedProperty xmlns:gd="http://schemas.google.com/g/2005" name="OpenSocialUserId" value="08275397744213836369" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">4</thr:total><content type="html">
日前使用PHPMailer發送utf-8格式的中文郵件時, 發現收件夾內接收的郵件均為亂碼, 而且連帶影響到郵件的html內文, 原因在於E-Mail標準格式中表頭的部分不允許使用雙位元的文字(也就是中文等...), 所以必須使用mb_encode_mimeheader()函式將雙位元文字編碼為單位元字串。



但是因為mb_encode_mimeheader()預設的字串編碼為西方ISO-8859-1, 所以如果你的編碼中文字為UTF-8就必須使用mb_internal_encoding()將內部預設編碼改為UTF-8。


&lt;?php
mb_internal_encoding('UTF-8');    // 內部預設編碼改為UTF-8
$mail-&amp;gt;Subject = mb_encode_mimeheader($_POST['title'], "UTF-8");
$mail-&amp;gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/heE3JNB6Zd8Qyqz5nCIdDXx_4ak/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/heE3JNB6Zd8Qyqz5nCIdDXx_4ak/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/heE3JNB6Zd8Qyqz5nCIdDXx_4ak/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/heE3JNB6Zd8Qyqz5nCIdDXx_4ak/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/BeyondThoseVaribles/~4/nwom6hj9YUM" height="1" width="1"/&gt;</content><feedburner:origLink>http://samsharehome.blogspot.com/2009/03/phpmailer-utf-8.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-9061386430991367162.post-204866497334088498</id><published>2009-03-06T09:44:00.002+08:00</published><updated>2009-03-06T09:51:43.623+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="iPhone" /><title type="text">研究開發iPhone應用程式</title><link rel="replies" type="application/atom+xml" href="http://samsharehome.blogspot.com/feeds/204866497334088498/comments/default" title="張貼意見" /><link rel="replies" type="text/html" href="http://samsharehome.blogspot.com/2009/03/iphone.html#comment-form" title="3 個意見" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/9061386430991367162/posts/default/204866497334088498" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/9061386430991367162/posts/default/204866497334088498" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BeyondThoseVaribles/~3/9jpmksvOh5k/iphone.html" title="研究開發iPhone應用程式" /><author><name>Sam Wang</name><uri>http://www.blogger.com/profile/10160813544320583932</uri><email>Sam.Wang.0723@gmail.com</email><gd:extendedProperty xmlns:gd="http://schemas.google.com/g/2005" name="OpenSocialUserId" value="08275397744213836369" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">3</thr:total><content type="html">
最近和歐拔聊天, 想說來玩一下iPhone的開發, 雖然我自己去年就買了G1 Dev版, 本來要加入Android的行列, 但好死不死今年又買了MacBook而且實在逃不出它的魔掌...

首先要先從Objective-C開始學, 基本上宣告和一些寫法有點差異, 但畢竟大體上結構差不多, 只是又要自己管理記憶體有點煩就是了, 畢竟Java寫久都覺得釋放記憶體這種動作應該是VM應該做的吧~

最近也找了蠻多相關文件, 但是早上這個讓我比較興奮, 是史丹福大學的iPhone開發課程講義耶!http://www.stanford.edu/class/cs193p/cgi-bin/index.php, 裡面的程式碼與pdf都可以下載來用, 網路真是太棒了
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/vnOBGjUN35_pmvz5bnOmqedv66o/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/vnOBGjUN35_pmvz5bnOmqedv66o/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/vnOBGjUN35_pmvz5bnOmqedv66o/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/vnOBGjUN35_pmvz5bnOmqedv66o/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/BeyondThoseVaribles/~4/9jpmksvOh5k" height="1" width="1"/&gt;</content><feedburner:origLink>http://samsharehome.blogspot.com/2009/03/iphone.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-9061386430991367162.post-1856103091974011011</id><published>2009-03-04T12:19:00.000+08:00</published><updated>2009-03-04T12:20:14.615+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Python" /><title type="text">Python 資料型態(下)</title><link rel="replies" type="application/atom+xml" href="http://samsharehome.blogspot.com/feeds/1856103091974011011/comments/default" title="張貼意見" /><link rel="replies" type="text/html" href="http://samsharehome.blogspot.com/2009/03/python_3225.html#comment-form" title="0 個意見" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/9061386430991367162/posts/default/1856103091974011011" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/9061386430991367162/posts/default/1856103091974011011" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BeyondThoseVaribles/~3/zn5EjgXR52E/python_3225.html" title="Python 資料型態(下)" /><author><name>Sam Wang</name><uri>http://www.blogger.com/profile/10160813544320583932</uri><email>Sam.Wang.0723@gmail.com</email><gd:extendedProperty xmlns:gd="http://schemas.google.com/g/2005" name="OpenSocialUserId" value="08275397744213836369" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><content type="html">4. Dictionaries -&amp;gt; Dictionaries擁有鍵與值的對照, 類似Java中的Map類 

&amp;gt;&amp;gt;&amp;gt; demo = {'a':123, 'b':456, 'c':789} # 使用“:“分隔鍵與值
&amp;gt;&amp;gt;&amp;gt; demo['a']
123



當然也可以不必在一開始就做指定動作, 能夠在不同位置指定內容讓Dictionaries擁有了極大的彈性

&amp;gt;&amp;gt;&amp;gt; demo = {}  #  指定一個空殼給demo
&amp;gt;&amp;gt;&amp;gt; demo['a'] = 123
&amp;gt;&amp;gt;&amp;gt; demo['b'] = 456
&amp;gt;&amp;gt;&amp;gt; demo
{'a' : 123, 'b' : 456}



巢狀內容的呼叫

&amp;gt;&amp;gt;&amp;gt; demo = {'name':{'first':'Bob', 'last':'Smith'},
      'job':['dev', 'mgr'],
      'age':40.5}
&amp;gt;&amp;gt;&amp;gt; 
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/ZrhOrT2EF9DWYnsGYVzhk8XrDAg/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/ZrhOrT2EF9DWYnsGYVzhk8XrDAg/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/ZrhOrT2EF9DWYnsGYVzhk8XrDAg/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/ZrhOrT2EF9DWYnsGYVzhk8XrDAg/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/BeyondThoseVaribles/~4/zn5EjgXR52E" height="1" width="1"/&gt;</content><feedburner:origLink>http://samsharehome.blogspot.com/2009/03/python_3225.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-9061386430991367162.post-6188009880408633859</id><published>2009-03-04T09:58:00.001+08:00</published><updated>2009-03-04T10:00:27.810+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Python" /><title type="text">Python 資料型態(上)</title><link rel="replies" type="application/atom+xml" href="http://samsharehome.blogspot.com/feeds/6188009880408633859/comments/default" title="張貼意見" /><link rel="replies" type="text/html" href="http://samsharehome.blogspot.com/2009/03/python_04.html#comment-form" title="0 個意見" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/9061386430991367162/posts/default/6188009880408633859" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/9061386430991367162/posts/default/6188009880408633859" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BeyondThoseVaribles/~3/qWSlL3bbd5Y/python_04.html" title="Python 資料型態(上)" /><author><name>Sam Wang</name><uri>http://www.blogger.com/profile/10160813544320583932</uri><email>Sam.Wang.0723@gmail.com</email><gd:extendedProperty xmlns:gd="http://schemas.google.com/g/2005" name="OpenSocialUserId" value="08275397744213836369" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><content type="html">
Python 有一個特性, 就是變數的宣告不需要使用強型態, 你可以指定 a = 2, 也可以在下一行改變成 a = 'sample', 包括陣列存放都可以使用多種不同型態的變數例如 a = [123, 'abc', 1.23]。

介紹一下 Python 核心物件內含的資料型態 

1. Numbers -&amp;gt; 整數(integer), 含小數的數字(floating-point numbers), 另外像是一些長整數(unlimited-precision “long” integers), 複雜的數字(complex numbers)與固定精度的小數(fixed-precision decimals)等...。 

範例: 

&amp;gt;&amp;gt;&amp;gt; 123 + 456   # 整數相加
579
&amp;gt;&amp;gt;&amp;gt; 1.5 * 4    # 小數運算
6.0
&amp;gt;&amp;gt;&amp;gt; 2 ** 100   # 2的100次方

&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/yJ42EZPIHkOYQzo1Mda3mNRpDo8/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/yJ42EZPIHkOYQzo1Mda3mNRpDo8/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/yJ42EZPIHkOYQzo1Mda3mNRpDo8/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/yJ42EZPIHkOYQzo1Mda3mNRpDo8/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/BeyondThoseVaribles/~4/qWSlL3bbd5Y" height="1" width="1"/&gt;</content><feedburner:origLink>http://samsharehome.blogspot.com/2009/03/python_04.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-9061386430991367162.post-4498360556872017739</id><published>2009-03-03T12:24:00.003+08:00</published><updated>2009-03-03T12:32:35.419+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Python" /><title type="text">什麼是 Python？</title><link rel="replies" type="application/atom+xml" href="http://samsharehome.blogspot.com/feeds/4498360556872017739/comments/default" title="張貼意見" /><link rel="replies" type="text/html" href="http://samsharehome.blogspot.com/2009/03/python.html#comment-form" title="0 個意見" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/9061386430991367162/posts/default/4498360556872017739" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/9061386430991367162/posts/default/4498360556872017739" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BeyondThoseVaribles/~3/35k4r63W6EI/python.html" title="什麼是 Python？" /><author><name>Sam Wang</name><uri>http://www.blogger.com/profile/10160813544320583932</uri><email>Sam.Wang.0723@gmail.com</email><gd:extendedProperty xmlns:gd="http://schemas.google.com/g/2005" name="OpenSocialUserId" value="08275397744213836369" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/_uge0r2l3u1Q/SayxsA12IJI/AAAAAAAACaQ/F8je6crbMp4/s72-c/150px-Guido_van_Rossum_OSCON_2006.jpg" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><content type="html">

Python的創始人為Guido van Rossum。在1989年聖誕節期間的阿姆斯特丹，Guido為了打發聖誕節的無趣，決心開發一個新的指令碼解釋程式，作為ABC語言的一種繼承。之所以選中 Python（大蟒蛇的意思）作為程式的名字，是因為他是一個Monty Python的飛行馬戲團的愛好者。

就這樣，Python在Guido手中誕生了。實際上，第一個實作是在Mac機上。可以說，Python是從ABC發展起來，主要受到了Modula-3（另一種相當優美且強大的語言，為小型團體所設計的）的影響。並且結合了Unix shell和C的習慣。

雖然 Python 可能被粗略地分類為「指令碼語言」（script language），但實際上一些大規模軟體開發計劃例如 Zope、Mnet 及 BitTorrent，Google 也廣泛地使用它。 Python 
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/LEEkvxYRq_5S44Q66JCEdwMeIJQ/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/LEEkvxYRq_5S44Q66JCEdwMeIJQ/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/LEEkvxYRq_5S44Q66JCEdwMeIJQ/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/LEEkvxYRq_5S44Q66JCEdwMeIJQ/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/BeyondThoseVaribles/~4/35k4r63W6EI" height="1" width="1"/&gt;</content><feedburner:origLink>http://samsharehome.blogspot.com/2009/03/python.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-9061386430991367162.post-165724165385389772</id><published>2009-03-02T16:42:00.003+08:00</published><updated>2009-03-02T17:00:07.550+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Living" /><title type="text">HTML 5.0</title><link rel="replies" type="application/atom+xml" href="http://samsharehome.blogspot.com/feeds/165724165385389772/comments/default" title="張貼意見" /><link rel="replies" type="text/html" href="http://samsharehome.blogspot.com/2009/03/html-50.html#comment-form" title="1 個意見" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/9061386430991367162/posts/default/165724165385389772" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/9061386430991367162/posts/default/165724165385389772" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BeyondThoseVaribles/~3/161DyV2dYFc/html-50.html" title="HTML 5.0" /><author><name>Sam Wang</name><uri>http://www.blogger.com/profile/10160813544320583932</uri><email>Sam.Wang.0723@gmail.com</email><gd:extendedProperty xmlns:gd="http://schemas.google.com/g/2005" name="OpenSocialUserId" value="08275397744213836369" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">1</thr:total><content type="html">
W3C據說2004年就開始推動5.0草案, 但是我想根本沒有什麼人知道這件事, 直到最近Apple Sarfari 4 beta版釋出之後, 看見其中新功能支援HTML5.0影音標籤才赫然驚覺。Google一下才知道5.0是近期最大的改版行為, 目標是在2010年之前，HTML 5的正式版將面世，目標是把這種超文字標示語言（markup language) 帶往今天的豐富媒體網路環境，以新型的應用程式設計介面，控制影音內容。

其中一些改變例如引入了一整套全新的元素來讓構建頁面變得更加簡單與直接使用video, audio之類的標籤描述影像與音效嵌入等...詳細資訊可以參考這篇http://www.wowbox.com.tw/blog/article.asp?id=2446

最近剛好也寫到一篇報告, 內容是有關數位出版, 大部分的權力也是被西方組織或是出版社壟斷, 
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/ABSBM4LoBzHdcJQ5aGW30Vgyv38/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/ABSBM4LoBzHdcJQ5aGW30Vgyv38/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/ABSBM4LoBzHdcJQ5aGW30Vgyv38/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/ABSBM4LoBzHdcJQ5aGW30Vgyv38/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/BeyondThoseVaribles/~4/161DyV2dYFc" height="1" width="1"/&gt;</content><feedburner:origLink>http://samsharehome.blogspot.com/2009/03/html-50.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-9061386430991367162.post-6759193644090960232</id><published>2009-02-26T09:28:00.003+08:00</published><updated>2009-02-26T09:49:51.783+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Flash" /><title type="text">Flash的鳥問題</title><link rel="replies" type="application/atom+xml" href="http://samsharehome.blogspot.com/feeds/6759193644090960232/comments/default" title="張貼意見" /><link rel="replies" type="text/html" href="http://samsharehome.blogspot.com/2009/02/flash.html#comment-form" title="0 個意見" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/9061386430991367162/posts/default/6759193644090960232" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/9061386430991367162/posts/default/6759193644090960232" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BeyondThoseVaribles/~3/W366e90SgxU/flash.html" title="Flash的鳥問題" /><author><name>Sam Wang</name><uri>http://www.blogger.com/profile/10160813544320583932</uri><email>Sam.Wang.0723@gmail.com</email><gd:extendedProperty xmlns:gd="http://schemas.google.com/g/2005" name="OpenSocialUserId" value="08275397744213836369" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/_uge0r2l3u1Q/SaX1NMBR8iI/AAAAAAAACYc/cJWkJyekyh8/s72-c/32.jpg" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><content type="html">
這幾天用Flash做事老是碰到一堆鳥問題, 首先是前一版本編輯的class拿來cs4使用會有“The name of this class conflicts with the name of another class that was loaded”, 表示類別名稱有衝突, google一下之後, 把系統時間用NTPClock校正再重新除錯就沒問題, 這部份還好...。

昨天重灌了cs3, 為什麼呢?因為cs4 bug實在太多了, 例如像是MovieClip裡有很多文字欄位, 整個編輯的速度就會慢到不像話, 但換回去之後麻煩才大, 首先把原本的fla存成cs3格式, 打開cs3後相當順暢, Ctrl + Enter compile過程也很順利, 放到網站上, 咦...怎麼某一部份的元件就是無法addChild上去?原本還以為程式寫錯, 但是本機執行一切正常, 網路上就會有問題, 
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/9aZDAA4k3wEqyY0VcIECWqLNm58/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/9aZDAA4k3wEqyY0VcIECWqLNm58/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/9aZDAA4k3wEqyY0VcIECWqLNm58/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/9aZDAA4k3wEqyY0VcIECWqLNm58/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/BeyondThoseVaribles/~4/W366e90SgxU" height="1" width="1"/&gt;</content><feedburner:origLink>http://samsharehome.blogspot.com/2009/02/flash.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-9061386430991367162.post-7290827864550122774</id><published>2009-02-18T14:46:00.005+08:00</published><updated>2009-02-18T15:35:41.500+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Living" /><title type="text">程式語言版本的相容性</title><link rel="replies" type="application/atom+xml" href="http://samsharehome.blogspot.com/feeds/7290827864550122774/comments/default" title="張貼意見" /><link rel="replies" type="text/html" href="http://samsharehome.blogspot.com/2009/02/blog-post_18.html#comment-form" title="0 個意見" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/9061386430991367162/posts/default/7290827864550122774" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/9061386430991367162/posts/default/7290827864550122774" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BeyondThoseVaribles/~3/9aVoXcVKb0M/blog-post_18.html" title="程式語言版本的相容性" /><author><name>Sam Wang</name><uri>http://www.blogger.com/profile/10160813544320583932</uri><email>Sam.Wang.0723@gmail.com</email><gd:extendedProperty xmlns:gd="http://schemas.google.com/g/2005" name="OpenSocialUserId" value="08275397744213836369" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/_uge0r2l3u1Q/SZu6RJ7UcwI/AAAAAAAACVk/4Id0DsRJ1Z8/s72-c/Untitled-1.jpg" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><content type="html">
雖然Sam不會因為程式語言版本相容問題而去學習一種語言, 但最近的情況的確困擾了我。

首先是前年ActionScript2.0晉升3.0, 完全變成一種類Java語言, 當然2.0之前的概念已不復見, 即使這樣但看見優化多倍的效能時還是得盡力去學習, 目前也在專案當中使用, 事實上對於像Sam這種物件導向起家的工程師來說如此的改變再好不過, 因為有Java的底子所以學起來事半功倍, 但對於那些程序導向的工程師就...

然後PHP6的改變, 最恐怖的就是資料庫這段上面統一了(使用PDO), 不再像以前一樣每種資料庫要調用不同的module, 基於oo的立場是很好的改變但對大多數現在線上仍然使用php4, 5的朋友就是惡夢了, 表示你們要砍掉重練!

其他的變革像是:


1.支援Unicode

2.Register Globals將被移除

3.Magic Quotes 將消失


&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/ahraGxksNbSwzWFQjBWAN3jXdb8/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/ahraGxksNbSwzWFQjBWAN3jXdb8/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/ahraGxksNbSwzWFQjBWAN3jXdb8/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/ahraGxksNbSwzWFQjBWAN3jXdb8/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/BeyondThoseVaribles/~4/9aVoXcVKb0M" height="1" width="1"/&gt;</content><feedburner:origLink>http://samsharehome.blogspot.com/2009/02/blog-post_18.html</feedburner:origLink></entry></feed>
