<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-1453680490016993191</id><updated>2012-02-16T09:50:44.413-08:00</updated><category term='C#'/><category term='PHP'/><category term='Gettext'/><category term='Firefox'/><category term='Linux'/><category term='Murmur'/><category term='Convert'/><category term='Self-reflection'/><category term='Info'/><category term='VS'/><category term='Ubuntu'/><category term='DVD'/><category term='Handbrake'/><category term='Gnome'/><category term='Programming'/><category term='oracle'/><title type='text'>狗吠火車</title><subtitle type='html'>人不能逆天，但狗可以吠火車，汪汪汪～～～</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://dog-barking.cmchou.net/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1453680490016993191/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://dog-barking.cmchou.net/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>C.-M. Chou</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>23</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1453680490016993191.post-2561398848019756627</id><published>2012-02-08T18:28:00.000-08:00</published><updated>2012-02-08T18:28:04.172-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><title type='text'>How to check the distribution and kernel version of Linux?</title><content type='html'>&lt;ol&gt;&lt;li&gt;&lt;code&gt;$ cat /etc/*-release&lt;br /&gt;It will tell you the distribution name and version.&lt;br /&gt;&lt;/code&gt;&lt;/li&gt;&lt;li&gt;&lt;code&gt;$ lsb_release -a&lt;br /&gt;Same as above.&lt;br /&gt;&lt;/code&gt;&lt;/li&gt;&lt;li&gt;&lt;code&gt;$ uname -mrs&lt;br /&gt;It will tell you the linux kernel version and type (x86 or x64).&lt;/code&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1453680490016993191-2561398848019756627?l=dog-barking.cmchou.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dog-barking.cmchou.net/feeds/2561398848019756627/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dog-barking.cmchou.net/2012/02/how-to-check-distribution-and-kernel.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1453680490016993191/posts/default/2561398848019756627'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1453680490016993191/posts/default/2561398848019756627'/><link rel='alternate' type='text/html' href='http://dog-barking.cmchou.net/2012/02/how-to-check-distribution-and-kernel.html' title='How to check the distribution and kernel version of Linux?'/><author><name>C.-M. Chou</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1453680490016993191.post-2494912445428137291</id><published>2012-01-14T07:05:00.000-08:00</published><updated>2012-01-14T07:06:05.822-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Convert'/><category scheme='http://www.blogger.com/atom/ns#' term='Handbrake'/><category scheme='http://www.blogger.com/atom/ns#' term='DVD'/><title type='text'>How to adjust the output quality when using Handbrake to convert DVDs to MP4/Mkv</title><content type='html'>There are 3 methods which can do the same thing to you.&lt;br /&gt;They are easy and helpful.&lt;br /&gt;&lt;br /&gt;1. Set the estimated output file size:&lt;br /&gt;Handbrake with calculate the best bitrate for you. For DVDs with the best converting quality. Set the output file size equals or slightly smaller than the original DVD size. That can yield the best output quality.&lt;br /&gt;&lt;br /&gt;2. Set the average bitrate:&lt;br /&gt;480P(720x480) h.264 &lt;br /&gt;excellent bitrate=4266 kbps, &lt;br /&gt;good bitrate=2346 kbps, &lt;br /&gt;normal bitrate=1493 kbps,&lt;br /&gt;&lt;br /&gt;480P(720x480)mpeg4 &lt;br /&gt;excellent bitrate=4665 kbps, &lt;br /&gt;good bitrate=2565 kbps, &lt;br /&gt;normal bitrate=1632 kbps.&lt;br /&gt;&lt;br /&gt;3. Set the constant quality:&lt;br /&gt;For preserving the DVD quality, set RF=20.&lt;br /&gt;For smaller output file size, set RF=28.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1453680490016993191-2494912445428137291?l=dog-barking.cmchou.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dog-barking.cmchou.net/feeds/2494912445428137291/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dog-barking.cmchou.net/2012/01/how-to-adjust-output-quality-when-using.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1453680490016993191/posts/default/2494912445428137291'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1453680490016993191/posts/default/2494912445428137291'/><link rel='alternate' type='text/html' href='http://dog-barking.cmchou.net/2012/01/how-to-adjust-output-quality-when-using.html' title='How to adjust the output quality when using Handbrake to convert DVDs to MP4/Mkv'/><author><name>C.-M. Chou</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1453680490016993191.post-170856064607490981</id><published>2011-12-22T23:22:00.000-08:00</published><updated>2011-12-22T23:22:47.145-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><category scheme='http://www.blogger.com/atom/ns#' term='Ubuntu'/><title type='text'>Linux/Unix下用SCP傳輸檔案之用法</title><content type='html'>傳檔案過去遠端主機&lt;br /&gt;&lt;br /&gt;&lt;span style="color: black;"&gt;scp -p source.file user@DomainName:/TargetPath/&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;抓檔案過來&lt;br /&gt;&lt;br /&gt;&lt;span style="color: black;"&gt;scp user@DomainName:/SourcePath/file /home/user/TargetPath&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1453680490016993191-170856064607490981?l=dog-barking.cmchou.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dog-barking.cmchou.net/feeds/170856064607490981/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dog-barking.cmchou.net/2011/12/linuxunixscp.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1453680490016993191/posts/default/170856064607490981'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1453680490016993191/posts/default/170856064607490981'/><link rel='alternate' type='text/html' href='http://dog-barking.cmchou.net/2011/12/linuxunixscp.html' title='Linux/Unix下用SCP傳輸檔案之用法'/><author><name>C.-M. Chou</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1453680490016993191.post-1954963535335114222</id><published>2011-12-20T17:54:00.000-08:00</published><updated>2011-12-20T17:54:47.996-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><category scheme='http://www.blogger.com/atom/ns#' term='Ubuntu'/><category scheme='http://www.blogger.com/atom/ns#' term='Firefox'/><title type='text'></title><content type='html'>How to update/install Firefox 9.0 in Ubuntu?&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;新增Firefox 9.0 repository&lt;br /&gt;&lt;span id="intelliTxt" style="color: black;"&gt;&lt;em&gt;sudo add-apt-repository ppa:mozillateam/firefox-next&lt;/em&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;更新套件版本資料&lt;br /&gt;&lt;i&gt;sudo apt-get update&lt;/i&gt;&lt;/li&gt;&lt;li&gt;更新系統套件版本，或者直接安裝Firefox 9.0&lt;br /&gt;&lt;i&gt;sudo apt-get upgrade&lt;/i&gt; or &lt;i&gt;sudo apt-get install firefox&lt;/i&gt;&lt;/li&gt;&lt;li&gt;搞定收工&lt;/li&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1453680490016993191-1954963535335114222?l=dog-barking.cmchou.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dog-barking.cmchou.net/feeds/1954963535335114222/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dog-barking.cmchou.net/2011/12/how-to-updateinstall-firefox-9.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1453680490016993191/posts/default/1954963535335114222'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1453680490016993191/posts/default/1954963535335114222'/><link rel='alternate' type='text/html' href='http://dog-barking.cmchou.net/2011/12/how-to-updateinstall-firefox-9.html' title=''/><author><name>C.-M. Chou</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1453680490016993191.post-3240027667432569841</id><published>2011-12-20T00:04:00.001-08:00</published><updated>2011-12-20T00:05:47.206-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Gnome'/><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><title type='text'>移除Gnome Class介面中Top Bar的捷徑圖示</title><content type='html'>Question: How to remove the icon from the top bar in Gnome classic interface?&lt;br /&gt; &lt;br /&gt;Ans: Alt+滑鼠右鍵。&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1453680490016993191-3240027667432569841?l=dog-barking.cmchou.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dog-barking.cmchou.net/feeds/3240027667432569841/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dog-barking.cmchou.net/2011/12/gnome-class.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1453680490016993191/posts/default/3240027667432569841'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1453680490016993191/posts/default/3240027667432569841'/><link rel='alternate' type='text/html' href='http://dog-barking.cmchou.net/2011/12/gnome-class.html' title='移除Gnome Class介面中Top Bar的捷徑圖示'/><author><name>C.-M. Chou</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1453680490016993191.post-9034945721732174698</id><published>2011-09-28T18:46:00.000-07:00</published><updated>2011-09-28T18:46:03.558-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Gettext'/><category scheme='http://www.blogger.com/atom/ns#' term='PHP'/><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><category scheme='http://www.blogger.com/atom/ns#' term='Ubuntu'/><title type='text'>在Linux與PHP環境下開發多國語言介面網站</title><content type='html'>不囉嗦，最直接的方式，使用&lt;a href="http://www.gnu.org/s/gettext/"&gt;gettext&lt;/a&gt;，&lt;br /&gt;參考資料如下：&lt;br /&gt;&lt;br /&gt;1. &lt;a href="http://blog.longwin.com.tw/2010/08/windows-php-gettext-2010/"&gt;&lt;span style="font-size: small;"&gt;於 Windows 使用 PHP + GetText 來實做多國語系支援(I18N)&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;2&lt;/span&gt;&lt;span style="font-size: small;"&gt;. &lt;a href="http://blog.longwin.com.tw/2009/03/gettext-mo-convert-po-php-reader-mo-2009/"&gt;Gettext mo 轉回 po 和 PHP 讀取 mo 檔&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;3.&lt;span style="font-size: small;"&gt; &lt;a href="http://blog.roodo.com/rocksaying/archives/15193601.html"&gt;PHP 網頁訊息國際化與 gettext 使用經驗&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;4. &lt;a href="http://jishus.org/?p=553"&gt;&lt;span style="font-size: small;"&gt;透過Gettext for PHP快速做出多國語系程式&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;5. &lt;/span&gt;&lt;a href="http://www.sourcerally.net/regin/49-How-to-get-PHP-and-gettext-working-%28ubuntu,-debian%29"&gt;How to get PHP and gettext working (ubuntu, debian)&lt;/a&gt;&lt;span style="font-size: small;"&gt; &lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1453680490016993191-9034945721732174698?l=dog-barking.cmchou.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dog-barking.cmchou.net/feeds/9034945721732174698/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dog-barking.cmchou.net/2011/09/linuxphp.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1453680490016993191/posts/default/9034945721732174698'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1453680490016993191/posts/default/9034945721732174698'/><link rel='alternate' type='text/html' href='http://dog-barking.cmchou.net/2011/09/linuxphp.html' title='在Linux與PHP環境下開發多國語言介面網站'/><author><name>C.-M. Chou</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1453680490016993191.post-2371326959605313208</id><published>2011-08-22T00:12:00.000-07:00</published><updated>2011-08-22T00:24:27.597-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='oracle'/><title type='text'>空字串與Null</title><content type='html'>聽說在Oracle DB中，空字串==Null是成立的，&lt;br /&gt;但是在其他地方不是。&lt;br /&gt;&lt;br /&gt;空字串：一個字串沒有東西，但仍有字串結尾，例如/0。 &lt;br /&gt;Null：什麼都沒有。&lt;br /&gt;&lt;br /&gt;自己做了一點小實驗，&lt;br /&gt;string aaa="";&lt;br /&gt;string bbb=null;&lt;br /&gt;&lt;br /&gt;對aaa與bbb取長度，則aaa=0，bbb不給取，編譯就會出現exception。&lt;br /&gt;對aaa與bbb進行==null判斷，aaa為false, bbb為true。&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1453680490016993191-2371326959605313208?l=dog-barking.cmchou.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dog-barking.cmchou.net/feeds/2371326959605313208/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dog-barking.cmchou.net/2011/08/null.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1453680490016993191/posts/default/2371326959605313208'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1453680490016993191/posts/default/2371326959605313208'/><link rel='alternate' type='text/html' href='http://dog-barking.cmchou.net/2011/08/null.html' title='空字串與Null'/><author><name>C.-M. Chou</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1453680490016993191.post-22195675839834538</id><published>2011-08-21T19:14:00.000-07:00</published><updated>2011-08-21T19:14:47.067-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Programming'/><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><title type='text'>C# command line parameters</title><content type='html'>Command Line Parameters Tutorial&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/aa288457%28v=vs.71%29.aspx"&gt;http://msdn.microsoft.com/en-us/library/aa288457%28v=vs.71%29.aspx&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;簡單的說，args是拿來取command line使用時的參數數目，&lt;br /&gt;所以可以用args.length取得參數數目，&lt;br /&gt;取用方法就args[0]、args[1]依此類推。 &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1453680490016993191-22195675839834538?l=dog-barking.cmchou.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dog-barking.cmchou.net/feeds/22195675839834538/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dog-barking.cmchou.net/2011/08/c-command-line-parameters.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1453680490016993191/posts/default/22195675839834538'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1453680490016993191/posts/default/22195675839834538'/><link rel='alternate' type='text/html' href='http://dog-barking.cmchou.net/2011/08/c-command-line-parameters.html' title='C# command line parameters'/><author><name>C.-M. Chou</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1453680490016993191.post-1942027836646377135</id><published>2011-08-16T01:18:00.001-07:00</published><updated>2011-08-16T01:18:46.655-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Programming'/><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><title type='text'>型別之所在，錯誤之所在</title><content type='html'>原來DataSet, DataTable, DataRow都是沒有型別的，怎麼接資料都可以，轉成Entity就不行，需要認真注意型別，切記切記。&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1453680490016993191-1942027836646377135?l=dog-barking.cmchou.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dog-barking.cmchou.net/feeds/1942027836646377135/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dog-barking.cmchou.net/2011/08/blog-post.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1453680490016993191/posts/default/1942027836646377135'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1453680490016993191/posts/default/1942027836646377135'/><link rel='alternate' type='text/html' href='http://dog-barking.cmchou.net/2011/08/blog-post.html' title='型別之所在，錯誤之所在'/><author><name>C.-M. Chou</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1453680490016993191.post-3562680885487264568</id><published>2011-08-10T23:47:00.000-07:00</published><updated>2011-08-10T23:47:58.050-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Programming'/><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><title type='text'>KeyDown與KeyPress的差異</title><content type='html'>KeyPress: invoked only for character (printable) keys&lt;br /&gt;&lt;br /&gt;KeyDown: raised for nonprintable such as Control, Shift, etc.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1453680490016993191-3562680885487264568?l=dog-barking.cmchou.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dog-barking.cmchou.net/feeds/3562680885487264568/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dog-barking.cmchou.net/2011/08/keydownkeypress.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1453680490016993191/posts/default/3562680885487264568'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1453680490016993191/posts/default/3562680885487264568'/><link rel='alternate' type='text/html' href='http://dog-barking.cmchou.net/2011/08/keydownkeypress.html' title='KeyDown與KeyPress的差異'/><author><name>C.-M. Chou</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1453680490016993191.post-756811354307639873</id><published>2011-08-04T03:23:00.000-07:00</published><updated>2011-08-04T03:33:28.644-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Programming'/><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><title type='text'>c#中使用ComboBox顯示key, value的方法</title><content type='html'>首先，使用&lt;span class="selflink"&gt;Dictionary&amp;lt;TKey, TValue&amp;gt;宣告一組key與value的對應值，&lt;/span&gt;&lt;br /&gt;&lt;span class="selflink"&gt;語法如下：&lt;/span&gt;&lt;br /&gt;&lt;div style="color: black;"&gt;&lt;b&gt;&lt;span class="selflink"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dictionary&lt;string, string=""&gt; statusList = new Dictionary&lt;string, string=""&gt;();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; statusList.Add("A", "Apple");&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; statusList.Add("B", "Bird");&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; statusList.Add("C", "Cat");&lt;/string,&gt;&lt;/string,&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style="color: black;"&gt;&lt;b&gt;&lt;span class="selflink"&gt;&lt;string, string=""&gt;&lt;string, string=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; comboBox.DataSource = new BindingSource(statusList, null);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; comboBox.ValueMember = "KEY";&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; comboBox.DisplayMember = "VALUE";&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; comboBox.SelectedIndex = comboBoxStatus.Items.IndexOf(new KeyValuePair&lt;string, string=""&gt;("A", "Apple")); &lt;/string,&gt;&lt;/string,&gt;&lt;/string,&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;br /&gt;&lt;span class="selflink"&gt;之後再用下行語法：&lt;/span&gt;&lt;br /&gt;&lt;span class="selflink"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;b&gt;comboBox.SelectedIndex = comboBoxStatus.Items.IndexOf(new KeyValuePair&lt;/b&gt;&lt;string, string=""&gt;&lt;b&gt;("A", "Apple"));&lt;/b&gt;&lt;br /&gt;&amp;nbsp;&lt;/string,&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="selflink"&gt;&lt;string, string=""&gt;就可以讓ComboBox顯示預設的字串，但實際使用者回傳的key是前面的A、B或者C，取值的語法如下行：&lt;/string,&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="selflink"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;b&gt;string reportState = ((KeyValuePair&lt;string, string=""&gt;)comboBox.SelectedItem).Key&lt;/string,&gt;&lt;/b&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1453680490016993191-756811354307639873?l=dog-barking.cmchou.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dog-barking.cmchou.net/feeds/756811354307639873/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dog-barking.cmchou.net/2011/08/ccomboboxkey-value.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1453680490016993191/posts/default/756811354307639873'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1453680490016993191/posts/default/756811354307639873'/><link rel='alternate' type='text/html' href='http://dog-barking.cmchou.net/2011/08/ccomboboxkey-value.html' title='c#中使用ComboBox顯示key, value的方法'/><author><name>C.-M. Chou</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1453680490016993191.post-6092866068107850487</id><published>2011-08-01T02:55:00.000-07:00</published><updated>2011-08-01T02:55:30.231-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Programming'/><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><title type='text'>Static參數在程式中的用途</title><content type='html'>&lt;br /&gt;&lt;ul&gt;&lt;li&gt;函數中的static variable &lt;/li&gt;&lt;/ul&gt;被宣告成static 的變數，其實就是 global 的了，變數不會隨著函數結束而消逝，只是因為是宣告在某Function 裡，所以只能在某Function 裡用。&lt;br /&gt;  在函數中，static variable只會被初始一次，函數重新被呼叫時，不會被重新初始，等於可以用此static variable在連續呼叫的相同函數中傳遞數值。 &lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt; Class中的static variable &lt;/li&gt;&lt;/ul&gt;把class中的member variable 宣告成 static，代表此variable與「class」相關連」，而不是「與物件相關連」。此variable可獨立配置記憶體，獨立於 class 的任何物件而存在，這個 class 產生的所有物件共用使同一個 static member variable，甚至不需要有物件也能夠被使用。 &lt;br /&gt;白話點講，所有的class所產生的instance，皆可使用此static member variable，等於是所有instance之間的共用變數。&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;static class&lt;/li&gt;&lt;/ul&gt;若把整個class也宣告成static，則類別中所有method也要是static。 &lt;br /&gt;&lt;ol&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1453680490016993191-6092866068107850487?l=dog-barking.cmchou.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dog-barking.cmchou.net/feeds/6092866068107850487/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dog-barking.cmchou.net/2011/08/static.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1453680490016993191/posts/default/6092866068107850487'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1453680490016993191/posts/default/6092866068107850487'/><link rel='alternate' type='text/html' href='http://dog-barking.cmchou.net/2011/08/static.html' title='Static參數在程式中的用途'/><author><name>C.-M. Chou</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1453680490016993191.post-5202517229936610946</id><published>2011-08-01T00:42:00.000-07:00</published><updated>2011-08-01T00:42:19.914-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='VS'/><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><title type='text'>解決Visual Studio專案，執行時產生0x8007000B錯誤代碼</title><content type='html'>0x8007000B錯誤代碼，其意思為載入了格式不對的dll檔。&lt;br /&gt;&lt;br /&gt;若未更改預設設定，基本上visual studio會依照系統的版本去編譯程式，&lt;br /&gt;亦即跑在x86系統，就編成x86程式，跑在64bit環境，就編成x64程式。&lt;br /&gt; &lt;br /&gt;所以遇到這問題時，到專案-&amp;gt;[專案名稱]特性中，Build tab下，把平台目標改成x86，&lt;br /&gt;確保編譯輸出的結果是想要的，就可以避免0x8007000B問題。&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1453680490016993191-5202517229936610946?l=dog-barking.cmchou.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dog-barking.cmchou.net/feeds/5202517229936610946/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dog-barking.cmchou.net/2011/08/visual-studio0x8007000b.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1453680490016993191/posts/default/5202517229936610946'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1453680490016993191/posts/default/5202517229936610946'/><link rel='alternate' type='text/html' href='http://dog-barking.cmchou.net/2011/08/visual-studio0x8007000b.html' title='解決Visual Studio專案，執行時產生0x8007000B錯誤代碼'/><author><name>C.-M. Chou</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1453680490016993191.post-7372976656559329109</id><published>2011-07-14T20:21:00.000-07:00</published><updated>2011-07-14T20:21:00.561-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='VS'/><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><title type='text'>C# 除錯設定</title><content type='html'>參考&lt;a href="http://www.dotblogs.com.tw/chhuang/archive/2011/01/11/20748.aspx"&gt;這篇文章&lt;/a&gt;，果然我還有很多要學的。&lt;br /&gt;&lt;br /&gt;	&lt;span style="color: black; font-family: inherit;"&gt;1.&lt;/span&gt;&lt;span style="color: blue; font-family: inherit;"&gt;&lt;strong&gt; Step Into (F11)&lt;/strong&gt;&lt;/span&gt;&lt;span style="color: black; font-family: inherit;"&gt; : 逐行偵錯，遇到可以函式則繼續進入逐行偵錯。&lt;/span&gt;&lt;br /&gt;&lt;span style="color: black; font-family: inherit;"&gt;&lt;/span&gt;&lt;div style="color: black; font-family: inherit;"&gt;	2. &lt;strong&gt;Step Over (F10)&lt;/strong&gt;：逐行偵錯，但遇到函式則直接繼續執行下一行，不進入函式逐行偵錯。&lt;/div&gt;&lt;span style="color: black; font-family: inherit;"&gt;&lt;/span&gt;&lt;div style="color: black; font-family: inherit;"&gt;	3. &lt;strong&gt;Step Out (Shift + F11)&lt;/strong&gt; ：脫離函式，在使用逐行偵錯時，進入處理函式後如果想返回前一個 Call Stack 呼叫函式時使用&lt;/div&gt;&lt;span style="color: black; font-family: inherit;"&gt;&lt;/span&gt;&lt;div style="color: black; font-family: inherit;"&gt;	4. &lt;strong&gt;Continue (F5)&lt;/strong&gt;：直接執行接下來的程式碼，直到遇到下個中斷點。&lt;/div&gt;&lt;span style="color: black; font-family: inherit;"&gt;&lt;/span&gt;&lt;div style="color: black; font-family: inherit;"&gt;	5.&lt;strong&gt; Run to Cursor (Ctrl + F10)&lt;/strong&gt;：繼續執行程式碼，但會中斷於游標所在的程式碼。&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1453680490016993191-7372976656559329109?l=dog-barking.cmchou.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dog-barking.cmchou.net/feeds/7372976656559329109/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dog-barking.cmchou.net/2011/07/c.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1453680490016993191/posts/default/7372976656559329109'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1453680490016993191/posts/default/7372976656559329109'/><link rel='alternate' type='text/html' href='http://dog-barking.cmchou.net/2011/07/c.html' title='C# 除錯設定'/><author><name>C.-M. Chou</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1453680490016993191.post-6188543033442050986</id><published>2011-06-27T04:01:00.000-07:00</published><updated>2011-06-27T04:01:20.578-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='VS'/><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><title type='text'>如何轉換Visual Studio 2010與2008之檔案？</title><content type='html'>As title, &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;For &amp;lt;PROJECT_NAME&amp;gt;.sln:&lt;br /&gt;1. Open the solution file in your favorite text editor (ex: notepad++).&lt;br /&gt;2. Find the Following:&lt;br /&gt;&lt;b&gt;Microsoft Visual Studio Solution File, Format Version 11.00&lt;/b&gt;.&lt;br /&gt;&lt;b&gt;# Visual Studio 2010&lt;/b&gt;. &lt;br /&gt;Replace with:&lt;br /&gt;&lt;b&gt;Microsoft Visual Studio Solution File, Format Version 10.00&lt;/b&gt;. (I)&lt;br /&gt;&lt;b&gt;# Visual Studio 2008&lt;/b&gt;. (II, optinal)&lt;br /&gt;&lt;br /&gt;For &amp;lt;Project_name &amp;gt;.csproj/vbproj:&lt;br /&gt;1. Open project file in your favorite text editor (ex: notepad++).&lt;br /&gt;2. Find the Following:&lt;br /&gt;&lt;b&gt;&amp;lt;Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"&amp;gt;&lt;/b&gt;.&lt;br /&gt;Replace with:&lt;br /&gt;&lt;b&gt;&amp;lt;Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"&amp;gt;&lt;/b&gt;. (III)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1453680490016993191-6188543033442050986?l=dog-barking.cmchou.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dog-barking.cmchou.net/feeds/6188543033442050986/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dog-barking.cmchou.net/2011/06/visual-studio-20102008.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1453680490016993191/posts/default/6188543033442050986'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1453680490016993191/posts/default/6188543033442050986'/><link rel='alternate' type='text/html' href='http://dog-barking.cmchou.net/2011/06/visual-studio-20102008.html' title='如何轉換Visual Studio 2010與2008之檔案？'/><author><name>C.-M. Chou</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1453680490016993191.post-861399497910470684</id><published>2011-06-27T01:13:00.000-07:00</published><updated>2011-06-27T01:27:53.164-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Programming'/><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><title type='text'>Properties in C#</title><content type='html'>A property is a member that provides a flexible mechanism to read,  write, or compute the value of a private field. Properties can be used  as if they are public data members, but they are actually special  methods called &lt;span class="parameter"&gt;accessors&lt;/span&gt;. This enables data to be accessed easily and still helps promote the safety and flexibility of methods.&lt;br /&gt;&lt;pre&gt;&lt;span style="color: blue;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="color: blue;"&gt;&lt;span style="font-size: x-large;"&gt;&lt;b&gt;&lt;span style="color: black;"&gt;範例一：&lt;/span&gt;&lt;/b&gt;&lt;/span&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="color: blue;"&gt;class&lt;/span&gt; TimePeriod&lt;br /&gt;{&lt;br /&gt;    &lt;span style="color: blue;"&gt;private&lt;/span&gt; &lt;span style="color: blue;"&gt;double&lt;/span&gt; seconds;&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: blue;"&gt;public&lt;/span&gt; &lt;span style="color: blue;"&gt;double&lt;/span&gt; Hours&lt;br /&gt;    {&lt;br /&gt;        &lt;span style="color: blue;"&gt;get&lt;/span&gt; { &lt;span style="color: blue;"&gt;return&lt;/span&gt; seconds / 3600; }&lt;br /&gt;        &lt;span style="color: blue;"&gt;set&lt;/span&gt; { seconds = value * 3600; }&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;class&lt;/span&gt; Program&lt;br /&gt;{&lt;br /&gt;    &lt;span style="color: blue;"&gt;static&lt;/span&gt; &lt;span style="color: blue;"&gt;void&lt;/span&gt; Main()&lt;br /&gt;    {&lt;br /&gt;        TimePeriod t = &lt;span style="color: blue;"&gt;new&lt;/span&gt; TimePeriod();&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: green;"&gt;// Assigning the Hours property causes the 'set' accessor to be called.&lt;/span&gt;&lt;br /&gt;        t.Hours = 24;&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: green;"&gt;// Evaluating the Hours property causes the 'get' accessor to be called.&lt;/span&gt;&lt;br /&gt;        System.Console.WriteLine(&lt;span style="color: #a31515;"&gt;"Time in hours: "&lt;/span&gt; + t.Hours);&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;span style="color: green;"&gt;// Output: Time in hours: 24&lt;/span&gt;&lt;/pre&gt;以上是MS的解釋，主要連結&lt;a href="http://msdn.microsoft.com/en-us/library/x9fsa0sw.aspx"&gt;在此&lt;/a&gt;。&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;span style="color: blue;"&gt;&lt;span style="font-size: x-large;"&gt;&lt;b&gt;&lt;span style="color: black;"&gt;範例二：&lt;/span&gt;&lt;/b&gt;&lt;/span&gt; &lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;span style="font-family: Arial; font-size: small;"&gt;舊用法：要有一個欄位變數(Field Variable)：&lt;em&gt;&lt;span style="color: red;"&gt;&lt;strong&gt;age&lt;/strong&gt;&lt;/span&gt;&lt;/em&gt; ，get還要return，set要收欄位變數的值，&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;  &lt;/span&gt;&lt;span style="font-family: Arial; font-size: small;"&gt;&lt;span class="kwrd"&gt;private&lt;/span&gt; &lt;span class="kwrd"&gt;int&lt;/span&gt; &lt;strong&gt;&lt;span style="color: red;"&gt;&lt;em&gt;age&lt;/em&gt;&lt;/span&gt;;&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;  &lt;/span&gt;&lt;div class="csharpcode"&gt;&lt;pre class="alt"&gt;&lt;span style="font-family: Arial; font-size: small;"&gt;&lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;int&lt;/span&gt; Age&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-family: Arial; font-size: small;"&gt;{&lt;/span&gt;&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span style="font-family: Arial; font-size: small;"&gt;    get&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-family: Arial; font-size: small;"&gt;    {&lt;/span&gt;&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span style="font-family: Arial; font-size: small;"&gt;        &lt;span class="kwrd"&gt;return&lt;/span&gt; age;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-family: Arial; font-size: small;"&gt;    }&lt;/span&gt;&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span style="font-family: Arial; font-size: small;"&gt;    set&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-family: Arial; font-size: small;"&gt;    {&lt;/span&gt;&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span style="font-family: Arial; font-size: small;"&gt;        age = &lt;span class="kwrd"&gt;value&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-family: Arial; font-size: small;"&gt;    }&lt;/span&gt;&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span style="font-family: Arial; font-size: small;"&gt;} &lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;span style="font-size: small;"&gt; &lt;/span&gt;&lt;span style="font-family: Arial; font-size: small;"&gt;現在！免！&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;  &lt;/span&gt;&lt;span style="font-family: Arial; font-size: small;"&gt;按下面的語法寫就可以，不過get與set兩者都要存在才行。&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;  &lt;/span&gt;&lt;div class="csharpcode"&gt;&lt;pre class="alt"&gt;&lt;span style="font-family: Arial; font-size: small;"&gt;&lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; Age{ get; set; }&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;span style="font-size: small;"&gt;  &lt;/span&gt;  &lt;span style="font-family: Arial; font-size: small;"&gt;若是要設定唯讀&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;  &lt;/span&gt;&lt;div class="csharpcode"&gt;&lt;pre class="alt"&gt;&lt;span style="font-size: small;"&gt;&lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; Age{ get; &lt;span class="kwrd"&gt;private&lt;/span&gt; set; }&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;另一個網路上的解釋，連結&lt;a href="http://www.dotblogs.com.tw/yc421206/archive/2009/03/29/7755.aspx"&gt;在此&lt;/a&gt;。 &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;個人的解釋：提供一個界面，把class中的function當作變數來用。因為當作變數，所以就只要寫好兩個功能，set（存）與get（取），寫好後，就把function當變數直接用就是，算是兼顧彈性與封裝性質的偷吃步。function名稱與函數名稱若不同時，就等於是寫public function存取private variable。function名稱與variable名稱，若只差第一個字母之大小寫時，預設就是用此function存取此variable，如同上面的範例二。&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1453680490016993191-861399497910470684?l=dog-barking.cmchou.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dog-barking.cmchou.net/feeds/861399497910470684/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dog-barking.cmchou.net/2011/06/properties-in-c.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1453680490016993191/posts/default/861399497910470684'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1453680490016993191/posts/default/861399497910470684'/><link rel='alternate' type='text/html' href='http://dog-barking.cmchou.net/2011/06/properties-in-c.html' title='Properties in C#'/><author><name>C.-M. Chou</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1453680490016993191.post-5166504279842292101</id><published>2011-06-22T01:13:00.001-07:00</published><updated>2011-06-22T01:13:59.374-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Programming'/><category scheme='http://www.blogger.com/atom/ns#' term='Info'/><title type='text'>一個對物件相當清楚的解釋</title><content type='html'>&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Namespace&lt;/strong&gt;: A category or brand of cars. Note that the brand really doesn't have to dictate how the car is built. You can't say a Honda always have four doors, or that it always has 4wd. Such specifics is up to the class to dictate. &lt;a href="http://stackoverflow.com/questions/819793/namespaces-then-classes-then-methods-is-there-a-metaphor/819813#819813"&gt;Rich.Carpenter's post&lt;/a&gt; explains the purpose of namespaces very good.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Class&lt;/strong&gt;: Blueprint for how to build a specific car.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Object&lt;/strong&gt;: An actual car (instance) created from the car blueprint (the class)&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Method&lt;/strong&gt;: Something a user of the car can make it do. Start(), IncreaseThrottle(), Break(), OpenDoor() etc.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Property&lt;/strong&gt;: Attributes, information and building blocks which the car contains. E.g. Total running miles, color, steering wheel dimension, stereo system etc etc.&lt;/li&gt;&lt;/ul&gt;Some concepts which could seem more advanced to you. Maybe overkill right now, but read it if you're interested:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Inheritance&lt;/strong&gt;: When a class is based on another  class and adds some more specific details. A line of inheritance usually  goes from the most common and general aspect, all the way down to a  point where it makes no more sense to be more specific. Example of this  in the context of animals: &lt;em&gt;Animal-&amp;gt;Mamal-&amp;gt;Rodent-&amp;gt;Rat-&amp;gt;RattusNorvegicus&lt;/em&gt;&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Aggregates&lt;/strong&gt;: Properties that "builds" the object. E.g. "This car is an aggregation of four wheels, a chassi, an engine, etc".&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Attribute&lt;/strong&gt;: Properties that describe the object, usually not part of its physical construction. E.g. Color, top speed, engine volume etc. &lt;/li&gt;&lt;li&gt;&lt;strong&gt;Encapsulation&lt;/strong&gt;: The concept of concealing certain  properties from the user, or to protect certain properties from being  used incorrectly (and thereby damaging the object). E.g. You don't  expose the gear-property of a car class to be altered freely. You  encapsulate it and make sure Clutch() is called before SetGear().&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Overriding&lt;/strong&gt;: If a class inherits from another class, it also inherits methods from that class. Overriding is basically when the &lt;em&gt;inheriting&lt;/em&gt; class replaces the implementation of such a method with its own required behaviour. Example of usage in next point.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Polymorphism&lt;/strong&gt;: A difficult concept to grasp until  you start using it practically. It means referring to a very specific  kind of object, by using a generic reference which allows you to ignore  the specific type (when you don't need to know it). E.g. If you wan't to  "read" the license plate number property of every vehicle in a parking  lot, you don't really care what the brand is, or even if it's a trailer  or motorcycle or whatever. To be able to do this, we make sure the  license plate number is a property in the most general class in the  inheritance line (probably the Vehicle class). So you only have to deal  with all the objects in a list by referring to them as Vehicles and then  call Vehicle::GetLicensePlateNumber(). Any vehicle requiring some  special handling to retrieve the number can implement this behaviour by  overriding the method and make it behave as required. So a wide range of  object types can be used as if they were of the same type, but can  behave differently. &lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1453680490016993191-5166504279842292101?l=dog-barking.cmchou.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dog-barking.cmchou.net/feeds/5166504279842292101/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dog-barking.cmchou.net/2011/06/blog-post.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1453680490016993191/posts/default/5166504279842292101'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1453680490016993191/posts/default/5166504279842292101'/><link rel='alternate' type='text/html' href='http://dog-barking.cmchou.net/2011/06/blog-post.html' title='一個對物件相當清楚的解釋'/><author><name>C.-M. Chou</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1453680490016993191.post-2206382665828384632</id><published>2011-06-21T02:11:00.000-07:00</published><updated>2011-06-21T02:11:24.250-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Info'/><title type='text'>Google搜尋進階用法(2)</title><content type='html'>不完整字句搜尋&lt;br /&gt;ex: "Taiwan is * country"&lt;br /&gt;會出現Taiwan is &lt;span style="color: red;"&gt;an independent&lt;/span&gt; country等等字句之網頁。&lt;br /&gt;&lt;br /&gt;看網站目錄的下載&lt;br /&gt;ex: "index of /"AVI&lt;br /&gt;找出網頁有提供目錄，且目錄中有avi檔案&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1453680490016993191-2206382665828384632?l=dog-barking.cmchou.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dog-barking.cmchou.net/feeds/2206382665828384632/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dog-barking.cmchou.net/2011/06/google2.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1453680490016993191/posts/default/2206382665828384632'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1453680490016993191/posts/default/2206382665828384632'/><link rel='alternate' type='text/html' href='http://dog-barking.cmchou.net/2011/06/google2.html' title='Google搜尋進階用法(2)'/><author><name>C.-M. Chou</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1453680490016993191.post-1211302480733109257</id><published>2011-06-21T01:44:00.000-07:00</published><updated>2011-06-21T01:48:05.972-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Info'/><title type='text'>Google搜尋進階用法(1)</title><content type='html'>inurl: 搜尋在網址中有的文字。&lt;br /&gt;ex: inurl:php language&lt;br /&gt;說明:搜尋網址中有php，網頁內文中有language&lt;br /&gt;&lt;br /&gt;allinurl:搜尋在網址列中的文字，但全部都要在網址中&lt;br /&gt;ex allinurl:php cgi language&lt;br /&gt;說明:php，cgi與language三者都要在網址中&lt;br /&gt;&lt;br /&gt;intitle與allintitle同上，只是把網址改成title區&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1453680490016993191-1211302480733109257?l=dog-barking.cmchou.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dog-barking.cmchou.net/feeds/1211302480733109257/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dog-barking.cmchou.net/2011/06/google.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1453680490016993191/posts/default/1211302480733109257'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1453680490016993191/posts/default/1211302480733109257'/><link rel='alternate' type='text/html' href='http://dog-barking.cmchou.net/2011/06/google.html' title='Google搜尋進階用法(1)'/><author><name>C.-M. Chou</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1453680490016993191.post-2536113756030875164</id><published>2011-06-01T02:41:00.000-07:00</published><updated>2011-06-01T02:42:01.677-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Firefox'/><title type='text'>如何在Firefox Nightly 7.0a1使用舊版Add-on?</title><content type='html'>Google查到的，在about:config中新增boolean字串 "extensions.checkCompatibility.nightly"並設定其值為"false"。&lt;br /&gt;&lt;br /&gt;&lt;a href="http://forums.mozillazine.org/viewtopic.php?f=23&amp;amp;t=2209991&amp;amp;p=10850045"&gt;來源文章&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1453680490016993191-2536113756030875164?l=dog-barking.cmchou.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dog-barking.cmchou.net/feeds/2536113756030875164/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dog-barking.cmchou.net/2011/06/firefox-nightly-70a1add-on.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1453680490016993191/posts/default/2536113756030875164'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1453680490016993191/posts/default/2536113756030875164'/><link rel='alternate' type='text/html' href='http://dog-barking.cmchou.net/2011/06/firefox-nightly-70a1add-on.html' title='如何在Firefox Nightly 7.0a1使用舊版Add-on?'/><author><name>C.-M. Chou</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1453680490016993191.post-1422499044657124522</id><published>2011-04-09T09:54:00.000-07:00</published><updated>2011-04-09T09:54:10.138-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Self-reflection'/><title type='text'>2011/4/10今日檢討</title><content type='html'>1. 講話太aggressive，就算我知道很多事情，也沒必要一定要講出來，講出來，讓別人知道懂很多，這樣很重要，很好嗎？&lt;br /&gt;2. 為何會對學弟講錯一個東西，有這樣的對答酸別人呢？嗆很人很爽，但是這樣是我想要的嗎？&lt;br /&gt;&lt;br /&gt;Think before you speak.&lt;br /&gt;自省之。&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1453680490016993191-1422499044657124522?l=dog-barking.cmchou.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dog-barking.cmchou.net/feeds/1422499044657124522/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dog-barking.cmchou.net/2011/04/2011410.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1453680490016993191/posts/default/1422499044657124522'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1453680490016993191/posts/default/1422499044657124522'/><link rel='alternate' type='text/html' href='http://dog-barking.cmchou.net/2011/04/2011410.html' title='2011/4/10今日檢討'/><author><name>C.-M. Chou</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1453680490016993191.post-6440108480509765073</id><published>2011-04-08T06:43:00.000-07:00</published><updated>2011-04-08T06:43:39.793-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Murmur'/><title type='text'>建立一個新的MSN聯絡人分類</title><content type='html'>這個分類就叫做『沒誠意』，&lt;br /&gt;歡迎第一位居民入住，&lt;br /&gt;我不會就這樣block此位聯絡人的，&lt;br /&gt;這樣只會顯得我沒氣度。&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1453680490016993191-6440108480509765073?l=dog-barking.cmchou.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dog-barking.cmchou.net/feeds/6440108480509765073/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dog-barking.cmchou.net/2011/04/msn.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1453680490016993191/posts/default/6440108480509765073'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1453680490016993191/posts/default/6440108480509765073'/><link rel='alternate' type='text/html' href='http://dog-barking.cmchou.net/2011/04/msn.html' title='建立一個新的MSN聯絡人分類'/><author><name>C.-M. Chou</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1453680490016993191.post-4069989264819396669</id><published>2011-04-06T10:04:00.000-07:00</published><updated>2011-04-06T10:04:29.314-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Murmur'/><title type='text'>孤獨</title><content type='html'>原來我只是害怕孤獨，&lt;br /&gt;今後課題， &lt;br /&gt;害怕孤獨，承認孤獨，接受孤獨，習慣孤獨，與孤獨當朋友，&lt;br /&gt;何必為了害怕孤獨，就約沒誠意，不是朋友的朋友呢，&lt;br /&gt;Yes，我就是在說你，Exho，從今天起，我不再把你當朋友了。&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1453680490016993191-4069989264819396669?l=dog-barking.cmchou.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dog-barking.cmchou.net/feeds/4069989264819396669/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dog-barking.cmchou.net/2011/04/blog-post.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1453680490016993191/posts/default/4069989264819396669'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1453680490016993191/posts/default/4069989264819396669'/><link rel='alternate' type='text/html' href='http://dog-barking.cmchou.net/2011/04/blog-post.html' title='孤獨'/><author><name>C.-M. Chou</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
