<?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-30436268</id><updated>2026-07-24T14:05:59.079+08:00</updated><category term="科技亂談"/><category term="Java Script"/><category term=".Net"/><category term="ASP.NET 2.0"/><category term="網路"/><category term="閒聊"/><category term="ASP.NET"/><category term="AJAX"/><category term="PHP"/><category term="Tools"/><category term="T - SQL"/><category term="網頁程式"/><category term="Microsoft Office"/><category term="jQuery"/><category term=".Net 3.5"/><category term="Android"/><category term="CSS"/><category term="IIS"/><category term="Silverlight"/><category term="VB .NET"/><category term="好站推薦"/><category term="鑠雅生活"/><category term="Blogger教學"/><category term="HTML"/><category term="Media Services"/><category term="O-R Mapping"/><category term="OS"/><category term="SQL Server"/><category term="VB Script"/><category term="WinForm"/><category term="Windows Mobile"/><category term="lego"/><category term="作業系統"/><category term="房屋"/><category term="文章"/><category term="旅遊"/><category term="資訊"/><category term="鑠散文"/><title type='text'>Mr. NFrankenstein</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://subocheng.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/30436268/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://subocheng.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/30436268/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>YCCS</name><uri>http://www.blogger.com/profile/14658315920971067951</uri><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><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>137</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-30436268.post-7854689250115853408</id><published>2021-08-14T23:45:00.001+08:00</published><updated>2021-08-14T23:45:11.659+08:00</updated><title type='text'>GoogleFinance 查詢台股</title><content type='html'>使用google 試算表的GoogleFinance公式，取得台股價格

取得大盤現在股價
=GoogleFinance(&quot;TPE:TAIEX&quot;,&quot;PRICE&quot;)

取得個股現在股價
=GoogleFinance(&quot;TPE:1101&quot;,&quot;PRICE&quot;)
1101是股票代碼

取得昨天收盤價
=GoogleFinance(&quot;TPE:1101&quot;,&quot;closeyest&quot;)

取得EPS
=GoogleFinance(&quot;TPE:1101&quot;,&quot;EPS&quot;)

取得本益比
=GoogleFinance(&quot;TPE:1101&quot;,&quot;PE&quot;)</content><link rel='replies' type='application/atom+xml' href='http://subocheng.blogspot.com/feeds/7854689250115853408/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://subocheng.blogspot.com/2021/08/googlefinance.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/30436268/posts/default/7854689250115853408'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/30436268/posts/default/7854689250115853408'/><link rel='alternate' type='text/html' href='http://subocheng.blogspot.com/2021/08/googlefinance.html' title='GoogleFinance 查詢台股'/><author><name>YCCS</name><uri>http://www.blogger.com/profile/14658315920971067951</uri><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>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-30436268.post-7125735100781541617</id><published>2017-02-17T10:38:00.002+08:00</published><updated>2017-02-17T10:38:54.208+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><title type='text'>Acer Iconia W700 平板電腦 安裝Windows + Android 雙系統</title><content type='html'>在Acer Iconia W700上面安裝Windows&amp;nbsp;+ Android 雙系統&lt;br /&gt;
&lt;br /&gt;
首先，先在W700上面安裝Windows，或使用原廠的Windows系統。&lt;br /&gt;
&lt;br /&gt;
上面步驟省略。(原廠的出廠安裝就是Windows了。)&lt;br /&gt;
&lt;br /&gt;
接下來說明如何安裝Android雙系統。&lt;br /&gt;
&lt;br /&gt;
1. 連結至 &lt;a href=&quot;http://www.android-x86.org/download&quot;&gt;http://www.android-x86.org/download&lt;/a&gt; 網站下載Remix OS for PC。(本文章將以&quot;Android-x86 6.0-r1&quot;為說明範例)。&lt;br /&gt;
&lt;br /&gt;
這次我是下載【&lt;a href=&quot;https://www.fosshub.com/Remix-OS.html/Remix_OS_for_PC_Android_M_64bit_B2016112101.zip&quot; target=&quot;_blank&quot;&gt;Download Remix OS for PC 64-bit Package (EFI &amp;amp; Legacy)&lt;/a&gt; 】。&lt;br /&gt;
下載後解開Zip檔案。將得到下列檔案列表&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4fFph9WURarNlc9I1MaSrrYCJuvDbnEa4x-lfRE9mNgaBRjj8qDZhKz4tDdsQsSv_TByVXofuB0z2ys9VArSlGZQZg5RmqEkECz4WWjgfwNbcPcuANDnmbJ4dexbMdyP8LXxp/s1600/1.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;93&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4fFph9WURarNlc9I1MaSrrYCJuvDbnEa4x-lfRE9mNgaBRjj8qDZhKz4tDdsQsSv_TByVXofuB0z2ys9VArSlGZQZg5RmqEkECz4WWjgfwNbcPcuANDnmbJ4dexbMdyP8LXxp/s320/1.JPG&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
執行：Remix_OS_for_PC_Installation_Tool-B2016080802.exe 檔案&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEglPO5Y0SbALtKippWrO5fmBPLbQUDb559TjINe6kYFyJClkpTalUvYhVHyj1Lqz8W-pRQmkwQ8MmPZzHhqbQ8DsnX57A3Om1Z2RQdLwuu-5fLeMylbG98fzNKxcOua0lIqxcO6/s1600/1.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;93&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEglPO5Y0SbALtKippWrO5fmBPLbQUDb559TjINe6kYFyJClkpTalUvYhVHyj1Lqz8W-pRQmkwQ8MmPZzHhqbQ8DsnX57A3Om1Z2RQdLwuu-5fLeMylbG98fzNKxcOua0lIqxcO6/s320/1.JPG&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
出現下列畫面&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBuoQCUBcaIe3F9SXw5RJWBDJxF_CEqIkobOpJnau-LTunq0xC1_tj0qcoNwG6eIrfwdHXnW-lUp1LzCFpBGEIgu7NSQ_e1Oc-AQpqFjrCPgy13uBehSSlfxBnQrx4GdItF4ML/s1600/2.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;239&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBuoQCUBcaIe3F9SXw5RJWBDJxF_CEqIkobOpJnau-LTunq0xC1_tj0qcoNwG6eIrfwdHXnW-lUp1LzCFpBGEIgu7NSQ_e1Oc-AQpqFjrCPgy13uBehSSlfxBnQrx4GdItF4ML/s320/2.JPG&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
點案Browse，選擇剛剛解壓縮後的ISO檔案：Remix_OS_for_PC_Android_M_64bit_B2016101201.iso&lt;br /&gt;
&lt;br /&gt;
選擇要安裝的磁碟機路徑後，點按【確定】。&lt;br /&gt;
&lt;br /&gt;
之後根據畫面的設定，直接跑就可以了。&lt;br /&gt;
&lt;br /&gt;
安裝完之後，重新開機，會出現下列畫面：&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJ9FZHm6fEZfBNwBMG79NC1M1IClLqPFPzQIsjDCkYyp6ifze5725cX7GFZsh_7A9gJB2cR8FGp9U95lGz7NkqP6MujUkhnNDZA8CZ5FM8lKEeXpXy0jtlNVlvAplBMa8nsuBX/s1600/3.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJ9FZHm6fEZfBNwBMG79NC1M1IClLqPFPzQIsjDCkYyp6ifze5725cX7GFZsh_7A9gJB2cR8FGp9U95lGz7NkqP6MujUkhnNDZA8CZ5FM8lKEeXpXy0jtlNVlvAplBMa8nsuBX/s1600/3.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
那你就可以根據你想要進入Windows或是Android系統(Remix OS)，自行決定了。&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://subocheng.blogspot.com/feeds/7125735100781541617/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://subocheng.blogspot.com/2017/02/acer-iconia-w700-windows-android.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/30436268/posts/default/7125735100781541617'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/30436268/posts/default/7125735100781541617'/><link rel='alternate' type='text/html' href='http://subocheng.blogspot.com/2017/02/acer-iconia-w700-windows-android.html' title='Acer Iconia W700 平板電腦 安裝Windows + Android 雙系統'/><author><name>YCCS</name><uri>http://www.blogger.com/profile/14658315920971067951</uri><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><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4fFph9WURarNlc9I1MaSrrYCJuvDbnEa4x-lfRE9mNgaBRjj8qDZhKz4tDdsQsSv_TByVXofuB0z2ys9VArSlGZQZg5RmqEkECz4WWjgfwNbcPcuANDnmbJ4dexbMdyP8LXxp/s72-c/1.JPG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-30436268.post-6851220350584141165</id><published>2016-08-29T19:54:00.001+08:00</published><updated>2016-08-29T19:54:53.347+08:00</updated><title type='text'>如何查詢越南駕照真假</title><content type='html'>越南駕照正面上方有一個So / No的號碼，&lt;br /&gt;
&lt;br /&gt;
在下面網址又上面有一個功能可以查詢該號碼是否正確。&lt;br /&gt;
&lt;br /&gt;
http://gplx.gov.vn/default.aspx&lt;br /&gt;
&lt;br /&gt;
查詢後會出現持有者姓名，以及持有的種類。&lt;br /&gt;
&lt;br /&gt;
若沒有出現，則代表待駕照為假的。</content><link rel='replies' type='application/atom+xml' href='http://subocheng.blogspot.com/feeds/6851220350584141165/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://subocheng.blogspot.com/2016/08/blog-post.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/30436268/posts/default/6851220350584141165'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/30436268/posts/default/6851220350584141165'/><link rel='alternate' type='text/html' href='http://subocheng.blogspot.com/2016/08/blog-post.html' title='如何查詢越南駕照真假'/><author><name>YCCS</name><uri>http://www.blogger.com/profile/14658315920971067951</uri><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>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-30436268.post-2395920981687982261</id><published>2015-02-03T14:33:00.001+08:00</published><updated>2015-02-03T14:33:51.283+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="網路"/><title type='text'>簡易下載土豆網、優酷、酷6影片的方法</title><content type='html'>&lt;h2&gt;
&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;u&gt;&lt;span style=&quot;color: #cc0000;&quot;&gt;網址直接加上『xia』&lt;/span&gt;&lt;/u&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;br /&gt;
土豆網範例&lt;br /&gt;
&lt;br /&gt;
進入土豆網：http://www.tudou.com/&lt;br /&gt;
&lt;br /&gt;
搜尋到你想要的影片，並且進入撥放畫面。會得到一個網址如下：&lt;br /&gt;
&lt;br /&gt;
http://www.tudou.com/albumplay/Z0oNjG-bUeU/rQGiC_i-K2c.html&lt;br /&gt;
&lt;br /&gt;
直接修改網址，在tudou後面加上xia，如下：&lt;br /&gt;
&lt;br /&gt;
http://www.tudou&lt;b&gt;&lt;span style=&quot;color: #cc0000;&quot;&gt;&lt;u&gt;xia&lt;/u&gt;&lt;/span&gt;&lt;/b&gt;.com/albumplay/Z0oNjG-bUeU/rQGiC_i-K2c.html&lt;br /&gt;
&lt;br /&gt;
會進入到下列畫面：&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7DxO5NRyEX9tcmz_JstQmkvZLuKYaVPWye8yJoQtCoPykl80sufWeE8pWfMq78AK2FOGlIK4jA0856VckDAHexAJNcvTgKNEFasZ8ViebdteHjvbb_fWy344IJ6E1gA68q5-s/s1600/1.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7DxO5NRyEX9tcmz_JstQmkvZLuKYaVPWye8yJoQtCoPykl80sufWeE8pWfMq78AK2FOGlIK4jA0856VckDAHexAJNcvTgKNEFasZ8ViebdteHjvbb_fWy344IJ6E1gA68q5-s/s1600/1.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
可以在上方列選擇要下載的品質，&lt;br /&gt;
然後下面會產生多個連結，按右鍵，『另存連結為』，即可將檔案存檔ˋ下來了。&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
其餘優酷、酷6也是利用此方法下載，相當方便。&lt;br /&gt;
&lt;br /&gt;
另外一提，如果你是下載高清，下載後會有一堆mp4檔案，&lt;br /&gt;
可以透過VLC Player來進行撥放，用選擇資料夾的方式，即可自動往下撥，不用一個一個點，&lt;br /&gt;
相當方便。&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://subocheng.blogspot.com/feeds/2395920981687982261/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://subocheng.blogspot.com/2015/02/6.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/30436268/posts/default/2395920981687982261'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/30436268/posts/default/2395920981687982261'/><link rel='alternate' type='text/html' href='http://subocheng.blogspot.com/2015/02/6.html' title='簡易下載土豆網、優酷、酷6影片的方法'/><author><name>YCCS</name><uri>http://www.blogger.com/profile/14658315920971067951</uri><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><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7DxO5NRyEX9tcmz_JstQmkvZLuKYaVPWye8yJoQtCoPykl80sufWeE8pWfMq78AK2FOGlIK4jA0856VckDAHexAJNcvTgKNEFasZ8ViebdteHjvbb_fWy344IJ6E1gA68q5-s/s72-c/1.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-30436268.post-6204159026120513080</id><published>2014-05-08T01:05:00.001+08:00</published><updated>2014-05-08T01:05:17.536+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="網路"/><title type='text'>美國AMAZON亞馬遜購物網站購物教學 - 購買筆電 (包含報關與商檢)</title><content type='html'>首先先上Amazon網站選擇你所想要的商品，選定商品後，再來選擇有支援國際運送的賣家。&lt;br /&gt;
&lt;br /&gt;
在下方的xx new點下去，可以進去選擇賣家。&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEggEmft8zO-OmiY07Rl9n5UkeIhJ4oW7gpo_sUHdpHlyVveN7Sm-oku6rFzRwSY28RgJ8vFtzMQGlysyj1oVuiTAtWga0irjLAhwa27EftVS5vkMRzoNA4gmd1csTqsgaKPlGZJ/s1600/1.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEggEmft8zO-OmiY07Rl9n5UkeIhJ4oW7gpo_sUHdpHlyVveN7Sm-oku6rFzRwSY28RgJ8vFtzMQGlysyj1oVuiTAtWga0irjLAhwa27EftVS5vkMRzoNA4gmd1csTqsgaKPlGZJ/s1600/1.JPG&quot; height=&quot;177&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
並非所有的賣家都有支援國際運送，所以你要找有&quot;&lt;b&gt;&lt;u&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;i&gt;International &amp;amp; domestic shipping rates&lt;/i&gt;&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&quot;字眼的賣家，然後進去研究他的國際運費，看看是否符合你的期望。最後再將他加入購物車。&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjhOWtdJTCEGCdKOUEWq6tANKQyE3xxRZ7omKK0fg8SEnbOmwilap4T8GjJFFVxztLlBf8m-CHcvFO4CipSwoBHZW6heIeUR1Dcav5wYn9cWvnOoyn03cvrtSVVXv8TqJ45gEZu/s1600/2.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjhOWtdJTCEGCdKOUEWq6tANKQyE3xxRZ7omKK0fg8SEnbOmwilap4T8GjJFFVxztLlBf8m-CHcvFO4CipSwoBHZW6heIeUR1Dcav5wYn9cWvnOoyn03cvrtSVVXv8TqJ45gEZu/s1600/2.JPG&quot; height=&quot;115&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
加入購物車後，就可以進行結帳瞜，至於詳細步驟網路上很多人說明，我就不多說了。直接跳到運送以及報關的部分。&lt;br /&gt;
&lt;br /&gt;
購買完之後，可以在Amazon的Order Details裡面的Track Package裡面看到目前貨品的運送狀況。&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-XWfRGt4CHv97cDG-owCeCJ0QlGYCaAmuWkmiCcSuGdy1W0hMQE1ED4hqUBHWzQJn1GD-LksEDYhsIzPdb8lQtjlVSTE5wNx1zMOpd0MDrRWlrFcE81sVwFm7-bvsf8k1HF6L/s1600/3.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-XWfRGt4CHv97cDG-owCeCJ0QlGYCaAmuWkmiCcSuGdy1W0hMQE1ED4hqUBHWzQJn1GD-LksEDYhsIzPdb8lQtjlVSTE5wNx1zMOpd0MDrRWlrFcE81sVwFm7-bvsf8k1HF6L/s1600/3.JPG&quot; height=&quot;272&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
我這次購買這個筆電的金額是1879 USD，(超過1000 USD) ，使用Fedex運送。&lt;br /&gt;
&lt;br /&gt;
1. 筆記型電腦進口到台灣，沒有進口關稅，但有5%的營業稅。&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ( 商品金額 + 運費 ) * 5% = 營業稅&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ( 1879 + 20 ) * 5% = 94.95 USD 再轉成台幣。&lt;br /&gt;
&lt;br /&gt;
2. 超過1000USD不能只以自用切結書搞定，需要另外提供&quot;商檢合格證&quot;&lt;br /&gt;
&lt;br /&gt;
這一次Fedex的報關人員在貨品到的前三天就已經開始跟我聯絡，要我提供下列資料&lt;br /&gt;
&lt;br /&gt;
1. 身分證正反面影本&lt;br /&gt;
2. 個案委任書&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEip1Gg32RP-NUoqterBjMw7qVeLs_GnmTx1hj1GoGUSUm72N5WfwsrI2lrqXB8V9mDNyBkXySGbc11R1iX898XJP6wyvKprSlk42SvEw0drtXn8HJShmehhsRA6u-tQjZskpD1l/s1600/4.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEip1Gg32RP-NUoqterBjMw7qVeLs_GnmTx1hj1GoGUSUm72N5WfwsrI2lrqXB8V9mDNyBkXySGbc11R1iX898XJP6wyvKprSlk42SvEw0drtXn8HJShmehhsRA6u-tQjZskpD1l/s1600/4.png&quot; height=&quot;400&quot; width=&quot;282&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
3. 自用切結書&lt;br /&gt;
我是以我購買的筆電為範例，填寫下列自用切結書。&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;工作頻率、輸出功率是要寫你電腦的通訊頻率。基本上就是wifi了&lt;/span&gt;&lt;/b&gt;。&lt;br /&gt;
可以直接打電話跟廠商的客服詢問。&lt;br /&gt;
(不過如果你的商品在台灣沒有賣的話，他也不會有的，所以你就直接抄型錄上面的wifi支援種類，然後寫上輸出功率就可以了。)不要太離譜都可以申請通過。&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiwHXlcCWxvUpJ95BWmyj0o3OdgWXN_yk3tpcPjkEo_CchhhBTJMHoaV4cCYyy5Emqo_uzjL5GvJwaH9K5GHGxSveQe1kecOBA36MnYiDv9rluG7hKuw2C1TbPgPkxAxftRFALP/s1600/5.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiwHXlcCWxvUpJ95BWmyj0o3OdgWXN_yk3tpcPjkEo_CchhhBTJMHoaV4cCYyy5Emqo_uzjL5GvJwaH9K5GHGxSveQe1kecOBA36MnYiDv9rluG7hKuw2C1TbPgPkxAxftRFALP/s1600/5.png&quot; height=&quot;400&quot; width=&quot;282&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
4. 商品照片&lt;br /&gt;
利用Google大神當你尋找摟，可以提供多張，但其中&lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;一定要有一張有顯示你的廠牌名稱&lt;/span&gt;&lt;/b&gt;。要不然誰知道你的商品是哪個廠牌阿？&lt;br /&gt;
&lt;br /&gt;
5. 型錄&lt;br /&gt;
我是直接將Amazon的商品頁面整頁印下來，注意：要有商品規格，特別是wifi的部分唷。&lt;br /&gt;
&lt;br /&gt;
3、4、5是要上傳到NCC的。&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
上面這個步驟是商品沒有超過1000USD的手續，但我的商品超過1000 USD，所以要另外申請商檢，但也不用太擔心瞜~~基本上就是花錢了事，請報驗行幫忙處理摟~~&lt;br /&gt;
&lt;br /&gt;
Fedex的小姐介紹我找&quot;奕勝報驗行&quot;，代辦費用為1200元,規費200元,總計 1400元。&lt;br /&gt;
&lt;br /&gt;
你只要付錢給他們，然後簽一張委託書給他們，並告知你商品的型號，剩下來的他們就會幫你處理了，商檢完畢，他們也會將資料送給Fedex的承辦人員。&lt;br /&gt;
&lt;br /&gt;
完成上述動作，就完成報關搂~~&lt;br /&gt;
&lt;br /&gt;
另外因為筆電有5%的營業稅需要繳納，因此Fedex會先報價跟你確認，確認無誤後，他就會申請報關瞜，關稅會由Fedex先代墊，等貨到你家的時候，他才會跟你收。&lt;br /&gt;
&lt;br /&gt;
這次買這台筆電，所有雜費都算進去，比台灣沒有便宜多少。但耗費蠻大的心力的。(因為第一次不懂，之後就比較知道瞜！)&lt;br /&gt;
&lt;br /&gt;
總結，要到Amazon買東西，還是請有往返美國的朋友幫忙帶，才是最好的方法。&lt;br /&gt;
&lt;br /&gt;
美國的NB真的比台灣便宜太多了，以我這次買的 New X1 Carbon來說，大約便宜一萬多，但被運費、關稅、代驗費吃一吃，也差不多搂~~~</content><link rel='replies' type='application/atom+xml' href='http://subocheng.blogspot.com/feeds/6204159026120513080/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://subocheng.blogspot.com/2014/05/amazon.html#comment-form' title='2 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/30436268/posts/default/6204159026120513080'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/30436268/posts/default/6204159026120513080'/><link rel='alternate' type='text/html' href='http://subocheng.blogspot.com/2014/05/amazon.html' title='美國AMAZON亞馬遜購物網站購物教學 - 購買筆電 (包含報關與商檢)'/><author><name>YCCS</name><uri>http://www.blogger.com/profile/14658315920971067951</uri><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><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEggEmft8zO-OmiY07Rl9n5UkeIhJ4oW7gpo_sUHdpHlyVveN7Sm-oku6rFzRwSY28RgJ8vFtzMQGlysyj1oVuiTAtWga0irjLAhwa27EftVS5vkMRzoNA4gmd1csTqsgaKPlGZJ/s72-c/1.JPG" height="72" width="72"/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-30436268.post-4952431200732971303</id><published>2014-03-12T09:42:00.000+08:00</published><updated>2014-03-12T09:42:51.545+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Media Services"/><title type='text'>Use IIS Media Service To Push Live Streaming (out put Smooth Streaming and HLS)</title><content type='html'>1. 安裝IIS Media Services，請參閱下列連結安裝&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://msdn.microsoft.com/zh-tw/ee441163.aspx&quot;&gt;http://msdn.microsoft.com/zh-tw/ee441163.aspx&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
2. 進入IIS -&amp;gt; Media Services -&amp;gt; Live Smooth Streaming 發行端點&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFnTf9MdvMEUUYWabi7n4sFfcOks8wD5iCIC-ktT-GG_fHh4UJvaU9JR_7vwmvgIxjc6qfBzkCD9Hs8240vkTvfzMYUnkPyyx7fZBFCf5ti6xZiegFiDEaEiynRXBrBlhGS5Jh/s1600/1.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFnTf9MdvMEUUYWabi7n4sFfcOks8wD5iCIC-ktT-GG_fHh4UJvaU9JR_7vwmvgIxjc6qfBzkCD9Hs8240vkTvfzMYUnkPyyx7fZBFCf5ti6xZiegFiDEaEiynRXBrBlhGS5Jh/s1600/1.jpg&quot; height=&quot;221&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEivlAlqq5FV7n_oSX5PHX0i0UsfA0NXkgA6EpJlwKD6gQ72ungG8-xfQoLZHOdfNkoqIcYWgM-S6C2cedzDnow5KxLoEDUUX9nQDQQdxSagx8U7ud4k67pOkxiPL1Jt7O-Wv3Ge/s1600/2.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEivlAlqq5FV7n_oSX5PHX0i0UsfA0NXkgA6EpJlwKD6gQ72ungG8-xfQoLZHOdfNkoqIcYWgM-S6C2cedzDnow5KxLoEDUUX9nQDQQdxSagx8U7ud4k67pOkxiPL1Jt7O-Wv3Ge/s1600/2.jpg&quot; height=&quot;176&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
3. &quot;新增&quot; 發行端點&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg9NcuYO_TAK0yjoiZPbpLg1FlVzwsbbAjN4Ftq6b6TtG1Q4yK2vbxBopE0X9RXE6r6RXay65y5Jn5fGf5M93KQcK8_comqKewYCPuThntN9Gvud2LsHD4RrNCNZy6T2RtZNuz1/s1600/3.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg9NcuYO_TAK0yjoiZPbpLg1FlVzwsbbAjN4Ftq6b6TtG1Q4yK2vbxBopE0X9RXE6r6RXay65y5Jn5fGf5M93KQcK8_comqKewYCPuThntN9Gvud2LsHD4RrNCNZy6T2RtZNuz1/s1600/3.jpg&quot; height=&quot;320&quot; width=&quot;278&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgSwLIV1plU7FLw_mgbCcICxpqh3nSzUzSPiEOtq1mgCCyuzqohkqKAKcGa0ZqU8mEQ8OpEmPQauc2VnEnygZbgRL-ejGuEZ69m6eyjLm-rM62pGuAe7C4rkBtefpm5e-wszJAG/s1600/4.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgSwLIV1plU7FLw_mgbCcICxpqh3nSzUzSPiEOtq1mgCCyuzqohkqKAKcGa0ZqU8mEQ8OpEmPQauc2VnEnygZbgRL-ejGuEZ69m6eyjLm-rM62pGuAe7C4rkBtefpm5e-wszJAG/s1600/4.jpg&quot; height=&quot;320&quot; width=&quot;278&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwnFUkHhbFBoxXhX4jn4Q-ZrKn-wahNGEgXG-6kqit3KixD7nI3g9ndbvhWy7ZQ6UyVy7yscf9nL9nSh01rDRZIdcE5bjAzNPJ0MuBpiCJ1QFqQM_N_PTui8hpn9HmVJIhFerU/s1600/5.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwnFUkHhbFBoxXhX4jn4Q-ZrKn-wahNGEgXG-6kqit3KixD7nI3g9ndbvhWy7ZQ6UyVy7yscf9nL9nSh01rDRZIdcE5bjAzNPJ0MuBpiCJ1QFqQM_N_PTui8hpn9HmVJIhFerU/s1600/5.jpg&quot; height=&quot;320&quot; width=&quot;278&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4. 準備Smooth Streaming的檔案 (multi-bitrate)&lt;br /&gt;
範例：檔案放置於&lt;br /&gt;
C:\PushLive\media\189\189-878418c8-9ab4-485d-92ec-217cc6628a25.ism&lt;br /&gt;
C:\PushLive\media\241\241-24efd965-402b-4a4d-9a92-7329597eb4f5.ism&lt;br /&gt;
&lt;br /&gt;
5. 至下列網址下載PushEncoder.exe以及StartPush.bat&lt;br /&gt;
&lt;br /&gt;
http://1drv.ms/1fSIebY&lt;br /&gt;
&lt;br /&gt;
6. 修改bat檔案&lt;br /&gt;
&lt;br /&gt;
start /MIN /I pushencoder.exe &amp;nbsp;/loop &amp;nbsp;http://127.0.0.1/live1.isml C:\PushLive\media\189\189-878418c8-9ab4-485d-92ec-217cc6628a25.ism&lt;br /&gt;
&lt;br /&gt;
目的網址以及來源位置。&lt;br /&gt;
&lt;br /&gt;
7. 完成，開始Push 影像流&lt;br /&gt;
&lt;br /&gt;
8. Smooth Streaming 網址&lt;br /&gt;
&lt;br /&gt;
http://127.0.0.1/live1.isml/manifest&lt;br /&gt;
&lt;br /&gt;
9. HLS Live m3u8&lt;br /&gt;
&lt;br /&gt;
http://127.0.0.1/live1.isml/manifest&lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;(format=m3u8-aapl).m3u8&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://subocheng.blogspot.com/feeds/4952431200732971303/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://subocheng.blogspot.com/2014/03/use-iis-media-service-to-push-live.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/30436268/posts/default/4952431200732971303'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/30436268/posts/default/4952431200732971303'/><link rel='alternate' type='text/html' href='http://subocheng.blogspot.com/2014/03/use-iis-media-service-to-push-live.html' title='Use IIS Media Service To Push Live Streaming (out put Smooth Streaming and HLS)'/><author><name>YCCS</name><uri>http://www.blogger.com/profile/14658315920971067951</uri><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><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFnTf9MdvMEUUYWabi7n4sFfcOks8wD5iCIC-ktT-GG_fHh4UJvaU9JR_7vwmvgIxjc6qfBzkCD9Hs8240vkTvfzMYUnkPyyx7fZBFCf5ti6xZiegFiDEaEiynRXBrBlhGS5Jh/s72-c/1.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-30436268.post-968294986266831180</id><published>2014-01-05T15:44:00.003+08:00</published><updated>2014-01-05T15:44:58.509+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server"/><title type='text'>SQL Server 2008 - 壓縮DB Log File</title><content type='html'>ALTER DATABASE &lt;span style=&quot;color: red;&quot;&gt;&lt;b&gt;資料庫名稱&lt;/b&gt;&lt;/span&gt; SET RECOVERY SIMPLE&lt;br /&gt;
&lt;br /&gt;
USE &lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;資料庫名稱&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
GO&lt;br /&gt;
&lt;br /&gt;
DBCC SHRINKFILE(&#39;&lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;LDF的邏輯名稱&lt;/span&gt;&lt;/b&gt;&#39;,2)&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&lt;b&gt;其中的LDF的邏輯名稱，可以下以下指令取得&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&lt;b&gt;select * from sys.database_files 通常都是：資料庫名稱_log&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ALTER DATABASE &lt;span style=&quot;color: red;&quot;&gt;&lt;b&gt;資料庫名稱&lt;/b&gt;&lt;/span&gt; SET RECOVERY FULL</content><link rel='replies' type='application/atom+xml' href='http://subocheng.blogspot.com/feeds/968294986266831180/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://subocheng.blogspot.com/2014/01/sql-server-2008-db-log-file.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/30436268/posts/default/968294986266831180'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/30436268/posts/default/968294986266831180'/><link rel='alternate' type='text/html' href='http://subocheng.blogspot.com/2014/01/sql-server-2008-db-log-file.html' title='SQL Server 2008 - 壓縮DB Log File'/><author><name>YCCS</name><uri>http://www.blogger.com/profile/14658315920971067951</uri><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>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-30436268.post-5655305005689620091</id><published>2013-11-27T12:46:00.000+08:00</published><updated>2013-11-27T12:46:34.928+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="網路"/><title type='text'>賭上生命 齊柏林只為記錄台灣之美</title><content type='html'>&lt;iframe frameborder=&quot;0&quot; height=&quot;351&quot; scrolling=&quot;no&quot; src=&quot;http://tw.news.yahoo.com/video/賭上生命-齊柏林只為記錄台灣之美-120844361.html?format=embed&amp;amp;player_autoplay=false&quot; width=&quot;624&quot;&gt;&lt;/iframe&gt;</content><link rel='replies' type='application/atom+xml' href='http://subocheng.blogspot.com/feeds/5655305005689620091/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://subocheng.blogspot.com/2013/11/blog-post.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/30436268/posts/default/5655305005689620091'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/30436268/posts/default/5655305005689620091'/><link rel='alternate' type='text/html' href='http://subocheng.blogspot.com/2013/11/blog-post.html' title='賭上生命 齊柏林只為記錄台灣之美'/><author><name>YCCS</name><uri>http://www.blogger.com/profile/14658315920971067951</uri><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>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-30436268.post-2113865017877787318</id><published>2013-11-23T11:44:00.001+08:00</published><updated>2013-11-23T11:44:20.236+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PHP"/><title type='text'>[轉載] PHP 類別繼承的建構子與解構子</title><content type='html'>PHP 類別的繼承及建解構子的幾個注意點&lt;br /&gt;
&lt;br /&gt;
1. php 的建構子會在類別實體化後執行，寫法有兩種，一個是用 __construct() 保留字，另一個是用和類別同名的函式&lt;br /&gt;
&lt;br /&gt;
class BASE{&lt;br /&gt;
&amp;nbsp; &amp;nbsp;function __construct(){&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; print &quot;BASE constructor&quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
或是&lt;br /&gt;
&lt;br /&gt;
class BASE{&lt;br /&gt;
&amp;nbsp; &amp;nbsp;function BASE(){&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; print &quot;constructor function same name with class&quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
若同時有兩個建構子，則以 &amp;nbsp;__construct() 為優先，同類別名的函數將不會被執行。&lt;br /&gt;
&lt;br /&gt;
我個人建議使用 __construct()，因為類別可能因為改名或複製，常會忘記把建構子也改名。&lt;br /&gt;
&lt;br /&gt;
class BASE{&lt;br /&gt;
&amp;nbsp; &amp;nbsp;function BASE(){&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; print &quot;constructor function same name with class&quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;}&lt;br /&gt;
&amp;nbsp; &amp;nbsp;function __construct(){&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; print &quot;BASE constructed&quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
執行結果：&lt;br /&gt;
BASE constructor&lt;br /&gt;
&lt;br /&gt;
2. php 的解構子會在1程式執行到結尾 2程式exit 3物件被unset 後被執行，寫法用 __desctruct() 保留字&lt;br /&gt;
&lt;br /&gt;
class BASE{&lt;br /&gt;
&amp;nbsp; &amp;nbsp;function __construct(){&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; print &quot;BASE constructedn&quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;}&lt;br /&gt;
&amp;nbsp; &amp;nbsp;function __destruct(){&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; print &quot;BASE destructedn&quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
執行：&lt;br /&gt;
&lt;br /&gt;
$obj =new BASE();&lt;br /&gt;
unset($obj); &amp;nbsp; &amp;lt;== 物件被 unset&lt;br /&gt;
print &quot;ENDn&quot;;&lt;br /&gt;
exit;&lt;br /&gt;
&lt;br /&gt;
結果&lt;br /&gt;
BASE constructed&lt;br /&gt;
BASE destructed&lt;br /&gt;
END&lt;br /&gt;
&lt;br /&gt;
3. 建構和解構函數只不過是一個函數，預設是 public，都可以被叫用。&lt;br /&gt;
&lt;br /&gt;
4. 子類別繼承父類別後，父類別的建解構子都不會被執行&lt;br /&gt;
&lt;br /&gt;
曾經我在這被卡了很久，因為別的語言(java, c#)會去叫用父類別的建解樣子後再處理子類別的。&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
class BASE{&lt;br /&gt;
&amp;nbsp; &amp;nbsp;function BASE(){&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; print &quot;constructor function same name with class&quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;}&lt;br /&gt;
&amp;nbsp; &amp;nbsp;function __destruct(){&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; print &quot;BASE destructed&quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
class CHILD extends BASE{&lt;br /&gt;
&amp;nbsp; &amp;nbsp;function __construct(){&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;print &quot;CHILD constructed&quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;}&lt;br /&gt;
&amp;nbsp; &amp;nbsp;function __destruct(){&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;print &quot;CHILD destructed&quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
執行&lt;br /&gt;
$obj =new CHILD();&lt;br /&gt;
exit;&lt;br /&gt;
&lt;br /&gt;
結果&lt;br /&gt;
CHILD constructed&lt;br /&gt;
CHILD destructed&lt;br /&gt;
&lt;br /&gt;
5. 子類別要執行父類別的建解構子，就要特別叫用，使用 parent:: 保留字&lt;br /&gt;
&lt;br /&gt;
class BASE{&lt;br /&gt;
&amp;nbsp; &amp;nbsp;function BASE(){&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; print &quot;constructor function same name with class&quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;}&lt;br /&gt;
&amp;nbsp; &amp;nbsp;function __destruct(){&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; print &quot;BASE destructed&quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
class CHILD extends BASE{&lt;br /&gt;
&amp;nbsp; &amp;nbsp;function __construct(){&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;parent::__construct();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;print &quot;CHILD constructed&quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;}&lt;br /&gt;
&amp;nbsp; &amp;nbsp;function __destruct(){&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;parent::__destruct();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;print &quot;CHILD destructed&quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
執行&lt;br /&gt;
$obj =new CHILD();&lt;br /&gt;
exit;&lt;br /&gt;
&lt;br /&gt;
結果&lt;br /&gt;
constructor function same name with class&lt;br /&gt;
CHILD constructed&lt;br /&gt;
BASE destructed&lt;br /&gt;
CHILD destructed&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
資料來源 :&amp;nbsp;&lt;a href=&quot;http://note.tc.edu.tw/684.html&quot;&gt;http://note.tc.edu.tw/684.html&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://subocheng.blogspot.com/feeds/2113865017877787318/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://subocheng.blogspot.com/2013/11/php_23.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/30436268/posts/default/2113865017877787318'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/30436268/posts/default/2113865017877787318'/><link rel='alternate' type='text/html' href='http://subocheng.blogspot.com/2013/11/php_23.html' title='[轉載] PHP 類別繼承的建構子與解構子'/><author><name>YCCS</name><uri>http://www.blogger.com/profile/14658315920971067951</uri><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>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-30436268.post-8398182820215396203</id><published>2013-11-21T09:12:00.001+08:00</published><updated>2013-11-21T09:13:14.221+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PHP"/><title type='text'>PHP 動態變數名稱 Dynamic variable names in PHP</title><content type='html'>${&#39;a&#39; . &#39;b&#39;} = &#39;hello there&#39;;&lt;br /&gt;
echo $ab; // hello there&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
用大括號包起來，前面加個$就可以了。&lt;br /&gt;
&lt;br /&gt;
這個方法適用在變數，若要動態取常數，請參閱&lt;br /&gt;
&lt;a href=&quot;http://subocheng.blogspot.tw/2013/11/php-dynamic-constant-name.html&quot;&gt;http://subocheng.blogspot.tw/2013/11/php-dynamic-constant-name.html&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://subocheng.blogspot.com/feeds/8398182820215396203/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://subocheng.blogspot.com/2013/11/php-dynamic-variable-names-in-php.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/30436268/posts/default/8398182820215396203'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/30436268/posts/default/8398182820215396203'/><link rel='alternate' type='text/html' href='http://subocheng.blogspot.com/2013/11/php-dynamic-variable-names-in-php.html' title='PHP 動態變數名稱 Dynamic variable names in PHP'/><author><name>YCCS</name><uri>http://www.blogger.com/profile/14658315920971067951</uri><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>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-30436268.post-5445149712599941850</id><published>2013-11-21T09:09:00.004+08:00</published><updated>2013-11-21T09:13:04.830+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PHP"/><title type='text'>PHP 動態常數名稱 Dynamic constant name </title><content type='html'>//定義Constant&lt;br /&gt;
define( CONSTANT_1 , &#39;value1&#39; ) ;&lt;br /&gt;
define( CONSTANT_2 , &#39;value2&#39; ) ;&lt;br /&gt;
define( CONSTANT_3 , &#39;value3&#39; ) ;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
//動態調用&lt;br /&gt;
echo constant( &#39;CONSTANT_&#39; . 1);&lt;br /&gt;
echo constant( &#39;CONSTANT_&#39; . 2);&lt;br /&gt;
echo constant( &#39;CONSTANT_&#39; . 3);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
這個方法適用在常數，若要動態取變數，請參閱&lt;br /&gt;
&lt;a href=&quot;http://subocheng.blogspot.tw/2013/11/php-dynamic-variable-names-in-php.html&quot;&gt;http://subocheng.blogspot.tw/2013/11/php-dynamic-variable-names-in-php.html&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://subocheng.blogspot.com/feeds/5445149712599941850/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://subocheng.blogspot.com/2013/11/php-dynamic-constant-name.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/30436268/posts/default/5445149712599941850'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/30436268/posts/default/5445149712599941850'/><link rel='alternate' type='text/html' href='http://subocheng.blogspot.com/2013/11/php-dynamic-constant-name.html' title='PHP 動態常數名稱 Dynamic constant name '/><author><name>YCCS</name><uri>http://www.blogger.com/profile/14658315920971067951</uri><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>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-30436268.post-6936826209916647175</id><published>2013-11-15T23:01:00.000+08:00</published><updated>2013-11-21T09:13:30.596+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Java Script"/><title type='text'>Online Convert Unix timestamp to Readable Date/time</title><content type='html'>&lt;script&gt;
  function timeToHuman()
  {
    var theDate = new Date(document.u2h.timeStamp.value * 1000);
    dateString = theDate.toGMTString();
    document.u2h.result.value = dateString;
  }
  function humanToTime()
  {
    var humDate = new Date(Date.UTC(document.h2u.inYear.value,
          (stripLeadingZeroes(document.h2u.inMon.value)-1),
          stripLeadingZeroes(document.h2u.inDay.value),
          stripLeadingZeroes(document.h2u.inHr.value),
          stripLeadingZeroes(document.h2u.inMin.value),
          stripLeadingZeroes(document.h2u.inSec.value)));
    document.h2u.result.value = (humDate.getTime()/1000.0);
  }

  function stripLeadingZeroes(input)
  {
    if((input.length &gt; 1) &amp;&amp; (input.substr(0,1) == &quot;0&quot;))
      return input.substr(1);
    else
      return input;
  }
&lt;/script&gt;

&lt;form name=&quot;u2h&quot;&gt;
&lt;center&gt;
&lt;table border=&quot;1&quot;&gt;
    &lt;tbody&gt;
&lt;tr&gt;
        &lt;td align=&quot;center&quot;&gt;
                &lt;span style=&quot;font-size: small;&quot;&gt;
                    &lt;b&gt;轉換 Unix timestamp 到可讀的日期格式&lt;/b&gt;&lt;br /&gt;
                &lt;/span&gt;
                &lt;span style=&quot;font-size: x-small;&quot;&gt;(以1970/1/1為基準)&lt;/span&gt;
            &lt;br /&gt;
            &lt;span style=&quot;font-size: x-small;&quot;&gt;UNIX TimeStamp:&lt;/span&gt; &lt;input name=&quot;timeStamp&quot; size=&quot;20&quot; type=&quot;text&quot; /&gt;&lt;br /&gt;
            &lt;input onclick=&quot;timeToHuman();&quot; type=&quot;button&quot; value=&quot;Submit&quot; /&gt;&amp;nbsp;&lt;input type=&quot;reset&quot; value=&quot;Reset&quot; /&gt;&lt;br /&gt;
            &lt;input name=&quot;result&quot; readonly=&quot;&quot; size=&quot;30&quot; type=&quot;text&quot; value=&quot;&quot; /&gt;
        &lt;/td&gt;
    &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/center&gt;
&lt;/form&gt;
&lt;form name=&quot;h2u&quot;&gt;
&lt;center&gt;
&lt;table border=&quot;1&quot;&gt;
    &lt;tbody&gt;
&lt;tr&gt;
        &lt;td&gt;&lt;table border=&quot;0&quot;&gt;
                &lt;tbody&gt;
&lt;tr&gt;
                    &lt;td align=&quot;center&quot; colspan=&quot;11&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;b&gt;轉換日期/時間至 Unix timestamp&lt;/b&gt;&lt;/span&gt;
                        &lt;span style=&quot;font-size: x-small;&quot;&gt;(以1970/1/1為基準)&lt;/span&gt;
                    &lt;/td&gt;
                &lt;/tr&gt;
&lt;tr&gt;
                    &lt;th&gt;年:&lt;/th&gt;
                    &lt;th&gt;&lt;/th&gt;
                    &lt;th&gt;月:&lt;/th&gt;
                    &lt;th&gt;&lt;/th&gt;
                    &lt;th&gt;日:&lt;/th&gt;
                    &lt;th&gt;&lt;/th&gt;
                    &lt;th&gt;時:&lt;/th&gt;
                    &lt;th&gt;&lt;/th&gt;
                    &lt;th&gt;分:&lt;/th&gt;
                    &lt;th&gt;&lt;/th&gt;
                    &lt;th&gt;秒:&lt;/th&gt;
                &lt;/tr&gt;
&lt;tr&gt;
                    &lt;td&gt;&lt;input maxlength=&quot;4&quot; name=&quot;inYear&quot; size=&quot;4&quot; type=&quot;text&quot; /&gt;&lt;/td&gt;
                    &lt;th&gt;/&lt;/th&gt;
                    &lt;td&gt;&lt;input maxlength=&quot;2&quot; name=&quot;inMon&quot; size=&quot;4&quot; type=&quot;text&quot; /&gt;&lt;/td&gt;
                    &lt;th&gt;/&lt;/th&gt;
                    &lt;td&gt;&lt;input maxlength=&quot;2&quot; name=&quot;inDay&quot; size=&quot;4&quot; type=&quot;text&quot; /&gt;&lt;/td&gt;
                    &lt;th&gt;at&lt;/th&gt;
                    &lt;td&gt;&lt;input maxlength=&quot;2&quot; name=&quot;inHr&quot; size=&quot;4&quot; type=&quot;text&quot; /&gt;&lt;/td&gt;
                    &lt;th&gt;:&lt;/th&gt;
                    &lt;td&gt;&lt;input maxlength=&quot;2&quot; name=&quot;inMin&quot; size=&quot;4&quot; type=&quot;text&quot; /&gt;&lt;/td&gt;
                    &lt;th&gt;:&lt;/th&gt;
                    &lt;td&gt;&lt;input maxlength=&quot;2&quot; name=&quot;inSec&quot; size=&quot;4&quot; type=&quot;text&quot; /&gt;&lt;/td&gt;
                &lt;/tr&gt;
&lt;tr&gt;
                    &lt;td align=&quot;center&quot; colspan=&quot;11&quot;&gt;&lt;/td&gt;
                &lt;/tr&gt;
&lt;tr&gt;
                    &lt;td align=&quot;center&quot; colspan=&quot;11&quot;&gt;&lt;input name=&quot;result&quot; readonly=&quot;&quot; size=&quot;30&quot; type=&quot;text&quot; value=&quot;&quot; /&gt;&lt;/td&gt;
                &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/td&gt;
    &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/center&gt;
&lt;/form&gt;
</content><link rel='replies' type='application/atom+xml' href='http://subocheng.blogspot.com/feeds/6936826209916647175/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://subocheng.blogspot.com/2013/11/online-convert-unix-timestamp-to.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/30436268/posts/default/6936826209916647175'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/30436268/posts/default/6936826209916647175'/><link rel='alternate' type='text/html' href='http://subocheng.blogspot.com/2013/11/online-convert-unix-timestamp-to.html' title='Online Convert Unix timestamp to Readable Date/time'/><author><name>YCCS</name><uri>http://www.blogger.com/profile/14658315920971067951</uri><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>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-30436268.post-3493989481979485310</id><published>2013-11-15T22:46:00.001+08:00</published><updated>2013-11-21T09:13:41.661+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Java Script"/><title type='text'>HTML Encode Online</title><content type='html'>&lt;script&gt;
function Encode(){
    var s = document.getElementById(&quot;encodeText&quot;).value;
    if(s == &quot;&quot;) {
     alert(&quot;Please Input Source String!&quot;);
     return;
    }
    document.getElementById(&quot;decodeText&quot;).value = escape(s);
}
function Dncode(){
    var s = document.getElementById(&quot;decodeText&quot;).value;
    if(s == &quot;&quot;) {
     alert(&quot;Please Input Encoded String!&quot;);
     return;
    }
    document.getElementById(&quot;encodeText&quot;).value = unescape(s);
}
&lt;/script&gt;
Source String&lt;br /&gt;
&lt;textarea cols=&quot;100&quot; id=&quot;encodeText&quot; rows=&quot;5&quot;&gt;&lt;/textarea&gt;&lt;br /&gt;
&lt;input onclick=&quot;Encode();&quot; type=&quot;button&quot; value=&quot;Encode&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;input onclick=&quot;Dncode();&quot; type=&quot;button&quot; value=&quot;Dncode&quot; /&gt;
&lt;br /&gt;
&lt;br /&gt;
Encoded String&lt;br /&gt;
&lt;textarea cols=&quot;100&quot; id=&quot;decodeText&quot; rows=&quot;5&quot;&gt;&lt;/textarea&gt;&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://subocheng.blogspot.com/feeds/3493989481979485310/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://subocheng.blogspot.com/2013/11/html-encode-online.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/30436268/posts/default/3493989481979485310'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/30436268/posts/default/3493989481979485310'/><link rel='alternate' type='text/html' href='http://subocheng.blogspot.com/2013/11/html-encode-online.html' title='HTML Encode Online'/><author><name>YCCS</name><uri>http://www.blogger.com/profile/14658315920971067951</uri><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>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-30436268.post-1625459159334446997</id><published>2013-11-15T22:38:00.001+08:00</published><updated>2013-11-21T09:13:52.660+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Java Script"/><title type='text'>base 64 string encode online</title><content type='html'>&lt;script&gt;
/**
*
*  Base64 encode / decode
*  http://www.webtoolkit.info/
*
**/
var Base64 = {

// private property
_keyStr : &quot;ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=&quot;,

// public method for encoding
encode : function (input) {
    var output = &quot;&quot;;
    var chr1, chr2, chr3, enc1, enc2, enc3, enc4;
    var i = 0;

    input = Base64._utf8_encode(input);

    while (i &lt; input.length) {

        chr1 = input.charCodeAt(i++);
        chr2 = input.charCodeAt(i++);
        chr3 = input.charCodeAt(i++);

        enc1 = chr1 &gt;&gt; 2;
        enc2 = ((chr1 &amp; 3) &lt;&lt; 4) | (chr2 &gt;&gt; 4);
        enc3 = ((chr2 &amp; 15) &lt;&lt; 2) | (chr3 &gt;&gt; 6);
        enc4 = chr3 &amp; 63;

        if (isNaN(chr2)) {
            enc3 = enc4 = 64;
        } else if (isNaN(chr3)) {
            enc4 = 64;
        }

        output = output +
        this._keyStr.charAt(enc1) + this._keyStr.charAt(enc2) +
        this._keyStr.charAt(enc3) + this._keyStr.charAt(enc4);

    }

    return output;
},

// public method for decoding
decode : function (input) {
    var output = &quot;&quot;;
    var chr1, chr2, chr3;
    var enc1, enc2, enc3, enc4;
    var i = 0;

    input = input.replace(/[^A-Za-z0-9\+\/\=]/g, &quot;&quot;);

    while (i &lt; input.length) {

        enc1 = this._keyStr.indexOf(input.charAt(i++));
        enc2 = this._keyStr.indexOf(input.charAt(i++));
        enc3 = this._keyStr.indexOf(input.charAt(i++));
        enc4 = this._keyStr.indexOf(input.charAt(i++));

        chr1 = (enc1 &lt;&lt; 2) | (enc2 &gt;&gt; 4);
        chr2 = ((enc2 &amp; 15) &lt;&lt; 4) | (enc3 &gt;&gt; 2);
        chr3 = ((enc3 &amp; 3) &lt;&lt; 6) | enc4;

        output = output + String.fromCharCode(chr1);

        if (enc3 != 64) {
            output = output + String.fromCharCode(chr2);
        }
        if (enc4 != 64) {
            output = output + String.fromCharCode(chr3);
        }

    }

    output = Base64._utf8_decode(output);

    return output;

},

// private method for UTF-8 encoding
_utf8_encode : function (string) {
    string = string.replace(/\r\n/g,&quot;\n&quot;);
    var utftext = &quot;&quot;;

    for (var n = 0; n &lt; string.length; n++) {

        var c = string.charCodeAt(n);

        if (c &lt; 128) {
            utftext += String.fromCharCode(c);
        }
        else if((c &gt; 127) &amp;&amp; (c &lt; 2048)) {
            utftext += String.fromCharCode((c &gt;&gt; 6) | 192);
            utftext += String.fromCharCode((c &amp; 63) | 128);
        }
        else {
            utftext += String.fromCharCode((c &gt;&gt; 12) | 224);
            utftext += String.fromCharCode(((c &gt;&gt; 6) &amp; 63) | 128);
            utftext += String.fromCharCode((c &amp; 63) | 128);
        }

    }

    return utftext;
},

// private method for UTF-8 decoding
_utf8_decode : function (utftext) {
    var string = &quot;&quot;;
    var i = 0;
    var c = c1 = c2 = 0;

    while ( i &lt; utftext.length ) {

        c = utftext.charCodeAt(i);

        if (c &lt; 128) {
            string += String.fromCharCode(c);
            i++;
        }
        else if((c &gt; 191) &amp;&amp; (c &lt; 224)) {
            c2 = utftext.charCodeAt(i+1);
            string += String.fromCharCode(((c &amp; 31) &lt;&lt; 6) | (c2 &amp; 63));
            i += 2;
        }
        else {
            c2 = utftext.charCodeAt(i+1);
            c3 = utftext.charCodeAt(i+2);
            string += String.fromCharCode(((c &amp; 15) &lt;&lt; 12) | ((c2 &amp; 63) &lt;&lt; 6) | (c3 &amp; 63));
            i += 3;
        }

    }

    return string;
}

}

function Encode(){
    var s = document.getElementById(&quot;encodeText&quot;).value;
    if(s == &quot;&quot;) {
     alert(&quot;Please input Source String!&quot;);
     return;
    }
    document.getElementById(&quot;decodeText&quot;).value = Base64.encode(s);
}
function Dncode(){
    var s = document.getElementById(&quot;decodeText&quot;).value;
    if(s == &quot;&quot;) {
     alert(&quot;Please input Base 64 String!&quot;);
     return;
    }
    document.getElementById(&quot;encodeText&quot;).value = Base64.decode(s);
}
&lt;/script&gt;

這一個用JavaScript寫的base 64 轉換的程式，方便大家使用，&lt;br&gt;
至於程式寫法，可參閱下面這一篇文章。&lt;br&gt;
http://subocheng.blogspot.tw/2013/11/javascript-base64-encode.html&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
Source String&lt;br/&gt;
&lt;textarea rows=&quot;5&quot; cols=&quot;100&quot; id=&quot;encodeText&quot;&gt;&lt;/textarea&gt;&lt;br/&gt;
&lt;input type=&quot;button&quot; value=&quot;Encode&quot; onclick=&quot;Encode();&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;input type=&quot;button&quot; value=&quot;Dncode&quot; onclick=&quot;Dncode();&quot; /&gt;
&lt;br/&gt;&lt;br/&gt;
Base 64 String&lt;br/&gt;
&lt;textarea rows=&quot;5&quot; cols=&quot;100&quot; id=&quot;decodeText&quot;&gt;&lt;/textarea&gt;&lt;br/&gt;</content><link rel='replies' type='application/atom+xml' href='http://subocheng.blogspot.com/feeds/1625459159334446997/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://subocheng.blogspot.com/2013/11/base-64-string-encode-online.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/30436268/posts/default/1625459159334446997'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/30436268/posts/default/1625459159334446997'/><link rel='alternate' type='text/html' href='http://subocheng.blogspot.com/2013/11/base-64-string-encode-online.html' title='base 64 string encode online'/><author><name>YCCS</name><uri>http://www.blogger.com/profile/14658315920971067951</uri><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>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-30436268.post-7313875888682898234</id><published>2013-11-15T22:21:00.000+08:00</published><updated>2013-11-15T22:21:07.156+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Java Script"/><title type='text'>javascript base64 encode</title><content type='html'>/**&lt;br /&gt;
*&lt;br /&gt;
* &amp;nbsp;Base64 encode / decode&lt;br /&gt;
* &amp;nbsp;http://www.webtoolkit.info/&lt;br /&gt;
*&lt;br /&gt;
**/&lt;br /&gt;
var Base64 = {&lt;br /&gt;
&lt;br /&gt;
// private property&lt;br /&gt;
_keyStr : &quot;ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=&quot;,&lt;br /&gt;
&lt;br /&gt;
// public method for encoding&lt;br /&gt;
encode : function (input) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; var output = &quot;&quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; var chr1, chr2, chr3, enc1, enc2, enc3, enc4;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; var i = 0;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; input = Base64._utf8_encode(input);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; while (i &amp;lt; input.length) {&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; chr1 = input.charCodeAt(i++);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; chr2 = input.charCodeAt(i++);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; chr3 = input.charCodeAt(i++);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; enc1 = chr1 &amp;gt;&amp;gt; 2;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; enc2 = ((chr1 &amp;amp; 3) &amp;lt;&amp;lt; 4) | (chr2 &amp;gt;&amp;gt; 4);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; enc3 = ((chr2 &amp;amp; 15) &amp;lt;&amp;lt; 2) | (chr3 &amp;gt;&amp;gt; 6);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; enc4 = chr3 &amp;amp; 63;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (isNaN(chr2)) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; enc3 = enc4 = 64;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } else if (isNaN(chr3)) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; enc4 = 64;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; output = output +&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this._keyStr.charAt(enc1) + this._keyStr.charAt(enc2) +&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this._keyStr.charAt(enc3) + this._keyStr.charAt(enc4);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; return output;&lt;br /&gt;
},&lt;br /&gt;
&lt;br /&gt;
// public method for decoding&lt;br /&gt;
decode : function (input) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; var output = &quot;&quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; var chr1, chr2, chr3;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; var enc1, enc2, enc3, enc4;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; var i = 0;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; input = input.replace(/[^A-Za-z0-9\+\/\=]/g, &quot;&quot;);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; while (i &amp;lt; input.length) {&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; enc1 = this._keyStr.indexOf(input.charAt(i++));&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; enc2 = this._keyStr.indexOf(input.charAt(i++));&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; enc3 = this._keyStr.indexOf(input.charAt(i++));&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; enc4 = this._keyStr.indexOf(input.charAt(i++));&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; chr1 = (enc1 &amp;lt;&amp;lt; 2) | (enc2 &amp;gt;&amp;gt; 4);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; chr2 = ((enc2 &amp;amp; 15) &amp;lt;&amp;lt; 4) | (enc3 &amp;gt;&amp;gt; 2);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; chr3 = ((enc3 &amp;amp; 3) &amp;lt;&amp;lt; 6) | enc4;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; output = output + String.fromCharCode(chr1);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (enc3 != 64) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; output = output + String.fromCharCode(chr2);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (enc4 != 64) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; output = output + String.fromCharCode(chr3);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; output = Base64._utf8_decode(output);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; return output;&lt;br /&gt;
&lt;br /&gt;
},&lt;br /&gt;
&lt;br /&gt;
// private method for UTF-8 encoding&lt;br /&gt;
_utf8_encode : function (string) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; string = string.replace(/\r\n/g,&quot;\n&quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; var utftext = &quot;&quot;;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; for (var n = 0; n &amp;lt; string.length; n++) {&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var c = string.charCodeAt(n);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (c &amp;lt; 128) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; utftext += String.fromCharCode(c);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else if((c &amp;gt; 127) &amp;amp;&amp;amp; (c &amp;lt; 2048)) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; utftext += String.fromCharCode((c &amp;gt;&amp;gt; 6) | 192);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; utftext += String.fromCharCode((c &amp;amp; 63) | 128);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; utftext += String.fromCharCode((c &amp;gt;&amp;gt; 12) | 224);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; utftext += String.fromCharCode(((c &amp;gt;&amp;gt; 6) &amp;amp; 63) | 128);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; utftext += String.fromCharCode((c &amp;amp; 63) | 128);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; return utftext;&lt;br /&gt;
},&lt;br /&gt;
&lt;br /&gt;
// private method for UTF-8 decoding&lt;br /&gt;
_utf8_decode : function (utftext) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; var string = &quot;&quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; var i = 0;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; var c = c1 = c2 = 0;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; while ( i &amp;lt; utftext.length ) {&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; c = utftext.charCodeAt(i);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (c &amp;lt; 128) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; string += String.fromCharCode(c);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; i++;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else if((c &amp;gt; 191) &amp;amp;&amp;amp; (c &amp;lt; 224)) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; c2 = utftext.charCodeAt(i+1);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; string += String.fromCharCode(((c &amp;amp; 31) &amp;lt;&amp;lt; 6) | (c2 &amp;amp; 63));&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; i += 2;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; c2 = utftext.charCodeAt(i+1);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; c3 = utftext.charCodeAt(i+2);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; string += String.fromCharCode(((c &amp;amp; 15) &amp;lt;&amp;lt; 12) | ((c2 &amp;amp; 63) &amp;lt;&amp;lt; 6) | (c3 &amp;amp; 63));&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; i += 3;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; return string;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
}</content><link rel='replies' type='application/atom+xml' href='http://subocheng.blogspot.com/feeds/7313875888682898234/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://subocheng.blogspot.com/2013/11/javascript-base64-encode.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/30436268/posts/default/7313875888682898234'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/30436268/posts/default/7313875888682898234'/><link rel='alternate' type='text/html' href='http://subocheng.blogspot.com/2013/11/javascript-base64-encode.html' title='javascript base64 encode'/><author><name>YCCS</name><uri>http://www.blogger.com/profile/14658315920971067951</uri><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>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-30436268.post-3915199856298331464</id><published>2013-11-15T22:13:00.000+08:00</published><updated>2013-11-15T22:21:19.664+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PHP"/><title type='text'>另外一種利用PHP寫排程的方法</title><content type='html'>這是一種非正規的方法。&lt;br /&gt;
我的目的是要系統定時去執行一段PHP的程式碼，幫我同步一些資料到Memcache內，方便使用者可以快速的讀取資料。&lt;br /&gt;
過程中我需要用到Web Server的一些Memcache特性，因此我需要定時去執行一個URL。&lt;br /&gt;
&lt;br /&gt;
1. 首先用PHP寫一個程式，並放到Web Server下。&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;例如：http://127.0.0.1/testSync/Sync.php&lt;br /&gt;
&lt;br /&gt;
2. 另外寫一個AutoRun.php，放到D:\test\AutoRun.php&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
set_time_limit(1200); &amp;nbsp; &amp;nbsp;//設定該Function最多只能執行20min&lt;br /&gt;
&lt;br /&gt;
//Do Sync&lt;br /&gt;
$url = &quot;http://127.0.0.1/testSync/Sync.php&quot;;&lt;br /&gt;
$ch = curl_init ($url);&lt;br /&gt;
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, true);&lt;br /&gt;
$returndata = curl_exec ($ch);&lt;br /&gt;
curl_close($ch);&lt;br /&gt;
&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3. 寫一個bat檔案，裡面的內容如下：&lt;br /&gt;
&quot;C:\Program Files (x86)\PHP\php.exe&quot; &quot;D:\test\AutoRunSync.php&quot;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
前面這個php.exe的位置為你電腦安裝的php路徑(IIS CGI指定的路徑)&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
4. 最後將步驟3所產生的bat，加到Windows 排程去，設定讓他自動定時執行。&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Finish.....&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://subocheng.blogspot.com/feeds/3915199856298331464/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://subocheng.blogspot.com/2013/11/php.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/30436268/posts/default/3915199856298331464'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/30436268/posts/default/3915199856298331464'/><link rel='alternate' type='text/html' href='http://subocheng.blogspot.com/2013/11/php.html' title='另外一種利用PHP寫排程的方法'/><author><name>YCCS</name><uri>http://www.blogger.com/profile/14658315920971067951</uri><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>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-30436268.post-3968878122334081720</id><published>2013-09-30T13:24:00.001+08:00</published><updated>2013-11-15T22:21:30.516+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Java Script"/><title type='text'>JavaScript Object Property get And set Method</title><content type='html'>範例:&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #0080ff; font-family: Consolas, &#39;Lucida Console&#39;, monospace; font-size: 12px; white-space: pre-wrap;&quot;&gt;var Obj = {};
Obj._aaa = null;
Object.defineProperty(Obj, &quot;aaa&quot;, {
 get: function () {
  return Obj._aaa;
 },
 set: function (val) {
  console.log(Obj._aaa);
  Obj._aaa = val;
 }
});
console.log(Obj.aaa);
Obj.aaa = &quot;test&quot;;
console.log(Obj.aaa);&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
結果:&lt;br /&gt;
&lt;div class=&quot;console-message console-log-level&quot; style=&quot;background-color: white; border-top-color: rgb(240, 240, 240); border-top-style: solid; border-top-width: 1px; box-sizing: border-box; clear: right; color: #222222; font-family: Consolas, &#39;Lucida Console&#39;, monospace; font-size: 12px; margin-left: 24px; min-height: 16px; padding: 1px 22px 1px 0px; position: relative;&quot;&gt;
&lt;span class=&quot;console-message-text source-code&quot; style=&quot;box-sizing: border-box; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span class=&quot;console-formatted-null source-code&quot; style=&quot;box-sizing: border-box; color: grey;&quot;&gt;null&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;console-message console-log-level&quot; style=&quot;background-color: white; border-top-color: rgb(240, 240, 240); border-top-style: solid; border-top-width: 1px; box-sizing: border-box; clear: right; color: #222222; font-family: Consolas, &#39;Lucida Console&#39;, monospace; font-size: 12px; margin-left: 24px; min-height: 16px; padding: 1px 22px 1px 0px; position: relative;&quot;&gt;
&lt;span class=&quot;console-message-text source-code&quot; style=&quot;box-sizing: border-box; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span class=&quot;console-formatted-null source-code&quot; style=&quot;box-sizing: border-box; color: grey;&quot;&gt;null&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;console-message console-log-level&quot; style=&quot;background-color: white; border-top-color: rgb(240, 240, 240); border-top-style: solid; border-top-width: 1px; box-sizing: border-box; clear: right; color: #222222; font-family: Consolas, &#39;Lucida Console&#39;, monospace; font-size: 12px; margin-left: 24px; min-height: 16px; padding: 1px 22px 1px 0px; position: relative;&quot;&gt;
&lt;span class=&quot;console-message-text source-code&quot; style=&quot;box-sizing: border-box; white-space: pre-wrap;&quot;&gt;test&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
說明:&lt;br /&gt;
可以在get and set的function做一些其他的事情，&lt;br /&gt;
當然你也可以不一定要用Obj._aaa;也可以將值寫入其他地方，例如localStorage&lt;br /&gt;
&lt;br /&gt;
下面另外寫一個範例，儲存某些值到localStorage，若該值為空的，給他一個預設值。&lt;br /&gt;
範例&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #0080ff; font-family: Consolas, &#39;Lucida Console&#39;, monospace; font-size: 12px; white-space: pre-wrap;&quot;&gt;var Obj = {};
Object.defineProperty(Obj, &quot;aaa&quot;, {
 get: function () {
  if(localStorage.getItem(&quot;aaa&quot;) == null)
   Obj.aaa = &quot;Default Value&quot;;
  return localStorage.getItem(&quot;aaa&quot;);
 },
 set: function (val) {
  localStorage.setItem(&quot;aaa&quot;,val);
 }
});
console.log(Obj.aaa);
Obj.aaa = &quot;test&quot;;
console.log(Obj.aaa);&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
結果&lt;br /&gt;
&lt;div class=&quot;console-message console-log-level&quot; style=&quot;background-color: white; border-top-color: rgb(240, 240, 240); border-top-style: solid; border-top-width: 1px; box-sizing: border-box; clear: right; color: #222222; font-family: Consolas, &#39;Lucida Console&#39;, monospace; font-size: 12px; margin-left: 24px; min-height: 16px; padding: 1px 22px 1px 0px; position: relative;&quot;&gt;
&lt;span class=&quot;console-message-text source-code&quot; style=&quot;box-sizing: border-box; white-space: pre-wrap;&quot;&gt;Default Value&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;console-message console-log-level&quot; style=&quot;background-color: white; border-top-color: rgb(240, 240, 240); border-top-style: solid; border-top-width: 1px; box-sizing: border-box; clear: right; color: #222222; font-family: Consolas, &#39;Lucida Console&#39;, monospace; font-size: 12px; margin-left: 24px; min-height: 16px; padding: 1px 22px 1px 0px; position: relative;&quot;&gt;
&lt;span class=&quot;console-message-text source-code&quot; style=&quot;box-sizing: border-box; white-space: pre-wrap;&quot;&gt;test&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;console-message-text source-code&quot; style=&quot;box-sizing: border-box; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://subocheng.blogspot.com/feeds/3968878122334081720/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://subocheng.blogspot.com/2013/09/javascript-object-property-get-and-set.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/30436268/posts/default/3968878122334081720'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/30436268/posts/default/3968878122334081720'/><link rel='alternate' type='text/html' href='http://subocheng.blogspot.com/2013/09/javascript-object-property-get-and-set.html' title='JavaScript Object Property get And set Method'/><author><name>YCCS</name><uri>http://www.blogger.com/profile/14658315920971067951</uri><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>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-30436268.post-6139284292764505293</id><published>2013-09-30T13:15:00.001+08:00</published><updated>2013-09-30T13:15:20.270+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Java Script"/><category scheme="http://www.blogger.com/atom/ns#" term="jQuery"/><title type='text'>jQuery for each</title><content type='html'>針對Array進行for each&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #0080ff; font-family: Consolas, &#39;Lucida Console&#39;, monospace; font-size: 12px; white-space: pre-wrap;&quot;&gt;var ary = [ 52, 97 ];
$.each(ary, function( index, value ) {
  console.log( index + &quot;: &quot; + value );
});&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
結果&lt;br /&gt;
&lt;div class=&quot;console-message console-log-level&quot; style=&quot;background-color: white; border-top-color: rgb(240, 240, 240); border-top-style: solid; border-top-width: 1px; box-sizing: border-box; clear: right; color: #222222; font-family: Consolas, &#39;Lucida Console&#39;, monospace; font-size: 12px; margin-left: 24px; min-height: 16px; padding: 1px 22px 1px 0px; position: relative;&quot;&gt;
&lt;span class=&quot;console-message-text source-code&quot; style=&quot;box-sizing: border-box; white-space: pre-wrap;&quot;&gt;0: 52&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;console-message console-log-level&quot; style=&quot;background-color: white; border-top-color: rgb(240, 240, 240); border-top-style: solid; border-top-width: 1px; box-sizing: border-box; clear: right; color: #222222; font-family: Consolas, &#39;Lucida Console&#39;, monospace; font-size: 12px; margin-left: 24px; min-height: 16px; padding: 1px 22px 1px 0px; position: relative;&quot;&gt;
&lt;span class=&quot;console-message-text source-code&quot; style=&quot;box-sizing: border-box; white-space: pre-wrap;&quot;&gt;1: 97&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
針對Object進行&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #0080ff; font-family: Consolas, &#39;Lucida Console&#39;, monospace; font-size: 12px; white-space: pre-wrap;&quot;&gt;var ary = {};
ary[&quot;aaa&quot;] = &quot;123&quot;;
ary[&quot;bbb&quot;] = &quot;456&quot;;
$.each(ary, function( index, value ) {
  console.log( index + &quot;: &quot; + value );
});&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #0080ff; font-family: Consolas, &#39;Lucida Console&#39;, monospace; font-size: 12px; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
結果&lt;br /&gt;
&lt;div class=&quot;console-message console-log-level&quot; style=&quot;background-color: white; border-top-color: rgb(240, 240, 240); border-top-style: solid; border-top-width: 1px; box-sizing: border-box; clear: right; color: #222222; font-family: Consolas, &#39;Lucida Console&#39;, monospace; font-size: 12px; margin-left: 24px; min-height: 16px; padding: 1px 22px 1px 0px; position: relative;&quot;&gt;
&lt;span class=&quot;console-message-text source-code&quot; style=&quot;box-sizing: border-box; white-space: pre-wrap;&quot;&gt;aaa: 123&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;console-message console-log-level&quot; style=&quot;background-color: white; border-top-color: rgb(240, 240, 240); border-top-style: solid; border-top-width: 1px; box-sizing: border-box; clear: right; color: #222222; font-family: Consolas, &#39;Lucida Console&#39;, monospace; font-size: 12px; margin-left: 24px; min-height: 16px; padding: 1px 22px 1px 0px; position: relative;&quot;&gt;
&lt;span class=&quot;console-message-text source-code&quot; style=&quot;box-sizing: border-box; white-space: pre-wrap;&quot;&gt;bbb: 456&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
break 效果 (return &lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;false&lt;/span&gt;&lt;/b&gt;)&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: Consolas, &#39;Lucida Console&#39;, monospace; font-size: 12px; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;color: #0080ff;&quot;&gt;var ary = [ 52, 97 ];
$.each(ary, function( index, value ) {
  if(index == 1) &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;return false;
&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #0080ff;&quot;&gt;  console.log( index + &quot;: &quot; + value );
});&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
結果&lt;br /&gt;
&lt;div class=&quot;console-message console-log-level&quot; style=&quot;background-color: white; border-top-color: rgb(240, 240, 240); border-top-style: solid; border-top-width: 1px; box-sizing: border-box; clear: right; color: #222222; font-family: Consolas, &#39;Lucida Console&#39;, monospace; font-size: 12px; margin-left: 24px; min-height: 16px; padding: 1px 22px 1px 0px; position: relative;&quot;&gt;
&lt;span class=&quot;console-message-text source-code&quot; style=&quot;box-sizing: border-box; white-space: pre-wrap;&quot;&gt;0: 52&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
continue 效果 (return &lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;true&lt;/span&gt;&lt;/b&gt;)&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: Consolas, &#39;Lucida Console&#39;, monospace; font-size: 12px; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;color: #0080ff;&quot;&gt;var ary = [ 52, 97 ,30,20];
$.each(ary, function( index, value ) {
  if(index == 1) &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;return true;
&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #0080ff;&quot;&gt;  console.log( index + &quot;: &quot; + value );
});&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
結果&lt;br /&gt;
&lt;div class=&quot;console-message console-log-level&quot; style=&quot;background-color: white; border-top-color: rgb(240, 240, 240); border-top-style: solid; border-top-width: 1px; box-sizing: border-box; clear: right; color: #222222; font-family: Consolas, &#39;Lucida Console&#39;, monospace; font-size: 12px; margin-left: 24px; min-height: 16px; padding: 1px 22px 1px 0px; position: relative;&quot;&gt;
&lt;span class=&quot;console-message-text source-code&quot; style=&quot;box-sizing: border-box; white-space: pre-wrap;&quot;&gt;0: 52&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;console-message console-log-level&quot; style=&quot;background-color: white; border-top-color: rgb(240, 240, 240); border-top-style: solid; border-top-width: 1px; box-sizing: border-box; clear: right; color: #222222; font-family: Consolas, &#39;Lucida Console&#39;, monospace; font-size: 12px; margin-left: 24px; min-height: 16px; padding: 1px 22px 1px 0px; position: relative;&quot;&gt;
&lt;span class=&quot;console-message-text source-code&quot; style=&quot;box-sizing: border-box; white-space: pre-wrap;&quot;&gt;2: 30&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;console-message console-log-level&quot; style=&quot;background-color: white; border-top-color: rgb(240, 240, 240); border-top-style: solid; border-top-width: 1px; box-sizing: border-box; clear: right; color: #222222; font-family: Consolas, &#39;Lucida Console&#39;, monospace; font-size: 12px; margin-left: 24px; min-height: 16px; padding: 1px 22px 1px 0px; position: relative;&quot;&gt;
&lt;span class=&quot;console-message-text source-code&quot; style=&quot;box-sizing: border-box; white-space: pre-wrap;&quot;&gt;3: 20&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://subocheng.blogspot.com/feeds/6139284292764505293/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://subocheng.blogspot.com/2013/09/jquery-for-each.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/30436268/posts/default/6139284292764505293'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/30436268/posts/default/6139284292764505293'/><link rel='alternate' type='text/html' href='http://subocheng.blogspot.com/2013/09/jquery-for-each.html' title='jQuery for each'/><author><name>YCCS</name><uri>http://www.blogger.com/profile/14658315920971067951</uri><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>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-30436268.post-4752503257696726122</id><published>2013-09-30T13:03:00.003+08:00</published><updated>2013-09-30T13:03:40.770+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="網路"/><title type='text'>林之晨：年輕人創業不缺錢，缺的是國際觀</title><content type='html'>我們能陪伴孩子一輩子嗎?台灣正在走向一條失落的道路，既然台灣教育無法培養有國際視野的年輕人，為了下一代的未來，準備一筆國外留學的教育基金，才是給孩子最好的禮物&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
林之晨：年輕人創業不缺錢，缺的是國際觀&lt;br /&gt;
&lt;br /&gt;
林之晨，35歲，大三即開始創業，是個不折不扣的行動派，但在返台與友人合資成立「appWorks之初創投」後，他發現台灣年輕人缺乏國際觀，教育和實務脫節，創業失敗率高，「我越來越不鼓勵青年創業這檔事。」建議有志創業的年輕人先到相關小公司蹲10年，熬得住、沒放棄，再來談創業。&lt;br /&gt;
&lt;br /&gt;
3月21日天氣晴，林之晨接受《ETtoday新聞雲》專訪，談論他最有興趣的青年創業與網路產業問題，雖然兩個多月前，他才因「22K根本是個偽議題」被許多人轟得滿頭包，但林之晨顯得不以為意，一派輕鬆地說：「你不可能要求每個人都非常認真對待自己的人生。」&lt;br /&gt;
&lt;br /&gt;
之初創投，成立於2009年，不到30坪的辦公室只擺了幾張桌子，如此簡陋的地方，已促成近 150 個新創團隊與資本市場接軌，包括EZTABLE、 PubGame、 5945、 GameApe等知名網路公司，但林之晨未因此為滿，反之，他在試圖推動台灣網路產業的過程中，發現許多憑藉他個人之力難以改變的弊病。&lt;br /&gt;
&lt;br /&gt;
回憶，剛從紐約返台時，很多朋友聽到他要搞個創投公司，還專投資「票房毒藥」網路產業，紛紛勸他不要那麼傻，質疑小小個台灣，哪來那麼多創業團隊？哪來那麼多資金？&lt;br /&gt;
&lt;br /&gt;
3年過去，林之晨發現，相對資金和創業團隊數量，台灣網路產業真正的問題是缺乏國際觀，以至大家都像「閉門造車」。他收起招牌陽光笑容，用嚴肅的表情指出，過去10年，政府、企業、媒體、學校，從上到下一味盲目本土化，讓台灣越活越過去，台灣是世界中心的想法，害慘了這一代的年輕人。&lt;br /&gt;
&lt;br /&gt;
「做事業，你要一步一腳印；做功課，你要看很遠很遠。」林之晨解釋，每一家公司都是從小做起，但網路產業是全世界一起發展的，創業者必需要有世界觀，個人也是一樣，年輕人忘了把自己拉升到國際水平，沒有發自內心想往國際發展，更容易陷入本土化思維，在台灣這個狹小的市場和競爭對手互相廝殺。&lt;br /&gt;
&lt;br /&gt;
之初創投，一開始依循美國矽谷創投公司的作法，鎖定剛出校園的菜鳥創業者投資，沒多久時間，林之晨就發現台灣的環境和美國有很大差異，矽谷模式在台灣行不通，使他不得不修正，改為輔導已創業2、3年，有一定基礎，但不知如何將之轉為獲利的老鳥創業者。&lt;br /&gt;
&lt;br /&gt;
他舉例，美國的創業者，好像是一家日本餐廳的學徒，已經有了3、5年經驗，再跳出來自己開店；台灣的創業者，雖然也有3、5年經驗，但多數都是學了中菜後跑去開日本餐廳，失敗機率相對較高。&lt;br /&gt;
&lt;br /&gt;
問題在哪？林之晨認為，台灣教育與實務嚴重脫節、分類太細是主因「外面已經開始有數位相機了，學校還在教你洗底片」，一個成功的創業者，應該是通才，面面具到，台灣的教育體制，不易培養出適合創業的年輕人，就算只是想加入經濟活動，年輕人也離企業要求太遠，起薪不高很正常。&lt;br /&gt;
&lt;br /&gt;
高等教育、人才政策問題，非常棘手，林之晨語帶保留地說：「我懷疑政府有那個GUTS(膽子)伸手去改變現有結構。」考慮到台灣環境，林之晨成立之初創投3年後，對創業的想法慢慢改變，從「先做再說」，變成「三思而後行」。&lt;br /&gt;
&lt;br /&gt;
「創業的眉眉角角太多，各行各業又各有不同。」林之晨建議未來有志創業的年輕人畢業後，可先到相關的中、小型公司練功，學習企業運作的每個環節，直到有一天，你發現了一個市場的需求，但這家公司不願意做，再考慮創業也不遲。&lt;br /&gt;
&lt;br /&gt;
創業並不輕鬆，在輔導新創團隊過程中，林之晨也發現有些年輕人，總將創業、當老闆和酷、帥畫上等號，等到面臨來自金主、員工、廠商四面八方相湧而至的壓力時，這類創業者很快就被打回原形，舉白旗投降。&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
《壽司之夢》，林之晨月前看了這部日本壽司師傅小野二郎的紀錄片，感觸良多，片中一名學徒在二郎的店內已實習10多年，每天仍孜孜不倦煮飯、煎蛋、切魚，磨練自己的技術，創業需要執著、創業需要決心，這些特質，都可以從工作經驗中慢慢培養。&lt;br /&gt;
&lt;br /&gt;
「我們正走向一條失落的道路…….。」看到世界進步如此快速，林之晨不免對原地打轉的台灣充滿憂慮，這或許也是他憑藉著一點衝動、一點理想，毅然從美國紐約返台，與友人合夥創立「之初創投」的原因，冀望自己能為這塊土地投下一絲希望的火苗，陪伴那些在黑暗中探索的創業者，找到一條通往成功的道路。&lt;br /&gt;
&lt;br /&gt;
未來10年、20年，軟體和內容產業將是各國經濟發展的重點，林之晨說，之初創投的長程目標，就是讓台北出現和矽谷、柏林能相提並論的經濟聚落，提到軟體產業，就想到台灣，他相信，這就是讓台灣站起來的關鍵。</content><link rel='replies' type='application/atom+xml' href='http://subocheng.blogspot.com/feeds/4752503257696726122/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://subocheng.blogspot.com/2013/09/blog-post.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/30436268/posts/default/4752503257696726122'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/30436268/posts/default/4752503257696726122'/><link rel='alternate' type='text/html' href='http://subocheng.blogspot.com/2013/09/blog-post.html' title='林之晨：年輕人創業不缺錢，缺的是國際觀'/><author><name>YCCS</name><uri>http://www.blogger.com/profile/14658315920971067951</uri><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>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-30436268.post-729441640715103288</id><published>2013-09-12T13:39:00.000+08:00</published><updated>2013-09-12T13:39:12.639+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PHP"/><title type='text'>PHP 單引號 和 雙引號 的差別</title><content type='html'>&lt;span style=&quot;background-color: white; color: #666666; font-family: Arial, verdana, Tahoma, &#39;Century gothic&#39;, sans-serif; font-size: 13px; line-height: 24px;&quot;&gt;PHP 會解譯「雙引號」字串內的變數，而「單引號」則視為純字串出，PHP 不會再處理單引號內的內容。&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://subocheng.blogspot.com/feeds/729441640715103288/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://subocheng.blogspot.com/2013/09/php.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/30436268/posts/default/729441640715103288'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/30436268/posts/default/729441640715103288'/><link rel='alternate' type='text/html' href='http://subocheng.blogspot.com/2013/09/php.html' title='PHP 單引號 和 雙引號 的差別'/><author><name>YCCS</name><uri>http://www.blogger.com/profile/14658315920971067951</uri><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>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-30436268.post-7925477307340705297</id><published>2013-09-12T13:30:00.002+08:00</published><updated>2013-09-12T13:30:57.762+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PHP"/><title type='text'>PHP Parse HTTP Header</title><content type='html'>function http_parse_headers( $header )&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; $retVal = array();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; $fields = explode(&quot;\r\n&quot;, preg_replace(&#39;/\x0D\x0A[\x09\x20]+/&#39;, &#39; &#39;, $header));&lt;br /&gt;
&amp;nbsp; &amp;nbsp; foreach( $fields as $field ) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if( preg_match(&#39;/([^:]+): (.+)/m&#39;, $field, $match) ) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $match[1] = preg_replace(&#39;/(?&amp;lt;=^|[\x09\x20\x2D])./e&#39;, &#39;(&quot;\0&quot;)&#39;, strtolower(trim($match[1])));&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if( isset($retVal[$match[1]]) ) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $retVal[$match[1]] = array($retVal[$match[1]], $match[2]);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } else {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $retVal[$match[1]] = trim($match[2]);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; return $retVal;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
最後他會回傳一個Array&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://subocheng.blogspot.com/feeds/7925477307340705297/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://subocheng.blogspot.com/2013/09/php-parse-http-header.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/30436268/posts/default/7925477307340705297'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/30436268/posts/default/7925477307340705297'/><link rel='alternate' type='text/html' href='http://subocheng.blogspot.com/2013/09/php-parse-http-header.html' title='PHP Parse HTTP Header'/><author><name>YCCS</name><uri>http://www.blogger.com/profile/14658315920971067951</uri><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>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-30436268.post-5810015318074569363</id><published>2013-09-01T14:34:00.003+08:00</published><updated>2013-11-21T09:14:10.755+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Java Script"/><title type='text'>JavaScript Date Format </title><content type='html'>&lt;span style=&quot;font-family: monospace;&quot;&gt;利用JavaScript取得目前時間並格式化&lt;/span&gt;&lt;span style=&quot;font-family: monospace;&quot;&gt;YYYYMMDDHHMMSS&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: monospace;&quot;&gt;function GetDateFromatYYYYMMDDHHMMSS()&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: monospace;&quot;&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; function pad(n){return n&lt;10 :=&quot;&quot; font=&quot;&quot; n=&quot;&quot;&gt;&lt;!--10--&gt;&lt;!--10--&gt;&lt;/10&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; var d = new Date();&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;font-family: monospace;&quot;&gt;return d.getFullYear() + pad(d.getMonth()+1) + pad(d.getDate()) + pad(d.getHours()) + pad(d.getMinutes()) + pad(d.&lt;/span&gt;&lt;span style=&quot;font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, serif; font-size: 14px; line-height: 18px;&quot;&gt;getSeconds&lt;/span&gt;&lt;span style=&quot;font-family: monospace;&quot;&gt;());&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: monospace;&quot;&gt;}&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://subocheng.blogspot.com/feeds/5810015318074569363/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://subocheng.blogspot.com/2013/09/javascript-date-format.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/30436268/posts/default/5810015318074569363'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/30436268/posts/default/5810015318074569363'/><link rel='alternate' type='text/html' href='http://subocheng.blogspot.com/2013/09/javascript-date-format.html' title='JavaScript Date Format '/><author><name>YCCS</name><uri>http://www.blogger.com/profile/14658315920971067951</uri><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>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-30436268.post-1415980239870601288</id><published>2013-09-01T14:11:00.002+08:00</published><updated>2013-09-01T14:26:55.424+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Java Script"/><category scheme="http://www.blogger.com/atom/ns#" term="PHP"/><title type='text'>Javascript 加密，PHP解密  AES加密方式</title><content type='html'>JavaScript 加密:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;script src=&quot;http://crypto-js.googlecode.com/svn/tags/3.0.2/build/rollups/aes.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;
&amp;lt;script src=&quot;http://crypto-js.googlecode.com/svn/tags/3.0.2/build/components/pad-zeropadding.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
function EncryptData(data)&lt;br /&gt;
{&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;var key = CryptoJS.enc.Latin1.parse(&quot;1234567812345678&quot;);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;var iv &amp;nbsp;= CryptoJS.enc.Latin1.parse(&quot;1234567812345678&quot;);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;var encrypted = CryptoJS.AES.encrypt(data, key, { iv: iv,mode:CryptoJS.mode.CBC,padding:CryptoJS.pad.ZeroPadding});&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;return encrypted;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
PHP解密&lt;br /&gt;
$key =&amp;nbsp;&quot;1234567812345678&quot;;&lt;br /&gt;
$iv =&amp;nbsp;&quot;1234567812345678&quot;;&lt;br /&gt;
$DecryptData = rtrim(mcrypt_decrypt(MCRYPT_RIJNDAEL_128, $key, base64_decode($EncryptedData), MCRYPT_MODE_CBC, $iv),&quot;\0&quot;);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
注意一點，要把解密出來的後面\0來掉。&lt;br /&gt;
所以加了rtrim(XXX,&quot;\0&quot;);&lt;br /&gt;
要不然Javascript比對會錯誤。&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
下面這一個我寫了一個SampleCode，但Key和iv的地方，需要做修改&lt;br /&gt;
Sample Code Download :&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://sdrv.ms/1aazyLW&quot; target=&quot;_blank&quot;&gt;http://sdrv.ms/1aazyLW&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://subocheng.blogspot.com/feeds/1415980239870601288/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://subocheng.blogspot.com/2013/09/javascript-php-aes.html#comment-form' title='2 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/30436268/posts/default/1415980239870601288'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/30436268/posts/default/1415980239870601288'/><link rel='alternate' type='text/html' href='http://subocheng.blogspot.com/2013/09/javascript-php-aes.html' title='Javascript 加密，PHP解密  AES加密方式'/><author><name>YCCS</name><uri>http://www.blogger.com/profile/14658315920971067951</uri><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>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-30436268.post-6041196452491538628</id><published>2013-08-10T12:03:00.004+08:00</published><updated>2013-08-10T12:03:54.227+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="網路"/><title type='text'>Chrome 自動記憶功能，讓密碼大走光</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgskqQLnHJdHM27_c6GgRO38VYoq_vEqs0L7pfdI8AzxJ7-5uTFYo8YPwzZ2CyvuIH5CkiQs6Qtv5y7A3Ml9cKypcDJFbtD9JDuH0BjvSABFI2g6w4VUbF5vOwb2SpYhWZviTH-/s1600/password.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgskqQLnHJdHM27_c6GgRO38VYoq_vEqs0L7pfdI8AzxJ7-5uTFYo8YPwzZ2CyvuIH5CkiQs6Qtv5y7A3Ml9cKypcDJFbtD9JDuH0BjvSABFI2g6w4VUbF5vOwb2SpYhWZviTH-/s1600/password.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #444444; font-family: sans-serif; font-size: 16px; line-height: 27.1875px; padding: 10px 0px 20px; vertical-align: baseline;&quot;&gt;
在登錄各種網站的過程中，我們常常會使用不同的使用者名和密碼，這會造成記憶上的負擔。如果你是 Chrome 使用者，在登錄新網站的時候，會看到它保存密碼的提示，並且很可能點了「確定」。這樣做的話，你可以自動登錄各種網站，而且在不同的電腦同步，真的非常方便。不過，你是否考慮過安全問題？&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #444444; font-family: sans-serif; font-size: 16px; line-height: 27.1875px; padding: 10px 0px 20px; vertical-align: baseline;&quot;&gt;
或許你會想，Google 肯定把密碼加密後保存在系統之中了吧，或者乾脆就是保存在雲端。如果是這樣，準備嚇一跳吧。真實情況是，Chrome 並沒有為你的密碼加密，更可怕的是，任何一個人都能夠看到你的密碼，無需任何駭客技術。&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #444444; font-family: sans-serif; font-size: 16px; line-height: 27.1875px; padding: 10px 0px 20px; vertical-align: baseline;&quot;&gt;
進入「設定」，查看「密碼和表單」項目，點擊「管理系統儲存的密碼」，（或者直接訪問 Chrome://settings/passwords），你會發現自己保存的所有使用者帳號和密碼。沒錯，密碼都是以小黑點顯示的。但是，如果你點擊一下，就會發現在密碼後面出現了「顯示」二字，點擊它，你就能看到密碼了。就是這麼簡單。&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #444444; font-family: sans-serif; font-size: 16px; line-height: 27.1875px; padding: 10px 0px 20px; vertical-align: baseline;&quot;&gt;
Google 的天才工程師竟然也會犯愚蠢的錯誤！等等，等等，這樣明顯的安全漏洞不可能是錯誤，應該是一種功能吧？恭喜你猜對了。因為Chrome 資安主管說，這的確是故意的，而且他們不打算做出什麼改變。&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #444444; font-family: sans-serif; font-size: 16px; line-height: 27.1875px; padding: 10px 0px 20px; vertical-align: baseline;&quot;&gt;
軟體開發者 Elliott Kember 在部落格上撰文提到了這個問題，在他看來，Chrome 保存密碼的策略是瘋狂的。每次他向懂技術的人反映這個問題，得到的答覆是這樣的：&lt;/div&gt;
&lt;ul style=&quot;background-color: white; border: 0px; color: #666666; font-family: sans-serif; font-size: 16px; line-height: 27.1875px; list-style: none; margin: 0px 0px 0px 2em; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;li class=&quot;first-item&quot; style=&quot;background-attachment: scroll; background-color: transparent; background-image: url(http://assets.inside.com.tw/wp-content/themes/magnovus/images/list-arrow.png); background-position: 0% 7px; background-repeat: no-repeat no-repeat; border: 0px; margin: 0px; padding: 0px 5px 5px 15px; vertical-align: baseline;&quot;&gt;用 1Pass&lt;/li&gt;
&lt;li style=&quot;background-attachment: scroll; background-color: transparent; background-image: url(http://assets.inside.com.tw/wp-content/themes/magnovus/images/list-arrow.png); background-position: 0% 7px; background-repeat: no-repeat no-repeat; border: 0px; margin: 0px; padding: 0px 5px 5px 15px; vertical-align: baseline;&quot;&gt;當別人直接接觸到電腦的時候，它已經不安全了&lt;/li&gt;
&lt;li class=&quot;last-item&quot; style=&quot;background-attachment: scroll; background-color: transparent; background-image: url(http://assets.inside.com.tw/wp-content/themes/magnovus/images/list-arrow.png); background-position: 0% 7px; background-repeat: no-repeat no-repeat; border: 0px; margin: 0px; padding: 0px 5px 5px 15px; vertical-align: baseline;&quot;&gt;密碼管理就應該是這個樣子的&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #444444; font-family: sans-serif; font-size: 16px; line-height: 27.1875px; padding: 10px 0px 20px; vertical-align: baseline;&quot;&gt;
問題是，普通使用者並不知道密碼是這樣保存的。&lt;/div&gt;
&lt;blockquote style=&quot;background-color: #fafafa; background-image: url(http://assets.inside.com.tw/wp-content/themes/magnovus/images/icons.png); background-position: 6px -607px; background-repeat: no-repeat no-repeat; border: 0px; color: #666666; font-family: sans-serif; font-size: 16px; line-height: 27.1875px; margin: 0px; padding: 0px; quotes: none; vertical-align: baseline;&quot;&gt;
&lt;div style=&quot;border: 0px; color: #444444; padding: 10px 20px 20px 30px; vertical-align: baseline;&quot;&gt;
找一個不懂技術的人。借用他們的電腦。訪問 Chrome://settings/passwords，然後在密碼行那裡點擊「顯示」，看看他們會怎麼說。我打賭他們不會說，「密碼管理就是這個樣子的。」&lt;/div&gt;
&lt;/blockquote&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #444444; font-family: sans-serif; font-size: 16px; line-height: 27.1875px; padding: 10px 0px 20px; vertical-align: baseline;&quot;&gt;
Elliott Kember 的文章在&amp;nbsp;&lt;a href=&quot;https://news.ycombinator.com/item?id=6166731&quot; style=&quot;-webkit-tap-highlight-color: rgb(255, 94, 153); color: black;&quot;&gt;hackernews&lt;/a&gt;&amp;nbsp;上獲得了很大關注，於是 Chrome 資安主管 Justin Schuh 也來回覆了。&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #444444; font-family: sans-serif; font-size: 16px; line-height: 27.1875px; padding: 10px 0px 20px; vertical-align: baseline;&quot;&gt;
他說，Elliot Kember 完全是小白使用者的看法，他們花費了多年的時間考量這個問題，並且有大量的數據支撐這個決定，在他看來，如果有人入侵了你的系統使用者帳號，即使再多的安全措施也是無用的。密碼加密的想法雖然出自好意，但是 Chrome 團隊不想給使用者安全的錯覺或者鼓勵危險的行為。那不是他們處理安全問題的方式。&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #444444; font-family: sans-serif; font-size: 16px; line-height: 27.1875px; padding: 10px 0px 20px; vertical-align: baseline;&quot;&gt;
啊？&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #444444; font-family: sans-serif; font-size: 16px; line-height: 27.1875px; padding: 10px 0px 20px; vertical-align: baseline;&quot;&gt;
「安全的錯覺」？難道普通使用者會去設置裡了解明文保存的事實麼？如果 Chrome 明確提示說「密碼會以明文」保存，或許使用者不會有「安全的錯覺」，但在沒有更多提示的情況下，使用者反而會產生「安全的錯覺」吧。另外，根據 Google 工程師的邏輯，一旦壞人進了你的家門，所有的東西都有危險，所以任何櫃子都不要加鎖嗎？古怪的邏輯，而且在現實中，安全問題一定是來自專業駭客嗎？&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #444444; font-family: sans-serif; font-size: 16px; line-height: 27.1875px; padding: 10px 0px 20px; vertical-align: baseline;&quot;&gt;
我們不知道Google 的天才工程師是否會改變想法。但是，如果你注重安全問題的話，趕快把保存的密碼全部刪除，然後在Chrome 提示你保存密碼的時候，點擊「否」吧。&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #444444; font-family: sans-serif; font-size: 16px; line-height: 27.1875px; padding: 10px 0px 20px; vertical-align: baseline;&quot;&gt;
本文轉載至&lt;a href=&quot;http://www.inside.com.tw/2013/08/08/chrome-password&quot; style=&quot;background-color: transparent;&quot;&gt;http://www.inside.com.tw/2013/08/08/chrome-password&lt;/a&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://subocheng.blogspot.com/feeds/6041196452491538628/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://subocheng.blogspot.com/2013/08/chrome.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/30436268/posts/default/6041196452491538628'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/30436268/posts/default/6041196452491538628'/><link rel='alternate' type='text/html' href='http://subocheng.blogspot.com/2013/08/chrome.html' title='Chrome 自動記憶功能，讓密碼大走光'/><author><name>YCCS</name><uri>http://www.blogger.com/profile/14658315920971067951</uri><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><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgskqQLnHJdHM27_c6GgRO38VYoq_vEqs0L7pfdI8AzxJ7-5uTFYo8YPwzZ2CyvuIH5CkiQs6Qtv5y7A3Ml9cKypcDJFbtD9JDuH0BjvSABFI2g6w4VUbF5vOwb2SpYhWZviTH-/s72-c/password.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-30436268.post-4706173659078685700</id><published>2013-08-08T08:33:00.001+08:00</published><updated>2013-08-08T08:33:47.413+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term=".Net"/><category scheme="http://www.blogger.com/atom/ns#" term="WinForm"/><title type='text'>.Net Winform Enter鍵模擬Tab鍵，切換Control Focus</title><content type='html'>當我們在winform上面，按下Tab鍵，會自動focus到下一個Control，&lt;br /&gt;
下面這段程式碼讓按下Enter鍵，也可以focus到下一個Control。&lt;br /&gt;
&lt;br /&gt;
private void Form1_&lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;KeyDown&lt;/span&gt;&lt;/b&gt;(object sender, KeyEventArgs e)&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; if (&lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;e.KeyCode == Keys.Enter&lt;/span&gt;&lt;/b&gt;)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;this.SelectNextControl(this.ActiveControl, true, true, true, true)&lt;/span&gt;&lt;/b&gt;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
}&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;br /&gt;
另外你也可以讓她只有Focus在TextBox上面，或是其他的Control上面&lt;br /&gt;
&lt;br /&gt;
protected &lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;override&lt;/span&gt;&lt;/b&gt; bool &lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;ProcessCmdKey&lt;/span&gt;&lt;/b&gt;(ref Message msg, Keys keyData)&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; Keys keyPressed = (Keys)msg.WParam.ToInt32();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; switch (keyPressed)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; case Keys.Enter:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; case Keys.Tab:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Control ctrl = this.&lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;GetNextControl&lt;/span&gt;&lt;/b&gt;(this.ActiveControl, true);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; while (ctrl is &lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;TextBox &lt;/span&gt;&lt;/b&gt;== false)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ctrl = this.GetNextControl(ctrl, true);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ctrl.Focus();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return true;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; default:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return base.ProcessCmdKey(ref msg, keyData);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
}&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://subocheng.blogspot.com/feeds/4706173659078685700/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://subocheng.blogspot.com/2013/08/net-winform-entertabcontrol-focus.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/30436268/posts/default/4706173659078685700'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/30436268/posts/default/4706173659078685700'/><link rel='alternate' type='text/html' href='http://subocheng.blogspot.com/2013/08/net-winform-entertabcontrol-focus.html' title='.Net Winform Enter鍵模擬Tab鍵，切換Control Focus'/><author><name>YCCS</name><uri>http://www.blogger.com/profile/14658315920971067951</uri><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>0</thr:total></entry></feed>