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

<channel>
	<title>静静的角落</title>
	<atom:link href="http://chuangen.name/feed" rel="self" type="application/rss+xml" />
	<link>http://chuangen.name</link>
	<description>静静地编写我的代码，也是在编写我的人生～</description>
	<lastBuildDate>Fri, 31 Dec 2010 14:57:38 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>bye, 2010</title>
		<link>http://chuangen.name/archives/2010/12/31/bye-2010.html</link>
		<comments>http://chuangen.name/archives/2010/12/31/bye-2010.html#comments</comments>
		<pubDate>Fri, 31 Dec 2010 14:57:38 +0000</pubDate>
		<dc:creator>范 传根</dc:creator>
				<category><![CDATA[我的日记]]></category>

		<guid isPermaLink="false">http://chuangen.name/?p=167</guid>
		<description><![CDATA[2010，望着你，我无言以对。
午夜到了，发现一天即将过去，想抓住它，便每天熬夜；
周末到了，发现一周即将过去，想抓住它，便周六加班；
现在，一年即将过去，却没有一点点时间可以挽留。
有太多该做的事情没有做，有太多的想法没有时间实践，是时间溜走的太快还是我太贪婪？
2010，既然要走，请把一年的苦痛、孤独和迷茫带走，把一年欢乐、幸福和成就的回忆留下。
再见，2010~
]]></description>
			<content:encoded><![CDATA[<p>2010，望着你，我无言以对。<br />
午夜到了，发现一天即将过去，想抓住它，便每天熬夜；<br />
周末到了，发现一周即将过去，想抓住它，便周六加班；<br />
现在，一年即将过去，却没有一点点时间可以挽留。<br />
有太多该做的事情没有做，有太多的想法没有时间实践，是时间溜走的太快还是我太贪婪？</p>
<p>2010，既然要走，请把一年的苦痛、孤独和迷茫带走，把一年欢乐、幸福和成就的回忆留下。<br />
再见，2010~</p>
]]></content:encoded>
			<wfw:commentRss>http://chuangen.name/archives/2010/12/31/bye-2010.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Hi, 2010</title>
		<link>http://chuangen.name/archives/2010/01/04/hi-2010.html</link>
		<comments>http://chuangen.name/archives/2010/01/04/hi-2010.html#comments</comments>
		<pubDate>Mon, 04 Jan 2010 02:14:01 +0000</pubDate>
		<dc:creator>范 传根</dc:creator>
				<category><![CDATA[我的日记]]></category>
		<category><![CDATA[2010]]></category>
		<category><![CDATA[Hello]]></category>

		<guid isPermaLink="false">http://chuangen.name/archives/2010/01/04/hi-2010.html</guid>
		<description><![CDATA[2010年悄悄地来了，在我写代码时。我很想跟他打声招呼，结果错过了，因为我还在忙着完成2009的计划。]]></description>
			<content:encoded><![CDATA[<p>2010年悄悄地来了，在我写代码时。我很想跟他打声招呼，结果错过了，因为我还在忙着完成2009的计划。</p>
<p>三天假期也算小有收获，重写了wml2html和mmsdecode，都是纯托管实现（C#），稍后作为彩信阅览器小工具程序提供给大家使用。</p>
<p> 虽然晚了些，还是问候大家：元旦快乐！</p>
]]></content:encoded>
			<wfw:commentRss>http://chuangen.name/archives/2010/01/04/hi-2010.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>[转]专家称中国不是盗版最猖獗国家 美欧更为严重</title>
		<link>http://chuangen.name/archives/2009/12/12/pirate.html</link>
		<comments>http://chuangen.name/archives/2009/12/12/pirate.html#comments</comments>
		<pubDate>Sat, 12 Dec 2009 09:02:15 +0000</pubDate>
		<dc:creator>范 传根</dc:creator>
				<category><![CDATA[计算机应用]]></category>
		<category><![CDATA[盗版]]></category>
		<category><![CDATA[美欧]]></category>

		<guid isPermaLink="false">http://chuangen.name/archives/2009/12/12/pirate.html</guid>
		<description><![CDATA[美国的电影盗版问题比中国更严重，原因可能是美国人使用宽带上网更方便。此外，法国、西班牙和英国的盗版问题也比中国严重。]]></description>
			<content:encoded><![CDATA[<p>文章来源：人民网（<a title="http://it.people.com.cn/GB/42891/42893/6515267.html" href="http://it.people.com.cn/GB/42891/42893/6515267.html">http://it.people.com.cn/GB/42891/42893/6515267.html</a>）</p>
<p> 美国圣迭戈托马斯·杰斐逊法学院的施瓦巴赫教授近日撰写报告指出，中国不是世界上盗版最猖獗的国家。按人均数来算，很多国家的盗版问题比中国更严重。   <br /> 据美国麦克拉奇报业集团网站报道，施瓦巴赫在这份长达24页的报告中说，美国的媒体和政客都倾向于谴责中国。    <br /> 他对照了美国电影协会提供的国际电影盗版数据，然后和这些国家的人口数量进行比较研究得出结论，美国的电影盗版问题比中国更严重，原因可能是美国人使用宽带上网更方便。此外，法国、西班牙和英国的盗版问题也比中国严重。    <br /> 施瓦巴赫说，如何计算盗版造成的损失是个问题。他说：“国际唱片工业联合会提供的数据可能夸大了盗版的实际损失。”他说，就连墨西哥的CD盗版问题都比中国严重。    <br /> 施瓦巴赫认为，其实一些西方国家的盗版现象才是最严重的，但没有引起媒体的注意，“可能是因为一切都在网上进行，没有那么引人注意”。 </p>
]]></content:encoded>
			<wfw:commentRss>http://chuangen.name/archives/2009/12/12/pirate.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>语录阅览器公开源代码</title>
		<link>http://chuangen.name/archives/2009/12/07/anaviewer-opensource.html</link>
		<comments>http://chuangen.name/archives/2009/12/07/anaviewer-opensource.html#comments</comments>
		<pubDate>Sun, 06 Dec 2009 22:23:54 +0000</pubDate>
		<dc:creator>范 传根</dc:creator>
				<category><![CDATA[我的作品]]></category>
		<category><![CDATA[程序设计]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[AnaViewer]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[OpenSource]]></category>
		<category><![CDATA[开源]]></category>
		<category><![CDATA[语录阅览器]]></category>

		<guid isPermaLink="false">http://chuangen.name/archives/2009/12/07/anaviewer-opensource.html</guid>
		<description><![CDATA[自认为语录阅览器设计初衷很好，是个很实用的程序，开源应该是该程序的最佳出路。项目建在Google Code，感兴趣的程序员朋友可以一起更新维护它。]]></description>
			<content:encoded><![CDATA[<p>语录阅览器发布居然一年多了！我曾决定很认真地维护这个程序，不断扩充其功能，但世事难料，工作、生活压力使我一直没有时间来维护这个软件。</p>
<p>自认为语录阅览器设计初衷很好，是个很实用的程序，很多朋友曾留言告知我程序BUG和一些建议。当有一天我不再维护它，程序就面临“死亡”；但如果是开放源码，可能会有其他程序员“收留”它。开源应该是该程序的最佳出路。</p>
<p>我把去年的源代码放在google code上，并尽量花些时间更新它，主要目标在于：   <br />1. 修正已知BUG；    <br />2. 增加语录本地存储功能（你可以把一些不方便公开的看法记录在本地）；    <br />3. 设计更灵活的操作，去掉没用的按钮（如收藏等）；    <br />4. 其他</p>
<p>项目地址：<a href="http://anaviewer.googlecode.com/">http://anaviewer.googlecode.com/</a>    <br />程序第一次发布时的文章：<a href="http://chuangen.name/archives/2008/09/09/anaviewer_1_0_alpha.html">http://chuangen.name/archives/2008/09/09/anaviewer_1_0_alpha.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://chuangen.name/archives/2009/12/07/anaviewer-opensource.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>??运算符</title>
		<link>http://chuangen.name/archives/2009/11/12/%e8%bf%90%e7%ae%97%e7%ac%a6.html</link>
		<comments>http://chuangen.name/archives/2009/11/12/%e8%bf%90%e7%ae%97%e7%ac%a6.html#comments</comments>
		<pubDate>Thu, 12 Nov 2009 07:25:52 +0000</pubDate>
		<dc:creator>范 传根</dc:creator>
				<category><![CDATA[未分类]]></category>

		<guid isPermaLink="false">http://chuangen.name/archives/2009/11/12/%e8%bf%90%e7%ae%97%e7%ac%a6.html</guid>
		<description><![CDATA[C#总是有些讨人喜欢的写法，即简洁又不会引起混乱。??运算符就是这样。为了确保赋值不为空，我们通常这样写：

1:  string name = null;
2:  string str = (name == null) ? &#34;&#34; : name;

&#160; 有了??运算符，我们就有了更简洁的写法：

1:  string name = null;
2:  string str = name ?? &#34;&#34;;

&#160;
是不是很清爽？我用了好几年了，却是头一回看到，真是相见恨晚。
]]></description>
			<content:encoded><![CDATA[<p>C#总是有些讨人喜欢的写法，即简洁又不会引起混乱。??运算符就是这样。为了确保赋值不为空，我们通常这样写：</p>
<div style="border-right: #4f81bd 1px solid; border-top: #4f81bd 1px solid; font-size: 12px; margin: 0px; overflow: auto; border-left: #4f81bd 1px solid; width: 100%; color: black; line-height: 18px; border-bottom: #4f81bd 1px solid; font-family: &#39;Courier New&#39;,&#39;Consolas&#39;,&#39;Fixedsys&#39;,&#39;BitStream Vera Sans Mono&#39;, courier,monospace,serif; background-color: white; text-align: left">
<pre style="padding-right: 0px! important; padding-left: 12px! important; padding-bottom: 0px! important; margin: 0em; color: black; word-break: normal; line-height: 18px; padding-top: 0px! important; background-color: #f7f7ff! important; word-wrap: break-word"><span style="color: #4f81bd; line-height: 18px">1:  </span><span style="color: blue">string </span>name = <span style="color: blue">null</span>;</pre>
<pre style="padding-right: 0px! important; padding-left: 12px! important; padding-bottom: 0px! important; margin: 0em; color: black; word-break: normal; line-height: 18px; padding-top: 0px! important; background-color: #fff! important; word-wrap: break-word"><span style="color: #4f81bd; line-height: 18px">2:  </span><span style="color: blue">string </span>str = (name == <span style="color: blue">null</span>) ? <span style="color: maroon">&quot;&quot; </span>: name;</pre>
</div>
<p>&#160; <br />有了??运算符，我们就有了更简洁的写法：</p>
<div style="border-right: #4f81bd 1px solid; border-top: #4f81bd 1px solid; font-size: 12px; margin: 0px; overflow: auto; border-left: #4f81bd 1px solid; width: 100%; color: black; line-height: 18px; border-bottom: #4f81bd 1px solid; font-family: &#39;Courier New&#39;,&#39;Consolas&#39;,&#39;Fixedsys&#39;,&#39;BitStream Vera Sans Mono&#39;, courier,monospace,serif; background-color: white; text-align: left">
<pre style="padding-right: 0px! important; padding-left: 12px! important; padding-bottom: 0px! important; margin: 0em; color: black; word-break: normal; line-height: 18px; padding-top: 0px! important; background-color: #f7f7ff! important; word-wrap: break-word"><span style="color: #4f81bd; line-height: 18px">1:  </span><span style="color: blue">string </span>name = <span style="color: blue">null</span>;</pre>
<pre style="padding-right: 0px! important; padding-left: 12px! important; padding-bottom: 0px! important; margin: 0em; color: black; word-break: normal; line-height: 18px; padding-top: 0px! important; background-color: #fff! important; word-wrap: break-word"><span style="color: #4f81bd; line-height: 18px">2:  </span><span style="color: blue">string </span>str = name ?? <span style="color: maroon">&quot;&quot;</span>;</pre>
</div>
<p>&#160;</p>
<p>是不是很清爽？我用了好几年了，却是头一回看到，真是相见恨晚。</p>
]]></content:encoded>
			<wfw:commentRss>http://chuangen.name/archives/2009/11/12/%e8%bf%90%e7%ae%97%e7%ac%a6.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[转]解读《当幸福来敲门》:什么是幸福?</title>
		<link>http://chuangen.name/archives/2009/09/11/the-pursuit-of-happyness.html</link>
		<comments>http://chuangen.name/archives/2009/09/11/the-pursuit-of-happyness.html#comments</comments>
		<pubDate>Thu, 10 Sep 2009 17:42:20 +0000</pubDate>
		<dc:creator>范 传根</dc:creator>
				<category><![CDATA[娱乐生活]]></category>

		<guid isPermaLink="false">http://chuangen.name/archives/2009/09/11/%e8%bd%ac%e8%a7%a3%e8%af%bb%e3%80%8a%e5%bd%93%e5%b9%b8%e7%a6%8f%e6%9d%a5%e6%95%b2%e9%97%a8%e3%80%8b%e4%bb%80%e4%b9%88%e6%98%af%e5%b9%b8%e7%a6%8f.html</guid>
		<description><![CDATA[Don't ever let somebody tell you， you can't do something-别让别人跟你说，你成不了大器； You got a dream,you have to pretend it-你有梦想的话，就必须保护它；People can't do something themselves， they wana tell you can't do it-那些自己没有成才的人会说你也不能成才；You want something，go get it-你想要什么的话,就得努力去得到。]]></description>
			<content:encoded><![CDATA[<p>……Don&#8217;t ever let somebody tell you， you can&#8217;t do something-别让别人跟你说，你成不了大器； You got a dream,you have to pretend it-你有梦想的话，就必须保护它；People can&#8217;t do something themselves， they wana tell you can&#8217;t do it-那些自己没有成才的人会说你也不能成才；You want something，go get it-你想要什么的话,就得努力去得到。……</p>
<p>&#160;</p>
<p>本文转自：新华网(<a href="http://news.xinhuanet.com/edu/2008-03/04/content_7713848.htm" target="_blank">http://news.xinhuanet.com/edu/2008-03/04/content_7713848.htm</a>)</p>
<p>&#160;&#160;&#160; 当幸福来敲门   <br />&#160;&#160;&#160; 片名：The Pursuit of Happyness    <br />&#160;&#160;&#160; 导演：加布里尔·穆西诺    <br />&#160;&#160;&#160; 主演：杰登·史密斯、珊迪·纽顿、威尔·史密斯    <br />&#160;&#160;&#160; 类型：剧情    <br />&#160;&#160;&#160; 发行：索尼哥伦比亚    <br />&#160;&#160;&#160; 电影简介：</p>
<p>&#160;&#160;&#160; 1981年。旧金山。</p>
<p>&#160;&#160;&#160; 克里斯·加德纳是个聪明的医疗器械推销员， </p>
<p>但在次经济萧条时期，他的日子很不好过。虽然每天奔波于各家医院和诊所，但医生们对他的骨密度扫描仪根本不感兴趣，因为这台仪器要比X光扫描仪贵出两倍。</p>
<p>&#160;&#160;&#160; 他的妻子琳达无法继续忍受艰难的生活，撇下他和5岁的儿子克里斯托弗出走。但加德纳父子两人的背运还没有结束，他们因为缴不起房租而被房东扫地出门，有时甚至要在地铁的卫生间里过夜。</p>
<p>&#160;&#160;&#160; 克里斯决心转行为有机会获得高收入的证券经纪人，他的努力和智慧打动了证券公司的经理杰·特维斯图，通过了初试。而在复试中，因为出师不利，克里斯不得不穿着粉刷工的衣服来到面试现场。但只念过高中的他决心极大，最终，公司的几位合伙人还是觉得给他一个机会比较好，于是，他成为20个实习生之一。</p>
<p>&#160;&#160;&#160; 此后的半年实习期加德纳父子的生活将更加艰难，因为实习期没有工资，而20个实习生中只有一个能留下来。他们暂时还得依靠那几台骨密度扫描仪过活……</p>
<h3>电影幕后</h3>
<p>&#160;&#160;&#160; &quot;上阵父子兵&quot;用来形容这部电影非常适合。</p>
<p>&#160;&#160;&#160; 小克里斯托弗的扮演者，现年八岁的杰登·史密斯，是威尔·史密斯的孩子。所以他很好地继承了威尔·史密斯天生的幽默与聪明才智。小杰登在此前华纳兄弟推出的热门剧集《我们这帮人》中已经成功塑造了一个人见人爱的小顽童瑞吉的形象。因此对于在本片中扮演一个聪慧可爱的五岁孩子，杰登堪称是轻车熟路。</p>
<p>&#160;&#160;&#160; 在好莱坞流传着这样一句话&quot;千万别和小孩子在一起拍戏！&quot;因为那些活跃于好莱坞的小孩儿经常会轻易夺取明星们的星光。而第一次与儿子大演对手戏的威尔·史密斯就吃足了苦头。因为小杰登入戏非常快，且极度投入，而威尔·史密斯则因为&quot;和儿子演戏很不适应&quot;屡屡遭遇尴尬。不过还好，在导演加布里尔·穆西诺的&quot;协调&quot;下，父子俩亲密配合，很多桥段都是一气呵成。从专业角度看，史密斯父子俩在影片中的配合堪称是达到了戏里戏外合一的理想化。因此，观众可以看到很多父子俩激情感人、催人泪下的一幕。</p>
<p>&#160;&#160;&#160; 电影《当幸福来敲门》是部励志片。而励志题材的故事大抵都离不开这样的模式-比如窘迫的处境、艰难的奋斗、没完没了的倒霉事……，然后便会出现戏剧化的一丝机遇……</p>
<p>&#160;&#160;&#160; 虽然《当幸福来敲门》也不能落入俗套，也虽然这部电影没有靓丽的男女主演，没有唯美的画面与动人的背景音乐，但却仍不乏拥有一个好故事，并且，是一个足以将人打动的好故事。</p>
<h3>什么是幸福？</h3>
<p>&#160;&#160;&#160; 每个人在心中都有自己的幸福标准，只要达到了这个标准，你就是幸福的。别人的幸福不一定是你所想要的，而你的幸福别人或许也未必认同。幸福是一件私有产品，只有自己才能体会那片刻的快乐。如果非要给幸福下个定论。我觉得无非有两种：一是你拥有完美的生活；一是做你最喜欢的事情。</p>
<p>&#160;&#160;&#160; 克里斯·加德纳拥有的显然是后一种幸福。单亲家庭长大的他，在28岁的时候才见到自己的亲生父亲，于是他想让自己的儿子一直都活在自己的保护下。他的梦想是成为一名投资专家。可是生活的困苦，却让他的妻子离开了他。接着，没有房租的他开始带着儿子过着流浪的生活。一方面他不得不提着40多磅重的医疗仪器四处奔走推销用以糊口；一方面他要保护好只有5岁儿子的幼小心灵。他因交不上房租，而不得不义务粉墙；他因没钱交汽车罚单，而不得不在警察局里过夜；他因无处可去，而不得不抱着儿子在厕所过夜；他甚至不得不在下班后狂奔，那只为排队获得进收容所的机会……。太多太多的&quot;不得不&quot;， 最终让克里斯·加德纳在获得工作机会的那一刻感到了莫大的幸福。</p>
<p>&#160;&#160;&#160; 他终于成为了一名正式的经济师，这离他的梦想更近了。在那一刻，站在人群中的他激动得不知道如何来表达内心的感受，他飞快地跑到儿子面前和他相拥，眼中的泪花在这一刻则是幸福的泪水。虽然，这对他来说只是一个起步，不过，这确是他的人生转折。得到幸福的过程是如此的艰难，也正因为艰难，我们才会珍惜。他在球场上对儿子说：&quot;如果你有梦想，那么请保护好它。&quot;在那一刻，他都未必能坚持住自己的梦想，但是他却鼓励儿子能够坚信梦想。</p>
<p>&#160;&#160;&#160; 幸福到底是什么？人的一生能体验到多少份量的幸福，其实关键在于你对人生所持的态度。你认为尽责任是一种幸福，你就有了幸福的体验；你认为知足是一种幸福，你就有了知足常乐的幸福体验；你认为平淡简朴是一种幸福，你就有了比别人多得多的幸福体验。</p>
<p>&#160;&#160;&#160; 最后我们以片中原话结尾：Don&#8217;t ever let somebody tell you， you can&#8217;t do something-别让别人跟你说，你成不了大器； You got a dream,you have to pretend it-你有梦想的话，就必须保护它；People can&#8217;t do something themselves， they wana tell you can&#8217;t do it-那些自己没有成才的人会说你也不能成才；You want something，go get it-你想要什么的话,就得努力去得到。</p>
]]></content:encoded>
			<wfw:commentRss>http://chuangen.name/archives/2009/09/11/the-pursuit-of-happyness.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>2009.9.9 上帝的礼物</title>
		<link>http://chuangen.name/archives/2009/09/09/nice-day.html</link>
		<comments>http://chuangen.name/archives/2009/09/09/nice-day.html#comments</comments>
		<pubDate>Wed, 09 Sep 2009 15:17:50 +0000</pubDate>
		<dc:creator>范 传根</dc:creator>
				<category><![CDATA[娱乐生活]]></category>
		<category><![CDATA[我的日记]]></category>
		<category><![CDATA[享受]]></category>
		<category><![CDATA[动听]]></category>
		<category><![CDATA[快乐]]></category>
		<category><![CDATA[特别]]></category>
		<category><![CDATA[轻松]]></category>

		<guid isPermaLink="false">http://chuangen.name/archives/2009/09/09/2009-9-9-%e4%bb%8a%e5%a4%a9%e6%98%af%e4%b8%aa%e5%a5%bd%e6%97%a5%e5%ad%90.html</guid>
		<description><![CDATA[2009-9-9，有家庭的快乐，也有工作的满足，还有很美的景色和动听的音乐，人生还缺少什么呢？！]]></description>
			<content:encoded><![CDATA[<p>今天是个很享受的日子，9.9.9这样一串数字使之更显特殊。细数一下今天开心的事吧</p>
<p>&gt;母亲身体好起来了，整个家都轻松了；   <br />&gt;早上早早地上班，没有红灯和堵车；&#160; <br />&gt;在公交车上看了by2的《don&#8217;t go away》MTV，很好听and很好看；    <br />&gt;晚上发现兴宁桥夜景很美，盘算着这几天就抽时间认真去玩一下；    <br />&gt;签了一张“契约”，也算是不坏的事情吧；    <br />&gt;做了一个iPhone风格的程序界面，陶醉其中。</p>
<p>有家庭的快乐，也有工作的满足，还有很美的景色和动听的音乐，人生还缺少什么呢？！</p>
]]></content:encoded>
			<wfw:commentRss>http://chuangen.name/archives/2009/09/09/nice-day.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>this time (august rush)</title>
		<link>http://chuangen.name/archives/2009/08/15/this-time-august-rush.html</link>
		<comments>http://chuangen.name/archives/2009/08/15/this-time-august-rush.html#comments</comments>
		<pubDate>Fri, 14 Aug 2009 21:12:00 +0000</pubDate>
		<dc:creator>范 传根</dc:creator>
				<category><![CDATA[我的日记]]></category>
		<category><![CDATA[音乐心情]]></category>
		<category><![CDATA[love]]></category>
		<category><![CDATA[this time]]></category>

		<guid isPermaLink="false">http://chuangen.name/archives/2009/08/15/this-time-august-rush.html</guid>
		<description><![CDATA[隐隐约约间，面前出现你的形象，心顿时失去平静。
总是忆起你，是因为爱恋还是孤寂，或是仅仅因为这首歌？
我试着擦去一切痕迹，远眺远方，开始新的路程。
这一次，我能否将你忘怀？]]></description>
			<content:encoded><![CDATA[<p>隐隐约约间，面前出现你的形象，心顿时失去平静。   <br />总是忆起你，是因为爱恋还是孤寂，或是仅仅因为这首歌？    <br />我试着擦去一切痕迹，远眺远方，开始新的路程。    <br />这一次，我能否将你忘怀？</p>
<p>[ti:this time]   <br />[ar:jonathan rhys meyers]    <br />[al:august rush]    <br />Tonight the sky above     <br />今晚在上面的天空    <br />Reminds me of you, love    <br />使我记起你，（我的）爱    <br />Walking through wintertime    <br />冬天已不再来    <br />Where the stars all shine    <br />满天星光依旧    <br />The angel on the stairs    <br />台阶上的天使    <br />Will tell you I was there    <br />会告诉你我还在那里等待    <br />Under the front porch light    <br />在廊前的灯光下    <br />Ona mystery night    <br />在神秘的夜色中    <br />I’ve been sitting watching life pass from the sidelines    <br />我痴坐在那，看岁月走来又走去    <br />Been waiting for a dream to seep in through my blinds    <br />等待一个美梦渗透我的阴霾    <br />I wondered what might happen if I left this all behind    <br />抛下眷恋会怎样？我一直不停猜    <br />Would the wind be at my back?    <br />这一次，我能否离开？    <br />Could I get you off my mind    <br />这一次，我能否将你忘怀？    <br />This time    </p>
<p>The neon lights in bars    <br />在酒吧中的霓虹    <br />And headlights from the cars    <br />来自汽车的前灯    <br />Have started a symphony    <br />已经开始一首交响乐    <br />It’s around me    <br />它包围着我    <br />The things I left behind    <br />我放下一切    <br />Have melted in my mind    <br />融铸在我心中    <br />And now there’s a purity    <br />现在这里很纯净    <br />Inside of me    <br />我的身体里    <br />I’ve been sitting watching life pass from the sidelines    <br />我痴坐在那，看岁月走来又走去    <br />Been waiting for a dream to seep in through my blinds    <br />等待一个美梦渗透我的阴霾    <br />I wondered what might happen if I left this all behind    <br />抛下眷恋会怎样？我一直不停猜    <br />Would the wind be at my back?    <br />这一次，我能否离开？    <br />Could I get you off my mind    <br />这一次，我能否将你忘怀？    <br />This time </p>
]]></content:encoded>
			<wfw:commentRss>http://chuangen.name/archives/2009/08/15/this-time-august-rush.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>C# 分部类定义很好很强大</title>
		<link>http://chuangen.name/archives/2009/07/07/csharp-partial-class.html</link>
		<comments>http://chuangen.name/archives/2009/07/07/csharp-partial-class.html#comments</comments>
		<pubDate>Tue, 07 Jul 2009 09:14:57 +0000</pubDate>
		<dc:creator>范 传根</dc:creator>
				<category><![CDATA[程序设计]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[CSharp]]></category>
		<category><![CDATA[partial]]></category>
		<category><![CDATA[分部类]]></category>

		<guid isPermaLink="false">http://chuangen.name/archives/2009/07/07/csharp-partial-class.html</guid>
		<description><![CDATA[一个惊喜——使用分部类定义很久了，但刚刚发现：编译时将从所有分部类型定义中对“接口”进行合并，而不仅仅是类属性、成员和XML注释！好吧，这的确不是什么新发现，但是，当对修改类型化数据集一筹莫展时，而恍然发现可以在分部类中实现一个接口！请理解我的心情]]></description>
			<content:encoded><![CDATA[<p>一个惊喜——使用分部类定义很久了，但刚刚发现：编译时将从所有分部类型定义中对“<strong>接口</strong>”进行合并，而不仅仅是类属性、成员和XML注释！</p>
<p>好吧，这的确不是什么新发现，但是，当我对修改类型化数据集一筹莫展时，而恍然发现可以在分部类中实现一个接口！请理解我的心情！</p>
<p>情况是这样的：为了支持多种数据源，我先定义一个接口IRecordRow，然后通过可视化方式添加一个类型化数据集，数据集中包含 Records 表，当然，会自动生成 RecordsDataTable 和 RecordsRow 类，RecordsRow 在 *DataSet.Designer.cs 文件中声明如下：</p>
<div style="border-bottom: #4f81bd 1px solid; text-align: left; border-left: #4f81bd 1px solid; line-height: 18px; background-color: white; margin: 0px; width: 100%; font-family: &#39;Courier New&#39;,&#39;Consolas&#39;,&#39;Fixedsys&#39;,&#39;BitStream Vera Sans Mono&#39;, courier,monospace,serif; color: black; font-size: 12px; overflow: auto; border-top: #4f81bd 1px solid; border-right: #4f81bd 1px solid">
<pre style="padding-bottom: 0px !important; line-height: 18px; background-color: #fff !important; margin: 0em; padding-left: 12px !important; padding-right: 0px !important; word-wrap: break-word; color: black; word-break: normal; padding-top: 0px !important"><span style="color: blue">public partial class </span><span style="color: teal">RecordsRow </span>: <span style="color: blue">global</span>::System.Data.<span style="color: teal">DataRow </span></pre>
</div>
<p>那么，我们怎样让 RecordsRow 实现接口 IRecordRow 呢？在 *DataSet.Designer.cs 中修改是肯定不行的。使用分部类就可以这样做：新建一个文件如*DataSet.User.cs，编写代码：</p>
<div style="border-bottom: #4f81bd 1px solid; text-align: left; border-left: #4f81bd 1px solid; line-height: 18px; background-color: white; margin: 0px; width: 100%; font-family: &#39;Courier New&#39;,&#39;Consolas&#39;,&#39;Fixedsys&#39;,&#39;BitStream Vera Sans Mono&#39;, courier,monospace,serif; color: black; font-size: 12px; overflow: auto; border-top: #4f81bd 1px solid; border-right: #4f81bd 1px solid">
<pre style="padding-bottom: 0px !important; line-height: 18px; background-color: #fff !important; margin: 0em; padding-left: 12px !important; padding-right: 0px !important; word-wrap: break-word; color: black; word-break: normal; padding-top: 0px !important"><span style="color: blue">partial class </span><span style="color: teal">*DataSet
</span>{
    <span style="color: blue">partial class </span><span style="color: teal">RecordsRow </span>: <span style="color: teal">IRecordRow
    </span>{...}
}</pre>
</div>
<p>这样就可以了，编译时，系统会把这两个声明合并为：</p>
<div style="border-bottom: #4f81bd 1px solid; text-align: left; border-left: #4f81bd 1px solid; line-height: 18px; background-color: white; margin: 0px; width: 100%; font-family: &#39;Courier New&#39;,&#39;Consolas&#39;,&#39;Fixedsys&#39;,&#39;BitStream Vera Sans Mono&#39;, courier,monospace,serif; color: black; font-size: 12px; overflow: auto; border-top: #4f81bd 1px solid; border-right: #4f81bd 1px solid">
<pre style="padding-bottom: 0px !important; line-height: 18px; background-color: #fff !important; margin: 0em; padding-left: 12px !important; padding-right: 0px !important; word-wrap: break-word; color: black; word-break: normal; padding-top: 0px !important"><span style="color: blue">partial class </span><span style="color: teal">*DataSet
</span>{
    <span style="color: blue">partial class </span><span style="color: teal">RecordsRow </span>: <span style="color: blue">global</span>::System.Data.<span style="color: teal">DataRow</span>, <span style="color: teal">IRecordRow
    </span>{...}
}</pre>
</div>
<p>哇，如此完美！正如MSDN中描述的那样：当使用大项目或自动生成的代码时，将类、结构或接口类型拆分到多个文件中很有用。</p>
]]></content:encoded>
			<wfw:commentRss>http://chuangen.name/archives/2009/07/07/csharp-partial-class.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>(开源,GPLv3)EbookCopier 实现(3) &#8211; 使用 iTextSharp 库生成 PDF 文档</title>
		<link>http://chuangen.name/archives/2009/03/18/ebookcopier-intro-3.html</link>
		<comments>http://chuangen.name/archives/2009/03/18/ebookcopier-intro-3.html#comments</comments>
		<pubDate>Wed, 18 Mar 2009 08:18:00 +0000</pubDate>
		<dc:creator>范 传根</dc:creator>
				<category><![CDATA[程序设计]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[ebookcopier]]></category>
		<category><![CDATA[GPL]]></category>
		<category><![CDATA[iText]]></category>
		<category><![CDATA[iTextSharp]]></category>
		<category><![CDATA[OpenSource]]></category>
		<category><![CDATA[PDF]]></category>
		<category><![CDATA[开源]]></category>
		<category><![CDATA[数字图书复印机]]></category>

		<guid isPermaLink="false">http://chuangen.name/archives/2009/03/18/ebookcopier-intro-3.html</guid>
		<description><![CDATA[本文介绍 EbookCopier 中利用 iTextSharp 开源类库生成 PDF 文档的实现方法。我们在后台线程设置 PDF 文档信息，并设置页眉和页脚，然后将一组图片添加到PDF文档中，每张图片铺满一个页面。用 iTextSharp (开源的.NET类库) 生成 PDF 文档是件很轻松的事情。]]></description>
			<content:encoded><![CDATA[<p>用 <a title="iTextSharp 项目主页" href="http://itextsharp.sourceforge.net/index.html" target="_blank">iTextSharp</a> (开源的.NET类库) 生成 PDF 文档是件很轻松的事情。iTextSharp 是 iText 的C#版本，文档可以参阅 <a title="iText documentation (JAVA)" href="http://itextdocs.lowagie.com/" target="_blank">Java 版本的 iText 文档</a>。苟安廷撰写的《<a href="http://dev.csdn.net/article/62/62119.shtm" target="_blank">用C#制作PDF文件全攻略</a>》写的很实用，特别是关于中文支持部分，推荐大家阅览。</p>
<p>数字图书复印机要生成的 PDF 文档很简单：将一组图片添加到PDF文档中，每张图片作为一个页面。相关的源代码在 <a href="http://code.google.com/p/ebookcopier/source/browse/#svn/trunk/EbookCopier/Pdf">/EbookCopier/Pdf</a> 目录下。</p>
<p>需要注意的是，PDF 文档生成过程是件很耗时的操作，当你的图片很多时，可能需要几分钟的时间，因此我们把它到后台线程工作。使用 BackgroundWorker 可以很方便地报告进度和状态。我们先初始化一个 BackgroundWorker 实例：</p>
<div style="border-bottom: #4f81bd 1px solid; text-align: left; border-left: #4f81bd 1px solid; line-height: 18px; background-color: white; margin: 0px; width: 99%; font-family: &#39;Courier New&#39;,&#39;Consolas&#39;,&#39;Fixedsys&#39;,&#39;BitStream Vera Sans Mono&#39;, courier,monospace,serif; color: black; font-size: 12px; overflow: auto; border-top: #4f81bd 1px solid; border-right: #4f81bd 1px solid">
<pre style="padding-bottom: 0px !important; line-height: 18px; background-color: #fff !important; margin: 0em; padding-left: 12px !important; padding-right: 0px !important; word-wrap: break-word; color: black; word-break: normal; padding-top: 0px !important">bw = <span style="color: blue">new </span><span style="color: teal">BackgroundWorker</span>();
bw.WorkerReportsProgress = <span style="color: blue">true</span>;
bw.WorkerSupportsCancellation = <span style="color: blue">true</span>;

bw.DoWork += <span style="color: blue">new </span><span style="color: teal">DoWorkEventHandler</span>(bw_DoWork);
bw.RunWorkerCompleted += <span style="color: blue">new </span><span style="color: teal">RunWorkerCompletedEventHandler</span>(bw_RunWorkerCompleted);</pre>
</div>
<p>将 PDF 操作放在 DoWork 中：</p>
<div style="border-bottom: #4f81bd 1px solid; text-align: left; border-left: #4f81bd 1px solid; line-height: 18px; background-color: white; margin: 0px; width: 99%; font-family: &#39;Courier New&#39;,&#39;Consolas&#39;,&#39;Fixedsys&#39;,&#39;BitStream Vera Sans Mono&#39;, courier,monospace,serif; color: black; font-size: 12px; overflow: auto; border-top: #4f81bd 1px solid; border-right: #4f81bd 1px solid">
<pre style="padding-bottom: 0px !important; line-height: 18px; background-color: #fff !important; margin: 0em; padding-left: 12px !important; padding-right: 0px !important; word-wrap: break-word; color: black; word-break: normal; padding-top: 0px !important"><span style="color: blue">void </span>bw_DoWork(<span style="color: blue">object </span>sender, <span style="color: teal">DoWorkEventArgs </span>e)
{
    <span style="color: teal">BackgroundWorker </span>bw = sender <span style="color: blue">as </span><span style="color: teal">BackgroundWorker</span>;

    <span style="color: blue">object</span>[] args = e.Argument <span style="color: blue">as object</span>[];
    <span style="color: blue">if </span>(args == <span style="color: blue">null </span>|| args.Length &lt; 3)
        <span style="color: blue">return</span>;

    <span style="color: blue">string </span>filename = args[0] <span style="color: blue">as string</span>;
    <span style="color: teal">PdfSettings </span>settings = args[1] <span style="color: blue">as </span><span style="color: teal">PdfSettings</span>;
    <span style="color: teal">IList</span>&lt;<span style="color: blue">string</span>&gt; imagefiles = args[2] <span style="color: blue">as </span><span style="color: teal">IList</span>&lt;<span style="color: blue">string</span>&gt;;
    CreatePdf(bw, e, filename, settings, imagefiles);
}</pre>
</div>
<p>同时在 PdfProcessForm 窗体界面报告进度，如下图所示。（实现代码在 <a href="http://code.google.com/p/ebookcopier/source/browse/trunk/EbookCopier/Pdf/PdfProcessForm.cs">/EbookCopier/Pdf/PdfProcessForm.cs</a> 中） </p>
<p><img style="display: inline" title="image" alt="image" src="http://chuangen.name/files/2009/03/image8.png" width="348" height="102" /> </p>
<p></p>
<p>在生成 PDF 之前，我们先让用户设置 PDF 文档信息：<br />
  <br /><a href="http://chuangen.name/files/2009/03/image9.png" target="_blank"><img style="display: inline" title="image" alt="image" src="http://chuangen.name/files/2009/03/image-thumb.png" width="280" height="314" /></a> </p>
<p>使用这些信息创建 PDF 文档，如下：</p>
<div style="border-bottom: #4f81bd 1px solid; text-align: left; border-left: #4f81bd 1px solid; line-height: 18px; background-color: white; margin: 0px; width: 99%; font-family: &#39;Courier New&#39;,&#39;Consolas&#39;,&#39;Fixedsys&#39;,&#39;BitStream Vera Sans Mono&#39;, courier,monospace,serif; color: black; font-size: 12px; overflow: auto; border-top: #4f81bd 1px solid; border-right: #4f81bd 1px solid">
<pre style="padding-bottom: 0px !important; line-height: 18px; background-color: #fff !important; margin: 0em; padding-left: 12px !important; padding-right: 0px !important; word-wrap: break-word; color: black; word-break: normal; padding-top: 0px !important"><span style="color: green">// step 1: creation of a document-object
</span><span style="color: teal">Document </span>document = <span style="color: blue">new </span><span style="color: teal">Document</span>();
<span style="color: green">// step 2:
// we create a writer that listens to the document
// and directs a PDF-stream to a file
</span><span style="color: teal">PdfWriter</span>.GetInstance(document, <span style="color: blue">new </span><span style="color: teal">FileStream</span>(filename, <span style="color: teal">FileMode</span>.Create));
<span style="color: green">// step 3: we open the document
</span>document.Open();document.AddTitle(settings.Title);
document.AddAuthor(settings.Author);
document.AddSubject(settings.Subject);
document.AddKeywords(settings.Keywords);
document.AddCreator(<span style="color: maroon">&quot;数字图书复印机(EbookCopier)&quot;</span>);

<span style="color: blue">if </span>(settings.Header != <span style="color: blue">null </span>&amp;&amp; settings.Header.Trim() != <span style="color: maroon">&quot;&quot;</span>)
{<span style="color: green">//添加页眉
    </span>document.Header = ParseHeaderFooter(settings.Header);
}
<span style="color: blue">if </span>(settings.Footer != <span style="color: blue">null </span>&amp;&amp; settings.Footer.Trim() != <span style="color: maroon">&quot;&quot;</span>)
{
    document.Footer = ParseHeaderFooter(settings.Footer);
}

document.SetMargins(settings.LeftMargin,
    settings.RightMargin,
    settings.TopMargin,
    settings.BottomMargin);</pre>
</div>
<p>页眉和页脚可能包含中文字符，所以我们设置页面和页脚的字体为宋体以正确显示中文：</p>
<div style="border-bottom: #4f81bd 1px solid; text-align: left; border-left: #4f81bd 1px solid; line-height: 18px; background-color: white; margin: 0px; width: 99%; font-family: &#39;Courier New&#39;,&#39;Consolas&#39;,&#39;Fixedsys&#39;,&#39;BitStream Vera Sans Mono&#39;, courier,monospace,serif; color: black; font-size: 12px; overflow: auto; border-top: #4f81bd 1px solid; border-right: #4f81bd 1px solid">
<pre style="padding-bottom: 0px !important; line-height: 18px; background-color: #fff !important; margin: 0em; padding-left: 12px !important; padding-right: 0px !important; word-wrap: break-word; color: black; word-break: normal; padding-top: 0px !important"><span style="color: green">//宋体
</span><span style="color: teal">BaseFont </span>bfSun0 = <span style="color: teal">BaseFont</span>.CreateFont(<span style="color: teal">Path</span>.Combine(fontsPath, <span style="color: maroon">&quot;SIMSUN.TTC,0&quot;</span>), <span style="color: teal">BaseFont</span>.IDENTITY_H, <span style="color: teal">BaseFont</span>.NOT_EMBEDDED);<span style="color: green">
</span>font = <span style="color: blue">new </span><span style="color: teal">Font</span>(bfSun0, 12, <span style="color: teal">Font</span>.BOLD);</pre>
</div>
<p>接下来添加图片，并将每张图片铺满一个页面：</p>
<div style="border-bottom: #4f81bd 1px solid; text-align: left; border-left: #4f81bd 1px solid; line-height: 18px; background-color: white; margin: 0px; width: 99%; font-family: &#39;Courier New&#39;,&#39;Consolas&#39;,&#39;Fixedsys&#39;,&#39;BitStream Vera Sans Mono&#39;, courier,monospace,serif; color: black; font-size: 12px; overflow: auto; border-top: #4f81bd 1px solid; border-right: #4f81bd 1px solid">
<pre style="padding-bottom: 0px !important; line-height: 18px; background-color: #fff !important; margin: 0em; padding-left: 12px !important; padding-right: 0px !important; word-wrap: break-word; color: black; word-break: normal; padding-top: 0px !important">System.Drawing.<span style="color: teal">Image </span>iamge = System.Drawing.<span style="color: teal">Image</span>.FromFile(file);
<span style="color: teal">Image </span>pdfImage = <span style="color: teal">Image</span>.GetInstance(iamge, System.Drawing.Imaging.<span style="color: teal">ImageFormat</span>.Png);
pdfImage.Alignment = <span style="color: teal">Image</span>.MIDDLE_ALIGN;
pdfImage.ScaleToFit(document.Right - document.Left - document.LeftMargin - document.RightMargin,
    document.Top - document.Bottom - document.TopMargin - document.Bottom);
document.Add(pdfImage);</pre>
</div>
<p>添加完毕，关闭文档：</p>
<div style="border-bottom: #4f81bd 1px solid; text-align: left; border-left: #4f81bd 1px solid; line-height: 18px; background-color: white; margin: 0px; width: 99%; font-family: &#39;Courier New&#39;,&#39;Consolas&#39;,&#39;Fixedsys&#39;,&#39;BitStream Vera Sans Mono&#39;, courier,monospace,serif; color: black; font-size: 12px; overflow: auto; border-top: #4f81bd 1px solid; border-right: #4f81bd 1px solid">
<pre style="padding-bottom: 0px !important; line-height: 18px; background-color: #fff !important; margin: 0em; padding-left: 12px !important; padding-right: 0px !important; word-wrap: break-word; color: black; word-break: normal; padding-top: 0px !important">document.Close();</pre>
</div>
<p>到此为止，我们就得到了想要的 PDF 文档。</p>
<p>数字图书复印机(EbookCopier) 遵循 GPLv3 协议开源，如果你有更多的创意，欢迎请加入我们。 </p>
<p>项目地址：<a title="http://code.google.com/p/ebookcopier/" href="http://code.google.com/p/ebookcopier/">http://code.google.com/p/ebookcopier/</a> </p>
<p>源代码和可执行程序下载：<a href="http://code.google.com/p/ebookcopier/downloads/list">http://code.google.com/p/ebookcopier/downloads/list</a> </p>
<div style="border: #F7A31D 1px solid; font-size: 12px; margin: 10px; overflow: auto; width: 480px; color: black; background-color: #FFFFD3; line-height: 18px; font-family: Courier New, monospace, serif; text-align: left; padding: 5px 10px 5px 10px;">
本文同时发布到以下位置，以便更多的朋友能够看到本文： <br />
  <a href="http://chuangen.name/">http://chuangen.name/</a> (我的主页) <br />
  <a href="http://blog.csdn.net/chuangen">http://blog.csdn.net/chuangen</a> (IT 社区) <br />
  <a href="http://chuangen.cnblogs.com/">http://chuangen.cnblogs.com/</a> (.NET 技术社区) <br />
  <a href="http://chuangen-cn.spaces.live.com/">http://chuangen-cn.spaces.live.com/</a> (live Spaces)
  </div>
]]></content:encoded>
			<wfw:commentRss>http://chuangen.name/archives/2009/03/18/ebookcopier-intro-3.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

