<?xml version="1.0" encoding="utf-8"?><?xml-stylesheet href='http://feeds.feedsky.com/styles/temp01.xsl' type='text/xsl' ?><!--这是一个由Feedsy提供技术支持的Feed，为了提高读者阅读的体验，以及满足用户美化自己Feed的需要，我们设计了多种精美的Feed模板，提供给大家选择，所有最终呈现出来的样式，皆由用户自愿选择使用，未经许可，任何团体和个人，请不要擅自修改样式或者盗用，这是对于用户选择权的尊重。--><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:fs="http://www.feedsky.com/namespace/feed" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0"><channel><atom:link href="http://feeds.feedsky.com/csdn.net/YOYOOOP" type="application/rss+xml" rel="self"></atom:link><fs:self_link href="http://feeds.feedsky.com/csdn.net/YOYOOOP" type="application/rss+xml"></fs:self_link><lastBuildDate>Wed, 03 Dec 2008 23:35:00 GMT</lastBuildDate><title>My Java</title><description>我是JAVA白痴</description><link>http://blog.csdn.net/YOYOOOP/</link><item><title>Hibernate中session.createQuery()与session.createSQLQuery()的心德</title><link>http://blog.csdn.net/YOYOOOP/archive/2008/12/03/3441124.aspx</link><wfw:comment>http://blog.csdn.net/YOYOOOP/comments/3441124.aspx</wfw:comment><slash:comments>0</slash:comments><wfw:commentRss>http://blog.csdn.net/YOYOOOP/comments/commentRss/3441124.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=3441124</trackback:ping><description>今天无意间用错了方法

在使用select count(*)的时候，用的是：

List list = session.createSQLQuery(&quot;select count(*) from XXX&quot;);

return (Integer)list.get(0);

这样就报错了.报错误：BigInteger 不能强制转换成Integer...

整了很久也没有找到原因.后头才发现自己用错了方法。

应该用session.createQuery()

这样上面的转换就不会报错了......
&lt;img src =&quot;http://blog.csdn.net/YOYOOOP/aggbug/3441124.aspx&quot; width = &quot;1&quot; height = &quot;1&quot; /&gt;</description><pubDate>Thu, 04 Dec 2008 07:35:00 +0800</pubDate><author>Andy</author><comments>http://blog.csdn.net/YOYOOOP/archive/2008/12/03/3441124.aspx#Feedback</comments><guid isPermaLink="false">http://blog.csdn.net/YOYOOOP/archive/2008/12/03/3441124.aspx</guid><dc:creator>Andy</dc:creator></item><item><title>Timestamp使用心得</title><link>http://blog.csdn.net/YOYOOOP/archive/2008/12/02/3431744.aspx</link><wfw:comment>http://blog.csdn.net/YOYOOOP/comments/3431744.aspx</wfw:comment><slash:comments>2</slash:comments><wfw:commentRss>http://blog.csdn.net/YOYOOOP/comments/commentRss/3431744.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=3431744</trackback:ping><description>最近常用Timestamp这个类,感觉不错.特别是在日期的计算上.

如果用calendar类计算还是有些麻烦.但Timestamp显得要简单一些

比如:你需要计算一个日期后多少天的具体年月日 时分秒

那么可以这样。

我们以currently Time为例.对日期的加减。用Timestamp的好处是不需要去管这个月有多少天

例
&lt;img src =&quot;http://blog.csdn.net/YOYOOOP/aggbug/3431744.aspx&quot; width = &quot;1&quot; height = &quot;1&quot; /&gt;</description><pubDate>Wed, 03 Dec 2008 05:42:00 +0800</pubDate><author>Andy</author><comments>http://blog.csdn.net/YOYOOOP/archive/2008/12/02/3431744.aspx#Feedback</comments><guid isPermaLink="false">http://blog.csdn.net/YOYOOOP/archive/2008/12/02/3431744.aspx</guid><dc:creator>Andy</dc:creator></item><item><title>Webwork做的网站.给点建议</title><link>http://blog.csdn.net/YOYOOOP/archive/2008/12/02/3431453.aspx</link><wfw:comment>http://blog.csdn.net/YOYOOOP/comments/3431453.aspx</wfw:comment><slash:comments>3</slash:comments><wfw:commentRss>http://blog.csdn.net/YOYOOOP/comments/commentRss/3431453.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=3431453</trackback:ping><description>最近心血来潮.用webwork做了一个网站.

功能很简单...希望大家给点建议.

http://www.cqjzw8.com
&lt;img src =&quot;http://blog.csdn.net/YOYOOOP/aggbug/3431453.aspx&quot; width = &quot;1&quot; height = &quot;1&quot; /&gt;</description><pubDate>Wed, 03 Dec 2008 05:14:00 +0800</pubDate><author>Andy</author><comments>http://blog.csdn.net/YOYOOOP/archive/2008/12/02/3431453.aspx#Feedback</comments><guid isPermaLink="false">http://blog.csdn.net/YOYOOOP/archive/2008/12/02/3431453.aspx</guid><dc:creator>Andy</dc:creator></item><item><title>cron表达式(quartz中时间表达式)</title><link>http://blog.csdn.net/YOYOOOP/archive/2008/11/30/3415270.aspx</link><wfw:comment>http://blog.csdn.net/YOYOOOP/comments/3415270.aspx</wfw:comment><slash:comments>0</slash:comments><wfw:commentRss>http://blog.csdn.net/YOYOOOP/comments/commentRss/3415270.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=3415270</trackback:ping><description>Quartz中时间参数说明 即Cron表达式Cron表达式&lt;br /&gt;Quartz使用类似于Linux下的Cron表达式定义时间规则，Cron表达式由6或7个由空格分隔的时间字段组成，如表1所示：&lt;br /&gt;表1 Cron表达式时间字段&lt;br /&gt;位置&lt;br /&gt;时间域名&lt;br /&gt;允许值&lt;br /&gt;允许的特殊字符&lt;br /&gt;1&lt;br /&gt;秒&lt;br /&gt;0-59&lt;br /&gt;, - * /&lt;br /&gt;2&lt;br /&gt;分钟&lt;br /&gt;0-59&lt;br /&gt;, - * /&lt;br /&gt;3&lt;br /&gt;小时&lt;br /&gt;0-23&lt;br /&gt;, - * /&lt;br /&gt;4&lt;br /&gt;日期&lt;br /&gt;1-31&lt;br /&gt;, - * ? / L W C &lt;br /&gt;5&lt;br /&gt;月份&lt;br /&gt;1-12&lt;br /&gt;, - * /&lt;br /&gt;6&lt;br /&gt;星期&lt;br /&gt;1-7&lt;br /&gt;, - * ? / L C #&lt;br /&gt;7&lt;br /&gt;年(可选)&lt;br /&gt;空值1970-2099&lt;br /&gt;, - * /&lt;br /&gt;Cron表达式的时间字段除允许设置数值外，还可使用一些特殊的字符，提供列表、范围、通配符等&lt;img src =&quot;http://blog.csdn.net/YOYOOOP/aggbug/3415270.aspx&quot; width = &quot;1&quot; height = &quot;1&quot; /&gt;</description><pubDate>Mon, 01 Dec 2008 05:36:00 +0800</pubDate><author>Andy</author><comments>http://blog.csdn.net/YOYOOOP/archive/2008/11/30/3415270.aspx#Feedback</comments><guid isPermaLink="false">http://blog.csdn.net/YOYOOOP/archive/2008/11/30/3415270.aspx</guid><dc:creator>Andy</dc:creator></item><item><title>Hibernate 解决SQL count(*)的问题.</title><link>http://blog.csdn.net/YOYOOOP/archive/2008/10/21/3116377.aspx</link><wfw:comment>http://blog.csdn.net/YOYOOOP/comments/3116377.aspx</wfw:comment><slash:comments>0</slash:comments><wfw:commentRss>http://blog.csdn.net/YOYOOOP/comments/commentRss/3116377.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=3116377</trackback:ping><description>Hibernate 解决SQL count(*)的问题.&lt;img src =&quot;http://blog.csdn.net/YOYOOOP/aggbug/3116377.aspx&quot; width = &quot;1&quot; height = &quot;1&quot; /&gt;</description><pubDate>Tue, 21 Oct 2008 19:41:00 +0800</pubDate><author>Andy</author><comments>http://blog.csdn.net/YOYOOOP/archive/2008/10/21/3116377.aspx#Feedback</comments><guid isPermaLink="false">http://blog.csdn.net/YOYOOOP/archive/2008/10/21/3116377.aspx</guid><dc:creator>Andy</dc:creator></item><item><title>Java读写Properties文件</title><link>http://blog.csdn.net/YOYOOOP/archive/2008/10/21/3116109.aspx</link><wfw:comment>http://blog.csdn.net/YOYOOOP/comments/3116109.aspx</wfw:comment><slash:comments>0</slash:comments><wfw:commentRss>http://blog.csdn.net/YOYOOOP/comments/commentRss/3116109.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=3116109</trackback:ping><description>package control;
&lt;br /&gt;import java.io.BufferedInputStream;&lt;br /&gt;import java.io.FileInputStream;&lt;br /&gt;import java.io.FileOutputStream;&lt;br /&gt;import java.io.IOException;&lt;br /&gt;import java.io.InputStream;&lt;br /&gt;import java.io.OutputStream;&lt;br /&gt;import java.util.Enumeration;&lt;br /&gt;import java.util.Properties;&lt;br /&gt;public class TestMain {&lt;br /&gt;&lt;br /&gt; //根据key读取value&lt;br /&gt; public static String readValue(String filePath,String key) {&lt;br /&gt;  Properties props = new Properties();&lt;br /&gt;        try {&lt;br /&gt;&lt;img src =&quot;http://blog.csdn.net/YOYOOOP/aggbug/3116109.aspx&quot; width = &quot;1&quot; height = &quot;1&quot; /&gt;</description><pubDate>Tue, 21 Oct 2008 19:27:00 +0800</pubDate><author>Andy</author><comments>http://blog.csdn.net/YOYOOOP/archive/2008/10/21/3116109.aspx#Feedback</comments><guid isPermaLink="false">http://blog.csdn.net/YOYOOOP/archive/2008/10/21/3116109.aspx</guid><dc:creator>Andy</dc:creator></item><item><title>SQL查询重复记录的办法</title><link>http://blog.csdn.net/YOYOOOP/archive/2008/08/06/2777816.aspx</link><wfw:comment>http://blog.csdn.net/YOYOOOP/comments/2777816.aspx</wfw:comment><slash:comments>0</slash:comments><wfw:commentRss>http://blog.csdn.net/YOYOOOP/comments/commentRss/2777816.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=2777816</trackback:ping><description>用select语句，查询重复记录&lt;br /&gt;假设，表名为 T1 子段为 A,B,C&lt;br /&gt; select count(*) ,A,B,C from T1&lt;br /&gt;   group by A,B,C having count(*) &gt; 1 &lt;br /&gt;&lt;br /&gt;测试数据：&lt;br /&gt;    A100          B100          C100      &lt;br /&gt;    A101          B101          C101      &lt;br /&gt;  &amp;nbsp&lt;img src =&quot;http://blog.csdn.net/YOYOOOP/aggbug/2777816.aspx&quot; width = &quot;1&quot; height = &quot;1&quot; /&gt;</description><pubDate>Thu, 07 Aug 2008 01:10:00 +0800</pubDate><author>蒋祖兵</author><comments>http://blog.csdn.net/YOYOOOP/archive/2008/08/06/2777816.aspx#Feedback</comments><guid isPermaLink="false">http://blog.csdn.net/YOYOOOP/archive/2008/08/06/2777816.aspx</guid><dc:creator>蒋祖兵</dc:creator></item><item><title>Oracle SQL的优化</title><link>http://blog.csdn.net/YOYOOOP/archive/2008/08/06/2775879.aspx</link><wfw:comment>http://blog.csdn.net/YOYOOOP/comments/2775879.aspx</wfw:comment><slash:comments>1</slash:comments><wfw:commentRss>http://blog.csdn.net/YOYOOOP/comments/commentRss/2775879.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=2775879</trackback:ping><description>尽量少用IN操作符，基本上所有的IN操作符都可以用EXISTS代替        用IN写出来的SQL的优点是比较容易写及清晰易懂，但是用IN的SQL性能总是比较低的，从ORACLE执行的步骤来分析用IN的SQL与不用IN的SQL有以下区别： &lt;br /&gt;      ORACLE 试图将其转换成多个表的连接，如果转换不成功则先执行IN里面的子查询，再查询外层的表记录，如果转换成功则直接采用多个表的连接方式查询。由此可见用 IN的SQL至少多了一个转换的过程。一般的SQL都可以转换成功，但对于含有分组统计等方面的SQL就不能转换了。 &lt;br /&gt;&lt;br /&gt;        Oracle在执行IN子查询时，首先执行子查询，将查询结果放入临时表再执行主查询。而EXIST则是首先检查主查询，然后运行子查询直到找到第一个匹配项。NOT EXISTS比NOT IN效率稍高。但具体在选择IN或EXIST操作时，要根据主子表数据量大小来具体考虑。 &lt;br /&gt;&lt;br /&gt;&lt;img src =&quot;http://blog.csdn.net/YOYOOOP/aggbug/2775879.aspx&quot; width = &quot;1&quot; height = &quot;1&quot; /&gt;</description><pubDate>Wed, 06 Aug 2008 20:24:00 +0800</pubDate><author>蒋祖兵</author><comments>http://blog.csdn.net/YOYOOOP/archive/2008/08/06/2775879.aspx#Feedback</comments><guid isPermaLink="false">http://blog.csdn.net/YOYOOOP/archive/2008/08/06/2775879.aspx</guid><dc:creator>蒋祖兵</dc:creator></item><item><title>通过年周得到这周所对应的始末日期</title><link>http://blog.csdn.net/YOYOOOP/archive/2008/07/04/2611588.aspx</link><wfw:comment>http://blog.csdn.net/YOYOOOP/comments/2611588.aspx</wfw:comment><slash:comments>0</slash:comments><wfw:commentRss>http://blog.csdn.net/YOYOOOP/comments/commentRss/2611588.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=2611588</trackback:ping><description>通过年周得到这周所对应的始末日期;
Calendar c = new GregorianCalendar();

c.set(Calendar.YEAR, year);c.set(Calendar.WEEK_OF_YEAR, week);

c.set(Calendar.DAY_OF_WEEK, c.getFirstDayOfWeek());

System.out.println(c.getTime());c.roll(Calendar.DAY_OF_WEEK, 6);

System.out.println(c.getTime());
&lt;img src =&quot;http://blog.csdn.net/YOYOOOP/aggbug/2611588.aspx&quot; width = &quot;1&quot; height = &quot;1&quot; /&gt;</description><pubDate>Fri, 04 Jul 2008 22:52:00 +0800</pubDate><author>蒋祖兵</author><comments>http://blog.csdn.net/YOYOOOP/archive/2008/07/04/2611588.aspx#Feedback</comments><guid isPermaLink="false">http://blog.csdn.net/YOYOOOP/archive/2008/07/04/2611588.aspx</guid><dc:creator>蒋祖兵</dc:creator></item><item><title>DB2 Sql语句中将week函数的使用</title><link>http://blog.csdn.net/YOYOOOP/archive/2008/04/22/2315974.aspx</link><wfw:comment>http://blog.csdn.net/YOYOOOP/comments/2315974.aspx</wfw:comment><slash:comments>0</slash:comments><wfw:commentRss>http://blog.csdn.net/YOYOOOP/comments/commentRss/2315974.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=2315974</trackback:ping><description>DB2 Sql语句中将week函数的使用 &lt;img src =&quot;http://blog.csdn.net/YOYOOOP/aggbug/2315974.aspx&quot; width = &quot;1&quot; height = &quot;1&quot; /&gt;</description><pubDate>Wed, 23 Apr 2008 03:12:00 +0800</pubDate><author>Tony</author><comments>http://blog.csdn.net/YOYOOOP/archive/2008/04/22/2315974.aspx#Feedback</comments><guid isPermaLink="false">http://blog.csdn.net/YOYOOOP/archive/2008/04/22/2315974.aspx</guid><dc:creator>Tony</dc:creator></item></channel></rss>