<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>達可達與我</title><link>http://blog.blueshop.com.tw/gogojsp/</link><description>我與達可達</description><managingEditor>達可達</managingEditor><dc:language>zh-TW</dc:language><generator>.Text Version 0.95.2004.101</generator><item><dc:creator>達可達</dc:creator><title>讀取CSV文字檔至陣列</title><link>http://blog.blueshop.com.tw/gogojsp/archive/2007/12/29/53871.aspx</link><pubDate>Sat, 29 Dec 2007 10:15:00 GMT</pubDate><guid>http://blog.blueshop.com.tw/gogojsp/archive/2007/12/29/53871.aspx</guid><wfw:comment>http://blog.blueshop.com.tw/gogojsp/comments/53871.aspx</wfw:comment><comments>http://blog.blueshop.com.tw/gogojsp/archive/2007/12/29/53871.aspx#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://blog.blueshop.com.tw/gogojsp/comments/commentRss/53871.aspx</wfw:commentRss><trackback:ping>http://blog.blueshop.com.tw/gogojsp/services/trackbacks/53871.aspx</trackback:ping><description>早上看到C#版上的問題，也練習寫了一個不常用到二維的陣列，&lt;BR&gt;在找維度大小時卡了一下... &lt;BR&gt;陣列 =&amp;gt; 維度大小 Rank ==&amp;gt; &lt;BR&gt;int[,] =&amp;gt;2 &lt;BR&gt;int[,,] =&amp;gt;3 &lt;BR&gt;如果是維度各別的長度，則是用 GetUpperBound(維度)，可取得最大的長度&lt;BR&gt;參考看看 ^^&amp;nbsp;&lt;TEXTAREA class=c# name=code rows=6 cols=50&gt;            string[,] aryResult;

            using (StreamReader sr = new StreamReader("C:\\z.txt"))
            {
                //讀取文字檔
                string txt = sr.ReadToEnd().Trim();

                //有幾"列"
                string[] aryStr = txt.Split('\n');
                int hight = aryStr.Length;
                
                //有幾"行"
                int width = aryStr[0].Split(' ').Length;

                //確定後再宣告陣列大小
                aryResult = new string[hight, width];

                //帶值進去
                for (int h = 0; h &amp;lt; hight; h++)
                {
                    string[] arySplit = aryStr[h].Split(' ');
                    for (int w = 0; w &amp;lt; width; w++)
                    {
                        aryResult[h, w] = arySplit[w];

                    }
                }

            }


            //印出結果
            for (int h = 0; h &amp;lt;= aryResult.GetUpperBound(0); h++)
            {
                for (int w = 0; w &amp;lt;= aryResult.GetUpperBound(1); w++)
                {
                    Console.WriteLine("ary[{0},{1}]='{2}'", h, w, aryResult[h, w]);
                }
            
            }&lt;/TEXTAREA&gt;&lt;img src ="http://blog.blueshop.com.tw/gogojsp/aggbug/53871.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>達可達</dc:creator><title>字串中關鍵字出現的次數 ..</title><link>http://blog.blueshop.com.tw/gogojsp/archive/2007/11/24/53471.aspx</link><pubDate>Sat, 24 Nov 2007 08:46:00 GMT</pubDate><guid>http://blog.blueshop.com.tw/gogojsp/archive/2007/11/24/53471.aspx</guid><wfw:comment>http://blog.blueshop.com.tw/gogojsp/comments/53471.aspx</wfw:comment><comments>http://blog.blueshop.com.tw/gogojsp/archive/2007/11/24/53471.aspx#Feedback</comments><slash:comments>3</slash:comments><wfw:commentRss>http://blog.blueshop.com.tw/gogojsp/comments/commentRss/53471.aspx</wfw:commentRss><trackback:ping>http://blog.blueshop.com.tw/gogojsp/services/trackbacks/53471.aspx</trackback:ping><description>&lt;TEXTAREA class=c# name=code rows=6 cols=50&gt;    class Program
    {
        public static void Main()
        {
            string str = @" hello One
                              hello Two
                                  hello Three";

            Console.WriteLine(CoutKeyword(str, "hello")); //hello出現3次
            Console.WriteLine(CoutKeyword(str, "e")); //e出現6次

        }



        //計算關鍵字出現的次數
        private static int CoutKeyword(string str, string keyWord)
        {
            int index = 0;
            int count = 0;
            while (index != -1)
            {
                index = str.IndexOf(keyWord, index);

                if (index != -1)
                {
                    index = index + keyWord.Length;
                    count++;
                }
            }

            return count;
        }
    }
&lt;/TEXTAREA&gt;&lt;img src ="http://blog.blueshop.com.tw/gogojsp/aggbug/53471.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>達可達</dc:creator><title>vitual 的繼承多形</title><link>http://blog.blueshop.com.tw/gogojsp/archive/2007/11/24/53470.aspx</link><pubDate>Sat, 24 Nov 2007 08:34:00 GMT</pubDate><guid>http://blog.blueshop.com.tw/gogojsp/archive/2007/11/24/53470.aspx</guid><wfw:comment>http://blog.blueshop.com.tw/gogojsp/comments/53470.aspx</wfw:comment><comments>http://blog.blueshop.com.tw/gogojsp/archive/2007/11/24/53470.aspx#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://blog.blueshop.com.tw/gogojsp/comments/commentRss/53470.aspx</wfw:commentRss><trackback:ping>http://blog.blueshop.com.tw/gogojsp/services/trackbacks/53470.aspx</trackback:ping><description>&lt;TEXTAREA class=c# name=code rows=6 cols=50&gt;
    class A
    {
        //virtual 代表虛擬的方法，繼承的子類別可以去複寫這個方法
        public virtual void ToDo()
        {
            Console.WriteLine("AAAAA");
        }

    }

    class B : A
    {
        //複寫父類別的方法，也就是所謂的"多形"
        public override void ToDo()
        {
            base.ToDo(); //如果不要父類別的方法就不要加這行 base. 會執行父類別的方法

            Console.WriteLine("BBBBBB");
        }
    }

    class C : B
    {
        public override void ToDo()
        {
            // *** 此方法會去執行 B 的 ToDo方法，而 B 的 ToDo 方法又會去執行 A 的 ToDo
            base.ToDo();
            Console.WriteLine("CCCC");
        }
    }



    class Program
    {
        public static void Main()
        {
            B b = new B();
            b.ToDo();
            Console.WriteLine(new String('=', 20));
            C c = new C();
            c.ToDo();

        }
    }
&lt;/TEXTAREA&gt;&lt;img src ="http://blog.blueshop.com.tw/gogojsp/aggbug/53470.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>達可達</dc:creator><title>樂透亂數產生1-42</title><link>http://blog.blueshop.com.tw/gogojsp/archive/2007/11/18/53391.aspx</link><pubDate>Sun, 18 Nov 2007 13:09:00 GMT</pubDate><guid>http://blog.blueshop.com.tw/gogojsp/archive/2007/11/18/53391.aspx</guid><wfw:comment>http://blog.blueshop.com.tw/gogojsp/comments/53391.aspx</wfw:comment><comments>http://blog.blueshop.com.tw/gogojsp/archive/2007/11/18/53391.aspx#Feedback</comments><slash:comments>3</slash:comments><wfw:commentRss>http://blog.blueshop.com.tw/gogojsp/comments/commentRss/53391.aspx</wfw:commentRss><trackback:ping>http://blog.blueshop.com.tw/gogojsp/services/trackbacks/53391.aspx</trackback:ping><description>&lt;TEXTAREA class=c# name=code rows=6 cols=50&gt;            List&amp;lt;int&amp;gt; list = new List&amp;lt;int&amp;gt;();
            
            //定義集合 1-42
            for (int i = 1; i &amp;lt;= 42; i++)
            {
                list.Add(i);
            }

            //產生亂數並將結果放到 listRnd
            List&amp;lt;int&amp;gt; listRnd = new List&amp;lt;int&amp;gt;();
            Random rnd = new Random();
            for (int i = 1; i &amp;lt;= 6; i++)
            { 
                //產生亂數，最大值為 list.Count ....移掉一個就減一個
                int rndNum = rnd.Next(list.Count);
                listRnd.Add(list[rndNum]);  //加入結果
                list.RemoveAt(rndNum);      //選到後就移掉，下次就選不到了
            }


            //印出結果
            foreach (int i in listRnd)
            {
                Console.WriteLine(i);
            }

&lt;/TEXTAREA&gt;&lt;img src ="http://blog.blueshop.com.tw/gogojsp/aggbug/53391.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>達可達</dc:creator><title>C# Windows DataGridView 判斷 CheckBox 選取的方法</title><link>http://blog.blueshop.com.tw/gogojsp/archive/2007/10/29/53182.aspx</link><pubDate>Mon, 29 Oct 2007 20:31:00 GMT</pubDate><guid>http://blog.blueshop.com.tw/gogojsp/archive/2007/10/29/53182.aspx</guid><wfw:comment>http://blog.blueshop.com.tw/gogojsp/comments/53182.aspx</wfw:comment><comments>http://blog.blueshop.com.tw/gogojsp/archive/2007/10/29/53182.aspx#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://blog.blueshop.com.tw/gogojsp/comments/commentRss/53182.aspx</wfw:commentRss><trackback:ping>http://blog.blueshop.com.tw/gogojsp/services/trackbacks/53182.aspx</trackback:ping><description>不熟的東東只能靠Debug去了解了
呵呵，記下來，以後或許有機會用到^_^
&lt;TEXTAREA class=c# name=code rows=6 cols=50&gt;
            foreach (DataGridViewRow dgR in this.dataGridView1.Rows)
            {
                try
                {                    
                    DataGridViewCheckBoxCell cbx = (DataGridViewCheckBoxCell)dgR.Cells[0];
                    if ((bool)cbx.FormattedValue)
                    {
                        //TODO:                 
                    }
                    
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.Message);
                }
            
            }
&lt;/TEXTAREA&gt;&lt;img src ="http://blog.blueshop.com.tw/gogojsp/aggbug/53182.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>達可達</dc:creator><title>Congratulations on Charles Petzold's happy marriage! </title><link>http://blog.blueshop.com.tw/gogojsp/archive/2007/10/10/52868.aspx</link><pubDate>Wed, 10 Oct 2007 21:56:00 GMT</pubDate><guid>http://blog.blueshop.com.tw/gogojsp/archive/2007/10/10/52868.aspx</guid><wfw:comment>http://blog.blueshop.com.tw/gogojsp/comments/52868.aspx</wfw:comment><comments>http://blog.blueshop.com.tw/gogojsp/archive/2007/10/10/52868.aspx#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://blog.blueshop.com.tw/gogojsp/comments/commentRss/52868.aspx</wfw:commentRss><trackback:ping>http://blog.blueshop.com.tw/gogojsp/services/trackbacks/52868.aspx</trackback:ping><description>&lt;FONT color=blue&gt;&lt;A href="http://www.charlespetzold.com/blog/2007/10/091219.html#comments" target='_blank'&gt;&lt;FONT color=#0000ff&gt;&lt;BR&gt;Charles Petzold Getting Married&lt;/FONT&gt;&lt;/A&gt; &lt;BR&gt;&lt;/FONT&gt;&lt;BR&gt;&lt;TEXTAREA class=c# name=code rows=6 cols=50&gt;        public static void Main()
        {
            Console.WriteLine(" Congratulations ! ^___^ ");
        }
&lt;/TEXTAREA&gt;&lt;img src ="http://blog.blueshop.com.tw/gogojsp/aggbug/52868.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>達可達</dc:creator><title>DataTable Compute</title><link>http://blog.blueshop.com.tw/gogojsp/archive/2007/10/09/52840.aspx</link><pubDate>Tue, 09 Oct 2007 07:22:00 GMT</pubDate><guid>http://blog.blueshop.com.tw/gogojsp/archive/2007/10/09/52840.aspx</guid><wfw:comment>http://blog.blueshop.com.tw/gogojsp/comments/52840.aspx</wfw:comment><comments>http://blog.blueshop.com.tw/gogojsp/archive/2007/10/09/52840.aspx#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://blog.blueshop.com.tw/gogojsp/comments/commentRss/52840.aspx</wfw:commentRss><trackback:ping>http://blog.blueshop.com.tw/gogojsp/services/trackbacks/52840.aspx</trackback:ping><description>&lt;TEXTAREA class=c# name=code rows=6 cols=50&gt;
    class Program
    {
        private DataTable GetSampleDT()
        {
            DataTable dt = new DataTable();
            dt.Columns.Add("id");
            dt.Columns.Add("name");
            dt.Columns.Add("score", typeof(int));

            dt.Rows.Add(new object[] { "001", "王小明", 90, });
            dt.Rows.Add(new object[] { "002", "李大華", 80,  });
            dt.Rows.Add(new object[] { "003", "黃小英", 60,  });

            return dt;
        }


        public static void Main()
        {
            Program p = new Program();
            DataTable dt = p.GetSampleDT();

            int scoreMax = Convert.ToInt32(dt.Compute("Max(score)", ""));
            int scoreMin = Convert.ToInt32(dt.Compute("Min(score)", ""));
            int scoreAvg = Convert.ToInt32(dt.Compute("Avg(score)", ""));

            Console.WriteLine("max:{0},min:{1},avg:{2}", scoreMax, scoreMin, scoreAvg);
            
            //Result is ===&gt; max:90,min:60,avg:76
        }

    }
&lt;/TEXTAREA&gt;&lt;img src ="http://blog.blueshop.com.tw/gogojsp/aggbug/52840.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>達可達</dc:creator><title>三則簡單的 C# 考題  (解答)</title><link>http://blog.blueshop.com.tw/gogojsp/archive/2007/10/07/52791.aspx</link><pubDate>Sun, 07 Oct 2007 11:50:00 GMT</pubDate><guid>http://blog.blueshop.com.tw/gogojsp/archive/2007/10/07/52791.aspx</guid><wfw:comment>http://blog.blueshop.com.tw/gogojsp/comments/52791.aspx</wfw:comment><comments>http://blog.blueshop.com.tw/gogojsp/archive/2007/10/07/52791.aspx#Feedback</comments><slash:comments>3</slash:comments><wfw:commentRss>http://blog.blueshop.com.tw/gogojsp/comments/commentRss/52791.aspx</wfw:commentRss><trackback:ping>http://blog.blueshop.com.tw/gogojsp/services/trackbacks/52791.aspx</trackback:ping><description>在之前發表了一篇文章 "&lt;A href="http://blog.blueshop.com.tw/gogojsp/archive/2006/12/24/48872.aspx"&gt;三則簡單的 C# 考題&lt;/A&gt;"，主要是要建立一些正確的基本觀念，看你答對了幾題?^_^&lt;BR&gt;第一題：&lt;BR&gt;&lt;TEXTAREA class=c# name=code rows=6 cols=50&gt;        public static void Main()
        {
            try
            {
                double a = 1;
                double b = 0;
                double c = a / b;
                Console.WriteLine(c);
            }
            catch (DivideByZeroException ex)
            {
                Console.WriteLine("catch DivideByZeroException");
            }
            catch (Exception ex)
            {
                Console.WriteLine("catch Exception");
            }

           
            // 結果為....正無窮大 Double.PositiveInfinity 
            // 浮點數允許正負無限大，您打對了嗎 ^_^
        }&lt;/TEXTAREA&gt; &lt;BR&gt;第二題：&lt;BR&gt;&lt;TEXTAREA class=c# name=code rows=6 cols=50&gt;    class Program
    {
        public int GetNum()
        {
            int a = 1;
            int b = 0;

            try
            {
                return a / b;
            }
            catch
            {
                return -1;
            }
            finally
            {
                return 0;
            }
        }


        public static void Main()
        {
            Program p = new Program();
            Console.WriteLine(p.GetNum());
        }

        // 第二題的結果為什麼呢.... -1 還是 0 ????????
        // 答案是.................. 不是 -1 也不是 0。.....因為Compile 會發生錯誤。
        // 錯誤訊息為 "程式控制權不能從 finally 子句的主體離開"       ^_^

    }&lt;/TEXTAREA&gt;&lt;BR&gt;第三題：&lt;BR&gt;&lt;TEXTAREA class=c# name=code rows=6 cols=50&gt;    class Program
    {
        public int GetNum()
        {
            int ret = 1;

            try
            {
                return ret;
            }
            catch
            {
                return 0;
            }
            finally
            {
                ret++;
            }
        }


        public static void Main()
        {
            Program p = new Program();
            Console.WriteLine(p.GetNum());
        }

        //第三題的答案，回傳之後，finally再去指定變數值....是否會影響 return 的值呢?
        //答案是不會的..因為 ret 為數值型態 by value，
        //在return之後再去改變數值，並不會影響其結果(by value 各自獨立..)
    }
&lt;/TEXTAREA&gt;&lt;BR&gt;第三題補充：&lt;BR&gt;&lt;TEXTAREA class=c# name=code rows=6 cols=50&gt;    class Program
    {
        //自訂物件
        public class RetObject
        {
            public int Id;
            public string Name;
            public override string ToString()
            {
                return String.Format("Id:{0},Name:{1}", this.Id, this.Name);
            }
        }


        //取得物件
        public RetObject GetObj()
        {
            RetObject o = new RetObject();

            try
            {
                o.Id = 100;
                o.Name = "Bill";
                return o;
            }
            catch
            {
                return null;
            }
            finally
            {
                o.Id = 101;
                o.Name = "Marry";
            }        
        }        


        public static void Main()
        {
            Console.WriteLine(p.GetObj());
        }

        //承第三題，如果今天回傳的是 By Ref 的物件類型，是否會影響最後 return 物件的結果呢?
        //最後印出來的會是 Bill 還是 Marry 呢？
        //答案.....finally再去動作是會影響的...結果是 101, Marry...
        //我想大家都猜的到....因為同一個物件參考，會互相影響....
&lt;/TEXTAREA&gt;&lt;img src ="http://blog.blueshop.com.tw/gogojsp/aggbug/52791.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>達可達</dc:creator><title>利用正規表示式取得字串中數值......</title><link>http://blog.blueshop.com.tw/gogojsp/archive/2007/10/05/52736.aspx</link><pubDate>Fri, 05 Oct 2007 07:57:00 GMT</pubDate><guid>http://blog.blueshop.com.tw/gogojsp/archive/2007/10/05/52736.aspx</guid><wfw:comment>http://blog.blueshop.com.tw/gogojsp/comments/52736.aspx</wfw:comment><comments>http://blog.blueshop.com.tw/gogojsp/archive/2007/10/05/52736.aspx#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://blog.blueshop.com.tw/gogojsp/comments/commentRss/52736.aspx</wfw:commentRss><trackback:ping>http://blog.blueshop.com.tw/gogojsp/services/trackbacks/52736.aspx</trackback:ping><description>&lt;TEXTAREA class=c# name=code rows=6 cols=50&gt;
		public static void Main()
		{
			string regexTest = "abc01.23ced2c43.58dl3f dfs3354";
			Regex a = new Regex("[0-9]+[.]?[0-9]*");

			
			MatchCollection matchCollect = a.Matches( regexTest );

			foreach( Match m in matchCollect)
			{			
				Console.WriteLine(m.Value);				
			}	            
		}
&lt;/TEXTAREA&gt;&lt;img src ="http://blog.blueshop.com.tw/gogojsp/aggbug/52736.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>達可達</dc:creator><title>利用 JavaScript 去限制 CheckBoxList 的勾選數</title><link>http://blog.blueshop.com.tw/gogojsp/archive/2007/10/05/52735.aspx</link><pubDate>Fri, 05 Oct 2007 00:13:00 GMT</pubDate><guid>http://blog.blueshop.com.tw/gogojsp/archive/2007/10/05/52735.aspx</guid><wfw:comment>http://blog.blueshop.com.tw/gogojsp/comments/52735.aspx</wfw:comment><comments>http://blog.blueshop.com.tw/gogojsp/archive/2007/10/05/52735.aspx#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://blog.blueshop.com.tw/gogojsp/comments/commentRss/52735.aspx</wfw:commentRss><trackback:ping>http://blog.blueshop.com.tw/gogojsp/services/trackbacks/52735.aspx</trackback:ping><description>當CheckBoxList超過3個的項目被勾選時會跳出警告視窗......&lt;BR&gt;實作的的範列如下&lt;BR&gt;&lt;TEXTAREA class=xml name=code rows=6 cols=50&gt;&amp;lt;html xmlns="http://www.w3.org/1999/xhtml"&amp;gt;
&amp;lt;head id="Head1" runat="server"&amp;gt;
    &amp;lt;title&amp;gt;Untitled Page&amp;lt;/title&amp;gt;

    &amp;lt;script type="text/javascript"&amp;gt;


    function checkCount()
    {
        cbxList = document.getElementById('&amp;lt;%=cbxListType.ClientID %&amp;gt;');
        
        var count = 0;
        var IsError = false;
        for(i = 0; i &amp;lt; cbxList.all.tags('input').length;i++)
        {
            if ( cbxList.all.tags('input')[i].type=='checkbox')
            {
                if ( cbxList.all.tags('input')[i].checked )
                {
                    count++;
                }
             }
             
             if ( count &amp;gt; 3)
             {
                IsError = true;
                break;
             }         
         }
         
         if ( IsError)
         {
            alert('最多只能選三個!');
            event.srcElement.checked = false;
         }
    }
    &amp;lt;/script&amp;gt;

&amp;lt;/head&amp;gt;
&amp;lt;body&amp;gt;
    &amp;lt;form id="form1" runat="server"&amp;gt;
        &amp;lt;div&amp;gt;
            &amp;lt;asp:CheckBoxList ID="cbxListType" runat="server" RepeatDirection="Horizontal"&amp;gt;
                &amp;lt;asp:ListItem Value="a"&amp;gt;aaa&amp;lt;/asp:ListItem&amp;gt;
                &amp;lt;asp:ListItem Value="b"&amp;gt;bbb&amp;lt;/asp:ListItem&amp;gt;
                &amp;lt;asp:ListItem Value="c"&amp;gt;ccc&amp;lt;/asp:ListItem&amp;gt;
                &amp;lt;asp:ListItem Value="d"&amp;gt;ddd&amp;lt;/asp:ListItem&amp;gt;
                &amp;lt;asp:ListItem Value="e"&amp;gt;eee&amp;lt;/asp:ListItem&amp;gt;
                &amp;lt;asp:ListItem Value="f"&amp;gt;fff&amp;lt;/asp:ListItem&amp;gt;
            &amp;lt;/asp:CheckBoxList&amp;gt;&amp;lt;/div&amp;gt;
    &amp;lt;/form&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;
&lt;/TEXTAREA&gt;&lt;TEXTAREA class=c# name=code rows=6 cols=50&gt;    protected void Page_Load(object sender, EventArgs e)
    {

        this.cbxListType.Attributes.Add("onclick", "checkCount();");

    }
&lt;/TEXTAREA&gt;&lt;img src ="http://blog.blueshop.com.tw/gogojsp/aggbug/52735.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>達可達</dc:creator><title>日期格式轉換(顯示英文月份)</title><link>http://blog.blueshop.com.tw/gogojsp/archive/2007/10/04/52726.aspx</link><pubDate>Thu, 04 Oct 2007 14:01:00 GMT</pubDate><guid>http://blog.blueshop.com.tw/gogojsp/archive/2007/10/04/52726.aspx</guid><wfw:comment>http://blog.blueshop.com.tw/gogojsp/comments/52726.aspx</wfw:comment><comments>http://blog.blueshop.com.tw/gogojsp/archive/2007/10/04/52726.aspx#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://blog.blueshop.com.tw/gogojsp/comments/commentRss/52726.aspx</wfw:commentRss><trackback:ping>http://blog.blueshop.com.tw/gogojsp/services/trackbacks/52726.aspx</trackback:ping><description>慚愧，小弟在這一篇回應中 &lt;A href="http://www.blueshop.com.tw/board/show.asp?subcde=BRD20071004091357VQK&amp;amp;fumcde"&gt;http://www.blueshop.com.tw/board/show.asp?subcde=BRD20071004091357VQK&amp;amp;fumcde&lt;/A&gt;=&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 因為不了解怎麼取得英文月份的簡寫，所以回了個笨方法;用SubString再去取字串 &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 感謝 兔 網友找到的答案，受益了 :)&lt;TEXTAREA class=c# name=code rows=6 cols=50&gt;            DateTimeFormatInfo myDTFI = new CultureInfo("en-US", false).DateTimeFormat;
            Console.WriteLine("一般：{0}",DateTime.Now.ToString());
            Console.WriteLine("英文：{0}",DateTime.Now.ToString(myDTFI));
            Console.WriteLine("英文年月簡寫：{0}",DateTime.Now.ToString("MMM dd yyyy", myDTFI));
            Console.WriteLine("英文年月：{0}",DateTime.Now.ToString("MMMM dd yyyy", myDTFI));&lt;/TEXTAREA&gt;&lt;img src ="http://blog.blueshop.com.tw/gogojsp/aggbug/52726.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>達可達</dc:creator><title>利用命令列執行DOS XCopy 指令</title><link>http://blog.blueshop.com.tw/gogojsp/archive/2007/10/03/52721.aspx</link><pubDate>Wed, 03 Oct 2007 23:48:00 GMT</pubDate><guid>http://blog.blueshop.com.tw/gogojsp/archive/2007/10/03/52721.aspx</guid><wfw:comment>http://blog.blueshop.com.tw/gogojsp/comments/52721.aspx</wfw:comment><comments>http://blog.blueshop.com.tw/gogojsp/archive/2007/10/03/52721.aspx#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://blog.blueshop.com.tw/gogojsp/comments/commentRss/52721.aspx</wfw:commentRss><trackback:ping>http://blog.blueshop.com.tw/gogojsp/services/trackbacks/52721.aspx</trackback:ping><description>&lt;TEXTAREA class=c# name=code rows=6 cols=50&gt;
			string installSTR=(string)Registry.LocalMachine.GetValue("InstallPath");
			string[] childDir=Directory.GetDirectories(installSTR);
			Process.Start( Environment.SystemDirectory + "\\xcopy.exe" , "*.* "+installSTR+" /s/y");

&lt;/TEXTAREA&gt;&lt;img src ="http://blog.blueshop.com.tw/gogojsp/aggbug/52721.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>達可達</dc:creator><title>SQL 批次修改定序(組字串)</title><link>http://blog.blueshop.com.tw/gogojsp/archive/2007/10/03/52720.aspx</link><pubDate>Wed, 03 Oct 2007 23:46:00 GMT</pubDate><guid>http://blog.blueshop.com.tw/gogojsp/archive/2007/10/03/52720.aspx</guid><wfw:comment>http://blog.blueshop.com.tw/gogojsp/comments/52720.aspx</wfw:comment><comments>http://blog.blueshop.com.tw/gogojsp/archive/2007/10/03/52720.aspx#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://blog.blueshop.com.tw/gogojsp/comments/commentRss/52720.aspx</wfw:commentRss><trackback:ping>http://blog.blueshop.com.tw/gogojsp/services/trackbacks/52720.aspx</trackback:ping><description>&lt;TEXTAREA class=sql name=code rows=6 cols=50&gt;
SELECT 'ALTER TABLE '+A.name+' ALTER COLUMN '+B.name+
       CASE WHEN B.xusertype = 231 THEN ' nvarchar' WHEN B.xusertype = 175 THEN ' char' END+' ('+
       convert(varchar,B.prec)+') COLLATE Chinese_Taiwan_Stroke_BIN '+
       CASE WHEN B.isnullable=1 THEN 'NULL' ELSE 'NOT NULL' END
  FROM dbo.sysobjects A
 INNER JOIN dbo.syscolumns B ON B.id=A.id
 WHERE A.type='U' AND B.collation='Chinese_Taiwan_Stroke_CS_AS'
 ORDER BY A.name

&lt;/TEXTAREA&gt;&lt;img src ="http://blog.blueshop.com.tw/gogojsp/aggbug/52720.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>達可達</dc:creator><title>物件 Xml 序列化..</title><link>http://blog.blueshop.com.tw/gogojsp/archive/2007/10/03/52719.aspx</link><pubDate>Wed, 03 Oct 2007 23:43:00 GMT</pubDate><guid>http://blog.blueshop.com.tw/gogojsp/archive/2007/10/03/52719.aspx</guid><wfw:comment>http://blog.blueshop.com.tw/gogojsp/comments/52719.aspx</wfw:comment><comments>http://blog.blueshop.com.tw/gogojsp/archive/2007/10/03/52719.aspx#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://blog.blueshop.com.tw/gogojsp/comments/commentRss/52719.aspx</wfw:commentRss><trackback:ping>http://blog.blueshop.com.tw/gogojsp/services/trackbacks/52719.aspx</trackback:ping><description>&lt;TEXTAREA class=c# name=code rows=6 cols=50&gt;

namespace SerializerTest
{
	/// &lt;summary&gt;
	/// Test 的摘要描述。
	/// &lt;/summary&gt;
	public class XmlSerializerSample
	{

		public static void Main()
		{
			UserInfo u = new UserInfo();
			u.userAddr = "台南市忠義路...";
			u.userName = "王小明";


			XmlSerializer mySerializer = new XmlSerializer(typeof(UserInfo));
			// To write to a file, create a StreamWriter object.
			StreamWriter myWriter = new StreamWriter("c://myFileName.xml");
			mySerializer.Serialize(myWriter, u);			
		}


	}


	[Serializable]
	public class UserInfo
	{
		public string userName;
		public string userAddr;	
	}
	
}
&lt;/TEXTAREA&gt;&lt;img src ="http://blog.blueshop.com.tw/gogojsp/aggbug/52719.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>達可達</dc:creator><title>Web 文字檔下載..</title><link>http://blog.blueshop.com.tw/gogojsp/archive/2007/10/03/52718.aspx</link><pubDate>Wed, 03 Oct 2007 23:42:00 GMT</pubDate><guid>http://blog.blueshop.com.tw/gogojsp/archive/2007/10/03/52718.aspx</guid><wfw:comment>http://blog.blueshop.com.tw/gogojsp/comments/52718.aspx</wfw:comment><comments>http://blog.blueshop.com.tw/gogojsp/archive/2007/10/03/52718.aspx#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://blog.blueshop.com.tw/gogojsp/comments/commentRss/52718.aspx</wfw:commentRss><trackback:ping>http://blog.blueshop.com.tw/gogojsp/services/trackbacks/52718.aspx</trackback:ping><description>&lt;TEXTAREA class=c# name=code rows=6 cols=50&gt;
        string str = "Hello World大家好，麥克風測試";
        Response.AddHeader("content-disposition", "attachment;filename=" + HttpUtility.UrlEncode("麥克風測試.txt"));
        Response.ContentType = "text/plain";
        Response.BinaryWrite(System.Text.Encoding.UTF8.GetBytes(str));
        Response.End();
&lt;/TEXTAREA&gt;&lt;img src ="http://blog.blueshop.com.tw/gogojsp/aggbug/52718.aspx" width = "1" height = "1" /&gt;</description></item></channel></rss>