<?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"
	>

<channel>
	<title>^o^凹凸镜^_^</title>
	<atom:link href="http://chen.yyde.info/blog/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://chen.yyde.info/blog</link>
	<description>偷闲一处，放松一角</description>
	<pubDate>Wed, 04 Nov 2009 10:29:18 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6</generator>
	<language>en</language>
			<item>
		<title>优化hibernate性能</title>
		<link>http://chen.yyde.info/blog/?p=73</link>
		<comments>http://chen.yyde.info/blog/?p=73#comments</comments>
		<pubDate>Wed, 04 Nov 2009 10:29:18 +0000</pubDate>
		<dc:creator>chenyue</dc:creator>
		
		<category><![CDATA[Web Devolop]]></category>

		<guid isPermaLink="false">http://chen.yyde.info/blog/?p=73</guid>
		<description><![CDATA[优化hibernate性能的几点建议 					 收藏 

						document.body.oncopy = function() {
							if (window.clipboardData) {
								setTimeout(function() {
									var text = clipboardData.getData("text"); 
									if (text &#38;&#38; text.length&#62;300) {
										text = text + "\r\n\n本文来自CSDN博客，转载请标明出处：" + location.href;
										clipboardData.setData("text", text); 
									}
								}, 100);
							}
						}
					 function StorePage(){d=document;t=d.selection?(d.selection.type!='None'?d.selection.createRange().text:''):(d.getSelection?d.getSelection():'');void(keyit=window.open('http://www.365key.com/storeit.aspx?t='+escape(d.title)+'&#38;u='+escape(d.location.href)+'&#38;c='+escape(t),'keyit','scrollbars=no,width=475,height=575,left=75,top=20,status=no,resizable=yes'));keyit.focus();}
1、针对oracle数据库而言，Fetch Size 是设定JDBC的Statement读取数据的时候每次从数据库中取出的记录条数，一般设置为30、50、100。Oracle数据库的JDBC驱动默认的Fetch Size=15，设置Fetch Size设置为：30、50，性能会有明显提升，如果继续增大，超出100，性能提升不明显，反而会消耗内存。
即在hibernate配制文件中进行配制：



1 ＜property name=&#8221;hibernateProperties&#8221;＞
2 ＜props＞
3 ＜prop key=&#8221;hibernate.dialect&#8221;＞org.hibernate.dialect.Oracle9Dialect＜/prop＞
4 ＜prop key=&#8221;hibernate.show_sql&#8221;＞false＜/prop＞
5 ＜!&#8211; Create/update the database tables automatically when the JVM starts up
6 ＜prop key=&#8221;hibernate.hbm2ddl.auto&#8221;＞update＜/prop＞ &#8211;＞
7 ＜!&#8211; [...]]]></description>
			<content:encoded><![CDATA[<h1 class="title_txt">优化hibernate性能的几点建议 					<cite class="fav_csdnstylebykimi"> <a class="fav_csdnstylebykimi" title="收藏到我的网摘中，并分享给我的朋友" href="javascript:d=document;t=d.selection?(d.selection.type!='None'?d.selection.createRange().text:''):(d.getSelection?d.getSelection():'');void(saveit=window.open('http://wz.csdn.net/storeit.aspx?t='+escape(d.title)+'&amp;u='+escape(d.location.href)+'&amp;c='+escape(t),'saveit','scrollbars=no,width=590,height=300,left=75,top=20,status=no,resizable=yes'));saveit.focus();">收藏</a> </cite></h1>
<p><script type="text/javascript">
						document.body.oncopy = function() {
							if (window.clipboardData) {
								setTimeout(function() {
									var text = clipboardData.getData("text"); 
									if (text &amp;&amp; text.length&gt;300) {
										text = text + "\r\n\n本文来自CSDN博客，转载请标明出处：" + location.href;
										clipboardData.setData("text", text); 
									}
								}, 100);
							}
						}
					</script> <script type="text/javascript">function StorePage(){d=document;t=d.selection?(d.selection.type!='None'?d.selection.createRange().text:''):(d.getSelection?d.getSelection():'');void(keyit=window.open('http://www.365key.com/storeit.aspx?t='+escape(d.title)+'&amp;u='+escape(d.location.href)+'&amp;c='+escape(t),'keyit','scrollbars=no,width=475,height=575,left=75,top=20,status=no,resizable=yes'));keyit.focus();}</script></p>
<p>1、针对<a href="http://www.pcdog.com/special/2006/index.html" target="_blank">oracle</a>数据库而言，Fetch Size 是设定JDBC的Statement读取数据的时候每次从数据库中取出的记录条数，一般设置为30、50、100。<a href="http://writeblog.csdn.net/net/336/index.html" target="_blank">Oracle数据库</a>的JDBC驱动默认的Fetch Size=15，设置Fetch Size设置为：30、50，性能会有明显提升，如果继续增大，超出100，性能提升不明显，反而会消耗内存。</p>
<p>即在<a href="http://www.pcdog.com/special/1202/index.html" target="_blank">hibernate</a>配制文件中进行配制：</p>
<table border="1" width="90%" align="center" bgcolor="#e3e3e3" bordercolor="#cccccc">
<tbody>
<tr>
<td>1 ＜property name=&#8221;hibernateProperties&#8221;＞<br />
2 ＜props＞<br />
3 ＜prop key=&#8221;hibernate.dialect&#8221;＞org.hibernate.dialect.Oracle9Dialect＜/prop＞<br />
4 ＜prop key=&#8221;hibernate.show_sql&#8221;＞false＜/prop＞<br />
5 ＜!&#8211; Create/update the database tables automatically when the JVM starts up<br />
6 ＜prop key=&#8221;hibernate.hbm2ddl.auto&#8221;＞update＜/prop＞ &#8211;＞<br />
7 ＜!&#8211; Turn batching off for better error messages under PostgreSQL<br />
8 ＜prop key=&#8221;hibernate.jdbc.batch_size&#8221;＞100＜/prop＞ &#8211;＞<br />
9 ＜prop key=&#8221;hibernate.jdbc.batch_size&#8221;＞50＜/prop＞<br />
10 ＜/props＞<br />
11 ＜/property＞Fetch Size设的越大，读数据库的次数越少，速度越快；Fetch Size越小，读数据库的次数越多，速度越慢。</td>
</tr>
</tbody>
</table>
<p>2、如果是超大的系统，建议生成htm文件。加快页面提升速度。</p>
<p>3、不要把所有的责任推在hibernate上，对代码进行重构，减少对数据库的操作，尽量避免在数据库查询时使用in操作，以及避免递归查询操作，代码质量、系统设计的合理性决定系统性能的高低。</p>
<p>4、 对大数据量查询时，慎用list()或者iterator()返回查询结果，</p>
<p>（1）. 使用List()返回结果时，Hibernate会所有查询结果初始化为持久化对象，结果集较大时，会占用很多的处理时间。</p>
<p>（2）. 而使用iterator()返回结果时，在每次调用iterator.next()返回对象并使用对象时，Hibernate才调用查询将对应的对象初始 化，对于大数据量时，每调用一次查询都会花费较多的时间。当结果集较大，但是含有较大量相同的数据，或者结果集不是全部都会使用时，使用 iterator()才有优势。</p>
<p>5、在一对多、多对一的关系中，使用延迟加载机制，会使不少的对象在使用时方会初始化，这样可使得节省内存空间以及减少数据库的负荷，而且若PO中的集合没有被使用时，就可减少互数据库的交互从而减少处理时间。</p>
<p>6、对含有关联的PO（持久化对象）时，若default-cascade=&#8221;all&#8221;或者 “save-update”，新增PO时，请注意对PO中的集合的赋值操作，因为有可能使得多执行一次update操作。</p>
<p>7、 对于大数据量新增、修改、删除操作或者是对大数据量的查询，与数据库的交互次数是决定处理时间的最重要因素，减少交互的次数是提升效率的最好途径，所以在 开发过程中，请将show_sql设置为true，深入了解Hibernate的处理过程，尝试不同的方式，可以使得效率提升。尽可能对每个页面的显示， 对数据库的操作减少到100&#8212;-150条以内。越少越好。</p>
<h1 class="title_txt">Hibernate 处理大数据量的方案  					<cite class="fav_csdnstylebykimi"> <a class="fav_csdnstylebykimi" title="收藏到我的网摘中，并分享给我的朋友" href="javascript:d=document;t=d.selection?(d.selection.type!='None'?d.selection.createRange().text:''):(d.getSelection?d.getSelection():'');void(saveit=window.open('http://wz.csdn.net/storeit.aspx?t='+escape(d.title)+'&amp;u='+escape(d.location.href)+'&amp;c='+escape(t),'saveit','scrollbars=no,width=590,height=300,left=75,top=20,status=no,resizable=yes'));saveit.focus();">收藏</a> </cite></h1>
<p><script type="text/javascript">
						document.body.oncopy = function() {
							if (window.clipboardData) {
								setTimeout(function() {
									var text = clipboardData.getData("text"); 
									if (text &amp;&amp; text.length&gt;300) {
										text = text + "\r\n\n本文来自CSDN博客，转载请标明出处：" + location.href;
										clipboardData.setData("text", text); 
									}
								}, 100);
							}
						}
					</script> <script type="text/javascript">function StorePage(){d=document;t=d.selection?(d.selection.type!='None'?d.selection.createRange().text:''):(d.getSelection?d.getSelection():'');void(keyit=window.open('http://www.365key.com/storeit.aspx?t='+escape(d.title)+'&amp;u='+escape(d.location.href)+'&amp;c='+escape(t),'keyit','scrollbars=no,width=475,height=575,left=75,top=20,status=no,resizable=yes'));keyit.focus();}</script></p>
<div class="blog_content">
<p>大家知道，Hibernate 有 一级 cache (Session 级) 和二级 cache (需另外配置，如 ehcache),<br />
以下代码，Hibernate 在处理到大约50000条记录时，就会抛出 <tt class="literal"><span style="font-size: small;"><span style="font-size: x-small;">OutOfMemoryException</span></span></tt>, 这是因为，Hibernate 把所有新建的 MiniMessage 对象都放在了 Session 级的缓存中了。</p>
<pre>Session session = null;
Transaction tx = null;
try {
session = HibernateUtil.getSessionFactory().openSession();
tx = session.beginTransaction();
for(int i=0; i&lt;300000; i++ ) {
 System.out.println(i + ".................");
 MiniMessage message = new MiniMessage("Hello World" + i);
 session.save(message);

      }

tx.commit();

} catch (HibernateException he) {
tx.rollback();
throw he;
} finally {
session.close();
}</pre>
<h3>解决办法：</h3>
<p>使用&#8221;批处理”(Batch process)</p>
<pre>Session session = null;

try {
session = HibernateUtil.getSessionFactory().getCurrentSession();
Transaction tx = session.beginTransaction();

       for(int i=0; i&lt;200000; i++ ) {
 log.debug(i + ".................");

 MiniMessage message = new MiniMessage("Hello World" + (i+1));
 session.save(message);
 if ( i % 100 == 0 ) {
  //100, same as the JDBC batch size set in xml file:
  // &lt;property name="hibernate.jdbc.batch_size"&gt;100&lt;/property&gt;
  //flush a batch of inserts and release memory:
  log.debug("fulsh at : " + i + ".................");

  session.flush();
  session.clear();
 }
}

session.getTransaction().commit();
} catch (HibernateException he) {

session.getTransaction().rollback();

throw he;
}</pre>
<p>在这种情况下，需要在hibernate.cfg.xml 配置几个参数来达到更好的效果：</p>
<h4>1. 配置批处理的大小</h4>
<pre> &lt;property name="hibernate.jdbc.batch_size"&gt;100&lt;/property&gt;</pre>
<h4>2. 放弃二级缓存：</h4>
<pre>  &lt;!-- Disable the second-level cache because the
batch process is one-off process. --&gt;

   &lt;property
name="hibernate.cache.provider_class"&gt;org.hibernate.cache.NoCacheProvider&lt;/property&gt;

   &lt;property
name="hibernate.cache.use_second_level_cache"&gt;false&lt;/property&gt;

   &lt;property
name="hibernate.cache.use_query_cache"&gt;false&lt;/property&gt;

   &lt;property
name="hibernate.cache.use_minimal_puts"&gt;false&lt;/property&gt;</pre>
<p>这样，Hibernate 会在每 100 个插入后，与数据库同步一次，并将一级缓存中的实体对象清除。</p></div>
]]></content:encoded>
			<wfw:commentRss>http://chen.yyde.info/blog/?feed=rss2&amp;p=73</wfw:commentRss>
		</item>
		<item>
		<title> (</title>
		<link>http://chen.yyde.info/blog/?p=69</link>
		<comments>http://chen.yyde.info/blog/?p=69#comments</comments>
		<pubDate>Tue, 27 Oct 2009 20:44:24 +0000</pubDate>
		<dc:creator>chenyue</dc:creator>
		
		<category><![CDATA[Web Devolop]]></category>

		<guid isPermaLink="false">http://chen.yyde.info/blog/?p=69</guid>
		<description><![CDATA[关键字: if endif ie firefox ! [] &#60; &#62;
1. &#60;!&#8211;[if !IE]&#62;&#60;!&#8211;&#62; 除IE外都可识别 &#60;!&#8211;&#60;![endif]&#8211;&#62;
2. &#60;!&#8211;[if IE]&#62; 所有的IE可识别 &#60;![endif]&#8211;&#62;
3. &#60;!&#8211;[if IE 5.0]&#62; 只有IE5.0可以识别 &#60;![endif]&#8211;&#62;
4. &#60;!&#8211;[if IE 5]&#62; 仅IE5.0与IE5.5可以识别 &#60;![endif]&#8211;&#62;
5. &#60;!&#8211;[if gt IE 5.0]&#62; IE5.0以及IE5.0以上版本都可以识别 &#60;![endif]&#8211;&#62;
6. &#60;!&#8211;[if IE 6]&#62; 仅IE6可识别 &#60;![endif]&#8211;&#62;
7. &#60;!&#8211;[if lt IE 6]&#62; IE6以及IE6以下版本可识别 &#60;![endif]&#8211;&#62;
8. &#60;!&#8211;[if gte IE 6]&#62; IE6以及IE6以上版本可识别 &#60;![endif]&#8211;&#62;
9. &#60;!&#8211;[if IE 7]&#62; 仅IE7可识别 &#60;![endif]&#8211;&#62;
10. [...]]]></description>
			<content:encoded><![CDATA[<p><strong>关键字: if endif ie firefox ! [] &lt; &gt;</strong></p>
<p>1. &lt;!&#8211;[if !IE]&gt;&lt;!&#8211;&gt; 除IE外都可识别 &lt;!&#8211;&lt;![endif]&#8211;&gt;<br />
2. &lt;!&#8211;[if IE]&gt; 所有的IE可识别 &lt;![endif]&#8211;&gt;<br />
3. &lt;!&#8211;[if IE 5.0]&gt; 只有IE5.0可以识别 &lt;![endif]&#8211;&gt;<br />
4. &lt;!&#8211;[if IE 5]&gt; 仅IE5.0与IE5.5可以识别 &lt;![endif]&#8211;&gt;<br />
5. &lt;!&#8211;[if gt IE 5.0]&gt; IE5.0以及IE5.0以上版本都可以识别 &lt;![endif]&#8211;&gt;<br />
6. &lt;!&#8211;[if IE 6]&gt; 仅IE6可识别 &lt;![endif]&#8211;&gt;<br />
7. &lt;!&#8211;[if lt IE 6]&gt; IE6以及IE6以下版本可识别 &lt;![endif]&#8211;&gt;<br />
8. &lt;!&#8211;[if gte IE 6]&gt; IE6以及IE6以上版本可识别 &lt;![endif]&#8211;&gt;<br />
9. &lt;!&#8211;[if IE 7]&gt; 仅IE7可识别 &lt;![endif]&#8211;&gt;<br />
10. &lt;!&#8211;[if lte IE 7]&gt; IE7以及IE7以下版本可识别 &lt;![endif]&#8211;&gt;<br />
11. &lt;!&#8211;[if gte IE 7]&gt; IE7以及IE7以上版本可识别 &lt;![endif]&#8211;&gt;</p>
<p>&lt;!&#8211;[if lte IE 6]&gt;……&lt;![endif]&#8211;&gt;</p>
<p>Ite：less than or equal to意思是小于或等于IE6浏览器，用于IE浏览器的条件注释，常用于CSShack，针对IE的JS等。</p>
<p>在进行WEB标准网页的学习和应用过程中，网页对浏览器的兼容性是经常接触到的一个问题。其中因微软公司的Internet Explorer(简称IE)占据浏览器市场的大半江山，此外还有Firefox、Opera等。需要对这些浏览器进行兼容。</p>
<p>同时，单就IE而言，因IE版本的升级更替，目前浏览者使用的主要停留在 IE5(IE5.5)、IE6和IE7这三个版本中。而这3个版本对于我们制作的WEB标准网页（XHTML+CSS）解释执行的显示状况不尽相同。并 且，其他非IE浏览器与IE对某些CSS解释也不一样。所以，通过IE浏览器中的专有条件注释可有针对性的进行相关属性的定义。</p>
<p>条件注释只能用于Explorer 5+ Windows(以下简称IE)(条件注释从IE5开始被支持)。如果你安装了多个IE，条件注释（Conditional comments）将会以最高版本的IE为标准（目前为IE 7）。</p>
<p>条件注释只能在windows Internet Explorer(以下简称IE)下使用，因此我们可以通过条件注释来为IE添加特别的指令。</p>
<p>通俗点，条件注释就是一些if判断，但这些判断不是在脚本里执行的，而是直接在html代码里执行的，比如：<br />
&lt;!&#8211;[if IE]&gt;</p>
<p>这里是正常的html代码</p>
<p>&lt;![endif]&#8211;&gt;</p>
<p>1，条件注释的基本结构和HTML的注释(&lt;!&#8211; &#8211;&gt;)是一样的。因此IE以外的浏览器将会把它们看作是普通的注释而完全忽略它们。</p>
<p>2，IE将会根据if条件来判断是否如解析普通的页面内容一样解析条件注释里的内容。</p>
<p>3，条件注释使用的是HTML的注释结构，因此他们只能使用在HTML文件里，而不能在CSS文件中使用。</p>
<p>可使用如下代码检测当前IE浏览器的版本（注意：在非IE浏览器中是看不到效果的）</p>
<p>&lt;!&#8211;[if IE]&gt;</p>
<p>&lt;h1&gt;您正在使用IE浏览器&lt;/h1&gt;</p>
<p>&lt;!&#8211;[if IE 5]&gt;</p>
<p>&lt;h2&gt;版本 5&lt;/h2&gt;</p>
<p>&lt;![endif]&#8211;&gt;</p>
<p>&lt;!&#8211;[if IE 5.0]&gt;</p>
<p>&lt;h2&gt;版本 5.0&lt;/h2&gt;</p>
<p>&lt;![endif]&#8211;&gt;</p>
<p>&lt;!&#8211;[if IE 5.5]&gt;</p>
<p>&lt;h2&gt;版本 5.5&lt;/h2&gt;</p>
<p>&lt;![endif]&#8211;&gt;</p>
<p>&lt;!&#8211;[if IE 6]&gt;</p>
<p>&lt;h2&gt;版本 6&lt;/h2&gt;</p>
<p>&lt;![endif]&#8211;&gt;</p>
<p>&lt;!&#8211;[if IE 7]&gt;</p>
<p>&lt;h2&gt;版本 7&lt;/h2&gt;</p>
<p>&lt;![endif]&#8211;&gt;</p>
<p>&lt;![endif]&#8211;&gt;</p>
<p>那如果当前的浏览器是IE，但版本比IE5还低，该怎么办呢，可以使用&lt;!&#8211;[if ls IE 5]&gt;，当然，根据条件注释只能在IE5+的环境之下，所以&lt;!&#8211;[if ls IE 5]&gt;根本不会被执行。</p>
<p>lte：就是Less than or equal to的简写，也就是小于或等于的意思。</p>
<p>lt ：就是Less than的简写，也就是小于的意思。</p>
<p>gte：就是Greater than or equal to的简写，也就是大于或等于的意思。</p>
<p>gt ：就是Greater than的简写，也就是大于的意思。</p>
<p>! ：就是不等于的意思，跟javascript里的不等于判断符相同</p>
<p>Conditional comments属于CSS hack? 条件判断属于CSS hack吗？</p>
<p>严格地说是属于CSS hack。因为就好象其他真正的css hack一样，它使得我们可以给一些浏览器赋予特殊的样式，再则它不依赖于某个浏览器的BUG来控制另外一个浏览器（的样式）。除此之外，条件判断还能用 来做一些超出CSS HACK范围的事情(虽然这种情况很少发生)。</p>
<p>因为条件判断不依赖于某个浏览器的hack,而是一个经过深思熟虑的特色功能，所以我相信它是可以被放心地使用的。当然，其他浏览器也有可能支持条件判断（到目前为止还没有），但是看起来，他们应该不会使用如&lt;!&#8211;[if IE]&gt;这样的语法。</p>
<p>应该如何应用条件注释</p>
<p>本文一开始就说明了，因为IE各版本的浏览器对我们制作的WEB标准的页面解释不一样，具体就是对CSS的解释不同，我们为了兼容这些，可运用条件注释来各自定义，最终达到兼容的目的。比如：</p>
<p>&lt;!&#8211; 默认先调用css.css样式表 &#8211;&gt;</p>
<p>&lt;link rel=&#8221;stylesheet&#8221; type=&#8221;text/css&#8221; href=&#8221;http://www.zhmy.com/css.css&#8221; /&gt;</p>
<p>&lt;!&#8211;[if IE 7]&gt;</p>
<p>&lt;!&#8211; 如果IE浏览器版是7,调用ie7.css样式表 &#8211;&gt;</p>
<p>&lt;link rel=&#8221;stylesheet&#8221; type=&#8221;text/css&#8221; href=&#8221;http://www.zhmy.com/ie7.css&#8221; /&gt;</p>
<p>&lt;![endif]&#8211;&gt;</p>
<p>&lt;!&#8211;[if lte IE 6]&gt;</p>
<p>&lt;!&#8211; 如果IE浏览器版本小于等于6,调用ie.css样式表 &#8211;&gt;</p>
<p>&lt;link rel=&#8221;stylesheet&#8221; type=&#8221;text/css&#8221; href=&#8221;http://www.zhmy.com/ie.css&#8221; /&gt;</p>
<p>&lt;![endif]&#8211;&gt;<br />
这其中就区分了IE7和IE6向下的浏览器对CSS的执行，达到兼容的目的。同时，首行默认的css.css还能与其他非IE浏览器实现兼容。</p>
<p>注意：默认的CSS样式应该位于HTML文档的首行，进行条件注释判断的所有内容必须位于该默认样式之后。</p>
<p>比如如下代码，在IE浏览器下执行显示为红色，而在非IE浏览器下显示为黑色。如果把条件注释判断放在首行，则不能实现。该例题很能说明网页对IE浏览器和非IE浏览器间的兼容性问题解决。</p>
<p>&lt;style type=&#8221;text/css&#8221;&gt;</p>
<p>body{</p>
<p>background-color: #000;</p>
<p>}</p>
<p>&lt;/style&gt;</p>
<p>&lt;!&#8211;[if IE]&gt;</p>
<p>&lt;style type=&#8221;text/css&#8221;&gt;</p>
<p>body{</p>
<p>background-color: #F00;</p>
<p>}</p>
<p>&lt;/style&gt;</p>
<p>&lt;![endif]&#8211;&gt;</p>
<p>同时，有人会试图使用&lt;!&#8211;[if !IE]&gt;来定义非IE浏览器下的状况，但注意：条件注释只有在IE浏览器下才能执行，这个代码在非IE浏览下非单不是执行该条件下的定义，而是当做注释视而不见。</p>
<p>正常就是默认的样式，对IE浏览器需要特殊处理的，才进行条件注释。</p>
<p>在HTML文件里，而不能在CSS文件中使用。</p>
]]></content:encoded>
			<wfw:commentRss>http://chen.yyde.info/blog/?feed=rss2&amp;p=69</wfw:commentRss>
		</item>
		<item>
		<title>CSS hack:区分IE6，IE7，firefox</title>
		<link>http://chen.yyde.info/blog/?p=67</link>
		<comments>http://chen.yyde.info/blog/?p=67#comments</comments>
		<pubDate>Mon, 26 Oct 2009 11:47:33 +0000</pubDate>
		<dc:creator>chenyue</dc:creator>
		
		<category><![CDATA[Web Devolop]]></category>

		<guid isPermaLink="false">http://chen.yyde.info/blog/?p=67</guid>
		<description><![CDATA[区别不同浏览器，CSS hack写法：
区别IE6与FF：
background:orange;*background:blue;
区别IE6与IE7：
background:green !important;background:blue;
区别IE7与FF：
background:orange; *background:green;
区别FF，IE7，IE6：
background:orange;*background:green !important;*background:blue;
注：IE都能识别*;标准浏览器(如FF)不能识别*；
IE6能识别*，但不能识别 !important,
IE7能识别*，也能识别!important;
FF不能识别*，但能识别!important;




IE6
IE7
FF


*
√
√
×


!important
×
√
√



]]></description>
			<content:encoded><![CDATA[<h3>区别不同浏览器，CSS hack写法：</h3>
<div>区别<span class="blue">IE6</span>与<span class="orange">FF</span>：</div>
<div>background:<span class="orange">orange</span>;<span class="red">*</span>background:<span class="blue">blue</span>;</div>
<div>区别<span class="blue">IE6</span>与<span class="green">IE7</span>：</div>
<div>background:<span class="green">green</span> <span class="red">!important</span>;background:<span class="blue">blue</span>;</div>
<div>区别<span class="green">IE7</span>与<span class="orange">FF</span>：</div>
<div>background:<span class="orange">orange</span>; <span class="red">*</span>background:<span class="green">green</span>;</div>
<div>区别<span class="orange">FF</span>，<span class="green">IE7</span>，<span class="blue">IE6</span>：</div>
<div>background:<span class="orange">orange</span>;<span class="red">*</span>background:<span class="green">green</span> <span class="red">!important</span>;*background:<span class="blue">blue</span>;</div>
<div>注：IE都能识别*;标准浏览器(如FF)不能识别*；</div>
<div>IE6能识别*，但不能识别 !important,</div>
<div>IE7能识别*，也能识别!important;</div>
<div>FF不能识别*，但能识别!important;</div>
<table class="hack" border="0" cellspacing="1" cellpadding="0">
<tbody>
<tr>
<td></td>
<td>IE6</td>
<td>IE7</td>
<td>FF</td>
</tr>
<tr>
<td>*</td>
<td>√</td>
<td>√</td>
<td>×</td>
</tr>
<tr>
<td>!important</td>
<td>×</td>
<td>√</td>
<td>√</td>
</tr>
</tbody>
</table>
]]></content:encoded>
			<wfw:commentRss>http://chen.yyde.info/blog/?feed=rss2&amp;p=67</wfw:commentRss>
		</item>
		<item>
		<title>Struts+Spring+Hibernate内存泄漏</title>
		<link>http://chen.yyde.info/blog/?p=65</link>
		<comments>http://chen.yyde.info/blog/?p=65#comments</comments>
		<pubDate>Sun, 18 Oct 2009 23:32:55 +0000</pubDate>
		<dc:creator>chenyue</dc:creator>
		
		<category><![CDATA[Web Devolop]]></category>

		<guid isPermaLink="false">http://chen.yyde.info/blog/?p=65</guid>
		<description><![CDATA[在服务器运行过程中，Spring不停的运行的计划任务和OpenSessionInViewFilter，使得Tomcat反复加载对象而产生框架并用时可能产生的内存泄漏，则使用IntrospectorCleanupListener作为相应的解决办法。&#8221;
对于这一句话,引用关于IntrospectorCleanupListener一段解释:
引用
spring 中的提供了一个名为org.springframework.web.util.IntrospectorCleanupListener的监听器。它主 要负责处理由　JavaBeans Introspector的使用而引起的缓冲泄露。spring中对它的描述如下：它是一个在web应用关闭的时候,清除JavaBeans Introspector的监听器.web.xml中注册这个listener.可以保证在web 应用关闭的时候释放与掉这个web 应用相关的class loader 和由它管理的类如果你使用了JavaBeans Introspector来分析应用中的类,Introspector 缓冲中会保留这些类的引用.结果在你的应用关闭的时候,这些类以及web 应用相关的class loader没有被垃圾回收.不幸的是,清除Introspector的唯一方式是刷新整个缓冲.这是因为我们没法判断哪些是属于你的应用的引用.所以删 除被缓冲的introspection会导致把这台电脑上的所有应用的introspection都删掉.需要注意的是,spring 托管的bean不需要使用这个监听器.因为spring它自己的introspection所使用的缓冲在分析完一个类之后会被马上从javaBeans Introspector缓冲中清除掉.应用程序中的类从来不直接使用JavaBeans Introspector.所以他们一般不会导致内部查看资源泄露.但是一些类库和框架往往会产生这个问题.例如:Struts 和Quartz.单个的内部查看泄漏会导致整个的web应用的类加载器不能进行垃圾回收.在web应用关闭之后,你会看到此应用的所有静态类资源(例如单 例).这个错误当然不是由这个类自 身引起的.用法很简单，就是在web.xml中加入:
&#60;listener&#62;
&#60;listener-class&#62;org.springframework.web.util.IntrospectorCleanupListener&#60;/listener-class&#62;
&#60;/listener&#62;
]]></description>
			<content:encoded><![CDATA[<p>在服务器运行过程中，Spring不停的运行的计划任务和OpenSessionInViewFilter，使得Tomcat反复加载对象而产生框架并用时可能产生的内存泄漏，则使用IntrospectorCleanupListener作为相应的解决办法。&#8221;</p>
<p>对于这一句话,引用关于IntrospectorCleanupListener一段解释:</p>
<div class="quote_title">引用</div>
<div class="quote_div">spring 中的提供了一个名为org.springframework.web.util.IntrospectorCleanupListener的监听器。它主 要负责处理由　JavaBeans Introspector的使用而引起的缓冲泄露。spring中对它的描述如下：它是一个在web应用关闭的时候,清除JavaBeans Introspector的监听器.web.xml中注册这个listener.可以保证在web 应用关闭的时候释放与掉这个web 应用相关的class loader 和由它管理的类如果你使用了JavaBeans Introspector来分析应用中的类,Introspector 缓冲中会保留这些类的引用.结果在你的应用关闭的时候,这些类以及web 应用相关的class loader没有被垃圾回收.不幸的是,清除Introspector的唯一方式是刷新整个缓冲.这是因为我们没法判断哪些是属于你的应用的引用.所以删 除被缓冲的introspection会导致把这台电脑上的所有应用的introspection都删掉.需要注意的是,spring 托管的bean不需要使用这个监听器.因为spring它自己的introspection所使用的缓冲在分析完一个类之后会被马上从javaBeans Introspector缓冲中清除掉.应用程序中的类从来不直接使用JavaBeans Introspector.所以他们一般不会导致内部查看资源泄露.但是一些类库和框架往往会产生这个问题.例如:Struts 和Quartz.单个的内部查看泄漏会导致整个的web应用的类加载器不能进行垃圾回收.在web应用关闭之后,你会看到此应用的所有静态类资源(例如单 例).这个错误当然不是由这个类自 身引起的.用法很简单，就是在web.xml中加入:<br />
&lt;listener&gt;<br />
&lt;listener-class&gt;org.springframework.web.util.IntrospectorCleanupListener&lt;/listener-class&gt;<br />
&lt;/listener&gt;</div>
]]></content:encoded>
			<wfw:commentRss>http://chen.yyde.info/blog/?feed=rss2&amp;p=65</wfw:commentRss>
		</item>
		<item>
		<title>web.xml 配置404和500错误的自定义页面</title>
		<link>http://chen.yyde.info/blog/?p=63</link>
		<comments>http://chen.yyde.info/blog/?p=63#comments</comments>
		<pubDate>Sat, 17 Oct 2009 16:15:34 +0000</pubDate>
		<dc:creator>chenyue</dc:creator>
		
		<category><![CDATA[Web Devolop]]></category>

		<guid isPermaLink="false">http://chen.yyde.info/blog/?p=63</guid>
		<description><![CDATA[
&#60;!&#8211; 400错误  &#8211;&#62;
&#60;error-page&#62;
&#60;error-code&#62;400&#60;/error-code&#62;
&#60;location&#62;/error.jsp&#60;/location&#62;
&#60;/error-page&#62;
&#60;!&#8211;  404 页面不存在错误  &#8211;&#62;
&#60;error-page&#62;
&#60;error-code&#62;404&#60;/error-code&#62;
&#60;location&#62;/error.jsp&#60;/location&#62;
&#60;/error-page&#62;
&#60;!&#8211;  500 服务器内部错误  &#8211;&#62;
&#60;error-page&#62;
&#60;error-code&#62;500&#60;/error-code&#62;
&#60;location&#62;/error.jsp&#60;/location&#62;
&#60;/error-page&#62;
&#60;!&#8211;  java.lang.Exception异常错误,依据这个标记可定义多个类似错误提示  &#8211;&#62;
&#60;error-page&#62;
&#60;exception-type&#62;java.lang.Exception&#60;/exception-type&#62;
&#60;location&#62;/error.jsp&#60;/location&#62;
&#60;/error-page&#62;
&#60;!&#8211;  java.lang.NullPointerException异常错误,依据这个标记可定义多个类似错误提示  &#8211;&#62;
&#60;error-page&#62;
&#60;exception-type&#62;java.lang.NullPointerException &#60;/exception-type&#62;
&#60;location&#62;/error.jsp&#60;/location&#62;
&#60;/error-page&#62;
&#60;error-page&#62;
&#60;exception-type&#62;javax.servlet.ServletException&#60;/exception-type&#62;
&#60;location&#62;/error.jsp&#60;/location&#62;
&#60;/error-page&#62;
]]></description>
			<content:encoded><![CDATA[<div class="blog_content">
<p><span style="font-size: small;">&lt;!&#8211; 400错误  &#8211;&gt;<br />
&lt;error-page&gt;<br />
&lt;error-code&gt;400&lt;/error-code&gt;<br />
&lt;location&gt;/error.jsp&lt;/location&gt;<br />
&lt;/error-page&gt;<br />
&lt;!&#8211;  404 页面不存在错误  &#8211;&gt;<br />
&lt;error-page&gt;<br />
&lt;error-code&gt;404&lt;/error-code&gt;<br />
&lt;location&gt;/error.jsp&lt;/location&gt;<br />
&lt;/error-page&gt;<br />
&lt;!&#8211;  500 服务器内部错误  &#8211;&gt;<br />
&lt;error-page&gt;<br />
&lt;error-code&gt;500&lt;/error-code&gt;<br />
&lt;location&gt;/error.jsp&lt;/location&gt;<br />
&lt;/error-page&gt;<br />
&lt;!&#8211;  java.lang.Exception异常错误,依据这个标记可定义多个类似错误提示  &#8211;&gt;<br />
&lt;error-page&gt;<br />
&lt;exception-type&gt;java.lang.Exception&lt;/exception-type&gt;<br />
&lt;location&gt;/error.jsp&lt;/location&gt;<br />
&lt;/error-page&gt;<br />
&lt;!&#8211;  java.lang.NullPointerException异常错误,依据这个标记可定义多个类似错误提示  &#8211;&gt;<br />
&lt;error-page&gt;<br />
&lt;exception-type&gt;java.lang.NullPointerException &lt;/exception-type&gt;<br />
&lt;location&gt;/error.jsp&lt;/location&gt;<br />
&lt;/error-page&gt;</span></p>
<p><span style="font-size: small;">&lt;error-page&gt;<br />
&lt;exception-type&gt;javax.servlet.ServletException&lt;/exception-type&gt;<br />
&lt;location&gt;/error.jsp&lt;/location&gt;<br />
&lt;/error-page&gt;</span></div>
]]></content:encoded>
			<wfw:commentRss>http://chen.yyde.info/blog/?feed=rss2&amp;p=63</wfw:commentRss>
		</item>
		<item>
		<title>html</title>
		<link>http://chen.yyde.info/blog/?p=61</link>
		<comments>http://chen.yyde.info/blog/?p=61#comments</comments>
		<pubDate>Sat, 17 Oct 2009 13:25:13 +0000</pubDate>
		<dc:creator>chenyue</dc:creator>
		
		<category><![CDATA[Web Devolop]]></category>

		<guid isPermaLink="false">http://chen.yyde.info/blog/?p=61</guid>
		<description><![CDATA[&#60;base target=_blank&#62;//在空白页打开
&#60;base target=_parent&#62;//在当前页的上一页(父亲)打开
&#60;base target=_search&#62;//在浏览器地址栏打开
&#60;base target=_self&#62;//在当前页打开
&#60;base target=_top&#62;//在最初(祖先)页打开
JavaScript的showModalDialog在ie7的特殊设置
在ie7前的所有版本中，如果在showModalDialog中有个查询等按钮，可以直接在showModalDialog所打开的那个页面中 的任何地方加入&#60;base target=&#8221;_self&#8221;&#62;就可以运行了，但是在ie7中必须把&#60;base target=&#8221;_self&#8221;&#62;放在&#60;head&#62;&#60;/head&#62;中的第一个位置。否则会点击查询按钮的时候会重新跳出一个 新窗口。 
]]></description>
			<content:encoded><![CDATA[<p>&lt;base target=_blank&gt;//在空白页打开<br />
&lt;base target=_parent&gt;//在当前页的上一页(父亲)打开<br />
&lt;base target=_search&gt;//在浏览器地址栏打开<br />
&lt;base target=_self&gt;//在当前页打开<br />
&lt;base target=_top&gt;//在最初(祖先)页打开</p>
<p><span style="color: red;">JavaScript的showModalDialog在ie7的特殊设置</p>
<p>在ie7前的所有版本中，如果在showModalDialog中有个查询等按钮，可以直接在showModalDialog所打开的那个页面中 的任何地方加入&lt;base target=&#8221;_self&#8221;&gt;就可以运行了，但是在ie7中必须把&lt;base target=&#8221;_self&#8221;&gt;放在&lt;head&gt;&lt;/head&gt;中的第一个位置。否则会点击查询按钮的时候会重新跳出一个 新窗口。 </span></p>
]]></content:encoded>
			<wfw:commentRss>http://chen.yyde.info/blog/?feed=rss2&amp;p=61</wfw:commentRss>
		</item>
		<item>
		<title>Oracle SQL insert 和UPDATE使用一句话</title>
		<link>http://chen.yyde.info/blog/?p=57</link>
		<comments>http://chen.yyde.info/blog/?p=57#comments</comments>
		<pubDate>Tue, 25 Aug 2009 06:15:37 +0000</pubDate>
		<dc:creator>chenyue</dc:creator>
		
		<category><![CDATA[Web Devolop]]></category>

		<category><![CDATA[Oracle]]></category>

		<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://chen.yyde.info/blog/?p=57</guid>
		<description><![CDATA[Merge Into repo_netpoint a
using (Select :1 As ID_NETPOINT,
:2 NETPOINT_NAME,
:3 NETPOINT_SHORTNAME,
:4 TYPE_ENTRY_EXIT,
:5 ID_GRID_OPERATOR,
:6 GUELTIG_VON,
:7 GUELTIG_BIS
From Dual
) b
On (a.ID_NETPOINT=b.ID_NETPOINT)
When matched Then update set
a.NETPOINT_NAME=b.NETPOINT_NAME,
a.NETPOINT_SHORTNAME=b.NETPOINT_SHORTNAME,
a.TYPE_ENTRY_EXIT=b.TYPE_ENTRY_EXIT,
a.ID_GRID_OPERATOR=b.ID_GRID_OPERATOR,
a.GUELTIG_VON=b.GUELTIG_VON,
a.GUELTIG_BIS=b.GUELTIG_BIS,
a.LAST_UPDATE=sysdate
When Not matched Then
insert (ID_NETPOINT,NETPOINT_NAME,NETPOINT_SHORTNAME,TYPE_ENTRY_EXIT,ID_GRID_OPERATOR,GUELTIG_VON,GUELTIG_BIS,LAST_UPDATE)
Values (b.id_netpoint,b.NETPOINT_NAME,b.NETPOINT_SHORTNAME,b.TYPE_ENTRY_EXIT,b.ID_GRID_OPERATOR,b.GUELTIG_VON,b.GUELTIG_BIS,sysdate);
z.B
Merge Into repo_netpoint a
using (Select 3 As ID_NETPOINT,
&#8216;YueChen&#8217; NETPOINT_NAME,
&#8216;Tobias&#8217; NETPOINT_SHORTNAME,
&#8216;exit&#8217; TYPE_ENTRY_EXIT,
null ID_GRID_OPERATOR,
to_date(&#8217;01.10.2009&#8242;,&#8217;dd.mm.yyyy&#8217;) GUELTIG_VON,
to_date(&#8217;01.10.2020&#8242;,&#8217;dd.mm.yyyy&#8217;) GUELTIG_BIS
From Dual
) b
On (a.ID_NETPOINT=b.ID_NETPOINT)
When matched Then update set
a.NETPOINT_NAME=b.NETPOINT_NAME,
a.NETPOINT_SHORTNAME=b.NETPOINT_SHORTNAME,
a.TYPE_ENTRY_EXIT=b.TYPE_ENTRY_EXIT,
a.ID_GRID_OPERATOR=b.ID_GRID_OPERATOR,
a.GUELTIG_VON=b.GUELTIG_VON,
a.GUELTIG_BIS=b.GUELTIG_BIS,
a.LAST_UPDATE=sysdate
When Not matched Then
insert (ID_NETPOINT,NETPOINT_NAME,NETPOINT_SHORTNAME,TYPE_ENTRY_EXIT,ID_GRID_OPERATOR,GUELTIG_VON,GUELTIG_BIS,LAST_UPDATE)
Values (b.id_netpoint,b.NETPOINT_NAME,b.NETPOINT_SHORTNAME,b.TYPE_ENTRY_EXIT,b.ID_GRID_OPERATOR,b.GUELTIG_VON,b.GUELTIG_BIS,sysdate);
]]></description>
			<content:encoded><![CDATA[<p>Merge Into repo_netpoint a<br />
using (Select :1 As ID_NETPOINT,<br />
:2 NETPOINT_NAME,<br />
:3 NETPOINT_SHORTNAME,<br />
:4 TYPE_ENTRY_EXIT,<br />
:5 ID_GRID_OPERATOR,<br />
:6 GUELTIG_VON,<br />
:7 GUELTIG_BIS<br />
From Dual<br />
) b<br />
On (a.ID_NETPOINT=b.ID_NETPOINT)<br />
When matched Then update set<br />
a.NETPOINT_NAME=b.NETPOINT_NAME,<br />
a.NETPOINT_SHORTNAME=b.NETPOINT_SHORTNAME,<br />
a.TYPE_ENTRY_EXIT=b.TYPE_ENTRY_EXIT,<br />
a.ID_GRID_OPERATOR=b.ID_GRID_OPERATOR,<br />
a.GUELTIG_VON=b.GUELTIG_VON,<br />
a.GUELTIG_BIS=b.GUELTIG_BIS,<br />
a.LAST_UPDATE=sysdate<br />
When Not matched Then<br />
insert (ID_NETPOINT,NETPOINT_NAME,NETPOINT_SHORTNAME,TYPE_ENTRY_EXIT,ID_GRID_OPERATOR,GUELTIG_VON,GUELTIG_BIS,LAST_UPDATE)<br />
Values (b.id_netpoint,b.NETPOINT_NAME,b.NETPOINT_SHORTNAME,b.TYPE_ENTRY_EXIT,b.ID_GRID_OPERATOR,b.GUELTIG_VON,b.GUELTIG_BIS,sysdate);</p>
<p>z.B</p>
<p>Merge Into repo_netpoint a<br />
using (Select 3 As ID_NETPOINT,<br />
&#8216;YueChen&#8217; NETPOINT_NAME,<br />
&#8216;Tobias&#8217; NETPOINT_SHORTNAME,<br />
&#8216;exit&#8217; TYPE_ENTRY_EXIT,<br />
null ID_GRID_OPERATOR,<br />
to_date(&#8217;01.10.2009&#8242;,&#8217;dd.mm.yyyy&#8217;) GUELTIG_VON,<br />
to_date(&#8217;01.10.2020&#8242;,&#8217;dd.mm.yyyy&#8217;) GUELTIG_BIS<br />
From Dual<br />
) b<br />
On (a.ID_NETPOINT=b.ID_NETPOINT)<br />
When matched Then update set<br />
a.NETPOINT_NAME=b.NETPOINT_NAME,<br />
a.NETPOINT_SHORTNAME=b.NETPOINT_SHORTNAME,<br />
a.TYPE_ENTRY_EXIT=b.TYPE_ENTRY_EXIT,<br />
a.ID_GRID_OPERATOR=b.ID_GRID_OPERATOR,<br />
a.GUELTIG_VON=b.GUELTIG_VON,<br />
a.GUELTIG_BIS=b.GUELTIG_BIS,<br />
a.LAST_UPDATE=sysdate<br />
When Not matched Then<br />
insert (ID_NETPOINT,NETPOINT_NAME,NETPOINT_SHORTNAME,TYPE_ENTRY_EXIT,ID_GRID_OPERATOR,GUELTIG_VON,GUELTIG_BIS,LAST_UPDATE)<br />
Values (b.id_netpoint,b.NETPOINT_NAME,b.NETPOINT_SHORTNAME,b.TYPE_ENTRY_EXIT,b.ID_GRID_OPERATOR,b.GUELTIG_VON,b.GUELTIG_BIS,sysdate);</p>
]]></content:encoded>
			<wfw:commentRss>http://chen.yyde.info/blog/?feed=rss2&amp;p=57</wfw:commentRss>
		</item>
		<item>
		<title>To setup an Oracle Datasource in Glassfish</title>
		<link>http://chen.yyde.info/blog/?p=54</link>
		<comments>http://chen.yyde.info/blog/?p=54#comments</comments>
		<pubDate>Thu, 30 Jul 2009 14:23:25 +0000</pubDate>
		<dc:creator>chenyue</dc:creator>
		
		<category><![CDATA[Web Devolop]]></category>

		<category><![CDATA[Glassfish]]></category>

		<category><![CDATA[java]]></category>

		<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://chen.yyde.info/blog/?p=54</guid>
		<description><![CDATA[To setup an Oracle Datasource in Glassfish, follow these steps:
1. Copy the Oracle JDBC drivers to /glassfish/domains/domain1/lib/ext directory. You may need to change the directory /glassfish/domains/domain1 to match your installation of Glassfish and the domain name.
2. Start Glassfish.
3. Login to the admin interface and create a JDBC Connection Pool.
Delete all properties, and add following properties:
user [...]]]></description>
			<content:encoded><![CDATA[<p>To setup an Oracle Datasource in Glassfish, follow these steps:</p>
<p>1. Copy the Oracle JDBC drivers to /glassfish/domains/domain1/lib/ext directory. You may need to change the directory /glassfish/domains/domain1 to match your installation of Glassfish and the domain name.</p>
<p>2. Start Glassfish.</p>
<p>3. Login to the admin interface and create a JDBC Connection Pool.<br />
Delete all properties, and add following properties:<br />
user - set this to Oracle userid<br />
password - set this to Oracle password<br />
URL - set this to the URL, example jdbc:oracle:thin:@localhost:1521:xe.<br />
xa-driver-does-not-support-non-tx-operations - set this to true.<br />
Test the connection pool using ping.</p>
<p>4. Create a JDBC DataSource using the Connection Pool.</p>
]]></content:encoded>
			<wfw:commentRss>http://chen.yyde.info/blog/?feed=rss2&amp;p=54</wfw:commentRss>
		</item>
		<item>
		<title>php 设置默认语言和数据接口默认Charset</title>
		<link>http://chen.yyde.info/blog/?p=52</link>
		<comments>http://chen.yyde.info/blog/?p=52#comments</comments>
		<pubDate>Fri, 24 Jul 2009 09:27:28 +0000</pubDate>
		<dc:creator>chenyue</dc:creator>
		
		<category><![CDATA[Web Devolop]]></category>

		<guid isPermaLink="false">http://chen.yyde.info/blog/?p=52</guid>
		<description><![CDATA[// SET ENV - Umgebungsvariablen fuer Sprache setzen
putenv(&#8217;LC_ALL=de_DE.UTF-8&#8242;);
putenv(&#8217;LANGUAGE=de_DE.UTF-8&#8242;);
putenv(&#8217;NLS_LANG=GERMAN_GERMANY.UTF8&#8242;);
或者在

 
SetEnv 指令
说明
设置环境变量
语法
SetEnv env-variable value
作用域
server config, virtual host, directory, .htaccess
覆盖项
FileInfo
状态
基本(B)
模块
mod_env
设置一个环境变量，该变量将会传送到CGI脚本和SSI页面。例如：
示例
SetEnv SPECIAL_PATH /foo/bin 
这样在 $APACHE_HOME/conf/httpd.conf 中加入
PassEnv ORACLE_HOME
PassEnv LD_LIBRARY_PATH
PassEnv LANG
PassEnv NLS_LANG
或
SetEnv LANG zh_CN.UTF-8
SetEnv NLS_LANG American_America.zhs16cgb231280
SetEnv ORACLE_HOME /home/oracle/oracle/product/10.2.0/client_1
SetEnv LD_LIBRARY_PATH /home/oracle/oracle/product/10.2.0/client_1/lib:$LD_LIBRARY_PATH
]]></description>
			<content:encoded><![CDATA[<p><span lang="DE">// SET ENV - Umgebungsvariablen fuer Sprache setzen</p>
<p>putenv(&#8217;LC_ALL=de_DE.UTF-8&#8242;);</p>
<p>putenv(&#8217;LANGUAGE=de_DE.UTF-8&#8242;);</p>
<p>putenv(&#8217;NLS_LANG=GERMAN_GERMANY.UTF8&#8242;);</p>
<p>或者在</p>
<p></span></p>
<blockquote><p> </p>
<h4><a name="SetEnv">SetEnv</a> <a name="setenv">指令</a></h4>
<p><a href="http://tool.87871.com/directive-dict.html#Description" target="_blank">说明</a><br />
设置环境变量</p>
<p><a href="http://tool.87871.com/directive-dict.html#Syntax" target="_blank">语法</a><br />
<code>SetEnv <var><strong style="color: black; background-color: #99ff99;">env</strong>-variable</var> <var>value</var></code></p>
<p><a href="http://tool.87871.com/directive-dict.html#Context" target="_blank">作用域</a><br />
server config, virtual host, directory, .<strong style="color: black; background-color: #ffff66;">htaccess</strong></p>
<p><a href="http://tool.87871.com/directive-dict.html#Override" target="_blank">覆盖项</a><br />
FileInfo</p>
<p><a href="http://tool.87871.com/directive-dict.html#Status" target="_blank">状态</a><br />
基本(B)</p>
<p><a href="http://tool.87871.com/directive-dict.html#Module" target="_blank">模块</a><br />
mod_env</p>
<p>设置一个环境变量，该变量将会传送到CGI脚本和SSI页面。例如：</p>
<h5>示例</h5>
<p><code>SetEnv SPECIAL_PATH /foo/bin </code></p></blockquote>
<p><code><span style="color: #333333;">这样在 $APACHE_HOME/conf/httpd.conf 中加入</span></code></p>
<blockquote><p>PassEnv ORACLE_HOME<br />
PassEnv LD_LIBRARY_PATH<br />
PassEnv LANG<br />
PassEnv <strong style="color: black; background-color: #ff9999;">NLS_LANG</strong></p></blockquote>
<p><span style="color: #333333;">或</span></p>
<blockquote><p>SetEnv LANG zh_CN.UTF-8<br />
SetEnv <strong style="color: black; background-color: #ff9999;">NLS_LANG</strong> American_America.zhs16cgb231280<br />
SetEnv ORACLE_HOME /home/oracle/oracle/product/10.2.0/client_1<br />
SetEnv LD_LIBRARY_PATH /home/oracle/oracle/product/10.2.0/client_1/lib:$LD_LIBRARY_PATH</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://chen.yyde.info/blog/?feed=rss2&amp;p=52</wfw:commentRss>
		</item>
		<item>
		<title>NetBeans:UTF-8 Character Set</title>
		<link>http://chen.yyde.info/blog/?p=48</link>
		<comments>http://chen.yyde.info/blog/?p=48#comments</comments>
		<pubDate>Thu, 23 Jul 2009 12:23:26 +0000</pubDate>
		<dc:creator>chenyue</dc:creator>
		
		<category><![CDATA[Web Devolop]]></category>

		<guid isPermaLink="false">http://chen.yyde.info/blog/?p=48</guid>
		<description><![CDATA[Here are instructions for setting the default character set in Netbeans to UTF-8 (in Windows):

Go to  C:\Program Files\netbeans-x.x\etc
Open netbeans.conf in Notepad.
On the netbeans_default_options add: -J-Dfile.encoding=UTF-8.  (make sure to put it within the quotation marks)
Project properties -&#62; Build -&#62; Compiling -&#62;

Additional compiler options) text box.- add: -encoding UTF-8 


You can also check to make [...]]]></description>
			<content:encoded><![CDATA[<p>Here are instructions for setting the default character set in Netbeans to UTF-8 (in Windows):</p>
<ol>
<li>Go to  C:\Program Files\netbeans-x.x\etc</li>
<li>Open netbeans.conf in Notepad.</li>
<li>On the netbeans_default_options add: -J-Dfile.encoding=UTF-8.  (make sure to put it within the quotation marks)</li>
<li>Project properties -&gt; Build -&gt; Compiling -&gt;
<dl>
<dd>Additional compiler options) text box.- add: -encoding UTF-8 </dd>
</dl>
</li>
<li>You can also check to make sure that you have increased the memory allocation for Netbeans by looking at the netbeans_default_options line. The default max is 128MB. We have increased this to 256MB.</li>
</ol>
<p>References:</p>
<p><a class="external free" title="http://wp.uberdose.com/2007/05/07/netbeans-and-utf-8/" rel="nofollow" href="http://wp.uberdose.com/2007/05/07/netbeans-and-utf-8/">http://wp.uberdose.com/2007/05/07/netbeans-and-utf-8/</a></p>
<p><a class="external free" title="http://www.techienuggets.com/Comments?tx=619" rel="nofollow" href="http://www.techienuggets.com/Comments?tx=619">http://www.techienuggets.com/Comments?tx=619</a></p>
]]></content:encoded>
			<wfw:commentRss>http://chen.yyde.info/blog/?feed=rss2&amp;p=48</wfw:commentRss>
		</item>
	</channel>
</rss>

