<?xml version="1.0" encoding="utf-8"?> 
<feed version="0.3" xmlns="http://purl.org/atom/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xml:lang="zh-tw"> 
<title>Thinking more...</title> 
<link rel="alternate" type="text/html" href="http://blog.roodo.com/thinkingmore/" /> 
<modified>2010-03-22T19:45:25+08:00</modified> 
<tagline>Just thinking more...&amp;nbsp;訂閱 RSS

var gaJsHost = ((&quot;https:&quot; == document.location.protocol) ? &quot;https://ssl.&quot; : &quot;http://www.&quot;);
document.write(unescape(&quot;%3Cscript src=&#039;&quot; + gaJsHost + &quot;google-analytics.com/ga.js&#039; type=&#039;text/javascript&#039;%3E%3C/script%3E&quot;));















  google.load(&quot;jquery&quot;, &quot;1.2&quot;);
  google.setOnLoadCallback( function() {
    try {
      var pageTracker = _gat._getTracker(&quot;UA-97150-7&quot;);
      pageTracker._trackPageview();
    }catch(err) {}
    $(&quot;pre &gt; br&quot;).each( function() { $(this).replaceWith( &quot;\n&quot; ); } );
    $(&quot;textarea &gt; br&quot;).each( function() { $(this).replaceWith( &quot;\n&quot; ); } );
    SyntaxHighlighter.config.ClipboardSwf = &#039;http://alexgorbatchev.com/pub/sh/2.0.296/scripts/clipboard.swf&#039;;
    SyntaxHighlighter.all();
    dp.SyntaxHighlighter.ClipboardSwf = &#039;http://alexgorbatchev.com/pub/sh/2.0.296/scripts/clipboard.swf&#039;;
    dp.SyntaxHighlighter.HighlightAll(&#039;code&#039;);
  } );

</tagline> 
<id>tag:blog.roodo.com,2010://50891</id> 
<generator url="http://blog.yam.com/" version="1.0">Roodo Blog</generator> 
<copyright>Copyright (c) 2005, </copyright> 
 <entry> 
 <title>夢境-台東</title> 
 <link rel="alternate" type="text/html" href="http://blog.roodo.com/thinkingmore/archives/11987923.html" /> 
 <modified>2010-03-20T04:20:10+08:00</modified> 
 <issued>2010-03-20T04:20:10+08:00</issued> 
 <id>tag:blog.roodo.com,2010://50891.11987923</id> 
 <created>2010-03-20T04:18:33+08:00</created> 
  <author>
 <name></name> 
 <url>http://blog.roodo.com/thinkingmore/</url> 
 
</author> 
<dc:subject>雜記,隨筆</dc:subject> 
<summary type="text/html" mode="escaped">
<![CDATA[
這是剛剛的夢，不趕緊寫下來，恐怕再過一會就忘了...

我和太座正好去台東找林兄，在他那兒做客。但是台東發生了大水。這邊有點遺忘了，我好像搭了一個奇怪的東西，很快地回到飯店。在飯店往外看，發現很多飛機被惡水衝成兩半在河裡翻滾，有人騎著機車也在河裡試著要上岸。這水實在太大，原本打算要去機場搭飛機回台北的，如果這麼多飛機被衝成兩半，那麼看來飛機是不能坐了。當下就跟太座說，你先跟林兄到高雄，再搭高鐵回去吧~等小孩醒了，我再趕過去。於是就開始準備。過一會，林兄的叔叔打電話來，說他到香港了，平安無事。然後林兄跟我交代了一下他叔叔的事情。小孩醒了，太座也正準備要走，所以我也趕緊打包好東西，帶著小孩要一起走。可是要怎麼到台東呢?這時候我說：搭捷運....

好吧，大致的記憶就到這裡...
]]>
</summary> 
<content type="text/html" mode="escaped" xml:lang="zh-tw" xml:base="http://blog.roodo.com/thinkingmore/archives/11987923.html">
<![CDATA[
	這是剛剛的夢，不趕緊寫下來，恐怕再過一會就忘了...

我和太座正好去台東找林兄，在他那兒做客。但是台東發生了大水。這邊有點遺忘了，我好像搭了一個奇怪的東西，很快地回到飯店。在飯店往外看，發現很多飛機被惡水衝成兩半在河裡翻滾，有人騎著機車也在河裡試著要上岸。這水實在太大，原本打算要去機場搭飛機回台北的，如果這麼多飛機被衝成兩半，那麼看來飛機是不能坐了。當下就跟太座說，你先跟林兄到高雄，再搭高鐵回去吧~等小孩醒了，我再趕過去。於是就開始準備。過一會，林兄的叔叔打電話來，說他到香港了，平安無事。然後林兄跟我交代了一下他叔叔的事情。小孩醒了，太座也正準備要走，所以我也趕緊打包好東西，帶著小孩要一起走。可是要怎麼到台東呢?這時候我說：搭捷運....

好吧，大致的記憶就到這裡...

	]]>
</content>
</entry> 
 <entry> 
 <title>Port Mini c# Lab to mono</title> 
 <link rel="alternate" type="text/html" href="http://blog.roodo.com/thinkingmore/archives/11987885.html" /> 
 <modified>2010-03-20T03:56:25+08:00</modified> 
 <issued>2010-03-20T03:56:25+08:00</issued> 
 <id>tag:blog.roodo.com,2010://50891.11987885</id> 
 <created>2010-03-20T03:44:30+08:00</created> 
  <author>
 <name></name> 
 <url>http://blog.roodo.com/thinkingmore/</url> 
 
</author> 
<dc:subject>.Net</dc:subject> 
<summary type="text/html" mode="escaped">
<![CDATA[
在 Linux mono 平台上缺少了一個輕量級的開發工具，而 snippetcompiler 又沒有 open source，所以腦筋就動到 黑暗執行緒 開發的 Mini C# Lab 上。

下載原始碼以後，先試著用 MonoDevelop 開啟，但卻因為路徑與檔名問題失敗，Linux 使用的路徑分隔字元與 Windows 不同，對大小寫檔名也比較嚴格，調整以後，就能開啟了。

接著去編譯，稍微調整 References 以後，也可以順利編譯。

最後要執行了，卻出現下面的錯誤： Unhandled Exception: System.EntryPointNotFoundException: HideCaret
  at (wrapper managed-to-native) ICSharpCode.TextEditor.Caret:HideCaret (intptr)
  at ICSharpCode.TextEditor.Caret.DisposeCaret () [0x00000] 
  at ICSharpCode.TextEditor.Caret.RecreateCaret () [0x00000] 
  at ICSharpCode.TextEditor.TextArea.OptionsChanged () [0x00000] 
  at ICSharpCode.TextEditor.TextArea..ctor (ICSharpCode.TextEditor.TextEditorControl motherTextEditorControl, ICSharpCode.TextEditor.TextAreaControl motherTextAreaControl) [0x00000] 
  at (wrapper remoting-invoke-with-check) ICSharpCode.TextEditor.TextArea:.ctor (ICSharpCode.TextEditor.TextEditorControl,ICSharpCode.TextEditor.TextAreaControl)
  at ICSharpCode.TextEditor.TextAreaControl..ctor (ICSharpCode.TextEditor.TextEditorControl motherTextEditorControl) [0x00000] 
  at (wrapper remoting-invoke-with-check) ICSharpCode.TextEditor.TextAreaControl:.ctor (ICSharpCode.TextEditor.TextEditorControl)
  at ICSharpCode.TextEditor.TextEditorControl..ctor () [0x00000] 
  at (wrapper remoting-invoke-with-check) ICSharpCode.TextEditor.TextEditorControl:.ctor ()
  at MiniCSharpLab.Form1.InitializeComponent () [0x00000] 
  at MiniCSharpLab.Form1..ctor () [0x00000] 
  at (wrapper remoting-invoke-with-check) MiniCSharpLab.Form1:.ctor ()
  at MiniCSharpLab.Program.Main (System.String[] args) [0x00000] 


問題應該就出在 ICSharpCode.TextEditor.dll 裡，有空再用 MoMA 來分析或挖 ICSharpCode.TextEditor.dll 看看好了。
]]>
</summary> 
<content type="text/html" mode="escaped" xml:lang="zh-tw" xml:base="http://blog.roodo.com/thinkingmore/archives/11987885.html">
<![CDATA[
	在 Linux mono 平台上缺少了一個輕量級的開發工具，而 snippetcompiler 又沒有 open source，所以腦筋就動到 <a href="http://blog.darkthread.net/">黑暗執行緒</a> 開發的 <a href="http://www.codeplex.com/minicsharplab">Mini C# Lab</a> 上。<br/>
<br/>
下載原始碼以後，先試著用 <a href="http://monodevelop.com/">MonoDevelop</a> 開啟，但卻因為路徑與檔名問題失敗，Linux 使用的路徑分隔字元與 Windows 不同，對大小寫檔名也比較嚴格，調整以後，就能開啟了。<br/>
<br/>
接著去編譯，稍微調整 References 以後，也可以順利編譯。<br/>
<br/>
最後要執行了，卻出現下面的錯誤： <pre>Unhandled Exception: System.EntryPointNotFoundException: HideCaret
  at (wrapper managed-to-native) ICSharpCode.TextEditor.Caret:HideCaret (intptr)
  at ICSharpCode.TextEditor.Caret.DisposeCaret () [0x00000] 
  at ICSharpCode.TextEditor.Caret.RecreateCaret () [0x00000] 
  at ICSharpCode.TextEditor.TextArea.OptionsChanged () [0x00000] 
  at ICSharpCode.TextEditor.TextArea..ctor (ICSharpCode.TextEditor.TextEditorControl motherTextEditorControl, ICSharpCode.TextEditor.TextAreaControl motherTextAreaControl) [0x00000] 
  at (wrapper remoting-invoke-with-check) ICSharpCode.TextEditor.TextArea:.ctor (ICSharpCode.TextEditor.TextEditorControl,ICSharpCode.TextEditor.TextAreaControl)
  at ICSharpCode.TextEditor.TextAreaControl..ctor (ICSharpCode.TextEditor.TextEditorControl motherTextEditorControl) [0x00000] 
  at (wrapper remoting-invoke-with-check) ICSharpCode.TextEditor.TextAreaControl:.ctor (ICSharpCode.TextEditor.TextEditorControl)
  at ICSharpCode.TextEditor.TextEditorControl..ctor () [0x00000] 
  at (wrapper remoting-invoke-with-check) ICSharpCode.TextEditor.TextEditorControl:.ctor ()
  at MiniCSharpLab.Form1.InitializeComponent () [0x00000] 
  at MiniCSharpLab.Form1..ctor () [0x00000] 
  at (wrapper remoting-invoke-with-check) MiniCSharpLab.Form1:.ctor ()
  at MiniCSharpLab.Program.Main (System.String[] args) [0x00000] 
</pre>
<br/>
問題應該就出在 ICSharpCode.TextEditor.dll 裡，有空再用 <a href="http://www.mono-project.com/MoMA">MoMA</a> 來分析或挖 ICSharpCode.TextEditor.dll 看看好了。

	]]>
</content>
</entry> 
 <entry> 
 <title>FileSystemWalker</title> 
 <link rel="alternate" type="text/html" href="http://blog.roodo.com/thinkingmore/archives/11972049.html" /> 
 <modified>2010-03-17T16:45:31+08:00</modified> 
 <issued>2010-03-17T16:45:31+08:00</issued> 
 <id>tag:blog.roodo.com,2010://50891.11972049</id> 
 <created>2010-03-17T16:39:10+08:00</created> 
  <author>
 <name></name> 
 <url>http://blog.roodo.com/thinkingmore/</url> 
 
</author> 
<dc:subject>.Net</dc:subject> 
<summary type="text/html" mode="escaped">
<![CDATA[
用 foreach 以遞迴方式去找出所有檔案根目錄，順便練習 yield。


    class FileSystemWalker
    {
        private string _path = "";
        public FileSystemWalker(string path)
        {
            _path = path;
        }

        public IEnumerable&lt;FileSystemInfo&gt; Walk()
        {
            foreach( string d in Directory.GetDirectories( _path ) )
            {
                DirectoryInfo di = new DirectoryInfo( d );
                yield return di;
                FileSystemWalker walker = new FileSystemWalker(Path.Combine(_path, d));
                foreach (FileSystemInfo fsi in walker.Walk())
                    yield return fsi;
            }
            foreach (string f in Directory.GetFiles( _path ) )
            {
                FileInfo fi = new FileInfo(f);
                yield return fi;
            }
        }
    }

    class Program
    {
        static void Main(string[] args)
        {
            foreach(FileSystemInfo fsi in new FileSystemWalker(@"f:").Walk())
            {
                if( fsi.Attributes == FileAttributes.Directory )
                    Console.WriteLine( "[D]{0}", fsi.FullName );
                else
                    Console.WriteLine("[F]{0}", fsi.FullName);
            }
            Console.ReadLine();
        }
    }

]]>
</summary> 
<content type="text/html" mode="escaped" xml:lang="zh-tw" xml:base="http://blog.roodo.com/thinkingmore/archives/11972049.html">
<![CDATA[
	用 foreach 以遞迴方式去找出所有檔案根目錄，順便練習 yield。

<pre name="code" class="c#">
    class FileSystemWalker
    {
        private string _path = "";
        public FileSystemWalker(string path)
        {
            _path = path;
        }

        public IEnumerable&lt;FileSystemInfo&gt; Walk()
        {
            foreach( string d in Directory.GetDirectories( _path ) )
            {
                DirectoryInfo di = new DirectoryInfo( d );
                yield return di;
                FileSystemWalker walker = new FileSystemWalker(Path.Combine(_path, d));
                foreach (FileSystemInfo fsi in walker.Walk())
                    yield return fsi;
            }
            foreach (string f in Directory.GetFiles( _path ) )
            {
                FileInfo fi = new FileInfo(f);
                yield return fi;
            }
        }
    }

    class Program
    {
        static void Main(string[] args)
        {
            foreach(FileSystemInfo fsi in new FileSystemWalker(@"f:").Walk())
            {
                if( fsi.Attributes == FileAttributes.Directory )
                    Console.WriteLine( "[D]{0}", fsi.FullName );
                else
                    Console.WriteLine("[F]{0}", fsi.FullName);
            }
            Console.ReadLine();
        }
    }
</pre>

	]]>
</content>
</entry> 
 <entry> 
 <title>電影流水帳(2010/3/4～2010/3/12)</title> 
 <link rel="alternate" type="text/html" href="http://blog.roodo.com/thinkingmore/archives/11961323.html" /> 
 <modified>2010-03-16T12:25:19+08:00</modified> 
 <issued>2010-03-16T12:25:19+08:00</issued> 
 <id>tag:blog.roodo.com,2010://50891.11961323</id> 
 <created>2010-03-16T12:23:01+08:00</created> 
  <author>
 <name></name> 
 <url>http://blog.roodo.com/thinkingmore/</url> 
 
</author> 
<dc:subject>電影流水帳</dc:subject> 
<summary type="text/html" mode="escaped">
<![CDATA[
我很喜歡破碎的擁抱的這張海報，但是很可惜，官方網站沒有提供桌布。

Broken Embraces(IMDB, Wikipedia)，中譯：破碎的擁抱。很好看的劇情片，這是作家 Harry 與 Lena 的愛情故事。Harry 在還沒瞎之前是個導演加編劇，他遇上了想成為女演員的富翁(Martel)女人 Lena，於是開始熱戀。但是 Martel 不放手，輾轉之後，兩人私奔。Martel 想逼兩人出來，把未完成的電影剪得亂七八糟，Harry跟Lena回去的路上發生了車禍，天人永隔，Harry因此失明。隔了十數年後，因為 Martel 的兒子來找他，才讓他把這件事情告訴他的兒子。All about Steve(IMDB, Wikipedia)，中譯：求愛女王。還可以看的喜劇片，躲在自己世界裡的填字遊戲作家遇到了很帥的攝影記者Steve，昏了頭，寫了關於Steve的填字遊戲，結果被Fire。然後開始展開追逐Steve的行動，追逐的過程裡，發生了許多的事情，讓她認知到其實Steve並不適合自己。
]]>
</summary> 
<content type="text/html" mode="escaped" xml:lang="zh-tw" xml:base="http://blog.roodo.com/thinkingmore/archives/11961323.html">
<![CDATA[
	我很喜歡破碎的擁抱的這張<a href="http://en.wikipedia.org/wiki/File:Broken_Embraces.jpg">海報</a>，但是很可惜，官方網站沒有提供桌布。

<ul><li><a href="http://www.sonyclassics.com/brokenembraces/">Broken Embraces</a>(<a href="http://www.imdb.com/title/tt0913425/">IMDB</a>, <a href="http://en.wikipedia.org/wiki/Broken_Embraces">Wikipedia</a>)，中譯：破碎的擁抱。很好看的劇情片，這是作家 Harry 與 Lena 的愛情故事。Harry 在還沒瞎之前是個導演加編劇，他遇上了想成為女演員的富翁(Martel)女人 Lena，於是開始熱戀。但是 Martel 不放手，輾轉之後，兩人私奔。Martel 想逼兩人出來，把未完成的電影剪得亂七八糟，Harry跟Lena回去的路上發生了車禍，天人永隔，Harry因此失明。隔了十數年後，因為 Martel 的兒子來找他，才讓他把這件事情告訴他的兒子。</li><li><a href="http://www.allaboutstevemovie.com/">All about Steve</a>(<a href="http://www.imdb.com/title/tt0881891/">IMDB</a>, <a href="http://en.wikipedia.org/wiki/All_About_Steve">Wikipedia</a>)，中譯：求愛女王。還可以看的喜劇片，躲在自己世界裡的填字遊戲作家遇到了很帥的攝影記者Steve，昏了頭，寫了關於Steve的填字遊戲，結果被Fire。然後開始展開追逐Steve的行動，追逐的過程裡，發生了許多的事情，讓她認知到其實Steve並不適合自己。</li></ul>

	]]>
</content>
</entry> 
 <entry> 
 <title>ConfigParser/ConfigObj</title> 
 <link rel="alternate" type="text/html" href="http://blog.roodo.com/thinkingmore/archives/11917819.html" /> 
 <modified>2010-03-10T23:31:34+08:00</modified> 
 <issued>2010-03-10T23:31:34+08:00</issued> 
 <id>tag:blog.roodo.com,2010://50891.11917819</id> 
 <created>2010-03-10T23:25:25+08:00</created> 
  <author>
 <name></name> 
 <url>http://blog.roodo.com/thinkingmore/</url> 
 
</author> 
<dc:subject>Python</dc:subject> 
<summary type="text/html" mode="escaped">
<![CDATA[
前一陣子心血來潮，做了一個很簡單的 subversion 管理網站，用來設定 htpasswd 跟 svnmailer 的設定。原本想說 svnmailer 的設定正好可以用 python 內建的 ConfigParser 來做，想不到用來讀設定是可以，但遇到寫的時候，就出錯了。因為寫的時候，ConfigParser 會因為 Hash 的特性，而無法依照原來的順序寫回去。沒辦法，只能摸摸鼻子，找別的 library 來做，最後是找到 ConfigObj 來做，幸好方法也不難，依照官方文件依樣畫葫蘆就行了。]]>
</summary> 
<content type="text/html" mode="escaped" xml:lang="zh-tw" xml:base="http://blog.roodo.com/thinkingmore/archives/11917819.html">
<![CDATA[
	前一陣子心血來潮，做了一個很簡單的 subversion 管理網站，用來設定 htpasswd 跟 svnmailer 的設定。原本想說 svnmailer 的設定正好可以用 <a href="http://www.python.org">python</a> 內建的 ConfigParser 來做，想不到用來讀設定是可以，但遇到寫的時候，就出錯了。因為寫的時候，ConfigParser 會因為 Hash 的特性，而無法依照原來的順序寫回去。沒辦法，只能摸摸鼻子，找別的 library 來做，最後是找到 <a href="http://www.voidspace.org.uk/python/configobj.html">ConfigObj</a> 來做，幸好方法也不難，依照官方文件依樣畫葫蘆就行了。
	]]>
</content>
</entry> 
 <entry> 
 <title>電影流水帳(2010/2/23～2010/3/3)</title> 
 <link rel="alternate" type="text/html" href="http://blog.roodo.com/thinkingmore/archives/11910071.html" /> 
 <modified>2010-03-08T23:58:54+08:00</modified> 
 <issued>2010-03-08T23:58:54+08:00</issued> 
 <id>tag:blog.roodo.com,2010://50891.11910071</id> 
 <created>2010-03-08T23:55:29+08:00</created> 
  <author>
 <name></name> 
 <url>http://blog.roodo.com/thinkingmore/</url> 
 
</author> 
<dc:subject>電影流水帳</dc:subject> 
<summary type="text/html" mode="escaped">
<![CDATA[
拖了好久才寫這篇，看片的速度也變慢許多。

Jennifer's Body(IMDB, Wikipedia)。這部片子沒有引進台灣上映。這部片，坦白說不好看。簡單說，Megan Fox在被樂團進行黑暗儀式之後，就變成了惡魔，開始吃人肉，女主角知道真相之後，就決定為民除害，就這樣。既不是很恐怖，該露的也沒什麼露。
Old Dogs(IMDB, Wikipedia)，中譯：歐吉桑卡好。Dan 在7年前因為離婚，Charlies為了讓他轉換心情，就帶他去狂歡。狂歡時邂逅了兩個女人，Dan因此衝動地跟Vicki再次結婚，但旋即離婚。7年後，Vicki 因為要入獄服刑兩個星期，而好友又受傷，所以只好告訴Dan真相，說兩個小孩是他的，並請他照顧。於是發生了許多有趣又搞笑的事情，最後當然是皆大歡喜，不僅顧了親情，也顧了事業。還不錯看的片，蠻搞笑的，雖然劇情不是非常連貫，但瑕不掩瑜。


]]>
</summary> 
<content type="text/html" mode="escaped" xml:lang="zh-tw" xml:base="http://blog.roodo.com/thinkingmore/archives/11910071.html">
<![CDATA[
	拖了好久才寫這篇，看片的速度也變慢許多。
<ul>
<li><a href="http://www.ugo.com/therush/product/horror/jennifers-body/118/">Jennifer's Body</a>(<a href="http://www.imdb.com/title/tt1131734/">IMDB</a>, <a href="http://en.wikipedia.org/wiki/Jennifer's_Body">Wikipedia</a>)。這部片子沒有引進台灣上映。這部片，坦白說不好看。簡單說，Megan Fox在被樂團進行黑暗儀式之後，就變成了惡魔，開始吃人肉，女主角知道真相之後，就決定為民除害，就這樣。既不是很恐怖，該露的也沒什麼露。</li>
<li><a href="http://disney.go.com/disneypictures/olddogs/">Old Dogs</a>(<a href="http://www.imdb.com/title/tt0976238/">IMDB</a>, <a href="http://en.wikipedia.org/wiki/Old_Dogs_%28film%29">Wikipedia</a>)，中譯：歐吉桑卡好。Dan 在7年前因為離婚，Charlies為了讓他轉換心情，就帶他去狂歡。狂歡時邂逅了兩個女人，Dan因此衝動地跟Vicki再次結婚，但旋即離婚。7年後，Vicki 因為要入獄服刑兩個星期，而好友又受傷，所以只好告訴Dan真相，說兩個小孩是他的，並請他照顧。於是發生了許多有趣又搞笑的事情，最後當然是皆大歡喜，不僅顧了親情，也顧了事業。還不錯看的片，蠻搞笑的，雖然劇情不是非常連貫，但瑕不掩瑜。</li>
</ul>


	]]>
</content>
</entry> 
</feed>