<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-4406536207427936366</id><updated>2024-10-07T12:27:31.171+08:00</updated><category term="oracle"/><category term="slide share"/><category term="temp"/><category term="interview"/><category term="windows"/><category term="PowerBuilder"/><category term="SQL"/><category term="SharePoint"/><category term="c# 3.0"/><category term="linux"/><category term="ora-xxxxx"/><category term="sql developer"/><category term=".net"/><category term="SQLSvr"/><category term="chrome"/><category term="flash"/><category term="ruby"/><category term="ubuntu"/><category term="actionScript"/><category term="cmd"/><category term="crystal report"/><category term="es"/><category term="freebsd"/><category term="java"/><category term="letra"/><category term="mail"/><category term="reporting service"/><category term="space mgmt"/><category term="win7"/><category term="CULV"/><category term="DataWindow.net"/><category term="HINT"/><category term="IE8"/><category term="INDEX"/><category term="JOIN"/><category term="Linq"/><category term="M$"/><category term="RTI"/><category term="SSL"/><category term="TLS"/><category term="UAC"/><category term="android"/><category term="certreq"/><category term="cyanogenMod"/><category term="encodings"/><category term="mobile"/><category term="office"/><category term="parser"/><category term="rails"/><category term="sybase"/><category term="tag cloud"/><category term="unicode"/><category term="vista"/><category term="vmware"/><category term="wildfire"/><category term="wss"/><title type='text'>ＰrｉNｃＩpｉAｎtｅ</title><subtitle type='html'>姜太太釣魚</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://qwinn-aileen.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4406536207427936366/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://qwinn-aileen.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/4406536207427936366/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>AileenWu</name><uri>http://www.blogger.com/profile/16167996176008066590</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='25' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjaG4pCwbsyiCMfUkqNEW5KIV6QaKq1kpRGuVwFuqO_H8CiwmSZzZfofD0VBV7KZQUkqwbh5YMGDQORK2xZoW8tiyRCmLkM9OkJpGHjOUj32k27H3QiQPxwqx7uH4KxPAw/s220/吾唯知足.png'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>111</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-4406536207427936366.post-2271828504841966677</id><published>2013-01-05T07:59:00.000+08:00</published><updated>2013-01-05T07:59:29.238+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="win7"/><title type='text'>Keep Wifi Connection When Close Laptop Lid</title><content type='html'>System: Window 7 (64-bit)&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;Control Panel &amp;gt; All Control Panel Items &amp;gt; Power Options &amp;gt; Edit Plan Settings(Choose when to turn off the display)&lt;br /&gt;change the &#39;Put the computer to sleep&#39; setting to a longer time or Never.&lt;/li&gt;
&lt;li&gt;Control Panel &amp;gt; All Control Panel Items &amp;gt; Network and Sharing Center &amp;gt; (Change adapter settings)&lt;br /&gt;2.1 right click on &#39;Wireless Network Connection&#39; then &#39;Properties&#39;&lt;br /&gt;2.2 Configure...&lt;br /&gt;2.3 switch to &#39;Power Management&#39; page, uncheck &#39;Allow the computer to turn off this device to save power&#39; option, OK&lt;br /&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh2TWvK6eFHZ-DwnMzBVPpxXOi8sbTiPow2NJJyUNKr0oSlvm21pm-ABeJZjUaU12pUTxvXClKGH-azNtaioOXR6brBzm-dHyXnYPCImpNv2Fw2Rc6gJDy19T3ZvThZtMWhEJa5UfhfGc4/s1600/20130105000.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh2TWvK6eFHZ-DwnMzBVPpxXOi8sbTiPow2NJJyUNKr0oSlvm21pm-ABeJZjUaU12pUTxvXClKGH-azNtaioOXR6brBzm-dHyXnYPCImpNv2Fw2Rc6gJDy19T3ZvThZtMWhEJa5UfhfGc4/s1600/20130105000.png&quot; title=&quot;Wireless Network property setting&quot; /&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://qwinn-aileen.blogspot.com/feeds/2271828504841966677/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://qwinn-aileen.blogspot.com/2013/01/keep-wifi-connection-when-close-laptop.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4406536207427936366/posts/default/2271828504841966677'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4406536207427936366/posts/default/2271828504841966677'/><link rel='alternate' type='text/html' href='http://qwinn-aileen.blogspot.com/2013/01/keep-wifi-connection-when-close-laptop.html' title='Keep Wifi Connection When Close Laptop Lid'/><author><name>AileenWu</name><uri>http://www.blogger.com/profile/16167996176008066590</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='25' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjaG4pCwbsyiCMfUkqNEW5KIV6QaKq1kpRGuVwFuqO_H8CiwmSZzZfofD0VBV7KZQUkqwbh5YMGDQORK2xZoW8tiyRCmLkM9OkJpGHjOUj32k27H3QiQPxwqx7uH4KxPAw/s220/吾唯知足.png'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh2TWvK6eFHZ-DwnMzBVPpxXOi8sbTiPow2NJJyUNKr0oSlvm21pm-ABeJZjUaU12pUTxvXClKGH-azNtaioOXR6brBzm-dHyXnYPCImpNv2Fw2Rc6gJDy19T3ZvThZtMWhEJa5UfhfGc4/s72-c/20130105000.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4406536207427936366.post-7179669628451477919</id><published>2013-01-03T18:36:00.002+08:00</published><updated>2013-01-03T18:37:10.928+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="linux"/><title type='text'>Quickly delete tons of files in Linux</title><content type='html'>test: find command with &#39;-delete&#39; flag&lt;br /&gt;
&lt;br /&gt;
Ref: [SteveKamerman.com]&lt;a href=&quot;http://www.stevekamerman.com/2008/03/deleting-tons-of-files-in-linux-argument-list-too-long/&quot; target=&quot;_blank&quot;&gt;deleting-tons-of-files-in-linux-argument-list-too-long&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://qwinn-aileen.blogspot.com/feeds/7179669628451477919/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://qwinn-aileen.blogspot.com/2013/01/quickly-delete-tons-of-files-in-linux.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4406536207427936366/posts/default/7179669628451477919'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4406536207427936366/posts/default/7179669628451477919'/><link rel='alternate' type='text/html' href='http://qwinn-aileen.blogspot.com/2013/01/quickly-delete-tons-of-files-in-linux.html' title='Quickly delete tons of files in Linux'/><author><name>AileenWu</name><uri>http://www.blogger.com/profile/16167996176008066590</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='25' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjaG4pCwbsyiCMfUkqNEW5KIV6QaKq1kpRGuVwFuqO_H8CiwmSZzZfofD0VBV7KZQUkqwbh5YMGDQORK2xZoW8tiyRCmLkM9OkJpGHjOUj32k27H3QiQPxwqx7uH4KxPAw/s220/吾唯知足.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4406536207427936366.post-4418650047126383221</id><published>2012-12-27T17:18:00.000+08:00</published><updated>2012-12-27T17:20:58.398+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="oracle"/><title type='text'>[ORACLE] Get size in BYTE of a column</title><content type='html'>&lt;b&gt;LENGTH&lt;span class=&quot;highlight&quot;&gt;B&lt;/span&gt;(COLUMN_NAME)&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
謝謝有為的中年人&amp;lt;(_ _)&amp;gt;&lt;br /&gt;
ref:&amp;nbsp;&lt;a href=&quot;http://blog.darkthread.net/post-2006-11-24-kb-oracle.aspx&quot; target=&quot;_blank&quot;&gt;KB-在Oracle中直接取得中文字串長度&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://qwinn-aileen.blogspot.com/feeds/4418650047126383221/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://qwinn-aileen.blogspot.com/2012/12/oracle-get-size-in-byte-of-column.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4406536207427936366/posts/default/4418650047126383221'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4406536207427936366/posts/default/4418650047126383221'/><link rel='alternate' type='text/html' href='http://qwinn-aileen.blogspot.com/2012/12/oracle-get-size-in-byte-of-column.html' title='[ORACLE] Get size in BYTE of a column'/><author><name>AileenWu</name><uri>http://www.blogger.com/profile/16167996176008066590</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='25' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjaG4pCwbsyiCMfUkqNEW5KIV6QaKq1kpRGuVwFuqO_H8CiwmSZzZfofD0VBV7KZQUkqwbh5YMGDQORK2xZoW8tiyRCmLkM9OkJpGHjOUj32k27H3QiQPxwqx7uH4KxPAw/s220/吾唯知足.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4406536207427936366.post-2718566697038023014</id><published>2012-12-25T14:43:00.000+08:00</published><updated>2012-12-25T14:49:27.182+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="java"/><title type='text'>Change File Permission via ftpd</title><content type='html'>&lt;span class=&quot;highlight&quot;&gt;方案一&lt;/span&gt;，上傳檔案才chmod修改檔案權限&lt;br /&gt;
In Windows command line:
&lt;br /&gt;
&lt;div class=&quot;cmdline&quot;&gt;
ftp&amp;gt; chmod&lt;br /&gt;
Invalid command.
&lt;/div&gt;
Do it by &quot;quote&quot; command:
&lt;br /&gt;
&lt;div class=&quot;cmdline&quot;&gt;
ftp&amp;gt; quote&lt;br /&gt;
Command line to send site chmod 666 filename.txt&lt;br /&gt;
200 CHMOD command successful.&lt;/div&gt;
缺點:&lt;br /&gt;
FTP裡下chmod指令&lt;b&gt;無法&lt;/b&gt;使用萬用字元(*,&amp;nbsp;&lt;span style=&quot;background-color: white; font-family: sans-serif; font-size: 12.666666984558105px; line-height: 19.19999885559082px;&quot;&gt;wildcard&lt;/span&gt;)，也&lt;b&gt;無法&lt;/b&gt;使用 -R flag。&lt;br /&gt;
好不容易知道怎麼透過FTP下chmod了... 不實用&lt;br /&gt;
&lt;br /&gt;
Using Apache Commons Net 3.2 API in java:&lt;br /&gt;
&lt;div class=&quot;csharpcode&quot;&gt;
&lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;   1:  &lt;/span&gt;&lt;span class=&quot;rem&quot;&gt;//using public int sendCommand(String command, String args)&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;   2:  &lt;/span&gt;&lt;span class=&quot;rem&quot;&gt;//實在不知道那些字要放在command, 哪些字要放在args, try了好幾次&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;   3:  &lt;/span&gt;&lt;span class=&quot;rem&quot;&gt;//TEST#1:&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;   4:  &lt;/span&gt;FTPClient.sendCommand(&lt;span class=&quot;str&quot;&gt;&quot;quote&quot;&lt;/span&gt;, &lt;span class=&quot;str&quot;&gt;&quot;site chmod 666 *&quot;&lt;/span&gt;);&lt;/pre&gt;
&lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;   5:  &lt;/span&gt;&lt;span class=&quot;rem&quot;&gt;//command result=500 &#39;QUOTE site chmod 666 *&#39;: command not understood.&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;   6:  &lt;/span&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;   7:  &lt;/span&gt;&lt;span class=&quot;rem&quot;&gt;//TEST#2:&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;   8:  &lt;/span&gt;FTPClient.sendCommand(&lt;span class=&quot;str&quot;&gt;&quot;quote site chmod&quot;&lt;/span&gt;, &lt;span class=&quot;str&quot;&gt;&quot;666 *&quot;&lt;/span&gt;);&lt;/pre&gt;
&lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;   9:  &lt;/span&gt;&lt;span class=&quot;rem&quot;&gt;//command result=500 &#39;QUOTE site chmod 666 *&#39;: command not understood.&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
.....試了N百個組合都不認得, go die&lt;br /&gt;
還有error message回傳的指令都寫大寫也很奇怪.. unix大小寫有差啊，我要小寫!!&lt;br /&gt;
&lt;br /&gt;
最後讀了&lt;a href=&quot;http://commons.apache.org/net/apidocs/org/apache/commons/net/ftp/FTP.html#sendCommand(int, java.lang.String)&quot;&gt;public int sendCommand(int command, String args)方法&lt;/a&gt;才知道他根本就沒提供quote這個指令OTZ|||&amp;nbsp;從&lt;a href=&quot;http://commons.apache.org/net/apidocs/org/apache/commons/net/ftp/FTPCommand.html#getCommand(int)&quot;&gt;FTPCommand&lt;/a&gt;看起來，&quot;SITE&quot;是最有可能會動的指令:
&lt;!-- code formatted by http://manoli.net/csharpformat/ --&gt;
&lt;br /&gt;
&lt;div class=&quot;csharpcode&quot;&gt;
&lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;   1:  &lt;/span&gt;&lt;span class=&quot;rem&quot;&gt;//TEST#3:&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;   2:  &lt;/span&gt;FTPClient.sendCommand(&lt;span class=&quot;str&quot;&gt;&quot;site&quot;&lt;/span&gt;, &lt;span class=&quot;str&quot;&gt;&quot;chmod 666 *&quot;&lt;/span&gt;);&lt;/pre&gt;
&lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;   3:  &lt;/span&gt;&lt;span class=&quot;rem&quot;&gt;//command result=550 *: A file or directory in the path name does not exist.&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
........ 透過程式來做也一樣，&lt;b&gt;*&lt;/b&gt;不能用，再度遭受打擊OTZ|||&lt;br /&gt;
&lt;div class=&quot;csharpcode&quot;&gt;
&lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;   1:  &lt;/span&gt;&lt;span class=&quot;rem&quot;&gt;//TEST#4:&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;   2:  &lt;/span&gt;FTPClient.sendCommand(&lt;span class=&quot;str&quot;&gt;&quot;site&quot;&lt;/span&gt;, &lt;span class=&quot;str&quot;&gt;&quot;chmod 666 filename.txt&quot;&lt;/span&gt;);&lt;/pre&gt;
&lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;   3:  &lt;/span&gt;&lt;span class=&quot;rem&quot;&gt;//command result=200 CHMOD command successful.&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
一次只能改一個檔案也太讓人不爽了。所以先上傳檔案才修改檔案權限的方案透過FTP不work。&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;highlight&quot;&gt;方案二&lt;/span&gt;，登入FTP後先下umask指令來控制檔案權限&lt;br /&gt;
In Windows command line:&lt;br /&gt;
&lt;div class=&quot;cmdline&quot;&gt;
ftp&amp;gt; quote&lt;br /&gt;
Command line to send site umask 000&lt;br /&gt;
200 UMASK set to 000 (was 007)&lt;/div&gt;
&lt;br /&gt;
Using Apache Commons Net 3.2 API in java:&lt;br /&gt;
&lt;div class=&quot;csharpcode&quot;&gt;
&lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;   1:  &lt;/span&gt;&lt;span class=&quot;rem&quot;&gt;//TEST#5:&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;   2:  &lt;/span&gt;FTPClient.sendCommand(&lt;span class=&quot;str&quot;&gt;&quot;site&quot;&lt;/span&gt;, &lt;span class=&quot;str&quot;&gt;&quot;umask 002&quot;&lt;/span&gt;);&lt;/pre&gt;
&lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;   3:  &lt;/span&gt;&lt;span class=&quot;rem&quot;&gt;//command result=200 UMASK set to 002 (was 007)&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
特別提醒透過下umask方法目前測起來只對FTP有用，&lt;b&gt;SFTP應該無效&lt;/b&gt;。&lt;br /&gt;
又是另一項作業..&lt;br /&gt;
&lt;br /&gt;
Ref:

&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href=&quot;http://commons.apache.org/net/apidocs/org/apache/commons/net/ftp/FTP.html#sendCommand(java.lang.String, java.lang.String)&quot;&gt;[API] FTP.sendCommand(String, String)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://commons.apache.org/net/apidocs/org/apache/commons/net/ftp/FTPCommand.html#getCommand(int)&quot;&gt;[API] FTPCommand class&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
</content><link rel='replies' type='application/atom+xml' href='http://qwinn-aileen.blogspot.com/feeds/2718566697038023014/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://qwinn-aileen.blogspot.com/2012/12/change-file-permission-via-ftpd.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4406536207427936366/posts/default/2718566697038023014'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4406536207427936366/posts/default/2718566697038023014'/><link rel='alternate' type='text/html' href='http://qwinn-aileen.blogspot.com/2012/12/change-file-permission-via-ftpd.html' title='Change File Permission via ftpd'/><author><name>AileenWu</name><uri>http://www.blogger.com/profile/16167996176008066590</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='25' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjaG4pCwbsyiCMfUkqNEW5KIV6QaKq1kpRGuVwFuqO_H8CiwmSZzZfofD0VBV7KZQUkqwbh5YMGDQORK2xZoW8tiyRCmLkM9OkJpGHjOUj32k27H3QiQPxwqx7uH4KxPAw/s220/吾唯知足.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4406536207427936366.post-7817047020557742466</id><published>2012-01-04T14:14:00.001+08:00</published><updated>2012-01-04T14:14:13.798+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="java"/><title type='text'>Using Editable JComboBox with KeyEvent</title><content type='html'>&lt;p&gt;//The following code wont’t work    &lt;br /&gt;JComboBox jcb1 = new JComboBox();     &lt;br /&gt;jcb1.setEditable(true);     &lt;br /&gt;&lt;strong&gt;jcb1.addKeyListener(&lt;em&gt;aKeyEventObject&lt;/em&gt;);&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;//Correct: KeyEvent should be added to JComboBox.getEditor().getEditorComponent()    &lt;br /&gt;JComboBox jcb2 = new JComboBox();     &lt;br /&gt;jcb2.setEditable(true);     &lt;br /&gt;&lt;strong&gt;jcb2.getEditor().getEditorComponent().addListerer(&lt;em&gt;aKeyEventObject&lt;/em&gt;);&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Calling to JComboBox.getEditor().getEditorComponent() will return a JTextField that is used for editing the comboBox’s text.&lt;/p&gt;  &lt;p&gt;And if at the same moment you want to get the filling text:&lt;/p&gt;  &lt;p&gt;//The following code won’t work(return null)   &lt;br /&gt;String s = jcb2.getSelectedItem().toString();&lt;/p&gt;  &lt;p&gt;//Correct:   &lt;br /&gt;String s = ((JTextComponent)jcb.getEditor().getEditorComponent()).getText();&lt;/p&gt;  </content><link rel='replies' type='application/atom+xml' href='http://qwinn-aileen.blogspot.com/feeds/7817047020557742466/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://qwinn-aileen.blogspot.com/2012/01/using-editable-jcombobox-with-keyevent.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4406536207427936366/posts/default/7817047020557742466'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4406536207427936366/posts/default/7817047020557742466'/><link rel='alternate' type='text/html' href='http://qwinn-aileen.blogspot.com/2012/01/using-editable-jcombobox-with-keyevent.html' title='Using Editable JComboBox with KeyEvent'/><author><name>AileenWu</name><uri>http://www.blogger.com/profile/16167996176008066590</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='25' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjaG4pCwbsyiCMfUkqNEW5KIV6QaKq1kpRGuVwFuqO_H8CiwmSZzZfofD0VBV7KZQUkqwbh5YMGDQORK2xZoW8tiyRCmLkM9OkJpGHjOUj32k27H3QiQPxwqx7uH4KxPAw/s220/吾唯知足.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4406536207427936366.post-7639815537227639309</id><published>2011-06-30T15:34:00.001+08:00</published><updated>2011-06-30T15:34:30.473+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="linux"/><category scheme="http://www.blogger.com/atom/ns#" term="windows"/><title type='text'>Transfer text file between Windows and Linux</title><content type='html'>&lt;p&gt;最近遇到的問題，普通的.txt檔案在windows上跟在linux上看起來沒什麼差別，但是事實上如果用HEX mode或是用Notepad++顯示所有字元，就會注意到差別! 換行字元的差別!!&lt;/p&gt;  &lt;p&gt;在&lt;a href=&quot;http://home.educities.edu.tw/wanker742126/asm/ap04.html&quot; target=&quot;_blank&quot;&gt;ASCII字元表&lt;/a&gt;裡的10( LF , line feed), 13(CR, carriage return)都有換行的作用，看到一篇文章裡有稍微解說:     &lt;br /&gt;Mac OS X開始是用LF，較舊的版本是用CR     &lt;br /&gt;Unix系統下，是用LF&amp;#160; &lt;br /&gt;愛搞怪的窗戶是用CRLF...&lt;/p&gt;  &lt;p&gt;當我透過FTP把檔案從windows丟到linux上之後，每行資料最後的換行符號都從CRLF變成LF，整個檔案的長度就變了... 影響了程式執行的結果。於是就查了要怎麼避免這個行為，還滿簡單的，不過不知道就沒轍。&lt;/p&gt;  &lt;p&gt;只要把FTP的傳輸模式改為binary mode即可。用command line做FTP的可以參考reference 2號，用UI的話，我是用fileZilla，在選單&amp;quot;傳輸&amp;gt;傳輸型態”裡可以選擇。就這樣，再傳一次，果然，換行符號就不會因不同系統而改變了。&lt;/p&gt;  &lt;p&gt;ref: &lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;&lt;a href=&quot;http://www.websiterepairguy.com/articles/os/crlf.html&quot; target=&quot;_blank&quot;&gt;How to Transfer Text Files Between Linux, Macintosh, and Microsoft Windows Operating Systems&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href=&quot;http://www.ccunix.ccu.edu.tw/~tsices/tutor/ccu-net/chap05&quot; target=&quot;_blank&quot;&gt;[中正大學電算中心] 第五章 檔案傳輸協定-FTP&lt;/a&gt; &lt;/li&gt; &lt;/ol&gt;  </content><link rel='replies' type='application/atom+xml' href='http://qwinn-aileen.blogspot.com/feeds/7639815537227639309/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://qwinn-aileen.blogspot.com/2011/06/transfer-text-file-between-windows-and.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4406536207427936366/posts/default/7639815537227639309'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4406536207427936366/posts/default/7639815537227639309'/><link rel='alternate' type='text/html' href='http://qwinn-aileen.blogspot.com/2011/06/transfer-text-file-between-windows-and.html' title='Transfer text file between Windows and Linux'/><author><name>AileenWu</name><uri>http://www.blogger.com/profile/16167996176008066590</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='25' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjaG4pCwbsyiCMfUkqNEW5KIV6QaKq1kpRGuVwFuqO_H8CiwmSZzZfofD0VBV7KZQUkqwbh5YMGDQORK2xZoW8tiyRCmLkM9OkJpGHjOUj32k27H3QiQPxwqx7uH4KxPAw/s220/吾唯知足.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4406536207427936366.post-5109291441542051775</id><published>2011-06-23T13:07:00.001+08:00</published><updated>2011-06-23T14:11:21.835+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="android"/><category scheme="http://www.blogger.com/atom/ns#" term="cyanogenMod"/><category scheme="http://www.blogger.com/atom/ns#" term="wildfire"/><title type='text'>HTC Wildfire2.2 root and apply new rom</title><content type='html'>&lt;p&gt;昨天玩了一個下午，試了好多方法，終於把上到官方2.2版本的wildfire刷了新的rom。其中最大的障礙在取得手機的root權限，網路上多篇文章都說&lt;a href=&quot;http://unrevoked.com/&quot; target=&quot;_blank&quot;&gt;unrevoked3&lt;/a&gt;已經支援wildfire2.2、教學文章寫的跟真的一樣(ref.#1)，但是我實際試了之後，並沒有成功。後來找到一篇滿冷門的文章(ref.#3 &lt;a href=&quot;http://joel5121.blogspot.com/2011/06/wildfire-22-root-tutorial.html&quot; target=&quot;_blank&quot;&gt;Wildfire 2.2 root tutorual&lt;/a&gt;)，雖然還是使用beta版的工具，但是豁出去給他試了一下，竟然還成了。&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;前置作業&lt;/strong&gt;     &lt;br /&gt;因為在用了對的方法前，都是偏向使用unrevoked3的方法來取得root權限，也照著其他人的教學(ref.#2)做了一些前置作業，所以事後有點難判斷究竟是不是必要的，不過以下幾點大概是一定要做的:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;電腦上曾安裝HTC Sync，須把它移除。&lt;strong&gt;若不曾安裝，也需要先安裝再移除&lt;/strong&gt;。這主要是為了取得一些HTC Driver。所以在安裝了HTC Sync後，開啟&amp;quot;控制台 &amp;gt; 新增或移除程式&amp;quot;，找到&amp;quot;HTC Sync&amp;quot;，將他移除(如下圖)，保留其餘兩個。       &lt;br /&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHMShcYwOc_evy3DL4SL_GwNc6yr-7-AxLfc04jQjqEFtCflobYU2ZBiFggs4aHl_gSi0_zCo5TStQSABkcs-tqI-0Gcd8wbIo8JXy1b3ZQLvKwNPmjoD-rLQvCMk7O_QxQfxPVaBASWI/s1600-h/image%25255B3%25255D.png&quot;&gt;&lt;img style=&quot;border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px&quot; title=&quot;remove HTC Sync&quot; border=&quot;0&quot; alt=&quot;remove HTC Sync&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgfRwCrjvpfNBo7Bw2SgMgZEANB2fMtTowh_QJT8g2uk-7UXIbLzUTbaDVpnO1TBCXtuILzzK8OcNsDKelaKIvT4VKaxnF40EgaMy23-MzADAEJj8bhHbVPpnjE_KObJl0X27yS66BRAWw/?imgmax=800&quot; width=&quot;510&quot; height=&quot;200&quot; /&gt;&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;手機設定: Setting &amp;gt; Applications &amp;gt; Development &amp;gt; USB debugging (勾選，直到整個刷rom過程結束前，都不必改回來) &lt;/li&gt;    &lt;li&gt;手機設定: Setting &amp;gt; Connect to PC &amp;gt; Default connection type &amp;gt; HTC Syne (勾選) &lt;/li&gt;    &lt;li&gt;手機設定: Setting &amp;gt; Connect to PC &amp;gt; Ask me (取消勾選) &lt;/li&gt;    &lt;li&gt;取得&lt;a href=&quot;http://unrevoked.com/rootwiki/lib/exe/fetch.php?hash=908951&amp;amp;media=http%3A%2F%2Fwww.unrevoked.com%2Frecovery%2Fandroid-usb-driver.zip&quot; target=&quot;_blank&quot;&gt;unrevoked USB Driver&lt;/a&gt;並安裝，詳細安裝步驟請看ref.#5 &lt;a href=&quot;http://unrevoked.com/rootwiki/doku.php/public/windows_hboot_driver_install&quot; target=&quot;_blank&quot;&gt;Windows HBOOT driver installation instructions&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;手機序號: Setting &amp;gt; About phone 內有serial number資訊，須記下 &lt;/li&gt;    &lt;li&gt;HBOOT Version: 在手機關機的狀態下，按住&lt;strong&gt;音量小聲鍵+電源鍵&lt;/strong&gt;(進入bootloader)，會進入如下畫面，便可看見HBOOT版本資訊，須記下       &lt;br /&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhp-PjnWtOjHA4Tc5D0xbavNnYA_a8z5pdauiV6WrP1CVVt4Go8I_zRBNo45fLqq66c3cufhMmoFGU95Va7XLAY7W9ou2NzbPz4h9HiqDp4vxTGHxSTg2cYh6aUsCCP5WD7FDFqEmgVzGY/s1600-h/image%25255B9%25255D.png&quot;&gt;&lt;img style=&quot;border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px&quot; title=&quot;hboot version&quot; border=&quot;0&quot; alt=&quot;hboot version&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4ydd_w1_kxyddeboK0qPzIAS1DJWb2Usdy2yEERj3C_fmcZ8Ygq80KAXDNG0Chg8Kxj8rApPs4QrWKCxJMFFRRWWig2VVoppD_vlKEsByq8WILyYiQPWHxCE7mo8Fz6JNZvHEKBO-Ab0/?imgmax=800&quot; width=&quot;244&quot; height=&quot;119&quot; /&gt;&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;至&lt;a href=&quot;http://alpharev.nl/x/beta/&quot; target=&quot;_blank&quot;&gt;AlphaRevX beta網站&lt;/a&gt;下載for windows的軟體，同時他會出現Key generate畫面，這邊需要輸入在上面兩個步驟取得的serinal number與HBOOT version，取得key之後記得記下來       &lt;br /&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEha9QSEyTM97SOEM1ScNxUBGaYFH4HmETE4qOshMYdJLlrntXadzGfrlph8doGVRGHHZlMKxlqWJF1Vd05BUHls1x4mhIx7SLYQOuT2h9ztzVKL5ujBnpuUiG8e7ScQ43qIWLXRO_jGr_w/s1600-h/image%25255B15%25255D.png&quot;&gt;&lt;img style=&quot;border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px&quot; title=&quot;image&quot; border=&quot;0&quot; alt=&quot;image&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjGASxSDeHtex1IeGsdB3V-YQnANJA2DapcT-9ySR91as8VQJaHcwZSFNEmx0jWIEa5uROyQz1XPdi6_Knl_tsTorRXC3rCxGtASn4tgi_IFUpOjs5rbTNvDjTIgJeAApggJTsviGrsMaQ/?imgmax=800&quot; width=&quot;422&quot; height=&quot;294&quot; /&gt;&lt;/a&gt; &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;&lt;strong&gt;S-OFF using AlphaRevX      &lt;br /&gt;&lt;/strong&gt;此步驟完成了bootloader訊息會由S-ON變為S-OFF，有關S-OFF請見ref.#6 &lt;a href=&quot;http://zakipush.blogspot.com/2011/02/htc-desire-s-off.html&quot; target=&quot;_blank&quot;&gt;簡易將HTC Desire S-off 教學&lt;/a&gt;&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;將下載來的alpharevx.exe.zip解壓縮後，執行alpharevx.exe      &lt;br /&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi13w6ys9aSHUUIgdWFW3xuo5W25Vb7Tw4KrD0OfNhzNM3sAR-Xhx8tPWo1TVSaZQjm7PBYDfoAKDXckhboFSorP7-NSZdruOy3aYQg2oJDcgpbqtTPlbmQgC5MlEAu8FrxVK4Ok99ZpO4/s1600-h/image%25255B19%25255D.png&quot;&gt;&lt;img style=&quot;border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px&quot; title=&quot;image&quot; border=&quot;0&quot; alt=&quot;image&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmf_5SaqUvIEQBA94gqHkP6ZDPwyRNkUaZTEK_G-kInTD02IBCOykiExwHOeOpnLyMX7jh-lj2vj3uRVE2l3l3G0NgTvsyhalCeZTmg-AtwsKAY499OPfmB8ubgh5ugqlfEicRPyw5N6s/?imgmax=800&quot; width=&quot;406&quot; height=&quot;89&quot; /&gt;&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;此時再將手機接上電腦，會提示你輸入前置作業步驟8所取得的beta application key &lt;/li&gt;    &lt;li&gt;輸入後此程式會繼續作業，直到提示完成。這時候就可以把手機取下，關機。 &lt;/li&gt;    &lt;li&gt;按住&lt;strong&gt;音量小聲鍵+電源鍵&lt;/strong&gt;(進入bootloader)，檢視S-OFF是否成功，應該會變成如下圖       &lt;br /&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1dPR6jN5z65RRrIPNJnHITmFjY-XUVm_5MshyphenhyphenjO1d4C3_OuZBCoClPYWnyNo0eXWL5kU4iOQXnLfpF38nHkla0tbl9L_nGPHEXLwhb1LB9qdynkhhaDegjqUZvWS26RDsqmToG4L1NV0/s1600-h/image%25255B23%25255D.png&quot;&gt;&lt;img style=&quot;border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px&quot; title=&quot;image&quot; border=&quot;0&quot; alt=&quot;image&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiSDRDCiuxS0PCM3pXgcDx5PgYDs_RaA82GbkPdF6bLgsivgxsPAzmIaBdAwgQBaftNKJe6tBnlcGj-8zInusGqa4aNYRzILIxy_vsGPyPE5K6GH2lVltuAQqFr2XMl3Q66EVEuNiMdYe0/?imgmax=800&quot; width=&quot;419&quot; height=&quot;116&quot; /&gt;&lt;/a&gt;&amp;#160; &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;&lt;b&gt;Clockwork recovery&lt;/b&gt;&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;從&lt;a href=&quot;http://developer.htc.com/adp.html&quot; target=&quot;_blank&quot;&gt;HTC Developer center&lt;/a&gt;下載Fastboot Tool(window版本請在網頁搜尋&amp;quot;Fastboot binary, Windows&amp;quot;，比較好找到載點) &lt;/li&gt;    &lt;li&gt;把下載回來的fastboot.exe放入S-OFF using AlphaRevX第一步驟中解壓縮的資料夾內，為了方便操作，將整個資料夾copy到C槽底下，並改名為&amp;quot;wildfire&amp;quot; (當然若你很熟悉command line的指令，可以不要這麼做) &lt;/li&gt;    &lt;li&gt;從&lt;a href=&quot;http://kan.gd/q9z&quot; target=&quot;_blank&quot;&gt;這裡&lt;/a&gt;下載Wildfire_recovery-clockwork-3.2.0.0-j_r0dd_mod.zip (這個連結我也是從參考的文章內直接使用的，所以無法跟各位保證他的來源，不過我自己也用了就是。&lt;a href=&quot;http://forum.xda-developers.com/showthread.php?t=1112971&quot; target=&quot;_blank&quot;&gt;xdadevelopers這裡有提供r較新的版本的連結&lt;/a&gt;) &lt;/li&gt;    &lt;li&gt;將解壓縮出來的檔案改名為wildfire.img，一起放入上述資料夾(本例是c槽下的wildfire) &lt;/li&gt;    &lt;li&gt;確定你已經做了前置作業步驟5的usb driver安裝後，將手機開至bootloader(音量小聲鍵+電源鍵)，接上電腦 &lt;/li&gt;    &lt;li&gt;開啟command line，依序輸入這兩個指令      &lt;br /&gt;&lt;strong&gt;cd c:/wildfire        &lt;br /&gt;fastboot flash recovery wildfire.img &lt;/strong&gt;&lt;/li&gt;    &lt;li&gt;完成後，可以將手機拿下，開至bootloader，並進入recovery模式，應該可看見如下選單(bootloader內用音量大小來做選單的上下移動、電源鍵為enter。clockworkMod Recovery的選單一樣用音量大小來做上下移動，但是以按下光學滑鼠當enter，電源鍵是回首頁或上一層… 我一直到後來才發現這件事，還一直以為裝壞了...)      &lt;br /&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiX4RjbmPjBYNZGeFDDf2KjFhrCMte8WG_kzrOH7Sz8vP9Ft6FSunYLS8514hALwkcx-Vos43D9YYJ83yUo3r3W2aIOWjouyFf2YiZsq1CvgXvucMhQzOa3Hstf3PfAAgy_Y5AEgl-y7K4/s1600-h/image%25255B28%25255D.png&quot;&gt;&lt;img style=&quot;border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px&quot; title=&quot;clockworkmod recovery menu&quot; border=&quot;0&quot; alt=&quot;clockworkmod recovery menu&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiPYEZGP1zaHqNN-0oln6aEH1dK2pgy1Wcks_teEHxQAni_PUO22h-g4nGJE6cruN3EJOEsnj85y8aSXDx96nd2DBYr964KWZWdUWTGrznCB7FBkCx3MULAZpTF5Ovou-9WtCasQ1rqEhA/?imgmax=800&quot; width=&quot;244&quot; height=&quot;149&quot; /&gt;&lt;/a&gt; &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;&lt;strong&gt;ROOT      &lt;br /&gt;&lt;/strong&gt;接下來終於要進入root~(重頭戲的1/2)!! ref.#3的教學內提供了兩個方法，我只用其中一個:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;下載&lt;a href=&quot;http://forum.xda-developers.com/attachment.php?attachmentid=578771&amp;amp;d=1303829207&quot; target=&quot;_blank&quot;&gt;GingerBreak-v1.20.apk&lt;/a&gt; 放到手機裡 &lt;/li&gt;    &lt;li&gt;在手機上用任何一款file manager安裝他，並執行 &lt;/li&gt;    &lt;li&gt;接著就是無盡的等待~~ 少說要15分鐘，最後你會看到一個聲稱不知道發生什麼錯誤的訊息，並要求你手動關機再重開，重開後，檢查一下你的程式集，應該就有superUser囉~ &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;&lt;strong&gt;Apply new ROM      &lt;br /&gt;&lt;/strong&gt;重頭戲2/2!!! 我個人是使用&lt;a href=&quot;http://www.cyanogenmod.com/&quot; target=&quot;_blank&quot;&gt;CyanogenMod&lt;/a&gt;7，&lt;a href=&quot;http://forum.xda-developers.com/showthread.php?t=822181&quot; target=&quot;_blank&quot;&gt;xda這裡有介紹許多其他的rom&lt;/a&gt;，任君挑選。&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;選好要安裝的ROM(通常是zip檔，不要解壓縮)，下載來並放入SD卡，改名為update.zip &lt;/li&gt;    &lt;li&gt;到market裡下載”ROM Manager” 並安裝 (我只用free版) &lt;/li&gt;    &lt;li&gt;開啟ROM Manager，首先更新Recovery(刷入ClockworkMod Recovery/Flash ClockworkMod Recovery) &lt;/li&gt;    &lt;li&gt;選擇Install ROM from SD Card &amp;gt; 選到步驟1的update.zip &lt;/li&gt;    &lt;li&gt;ROM Manager應該會有要求取得root的動作，確定之後，就開始刷rom啦~~ 又是一陣等待 &lt;/li&gt;    &lt;li&gt;第一次重開機會需要好一些時間，然後就開開心心的用新系統八~ &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;GOOD LUCK!!!!&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;後記1號:      &lt;br /&gt;&lt;/strong&gt;CyanogenMod7因為license問題，預設不會包含google的所有服務(就是market, map, mail等的，這怎麼成!!) 所以需要參考ref.#8 &lt;a href=&quot;http://wiki.cyanogenmod.com/wiki/Latest_Version/Google_Apps&quot; target=&quot;_blank&quot;&gt;Latest Version/Google Apps&lt;/a&gt; 取得google App，一樣是zip檔，請放入SD卡，開至bootloader &amp;gt; recovry &amp;gt; install zip from sd card處理(請記得clockworkMod Recovery選單內以光學滑鼠當enter)&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;後記2號:     &lt;br /&gt;&lt;/strong&gt;裝google map的時候，才剛開始download，馬上就終止了。所以找到論壇上一篇文章說明，可能是download cache太小所導致(詳見ref.#9)。所以有人將download cache的位置改指到一個建在SD內的資料夾下，馬上就可以解決這個問題了!! 請開啟app內的terminal emulator(模擬終端)，依序輸入以下指令:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;mkdir /mnt/sdcard/market-download-cache     &lt;br /&gt;su      &lt;br /&gt;cd /cache      &lt;br /&gt;mv download download.bak      &lt;br /&gt;ln -s /mnt/sdcard/market-download-cache download      &lt;br /&gt;ls -ahl&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;由最後一個指令可看出/cache/download 改指到/mnt/sdcard/market-download-cache了，重新下載安裝google map，成功。&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;ref: &lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;&lt;a href=&quot;http://www.htcplayer.com/thread-59928-1-1.html&quot; target=&quot;_blank&quot;&gt;[教程] Android 2.2系统机型一键root教程&lt;/a&gt; (doesn’t work) &lt;/li&gt;    &lt;li&gt;&lt;a href=&quot;http://gfans.bryan.tw/2010/09/22/801&quot; target=&quot;_blank&quot;&gt;使用unrevoked 3將官方Desire 2.1, 2.2刷入第三方recovery image(含root)&lt;/a&gt; (適用desire) &lt;/li&gt;    &lt;li&gt;&lt;a href=&quot;http://joel5121.blogspot.com/2011/06/wildfire-22-root-tutorial.html&quot; target=&quot;_blank&quot;&gt;Wildfire 2.2 root tutorial&lt;/a&gt; (work!) &lt;/li&gt;    &lt;li&gt;&lt;a href=&quot;http://alpharev.nl/x/beta/&quot; target=&quot;_blank&quot;&gt;AlphaRevX Beta&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href=&quot;http://unrevoked.com/rootwiki/doku.php/public/windows_hboot_driver_install&quot; target=&quot;_blank&quot;&gt;Windows HBOOT driver installation instructions&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href=&quot;http://zakipush.blogspot.com/2011/02/htc-desire-s-off.html&quot; target=&quot;_blank&quot;&gt;簡易將HTC Desire S-off 教學&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href=&quot;http://wiki.cyanogenmod.com/wiki/Main_Page&quot; target=&quot;_blank&quot;&gt;CyanogenMod Wiki&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href=&quot;http://wiki.cyanogenmod.com/wiki/Latest_Version/Google_Apps&quot; target=&quot;_blank&quot;&gt;CyanogenMod Wiki: Latest Version/Google Apps&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href=&quot;http://forum.cyanogenmod.com/topic/22945-i-cant-download-anything-bigger-than-5m-from-the-markets/page__p__212130__hl__market__fromsearch__1#entry212130&quot; target=&quot;_blank&quot;&gt;[forums] I can&#39;t download anything bigger than 5M from the markets&lt;/a&gt;&lt;/li&gt; &lt;/ol&gt;  </content><link rel='replies' type='application/atom+xml' href='http://qwinn-aileen.blogspot.com/feeds/5109291441542051775/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://qwinn-aileen.blogspot.com/2011/06/htc-wildfire22-root-and-apply-new-rom.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4406536207427936366/posts/default/5109291441542051775'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4406536207427936366/posts/default/5109291441542051775'/><link rel='alternate' type='text/html' href='http://qwinn-aileen.blogspot.com/2011/06/htc-wildfire22-root-and-apply-new-rom.html' title='HTC Wildfire2.2 root and apply new rom'/><author><name>AileenWu</name><uri>http://www.blogger.com/profile/16167996176008066590</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='25' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjaG4pCwbsyiCMfUkqNEW5KIV6QaKq1kpRGuVwFuqO_H8CiwmSZzZfofD0VBV7KZQUkqwbh5YMGDQORK2xZoW8tiyRCmLkM9OkJpGHjOUj32k27H3QiQPxwqx7uH4KxPAw/s220/吾唯知足.png'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgfRwCrjvpfNBo7Bw2SgMgZEANB2fMtTowh_QJT8g2uk-7UXIbLzUTbaDVpnO1TBCXtuILzzK8OcNsDKelaKIvT4VKaxnF40EgaMy23-MzADAEJj8bhHbVPpnjE_KObJl0X27yS66BRAWw/s72-c?imgmax=800" height="72" width="72"/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4406536207427936366.post-5107869908735893862</id><published>2011-01-18T16:50:00.001+08:00</published><updated>2011-01-18T16:54:12.498+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="freebsd"/><category scheme="http://www.blogger.com/atom/ns#" term="mail"/><title type='text'>Roundcube auto-reply plugin: Vacation</title><content type='html'>&lt;div class=&quot;block_dotted&quot;&gt;Evnironment:    &lt;br /&gt;OS: FreeBSD 8.1-RELEASE-p1     &lt;br /&gt;roundcube: 0.4.2     &lt;br /&gt;vacation: 1.9.9     &lt;br /&gt;apache: 1.3.42     &lt;br /&gt;php: 5.3.3_2&lt;/div&gt;  &lt;ol&gt;   &lt;li&gt;前提: roundcube已正常運作。也就是apache, php等基本配件已經處理好了。 &lt;/li&gt;    &lt;li&gt;下載&lt;a href=&quot;http://sourceforge.net/projects/rcubevacation/&quot; target=&quot;_blank&quot;&gt;Vacation plugin&lt;/a&gt;，並解壓縮至/roundcube/plugins/內       &lt;br /&gt;(/usr/local/www/roundcube/plugins/) &lt;/li&gt;    &lt;li&gt;先讀過README與INSTALL兩個檔案，並決定要用哪種driver讓auto-reply的功能運作(這邊會以SSHFTP為例)。 &lt;/li&gt;    &lt;li&gt;啟用plugin: 修改/usr/local/www/roundcube/config/main.inc.php檔      &lt;br /&gt;找到$rcmail_config[&#39;plugins&#39;] 這行，並加入&#39;vacation&#39;       &lt;blockquote&gt;       &lt;p&gt;// List of active plugins (in plugins/ directory)          &lt;br /&gt;$rcmail_config[&#39;plugins&#39;] = array(&#39;&lt;em&gt;other_plugins&lt;/em&gt;&#39;,&#39;vacation&#39;);&lt;/p&gt;     &lt;/blockquote&gt;   &lt;/li&gt;    &lt;li&gt;修改/vacation/config.ini檔，指定driver      &lt;blockquote&gt;       &lt;p&gt;[default]          &lt;br /&gt;driver = &amp;quot;sshftp&amp;quot;           &lt;br /&gt;subject = &amp;quot;Default subject&amp;quot;           &lt;br /&gt;body = &amp;quot;default.txt&amp;quot;           &lt;br /&gt;server = &lt;em&gt;host_name&lt;/em&gt;&lt;/p&gt;     &lt;/blockquote&gt;   &lt;/li&gt;    &lt;li&gt;修改/vacation/config.ini檔的擁有者 與 執行權限      &lt;br /&gt;      &lt;div class=&quot;cmdline&quot;&gt;# chown &lt;em&gt;$apache_user&lt;/em&gt; config.ini         &lt;br /&gt;# chmod 0400 confing.ini &lt;/div&gt;      &lt;p&gt;到目前為止，2-6點是INSTALL.txt內也有列出的幾項工作。        &lt;br /&gt;照著做完之後，在roundcube設定內，就可以看見&amp;quot;休假&amp;quot;的頁籤了。&lt;/p&gt;   &lt;/li&gt;    &lt;li&gt;不過你可能會遇到點下&amp;quot;休假&amp;quot;的頁籤後畫面就錯誤的狀況，這時候去檢查/roundcube/logs/errors時，可能會有以下錯誤訊息:      &lt;blockquote&gt;PHP Fatal error:&amp;#160; &lt;br /&gt;Call to undefined function ssh2_connect() in …/roundcube/plugins/vacation/lib/sshftp.class.php on line ...&lt;/blockquote&gt;   &lt;/li&gt;    &lt;li&gt;因為要使用PHP的SSH2系列功能時，系統需要有OpenSSL, libssh2, pecl-ssh2三個套件，可從ports安裝，libssh2與pecl-ssh2的位置分別在:      &lt;br /&gt;&lt;strong&gt;libssh2:&lt;/strong&gt; /usr/ports/security/libssh2       &lt;br /&gt;&lt;strong&gt;pecl-ssh2:&lt;/strong&gt;&amp;#160; /usr/ports/security/pecl-ssh2       &lt;br /&gt;分別進入這兩個資料夾，設定並安裝:       &lt;div class=&quot;cmdline&quot;&gt;# make config install clean&lt;/div&gt; 完成安裝後，可用phpinfo();網頁檢視SSH模組是否已支援。       &lt;br /&gt;或是檢視/usr/local/etc/php/extensions.ini檔案內是否有此行:       &lt;blockquote&gt;extension=ssh2.so&lt;/blockquote&gt;   &lt;/li&gt;    &lt;li&gt;修改/etc/ssh/sshd_config檔      &lt;br /&gt;必須啟用sshd的password authentication方法(sshftp.class.php內的叫用才會成功)，找到PasswordAuthentication關進字並修改:       &lt;blockquote&gt;       &lt;p&gt;# Change to yes to enable built-in password authentication.          &lt;br /&gt;PasswordAuthentication &lt;strong&gt;yes            &lt;br /&gt;&lt;/strong&gt;&lt;/p&gt;     &lt;/blockquote&gt;   &lt;/li&gt;    &lt;li&gt;重新啟動sshd      &lt;div class=&quot;cmdline&quot;&gt;# /etc/rc.d/sshd restart&lt;/div&gt;   &lt;/li&gt;    &lt;li&gt;重新啟動apache      &lt;div class=&quot;cmdline&quot;&gt;# cd /usr/local/etc/rc.d        &lt;br /&gt;./apache restart&lt;/div&gt;   &lt;/li&gt;    &lt;li&gt;try it!!&lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;ref: &lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;&lt;a href=&quot;http://www.php.net/manual/en/book.ssh2.php&quot; target=&quot;_blank&quot;&gt;[PHP] Secure Shell2&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href=&quot;http://www.freebsd.org/cgi/man.cgi?query=sshd&amp;amp;sektion=8&quot; target=&quot;_blank&quot;&gt;[freeBSD] SSHD Man page&lt;/a&gt;&lt;/li&gt; &lt;/ol&gt;  </content><link rel='replies' type='application/atom+xml' href='http://qwinn-aileen.blogspot.com/feeds/5107869908735893862/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://qwinn-aileen.blogspot.com/2011/01/roundcube-auto-reply-plugin-vacation.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4406536207427936366/posts/default/5107869908735893862'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4406536207427936366/posts/default/5107869908735893862'/><link rel='alternate' type='text/html' href='http://qwinn-aileen.blogspot.com/2011/01/roundcube-auto-reply-plugin-vacation.html' title='Roundcube auto-reply plugin: Vacation'/><author><name>AileenWu</name><uri>http://www.blogger.com/profile/16167996176008066590</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='25' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjaG4pCwbsyiCMfUkqNEW5KIV6QaKq1kpRGuVwFuqO_H8CiwmSZzZfofD0VBV7KZQUkqwbh5YMGDQORK2xZoW8tiyRCmLkM9OkJpGHjOUj32k27H3QiQPxwqx7uH4KxPAw/s220/吾唯知足.png'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4406536207427936366.post-618137521238880</id><published>2010-12-03T13:48:00.001+08:00</published><updated>2010-12-03T13:48:23.303+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="SharePoint"/><title type='text'>修改SharePoint網站之清單&amp;quot;建立者&amp;quot;欄位</title><content type='html'>&lt;div class=&quot;block_dotted&quot;&gt;Environment    &lt;br /&gt;Server: Win2003 + SharePoint Service 3&lt;/div&gt;  &lt;p&gt;&lt;strong&gt;&lt;u&gt;需求: &lt;/u&gt;&lt;/strong&gt;當透過WSS UI的「儲存清單為範本」+「包括內容」選項將清單匯出後，再匯入時，所有清單項目的「建立者」欄位都會變成匯入人的名字。如果資訊人員佛心來的想替使用者改掉... 是可以做的，寫程式囉。&lt;/p&gt;  &lt;p&gt;利用Microsoft提供的SharePoint API: Microsoft.SharePoint.dll。這支dll可以在SharePoint server上的&lt;font face=&quot;Courier&quot;&gt;\\Computer_Name\Drive$\Program Files\Common Files\Microsoft Shared\web server extensions\12\ISAPI&lt;/font&gt; 內找到。&lt;/p&gt;  &lt;p&gt;但是，如果你覺得把他複製出來到自己本機開發那就錯了。這麼做應該會遇到「無法載入檔案或組件或其相依性的其中之一」的錯誤，就像&lt;a href=&quot;http://social.msdn.microsoft.com/Forums/en/sharepointdevelopment/thread/95511fa3-4995-4cab-bef7-922f5dd31fc8&quot; target=&quot;_blank&quot;&gt;這篇SharePoint Forums上的討論&lt;/a&gt;，請直接在裝有SharePoint Service的server上做開發.. 如果有測試機器是再好不過的，就可以參考&lt;a href=&quot;http://blogs.msdn.com/b/sowmyancs/archive/2008/03/14/can-we-update-the-values-of-created-by-modified-by-columns-in-sharepoint-lists.aspx?PageIndex=2&quot; target=&quot;_blank&quot;&gt;這篇文章&lt;/a&gt;(Can we update the values of “Created By”, &amp;quot;Modified By” columns in SharePoint lists?)直接在Visual Studio上參考上述組件做開發。&lt;/p&gt;  &lt;p&gt;如果你正好沒有測試環境，而且也無法在production上安裝VisualStudio這麼龐大的怪物的話，就參考&lt;a href=&quot;http://blogs.msdn.com/b/tadd/archive/2008/05/22/updating-the-created-by-and-modified-by-columns-in-sharepoint-lists.aspx&quot; target=&quot;_blank&quot;&gt;這篇文章&lt;/a&gt;(Updating the “Created By” and &amp;quot;Modified By” Columns in SharePoint lists using POWERSHELL)。沒錯! 就是用&lt;a href=&quot;http://blogs.msdn.com/b/powershell/&quot; target=&quot;_blank&quot;&gt;POWERSHELL&lt;/a&gt;。這也是我用的方法。&lt;/p&gt;  &lt;p&gt;script:&lt;/p&gt;  &lt;div class=&quot;csharpcode&quot;&gt;   &lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;   1:  &lt;/span&gt;&lt;span class=&quot;rem&quot;&gt;# Get the SharePoint Assembly &lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;   2:  &lt;/span&gt;&lt;span class=&quot;rem&quot;&gt;# You will need to run this on the SharePoint Server&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;   3:  &lt;/span&gt;[Reflection.Assembly]::Load(&lt;span class=&quot;str&quot;&gt;&amp;quot;Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c&amp;quot;&lt;/span&gt;) &lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;   4:  &lt;/span&gt;&amp;#160;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;   5:  &lt;/span&gt;&lt;span class=&quot;rem&quot;&gt;# create a new object called $SPSite&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;   6:  &lt;/span&gt;&lt;span class=&quot;rem&quot;&gt;# Make sure you have the last “/” in the url on the site &lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;   7:  &lt;/span&gt;&lt;span class=&quot;rem&quot;&gt;# allow $SPWeb to be the OpenWeb from the site&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;   8:  &lt;/span&gt;$SPSite = New-Object Microsoft.SharePoint.SPSite(&lt;span class=&quot;str&quot;&gt;&amp;quot;http://server-name/&amp;quot;&lt;/span&gt;)&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;   9:  &lt;/span&gt;$SPWeb = $SPSite.OpenWeb() &lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;  10:  &lt;/span&gt;&amp;#160;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;  11:  &lt;/span&gt;&lt;span class=&quot;rem&quot;&gt;# Get the list ModifyCreatedBy &lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;  12:  &lt;/span&gt;$SPList = $SPWeb.Lists[&lt;span class=&quot;str&quot;&gt;&amp;quot;ListName&amp;quot;&lt;/span&gt;] &lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;  13:  &lt;/span&gt;&amp;#160;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;  14:  &lt;/span&gt;&lt;span class=&quot;rem&quot;&gt;# Get the Collection of the List Items&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;  15:  &lt;/span&gt;$SPListItemCollection = $SPList.Items &lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;  16:  &lt;/span&gt;&amp;#160;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;  17:  &lt;/span&gt;&lt;span class=&quot;rem&quot;&gt;# iterate the Collection&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;  18:  &lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;foreach&lt;/span&gt; ($ListItem &lt;span class=&quot;kwrd&quot;&gt;in&lt;/span&gt; $SPListItemCollection) &lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;  19:  &lt;/span&gt;{&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;  20:  &lt;/span&gt;&amp;#160;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;  21:  &lt;/span&gt;  &lt;span class=&quot;rem&quot;&gt;# The user in this case was UserA with id of 8 from the SPWeb users &lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;  22:  &lt;/span&gt;  $SPFieldUserValue = New-Object Microsoft.SharePoint.SPFieldUserValue($SPWeb,8,&lt;span class=&quot;str&quot;&gt;&amp;quot;UserA&amp;quot;&lt;/span&gt;) &lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;  23:  &lt;/span&gt;&amp;#160;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;  24:  &lt;/span&gt;  $ListItem[&lt;span class=&quot;str&quot;&gt;&amp;quot;Author&amp;quot;&lt;/span&gt;] = $SPFieldUserValue&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;  25:  &lt;/span&gt;&amp;#160;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;  26:  &lt;/span&gt;  &lt;span class=&quot;rem&quot;&gt;# Note: Editor will be the account that you are running the Powershell under unless you update Editor as well &lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;  27:  &lt;/span&gt;  &lt;span class=&quot;rem&quot;&gt;# ListItem[&amp;quot;Editor&amp;quot;] = $SPFieldUserValue&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;  28:  &lt;/span&gt;&amp;#160;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;  29:  &lt;/span&gt;  $ListItem.Update() &lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;  30:  &lt;/span&gt;} &lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;  31:  &lt;/span&gt;&amp;#160;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;  32:  &lt;/span&gt;$SPWeb.Update() &lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;  33:  &lt;/span&gt;&amp;#160;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;  34:  &lt;/span&gt;&lt;span class=&quot;rem&quot;&gt;# Still TODO Disposes, Error Checking, Change to take Parameters, etc&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;  35:  &lt;/span&gt;&amp;#160;&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&amp;#160; &lt;br /&gt;上面的script是改了整個指定清單的建立者欄位，如果你還需要先判斷是那些文件，可以參考一下&lt;a href=&quot;http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.splistitem_members(v=office.12).aspx&quot; target=&quot;_blank&quot;&gt;MSDN Library&lt;/a&gt;看看SPListItem還有哪些properities可以用。若是powershell語法不熟的話(尤其他又喜歡跟一般語法同.... 特別是比較運算子...)，請參考reference#4, #5，或自行google。&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;嗯.. 大概就以上資訊，即可作業!!&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Ref:&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;br /&gt;  &lt;li&gt;&lt;a href=&quot;http://social.msdn.microsoft.com/Forums/en/sharepointdevelopment/thread/95511fa3-4995-4cab-bef7-922f5dd31fc8&quot; target=&quot;_blank&quot;&gt;[SharePoint Forums] Could not find Microsoft.SharePoint.Library.dll&lt;/a&gt; &lt;/li&gt;&lt;br /&gt;&lt;br /&gt;  &lt;li&gt;&lt;a href=&quot;http://blogs.msdn.com/b/sowmyancs/archive/2008/03/14/can-we-update-the-values-of-created-by-modified-by-columns-in-sharepoint-lists.aspx?PageIndex=2&quot; target=&quot;_blank&quot;&gt;[MSDN Blog] Can we update the values of “Created By”, &amp;quot;Modified By” columns in SharePoint lists?&lt;/a&gt; &lt;/li&gt;&lt;br /&gt;&lt;br /&gt;  &lt;li&gt;&lt;a href=&quot;http://blogs.msdn.com/b/tadd/archive/2008/05/22/updating-the-created-by-and-modified-by-columns-in-sharepoint-lists.aspx&quot; target=&quot;_blank&quot;&gt;[MSDN Blog] Updating the “Created By” and &amp;quot;Modified By” Columns in SharePoint lists using POWERSHELL&lt;/a&gt; &lt;/li&gt;&lt;br /&gt;&lt;br /&gt;  &lt;li&gt;&lt;a href=&quot;http://technet.microsoft.com/zh-tw/library/ee176949(en-us).aspx&quot; target=&quot;_blank&quot;&gt;[TechNet 技術文件庫] Running Windows PowerShell Scripts&lt;/a&gt; &lt;/li&gt;&lt;br /&gt;&lt;br /&gt;  &lt;li&gt;&lt;a href=&quot;http://www.goodman-lai.idv.tw/search/label/scripting_PowerShell&quot; target=&quot;_blank&quot;&gt;[賴榮樞的軟體資訊誌] scripting_PowerShell tag&lt;/a&gt; &lt;/li&gt;&lt;br /&gt;&lt;br /&gt;  &lt;li&gt;&lt;a href=&quot;http://msdn.microsoft.com/en-us/library/ms464984(v=office.12).aspx&quot; target=&quot;_blank&quot;&gt;[MSDN Library] Microsoft.SharePoint Namespace&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;  </content><link rel='replies' type='application/atom+xml' href='http://qwinn-aileen.blogspot.com/feeds/618137521238880/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://qwinn-aileen.blogspot.com/2010/12/sharepoint.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4406536207427936366/posts/default/618137521238880'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4406536207427936366/posts/default/618137521238880'/><link rel='alternate' type='text/html' href='http://qwinn-aileen.blogspot.com/2010/12/sharepoint.html' title='修改SharePoint網站之清單&amp;quot;建立者&amp;quot;欄位'/><author><name>AileenWu</name><uri>http://www.blogger.com/profile/16167996176008066590</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='25' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjaG4pCwbsyiCMfUkqNEW5KIV6QaKq1kpRGuVwFuqO_H8CiwmSZzZfofD0VBV7KZQUkqwbh5YMGDQORK2xZoW8tiyRCmLkM9OkJpGHjOUj32k27H3QiQPxwqx7uH4KxPAw/s220/吾唯知足.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4406536207427936366.post-1917937628263468823</id><published>2010-11-15T17:31:00.001+08:00</published><updated>2010-11-17T15:44:47.547+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="freebsd"/><category scheme="http://www.blogger.com/atom/ns#" term="mail"/><title type='text'>poppassd + roundcube on FreeBSD</title><content type='html'>&lt;p&gt;最近因為被&lt;a href=&quot;http://roundcube.net/&quot; target=&quot;_blank&quot;&gt;roundcube&lt;/a&gt;的美貌所吸引，所以正在考慮是否拿它來當webmail。roundcube最大的特點就是: 相當美+相當陽春。&lt;/p&gt;  &lt;p&gt;紀錄一下poppassd跟roundcube怎麼搭配，讓使用者可以在web介面上直接改密碼，而不需要登入freebsd系統.. roundcube的安裝部分就不介紹了，直接來poppassd的部分。&lt;/p&gt;  &lt;div class=&quot;block_dotted&quot;&gt;Environment:    &lt;br /&gt;OS: FreeBSD 8.1-RELEASE-p1     &lt;br /&gt;roundcube: 0.4.2     &lt;br /&gt;poppassd: 4.0_3 &lt;/div&gt;  &lt;p&gt;&lt;strong&gt;STEP1: Install poppassd &lt;/strong&gt;&lt;/p&gt;  &lt;div class=&quot;cmdline&quot;&gt;# cd /usr/ports/mail/poppassd/    &lt;br /&gt;# make install clean&lt;/div&gt;  &lt;p&gt;By default, you can find the binary in /usr/local/libexec&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;STEP2: Startup setting&lt;/strong&gt;&lt;/p&gt;  &lt;div class=&quot;cmdline&quot;&gt;# man poppassd&lt;/div&gt;  &lt;p&gt;Modify /etc/inetd.conf AND /etc/services AND /etc/syslog.conf as describe in the man page.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;STEP3: Auto-start inetd when reboot&lt;/strong&gt;     &lt;br /&gt;Modify /etc/rc.conf AND add:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;# inetd&lt;/p&gt;    &lt;p&gt;inetd_enable=&amp;quot;YES&amp;quot;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&lt;strong&gt;STEP4: restart inetd&lt;/strong&gt;&lt;/p&gt;  &lt;div class=&quot;cmdline&quot;&gt;# /etc/rc.d/inetd restart&lt;/div&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;STEP5: Config roundcube plugin      &lt;br /&gt;&lt;/strong&gt;Modify /usr/local/www/roundcube/plugins/password/config.inc.php&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;// Select a driver to use, see README for more driver name&lt;/p&gt;    &lt;p&gt;$rcmail_config[&#39;password_driver&#39;] = &#39;poppassd&#39;;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&lt;strong&gt;STEP6: Add roundcube plugin      &lt;br /&gt;&lt;/strong&gt;Modify /usr/local/www/roundcube/config/main.inc.php&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;// List of active plugins (in plugins/ directory)      &lt;br /&gt;$rcmail_config[&#39;plugins&#39;] = array(&#39;password&#39;);&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&lt;strong&gt;STEP FINAL: Restart roundcube and apache&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Ref:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;&lt;a href=&quot;http://www.freshports.org/mail/poppassd/&quot; target=&quot;_blank&quot;&gt;[FRESH ports] poppassd&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href=&quot;http://www.netwinsite.com/poppassd/&quot; target=&quot;_blank&quot;&gt;Poppassd – Installation and Management Guide&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href=&quot;http://trac.roundcube.net/browser/trunk/plugins/password&quot; target=&quot;_blank&quot;&gt;roundcube wiki – plugins/password&lt;/a&gt; &lt;/li&gt; &lt;/ol&gt;  </content><link rel='replies' type='application/atom+xml' href='http://qwinn-aileen.blogspot.com/feeds/1917937628263468823/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://qwinn-aileen.blogspot.com/2010/11/poppassd-roundcube-on-freebsd.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4406536207427936366/posts/default/1917937628263468823'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4406536207427936366/posts/default/1917937628263468823'/><link rel='alternate' type='text/html' href='http://qwinn-aileen.blogspot.com/2010/11/poppassd-roundcube-on-freebsd.html' title='poppassd + roundcube on FreeBSD'/><author><name>AileenWu</name><uri>http://www.blogger.com/profile/16167996176008066590</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='25' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjaG4pCwbsyiCMfUkqNEW5KIV6QaKq1kpRGuVwFuqO_H8CiwmSZzZfofD0VBV7KZQUkqwbh5YMGDQORK2xZoW8tiyRCmLkM9OkJpGHjOUj32k27H3QiQPxwqx7uH4KxPAw/s220/吾唯知足.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4406536207427936366.post-72636124647466577</id><published>2010-10-21T13:21:00.001+08:00</published><updated>2010-10-21T13:30:08.194+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="windows"/><title type='text'>iSCSI target crash when selecting ‘Device’ node</title><content type='html'>&lt;p&gt;OS: Windows Storage Server 2003 R2   &lt;br /&gt;iSCSI target version: 3.1.3412&lt;/p&gt;  &lt;p&gt;如題，一個很久以前就注意到的問題，不過因為沒有急迫性，就一直不理他XD。這兩天因為要整理一些空間出來用，只好處理一下。&lt;/p&gt;  &lt;p&gt;於是找到一篇&lt;a href=&quot;http://forums13.itrc.hp.com/service/forums/questionanswer.do?admit=109447627+1287637687642+28353475&amp;amp;threadId=1380363&quot; target=&quot;_blank&quot;&gt;HP論壇裡的討論串&lt;/a&gt;，裡面有人提到是微軟的一個更新造成的...&lt;/p&gt;  &lt;p&gt;請找&lt;strong&gt;&lt;font color=&quot;#ff0000&quot;&gt;KB973507&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;這個更新是2009/8/11出來的，如果有人遇到同樣的問題，大概也是這個時點之後，把這個更新移除後重開機，iSCSI target就可以正常使用了~&lt;/p&gt;  &lt;p&gt;另外也有一份文件提到:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;Issue: Installing Microsoft security update KB973507 results in the Microsoft iSCSI Software Target not displaying      &lt;br /&gt;iSCSI target devices when the Devices node is selected in the iSCSI Target management console.&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Ref:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;&lt;a href=&quot;http://forums13.itrc.hp.com/service/forums/questionanswer.do?admit=109447627+1287637687642+28353475&amp;amp;threadId=1380363&quot; target=&quot;_blank&quot;&gt;[HP IT Resource Center Forums] AiO 600 - problem with Microsoft iSCSI target snapin&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href=&quot;http://h10032.www1.hp.com/ctg/Manual/c02059956.pdf&quot; target=&quot;_blank&quot;&gt;[pdf] HP StorageWorks P4000 Unified NAS Gateway Release Notes&lt;/a&gt; &lt;/li&gt; &lt;/ol&gt;  </content><link rel='replies' type='application/atom+xml' href='http://qwinn-aileen.blogspot.com/feeds/72636124647466577/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://qwinn-aileen.blogspot.com/2010/10/iscsi-target-crash-when-selecting.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4406536207427936366/posts/default/72636124647466577'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4406536207427936366/posts/default/72636124647466577'/><link rel='alternate' type='text/html' href='http://qwinn-aileen.blogspot.com/2010/10/iscsi-target-crash-when-selecting.html' title='iSCSI target crash when selecting ‘Device’ node'/><author><name>AileenWu</name><uri>http://www.blogger.com/profile/16167996176008066590</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='25' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjaG4pCwbsyiCMfUkqNEW5KIV6QaKq1kpRGuVwFuqO_H8CiwmSZzZfofD0VBV7KZQUkqwbh5YMGDQORK2xZoW8tiyRCmLkM9OkJpGHjOUj32k27H3QiQPxwqx7uH4KxPAw/s220/吾唯知足.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4406536207427936366.post-188454354783117885</id><published>2010-09-30T10:18:00.001+08:00</published><updated>2010-09-30T10:21:25.820+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="oracle"/><title type='text'>Oracle shutdown hangs: forgot the ‘immediate’ option</title><content type='html'>&lt;p&gt;一個簡單的小問題，不過還滿常發生的=&amp;#160;&amp;#160; =||&lt;/p&gt;  &lt;p&gt;一般需要關閉資料庫時，都會下&#39;shutdown immediate’指令，有了immediate選項，Oracle不需等待所有連線關閉。反之，若只有下&#39;shutdown&#39;指令，也就是&#39;shutdown normal&#39;，Oracle就會等到所有連線都結束後才關閉，通常都關不下來... 這時候就算又開了新的連線想重下指令，都會收到類似&amp;quot;Not connected to Oracle&amp;quot;這類的訊息.. 這時候!! &lt;/p&gt;  &lt;p&gt;可以另外開一個新連線這麼做:&lt;/p&gt;  &lt;div class=&quot;block_dotted&quot;&gt;SQL&amp;gt; conn sys as sysdba    &lt;br /&gt;輸入密碼:     &lt;br /&gt;連線至閒置的執行處理.     &lt;br /&gt;&lt;strong&gt;&lt;font color=&quot;#ff0000&quot;&gt;SQL&amp;gt; startup force&lt;/font&gt;&lt;/strong&gt;     &lt;br /&gt;已啟動 ORACLE 執行處理.     &lt;br /&gt;……(資料庫已掛載./資料庫已開啟.)     &lt;br /&gt;SQL&amp;gt; shutdown immediate&lt;/div&gt;  &lt;p&gt;這樣就可以成功的把資料庫關下來囉~&lt;/p&gt;  &lt;p&gt;另一邊原本正在shutdown的視窗可能會看見如下過程: &lt;/p&gt;  &lt;div class=&quot;block_dotted&quot;&gt;SQL&amp;gt; shutdown    &lt;br /&gt;ORA-03113: 通訊通道上出現 EOF     &lt;p&gt;&lt;/p&gt; SQL&amp;gt; ^F^D     &lt;br /&gt;SP2-0042: 未知的命令 &amp;quot;&amp;quot; － 此行的剩餘部份被略過不予處理 &lt;/div&gt;  &lt;p&gt;完工!&lt;/p&gt;  </content><link rel='replies' type='application/atom+xml' href='http://qwinn-aileen.blogspot.com/feeds/188454354783117885/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://qwinn-aileen.blogspot.com/2010/09/oracle-shutdown-hangs-forgot-immediate.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4406536207427936366/posts/default/188454354783117885'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4406536207427936366/posts/default/188454354783117885'/><link rel='alternate' type='text/html' href='http://qwinn-aileen.blogspot.com/2010/09/oracle-shutdown-hangs-forgot-immediate.html' title='Oracle shutdown hangs: forgot the ‘immediate’ option'/><author><name>AileenWu</name><uri>http://www.blogger.com/profile/16167996176008066590</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='25' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjaG4pCwbsyiCMfUkqNEW5KIV6QaKq1kpRGuVwFuqO_H8CiwmSZzZfofD0VBV7KZQUkqwbh5YMGDQORK2xZoW8tiyRCmLkM9OkJpGHjOUj32k27H3QiQPxwqx7uH4KxPAw/s220/吾唯知足.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4406536207427936366.post-4987276444985812053</id><published>2010-09-16T14:48:00.001+08:00</published><updated>2010-09-16T14:53:18.107+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="office"/><title type='text'>office: 使用萬用字元進行尋找/取代作業</title><content type='html'>&lt;p&gt;今天發現office的尋找功能還滿強大的，介紹一些使用萬用字元搜尋/取代的方法：首先最基本的就是要會打開「尋找及取代」的視窗XD，在「更多(&lt;u&gt;M&lt;/u&gt;)&amp;gt;&amp;gt;」選項裡把「使用萬用字元(&lt;u&gt;U&lt;/u&gt;)」選項給勾起來。&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;尋找符合「HH:MM:SS」的時間格式: 最簡易且不嚴謹的寫法可以用「??:??:??」。「?」表示任何單一字元，所以如果你的文件裡有「AA:BB:CC」這樣的字串，它也會符合尋找目標，但卻不符合我們只想尋找時間格式的目的。所以可以改寫成「[0-9]{2}:[0-9]{2}:[0-9]{2}」，就是三組「[0-9]{2}」被兩個冒號隔開來，其中「[0-9]」表示0到9之間的其中一個數字，「{2}」表示前一個字元或運算式必須出現2次。所以利用三組「[0-9]{2}」與冒號就可以找出符合的格式。 &lt;/li&gt;    &lt;li&gt;在找到的「HH:MM:SS」時間格式前後加上「*」: 這時候就要需要取代功能的搭配了。在取代的頁籤裡，「取代為」的表示式該怎麼寫呢? 我希望找到所有的符合的時間格式並在他前後加上星號，卻不希望更改了時間的值。一開始嘗試用「*[0-9]{2}:[0-9]{2}:[0-9]{2}*」，結果他就把所有時間格式整個直接取代成「*[0-9]{2}:[0-9]{2}:[0-9]{2}*」的字樣OTZ。正確做法應該是把尋找目標寫成「&lt;font color=&quot;#ff0000&quot;&gt;(&lt;/font&gt;[0-9]{2}&lt;font color=&quot;#ff0000&quot;&gt;)&lt;/font&gt;:&lt;font color=&quot;#ff0000&quot;&gt;(&lt;/font&gt;[0-9]{2}&lt;font color=&quot;#ff0000&quot;&gt;)&lt;/font&gt;:&lt;font color=&quot;#ff0000&quot;&gt;(&lt;/font&gt;[0-9]{2}&lt;font color=&quot;#ff0000&quot;&gt;)&lt;/font&gt;」， 取代寫成「*\1:\2:\3*」。「\1」, 「\2」, 「\3」依序代表尋找目標的三組括號裡的值! 這個技巧主要用在你真正的目的不是「取代」，而是利用尋找到的目標再做一些位置上的變化或像此處加上其他字元符號的應用。&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;以上兩個就是今天有用到的精隨啦~ 當然還有很多種變化，像是{2,}則表示前面的字元或運算式至少要出現2次，若是{2,4}就表示前面的字元或運算式須出現2-4次。另外在不使用萬用字元的情況下也可用「代碼」來尋找特殊的格式或字元：&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;將空白行去除: 搜尋目標以「^p^p」表示(記得不必勾「使用萬用字元(&lt;u&gt;U&lt;/u&gt;)」)。一個「^p」表示一個換行符號，兩個「^p^p」就會空一行，所以將「^p^p」取代為「^p」，就可以將空白行去掉了。&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;其他還有許多用法請參閱reference。&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Ref:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;&lt;a href=&quot;http://office.microsoft.com/zh-tw/word-help/HA001230392.aspx&quot; target=&quot;_blank&quot;&gt;Office產品支援中心: 尋找及取代文字或其他項目&lt;/a&gt;&lt;/li&gt; &lt;/ol&gt;  </content><link rel='replies' type='application/atom+xml' href='http://qwinn-aileen.blogspot.com/feeds/4987276444985812053/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://qwinn-aileen.blogspot.com/2010/09/office.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4406536207427936366/posts/default/4987276444985812053'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4406536207427936366/posts/default/4987276444985812053'/><link rel='alternate' type='text/html' href='http://qwinn-aileen.blogspot.com/2010/09/office.html' title='office: 使用萬用字元進行尋找/取代作業'/><author><name>AileenWu</name><uri>http://www.blogger.com/profile/16167996176008066590</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='25' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjaG4pCwbsyiCMfUkqNEW5KIV6QaKq1kpRGuVwFuqO_H8CiwmSZzZfofD0VBV7KZQUkqwbh5YMGDQORK2xZoW8tiyRCmLkM9OkJpGHjOUj32k27H3QiQPxwqx7uH4KxPAw/s220/吾唯知足.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4406536207427936366.post-4832646251602378174</id><published>2010-09-01T10:12:00.001+08:00</published><updated>2010-09-01T10:12:44.383+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ora-xxxxx"/><category scheme="http://www.blogger.com/atom/ns#" term="oracle"/><title type='text'>(ORA-01031) Cannot create/edit view with the owner of the schema</title><content type='html'>&lt;p&gt;environment: enterprise linux + oracle11gr2&lt;/p&gt;  &lt;p&gt;前情提要:    &lt;br /&gt;userA先生在9i的時代運作得相當正常，當然包含本篇所要探討的小小新建一個view的動作。升級到11g之後某天，卻發現userA再也無法在自己的schema下create view... 這麼小小一件事情都辦不到!!! 檢查了權限也跟9i時代完全相同(就是CONNECT, RESOURCE, UNLIMITED TABLESPACE這麼簡單，所以也沒把腦筋動到權限上)，なんで??? 當時為了應急直接用dba帳號幫他處理掉了，今天又遇到一次，該是要面對的時候了..&lt;/p&gt;  &lt;p&gt;一開始看到的都是在說&amp;quot;物件的權限需要直接grant給指定的人，不要透過角色(ROLE)來做&amp;quot;這件事情，因為在所有stroe procedures或PL/SQL block裡，角色權限是不會起作用的(All roles are disabled inside stored procedures.)等，不過這並不是我的情況..&lt;/p&gt;  &lt;p&gt;無意間看到&lt;a href=&quot;http://www.lifeaftercoffee.com/2005/08/29/oracle-connect-and-resource-roles/&quot; target=&quot;_blank&quot;&gt;這篇文章&lt;/a&gt;在探討Oracle的Role包含了那些權限，才恍然大悟...&lt;/p&gt;  &lt;p&gt;9ir2的CONNECT角色裡包含了&amp;quot;CREATE VIEW&amp;quot;的權限，但在11g裡，CONNECT的角色卻只剩下&amp;quot;CREATE SESSION&amp;quot;的權限... 就這麼簡單... 所以在11g要另外把CREATE VIEW的權限grant給userA先生，這樣就可以正常新建/修改view了... 就這樣orz&lt;/p&gt;  &lt;p&gt;若要詳細列出角色所包含的權限，可使用以下查詢:&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;SQL&amp;gt; select * from ROLE_SYS_PRIVS where role=&#39;CONNECT&#39;;     &lt;br /&gt;&lt;/strong&gt;(ROLE_SYS_PRIVS: 列出登入帳號所有擁的角色，及角色所包含的系統權限)&lt;/p&gt;  &lt;p&gt;或者也可以這樣查:&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;SQL&amp;gt; select * from DBA_SYS_PRIVS where grantee=&#39;CONNECT&#39;;&lt;/strong&gt;    &lt;br /&gt;(DBA_SYS_PRIVS: 列出所有user/role所擁有的系統權限)&lt;/p&gt;  </content><link rel='replies' type='application/atom+xml' href='http://qwinn-aileen.blogspot.com/feeds/4832646251602378174/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://qwinn-aileen.blogspot.com/2010/09/ora-01031-cannot-createedit-view-with.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4406536207427936366/posts/default/4832646251602378174'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4406536207427936366/posts/default/4832646251602378174'/><link rel='alternate' type='text/html' href='http://qwinn-aileen.blogspot.com/2010/09/ora-01031-cannot-createedit-view-with.html' title='(ORA-01031) Cannot create/edit view with the owner of the schema'/><author><name>AileenWu</name><uri>http://www.blogger.com/profile/16167996176008066590</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='25' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjaG4pCwbsyiCMfUkqNEW5KIV6QaKq1kpRGuVwFuqO_H8CiwmSZzZfofD0VBV7KZQUkqwbh5YMGDQORK2xZoW8tiyRCmLkM9OkJpGHjOUj32k27H3QiQPxwqx7uH4KxPAw/s220/吾唯知足.png'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4406536207427936366.post-1610861576307165185</id><published>2010-08-25T10:48:00.002+08:00</published><updated>2010-08-25T10:53:11.320+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="SQLSvr"/><title type='text'>Error: 5243: An inconsistency was detected during an internal operation.</title><content type='html'>&lt;p&gt;Environment: WinServer2008 SP2+SQL Server 2008&lt;/p&gt;  &lt;p&gt;昨天檢查SQL Server的時候在記錄檔裡看見一整串長相不凡的訊息... 大概長這樣: &lt;/p&gt;  &lt;div class=&quot;block_dotted&quot;&gt;ex_raise2: Exception raised, major=52, minor=43, state=8, severity=22, attempting to create symptom dump    &lt;br /&gt;Using &#39;dbghelp.dll&#39; version &#39;4.0.5&#39;     &lt;br /&gt;***Stack Dump being sent to D:\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\LOG\SQLDump0001.txt     &lt;br /&gt;... (略)     &lt;br /&gt;錯誤: 5243，嚴重性: 22，狀態: 8。     &lt;br /&gt;An inconsistency was detected during an internal operation. Please contact technical support.&lt;/div&gt;  &lt;p&gt;最明顯的訊息大概就最後兩行了吧... 另外一個dump file內容更是人類無法閱讀=&amp;#160;&amp;#160; =，明顯是要給機器讀的。&lt;/p&gt;  &lt;p&gt;先是找到這篇: &lt;a href=&quot;http://support.microsoft.com/kb/828337/en-us/&quot; target=&quot;_blank&quot;&gt;M$技術支援, Article ID:828337: An assertion or Msg 7987 may occur when an operation is performed on an instance of SQL Server&lt;/a&gt;.    &lt;br /&gt;標題看起來不怎麼有關係，不過內容確實有一些蛛絲馬跡。最早在SQL Server2000執行SELECT或UPDATE之類的transact-SQL時，就可能會有3624的錯誤訊息，而同樣的錯誤在SQL Server2005, 2008則是錯誤5242或5243。&lt;/p&gt;  &lt;p&gt;造成5242/5243錯誤的原因只有簡單一小行: The problem may occur if inconsistencies exist in the databases on the instance of SQL Server....   &lt;br /&gt;還好相當有良心的還有solution.. &lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;On the instance of SQL Server where the failure occurred, run the DBCC CHECKDB Transact-SQL command on all the databases.&lt;/li&gt;    &lt;li&gt;If the DBCC CHECKDB Transact-SQL command reports errors that indicate database inconsistencies, resolve the errors.&lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;哈哈哈(乾笑三聲)... 一點都沒有好人做到底，送佛送到西的精神XD，連CHECKDB都不認識請參閱&lt;a href=&quot;http://msdn.microsoft.com/en-us/library/aa258278(SQL.80).aspx&quot; target=&quot;_blank&quot;&gt;這兒&lt;/a&gt;(2000)或&lt;a href=&quot;http://msdn.microsoft.com/en-us/library/ms176064(v=SQL.100).aspx&quot; target=&quot;_blank&quot;&gt;這兒&lt;/a&gt;(2008)。&lt;/p&gt;  &lt;p&gt;所以就找了時間針對SQL Server裡的每個資料庫跑了下面這串指令。&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;DBCC CHECKDB(‘&lt;/strong&gt;&lt;em&gt;DB_NAME&lt;/em&gt;&lt;strong&gt;’) WITH ALL_ERRORMSGS;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;(如果資料庫真的相當龐大，建議加個PHYSICAL_ONLY選項..)   &lt;br /&gt;結果每個資料庫的檢查結果都正常@_@a.. 雖然是個好消息，不過還是滿令人錯愕的阿XD 資料庫不會平白無故地耍人吧OTZ，所以不死心又多看了幾篇文章，終於，Paul S. Randal先生(SQL Server MVP, 撰寫2005 DBCC CHECKDB的人，&lt;a href=&quot;http://technet.microsoft.com/zh-tw/magazine/ff808322.aspx&quot; target=&quot;_blank&quot;&gt;這篇文章&lt;/a&gt;最後有簡介)給了個比較讓人釋懷的&lt;a href=&quot;http://www.sqlskills.com/BLOGS/PAUL/post/Corruption-errors-Msg-5242-Level-22.aspx&quot; target=&quot;_blank&quot;&gt;說明&lt;/a&gt;。&lt;/p&gt;  &lt;p&gt;基本上5242跟5243是一樣的錯誤，不過5242會明確指出資料庫的哪個地方出了問題，5243卻是不明原因，資料庫無法指出的錯誤所丟出來的。雖然記錄檔紀錄了相關的訊息，這中間有可能其他的維護作業重建了索引，currupt pages被釋放，所以事後跑checkdb就看不出有任何錯誤。&lt;/p&gt;  &lt;p&gt;大致上就這樣囉~&lt;/p&gt;  &lt;p&gt;Ref: &lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;&lt;a href=&quot;http://support.microsoft.com/kb/828337/en-us?fr=1&quot; target=&quot;_blank&quot;&gt;Microsoft Support KB828337&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href=&quot;http://msdn.microsoft.com/en-us/library/ms176064(v=SQL.100).aspx&quot; target=&quot;_blank&quot;&gt;MSDN: DBCC CHECKDB (SQL Server2008)&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href=&quot;http://www.sqlskills.com/BLOGS/PAUL/post/Corruption-errors-Msg-5242-Level-22.aspx&quot; target=&quot;_blank&quot;&gt;Corruption errors: Msg 5242, Level 22&lt;/a&gt;&lt;/li&gt; &lt;/ol&gt;  </content><link rel='replies' type='application/atom+xml' href='http://qwinn-aileen.blogspot.com/feeds/1610861576307165185/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://qwinn-aileen.blogspot.com/2010/08/error-5243-inconsistency-was-detected.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4406536207427936366/posts/default/1610861576307165185'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4406536207427936366/posts/default/1610861576307165185'/><link rel='alternate' type='text/html' href='http://qwinn-aileen.blogspot.com/2010/08/error-5243-inconsistency-was-detected.html' title='Error: 5243: An inconsistency was detected during an internal operation.'/><author><name>AileenWu</name><uri>http://www.blogger.com/profile/16167996176008066590</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='25' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjaG4pCwbsyiCMfUkqNEW5KIV6QaKq1kpRGuVwFuqO_H8CiwmSZzZfofD0VBV7KZQUkqwbh5YMGDQORK2xZoW8tiyRCmLkM9OkJpGHjOUj32k27H3QiQPxwqx7uH4KxPAw/s220/吾唯知足.png'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4406536207427936366.post-7906804607832492837</id><published>2010-08-05T14:57:00.001+08:00</published><updated>2010-08-05T14:57:59.713+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="mobile"/><title type='text'>[Mobile Phone] EDGE, 3G and HSDPA</title><content type='html'>&lt;p&gt;筆記一下行動電話通訊技術:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;GSM(Global System for Mobile Communication), 全球行動通訊系統     &lt;br /&gt;GSM是目前傳統行動電話最廣泛使用的通訊標準，1990年由歐洲電信標準協會(ETSI)制定出第一版標準，發展至今。GSM也是我們熟知的2G--二代行動通訊；二代與前代的最大差異就是在他的信號與語音通道都是數位的。也因為GSM標準的廣泛使用，使全球行動電話廠商間可簽訂&amp;quot;漫遊協定&amp;quot;，讓用戶於不同國家也能使用行動電話(使用漫遊服務)。      &lt;br /&gt;&lt;/li&gt;    &lt;li&gt;GPRS(General Packet Radio Service), 通用封包無線服務     &lt;br /&gt;GPRS是GSM行動電話用戶可用的一種移動數據服務，約於2000年開始商用，被視為是2.5G。它使用GSM網路中未被使用的&lt;a href=&quot;http://en.wikipedia.org/wiki/Time_division_multiple_access&quot; target=&quot;_blank&quot;&gt;TDMA&lt;/a&gt;通道，使得GSM系統能夠以效率更高的&amp;quot;封包&amp;quot;方式提供數據通訊，也就是說多個用戶可以共享一個相同的傳輸通道，每個用戶只有在傳輸數據的時候才會佔用通道；所以其計費方式也不同於電路交換的以秒計費，而是以KB計。      &lt;br /&gt;&lt;/li&gt;    &lt;li&gt;EDGE(Enhanced Data rates for GSM Evolution), GSM數據速度增強版     &lt;br /&gt;EDGE約於2003年開始商用，亦不屬於GSM網路中，可視為GSM(2G)和GPRS(2.5G)的延伸，所以有時稱為2.75G。EDGE也可寫作EGPRS, Enhanced GPRS, 因為它引進一個GPRS所沒有使用的技術: Incremental Redundancy, 此技術使用更多的冗於資訊來與接收端連接，取代重新發送受干擾的封包，藉此提高解碼的正確性。雖是介於2G與3G間，但是EDGE的數據傳輸最大理論值473.6Kbps已經達到3G標準。      &lt;br /&gt;&lt;/li&gt;    &lt;li&gt;3G(3rd-Generation), 第三代行動通訊     &lt;br /&gt;3G，也就是IMT-2000，是國際電信聯盟(ITU)定義的第三代無線通訊的全球標準，於1988年開始由&lt;a href=&quot;http://en.wikipedia.org/wiki/3GPP&quot; target=&quot;_blank&quot;&gt;3GPP&lt;/a&gt;制定規範。3G將無線通訊與國際網際網路等多媒體通訊結合，能同時傳送聲音(通話)及數據資訊(電子郵件、即時通訊等)。無線網路必須能夠支持不同的數據傳輸速度，也就是說在室內、室外和行車的環境中能夠分別支持至少2Mbps、 384kbps以及144kbps的傳輸速度。由於採用&lt;a href=&quot;http://www.funddj.com/kmdj/wiki/wikiviewer.aspx?keyid=08fb462b-aba2-4cf8-ad27-51e8a733f085&quot; target=&quot;_blank&quot;&gt;蜂巢式行動通訊&lt;/a&gt;技術，3G標準的通訊質量較之前大幅改善。      &lt;br /&gt;&lt;/li&gt;    &lt;li&gt;HSDPA(High-Speed Downlink Packet Access), 高速下行封包存取     &lt;br /&gt;3.5G, 基於3G網路系統，可提供高達7.2mbit/s的數據傳輸速度。&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Ref: &lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/GSM&quot; target=&quot;_blank&quot;&gt;[Wiki] GSM&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/General_Packet_Radio_Service&quot; target=&quot;_blank&quot;&gt;[Wiki] GPRS&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/Enhanced_Data_Rates_for_GSM_Evolution&quot; target=&quot;_blank&quot;&gt;[Wiki] EDGE&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/3G&quot; target=&quot;_blank&quot;&gt;[Wiki] 3G&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/High-Speed_Downlink_Packet_Access&quot; target=&quot;_blank&quot;&gt;[Wiki] HSDPA&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href=&quot;http://www.clove.co.uk/viewTechInfo.aspx?Content=3B2BD491-6465-4C70-ABDB-5A12A06C3D8D&amp;amp;Category=TECHINFO&quot; target=&quot;_blank&quot;&gt;[Clove] Guide to GSM, GPRS, EDGE, 3G and HSDPA&lt;/a&gt;&lt;/li&gt; &lt;/ol&gt;  </content><link rel='replies' type='application/atom+xml' href='http://qwinn-aileen.blogspot.com/feeds/7906804607832492837/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://qwinn-aileen.blogspot.com/2010/08/mobile-phone-edge-3g-and-hsdpa.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4406536207427936366/posts/default/7906804607832492837'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4406536207427936366/posts/default/7906804607832492837'/><link rel='alternate' type='text/html' href='http://qwinn-aileen.blogspot.com/2010/08/mobile-phone-edge-3g-and-hsdpa.html' title='[Mobile Phone] EDGE, 3G and HSDPA'/><author><name>AileenWu</name><uri>http://www.blogger.com/profile/16167996176008066590</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='25' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjaG4pCwbsyiCMfUkqNEW5KIV6QaKq1kpRGuVwFuqO_H8CiwmSZzZfofD0VBV7KZQUkqwbh5YMGDQORK2xZoW8tiyRCmLkM9OkJpGHjOUj32k27H3QiQPxwqx7uH4KxPAw/s220/吾唯知足.png'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4406536207427936366.post-2744827383115813236</id><published>2010-08-05T13:16:00.001+08:00</published><updated>2010-08-05T13:16:54.088+08:00</updated><title type='text'>The lost July..</title><content type='html'>&lt;p&gt;消失的七月.. XD 相當不長進的一篇文章都沒有。&lt;/p&gt;  </content><link rel='replies' type='application/atom+xml' href='http://qwinn-aileen.blogspot.com/feeds/2744827383115813236/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://qwinn-aileen.blogspot.com/2010/08/lost-july.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4406536207427936366/posts/default/2744827383115813236'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4406536207427936366/posts/default/2744827383115813236'/><link rel='alternate' type='text/html' href='http://qwinn-aileen.blogspot.com/2010/08/lost-july.html' title='The lost July..'/><author><name>AileenWu</name><uri>http://www.blogger.com/profile/16167996176008066590</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='25' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjaG4pCwbsyiCMfUkqNEW5KIV6QaKq1kpRGuVwFuqO_H8CiwmSZzZfofD0VBV7KZQUkqwbh5YMGDQORK2xZoW8tiyRCmLkM9OkJpGHjOUj32k27H3QiQPxwqx7uH4KxPAw/s220/吾唯知足.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4406536207427936366.post-7943441436802350236</id><published>2010-06-11T14:02:00.001+08:00</published><updated>2010-06-11T14:02:09.969+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="interview"/><category scheme="http://www.blogger.com/atom/ns#" term="oracle"/><title type='text'>Q: What are SQLCODE and SQLERRM and why are they important for PL/SQL developers?</title><content type='html'>&lt;div class=&quot;block_dotted&quot;&gt;[類別] PL/SQL    &lt;br /&gt;[問題] 什麼是SQLCODE與SQLERRM，為什麼他們對PL/SQL開發者而言很重要?&lt;/div&gt;  &lt;p&gt;&lt;strong&gt;&lt;u&gt;Answer:        &lt;br /&gt;&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;SQLCODE與SQLERRM都是用在exception handler裡。&lt;/p&gt;  &lt;p&gt;SQLCODE會回傳exception的號碼，SQLERRM則是錯誤訊息內容。   &lt;br /&gt;最常見的用法就是搭配WHER OTHERS EXCEPTION使用:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;DECLARE&lt;/p&gt;    &lt;p&gt;&amp;#160;&amp;#160; v_code NUMBER;&lt;/p&gt;    &lt;p&gt;&amp;#160;&amp;#160; v_errm VARCHAR2(64);&lt;/p&gt;    &lt;p&gt;BEGIN&lt;/p&gt;    &lt;p&gt;&amp;#160;&amp;#160; ………&lt;/p&gt;    &lt;p&gt;EXCEPTION&lt;/p&gt;    &lt;p&gt;&amp;#160;&amp;#160; WHEN OTHERS THEN&lt;/p&gt;    &lt;p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;strong&gt;v_code := SQLCODE;&lt;/strong&gt;&lt;/p&gt;    &lt;p&gt;&lt;strong&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; v_errm := TO_CHAR(SQLERRM(v_code));&lt;/strong&gt;&lt;/p&gt;    &lt;p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; DBMS_OUTPUT.PUTLINE(‘ERRCODE ’ || v_code);&lt;/p&gt;    &lt;p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; DBMS_OUTPUT.PUTLINE(‘ERRMSG ’ || v_errm);&lt;/p&gt;    &lt;p&gt;END;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;重要性? 當然是... 你可以處理exceptions，知道更詳細的訊息囉。&lt;/p&gt;  </content><link rel='replies' type='application/atom+xml' href='http://qwinn-aileen.blogspot.com/feeds/7943441436802350236/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://qwinn-aileen.blogspot.com/2010/06/q-what-are-sqlcode-and-sqlerrm-and-why.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4406536207427936366/posts/default/7943441436802350236'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4406536207427936366/posts/default/7943441436802350236'/><link rel='alternate' type='text/html' href='http://qwinn-aileen.blogspot.com/2010/06/q-what-are-sqlcode-and-sqlerrm-and-why.html' title='Q: What are SQLCODE and SQLERRM and why are they important for PL/SQL developers?'/><author><name>AileenWu</name><uri>http://www.blogger.com/profile/16167996176008066590</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='25' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjaG4pCwbsyiCMfUkqNEW5KIV6QaKq1kpRGuVwFuqO_H8CiwmSZzZfofD0VBV7KZQUkqwbh5YMGDQORK2xZoW8tiyRCmLkM9OkJpGHjOUj32k27H3QiQPxwqx7uH4KxPAw/s220/吾唯知足.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4406536207427936366.post-4829872611618183781</id><published>2010-06-11T11:04:00.001+08:00</published><updated>2010-06-11T11:04:58.814+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="vmware"/><title type='text'>vSphere Client: parsing the server “servername” “clients.xml” file</title><content type='html'>&lt;p&gt;今天是2010/6/11，如果你在昨天或前天安裝了windows update，而且也有使用vSphere Client，恭喜，他死了=&amp;#160;&amp;#160; =&lt;/p&gt;  &lt;p&gt;&lt;img style=&quot;border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto&quot; title=&quot;2010-06-11_001&quot; border=&quot;0&quot; alt=&quot;2010-06-11_001&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2Xxd9rUrX2VUhxLSFkwsurvF_t9340LNw289yNVhMsJw3dWBTCtrazh277HLZMa5wcG0_3e9tkLpMiyLAqk_oovYzDjvCHiNFpr7hdD4UN-XQRQz9Soy5somQbxW_JkzWGBjQg15rgPA/?imgmax=800&quot; width=&quot;340&quot; height=&quot;125&quot; /&gt;&lt;img style=&quot;border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto&quot; title=&quot;2010-06-11_002&quot; border=&quot;0&quot; alt=&quot;2010-06-11_002&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhw5CT8yc5nXEhxHzfzFkZ_YsrjT0THIgpSffnnQ0Mko3F8wwOL8AFxRtPa2rpiaqJtbN9j2JYEba8z_QaELDZOsPQ4ATpOHcJUljVOAclyTAGqr5IVGW6VxCvMUssHNM4Xjoueayoisjo/?imgmax=800&quot; width=&quot;504&quot; height=&quot;125&quot; /&gt;好似確定是windows update(980773)造成的溜，vm的knowledge base有寫:&lt;/p&gt;  &lt;p&gt;&lt;a href=&quot;http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&amp;amp;cmd=displayKC&amp;amp;externalId=1022611&quot; target=&quot;_blank&quot;&gt;vSphere Client does not open on any Windows operating systems with the error: parsing the server &amp;quot;&amp;lt;servername&amp;gt;&amp;quot; &amp;quot;clients.xml&amp;quot; file&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;並且也在昨天釋放出新版的tools了，記得去更新的溜~&lt;/p&gt;  </content><link rel='replies' type='application/atom+xml' href='http://qwinn-aileen.blogspot.com/feeds/4829872611618183781/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://qwinn-aileen.blogspot.com/2010/06/vsphere-client-parsing-server.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4406536207427936366/posts/default/4829872611618183781'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4406536207427936366/posts/default/4829872611618183781'/><link rel='alternate' type='text/html' href='http://qwinn-aileen.blogspot.com/2010/06/vsphere-client-parsing-server.html' title='vSphere Client: parsing the server “servername” “clients.xml” file'/><author><name>AileenWu</name><uri>http://www.blogger.com/profile/16167996176008066590</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='25' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjaG4pCwbsyiCMfUkqNEW5KIV6QaKq1kpRGuVwFuqO_H8CiwmSZzZfofD0VBV7KZQUkqwbh5YMGDQORK2xZoW8tiyRCmLkM9OkJpGHjOUj32k27H3QiQPxwqx7uH4KxPAw/s220/吾唯知足.png'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2Xxd9rUrX2VUhxLSFkwsurvF_t9340LNw289yNVhMsJw3dWBTCtrazh277HLZMa5wcG0_3e9tkLpMiyLAqk_oovYzDjvCHiNFpr7hdD4UN-XQRQz9Soy5somQbxW_JkzWGBjQg15rgPA/s72-c?imgmax=800" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4406536207427936366.post-3806792635702081711</id><published>2010-06-09T17:18:00.001+08:00</published><updated>2010-06-09T17:18:43.406+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="linux"/><title type='text'>新手上路之: read/write NTFS driver for Linux</title><content type='html'>&lt;p&gt;在進行了一個月的笨蛋異地備份方法之後，實在是受不了了...=&amp;#160;&amp;#160; = 用WinSCP透過網路連到linux系統去拉檔案時在是太麻煩了... 尤其單個檔案很大時，超容易失敗OTZ&lt;/p&gt;  &lt;p&gt;其實事情好像也滿容易解決的，只是因為對方是production，時在不敢直接在上面做實驗，只好花了兩天自己裝了一台機器，在上面做測試，成功!!&lt;/p&gt;  &lt;p&gt;Environment: enterprise linux release5(update5)+ntfs-3g-2010.5.22&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;先下載&lt;a href=&quot;http://www.tuxera.com/community/ntfs-3g-download/&quot; target=&quot;_blank&quot;&gt;NTFS-3G&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;丟到系統內並解壓縮 &lt;/li&gt;    &lt;li&gt;直接進入解壓縮的資料夾內，依照文件以root身份做一下三件事情:      &lt;p class=&quot;block_dotted&quot;&gt;&lt;strong&gt;# ./configure          &lt;br /&gt;# make           &lt;br /&gt;# make install&lt;/strong&gt;&lt;/p&gt;   &lt;/li&gt;    &lt;li&gt;沒錯! 這個moment就已經完成安裝了 &lt;/li&gt;    &lt;li&gt;接著就可以接上USB硬碟，並且辨識一下他的裝置名稱。&lt;a href=&quot;http://www.flag.com.tw/book/cento-5105.asp?bokno=F5301C&amp;amp;id=11&quot; target=&quot;_blank&quot;&gt;這本書&lt;/a&gt;說linux會把USB視為scsi裝置，所以他的device name會是/dev/sd?(視你原本系統的裝置決定，像我的系統是用IDE硬碟，裝置是hda, hdb開頭，所以第一個scsi裝置就會是sda) &lt;/li&gt;    &lt;li&gt;確定好裝置名稱之後，就可以把它mount起來(以/usb為mountpoint)     &lt;p class=&quot;block_dotted&quot;&gt;&lt;strong&gt;# mount –t ntfs-3g /dev/sda1 /usb&lt;/strong&gt;&lt;/p&gt;   &lt;/li&gt;    &lt;li&gt;完工!! =D&lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;Ref:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;&lt;a href=&quot;http://www.tuxera.com/community/ntfs-3g-download/&quot; target=&quot;_blank&quot;&gt;NTFS-3G&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href=&quot;http://www.flag.com.tw/book/cento-5105.asp?bokno=F5301C&amp;amp;id=11&quot; target=&quot;_blank&quot;&gt;在Linux下使用USB拇指碟及外接式硬碟&lt;/a&gt;&lt;/li&gt; &lt;/ol&gt;  </content><link rel='replies' type='application/atom+xml' href='http://qwinn-aileen.blogspot.com/feeds/3806792635702081711/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://qwinn-aileen.blogspot.com/2010/06/readwrite-ntfs-driver-for-linux.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4406536207427936366/posts/default/3806792635702081711'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4406536207427936366/posts/default/3806792635702081711'/><link rel='alternate' type='text/html' href='http://qwinn-aileen.blogspot.com/2010/06/readwrite-ntfs-driver-for-linux.html' title='新手上路之: read/write NTFS driver for Linux'/><author><name>AileenWu</name><uri>http://www.blogger.com/profile/16167996176008066590</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='25' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjaG4pCwbsyiCMfUkqNEW5KIV6QaKq1kpRGuVwFuqO_H8CiwmSZzZfofD0VBV7KZQUkqwbh5YMGDQORK2xZoW8tiyRCmLkM9OkJpGHjOUj32k27H3QiQPxwqx7uH4KxPAw/s220/吾唯知足.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4406536207427936366.post-1460295854924745288</id><published>2010-06-01T13:42:00.001+08:00</published><updated>2010-06-01T13:42:58.889+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="interview"/><category scheme="http://www.blogger.com/atom/ns#" term="oracle"/><title type='text'>Q: When is a DECLARE statement needed?</title><content type='html'>&lt;div class=&quot;block_dotted&quot;&gt;[類別] PL/SQL    &lt;br /&gt;[問題] 什麼時候需用到DECLARE語法?&lt;/div&gt;  &lt;p&gt;&lt;strong&gt;&lt;u&gt;Answer:&lt;/u&gt;&lt;/strong&gt;     &lt;br /&gt;DECLARE是用在PL/SQL區塊(block)內。一個PL/SQL block被&lt;strong&gt;DECLARE&lt;/strong&gt;, &lt;strong&gt;BEGIN&lt;/strong&gt;, &lt;strong&gt;EXCEPTION&lt;/strong&gt;, &lt;strong&gt;END&lt;/strong&gt;四個關鍵字分成三個部份:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;strong&gt;DECLARE&lt;/strong&gt;&lt;/p&gt;    &lt;p&gt;&amp;#160; -- Declarative part(optional)&lt;/p&gt;    &lt;p&gt;&amp;#160; -- for declartions of local types, variables, subprograms&lt;/p&gt;    &lt;p&gt;&lt;strong&gt;BEGIN&lt;/strong&gt;&lt;/p&gt;    &lt;p&gt;&amp;#160; -- Executable part(required)&lt;/p&gt;    &lt;p&gt;&amp;#160; -- statements&lt;/p&gt;    &lt;p&gt;&amp;#160; &lt;strong&gt;EXCEPTION&lt;/strong&gt;&lt;/p&gt;    &lt;p&gt;&amp;#160;&amp;#160;&amp;#160; -- Exception-handling part(optional)&lt;/p&gt;    &lt;p&gt;&lt;strong&gt;END;&lt;/strong&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;所以，當你有需要宣告變數等，就會把它放在DECLARE的區塊內。&lt;/p&gt;  </content><link rel='replies' type='application/atom+xml' href='http://qwinn-aileen.blogspot.com/feeds/1460295854924745288/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://qwinn-aileen.blogspot.com/2010/06/q-when-is-declare-statement-needed.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4406536207427936366/posts/default/1460295854924745288'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4406536207427936366/posts/default/1460295854924745288'/><link rel='alternate' type='text/html' href='http://qwinn-aileen.blogspot.com/2010/06/q-when-is-declare-statement-needed.html' title='Q: When is a DECLARE statement needed?'/><author><name>AileenWu</name><uri>http://www.blogger.com/profile/16167996176008066590</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='25' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjaG4pCwbsyiCMfUkqNEW5KIV6QaKq1kpRGuVwFuqO_H8CiwmSZzZfofD0VBV7KZQUkqwbh5YMGDQORK2xZoW8tiyRCmLkM9OkJpGHjOUj32k27H3QiQPxwqx7uH4KxPAw/s220/吾唯知足.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4406536207427936366.post-3646665966559190373</id><published>2010-05-28T16:02:00.001+08:00</published><updated>2010-05-28T16:02:29.044+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="interview"/><category scheme="http://www.blogger.com/atom/ns#" term="oracle"/><title type='text'>Q: Describe the use of PL/SQL tables.</title><content type='html'>&lt;p&gt;混了一個禮拜... 該是回來面對這系列問題的時候了... 其實我也不是故意要跳過的=P。因為上禮拜的問題是: &amp;quot;What packages (if any) has Oracle provided for use by developers?&amp;quot; .... 這.. 就算我去讀了一些文件，還是認為自己無法具體的回答... 所以就放棄這題了.. (如果我在面試的時候被問到這個，大概也沒時間拖過一個星期XD)&lt;/p&gt;  &lt;div class=&quot;block_dotted&quot;&gt;[類別] PL/SQL    &lt;br /&gt;[問題] 請描述PL/SQL tables該如何使用&lt;/div&gt;  &lt;p&gt;&lt;strong&gt;&lt;u&gt;Answer:&lt;/u&gt;&lt;/strong&gt;     &lt;br /&gt;先講講揪竟PL/SQL table(又叫index-by tables)是什麼? 這是它在9iR2以前的稱呼，9iR2起稱為&amp;quot;associative arrays”。他是一種:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;collection型別&lt;/li&gt;    &lt;li&gt;有index&lt;/li&gt;    &lt;li&gt;可用BINARY INTEGER或VARCHAR2做索引(indexed/associated)&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;他跟另一個collection型別: PL/SQL nested tables很相似:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;是一維陣列(one-dimensional arrays)&lt;/li&gt;    &lt;li&gt;無(大小)限制(unbounded, 理論上...只要記憶體夠大)&lt;/li&gt;    &lt;li&gt;同質性(homogeneous, 就是array裡的每個element要一樣型別的意思..)&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;先來看一下宣告語法，先定義一個型別，接著才宣告變數:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;TYPE 型別名稱 IS TABLE OF 一已知存在型別 INDEX BY [BINART_INTEGER | VARCHAR2(&lt;em&gt;5&lt;/em&gt;)];&lt;/p&gt;    &lt;p&gt;變數名稱 型別名稱;&lt;/p&gt;    &lt;p&gt;ex:&lt;/p&gt;    &lt;p&gt;TYPE position_table IS TABLE OF VARCHAR2(30) INDEX BY VARCHAR2(10);&lt;/p&gt;    &lt;p&gt;who_list position_table;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;所以上面我們就定義了一個position_table(使用者定義)data type, 是以字串(string)作index, 然後宣告變數who_list是這個型別。該怎麼使用呢?&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;who_list(&#39;CEO&#39;) := ‘Fisher Liang’;&lt;/p&gt;    &lt;p&gt;who_list(&#39;CDO&#39;) := ‘Aileen Wu&#39;;&lt;/p&gt;    &lt;p&gt;DBMS_OUTPUT.PUT_LINE(&#39;The CEO is &#39; || who_list(&#39;CEO&#39;));&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;這樣~ &#39;CEO&#39;, &#39;CDO&#39;就是index，而且是unique的，若是重複指定，就是取代舊有值的意思。雖然是個array，用起來卻很像是有index的table對巴~?&lt;/p&gt;  &lt;p&gt;PL/SQL Tables/associative arrays只做暫時存放資料用，也不是一個真正的table，並無法對其使用insert或select into等SQL statement。不過可以做到session level的life cycle, 就是把以上宣告及使用放在package裡。&lt;/p&gt;  &lt;p&gt;完畢!&lt;/p&gt;  &lt;p&gt;Ref: &lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;&lt;a href=&quot;http://www.smart-soft.co.uk/Oracle/oracle-plsql-tutorial-part-9.htm&quot; target=&quot;_blank&quot;&gt;PLSQL Tutorial – PLSQL Collections&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href=&quot;http://www.smart-soft.co.uk/Oracle/oracle-plsql-tutorial-part-12.htm&quot; target=&quot;_blank&quot;&gt;PLSQL Tutorial – Oracle PLSQL Collection Types&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href=&quot;http://download-west.oracle.com/docs/cd/B10501_01/appdev.920/a96624/05_colls.htm#20425&quot; target=&quot;_blank&quot;&gt;PL/SQL User’s Guide and Reference – PL/SQL Collections and Records&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href=&quot;http://www.oracle-base.com/articles/9i/AssociativeArrays9i.php&quot; target=&quot;_blank&quot;&gt;[Oracle-Base] Associative Array in Oracle9i Release 2&lt;/a&gt;&lt;/li&gt; &lt;/ol&gt;  </content><link rel='replies' type='application/atom+xml' href='http://qwinn-aileen.blogspot.com/feeds/3646665966559190373/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://qwinn-aileen.blogspot.com/2010/05/q-describe-use-of-plsql-tables.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4406536207427936366/posts/default/3646665966559190373'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4406536207427936366/posts/default/3646665966559190373'/><link rel='alternate' type='text/html' href='http://qwinn-aileen.blogspot.com/2010/05/q-describe-use-of-plsql-tables.html' title='Q: Describe the use of PL/SQL tables.'/><author><name>AileenWu</name><uri>http://www.blogger.com/profile/16167996176008066590</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='25' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjaG4pCwbsyiCMfUkqNEW5KIV6QaKq1kpRGuVwFuqO_H8CiwmSZzZfofD0VBV7KZQUkqwbh5YMGDQORK2xZoW8tiyRCmLkM9OkJpGHjOUj32k27H3QiQPxwqx7uH4KxPAw/s220/吾唯知足.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4406536207427936366.post-5429187899111961544</id><published>2010-05-20T17:23:00.001+08:00</published><updated>2010-05-20T17:23:32.881+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="cmd"/><category scheme="http://www.blogger.com/atom/ns#" term="windows"/><title type='text'>Batch file – Delete files by date, count the output of other commands</title><content type='html'>&lt;p&gt;介紹個相當好用的指令: &lt;a href=&quot;http://technet.microsoft.com/en-us/library/cc755872(WS.10).aspx&quot; target=&quot;_blank&quot;&gt;Forfiles&lt;/a&gt;&lt;/p&gt;  &lt;div class=&quot;block_dotted&quot;&gt;用途: 檔案選取，並可針對篩選出來的檔案再下其他指令    &lt;br /&gt;注意: WinSvr2003, R2, SP1, PS2才有此指令     &lt;br /&gt;常用參數: /m SearchMark: Searches files according to SearchMask.     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; /c command: Runs the specified &lt;em&gt;Command&lt;/em&gt; on each file.     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; /d [{&lt;strong&gt;+ &lt;/strong&gt;| &lt;strong&gt;-&lt;/strong&gt;}] [{MM&lt;strong&gt;/&lt;/strong&gt;DD&lt;strong&gt;/&lt;/strong&gt;YYYY | DD}]&lt;/div&gt;  &lt;p&gt;假如某個資料夾下每天都會有一個(以上)檔案產生，並且希望定期清理，只保留一個月份的檔案量時，可以用forfiles:&lt;/p&gt;  &lt;p&gt;下面這個指令就是刪除日期為30天以前的檔案&lt;/p&gt;  &lt;div class=&quot;cmdline&quot;&gt;&amp;gt; forfile /D –30 /C “cmd /c del @file”&lt;/div&gt;  &lt;ul&gt;   &lt;li&gt;/C 這參數預設值是&lt;strong&gt;&amp;quot;cmd /c echo @file&amp;quot;&lt;/strong&gt;，也就是只列出檔名。 &lt;/li&gt;    &lt;li&gt;&amp;quot;cmd /c&amp;quot; 是下指令固定的寫法。 &lt;/li&gt;    &lt;li&gt;&amp;quot;@file&amp;quot; 是可以用在/C參數內的變數之一，@file表示檔案名稱。其他還有變數可以列出檔案副檔名(@ext)、完整路徑(@path)、相對路徑(@relpath)、判斷是否為目錄(@isdir)、檔案大小(@fsize)、日期(fdate)、時間(@ftime)等。 &lt;/li&gt;    &lt;li&gt;/D 這參數用法有很多變化(詳請參考reference)，&amp;quot;-30&amp;quot;的意思就是30天前。 &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;另外一個是For...DO迴圈語法，用來跟上面的forfiles搭配，可以先計算出forfiles總共篩選出幾個檔案:&lt;/p&gt;  &lt;div class=&quot;cmdline&quot;&gt;&amp;gt; set cnt=0    &lt;br /&gt;&amp;gt; FOR /F %G IN(‘forfile /D -10’) DO set /a cnt+=1&lt;/div&gt;  &lt;ul&gt;   &lt;li&gt;上面即是先以forfile找出10天前的檔案，並丟進去for迴圈內&lt;/li&gt;    &lt;li&gt;DO裡針對每個forfile都把變數cnt加1，所以最後只要echo %cnt%即可得到檔案數目&lt;/li&gt;    &lt;li&gt;for-do的詳細用法也請參考reference&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Ref:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;&lt;a href=&quot;http://technet.microsoft.com/en-us/library/cc755872(WS.10).aspx&quot; target=&quot;_blank&quot;&gt;Forfiles&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href=&quot;http://ss64.com/nt/for_cmd.html&quot; target=&quot;_blank&quot;&gt;For(loop)&lt;/a&gt; &lt;/li&gt; &lt;/ol&gt;  </content><link rel='replies' type='application/atom+xml' href='http://qwinn-aileen.blogspot.com/feeds/5429187899111961544/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://qwinn-aileen.blogspot.com/2010/05/batch-file-delete-files-by-date-count.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4406536207427936366/posts/default/5429187899111961544'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4406536207427936366/posts/default/5429187899111961544'/><link rel='alternate' type='text/html' href='http://qwinn-aileen.blogspot.com/2010/05/batch-file-delete-files-by-date-count.html' title='Batch file – Delete files by date, count the output of other commands'/><author><name>AileenWu</name><uri>http://www.blogger.com/profile/16167996176008066590</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='25' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjaG4pCwbsyiCMfUkqNEW5KIV6QaKq1kpRGuVwFuqO_H8CiwmSZzZfofD0VBV7KZQUkqwbh5YMGDQORK2xZoW8tiyRCmLkM9OkJpGHjOUj32k27H3QiQPxwqx7uH4KxPAw/s220/吾唯知足.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4406536207427936366.post-4754595965389955964</id><published>2010-05-18T09:06:00.001+08:00</published><updated>2010-05-18T09:08:04.621+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="oracle"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL"/><title type='text'>Using binding vareable with “LIKE” condition</title><content type='html'>&lt;p&gt;這感覺就是一個相當簡單又會很常用到的東西... 卻一時寫不出來OTZ&lt;/p&gt;  &lt;p&gt;通常我們用到LIKE時，大多就是想做模糊搜尋吧...   &lt;br /&gt;    &lt;br /&gt;像下面這個SQL是要找名字裡包含大寫SM的人:    &lt;br /&gt;SELECT * FROM EMPLOYEE WHERE NAME LIKE ‘%SM%’&lt;/p&gt;  &lt;p&gt;像上面這樣寫，就變成傳說中的hard coding，有時候為了效能考量，我們要把值的地方以變數(:variable)取代，所以這兩種組合揪竟該怎麼兜在一起呢!?&lt;/p&gt;  &lt;p&gt;這樣… LIKE &lt;strong&gt;&#39;%:variable%&#39; &lt;/strong&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; (X, :variable直接被當成字串=&amp;#160;&amp;#160; =)    &lt;br /&gt;這樣… LIKE &lt;strong&gt;&#39;&#39;%:variable%&#39;&#39;&lt;/strong&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; (X, :variable終於不被當成字串，還是失敗)    &lt;br /&gt;這樣… LIKE &lt;strong&gt;&#39;%&#39;||:variable||&#39;%&#39;&lt;/strong&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; (O, 原來要自己組....)&lt;/p&gt;  </content><link rel='replies' type='application/atom+xml' href='http://qwinn-aileen.blogspot.com/feeds/4754595965389955964/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://qwinn-aileen.blogspot.com/2010/05/using-binding-vareable-with-like.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4406536207427936366/posts/default/4754595965389955964'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4406536207427936366/posts/default/4754595965389955964'/><link rel='alternate' type='text/html' href='http://qwinn-aileen.blogspot.com/2010/05/using-binding-vareable-with-like.html' title='Using binding vareable with “LIKE” condition'/><author><name>AileenWu</name><uri>http://www.blogger.com/profile/16167996176008066590</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='25' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjaG4pCwbsyiCMfUkqNEW5KIV6QaKq1kpRGuVwFuqO_H8CiwmSZzZfofD0VBV7KZQUkqwbh5YMGDQORK2xZoW8tiyRCmLkM9OkJpGHjOUj32k27H3QiQPxwqx7uH4KxPAw/s220/吾唯知足.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4406536207427936366.post-8083498688548143186</id><published>2010-05-14T14:28:00.001+08:00</published><updated>2010-05-14T14:37:46.380+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="oracle"/><title type='text'>BUG! “Environment variable ORACLE_UNQNAME not defined”</title><content type='html'>&lt;div class=&quot;block_dotted&quot;&gt;Environment:    &lt;br /&gt;DB version: Oracle 11gr2     &lt;br /&gt;Platform: Linux RedHat EL5&lt;/div&gt;  &lt;p&gt;今天本來是在做&amp;quot;&lt;a href=&quot;http://www.oracle-base.com/articles/linux/AutomatingDatabaseStartupAndShutdownOnLinux.php&quot; target=&quot;_blank&quot;&gt;Automating Database Startup and Shutdown on Linux&lt;/a&gt;&amp;quot; setp by step。照著文件做，也處理了最後&amp;quot;Known Issues&amp;quot;的部分後，發現.... Oracle em(dbconsole)的服務並沒有起來...&lt;/p&gt;  &lt;p&gt;也不是什麼大問題，就是dbstart這支script裡並沒有把他寫進去而已，於是自己把他補在&amp;quot;/etc/init.d/dbora&amp;quot;(依照上面文件做的一個檔案)裡面:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;su - $ORA_OWNER -c &amp;quot;$ORA_HOME/bin/dbstart $ORA_HOME&amp;quot;      &lt;br /&gt;su - $ORA_OWNER -c &amp;quot;$ORA_HOME/bin/emctl start dbconsole” ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^上面這行&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;補了一行code之後又重機一次，發現竟然還是一樣... 失敗了=&amp;#160;&amp;#160; =，如果以oracle的身分直接去跑&amp;quot;emctl start dbconsole&amp;quot;是可以成功的，但是如果一開始是以root的身分切換到oracle去下指令(就是補上的那一行做的事情)，會被抱怨:&lt;/p&gt;  &lt;p style=&quot;padding-left: 18px&quot;&gt;&lt;strong&gt;&lt;font color=&quot;#ff0000&quot;&gt;Environment variable ORACLE_UNQNAME not defined. Please set ORACLE_UNQNAME to database unique name.&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;ORACLE_UNQNAME... 還真沒看過這個東西... 結果在&lt;a href=&quot;http://download.oracle.com/docs/cd/E11882_01/readmes.112/e11015/toc.htm#CHDDJCFH&quot; target=&quot;_blank&quot;&gt;oracle文件&lt;/a&gt;裡看到這是一個BUG(&lt;strong&gt;Bug 1716161&lt;/strong&gt;)!! 不過他只跟你說，把ORACLE_UNQNAME這個環境變數的值設成db_unique_name這個初始化參數而已... how!?!?&lt;/p&gt;  &lt;p&gt;再來看&lt;a href=&quot;http://www.jobacle.nl/?p=673&quot; target=&quot;_blank&quot;&gt;另一篇文章&lt;/a&gt;，他也是做一樣的事情，並且在最後一個步驟(6.)說明:     &lt;br /&gt;在&amp;quot;&lt;strong&gt;/etc/profile&lt;/strong&gt;&amp;quot;裡補上一段code即可!!&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;if [ $USER = &amp;quot;oracle&amp;quot; ] ; then      &lt;br /&gt;if [ $SHELL = &amp;quot;/bin/ksh&amp;quot; ] ; then       &lt;br /&gt;ulimit -p 16384       &lt;br /&gt;ulimit -n 65536       &lt;br /&gt;else       &lt;br /&gt;ulimit -u 16384 -n 65536       &lt;br /&gt;fi       &lt;br /&gt;&lt;strong&gt;&lt;font color=&quot;#ff0000&quot;&gt;export ORACLE_UNQNAME=db_unique_name&lt;/font&gt;&lt;/strong&gt;       &lt;br /&gt;umask 022       &lt;br /&gt;fi&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;真的只是個bug!!!!&lt;/p&gt;  &lt;p&gt;Ref: &lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;&lt;a href=&quot;http://www.oracle-base.com/articles/linux/AutomatingDatabaseStartupAndShutdownOnLinux.php&quot; target=&quot;_blank&quot;&gt;[ORACLE-BASE] Automating Database Startup and Shutdown on Linux&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href=&quot;http://download.oracle.com/docs/cd/E11882_01/readmes.112/e11015/toc.htm#CHDDJCFH&quot; target=&quot;_blank&quot;&gt;[Oracle Database Readme] section38 “Open Bugs”&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href=&quot;http://www.jobacle.nl/?p=673&quot; target=&quot;_blank&quot;&gt;[JOBACLE] Automatic Start/stop in 11g release 2&lt;/a&gt; &lt;/li&gt; &lt;/ol&gt;  </content><link rel='replies' type='application/atom+xml' href='http://qwinn-aileen.blogspot.com/feeds/8083498688548143186/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://qwinn-aileen.blogspot.com/2010/05/bug-environment-variable-oracleunqname.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4406536207427936366/posts/default/8083498688548143186'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4406536207427936366/posts/default/8083498688548143186'/><link rel='alternate' type='text/html' href='http://qwinn-aileen.blogspot.com/2010/05/bug-environment-variable-oracleunqname.html' title='BUG! “Environment variable ORACLE_UNQNAME not defined”'/><author><name>AileenWu</name><uri>http://www.blogger.com/profile/16167996176008066590</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='25' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjaG4pCwbsyiCMfUkqNEW5KIV6QaKq1kpRGuVwFuqO_H8CiwmSZzZfofD0VBV7KZQUkqwbh5YMGDQORK2xZoW8tiyRCmLkM9OkJpGHjOUj32k27H3QiQPxwqx7uH4KxPAw/s220/吾唯知足.png'/></author><thr:total>0</thr:total></entry></feed>