日韩一区二区三区免费视频,蜜臀91精品一区二区三区,久久一区二区三区avhttp://www.aygfsteel.com/Vencent/category/7000.html<!--bgsound src="http://www.aygfsteel.com/Files/Vencent/The%20Mass%20Era.zip" volume="10" loop="10"/--> <script type="text/javascript" src="http://shooter.cn/api/shteapi.js" charset='utf-8'></script> <link rel="stylesheet" type="text/css" />zh-cnTue, 15 Apr 2008 13:04:41 GMTTue, 15 Apr 2008 13:04:41 GMT60關于ChartDirector的中文問題完美解決http://www.aygfsteel.com/Vencent/archive/2008/04/15/193201.htmlVincent.ChenVincent.ChenTue, 15 Apr 2008 12:06:00 GMThttp://www.aygfsteel.com/Vencent/archive/2008/04/15/193201.htmlhttp://www.aygfsteel.com/Vencent/comments/193201.htmlhttp://www.aygfsteel.com/Vencent/archive/2008/04/15/193201.html#Feedback0http://www.aygfsteel.com/Vencent/comments/commentRss/193201.htmlhttp://www.aygfsteel.com/Vencent/services/trackbacks/193201.htmlChartDirector是一個圖表工具,類似JFreeChart,只是它是商業軟件。那為何還要用它?因為它畫出來的圖表比JFreeChart精細,好看得多。這好像是一個香港公司開發的?!http://www.advsofteng.com/
它文檔上說了,它內部采用UNICODE編碼。所以應該不會有中文[非英文體系]亂碼問題。但是實際好像還是會出現亂碼,網上搜索了一通大多解決的不是很徹底,根據自己試驗解決如下:
1、
JSP中增加:
<%@ page contentType="text/html; charset=GB2312"%>
//
此處的charset要注意設置,也可設置成其他支持中文的編碼,然后注意保存的jsp文件要保存成相應編碼
//很多亂碼皆由于保存的編碼和這里聲明的編碼不一致導致[用EmEditor等工具保存時可以選擇編碼]
//這里不聲明默認采用ISO-8859-1編碼讀取,所以有網友說需要將中文編碼為ISO-8859-1即:
//new String("中文".getBytes("ISO-8859-1"))

2、設置Chart默認字體:

BaseChart.setDefaultFonts("simsun.ttc","simsun.ttc","simsun.ttc","simsun.ttc");

如果在非windows系統下使用,可以拷貝windows系統下的simsun.ttc到classes路徑下,重啟服務器即可顯示中文

然后其他的一些字體大小等都要一個個設置了,因為默認英文字體大小顯示中文不好看

這樣就可以很完美顯示中文了。比起JFreeChart來好多了,JFreeChart雖然也可以解決中文顯示問題,但是中文字體發虛,好像目前無法解決。



Vincent.Chen 2008-04-15 20:06 發表評論
]]>
轉:利用JFreeChart繪制股票K線圖完整解決方案http://www.aygfsteel.com/Vencent/archive/2008/02/02/179085.htmlVincent.ChenVincent.ChenSat, 02 Feb 2008 12:49:00 GMThttp://www.aygfsteel.com/Vencent/archive/2008/02/02/179085.htmlhttp://www.aygfsteel.com/Vencent/comments/179085.htmlhttp://www.aygfsteel.com/Vencent/archive/2008/02/02/179085.html#Feedback0http://www.aygfsteel.com/Vencent/comments/commentRss/179085.htmlhttp://www.aygfsteel.com/Vencent/services/trackbacks/179085.html閱讀全文

Vincent.Chen 2008-02-02 20:49 發表評論
]]>
JFreeChart庫包的簡介【轉載】http://www.aygfsteel.com/Vencent/archive/2008/02/02/179084.htmlVincent.ChenVincent.ChenSat, 02 Feb 2008 12:41:00 GMThttp://www.aygfsteel.com/Vencent/archive/2008/02/02/179084.htmlhttp://www.aygfsteel.com/Vencent/comments/179084.htmlhttp://www.aygfsteel.com/Vencent/archive/2008/02/02/179084.html#Feedback0http://www.aygfsteel.com/Vencent/comments/commentRss/179084.htmlhttp://www.aygfsteel.com/Vencent/services/trackbacks/179084.html閱讀全文

Vincent.Chen 2008-02-02 20:41 發表評論
]]>
JFreeChart中文文檔【轉載】http://www.aygfsteel.com/Vencent/archive/2008/02/02/179082.htmlVincent.ChenVincent.ChenSat, 02 Feb 2008 12:34:00 GMThttp://www.aygfsteel.com/Vencent/archive/2008/02/02/179082.htmlhttp://www.aygfsteel.com/Vencent/comments/179082.htmlhttp://www.aygfsteel.com/Vencent/archive/2008/02/02/179082.html#Feedback0http://www.aygfsteel.com/Vencent/comments/commentRss/179082.htmlhttp://www.aygfsteel.com/Vencent/services/trackbacks/179082.html閱讀全文

Vincent.Chen 2008-02-02 20:34 發表評論
]]>
AppFuse2 建立新project命令http://www.aygfsteel.com/Vencent/archive/2007/07/18/131163.htmlVincent.ChenVincent.ChenWed, 18 Jul 2007 14:58:00 GMThttp://www.aygfsteel.com/Vencent/archive/2007/07/18/131163.htmlhttp://www.aygfsteel.com/Vencent/comments/131163.htmlhttp://www.aygfsteel.com/Vencent/archive/2007/07/18/131163.html#Feedback0http://www.aygfsteel.com/Vencent/comments/commentRss/131163.htmlhttp://www.aygfsteel.com/Vencent/services/trackbacks/131163.html
ArchetypeCommand
JSF Basic mvn archetype:create -DarchetypeGroupId=org.appfuse -DarchetypeArtifactId=appfuse-basic-jsf -DremoteRepositories=http://static.appfuse.org/repository -DarchetypeVersion=2.0-m5 -DgroupId=com.mycompany.app -DartifactId=myproject
Spring MVC Basic mvn archetype:create -DarchetypeGroupId=org.appfuse -DarchetypeArtifactId=appfuse-basic-spring -DremoteRepositories=http://static.appfuse.org/repository -DarchetypeVersion=2.0-m5 -DgroupId=com.mycompany.app -DartifactId=myproject
Struts 2 Basic mvn archetype:create -DarchetypeGroupId=org.appfuse -DarchetypeArtifactId=appfuse-basic-struts -DremoteRepositories=http://static.appfuse.org/repository -DarchetypeVersion=2.0-m5 -DgroupId=com.mycompany.app -DartifactId=myproject
Tapestry Basic mvn archetype:create -DarchetypeGroupId=org.appfuse -DarchetypeArtifactId=appfuse-basic-tapestry -DremoteRepositories=http://static.appfuse.org/repository -DarchetypeVersion=2.0-m5 -DgroupId=com.mycompany.app -DartifactId=myproject
JSF Modular mvn archetype:create -DarchetypeGroupId=org.appfuse -DarchetypeArtifactId=appfuse-modular-jsf -DremoteRepositories=http://static.appfuse.org/repository -DarchetypeVersion=2.0-m5 -DgroupId=com.mycompany.app -DartifactId=myproject
Spring MVC Modular mvn archetype:create -DarchetypeGroupId=org.appfuse -DarchetypeArtifactId=appfuse-modular-spring -DremoteRepositories=http://static.appfuse.org/repository -DarchetypeVersion=2.0-m5 -DgroupId=com.mycompany.app -DartifactId=myproject
Struts 2 Modular mvn archetype:create -DarchetypeGroupId=org.appfuse -DarchetypeArtifactId=appfuse-modular-struts -DremoteRepositories=http://static.appfuse.org/repository -DarchetypeVersion=2.0-m5 -DgroupId=com.mycompany.app -DartifactId=myproject
Tapestry Modular mvn archetype:create -DarchetypeGroupId=org.appfuse -DarchetypeArtifactId=appfuse-modular-tapestry -DremoteRepositories=http://static.appfuse.org/repository -DarchetypeVersion=2.0-m5 -DgroupId=com.mycompany.app -DartifactId=myproject
Core
(backend only)
mvn archetype:create -DarchetypeGroupId=org.appfuse -DarchetypeArtifactId=appfuse-core -DremoteRepositories=http://static.appfuse.org/repository -DarchetypeVersion=2.0-m5 -DgroupId=com.mycompany.app -DartifactId=myproject


Vincent.Chen 2007-07-18 22:58 發表評論
]]>
候捷談反射機制(轉)http://www.aygfsteel.com/Vencent/archive/2007/07/02/127710.htmlVincent.ChenVincent.ChenMon, 02 Jul 2007 15:58:00 GMThttp://www.aygfsteel.com/Vencent/archive/2007/07/02/127710.htmlhttp://www.aygfsteel.com/Vencent/comments/127710.htmlhttp://www.aygfsteel.com/Vencent/archive/2007/07/02/127710.html#Feedback0http://www.aygfsteel.com/Vencent/comments/commentRss/127710.htmlhttp://www.aygfsteel.com/Vencent/services/trackbacks/127710.html閱讀全文

Vincent.Chen 2007-07-02 23:58 發表評論
]]>
(轉)Polymorphism(多態性)很X,大家注意少兒不宜http://www.aygfsteel.com/Vencent/archive/2007/07/02/127709.htmlVincent.ChenVincent.ChenMon, 02 Jul 2007 15:54:00 GMThttp://www.aygfsteel.com/Vencent/archive/2007/07/02/127709.htmlhttp://www.aygfsteel.com/Vencent/comments/127709.htmlhttp://www.aygfsteel.com/Vencent/archive/2007/07/02/127709.html#Feedback1http://www.aygfsteel.com/Vencent/comments/commentRss/127709.htmlhttp://www.aygfsteel.com/Vencent/services/trackbacks/127709.html閱讀全文

Vincent.Chen 2007-07-02 23:54 發表評論
]]>
關于ResultSet的關閉問題http://www.aygfsteel.com/Vencent/archive/2006/03/15/35497.htmlVincent.ChenVincent.ChenWed, 15 Mar 2006 15:15:00 GMThttp://www.aygfsteel.com/Vencent/archive/2006/03/15/35497.htmlhttp://www.aygfsteel.com/Vencent/comments/35497.htmlhttp://www.aygfsteel.com/Vencent/archive/2006/03/15/35497.html#Feedback0http://www.aygfsteel.com/Vencent/comments/commentRss/35497.htmlhttp://www.aygfsteel.com/Vencent/services/trackbacks/35497.html在Connection上調用close方法會關閉Statement和ResultSet嗎?

級聯的關閉這聽起來好像很有道理,而且在很多地方這樣做也是正確的,通常這樣寫
Connection con = getConnection();//getConnection is your method
PreparedStatement ps = con.prepareStatement(sql);
ResultSet rs = ps.executeQuery();
……
///rs.close();
///ps.close();
con.close();  // NO!
這 樣做的問題在于Connection是個接口,它的close實現可能是多種多樣的。在普通情況下,你用 DriverManager.getConnection()得到一個Connection實例,調用它的close方法會關閉Statement和 ResultSet。但是在很多時候,你需要使用數據庫連接池,在連接池中的得到的Connection上調用close方法的時候,Connection可能并沒有被釋放,而是回到了連接池中。它以后可能被其它代碼取出來用。如果沒有釋放Statement和ResultSet,那么在Connection上沒有關閉的Statement和ResultSet可能會越來越多,那么……
相反,我看到過這樣的說法,有人把Connection關閉了,卻繼續使用ResultSet,認為這樣是可以的,引發了激烈的討論,到底是怎么回事就不用我多說了吧。

所以我們必須很小心的釋放數據庫資源,下面的代碼片斷展示了這個過程

Connection con = null;
PreparedStatement ps = null;
ResultSet rs = null;

try {
    con = getConnection();//getConnection is your method
    ps = con.prepareStatement(sql);
    rs = ps.executeQuery();
    ///...........
}
catch (SQLException ex) {
    ///錯誤處理
}
finally{
    try {
        if(ps!=null)
            ps.close();
    }
    catch (SQLException ex) {
        ///錯誤處理
    }
    try{
        if(con!=null)
            con.close();
    }
    catch (SQLException ex) {
        ///錯誤處理
    }
}

很麻煩是不是?但為了寫出健壯的程序,這些處理是必須的。



上面這東西講得真是精辟。


Vincent.Chen 2006-03-15 23:15 發表評論
]]>
<a href='http://www.aygfsteel.com/Vencent/articles/30510.html'>GOOGLE挑戰賽練習題1及答案(200分) </a>http://www.aygfsteel.com/Vencent/archive/2006/02/14/30693.htmlVincent.ChenVincent.ChenTue, 14 Feb 2006 13:23:00 GMThttp://www.aygfsteel.com/Vencent/archive/2006/02/14/30693.htmlhttp://www.aygfsteel.com/Vencent/comments/30693.htmlhttp://www.aygfsteel.com/Vencent/archive/2006/02/14/30693.html#Feedback0http://www.aygfsteel.com/Vencent/comments/commentRss/30693.htmlhttp://www.aygfsteel.com/Vencent/services/trackbacks/30693.html

Vincent.Chen 2006-02-14 21:23 發表評論
]]>
<a href='http://www.aygfsteel.com/Vencent/articles/30491.html'>學習Log4J筆記(轉)</a>http://www.aygfsteel.com/Vencent/archive/2006/02/13/30492.htmlVincent.ChenVincent.ChenMon, 13 Feb 2006 10:19:00 GMThttp://www.aygfsteel.com/Vencent/archive/2006/02/13/30492.htmlhttp://www.aygfsteel.com/Vencent/comments/30492.htmlhttp://www.aygfsteel.com/Vencent/archive/2006/02/13/30492.html#Feedback0http://www.aygfsteel.com/Vencent/comments/commentRss/30492.htmlhttp://www.aygfsteel.com/Vencent/services/trackbacks/30492.html

Vincent.Chen 2006-02-13 18:19 發表評論
]]>
<a href='http://www.aygfsteel.com/Vencent/articles/30344.html'>Velocity用戶手冊---中文版</a >http://www.aygfsteel.com/Vencent/archive/2006/02/12/30345.htmlVincent.ChenVincent.ChenSun, 12 Feb 2006 04:59:00 GMThttp://www.aygfsteel.com/Vencent/archive/2006/02/12/30345.htmlhttp://www.aygfsteel.com/Vencent/comments/30345.htmlhttp://www.aygfsteel.com/Vencent/archive/2006/02/12/30345.html#Feedback0http://www.aygfsteel.com/Vencent/comments/commentRss/30345.htmlhttp://www.aygfsteel.com/Vencent/services/trackbacks/30345.html

Vincent.Chen 2006-02-12 12:59 發表評論
]]>
<a href='http://www.aygfsteel.com/Vencent/articles/30328.html'>在網上看到華為java的面試題</a>http://www.aygfsteel.com/Vencent/archive/2006/02/12/30329.htmlVincent.ChenVincent.ChenSun, 12 Feb 2006 03:10:00 GMThttp://www.aygfsteel.com/Vencent/archive/2006/02/12/30329.htmlhttp://www.aygfsteel.com/Vencent/comments/30329.htmlhttp://www.aygfsteel.com/Vencent/archive/2006/02/12/30329.html#Feedback0http://www.aygfsteel.com/Vencent/comments/commentRss/30329.htmlhttp://www.aygfsteel.com/Vencent/services/trackbacks/30329.html

Vincent.Chen 2006-02-12 11:10 發表評論
]]>
<a href='http://www.aygfsteel.com/Vencent/articles/30302.html'>竹筍炒肉之Junit學習筆記(轉)</a>http://www.aygfsteel.com/Vencent/archive/2006/02/12/30323.htmlVincent.ChenVincent.ChenSun, 12 Feb 2006 02:53:00 GMThttp://www.aygfsteel.com/Vencent/archive/2006/02/12/30323.htmlhttp://www.aygfsteel.com/Vencent/comments/30323.htmlhttp://www.aygfsteel.com/Vencent/archive/2006/02/12/30323.html#Feedback0http://www.aygfsteel.com/Vencent/comments/commentRss/30323.htmlhttp://www.aygfsteel.com/Vencent/services/trackbacks/30323.html
查看全文




Vincent.Chen 2006-02-12 10:53 發表評論
]]>
主站蜘蛛池模板: 丽水市| 八宿县| 伊吾县| 通化县| 乐业县| 莫力| 江津市| 建宁县| 阜南县| 温宿县| 辽宁省| 原平市| 玉屏| 阿坝| 澄江县| 黎平县| 丰顺县| 大姚县| 南部县| 临海市| 津南区| 南丹县| 平定县| 扎囊县| 铁岭市| 平武县| 衡水市| 洞口县| 开化县| 雷州市| 喀什市| 玉环县| 渭南市| 石家庄市| 南阳市| 罗定市| 县级市| 南川市| 开平市| 宣恩县| 东阿县|