<?xml version="1.0" encoding="UTF-8"?>
  <feed xmlns="http://www.w3.org/2005/Atom">
  <title type="html"><![CDATA[BlueStrait - My Life, My Site]]></title>
  <subtitle type="html"><![CDATA[DIY, 数码, 程序, 生活]]></subtitle>
  <id>http://www.bluestrait.com/blog/</id>
  <link rel="alternate" type="text/html" href="http://www.bluestrait.com/blog/" /> 
  <link rel="self" type="application/atom+xml" href="http://www.bluestrait.com/blog/atom.asp" /> 
  <generator uri="http://www.pjhome.net/" version="2.8">PJBlog3</generator> 
  <updated>2010-06-29T22:35:32+08:00</updated>

  <entry>
	  <title type="html"><![CDATA[Snow fun this winter!]]></title>
	  <author>
		 <name>黄敏</name>
		 <uri>http://www.bluestrait.com/blog/</uri>
		 <email>bluestrait@gmail.com</email>
	  </author>
	  <category term="" scheme="http://www.bluestrait.com/blog/default.asp?cateID=6" label="生活" /> 
	  <updated>2010-06-29T22:35:32+08:00</updated>
	  <published>2010-06-29T22:35:32+08:00</published>
		  <summary type="html"><![CDATA[We are looking forward to a two-day trip to Lake Mountain Resort (Marysville) in two weeks. We had a great fun last year (even Tin Tin did not want to leave at all that time) and are hoping the same this time. <br/><img src="http://www.lakemountainresort.com.au/web_images/images/Winter_Mountain_Banner.jpg" border="0" alt=""/><br/><br/>Below are some quick links:<br/>Hire at Marysville: <a target="_blank" href="http://crosscountryskihire.com.au/" rel="external">http://crosscountryskihire.com.au/</a>:&nbsp;&nbsp;The price list seems very fair and the owners look friendly.<br/>official resort site: <a target="_blank" href="http://www.lakemountainresort.com.au/winter/index.php?pageID=8655" rel="external">http://www.lakemountainresort.com.au/winter/index.php?pageID=8655</a><br/>Snow report: <a target="_blank" href="http://www.lakemountainresort.com.au/winter/index.php?sectionID=3264&amp;pageID=3294" rel="external">http://www.lakemountainresort.com.au/winter/index.php?sectionID=3264&amp;pageID=3294</a><br/>Considering buying a toboggan: <a target="_blank" href="http://www.macs.com.au/product_info.php?cPath=25_34&amp;products_id=167&amp;osCsid=ihjphnydavgvw" rel="external">http://www.macs.com.au/product_info.php?cPath=25_34&amp;products_id=167&amp;osCsid=ihjphnydavgvw</a>&nbsp;&nbsp;$55<br/><img src="http://www.macs.com.au/images/toboggon_carve.gif" border="0" alt=""/><br/><br/>]]></summary>
	  <link rel="alternate" type="text/html" href="http://www.bluestrait.com/blog/article.asp?id=329" /> 
	  <id>http://www.bluestrait.com/blog/default.asp?id=329</id>
  </entry>	
		
  <entry>
	  <title type="html"><![CDATA[家里的局域网和电脑们]]></title>
	  <author>
		 <name>黄敏</name>
		 <uri>http://www.bluestrait.com/blog/</uri>
		 <email>bluestrait@gmail.com</email>
	  </author>
	  <category term="" scheme="http://www.bluestrait.com/blog/default.asp?cateID=3" label="数码时代" /> 
	  <updated>2010-06-24T09:33:27+08:00</updated>
	  <published>2010-06-24T09:33:27+08:00</published>
		  <summary type="html"><![CDATA[<strong>网络拓扑</strong><br/>Netgear DG834G Modem/Wireless Router--- HP Procurve 1400 8-port Gigabit Switch<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (192.168.1.1)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; +---- file server&nbsp;&nbsp; (WinXP) (192.168.1.3)<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&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;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; +---- Wii<br/><br/>All machines without IP address labeled are using DHCP. <br/><br/><strong>工作机</strong><br/><img src="http://www.bluestrait.com/bluegallery/pictures/2008_10_25_computers/img_2763_m.jpg" border="0" alt=""/><br/><br/>主要任务：<br/>上网，游戏，所有工作。<br/><br/>配置：<br/>CPU：Intel E8400 <br/>CPU风扇：Zalman CNPS9700 CPU Cooler<br/>主板：<a target="_blank" href="http://www.gigabyte.com/products/product-page.aspx?pid=2741#ov" rel="external">GA-EP35-DS3 (rev. 2.1)</a><br/>内存：2G G-Skill DDR2 x 2<br/>显卡：<a target="_blank" href="http://xfxforce.com/en-gb/products/graphiccards/hd%205000series/5970.aspx" rel="external">XFX 5970 2G Black Edition</a><br/>机箱：CoolerMaster HAF<br/>电源：ThermalTake Toughpower 850W (没办法，9800GX2 的要求比较高）<br/>显示器：HP LP3065 （很大很爽，就是对显卡要求太高了）<br/>键盘：IBM 机械式键盘 （用了十年了，没想过要更换）<br/>鼠标：Logitech G5 (best mouse I have ever used)<br/>风扇控制器：Zalman ZM-MFC1 Plus Fan Controller <br/>音箱：Yamaha 2.1 (用了六年了，非常满意）<br/>耳机：Senheiser HD515 (音乐不足，游戏有余）<br/>软件: Windows 7 Pro 64-bit<br/>硬盘: <br/>SATA ST332062 320G<br/>SATA WDC WD2500JS-55NCB1 250G<br/><br/>附配件图片：<br/><img src="http://www.pccasegear.com/images/images/cnps9700sb.jpg" border="0" alt=""/><br/><br/><img src="http://xfxforce.com/ecms.ashx/b6ba3eb7-6564-4228-ad4d-e83f461c3b2b/RelatedGraphicCardSeries_RelatedGraphicCardModels1/5970BE_Greenie.jpg" border="0" alt=""/><br/><br/><img src="http://static.flickr.com/52/238184261_4fb5d44267.jpg?v=0" border="0" alt=""/><br/><br/><img src="http://www.impulsegamer.com/hardware/logi01.jpg" border="0" alt=""/><br/><br/><img src="http://www.pccasegear.com/images/mfc1plus_f_p.jpg" border="0" alt=""/><br/><br/>有关工作机的更多详情，可参看<a target="_blank" href="http://www.bluestrait.com/blog/article.asp?id=114" rel="external">http://www.bluestrait.com/blog/article.asp?id=114</a>.<br/><br/><strong>文件/电视服务器</strong><br/>主要任务：<br/>1. MediaPortal TV Server 负责录电视和提供电视streaming服务<br/>2. 24x7 电驴和flashget下载<br/>3. 给家里的局域网提供文件储存服务。<br/><br/>配置相对较低。<br/>CPU: Intel E2160<br/>主板：<a target="_blank" href="http://www.gigabyte.com/products/product-page.aspx?pid=2631#ov" rel="external"> GA-P35C-DS3R (rev. 2.0)</a><br/>内存: 1G Kingston DDR2 x 2<br/>机箱：Antec Titan<br/>电源：Antec NeoPower 500W<br/>显卡： <a target="_blank" href="http://www.sapphiretech.com/presentation/product/?psn=0001&amp;pid=207" rel="external">SAPPHIRE HD 4350 512MB DDR2 PCI-E HDMI</a><br/>电视卡: <a target="_blank" href="http://www.hauppauge.co.uk/site/products/data_hvr2200mc.html" rel="external">Hauppauge HVR 2200</a><br/>软件: Windows XP Pro SP3 + <a target="_blank" href="http://www.team-mediaportal.com/" rel="external">Media Portal 1.1.0 RC4 TV Server</a><br/>硬盘： 共8个，总容量约5.8TB<br/>IDE WDC WD2500JB 250GB<br/>IDE WDC WD3000JB 300GB<br/>SATA ST315003 41AS 1.5TB<br/>SATA WDC WD15 EADS-00P8B0 1.5TB Green Power<br/>SATA WDC WD64 640GB x 2<br/>SATA WDC WD5000AAKS 500GB x 2<br/><img src="http://www.bluestrait.com/images/bluesvr2k.jpg" border="0" alt=""/><br/><br/>附配件图片：<br/><img src="http://i.neoseeker.com/neo_image/146044/article/titan550/CLEAN_IMG_3605.jpg" border="0" alt=""/><br/><br/><img src="http://www.hauppauge.co.uk/pics/hvr2200_board-b.jpg" border="0" alt=""/><br/><br/><br/><strong>Laptop </strong><br/>Dell XPS 1330<br/><img src="http://i.dell.com/images/global/products/xpsnb/m1330_overview_w_white.jpg" border="0" alt=""/> <br/><br/><strong>HTPC</strong><br/><img src="http://www.bluestrait.com/images/htpc/crw_2669_m.jpg" border="0" alt=""/><br/>主要任务：<br/>连接在电视机上，看电视，电影，偶尔玩玩小游戏。<br/><br/>配置：<br/>CPU: AMD 4850e<br/>主板：<a target="_blank" href="http://www.gigabyte.com/products/product-page.aspx?pid=2859#ov" rel="external">GA-MA78GPM-DS2H</a>&nbsp;&nbsp;(integrated ATI Radeon™ HD 3200 Graphic)<br/>机箱: Antec Fusion Remote Black<br/>硬盘: WD Cavier 250GB SATA<br/>内存: Kingston 1GB<br/>电源: <a target="_blank" href="http://www.antec.com/us/productDetails.php?ProdID=28380#" rel="external">Antec NeoHE 380W</a><br/>控制: <a target="_blank" href="http://www.logitech.com/index.cfm/keyboards/keyboard/devices/192&amp;cl=US,EN" rel="external">Logitech diNovo Edge</a><br/>BluRay: 暂缺<br/>软件: Windows 7 Home Premium + <a target="_blank" href="http://www.team-mediaportal.com/" rel="external">Media Portal 1.1.0 RC4 Client </a><br/><br/>附配件图片：<br/><img src="http://www.antec.com/images/400/package/NeoHE_380_box.jpg" border="0" alt=""/><br/><br/><img src="http://www.logitech.com/repository/84/jpg/470.1.0.jpg" border="0" alt=""/><br/><br/>有关HTPC的细节包括安装和使用，请参看 <a target="_blank" href="http://www.bluestrait.com/blog/article.asp?id=96" rel="external">我的HTPC</a>一文<br/>]]></summary>
	  <link rel="alternate" type="text/html" href="http://www.bluestrait.com/blog/article.asp?id=95" /> 
	  <id>http://www.bluestrait.com/blog/default.asp?id=95</id>
  </entry>	
		
  <entry>
	  <title type="html"><![CDATA[我的HTPC 6 新篇： 升级至基于客户机服务器架构的电视网络]]></title>
	  <author>
		 <name>黄敏</name>
		 <uri>http://www.bluestrait.com/blog/</uri>
		 <email>bluestrait@gmail.com</email>
	  </author>
	  <category term="" scheme="http://www.bluestrait.com/blog/default.asp?cateID=3" label="数码时代" /> 
	  <updated>2010-06-23T01:12:24+08:00</updated>
	  <published>2010-06-23T01:12:24+08:00</published>
		  <summary type="html"><![CDATA[在<a target="_blank" href="http://www.bluestrait.com/blog/article.asp?id=99" rel="external">我的HTPC 4 Media Portal的安装和使用</a>一章中我已经提到过，MediaPortal使用了客户/服务器 (Client/Server)架构。这使得将电视服务器和客户端分别安装在不同的电脑上成为可能。但大多数用户包括我自己之前都是将服务器和客户端安装在同一台电脑上。<br/><br/>家里其实有一台Pentium4的旧电脑，安装了很多硬盘，一直以来用作24x7运行的文件服务器和下载机。本来是可以考虑做电视服务器使用的，但是由于我的电视卡是PCI-E接口的，而服务器上的主板非常老，只有AGP接口，所以无法实现这个想法。最近，由于硬盘数量的不断增加（现在已经接了8个硬盘了，快6TB的容量了），不得不给这台电脑做了一次小小的升级：把主板和CPU从旧的P4主板（连SATA接口都没有）和Pentium 4 2.0(还是单核的）换成了Intel E2160和GA-P35C-DS3R。两者都是从overclockers.com.au淘来的旧货，耗费$105。当然CPU并不强大，但对于文件服务器和下载而言已经是绰绰有余，且省电。而主板则和我的工作机上的GA-EP35-DS3是同一系列，但这款可以说更强大，自带8个SATA2接口，做文件服务器正好。<br/><br/>如此升级后，这台电脑的性能和容量都得到相当大的提高，更重要的是这款主板带有电视卡所需的PCI-E接口，终于可以把电视网络的方案付诸实施了。<br/><br/><strong>使用电视服务器的好处</strong><br/>1. HTPC可以大幅减肥：电视卡搬到服务器上了，硬盘也因为不需要存放录像所以可以大幅减少/小了。实际上现在一个32GB的SSD硬盘可以说是最佳选择。能耗和噪音也随之减少。这样的HTPC就是个纯粹的电视客户端和媒体播放器。<br/>2. 作为服务器的电脑本来就是24小时运行的，再加上有大量硬盘空间做后援，因此24小时录像也不成问题。这点妈妈最高兴，因为很多儿童节目都是白天尤其是早上播放的，以前由于HTPC白天都关机了所有无法录下来，现在就不再是问题了。<br/>3. 录像和其他下载的电影电视等等都集中在服务器上，这样从其他地方访问它们更为方便了。例如小朋友们可以在其他房间里通过其他播放器（比如这个<a target="_blank" href="http://bluestrait.com/blog/article.asp?id=238" rel="external">MNP-101高清媒体播放器</a>)看录下的Thomas，不会耽误我用HTPC看我爱看的片子，比如Desparate Housewives （鄙视一下自己，写完就面壁去）。<br/><br/><strong>安装过程</strong><br/>最大的改变就是因为MediaPortal无法在Windows Server版本上运行，所以原来服务器上安装的Windows Server 2000被迫改成了Windows XP Pro. 对于家里简单的文件共享来说，这个操作系统的改变不是一个什么大的问题，对于文件共享没有什么影响。其他无非就是在服务器上安装电视卡，安装驱动程序，然后安装MediaPortal的TV Server软件，最后配置一下TV Server的各项设置例如录像， timeshift的存放文件夹就完了。在现有的HTPC上软件方面唯一的改动就是在MediaPortal的配置上填写TV Server的机器名或IP地址。<br/><br/><strong>使用体验</strong><br/>安装完后已经用了几个月了，至今没有发现任何缺点。包括观看录像和chase play在内的播放响应速度都跟以前在HTPC机上直接看没有区别。刚投入使用时曾有段时间发现播放录像时跳帧严重，断断续续，后来发现是因为服务器上指定用来存放录像的硬盘碎片太多，在一场耗时4个小时的碎片整理后就再没有发生过这种问题了。此外每次看完电视就可将HTPC休眠了，要看时再开机也就是20秒钟的事，省电。<br/><br/>我的结论：如果你家里有24x7运行的电脑，那么基于客户机/服务器架构的电视解决方案可能是最佳选择。<br/><br/><img src="http://www.bluestrait.com/bluegallery/pictures/2010_02_21_wallmount/img_2687.jpg" border="0" alt=""/><br/><br/>参考： <a target="_blank" href="http://bluestrait.com/blog/article.asp?id=95" rel="external">家里的局域网和电脑们</a><br/><br/>上一篇：　<a target="_blank" href="http://bluestrait.com/blog/article.asp?id=147" rel="external">我的HTPC 5 总结</a>]]></summary>
	  <link rel="alternate" type="text/html" href="http://www.bluestrait.com/blog/article.asp?id=327" /> 
	  <id>http://www.bluestrait.com/blog/default.asp?id=327</id>
  </entry>	
		
  <entry>
	  <title type="html"><![CDATA[DBPROP_COMMANDTIMEOUT does not seem to work?]]></title>
	  <author>
		 <name>黄敏</name>
		 <uri>http://www.bluestrait.com/blog/</uri>
		 <email>bluestrait@gmail.com</email>
	  </author>
	  <category term="" scheme="http://www.bluestrait.com/blog/default.asp?cateID=10" label="程序员" /> 
	  <updated>2010-06-03T02:29:17+08:00</updated>
	  <published>2010-06-03T02:29:17+08:00</published>
		  <summary type="html"><![CDATA[This is set as a property to a dbcommand, <br/><div class="UBBPanel codePanel"><div class="UBBTitle"><img src="http://www.bluestrait.com/blog/images/code.gif" style="margin:0px 2px -3px 0px" alt="程序代码"/> 程序代码</div><div class="UBBContent"><br/>propSet.AddProperty(DBPROP_COMMANDTIMEOUT, 30);<br/></div></div><br/><br/>But the command does not seem to work after 30 seconds.<br/><br/>This <a target="_blank" href="http://www.ms-news.net/f767/commandtimeout-detail-question-how-accurate-6408414.html" rel="external">post</a> appears making sense to me:<br/><br/><div class="UBBPanel quotePanel"><div class="UBBTitle"><img src="http://www.bluestrait.com/blog/images/quote.gif" style="margin:0px 2px -3px 0px" alt="引用内容"/> 引用内容</div><div class="UBBContent"><br/>o The timeout no longer counts, once the client library have received some<br/>data back from SQL Server. (This is something I have read in a book; I<br/>have not verified it myself.)<br/>o If the timeout elapses when SQL Server has been ins&#101;rting data into a<br/>table for 30 seconds, o&#114; even worse been updating rows row 30 seconds,<br/>it will not yield on the spot. The effect of the currently executing<br/>statement must be rolled back. And rollbacks usually takes longer than<br/>command that started the operation.<br/></div></div><br/><br/>In my case, the first one makes sense because the query in my test command does return 696164 rows. That explains why the command took around 175 seconds and did not report any timeout failure. After all, if there is data incoming, why the command can be assumed hanged?<br/><br/>If I put a sleep in a sproc, the timeout will still occur, obviously since no data is returned to the client, the client think the command is stalled. <br/><br/>Further reading:<br/><a target="_blank" href="http://blogs.msdn.com/b/khen1234/archive/2005/10/20/483015.aspx" rel="external">This MSDN blog</a> explains query timeouts are a client-side concept only.<br/><br/>But this is probably the best explanation about how the timeout is calculated: <a target="_blank" href="http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlcommand.commandtimeout.aspx" rel="external">http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlcommand.commandtimeout.aspx</a><br/><br/><div class="UBBPanel quotePanel"><div class="UBBTitle"><img src="http://www.bluestrait.com/blog/images/quote.gif" style="margin:0px 2px -3px 0px" alt="引用内容"/> 引用内容</div><div class="UBBContent"><br/>This property is the cumulative time-out for all network reads during command execution o&#114; processing of the results. A time-out can still occur after the first row is returned, and does not include user processing time, only network read time.<br/></div></div><br/>]]></summary>
	  <link rel="alternate" type="text/html" href="http://www.bluestrait.com/blog/article.asp?id=326" /> 
	  <id>http://www.bluestrait.com/blog/default.asp?id=326</id>
  </entry>	
		
  <entry>
	  <title type="html"><![CDATA[[WIP] 网球心得：tennis tips - 3 winning a match]]></title>
	  <author>
		 <name>黄敏</name>
		 <uri>http://www.bluestrait.com/blog/</uri>
		 <email>bluestrait@gmail.com</email>
	  </author>
	  <category term="" scheme="http://www.bluestrait.com/blog/default.asp?cateID=6" label="生活" /> 
	  <updated>2010-06-02T20:25:32+08:00</updated>
	  <published>2010-06-02T20:25:32+08:00</published>
		  <summary type="html"><![CDATA[Tennis is a match of percentage. At club level, the most powerful weapon to win a match is the consistency, not the number of winner shots. So the secret is get yourself make less unforced errors, and get the opponent to do the opposite. <br/><br/>Play safe but keep consistent pressure on the opponent. <br/><br/>Play safe means hitting topspin,&nbsp;&nbsp;getting the ball pass over the center of the net, cross-court. Avoid trying &#34;smart&#34; shots such as (dro&#112; shot, down-the-line, angles) when you have absolute confidence, instead, let your opponent to try them. Smart means riscky and results in low percentage of success. Keep hitting safe, in the end, the magic percentage will work in your favor.<br/><br/>I learned most of these tips from a wonderful book <i>Tennis Tips 101</i>. Below are some of the tips from the book I found most useful so I write them down here using my own words. They may sound a little bit boring but they have been proved working exceptionally well. It significantly boosted my confidence and improved my winning percentage.<br/><br/>1. <strong>Angle shots can hurt yourself</strong><br/>Angle shots should not be attempted unless it will be a clear winner o&#114; you can return absolutely faster than your opponent. It is error-prone, and most likely the opponent will return a down-the-line shot and then you find yourself at a difficult position. You may argue that the opponent will make mistake trying to hit a high-risk down-the-line shot, but remember you are trying the angle shot in the first place so you are taking risk first. Work the percentage out.<br/><br/><i>What is an angle shot: if the ball falls beyond the single side line after it bounces twice, it is considered an angle shot.</i><br/><br/>2. <strong>Never try change the direction of a cross court ball unless you can kill it</strong><br/>Keep the ball going back to its coming direction to avoid unforced errors, let the opponent take&nbsp;&nbsp;the risk! Only change the direction if you are absolutely confident you can make a clear winner.<br/><br/>3. <strong>Get the ball back to center to restart the point</strong><br/>When in defense, return the ball to the center line so the opponent won&#39;t be able to do a good threatening shot. <br/><br/>4. <strong>Twice not once</strong><br/>It always takes twice to make passing o&#114; volleying work. For passing, the first attempt should be always low and to the middle of the net. It will be difficult for the opponent to volley the first one, if he manages it, the return quality will suffer and you can easily put the ball away. <br/><br/>5. <strong>Feeling nervous? Concentrate on your breath o&#114; heartbeat</strong><br/>That way you have not time to think about anything else, and your body and arms relax itself. <br/><br/>6. <strong>Dro&#112; shot is the way to lose a point</strong><br/>Never attempt a dro&#112; shot unless you have full confidence. The chance of getting a point using it is simply not worthy of the huge risk it imposes. Always do topspin whenever possible. <br/><br/>7. <strong> Keep a good clearance over the net</strong><br/>You rarely see pros hit a ball into the net. Learn from them. A good topspin is the key to keep the ball from going long while having a good net clearance. Also that&#39;s why it is so important to keep the ball fly over the middle of the net as that is the lowest point of it.<br/><br/>8. <strong>Go back to basics, and keep it simple</strong><br/>Tennis is a simple game. Use simple skill and strategy to win. Stick to whatever skills that you are confident at. For most, topspin from forehand to the middle of the base line it is. Let your opponent take the risks. <br/><br/>9. <strong>High volley to the back, low volley to the feet</strong><br/>When doing a high volley, aim for the back of the opponent. When doing a low volley, aim for the feet. Don&#39;t think about the perfect angle.]]></summary>
	  <link rel="alternate" type="text/html" href="http://www.bluestrait.com/blog/article.asp?id=325" /> 
	  <id>http://www.bluestrait.com/blog/default.asp?id=325</id>
  </entry>	
		
  <entry>
	  <title type="html"><![CDATA[[zt] Virtuality]]></title>
	  <author>
		 <name>黄敏</name>
		 <uri>http://www.bluestrait.com/blog/</uri>
		 <email>bluestrait@gmail.com</email>
	  </author>
	  <category term="" scheme="http://www.bluestrait.com/blog/default.asp?cateID=10" label="程序员" /> 
	  <updated>2010-05-24T19:03:22+08:00</updated>
	  <published>2010-05-24T19:03:22+08:00</published>
		  <summary type="html"><![CDATA[A very insightful article about Virtuality in C++: <br/><br/><a target="_blank" href="http://www.gotw.ca/publications/mill18.htm" rel="external">http://www.gotw.ca/publications/mill18.htm</a>]]></summary>
	  <link rel="alternate" type="text/html" href="http://www.bluestrait.com/blog/article.asp?id=323" /> 
	  <id>http://www.bluestrait.com/blog/default.asp?id=323</id>
  </entry>	
		
  <entry>
	  <title type="html"><![CDATA[Finding a right tennis racquet]]></title>
	  <author>
		 <name>黄敏</name>
		 <uri>http://www.bluestrait.com/blog/</uri>
		 <email>bluestrait@gmail.com</email>
	  </author>
	  <category term="" scheme="http://www.bluestrait.com/blog/default.asp?cateID=6" label="生活" /> 
	  <updated>2010-05-20T18:38:22+08:00</updated>
	  <published>2010-05-20T18:38:22+08:00</published>
		  <summary type="html"><![CDATA[[2010-6-4 Up&#100;ate]<br/>Finally I bought a Wilson BLX Six.One Team.<br/><br/>The first impression after a hit with it for 90 minutes last night.<br/><br/>It is less powerful, but has much more control than my previous Head oversize 105&#39;.<br/>- The slightly but not heavily increased weight is a good fit for me so I can still keep my swing speed.<br/>- The chance of going long is reduced significantly due to the increased overall weight and 3-point head-light balance.<br/>- the success percentage of the first serve improves as well.<br/><br/>I was a bit concerned about the reduced sweet spot area due to the reduction on the racquet head size (from 105&#39; to 95&#39;), but it turns out not a problem at all. I didn&#39;t miss-hit any one ball because of that factor.<br/><br/>Overall very happy with it. With the improved feel of control, I have more confidence at every shot believing the ball will go as I expect it to.<br/><br/>-------------------------------------------------------------------------------<br/><br/>Have been using this for almost 5 years, and finally decided it is time to move on to next level. <br/><img src="http://di1.shopping.com/images1/pi/43/0c/00/30981691-400x539-0-0_Head_Fxp_Instinct_Team_Flexpoint_Tennis_Racquet.jpg" border="0" alt=""/> <br/><a target="_blank" href="http://www.ballsports.com.au/Head-Flexpoint-FXP-Instinct-Team-Tennis-Racquet-p-1358.html" rel="external">http://www.ballsports.com.au/Head-Flexpoint-FXP-Instinct-Team-Tennis-Racquet-p-1358.html</a><br/>Construction MicroGel<br/>Headsize 680 cm2 / 105 in²<br/>Weight 265 gr/ 9.3 oz<br/>Balance 340 mm / Even<br/>Beam 24/26/24 mm<br/>Length Standard / 685 mm<br/>String Pattern 16/19<br/>SSR S2<br/><br/>Looking at following racquests at the moment: <br/><br/><strong>Babolat Pure Drive GT Tennis Racquet</strong><br/><img src="http://img.tennis-warehouse.com/new_big/BPDGT-1.jpg" border="0" alt=""/><br/><a target="_blank" href="http://www.tennis-warehouse.com/descpage.html?PCODE=BPDGT" rel="external">http://www.tennis-warehouse.com/descpage.html?PCODE=BPDGT</a><br/><a target="_blank" href="http://www.thetennisshop.com.au/tennis-shop/tennis-racquets/babolat-tennis-racquets/pure-drive-gt-special-3/" rel="external">http://www.thetennisshop.com.au/tennis-shop/tennis-racquets/babolat-tennis-racquets/pure-drive-gt-special-3/</a><br/>Midplus Specs<br/>Head Size:<br/>100 sq. in. / 645 sq. cm.<br/>Length: 27 inches / 69 cm<br/>Strung Weight: 11.2oz / 318g<br/>Balance: 4pts Head Light<br/>Swingweight: 327<br/>Stiffness: 70<br/>Beam Width: 22-25 mm<br/>Composition: Graphite Tungsten<br/>Power Level: Low-Medium<br/>Swing Speed: Moderate-Fast<br/>Grip Type: Syntec Grip<br/>String Pattern:<br/>16 Mains / 19 Crosses<br/>Mains skip: 8T,8H<br/>Two Piece<br/>No shared holes<br/>String Tension: 50-66 pounds<br/><br/><br/><strong>Dunlop Aerogel 4D 500 (5Hundred)</strong><br/><img src="http://img.tennis-warehouse.com/new_big/D4D5-1.jpg" border="0" alt=""/><br/><a target="_blank" href="http://www.tennis-warehouse.com/descpage.html?PCODE=D4D5" rel="external">http://www.tennis-warehouse.com/descpage.html?PCODE=D4D5</a><br/><a target="_blank" href="http://www.thetennisshop.com.au/tennis-shop/tennis-racquets/dunlop-tennis-racquets/aerogel-4d-500-special/" rel="external">http://www.thetennisshop.com.au/tennis-shop/tennis-racquets/dunlop-tennis-racquets/aerogel-4d-500-special/</a><br/>Midplus Specs<br/>Head Size:<br/>100 sq. in. / 645 sq. cm.<br/>Length: 27 inches / 69 cm<br/>Strung Weight: 10.2oz / 289g<br/>Balance: 1.2pts Head Light<br/>Swingweight: 300<br/>Stiffness: 66<br/>Beam Width: 23-25-23 mm Tapered Beam<br/>Composition: Aerogel 4D Braided Graphite<br/>Power Level: Low-Medium<br/>Swing Speed: Fast<br/>Grip Type: Hydramax Tour<br/>String Pattern:<br/>16 Mains / 18 Crosses<br/>Mains skip: 7T,9T,7H,9H<br/>One Piece<br/>No shared holes<br/>String Tension: 55-65 pounds<br/><br/><br/><strong>Wilson K Factor Kobra Tour</strong><br/><img src="http://img.tennis-warehouse.com/new_big/KOBRAT-1.jpg" border="0" alt=""/><br/><a target="_blank" href="http://www.tennis-warehouse.com/descpage.html?PCODE=KOBRAT" rel="external">http://www.tennis-warehouse.com/descpage.html?PCODE=KOBRAT</a><br/>Midplus Specs<br/>Head Size:<br/>100 sq. in. / 645 sq. cm.<br/>Length: 27 inches / 69 cm<br/>Strung Weight: 11.4oz / 323g<br/>Balance: 8pts Head Light<br/>Swingweight: 309<br/>Stiffness: 60<br/>Beam Width: 26mm Dual Taper Beam<br/>Composition: 100%[K]arophite Black<br/>Power Level: Low-Medium<br/>Swing Speed: Moderate-Fast<br/>Grip Type: Wilson Leather<br/>String Pattern:<br/>16 Mains / 19 Crosses<br/>Mains skip: 8T,8H<br/>One Piece<br/>No shared holes<br/>String Tension: 50-60 pounds<br/><br/><br/><strong>Volkl Power Bridge 8</strong><br/><img src="http://img.tennis-warehouse.com/new_big/VPB8-1.jpg" border="0" alt=""/><br/><a target="_blank" href="http://www.tennis-warehouse.com/descpage.html?PCODE=VPB8" rel="external">http://www.tennis-warehouse.com/descpage.html?PCODE=VPB8</a><br/><a target="_blank" href="http://www.thetennisshop.com.au/tennis-shop/tennis-racquets/volkl-tennis-racquets/pb-8/" rel="external">http://www.thetennisshop.com.au/tennis-shop/tennis-racquets/volkl-tennis-racquets/pb-8/</a><br/>Midplus Specs<br/>Head Size:<br/>100 sq. in. / 645 sq. cm.<br/>Length: 27 inches / 69 cm<br/>Strung Weight: 11oz / 312g<br/>Balance: 4pts Head Light<br/>Swingweight: 320<br/>Stiffness: 69<br/>Beam Width: 22-24 mm Tapered Beam<br/>Composition: DNX / Graphite / Fiberglass<br/>Power Level: Low-Medium<br/>Swing Speed: Moderate-Fast<br/>Grip Type: Sensor Tour Handle / DNX Grip<br/>String Pattern:<br/>16 Mains / 18 Crosses<br/>Mains skip: 8T,8H<br/>One Piece<br/>No shared holes<br/>String Tension: 50-60 pounds<br/><br/><strong>Wilson BLX Six.One Team</strong><br/><img src="http://img.tennis-warehouse.com/new_big/61TMBX-1.jpg" border="0" alt=""/><br/><a target="_blank" href="http://www.tennis-warehouse.com/Wilson_BLX_SixOne_Team/descpageRCWILSON-61TMBX.html" rel="external">http://www.tennis-warehouse.com/Wilson_BLX_SixOne_Team/descpageRCWILSON-61TMBX.html</a><br/><a target="_blank" href="http://www.thetennisshop.com.au/tennis-shop/tennis-racquets/wilson-tennis-racquets/wilson-blx-team-special-2/" rel="external">http://www.thetennisshop.com.au/tennis-shop/tennis-racquets/wilson-tennis-racquets/wilson-blx-team-special-2/</a><br/>Midplus Specs<br/>Head Size:<br/>95 sq. in. / 612.9 sq. cm.<br/>Length: 27 inches / 68.58 cm<br/>Strung Weight: 10.7oz / 303.34g<br/>Balance: 3 pts HL<br/>Swingweight: 312<br/>Stiffness: 61<br/>Beam Width: 21mm/21mm/21mm/<br/>Composition: [K]arophite Black / Basalt<br/>Power Level: Low-Medium<br/>Swing Speed: Medium-Fast<br/>Grip Type: Pro Hybrid<br/>String Pattern:<br/>18 Mains / 20 Crosses<br/>Mains skip: 8T,10T,8H,10H<br/>One Piece<br/>No Shared Holes<br/>String Tension: 50-60 pounds<br/><br/>]]></summary>
	  <link rel="alternate" type="text/html" href="http://www.bluestrait.com/blog/article.asp?id=322" /> 
	  <id>http://www.bluestrait.com/blog/default.asp?id=322</id>
  </entry>	
		
  <entry>
	  <title type="html"><![CDATA[static variable in header file? ]]></title>
	  <author>
		 <name>黄敏</name>
		 <uri>http://www.bluestrait.com/blog/</uri>
		 <email>bluestrait@gmail.com</email>
	  </author>
	  <category term="" scheme="http://www.bluestrait.com/blog/default.asp?cateID=10" label="程序员" /> 
	  <updated>2010-05-19T19:54:00+08:00</updated>
	  <published>2010-05-19T19:54:00+08:00</published>
		  <summary type="html"><![CDATA[<br/>A few discussions: <br/><br/><a target="_blank" href="http://stackoverflow.com/questions/92546/variable-declarations-in-header-files-static-or-not" rel="external">http://stackoverflow.com/questions/92546/variable-declarations-in-header-files-static-or-not</a><br/><br/>This confirms that a static variable declared in a header file will leave one copy of it cr&#101;ated for each source file in which the header file is included. <br/><br/><br/>]]></summary>
	  <link rel="alternate" type="text/html" href="http://www.bluestrait.com/blog/article.asp?id=320" /> 
	  <id>http://www.bluestrait.com/blog/default.asp?id=320</id>
  </entry>	
		
  <entry>
	  <title type="html"><![CDATA[typedef o&#114; class wrapper]]></title>
	  <author>
		 <name>黄敏</name>
		 <uri>http://www.bluestrait.com/blog/</uri>
		 <email>bluestrait@gmail.com</email>
	  </author>
	  <category term="" scheme="http://www.bluestrait.com/blog/default.asp?cateID=10" label="程序员" /> 
	  <updated>2010-05-18T20:07:55+08:00</updated>
	  <published>2010-05-18T20:07:55+08:00</published>
		  <summary type="html"><![CDATA[I faced a question to ensure correct parameter type is passed in, although the type essentially is a WORD only: <br/>1. typedef<br/><div class="UBBPanel codePanel"><div class="UBBTitle"><img src="http://www.bluestrait.com/blog/images/code.gif" style="margin:0px 2px -3px 0px" alt="程序代码"/> 程序代码</div><div class="UBBContent"><br/>typedef WORD ParamType<br/></div></div><br/><br/>Pro: no run-time overhead cost<br/>Con: no compiler checking hence the app can actually pass in a WORD, o&#114; int o&#114; whatever numeric values that can be cast into WORD. <br/><br/>2. o&#114; use a class wrapper: <br/><div class="UBBPanel codePanel"><div class="UBBTitle"><img src="http://www.bluestrait.com/blog/images/code.gif" style="margin:0px 2px -3px 0px" alt="程序代码"/> 程序代码</div><div class="UBBContent"><br/>class CParamType<br/>{<br/>public:<br/>&nbsp;&nbsp;&nbsp;&nbsp;CParamType(WORD wValue) : m_wValue(wValue) {};<br/>&nbsp;&nbsp;&nbsp;&nbsp;virtual ~CParamType() : {};<br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;WORD m_wValue;<br/>}<br/></div></div><br/>Pro: compiler checking will kick in to enforce valid CParamType only.<br/>Con: extra class means a performance hit.<br/><br/>Which way I should go? <br/><br/>Some discussion: <br/>1. <a target="_blank" href="http://www.cplusplus.com/forum/general/8423/" rel="external">http://www.cplusplus.com/forum/general/8423/</a><br/>Basically use the class when in a special compiler mode to be able to detect the error but fall back to typedef in other compiler mode.<br/><br/>2. <a target="_blank" href="http://stackoverflow.com/questions/376452/enforce-strong-type-checking-in-c-type-strictness-for-typedefs" rel="external">http://stackoverflow.com/questions/376452/enforce-strong-type-checking-in-c-type-strictness-for-typedefs</a><br/>It seems <a target="_blank" href="http://www.boost.org/doc/libs/1_40_0/boost/strong_typedef.hpp" rel="external">BOOST_STRONG_TYPEDEF</a> from boost library is recommended by many. It is a macro introduced in boost, and internally uses struct to differentiate between types. Essentially same as using a simple class wrapper listed above.]]></summary>
	  <link rel="alternate" type="text/html" href="http://www.bluestrait.com/blog/article.asp?id=319" /> 
	  <id>http://www.bluestrait.com/blog/default.asp?id=319</id>
  </entry>	
		
  <entry>
	  <title type="html"><![CDATA[2010-04-03 捡板栗]]></title>
	  <author>
		 <name>黄敏</name>
		 <uri>http://www.bluestrait.com/blog/</uri>
		 <email>bluestrait@gmail.com</email>
	  </author>
	  <category term="" scheme="http://www.bluestrait.com/blog/default.asp?cateID=5" label="家庭" /> 
	  <updated>2010-05-09T22:50:17+08:00</updated>
	  <published>2010-05-09T22:50:17+08:00</published>
		  <summary type="html"><![CDATA[小柏和妈妈一起玩滑梯<br/><img src="http://www.bluestrait.com/bluegallery/Pictures/2010_04_03_Chestnut/IMG_2899_m.jpg" border="0" alt=""/><br/><br/>看看谁捡的多<br/><img src="http://www.bluestrait.com/bluegallery/Pictures/2010_04_03_Chestnut/IMG_2903_m.jpg" border="0" alt=""/><br/><br/><img src="http://www.bluestrait.com/bluegallery/Pictures/2010_04_03_Chestnut/IMG_2904_m.jpg" border="0" alt=""/><br/><br/><img src="http://www.bluestrait.com/bluegallery/Pictures/2010_04_03_Chestnut/IMG_2908_m.jpg" border="0" alt=""/><br/><br/><img src="http://www.bluestrait.com/bluegallery/Pictures/2010_04_03_Chestnut/IMG_2909_m.jpg" border="0" alt=""/><br/><br/><img src="http://www.bluestrait.com/bluegallery/Pictures/2010_04_03_Chestnut/IMG_2915_m.jpg" border="0" alt=""/><br/><br/><img src="http://www.bluestrait.com/bluegallery/Pictures/2010_04_03_Chestnut/IMG_2917_m.jpg" border="0" alt=""/><br/><br/>小偷<br/><img src="http://www.bluestrait.com/bluegallery/Pictures/2010_04_03_Chestnut/IMG_2901_m.jpg" border="0" alt=""/><br/><br/><img src="http://www.bluestrait.com/bluegallery/Pictures/2010_04_03_Chestnut/IMG_2919_m.jpg" border="0" alt=""/><br/><br/>兄弟俩<br/><img src="http://www.bluestrait.com/bluegallery/Pictures/2010_04_03_Chestnut/IMG_2911_m.jpg" border="0" alt=""/><br/><br/><img src="http://www.bluestrait.com/bluegallery/Pictures/2010_04_03_Chestnut/IMG_2925_m.jpg" border="0" alt=""/><br/><br/><img src="http://www.bluestrait.com/bluegallery/Pictures/2010_04_03_Chestnut/IMG_2942_m.jpg" border="0" alt=""/><br/><br/><img src="http://www.bluestrait.com/bluegallery/Pictures/2010_04_03_Chestnut/IMG_2949_m.jpg" border="0" alt=""/><br/><br/>这位老大很酷嘛<br/><img src="http://www.bluestrait.com/bluegallery/Pictures/2010_04_03_Chestnut/IMG_2944_m.jpg" border="0" alt=""/><br/><br/>野餐<br/><img src="http://www.bluestrait.com/bluegallery/Pictures/2010_04_03_Chestnut/IMG_2945_m.jpg" border="0" alt=""/><br/><br/><img src="http://www.bluestrait.com/bluegallery/Pictures/2010_04_03_Chestnut/IMG_2954_m.jpg" border="0" alt=""/><br/><br/>餐后水果<br/><img src="http://www.bluestrait.com/bluegallery/Pictures/2010_04_03_Chestnut/IMG_2957_m.jpg" border="0" alt=""/><br/><br/><img src="http://www.bluestrait.com/bluegallery/Pictures/2010_04_03_Chestnut/IMG_2959_m.jpg" border="0" alt=""/><br/><br/><img src="http://www.bluestrait.com/bluegallery/Pictures/2010_04_03_Chestnut/IMG_2965_m.jpg" border="0" alt=""/><br/><br/><img src="http://www.bluestrait.com/bluegallery/Pictures/2010_04_03_Chestnut/IMG_2966_m.jpg" border="0" alt=""/><br/><br/>小柏与爸爸妈妈<br/><img src="http://www.bluestrait.com/bluegallery/Pictures/2010_04_03_Chestnut/IMG_2999_m.jpg" border="0" alt=""/><br/><br/><img src="http://www.bluestrait.com/bluegallery/Pictures/2010_04_03_Chestnut/IMG_3008_m.jpg" border="0" alt=""/><br/>]]></summary>
	  <link rel="alternate" type="text/html" href="http://www.bluestrait.com/blog/article.asp?id=318" /> 
	  <id>http://www.bluestrait.com/blog/default.asp?id=318</id>
  </entry>	
		
</feed>

