<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>肖恩D++</title>
	
	<link>http://www.seantian.com</link>
	<description>Not Equal C &amp;&amp; !=C &amp;&amp; C &amp;&amp; 不等于西</description>
	<lastBuildDate>Sun, 19 Feb 2012 08:15:42 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/seantian/jpyK" /><feedburner:info uri="seantian/jpyk" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>搬家完成</title>
		<link>http://feedproxy.google.com/~r/seantian/jpyK/~3/jX8Jrs8T21o/</link>
		<comments>http://www.seantian.com/?p=1515#comments</comments>
		<pubDate>Sat, 18 Feb 2012 23:54:31 +0000</pubDate>
		<dc:creator>sean</dc:creator>
				<category><![CDATA[Networking]]></category>
		<category><![CDATA[我的东东]]></category>

		<guid isPermaLink="false">http://www.seantian.com/?p=1515</guid>
		<description><![CDATA[&#160;&#160;&#160;&#160;&#160;最近需要.NET环境的hosting，本想直接在1and1升级，碰巧看到costco和Godaddy合作推出hosting套餐，感觉不错，旋即决定开始实施。 &#160;&#160;&#160;&#160;&#160;搬家的第一步是要转domain，首先要在目前的register（譬如我的情况就是1and1）把domain变成unlock，然后在新的register提申请（我的情况就是Godaddy），大概1周左右就可以完成转移的过程。然后再去以前的register取消合同就可以了。 &#160;&#160;&#160;&#160;&#160;接下来就是搬数据库，基本上比较简单，无非就是export和import。 &#160;&#160;&#160;&#160;&#160;最后就是搬文件和修改设置，这一步比较复杂，因为所有的数据库connection string都要重新改，所有的文件结构都有变化。不过有点耐心，慢慢来也就小菜一碟了。 &#160;&#160;&#160;&#160;&#160;全部完成后就上来铺一帖，感觉似乎有点慢，莫非Windows的IIS真的就不如Linux好吗？]]></description>
			<content:encoded><![CDATA[<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;最近需要.NET环境的hosting，本想直接在1and1升级，碰巧看到costco和Godaddy合作推出hosting套餐，感觉不错，旋即决定开始实施。<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;搬家的第一步是要转domain，首先要在目前的register（譬如我的情况就是1and1）把domain变成unlock，然后在新的register提申请（我的情况就是Godaddy），大概1周左右就可以完成转移的过程。然后再去以前的register取消合同就可以了。<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;接下来就是搬数据库，基本上比较简单，无非就是export和import。<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;最后就是搬文件和修改设置，这一步比较复杂，因为所有的数据库connection string都要重新改，所有的文件结构都有变化。不过有点耐心，慢慢来也就小菜一碟了。<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;全部完成后就上来铺一帖，感觉似乎有点慢，莫非Windows的IIS真的就不如Linux好吗？</p>

<p><a href="http://feedads.g.doubleclick.net/~a/wzNNIzgEfOMYbTyLGY7pWyhJFXI/0/da"><img src="http://feedads.g.doubleclick.net/~a/wzNNIzgEfOMYbTyLGY7pWyhJFXI/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/wzNNIzgEfOMYbTyLGY7pWyhJFXI/1/da"><img src="http://feedads.g.doubleclick.net/~a/wzNNIzgEfOMYbTyLGY7pWyhJFXI/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/seantian/jpyK/~4/jX8Jrs8T21o" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.seantian.com/?feed=rss2&amp;p=1515</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.seantian.com/?p=1515</feedburner:origLink></item>
		<item>
		<title>补胎记</title>
		<link>http://feedproxy.google.com/~r/seantian/jpyK/~3/jvHG1RaFM-w/</link>
		<comments>http://www.seantian.com/?p=1505#comments</comments>
		<pubDate>Thu, 26 Jan 2012 23:08:41 +0000</pubDate>
		<dc:creator>sean</dc:creator>
				<category><![CDATA[生活点滴]]></category>

		<guid isPermaLink="false">http://www.seantian.com/?p=1505</guid>
		<description><![CDATA[&#160;&#160;&#160;&#160;&#160;昨晚，挠人的轮胎报警灯又亮了。在经历了一次又一次狼来了之后，还是决定检查一下看看到底是因为胎压不稳还是轮胎真有问题。撅着腚趴在地上一个轮子一个轮子检查之后，狼真来了：一根直径大概半厘米的铁钉很不识相的嵌在轮胎的胎纹里。郁闷半天之后，决定第二天一早去补胎。 &#160;&#160;&#160;&#160;&#160;早就知道家附近就有一个叫“America Tires”的轮胎店，虽然从来没进过。店员都还很亲切，简直有点肉麻，让我“噗通，噗通”乱跳的小心脏又增加了几分紧张，要知道服务往往是和价钱挂钩的。 &#160;&#160;&#160;&#160;&#160;在一番检查之后，技工把车开进车间里修理。大约半个多小时后，接待我的店员递给我钥匙和一张收据，说道：“Sir, you are all set. have a nice day!” &#160;&#160;&#160;&#160;&#160;开车赶向办公室的途中，在苦思冥想了半天总觉得“忘了什么事儿”后，终于意识到，原来这次补胎竟然不用给钱……]]></description>
			<content:encoded><![CDATA[<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;昨晚，挠人的轮胎报警灯又亮了。在经历了一次又一次狼来了之后，还是决定检查一下看看到底是因为胎压不稳还是轮胎真有问题。撅着腚趴在地上一个轮子一个轮子检查之后，狼真来了：一根直径大概半厘米的铁钉很不识相的嵌在轮胎的胎纹里。郁闷半天之后，决定第二天一早去补胎。<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;早就知道家附近就有一个叫“America Tires”的轮胎店，虽然从来没进过。店员都还很亲切，简直有点肉麻，让我“噗通，噗通”乱跳的小心脏又增加了几分紧张，要知道服务往往是和价钱挂钩的。<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;在一番检查之后，技工把车开进车间里修理。大约半个多小时后，接待我的店员递给我钥匙和一张收据，说道：“Sir, you are all set. have a nice day!”<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;开车赶向办公室的途中，在苦思冥想了半天总觉得“忘了什么事儿”后，终于意识到，原来这次补胎竟然不用给钱……</p>

<p><a href="http://feedads.g.doubleclick.net/~a/aFhvOXCVTWM5tppovnWq7jOOlo8/0/da"><img src="http://feedads.g.doubleclick.net/~a/aFhvOXCVTWM5tppovnWq7jOOlo8/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/aFhvOXCVTWM5tppovnWq7jOOlo8/1/da"><img src="http://feedads.g.doubleclick.net/~a/aFhvOXCVTWM5tppovnWq7jOOlo8/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/seantian/jpyK/~4/jvHG1RaFM-w" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.seantian.com/?feed=rss2&amp;p=1505</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://www.seantian.com/?p=1505</feedburner:origLink></item>
		<item>
		<title>未尽的事业</title>
		<link>http://feedproxy.google.com/~r/seantian/jpyK/~3/qQLQ5txlsiY/</link>
		<comments>http://www.seantian.com/?p=1498#comments</comments>
		<pubDate>Sat, 14 Jan 2012 18:30:46 +0000</pubDate>
		<dc:creator>sean</dc:creator>
				<category><![CDATA[杂感]]></category>
		<category><![CDATA[旅游]]></category>

		<guid isPermaLink="false">http://www.seantian.com/?p=1498</guid>
		<description><![CDATA[&#160;&#160;&#160;&#160;&#160;据说这十大地方会在不远的未来彻底消失——悉数一下，这十个地方去过的数字仍然是“0”。看来在人类还未曾找到有效改善自己方法的前提下，最好还是尽早踏上这十个濒危的地方。]]></description>
			<content:encoded><![CDATA[<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;据说这十大地方会在不远的未来彻底消失——悉数一下，这十个地方去过的数字仍然是“0”。看来在人类还未曾找到有效改善自己方法的前提下，最好还是尽早踏上这十个濒危的地方。<br />
<br />
</p>

<p><a href="http://feedads.g.doubleclick.net/~a/vbZbSDdlU4OP6X0cP7jrDl_OGbI/0/da"><img src="http://feedads.g.doubleclick.net/~a/vbZbSDdlU4OP6X0cP7jrDl_OGbI/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/vbZbSDdlU4OP6X0cP7jrDl_OGbI/1/da"><img src="http://feedads.g.doubleclick.net/~a/vbZbSDdlU4OP6X0cP7jrDl_OGbI/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/seantian/jpyK/~4/qQLQ5txlsiY" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.seantian.com/?feed=rss2&amp;p=1498</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="http://www.seantian.com/videos/10_Places_To_Visit_Before_They_Disappear.mp4" length="16013876" type="video/mp4" />
		<feedburner:origLink>http://www.seantian.com/?p=1498</feedburner:origLink></item>
		<item>
		<title>Custom Validation for MVC 3 Model Example 1: Positive Integer</title>
		<link>http://feedproxy.google.com/~r/seantian/jpyK/~3/WlE181maSr0/</link>
		<comments>http://www.seantian.com/?p=1416#comments</comments>
		<pubDate>Sat, 07 Jan 2012 19:26:52 +0000</pubDate>
		<dc:creator>sean</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[.NET]]></category>

		<guid isPermaLink="false">http://www.seantian.com/?p=1416</guid>
		<description><![CDATA[When you define a property of the model, you can always put some MS&#8217;s attributes to validate the data, like &#8220;Required&#8221;, &#8220;Range&#8221;. Also you can use custom validation via expression or creating new attribute class. For example, the &#8220;NumberOfStock&#8221; for &#8220;Product&#8221; must be an integer and positive. Actually to accomplish this validation is quite easy, [...]]]></description>
			<content:encoded><![CDATA[<p>When you define a property of the model, you can always put some MS&#8217;s attributes to validate the data, like &#8220;Required&#8221;, &#8220;Range&#8221;. Also you can use custom validation via expression or creating new attribute class. For example, the &#8220;NumberOfStock&#8221; for &#8220;Product&#8221; must be an integer and positive.<br />
Actually to accomplish this validation is quite easy, if use regular expression:</p>
<pre name="code" class="c#">public class Product
{
  [Required(ErrorMessage = "Number of Stock is Required")]
  [RegularExpression("^\\+?\\d+$", ErrorMessage = "Must be a Positive Non-decimal Number")]
  public int NumberOfStock{ get; set; }

  /******** Other Properties **************/
}</pre>
<p>The way showed above will be good enough if you only have a few models or a small application. For a big project, you might want to create your own attribute instead of using expression. The advantage of dong this is easy to centralize (if you have many custom validations), and easy to debug.<br />
First, we need to create custom attribute class:</p>
<pre name="code" class="c#">[AttributeUsage(AttributeTargets.Field | AttributeTargets.Property, AllowMultiple = false, Inherited = true)]
    public class PositiveIntegerAttribute : ValidationAttribute
    {
        public PositiveIntegerAttribute()
            : base("Must be a Positive Non-decimal Number")
        {
        }

        public override bool IsValid(object value)
        {
            if (value == null)
            {
                return true;
            }

            int num;
            if (int.TryParse(value.ToString(), out num))
            {

                if (num &gt;= 0)
                    return true;
            }
            return false;
        }
    }</pre>
<p>Then, we will create validation adapter to enable client side validation</p>
<pre name="code" class="c#">		public class PositiveIntegerValidator : DataAnnotationsModelValidator
    {
        public PositiveIntegerValidator(ModelMetadata metadata, ControllerContext context, PositiveIntegerAttribute attribute)
            : base(metadata, context, attribute)
        {
        }

        public override IEnumerable GetClientValidationRules()
        {

            return new[] { new PositiveIntegerClientValidationRule(ErrorMessage) };
        }
    }

    public class PositiveIntegerClientValidationRule : ModelClientValidationRule
    {
        private const string Regex = @"^\+?\d+$";

        public PositiveIntegerClientValidationRule(string errorMessage)
        {
            ErrorMessage = errorMessage;
            ValidationType = "regex";
            ValidationParameters["pattern"] = Regex;
        }
    }</pre>
<p>Last thing we need to do is register the adapter in &#8220;Application_Start&#8221; function of &#8220;Global.asax&#8221; file:</p>
<pre name="code" class="c#">        protected void Application_Start()
        {
            /**********Other code************/

            DataAnnotationsModelValidatorProvider.RegisterAdapter(typeof(Library.PositiveIntegerAttribute), typeof(Library.PositiveIntegerValidator));
        }</pre>
<p>Now, we can use the custom validation attribute &#8220;PositiveInteger&#8221; for the model &#8220;Prodcut&#8221;</p>
<pre name="code" class="c#">public class Product
{
  [Required(ErrorMessage = "Number of Stock is Required")]
  [PositiveInteger]
  public int NumberOfStock{ get; set; }

  /******** Other Properties **************/
}</pre>

<p><a href="http://feedads.g.doubleclick.net/~a/qedqc9JjF071yCc0cLCf5_5vRDU/0/da"><img src="http://feedads.g.doubleclick.net/~a/qedqc9JjF071yCc0cLCf5_5vRDU/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/qedqc9JjF071yCc0cLCf5_5vRDU/1/da"><img src="http://feedads.g.doubleclick.net/~a/qedqc9JjF071yCc0cLCf5_5vRDU/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/seantian/jpyK/~4/WlE181maSr0" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.seantian.com/?feed=rss2&amp;p=1416</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.seantian.com/?p=1416</feedburner:origLink></item>
		<item>
		<title>One line to remove all unneeded old kernel for Ubuntu</title>
		<link>http://feedproxy.google.com/~r/seantian/jpyK/~3/H3_3O2bLrEc/</link>
		<comments>http://www.seantian.com/?p=1403#comments</comments>
		<pubDate>Tue, 06 Dec 2011 03:15:05 +0000</pubDate>
		<dc:creator>sean</dc:creator>
				<category><![CDATA[Unix/Linux]]></category>

		<guid isPermaLink="false">http://www.seantian.com/?p=1403</guid>
		<description><![CDATA[&#160;&#160;&#160;&#160;&#160;Along with the kernel keeps updating, many old kernels are kept in the system. For normal users, those old kernels are no longer needed, so the best way just remove them. &#160;&#160;&#160;&#160;&#160;To remove all kernels, just run the single line with below: dpkg -l linux-* &#124; awk '/^ii/{ print $2}' &#124; grep -v -e `uname [...]]]></description>
			<content:encoded><![CDATA[<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Along with the kernel keeps updating, many old kernels are kept in the system. For normal users, those old kernels are no longer needed, so the best way just remove them.<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;To remove all kernels, just run the single line with below:</p>
<pre class="prettyprint lang-bsh">
dpkg -l linux-* | awk '/^ii/{ print $2}' | grep -v -e `uname -r | cut -f1,2 -d&quot;-&quot;` | grep -e [0-9] | xargs sudo apt-get -y purge
</pre>
<p><font color="green" size="1">*Original post from </font><a href="http://tuxtweaks.com/2010/10/remove-old-kernels-in-ubuntu-with-one-command/">here</a></p>

<p><a href="http://feedads.g.doubleclick.net/~a/4_3tdQhdlpPRfaMc920GNL3U698/0/da"><img src="http://feedads.g.doubleclick.net/~a/4_3tdQhdlpPRfaMc920GNL3U698/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/4_3tdQhdlpPRfaMc920GNL3U698/1/da"><img src="http://feedads.g.doubleclick.net/~a/4_3tdQhdlpPRfaMc920GNL3U698/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/seantian/jpyK/~4/H3_3O2bLrEc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.seantian.com/?feed=rss2&amp;p=1403</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.seantian.com/?p=1403</feedburner:origLink></item>
		<item>
		<title>火鸡和感恩节</title>
		<link>http://feedproxy.google.com/~r/seantian/jpyK/~3/dJH_AaqCHgk/</link>
		<comments>http://www.seantian.com/?p=1391#comments</comments>
		<pubDate>Wed, 23 Nov 2011 23:14:54 +0000</pubDate>
		<dc:creator>sean</dc:creator>
				<category><![CDATA[Home]]></category>

		<guid isPermaLink="false">http://www.seantian.com/?p=1391</guid>
		<description><![CDATA[&#160;&#160;&#160;&#160;&#160;在美国，一提起感恩节，就马上会和火鸡联系起来。人们纷纷去超市购买火鸡，然后与全家一起分享，颇有点合家欢乐的感觉。不过，换位思考一下，如果站在火鸡的立场上，一定是对感恩节深恶痛绝、势不两立的…… &#160;&#160;&#160;&#160;&#160;明天，有是一年一度的火鸡的冤家。可没想到，中午竟然发现一队火鸡在领队的带领下，在公司的停车场游荡。不得不为他们的勇气致敬，难道他们是在提醒我们，“嘿，感恩节到了，准备好了吗？”]]></description>
			<content:encoded><![CDATA[<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;在美国，一提起感恩节，就马上会和火鸡联系起来。人们纷纷去超市购买火鸡，然后与全家一起分享，颇有点合家欢乐的感觉。不过，换位思考一下，如果站在火鸡的立场上，一定是对感恩节深恶痛绝、势不两立的……<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;明天，有是一年一度的火鸡的冤家。可没想到，中午竟然发现一队火鸡在领队的带领下，在公司的停车场游荡。不得不为他们的勇气致敬，难道他们是在提醒我们，“嘿，感恩节到了，准备好了吗？”</p>
<div style="margin-right:5px;float:left;"><a href="/images/turky_1.jpg"><img src="/images/turky_1.jpg" width="325" height="243" alt="" /></a></div>
<div style="float:left;"><a href="/images/turky_2.jpg"><img src="/images/turky_2.jpg" width="325" height="243" alt="" /></a></div>
<div style="margin-right:5px;float:left;"><a href="/images/turky_3.jpg"><img src="/images/turky_3.jpg" width="325" height="243" alt="" /></a></div>
<div style="float:left;"><a href="/images/turky_4.jpg"><img src="/images/turky_4.jpg" width="325" height="243" alt="" /></a></div>

<p><a href="http://feedads.g.doubleclick.net/~a/iAsjyMiG2ikdl1oaNgtVALxepYs/0/da"><img src="http://feedads.g.doubleclick.net/~a/iAsjyMiG2ikdl1oaNgtVALxepYs/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/iAsjyMiG2ikdl1oaNgtVALxepYs/1/da"><img src="http://feedads.g.doubleclick.net/~a/iAsjyMiG2ikdl1oaNgtVALxepYs/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/seantian/jpyK/~4/dJH_AaqCHgk" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.seantian.com/?feed=rss2&amp;p=1391</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.seantian.com/?p=1391</feedburner:origLink></item>
		<item>
		<title>终于三字头了</title>
		<link>http://feedproxy.google.com/~r/seantian/jpyK/~3/mVTpNcZSwCw/</link>
		<comments>http://www.seantian.com/?p=1389#comments</comments>
		<pubDate>Wed, 02 Nov 2011 22:08:07 +0000</pubDate>
		<dc:creator>sean</dc:creator>
				<category><![CDATA[杂感]]></category>

		<guid isPermaLink="false">http://www.seantian.com/?p=1389</guid>
		<description><![CDATA[&#160;&#160;&#160;&#160;&#160;到了，这一天终于到了。终于告别了二字头，迎来了三字头。无忧无虑的打酱油时代终于要结束了，据说随之而来的就是要变成让别人打酱油的了。实在不知是做何感想，扪心自问…… &#160;&#160;&#160;&#160;&#160;顺便发现了个有趣的现象，今天的日期写起来正好是对称的：“20111102” （2011-11-02），并且用欧美格式书写，恰好也是对称的：“11022011” （11/02/2011）]]></description>
			<content:encoded><![CDATA[<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;到了，这一天终于到了。终于告别了二字头，迎来了三字头。无忧无虑的打酱油时代终于要结束了，据说随之而来的就是要变成让别人打酱油的了。实在不知是做何感想，扪心自问……<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;顺便发现了个有趣的现象，今天的日期写起来正好是对称的：“20111102” （2011-11-02），并且用欧美格式书写，恰好也是对称的：“11022011” （11/02/2011）</p>

<p><a href="http://feedads.g.doubleclick.net/~a/d1CiJOCUmLabGeNBfnzfkdwateQ/0/da"><img src="http://feedads.g.doubleclick.net/~a/d1CiJOCUmLabGeNBfnzfkdwateQ/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/d1CiJOCUmLabGeNBfnzfkdwateQ/1/da"><img src="http://feedads.g.doubleclick.net/~a/d1CiJOCUmLabGeNBfnzfkdwateQ/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/seantian/jpyK/~4/mVTpNcZSwCw" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.seantian.com/?feed=rss2&amp;p=1389</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.seantian.com/?p=1389</feedburner:origLink></item>
		<item>
		<title>Create XML Comments for Custom Function in VIsual Studio 2010</title>
		<link>http://feedproxy.google.com/~r/seantian/jpyK/~3/pPDzZDXCVDw/</link>
		<comments>http://www.seantian.com/?p=1385#comments</comments>
		<pubDate>Sun, 25 Sep 2011 19:12:28 +0000</pubDate>
		<dc:creator>sean</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://www.seantian.com/?p=1385</guid>
		<description><![CDATA[&#160;&#160;&#160;&#160;&#160;If you need to add your custom comments for your function, including function summary, parameter description, return value etc., just add &#8220;///&#8221; right before your function, then VS will generate XML layout for you. /// &#60;summary&#62; /// /// &#60;/summary&#62; /// &#60;param name=&#34;para&#34;&#62;&#60;/param&#62; /// &#60;returns&#62;&#60;/returns&#62; public bool YourFunction(int para) { //Code here } &#160;&#160;&#160;&#160;&#160;After finish comments, [...]]]></description>
			<content:encoded><![CDATA[<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;If you need to add your custom comments for your function, including function summary, parameter description, return value etc., just add &#8220;///&#8221; right before your function, then VS will generate XML layout for you.</p>
<pre class="prettyprint lang-cs">
/// &lt;summary&gt;
///
/// &lt;/summary&gt;
/// &lt;param name=&quot;para&quot;&gt;&lt;/param&gt;
/// &lt;returns&gt;&lt;/returns&gt;
public bool YourFunction(int para)
{
     //Code here
}
</pre>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;After finish comments, enable &#8220;XML Documentation&#8221; option for your project:</p>
<ol>
<li>Open project property</li>
<li>Go to &#8220;Build&#8221; tab</li>
<li>Check &#8220;Xml documentation file&#8221;</li>
<li>Build project, then check the XML comments in other project</li>
</ol>

<p><a href="http://feedads.g.doubleclick.net/~a/fvAIkInEk8r3S9ZHLwseH_-BGng/0/da"><img src="http://feedads.g.doubleclick.net/~a/fvAIkInEk8r3S9ZHLwseH_-BGng/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/fvAIkInEk8r3S9ZHLwseH_-BGng/1/da"><img src="http://feedads.g.doubleclick.net/~a/fvAIkInEk8r3S9ZHLwseH_-BGng/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/seantian/jpyK/~4/pPDzZDXCVDw" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.seantian.com/?feed=rss2&amp;p=1385</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.seantian.com/?p=1385</feedburner:origLink></item>
		<item>
		<title>Install Linksys Wireless PCI Adapter(WMP54G) Driver for Windows 7 64Bit</title>
		<link>http://feedproxy.google.com/~r/seantian/jpyK/~3/F7GQp46z7xU/</link>
		<comments>http://www.seantian.com/?p=1383#comments</comments>
		<pubDate>Sun, 21 Aug 2011 07:07:04 +0000</pubDate>
		<dc:creator>sean</dc:creator>
				<category><![CDATA[Windows]]></category>
		<category><![CDATA[Geek]]></category>

		<guid isPermaLink="false">http://www.seantian.com/?p=1383</guid>
		<description><![CDATA[&#160;&#160;&#160;&#160;&#160;Seems like linksys doesn&#8217;t provide wireless PCI adapter driver for new Windows OS. The only way to install driver for Windows 7 is force to install the driver from the chip company. Download the driver from Here Unzip to somewhere. Let&#8217;s say &#8220;C:\&#8221; Go to &#8220;Control Panel&#8221; -> &#8220;Device Manager&#8221;, look for this adapter. Normally [...]]]></description>
			<content:encoded><![CDATA[<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Seems like linksys doesn&#8217;t provide wireless PCI adapter driver for new Windows OS. The only way to install driver for Windows 7 is force to install the driver from the chip company.</p>
<ol>
<li>Download the driver from <a href="http://www.seantian.com/download/Linksys_WirelessG_RT2500.rar">Here</a></li>
<li>Unzip to somewhere. Let&#8217;s say &#8220;C:\&#8221;</li>
<li>Go to &#8220;Control Panel&#8221; -> &#8220;Device Manager&#8221;, look for this adapter. Normally it will be shown like &#8220;Unknown Network Controller&#8221; or something like that</li>
<li>Click this device, select &#8220;Update Driver Software&#8221;</li>
<li>Select &#8220;Browse My Computer for driver software&#8221;</li>
<li>Select &#8220;Let me pick from a list of device drivers on my computer&#8221;</li>
<li>Scroll down to &#8220;Network Adapters&#8221; and double click. Then click “Have Disk”</li>
<li>In the box that pops up, navigate to &#8220;C:\driver_folder&#8221;, and select the driver file</li>
<li>Scroll down to “Ralink Technology Corp” in the box on the left side. On the right side, select “802.11b/g Wireless Adapter.” (Here I have tried select &#8220;Linksys&#8221; on the left, and &#8220;Linksys Wireless Adapter&#8221; on the right. It also works! Just choose whatever you want)</li>
<li>Click YES on the warning window (if you see it)</li>
<li>Done! (Sometimes the device still might not be working, try to right click the device and uninstall the driver, but DO NOT check &#8220;Delete the driver software for this device&#8221;, and restart the computer. Then Windows will help you install the driver again)</li>
</ol>

<p><a href="http://feedads.g.doubleclick.net/~a/XxLGNpJrmLQknrvfiWxY-EOKCUk/0/da"><img src="http://feedads.g.doubleclick.net/~a/XxLGNpJrmLQknrvfiWxY-EOKCUk/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/XxLGNpJrmLQknrvfiWxY-EOKCUk/1/da"><img src="http://feedads.g.doubleclick.net/~a/XxLGNpJrmLQknrvfiWxY-EOKCUk/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/seantian/jpyK/~4/F7GQp46z7xU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.seantian.com/?feed=rss2&amp;p=1383</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.seantian.com/?p=1383</feedburner:origLink></item>
		<item>
		<title>One Script  to Backup All SQL Databases</title>
		<link>http://feedproxy.google.com/~r/seantian/jpyK/~3/BNGLgU1j0MQ/</link>
		<comments>http://www.seantian.com/?p=1365#comments</comments>
		<pubDate>Mon, 15 Aug 2011 19:52:58 +0000</pubDate>
		<dc:creator>sean</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[Database]]></category>
		<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://www.seantian.com/?p=1365</guid>
		<description><![CDATA[&#160;&#160;&#160;&#160;&#160;It&#8217;s a nightmare for backup your DB if you have 100+ DB&#8217;s in SQL server. Just simply run a script while you taking a coffee: DECLARE @name VARCHAR(50) -- database name DECLARE @path VARCHAR(256) -- path for backup files DECLARE @fileName VARCHAR(256) -- filename for backup DECLARE @fileDate VARCHAR(20) -- used for file name SET [...]]]></description>
			<content:encoded><![CDATA[<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;It&#8217;s a nightmare for backup your DB if you have 100+ DB&#8217;s in SQL server. Just simply run a script while you taking a coffee:</p>
<pre name="code" class="sql">
DECLARE @name VARCHAR(50) -- database name
DECLARE @path VARCHAR(256) -- path for backup files
DECLARE @fileName VARCHAR(256) -- filename for backup
DECLARE @fileDate VARCHAR(20) -- used for file name 

SET @path = "C:\Backup"

SELECT @fileDate = CONVERT(VARCHAR(20),GETDATE(),112)

DECLARE db_cursor CURSOR FOR
SELECT name
FROM master.dbo.sysdatabases
WHERE name NOT IN ('master','model','msdb','tempdb')
--skip system database (optional)

OPEN db_cursor
FETCH NEXT FROM db_cursor INTO @name

WHILE @@FETCH_STATUS = 0
BEGIN
       SET @fileName = @path + @name + '_' + @fileDate + '.BAK'
       BACKUP DATABASE @name TO DISK = @fileName

       FETCH NEXT FROM db_cursor INTO @name
END

CLOSE db_cursor
DEALLOCATE db_cursor
</pre>

<p><a href="http://feedads.g.doubleclick.net/~a/Nn-DrEInnXHeohGjaXKCT8ULozg/0/da"><img src="http://feedads.g.doubleclick.net/~a/Nn-DrEInnXHeohGjaXKCT8ULozg/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/Nn-DrEInnXHeohGjaXKCT8ULozg/1/da"><img src="http://feedads.g.doubleclick.net/~a/Nn-DrEInnXHeohGjaXKCT8ULozg/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/seantian/jpyK/~4/BNGLgU1j0MQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.seantian.com/?feed=rss2&amp;p=1365</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.seantian.com/?p=1365</feedburner:origLink></item>
	</channel>
</rss>

