<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
    <title>Philipz學習日誌</title>
    <link rel="alternate" type="text/html" href="http://server.everfine.com.tw/blog/" />
    <link rel="self" type="application/atom+xml" href="http://server.everfine.com.tw/blog/atom.xml" />
    <id>tag:server.everfine.com.tw,2008-10-20:/blog//1</id>
    <updated>2010-02-12T05:23:21Z</updated>
    <subtitle>此Blog是為了將每天的學習心得、偶然的發現跟突發奇想記錄下來，並與大家分享，以免白白將突然的想法或發現隨時間淡忘掉。</subtitle>
    <generator uri="http://www.sixapart.com/movabletype/">Movable Type 4.33-en</generator>

<entry>
    <title>IBM DB2 UDB for z/OS Version 8 ROW_NUMBER() solution</title>
    <link rel="alternate" type="text/html" href="http://server.everfine.com.tw/blog/archives/2010/02/ibm-db2-udb-for.html" />
    <id>tag:server.everfine.com.tw,2010:/blog//1.321</id>

    <published>2010-02-12T05:07:17Z</published>
    <updated>2010-02-12T05:23:21Z</updated>

    <summary>About IBM DB2 z/OS V.8 is not support row_number(). From DB2PORTAL Blog just use count() and temporary table to solve...</summary>
    <author>
        <name>philipz</name>
        <uri>http://server.everfine.com.tw/blog/</uri>
    </author>
    
    
    <content type="html" xml:lang="en" xml:base="http://server.everfine.com.tw/blog/">
        <![CDATA[<p>About IBM DB2 z/OS V.8 is not support <a href="http://en.wikipedia.org/wiki/Select_%28SQL%29#Limiting_result_rows">row_number()</a>. From <a href="http://www.db2portal.com/2007/03/mimicking-rownum-in-db2.html">DB2PORTAL Blog</a> just use count() and temporary table to solve this problem. Use this sql statement to limit result range, like pre/next page effect.<br />
<code class="c"><br />
SELECT DEPTNO, ROW#<br />
FROM DEDBADM.DEPT TB1,<br />
     TABLE (SELECT COUNT(*) + 1 AS ROW#<br />
            FROM DEDBADM.DEPT TB2<br />
            WHERE TB2.DEPTNO < TB1.DEPTNO) AS TDEPT_TAB<br />
WHERE ROW# BETWEEN 50 AND 60<br />
ORDER BY DEPTNO<br />
FETCH FIRST 10 ROWS ONLY<br />
OPTIMIZE FOR 10 ROWS<br />
WITH UR;<br />
</code></p>]]>
        
    </content>
</entry>

<entry>
    <title>Google Notebook Extension for Firefox 3.6+</title>
    <link rel="alternate" type="text/html" href="http://server.everfine.com.tw/blog/archives/2010/01/google-notebook-1.html" />
    <id>tag:server.everfine.com.tw,2010:/blog//1.320</id>

    <published>2010-01-23T02:33:01Z</published>
    <updated>2010-01-23T02:38:41Z</updated>

    <summary>因安裝新版Firefox 3.6，而之前的Google Notebook Extension for Firefox 3.5+便說無法相容。 其實只要直接有改那XPI檔內的install.rdf內的3.0.*改為4.0.*就可以安裝了。 為方便自己其他台電腦也安裝，提供修改過的google-notebook.xpi檔下載點。...</summary>
    <author>
        <name>philipz</name>
        <uri>http://server.everfine.com.tw/blog/</uri>
    </author>
    
    
    <content type="html" xml:lang="en" xml:base="http://server.everfine.com.tw/blog/">
        <![CDATA[<p>因安裝新版Firefox 3.6，而之前的<a href="http://server.everfine.com.tw/blog/archives/2009/09/google-notebook.html">Google Notebook Extension for Firefox 3.5+</a>便說無法相容。<br />
其實只要直接有改那XPI檔內的install.rdf內的<em:maxVersion>3.0.*</em:maxVersion>改為<em:maxVersion>4.0.*</em:maxVersion>就可以安裝了。<br />
為方便自己其他台電腦也安裝，提供修改過的<a href="http://server.everfine.com.tw/blog/google-notebook.xpi">google-notebook.xpi檔下載點</a>。</p>]]>
        
    </content>
</entry>

<entry>
    <title>Using Gmail SMTP send email by VBS </title>
    <link rel="alternate" type="text/html" href="http://server.everfine.com.tw/blog/archives/2010/01/using-gmail-smt.html" />
    <id>tag:server.everfine.com.tw,2010:/blog//1.319</id>

    <published>2010-01-03T17:01:51Z</published>
    <updated>2010-01-03T17:22:31Z</updated>

    <summary> Username = &quot;Yourname&quot; Passwd = &quot;Password&quot; AttachedFile = &quot;filename&quot; SMTPServer = &quot;smtp.gmail.com&quot; Set Email = CreateObject(&quot;CDO.Message&quot;) Email.From = &quot;yourname@gmail.com&quot;...</summary>
    <author>
        <name>philipz</name>
        <uri>http://server.everfine.com.tw/blog/</uri>
    </author>
    
    
    <content type="html" xml:lang="en" xml:base="http://server.everfine.com.tw/blog/">
        <![CDATA[<p><code class="c"><br />
Username = "Yourname"<br />
Passwd = "Password"<br />
AttachedFile = "filename"<br />
SMTPServer = "smtp.gmail.com"<br />
Set Email = CreateObject("CDO.Message")<br />
Email.From = "yourname@gmail.com"<br />
Email.To = "recivername@gmail.com"<br />
Email.Subject = "Subject"<br />
Email.Textbody = "Content"<br />
Email.Addattachment AttachedFile<br />
Email.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2<br />
Email.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserver") = SMTPServer<br />
Email.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 465<br />
Email.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1<br />
Email.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = true<br />
Email.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusername") = Username<br />
Email.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendpassword") = Passwd<br />
Email.Configuration.Fields.Update<br />
Email.Send<br />
set Email=nothing<br />
</code></p>]]>
        
    </content>
</entry>

<entry>
    <title>DOS Batch Script</title>
    <link rel="alternate" type="text/html" href="http://server.everfine.com.tw/blog/archives/2010/01/dos-batch-scrip.html" />
    <id>tag:server.everfine.com.tw,2010:/blog//1.318</id>

    <published>2010-01-03T15:18:32Z</published>
    <updated>2010-01-03T15:22:56Z</updated>

    <summary>Find out year, month and day. FOR /F &quot;tokens=1-3 delims=/- &quot; %%A IN (&apos;DATE/T&apos;) DO ( SET yyyy=%%A SET mm=%%B...</summary>
    <author>
        <name>philipz</name>
        <uri>http://server.everfine.com.tw/blog/</uri>
    </author>
    
    
    <content type="html" xml:lang="en" xml:base="http://server.everfine.com.tw/blog/">
        <![CDATA[<p>Find out year, month and day.</p>

<p><code class="c"><br />
FOR /F "tokens=1-3 delims=/- " %%A IN ('DATE/T') DO (<br />
    SET yyyy=%%A<br />
    SET mm=%%B<br />
    SET dd=%%C<br />
)<br />
echo %yyyy%_%mm%_%dd%<br />
</code></p>]]>
        
    </content>
</entry>

<entry>
    <title>如何自行建置DDE回測系統</title>
    <link rel="alternate" type="text/html" href="http://server.everfine.com.tw/blog/archives/2009/12/dde.html" />
    <id>tag:server.everfine.com.tw,2009:/blog//1.317</id>

    <published>2009-12-25T02:47:24Z</published>
    <updated>2009-12-27T14:00:26Z</updated>

    <summary>之前的Java DDE Server &amp; Client提到Java如何跟DDE溝通。主要也是因為現在看盤軟體大多走DDE。 建置一個DDE Server步驟如下： 1.下載Java Runtime Environment。 2.下載c4jinst.zip，解開後執行。 3.到期交所行情資訊下載要回測的tick資料。 4.使用小弟寫的parser tick資料，轉成DDE Server送出。下載DDEServer.jar。 5.最後，只要將期交所要回測的檔案解開，與DDEServer.jar放置同一目錄中。在執行打上cmd，再到那目錄中，輸入java -jar DDEServer.jar Daily_2009_12_25.rpt，就可模擬當天看盤軟體的DDE報價方式。...</summary>
    <author>
        <name>philipz</name>
        <uri>http://server.everfine.com.tw/blog/</uri>
    </author>
    
    
    <content type="html" xml:lang="en" xml:base="http://server.everfine.com.tw/blog/">
        <![CDATA[<p>之前的<a href="http://server.everfine.com.tw/blog/archives/2009/09/java-dde-server.html">Java DDE Server & Client</a>提到Java如何跟DDE溝通。主要也是因為現在看盤軟體大多走DDE。<br />
建置一個DDE Server步驟如下：<br />
1.下載<a href="http://www.java.com/zh_TW/download/index.jsp">Java Runtime Environment</a>。<br />
2.下載<a href="http://server.everfine.com.tw/blog/c4jinst.zip">c4jinst.zip</a>，解開後執行。<br />
3.到<a href="http://www.taifex.com.tw/chinese/3/3_1_3.asp">期交所行情資訊</a>下載要回測的tick資料。<br />
4.使用小弟寫的parser tick資料，轉成DDE Server送出。<a href="http://server.everfine.com.tw/blog/DDEServer.jar">下載DDEServer.jar</a>。<br />
5.最後，只要將期交所要回測的檔案解開，與DDEServer.jar放置同一目錄中。在執行打上cmd，再到那目錄中，輸入java -jar DDEServer.jar Daily_2009_12_25.rpt，就可模擬當天看盤軟體的DDE報價方式。</p>]]>
        
    </content>
</entry>

<entry>
    <title>Joda-Time - 簡化JAVA在日期計算的繁雜。</title>
    <link rel="alternate" type="text/html" href="http://server.everfine.com.tw/blog/archives/2009/12/joda-time---jav.html" />
    <id>tag:server.everfine.com.tw,2009:/blog//1.316</id>

    <published>2009-12-24T07:48:33Z</published>
    <updated>2009-12-24T07:57:03Z</updated>

    <summary>From: developerWorks 中国在编写企业应用程序时，我常常需要处理日期。并且在我的最新项目中 -- 保险行业 -- 纠正日期计算尤其重要。使用 java.util.Calendar 让我有些不安。如果您也曾使用这个类处理过日期/时间值，那么您就知道它使用起来有多麻烦。因此当我接触到 Joda-Time -- 面向 Java 应用程序的日期/时间库的替代选择 -- 我决定研究一下。其结果是：我很庆幸我这么做了。 Joda-Time 令时间和日期值变得易于管理、操作和理解。事实上，易于使用是 Joda 的主要设计目标。其他目标包括可扩展性、完整的特性集以及对多种日历系统的支持。并且...</summary>
    <author>
        <name>philipz</name>
        <uri>http://server.everfine.com.tw/blog/</uri>
    </author>
    
    
    <content type="html" xml:lang="en" xml:base="http://server.everfine.com.tw/blog/">
        <![CDATA[From: <a href="http://www.ibm.com/developerworks/cn/java/j-jodatime.html">developerWorks 中国</a><br /><br /><p>在编写企业应用程序时，我常常需要处理日期。并且在我的最新项目中 -- 保险行业 -- 纠正日期计算尤其重要。使用 <code>java.util.Calendar</code> 让我有些不安。如果您也曾使用这个类处理过日期/时间值，那么您就知道它使用起来有多麻烦。因此当我接触到 Joda-Time -- 面向 Java 应用程序的日期/时间库的替代选择 -- 我决定研究一下。其结果是：我很庆幸我这么做了。 </p>
			<p>Joda-Time
令时间和日期值变得易于管理、操作和理解。事实上，易于使用是 Joda
的主要设计目标。其他目标包括可扩展性、完整的特性集以及对多种日历系统的支持。并且 Joda 与 JDK
是百分之百可互操作的，因此您无需替换所有 Java 代码，只需要替换执行日期/时间计算的那部分代码。 </p>
			<table align="right" border="0" cellpadding="0" cellspacing="0" width="40%"><tbody><tr><td width="10"><img alt="" src="http://www.ibm.com/i/c.gif" height="1" width="10" /></td><td><table border="1" cellpadding="5" cellspacing="0" width="100%"><tbody><tr><td bgcolor="#eeeeee">
				<a href="" name="N1008D"><b>Joda 大型项目</b></a><br />
				<p>Joda
实际上是涵盖众多用于 Java 语言的替代 API 的大型项目，因此从技术上讲，使用 Joda 和 Joda-Time
名称表示相同的意思是一种误称。但在撰写本文之际，Joda-Time API 目前似乎是唯一处于活跃开发状态下的 Joda API。考虑到
Joda 大型项目的当前状态，我想将 Joda-Time 简称为 Joda 应该没什么问题。</p>
			</td></tr></tbody></table></td></tr></tbody></table>
			<p>本文将介绍并展示如何使用它。我将介绍以下主题： </p>
			<ul><li>日期/时间替代库简介</li><li>Joda 的关键概念</li><li>创建 Joda-Time 对象</li><li>以 Joda 的方式操作时间  style</li><li>以 Joda 的方式格式化时间</li></ul>
			<p>您可以 <a href="http://www.ibm.com/developerworks/cn/java/j-jodatime.html#download">下载</a> 演示这些概念的样例应用程序的源代码。</p>
			<p><a href="" name="N100B3"><span class="atitle">Joda 简介</span></a></p>
			<p>为什么要使用 Joda？考虑创建一个用时间表示的某个随意的时刻 -- 比如，2000 年 1 月 1 日 0 时 0 分。我如何创建一个用时间表示这个瞬间的 JDK 对象？使用 <code>java.util.Date</code>？事实上这是行不通的，因为自 JDK 1.1 之后的每个 Java 版本的 Javadoc 都声明应当使用 <code>java.util.Calendar</code>。<code>Date</code> 中不赞成使用的构造函数的数量严重限制了您创建此类对象的途径。 </p>
			<p>然而，<code>Date</code> 确实有一个构造函数，您可以用来创建用时间表示某个瞬间的对象（除 "现在" 以外）。该方法使用距离 1970 年 1 月 1 日子时格林威治标准时间（也称为 <i>epoch</i>）以来的毫秒数作为一个参数，对时区进行校正。考虑到 Y2K 对软件开发企业的重要性，您可能会认为我已经记住了这个值 -- 但是我没有。<code>Date</code> 也不过如此。</p>
			<p>那么 <code>Calendar</code> 又如何呢？我将使用下面的方式创建必需的实例： </p>
			<table border="0" cellpadding="0" cellspacing="0" width="100%"><tbody><tr><td class="code-outline"><pre class="displaycode">Calendar calendar = Calendar.getInstance();<br />calendar.set(2000, Calendar.JANUARY, 1, 0, 0, 0);<br /></pre></td></tr></tbody></table><br />
			<p>使用 Joda，代码应该类似如下所示： </p>
			<table border="0" cellpadding="0" cellspacing="0" width="100%"><tbody><tr><td class="code-outline"><pre class="displaycode">DateTime dateTime = new DateTime(2000, 1, 1, 0, 0, 0, 0);<br /></pre></td></tr></tbody></table><br />
			<p>这一行简单代码没有太大的区别。但是现在我将使问题稍微复杂化。假设我希望在这个日期上加上 90 天并输出结果。使用 JDK，我需要使用清单 1 中的代码： </p>
			<br /><a href="" name="listing1"><b>清单 1. 以 JDK 的方式向某一个瞬间加上 90 天并输出结果</b></a><br /><table border="0" cellpadding="0" cellspacing="0" width="100%"><tbody><tr><td class="code-outline"><pre class="displaycode">				<br />Calendar calendar = Calendar.getInstance();<br />calendar.set(2000, Calendar.JANUARY, 1, 0, 0, 0);<br />SimpleDateFormat sdf =<br />  new SimpleDateFormat("E MM/dd/yyyy HH:mm:ss.SSS");<br />calendar.add(Calendar.DAY_OF_MONTH, 90);<br />System.out.println(sdf.format(calendar.getTime()));<br /></pre></td></tr></tbody></table><br />
			<p>使用 Joda，代码如清单 2 所示： </p>
			<br /><a href="" name="listing2"><b>清单 2. 以 Joda 的方式向某一个瞬间加上 90 天并输出结果 </b></a><br /><table border="0" cellpadding="0" cellspacing="0" width="100%"><tbody><tr><td class="code-outline"><pre class="displaycode">				<br />DateTime dateTime = new DateTime(2000, 1, 1, 0, 0, 0, 0);<br />System.out.println(dateTime.plusDays(90).toString("E MM/dd/yyyy HH:mm:ss.SSS");<br /></pre></td></tr></tbody></table><br />
			<p>两者之间的差距拉大了（Joda 用了两行代码，JDK 则是 5 行代码）。</p>
			<p>现在假设我希望输出这样一个日期：距离 Y2K 45 天之后的某天在下一个月的当前周的最后一天的日期。坦白地说，我甚至不想使用 <code>Calendar</code> 处理这个问题。使用 JDK 实在太痛苦了，即使是简单的日期计算，比如上面这个计算。正是多年前的这样一个时刻，我第一次领略到 Joda-Time 的强大。使用 Joda，用于计算的代码如清单 3 所示： </p>
			<br /><a href="" name="listing3"><b>清单 3. 改用 Joda</b></a><br /><table border="0" cellpadding="0" cellspacing="0" width="100%"><tbody><tr><td class="code-outline"><pre class="displaycode">				<br />DateTime dateTime = new DateTime(2000, 1, 1, 0, 0, 0, 0);<br />System.out.println(dateTime.plusDays(45).plusMonths(1).dayOfWeek()<br />  .withMaximumValue().toString("E MM/dd/yyyy HH:mm:ss.SSS");<br /></pre></td></tr></tbody></table><br />
			<p>清单 3 的输出为：</p>
			<table border="0" cellpadding="0" cellspacing="0" width="100%"><tbody><tr><td class="code-outline"><pre class="displaycode">Sun 03/19/2000 00:00:00.000</pre></td></tr></tbody></table><br />
			<p>如果您正在寻找一种易于使用的方式替代 JDK 日期处理，那么您真的应该考虑 Joda。如果不是这样的话，那么继续痛苦地使用 <code>Calendar</code> 完成所有日期计算吧。当您做到这一点后，您完全可以做到使用几把剪刀修建草坪并使用一把旧牙刷清洗您的汽车。 </p>
			<p><a href="" name="N10125"><span class="smalltitle">Joda 和 JDK 互操作性</span></a></p>
			<p>JDK <code>Calendar</code> 类缺乏可用性，这一点很快就能体会到，而 Joda 弥补了这一不足。Joda 的设计者还做出了一个决定，我认为这是它取得成功的构建：JDK 互操作性。Joda 的类能够生成（但是，正如您将看到的一样，有时会采用一种比较迂回的方式）<code>java.util.Date</code> 的实例（和 <code>Calendar</code>）。这使您能够保留现有的依赖 JDK 的代码，但是又能够使用 Joda 处理复杂的日期/时间计算。 </p>
			<p>例如，完成 <a href="http://www.ibm.com/developerworks/cn/java/j-jodatime.html#listing3">清单 3</a> 中的计算后。我只需要做出如清单 4 所示的更改就可以返回到 JDK 中：</p>
			<br /><a href="" name="listing4"><b>清单 4. 将 Joda 计算结果插入到 JDK 对象中</b></a><br /><table border="0" cellpadding="0" cellspacing="0" width="100%"><tbody><tr><td class="code-outline"><pre class="displaycode">				<br />Calendar calendar = Calendar.getInstance();<br />DateTime dateTime = new DateTime(2000, 1, 1, 0, 0, 0, 0);<br />System.out.println(dateTime.plusDays(45).plusMonths(1).dayOfWeek()<br />  .withMaximumValue().toString("E MM/dd/yyyy HH:mm:ss.SSS");<br />calendar.setTime(dateTime.toDate());<br /></pre></td></tr></tbody></table><br />
			<p>就是这么简单。我完成了计算，但是可以继续在 JDK 对象中处理结果。这是 Joda 的一个非常棒的特性。 </p>
			<br /><table border="0" cellpadding="0" cellspacing="0" width="100%"><tbody><tr><td><img src="http://www.ibm.com/i/v14/rules/blue_rule.gif" alt="" height="1" width="100%" /><br /><img alt="" src="http://www.ibm.com/i/c.gif" border="0" height="6" width="8" /></td></tr></tbody></table><table class="no-print" align="right" cellpadding="0" cellspacing="0"><tbody><tr align="right"><td><img src="http://www.ibm.com/i/c.gif" alt="" height="4" width="100%" /><br /><table border="0" cellpadding="0" cellspacing="0"><tbody><tr><td valign="middle"><img src="http://www.ibm.com/i/v14/icons/u_bold.gif" alt="" border="0" height="16" width="16" /><br /></td><td align="right" valign="top"><a href="http://www.ibm.com/developerworks/cn/java/j-jodatime.html#main" class="fbox"><b>回页首</b></a></td></tr></tbody></table></td></tr></tbody></table><br /><br /><p><a href="" name="N1014D"><span class="atitle">Joda 的关键日期/时间概念</span></a></p>
			<p>Joda 使用以下概念，它们可以应用到任何日期/时间库： </p>
			<ul><li>不可变性（Immutability）</li><li>瞬间性（Instant）</li><li>局部性（Partial）</li><li>年表（Chronology）</li><li>时区（Time zone）</li></ul>
			<p>我将针对 Joda 依次讨论每一个概念。 </p>
			<p><a href="" name="N1016B"><span class="smalltitle">不可变性</span></a></p>
			<p>我
在本文讨论的 Joda 类具有不可变性，因此它们的实例无法被修改。（不可变类的一个优点就是它们是线程安全的）。我将向您展示的用于处理日期计算的
API 方法全部返回一个对应 Joda 类的新实例，同时保持原始实例不变。当您通过一个 API 方法操作 Joda
类时，您必须捕捉该方法的返回值，因为您正在处理的实例不能被修改。您可能对这种模式很熟悉；比如，这正是 <code>java.lang.String</code> 的各种操作方法的工作方式。 </p>
			<p><a href="" name="N10178"><span class="smalltitle">瞬间性</span></a></p>
			<p><code>Instant</code> 表示时间上的某个精确的时刻，使用从 epoch 开始计算的毫秒表示。这一定义与 JDK 相同，这就是为什么任何 Joda <code>Instant</code> 子类都可以与 JDK <code>Date</code> 和 <code>Calendar</code> 类兼容的原因。</p>
			<p>更通用一点的定义是：一个<i>瞬间</i> 就是指时间线上只出现一次且唯一的一个时间点，并且这种日期结构只能以一种有意义的方式出现一次。 </p>
			<p><a href="" name="N10196"><span class="smalltitle">局部性</span></a></p>
			<p>一个局部时间，正如我将在本文中将其称为局部时间片段一样，它指的是时间的一部分片段。瞬间性指定了与 epoch 相对的时间上的一个精确时刻，与此相反，局部时间片段指的是在时间上可以来回 "移动" 的一个时刻，这样它便可以应用于多个实例。比如，<i>6 月 2 日</i> 可以应用于任意一年的 6 月份（使用 Gregorian 日历）的第二天的任意瞬间。同样，<i>11:06 p.m.</i> 可以应用于任意一年的任意一天，并且每天只能使用一次。即使它们没有指定一个时间上的精确时刻，局部时间片段仍然是有用的。 </p>
			<p>我喜欢将局部时间片段看作一个重复周期中的一点，这样的话，如果我正在考虑的日期构建可以以一种有意义的方式出现多次（即重复的），那么它就是一个局部时间。 </p>
			<p><a href="" name="N101A8"><span class="smalltitle">年表</span></a></p>
			<p>Joda 本质 -- 以及其设计核心  -- 的关键就是<i>年表</i>（它的含义由一个同名抽象类捕捉）。从根本上讲，年表是一种日历系统 -- 一种计算时间的特殊方式 -- 并且是一种在其中执行日历算法的框架。受 Joda 支持的年表的例子包括：</p>
			<ul><li>ISO（默认）</li><li>Coptic</li><li>Julian</li><li>Islamic</li></ul>
			<p>Joda-Time 1.6 支持 8 种年表，每一种都可以作为特定日历系统的计算引擎。 </p>
			<p><a href="" name="N101CE"><span class="smalltitle">时区</span></a></p>
			<p>时
区是值一个相对于英国格林威治的地理位置，用于计算时间。要了解事件发生的精确时间，还必须知道发生此事件的位置。任何严格的时间计算都必须涉及时区（或
相对于 GMT），除非在同一个时区内发生了相对时间计算（即时这样时区也很重要，如果事件对于位于另一个时区的各方存在利益关系的话）。</p>
			<p><code>DateTimeZone</code> 是 Joda 库用于封装位置概念的类。许多日期和时间计算都可以在不涉及时区的情况下完成，但是仍然需要了解 <code>DateTimeZone</code> 如何影响 Joda 的操作。默认时间，即从运行代码的机器的系统时钟检索到的时间，在大部分情况下被使用。 </p>
			<br /><table border="0" cellpadding="0" cellspacing="0" width="100%"><tbody><tr><td><img src="http://www.ibm.com/i/v14/rules/blue_rule.gif" alt="" height="1" width="100%" /><br /><img alt="" src="http://www.ibm.com/i/c.gif" border="0" height="6" width="8" /></td></tr></tbody></table><table class="no-print" align="right" cellpadding="0" cellspacing="0"><tbody><tr align="right"><td><img src="http://www.ibm.com/i/c.gif" alt="" height="4" width="100%" /><br /><table border="0" cellpadding="0" cellspacing="0"><tbody><tr><td valign="middle"><img src="http://www.ibm.com/i/v14/icons/u_bold.gif" alt="" border="0" height="16" width="16" /><br /></td><td align="right" valign="top"><a href="http://www.ibm.com/developerworks/cn/java/j-jodatime.html#main" class="fbox"><b>回页首</b></a></td></tr></tbody></table></td></tr></tbody></table><br /><br /><p><a href="" name="jto"><span class="atitle">创建 Joda-Time 对象</span></a></p>
			<p>现在，我将展示在采用该库时会经常遇到的一些 Joda 类，并展示如何创建这些类的实例。 </p>
			<table align="right" border="0" cellpadding="0" cellspacing="0" width="40%"><tbody><tr><td width="10"><img alt="" src="http://www.ibm.com/i/c.gif" height="1" width="10" /></td><td><table border="1" cellpadding="5" cellspacing="0" width="100%"><tbody><tr><td bgcolor="#eeeeee">
				<a href="" name="N101ED"><b>可变的 Joda 类</b></a><br />
				<p>我并不是可变实用类的粉丝；我只是认为它们的用例并不适合广泛使用。但是如果您认为您的确需要使用可变 Joda 类的话，本节的内容应当会对您的项目有帮助。<code>Readable</code> 和 <code>ReadWritable</code> API 之间的唯一区别在于 <code>ReadWritable</code> 类能够改变封装的日期/时间值，因此我在这里将不再介绍这一点。 </p>
			</td></tr></tbody></table></td></tr></tbody></table>
			<p>本节中介绍的所有实现都具有若干构造函数，允许您初始化封装的日期/时间。它们可以分为 4 个类别： </p>
			<ul><li>使用系统时间。</li><li>使用多个字段指定一个瞬间时刻（或局部时间片段），达到这个特定实现所能支持的最细粒度的精确度。 </li><li>指定一个瞬间时刻（或局部时间片段），以毫秒为单位。</li><li>使用另一个对象（例如，<code>java.util.Date</code>，或者是另一个 Joda 对象）。</li></ul>
			<p>我将在第一个类中介绍这些构造函数：<code> DateTime</code>。当您使用其他 Joda 类的相应构造函数时，也可以使用这里介绍的内容。</p>
			<table align="right" border="0" cellpadding="0" cellspacing="0" width="40%"><tbody><tr><td width="10"><img alt="" src="http://www.ibm.com/i/c.gif" height="1" width="10" /></td><td><table border="1" cellpadding="5" cellspacing="0" width="100%"><tbody><tr><td bgcolor="#eeeeee">
				<a href="" name="N10223"><b>重载方法</b></a><br />
				<p>如果您创建了一个 <code>DateTime</code> 的实例，并且没有提供 <code>Chronology</code> 或 <code>DateTimeZone</code>，Joda 将使用 <code>ISOChronology</code>（默认）和 <code>DateTimeZone</code>（来自系统设置）。然而，Joda <code>ReadableInstant</code> 子类的所有构造函数都包含一个超载方法，该方法以一个 <code>Chronology</code> 或 <code>DateTimeZone</code> 为参数。本文附带的应用程序的的样例代码展示了如何使用这些超载方法（参见 <a href="http://www.ibm.com/developerworks/cn/java/j-jodatime.html#download">下载</a>）。我在这里不会再详细介绍它们，因为这些方法使用起来非常简单。然而，我建议您试着使用一下这个样例应用程序，看看编写您的应用程序代码有多么简单，这样您就可以随意地在 Joda 的 <code>Chronology</code> 和 <code>DateTimeZone</code> 之间切换，同时不会影响到代码的其余部分。 </p>
			</td></tr></tbody></table></td></tr></tbody></table>
			<p><a href="" name="N10259"><span class="smalltitle"><b><code>ReadableInstant</code></b></span></a></p>
			<p>Joda 通过 <code>ReadableInstant</code> 类实现了瞬间性这一概念。表示时间上的不可变瞬间的 Joda 类都属于这个类的子类。（将这个类命名为 <code>ReadOnlyInstant</code> 可能更好，我认为这才是设计者需要传达的意思）。换句话说，<code>ReadableInstant</code> 表示时间上的某一个不可修改的瞬间）。其中的两个子类分别为 <code>DateTime</code> 和
<code>DateMidnight</code>：</p>
			<ul><li><b><code>DateTime</code></b>：这是最常用的一个类。它以毫秒级的精度封装时间上的某个瞬间时刻。<code>DateTime</code> 始终与 <code>DateTimeZone</code> 相关，如果您不指定它的话，它将被默认设置为运行代码的机器所在的时区。

<p>可以使用多种方式构建 <code>DateTime</code> 对象。这个构造函数使用系统时间：</p>
					<table border="0" cellpadding="0" cellspacing="0" width="60%"><tbody><tr><td class="code-outline"><pre class="displaycode">DateTime dateTime = new DateTime();<br /></pre></td></tr></tbody></table><br />

一般来讲，我会尽量避免使用系统时钟来初始化应用程序的实际，而是倾向于外部化设置应用程序代码使用的系统时间。样例应用程序执行以下代码：

<table border="0" cellpadding="0" cellspacing="0" width="100%"><tbody><tr><td class="code-outline"><pre class="displaycode">DateTime dateTime = SystemFactory.getClock().getDateTime();<br /></pre></td></tr></tbody></table><br />

这使得使用不同日期/时间测试我的代码变得更加简单：我不需要修改代码来在应用程序中运行不同的日期场景，因为时间是在 <code>SystemClock</code> 实现的内部设置的，而不是在应用程序的内部。（我可以修改系统时间，但是那实在太痛苦了！）

<p>下面的代码使用一些字段值构建了一个 <code>DateTime</code> 对象：</p>
					<table border="0" cellpadding="0" cellspacing="0" width="100%"><tbody><tr><td class="code-outline"><pre class="displaycode">DateTime dateTime = new DateTime(<br />  2000, //year<br />  1,    // month<br />  1,    // day<br />  0,    // hour (midnight is zero)<br />  0,    // minute<br />  0,    // second<br />  0     // milliseconds<br />);<br /></pre></td></tr></tbody></table><br />
					<p>正如您所见，Joda 可以使您精确地控制创建 <code>DateTime</code> 对象的方式，该对象表示时间上的某个特定的瞬间。每一个 Joda 类都有一个与此类似的构造函数，您在此构造函数中指定 Joda 类可以包含的所有字段。您可以用它快速了解特定类在哪一种粒度级别上操作。 </p>
					<p>下一个构造函数将指定从 epoch 到某个时刻所经过的毫秒数。它根据 JDK <code>Date</code> 对象的毫秒值创建一个 <code>DateTime</code> 对象，其时间精度用毫秒表示，因为 epoch 与 Joda 是相同的：</p>
					<table border="0" cellpadding="0" cellspacing="0" width="100%"><tbody><tr><td class="code-outline"><pre class="displaycode">java.util.Date jdkDate = obtainDateSomehow();<br />long timeInMillis = jdkDate.getTime();<br />DateTime dateTime = new DateTime(timeInMillis);<br /></pre></td></tr></tbody></table><br />
					<p>并且这个例子与前例类似，唯一不同之处是我在这里将 <code>Date</code> 对象直接传递给构造函数：</p>
					<table border="0" cellpadding="0" cellspacing="0" width="100%"><tbody><tr><td class="code-outline"><pre class="displaycode">java.util.Date jdkDate = obtainDateSomehow();<br />dateTime = new DateTime(jdkDate);<br /></pre></td></tr></tbody></table><br />
					<p>Joda 支持使用许多其他对象作为构造函数的参数，用于创建 <code>DateTime</code>，如清单 5 所示：</p>
					<br /><br /><a href="" name="listing5"><b>清单 5. 直接将不同对象传递给 <code>DateTime</code> 的构造函数</b></a><br /><table border="0" cellpadding="0" cellspacing="0" width="100%"><tbody><tr><td class="code-outline"><pre class="displaycode">						<br />// Use a Calendar<br />java.util.Calendar calendar = obtainCalendarSomehow();<br />dateTime = new DateTime(calendar);<br />// Use another Joda DateTime<br />DateTime anotherDateTime = obtainDateTimeSomehow();<br />dateTime = new DateTime(anotherDateTime);<br />// Use a String (must be formatted properly)<br />String timeString = "2006-01-26T13:30:00-06:00";<br />dateTime = new DateTime(timeString);<br />timeString = "2006-01-26";<br />dateTime = new DateTime(timeString);<br /></pre></td></tr></tbody></table><br />
					<p>注意，如果您准备使用 <code>String</code>（必须经过解析），您必须对其进行精确地格式化。参考 Javadoc，获得有关 Joda 的 <code>ISODateTimeFormat</code> 类的更多信息（参见 <a href="http://www.ibm.com/developerworks/cn/java/j-jodatime.html#resources">参考资料</a>）。</p>
				</li><li><b><code>DateMidnight</code></b>：这个类封装某个时区（通常为默认时区）在特定年/月/日的午夜时分的时刻。它基本上类似于 <code>DateTime</code>，不同之处在于时间部分总是为与该对象关联的特定 <code>DateTimeZone</code> 时区的午夜时分。</li></ul>
			<p>您将在本文看到的其他类都遵循与 <code>ReadableInstant</code> 类相同的模式（Joda Javadoc 将显示这些内容），因此为了节省篇幅，我将不会在以下小节介绍这些内容。 </p>
			<p><a href="" name="N10304"><span class="smalltitle"><b><code>ReadablePartial</code></b></span></a></p>
			<p>应用程序所需处理的日期问题并不全部都与时间上的某个完整时刻有关，因此您可以处理一个局部时刻。例如，有时您比较关心年/月/日，或者一天中的时间，甚至是一周中的某天。Joda 设计者使用 <code>ReadablePartial</code> 接口捕捉这种表示局部时间的概念，这是一个不可变的局部时间片段。用于处理这种时间片段的两个有用类分别为 <code>LocalDate</code> 和 <code>LocalTime</code>：</p>
			<ul><li><b><code>LocalDate</code></b>：该类封装了一个年/月/日的组合。当地理位置（即时区）变得不重要时，使用它存储日期将非常方便。例如，某个特定对象的<i>出生日期</i> 可能为 <i>1999 年 4 月 16 日</i>，但是从技术角度来看，在保存所有业务值的同时不会了解有关此日期的任何其他信息（比如这是一周中的星期几，或者这个人出生地所在的时区）。在这种情况下，应当使用 <code>LocalDate</code>。

<p>样例应用程序使用 <code>SystemClock</code> 来获取被初始化为系统时间的 <code>LocalDate</code> 的实例： </p>
					<table border="0" cellpadding="0" cellspacing="0" width="100%"><tbody><tr><td class="code-outline"><pre class="displaycode">LocalDate localDate = SystemFactory.getClock().getLocalDate();<br /></pre></td></tr></tbody></table><br />
					<p>也可以通过显式地提供所含的每个字段的值来创建 <code>LocalDate</code>：</p>
					<table border="0" cellpadding="0" cellspacing="0" width="100%"><tbody><tr><td class="code-outline"><pre class="displaycode">LocalDate localDate = new LocalDate(2009, 9, 6);// September 6, 2009<br /></pre></td></tr></tbody></table><br />
					<p><code>LocalDate</code> 替代了在早期 Joda 版本中使用的 <code>YearMonthDay</code>。</p>
				</li><li><b><code>LocalTime</code></b>：
这个类封装一天中的某个时间，当地理位置不重要的情况下，可以使用这个类来只存储一天当中的某个时间。例如，晚上 11:52
可能是一天当中的一个重要时刻（比如，一个 cron
任务将启动，它将备份文件系统的某个部分），但是这个时间并没有特定于某一天，因此我不需要了解有关这一时刻的其他信息。 <p>样例应用程序使用 <code>SystemClock</code> 获取被初始化为系统时间的 <code>LocalTime</code> 的一个实例：</p>
					<table border="0" cellpadding="0" cellspacing="0" width="100%"><tbody><tr><td class="code-outline"><pre class="displaycode">LocalTime localTime = SystemFactory.getClock().getLocalTime();<br /></pre></td></tr></tbody></table><br />
					<p>也可以通过显式地提供所含的每个字段的值来创建 <code>LocalTime</code>：</p>
					<table border="0" cellpadding="0" cellspacing="0" width="100%"><tbody><tr><td class="code-outline"><pre class="displaycode">LocalTime localTime = new LocalTime(13, 30, 26, 0);// 1:30:26PM<br /></pre></td></tr></tbody></table><br />
				</li></ul>
			<p><a href="" name="N10375"><span class="smalltitle">时间跨度</span></a></p>
			<p>了解特定的时刻或是某个局部时间片段将非常有用，但是如果能够表达一段时间跨度的话，通常也很有用。Joda 提供了三个类来简化这个过程。您可以选择用于表示不同跨度的类：</p>
			<ul><li><b><code>Duration</code></b>：这个类表示一个绝对的精确跨度，使用毫秒为单位。这个类提供的方法可以用于通过标准的数学转换（比如 1 分钟 = 60 秒，1 天 = 24 小时），将时间跨度转换为标准单位（比如秒、分和小时）。

<p>您只在以下情况使用 <code>Duration</code> 的实例：您希望转换一个时间跨度，但是您并不关心这个时间跨度在何时发生，或者使用毫秒处理时间跨度比较方便。</p>
				</li><li><b><code>Period</code></b>：这个类表示与 <code>Duration</code> 相同的概念，但是以人们比较熟悉的单位表示，比如年、月、周。 

<p>您可以在以下情况使用 <code>Period</code>：您并不关心这段时期必须在何时发生，或者您更关心检索单个字段的能力，这些字段描述由 <code>Period</code> 封装的时间跨度。  </p>
				</li><li><b><code>Interval</code></b>：这个类表示一个特定的时间跨度，将使用一个明确的时刻界定这段时间跨度的范围。<code>Interval</code> 为<i>半开</i> 区间，这表示由 <code>Interval</code> 封装的时间跨度包括这段时间的起始时刻，但是不包含结束时刻。 

<p>可以在以下情况使用 <code>Interval</code>：需要表示在时间连续区间中以特定的点开始和结束的一段时间跨度。  </p>
				</li></ul>
			<br /><table border="0" cellpadding="0" cellspacing="0" width="100%"><tbody><tr><td><img src="http://www.ibm.com/i/v14/rules/blue_rule.gif" alt="" height="1" width="100%" /><br /><img alt="" src="http://www.ibm.com/i/c.gif" border="0" height="6" width="8" /></td></tr></tbody></table><table class="no-print" align="right" cellpadding="0" cellspacing="0"><tbody><tr align="right"><td><img src="http://www.ibm.com/i/c.gif" alt="" height="4" width="100%" /><br /><table border="0" cellpadding="0" cellspacing="0"><tbody><tr><td valign="middle"><img src="http://www.ibm.com/i/v14/icons/u_bold.gif" alt="" border="0" height="16" width="16" /><br /></td><td align="right" valign="top"><a href="http://www.ibm.com/developerworks/cn/java/j-jodatime.html#main" class="fbox"><b>回页首</b></a></td></tr></tbody></table></td></tr></tbody></table><br /><br /><p><a href="" name="N103BE"><span class="atitle">以 Joda 的方式处理时间</span></a></p>
			<p>现在，您已经了解了如何创建一些非常有用的 Joda 类，我将向您展示如何使用它们执行日期计算。接着您将了解到 Joda 如何轻松地与 JDK 进行互操作。</p>
			<p><a href="" name="N103C7"><span class="smalltitle">日期计算</span></a></p>
			<p>如果您只是需要对日期/时间信息使用占位符，那么 JDK 完全可以胜任，但是它在日期/时间计算方面的表现十分糟糕，而这正是 Joda 的长处。我将向您展示一些简单的例子。 </p>
			<p>假设在当前的系统日期下，我希望计算上一个月的最后一天。对于这个例子，我并不关心一天中的时间，因为我只需要获得年/月/日，如清单 6 所示： </p>
			<br /><a href="" name="listing6"><b>清单 6. 使用 Joda 计算日期</b></a><br /><table border="0" cellpadding="0" cellspacing="0" width="100%"><tbody><tr><td class="code-outline"><pre class="displaycode">				<br />LocalDate now = SystemFactory.getClock().getLocalDate();<br />LocalDate lastDayOfPreviousMonth =\<br />  now.minusMonths(1).dayOfMonth().withMaximumValue(); <br /></pre></td></tr></tbody></table><br />
			<p>您可能对清单 6 中的 <code>dayOfMonth()</code> 调用感兴趣。这在 Joda 中被称为<i>属性（property）</i>。它相当于 Java 对象的属性。属性是根据所表示的常见结构命名的，并且它被用于访问这个结构，用于完成计算目的。属性是实现 Joda 计算威力的关键。您目前所见到的所有 4 个 Joda 类都具有这样的属性。一些例子包括： </p>
			<ul><li><code>yearOfCentury</code></li><li><code>dayOfYear</code></li><li><code>monthOfYear</code></li><li><code>dayOfMonth</code></li><li><code>dayOfWeek</code></li></ul>
			<p>我将详细介绍清单 6 中的示例，以向您展示整个计算过程。首先，我从当前月份减去一个月，得到 "上一个月"。接着，我要求获得 <code>dayOfMonth</code> 的最大值，它使我得到这个月的最后一天。注意，这些调用被连接到一起（注意 Joda <code>ReadableInstant</code> 子类是不可变的），这样您只需要捕捉调用链中最后一个方法的结果，从而获得整个计算的结果。 </p>
			<p>当计算的中间结果对我不重要时，我经常会使用这种计算模式。（我以相同的方式使用 JDK 的 <code>BigDecimal</code>）。假设您希望获得任何一年中的第 11 月的第一个星期二的日期，而这天必须是在这个月的第一个星期一之后。清单 7 展示了如何完成这个计算： </p>
			<br /><a href="" name="listing7"><b>清单 7. 计算 11 月中第一个星期一之后的第一个星期二</b></a><br /><table border="0" cellpadding="0" cellspacing="0" width="100%"><tbody><tr><td class="code-outline"><pre class="displaycode">				<br />LocalDate now = SystemFactory.getClock().getLocalDate();<br />LocalDate electionDate = now.monthOfYear()<br /> .setCopy(11)        // November<br /> .dayOfMonth()       // Access Day Of Month Property<br /> .withMinimumValue() // Get its minimum value<br /> .plusDays(6)        // Add 6 days<br /> .dayOfWeek()        // Access Day Of Week Property<br /> .setCopy("Monday")  // Set to Monday (it will round down)<br /> .plusDays(1);       // Gives us Tuesday<br /></pre></td></tr></tbody></table><br />
			<p>清单 7 的注释帮助您了解代码如何获得结果。<code>.setCopy("Monday")</code> 是整个计算的关键。不管中间 <code>LocalDate</code> 值是多少，将其 <code>dayOfWeek</code> 属性设置为 Monday 总是能够四舍五入，这样的话，在每月的开始再加上 6 天就能够让您得到第一个星期一。再加上一天就得到第一个星期二。Joda 使得执行此类计算变得非常容易。 </p>
			<p>下面是其他一些因为使用 Joda 而变得超级简单的计算： </p>
			<p>以下代码计算从现在开始经过两个星期之后的日期： </p>
			<table border="0" cellpadding="0" cellspacing="0" width="100%"><tbody><tr><td class="code-outline"><pre class="displaycode">DateTime now = SystemFactory.getClock().getDateTime();<br />DateTime then = now.plusWeeks(2);<br /></pre></td></tr></tbody></table><br />
			<p>您可以以这种方式计算从明天起 90 天以后的日期：</p>
			<table border="0" cellpadding="0" cellspacing="0" width="100%"><tbody><tr><td class="code-outline"><pre class="displaycode">DateTime now = SystemFactory.getClock().getDateTime();<br />DateTime tomorrow = now.plusDays(1);<br />DateTime then = tomorrow.plusDays(90);<br /></pre></td></tr></tbody></table><br />
			<p>（是的，我也可以向 <code>now</code> 加 91 天，那又如何呢？）</p>
			<p>下面是计算从现在起 156 秒之后的时间：</p>
			<table border="0" cellpadding="0" cellspacing="0" width="100%"><tbody><tr><td class="code-outline"><pre class="displaycode">DateTime now = SystemFactory.getClock().getDateTime();<br />DateTime then = now.plusSeconds(156);<br /></pre></td></tr></tbody></table><br />
			<p>下面的代码将计算五年后的第二个月的最后一天：</p>
			<table border="0" cellpadding="0" cellspacing="0" width="100%"><tbody><tr><td class="code-outline"><pre class="displaycode">DateTime now = SystemFactory.getClock().getDateTime();<br />DateTime then = now.minusYears(5) // five years ago<br />               .monthOfYear()     // get monthOfYear property<br />               .setCopy(2)        // set it to February<br />               .dayOfMonth()      // get dayOfMonth property<br />               .withMaximumValue();// the last day of the month<br /></pre></td></tr></tbody></table><br />
			<p>这样的例子实在太多了，我向您已经知道了如何计算。尝试操作一下样例应用程序，亲自体验一下使用 Joda 计算任何日期是多么有趣。</p>
			<p><a href="" name="N10455"><span class="smalltitle">JDK 互操作性</span></a></p>
			<p>我的许多代码都使用了 JDK <code>Date</code> 和 <code>Calendar</code> 类。但是幸亏有 Joda，我可以执行任何必要的日期算法，然后再转换回 JDK 类。这将两者的优点集中到一起。您在本文中看到的所有 Joda 类都可以从 JDK <code>Calendar</code> 或 <code>Date</code> 创建，正如您在 <a href="http://www.ibm.com/developerworks/cn/java/j-jodatime.html#jto">创建 Joda-Time 对象</a> 中看到的那样。出于同样的原因，可以从您所见过的任何 Joda 类创建 JDK <code>Calendar</code> 或 <code>Date</code>。</p>
			<p>清单 8 展示了从 Joda <code>ReadableInstant</code> 子类转换为 JDK 类有多么简单： </p>
			<br /><a href="" name="listing8"><b>清单 8. 从 Joda <code>DateTime</code> 类创建 JDK 类</b></a><br /><table border="0" cellpadding="0" cellspacing="0" width="100%"><tbody><tr><td class="code-outline"><pre class="displaycode">				<br />DateTime dateTime = SystemFactory.getClock().getDateTime();<br />Calendar calendar = dateTime.toCalendar(Locale.getDefault());<br />Date date = dateTime.toDate();<br />DateMidnight dateMidnight = SystemFactory.getClock()<br />  .getDateMidnight();<br />date = dateMidnight.toDate();<br /></pre></td></tr></tbody></table><br />
			<p>对于 <code>ReadablePartial</code> 子类，您还需要经过额外一步，如清单 9 所示： </p>
			<br /><a href="" name="listing9"><b>清单 9. 创建表示 <code>LocalDate</code> 的 <code>Date</code> 对象</b></a><br /><table border="0" cellpadding="0" cellspacing="0" width="100%"><tbody><tr><td class="code-outline"><pre class="displaycode">				<br />LocalDate localDate = SystemFactory.getClock().getLocalDate();<br />Date date = localDate.toDateMidnight().toDate();<br /></pre></td></tr></tbody></table><br />
			<p>要创建 <code>Date</code> 对象，它表示从清单 9 所示的 <code>SystemClock</code> 中获得的 <code>LocalDate</code>，您必须首先将它转换为一个 <code>DateMidnight</code> 对象，然后只需要将 <code>DateMidnight</code> 对象作为 <code>Date</code>。（当然，产生的 <code>Date</code> 对象将把它自己的时间部分设置为午夜时刻）。 </p>
			<p>JDK 互操作性被内置到 Joda API 中，因此您无需全部替换自己的接口，如果它们被绑定到 JDK 的话。比如，您可以使用 Joda 完成复杂的部分，然后使用 JDK 处理接口。</p>
			<br /><table border="0" cellpadding="0" cellspacing="0" width="100%"><tbody><tr><td><img src="http://www.ibm.com/i/v14/rules/blue_rule.gif" alt="" height="1" width="100%" /><br /><img alt="" src="http://www.ibm.com/i/c.gif" border="0" height="6" width="8" /></td></tr></tbody></table><table class="no-print" align="right" cellpadding="0" cellspacing="0"><tbody><tr align="right"><td><img src="http://www.ibm.com/i/c.gif" alt="" height="4" width="100%" /><br /><table border="0" cellpadding="0" cellspacing="0"><tbody><tr><td valign="middle"><img src="http://www.ibm.com/i/v14/icons/u_bold.gif" alt="" border="0" height="16" width="16" /><br /></td><td align="right" valign="top"><a href="http://www.ibm.com/developerworks/cn/java/j-jodatime.html#main" class="fbox"><b>回页首</b></a></td></tr></tbody></table></td></tr></tbody></table><br /><br /><p><a href="" name="N104C8"><span class="atitle">以 Joda 方式格式化时间</span></a></p>
			<p>使用 JDK 格式化日期以实现打印是完全可以的，但是我始终认为它应该更简单一些。这是 Joda 设计者进行了改进的另一个特性。要格式化一个 Joda 对象，调用它的 <code>toString()</code> 方法，并且如果您愿意的话，传递一个标准的 ISO-8601 或一个 JDK 兼容的控制字符串，以告诉 JDK 如何执行格式化。不需要创建单独的 <code>SimpleDateFormat</code> 对象（但是 Joda 的确为那些喜欢自找麻烦的人提供了一个 <code>DateTimeFormatter</code> 类）。调用 Joda 对象的 <code>toString()</code> 方法，仅此而已。我将展示一些例子。 </p>
			<p>清单 10 使用了 <code>ISODateTimeFormat</code> 的静态方法：</p>
			<br /><a href="" name="listing10"><b>清单 10. 使用 ISO-8601</b></a><br /><table border="0" cellpadding="0" cellspacing="0" width="100%"><tbody><tr><td class="code-outline"><pre class="displaycode">				<br />DateTime dateTime = SystemFactory.getClock().getDateTime();<br />dateTime.toString(ISODateTimeFormat.basicDateTime());<br />dateTime.toString(ISODateTimeFormat.basicDateTimeNoMillis());<br />dateTime.toString(ISODateTimeFormat.basicOrdinalDateTime());<br />dateTime.toString(ISODateTimeFormat.basicWeekDateTime());<br /></pre></td></tr></tbody></table><br />
			<p>清单 10 中的四个 <code>toString()</code> 调用分别创建了以下内容：</p>
			<table border="0" cellpadding="0" cellspacing="0" width="100%"><tbody><tr><td class="code-outline"><pre class="displaycode">20090906T080000.000-0500<br />20090906T080000-0500<br />2009249T080000.000-0500<br />2009W367T080000.000-0500<br /></pre></td></tr></tbody></table><br />
			<p>您也可以传递与 <code>SimpleDateFormat</code> JDK 兼容的格式字符串，如清单 11 所示： </p>
			<br /><a href="" name="listing11"><b>清单 11. 传递 <code>SimpleDateFormat</code> 字符串</b></a><br /><table border="0" cellpadding="0" cellspacing="0" width="100%"><tbody><tr><td class="code-outline"><pre class="displaycode">				<br />DateTime dateTime = SystemFactory.getClock().getDateTime();<br />dateTime.toString("MM/dd/yyyy hh:mm:ss.SSSa");<br />dateTime.toString("dd-MM-yyyy HH:mm:ss");<br />dateTime.toString("EEEE dd MMMM, yyyy HH:mm:ssa");<br />dateTime.toString("MM/dd/yyyy HH:mm ZZZZ");<br />dateTime.toString("MM/dd/yyyy HH:mm Z");<br /><br />09/06/2009 02:30:00.000PM<br />06-Sep-2009 14:30:00<br />Sunday 06 September, 2009 14:30:00PM<br />09/06/2009 14:30 America/Chicago<br />09/06/2009 14:30 -0500<br /></pre></td></tr></tbody></table><br />
			<p>查看 Javadoc 中有关 <code>joda.time.format.DateTimeFormat</code> 的内容，获得与 JDK <code>SimpleDateFormat</code> 兼容的格式字符串的更多信息，并且可以将其传递给 Joda 对象的 <code>toString()</code> 方法。 </p>
			<br /><table border="0" cellpadding="0" cellspacing="0" width="100%"><tbody><tr><td><img src="http://www.ibm.com/i/v14/rules/blue_rule.gif" alt="" height="1" width="100%" /><br /><img alt="" src="http://www.ibm.com/i/c.gif" border="0" height="6" width="8" /></td></tr></tbody></table><table class="no-print" align="right" cellpadding="0" cellspacing="0"><tbody><tr align="right"><td><img src="http://www.ibm.com/i/c.gif" alt="" height="4" width="100%" /><br /><table border="0" cellpadding="0" cellspacing="0"><tbody><tr><td valign="middle"><img src="http://www.ibm.com/i/v14/icons/u_bold.gif" alt="" border="0" height="16" width="16" /><br /></td><td align="right" valign="top"><a href="http://www.ibm.com/developerworks/cn/java/j-jodatime.html#main" class="fbox"><b>回页首</b></a></td></tr></tbody></table></td></tr></tbody></table><br /><br /><p><a href="" name="N1051F"><span class="atitle">结束语</span></a></p>
			<p>谈
到日期处理，Joda 是一种令人惊奇的高效工具。无论您是计算日期、打印日期，或是解析日期，Joda
都将是工具箱中的便捷工具。在本文中，我首先介绍了 Joda，它可以作为 JDK 日期/时间库的替代选择。然后介绍了一些 Joda
概念，以及如何使用 Joda 执行日期计算和格式化。 </p>
			<p>Joda-Time
衍生了一些相关的项目，您可能会发现这些项目很有用。现在出现了一个针对 Grails Web 开发框架的 Joda-Time
插件。joda-time-jpox 项目的目标就是添加一些必需的映射，以使用 DataNucleus 持久化引擎持久化 Joda-Time
对象。并且，一个针对 Google Web Toolkit（也称为 Goda-Time）的 Joda-Time
实现目前正在开发当中，但是在撰写本文之际因为许可问题而被暂停。访问 <a href="http://www.ibm.com/developerworks/cn/java/j-jodatime.html#resources">参考资料</a> 获得更多信息。</p><br />]]>
        
    </content>
</entry>

<entry>
    <title>Eclipse BIRT</title>
    <link rel="alternate" type="text/html" href="http://server.everfine.com.tw/blog/archives/2009/12/eclipse-birt.html" />
    <id>tag:server.everfine.com.tw,2009:/blog//1.315</id>

    <published>2009-12-16T14:39:10Z</published>
    <updated>2009-12-16T14:45:15Z</updated>

    <summary>Eclipse BIRT Project BIRT 报表的自动化测试...</summary>
    <author>
        <name>philipz</name>
        <uri>http://server.everfine.com.tw/blog/</uri>
    </author>
    
    
    <content type="html" xml:lang="en" xml:base="http://server.everfine.com.tw/blog/">
        <![CDATA[<p><a href="http://eclipse.org/birt/phoenix/">Eclipse BIRT Project</a><br />
<a href="http://www.ibm.com/developerworks/cn/opensource/os-cn-ecl-birttest/">BIRT 报表的自动化测试</a></p>]]>
        
    </content>
</entry>

<entry>
    <title>JACOB</title>
    <link rel="alternate" type="text/html" href="http://server.everfine.com.tw/blog/archives/2009/12/jacob.html" />
    <id>tag:server.everfine.com.tw,2009:/blog//1.314</id>

    <published>2009-12-16T14:20:33Z</published>
    <updated>2009-12-16T14:33:49Z</updated>

    <summary>通过 JACOB 实现 Java 与 COM 组件的互操作 JACOB - Java COM Bridge...</summary>
    <author>
        <name>philipz</name>
        <uri>http://server.everfine.com.tw/blog/</uri>
    </author>
    
    
    <content type="html" xml:lang="en" xml:base="http://server.everfine.com.tw/blog/">
        <![CDATA[<p><a href="http://www.ibm.com/developerworks/cn/java/j-lo-jacob/">通过 JACOB 实现 Java 与 COM 组件的互操作</a><br />
<a href="http://sourceforge.net/projects/jacob-project/">JACOB - Java COM Bridge</a></p>

<p><br />
</p>]]>
        
    </content>
</entry>

<entry>
    <title>IBM Java tools</title>
    <link rel="alternate" type="text/html" href="http://server.everfine.com.tw/blog/archives/2009/12/ibm-java-tools.html" />
    <id>tag:server.everfine.com.tw,2009:/blog//1.313</id>

    <published>2009-12-03T15:02:25Z</published>
    <updated>2009-12-03T15:04:50Z</updated>

    <summary>IBM 的 Java 诊断系列 IBM developer kits...</summary>
    <author>
        <name>philipz</name>
        <uri>http://server.everfine.com.tw/blog/</uri>
    </author>
    
    
    <content type="html" xml:lang="en" xml:base="http://server.everfine.com.tw/blog/">
        <![CDATA[<p><a href="http://www.ibm.com/developerworks/cn/java/j-ibmtools/">IBM 的 Java 诊断系列</a><br />
<a href="http://www.ibm.com/developerworks/java/jdk/tools/index.html">IBM developer kits</a></p>]]>
        
    </content>
</entry>

<entry>
    <title>Eclipse Galileo 简介</title>
    <link rel="alternate" type="text/html" href="http://server.everfine.com.tw/blog/archives/2009/11/eclipse-galileo.html" />
    <id>tag:server.everfine.com.tw,2009:/blog//1.312</id>

    <published>2009-11-26T16:02:29Z</published>
    <updated>2009-11-26T16:06:02Z</updated>

    <summary>From: developerWorks 中国 Accessibility Tools Framework（ACTF） &quot;ACTF V0.7 支持以 Eclipse Galileo 作为可访问 Web 应用程序的第一开发环境，这不仅可用于法规遵从性（例如 U.S. Section 508），同样也可以照顾每个人的可用性。&quot;ACTF 项目主管 Chieko Asakawa...</summary>
    <author>
        <name>philipz</name>
        <uri>http://server.everfine.com.tw/blog/</uri>
    </author>
    
    
    <content type="html" xml:lang="en" xml:base="http://server.everfine.com.tw/blog/">
        <![CDATA[<p>From: <a href="http://www.ibm.com/developerworks/cn/opensource/os-eclipse-galileo/index.html">developerWorks 中国 </a><br /></p><p><a href="" name="3.The showcase|outline"><span class="atitle">
            </span></a></p>
			<p><a href="" name="N102DA"><span class="smalltitle">Accessibility Tools Framework（ACTF）</span></a></p>
			<p>"<a href="http://www.eclipse.org/actf/">ACTF</a> V0.7 支持以
                Eclipse Galileo 作为可访问 Web 应用程序的第一开发环境，这不仅可用于法规遵从性（例如 U.S. Section 508），同样也可以照顾每个人的可用性。"ACTF 项目主管 Chieko
                Asakawa 说道。</p>
			<p>"ACTF 以无缝的可访问性评价特性，例如自动错误检测、为语音访问用户提供可视化以及为低视力人士提供基于图像处理的视图模拟，扩展了 Web、J2EE 和 PHP 透视图。这些特性帮助开发人员快速识别、获悉和改进应用程序的可访问性。"Asakawa 说道。</p>
			<p>"这种集成只是第一步。我们的最终目的是让用 Eclipse IDE 生成或在 Eclipse IDE 上开发的任何工件都能为任何人所用。"</p>
			<p><a href="" name="N102ED"><span class="smalltitle">C/C++ Development Tooling（CDT）</span></a></p>
			<p>根据 <a href="http://www.eclipse.org/cdt/">CDT</a> 项目主管 Doug Schaefer 所说，Debug Services Framework 已经完成了朝向 CDT 的转移，现在成为 CDT 的一个新组件。它包括新的启发式应用，以帮助索引器发现项目中的头文件，并增加了对隐式引用和重载操作符的索引支持。</p>
			<p>改进的 Convert to C/C++ Project 成为一种项目类型 -- 例如 Makefiles。CDT 的更新有了新的 Launch Group 
                配置，可用于一次开始多个会话。Schaefer 指出，CDT 现在包含用于嵌入式开发的新特性、基于 RSE 的远程启动、GCC 跨编译器构建支持以及安装用于 C/C++ SDK 的 tar 文件的 p2 支持。</p>
			<p><a href="" name="N102FF"><span class="smalltitle">Data Tools Platform（DTP）</span></a></p>
			<p>"在我们的 Galileo（V1.7）中，<a href="http://www.eclipse.org/datatools/">DTP</a>
主要致力于两个方面，"项目主管 Brian Fitzpatrick 说道，"一个方面是增加和增强一些可视化工具，例如 SQL Query
Builder（SQB）。我们做了一些简单的可用性增强，使之更易于使用。我们还为 Schema Object
编辑器增加了一个新的框架，希望将来的发行版广泛采纳该框架。为此，我们提供了一些示范性的用于 Sybase ASA 的 Schema
Object 编辑器，其他供应商和社区成员有望看到一个用于创建和修改表、索引、存储过程等等的编辑器框架所带来的好处。"Fitzpatrick
说道。</p>
			<p>"我们加强的另一个方面是 Connectivity API。实际上，我们现在提供了一些机制，以便简化纯 API
连接或其他连接类型的创建和使用。对于一些主要的适配器，例如 BIRT，这十分重要，这些适配器在幕后将 DTP
功能用于报告生成，因此需要这些机制避免用户离开他们的环境来创建和管理连接。现在，他们可以通过可控制的属性，使用 API 生成连接、使用 SQB
等等。"Fitzpatrick 说道。</p>
			<p>"总而言之，我认为我们增加了组件和 API 的稳定性，同时为采纳者和扩展者提供更多的功能，从 2006 年 DTP 出现以来，我们一直都这么做，"他说道。</p>
			<p><a href="" name="N10312"><span class="smalltitle">Eclipse Modeling Framework（EMF）</span></a></p>
			<p>Modeling 项目由很多子项目组成。<a href="http://www.eclipse.org/modeling/emf/">EMF</a> 本身包含一个 Core 组件，还有 Teneo 和 CDO 等组件。</p>
			<p>项
目主管 Ed Merks 说："在整个建模领域，最令人感兴趣、最值得期待的三个技术性增强出自 Xtext、CDO Model
Repository 和 Teneo；Xtext 是 Textual Modeling Framework（TMF）项目的一个子项目，也是
Galileo 的一个新项目；CDO Model Repository 是 EMF
项目的子项目，它已经有了巨大的改进，自上一个发行版出现以来，已经引起了很多人的兴趣；Teneo 现在提供与 EclipseLink 的集成。"</p>
			<p>"我
们还将发布 Acceleo，这是一种新的 OMG 标准模板语言，是 Model to Text（M2T）项目的一部分。GMF
继续作出技术性增强，"Merks 说，"就我直接领导的子项目 EMF Core 而言，由我们最新的提交者 Tom Schindl
带头的数据绑定改进支持绝对值得一提。同样值得注意的是 EObject 的减少内存占用的实现，一些客户机使用它减少了超过 60% 的内存占用。"</p>
			<p><b>Connected Data Objects （CDO）</b></p>
			<p>Connected Data Objects（CDO）项目主管 Elke Stepper 将 CDO 描述为用于分布式共享 EMF 模型的一个框架，注重可伸缩性、事务性和持久性。</p>
			<p>"自
上一个发行版出现以来，CDO Model Repository 便引起了很多人的兴趣，并吸引了一些较大的采纳者，包括 NASA 和
Canadian Space Agency and Department of Defense。这个团队已经成长为有 8 名提交者，实现了
130 个增强。其中包括分布式事务、悲观锁和保存点以及用于 EMF
资源的一个可视化文件系统，并且有导入/导出向导、修改提交策略、异步查询框架和储存库中的安全性钩子。凭借局部集合装载、模型使用分析和适应性预取
（adaptive prefetching）等特性，这些功能得到进一步的加强。"Stepper 说。</p>
			<p><b>Eclipse-Databinding</b></p>
			<p>"Eclipse
通过 Galileo 引入所谓的
Properties-API，它为采纳者提供很多新特性，例如对用于域对象和小部件（包括表和树）的嵌套属性的支持。"项目主管 Tom
Schindl
说，"此外还包括将可观察到的创建与定义（其属性被监视）解耦、改进的表/树支持、更简单的设置，以及在一个小部件中使用不同的对象类型，并简化了定制的
可观察对象的创建。"</p>
			<p>EMF V2.5 为选择 Ecore 作为域模型技术的 Eclipse 数据绑定采纳者以及周边生态系统（包括 CDO、Teneo 和 EMF-Edit）提供一流的支持，Schindl 说。</p>
			<p><b>EMF Compare</b></p>
			<p>"在 Galileo 中，EMF Compare 达到了 V1.0，可以在协作环境中分离和合并模型。它与 Eclipse
            Team API 紧密集成，并且可以很好地与 CVS、SVN 或 GIT 团队提供者协作。"项目主管 Cedric
            Brun 说道。</p>
			<p>"由于 Acceleo 项目的缘故，'Model To Text' 项目也提供很好的组件，"Brun 说，"这样便提供了一个 MTL（MOF Template
            Language）实现。现在可以不再担心所有的代码生成模板，并且可以编写标准的模板。而且，该工具提供了代码完成、调试功能和生成预览，从而便于利用模型生成代码。"他说。</p>
			<p>"在 '模型到模型转换' 领域，"Brun 说，"ATL 工具已经改进了很多，提供了更好的用户界面和调试辅助。"</p>
			<p><b>Teneo</b></p>
			<p>"在
Galileo V3.5 中，Teneo 增加了一个由两部分组成的 EMF-EclipseLink 集成：一是基于 ecore 模型的标准
JPA orm XML 文件的生成，二是用于将标准 EMF 概念与 EclipseLink 集成的一个运行时层，"项目主管 Martin
Taal 说，"此外，Galileo V3.5 中增加了对特定于 Hibernate 的持久性注释的支持和对标准 JPA 注释的完全支持。"</p>
			<p><b>Xtext</b></p>
			<p>"Xtext
是一个面向领域特定语言（DSL）的开发框架，"Xtext 项目主管 Sven Efftinge 说，"只需使用 Xtext 的简单 EBNF
语法描述 DSL，生成器就将创建一个解析器、一个 AST 元模型（使用 EMF 实现）以及一个功能丰富的 Eclipse 文本编辑器。"</p>
			<p>"该框架与 Eclipse Modeling 中的技术（例如
                EMF、GMF、M2T 和 EMFT 的一部分）集成。使用 Xtext 的开发经过了优化，从而可以缩短周转期，因此将新特性添加到已有 DSL 中只需要几分钟的时间。甚至可以实现更高级的编程语言。"Efftinge 说道。</p>
			<p><a href="" name="N10357"><span class="smalltitle">Eclipse Packaging Project</span></a></p>
			<p>"大多数人都不知道，正是 Eclipse Packaging Project
                <a href="http://www.eclipse.org/epp/">（EPP）</a>
创建了每天由数千名用户从 Eclipse 下载页面下载的所有那些包，"项目主管 Markus Knauer 说，"在 Galileo
中，我们提供了所有包的更新版本，并且还提供了两个新的、非常令人兴奋的包，很多开发人员都对这两个包感兴趣：一个是新的 Pulsar
包，可用于开发我们每天都在使用的移动设备（例如移动电话）的应用程序；另一个新包是为 PHP
开发人员创建的，我可以肯定，它将成为下载次数最多的包之一。"他说道。</p>
			<p>"但是，今年最主要的变化是使用了全新的构建基础设施。我们现在都是借助 p2 技术构建所有的包。这不仅使得这些包完全遵从 p2，而且让我们有更大的灵活性来定制这些包。"</p>
			<p><a href="" name="N10367"><span class="smalltitle">Eclipse Platform</span></a></p>
			<p>"对
于我来说，Eclipse Galileo 中最令人激动的事情是将 SWT 移植到 Mac Cocoa，"项目主管 Steve
Northover 说，"Cocoa 可以创建未来的 Macintosh 用户界面，Eclipse 将出现在其中。这种移植在社区（包括
Adobe 和 IBM®）的帮助下很快会聚集起来。" Northover 说道。</p>
			<p><a href="" name="N10372"><span class="smalltitle">Equinox</span></a></p>
			<p>"Galileo 中的 <a href="http://www.eclipse.org/equinox/">Equinox</a>
令我们非常兴奋，"项目主管 Jeff McAffer 说，"我们实现了最新的 OSGi
规范，包括很多增强，在更大范围的现实场景（分布式系统和企业系统）中增强 OSGi 的威力。Equinox OSGi Declaratives
Services 实现已经被更新至最新的规范，并且由 PDE 定制而成，现在被包含在标准 Eclipse 下载中。"McAffer 说道。</p>
			<p>"我
们的提供（provisioning）平台 p2 在健壮性、性能和灵活性方面有了重大的提升。在使用 p2
交付高级软件解决方案方面，可以看到很大的进步。虽然从技术上讲，Equinox Aspects 项目不是 Galileo
的一部分，但是它在逐渐完善，并且被很多项目采纳，其中就包括 AOP 社区本身。更为普遍的是，EclipseRT（即 Eclipse
在运行时环境中的使用）正在崭露头角，在 Galileo 中有很多项目提供特定于运行时的功能。"McAffer 说道。</p>
			<p><a href="" name="N10382"><span class="smalltitle">Graphical Modeling Framework（GMF）</span></a></p>
			<p>"除
了对运行时组件做出的大量 bug 修复和性能提升外，这个发行版中的生成工具也有了显著的变化，"项目主管 Richard Gronback
说，"特别是，我们的 Xpand 代码生成器经过了重构，现在使用 Object Constraint Language（OCL）和 QVT
Operational Mapping Language（OML），而不是 Xtend 和 Xpand
中原有的底层表达语言。这样便改进了我们的模型-文本转换功能，并且将 QVT 作为映射与生成器模型之间的转换的一个选项，而之前这是在 Java
代码中完成的，"他说。</p>
			<p><a href="" name="N1038B"><span class="smalltitle">Java Workflow Tooling（JWT）</span></a></p>
			<p>"Java Workflow Tooling <a href="http://www.eclipse.org/jwt/">（JWT）</a>
                将开放的业务流程设计和开发带入 Eclipse
                平台，"项目主管 Florian Lautenbacher 说，"Business Process
                Management（BPM）处于业务、中间件和集成的交叉口，所以它不应该固定它所扮演的角色。这就是为什么使用 JWT 建模的流程可以符合分析师的想法，存放开发人员加入的任何实现信息，并被部署到选择的运行时平台上。</p>
			<p>"这
是完全可能的，因为有一个灵活的框架，社区和供应商可以在可扩展的视图、模型和转换的基础上进行构建。JWT 附带了一些内置的扩展，例如 UML
Activity Diagram 或 Event-driven Process Chains（EPC）视图、BPMN 互操作性、代码生成（例如
XPDL、AgilPro 中的 WSBPEL-代码，以及 HTML 文档）。实际上已经有一些集成 JWT 的解决方案，例如 OW2 联盟的以
SOA 为重心的 Scarbo 或 SourceForge 中的 AgilPro。"Lautenbacher 说道。</p>
			<p>对于 Galileo 而言，重点是增加与 Bonita 等常见业务流程运行时的兼容性，并且与 SOA Tools Platform（STP）项目（尤其是 BPMN、SCA 和 IM）协作，集成面向服务的特性，Lautenbacher 说道。</p>
			<p><a href="" name="N1039E"><span class="smalltitle">Java Development Tools（JDT）</span></a></p>
			<p>"编译器提供一些新的诊断（例如发现死锁），并且每个被报告的问题都附有相应的快速修复以消除问题，项目主管 Dani Megert 说道。</p>
			<p>"这个 Java 编辑器现在提供构造函数完成功能，并允许直接跳到一个方法的实现中。格式化程序现在可以保留已有的换行，最后，Java 比较编辑器提供了很多可在普通 Java 编辑器中找到的特性 -- 例如内容辅助。"Megert 说道。</p>
			<p><a href="" name="N103AC"><span class="smalltitle">Java Emitter Templates（M2T
                JET）</span></a></p>
			<p><a href="http://www.eclipse.org/modeling/m2t/">JET2</a> 是用于 Eclipse 环境的一个模板引擎。</p>
			<p>"在 Galileo 中，一个关键内容就是模板的可读性，"项目主管 Paul
                Elder 说，"基本上，模板就是静态文本与用于定制该文本的标记的混合物。有了好的模板，就可以很快知道文本结构以及标记如何影响文本结构。但是，如果添加太多的标记，模板会变得难以辨认。"</p>
			<p>"在
Galileo 中，JET2 引入了很多创新，降低了标记对文本的干扰，"Elder
说，"首先，标记现在更加紧凑。其次，引入了一些新的标记，这些标记简洁地描述常见的生成模式。我所喜欢的新的 c:deepIterate
就属于这种标记。通过它可以简洁地描述从嵌套或递归数据生成的文本。而在之前的发行版中，这需要两个模板，递归模板以及大量的标记 --
这显然不具有可读性。"</p>
			<p><a href="" name="N103C0"><span class="smalltitle">Memory Analyzer</span></a></p>
			<p>"Galileo 是第一个包含 <a href="http://www.eclipse.org/mat/">Memory Analyzer</a> 的同步发行版系列。"项目主管 Andreas Buchen 说。</p>
			<p>"感
觉太棒了！"Buchen 说，"我们增加了一些新特性。首先，我们增加了对来自 IBM 家族的 Virtual Machines
的堆转储（heap dump）的支持，包括 PHD 和系统转储。其他增强包括对发生转储时正在运行的线程的栈跟踪、用于查看 OSGi
运行时完整状态的 Equinox bundle 浏览器以及一些小修改，例如根据转储重新创建和显示 SWT 图标。"</p>
			<p><a href="" name="N103D0"><span class="smalltitle">Mobile Tools for Java（MTJ）</span></a></p>
			<p>"这是
                <a href="http://www.eclipse.org/dsdp/mtj/">MTJ</a> Project 第一次作为 Eclipse 的一部分发行，"项目主管 Christian Kurzke 说："在去年，我们将两个面向移动开发人员的 Eclipse 项目（EclipseME 和 MTJ）合并为一个联合开发：即 '新的' Eclipse
                MTJ。"</p>
			<p>"在 Galileo 中，我们还创建了一个 Pre-Integrated Eclipse
                下载包（即 Pulsar Package），目标直指 Mobile Application
                Developers。在 Galileo 中，MTJ Project 的版本达到了
                1.0。这个发行版的主要目的是定义一个 MTJ API。这个 API 让任何第三方工具开发人员都可以扩展
                MTJ，以支持他们自己的平台以及支持特定于 SDK 的特性。"</p>
			<p><a href="" name="N103E0"><span class="smalltitle">Mylyn</span></a></p>
			<p>"
                <a href="http://www.eclipse.org/mylyn/">Mylyn</a>
V3.2 中最令人兴奋的是用于发现和安装 Mylyn Connectors 的类似 App Store 的新 UI。在这个发行版中，Mylyn
支持 Eclipse 用户当中常见的大多数变更管理解决方案，并且只需通过几次点击就可以将这些集成安装到工作区。" Mylyn 项目主管兼
Tasktop Technologies CEO Mik Kersten 说道。</p>
			<p>"对于日常工作方面，我喜欢的改进是新的任务编辑器布局。在新的任务编辑器布局中，可以很快地浏览任务和对任务分类，其速度比起浏览电子邮件有过之而无不及。"Kersten 说道。</p>
			<p><a href="" name="N103F0"><span class="smalltitle">PHP Development Tools（PDT）</span></a></p>
			<p>"Eclipse PHP Development Tools
                <a href="http://www.eclipse.org/pdt/">（PDT）</a> 为开发 PHP 脚本提供基于 Eclipse 平台的开发环境。该项目包含开发 PHP 所需的开发组件，并具有可扩展性。现在，Eclipse PDT 已成为 PHP 开发的事实标准。"项目主管 Roy Ganor 说道。</p>
			<p>"遵从如今的 Web 标准的 Web 开发人员可能是 Eclipse PDT 最大的受众，"Ganor 说，"团队主管和产品经理也会发现，PDT 对于使用 Eclipse 和 PHP 原型化下一代产品十分有用。"</p>
			<p>"当遵从业界标准时，开源项目的威力便显露出来。这正是 Eclipse PDT 决定加入 Galileo
                发行版系列的原因，因为它提供一个公认的框架，承诺将质量和成熟性提高到一定的水平。此外，我们看到 Eclipse PDT 的普及度和知名度有了很大的不同。我迫不及待地想看到下一个发行版！"</p>
			<p>Eclipse
PDT 始于由 Zend Technologies 和 IBM 在大约 3 年前发起的一个计划。"我们预测 PHP 开发人员将从
Eclipse 及 Eclipse 生态系统中受益，尤其是当他们在团队中工作并且正在实践敏捷开发方法学时，更是如此。"Ganor 说道。</p>
			<p>关
于 PDT V2.1 有两点新的令人惊奇的重要声明，他说："第一，这是 Eclipse PHP 风格的首个发行版，Eclipse PHP
风格基于 Eclipse 平台和 Eclipse PDT 项目。如果之前下载过 Java 风格的 Eclipse 并添加了 PHP
功能，那么现在可以直接从 Eclipse 主下载站点下载一个 PHP 包。第二点是关于 PHP 5.3 的。经过数年的开发，PHP
团队将发布下一代的 PHP 引擎，其中包含很多新的语言特性，例如名称空间和闭包。 好消息是，Eclipse PDT
支持这些新特性。这表明这两个社区之间的亲密关系。"他说道。</p>
			<p>"Eclipse PDT 团队应该一如既往地追求更好的质量，并且支持标准。"Ganor 说，"因此，我们在接下来的维护版本中将注重稳定性和可用性。我们还计划为世界各地的 PHP 框架团队开放越来越多的扩展，从而可以使
                PDT 成为他们的开发人员的目标环境。"</p>
			<p><a href="" name="N1040C"><span class="smalltitle">Rich Ajax Platform（RAP）</span></a></p>
			<p>
				<a href="http://www.eclipse.org/rap/">RAP</a>
V1.2 使得使用 RCP 和 RAP 同源（single-source）桌面和 Web 应用程序变得更容易。"我们着重在 RAP
中提供流行的 API，并与其他一些 Eclipse 项目协作，开始代码同源化。"项目主管 Jochen Krause 说，"例如，对于
Eclipse 内存分析器，RCP 与 RAP 之间的代码重用率达到 98.4%。通过一些关于如何组织同源化项目的 Webcast
和指南，可以知道如何有效地将 Web UI 添加到 RCP 应用程序。</p>
			<p>"新的 Web 感观（开箱即用式）和新的实用特性使 RAP 应用程序对终端用户更具吸引力。客户端和服务器端的性能提升有助于提高 RAP 应用程序的速度，并且可以伸缩至每个服务器中的数百个用户。"</p>
			<p><a href="" name="N1041C"><span class="smalltitle">SCA Tools</span></a></p>
			<p>"自 2008 Ganymede 发行版以来，<a href="http://www.eclipse.org/stp/sca/">SCA Tools</a>
项目已经有了很多新的开发。"项目主管 Stephane Drapeau 说，"我们增加了一个 XML 编辑器，使编辑和更新 SCA
标准装配（assembly）文件变得非常容易。对于 Java 开发人员来说，现在可以创建一个 SCA 装配定义，然后从它生成 Java
代码。而且，如果要从已有的 Java 代码开始，我们增加了一个专门的内省器（introspector），它将调查代码，并自动产生 SCA
装配。创建 Java SCA 项目后，便可以使用 Eclipse 提供的强大工具运行和调试它。我们还确保您创建的 SCA
工件经过适当的验证，帮助您尽早发现错误。我们甚至还花时间更新了图形，使我们有一个更美观的 SCA Composite
Designer。"Drapeau 说道。</p>
			<p>"对
于我来说，最令人兴奋的是我们为核心 SCA 模型增加了可扩展性，便于将额外的功能编写到这些工具中。该模型的核心包含 SCA
标准说明，并且创建了一些不同的扩展，以支持关键的 Open Source SCA 运行时 -- Apache Tuscany V1.4 和
Frascati V0.5。通过使用这些扩展机制，将新概念添加到 SCA 中以及扩展这些工具就变得更加容易。"Drapeau 说道。</p>
			<p><a href="" name="N1042E"><span class="smalltitle">SOA Tools</span></a></p>
			<p>"Galileo 见证了
                <a href="http://www.eclipse.org/stp/">SOA Tools</a> Project 的成熟 -- 
                BPMN Modeler 和 SCA Tools 等子项目现在具有非常高的品质，并为 SOA 开发人员所使用的工具做出重大贡献。"项目主管 Oisin Hurley 说道。</p>
			<p>"SCA
Tools 子项目在去年有了较大的进展，完成了到 2.0 的重大版本更新。Policy Editor 的扩展现在意味着，要生成
WS-Policy 文档的开发人员可以选择以一种可定制的方式创建起点声明，然后，这些声明可以被动态地转换，以便进行验证。我们的 SOA
Model 继续发展，并有了新的从标准模型到 SCA 的转换。将来也有一些令人兴奋的事 -- 我们正在寻求扩充 SOA Tools
Project，引入一些新的子项目。"Hurley 说道。</p>
			<p><a href="" name="N10442"><span class="smalltitle">Swordfish</span></a></p>
			<p>"<a href="http://www.eclipse.org/swordfish/">Swordfish</a> 随 Galileo 一起迎来它今年的首次亮相，所以我们对此感到非常兴奋！"项目主管 Oliver Wolf 说道。</p>
			<p>"Swordfish
项目的目标是提供可扩展的 SOA 框架，该框架基于已证明的 Eclipse Equinox 运行时技术。"Wold
说，"该框架有一些附加的开源组件作为补充，例如服务注册中心、消息传递系统、流程引擎等，从而形成一个综合性开源 SOA
运行时环境，该环境同时基于既有的和新兴的开放标准。我们在 Galileo 中交付 0.9.0 发行版，其中包括一些工具，以方便用代码优先或
WSDL 优先的方法创建服务。"</p>
			<p><a href="" name="N10452"><span class="smalltitle">Target Management</span></a></p>
			<p>"我个人对于两项功能感到很兴奋，一是比较/同步本地和远程文件系统，二是使用到同一个主机的多个不同的连接。这两项功能都是我们社区期待已久的。"项目主管 Martin Oberhuber 说。</p>
			<p>不
过，新的 "Show in Remote Systems View" 动作也很方便，即使只在本地系统上使用也不错 -- 因为通过 RSE
可以方便地浏览 TAR、TGZ、ZIP 和 JAR 归档文件。"Oberhuber
说，"需要启动远程系统上的程序的人将会喜欢在启动时执行任意远程命令的功能。现在已经为 CDT 程序实现了这项功能，当设置了一个 dummy
CDT 项目时，这项功能还可以用于任何类型的远程应用程序。"他说道。</p>
			<p><a href="" name="N10460"><span class="smalltitle">Test and Performance Tools Platform
                Project（TPTP）</span></a></p>
			<p>Galileo 中的 Eclipse Test and Performance Tools Platform
                （<a href="http://www.eclipse.org/tptp/">TPTP</a> V 4.6）着重作了优化，提高了稳定性，并改进了 Ganymede 的文档编制，项目主管
                Oliver Cole 说。</p>
			<p>"对
于 Galileo, 以及将来的 Helios，"Cole 说，"TPTP
的目标是零缺陷。虽然听起来有些乏味，但这实际上是一个有趣的实验。一个零缺陷的平台（例如
TPTP）意味着什么？无论是对于社区中的终端用户，还是对于消费产品，一个零缺陷的平台是值得依靠的。它的价值比包含 bug
的平台要高得多。那么，以前是否有过零缺陷的软件？"</p>
			<p>"零 bug 意味着一切都按 '伟大' 产品的标准来完成。例如，文本编制不够精细，工作流较为粗糙，外观有些瑕疵，这些 bug 都要修复。TPTP 中的大量代码所固有的价值得以体现，因为它是有效的。"</p>
			<p>特别是，有一项被称作 Profiler of the Gods（POG）的工作致力于修复所有的概要分析器 bug，让社区有一个世界一流的 Java 概要分析器，他说道。</p>
			<p><a href="" name="N10476"><span class="smalltitle">Tools for mobile Linux</span></a></p>
			<p>"对于寻求将他们的创新引入生活的开发人员来说，这是一个令人激动的时刻，因为移动应用程序开发在整个移动行业中大放异彩。" Motorola Inc 高级产品经理兼 Eclipse Tools for mobile Linux®（<a href="http://www.eclipse.org/dsdp/tml/">TmL</a>）项目主管 Eric Cloninger 这样说道。
               </p>
			<p>"在
即将到来的 Galileo Simultaneous Release
中，我们将使开发人员更容易创建、调试和诊断移动电话和模拟器上的应用程序。这个流行的移动应用程序开发平台将使开发人员可以一直使用同一个熟悉的开发环
境，同时又能创建以多种不同设备为目标的移动应用程序。Motorola
非常乐意与业界人士合作，为开发人员提供适当的工具，帮助他们将创新引入到生活当中。"Cloninger 说道。</p>
			<p><a href="" name="N10488"><span class="smalltitle">Web Tools Platform（WTP）</span></a></p>
			<p>"Web Tools Platform（<a href="http://www.eclipse.org/webtools/">WTP</a>）始于 5 年前，最初是为了将 Eclipse 延伸到 Web 应用程序领域。从那以后，它成为了最流行的 Eclipse 项目，为 Web 应用程序开发人员提供了丰富的工具，并且为工具供应商提供了一组平台应用程序编程接口（API）。"项目主管 David
                Williams 说道。</p>
			<p>WTP Galileo 包括一套全新的 XSL 工具，这套工具提供 XSL 编辑和集成了的调试功能，对 Ganymede 中引入的 JavaScript
                Development Tools 作了大量的优化，并对已有的 XML、XML Schema、JSP、HTML、CSS 和 DTD 支持作了改进和补充。</p>
			<p>"Dali Java Persistence Tools 增加了一个新的、改进的 Entity Generation
                向导，在生成实体之前，可通过该向导对实体进行更大程度的定制。Dali 还为 EclipseLink
                JPA 增加了高级的工具支持，并且还提供对从 JAR 映射二进制内容、项目类路径、插件的广泛支持，大大提高了工具的灵活性。"Williams 说道。</p><p></p>]]>
        
    </content>
</entry>

<entry>
    <title>Trading System</title>
    <link rel="alternate" type="text/html" href="http://server.everfine.com.tw/blog/archives/2009/11/trading-system.html" />
    <id>tag:server.everfine.com.tw,2009:/blog//1.311</id>

    <published>2009-11-26T14:29:08Z</published>
    <updated>2009-11-26T14:32:03Z</updated>

    <summary>From: 程式交易聚寶盆列舉國際的交易平台：C#目前沒有太多公開源碼的交易平台，但因為是目前微軟主推的開發語言，且卷商開發的報價元件和下單元件都是Window技術，所以整合容易。TickZoomhttp://www.tickzoom.org/Engine Features* All short term bars update for every tick change. o That includes second bars, minute bars, hour...</summary>
    <author>
        <name>philipz</name>
        <uri>http://server.everfine.com.tw/blog/</uri>
    </author>
    
    
    <content type="html" xml:lang="en" xml:base="http://server.everfine.com.tw/blog/">
        <![CDATA[<p>From: <a href="http://www.programtrading.tw/viewtopic.php?p=4715">程式交易聚寶盆</a><br /></p><p><br /></p><p>列舉國際的交易平台：<br />C#目前沒有太多公開源碼的交易平台，但因為是目前微軟主推的開發語言，且卷商開發的報價元件和下單元件都是Window技術，所以整合容易。<br /><br /></p><ul>TickZoom<br /><!-- m --><a class="postlink" href="http://www.tickzoom.org/">http://www.tickzoom.org/</a><!-- m --><br />Engine Features<br /><ul>* All short term bars update for every tick change.<br />          o That includes second bars, minute bars, hour bars, tick bars, range bars, and volume bars. <br />    * Longer term bars update every minute.<br />          o Those include session, day, week, month and year bars. <br />    * The engine can process an unlimited number of ticks due to streaming technology. <br />    * TickZOOM consumes less than 100 megabytes of memory. <br />    * Run a portfolio of custom strategies against the same instrument. <br />    * TickZOOM offers total time frame freedom.<br />          o Use up to 64 different bar intervals in any combination within the same strategy.<br />
o That includes range, volume, change, tick, point and figure, second,
minute, hour, day, session, week, month, and year bars. <br />    * Strategies that you write can run without change during any of the engine operating modes. <br />    * Control of all features including charting have programmatic access. <br />    * TickZOOM engine operating modes:<br />          o Historical test<br />          o Market replay<br />                + Choose any per bar or per tick acceleration speed <br />          o Optimization<br />                + Standard exhaustive optimization<br />                + Genetic optimization<br />                + Create your own <br />          o Real time mode.<br />                + Runs with real time charts so can see the engine working<br />                + Test against your demo account<br />                + Or run live account to start making money! <br />          o Algorithmic Trading mode<br />                + Runs as a Windows Service without GUI or charts.<br />                + Writes performance stats to HTML format and chart image to file.<br />                + Stays connected 24/7, hands free </ul>Charting<br /><ul>* Comes with a reference GUI and charting but you can make your own. </ul>Algorithmic Trading Server <br /><ul>* Runs the engine as a Windows Service for hands-free algorithm trading. </ul>Execution &amp; Quote Server <br /><ul>* Executes trades ordered by the algorithm server.<br />    * Collects broker tick data to file and feeds it to the algorithmic server in TickZOOM format.</ul><br />Custom Strategies <br /><ul>* Easily incorporate built-in or customized money management and exit strategies.<br />    * It reports all major industry statistics on system performance.</ul><br />Optimize Strategies <br /><ul>* Use dual or quad core during optimization for 2 X or 4 X speed.<br />    * Genetic Algorithm optimization included.</ul><br />EasyLanguage <br /><ul> * Custom strategies benefit from EasyLanguage-like features built-in:<br />          o This makes it relatively simple to convert existing EasyLanguage code.<br />          o And makes it much easier to create new custom strategies.</ul><br />AmiBroker <br /><ul>* Custom strategies benefit from AmiBroker-style features:<br />          o There's a straightforward procedure to convert from AmiBroker code. </ul>Software Architecture <br /><ul>* It's a clean modular interface and design so you can extend, add-on, and make plug-ins. </ul>Quality and Testing <br /><ul>* Uses automated regression testing for greater reliability and fewer bugs.</ul><br />TickZoom的功能強大，其實細看，蠻適合計量回測和自動交易，也少了很多不必要的介面，同時也提供EasyLanguage的轉換。<br /><br />TradeLink<br /><!-- m --><a class="postlink" href="http://code.google.com/p/tradelink/">http://code.google.com/p/tradelink/</a><!-- m --><br />    * Re-trade the day just ended<br />    * Automate your trading<br />    * Back-test strategies at ~100,000 ticks/sec<br />    * Alert you to market behavior<br />    * Build your dream trading platform, one tool at a time. <br />    是不是可以把TradeLink和TickZoom兩個平台整合成台灣的開放源碼主要交易平台 <img src="http://www.programtrading.tw/images/smilies/icon_razz.gif" alt=":P" title="冷笑" /></ul><br />Java是最多公開源碼交易平台，但因為卷商開發的報價元件和下單元件都是Window技術，所以整合上是一個難題。<br /><br />Marketcetera Trading Platform<br />由Shasta創投出4百萬美金成立，功能強且複雜，可以使用Fix Protocol，也可以處理演算法交易。這個軟體感覺上是要瓜分商用的演算法交易市場。目標客群是鎖定法人和避險基金等。<br /><br />EclipseTrade<br />功能完整，接近卷商的看盤軟體，感覺是Java交易平台裡，人氣比較旺的，軟體架構是由Eclipse Framework開發，易於版本控制、修改等。<br /><br />其他的交易平台 <br />資料來源：http://groups.google.com/group/JavaTraders/web/-2 <br />AIOTrade<br /><!-- m --><a class="postlink" href="http://sourceforge.net/projects/humaitrader">http://sourceforge.net/projects/humaitrader</a><!-- m --><br /><!-- m --><a class="postlink" href="http://blogtrader.org/">http://blogtrader.org/</a><!-- m --><br />AIOTrade
(formerly Humai Trader Platform) is a free, open source stock technical
analysis platform built on pure java. Its pluggable architecture is
also ideal for custom features extending, such as indicators and
charts. It Requires JRE 1.5.0+.<br /><br />Auge<br /><!-- m --><a class="postlink" href="http://sourceforge.net/projects/auge">http://sourceforge.net/projects/auge</a><!-- m --><br /><!-- m --><a class="postlink" href="http://auge.sourceforge.net/">http://auge.sourceforge.net/</a><!-- m --><br />Auge
is an easy-to-use financial portfolio management application. Auge will
help you monitor and analyze your stock and mutual fund positions,
providing powerful insight into your entire investment portfolio.<br /><br />Data Visualizer<br /><!-- m --><a class="postlink" href="http://sourceforge.net/projects/dataviews">http://sourceforge.net/projects/dataviews</a><!-- m --><br /><!-- m --><a class="postlink" href="http://dataviews.sourceforge.net/">http://dataviews.sourceforge.net/</a><!-- m --><br />Modular environment for graphical visualization of stock market type data<br /><br />CCAPI2<br /><!-- m --><a class="postlink" href="http://www.activestocks.eu/?q=node/1">http://www.activestocks.eu/?q=node/1</a><!-- m --><br /><!-- m --><a class="postlink" href="http://www.activestocks.eu/">http://www.activestocks.eu/</a><!-- m --><br />The open source finance library on the net.<br />A
java library for automated stock trading, sub fields of financial
engineering and automated financial instrument analysis. A java
financial library. The CCAPI It is also a algorithm trading application
framework.CCAPI is the premium open source java library for developing
stock exchange related applications on the net.Various common
indicators, methods for creating charts and direct trade interfaces to
selected brokers are available for your fingertips.<br /><br />EclipseTrade<br /><!-- m --><a class="postlink" href="http://sourceforge.net/projects/eclipsetrader/">http://sourceforge.net/projects/eclipsetrader/</a><!-- m --><br /><!-- m --><a class="postlink" href="http://eclipsetrader.sourceforge.net/">http://eclipsetrader.sourceforge.net/</a><!-- m --><br />Stock
exchange analysis system, featuring shares pricing watch, intraday and
history charts with technical analysis indicators, level II/market
depth view, news watching, automated trading systems, integrated
trading. Based on Eclipse RCP framework.<br /><br />JSystemTrader<br /><!-- m --><a class="postlink" href="http://www.myjavaserver.com/%7Enonlinear/JSystemTrader/JSystemTrader.html">http://www.myjavaserver.com/~nonlinear/ ... rader.html</a><!-- m --><br />JSystemTrader
is a fully automated trading system (ATS) that can trade various types
of market securities during the trading day without user monitoring.<br />All
aspects of trading, such as obtaining historical and real time quotes,
analyzing price patterns, making trading decisions, placing orders,
monitoring order executions, and controlling the risk are automated
according to the user preferences.<br />The central idea behind
JSystemTrader is to completely remove the emotions from trading, so
that the trading system can systematically and consistently follow a
predefined set of rules.<br /><br />Market Analysis System<br /><!-- m --><a class="postlink" href="http://sourceforge.net/projects/eiffel-mas">http://sourceforge.net/projects/eiffel-mas</a><!-- m --><br /><!-- m --><a class="postlink" href="http://eiffel-mas.sourceforge.net/">http://eiffel-mas.sourceforge.net/</a><!-- m --><br />System
for analysis of financial markets using technical analysis. Includes
facilities for stock charting and futures charting, as well as
automated generation of trading signals based on user-selected
criteria. Operates on both daily and intraday data.<br /><br />Marketcetera<br /><!-- m --><a class="postlink" href="http://trac.marketcetera.org/">http://trac.marketcetera.org/</a><!-- m --><br /><!-- m --><a class="postlink" href="http://www.marketcetera.com/">http://www.marketcetera.com/</a><!-- m --><br />Marketcetera
LLC is building a new software platform committed to providing fast,
flexible and reliable securities trading tools to financial services
professionals. Our mission is to make world-class order-management and
risk-management software available and affordable to individuals and to
institutions of all sizes. Marketcetera focuses on building the key
trading functions that are common to all organizations, thus freeing
our clients to concentrate on proprietary trading algorithms and other
specialized software that provide a competitive advantage.<br /><br />Matrex<br /><!-- m --><a class="postlink" href="http://sourceforge.net/projects/matrex/">http://sourceforge.net/projects/matrex/</a><!-- m --><br /><!-- m --><a class="postlink" href="http://matrex.sourceforge.net/">http://matrex.sourceforge.net/</a><!-- m --><br />Use
Matrex, the un-spreadsheet, instead of spreadsheets when working with
vectors (e.g. database data, charts) and matrices. The perfect desktop
tool for mathematical, statistical models and complex calculations.
Adapters to matlab, scilab, octave, R.<br /><br />Merchant of Venice<br /><!-- m --><a class="postlink" href="http://sourceforge.net/projects/mov">http://sourceforge.net/projects/mov</a><!-- m --><br /><!-- m --><a class="postlink" href="http://mov.sourceforge.net/">http://mov.sourceforge.net/</a><!-- m --><br />Venice
is a stock market trading programme that supports portfolio management,
charting, technical analysis, paper trading and genetic programming.
Venice runs in a graphical user interface with online help and has full
documentation.<br /><br />Open Java Trading System<br /><!-- m --><a class="postlink" href="http://sourceforge.net/projects/ojts/">http://sourceforge.net/projects/ojts/</a><!-- m --><br /><!-- m --><a class="postlink" href="http://ojts.sourceforge.net/">http://ojts.sourceforge.net/</a><!-- m --><br />The
Open Java Trading System (OJTS) is meant to be a common infrastructure
to develop (stock) trading systems. There are four parts: gathering of
raw data over the internet, recognition of trading signals, a
visualisation module and trading with banks.<br /><br />Oropuro trading system<br /><!-- m --><a class="postlink" href="http://sourceforge.net/projects/oropuro">http://sourceforge.net/projects/oropuro</a><!-- m --><br /><!-- m --><a class="postlink" href="http://www.oropuro.org/">http://www.oropuro.org</a><!-- m --><br />Complete
technical analysis &amp; trading system, full set of features:
retrieve, analyze EOD stocks data; manage multiple portfolios;
technical analysis &amp; graphical rendering; neural networks for
generation of trading signals; support trader community,<br /><br />SFL Java Trading System Enviroment<br /><!-- m --><a class="postlink" href="http://sourceforge.net/projects/sfljtse">http://sourceforge.net/projects/sfljtse</a><!-- m --><br /><!-- m --><a class="postlink" href="http://www.sflweb.org/index.php?blog=sfljtse">http://www.sflweb.org/index.php?blog=sfljtse</a><!-- m --><br />The
SFL Java Trading System Enviroment is a java application built on KISS
principle (Keep It Simple,Stupid) and its aim is to provide a fast and
platform indipendent infrastructure to develop and execute trading
systems.<br /><br />TrueTrade<br /><!-- m --><a class="postlink" href="http://code.google.com/p/truetrade/">http://code.google.com/p/truetrade/</a><!-- m --><br /><!-- m --><a class="postlink" href="http://groups.google.com/group/TrueTrade-Gen">http://groups.google.com/group/TrueTrade-Gen</a><!-- m --><br /><!-- m --><a class="postlink" href="http://groups.google.com/group/TrueTrade-Dev">http://groups.google.com/group/TrueTrade-Dev</a><!-- m --><br />TrueTrade
is a framework for developing, testing and running automatic trading
systems. It is intended to provide support for a wide range of orders,
financial instruments and time scales. It provides tooling for
backtesting the strategy against historical data, and a separate tool
for running the strategies in live mode. Strategies currently require
some Java coding experience, though this may change at a later date.<br />It is currently in pre-alpha mode and should not be used against a live trading account. ]]>
        
    </content>
</entry>

<entry>
    <title>Ubuntu High Availability</title>
    <link rel="alternate" type="text/html" href="http://server.everfine.com.tw/blog/archives/2009/11/ubuntu-high-ava.html" />
    <id>tag:server.everfine.com.tw,2009:/blog//1.310</id>

    <published>2009-11-25T15:03:01Z</published>
    <updated>2009-11-25T15:07:03Z</updated>

    <summary>From : Marc&apos;s Linux howtos In this howto we will build a load balanced and high availability web cluster on...</summary>
    <author>
        <name>philipz</name>
        <uri>http://server.everfine.com.tw/blog/</uri>
    </author>
    
    
    <content type="html" xml:lang="en" xml:base="http://server.everfine.com.tw/blog/">
        <![CDATA[<p>From : <a href="http://blogama.org/node/21">Marc's Linux howtos</a></p>

<p>In this howto we will build a load balanced and high availability web cluster on 2 real servers with Xen, hearbeat and ldirectord. The cluster will do http, mail, DNS, MySQL database and will be completely monitored. This is currently used on a production server with a couple of websites.</p>

<p>Introduction</p>

<p>The goal of this tutorial is to achieve load balancing & high availability with less real servers as possible and of course, with open-source software. More servers means more hardware & hosting cost.</p>

<p>Most of the information you will find here has been copy / pasted from a dozen howtos, many of them from howtoforge.com, but some important details have been modified to make this possible and to put everything together.</p>

<p>Here is a quick list of services & applications that will be installed :</p>

<p>    * Apache<br />
    * MySQL + phpmyadmin<br />
    * Postfix (SMTP) with web based users configuration and Spamassassin<br />
    * Courier (IMAP & POP) and squirrelmail<br />
    * Bind (DNS server)<br />
    * Munin and monit for web based monitoring<br />
    * Homemade scripts for monitoring</p>

<p>What you need :</p>

<p>2 servers with dual lan, at least 7 ip. IPs will be used like this :</p>

<p>    * dom01.example.com : 192.168.1.100<br />
    * dom02.example.com : 192.168.1.101<br />
    * lb1.example.com : 192.168.1.102<br />
    * lb2.example.com : 192.168.1.103<br />
    * web1.example.com : 192.168.1.104<br />
    * web2.example.com : 192.168.1.105<br />
    * example.com : 192.168.1.106<br />
    * yousite.com (optionnal) : 192.168.1.107</p>

<p>DomO will be separated from load balancers and web servers. I didnt try it but I believe it would be possible to put load balancers on Dom0.</p>

<p>I suggest at least 2GB ram and RAID 1 or 10 hard drives for a production server.</p>

<p>Limitations</p>

<p>   1. This worked for me. Doesnt mean it will work for you but rest assured that the howto is 100% tested to work on a production and test server !<br />
   2. This setup is scalable over 2 servers but you will need to find another way for MySQL replication if you do so.<br />
   3. No control panel such as ISPConfig, CPanel, etc...<br />
   4. Some websites can break MySQL Master to Master replication. It happend to me with Drupal but I fixed it either by disabling cache or by setting a minimum cache lifetime. Please read this before you go further :</p>

<p><br />
A: MySQL replication currently does not support any locking protocol between master and slave to guarantee the atomicity of a distributed (cross-server) update. In other words, it is possible for client A to make an update to co-master 1, and in the meantime, before it propagates to co-master 2, client B could make an update to co-master 2 that makes the update of client A work differently than it did on co-master 1. Thus, when the update of client A makes it to co-master 2, it produces tables that are different from what you have on co-master 1, even after all the updates from co-master 2 have also propagated. This means that you should not chain two servers together in a two-way replication relationship unless you are sure that your updates can safely happen in any order, or unless you take care of mis-ordered updates somehow in the client code.</p>

<p><br />
1. Installing Ubuntu</p>

<p>Do a basic install of Ubuntu 8.04 LTS server edition.</p>

<p>If you want to install with software RAID 1 please read this howto I wrote :</p>

<p>Install Ubuntu 8.04 with software raid 1</p>

<p><br />
2. Installing Xen</p>

<p>You can run Xen from image files or from dedicated partition. Both have pros and cons.</p>

<p>From image files disk I/O is slower but its easier to do backups and to manage. Its the other way around when working on a partition.</p>

<p>What I suggest doing is starting with image file and to end with partition when your setup is finished. This way you can do backups of your image files and rollback if necessary when testing.</p>

<p>To install on image files please refer to this great tutorial from the howto master Falko :</p>

<p>Installing Xen On An Ubuntu 8.04 (Hardy Heron) Server From The Ubuntu Repositories</p>

<p>To install directly on a partition (my modified version of Falko's howto) :</p>

<p>High Performance XEN On An Ubuntu Hardy Heron (8.04) Server System AMD64 or i386</p>

<p>You need to do 2 Xen domain on each server (dom01 and dom02 are Dom0 or VM controller) :</p>

<p>***On server 1 dom01.example.com ip : 192.168.1.100***</p>

<p>    * lb1.example.com (256MB RAM - 5GB HD is enough)<br />
    * ip : 192.168.1.102<br />
    * web1.example.com (the more RAM the better, keep 512MB for Dom0)<br />
    * ip : 192.168.1.104</p>

<p>***On server 2 dom02.example.com ip : 192.168.1.101***</p>

<p>    * lb2.example.com (256MB RAM - 5GB HD is enough)<br />
    * ip : 192.168.1.103<br />
    * web2.example.com (the more RAM the better, keep 512MB for Dom0)<br />
    * ip : 192.168.1.105</p>

<p><br />
3. Creating Xen Bridges for local data transfers (OPTIONAL)</p>

<p>By default only one network card is enabled on virtual machine with Xen. For local transfer such as rsync, MySQL replication and backups I use a gigabit crossover cable between the 2 servers. Its not necessary but it will save bandwidth costs and replication will be faster.</p>

<p>Please refer to this howto to create xen bridge :</p>

<p>Creating new xen bridges on Ubuntu 8.04</p>

<p>In this howto ip used on the second network card (crossover) will be the following :</p>

<p>    * dom01.example.com : 192.168.0.100<br />
    * dom02.example.com : 192.168.0.101<br />
    * lb1.example.com : 192.168.0.102<br />
    * lb2.example.com : 192.168.0.103<br />
    * web1.example.com : 192.168.0.104<br />
    * web2.example.com : 192.168.0.105</p>

<p><br />
4. Node preparation (dom01, dom02, lb1, lb2, web1, web2)</p>

<p><br />
4.1 Installing openssh server and VIM</p>

<p>Run :</p>

<p>sudo su<br />
apt-get install vim ssh openssh-server</p>

<p><br />
4.2 Updating the repositories</p>

<p>mv /etc/apt/sources.list /etc/apt/sources.list.bak<br />
vi /etc/apt/sources.list</p>

<p>make source.list look like this (here I use mirrors.portafixe.com in Canada, use the closest one from your location ):</p>

<p>#<br />
# deb cdrom:[Ubuntu-Server 8.04 _Hardy Heron_ - Release i386 (20080423.2)]/ hardy main restricted<br />
#deb cdrom:[Ubuntu-Server 8.04 _Hardy Heron_ - Release i386 (20080423.2)]/ hardy main restricted<br />
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to<br />
# newer versions of the distribution.<br />
deb http://de.archive.ubuntu.com/ubuntu/ hardy main restricted<br />
deb-src http://de.archive.ubuntu.com/ubuntu/ hardy main restricted<br />
## Major bug fix updates produced after the final release of the<br />
## distribution.<br />
deb http://de.archive.ubuntu.com/ubuntu/ hardy-updates main restricted<br />
deb-src http://de.archive.ubuntu.com/ubuntu/ hardy-updates main restricted<br />
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu<br />
## team, and may not be under a free licence. Please satisfy yourself as to<br />
## your rights to use the software. Also, please note that software in<br />
## universe WILL NOT receive any review or updates from the Ubuntu security<br />
## team.<br />
deb http://de.archive.ubuntu.com/ubuntu/ hardy universe<br />
deb-src http://de.archive.ubuntu.com/ubuntu/ hardy universe<br />
deb http://de.archive.ubuntu.com/ubuntu/ hardy-updates universe<br />
deb-src http://de.archive.ubuntu.com/ubuntu/ hardy-updates universe<br />
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu<br />
## team, and may not be under a free licence. Please satisfy yourself as to<br />
## your rights to use the software. Also, please note that software in<br />
## multiverse WILL NOT receive any review or updates from the Ubuntu<br />
## security team.<br />
deb http://de.archive.ubuntu.com/ubuntu/ hardy multiverse<br />
deb-src http://de.archive.ubuntu.com/ubuntu/ hardy multiverse<br />
deb http://de.archive.ubuntu.com/ubuntu/ hardy-updates multiverse<br />
deb-src http://de.archive.ubuntu.com/ubuntu/ hardy-updates multiverse<br />
## Uncomment the following two lines to add software from the 'backports'<br />
## repository.<br />
## N.B. software from this repository may not have been tested as<br />
## extensively as that contained in the main release, although it includes<br />
## newer versions of some applications which may provide useful features.<br />
## Also, please note that software in backports WILL NOT receive any review<br />
## or updates from the Ubuntu security team.<br />
# deb http://de.archive.ubuntu.com/ubuntu/ hardy-backports main restricted universe multiverse<br />
# deb-src http://de.archive.ubuntu.com/ubuntu/ hardy-backports main restricted universe multiverse<br />
## Uncomment the following two lines to add software from Canonical's<br />
## 'partner' repository. This software is not part of Ubuntu, but is<br />
## offered by Canonical and the respective vendors as a service to Ubuntu<br />
## users.<br />
# deb http://archive.canonical.com/ubuntu hardy partner<br />
# deb-src http://archive.canonical.com/ubuntu hardy partner<br />
deb http://security.ubuntu.com/ubuntu hardy-security main restricted<br />
deb-src http://security.ubuntu.com/ubuntu hardy-security main restricted<br />
deb http://security.ubuntu.com/ubuntu hardy-security universe<br />
deb-src http://security.ubuntu.com/ubuntu hardy-security universe<br />
deb http://security.ubuntu.com/ubuntu hardy-security multiverse<br />
deb-src http://security.ubuntu.com/ubuntu hardy-security multiverse</p>

<p>now do :</p>

<p>apt-get update<br />
apt-get upgrade</p>

<p><br />
4.3 Modifications (dom01, dom02, lb1, lb2, web1, web2)</p>

<p>/bin/sh is a symlink to /bin/dash, however we need /bin/bash, not /bin/dash. Therefore we do this:</p>

<p>ln -sf /bin/bash /bin/sh</p>

<p>We will disable AppArmor (on dom01 and dom02) by doing the following :</p>

<p>/etc/init.d/apparmor stop<br />
update-rc.d -f apparmor remove</p>

<p><br />
5. Network configuration (dom01, dom02, lb1, lb2, web1, web2)</p>

<p><br />
5.1 Setting up IPs</p>

<p>To edit network configuration under ubuntu do :</p>

<p>vi /etc/network/interfaces</p>

<p>We will now do each network configuration one by one. I assume you use 2 network card, eth0 is the one connected to the internet and eth1 the one with the crossover cable. I wont write the config file individually, only for dom01.example.com, please modify accordingly to this list :</p>

<p>dom01.example.com<br />
eth0 : 192.168.1.100<br />
eth1 : 192.168.0.100</p>

<p>dom02.example.com<br />
eth0 : 192.168.1.101<br />
eth1 : 192.168.0.101</p>

<p>lb1.example.com<br />
eth0 : 192.168.1.102<br />
eth1 : 192.168.0.102</p>

<p>lb2.example.com<br />
eth0 : 192.168.1.103<br />
eth1 : 192.168.0.103</p>

<p>web1.example.com<br />
eth0 : 192.168.1.104<br />
eth1 : 192.168.0.104</p>

<p>web2.example.com<br />
eth0 : 192.168.1.105<br />
eth1 : 192.168.0.105</p>

<p>***Example network configuration of dom01.example.com***</p>

<p>Make the file /etc/network/interfaces look like this :</p>

<p># This file describes the network interfaces available on your system<br />
# and how to activate them. For more information, see interfaces(5).<br />
# The loopback network interface<br />
auto lo<br />
iface lo inet loopback<br />
# The primary network interface connected to the internet<br />
auto eth0<br />
iface eth0 inet static<br />
        address 192.168.1.100<br />
        netmask 255.255.255.0<br />
        network 192.168.1.0<br />
        broadcast 192.168.1.255<br />
        gateway 192.168.1.1<br />
# The secondary network interface connected by a crossover cable on the other server<br />
auto eth1<br />
iface eth1 inet static<br />
        address 192.168.0.100<br />
        netmask 255.255.255.0<br />
        network 192.168.0.0<br />
        broadcast 192.168.0.255</p>

<p>Now save the file and do :</p>

<p>/etc/init.d/networking restart</p>

<p><br />
5.2 Hostname</p>

<p>vi /etc/hosts</p>

<p>and make it look like this :</p>

<p>***On dom01.example.com***</p>

<p>127.0.0.1       localhost.localdomain   localhost<br />
127.0.1.1       dom01.example.com dom01<br />
 <br />
192.168.1.101   dom02.example.com     dom02<br />
192.168.1.102   lb1.example.com     lb1<br />
192.168.1.103   lb2.example.com     lb2<br />
192.168.1.104   web1.example.com     web1<br />
192.168.1.105   web2.example.com     web2<br />
# The following lines are desirable for IPv6 capable hosts<br />
::1     ip6-localhost ip6-loopback<br />
fe00::0 ip6-localnet<br />
ff00::0 ip6-mcastprefix<br />
ff02::1 ip6-allnodes<br />
ff02::2 ip6-allrouters<br />
ff02::3 ip6-allhosts</p>

<p>echo dom01.example.com > /etc/hostname<br />
/etc/init.d/hostname.sh start</p>

<p>***On dom02.example.com***</p>

<p>127.0.0.1       localhost.localdomain   localhost<br />
127.0.1.1       dom02.example.com dom02<br />
 <br />
192.168.1.100   dom01.example.com     dom01<br />
192.168.1.102   lb1.example.com     lb1<br />
192.168.1.103   lb2.example.com     lb2<br />
192.168.1.104   web1.example.com     web1<br />
192.168.1.105   web2.example.com     web2<br />
# The following lines are desirable for IPv6 capable hosts<br />
::1     ip6-localhost ip6-loopback<br />
fe00::0 ip6-localnet<br />
ff00::0 ip6-mcastprefix<br />
ff02::1 ip6-allnodes<br />
ff02::2 ip6-allrouters<br />
ff02::3 ip6-allhosts</p>

<p>echo dom02.example.com > /etc/hostname<br />
/etc/init.d/hostname.sh start</p>

<p>***On lb1.example.com***</p>

<p>127.0.0.1       localhost.localdomain   localhost<br />
127.0.1.1       lb1.example.com lb1<br />
 <br />
192.168.1.100   dom01.example.com     dom01<br />
192.168.1.101   dom02.example.com     dom02<br />
192.168.1.103   lb2.example.com     lb2<br />
192.168.1.104   web1.example.com     web1<br />
192.168.1.105   web2.example.com     web2<br />
# The following lines are desirable for IPv6 capable hosts<br />
::1     ip6-localhost ip6-loopback<br />
fe00::0 ip6-localnet<br />
ff00::0 ip6-mcastprefix<br />
ff02::1 ip6-allnodes<br />
ff02::2 ip6-allrouters<br />
ff02::3 ip6-allhosts</p>

<p>echo lb1.example.com > /etc/hostname<br />
/etc/init.d/hostname.sh start</p>

<p>***On lb2.example.com***</p>

<p>127.0.0.1       localhost.localdomain   localhost<br />
127.0.1.1       lb2.example.com lb2<br />
 <br />
192.168.1.100   dom01.example.com     dom01<br />
192.168.1.101   dom02.example.com     dom02<br />
192.168.1.102   lb1.example.com     lb1<br />
192.168.1.104   web1.example.com     web1<br />
192.168.1.105   web2.example.com     web2<br />
# The following lines are desirable for IPv6 capable hosts<br />
::1     ip6-localhost ip6-loopback<br />
fe00::0 ip6-localnet<br />
ff00::0 ip6-mcastprefix<br />
ff02::1 ip6-allnodes<br />
ff02::2 ip6-allrouters<br />
ff02::3 ip6-allhosts</p>

<p>echo lb2.example.com > /etc/hostname<br />
/etc/init.d/hostname.sh start</p>

<p>***On web1.example.com***</p>

<p>127.0.0.1       localhost.localdomain   localhost<br />
127.0.1.1       web1.example.com web1<br />
 <br />
192.168.1.100   dom01.example.com     dom01<br />
192.168.1.101   dom02.example.com     dom02<br />
192.168.1.102   lb1.example.com     lb1<br />
192.168.1.103   lb2.example.com     lb2<br />
192.168.1.105   web2.example.com     web2<br />
# The following lines are desirable for IPv6 capable hosts<br />
::1     ip6-localhost ip6-loopback<br />
fe00::0 ip6-localnet<br />
ff00::0 ip6-mcastprefix<br />
ff02::1 ip6-allnodes<br />
ff02::2 ip6-allrouters<br />
ff02::3 ip6-allhosts</p>

<p>echo web1.example.com > /etc/hostname<br />
/etc/init.d/hostname.sh start</p>

<p>***On web2.example.com***</p>

<p>127.0.0.1       localhost.localdomain   localhost<br />
127.0.1.1       web2.example.com web2<br />
 <br />
192.168.1.100   dom01.example.com     dom01<br />
192.168.1.101   dom02.example.com     dom02<br />
192.168.1.102   lb1.example.com     lb1<br />
192.168.1.103   lb2.example.com     lb2<br />
192.168.1.104   web1.example.com     web1<br />
# The following lines are desirable for IPv6 capable hosts<br />
::1     ip6-localhost ip6-loopback<br />
fe00::0 ip6-localnet<br />
ff00::0 ip6-mcastprefix<br />
ff02::1 ip6-allnodes<br />
ff02::2 ip6-allrouters<br />
ff02::3 ip6-allhosts</p>

<p>echo web2.example.com > /etc/hostname<br />
/etc/init.d/hostname.sh start</p>

<p><br />
6. Software installation (dom01, dom02, lb1, lb2, web1, web2)</p>

<p>Run :</p>

<p>apt-get install binutils cpp fetchmail flex gcc libarchive-zip-perl libc6-dev libcompress-zlib-perl libdb4.3-dev libpcre3 libpopt-dev lynx m4 make ncftp nmap openssl perl perl-modules unzip zip zlib1g-dev autoconf automake1.9 libtool bison autotools-dev g++ build-essential</p>]]>
        
    </content>
</entry>

<entry>
    <title>Google Notebook Extension for Firefox 3.5+</title>
    <link rel="alternate" type="text/html" href="http://server.everfine.com.tw/blog/archives/2009/09/google-notebook.html" />
    <id>tag:server.everfine.com.tw,2009:/blog//1.309</id>

    <published>2009-09-24T02:17:33Z</published>
    <updated>2009-09-24T02:22:56Z</updated>

    <summary>自從Google推出Chrome瀏覽器之後，很多在Firefox的外掛也慢慢不支援新版3.5。 尤其是之前常用的Google Notebook，終於有人開發出支援3.5版Firefox的Google Notebook外掛，Google Notebook Extension for Firefox 3.5+。...</summary>
    <author>
        <name>philipz</name>
        <uri>http://server.everfine.com.tw/blog/</uri>
    </author>
    
    
    <content type="html" xml:lang="en" xml:base="http://server.everfine.com.tw/blog/">
        <![CDATA[<p>自從Google推出Chrome瀏覽器之後，很多在Firefox的外掛也慢慢不支援新版3.5。<br />
尤其是之前常用的<a href="https://www.google.com/notebook/download">Google Notebook</a>，終於有人開發出支援3.5版Firefox的Google Notebook外掛，<a href="http://googlenotebookextension.blogspot.com/">Google Notebook Extension for Firefox 3.5+</a>。<br />
</p>]]>
        
    </content>
</entry>

<entry>
    <title>使用 JPA 和 Hibernate 实现组合键</title>
    <link rel="alternate" type="text/html" href="http://server.everfine.com.tw/blog/archives/2009/09/-jpa-hibernate.html" />
    <id>tag:server.everfine.com.tw,2009:/blog//1.308</id>

    <published>2009-09-24T02:05:44Z</published>
    <updated>2009-09-24T02:06:47Z</updated>

    <summary>使用 JPA 和 Hibernate 实现组合键...</summary>
    <author>
        <name>philipz</name>
        <uri>http://server.everfine.com.tw/blog/</uri>
    </author>
    
    
    <content type="html" xml:lang="en" xml:base="http://server.everfine.com.tw/blog/">
        <![CDATA[<p><a href="http://www.ibm.com/developerworks/cn/opensource/os-hibernatejpa/index.html">使用 JPA 和 Hibernate 实现组合键</a></p>]]>
        
    </content>
</entry>

<entry>
    <title>Google App Engine for Java，第 3 部分: 持久性和关系</title>
    <link rel="alternate" type="text/html" href="http://server.everfine.com.tw/blog/archives/2009/09/google-app-engi-1.html" />
    <id>tag:server.everfine.com.tw,2009:/blog//1.307</id>

    <published>2009-09-24T02:03:49Z</published>
    <updated>2009-09-24T02:04:23Z</updated>

    <summary>Google App Engine for Java，第 3 部分: 持久性和关系...</summary>
    <author>
        <name>philipz</name>
        <uri>http://server.everfine.com.tw/blog/</uri>
    </author>
    
    
    <content type="html" xml:lang="en" xml:base="http://server.everfine.com.tw/blog/">
        <![CDATA[<p><a href="http://www.ibm.com/developerworks/cn/java/j-gaej3.html">Google App Engine for Java，第 3 部分: 持久性和关系</a></p>]]>
        
    </content>
</entry>

</feed>
