<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>La vie en france</title>
	<atom:link href="http://sylvainhan.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://sylvainhan.wordpress.com</link>
	<description>C'est la vie! Quelle vie</description>
	<lastBuildDate>Thu, 08 Sep 2011 14:06:24 +0000</lastBuildDate>
	<language>zh-cn</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='sylvainhan.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>La vie en france</title>
		<link>http://sylvainhan.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://sylvainhan.wordpress.com/osd.xml" title="La vie en france" />
	<atom:link rel='hub' href='http://sylvainhan.wordpress.com/?pushpress=hub'/>
		<item>
		<title>ZT 从雅虎看互联网的世纪轮回</title>
		<link>http://sylvainhan.wordpress.com/2011/09/08/zt-%e4%bb%8e%e9%9b%85%e8%99%8e%e7%9c%8b%e4%ba%92%e8%81%94%e7%bd%91%e7%9a%84%e4%b8%96%e7%ba%aa%e8%bd%ae%e5%9b%9e/</link>
		<comments>http://sylvainhan.wordpress.com/2011/09/08/zt-%e4%bb%8e%e9%9b%85%e8%99%8e%e7%9c%8b%e4%ba%92%e8%81%94%e7%bd%91%e7%9a%84%e4%b8%96%e7%ba%aa%e8%bd%ae%e5%9b%9e/#comments</comments>
		<pubDate>Thu, 08 Sep 2011 14:06:22 +0000</pubDate>
		<dc:creator>sylvainhan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://sylvainhan.wordpress.com/?p=180</guid>
		<description><![CDATA[中国IT界资深媒体人 冀勇庆 为英国《金融时报》中文网撰稿 2011-09-08 (www.ftchinese.com) 在担任了两年8个月的CEO之后，卡罗尔•巴茨女士被雅虎董事会以电话通知这种极不礼貌的方式解雇了。显然，董事会已经对她完全失去了耐心，而此时雅虎员工对她的支持率也只剩下可怜的三成。 业界普遍感觉，巴茨在雅虎好像没做多少事，唯一让人印象深刻的反而是她屡屡爆出的粗口。其实，巴茨当年在硅谷也是响当当的人物：她曾经担任知名的图形处理软件公司欧特克（Autodesk）公司的董事长兼CEO长达14年之久，并将欧特克的收入翻了两番。也正是由于这个原因，她才受到了雅虎创始人杨致远的力荐，得以担任这个地球人都羡慕的CEO职位。 只是，虽然软件和互联网看起来都属于IT行业，但内瓤却相差十万八千里。可以说，软件行业可能离互联网的理论距离最近，但是心灵上的距离可能却是离这个行业最远的。 为什么这么说呢？如今，我们看到卖衣服的上网了，卖化工品的上网了，搞电影电视剧的人也上网了，搞餐饮的更是折腾出了最流行的LBS（基于位置的服务）概念。而传统的软件公司在互联网上的战绩如何呢？软件霸主微软在互联网领域的无能为力，就连云计算这种很“软件”的概念也是互联网公司谷歌先折腾出来的。搞软件的人往往会陷于自己的思维定式之中，认为既然互联网公司的后台跑的都是软件，那么软件公司做互联网一定能够成功，不就是编程嘛！ 其实还真不是一回事，不是说大家编程的方法有什么不同，而是商业模式有着非常大的不同，这个不同也反映在开发模式和经营模式的巨大差别上。软件公司如微软搞开发，就是把上万人的团队圈在一起，花上5年的时间，期待捣鼓出一个十全十美的软件并卖给全世界所有的人。互联网公司也搞软件开发，但是他们是直接捣鼓出一个不成熟的测试版，然后扔到互联网的汪洋大海中给人“骂”，在骂声中改进，小步快跑，持续改进，直到产品趋于成熟。 搞软件产品的，开发成功开个发布会就没啥事了，剩下的都是渠道的事情，顶多再建个客服中心应付一下售后就可以了。互联网公司，开发出产品只是第一步，运营更为关键，你得把这个产品免费提供给用户，让用户去干别的事情比如游戏或者购物，运营成功了才算真的成功。 两者的商业模式更是有着非常大的差异。软件公司的用户基本上等于客户，你把软件卖给什么人，你就找他收钱。互联网公司既有用户又有客户，用户是免费使用你产品的那一拨人，你先积累用户，拿到足够数量的用户之后再去找客户，通过广告或者其他方式变现。 因此，雅虎董事会请来搞了这么多年软件的巴茨女士当CEO，这绝对是个败笔。上台之后，这位根本不懂互联网的CEO下出了一系列的臭棋：将最核心的搜索技术外包给微软，将一些有希望的社区型产品卖掉，忽视了投资的最大电子商务公司阿里巴巴……当这家公司离互联网的核心战场越来越远之后，它也就越来越边缘化，很难再有翻身的机会。 除了用人欠考虑的原因之外，雅虎的衰落也有自身的原因。任何一家企业，当它不再代表先进生产力之后，衰落都是必然的。大家肯定不会记得十年前，成立仅仅5年时间的美国在线（AOL）竟然以1780亿美元的天价收购了全球第一大传媒公司时代华纳。虽然我们现在看美国在线好像是石器时代的产物，不过当时它可是先进生产力的代表，曾经风光一时。 这次收购最后以悲剧而告终，并直接促使了美国在线创始人史蒂夫•凯斯（史蒂夫•乔布斯，史蒂夫•鲍尔默，又是一个史蒂夫，IT行业的风云人物好像总是跟“史蒂夫”分不开）的引咎辞职。 革美国在线命的就是雅虎。美国在线的商业模式其实跟传统的电话公司区别不大：当用户通过美国在线拨号上网之后，每个月支付一笔上网的费用。不过，互联网行业聪明人太多了。当杨致远和大卫•费罗成立了雅虎之后，他们想到了另外一种商业模式：用户通过雅虎上网统统免费，雅虎给用户提供各种分类信息，找商家要广告费。由此，一种全新的综合门户的商业模式诞生了。在中国，也诞生了新浪、搜狐、网易等综合门户。从这个角度来说，雅虎对互联网的贡献怎么说都不为过，因为它创造了互联网“免费+开放”的商业模式。 问题是在互联网这个行业，三天不学习，就会落后一大截。雅虎很快就成为了全球第一大门户，这个时候它的弊端也就表现出来了。互联网上的信息很快就呈现爆炸性的增长，而雅虎通过人工筛选信息的方式很快就遇到了瓶颈，因为很多人希望找到自己需要的信息，雅虎的首页和分类页显然已经不能够全部覆盖了，它只能满足少数大企业的广告需求。 这个时候，随着谷歌的横空出世，技术就成为互联网新的主导因素了。谷歌通过搜索技术帮助所有上网的人找到他希望去的网站，从而将所有互联网的流量集中在自己的身上，然后又通过在线的广告系统满足了众多中小企业投放广告的需求，这种商业模式显然比起雅虎更胜一筹。 而雅虎从出生的第一天起就不具备技术的基因，雅虎两位创始人的最大贡献在于发现了一种新的商业模式，但是两人均不擅长技术。当发现用户有搜索需求的时候，雅虎只能先后收购了Inktomi和Alta Vista（后者通过收购Overture）等搜索引擎。无奈雅虎的四任CEO均没有技术背景，他们都没有意识到搜索技术会有如此之大的影响力，从而眼睁睁地看着谷歌从自己的身边崛起，成为新的互联网王者。在互联网行业，确实是出身决定命运！ 在历任CEO持续不懈的“努力”下，雅虎终于从一家互联网商业模式的开创者“转型”为传统的媒体公司，完成了从神坛到平凡的转变。巴茨的离职解决不了雅虎深层次的问题，如果不能够保持对欣欣向荣的日本雅虎和中国阿里巴巴的控制力，剩下的“纯雅虎”的市场价值已经趋近于零了。也许将来“纯雅虎”会被一家传统的媒体公司如新闻集团或者是时代华纳收购，成为传统媒体的渠道，从而完成历史的一次大轮回。<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sylvainhan.wordpress.com&amp;blog=853682&amp;post=180&amp;subd=sylvainhan&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>中国IT界资深媒体人 <a href="http://www.ftchinese.com/search/%E5%86%80%E5%8B%87%E5%BA%86/relative_byline" target="_blank">冀勇庆</a> 为英国《金融时报》中文网撰稿 <a href="http://www.ftchinese.com/archiver/2011-09-08">2011-09-08</a> (www.ftchinese.com)</p>
<div id="print_content">
<p>在担任了两年8个月的CEO之后，卡罗尔•巴茨女士被雅虎董事会以电话通知这种极不礼貌的方式解雇了。显然，董事会已经对她完全失去了耐心，而此时雅虎员工对她的支持率也只剩下可怜的三成。</p>
<p>业界普遍感觉，巴茨在雅虎好像没做多少事，唯一让人印象深刻的反而是她屡屡爆出的粗口。其实，巴茨当年在硅谷也是响当当的人物：她曾经担任知名的图形处理软件公司欧特克（Autodesk）公司的董事长兼CEO长达14年之久，并将欧特克的收入翻了两番。也正是由于这个原因，她才受到了雅虎创始人杨致远的力荐，得以担任这个地球人都羡慕的CEO职位。</p>
<p>只是，虽然软件和互联网看起来都属于IT行业，但内瓤却相差十万八千里。可以说，软件行业可能离互联网的理论距离最近，但是心灵上的距离可能却是离这个行业最远的。</p>
<p>为什么这么说呢？如今，我们看到卖衣服的上网了，卖化工品的上网了，搞电影电视剧的人也上网了，搞餐饮的更是折腾出了最流行的LBS（基于位置的服务）概念。而传统的软件公司在互联网上的战绩如何呢？软件霸主微软在互联网领域的无能为力，就连云计算这种很“软件”的概念也是互联网公司谷歌先折腾出来的。搞软件的人往往会陷于自己的思维定式之中，认为既然互联网公司的后台跑的都是软件，那么软件公司做互联网一定能够成功，不就是编程嘛！</p>
<p>其实还真不是一回事，不是说大家编程的方法有什么不同，而是商业模式有着非常大的不同，这个不同也反映在开发模式和经营模式的巨大差别上。软件公司如微软搞开发，就是把上万人的团队圈在一起，花上5年的时间，期待捣鼓出一个十全十美的软件并卖给全世界所有的人。互联网公司也搞软件开发，但是他们是直接捣鼓出一个不成熟的测试版，然后扔到互联网的汪洋大海中给人“骂”，在骂声中改进，小步快跑，持续改进，直到产品趋于成熟。</p>
<p>搞软件产品的，开发成功开个发布会就没啥事了，剩下的都是渠道的事情，顶多再建个客服中心应付一下售后就可以了。互联网公司，开发出产品只是第一步，运营更为关键，你得把这个产品免费提供给用户，让用户去干别的事情比如游戏或者购物，运营成功了才算真的成功。</p>
<p>两者的商业模式更是有着非常大的差异。软件公司的用户基本上等于客户，你把软件卖给什么人，你就找他收钱。互联网公司既有用户又有客户，用户是免费使用你产品的那一拨人，你先积累用户，拿到足够数量的用户之后再去找客户，通过广告或者其他方式变现。</p>
<p>因此，雅虎董事会请来搞了这么多年软件的巴茨女士当CEO，这绝对是个败笔。上台之后，这位根本不懂互联网的CEO下出了一系列的臭棋：将最核心的搜索技术外包给微软，将一些有希望的社区型产品卖掉，忽视了投资的最大电子商务公司阿里巴巴……当这家公司离互联网的核心战场越来越远之后，它也就越来越边缘化，很难再有翻身的机会。</p>
<p>除了用人欠考虑的原因之外，雅虎的衰落也有自身的原因。任何一家企业，当它不再代表先进生产力之后，衰落都是必然的。大家肯定不会记得十年前，成立仅仅5年时间的美国在线（AOL）竟然以1780亿美元的天价收购了全球第一大传媒公司时代华纳。虽然我们现在看美国在线好像是石器时代的产物，不过当时它可是先进生产力的代表，曾经风光一时。</p>
<p>这次收购最后以悲剧而告终，并直接促使了美国在线创始人史蒂夫•凯斯（史蒂夫•乔布斯，史蒂夫•鲍尔默，又是一个史蒂夫，IT行业的风云人物好像总是跟“史蒂夫”分不开）的引咎辞职。</p>
<p>革美国在线命的就是雅虎。美国在线的商业模式其实跟传统的电话公司区别不大：当用户通过美国在线拨号上网之后，每个月支付一笔上网的费用。不过，互联网行业聪明人太多了。当杨致远和大卫•费罗成立了雅虎之后，他们想到了另外一种商业模式：用户通过雅虎上网统统免费，雅虎给用户提供各种分类信息，找商家要广告费。由此，一种全新的综合门户的商业模式诞生了。在中国，也诞生了新浪、搜狐、网易等综合门户。从这个角度来说，雅虎对互联网的贡献怎么说都不为过，因为它创造了互联网“免费+开放”的商业模式。</p>
<p>问题是在互联网这个行业，三天不学习，就会落后一大截。雅虎很快就成为了全球第一大门户，这个时候它的弊端也就表现出来了。互联网上的信息很快就呈现爆炸性的增长，而雅虎通过人工筛选信息的方式很快就遇到了瓶颈，因为很多人希望找到自己需要的信息，雅虎的首页和分类页显然已经不能够全部覆盖了，它只能满足少数大企业的广告需求。</p>
<p>这个时候，随着谷歌的横空出世，技术就成为互联网新的主导因素了。谷歌通过搜索技术帮助所有上网的人找到他希望去的网站，从而将所有互联网的流量集中在自己的身上，然后又通过在线的广告系统满足了众多中小企业投放广告的需求，这种商业模式显然比起雅虎更胜一筹。</p>
<p>而雅虎从出生的第一天起就不具备技术的基因，雅虎两位创始人的最大贡献在于发现了一种新的商业模式，但是两人均不擅长技术。当发现用户有搜索需求的时候，雅虎只能先后收购了Inktomi和Alta Vista（后者通过收购Overture）等搜索引擎。无奈雅虎的四任CEO均没有技术背景，他们都没有意识到搜索技术会有如此之大的影响力，从而眼睁睁地看着谷歌从自己的身边崛起，成为新的互联网王者。在互联网行业，确实是出身决定命运！</p>
<p>在历任CEO持续不懈的“努力”下，雅虎终于从一家互联网商业模式的开创者“转型”为传统的媒体公司，完成了从神坛到平凡的转变。巴茨的离职解决不了雅虎深层次的问题，如果不能够保持对欣欣向荣的日本雅虎和中国阿里巴巴的控制力，剩下的“纯雅虎”的市场价值已经趋近于零了。也许将来“纯雅虎”会被一家传统的媒体公司如新闻集团或者是时代华纳收购，成为传统媒体的渠道，从而完成历史的一次大轮回。</p>
</div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sylvainhan.wordpress.com/180/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sylvainhan.wordpress.com/180/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sylvainhan.wordpress.com/180/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sylvainhan.wordpress.com/180/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sylvainhan.wordpress.com/180/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sylvainhan.wordpress.com/180/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sylvainhan.wordpress.com/180/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sylvainhan.wordpress.com/180/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sylvainhan.wordpress.com/180/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sylvainhan.wordpress.com/180/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sylvainhan.wordpress.com/180/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sylvainhan.wordpress.com/180/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sylvainhan.wordpress.com/180/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sylvainhan.wordpress.com/180/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sylvainhan.wordpress.com&amp;blog=853682&amp;post=180&amp;subd=sylvainhan&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://sylvainhan.wordpress.com/2011/09/08/zt-%e4%bb%8e%e9%9b%85%e8%99%8e%e7%9c%8b%e4%ba%92%e8%81%94%e7%bd%91%e7%9a%84%e4%b8%96%e7%ba%aa%e8%bd%ae%e5%9b%9e/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ecbc220c381a095d0ee44da484bd9d19?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">sylvainhan</media:title>
		</media:content>
	</item>
		<item>
		<title>try &#8211; catch &#8211; finally</title>
		<link>http://sylvainhan.wordpress.com/2011/09/05/try-catch-finally/</link>
		<comments>http://sylvainhan.wordpress.com/2011/09/05/try-catch-finally/#comments</comments>
		<pubDate>Mon, 05 Sep 2011 16:44:56 +0000</pubDate>
		<dc:creator>sylvainhan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://sylvainhan.wordpress.com/?p=177</guid>
		<description><![CDATA[private void test(){ try{ TestException te = this.new TestException(); te.test(); System.out.println("trytrytry"); } catch (Exception e){ e.printStackTrace(); System.out.println("catchcatchcatch"); } finally { System.out.println("finallyfinallyfinally"); } System.out.println("endendend"); } private class TestException { void test() throws Exception{ throw new Exception("illegal invoked"); } } 这个程序返回的结果为： java.lang.Exception: &#8230; <a href="http://sylvainhan.wordpress.com/2011/09/05/try-catch-finally/">繼續閱讀 <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sylvainhan.wordpress.com&amp;blog=853682&amp;post=177&amp;subd=sylvainhan&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<pre>    private void test(){
        try{
            TestException te = this.new TestException();
            te.test();
            System.out.println("trytrytry");
        } catch (Exception e){
            e.printStackTrace();
            System.out.println("catchcatchcatch");
        } finally {
            System.out.println("finallyfinallyfinally");
        }
        System.out.println("endendend");
    }

    private class TestException {
        void test() throws Exception{
            throw new Exception("illegal invoked");
        }
    }

这个程序返回的结果为：</pre>
<p><span id="more-177"></span></p>
<pre>java.lang.Exception: illegal invoked
	at com.alu.gesdp.integration.ldap.LDAPIntegration$TestException.test(LDAPIntegration.java:839)
	at com.alu.gesdp.integration.ldap.LDAPIntegration.test(LDAPIntegration.java:826)
	at com.alu.gesdp.integration.ldap.LDAPIntegration.main(LDAPIntegration.java:820)
catchcatchcatch
finallyfinallyfinally
endendend</pre>
<p><!--more--></p>
<p>&nbsp;</p>
<p>为了理解 finally 与 finally 后的代码之间的关系，写了这个程序。</p>
<p>结论是，写在finally内，与写在finally后基本是相同的。写在finally内代码更美观，更易于维护。</p>
<p>try &#8211; catch 的目的就是代码可以在抛出异常后继续运行，所以基本不存在抛出异常后，随后的代码不可执行的情况。也就是说，其实写在finally 之内或之后是一样的。</p>
<p>&nbsp;</p>
<p>还有 try+finally 的情况，ZT</p>
<p><a href="http://blog.csdn.net/lovecj6185/article/details/4461516">http://blog.csdn.net/lovecj6185/article/details/4461516</a></p>
<p>try+finally<br />
程序的流程是：运行到try块中,如果有异常抛出的话，程序转向执行finally块的代码。那末finally块后面的代码还会被执行吗？不会！因为你没有处理异常，所以遇到异常后，执行完finally后，方法就已抛出异常的方式退出了。<br />
这种方式中要注意的是，由于你没有捕获异常，所以要在方法后面声明抛出异</p>
<pre></pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sylvainhan.wordpress.com/177/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sylvainhan.wordpress.com/177/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sylvainhan.wordpress.com/177/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sylvainhan.wordpress.com/177/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sylvainhan.wordpress.com/177/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sylvainhan.wordpress.com/177/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sylvainhan.wordpress.com/177/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sylvainhan.wordpress.com/177/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sylvainhan.wordpress.com/177/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sylvainhan.wordpress.com/177/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sylvainhan.wordpress.com/177/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sylvainhan.wordpress.com/177/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sylvainhan.wordpress.com/177/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sylvainhan.wordpress.com/177/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sylvainhan.wordpress.com&amp;blog=853682&amp;post=177&amp;subd=sylvainhan&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://sylvainhan.wordpress.com/2011/09/05/try-catch-finally/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ecbc220c381a095d0ee44da484bd9d19?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">sylvainhan</media:title>
		</media:content>
	</item>
		<item>
		<title>the order of execution for the multi-condition &#8211; if &#8211; Java</title>
		<link>http://sylvainhan.wordpress.com/2011/09/05/the-order-of-execution-for-the-multi-condition-if-java/</link>
		<comments>http://sylvainhan.wordpress.com/2011/09/05/the-order-of-execution-for-the-multi-condition-if-java/#comments</comments>
		<pubDate>Mon, 05 Sep 2011 16:06:08 +0000</pubDate>
		<dc:creator>sylvainhan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://sylvainhan.wordpress.com/?p=175</guid>
		<description><![CDATA[如果if有多个条件，且为“与”的关系如， if(a!=null&#38;&#38;a==b) 如果第一个条件为false，那么第二个条件不会被检测。直接返回false &#124;&#124; 同理 &#160; 应用在需要首先检测instance是否为空的情况。不会因为条件2的操作而抛出null exception<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sylvainhan.wordpress.com&amp;blog=853682&amp;post=175&amp;subd=sylvainhan&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>如果if有多个条件，且为“与”的关系如，</p>
<p>if(a!=null&amp;&amp;a==b)</p>
<p>如果第一个条件为false，那么<strong>第二个条件不会被检测</strong>。直接返回false</p>
<p>|| 同理</p>
<p>&nbsp;</p>
<p>应用在需要首先检测instance是否为空的情况。不会因为条件2的操作而抛出null exception</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sylvainhan.wordpress.com/175/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sylvainhan.wordpress.com/175/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sylvainhan.wordpress.com/175/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sylvainhan.wordpress.com/175/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sylvainhan.wordpress.com/175/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sylvainhan.wordpress.com/175/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sylvainhan.wordpress.com/175/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sylvainhan.wordpress.com/175/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sylvainhan.wordpress.com/175/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sylvainhan.wordpress.com/175/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sylvainhan.wordpress.com/175/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sylvainhan.wordpress.com/175/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sylvainhan.wordpress.com/175/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sylvainhan.wordpress.com/175/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sylvainhan.wordpress.com&amp;blog=853682&amp;post=175&amp;subd=sylvainhan&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://sylvainhan.wordpress.com/2011/09/05/the-order-of-execution-for-the-multi-condition-if-java/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ecbc220c381a095d0ee44da484bd9d19?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">sylvainhan</media:title>
		</media:content>
	</item>
		<item>
		<title>10 Points about Java Heap Space</title>
		<link>http://sylvainhan.wordpress.com/2011/08/30/10-points-about-java-heap-space/</link>
		<comments>http://sylvainhan.wordpress.com/2011/08/30/10-points-about-java-heap-space/#comments</comments>
		<pubDate>Tue, 30 Aug 2011 16:20:35 +0000</pubDate>
		<dc:creator>sylvainhan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://sylvainhan.wordpress.com/?p=171</guid>
		<description><![CDATA[1. Java Heap Memory is part of Memory allocated to JVM by Operating System. 2. Whenever we create objects they are created inside Heap in Java. 3. Java Heap space is divided into three regions or generation for sake of &#8230; <a href="http://sylvainhan.wordpress.com/2011/08/30/10-points-about-java-heap-space/">繼續閱讀 <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sylvainhan.wordpress.com&amp;blog=853682&amp;post=171&amp;subd=sylvainhan&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div>1. Java Heap Memory is part of Memory allocated to JVM by Operating System.</div>
<div>2. Whenever we create objects they are created inside Heap in Java.</div>
<div>3. <strong>Java Heap space is divided into three regions</strong> or generation for sake of garbage collection called New Generation, Old or tenured Generation or Perm Space.</div>
<div>4. You can <strong>increase or change size of Java Heap space by using JVM command line option</strong> -Xms, -Xmx and -Xmn. don&#8217;t forget to add word &#8220;M&#8221; or &#8220;G&#8221; after specifying size to indicate Mega or Giga. for example you can set java heap size to 258MB by executing following command <strong>java -Xmx256m HelloWord.</strong></div>
<div>5. You can use either JConsole or Runtime.maxMemory(), Runtime.totalMemory(), Runtime.freeMemory() to query about <strong>Heap size programmatic</strong> in Java.</div>
<div>6. You can use command <strong>&#8220;jmap&#8221; </strong>to take Heap dump in Java and <strong>&#8220;jhat&#8221;</strong> to analyze that heap dump.</div>
<div>7. <strong>Java Heap space is different than Stack</strong> which is used to store call hierarchy and local variables.</div>
<div>8. <a href="http://javarevisited.blogspot.com/2011/04/garbage-collection-in-java.html">Java Garbage collector</a> is responsible for reclaiming memory from dead object and returning to Java Heap space.</div>
<div>9. Don’t panic when you get <strong>java.lang.outofmemoryerro</strong>r, sometimes its just matter of increasing heap size but if it’s recurrent then look for memory leak in Java.</div>
<p>10. Use Profiler and Heap dump Analyzer tool to understand Java Heap space and how much memory is allocated to each object.</p>
<p>This article is in continuation of my previous articles <a href="http://javarevisited.blogspot.com/2011/01/how-classpath-work-in-java.html">How Classpath works in Java</a> , <a href="http://javarevisited.blogspot.com/2011/02/how-to-write-equals-method-in-java.html">How to write Equals method in java</a> , <a href="http://javarevisited.blogspot.com/2011/02/how-hashmap-works-in-java.html">How HashMap works in Java</a>  and <a href="http://javarevisited.blogspot.com/2010/10/difference-between-hashmap-and.html">difference between HashMap and Hashtable in Java</a>  and <a href="http://javarevisited.blogspot.com/2011/04/synchronization-in-java-synchronized.html">How Synchronization works in Java</a> if you haven’t read already you may find some useful information based on my experience in Java .</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sylvainhan.wordpress.com/171/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sylvainhan.wordpress.com/171/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sylvainhan.wordpress.com/171/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sylvainhan.wordpress.com/171/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sylvainhan.wordpress.com/171/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sylvainhan.wordpress.com/171/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sylvainhan.wordpress.com/171/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sylvainhan.wordpress.com/171/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sylvainhan.wordpress.com/171/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sylvainhan.wordpress.com/171/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sylvainhan.wordpress.com/171/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sylvainhan.wordpress.com/171/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sylvainhan.wordpress.com/171/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sylvainhan.wordpress.com/171/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sylvainhan.wordpress.com&amp;blog=853682&amp;post=171&amp;subd=sylvainhan&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://sylvainhan.wordpress.com/2011/08/30/10-points-about-java-heap-space/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ecbc220c381a095d0ee44da484bd9d19?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">sylvainhan</media:title>
		</media:content>
	</item>
		<item>
		<title>ZT: Determining if any active HTTP Sessions exist for deployed applications in OAS 10.1.3.x</title>
		<link>http://sylvainhan.wordpress.com/2011/08/30/zt-determining-if-any-active-http-sessions-exist-for-deployed-applications-in-oas-10-1-3-x/</link>
		<comments>http://sylvainhan.wordpress.com/2011/08/30/zt-determining-if-any-active-http-sessions-exist-for-deployed-applications-in-oas-10-1-3-x/#comments</comments>
		<pubDate>Tue, 30 Aug 2011 15:10:54 +0000</pubDate>
		<dc:creator>sylvainhan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://sylvainhan.wordpress.com/?p=168</guid>
		<description><![CDATA[MONDAY, 11 AUGUST 2008 Recently I was asked how to determine if any current HTTP sessions exist for an application. The reason for needing this information was so that the application could be redeployed only when no HTTP sessions existed &#8230; <a href="http://sylvainhan.wordpress.com/2011/08/30/zt-determining-if-any-active-http-sessions-exist-for-deployed-applications-in-oas-10-1-3-x/">繼續閱讀 <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sylvainhan.wordpress.com&amp;blog=853682&amp;post=168&amp;subd=sylvainhan&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h2>MONDAY, 11 AUGUST 2008</h2>
<div>
<div>
<div>
<div>
<p>Recently I was asked how to determine if any current HTTP sessions exist for an application. The reason for needing this information was so that the application could be redeployed only when no HTTP sessions existed and the application was currently not being used. It turns out there is an MBean which can give you that information.</p>
<p>The Mbean is as follows:</p>
<table width="100%" border="0" cellspacing="1" cellpadding="0">
<tbody>
<tr>
<td colspan="3" align="left" valign="top" width="90%">oc4j:j2eeType=ClassLoading,name=singleton,J2EEServer=standalone</td>
</tr>
</tbody>
</table>
<p>His how to access it from the MBean browser in ASC and get the information on HTTP sessions for your deployed applications.</p>
<p>1. Log into ASC<br />
2. Click on the container you wish to use.<br />
3. Click on the link &#8220;<strong>Administration</strong>&#8220;.<br />
4. Click on the &#8220;<strong>Go To Task</strong>&#8221; icon as follows.</p>
<p><strong>JMX -&gt; System MBean Browser</strong></p>
<p>5. Expand the ClassLoading node in the navigation pane, then select the singleton MBean instance.<br />
6. Click the Operations tab in the right-hand pane, then click the executeQuery operation.</p>
<p>Three versions of the executeQuery operation are exposed. Click the version that takes one parameter.</p>
<p>7. For the value parameter enter in the following and press the &#8220;Invoke Operation&#8221; button</p>
<p>HttpSessions(details)</p>
<p>You will end up with output as follows which will give you the amount of HTTP sessions which currently exist for each deployed application.</p>
<p>** Summary at Aug 11, 2008 9:57:43 AM **</p>
<p>Total Sessions: 0<br />
Total Attributes: 0<br />
Total Session Size: 0 bytes</p>
<p>Largest Session: N/A<br />
Youngest Session: N/A<br />
Idlest Session: N/A<br />
Oldest Session: N/A</p>
<p>** Details **</p>
<p>[ADFBC-HA:adfhaprofile]</p>
<p>No active sessions</p>
<p>[SimpleWS:WebServices]</p>
<p>No active sessions</p>
<p>[WebServiceDemo-SimpleWS-WS:WebServices]</p>
<p>No active sessions</p>
<p>&#8230;</p></div>
</div>
</div>
</div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sylvainhan.wordpress.com/168/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sylvainhan.wordpress.com/168/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sylvainhan.wordpress.com/168/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sylvainhan.wordpress.com/168/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sylvainhan.wordpress.com/168/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sylvainhan.wordpress.com/168/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sylvainhan.wordpress.com/168/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sylvainhan.wordpress.com/168/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sylvainhan.wordpress.com/168/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sylvainhan.wordpress.com/168/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sylvainhan.wordpress.com/168/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sylvainhan.wordpress.com/168/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sylvainhan.wordpress.com/168/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sylvainhan.wordpress.com/168/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sylvainhan.wordpress.com&amp;blog=853682&amp;post=168&amp;subd=sylvainhan&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://sylvainhan.wordpress.com/2011/08/30/zt-determining-if-any-active-http-sessions-exist-for-deployed-applications-in-oas-10-1-3-x/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ecbc220c381a095d0ee44da484bd9d19?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">sylvainhan</media:title>
		</media:content>
	</item>
		<item>
		<title>堆和栈的区别</title>
		<link>http://sylvainhan.wordpress.com/2011/08/25/%e5%a0%86%e5%92%8c%e6%a0%88%e7%9a%84%e5%8c%ba%e5%88%ab/</link>
		<comments>http://sylvainhan.wordpress.com/2011/08/25/%e5%a0%86%e5%92%8c%e6%a0%88%e7%9a%84%e5%8c%ba%e5%88%ab/#comments</comments>
		<pubDate>Thu, 25 Aug 2011 14:03:03 +0000</pubDate>
		<dc:creator>sylvainhan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://sylvainhan.wordpress.com/?p=165</guid>
		<description><![CDATA[堆和栈是两个不同概念 堆和栈的区别 一、预备知识—程序的内存分配 一个由c/C++编译的程序占用的内存分为以下几个部分 1、栈区（stack）— 由编译器自动分配释放 ，存放函数的参数值，局部变量的值等。其操作方式类似于数据结构中的栈。 2、堆区（heap） — 一般由程序员分配释放， 若程序员不释放，程序结束时可能由OS回收 。注意它与数据结构中的堆是两回事，分配方式倒是类似于链表，呵呵。 3、全局区（静态区）（static）—，全局变量和静态变量的存储是放在一块的，初始化的全局变量和静态变量在一块区域， 未初始化的全局变量和未初始化的静态变量在相邻的另一块区域。 - 程序结束后有系统释放 4、文字常量区 —常量字符串就是放在这里的。 程序结束后由系统释放 5、程序代码区—存放函数体的二进制代码。 二、例子程序 这是一个前辈写的，非常详细 //main.cpp int a = 0; 全局初始化区 char *p1; 全局未初始化区 main() { int b; 栈 char s[] = "abc"; &#8230; <a href="http://sylvainhan.wordpress.com/2011/08/25/%e5%a0%86%e5%92%8c%e6%a0%88%e7%9a%84%e5%8c%ba%e5%88%ab/">繼續閱讀 <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sylvainhan.wordpress.com&amp;blog=853682&amp;post=165&amp;subd=sylvainhan&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<pre>堆和栈是两个不同概念

堆和栈的区别 

一、预备知识—程序的内存分配
一个由c/C++编译的程序占用的内存分为以下几个部分
1、栈区（stack）— 由编译器自动分配释放 ，存放函数的参数值，局部变量的值等。其操作方式类似于数据结构中的栈。
2、堆区（heap） — 一般由程序员分配释放， 若程序员不释放，程序结束时可能由OS回收 。注意它与数据结构中的堆是两回事，分配方式倒是类似于链表，呵呵。
3、全局区（静态区）（static）—，全局变量和静态变量的存储是放在一块的，初始化的全局变量和静态变量在一块区域， 未初始化的全局变量和未初始化的静态变量在相邻的另一块区域。 - 程序结束后有系统释放
4、文字常量区 —常量字符串就是放在这里的。 程序结束后由系统释放
5、程序代码区—存放函数体的二进制代码。 

二、例子程序
这是一个前辈写的，非常详细
//main.cpp
int a = 0; 全局初始化区
char *p1; 全局未初始化区
main()
{
int b; 栈
char s[] = "abc"; 栈
char *p2; 栈
char *p3 = "123456"; 123456在常量区，p3在栈上。
static int c =0； 全局（静态）初始化区
p1 = (char *)malloc(10);
p2 = (char *)malloc(20);
分配得来得10和20字节的区域就在堆区。
strcpy(p1, "123456"); 123456放在常量区，编译器可能会将它与p3所指向的"123456"优化成一个地方。
}
二、堆和栈的理论知识
2.1申请方式
stack:
由系统自动分配。 例如，声明在函数中一个局部变量 int b; 系统自动在栈中为b开辟空间
heap:
需要程序员自己申请，并指明大小，在c中malloc函数
如p1 = (char *)malloc(10);
在C++中用new运算符
如p2 = (char *)malloc(10);
但是注意p1、p2本身是在栈中的。
2.2
申请后系统的响应
栈：只要栈的剩余空间大于所申请空间，系统将为程序提供内存，否则将报异常提示栈溢出。
堆：首先应该知道操作系统有一个记录空闲内存地址的链表，当系统收到程序的申请时，
会遍历该链表，寻找第一个空间大于所申请空间的堆结点，然后将该结点从空闲结点链表中删除，并将该结点的空间分配给程序，另外，对于大多数系统，会在这块内存空间中的首地址处记录本次分配的大小，这样，代码中的delete语句才能正确的释放本内存空间。另外，由于找到的堆结点的大小不一定正好等于申请的大小，系统会自动的将多余的那部分重新放入空闲链表中。
2.3申请大小的限制
栈：在Windows下,栈是向低地址扩展的数据结构，是一块连续的内存的区域。这句话的意思是栈顶的地址和栈的最大容量是系统预先规定好的，在 WINDOWS下，栈的大小是2M（也有的说是1M，总之是一个编译时就确定的常数），如果申请的空间超过栈的剩余空间时，将提示overflow。因此，能从栈获得的空间较小。
堆：堆是向高地址扩展的数据结构，是不连续的内存区域。这是由于系统是用链表来存储的空闲内存地址的，自然是不连续的，而链表的遍历方向是由低地址向高地址。堆的大小受限于计算机系统中有效的虚拟内存。由此可见，堆获得的空间比较灵活，也比较大。
2.4申请效率的比较：
栈由系统自动分配，速度较快。但程序员是无法控制的。
堆是由new分配的内存，一般速度比较慢，而且容易产生内存碎片,不过用起来最方便.
另外，在WINDOWS下，最好的方式是用VirtualAlloc分配内存，他不是在堆，也不是在栈是直接在进程的地址空间中保留一快内存，虽然用起来最不方便。但是速度快，也最灵活
2.5堆和栈中的存储内容
栈： 在函数调用时，第一个进栈的是主函数中后的下一条指令（函数调用语句的下一条可执行语句）的地址，然后是函数的各个参数，在大多数的C编译器中，参数是由右往左入栈的，然后是函数中的局部变量。注意静态变量是不入栈的。
当本次函数调用结束后，局部变量先出栈，然后是参数，最后栈顶指针指向最开始存的地址，也就是主函数中的下一条指令，程序由该点继续运行。
堆：一般是在堆的头部用一个字节存放堆的大小。堆中的具体内容有程序员安排。
2.6存取效率的比较 

char s1[] = "aaaaaaaaaaaaaaa";
char *s2 = "bbbbbbbbbbbbbbbbb";
aaaaaaaaaaa是在运行时刻赋值的；
而bbbbbbbbbbb是在编译时就确定的；
但是，在以后的存取中，在栈上的数组比指针所指向的字符串(例如堆)快。
比如：
#include
void main()
{
char a = 1;
char c[] = "1234567890";
char *p ="1234567890";
a = c[1];
a = p[1];
return;
}
对应的汇编代码
10: a = c[1];
00401067 8A 4D F1 mov cl,byte ptr [ebp-0Fh]
0040106A 88 4D FC mov byte ptr [ebp-4],cl
11: a = p[1];
0040106D 8B 55 EC mov edx,dword ptr [ebp-14h]
00401070 8A 42 01 mov al,byte ptr [edx+1]
00401073 88 45 FC mov byte ptr [ebp-4],al
第一种在读取时直接就把字符串中的元素读到寄存器cl中，而第二种则要先把指针值读到edx中，在根据edx读取字符，显然慢了。
? 

2.7小结：
堆和栈的区别可以用如下的比喻来看出：
使用栈就象我们去饭馆里吃饭，只管点菜（发出申请）、付钱、和吃（使用），吃饱了就走，不必理会切菜、洗菜等准备工作和洗碗、刷锅等扫尾工作，他的好处是快捷，但是自由度小。
使用堆就象是自己动手做喜欢吃的菜肴，比较麻烦，但是比较符合自己的口味，而且自由度大。 

堆和栈的区别主要分：
操作系统方面的堆和栈，如上面说的那些，不多说了。
还有就是数据结构方面的堆和栈，这些都是不同的概念。这里的堆实际上指的就是（满足堆性质的）优先队列的一种数据结构，第1个元素有最高的优先权；栈实际上就是满足先进后出的性质的数学或数据结构。
虽然堆栈，堆栈的说法是连起来叫，但是他们还是有很大区别的，连着叫只是由于历史的原因。</pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sylvainhan.wordpress.com/165/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sylvainhan.wordpress.com/165/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sylvainhan.wordpress.com/165/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sylvainhan.wordpress.com/165/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sylvainhan.wordpress.com/165/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sylvainhan.wordpress.com/165/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sylvainhan.wordpress.com/165/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sylvainhan.wordpress.com/165/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sylvainhan.wordpress.com/165/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sylvainhan.wordpress.com/165/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sylvainhan.wordpress.com/165/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sylvainhan.wordpress.com/165/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sylvainhan.wordpress.com/165/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sylvainhan.wordpress.com/165/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sylvainhan.wordpress.com&amp;blog=853682&amp;post=165&amp;subd=sylvainhan&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://sylvainhan.wordpress.com/2011/08/25/%e5%a0%86%e5%92%8c%e6%a0%88%e7%9a%84%e5%8c%ba%e5%88%ab/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ecbc220c381a095d0ee44da484bd9d19?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">sylvainhan</media:title>
		</media:content>
	</item>
		<item>
		<title>JSF selectItems Tag (ZT)</title>
		<link>http://sylvainhan.wordpress.com/2011/07/20/jsf-selectitems-tag-zt/</link>
		<comments>http://sylvainhan.wordpress.com/2011/07/20/jsf-selectitems-tag-zt/#comments</comments>
		<pubDate>Wed, 20 Jul 2011 16:38:41 +0000</pubDate>
		<dc:creator>sylvainhan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://sylvainhan.wordpress.com/?p=161</guid>
		<description><![CDATA[This tag is used to add a set of items to the nearest enclosing parent (select one or select many) component. JSF selectItems Tag This tag is used to add a set of items to the nearest enclosing parent (select &#8230; <a href="http://sylvainhan.wordpress.com/2011/07/20/jsf-selectitems-tag-zt/">繼續閱讀 <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sylvainhan.wordpress.com&amp;blog=853682&amp;post=161&amp;subd=sylvainhan&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div>
<div>
<div><strong>This tag is used to add a set of items to the nearest enclosing parent (select one or select many) component.</strong></div>
<h1><span style="color:#000080;">JSF selectItems Tag</span></h1>
<p><span style="color:#000080;">This tag is used to add a set of items to the nearest enclosing parent (select one or select many) component. This tag can be used to get the list of choices from the list of objects from backing bean. So instead of writing  many <strong>selectItem</strong> tag for choices, you can use <strong>selectItems</strong> tag to get the options list in the form of list of objects from backing bean.</span></p>
<p><span style="color:#000080;"><strong>C</strong><strong>ode Description :</strong></span></p>
<div align="left">
<table width="57%" border="1" cellspacing="0" cellpadding="0" bgcolor="ffffcc">
<tbody>
<tr>
<td width="100%"><span style="color:#000080;">&lt;%@ taglib uri=&#8221;http://java.sun.com/jsf/html&#8221; prefix=&#8221;h&#8221;%&gt;<br />
&lt;%@ taglib uri=&#8221;http://java.sun.com/jsf/core&#8221; prefix=&#8221;f&#8221;%&gt;</p>
<p>&lt;f:view&gt;<br />
&lt;html&gt;<br />
&lt;body&gt;<br />
&lt;h:form&gt;<br />
&lt;h:outputText value=&#8221;Select choices given below :&#8221;/&gt;&lt;br&gt;&lt;br&gt;<br />
&lt;h:selectManyListbox id=&#8221;subscriptions&#8221; value=&#8221;#{SItemsBean.options}&#8221; size=&#8221;3&#8243;&gt;<br />
<strong>&lt;f:selectItems value=&#8221;#{SItemsBean.options}&#8221; /&gt;</strong><br />
&lt;/h:selectManyListbox&gt;<br />
&lt;/h:form&gt;<br />
&lt;/body&gt;<br />
&lt;/html&gt;<br />
&lt;/f:view&gt;</span></td>
</tr>
</tbody>
</table>
</div>
<p><span style="color:#000080;"><strong>Backing Bean (SItemsBean.java) : </strong>In the code below, we have taken array list of SelectItem objects. It has 5 constructors. One of its constructor accepts value as Object and label as String parameter while the another one  accepts value as Object, label as String, description as String  disabled as boolean parameters<strong>.</strong> description  parameter is used for own purpose to describe something and disabled is used to make the option enabled or disabled by setting it &#8220;true&#8221; and &#8220;false&#8221; respectively. You can use them according to the need. You can understand it better by the code given below :</span></p>
<div align="left">
<table width="501" border="1" cellspacing="0" cellpadding="0" bgcolor="ffffcc">
<tbody>
<tr>
<td width="497">import javax.faces.model.SelectItem;<br />
import java.util.*;</p>
<p>public class SItemsBean<br />
{<br />
private List options;<br />
public SItemsBean()<br />
{<br />
options = new ArrayList();<br />
SelectItem option = new SelectItem(&#8220;ch1&#8243;, &#8220;choice1&#8243;, &#8220;This bean is for selectItems tag&#8221;, true);<br />
options.add(option);<br />
option = new SelectItem(&#8220;ch2&#8243;, &#8220;choice2&#8243;);<br />
options.add(option);<br />
option = new SelectItem(&#8220;ch3&#8243;, &#8220;choice3&#8243;);<br />
options.add(option);<br />
option = new SelectItem(&#8220;ch4&#8243;, &#8220;choice4&#8243;);<br />
options.add(option);<br />
option = new SelectItem(&#8220;ch5&#8243;, &#8220;choice5);<br />
options.add(option);<br />
}</p>
<p>public void setOptions(List opt)<br />
{<br />
options = opt;<br />
}</p>
<p>public List getOptions()<br />
{<br />
return options;<br />
}<br />
}</td>
</tr>
</tbody>
</table>
</div>
<p><span style="color:#000080;"><strong>Rendered Output :</strong></span></p>
<p><img src="http://www.roseindia.net/jsf/images/selectItems.gif" alt="" width="503" height="255" border="1" /></p>
<p><strong><span style="color:#000080;">Html Source Code :</span></strong></p>
<div align="left">
<table width="54%" border="1" cellspacing="0" cellpadding="0" bgcolor="ffffcc">
<tbody>
<tr>
<td width="100%"><span style="color:#000080;">&lt;html&gt;<br />
&lt;body&gt;<br />
&lt;form id=&#8221;_id0&#8243; method=&#8221;post&#8221; action=&#8221;/coretag/pages/selectItems.jsf&#8221; enctype=&#8221;application/x-www-form-urlencoded&#8221;&gt;<br />
Select choices given below :&lt;br&gt;&lt;br&gt;<br />
&lt;select id=&#8221;_id0:subscriptions&#8221; name=&#8221;_id0:subscriptions&#8221; multiple size=&#8221;3&#8243;&gt; <strong>&lt;option value=&#8221;ch1&#8243; disabled=&#8221;disabled&#8221;&gt;choice1&lt;/option&gt;<br />
&lt;option value=&#8221;ch2&#8243;&gt;choice2&lt;/option&gt;<br />
&lt;option value=&#8221;ch3&#8243;&gt;choice3&lt;/option&gt;<br />
&lt;option value=&#8221;ch4&#8243;&gt;choice4&lt;/option&gt;<br />
&lt;option value=&#8221;ch5&#8243;&gt;choice5&lt;/option&gt;</strong><br />
&lt;/select&gt;<br />
&lt;input type=&#8221;hidden&#8221; name=&#8221;_id0&#8243; value=&#8221;_id0&#8243; /&gt;&lt;/form&gt;<br />
&lt;/body&gt;<br />
&lt;/html&gt;</span></td>
</tr>
</tbody>
</table>
</div>
<p><span style="color:#000080;">This tag contains some attributes :</span></p>
<p><span style="color:#000080;"><strong>id :</strong> This is used to uniquely identify the table component. This must be unique within the closest parent component.<br />
<strong>binding :</strong> It is a value binding expression that is used to link component to a property in a backing bean.<br />
<strong>value :</strong> This is the value binding expression that indicates to the list or array of  selectItem instances which contains the information about the option.</span></p>
</div>
</div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sylvainhan.wordpress.com/161/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sylvainhan.wordpress.com/161/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sylvainhan.wordpress.com/161/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sylvainhan.wordpress.com/161/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sylvainhan.wordpress.com/161/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sylvainhan.wordpress.com/161/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sylvainhan.wordpress.com/161/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sylvainhan.wordpress.com/161/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sylvainhan.wordpress.com/161/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sylvainhan.wordpress.com/161/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sylvainhan.wordpress.com/161/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sylvainhan.wordpress.com/161/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sylvainhan.wordpress.com/161/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sylvainhan.wordpress.com/161/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sylvainhan.wordpress.com&amp;blog=853682&amp;post=161&amp;subd=sylvainhan&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://sylvainhan.wordpress.com/2011/07/20/jsf-selectitems-tag-zt/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ecbc220c381a095d0ee44da484bd9d19?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">sylvainhan</media:title>
		</media:content>

		<media:content url="http://www.roseindia.net/jsf/images/selectItems.gif" medium="image" />
	</item>
		<item>
		<title>Multiple mapping table &#8211; SQL</title>
		<link>http://sylvainhan.wordpress.com/2011/07/11/multiple-mapping-table-sql/</link>
		<comments>http://sylvainhan.wordpress.com/2011/07/11/multiple-mapping-table-sql/#comments</comments>
		<pubDate>Mon, 11 Jul 2011 14:47:02 +0000</pubDate>
		<dc:creator>sylvainhan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://sylvainhan.wordpress.com/?p=158</guid>
		<description><![CDATA[The problem is that now there are two ways of updating the foreign key columns in the Customer entity, because the foreign key columns are present in the referenced District entity, but also present as fields in the entity in &#8230; <a href="http://sylvainhan.wordpress.com/2011/07/11/multiple-mapping-table-sql/">繼續閱讀 <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sylvainhan.wordpress.com&amp;blog=853682&amp;post=158&amp;subd=sylvainhan&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The problem is that now there are two ways of updating the foreign key columns in the Customer entity, because the foreign key columns are present in the referenced District entity, but also present as fields in the entity in order to satisfy the requirements for a composite primary key. If you try to execute this code, you will encounter an Exception such as this (in Glassfish):</p>
<p><em>Multiple writable mappings exist for the field [TPCC.CUSTOMER.C_W_ID]. Only one may be defined as writable, all others must be specified read-only.</p>
<p>Multiple writable mappings exist for the field [TPCC.CUSTOMER.C_D_ID]. Only one may be defined as writable, all others must be specified read-only.<br />
</em><br />
To resolve this problem, you need to modify the Customer Entity definition and ensure that the columns TPCC.CUSTOMER.C_W_ID and TPCC.CUSTOMER.C_D_ID are marked as readonly, by setting insertable=false and updatable=false:</p>
<p>EX. &#8211; OneToOne</p>
<pre>tabA:
    @OneToOne
    @JoinColumn(name = "COMPANY_ID", referencedColumnName = "COMPANY_ID", unique=true, insertable=false, updatable=false)
    private PlLogofile logofile;
tabB:
    @Column(name="COMPANY_ID", unique=true)
    private Long companyId;

EX: oneToMany-manyToOne
tabA:
    @OneToMany(mappedBy = "partnerlocatorCompany")
    private List&lt;PlCompanyCrdChild&gt; crdChilds;
tabB:
    @ManyToOne
    @JoinColumn(name = "COMPANY_ID", referencedColumnName = "COMPANY_ID", nullable=false,
          insertable=false, updatable=false)
    private PartnerlocatorCompany partnerlocatorCompany;</pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sylvainhan.wordpress.com/158/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sylvainhan.wordpress.com/158/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sylvainhan.wordpress.com/158/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sylvainhan.wordpress.com/158/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sylvainhan.wordpress.com/158/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sylvainhan.wordpress.com/158/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sylvainhan.wordpress.com/158/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sylvainhan.wordpress.com/158/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sylvainhan.wordpress.com/158/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sylvainhan.wordpress.com/158/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sylvainhan.wordpress.com/158/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sylvainhan.wordpress.com/158/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sylvainhan.wordpress.com/158/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sylvainhan.wordpress.com/158/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sylvainhan.wordpress.com&amp;blog=853682&amp;post=158&amp;subd=sylvainhan&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://sylvainhan.wordpress.com/2011/07/11/multiple-mapping-table-sql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ecbc220c381a095d0ee44da484bd9d19?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">sylvainhan</media:title>
		</media:content>
	</item>
		<item>
		<title>charactor speciaux in SQL</title>
		<link>http://sylvainhan.wordpress.com/2011/06/22/charactor-speciaux-in-sql/</link>
		<comments>http://sylvainhan.wordpress.com/2011/06/22/charactor-speciaux-in-sql/#comments</comments>
		<pubDate>Wed, 22 Jun 2011 15:55:10 +0000</pubDate>
		<dc:creator>sylvainhan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://sylvainhan.wordpress.com/?p=155</guid>
		<description><![CDATA[update Partnerlocator_company set fax =     chr(43)&#124;&#124;&#8217;33&#8242;&#124;&#124;chr(45)&#124;&#124;&#8217;467300513&#8242;     where company_id =    8    ; + -&#62;    chr(43) - -&#62;  chr(45) &#160;<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sylvainhan.wordpress.com&amp;blog=853682&amp;post=155&amp;subd=sylvainhan&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>update Partnerlocator_company set fax =     chr(43)||&#8217;33&#8242;||chr(45)||&#8217;467300513&#8242;     where company_id =    8    ;</p>
<p>+ -&gt;    chr(43)</p>
<p>- -&gt;  chr(45)</p>
<p>&nbsp;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sylvainhan.wordpress.com/155/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sylvainhan.wordpress.com/155/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sylvainhan.wordpress.com/155/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sylvainhan.wordpress.com/155/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sylvainhan.wordpress.com/155/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sylvainhan.wordpress.com/155/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sylvainhan.wordpress.com/155/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sylvainhan.wordpress.com/155/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sylvainhan.wordpress.com/155/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sylvainhan.wordpress.com/155/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sylvainhan.wordpress.com/155/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sylvainhan.wordpress.com/155/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sylvainhan.wordpress.com/155/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sylvainhan.wordpress.com/155/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sylvainhan.wordpress.com&amp;blog=853682&amp;post=155&amp;subd=sylvainhan&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://sylvainhan.wordpress.com/2011/06/22/charactor-speciaux-in-sql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ecbc220c381a095d0ee44da484bd9d19?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">sylvainhan</media:title>
		</media:content>
	</item>
		<item>
		<title>游街女和烈士刘胡兰的不等式</title>
		<link>http://sylvainhan.wordpress.com/2011/04/14/%e6%b8%b8%e8%a1%97%e5%a5%b3%e5%92%8c%e7%83%88%e5%a3%ab%e5%88%98%e8%83%a1%e5%85%b0%e7%9a%84%e4%b8%8d%e7%ad%89%e5%bc%8f/</link>
		<comments>http://sylvainhan.wordpress.com/2011/04/14/%e6%b8%b8%e8%a1%97%e5%a5%b3%e5%92%8c%e7%83%88%e5%a3%ab%e5%88%98%e8%83%a1%e5%85%b0%e7%9a%84%e4%b8%8d%e7%ad%89%e5%bc%8f/#comments</comments>
		<pubDate>Thu, 14 Apr 2011 16:31:24 +0000</pubDate>
		<dc:creator>sylvainhan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://sylvainhan.wordpress.com/?p=153</guid>
		<description><![CDATA[英国《金融时报》中文网专栏作家 老愚 2011-01-13 (www.ftchinese.com) 每到岁末，中国现场艺术家金锋总要为人们端出一盘开胃小菜。去年是如日中天的易中天，今年是名不见经传的站街女。作品原型是广东东莞警方去年扫黄铐住的小姐，名为《“游街女”昂起了她的头颅，疑似烈女》。这件玻璃钢雕塑，仅有35厘米高，可以称作微型作品。 这个雕塑的上半身和下半身截然不同：一颗昂扬的头颅，有不容亵玩的自尊；红色，这种燃烧的决绝之色，表明女主人的血性与刚烈，裹在里面的乳房也虎虎有生气，俨然不可亵玩——你得用尊重的目光平视这个女子，虽然被绳索紧紧拴着，却活脱脱一个不屈服的精灵。橙色丁字裤挣脱蓝色牛仔短裤的束缚，把香艳的部位提示给观者…… 烈女？有心人对照了刘胡兰的就义油画，确认此女上半身酷似刘胡兰。作者莫非顾忌媒体的意识形态压力，才将标题改为现在这样游移的词语。这个改动，仍然令某些人不舒服。批评家刘仰先生一眼就觑出了苗头，发现了卖淫女不会反抗、慷慨赴死的本质，从而解构了金锋在站街女与烈士之间转换的有效性。“卖淫女与政治概念上革命者的关联，似乎在于‘游街’，因为，以前确实有政治革命者被游街的事情。然而，东莞涉嫌卖淫的女性只是指认现场，而非游街，使得把它们拼凑起来的粘合剂，也只是一个想象。把毫无关联的东西拼凑在一起，自以为就产生了新的东西，这也是当代艺术的浅薄之处”。刘先生断定，卖淫女是不会成为革命者的：“不管性解放、性革命可以宽泛到怎样的程度，卖淫女的革命者资格，或者说是认定标准，是有严格限制的。即：甘为卖淫女的，从来都不可能是性解放的革命者。只有反抗被强迫卖淫的，才有可能成为性解放的革命者，才有可能成为烈士、烈女。” 金锋的想象是否合理？这是一个问题。 卖淫女当然不敢如此反抗，照片上顺从的姿态表明，她们是积极合作的。给予她们反抗的意志和姿态，有无问题恐怕才是核心。中国的现实，全然一副魔幻现实主义的模样，犹如著名的脏小说《土街》的寓言——魔幻皆成现实。夫妻在家中看黄碟被抓，与标榜顶级性服务的“天上人间”并存，公权力可以肆意侵入干扰私生活，也可以放纵性糜烂，一个向度的疯狂只是为了平衡另一个向度的疯狂。 “受侮辱与受损害者”才有革命资格，听起来铿锵有力，但此调早该歇息了。“被”是一个极端复杂的动作，出于生存的“被”胜过老鸨阶层的公然逼迫。何况生存又有多重含义：温饱型、发展型以及享受型的。除非暴力胁迫，性工作者在步入自己的领域之前，心里早已经没有了知识人看重的“道德感”，如果你还试图扮演风月场中的骑士，那就太不解风情了。一份营生，使用某个器官和多个器官，在她们看来，没有什么不对劲的地方。她们唯一的奢求是利润最大化，跟所有的营销者一样，在短时间内获取尽可能多的利益——这个利益也是多方面的，金钱、见识以及百不一见的艳遇，修成人生正果。温饱型的多干快挣，发展型的注重机缘，享受型的注重体验——扭动于成功人士和贪腐官员面前，她们有异样的成就感，性的供给者从来就不缺乏这样的职业成就感。她们在建立自己的性人际圈的同时，体会到其他途径难以领受的乐趣。与利益集团的肌肤厮磨，会让她们产生上升感，也确有无数小姐由此进入上流社会。一个无道德社会里，上与下其实没有什么边际，一次荷尔蒙主导的苟合便足以产生一个“幸福”家庭。 曾几何时，“天上人间”之类后花园所圈养的高级小姐，欣欣然换上了一副上层社会女主人的嘴脸：倚靠张牙舞爪的公权力，她们感觉自己挤入了上流社会，成为美国西太平洋大学博士文凭拥有者唐骏所推崇的人生成功者。“你玩得起我吗？”她们斜睨着阅人无数的眼神，非常硬地刺进探头探脑的门外汉。依附于权势的色相，也是这个社会的主人，而纯粹的性工作者，靠肉体温暖人的劳动者，你们处于生物链的最低端：刚从你们那里出来的，转身就能鄙视上你们；起了歹心的，想一试身手练练胆子的，便把凶光投向你们。 真实的站街女是谦卑的，在国家权力面前甚至有点魂不守舍。她的身体是松弛的，俯就的，她无意去对抗这种周期性发作的权力，她只想知道这次又会如何，需要熬多长时间便可重操旧业。她的职业性自卑与罪感、耻感混杂一体，几乎看不出特种行业的痕迹来了。在中国特色的“猫鼠游戏”中，她们是本能的躲避者和合作者，某些人需要她们的肉体所散发的芳香，同时又需要侮辱她们来证实自己的力量。 她们没有身份。灰色地带的人是无力反抗的，而制造无身份性奴隶的权力无须负责。她们知道，接受定期凌辱使自己能够生存下去的必要条件。所以，她们内心其实是非常放松的，像是参与一场没有悬念的游戏。 雕塑下半身应该是权势者最喜欢出入的地方，紧绷与松弛，造成致命的诱惑——他们知道自己有权力进入，而且不受惩罚。 相比那些不劳而获的权势阶层，性工作者完全有资格梗起脖子对警察喊道：请尊重我。 一个悖论是，游街女早就被修理得低眉顺眼，如果有了刘胡兰式的表情和意志，她们根本就做不了这一行。初涉风月场所的愣头青，经常会用跳楼的方式表达自己的决绝，因为刘胡兰式的自尊完全无用。所以，艺术家金锋未免有点自作多情了，他在性工作者身上寄予了太多人文情怀，把自己的意志安置在了无生命的躯壳上。套用季羡林的定律“坏人是不知道自己是坏人的”，站街女不知道自己是坏人，不配进行性革命的，她们觉得自己出卖劳动获得报酬，符合社会的基本道德。火眼金睛的金锋怎么就看不到这一点呢？ 今天是刘胡兰烈士就义六十四周年的日子，她如果活着，也是七十九岁的老人了。如果冷不防看到金锋这尊梗起脖子的游街女雕塑，不知她会作何想？她该不会自责：我为革命抛头颅洒热血时到底想清楚了吗？ （本文写于1月12日，仅代表作者本人观点。如有建议，请与作者联系：wh2021@126.com） &#160;<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sylvainhan.wordpress.com&amp;blog=853682&amp;post=153&amp;subd=sylvainhan&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>英国《金融时报》中文网专栏作家 <a href="http://www.ftchinese.com/search/%E8%80%81%E6%84%9A/relative_byline" target="_blank">老愚</a> <a href="http://www.ftchinese.com/archiver/2011-01-13">2011-01-13</a> (www.ftchinese.com)</p>
<div id="print_content">
<p>每到岁末，中国现场艺术家金锋总要为人们端出一盘开胃小菜。去年是如日中天的易中天，今年是名不见经传的站街女。作品原型是广东东莞警方去年扫黄铐住的小姐，名为《“游街女”昂起了她的头颅，疑似烈女》。这件玻璃钢雕塑，仅有35厘米高，可以称作微型作品。</p>
<p>这个雕塑的上半身和下半身截然不同：一颗昂扬的头颅，有不容亵玩的自尊；红色，这种燃烧的决绝之色，表明女主人的血性与刚烈，裹在里面的乳房也虎虎有生气，俨然不可亵玩——你得用尊重的目光平视这个女子，虽然被绳索紧紧拴着，却活脱脱一个不屈服的精灵。橙色丁字裤挣脱蓝色牛仔短裤的束缚，把香艳的部位提示给观者……</p>
<p>烈女？有心人对照了刘胡兰的就义油画，确认此女上半身酷似刘胡兰。作者莫非顾忌媒体的意识形态压力，才将标题改为现在这样游移的词语。这个改动，仍然令某些人不舒服。批评家刘仰先生一眼就觑出了苗头，发现了卖淫女不会反抗、慷慨赴死的本质，从而解构了金锋在站街女与烈士之间转换的有效性。“卖淫女与政治概念上革命者的关联，似乎在于‘游街’，因为，以前确实有政治革命者被游街的事情。然而，东莞涉嫌卖淫的女性只是指认现场，而非游街，使得把它们拼凑起来的粘合剂，也只是一个想象。把毫无关联的东西拼凑在一起，自以为就产生了新的东西，这也是当代艺术的浅薄之处”。刘先生断定，卖淫女是不会成为革命者的：“不管性解放、性革命可以宽泛到怎样的程度，卖淫女的革命者资格，或者说是认定标准，是有严格限制的。即：甘为卖淫女的，从来都不可能是性解放的革命者。只有反抗被强迫卖淫的，才有可能成为性解放的革命者，才有可能成为烈士、烈女。”</p>
<p>金锋的想象是否合理？这是一个问题。</p>
<p>卖淫女当然不敢如此反抗，照片上顺从的姿态表明，她们是积极合作的。给予她们反抗的意志和姿态，有无问题恐怕才是核心。中国的现实，全然一副魔幻现实主义的模样，犹如著名的脏小说《土街》的寓言——魔幻皆成现实。夫妻在家中看黄碟被抓，与标榜顶级性服务的“天上人间”并存，公权力可以肆意侵入干扰私生活，也可以放纵性糜烂，一个向度的疯狂只是为了平衡另一个向度的疯狂。</p>
<p>“受侮辱与受损害者”才有革命资格，听起来铿锵有力，但此调早该歇息了。“被”是一个极端复杂的动作，出于生存的“被”胜过老鸨阶层的公然逼迫。何况生存又有多重含义：温饱型、发展型以及享受型的。除非暴力胁迫，性工作者在步入自己的领域之前，心里早已经没有了知识人看重的“道德感”，如果你还试图扮演风月场中的骑士，那就太不解风情了。一份营生，使用某个器官和多个器官，在她们看来，没有什么不对劲的地方。她们唯一的奢求是利润最大化，跟所有的营销者一样，在短时间内获取尽可能多的利益——这个利益也是多方面的，金钱、见识以及百不一见的艳遇，修成人生正果。温饱型的多干快挣，发展型的注重机缘，享受型的注重体验——扭动于成功人士和贪腐官员面前，她们有异样的成就感，性的供给者从来就不缺乏这样的职业成就感。她们在建立自己的性人际圈的同时，体会到其他途径难以领受的乐趣。与利益集团的肌肤厮磨，会让她们产生上升感，也确有无数小姐由此进入上流社会。一个无道德社会里，上与下其实没有什么边际，一次荷尔蒙主导的苟合便足以产生一个“幸福”家庭。</p>
<p>曾几何时，“天上人间”之类后花园所圈养的高级小姐，欣欣然换上了一副上层社会女主人的嘴脸：倚靠张牙舞爪的公权力，她们感觉自己挤入了上流社会，成为美国西太平洋大学博士文凭拥有者唐骏所推崇的人生成功者。“你玩得起我吗？”她们斜睨着阅人无数的眼神，非常硬地刺进探头探脑的门外汉。依附于权势的色相，也是这个社会的主人，而纯粹的性工作者，靠肉体温暖人的劳动者，你们处于生物链的最低端：刚从你们那里出来的，转身就能鄙视上你们；起了歹心的，想一试身手练练胆子的，便把凶光投向你们。</p>
<p>真实的站街女是谦卑的，在国家权力面前甚至有点魂不守舍。她的身体是松弛的，俯就的，她无意去对抗这种周期性发作的权力，她只想知道这次又会如何，需要熬多长时间便可重操旧业。她的职业性自卑与罪感、耻感混杂一体，几乎看不出特种行业的痕迹来了。在中国特色的“猫鼠游戏”中，她们是本能的躲避者和合作者，某些人需要她们的肉体所散发的芳香，同时又需要侮辱她们来证实自己的力量。</p>
<p>她们没有身份。灰色地带的人是无力反抗的，而制造无身份性奴隶的权力无须负责。她们知道，接受定期凌辱使自己能够生存下去的必要条件。所以，她们内心其实是非常放松的，像是参与一场没有悬念的游戏。</p>
<p><img src="http://media.ftchinese.com/picture/6/000022146_piclink_0_0.jpg" alt="" /></p>
<p>雕塑下半身应该是权势者最喜欢出入的地方，紧绷与松弛，造成致命的诱惑——他们知道自己有权力进入，而且不受惩罚。</p>
<p>相比那些不劳而获的权势阶层，性工作者完全有资格梗起脖子对警察喊道：请尊重我。</p>
<p>一个悖论是，游街女早就被修理得低眉顺眼，如果有了刘胡兰式的表情和意志，她们根本就做不了这一行。初涉风月场所的愣头青，经常会用跳楼的方式表达自己的决绝，因为刘胡兰式的自尊完全无用。所以，艺术家金锋未免有点自作多情了，他在性工作者身上寄予了太多人文情怀，把自己的意志安置在了无生命的躯壳上。套用季羡林的定律“坏人是不知道自己是坏人的”，站街女不知道自己是坏人，不配进行性革命的，她们觉得自己出卖劳动获得报酬，符合社会的基本道德。火眼金睛的金锋怎么就看不到这一点呢？</p>
<p>今天是刘胡兰烈士就义六十四周年的日子，她如果活着，也是七十九岁的老人了。如果冷不防看到金锋这尊梗起脖子的游街女雕塑，不知她会作何想？她该不会自责：我为革命抛头颅洒热血时到底想清楚了吗？</p>
<p>（本文写于1月12日，仅代表作者本人观点。如有建议，请与作者联系：wh2021@126.com）</p>
</div>
<p>&nbsp;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sylvainhan.wordpress.com/153/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sylvainhan.wordpress.com/153/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sylvainhan.wordpress.com/153/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sylvainhan.wordpress.com/153/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sylvainhan.wordpress.com/153/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sylvainhan.wordpress.com/153/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sylvainhan.wordpress.com/153/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sylvainhan.wordpress.com/153/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sylvainhan.wordpress.com/153/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sylvainhan.wordpress.com/153/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sylvainhan.wordpress.com/153/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sylvainhan.wordpress.com/153/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sylvainhan.wordpress.com/153/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sylvainhan.wordpress.com/153/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sylvainhan.wordpress.com&amp;blog=853682&amp;post=153&amp;subd=sylvainhan&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://sylvainhan.wordpress.com/2011/04/14/%e6%b8%b8%e8%a1%97%e5%a5%b3%e5%92%8c%e7%83%88%e5%a3%ab%e5%88%98%e8%83%a1%e5%85%b0%e7%9a%84%e4%b8%8d%e7%ad%89%e5%bc%8f/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ecbc220c381a095d0ee44da484bd9d19?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">sylvainhan</media:title>
		</media:content>

		<media:content url="http://media.ftchinese.com/picture/6/000022146_piclink_0_0.jpg" medium="image" />
	</item>
	</channel>
</rss>
