<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[crazy_coder的专栏]]></title><description><![CDATA[]]></description><link>https://blog.youkuaiyun.com/crazy_coder</link><language>zh-cn</language><generator>https://blog.youkuaiyun.com/</generator><copyright><![CDATA[Copyright &copy; crazy_coder]]></copyright><item><title><![CDATA[Math.abs(int) in Java]]></title><link>https://blog.youkuaiyun.com/crazy_coder/article/details/6674205</link><guid>https://blog.youkuaiyun.com/crazy_coder/article/details/6674205</guid><author>crazy_coder</author><pubDate>Tue, 09 Aug 2011 23:23:11 +0800</pubDate><description><![CDATA[Math.abs(int):
returns the absolute value of the parameter.
If the parameter is equal to Integer.MIN_VALUE(-2147483648), it will return th]]></description><category></category></item><item><title><![CDATA[Summary on 20081111: system method in sql server2005]]></title><link>https://blog.youkuaiyun.com/crazy_coder/article/details/3278750</link><guid>https://blog.youkuaiyun.com/crazy_coder/article/details/3278750</guid><author>crazy_coder</author><pubDate>Tue, 11 Nov 2008 21:35:00 +0800</pubDate><description><![CDATA[In sql server 2005, there is no support for array.when you print something using  print @dddvalue, when @dddvalue is null, there will be nothing printedcharindex(search, @src) will get the ind]]></description><category></category></item><item><title><![CDATA[Summary on 20080820: when hibernate session will be flushed]]></title><link>https://blog.youkuaiyun.com/crazy_coder/article/details/2803972</link><guid>https://blog.youkuaiyun.com/crazy_coder/article/details/2803972</guid><author>crazy_coder</author><pubDate>Wed, 20 Aug 2008 22:48:00 +0800</pubDate><description><![CDATA[Hibernate session will be flushed in the following scenario:1. use session.flush()2. do search use session3. use transaction.commit()]]></description><category></category></item><item><title><![CDATA[Summay on 20080820: Hibernate operation method comparation]]></title><link>https://blog.youkuaiyun.com/crazy_coder/article/details/2803920</link><guid>https://blog.youkuaiyun.com/crazy_coder/article/details/2803920</guid><author>crazy_coder</author><pubDate>Wed, 20 Aug 2008 22:20:00 +0800</pubDate><description><![CDATA[Hibernate provide kinds of operation methods to save/update/delete object. here we just give one simple conclusion of those method and their difference: save/update/saveOrUpdatethose three metho]]></description><category></category></item><item><title><![CDATA[Summary on 20080717: web page refresh]]></title><link>https://blog.youkuaiyun.com/crazy_coder/article/details/2668554</link><guid>https://blog.youkuaiyun.com/crazy_coder/article/details/2668554</guid><author>crazy_coder</author><pubDate>Thu, 17 Jul 2008 22:34:00 +0800</pubDate><description><![CDATA[These days Im working on web page refresh, and find that there are lots of ways to refresh page:1. window.location.reload(true/false)2. window.location.href = window.location.href(url)3. window.locat]]></description><category></category></item><item><title><![CDATA[Summary on 20080716: close the current page through backend bean method]]></title><link>https://blog.youkuaiyun.com/crazy_coder/article/details/2662974</link><guid>https://blog.youkuaiyun.com/crazy_coder/article/details/2662974</guid><author>crazy_coder</author><pubDate>Wed, 16 Jul 2008 20:56:00 +0800</pubDate><description><![CDATA[There is such process that: in home page, click some link/button to open one pop up child window, in the window, input/edit/add some content and click  submit button to submit the change, if the cha]]></description><category></category></item><item><title><![CDATA[merge two column into one field in sql and hql]]></title><link>https://blog.youkuaiyun.com/crazy_coder/article/details/2646393</link><guid>https://blog.youkuaiyun.com/crazy_coder/article/details/2646393</guid><author>crazy_coder</author><pubDate>Sun, 13 Jul 2008 23:11:00 +0800</pubDate><description><![CDATA[some times, we want to consider two columns in db as one field in service, for example, well save first name and last name seperately in db, but in UI, we want to display them together.In this case, ]]></description><category></category></item><item><title><![CDATA[Summary on 20080710: union and projection search by QBC]]></title><link>https://blog.youkuaiyun.com/crazy_coder/article/details/2636384</link><guid>https://blog.youkuaiyun.com/crazy_coder/article/details/2636384</guid><author>crazy_coder</author><pubDate>Thu, 10 Jul 2008 23:42:00 +0800</pubDate><description><![CDATA[1. union and projection search by QBC:in hibernate, QBC can do projection search by use the Projections class.The implementation can be as followed:Class Student{    Integer stuId;    ]]></description><category></category></item><item><title><![CDATA[Summary on 20080707: Hibernate operation on many-to-one relation]]></title><link>https://blog.youkuaiyun.com/crazy_coder/article/details/2623168</link><guid>https://blog.youkuaiyun.com/crazy_coder/article/details/2623168</guid><author>crazy_coder</author><pubDate>Mon, 07 Jul 2008 23:57:00 +0800</pubDate><description><![CDATA[Hibernate many-to-one relation mapping:public class Student{    .....    private CoreClass class;    public CoreClass getter....    public void setter}public cl]]></description><category></category></item><item><title><![CDATA[Summary on 20080706: setting for many-to-many mapping in hibernate]]></title><link>https://blog.youkuaiyun.com/crazy_coder/article/details/2619283</link><guid>https://blog.youkuaiyun.com/crazy_coder/article/details/2619283</guid><author>crazy_coder</author><pubDate>Sun, 06 Jul 2008 23:05:00 +0800</pubDate><description><![CDATA[For n-n relationship in database, hibernate supplies the many-to-many mapping type. lets take the class and teacher relation as the example; one class can have different teachers, and also, one teach]]></description><category></category></item><item><title><![CDATA[Hibernate cascade order for one-to-many mapping]]></title><link>https://blog.youkuaiyun.com/crazy_coder/article/details/2609888</link><guid>https://blog.youkuaiyun.com/crazy_coder/article/details/2609888</guid><author>crazy_coder</author><pubDate>Thu, 03 Jul 2008 23:39:00 +0800</pubDate><description><![CDATA[1. for one-to-many: teacher 1: n students the order of save: save teacher, save students, update students with teacher idthe order of delete: update students, set teacher = null, delete students, ]]></description><category></category></item><item><title><![CDATA[Summary on 20080703: Attention for hibernate operation]]></title><link>https://blog.youkuaiyun.com/crazy_coder/article/details/2609879</link><guid>https://blog.youkuaiyun.com/crazy_coder/article/details/2609879</guid><author>crazy_coder</author><pubDate>Thu, 03 Jul 2008 23:33:00 +0800</pubDate><description><![CDATA[1. Check null for result returned by get, because if the object specified by identifier id is not exist in db, null will be returned2. Check the list returned by hibernate, 2.1 check whether the l]]></description><category></category></item><item><title><![CDATA[Summary on 20080701: insert value for identity column in sql]]></title><link>https://blog.youkuaiyun.com/crazy_coder/article/details/2606581</link><guid>https://blog.youkuaiyun.com/crazy_coder/article/details/2606581</guid><author>crazy_coder</author><pubDate>Wed, 02 Jul 2008 21:39:00 +0800</pubDate><description><![CDATA[In MSSQLServer, by default, user can‘t insert/assign/update value for identity column; SQLServer will do this for user automatically, so there is one problem caused that: what will do if  wants to ass]]></description><category></category></item><item><title><![CDATA[Summary on 20080626: hibernate configuration and hbm2ddl tool]]></title><link>https://blog.youkuaiyun.com/crazy_coder/article/details/2590434</link><guid>https://blog.youkuaiyun.com/crazy_coder/article/details/2590434</guid><author>crazy_coder</author><pubDate>Fri, 27 Jun 2008 00:06:00 +0800</pubDate><description><![CDATA[xml file is actualy like the following format:     PUBLIC "-//hibernate/hibernate mapping dtd 3.0//EN"     "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">in the hibernate configu]]></description><category></category></item><item><title><![CDATA[Summary on 20080626: some difference between JDBC transaction and JTA]]></title><link>https://blog.youkuaiyun.com/crazy_coder/article/details/2590418</link><guid>https://blog.youkuaiyun.com/crazy_coder/article/details/2590418</guid><author>crazy_coder</author><pubDate>Thu, 26 Jun 2008 23:52:00 +0800</pubDate><description><![CDATA[transaction in JDBC is based on connection, one transaction can only has one connection, which is actually one session;JTA is based on transaction manager, one transaction in JTA can go across more th]]></description><category></category></item><item><title><![CDATA[Summary on 20080623: dispatch in servlet]]></title><link>https://blog.youkuaiyun.com/crazy_coder/article/details/2580253</link><guid>https://blog.youkuaiyun.com/crazy_coder/article/details/2580253</guid><author>crazy_coder</author><pubDate>Mon, 23 Jun 2008 20:45:00 +0800</pubDate><description><![CDATA[In servlet, there is class named RequestDispatcher, this dispatcher will send/include the request to another web resource, like JSP or Servlet. In jsp, there is expression like:  or , however, those e]]></description><category></category></item><item><title><![CDATA[Check for the content of input in UI]]></title><link>https://blog.youkuaiyun.com/crazy_coder/article/details/2576874</link><guid>https://blog.youkuaiyun.com/crazy_coder/article/details/2576874</guid><author>crazy_coder</author><pubDate>Sun, 22 Jun 2008 22:35:00 +0800</pubDate><description><![CDATA[I think for any UI input field, we should do the following check:1. whether empty string is allowed2. whether duplicate value is allowed3. whether special character is allowed, like: @, #, $, & ]]></description><category></category></item><item><title><![CDATA[how to config when use hibernate+sqlserver2005]]></title><link>https://blog.youkuaiyun.com/crazy_coder/article/details/2576210</link><guid>https://blog.youkuaiyun.com/crazy_coder/article/details/2576210</guid><author>crazy_coder</author><pubDate>Sun, 22 Jun 2008 17:43:00 +0800</pubDate><description><![CDATA[1. there is sql server 2005 express edition which is free, user can download from: http://msdn.microsoft.com/zh-cn/express/bb410792.aspx 2. download jdbc driver from micorsoft, choose the proper dri]]></description><category></category></item><item><title><![CDATA[Summary on 20080617: using forward or redirection in jsp and servlet]]></title><link>https://blog.youkuaiyun.com/crazy_coder/article/details/2559144</link><guid>https://blog.youkuaiyun.com/crazy_coder/article/details/2559144</guid><author>crazy_coder</author><pubDate>Tue, 17 Jun 2008 23:53:00 +0800</pubDate><description><![CDATA[In Jsp and Servlet, when traverse between Jsp page and Servlet, there are two ways:1. using jsp:forward2. using response.sendRedirect(url)here is the summary of the each method:jsp:forward]]></description><category></category></item><item><title><![CDATA[Summary on 20080616: Basic usage of Enum in Java1.5]]></title><link>https://blog.youkuaiyun.com/crazy_coder/article/details/2554757</link><guid>https://blog.youkuaiyun.com/crazy_coder/article/details/2554757</guid><author>crazy_coder</author><pubDate>Mon, 16 Jun 2008 22:03:00 +0800</pubDate><description><![CDATA[The type Enum is imported by Java1.5, here are some of the notice about using Enum in Java1. Enum is actually one interface2. Consider Enum as one simple class with several pre-defined instance, s]]></description><category></category></item></channel></rss>