<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>kglife developer&#039;s blog</title>
	<atom:link href="http://blog.kglife.com/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.kglife.com</link>
	<description>our web,our life</description>
	<lastBuildDate>Sat, 28 Nov 2009 16:37:17 +0000</lastBuildDate>
	
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>hibernate one to one 的实现</title>
		<link>http://blog.kglife.com/11_117.html</link>
		<comments>http://blog.kglife.com/11_117.html#comments</comments>
		<pubDate>Sat, 28 Nov 2009 16:37:17 +0000</pubDate>
		<dc:creator>mydozero</dc:creator>
				<category><![CDATA[hibernate]]></category>
		<category><![CDATA[hibernate one to one]]></category>

		<guid isPermaLink="false">http://blog.kglife.com/?p=117</guid>
		<description><![CDATA[one to one 是一种数据库中的一对一的关系，比如在中国一个人只有一张身份证，人跟身份证就是一对一的关系，在hibernate中怎么实现这个做法了，这里数据库有两个 表，一个是user，一个是card，先为他们建一个对应的form类，在User类建一个 Card card对象，在Card类建一个User user对象,这样实现持久化中的你中有我，我中有你，hibernate当中肯定少不了的就是配置各个表的信息了。
以下是配置User表：
&#60;hibernate-mapping&#62;
&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#60;class name=&#8221;org.tinna.User&#8221; table=&#8221;user&#8221;&#62;
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#60;id name=&#8221;userid&#8221; type=&#8221;java.lang.Integer&#8221;&#62;
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#60;column name=&#8221;userid&#8221; /&#62;
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#60;generator /&#62;
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#60;/id&#62;
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#60;property name=&#8221;username&#8221; type=&#8221;java.lang.String&#8221;&#62;
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#60;column name=&#8221;username&#8221; length=&#8221;20&#8243; /&#62;
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#60;/property&#62;
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#60;one-to-one name=&#8221;card&#8221; cascade=&#8221;all&#8221;&#62;&#60;/one-to-one&#62;
&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#60;/class&#62;
&#60;/hibernate-mapping&#62;

配置Card表:
&#60;hibernate-mapping&#62;
&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#60;class name=&#8221;org.tinna.Card&#8221; table=&#8221;card&#8221;&#62;
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#60;id name=&#8221;cardid&#8221; type=&#8221;java.lang.Integer&#8221;&#62;
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#60;column name=&#8221;cardid&#8221; /&#62;
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#60;generator &#62;
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#60;param name=&#8221;property&#8221;&#62;user&#60;/param&#62;
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#60;/generator&#62;
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#60;/id&#62;
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#60;property name=&#8221;cardnum&#8221; type=&#8221;java.lang.Integer&#8221;&#62;
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#60;column name=&#8221;cardnum&#8221; /&#62;
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#60;/property&#62;
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#60;one-to-one [...]]]></description>
		<wfw:commentRss>http://blog.kglife.com/11_117.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Struts中Invalid property name &#8221;解决</title>
		<link>http://blog.kglife.com/11_114.html</link>
		<comments>http://blog.kglife.com/11_114.html#comments</comments>
		<pubDate>Sat, 28 Nov 2009 16:34:01 +0000</pubDate>
		<dc:creator>mydozero</dc:creator>
				<category><![CDATA[Struts]]></category>
		<category><![CDATA[Invalid property name]]></category>

		<guid isPermaLink="false">http://blog.kglife.com/?p=114</guid>
		<description><![CDATA[在刷新页面的时候tomcat报了错，500，Invalid property name &#8216;limittime1&#8242;
后来发现，原来是xml文件里面对于form没有修改完整，怎么说呢，&#8217;limittime1&#8242;这个字段在javabean里面是有的，可是在form里面，配置form信息的时候就忘记了配置，如下：
&#60;form-bean name=&#8221;bulletinForm&#8221; type=&#8221;org.apache.struts.action.DynaActionForm&#8221;&#62;
&#160;&#160;&#160;&#160; &#60;form-property name=&#8221;limittime&#8221; type=&#8221;java.lang.String&#8221; /&#62;
&#160;&#160; &#60;form-property name=&#8221;content&#8221; type=&#8221;java.lang.String&#8221; /&#62;
要记住在Struts里面的form属性声明时。不要漏了应该有的字段，虽然说struts把提交好的form对象来回传递时自动的，可是自动也是建立在你的手动之上的呀~要记得部署好哦~
&#160;
而且name是什么，在java里面去form对象字段值的时候就用哪个名，如下：
public ActionForward execute(ActionMapping mapping, ActionForm form0, HttpServletRequest request, HttpServletResponse response) throws Exception {
DynaActionForm form = (DynaActionForm)form0;
String limitTime = Charset.decode(form.getString(&#8221;limittime&#8221;));
]]></description>
		<wfw:commentRss>http://blog.kglife.com/11_114.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Struts+hibernate+mysql乱码处理</title>
		<link>http://blog.kglife.com/11_111.html</link>
		<comments>http://blog.kglife.com/11_111.html#comments</comments>
		<pubDate>Sat, 28 Nov 2009 11:43:25 +0000</pubDate>
		<dc:creator>mydozero</dc:creator>
				<category><![CDATA[Struts]]></category>

		<guid isPermaLink="false">http://blog.kglife.com/?p=111</guid>
		<description><![CDATA[在hibernate连接数据库中加入
jdbc:mysql://localhost:3306/数据库名?useUnicode=true&#38;amp;characterEncoding=UTF-8
为指定数据库默认编码格式。在C:\WINDOWS目录下找到my.ini文件，并在[mysqld]中加入default-character-set=gbk，重新启动mysql服务。
]]></description>
		<wfw:commentRss>http://blog.kglife.com/11_111.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>浏览器Firefox与IE在CSS样式表中的差异</title>
		<link>http://blog.kglife.com/11_101.html</link>
		<comments>http://blog.kglife.com/11_101.html#comments</comments>
		<pubDate>Fri, 20 Nov 2009 04:24:13 +0000</pubDate>
		<dc:creator>mydozero</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[ie]]></category>
		<category><![CDATA[差异]]></category>
		<category><![CDATA[样式]]></category>

		<guid isPermaLink="false">http://blog.kglife.com/?p=101</guid>
		<description><![CDATA[1 针对firefox ie6 ie7的css样式
现在大部分都是用!important来hack，对于ie6和firefox测试可以正常显示，但是ie7对!important可以正确解释，会导致页面没按要求显示！找到一个针对IE7不错的hack方式就是使用“* html”，现在用IE7浏览一下，应该没有问题了。
现在写一个CSS可以这样：
#1 { color: #333; } /* Moz */
* html #1 { color: #666; } /* IE6 */
* html #1 { color: #999; } /* IE7 */
那么在firefox下字体颜色显示为#333，IE6下字体颜色显示为#666，IE7下字体颜色显示为#999。
2 css布局中的居中问题
主要的样式定义如下：

body {TEXT-ALIGN: center;}
#center { MARGIN-RIGHT: auto; MARGIN-LEFT: auto; }
说明：
首先在父级元素定义TEXT-ALIGN: center;这个的意思就是在父级元素内的内容居中；对于IE这样设定就已经可以了。
但在mozilla中不能居中。解决办法就是在子元素定义时候设定时再加上“MARGIN-RIGHT: auto;MARGIN-LEFT: auto; ”
需要说明的是，如果你想用这个方法使整个页面要居中，建议不要套在一个DIV里，你可以依次拆出多个div，只要在每个拆出的div里定义MARGIN-RIGHT: auto;MARGIN-LEFT: auto; 就可以了。
3&#160;&#160;盒模型不同解释.

#box{
&#160;&#160; width:600px;
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;//for&#160;&#160; ie6.0-&#160;&#160; w\idth:500px;
&#160;&#160;&#160;&#160;&#160;&#160; //for&#160;&#160;ff ie6.0
}
#box{
&#160;&#160; width:600px!important
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;//for ff
&#160;&#160;&#160;&#160;width:600px;
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;//for&#160;&#160;ff ie6.0
&#160;&#160;&#160;&#160;width /**/:500px;
&#160;&#160;&#160;&#160;&#160;&#160; [...]]]></description>
		<wfw:commentRss>http://blog.kglife.com/11_101.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SQL语句,数据库设计优化建议(网上收集)</title>
		<link>http://blog.kglife.com/11_94.html</link>
		<comments>http://blog.kglife.com/11_94.html#comments</comments>
		<pubDate>Thu, 19 Nov 2009 17:15:15 +0000</pubDate>
		<dc:creator>ckson</dc:creator>
				<category><![CDATA[MYSQL]]></category>
		<category><![CDATA[开发日志]]></category>
		<category><![CDATA[sql]]></category>
		<category><![CDATA[优化]]></category>
		<category><![CDATA[建议]]></category>
		<category><![CDATA[数据库]]></category>

		<guid isPermaLink="false">http://blog.kglife.com/?p=94</guid>
		<description><![CDATA[1、    用程序中，保证在实现功能的基础上，尽量减少对数据库的访问次数；通过搜索参数，尽量减少对表的访问行数,最小化结果集，从而减轻网络负担；能够分开的操作尽量分开处理，提高每次的响应速度；在数据窗口使用SQL时，尽量把使用的索引放在选择的首列；算法的结构尽量简单；在查询时，不要过多地使用通配符如SELECT * FROM T1语句，要用到几列就选择几列如：SELECT COL1,COL2 FROM T1；在可能的情况下尽量限制尽量结果集行数如：SELECT TOP 300 COL1,COL2,COL3 FROM T1,因为某些情况下用户是不需要那么多的数据的。不要在应用中使用数据库游标，游标是非常有用的工具，但比使用常规的、面向集的SQL语句需要更大的开销；按照特定顺序提取数据的查找。]]></description>
		<wfw:commentRss>http://blog.kglife.com/11_94.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>IxEdit: 所见即所得的jQuery设计工具</title>
		<link>http://blog.kglife.com/11_88.html</link>
		<comments>http://blog.kglife.com/11_88.html#comments</comments>
		<pubDate>Thu, 19 Nov 2009 14:50:00 +0000</pubDate>
		<dc:creator>ckson</dc:creator>
				<category><![CDATA[Jquery]]></category>
		<category><![CDATA[IxEdit]]></category>
		<category><![CDATA[工具]]></category>
		<category><![CDATA[所见即所得]]></category>
		<category><![CDATA[设计]]></category>

		<guid isPermaLink="false">http://blog.kglife.com/?p=88</guid>
		<description><![CDATA[今晚朋友介绍了一个jquer的设计工具,废话不多说,先给出官方网站:
       
http://www.ixedit.com/]]></description>
		<wfw:commentRss>http://blog.kglife.com/11_88.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>加密地址</title>
		<link>http://blog.kglife.com/11_83.html</link>
		<comments>http://blog.kglife.com/11_83.html#comments</comments>
		<pubDate>Mon, 09 Nov 2009 13:32:37 +0000</pubDate>
		<dc:creator>ckson</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[开发日志]]></category>
		<category><![CDATA[TP]]></category>
		<category><![CDATA[UCHOM]]></category>
		<category><![CDATA[地址加密]]></category>

		<guid isPermaLink="false">http://blog.kglife.com/11_83.html</guid>
		<description><![CDATA[最近在开发的时候看见UCHOME的注册地址和登陆地址是随机产生的.正确的来说应该是加密了.]]></description>
		<wfw:commentRss>http://blog.kglife.com/11_83.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>提高MYSQL SQL执行效率的几点建议</title>
		<link>http://blog.kglife.com/11_77.html</link>
		<comments>http://blog.kglife.com/11_77.html#comments</comments>
		<pubDate>Sun, 08 Nov 2009 17:57:45 +0000</pubDate>
		<dc:creator>ckson</dc:creator>
				<category><![CDATA[MYSQL]]></category>
		<category><![CDATA[开发日志]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[sql]]></category>
		<category><![CDATA[效率]]></category>

		<guid isPermaLink="false">http://blog.kglife.com/?p=77</guid>
		<description><![CDATA[提高SQL执行效率的几点建议:
◆尽量不要在where中包含子查询;]]></description>
		<wfw:commentRss>http://blog.kglife.com/11_77.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>google项目管理(基于SVN)</title>
		<link>http://blog.kglife.com/11_69.html</link>
		<comments>http://blog.kglife.com/11_69.html#comments</comments>
		<pubDate>Fri, 06 Nov 2009 11:43:38 +0000</pubDate>
		<dc:creator>ckson</dc:creator>
				<category><![CDATA[开发日志]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[SVN]]></category>

		<guid isPermaLink="false">http://blog.kglife.com/?p=69</guid>
		<description><![CDATA[SVN 解释:http://zh.wikipedia.org/wiki/Subversion

说白了就是一个代码 版本控制.]]></description>
		<wfw:commentRss>http://blog.kglife.com/11_69.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>五笔和拼音的选择</title>
		<link>http://blog.kglife.com/10_52.html</link>
		<comments>http://blog.kglife.com/10_52.html#comments</comments>
		<pubDate>Sat, 17 Oct 2009 11:24:49 +0000</pubDate>
		<dc:creator>ckson</dc:creator>
				<category><![CDATA[日常生活]]></category>
		<category><![CDATA[五笔]]></category>
		<category><![CDATA[拼音]]></category>
		<category><![CDATA[选择]]></category>

		<guid isPermaLink="false">http://blog.kglife.com/2009/10/52/</guid>
		<description><![CDATA[高中的时间学习了五笔,不过那时候一直都是打拼音的&#8230;
到了大学平时上网不用打字那么快就学着用五笔.
现在打五笔应该都比打拼音快了,可是还是有很多字不会打,所以有时候都不知道怎么选择好.
现在唯有五笔和拼音一起用了&#8230;
]]></description>
		<wfw:commentRss>http://blog.kglife.com/10_52.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
