<?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-8533976945817671360</id><updated>2024-08-30T05:28:46.272+08:00</updated><category term="net"/><category term="mysql"/><category term="Java"/><category term="MVC"/><category term="Python"/><category term="servlet"/><category term="Email"/><category term="Spring"/><category term="flex / air"/><category term="tomcat"/><category term="web service"/><category term="windows service"/><category term="Android"/><category term="C"/><category term="Enterprise Architect"/><category term="JDBC"/><category term="Linq"/><category term="MAC"/><category term="MS SQL"/><category term="Sqlite"/><category term="TCP/IP"/><category term="XmlRpc"/><category term="XtraGrid"/><category term="ajax"/><category term="asp"/><category term="c3p0"/><category term="eclipse"/><category term="extjs"/><category term="html"/><category term="javascript"/><category term="mantis"/><category term="php"/><category term="smtp"/><title type='text'>SmileLight</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://smilelight-tw.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8533976945817671360/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://smilelight-tw.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/8533976945817671360/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/08329229550311591149</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>45</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-8533976945817671360.post-1938742551107413790</id><published>2014-03-07T09:13:00.003+08:00</published><updated>2014-03-07T09:19:59.158+08:00</updated><title type='text'></title><content type='html'>清空 SQL Server LDF 指令

&lt;pre class=&quot;brush: sql;&quot;&gt;
USE [OSStockDataSys]
GO 
ALTER DATABASE [OSStockDataSys] SET RECOVERY SIMPLE WITH NO_WAIT
DBCC SHRINKFILE(OSStockDataSys_log, 1)
ALTER DATABASE [OSStockDataSys] SET RECOVERY FULL WITH NO_WAIT
GO
&lt;/pre&gt;

</content><link rel='replies' type='application/atom+xml' href='http://smilelight-tw.blogspot.com/feeds/1938742551107413790/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://smilelight-tw.blogspot.com/2014/03/blog-post.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8533976945817671360/posts/default/1938742551107413790'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8533976945817671360/posts/default/1938742551107413790'/><link rel='alternate' type='text/html' href='http://smilelight-tw.blogspot.com/2014/03/blog-post.html' title=''/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/08329229550311591149</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8533976945817671360.post-1710561329123316908</id><published>2011-05-25T09:51:00.001+08:00</published><updated>2011-06-21T08:31:13.628+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Python"/><category scheme="http://www.blogger.com/atom/ns#" term="TCP/IP"/><title type='text'>用Python實作簡單的網路通訊</title><content type='html'>&lt;div&gt;這次就來講解一下用 Python 來實作 TCP/IP 的通訊&lt;br /&gt;
程式碼不長, 說明全寫在註解中&lt;br /&gt;
&lt;br /&gt;
Server Side Source Code&lt;br /&gt;
&lt;pre class=&quot;brush: py;&quot;&gt;# -*- coding: utf-8 -*-
import socket
import threading

HOST = &amp;#39;&amp;#39;
# 設定 Server Port
PORT = 50008
# 紀錄 Client 傳送資料的 Thread
threads = []
# 紀錄 Client 連線資訊
socketConn = {}
global s

# Receive Data From Client 
def thread_socket_conn_recv(connObj, addrObj):
    while True:
        # 等待接收 Client 傳送的資料
        data = connObj.recv(1024)
        if not data: break
        msg = addrObj[0] + &amp;#39;:&amp;#39; + data
        print msg
        
        # Send To All Client This Message
        for key in socketConn:
                    socketConn[key].send(msg)

# Receive Client Connection
def thread_socket_conn_accept(socketObj):
    while True:
        # 等待接收 Client 連線需求
        conn, addr = socketObj.accept()
        print &amp;quot;Connected &amp;quot;, addr

        # 透過 Thread 收接 Client 傳送資料
        t = threading.Thread(target=thread_socket_conn_recv, args=(conn, addr))
        t.start()
        threads.append (t)      
        socketConn[addr] = conn

       # Send To All Client This New Client Connect Alert
        for key in socketConn:
                    msg = &amp;#39;Welcome &amp;#39; + addr[0]
                    socketConn[key].send(msg)
                    
def main():
    global s
    # socket.socket 有二個參數
    # 第一個參數定義 socket 是屬於 Internet 還是 local
    #   分別為 socket.AF_INET(預設), socket.AF_INET6 與 socket.AF_UNIX(本機)
    # 第二個參數定義資料流通常只用 socket.SOCK_STREAM 或 socket.SOCK_DGRAM
    s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    
    # 挷定 address 跟 port
    s.bind((HOST, PORT))
    
    # 設定 socket 最大連線佇列(Queue)數, 數值上限是與系統主機有關, 通常為 5
    s.listen(0)
    
    # 透過 Thread 收接 Client 連線需求
    mainT = threading.Thread (target=thread_socket_conn_accept, args=(s,))
    mainT.start()
    
if __name__ == &amp;#39;__main__&amp;#39;:
    main()

&lt;/pre&gt;Client Side Source Code&lt;br /&gt;
&lt;pre class=&quot;brush: py;&quot;&gt;# -*- coding: utf-8 -*-
import socket
import threading

# 設定 Server IP
HOST = &amp;#39;127.0.0.1&amp;#39;
# 設定 Server Port
PORT = 50008
global s

def thread_socket_conn_recv(connObj):
 while True:
                # 等待接收 Server 傳送的資料
  data = connObj.recv(1024)
  if not data: break
  print data

def main():
    global s
    # socket.socket 有二個參數
    # 第一個參數定義 socket 是屬於 Internet 還是 local
    #   分別為 socket.AF_INET(預設), socket.AF_INET6 與 socket.AF_UNIX(本機)
    # 第二個參數定義資料流通常只用 socket.SOCK_STREAM 或 socket.SOCK_DGRAM
    s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)

    # 向 Server 請求連線
    s.connect((HOST, PORT))

    # 透過 Thread 收接 Server 傳送資料
    recvT = threading.Thread (target=thread_socket_conn_recv, args=(s,))
    recvT.start()

if __name__ == &amp;#39;__main__&amp;#39;:
    main()

&lt;/pre&gt;&lt;br /&gt;
可以直接執行, 先執行 Server, 再執行 Client&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://smilelight-tw.blogspot.com/feeds/1710561329123316908/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://smilelight-tw.blogspot.com/2011/05/python.html#comment-form' title='3 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8533976945817671360/posts/default/1710561329123316908'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8533976945817671360/posts/default/1710561329123316908'/><link rel='alternate' type='text/html' href='http://smilelight-tw.blogspot.com/2011/05/python.html' title='用Python實作簡單的網路通訊'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/08329229550311591149</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8533976945817671360.post-4153383286687338968</id><published>2011-05-23T13:32:00.001+08:00</published><updated>2011-05-23T13:59:37.890+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="C"/><title type='text'>C 語言隨機產生浮點數值</title><content type='html'>C 語言的 Rand() 所產生的是整數值, 想產生浮點數就得自己寫了&lt;br /&gt;
&lt;br /&gt;
隨著 compiler 的不同而所產生出來的最大值(RAND_MAX)也有所變化&lt;br /&gt;
&lt;br /&gt;
通常常見的值為 &lt;br /&gt;
2&lt;sup&gt;15&lt;/sup&gt;-1=32767&lt;br /&gt;
&lt;br /&gt;
而另一個常見的值為 &lt;br /&gt;
2&lt;sup&gt;31&lt;/sup&gt;-1=2147483647&lt;br /&gt;
&lt;br /&gt;
寫法可參考以下 Source Code&lt;br /&gt;
&lt;pre class=&quot;brush: csharp;&quot;&gt;/************************************************************************/
/* 隨機產生亂數 (Double)                                                */
/************************************************************************/
double randDouble(double lower, double upper)
{
 int range;           /* 想要產生亂數的區間值 */
 double randomValue;  /* 記錄隨機產生的數值 */

 range = upper - lower;
 
 randomValue = (double) rand();       /* 取得隨機值 */
 randomValue = randomValue / RAND_MAX;   /* 轉換成介於 0 與 1 之間 */
 randomValue = randomValue * range;      /* 調整至要產生的區間值 */
 randomValue = randomValue + lower;      /* 調整至正確對應的值 */

 return randomValue;
}

&lt;/pre&gt;&lt;br /&gt;
參考網站&lt;br /&gt;
&lt;a href=&quot;http://cboard.cprogramming.com/c-programming/132024-casting-rand-generate-double-float-etc.html&quot;&gt;casting Rand () to generate double, float&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://smilelight-tw.blogspot.com/feeds/4153383286687338968/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://smilelight-tw.blogspot.com/2011/05/c_23.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8533976945817671360/posts/default/4153383286687338968'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8533976945817671360/posts/default/4153383286687338968'/><link rel='alternate' type='text/html' href='http://smilelight-tw.blogspot.com/2011/05/c_23.html' title='C 語言隨機產生浮點數值'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/08329229550311591149</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8533976945817671360.post-3837757160451796966</id><published>2011-05-23T08:08:00.001+08:00</published><updated>2011-06-16T02:12:40.411+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="net"/><title type='text'>C# 讀取 CSV 檔</title><content type='html'>&lt;div&gt;直接將 Source Code 貼出來給你們參考&lt;br /&gt;
&lt;br /&gt;
做法跟使用 ADO 方式一樣&lt;br /&gt;
&lt;br /&gt;
說明請參考 Source Code 的註解就會明白了&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: csharp;&quot;&gt;using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Data.OleDb;

namespace LoadCSVDemo
{
    class Program
    {
        static void Main(string[] args)
        {
            OleDbConnection conn = null;
            OleDbCommand comm = null;
            OleDbDataReader dr = null;
            string sql = &quot;select * from [TestData.csv]&quot;; // TestData.csv &amp;lt;-- 想要載入的 CSV 檔檔名
            // Data Source 的參數表示想載入的 CSV 檔的路徑位置
            // Extended Properties 中
            // --&amp;gt; Text 表示要載入的檔案屬性屬於文字檔
            // --&amp;gt; HDR = NO 表示第一行的資料非標頭欄位
            // --&amp;gt; HDR = YES 表示第一行的資料為標頭欄位
            string connectString = @&quot;Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\;Extended Properties=&#39;Text;HDR=NO&#39;&quot;;

            try
            {
                conn = new OleDbConnection(connectString);
                conn.Open();

                comm = conn.CreateCommand();
                comm.CommandText = sql;

                dr = comm.ExecuteReader();
                while (dr.Read())
                {

                    Console.WriteLine(&quot;{0}\t\t{1}\t\t{2}&quot;, dr[0], dr[1], dr[0]);

                }                
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
            }
            finally
            {
                if (conn != null &amp;amp;&amp;amp; conn.State == ConnectionState.Open)
                    conn.Close();
            }

            Console.Read();
        }
    }
}



&lt;/pre&gt;&lt;br /&gt;
不過當你的系統是 64 位元時, 會發生以下問題&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhhHNTu9X-rNMiTQu0Da24TQQI3WE7pY_3vvR9tWeBvEwgbFHv_rSFK0AxyOW-_Ar060zLJ45r4tyMafz4uFSU6sH3KT2QPwnaaESpP3UHrgPosbpQNX90ZLwRqoyKSGMm0DmTu_tgFh1s3/s1600/Error_001.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;114&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhhHNTu9X-rNMiTQu0Da24TQQI3WE7pY_3vvR9tWeBvEwgbFHv_rSFK0AxyOW-_Ar060zLJ45r4tyMafz4uFSU6sH3KT2QPwnaaESpP3UHrgPosbpQNX90ZLwRqoyKSGMm0DmTu_tgFh1s3/s320/Error_001.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
因為Jet不支援 64 位元, 所以必需編譯成 32 位元&lt;br /&gt;
請修改建置--&amp;gt;平台目標--&amp;gt;選擇 x86&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi9P7Cjb-cAgy_lmLOWX7U21JiNpdMmRZzFeZxpGmX3r3Ap0shitOlzhEQ_au6R_GtLh__tUa8-OQjvTq6SPzAXz46UUNCRpIeoyIeGG-cbgj_o4-vy928b-xkEDSGGPDot1RCTh1QrUli3/s1600/Info_001.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;222&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi9P7Cjb-cAgy_lmLOWX7U21JiNpdMmRZzFeZxpGmX3r3Ap0shitOlzhEQ_au6R_GtLh__tUa8-OQjvTq6SPzAXz46UUNCRpIeoyIeGG-cbgj_o4-vy928b-xkEDSGGPDot1RCTh1QrUli3/s320/Info_001.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
再執行程式&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGBoNj4hyo7sGDmQRyuwaWisoGln23L-Gldr__YBdtyByhT68yBtbLKZuE52r4by7RLpx8wzYCTtVyGrTL1AsuSTAHxaQwvtJzoMZarAiEzE4VyCmjpJZ9KRmFSW5YJAgUMQDtq4DHxpYn/s1600/Info_002.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;130&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGBoNj4hyo7sGDmQRyuwaWisoGln23L-Gldr__YBdtyByhT68yBtbLKZuE52r4by7RLpx8wzYCTtVyGrTL1AsuSTAHxaQwvtJzoMZarAiEzE4VyCmjpJZ9KRmFSW5YJAgUMQDtq4DHxpYn/s320/Info_002.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://smilelight-tw.blogspot.com/feeds/3837757160451796966/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://smilelight-tw.blogspot.com/2011/05/c-csv.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8533976945817671360/posts/default/3837757160451796966'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8533976945817671360/posts/default/3837757160451796966'/><link rel='alternate' type='text/html' href='http://smilelight-tw.blogspot.com/2011/05/c-csv.html' title='C# 讀取 CSV 檔'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/08329229550311591149</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhhHNTu9X-rNMiTQu0Da24TQQI3WE7pY_3vvR9tWeBvEwgbFHv_rSFK0AxyOW-_Ar060zLJ45r4tyMafz4uFSU6sH3KT2QPwnaaESpP3UHrgPosbpQNX90ZLwRqoyKSGMm0DmTu_tgFh1s3/s72-c/Error_001.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8533976945817671360.post-6987538469138943796</id><published>2011-05-18T11:18:00.000+08:00</published><updated>2011-05-18T11:18:26.940+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="net"/><title type='text'>C# 產生不重覆的隨機數值</title><content type='html'>要產生隨機而不重覆的數值可以參考以下語法&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: csharp;&quot;&gt;...
Random Counter = new Random(Guid.NewGuid().GetHashCode());
...
&lt;/pre&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; font-size: 12px; line-height: 13px;&quot;&gt;參考網站 :&amp;nbsp;&lt;a href=&quot;http://www.dotblogs.com.tw/larrynung/archive/2010/01/04/12801.aspx&quot;&gt;不同的Random物件給予不同的亂數種子&lt;/a&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://smilelight-tw.blogspot.com/feeds/6987538469138943796/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://smilelight-tw.blogspot.com/2011/05/c.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8533976945817671360/posts/default/6987538469138943796'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8533976945817671360/posts/default/6987538469138943796'/><link rel='alternate' type='text/html' href='http://smilelight-tw.blogspot.com/2011/05/c.html' title='C# 產生不重覆的隨機數值'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/08329229550311591149</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8533976945817671360.post-3097527758756213930</id><published>2011-03-23T00:11:00.000+08:00</published><updated>2011-06-16T15:30:03.409+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="MVC"/><category scheme="http://www.blogger.com/atom/ns#" term="Spring"/><title type='text'>Spring MVC View 中文亂碼問題</title><content type='html'>&lt;div&gt;最近在學習 Spring MVC 的過程中, 發現前端顯示中文會亂碼, &lt;br /&gt;
&lt;br /&gt;
後來找到了解決的方式, &lt;br /&gt;
&lt;br /&gt;
1. 就是在 web.xml 檔中, 新增 filter 機制&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: xml;&quot;&gt;...
&amp;lt;filter&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;lt;filter-name&amp;gt;SetCharacterEncoding&amp;lt;/filter-name&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;lt;filter-class&amp;gt;org.springframework.web.filter.CharacterEncodingFilter&amp;lt;/filter-class&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;lt;init-param&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;param-name&amp;gt;encoding&amp;lt;/param-name&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;param-value&amp;gt;UTF-8&amp;lt;/param-value&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;lt;/init-param&amp;gt;
&amp;lt;/filter&amp;gt;
&amp;lt;filter-mapping&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;lt;filter-name&amp;gt;SetCharacterEncoding&amp;lt;/filter-name&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;lt;url-pattern&amp;gt;/*&amp;lt;/url-pattern&amp;gt;
&amp;lt;/filter-mapping&amp;gt;
...
&lt;/pre&gt;&lt;br /&gt;
2. JSP 網頁也必須設定 contentType&lt;br /&gt;
&lt;%@page contentType=&quot;text/html; charset=UTF-8&quot; %&gt;&lt;br /&gt;
&lt;br /&gt;
這樣子就可以解決中文亂碼的問題!!!&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://smilelight-tw.blogspot.com/feeds/3097527758756213930/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://smilelight-tw.blogspot.com/2011/03/spring-mvc-view.html#comment-form' title='2 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8533976945817671360/posts/default/3097527758756213930'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8533976945817671360/posts/default/3097527758756213930'/><link rel='alternate' type='text/html' href='http://smilelight-tw.blogspot.com/2011/03/spring-mvc-view.html' title='Spring MVC View 中文亂碼問題'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/08329229550311591149</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8533976945817671360.post-8257629032130527317</id><published>2011-02-28T13:58:00.002+08:00</published><updated>2011-02-28T14:00:25.574+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Linq"/><category scheme="http://www.blogger.com/atom/ns#" term="net"/><title type='text'>Linq to Sql 使用類似 NewID 方法</title><content type='html'>Linq to Sql 本身沒有支援 newid() 方法&lt;br /&gt;
&lt;br /&gt;
不過我們可以透過以下方法達到相同的效果&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: csharp;&quot;&gt;...
var obj = from t in ctx.test_T
          orderby Guid.NewGuild()
          select t
...
&lt;/pre&gt;&lt;br /&gt;
參考網站 : &lt;a href=&quot;http://news.cnblogs.com/q/3531/&quot;&gt;Linq To Sql 如何替代 newid()&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://smilelight-tw.blogspot.com/feeds/8257629032130527317/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://smilelight-tw.blogspot.com/2011/02/linq-to-sql-newid.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8533976945817671360/posts/default/8257629032130527317'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8533976945817671360/posts/default/8257629032130527317'/><link rel='alternate' type='text/html' href='http://smilelight-tw.blogspot.com/2011/02/linq-to-sql-newid.html' title='Linq to Sql 使用類似 NewID 方法'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/08329229550311591149</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8533976945817671360.post-2396380287248633903</id><published>2011-01-04T15:28:00.000+08:00</published><updated>2011-01-04T15:28:40.657+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="MVC"/><category scheme="http://www.blogger.com/atom/ns#" term="net"/><title type='text'>.Net MVC2 的 Html.TextBoxFor 加入 Html Attributes</title><content type='html'>一般在使用 .Net MVC2 時, 都會使用 Html.TextBoxFor 方式產生前端的 &lt;br /&gt;
&lt;br /&gt;
HTML Tag, 如果想要加入 Html Tag 的 Attributes 參數時, 可以使用以&lt;br /&gt;
&lt;br /&gt;
下的做法&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: csharp;&quot;&gt;...
&amp;lt;%: Html.TextBoxFor(m =&amp;gt; m.UserName, new { @class = &quot;ui-widget-content ui-corner-all&quot; })%&amp;gt;
...
&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://smilelight-tw.blogspot.com/feeds/2396380287248633903/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://smilelight-tw.blogspot.com/2011/01/net-mvc2-htmltextboxfor-html-attributes.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8533976945817671360/posts/default/2396380287248633903'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8533976945817671360/posts/default/2396380287248633903'/><link rel='alternate' type='text/html' href='http://smilelight-tw.blogspot.com/2011/01/net-mvc2-htmltextboxfor-html-attributes.html' title='.Net MVC2 的 Html.TextBoxFor 加入 Html Attributes'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/08329229550311591149</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8533976945817671360.post-5652518121852989442</id><published>2010-12-28T18:18:00.004+08:00</published><updated>2011-03-23T00:11:27.576+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="MVC"/><category scheme="http://www.blogger.com/atom/ns#" term="Spring"/><title type='text'>Spring MVC Demo</title><content type='html'>最近研究了一下 Spring MVC 的架構&lt;br /&gt;
&lt;br /&gt;
大該了解基本的用法&lt;br /&gt;
&lt;br /&gt;
在此分享 Spring MVC Demo 程式&lt;br /&gt;
&lt;br /&gt;
DemoWeb 架構以 &lt;br /&gt;
Spring MVC + Hibernate + Annotation&lt;br /&gt;
為主架構, 是目前業界還滿流行的架構之一, 如果前端想使用JQuery也是沒問題&lt;br /&gt;
的, 至於後端 DB 的話因為是使用 Hibernate 做為 ORM, 所以基本上並不會有&lt;br /&gt;
Databases Dependency 的問題, 只要找到相關 DB 的 JDBC 就可以切換了&lt;br /&gt;
&lt;br /&gt;
請點選下載 &lt;a href=&quot;https://docs.google.com/leaf?id=0B7L7_WcdjbMGMWFkYjBhODYtMmRiZi00ZGYyLWEzOTUtNTBkYWMyMmIwNzkw&amp;amp;hl=zh_TW&quot;&gt;DemoWeb&lt;/a&gt; 程式&lt;br /&gt;
或至 &lt;a href=&quot;https://github.com/allensu/DemoWeb&quot;&gt;DemoWeb (github)&lt;/a&gt; 下載程式&lt;br /&gt;
&lt;br /&gt;
開發工具為 &lt;a href=&quot;http://www.springsource.com/products/springsource-tool-suite-download&quot;&gt;SpringSource Tool Suite&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
DemoWeb 所用的 Databases 目前有二種, 可任選其中一種作測試&lt;br /&gt;
1. 設定 SQLite (DemoWeb程式預設)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;a. 將 DemoWeb 下載解壓後, 資料夾下有一個 SQLite DB 檔 demowebdb.db3&lt;br /&gt;
&amp;nbsp;&amp;nbsp;b. 將 demowebdb.db3 檔放至 C:\DemoWebDB\ 資料夾下就可以了&lt;br /&gt;
&lt;br /&gt;
2. 設定 MySQL&lt;br /&gt;
&amp;nbsp;&amp;nbsp;a. 將 DemoWeb 下載解壓後, 資料夾下有一個 demowebdb_schema.sql&lt;br /&gt;
&amp;nbsp;&amp;nbsp;b. 執行此 SQL 檔後, 將會建立 demowebdb&lt;br /&gt;
&amp;nbsp;&amp;nbsp;c. 開啟 WEB-INF\jdbc.properties 檔, 更改 MySQL 登入的 UserName 跟&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;Password 參數&lt;br /&gt;
&lt;pre class=&quot;brush: java;highlight: [5, 6]&quot;&gt;# MySQL Setting
datasource.mysql.driverClassName=com.mysql.jdbc.Driver
datasource.mysql.dialect=org.hibernate.dialect.MySQLDialect
datasource.mysql.demowebdb.url=jdbc:mysql://localhost:3306/demowebdb?useUnicode=true&amp;amp;characterEncoding=UTF-8
datasource.mysql.demowebdb.username=xxxxx
datasource.mysql.demowebdb.password=xxxxx
...
&lt;/pre&gt;&amp;nbsp;&amp;nbsp; d. 開啟 WEB-INF\spring\appServlet\servlet-context.xml 檔, 更改&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; DataSource 的參數,&amp;nbsp;先找到以下區段&lt;br /&gt;
&lt;pre class=&quot;brush: xml; highlight: [3, 4, 5, 6]&quot;&gt;...
&amp;lt;beans:bean class=&amp;quot;com.mchange.v2.c3p0.ComboPooledDataSource&amp;quot; id=&amp;quot;dataSource&amp;quot;&amp;gt;
  &amp;lt;beans:property name=&amp;quot;driverClass&amp;quot; value=&amp;quot;${datasource.sqlite.driverClassName}&amp;quot;/&amp;gt;
  &amp;lt;beans:property name=&amp;quot;jdbcUrl&amp;quot; value=&amp;quot;${datasource.sqlite.demowebdb.url}&amp;quot;/&amp;gt;
  &amp;lt;beans:property name=&amp;quot;user&amp;quot; value=&amp;quot;${datasource.sqlite.demowebdb.username}&amp;quot;/&amp;gt;
  &amp;lt;beans:property name=&amp;quot;password&amp;quot; value=&amp;quot;${datasource.sqlite.demowebdb.password}&amp;quot;/&amp;gt;
&amp;lt;/beans:bean&amp;gt;
...
&lt;/pre&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;修改成&lt;br /&gt;
&lt;pre class=&quot;brush: xml; highlight: [3, 4, 5, 6]&quot;&gt;...
&amp;lt;beans:bean class=&amp;quot;com.mchange.v2.c3p0.ComboPooledDataSource&amp;quot; id=&amp;quot;dataSource&amp;quot;&amp;gt;
  &amp;lt;beans:property name=&amp;quot;driverClass&amp;quot; value=&amp;quot;${datasource.mysql.driverClassName}&amp;quot;/&amp;gt;
  &amp;lt;beans:property name=&amp;quot;jdbcUrl&amp;quot; value=&amp;quot;${datasource.mysql.demowebdb.url}&amp;quot;/&amp;gt;
  &amp;lt;beans:property name=&amp;quot;user&amp;quot; value=&amp;quot;${datasource.mysql.demowebdb.username}&amp;quot;/&amp;gt;
  &amp;lt;beans:property name=&amp;quot;password&amp;quot; value=&amp;quot;${datasource.mysql.demowebdb.password}&amp;quot;/&amp;gt;
&amp;lt;/beans:bean&amp;gt;
...
&lt;/pre&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;再來就是執行程式作測試啦!!!!</content><link rel='replies' type='application/atom+xml' href='http://smilelight-tw.blogspot.com/feeds/5652518121852989442/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://smilelight-tw.blogspot.com/2010/12/spring-mvc-demo.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8533976945817671360/posts/default/5652518121852989442'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8533976945817671360/posts/default/5652518121852989442'/><link rel='alternate' type='text/html' href='http://smilelight-tw.blogspot.com/2010/12/spring-mvc-demo.html' title='Spring MVC Demo'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/08329229550311591149</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8533976945817671360.post-5210022748879540915</id><published>2010-12-21T00:20:00.002+08:00</published><updated>2010-12-27T13:52:06.062+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Python"/><title type='text'>Serializing Python Objects</title><content type='html'>&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;此篇文章主要說用Python的Pickle module功能&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;1. 序列化(Serialization)&lt;/b&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;將Python Object序列化時, 可使用pickle module的dumps方法   &lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;ex.&lt;br /&gt;
&lt;pre class=&quot;brush: py; highlight: [3]&quot;&gt;&amp;gt;&amp;gt;&amp;gt; import pickle
&amp;gt;&amp;gt;&amp;gt; x = {&#39;name&#39;:&#39;allen&#39;, &#39;sex&#39;:&#39;boy&#39;}
&amp;gt;&amp;gt;&amp;gt; xs = pickle.dumps(x)
&amp;gt;&amp;gt;&amp;gt; xs
&quot;(dp0\nS&#39;name&#39;\np1\nS&#39;allen&#39;\np2\nsS&#39;sex&#39;\np3\nS&#39;boy&#39;\np4\ns.&quot;
&lt;/pre&gt;&lt;br /&gt;
&lt;b&gt;2. 反序列化(Deserialize)&lt;/b&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;將序列化後的資料反序列化時, 可使用pickle module的loads方法&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;ex.&lt;br /&gt;
&lt;pre class=&quot;brush: py;; highlight: [1]&quot;&gt;&amp;gt;&amp;gt;&amp;gt; xsa = pickle.loads(xs)
&amp;gt;&amp;gt;&amp;gt; xsa
{&#39;name&#39;: &#39;allen&#39;, &#39;sex&#39;: &#39;boy&#39;}
&lt;/pre&gt;&lt;br /&gt;
&lt;b&gt;3. 序列化(Serialization)至檔案&lt;/b&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;如果要將 Python Object 序列化後資料儲存至檔案時, &lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;可使用 pickle module 的 dump 方法   &lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;ex.&lt;br /&gt;
&lt;pre class=&quot;brush: py;; highlight: [4]&quot;&gt;&amp;gt;&amp;gt;&amp;gt; import pickle
&amp;gt;&amp;gt;&amp;gt; x = {&#39;name&#39;:&#39;allen&#39;, &#39;sex&#39;:&#39;boy&#39;}
&amp;gt;&amp;gt;&amp;gt; f = open(&#39;c:/pyreadfile.txt&#39;, &#39;wb&#39;)
&amp;gt;&amp;gt;&amp;gt; pickle.dump(x, f)
&amp;gt;&amp;gt;&amp;gt; f.close()
&lt;/pre&gt;&lt;br /&gt;
&lt;b&gt;4. 檔案反序列化(Deserialize)&lt;/b&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;如果要將序列化的檔案反序列化時, &lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;可使用 pickle module 的 load 方法&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;ex.&lt;br /&gt;
&lt;pre class=&quot;brush: py;; highlight: [2]&quot;&gt;&amp;gt;&amp;gt;&amp;gt; f = open(&#39;c:/pyreadfile.txt&#39;, &#39;rb&#39;)
&amp;gt;&amp;gt;&amp;gt; a = pickle.load(f)
&amp;gt;&amp;gt;&amp;gt; f.close()
&amp;gt;&amp;gt;&amp;gt; print a
{&#39;name&#39;: &#39;allen&#39;, &#39;sex&#39;: &#39;boy&#39;}
&lt;/pre&gt;&lt;br /&gt;
參考網站&lt;br /&gt;
&lt;a href=&quot;http://www.saltycrane.com/blog/2008/01/saving-python-dict-to-file-using-pickle/&quot;&gt;Saving a Python dict to a file using pickle&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://globlalala.blogspot.com/2009/11/python-pickle-shelve.html&quot;&gt;[python] 不錯的玩意, pickle與 shelve&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://smilelight-tw.blogspot.com/feeds/5210022748879540915/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://smilelight-tw.blogspot.com/2010/12/serializing-python-objects.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8533976945817671360/posts/default/5210022748879540915'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8533976945817671360/posts/default/5210022748879540915'/><link rel='alternate' type='text/html' href='http://smilelight-tw.blogspot.com/2010/12/serializing-python-objects.html' title='Serializing Python Objects'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/08329229550311591149</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8533976945817671360.post-4491633961312194046</id><published>2010-11-29T14:32:00.004+08:00</published><updated>2010-12-27T17:01:03.190+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Python"/><title type='text'>Python 2.7 Connect MySQL</title><content type='html'>依序下載程式安裝&lt;br /&gt;
1. &lt;a href=&quot;http://www.python.org/download/&quot;&gt;Python 2.7&lt;/a&gt;&lt;br /&gt;
2. &lt;a href=&quot;http://pypi.python.org/pypi/setuptools#installation-instructions&quot;&gt;SetupTools 2.7&lt;/a&gt;&lt;br /&gt;
3. &lt;a href=&quot;http://www.codegood.com/archives/129&quot;&gt;MySQL-python 1.2.3 for windows and python 2.7&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
測試 Connect MySQL 是否可運作&lt;br /&gt;
1. 開啟 Python 2.7 IDLE&lt;br /&gt;
2. 編輯測試程式&lt;br /&gt;
&lt;pre class=&quot;brush: py;&quot;&gt;&gt;&gt;&gt; import MySQLdb
&gt;&gt;&gt; db = MySQLdb.connect(host=&quot;localhost&quot;, user=&quot;xxxx&quot;, passwd=&quot;xxxx&quot;, db=&quot;xxxx&quot;)
&gt;&gt;&gt; cursor = db.cursor()
&gt;&gt;&gt; cursor.execute(&quot;select * from system_user&quot;)
2L
&gt;&gt;&gt; result = cursor.fetchall()
&gt;&gt;&gt; for record in result :
        print record[0]


USERE00000000000000000001
USERE00000000000000000002
&gt;&gt;&gt;
&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://smilelight-tw.blogspot.com/feeds/4491633961312194046/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://smilelight-tw.blogspot.com/2010/11/python-27-connect-mysql.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8533976945817671360/posts/default/4491633961312194046'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8533976945817671360/posts/default/4491633961312194046'/><link rel='alternate' type='text/html' href='http://smilelight-tw.blogspot.com/2010/11/python-27-connect-mysql.html' title='Python 2.7 Connect MySQL'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/08329229550311591149</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8533976945817671360.post-6888818494393582924</id><published>2010-10-25T18:01:00.001+08:00</published><updated>2010-10-25T18:04:01.177+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><category scheme="http://www.blogger.com/atom/ns#" term="XmlRpc"/><title type='text'>Android XmlRpc Remote Service Problem</title><content type='html'>測試 Android 系統使用 XmlRpc 呼叫遠端的服務時遇到二個問題&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #cfe2f3;&quot;&gt;1.&amp;nbsp;java.net.SocketExeption: Permission denied&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #cfe2f3;&quot;&gt;2.&amp;nbsp;localhost connection refused&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
第一個問題是因為在Android Application中沒有開啟 Internet 使用權限&lt;br /&gt;
解決方法是在 Manifest檔內加上&lt;br /&gt;
&lt;b&gt;&amp;lt;uses-permission android:name=&quot;android.permission.INTERNET&quot;&amp;gt;&amp;lt;/uses-permission&amp;gt;&lt;/b&gt;&lt;br /&gt;
就可以正常運作&lt;br /&gt;
&lt;br /&gt;
第二個問題是因為在 Android Simulator 把自己作為 localhost 了,&lt;br /&gt;
所以如果在程式中寫 localhost 要連至本機的 Server 將會出現此問題&lt;br /&gt;
如果要連至本機的 Server 就必需將 IP 設為 &lt;b&gt;10.0.2.2&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;br /&gt;
參考網站&lt;br /&gt;
&lt;a href=&quot;http://www.anddev.org/start_with_xml_rpc-t6736.html&quot;&gt;java.net.SocketException:Permission denied&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://www.80x86.cn/article.asp?id=1843&quot;&gt;localhost connection refused&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://smilelight-tw.blogspot.com/feeds/6888818494393582924/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://smilelight-tw.blogspot.com/2010/10/android-xmlrpc-remote-service-problem.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8533976945817671360/posts/default/6888818494393582924'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8533976945817671360/posts/default/6888818494393582924'/><link rel='alternate' type='text/html' href='http://smilelight-tw.blogspot.com/2010/10/android-xmlrpc-remote-service-problem.html' title='Android XmlRpc Remote Service Problem'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/08329229550311591149</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8533976945817671360.post-4687802297835858531</id><published>2010-10-12T14:15:00.012+08:00</published><updated>2010-12-27T13:18:43.204+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="JDBC"/><category scheme="http://www.blogger.com/atom/ns#" term="Sqlite"/><title type='text'>JDBC for Sqlite DB</title><content type='html'>1. 下載必要的Jar檔&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; sqlite-jdbc-3.7.2 可至&amp;nbsp;&lt;a href=&quot;http://www.xerial.org/trac/Xerial/wiki&quot;&gt;Xerial&lt;/a&gt;&amp;nbsp;下載使用&lt;br /&gt;
&lt;br /&gt;
2. 建立好Sqlite DB後, 將Sqlite的DB檔放至某處 (ex. C:\test.db)&lt;br /&gt;
&lt;br /&gt;
3. 用以下的程式碼測試&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&#39;brush: java&#39;&gt;String url = &quot;jdbc:sqlite://C:\\test.db&quot;;
try {
  Class.forName(&quot;org.sqlite.JDBC&quot;);
  Connection con = DriverManager.getConnection(url);
  String query = &quot;select * from test_T&quot;;
  Statement stmt = con.createStatement();
  con = DriverManager.getConnection(url);
  ResultSet rs = stmt.executeQuery(query);
  while (rs.next()) {
    out.print(rs.getString(&quot;Id&quot;)+&quot;&amp;amp;nbsp;&quot;+rs.getString(&quot;Password&quot;)+&quot;&amp;lt;br/&amp;gt;&quot;);
  }
  rs.close();
  stmt.close();
} catch (Exception e) {
  e.printStackTrace();
  out.print(e.getMessage());
}
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
p.s. 記得 import 相關的 class 檔&lt;br /&gt;
ex.&lt;br /&gt;
&lt;pre class=&#39;brush: java&#39;&gt;import java.sql.Connection;
import&amp;nbsp;java.sql.*;
import&amp;nbsp;org.sqlite.JDBC;
&lt;/pre&gt;&lt;br /&gt;
以上是一個簡易的Sqlite連線</content><link rel='replies' type='application/atom+xml' href='http://smilelight-tw.blogspot.com/feeds/4687802297835858531/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://smilelight-tw.blogspot.com/2010/10/jdbc-for-sqlite-db.html#comment-form' title='1 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8533976945817671360/posts/default/4687802297835858531'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8533976945817671360/posts/default/4687802297835858531'/><link rel='alternate' type='text/html' href='http://smilelight-tw.blogspot.com/2010/10/jdbc-for-sqlite-db.html' title='JDBC for Sqlite DB'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/08329229550311591149</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8533976945817671360.post-190061076863830779</id><published>2010-09-26T15:23:00.000+08:00</published><updated>2010-09-26T15:23:16.745+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="MAC"/><title type='text'>Mac OS Server 服務的相關 Port</title><content type='html'>Remote Login (SSH) - 22&lt;br /&gt;
Screen Sharing Service (VNC) - 5900&lt;br /&gt;
AddressBook Service - 8800, 8843&lt;br /&gt;
iChat Service - 5222, 5223, 5060, 5269, 7777&lt;br /&gt;
Mail Service (SMTP, IMAP, POP) - 25, 110, 143, 587, 993, 995&lt;br /&gt;
Web Service - 80, 443&lt;br /&gt;
VPN Service (L2TP) - 500, 1701, 4500&lt;br /&gt;
VPN Service (PPTP) - 1723&lt;br /&gt;
File Sharing Service (AFP, SMB) - 548, 139&lt;br /&gt;
&lt;br /&gt;
參考URL&lt;br /&gt;
&lt;a href=&quot;http://support.apple.com/kb/TS2963&quot;&gt;http://support.apple.com/kb/TS2963&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://smilelight-tw.blogspot.com/feeds/190061076863830779/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://smilelight-tw.blogspot.com/2010/09/mac-os-server-port.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8533976945817671360/posts/default/190061076863830779'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8533976945817671360/posts/default/190061076863830779'/><link rel='alternate' type='text/html' href='http://smilelight-tw.blogspot.com/2010/09/mac-os-server-port.html' title='Mac OS Server 服務的相關 Port'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/08329229550311591149</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8533976945817671360.post-9021589065266916703</id><published>2010-09-16T18:32:00.000+08:00</published><updated>2010-09-16T18:32:02.839+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="php"/><title type='text'>Setting Debugging PHP with Xdebug</title><content type='html'>1. download &lt;a href=&quot;http://www.xdebug.org/index.php&quot;&gt;xdebug&amp;nbsp;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
2. copy xdebug&#39;s dll to php\ext\ (ex. C:\Program Files\PHP\ext)&lt;br /&gt;
&lt;br /&gt;
3. modify php.ini add xdebug define (if xdebug&#39;s dll name is&amp;nbsp;php_xdebug-2.0.5-5.2.dll)&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;zend_extension_ts=&quot;C:\Program Files\PHP\ext\php_xdebug-2.0.5-5.2.dll&quot;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;xdebug.remote_enable=1&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;xdebug.remote_handler=dbgp&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;xdebug.remote_host=127.0.0.1&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;xdebug.remote_port=9000&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;xdebug.remote_mode=req&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;xdebug.idekey=default&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;xdebug.remote_log=&quot;c:\tmp\xdebug\xdebug.log&quot;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;xdebug.show_exception_trace=0&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;xdebug.show_local_vars=9&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;xdebug.show_mem_delta=0&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;xdebug.trace_format=0&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;xdebug.profiler_enable &amp;nbsp;= 1&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;xdebug.profiler_output_dir =&quot;c:\tmp\xdebug&quot;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
4.&amp;nbsp;Make sure you create the folder c:\tmp\xdebug\&lt;br /&gt;
&lt;br /&gt;
5. restart apache&lt;br /&gt;
&lt;br /&gt;
6. look phpinfo()&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjdAd6P1Eq1ZXY5Ka-h-Qlh_mfEatuStLzHLERxqva3Q-1AWSsHqPsD2ARN4nn6ppAnNz7aP-BVAztxYAJvGiRpAaGb2XkDXGpUu-R6rGqR3XuHEErLrqFLpJon5slQKcjvVzo8d0vDCtvr/s1600/xdebug_01.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjdAd6P1Eq1ZXY5Ka-h-Qlh_mfEatuStLzHLERxqva3Q-1AWSsHqPsD2ARN4nn6ppAnNz7aP-BVAztxYAJvGiRpAaGb2XkDXGpUu-R6rGqR3XuHEErLrqFLpJon5slQKcjvVzo8d0vDCtvr/s320/xdebug_01.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Reference URL :&amp;nbsp;&lt;a href=&quot;http://www.webcheatsheet.com/php/debug_php_with_xdebug.php&quot;&gt;http://www.webcheatsheet.com/php/debug_php_with_xdebug.php&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://smilelight-tw.blogspot.com/feeds/9021589065266916703/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://smilelight-tw.blogspot.com/2010/09/setting-debugging-php-with-xdebug.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8533976945817671360/posts/default/9021589065266916703'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8533976945817671360/posts/default/9021589065266916703'/><link rel='alternate' type='text/html' href='http://smilelight-tw.blogspot.com/2010/09/setting-debugging-php-with-xdebug.html' title='Setting Debugging PHP with Xdebug'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/08329229550311591149</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjdAd6P1Eq1ZXY5Ka-h-Qlh_mfEatuStLzHLERxqva3Q-1AWSsHqPsD2ARN4nn6ppAnNz7aP-BVAztxYAJvGiRpAaGb2XkDXGpUu-R6rGqR3XuHEErLrqFLpJon5slQKcjvVzo8d0vDCtvr/s72-c/xdebug_01.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8533976945817671360.post-6698694489174074894</id><published>2010-09-04T18:37:00.001+08:00</published><updated>2010-09-04T18:38:47.632+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="html"/><category scheme="http://www.blogger.com/atom/ns#" term="javascript"/><title type='text'>設定Input只能輸入數值</title><content type='html'>&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: monospace; font-size: 12px; line-height: 14px; white-space: pre;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: monospace; font-size: 12px; line-height: 14px; white-space: pre;&quot;&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: monospace; line-height: 14px; white-space: pre;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #f6b26b;&quot;&gt;在Script Tag之中加入限制的方法&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: monospace; font-size: 12px; line-height: 14px; white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #f6b26b;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: monospace; font-size: 12px; line-height: 14px; white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #f6b26b;&quot;&gt;&amp;lt;Script&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: monospace; font-size: 12px; line-height: 14px; white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #f6b26b;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: monospace; font-size: 12px; line-height: 14px; white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #f6b26b;&quot;&gt;...&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #f6b26b;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #f6b26b;&quot;&gt;$(function()&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #f6b26b;&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #f6b26b;&quot;&gt;  $&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: monospace; font-size: 12px; line-height: 14px; white-space: pre;&quot;&gt;&lt;span class=&quot;br0&quot; style=&quot;line-height: 1.22em;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #f6b26b;&quot;&gt;(&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: monospace; font-size: 12px; line-height: 14px; white-space: pre;&quot;&gt;&lt;span class=&quot;st0&quot; style=&quot;line-height: 1.22em;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #f6b26b;&quot;&gt;&#39;#InputID&#39;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: monospace; font-size: 12px; line-height: 14px; white-space: pre;&quot;&gt;&lt;span class=&quot;br0&quot; style=&quot;line-height: 1.22em;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #f6b26b;&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: monospace; font-size: 12px; line-height: 14px; white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #f6b26b;&quot;&gt;.&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: monospace; font-size: 12px; line-height: 14px; white-space: pre;&quot;&gt;&lt;span class=&quot;me1&quot; style=&quot;line-height: 1.22em;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #f6b26b;&quot;&gt;bind&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: monospace; font-size: 12px; line-height: 14px; white-space: pre;&quot;&gt;&lt;span class=&quot;br0&quot; style=&quot;line-height: 1.22em;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #f6b26b;&quot;&gt;(&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: monospace; font-size: 12px; line-height: 14px; white-space: pre;&quot;&gt;&lt;span class=&quot;st0&quot; style=&quot;line-height: 1.22em;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #f6b26b;&quot;&gt;&#39;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #93c47d;&quot;&gt;keypress&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #f6b26b;&quot;&gt;&#39;, &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #93c47d;&quot;&gt;filterWithOutNumber&lt;/span&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #f6b26b;&quot;&gt;});&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #f6b26b;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: monospace; font-size: 12px; line-height: 14px; white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #f6b26b;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: monospace; font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 12px; line-height: 14px; white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #f6b26b;&quot;&gt;//限制只能輸入數值的方法&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: monospace; font-size: 12px; line-height: 14px; white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #f6b26b;&quot;&gt;function &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: monospace; font-size: 12px; line-height: 14px; white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #93c47d;&quot;&gt;filterWithOutNumber&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: monospace; font-size: 12px; line-height: 14px; white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #f6b26b;&quot;&gt;(e)&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: monospace; font-size: 12px; line-height: 14px; white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #f6b26b;&quot;&gt;{&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: monospace; font-size: 12px; line-height: 14px; white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #f6b26b;&quot;&gt;  if&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #f6b26b; font-family: monospace; font-size: 12px; line-height: 14px; white-space: pre;&quot;&gt;(e.which!=8 &amp;amp;&amp;amp; e.which!=0 &amp;amp;&amp;amp; (e.which&amp;lt;48 || e.which&amp;gt;57))&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #f6b26b; font-family: monospace; font-size: 12px; line-height: 14px; white-space: pre;&quot;&gt;    return false;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #f6b26b; font-family: monospace; font-size: 12px; line-height: 14px; white-space: pre;&quot;&gt;  else &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #f6b26b; font-family: monospace; font-size: 12px; line-height: 14px; white-space: pre;&quot;&gt;    return true;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: monospace; font-size: 12px; line-height: 14px; white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #f6b26b;&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: monospace; font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 12px; line-height: 14px; white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #f6b26b;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: monospace; font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 12px; line-height: 14px; white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #f6b26b;&quot;&gt;...&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: monospace; font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 12px; line-height: 14px; white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #f6b26b;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: monospace; font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 12px; line-height: 14px; white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #f6b26b;&quot;&gt;&amp;lt;/Script&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: monospace; font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 12px; line-height: 14px; white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #f6b26b;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: monospace; font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 12px; line-height: 14px; white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #f6b26b;&quot;&gt;&amp;lt;body&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: monospace; font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 12px; line-height: 14px; white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #f6b26b;&quot;&gt;  &amp;lt;Input type=&quot;text&quot; id=&quot;InputID&quot;&amp;gt;&amp;lt;/Input&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: monospace; font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 12px; line-height: 14px; white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #f6b26b;&quot;&gt;&amp;lt;/body&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: monospace; font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 12px; line-height: 14px; white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #f6b26b;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: darkblue; font-family: monospace; font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 12px; line-height: 14px; white-space: pre;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://smilelight-tw.blogspot.com/feeds/6698694489174074894/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://smilelight-tw.blogspot.com/2010/09/input.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8533976945817671360/posts/default/6698694489174074894'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8533976945817671360/posts/default/6698694489174074894'/><link rel='alternate' type='text/html' href='http://smilelight-tw.blogspot.com/2010/09/input.html' title='設定Input只能輸入數值'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/08329229550311591149</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8533976945817671360.post-8724060192705053733</id><published>2010-08-12T10:21:00.001+08:00</published><updated>2010-08-12T10:22:04.087+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="windows service"/><title type='text'>How to Delete a Windows Service</title><content type='html'>Command 語法如下&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange;&quot;&gt;sc delete [ServiceName]&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Ex.&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;sc delete &quot;GlassfishService&quot;</content><link rel='replies' type='application/atom+xml' href='http://smilelight-tw.blogspot.com/feeds/8724060192705053733/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://smilelight-tw.blogspot.com/2010/08/how-to-delete-windows-service.html#comment-form' title='1 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8533976945817671360/posts/default/8724060192705053733'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8533976945817671360/posts/default/8724060192705053733'/><link rel='alternate' type='text/html' href='http://smilelight-tw.blogspot.com/2010/08/how-to-delete-windows-service.html' title='How to Delete a Windows Service'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/08329229550311591149</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8533976945817671360.post-1986124025921853218</id><published>2010-07-27T13:42:00.001+08:00</published><updated>2010-07-27T13:43:29.219+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="c3p0"/><title type='text'>c3p0 的屬性設定</title><content type='html'>&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 10px; -webkit-border-vertical-spacing: 10px; font-family: verdana, 宋体; font-size: 13px; line-height: 16px;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;acquireIncrement&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 10px; -webkit-border-vertical-spacing: 10px; font-family: verdana, 宋体; font-size: 13px; line-height: 16px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #b6d7a8;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 10px; -webkit-border-vertical-spacing: 10px; font-family: verdana, 宋体; font-size: 13px; line-height: 16px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #b6d7a8;&quot;&gt;當Connection Pool中的連線用盡時所批次新增Connection的數量. Default: 3&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 10px; -webkit-border-vertical-spacing: 10px; font-family: verdana, 宋体; font-size: 13px; line-height: 16px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #b6d7a8;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;acquireRetryAttempts&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 10px; -webkit-border-vertical-spacing: 10px; font-family: verdana, 宋体; font-size: 13px; line-height: 16px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #b6d7a8;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 10px; -webkit-border-vertical-spacing: 10px; font-family: verdana, 宋体; font-size: 13px; line-height: 16px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #b6d7a8;&quot;&gt;定義從Databases取新Connection時失敗後重覆嘗試次數. Default: 30&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 10px; -webkit-border-vertical-spacing: 10px; font-family: verdana, 宋体; font-size: 13px; line-height: 16px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #b6d7a8;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 10px; -webkit-border-vertical-spacing: 10px; font-family: verdana, 宋体; font-size: 13px; line-height: 16px;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;acquireRetryDelay&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 10px; -webkit-border-vertical-spacing: 10px; font-family: verdana, 宋体; font-size: 13px; line-height: 16px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #b6d7a8;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;兩次連接中間隔時間, 單位毫秒. Default: 1000&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 10px; -webkit-border-vertical-spacing: 10px; font-family: verdana, 宋体; font-size: 13px; line-height: 16px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #b6d7a8;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 10px; -webkit-border-vertical-spacing: 10px; font-family: verdana, 宋体; font-size: 13px; line-height: 16px;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;autoCommitOnClose&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 10px; -webkit-border-vertical-spacing: 10px; font-family: verdana, 宋体; font-size: 13px; line-height: 16px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #b6d7a8;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;Connection Close時預設將所有未Commit的交易RollBack. Default: false&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 10px; -webkit-border-vertical-spacing: 10px; font-family: verdana, 宋体; font-size: 13px; line-height: 16px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #b6d7a8;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 10px; -webkit-border-vertical-spacing: 10px; font-family: verdana, 宋体; font-size: 13px; line-height: 16px;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;automaticTestTable&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 10px; -webkit-border-vertical-spacing: 10px; font-family: verdana, 宋体; font-size: 13px; line-height: 16px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #b6d7a8;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;c3p0將建立一個名為Test的空資料表, 並使用其自帶的查詢語句進行測試.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 10px; -webkit-border-vertical-spacing: 10px; font-family: verdana, 宋体; font-size: 13px; line-height: 16px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #b6d7a8;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;如果定義了這個參數那麼屬性preferredTestQuery將被忽略. 無法在此Test&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 10px; -webkit-border-vertical-spacing: 10px; font-family: verdana, 宋体; font-size: 13px; line-height: 16px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #b6d7a8;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;資料表進行任何作業, Test只提供c3p0測試使用. Default: null&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 10px; -webkit-border-vertical-spacing: 10px; font-family: verdana, 宋体; font-size: 13px; line-height: 16px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #b6d7a8;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 10px; -webkit-border-vertical-spacing: 10px; font-family: verdana, 宋体; font-size: 13px; line-height: 16px;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;breakAfterAcquireFailure&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 10px; -webkit-border-vertical-spacing: 10px; font-family: verdana, 宋体; font-size: 13px; line-height: 16px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #b6d7a8;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;取Connection失敗將會引起所有等待Connection Pool來取Connection的&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 10px; -webkit-border-vertical-spacing: 10px; font-family: verdana, 宋体; font-size: 13px; line-height: 16px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #b6d7a8;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;Thread拋出異常.&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 10px; -webkit-border-vertical-spacing: 10px; color: #b6d7a8; font-family: verdana, 宋体; font-size: 13px; line-height: 16px;&quot;&gt;但是Databases仍有效保留, 並在下次調用getConnection()&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 10px; -webkit-border-vertical-spacing: 10px; color: #b6d7a8; font-family: verdana, 宋体; font-size: 13px; line-height: 16px;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;的時候繼續嘗試取得Connection&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 10px; -webkit-border-vertical-spacing: 10px; color: #b6d7a8; font-family: verdana, 宋体; font-size: 13px; line-height: 16px;&quot;&gt;, 如果設為true, 那麼在嘗試取Connection&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 10px; -webkit-border-vertical-spacing: 10px; color: #b6d7a8; font-family: verdana, 宋体; font-size: 13px; line-height: 16px;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;失敗後該DataSource將申明已斷開並永久關閉.&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 10px; -webkit-border-vertical-spacing: 10px; color: #b6d7a8; font-family: verdana, 宋体; font-size: 13px; line-height: 16px;&quot;&gt;&amp;nbsp;Default: false&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 10px; -webkit-border-vertical-spacing: 10px; font-family: verdana, 宋体; font-size: 13px; line-height: 16px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #b6d7a8;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 10px; -webkit-border-vertical-spacing: 10px; font-family: verdana, 宋体; font-size: 13px; line-height: 16px;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;checkoutTimeout&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 10px; -webkit-border-vertical-spacing: 10px; font-family: verdana, 宋体; font-size: 13px; line-height: 16px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #b6d7a8;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;從Connection Pool等待取得新的Connection的時間, 超過此時間後, 將拋&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 10px; -webkit-border-vertical-spacing: 10px; font-family: verdana, 宋体; font-size: 13px; line-height: 16px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #b6d7a8;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;出SQLException,&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 10px; -webkit-border-vertical-spacing: 10px; color: #b6d7a8; font-family: verdana, 宋体; font-size: 13px; line-height: 16px;&quot;&gt;如設為0則無限期等待. 單位毫秒. Default: 0&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 10px; -webkit-border-vertical-spacing: 10px; font-family: verdana, 宋体; font-size: 13px; line-height: 16px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #b6d7a8;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 10px; -webkit-border-vertical-spacing: 10px; font-family: verdana, 宋体; font-size: 13px; line-height: 16px;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;connectionTesterClassName&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 10px; -webkit-border-vertical-spacing: 10px; font-family: verdana, 宋体; font-size: 13px; line-height: 16px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #b6d7a8;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;通過實現Connection Tester或QueryConnectionTester的類別來測試&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 10px; -webkit-border-vertical-spacing: 10px; font-family: verdana, 宋体; font-size: 13px; line-height: 16px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #b6d7a8;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;Connection.&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 10px; -webkit-border-vertical-spacing: 10px; color: #b6d7a8; font-family: verdana, 宋体; font-size: 13px; line-height: 16px;&quot;&gt;&amp;nbsp;類別名稱需為全路徑.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 10px; -webkit-border-vertical-spacing: 10px; color: #b6d7a8; font-family: verdana, 宋体; font-size: 13px; line-height: 16px;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;Default: com.mchange.v2.c3p0.impl.DefaultConnectionTester&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 10px; -webkit-border-vertical-spacing: 10px; font-family: verdana, 宋体; font-size: 13px; line-height: 16px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #b6d7a8;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 10px; -webkit-border-vertical-spacing: 10px; font-family: verdana, 宋体; font-size: 13px; line-height: 16px;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;factoryClassLocation&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 10px; -webkit-border-vertical-spacing: 10px; font-family: verdana, 宋体; font-size: 13px; line-height: 16px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #b6d7a8;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;指定c3p0 Libraries的路徑, 如果在Local端就無需設定, 預設null即可,&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 10px; -webkit-border-vertical-spacing: 10px; font-family: verdana, 宋体; font-size: 13px; line-height: 16px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #b6d7a8;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;Default: null&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 10px; -webkit-border-vertical-spacing: 10px; font-family: verdana, 宋体; font-size: 13px; line-height: 16px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #b6d7a8;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 10px; -webkit-border-vertical-spacing: 10px; font-family: verdana, 宋体; font-size: 13px; line-height: 16px;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;forceIgnoreUnresolvedTransactions&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 10px; -webkit-border-vertical-spacing: 10px; font-family: verdana, 宋体; font-size: 13px; line-height: 16px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #b6d7a8;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 10px; -webkit-border-vertical-spacing: 10px; font-family: verdana, 宋体; font-size: 13px; line-height: 16px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #b6d7a8;&quot;&gt;Strongly disrecommended. Setting this to true may lead to&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 10px; -webkit-border-vertical-spacing: 10px; font-family: verdana, 宋体; font-size: 13px; line-height: 16px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #b6d7a8;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;subtle and bizarre bugs.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 10px; -webkit-border-vertical-spacing: 10px; font-family: verdana, 宋体; font-size: 13px; line-height: 16px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #b6d7a8;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 10px; -webkit-border-vertical-spacing: 10px; font-family: verdana, 宋体; font-size: 13px; line-height: 16px;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;idleConnectionTestPeriod&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 10px; -webkit-border-vertical-spacing: 10px; font-family: verdana, 宋体; font-size: 13px; line-height: 16px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #b6d7a8;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;設定每多少秒檢查所有Connection Pool中的閒置Connection.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 10px; -webkit-border-vertical-spacing: 10px; font-family: verdana, 宋体; font-size: 13px; line-height: 16px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #b6d7a8;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;Default: 0&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 10px; -webkit-border-vertical-spacing: 10px; font-family: verdana, 宋体; font-size: 13px; line-height: 16px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #b6d7a8;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 10px; -webkit-border-vertical-spacing: 10px; font-family: verdana, 宋体; font-size: 13px; line-height: 16px;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;initialPoolSize&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 10px; -webkit-border-vertical-spacing: 10px; font-family: verdana, 宋体; font-size: 13px; line-height: 16px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #b6d7a8;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;初始化時建立多少Connection, 值應在minPoolSize與maxPoolSize之間&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 10px; -webkit-border-vertical-spacing: 10px; font-family: verdana, 宋体; font-size: 13px; line-height: 16px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #b6d7a8;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;, Default: 3&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 10px; -webkit-border-vertical-spacing: 10px; font-family: verdana, 宋体; font-size: 13px; line-height: 16px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #b6d7a8;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 10px; -webkit-border-vertical-spacing: 10px; font-family: verdana, 宋体; font-size: 13px; line-height: 16px;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;maxIdleTime&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: verdana, 宋体; font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 10px; -webkit-border-vertical-spacing: 10px; font-size: 13px; line-height: 16px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #b6d7a8;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;最大閒置時間, 每多少秒內未使用Connection則丟棄. 若為0則永不丟棄.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: verdana, 宋体; font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 10px; -webkit-border-vertical-spacing: 10px; font-size: 13px; line-height: 16px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #b6d7a8;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;Default: 0&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: verdana, 宋体; font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 10px; -webkit-border-vertical-spacing: 10px; font-size: 13px; line-height: 16px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #b6d7a8;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: verdana, 宋体; font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 10px; -webkit-border-vertical-spacing: 10px; font-size: 13px; line-height: 16px;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;maxPoolSize&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 10px; -webkit-border-vertical-spacing: 10px; font-family: verdana, 宋体; font-size: 13px; line-height: 16px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #b6d7a8;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;Connection Pool中保留最大Connection Count. Default: 15&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 10px; -webkit-border-vertical-spacing: 10px; font-family: verdana, 宋体; font-size: 13px; line-height: 16px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #b6d7a8;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 10px; -webkit-border-vertical-spacing: 10px; font-family: verdana, 宋体; font-size: 13px; line-height: 16px;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;maxStatements&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 10px; -webkit-border-vertical-spacing: 10px; font-family: verdana, 宋体; font-size: 13px; line-height: 16px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #b6d7a8;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;JDBC的標準參數, 用來控制Datasource內加載的PreparedStatements&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 10px; -webkit-border-vertical-spacing: 10px; font-family: verdana, 宋体; font-size: 13px; line-height: 16px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #b6d7a8;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;數量. 如果maxStatements&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 10px; -webkit-border-vertical-spacing: 10px; color: #b6d7a8; font-family: verdana, 宋体; font-size: 13px; line-height: 16px;&quot;&gt;與maxStatementsPerConnection均為0,&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 10px; -webkit-border-vertical-spacing: 10px; color: #b6d7a8; font-family: verdana, 宋体; font-size: 13px; line-height: 16px;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;則暫存被關閉. Default: 0&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 10px; -webkit-border-vertical-spacing: 10px; font-family: verdana, 宋体; font-size: 13px; line-height: 16px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #b6d7a8;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 10px; -webkit-border-vertical-spacing: 10px; font-family: verdana, 宋体; font-size: 13px; line-height: 16px;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;maxStatementsPerConnection&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 10px; -webkit-border-vertical-spacing: 10px; font-family: verdana, 宋体; font-size: 13px; line-height: 16px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #b6d7a8;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;定義Connection Pool內單個Connection所擁有的最大暫存statements&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 10px; -webkit-border-vertical-spacing: 10px; font-family: verdana, 宋体; font-size: 13px; line-height: 16px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #b6d7a8;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;數. Default: 0&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 10px; -webkit-border-vertical-spacing: 10px; font-family: verdana, 宋体; font-size: 13px; line-height: 16px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #b6d7a8;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 10px; -webkit-border-vertical-spacing: 10px; font-family: verdana, 宋体; font-size: 13px; line-height: 16px;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;numHelperThreads&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 10px; -webkit-border-vertical-spacing: 10px; font-family: verdana, 宋体; font-size: 13px; line-height: 16px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #b6d7a8;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;c3p0是非同步操作的, 緩慢的JDBC操作通過幫助程式完成. 擴展這些操作&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 10px; -webkit-border-vertical-spacing: 10px; font-family: verdana, 宋体; font-size: 13px; line-height: 16px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #b6d7a8;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;可以有效的提升性能&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 10px; -webkit-border-vertical-spacing: 10px; color: #b6d7a8; font-family: verdana, 宋体; font-size: 13px; line-height: 16px;&quot;&gt;通過Thread實現多個操作同時被執行. Default: 3&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 10px; -webkit-border-vertical-spacing: 10px; font-family: verdana, 宋体; font-size: 13px; line-height: 16px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #b6d7a8;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 10px; -webkit-border-vertical-spacing: 10px; font-family: verdana, 宋体; font-size: 13px; line-height: 16px;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;overrideDefaultUser&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 10px; -webkit-border-vertical-spacing: 10px; font-family: verdana, 宋体; font-size: 13px; line-height: 16px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #b6d7a8;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;當用戶調用getConnection()時使用root用戶成為去取Connection的用戶.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 10px; -webkit-border-vertical-spacing: 10px; font-family: verdana, 宋体; font-size: 13px; line-height: 16px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #b6d7a8;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;主要用於&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 10px; -webkit-border-vertical-spacing: 10px; color: #b6d7a8; font-family: verdana, 宋体; font-size: 13px; line-height: 16px;&quot;&gt;Connection Pool 連接非c3p0的Datasource. Default: null&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 10px; -webkit-border-vertical-spacing: 10px; font-family: verdana, 宋体; font-size: 13px; line-height: 16px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #b6d7a8;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 10px; -webkit-border-vertical-spacing: 10px; font-family: verdana, 宋体; font-size: 13px; line-height: 16px;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;overrideDefaultPassword&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 10px; -webkit-border-vertical-spacing: 10px; font-family: verdana, 宋体; font-size: 13px; line-height: 16px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #b6d7a8;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;與overrideDefaultUser參數對應使用的一個參數. Default: null&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 10px; -webkit-border-vertical-spacing: 10px; font-family: verdana, 宋体; font-size: 13px; line-height: 16px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #b6d7a8;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 10px; -webkit-border-vertical-spacing: 10px; font-family: verdana, 宋体; font-size: 13px; line-height: 16px;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;password&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 10px; -webkit-border-vertical-spacing: 10px; font-family: verdana, 宋体; font-size: 13px; line-height: 16px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #b6d7a8;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;密碼. Default: null&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 10px; -webkit-border-vertical-spacing: 10px; font-family: verdana, 宋体; font-size: 13px; line-height: 16px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #b6d7a8;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 10px; -webkit-border-vertical-spacing: 10px; font-family: verdana, 宋体; font-size: 13px; line-height: 16px;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;preferredTestQuery&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 10px; -webkit-border-vertical-spacing: 10px; font-family: verdana, 宋体; font-size: 13px; line-height: 16px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #b6d7a8;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;定義所有Connection測試都執行的測試語法, 注意:測試的表必須在初始&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 10px; -webkit-border-vertical-spacing: 10px; font-family: verdana, 宋体; font-size: 13px; line-height: 16px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #b6d7a8;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;Datasource的時候&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 10px; -webkit-border-vertical-spacing: 10px; color: #b6d7a8; font-family: verdana, 宋体; font-size: 13px; line-height: 16px;&quot;&gt;就存在. Default: null&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 10px; -webkit-border-vertical-spacing: 10px; font-family: verdana, 宋体; font-size: 13px; line-height: 16px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #b6d7a8;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 10px; -webkit-border-vertical-spacing: 10px; font-family: verdana, 宋体; font-size: 13px; line-height: 16px;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;propertyCycle&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 10px; -webkit-border-vertical-spacing: 10px; font-family: verdana, 宋体; font-size: 13px; line-height: 16px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #b6d7a8;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;用戶修改系統配置參數執行前最多等待的秒數, Default: 300&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 10px; -webkit-border-vertical-spacing: 10px; font-family: verdana, 宋体; font-size: 13px; line-height: 16px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #b6d7a8;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 10px; -webkit-border-vertical-spacing: 10px; font-family: verdana, 宋体; font-size: 13px; line-height: 16px;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;testConnectionOnCheckout&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 10px; -webkit-border-vertical-spacing: 10px; font-family: verdana, 宋体; font-size: 13px; line-height: 16px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #b6d7a8;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;如果設為true那麼在每個Connection Commit的時候都將驗證有效性. 建&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 10px; -webkit-border-vertical-spacing: 10px; font-family: verdana, 宋体; font-size: 13px; line-height: 16px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #b6d7a8;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;議使用&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 10px; -webkit-border-vertical-spacing: 10px; font-family: verdana, 宋体; font-size: 13px; line-height: 16px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #b6d7a8;&quot;&gt;idleConnectionTestPeriod或automaticTestTable等方法來提升&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 10px; -webkit-border-vertical-spacing: 10px; font-family: verdana, 宋体; font-size: 13px; line-height: 16px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #b6d7a8;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;連接測試的性能&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 10px; -webkit-border-vertical-spacing: 10px; color: #b6d7a8; font-family: verdana, 宋体; font-size: 13px; line-height: 16px;&quot;&gt;Default: false&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 10px; -webkit-border-vertical-spacing: 10px; font-family: verdana, 宋体; font-size: 13px; line-height: 16px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #b6d7a8;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 10px; -webkit-border-vertical-spacing: 10px; font-family: verdana, 宋体; font-size: 13px; line-height: 16px;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;testConnectionOnCheckin&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 10px; -webkit-border-vertical-spacing: 10px; font-family: verdana, 宋体; font-size: 13px; line-height: 16px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #b6d7a8;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;如果設為true那麼在取得連接的同時將驗證連接的有效性. Default: false&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 10px; -webkit-border-vertical-spacing: 10px; font-family: verdana, 宋体; font-size: 13px; line-height: 16px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #b6d7a8;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 10px; -webkit-border-vertical-spacing: 10px; font-family: verdana, 宋体; font-size: 13px; line-height: 16px;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;user&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 10px; -webkit-border-vertical-spacing: 10px; font-family: verdana, 宋体; font-size: 13px; line-height: 16px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #b6d7a8;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;用戶名. Default: null&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 10px; -webkit-border-vertical-spacing: 10px; color: blue; font-family: verdana, 宋体; font-size: 13px; line-height: 16px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://smilelight-tw.blogspot.com/feeds/1986124025921853218/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://smilelight-tw.blogspot.com/2010/07/c3p0.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8533976945817671360/posts/default/1986124025921853218'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8533976945817671360/posts/default/1986124025921853218'/><link rel='alternate' type='text/html' href='http://smilelight-tw.blogspot.com/2010/07/c3p0.html' title='c3p0 的屬性設定'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/08329229550311591149</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8533976945817671360.post-2219126555083100646</id><published>2010-06-30T13:28:00.006+08:00</published><updated>2010-08-24T12:33:01.732+08:00</updated><title type='text'>Setting properties file is utf8 encode for eclipse</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgofHp02_brG_a27SrMXQNl_JgfsOsx2t2Vb2R-FFCmNZCVG2n1r6l-Tfp7fycPwG0z30bO0qAnEiecSl0RfE3n6coOIO-RlmTqZOO3qOiDEJRdH5FF32jF77vp5Z5hwaaZgMS4goeH8kog/s1600/001.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgofHp02_brG_a27SrMXQNl_JgfsOsx2t2Vb2R-FFCmNZCVG2n1r6l-Tfp7fycPwG0z30bO0qAnEiecSl0RfE3n6coOIO-RlmTqZOO3qOiDEJRdH5FF32jF77vp5Z5hwaaZgMS4goeH8kog/s320/001.JPG&quot; /&gt;&lt;/a&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEisgPK-KuO2D8Er0vuIlrcJcOgECS1RiyeKE5G2e_wHzkXoyQ-87ndOlhyphenhyphenSHBipP-qntUv2UvrJmwKGNtrgv9sbWfU1hj62oSRcRh-c3YiQyEVEx6hRkbT0lW2luuK-UvW9KUl_Wg140jbM/s1600/002.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEisgPK-KuO2D8Er0vuIlrcJcOgECS1RiyeKE5G2e_wHzkXoyQ-87ndOlhyphenhyphenSHBipP-qntUv2UvrJmwKGNtrgv9sbWfU1hj62oSRcRh-c3YiQyEVEx6hRkbT0lW2luuK-UvW9KUl_Wg140jbM/s320/002.JPG&quot; /&gt;&lt;/a&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEii9h5wnEFAIxsFp7DSGZ_8NdHI_TKePtFl4HVAm0cwaghakRUCXRFSOIyThua1DNWduVVn5bMpyU_za1gE48W3cIdXPR-DgMu7jUEcHkPMi3OJd0qXJ-VrOOBXoWh9h5EiLPPCasLeucTS/s1600/003.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEii9h5wnEFAIxsFp7DSGZ_8NdHI_TKePtFl4HVAm0cwaghakRUCXRFSOIyThua1DNWduVVn5bMpyU_za1gE48W3cIdXPR-DgMu7jUEcHkPMi3OJd0qXJ-VrOOBXoWh9h5EiLPPCasLeucTS/s320/003.JPG&quot; /&gt;&lt;/a&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj05NhSPz-tLieGn1-9MxSheYvAorWhNew0r2FgYcU7YXLDwlvYkMiHqOAg54fwxkasGv_e2gnZRaAmtdxUIvMhlkj4mzN9jS53c7j-MjvPfARk-6yc1T9cRzV6YZK30gMF50WEzCMC5995/s1600/004.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj05NhSPz-tLieGn1-9MxSheYvAorWhNew0r2FgYcU7YXLDwlvYkMiHqOAg54fwxkasGv_e2gnZRaAmtdxUIvMhlkj4mzN9jS53c7j-MjvPfARk-6yc1T9cRzV6YZK30gMF50WEzCMC5995/s320/004.JPG&quot; /&gt;&lt;/a&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg9HsrrYQjlCK8mryb9whDocCGnJhEHjHjwuoIj0qCMus8wmmKQ44bldYOQ2v8wRJ5RRx6wE2qItUDWXWAVxD9ZVlXxOV1ziKclvAuxOwhbFv7ZJpxOU81p_xL-y7ThGFXQO-nuFkZLZYKA/s1600/005.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg9HsrrYQjlCK8mryb9whDocCGnJhEHjHjwuoIj0qCMus8wmmKQ44bldYOQ2v8wRJ5RRx6wE2qItUDWXWAVxD9ZVlXxOV1ziKclvAuxOwhbFv7ZJpxOU81p_xL-y7ThGFXQO-nuFkZLZYKA/s320/005.JPG&quot; /&gt;&lt;/a&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiImomghiZFtCCOvSvmQ4ZgRqOPm7H7LH5afo81Y6mfmap-bNx2mSxOp0KU3zmhQzE1y9R910A8kwl6syTZ9AvtZud2SfZPwgfiLuTVqLU1fya0jy7KpWALyamGaKyg7t0Qiexir2dyEw34/s1600/006.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiImomghiZFtCCOvSvmQ4ZgRqOPm7H7LH5afo81Y6mfmap-bNx2mSxOp0KU3zmhQzE1y9R910A8kwl6syTZ9AvtZud2SfZPwgfiLuTVqLU1fya0jy7KpWALyamGaKyg7t0Qiexir2dyEw34/s320/006.JPG&quot; /&gt;&lt;/a&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjc6hVBNzeuO1hJwb8COhEbJeF9QcAqwCs0t-dN4AuD50oYx4OitnqjVBqp7Y9_0a1fMWD7n9fuCrDRIHhyphenhyphen84O0BmikJ92qUfnzH1w3mFTwUAMjI75_oI3UdnBsNVoVQNqVnrBSLAekY5L-/s1600/007.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjc6hVBNzeuO1hJwb8COhEbJeF9QcAqwCs0t-dN4AuD50oYx4OitnqjVBqp7Y9_0a1fMWD7n9fuCrDRIHhyphenhyphen84O0BmikJ92qUfnzH1w3mFTwUAMjI75_oI3UdnBsNVoVQNqVnrBSLAekY5L-/s320/007.JPG&quot; /&gt;&lt;/a&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOOLhFanfyMMHyn4HlkRb6Ifj-ovCGtdhETYyBZlG2ghXxkXBfdq2QbcZldLlwg5RIxRMRZNhrXq7eng2lHYOyxgBBK5J2S9Ar3GMLEJM-Q0kbuOM6cDT4EskSkSucefRiYwDDicM00BkS/s1600/008.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOOLhFanfyMMHyn4HlkRb6Ifj-ovCGtdhETYyBZlG2ghXxkXBfdq2QbcZldLlwg5RIxRMRZNhrXq7eng2lHYOyxgBBK5J2S9Ar3GMLEJM-Q0kbuOM6cDT4EskSkSucefRiYwDDicM00BkS/s320/008.JPG&quot; /&gt;&lt;/a&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjrz6knq_izAVU6MC3JD_cFRahVgpVk3lnNiWfTYZsQsnxnsj3n7Ep0yz2fEeFDW5cDPzBfQGGhpaYVlCt00EYUzGgqYemYGDRwp5F3PZMpB29u4kVUka2pTBMe9hRq00uqHn1FB8_Vg3Rh/s1600/009.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjrz6knq_izAVU6MC3JD_cFRahVgpVk3lnNiWfTYZsQsnxnsj3n7Ep0yz2fEeFDW5cDPzBfQGGhpaYVlCt00EYUzGgqYemYGDRwp5F3PZMpB29u4kVUka2pTBMe9hRq00uqHn1FB8_Vg3Rh/s320/009.JPG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://smilelight-tw.blogspot.com/feeds/2219126555083100646/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://smilelight-tw.blogspot.com/2010/06/setting-properties-file-is-utf8-encode.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8533976945817671360/posts/default/2219126555083100646'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8533976945817671360/posts/default/2219126555083100646'/><link rel='alternate' type='text/html' href='http://smilelight-tw.blogspot.com/2010/06/setting-properties-file-is-utf8-encode.html' title='Setting properties file is utf8 encode for eclipse'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/08329229550311591149</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgofHp02_brG_a27SrMXQNl_JgfsOsx2t2Vb2R-FFCmNZCVG2n1r6l-Tfp7fycPwG0z30bO0qAnEiecSl0RfE3n6coOIO-RlmTqZOO3qOiDEJRdH5FF32jF77vp5Z5hwaaZgMS4goeH8kog/s72-c/001.JPG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8533976945817671360.post-5786258364206888928</id><published>2010-06-07T13:32:00.001+08:00</published><updated>2010-06-07T13:33:11.202+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="tomcat"/><title type='text'>Setting Access Log for Tomcat</title><content type='html'>&lt;div&gt;打開 Tomcat 下的 Server.xml&lt;/div&gt;&lt;div&gt;新加入二個 Tag&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&amp;lt;Valve className=&quot;org.apache.catalina.valves.AccessLogValve&quot; directory=&quot;logs&quot; prefix=&quot;localhost_access_log.&quot; suffix=&quot;.txt&quot; pattern=&quot;combined&quot; resolveHosts=&quot;false&quot;/&amp;gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&amp;lt;Logger className=&quot;org.apache.catalina.logger.FileLogger&quot; directory=&quot;logs&quot; prefix=&quot;localhost_log.&quot; suffix=&quot;.txt&quot; timestamp=&quot;true&quot;/&amp;gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;重新啟動 Tomcat&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;瀏覽 Tomcat 網站後&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;在 log forder 下將會出現 access log file&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://smilelight-tw.blogspot.com/feeds/5786258364206888928/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://smilelight-tw.blogspot.com/2010/06/setting-access-log-for-tomcat.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8533976945817671360/posts/default/5786258364206888928'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8533976945817671360/posts/default/5786258364206888928'/><link rel='alternate' type='text/html' href='http://smilelight-tw.blogspot.com/2010/06/setting-access-log-for-tomcat.html' title='Setting Access Log for Tomcat'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/08329229550311591149</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8533976945817671360.post-7208953711752364157</id><published>2010-05-27T12:08:00.000+08:00</published><updated>2010-05-27T12:08:56.384+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="mysql"/><title type='text'>MySQL 資料庫備份與復原</title><content type='html'>&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #e69138;&quot;&gt;備份作業&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
語法 mysqldump -u [帳號] -p [資料庫名稱] &amp;gt; [備份檔案名稱]&lt;br /&gt;
Ex.&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;mysqldump -u root -p smilelight &amp;gt; smilelightdb.sql&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #e69138;&quot;&gt;&lt;b&gt;復原作業&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
語法 mysql -u [帳號] -p [資料庫名稱] &amp;lt; [備份檔案名稱]&lt;br /&gt;
Ex.&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;mysql -u root -p smilelight &amp;lt; smilelightdb.sql</content><link rel='replies' type='application/atom+xml' href='http://smilelight-tw.blogspot.com/feeds/7208953711752364157/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://smilelight-tw.blogspot.com/2010/05/mysql.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8533976945817671360/posts/default/7208953711752364157'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8533976945817671360/posts/default/7208953711752364157'/><link rel='alternate' type='text/html' href='http://smilelight-tw.blogspot.com/2010/05/mysql.html' title='MySQL 資料庫備份與復原'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/08329229550311591149</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8533976945817671360.post-1388900086163378445</id><published>2010-05-24T16:09:00.000+08:00</published><updated>2010-05-24T16:09:25.730+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="mysql"/><title type='text'>Import Sql File For Mysql</title><content type='html'>匯入Sql File的語法&lt;br /&gt;
&lt;br /&gt;
cmd 下輸入&lt;br /&gt;
mysql -p -u root smilelight &amp;lt; smilelight.sql&lt;br /&gt;
&lt;br /&gt;
Enter後輸入密碼&lt;br /&gt;
就會開始執行Sql File的指令</content><link rel='replies' type='application/atom+xml' href='http://smilelight-tw.blogspot.com/feeds/1388900086163378445/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://smilelight-tw.blogspot.com/2010/05/import-sql-file-for-mysql.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8533976945817671360/posts/default/1388900086163378445'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8533976945817671360/posts/default/1388900086163378445'/><link rel='alternate' type='text/html' href='http://smilelight-tw.blogspot.com/2010/05/import-sql-file-for-mysql.html' title='Import Sql File For Mysql'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/08329229550311591149</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8533976945817671360.post-7745174866407042770</id><published>2010-05-04T11:21:00.007+08:00</published><updated>2011-01-11T11:28:35.765+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="net"/><category scheme="http://www.blogger.com/atom/ns#" term="windows service"/><title type='text'>開發佈署 Windows Service 程式</title><content type='html'>&lt;b&gt;&lt;i&gt;A. 建立 Windows Service Project&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;i&gt;B. 建立 Windows Service Project Install&amp;nbsp;&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;i&gt;C. 建立安裝佈署程式&amp;nbsp;&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange;&quot;&gt;&lt;i&gt;A. 建立 Windows Service Project&lt;/i&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
A-1. 建立 → 專案&lt;br /&gt;
A-2. 專案類型選擇 Windows 服務&lt;br /&gt;
A-3. 在專案中的Service1.cs上按滑鼠右鍵, 點選檢視程式碼(C)&lt;br /&gt;
A-4. 程式碼中的OnStart方法內輸入&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;EventLog.WriteEntry(“啟動了Service”);&lt;/span&gt;&lt;br /&gt;
A-5. 程式碼中的OnStop 方法內輸入&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;EventLog.WriteEntry(“停止了Service”);&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4Om7NB94a23UXk7DNFXR7WKT2B7q1NN8KFXI2MLxqvQuv10Rxp4USN7btVCM7tuT3V6iVOuBMN5Ia3HtoYWJ_zLXEniW8ZTHnHAoQEYZ_ceaqFEQs6DjwMTuwCtgUgIGmlT_hyjTbPaFk/s1600/%E5%BB%BA%E7%AB%8B+Windows+Service+Project.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4Om7NB94a23UXk7DNFXR7WKT2B7q1NN8KFXI2MLxqvQuv10Rxp4USN7btVCM7tuT3V6iVOuBMN5Ia3HtoYWJ_zLXEniW8ZTHnHAoQEYZ_ceaqFEQs6DjwMTuwCtgUgIGmlT_hyjTbPaFk/s320/%E5%BB%BA%E7%AB%8B+Windows+Service+Project.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange;&quot;&gt;&lt;i&gt;B. 建立 Windows Service Project Install&lt;/i&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
B-1. Service1.cs的設計頁面中按滑鼠右鍵, 加入安裝程式&lt;br /&gt;
B-2. 在專案中將會新增一個ProjectInstaller.cs檔案,&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;開啟ProjectInstaller.cs設計頁面&lt;br /&gt;
B-3. 點選 serviceProcessInstaller1元件的屬性頁中,&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;將account屬性設為LocalSystem&lt;br /&gt;
B-4. 點選 serviceInstaller1元件的屬性頁中, ServiceName&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;為服務的名稱,如果想要在開機時自動啟動Service的&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;話, 請將StartType更改為Automatic&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJnJviiXnQiwklKoJMfoGwnTy-m_wiUudo_G0iE9kNPjQg60ZptS6_lHOBnFtCsefv6grv13BVxnjWNGV62JdF8U9taFclrE722gYUlBjf8MlLCXwrtepL3jSlQdoJwXh53AcdRk64aogU/s1600/%E5%BB%BA%E7%AB%8B+Windows+Service+Project+Install.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJnJviiXnQiwklKoJMfoGwnTy-m_wiUudo_G0iE9kNPjQg60ZptS6_lHOBnFtCsefv6grv13BVxnjWNGV62JdF8U9taFclrE722gYUlBjf8MlLCXwrtepL3jSlQdoJwXh53AcdRk64aogU/s320/%E5%BB%BA%E7%AB%8B+Windows+Service+Project+Install.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange;&quot;&gt;&lt;i&gt;C. 建立安裝佈署程式&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
C-1. 檔案 → 加入 → 新增專案&lt;br /&gt;
C-2. 選擇安裝和部屬類中的安裝專案&lt;br /&gt;
C-3. 新增的安裝佈署專案中按滑鼠右鍵 → 加入 → 專案輸出&lt;br /&gt;
C-4. 下拉選單中選擇一開始建立的Service Project, 再選擇主&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 要輸出, 按下確定&lt;br /&gt;
C-5. 安裝佈署專案中按滑鼠右鍵 → 檢視 → 自訂動作&lt;br /&gt;
C-6. 自訂動作中按滑鼠右鍵 → 加入自訂動作 → 應用程式資&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 料夾 → 確定&lt;br /&gt;
C-5. 建置安裝佈署專案&lt;br /&gt;
C-6. 建置成功後, 安裝佈署專案中按滑鼠右鍵 → 安裝&lt;br /&gt;
C-7. 安裝成功後, 至服務中將會看見剛剛建立完成的Service,&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 將它啟動&lt;br /&gt;
C-8. 至事件檢視器中將可看見剛剛程式碼中寫到EventLog的訊息&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjGPxbT_VPd7QtJR2EgdqoWYuJYP-kIMPCVFtkaLSkvz0BtdKT2GQbyr-4ObiJxSaZko2wGqRrBFVak6acl9uX9dvL80q7kZvkzx_ahf8PFQBxDyUcRs5eqPBhgindKmb87uR6gjPXu83eI/s1600/%E5%BB%BA%E7%AB%8B%E5%AE%89%E8%A3%9D%E4%BD%88%E7%BD%B2%E7%A8%8B%E5%BC%8F.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjGPxbT_VPd7QtJR2EgdqoWYuJYP-kIMPCVFtkaLSkvz0BtdKT2GQbyr-4ObiJxSaZko2wGqRrBFVak6acl9uX9dvL80q7kZvkzx_ahf8PFQBxDyUcRs5eqPBhgindKmb87uR6gjPXu83eI/s320/%E5%BB%BA%E7%AB%8B%E5%AE%89%E8%A3%9D%E4%BD%88%E7%BD%B2%E7%A8%8B%E5%BC%8F.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://smilelight-tw.blogspot.com/feeds/7745174866407042770/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://smilelight-tw.blogspot.com/2010/05/windows-service.html#comment-form' title='1 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8533976945817671360/posts/default/7745174866407042770'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8533976945817671360/posts/default/7745174866407042770'/><link rel='alternate' type='text/html' href='http://smilelight-tw.blogspot.com/2010/05/windows-service.html' title='開發佈署 Windows Service 程式'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/08329229550311591149</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4Om7NB94a23UXk7DNFXR7WKT2B7q1NN8KFXI2MLxqvQuv10Rxp4USN7btVCM7tuT3V6iVOuBMN5Ia3HtoYWJ_zLXEniW8ZTHnHAoQEYZ_ceaqFEQs6DjwMTuwCtgUgIGmlT_hyjTbPaFk/s72-c/%E5%BB%BA%E7%AB%8B+Windows+Service+Project.png" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8533976945817671360.post-4760409873196751519</id><published>2010-04-06T15:13:00.005+08:00</published><updated>2010-04-06T16:14:27.493+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="mantis"/><title type='text'>Mantis&#39;s upload file to disk and setting max size</title><content type='html'>要讓Mantis有upload的機制有以下幾個地方要修改&lt;br /&gt;
&lt;br /&gt;
1. mantis 的config_inc.php 檔&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;新增以下參數&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: 13px; line-height: 19px;&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6aa84f;&quot;&gt;// 開啟upload 機制&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: 13px; line-height: 19px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #e69138;&quot;&gt;$g_allow_file_upload = ON;&lt;/span&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: 13px; line-height: 19px;&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6aa84f;&quot;&gt;//&amp;nbsp;設定上傳最大檔案容量, 20M&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: 13px; line-height: 19px;&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #e69138;&quot;&gt;$g_max_file_size = 20000000;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 13px; line-height: 19px;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #93c47d;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6aa84f;&quot;&gt;//&amp;nbsp;設定上傳型態, 預設是DATABASE&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 13px; line-height: 19px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6aa84f;&quot;&gt;&amp;nbsp;&amp;nbsp; // 可設定成 DATABASE, DISK, FTP 三種型態&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: 13px; line-height: 19px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #e69138;&quot;&gt;$g_file_upload_method = DISK;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: 13px; line-height: 19px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: 13px; line-height: 19px;&quot;&gt;2. php.ini 的設定&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: 13px; line-height: 19px;&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6aa84f;&quot;&gt;;script最大執行時間&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: 13px; line-height: 19px;&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #e69138;&quot;&gt;max_execution_time = 300 ;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: 13px; line-height: 19px;&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6aa84f;&quot;&gt;;最大上傳檔案容量&lt;/span&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #e69138;&quot;&gt;upload_max_filesize = 20M ;&lt;/span&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: 13px; line-height: 19px;&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6aa84f;&quot;&gt;;post可接受最大容量&lt;/span&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #e69138;&quot;&gt;post_max_size= 20M;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: 13px; line-height: 19px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: 13px; line-height: 19px;&quot;&gt;3. 設定mantis內project的檔案上傳路徑&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: 13px; line-height: 19px;&quot;&gt;&amp;nbsp;&amp;nbsp; 先在mantis web site中新增一個upload資料夾&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: 13px; line-height: 19px;&quot;&gt;&amp;nbsp;&amp;nbsp; 再到mantis內編輯project的檔案上傳路徑&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixUbzn4R_UIx5iBb-uDsJHKY7n9h2L9DUMsCgj7HPUxF9arVhMFf_V919i2yUPSyvPoT1Gu48t_60yuw8-NvLyRmo7_6E75ENd2UkqgsPZoVNWSRlviQdCH5Ebp-TzSPwxyiEM3JNfld8U/s1600/mantis_upload_01.JPG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixUbzn4R_UIx5iBb-uDsJHKY7n9h2L9DUMsCgj7HPUxF9arVhMFf_V919i2yUPSyvPoT1Gu48t_60yuw8-NvLyRmo7_6E75ENd2UkqgsPZoVNWSRlviQdCH5Ebp-TzSPwxyiEM3JNfld8U/s320/mantis_upload_01.JPG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: 13px; line-height: 19px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: 13px; line-height: 19px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: 13px; line-height: 19px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: 13px; line-height: 19px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: 13px; line-height: 19px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: 13px; line-height: 19px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: 13px; line-height: 19px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: 13px; line-height: 19px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: 13px; line-height: 19px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: 13px; line-height: 19px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 13px; line-height: 19px;&quot;&gt;4. 完成以上設定, 將可以上傳檔案至mantis中&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 13px; line-height: 19px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 13px; line-height: 19px;&quot;&gt;參考網站&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 13px; line-height: 19px;&quot;&gt;&lt;a href=&quot;http://ivens-ting.blogspot.com/2008/05/mantis-file-upload.html&quot;&gt;http://ivens-ting.blogspot.com/2008/05/mantis-file-upload.html&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: small;&quot;&gt;&lt;a href=&quot;http://hi.baidu.com/%CE%DA%CD%D0%B0%EE%CA%D8%BB%A4%D5%DF/blog/item/8df2b63ed253cc3671cf6c2f.html&quot;&gt;http://hi.baidu.com/%CE%DA%CD%D0%B0%EE%CA%D8%BB%A4%D5%DF/blog/item/8df2b63ed253cc3671cf6c2f.html&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif; font-size: 13px; line-height: 19px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://smilelight-tw.blogspot.com/feeds/4760409873196751519/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://smilelight-tw.blogspot.com/2010/04/mantiss-upload-file-to-disk-and-setting.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8533976945817671360/posts/default/4760409873196751519'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8533976945817671360/posts/default/4760409873196751519'/><link rel='alternate' type='text/html' href='http://smilelight-tw.blogspot.com/2010/04/mantiss-upload-file-to-disk-and-setting.html' title='Mantis&#39;s upload file to disk and setting max size'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/08329229550311591149</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixUbzn4R_UIx5iBb-uDsJHKY7n9h2L9DUMsCgj7HPUxF9arVhMFf_V919i2yUPSyvPoT1Gu48t_60yuw8-NvLyRmo7_6E75ENd2UkqgsPZoVNWSRlviQdCH5Ebp-TzSPwxyiEM3JNfld8U/s72-c/mantis_upload_01.JPG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8533976945817671360.post-8763019000324336935</id><published>2010-04-06T14:04:00.000+08:00</published><updated>2010-04-06T14:04:02.411+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="net"/><title type='text'>Image.save 發生 &quot;在 GDI+ 中發生泛型錯誤&quot; 解決方法</title><content type='html'>一開始在載入圖檔時, 如果是用以下的方式載入的話, 檔案會被鎖定&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #f6b26b;&quot;&gt;&amp;nbsp;Image image = Image.FromStream(fileStream)&lt;/span&gt;;&lt;br /&gt;
而之後想要另存此圖檔時將發生&amp;nbsp;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&quot;在 GDI+ 中發生泛型錯誤&quot;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
解決辦法是用以下方式載入圖檔&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #f6b26b;&quot;&gt;&amp;nbsp;Image image = Image.FromFile(filePath);&lt;/span&gt;&lt;br /&gt;
此方法能解決無法另存新檔的問題&lt;br /&gt;
&lt;br /&gt;
參考網站&lt;br /&gt;
&lt;a href=&quot;http://blog.miniasp.com/post/2009/05/A-generic-error-occurred-in-GDI-plus.aspx&quot;&gt;http://blog.miniasp.com/post/2009/05/A-generic-error-occurred-in-GDI-plus.aspx&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://social.msdn.microsoft.com/Forums/zh-TW/233/thread/8b3f6406-7ae4-46d0-865c-fed7243f9189&quot;&gt;http://social.msdn.microsoft.com/Forums/zh-TW/233/thread/8b3f6406-7ae4-46d0-865c-fed7243f9189&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://smilelight-tw.blogspot.com/feeds/8763019000324336935/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://smilelight-tw.blogspot.com/2010/04/imagesave-gdi.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8533976945817671360/posts/default/8763019000324336935'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8533976945817671360/posts/default/8763019000324336935'/><link rel='alternate' type='text/html' href='http://smilelight-tw.blogspot.com/2010/04/imagesave-gdi.html' title='Image.save 發生 &quot;在 GDI+ 中發生泛型錯誤&quot; 解決方法'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/08329229550311591149</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>