<?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-15962308</id><updated>2011-04-21T17:57:25.359-07:00</updated><title type='text'>思緒遨遊</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://liveforthinking.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/15962308/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://liveforthinking.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>聆聽自己的聲音</name><uri>http://www.blogger.com/profile/00682162346425916030</uri><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>14</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-15962308.post-1175636474701767742</id><published>2007-05-11T01:48:00.000-07:00</published><updated>2007-05-11T01:49:53.811-07:00</updated><title type='text'></title><content type='html'>將  VC 6 編譯 stl的一堆 warning 消除&lt;br /&gt;加入  #pragma warning(disable:4786) 就可以了&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/15962308-1175636474701767742?l=liveforthinking.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://liveforthinking.blogspot.com/feeds/1175636474701767742/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=15962308&amp;postID=1175636474701767742' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/15962308/posts/default/1175636474701767742'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/15962308/posts/default/1175636474701767742'/><link rel='alternate' type='text/html' href='http://liveforthinking.blogspot.com/2007/05/vc-6-stl-warning-pragma.html' title=''/><author><name>聆聽自己的聲音</name><uri>http://www.blogger.com/profile/00682162346425916030</uri><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-15962308.post-8684147758860306287</id><published>2007-03-27T23:49:00.000-07:00</published><updated>2007-03-27T23:56:32.618-07:00</updated><title type='text'></title><content type='html'>&lt;a href="http://www.custard.org/%7Eandrew/optimize.php"&gt;C++ Optimizations&lt;/a&gt;&lt;br /&gt;&lt;br /&gt; 有些是可以注意一下，不過我不認為那是首要要注意的事情  &lt;br /&gt;&lt;h4&gt;Use Initialization Lists&lt;/h4&gt;&lt;p&gt; Always use initialization lists in constructors. For example, use &lt;/p&gt;&lt;p&gt;&lt;code&gt;&lt;span style="color:blue;"&gt;     TMyClass::TMyClass(const TData &amp;data) : m_Data(data)&lt;br /&gt;    {&lt;br /&gt;    }&lt;br /&gt;&lt;/span&gt;&lt;/code&gt;&lt;/p&gt;&lt;p&gt; rather than &lt;/p&gt;&lt;p&gt;&lt;code&gt;&lt;span style="color:blue;"&gt;     TMyClass::TMyClass(const TData &amp;data)&lt;br /&gt;    {&lt;br /&gt;             m_Data = data;&lt;br /&gt;    }&lt;br /&gt;&lt;/span&gt;&lt;/code&gt;&lt;/p&gt;&lt;p&gt; Without initialization lists, the variable's default constructor is invoked behind-the-scenes prior to the class's constructor, then its assignment operator is invoked. With initialization lists, only the copy constructor is invoked. &lt;/p&gt;&lt;br /&gt;&lt;br /&gt; &lt;table bgcolor="#fcfcdc" width="100%"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;h4&gt;Optimize For Loops&lt;/h4&gt;&lt;p&gt; Wherever possible, count down to zero rather than up to n. For example, use &lt;/p&gt;&lt;p&gt;&lt;code&gt;&lt;span style="color:blue;"&gt;     for (i = n-1; i &gt;= 0; --i)&lt;br /&gt;&lt;/span&gt;&lt;/code&gt;&lt;/p&gt;&lt;p&gt; rather than &lt;/p&gt;&lt;p&gt;&lt;code&gt;&lt;span style="color:blue;"&gt;     for (i = 0; i &lt; n; ++i)&lt;br /&gt;&lt;/span&gt;&lt;/code&gt;&lt;/p&gt;&lt;p&gt; The test is done every iteration and it's faster to test against zero than anything else. Note also that &lt;/p&gt;&lt;p&gt;&lt;code&gt;&lt;span style="color:blue;"&gt;     ++i&lt;br /&gt;&lt;/span&gt;&lt;/code&gt;&lt;/p&gt;&lt;p&gt; is faster than &lt;/p&gt;&lt;p&gt;&lt;code&gt;&lt;span style="color:blue;"&gt;     i++&lt;br /&gt;&lt;/span&gt;&lt;/code&gt;&lt;/p&gt;&lt;p&gt; when it appears in the third part of the for loop statement.  &lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;  &lt;table bgcolor="#fcfcdc" width="100%"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;h4&gt;Use 'int'&lt;/h4&gt;&lt;p&gt; Always use the &lt;code&gt;int&lt;/code&gt; data type instead of &lt;code&gt;char&lt;/code&gt; or &lt;code&gt;short&lt;/code&gt; wherever possible. &lt;code&gt;int&lt;/code&gt; is always the native type for the machine. &lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;    &lt;table bgcolor="#fcfcdc" width="100%"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;h4&gt;Make Local Functions Static&lt;/h4&gt;&lt;p&gt; Always declare local functions as static, e.g.,&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;code&gt;&lt;span style="color:blue;"&gt;     static void foo()&lt;br /&gt;&lt;/span&gt;&lt;/code&gt;&lt;/p&gt;&lt;p&gt; This means they will not be visible to functions outside the &lt;code&gt;.cpp&lt;/code&gt; file, and some C++ compilers can take advantage of this in their optimizations. &lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;   &lt;table bgcolor="#fcfcdc" width="100%"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;h4&gt;Optimize If Statements&lt;/h4&gt;&lt;p&gt; Factor out jumps. For example, use&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;code&gt;&lt;span style="color:blue;"&gt;     bar();&lt;br /&gt;    if (condition)&lt;br /&gt;    {&lt;br /&gt;         undoBar();&lt;br /&gt;         foo();&lt;br /&gt;    }&lt;br /&gt;&lt;/span&gt;&lt;/code&gt;&lt;/p&gt;&lt;p&gt; rather than &lt;/p&gt;&lt;p&gt;&lt;code&gt;&lt;span style="color:blue;"&gt;     if (condition)&lt;br /&gt;    {&lt;br /&gt;         foo();&lt;br /&gt;    }&lt;br /&gt;    else&lt;br /&gt;    {&lt;br /&gt;         bar();&lt;br /&gt;    }&lt;br /&gt;&lt;/span&gt;&lt;/code&gt;&lt;/p&gt;&lt;p&gt; Use a profiler and good judgement to decide if undoing the bar() operation is faster than jumping.  &lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;    &lt;table bgcolor="#fcfcdc" width="100%"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;h4&gt;Optimize Switch Statements&lt;/h4&gt;&lt;p&gt; Put the most common cases first. &lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt; &lt;table bgcolor="#fcfcdc" width="100%"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;h4&gt;Avoid Expensive Operations&lt;/h4&gt;&lt;p&gt; Addition is cheaper than multiplication and multiplication is cheaper than division. Factor out expensive operations wherever possible. &lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;    &lt;table bgcolor="#fcfcdc" width="100%"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;h4&gt;Initialize on Declaration&lt;/h4&gt;&lt;p&gt; Wherever possible, initialize variables at the time they're declared. For example, &lt;/p&gt;&lt;p&gt;&lt;code&gt;&lt;span style="color:blue;"&gt;     TMyClass x = data;&lt;br /&gt;&lt;/span&gt;&lt;/code&gt;&lt;/p&gt;&lt;p&gt; is faster than   &lt;/p&gt;&lt;p&gt;&lt;code&gt;&lt;span style="color:blue;"&gt;     TMyClass x;&lt;br /&gt;    x = data;&lt;br /&gt;&lt;/span&gt;&lt;/code&gt;&lt;/p&gt;&lt;p&gt; Declaration then initialization invokes the object's default constructor then its assignment operator. Initializing in the declaration invokes only its copy constructor. &lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;  &lt;table bgcolor="#fcfcdc" width="100%"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;h4&gt;Pass By Reference&lt;/h4&gt;&lt;p&gt; Always try to pass classes by reference rather than by value. For example, use  &lt;/p&gt;&lt;p&gt;&lt;code&gt;&lt;span style="color:blue;"&gt;     void foo(TMyClass &amp;x)&lt;br /&gt;&lt;/span&gt;&lt;/code&gt;&lt;/p&gt;&lt;p&gt; rather than &lt;/p&gt;&lt;p&gt;&lt;code&gt;&lt;span style="color:blue;"&gt;     void foo(TMyClass x)&lt;br /&gt;&lt;/span&gt;&lt;/code&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;   &lt;table bgcolor="#fcfcdc" width="100%"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;h4&gt;Delay Variable Declarations&lt;/h4&gt;&lt;p&gt; Leave variable declarations right until the point when they're needed. Remember that when a variable is declared its constructor is called. This is wasteful if the variable is not used in the current scope. &lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;    &lt;table bgcolor="#fcfcdc" width="100%"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;h4&gt;Use 'op='&lt;/h4&gt;&lt;p&gt; Wherever possible, use 'op=' in favour of 'op'. For example, use  &lt;/p&gt;&lt;p&gt;&lt;code&gt;&lt;span style="color:blue;"&gt;     x += value;&lt;br /&gt;&lt;/span&gt;&lt;/code&gt;&lt;/p&gt;&lt;p&gt; rather than &lt;/p&gt;&lt;p&gt;&lt;code&gt;&lt;span style="color:blue;"&gt;     x = x + value;&lt;br /&gt;&lt;/span&gt;&lt;/code&gt;&lt;/p&gt;&lt;p&gt; The first version is better than the second because it avoids creating a temporary object.  &lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;  &lt;table bgcolor="#fcfcdc" width="100%"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;h4&gt;Inline Small Functions&lt;/h4&gt;&lt;p&gt; Small, performance critical functions should be inlined using the inline keyword, e.g.,  &lt;/p&gt;&lt;p&gt;&lt;code&gt;&lt;span style="color:blue;"&gt;     inline void foo()&lt;br /&gt;&lt;/span&gt;&lt;/code&gt;&lt;/p&gt;&lt;p&gt; This causes the compiler to duplicate the body of the function in the place it was called from. Inlining large functions can cause cache misses resulting in slower execution times. &lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;    &lt;table bgcolor="#fcfcdc" width="100%"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;h4&gt;Use Nameless Objects&lt;/h4&gt;&lt;p&gt; Wherever possible, use nameless objects. For example,  &lt;/p&gt;&lt;p&gt;&lt;code&gt;&lt;span style="color:blue;"&gt;     foo(TMyClass("abc"));&lt;br /&gt;&lt;/span&gt;&lt;/code&gt;&lt;/p&gt;&lt;p&gt; is faster than &lt;/p&gt;&lt;p&gt;&lt;code&gt;&lt;span style="color:blue;"&gt;     TMyClass x("abc");&lt;br /&gt;    foo(x);&lt;br /&gt;&lt;/span&gt;&lt;/code&gt;&lt;/p&gt;&lt;p&gt; because, in the first case, the parameter and the object share memory.  &lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/15962308-8684147758860306287?l=liveforthinking.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://liveforthinking.blogspot.com/feeds/8684147758860306287/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=15962308&amp;postID=8684147758860306287' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/15962308/posts/default/8684147758860306287'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/15962308/posts/default/8684147758860306287'/><link rel='alternate' type='text/html' href='http://liveforthinking.blogspot.com/2007/03/c-optimizations-use-initialization.html' title=''/><author><name>聆聽自己的聲音</name><uri>http://www.blogger.com/profile/00682162346425916030</uri><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-15962308.post-7301130567415769411</id><published>2007-03-26T20:37:00.000-07:00</published><updated>2007-03-26T20:39:42.516-07:00</updated><title type='text'></title><content type='html'>&lt;span style="color: rgb(102, 102, 102);font-size:100%;" &gt;&lt;span style="font-style: italic;"&gt;windows  &lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;工作列→開始→執行→輸入的指令&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;gpedit.msc-----群組原則&lt;br /&gt;sndrec32-------錄音機&lt;br /&gt;nslookup-------IP位址偵測器&lt;br /&gt;explorer-------開啟檔案總管&lt;br /&gt;logoff---------登出指令&lt;br /&gt;tsshutdn-------60秒倒計時關機指令&lt;br /&gt;lusrmgr.msc----本地機用戶和組&lt;br /&gt;services.msc---本機服務設定&lt;br /&gt;oobe/msoobe /a----檢查XP是否啟動&lt;br /&gt;notepad--------開啟記事本&lt;br /&gt;cleanmgr-------磁碟垃圾整理&lt;br /&gt;net start messenger----開始信使服務&lt;br /&gt;compmgmt.msc---電腦管理&lt;br /&gt;net stop messenger-----停止信使服務&lt;br /&gt;vconf-----------啟動&lt;br /&gt;dvdplay--------DVD播放器&lt;br /&gt;charmap--------啟動字元對應表&lt;br /&gt;Kdiskmgmt.msc---磁牒管理實用程序&lt;br /&gt;calc-----------啟動電子計算器&lt;br /&gt;dfrg.msc-------磁碟重組工具&lt;br /&gt;chkdsk.exe-----Chkdsk磁牒檢查&lt;br /&gt;devmgmt.msc--- 裝置管理員&lt;br /&gt;bFdrwtsn32------ 系統醫生&lt;br /&gt;&lt;br /&gt;srononce -p ----15秒關機&lt;br /&gt;&lt;br /&gt;dxdiag---------檢查DirectX資訊&lt;br /&gt;regedt32-------註冊表編輯器&lt;br /&gt;YMsconfig.exe---系統配置實用程序&lt;br /&gt;rsop.msc-------群組原則結果集&lt;br /&gt;mem.exe--------顯示記憶體使用情況&lt;br /&gt;regedit.exe----註冊表&lt;br /&gt;winchat--------XP自帶區域網路聊天&lt;br /&gt;progman--------程序管理器&lt;br /&gt;winmsd---------系統資訊&lt;br /&gt;perfmon.msc----電腦效能監測程序&lt;br /&gt;winver---------檢查Windows版本&lt;br /&gt;sfc /scannow-----掃瞄錯誤並復原&lt;br /&gt;taskmgr-----工作管理器（2000／xp／2003）&lt;br /&gt;eventvwr.msc------------事件檢視器&lt;br /&gt;secpol.msc----------------本機安全性設定&lt;br /&gt;rsop.msc------------------原則的結果集&lt;br /&gt;ntbackup----------------啟動制作備份還原嚮導&lt;br /&gt;mstsc-----------遠端桌面&lt;br /&gt;winver---------檢查Windows版本&lt;br /&gt;wmimgmt.msc----開啟windows管理體系結構(WMI)&lt;br /&gt;wupdmgr--------windows更新程序&lt;br /&gt;wscript--------windows指令碼宿主設定&lt;br /&gt;write----------寫字板&lt;br /&gt;winmsd---------系統資訊&lt;br /&gt;wiaacmgr-------掃瞄儀和照相機嚮導&lt;br /&gt;winchat--------XP原有的區域網路聊天&lt;br /&gt;mem.exe--------顯示記憶體使用情況&lt;br /&gt;sconfig.exe---系統配置實用程序&lt;br /&gt;mplayer2-------簡易widnows media player&lt;br /&gt;mspaint--------畫圖板&lt;br /&gt;mstsc----------遠端桌面連接&lt;br /&gt;mplayer2-------媒體播放機&lt;br /&gt;magnify--------放大鏡實用程序&lt;br /&gt;mmc------------開啟控制台&lt;br /&gt;mobsync--------同步指令&lt;br /&gt;dxdiag---------檢查DirectX資訊&lt;br /&gt;drwtsn32------ 系統醫生&lt;br /&gt;devmgmt.msc--- 裝置管理員&lt;br /&gt;dfrg.msc-------磁碟重組程式&lt;br /&gt;diskmgmt.msc---磁牒管理實用程序&lt;br /&gt;dcomcnfg-------開啟系統元件服務&lt;br /&gt;ddeshare-------開啟DDE共享設定&lt;br /&gt;dvdplay--------DVD播放器&lt;br /&gt;net stop messenger-----停止信使服務&lt;br /&gt;net start messenger----開始信使服務&lt;br /&gt;notepad--------開啟記事本&lt;br /&gt;nslookup-------網路管理的工具嚮導&lt;br /&gt;ntbackup-------系統制作備份和還原&lt;br /&gt;narrator-------螢幕「講述人」&lt;br /&gt;ntmsmgr.msc----移動存儲管理器&lt;br /&gt;ntmsoprq.msc---移動存儲管理員操作請求&lt;br /&gt;netstat -an----(TC)指令檢查連接&lt;br /&gt;Usyncapp--------新增一個公文包&lt;br /&gt;sysedit--------系統配置編輯器&lt;br /&gt;sigverif-------文件簽名驗證程序&lt;br /&gt;psndrec32-------錄音機&lt;br /&gt;shrpubw--------新增共用資料夾&lt;br /&gt;secpol.msc-----本機安全原則&lt;br /&gt;syskey---------系統加密，一旦加密就不能解開，保護windows xp系統的雙重密碼&lt;br /&gt;services.msc---本機服務設定&lt;br /&gt;Sndvol32-------音量控制程序&lt;br /&gt;sfc.exe--------系統檔案檢查器&lt;br /&gt;sfc /scannow---windows文件保護&lt;br /&gt;tsshutdn-------60秒倒計時關機指令&lt;br /&gt;tourstart------xp簡介&lt;br /&gt;taskmgr--------工作管理器&lt;br /&gt;eventvwr-------事件檢視器&lt;br /&gt;eudcedit-------造字程序&lt;br /&gt;explorer-------開啟檔案總管&lt;br /&gt;lpackager-------對像包裝程序&lt;br /&gt;perfmon.msc----電腦效能監測程序&lt;br /&gt;progman--------程序管理器&lt;br /&gt;regedit.exe----註冊表&lt;br /&gt;rsop.msc-------群組原則結果集&lt;br /&gt;rononce -p ----15秒關機&lt;br /&gt;regsvr32 /u *.dll----停止dll文件執行&lt;br /&gt;regsvr32 /u zipfldr.dll------取消ZIP支持&lt;br /&gt;cmd.exe--------CMD命令提示字元&lt;br /&gt;chkdsk.exe-----Chkdsk磁牒檢查&lt;br /&gt;A2V9]&lt;/span&gt;certmgr.msc----證書管理實用程序&lt;br /&gt;calc-----------啟動計算器&lt;br /&gt;charmap--------啟動字元對應表&lt;br /&gt;cliconfg-------SQL SERVER 客戶端網路實用程序&lt;br /&gt;Clipbrd--------剪貼板檢視器&lt;br /&gt;conf-----------啟動netmeeting&lt;br /&gt;compmgmt.msc---電腦管理&lt;br /&gt;ciadv.msc------索引服務程序&lt;br /&gt;osk------------開啟螢幕小鍵盤&lt;br /&gt;odbcad32-------ODBC資料來源管理器&lt;br /&gt;oobe/msoobe /a----檢查XP是否啟動&lt;br /&gt;lusrmgr.msc----本地機用戶和組&lt;br /&gt;iexpress-------木馬元件服務工具，系統原有的&lt;br /&gt;fsmgmt.msc-----共用資料夾管理器&lt;br /&gt;utilman--------協助工具管理器&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/15962308-7301130567415769411?l=liveforthinking.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://liveforthinking.blogspot.com/feeds/7301130567415769411/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=15962308&amp;postID=7301130567415769411' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/15962308/posts/default/7301130567415769411'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/15962308/posts/default/7301130567415769411'/><link rel='alternate' type='text/html' href='http://liveforthinking.blogspot.com/2007/03/gpedit.html' title=''/><author><name>聆聽自己的聲音</name><uri>http://www.blogger.com/profile/00682162346425916030</uri><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-15962308.post-7112204974917724449</id><published>2007-03-20T19:33:00.001-07:00</published><updated>2007-03-20T19:33:51.981-07:00</updated><title type='text'></title><content type='html'>&lt;h2&gt;    &lt;a id="viewpost1_TitleUrl" href="http://www.cppblog.com/wlwlxj/archive/2006/09/11/12303.html"&gt;使用UNICODE提高效率&lt;/a&gt;   &lt;/h2&gt;   文字處理軟件應該是軟件開發中的一大支柱，而任何軟件中字符串的處理更不可或缺。這裡主要借鑑windows核心編程談談使用UNICODE的好處。&lt;br /&gt;&lt;br /&gt;既 然是基於windows編程，就得看看windows平台本身對字符的處理方式。由於ANSI字符採用8位進行編碼，對於西歐ABC之類足夠，然而對於中 東的字符不實用（考慮下我們中國的漢字），所以就出現了UNICODE。window98是基於ANSI的平台，windows2000是基於 UNICODE開發的平台，因此可以知道在調用Windows API的時候，假如我們在98系統上傳遞UNICODE字符，那麼系統在背後會先把字符轉化為ANSI字符然後調用API；相反，我們在2000系統上傳 遞ANSI字符，那麼會先轉化為UNICODE字符。&lt;br /&gt;&lt;br /&gt;去年看過（準確說是翻了一下，沒時間看）一本書《C/C++-編程高手箴言》(梁肇 新 超級解霸作者)，他裡面有一部分是談到使CPU降溫，很好奇翻了一下，主要講如何使CPU少轉幾圈。我的感想是，要想成為一名優秀的軟件開發人員，必須 make good use of (有時漢語無法表達這麼好) CPU和RAM，儘量少浪費時鐘和內存塊，當然也需要充分利用否則也是浪費，其中把握的是一個度，扯遠了，回來繼續談UNICODE。&lt;br /&gt;&lt;br /&gt;先看看使用UNICODE的好處(書上的)：&lt;br /&gt;1、可以很容易地在不同語言之間進行數據交換。&lt;br /&gt;2、使你能夠分配支持所有語言的單個二進制。exe文件或DLL文件。&lt;br /&gt;3、提高應用程序的運行效率。&lt;br /&gt;&lt;br /&gt;如何基於UNICODE編譯：&lt;br /&gt;只需定義宏_UNICODE或者UNICODE (VC 2005默認採用Unicode編譯)&lt;br /&gt;&lt;br /&gt;Windows宏定義處理支持ANSI和UNICODE編譯&lt;br /&gt;大學C、C++語言中我們學習字符表示是char，由於書中講解全部一個模式，而開發類書籍很少講解ANSI、UNICODE字符串區別，使得很少有人關注。在進行函數調用的時候，很少去關注接口處字符串處理，可能無意中你就使CPU多轉幾圈。&lt;br /&gt;ANSI字符表示是char，佔8位；UNICODE字符表示是wchar_t，佔16位。Windows編程用宏對這兩種類型進行了封裝：&lt;br /&gt;&lt;div style="border: 1px solid rgb(204, 204, 204); padding: 4px 5px 4px 4px; font-size: 13px; width: 98%; background-color: rgb(238, 238, 238);"&gt;&lt;img src="http://www.cppblog.com/Images/OutliningIndicators/None.gif" align="top" /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;typedef &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;char&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; CHAR;&lt;br /&gt;&lt;img src="http://www.cppblog.com/Images/OutliningIndicators/None.gif" align="top" /&gt;typedef wchar_t WCHAR;&lt;/span&gt;&lt;/div&gt;表示這兩種字符串數據：&lt;br /&gt;&lt;div style="border: 1px solid rgb(204, 204, 204); padding: 4px 5px 4px 4px; font-size: 13px; width: 98%; background-color: rgb(238, 238, 238);"&gt;&lt;img src="http://www.cppblog.com/Images/OutliningIndicators/None.gif" align="top" /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;CHAR    chANSI[]    &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;hello&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;br /&gt;&lt;img src="http://www.cppblog.com/Images/OutliningIndicators/None.gif" align="top" /&gt;WCHAR    chUnicode[]    &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; L&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;hello&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;/span&gt;&lt;/div&gt;同樣表示字符串卻要使用兩種表示方法，Windows為我們定義了一套宏用來處理這些問題，例如用TCHAR宏表示字符，用_T()宏來表示字符常量類型，它根據編譯字符集選項來確定具體類型。同樣定義了字符處理函數宏，具體參看msdn。&lt;br /&gt;&lt;br /&gt;下面基於提高應用程序的運行效率來探討，純理論分析：&lt;br /&gt;&lt;div style="border: 1px solid rgb(204, 204, 204); padding: 4px 5px 4px 4px; font-size: 13px; width: 98%; background-color: rgb(238, 238, 238);"&gt;&lt;img src="http://www.cppblog.com/Images/OutliningIndicators/None.gif" align="top" /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;CHAR    chANSI[&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;100&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;];&lt;br /&gt;&lt;img src="http://www.cppblog.com/Images/OutliningIndicators/None.gif" align="top" /&gt;WCHAR    chUnicode[&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;100&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;];&lt;br /&gt;&lt;img src="http://www.cppblog.com/Images/OutliningIndicators/None.gif" align="top" /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;//&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt; Normal sprintf: all string are ANSI&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;&lt;br /&gt;&lt;img src="http://www.cppblog.com/Images/OutliningIndicators/None.gif" align="top" /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;sprintf(chANSI, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;%s&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;ANSI Str&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;);&lt;br /&gt;&lt;img src="http://www.cppblog.com/Images/OutliningIndicators/None.gif" align="top" /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;//&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt; Converts Unicode string to ANSI (Be careful %s and %S)&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;&lt;br /&gt;&lt;img src="http://www.cppblog.com/Images/OutliningIndicators/None.gif" align="top" /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;sprintf(chANSI, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;%S&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;, L&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Unicode Str&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;);&lt;br /&gt;&lt;img src="http://www.cppblog.com/Images/OutliningIndicators/None.gif" align="top" /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;//&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt; Normal swprintf: all string are Unicode&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;&lt;br /&gt;&lt;img src="http://www.cppblog.com/Images/OutliningIndicators/None.gif" align="top" /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;swprintf(chUnicode, L&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;%s&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;, L&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Unicode Str&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;);&lt;br /&gt;&lt;img src="http://www.cppblog.com/Images/OutliningIndicators/None.gif" align="top" /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;//&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt; Converts ANSI  string to Unicode (Be careful %s and %S)&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;&lt;br /&gt;&lt;img src="http://www.cppblog.com/Images/OutliningIndicators/None.gif" align="top" /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;swprintf(chUnicode, L&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;%S&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;ANSI Str&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;);&lt;/span&gt;&lt;/div&gt;從 上面可以看出，簡單的一個打印函數都可能導致CPU多花時鐘來進行函數調用前處理，所以編程時一定要養成好習慣，隨手做到可能使你的代碼與眾不同。由於我 們目前的系統大多是Windows 2000以上版本，採用Uincode字符集，在API調用的時候接口字符都是Unicode的，所以最好採用Unicode字符風格進行編碼，這樣可以 減少調用時轉換開銷。&lt;br /&gt;&lt;br /&gt;應該注意的問題：&lt;br /&gt;假設定義一個字符數組TCHAR szName[100]，當基於Unicode編譯的時候，它實際佔用200字節，假設有一個給字符賦值函數：&lt;br /&gt;&lt;div style="border: 1px solid rgb(204, 204, 204); padding: 4px 5px 4px 4px; font-size: 13px; width: 98%; background-color: rgb(238, 238, 238);"&gt;&lt;img src="http://www.cppblog.com/Images/OutliningIndicators/None.gif" align="top" /&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;void&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; SetName(TCHAR&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;*&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; pName, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;int&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; iSize)&lt;/span&gt;&lt;/div&gt;調用該函數：&lt;br /&gt;&lt;div style="border: 1px solid rgb(204, 204, 204); padding: 4px 5px 4px 4px; font-size: 13px; width: 98%; background-color: rgb(238, 238, 238);"&gt;&lt;img src="http://www.cppblog.com/Images/OutliningIndicators/None.gif" align="top" /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;SetName(szName, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;sizeof&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(szName))&lt;/span&gt;&lt;/div&gt;這樣就可能產生錯誤，sizeof求出的是數組所佔字節數目，而不是字符個數，字符個數應該是sizeof(szName)/sizeof(TCHAR)。所以編程的時候腦袋一定要繃緊一根弦，提防類似錯誤。&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/15962308-7112204974917724449?l=liveforthinking.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://liveforthinking.blogspot.com/feeds/7112204974917724449/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=15962308&amp;postID=7112204974917724449' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/15962308/posts/default/7112204974917724449'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/15962308/posts/default/7112204974917724449'/><link rel='alternate' type='text/html' href='http://liveforthinking.blogspot.com/2007/03/unicode-windowsunicode.html' title=''/><author><name>聆聽自己的聲音</name><uri>http://www.blogger.com/profile/00682162346425916030</uri><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-15962308.post-116297674646617782</id><published>2006-11-08T00:51:00.000-08:00</published><updated>2006-11-08T01:18:07.840-08:00</updated><title type='text'></title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/2996/1497/1600/%3F%3F%3F%3F%3F%3F%3F%3F%3Ffirefox%20extension.3.jpg"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://photos1.blogger.com/blogger/2996/1497/320/%3F%3F%3F%3F%3F%3F%3F%3F%3Ffirefox%20extension.3.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;好用的 Tab Catalog&lt;br /&gt;按一個鍵就讓你的電腦擁有像是mac的錯覺&lt;br /&gt;頗適合大螢幕的電腦&lt;br /&gt;&lt;br /&gt;&lt;a href="https://addons.mozilla.org/firefox/1937/"&gt;去這網站下載&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;firefox真是好物&lt;br /&gt;有很多有趣實用的extension可用&lt;br /&gt;而且光是不會像IE被綁架 就省去我許多的麻煩&lt;br /&gt;好幾個同事已經在我的影響下  轉投firefox的陣營了&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/15962308-116297674646617782?l=liveforthinking.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://liveforthinking.blogspot.com/feeds/116297674646617782/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=15962308&amp;postID=116297674646617782' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/15962308/posts/default/116297674646617782'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/15962308/posts/default/116297674646617782'/><link rel='alternate' type='text/html' href='http://liveforthinking.blogspot.com/2006/11/tab-catalog-mac-firefox-extension-ie.html' title=''/><author><name>聆聽自己的聲音</name><uri>http://www.blogger.com/profile/00682162346425916030</uri><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-15962308.post-116297213775027825</id><published>2006-11-07T23:41:00.000-08:00</published><updated>2006-11-07T23:48:57.750-08:00</updated><title type='text'></title><content type='html'>&lt;太多&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;需要音樂取暖&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;喜歡一個喝著紅酒的女孩&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;凝結照片的傷口&lt;br /&gt;我喜歡一個陽光照射的角落&lt;br /&gt;但不能喜歡太多&lt;br /&gt;喜歡一個人孤獨的時刻&lt;br /&gt;但不能喜歡&lt;br /&gt;太多&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/15962308-116297213775027825?l=liveforthinking.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://liveforthinking.blogspot.com/feeds/116297213775027825/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=15962308&amp;postID=116297213775027825' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/15962308/posts/default/116297213775027825'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/15962308/posts/default/116297213775027825'/><link rel='alternate' type='text/html' href='http://liveforthinking.blogspot.com/2006/11/blog-post_07.html' title=''/><author><name>聆聽自己的聲音</name><uri>http://www.blogger.com/profile/00682162346425916030</uri><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-15962308.post-116297153916894044</id><published>2006-11-07T23:33:00.000-08:00</published><updated>2006-11-07T23:39:14.106-08:00</updated><title type='text'></title><content type='html'>&lt;span style="font-weight: bold;font-family:verdana;" &gt;旅行的意義 &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(102, 0, 0);font-family:georgia;" &gt;  你看過了許多美景 你看過了許多美女 &lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(102, 0, 0);font-family:georgia;" &gt;  你迷失在地圖上　每一道短暫的光陰 &lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(102, 0, 0);font-family:georgia;" &gt;  你品嚐了夜的巴黎 你踏過下雪的北京 &lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(102, 0, 0);font-family:georgia;" &gt;  你熟記書本裡　每一句你最愛的真理 &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(102, 0, 0);font-family:georgia;" &gt;  卻說不出你愛我的原因 卻說不出你欣賞我哪一種表情 &lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(102, 0, 0);font-family:georgia;" &gt;  卻說不出在什麼場合我曾讓你動心  &lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(102, 0, 0);font-family:georgia;" &gt;  說不出離開的原因 &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(102, 0, 0);font-family:georgia;" &gt;  你累計了許多飛行 你用心挑選紀念品 &lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(102, 0, 0);font-family:georgia;" &gt;  你蒐集了地圖上　每一次的風和日麗 &lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(102, 0, 0);font-family:georgia;" &gt;  你擁抱熱情的島嶼 你埋葬記憶的土耳其 &lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(102, 0, 0);font-family:georgia;" &gt;  你流連電影里美麗的不真實的場景 &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(102, 0, 0);font-family:georgia;" &gt;  卻說不出你愛我的原因 卻說不出你欣賞我哪一種表情 &lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(102, 0, 0);font-family:georgia;" &gt;  卻說不出在什麼場合我曾讓你分心  &lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(102, 0, 0);font-family:georgia;" &gt;  說不出旅行的意義 &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(102, 0, 0);font-family:georgia;" &gt;  勉強說出你為我寄出的每一封信 都是你離開的原因　　 &lt;/span&gt;&lt;br /&gt; &lt;br /&gt;&lt;span style="font-style: italic; color: rgb(102, 0, 0);font-family:georgia;" &gt;  你離開我 &lt;/span&gt;&lt;br /&gt; &lt;br /&gt;&lt;span style="font-weight: bold;"&gt;  就是旅行的意義  &lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/15962308-116297153916894044?l=liveforthinking.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://liveforthinking.blogspot.com/feeds/116297153916894044/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=15962308&amp;postID=116297153916894044' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/15962308/posts/default/116297153916894044'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/15962308/posts/default/116297153916894044'/><link rel='alternate' type='text/html' href='http://liveforthinking.blogspot.com/2006/11/blog-post.html' title=''/><author><name>聆聽自己的聲音</name><uri>http://www.blogger.com/profile/00682162346425916030</uri><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-15962308.post-116055268658120013</id><published>2006-10-11T00:43:00.000-07:00</published><updated>2006-10-11T05:46:31.556-07:00</updated><title type='text'></title><content type='html'>又聽到朋友分手的消息了  秋天真是分手的季節..   在一起六年的感情阿&lt;br /&gt;看來是因為工作太認真而忽略了她  他說他們約會去咖啡廳時 他常常拿出書來研讀  追求自己的成長卓越  最後還跟我說當初她是如何愛他阿&lt;br /&gt;不過 女生一句話 "感覺變了"  就打死一個人囉&lt;br /&gt;所以在科技業的男士們  別讓自己成為好人了&lt;br /&gt;多認識一些女孩吧  &lt;img src="http://tw.yimg.com/i/tw/match/messenger_i15.gif" /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/15962308-116055268658120013?l=liveforthinking.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://liveforthinking.blogspot.com/feeds/116055268658120013/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=15962308&amp;postID=116055268658120013' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/15962308/posts/default/116055268658120013'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/15962308/posts/default/116055268658120013'/><link rel='alternate' type='text/html' href='http://liveforthinking.blogspot.com/2006/10/blog-post_11.html' title=''/><author><name>聆聽自己的聲音</name><uri>http://www.blogger.com/profile/00682162346425916030</uri><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>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-15962308.post-115993433728126457</id><published>2006-10-03T19:46:00.000-07:00</published><updated>2006-10-03T20:58:57.316-07:00</updated><title type='text'></title><content type='html'>Plans .. plans  &lt;br /&gt;I think  i should have some plans about writting and research in some open source framework,may be gtk,gtk+,&lt;br /&gt;or qt , wxwidgets.  Spend too much time in my job , but still get no stock.  And  mfc can run only  on windows ,&lt;br /&gt;although its performance  is good and can work well.&lt;br /&gt;So plans this year  in looking at some project's source code  , focus on some app,just like pcman .Of course , my program of job still have many issue to improve . Focus on writting my own libs is important ,and one of my plans too.Buy a camera ,and make more friends in my life is long term plan.So , now let me start it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/15962308-115993433728126457?l=liveforthinking.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://liveforthinking.blogspot.com/feeds/115993433728126457/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=15962308&amp;postID=115993433728126457' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/15962308/posts/default/115993433728126457'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/15962308/posts/default/115993433728126457'/><link rel='alternate' type='text/html' href='http://liveforthinking.blogspot.com/2006/10/plans.html' title=''/><author><name>聆聽自己的聲音</name><uri>http://www.blogger.com/profile/00682162346425916030</uri><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>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-15962308.post-112720156478132701</id><published>2005-09-20T00:31:00.000-07:00</published><updated>2005-09-20T00:32:44.786-07:00</updated><title type='text'></title><content type='html'>關於BCB 看到的一些文章：&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;span style="font-family:Verdana, Arial, Helvetica;font-size:85%;color:midnightblue;"&gt;&lt;span id="quote"   style="font-family:Verdana, Arial, Helvetica;font-size:85%;"&gt;我在bcb 5 時compiler 時出現link error&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="font-family:Verdana, Arial, Helvetica;font-size:85%;color:midnightblue;"&gt;&lt;span id="quote"   style="font-family:Verdana, Arial, Helvetica;font-size:85%;"&gt;Unable to open file 'dclusr50.lib'&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="font-family:Verdana, Arial, Helvetica;font-size:85%;color:midnightblue;"&gt;&lt;span id="quote"   style="font-family:Verdana, Arial, Helvetica;font-size:85%;"&gt;要如何解決了,謝謝大家&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;hr height="1" id="quote" noshade="noshade"&gt;這種錯誤訊息通常會發生在兩種情況&lt;img src="http://delphi.ktop.com.tw/icon_smile_shy.gif" align="middle" border="0" /&gt;&lt;br /&gt;&lt;p&gt;&lt;span style="font-family:Verdana, Arial, Helvetica;font-size:85%;color:midnightblue;"&gt;&lt;span id="quote"   style="font-family:Verdana, Arial, Helvetica;font-size:85%;"&gt;第一種: 你的 bcb IDE 環境中並沒有開發自己的元件，而你要 compiler 的&lt;br /&gt;project 是從別處取得，而這個 project 的原始做者的 bcb IDE 環境中有&lt;br /&gt;開發自己的元件，而且已經安裝的話，在原始的 project file (*.bpr)裡面&lt;br /&gt;就會記錄要 link 的 lib，但是你的 bcb IDE 環境裡面沒有，就會造成這個&lt;br /&gt;錯誤訊息，請試試以下的做法解決&lt;br /&gt;(1)用 UltraEdit 把你的 *.bpr 打開&lt;br /&gt;(2)搜尋關鍵字「dclusr50」--&gt;找到刪掉&lt;br /&gt;(3)重新 compiler&lt;br /&gt;第二種: 你原本的 bcb IDE 環境中已經有自己開發的元件，而且也已經安裝&lt;br /&gt;完成，或許因為某種原因，造成你的系統重灌，也重灌 bcb，如果再載入之前&lt;br /&gt;的 project 的話，也會引發這個問題，基本上的解決方式跟上面的原理一樣&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="font-family:Verdana, Arial, Helvetica;font-size:85%;color:midnightblue;"&gt;&lt;span id="quote"   style="font-family:Verdana, Arial, Helvetica;font-size:85%;"&gt;備註:&lt;br /&gt;(1)在做以上動作的時候最好先把你的 project 備份&lt;img src="http://delphi.ktop.com.tw/icon_smile_cool.gif" align="middle" border="0" /&gt;&lt;br /&gt;(2)如果這個 project 有使用到 dclusr50 中的元件的話，那麼以上的方式是&lt;br /&gt;不適用的，必須先想辦法取得原本的 dclusr50 然後安裝至你的 bcb IDE 中&lt;br /&gt;(3)&lt;span style="color:red;"&gt;若有問題請再提出&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/15962308-112720156478132701?l=liveforthinking.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://liveforthinking.blogspot.com/feeds/112720156478132701/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=15962308&amp;postID=112720156478132701' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/15962308/posts/default/112720156478132701'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/15962308/posts/default/112720156478132701'/><link rel='alternate' type='text/html' href='http://liveforthinking.blogspot.com/2005/09/bcb-bcb-5-compiler-link-error-unable.html' title=''/><author><name>聆聽自己的聲音</name><uri>http://www.blogger.com/profile/00682162346425916030</uri><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>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-15962308.post-112719186404191867</id><published>2005-09-19T17:58:00.000-07:00</published><updated>2005-09-19T21:51:04.100-07:00</updated><title type='text'></title><content type='html'>這幾天，開始發現肚子上的肥肉已經到了  沒吃飯也會稍微隆起的地步，這樣對於酷酷的我真的是太殘忍了，由於整天坐在電腦前面，我決定要開始減肥。&lt;br /&gt;至於減肥的方法---&lt;br /&gt;       &lt;br /&gt;                1.不要在喝啤酒，要記得推掉同事的邀請。&lt;br /&gt;             2.要有豐富的早餐，原本是要把早餐省略，後來發現似乎關於減肥的建議都要有豐富的早                    餐，大 概跟健康有關，也跟一天的精神有關吧。&lt;br /&gt;              3.中餐改吃蔬果類食物，以水果當正餐。&lt;br /&gt;                4.要有大量的運動，以跑步優先  ，也要做腹部運動，仰臥起坐跟抬腿。&lt;br /&gt;                5.多喝水，與青草茶&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;  目前想到  就是這些樣子，等會想到什麼再加入好了&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/15962308-112719186404191867?l=liveforthinking.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://liveforthinking.blogspot.com/feeds/112719186404191867/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=15962308&amp;postID=112719186404191867' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/15962308/posts/default/112719186404191867'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/15962308/posts/default/112719186404191867'/><link rel='alternate' type='text/html' href='http://liveforthinking.blogspot.com/2005/09/1.html' title=''/><author><name>聆聽自己的聲音</name><uri>http://www.blogger.com/profile/00682162346425916030</uri><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-15962308.post-112685527399094257</id><published>2005-09-15T23:56:00.000-07:00</published><updated>2005-09-16T00:34:41.470-07:00</updated><title type='text'></title><content type='html'>&lt;span style="font-size:85%;"&gt;離開求學時期 ，已經一陣子了  ，相對於前幾個禮拜的忙碌 ，這幾天的產值似乎代表我的倦怠&lt;br /&gt;抑或是努力不夠， 一直在工作上有些幻想，幻想著自己能夠在程式上，達到國外工程師該有的水準，&lt;br /&gt;看著手上或是電腦上的 source code ，理論；與一些design pattern的書 ，感嘆時間的短少，&lt;br /&gt;與公司環境的制度，我想該是訂定唸書的行程表了。&lt;br /&gt;&lt;br /&gt;從 成大離開，北上工作，到又回到奇美做vendor 商，台南的改變似乎難以筆墨形容，&lt;br /&gt;也許是我許久未執筆的手，寫不出什麼東西，只知道回去那mobile 成立總部的所在地&lt;br /&gt;--長榮路上，除了mobile的成立，也有許多商家的起起落落，該要買個相機，&lt;br /&gt;記錄生活的變動，也趁我還出差在台南的時候。&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/15962308-112685527399094257?l=liveforthinking.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://liveforthinking.blogspot.com/feeds/112685527399094257/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=15962308&amp;postID=112685527399094257' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/15962308/posts/default/112685527399094257'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/15962308/posts/default/112685527399094257'/><link rel='alternate' type='text/html' href='http://liveforthinking.blogspot.com/2005/09/source-code-design-pattern-vendor.html' title=''/><author><name>聆聽自己的聲音</name><uri>http://www.blogger.com/profile/00682162346425916030</uri><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-15962308.post-112541897410922520</id><published>2005-08-30T08:04:00.000-07:00</published><updated>2005-08-30T09:22:54.976-07:00</updated><title type='text'></title><content type='html'>Map rule&lt;br /&gt;&lt;br /&gt;  determine 最適合的map&lt;br /&gt;&lt;ol&gt;   &lt;li&gt;&lt;span style="font-size:85%;"&gt;   最少  (fail panel 數量百分比)  為最適合&lt;/span&gt;&lt;/li&gt;   &lt;li&gt;&lt;span style="font-size:85%;"&gt;   panel  總數量最多的         為最適合&lt;/span&gt;&lt;/li&gt;   &lt;li&gt;&lt;span style="font-size:85%;"&gt;  large  size (即 panel 面積最大的) 為最適合&lt;/span&gt;&lt;br /&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/15962308-112541897410922520?l=liveforthinking.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://liveforthinking.blogspot.com/feeds/112541897410922520/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=15962308&amp;postID=112541897410922520' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/15962308/posts/default/112541897410922520'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/15962308/posts/default/112541897410922520'/><link rel='alternate' type='text/html' href='http://liveforthinking.blogspot.com/2005/08/map-rule-determine-map-fail-panel.html' title=''/><author><name>聆聽自己的聲音</name><uri>http://www.blogger.com/profile/00682162346425916030</uri><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>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-15962308.post-112541299230207091</id><published>2005-08-30T07:41:00.000-07:00</published><updated>2005-08-30T08:03:13.646-07:00</updated><title type='text'></title><content type='html'>&lt;span style="font-weight: bold;"&gt;About File Find  in win32    (iterator)&lt;br /&gt;Introduction&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;Several times I worked with file names, I usually used Win32 API&lt;br /&gt;such as ::FindFirstFile.. But it turns out that it's so boring work.&lt;br /&gt;Finally, I realized I can use STL's great feature, iterator, to handle&lt;br /&gt;file name iteration. That's why I made a simple STL iterator class for&lt;br /&gt;file name iteration.&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Usage&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;win32_file_iterator itBegin("c:\\*.*"), itEnd;&lt;br /&gt;std::copy(itBegin, itEnd, ostream_iterator&lt;std::string&gt;(cout, "\n"));&lt;br /&gt;The code above shows the simplest way to use the class. Actually, you&lt;br /&gt;can use almost all of STL algorithm, I think..&lt;br /&gt;win32_file_iterator itBegin("c:\\*.*"), itEnd;&lt;br /&gt;std::vector&lt;std::string&gt; vec(itBegin, itEnd);&lt;br /&gt;You also can fill the STL container by using the constructor that takes&lt;br /&gt;begin iterator and end iterator.&lt;br /&gt;Actually, win32_file_iterator class' constructor takes three parameters.&lt;br /&gt;The first one is the filter string that is for calling ::FindFirstFile&lt;br /&gt;function. Second one is the flag that specifies whether dereferenced path&lt;br /&gt;is full path or not. For example, if it's true, the returned path string&lt;br /&gt;is c:\test\aa.txt,otherwise it'll be aa.txt only. The last parameter is&lt;br /&gt;the other flags which specify file attribute. For simplicity, I used Win32&lt;br /&gt;API's FILE_ATTRIBUTE_XXX flags..&lt;br /&gt;If you want to get only directory names, and which is full path, the code&lt;br /&gt;will look like this:&lt;br /&gt;win32_file_iterator itBegin("c:\\*", true, FILE_ATTRIBUTE_DIRECTORY);&lt;br /&gt;So easy, huh?&lt;/std::string&gt;&lt;/std::string&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/15962308-112541299230207091?l=liveforthinking.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://liveforthinking.blogspot.com/feeds/112541299230207091/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=15962308&amp;postID=112541299230207091' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/15962308/posts/default/112541299230207091'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/15962308/posts/default/112541299230207091'/><link rel='alternate' type='text/html' href='http://liveforthinking.blogspot.com/2005/08/about-file-find-in-win32-iterator.html' title=''/><author><name>聆聽自己的聲音</name><uri>http://www.blogger.com/profile/00682162346425916030</uri><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>
