<?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:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Chinh Do</title>
	
	<link>http://www.chinhdo.com</link>
	<description>Chinh's not quite random thoughts on software development, .NET, gadgets, and other things.</description>
	<lastBuildDate>Tue, 07 Sep 2010 23:33:00 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/ChinhDo" /><feedburner:info uri="chinhdo" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><geo:lat>37.661647</geo:lat><geo:long>-77.526326</geo:long><feedburner:emailServiceId>ChinhDo</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><feedburner:feedFlare href="http://add.my.yahoo.com/rss?url=http%3A%2F%2Ffeeds.feedburner.com%2FChinhDo" src="http://us.i1.yimg.com/us.yimg.com/i/us/my/addtomyyahoo4.gif">Subscribe with My Yahoo!</feedburner:feedFlare><feedburner:feedFlare href="http://www.newsgator.com/ngs/subscriber/subext.aspx?url=http%3A%2F%2Ffeeds.feedburner.com%2FChinhDo" src="http://www.newsgator.com/images/ngsub1.gif">Subscribe with NewsGator</feedburner:feedFlare><feedburner:feedFlare href="http://feeds.my.aol.com/add.jsp?url=http%3A%2F%2Ffeeds.feedburner.com%2FChinhDo" src="http://o.aolcdn.com/favorites.my.aol.com/webmaster/ffclient/webroot/locale/en-US/images/myAOLButtonSmall.gif">Subscribe with My AOL</feedburner:feedFlare><feedburner:feedFlare href="http://www.bloglines.com/sub/http://feeds.feedburner.com/ChinhDo" src="http://www.bloglines.com/images/sub_modern11.gif">Subscribe with Bloglines</feedburner:feedFlare><feedburner:feedFlare href="http://www.netvibes.com/subscribe.php?url=http%3A%2F%2Ffeeds.feedburner.com%2FChinhDo" src="http://www.netvibes.com/img/add2netvibes.gif">Subscribe with Netvibes</feedburner:feedFlare><feedburner:feedFlare href="http://fusion.google.com/add?feedurl=http%3A%2F%2Ffeeds.feedburner.com%2FChinhDo" src="http://buttons.googlesyndication.com/fusion/add.gif">Subscribe with Google</feedburner:feedFlare><feedburner:feedFlare href="http://www.pageflakes.com/subscribe.aspx?url=http%3A%2F%2Ffeeds.feedburner.com%2FChinhDo" src="http://www.pageflakes.com/ImageFile.ashx?instanceId=Static_4&amp;fileName=ATP_blu_91x17.gif">Subscribe with Pageflakes</feedburner:feedFlare><item>
		<title>Getting the Starting Day of the Week for Any Date</title>
		<link>http://feedproxy.google.com/~r/ChinhDo/~3/w9HgNO-9PGw/</link>
		<comments>http://www.chinhdo.com/20100907/getting-the-starting-day-of-the-week-for-any-date/#comments</comments>
		<pubDate>Tue, 07 Sep 2010 23:33:00 +0000</pubDate>
		<dc:creator>Chinh Do</dc:creator>
				<category><![CDATA[Dotnet/.NET - C#]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.chinhdo.com/20100907/getting-the-starting-day-of-the-week-for-any-date/</guid>
		<description><![CDATA[From my code snippets, here’s a function that will return the starting day of the week for any date:

/// &#60;summary&#62;
/// Gets the start of the week that contains the specified date.
/// &#60;/summary&#62;
/// &#60;param name=&#34;date&#34;&#62;The date.&#60;/param&#62;
/// &#60;param name=&#34;weekStartsOn&#34;&#62;The day that each week starts on.&#60;/param&#62;
/// &#60;returns&#62;The start date of the week.&#60;/returns&#62;
public static DateTime GetStartOfWeek(DateTime date, DayOfWeek weekStartsOn)
{
 [...]]]></description>
			<content:encoded><![CDATA[<p>From my code snippets, here’s a function that will return the starting day of the week for any date:</p>
<pre class="brush: csharp;">
/// &lt;summary&gt;
/// Gets the start of the week that contains the specified date.
/// &lt;/summary&gt;
/// &lt;param name=&quot;date&quot;&gt;The date.&lt;/param&gt;
/// &lt;param name=&quot;weekStartsOn&quot;&gt;The day that each week starts on.&lt;/param&gt;
/// &lt;returns&gt;The start date of the week.&lt;/returns&gt;
public static DateTime GetStartOfWeek(DateTime date, DayOfWeek weekStartsOn)
{
    int days = date.DayOfWeek - weekStartsOn;
    DateTime startOfWeek = days&gt;=0 ? date.AddDays(-days) : date.AddDays(-7 - days);
    return startOfWeek;
}
</pre>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/ChinhDo?a=w9HgNO-9PGw:oWgUcZflvAs:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/ChinhDo?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ChinhDo?a=w9HgNO-9PGw:oWgUcZflvAs:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/ChinhDo?i=w9HgNO-9PGw:oWgUcZflvAs:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/ChinhDo/~4/w9HgNO-9PGw" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.chinhdo.com/20100907/getting-the-starting-day-of-the-week-for-any-date/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.chinhdo.com/20100907/getting-the-starting-day-of-the-week-for-any-date/</feedburner:origLink></item>
		<item>
		<title>World Cup 2010 In Glorious 3D</title>
		<link>http://feedproxy.google.com/~r/ChinhDo/~3/lC3rwvb9nd8/</link>
		<comments>http://www.chinhdo.com/20100611/world-cup-2010-in-glorious-3d/#comments</comments>
		<pubDate>Sat, 12 Jun 2010 00:19:00 +0000</pubDate>
		<dc:creator>Chinh Do</dc:creator>
				<category><![CDATA[Gadgets]]></category>
		<category><![CDATA[HDTV]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://www.chinhdo.com/20100611/world-cup-2010-in-glorious-3d/</guid>
		<description><![CDATA[3DTV is here! This message shows up on my DirecTV receiver/DVR yesterday:
 
Wow! 25 World cup soccer games in 3D! Wait a minute, I think I see some dead pixels on my current HDTV.
]]></description>
			<content:encoded><![CDATA[<p>3DTV is here! This message shows up on my DirecTV receiver/DVR yesterday:</p>
<p><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Your receiver is now 3D ready! With a 3D television and 3D glasses, you can view up to 25 matches of the 2010 FIFA World Coup tournament in spectacular 3D on ESPN 3D Channel 106." border="0" alt="Your receiver is now 3D ready! With a 3D television and 3D glasses, you can view up to 25 matches of the 2010 FIFA World Coup tournament in spectacular 3D on ESPN 3D Channel 106." src="http://www.chinhdo.com/wp-content/uploads/2010/06/image1.png" width="479" height="364" /> </p>
<p>Wow! 25 World cup soccer games in 3D! Wait a minute, I think I see some dead pixels on my current HDTV.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/ChinhDo?a=lC3rwvb9nd8:xco9OmW_C0M:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/ChinhDo?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ChinhDo?a=lC3rwvb9nd8:xco9OmW_C0M:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/ChinhDo?i=lC3rwvb9nd8:xco9OmW_C0M:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/ChinhDo/~4/lC3rwvb9nd8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.chinhdo.com/20100611/world-cup-2010-in-glorious-3d/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.chinhdo.com/20100611/world-cup-2010-in-glorious-3d/</feedburner:origLink></item>
		<item>
		<title>Transactional File Manager Is Now On CodePlex</title>
		<link>http://feedproxy.google.com/~r/ChinhDo/~3/uUr523WpX28/</link>
		<comments>http://www.chinhdo.com/20100608/transactional-file-manager-is-now-on-codeplex/#comments</comments>
		<pubDate>Tue, 08 Jun 2010 22:38:00 +0000</pubDate>
		<dc:creator>Chinh Do</dc:creator>
				<category><![CDATA[Dotnet/.NET - C#]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.chinhdo.com/20100608/transactional-file-manager-is-now-on-codeplex/</guid>
		<description><![CDATA[It’s my first open source project! I’ve gone open source with my Transactional File Manager. Check out the CodePlex link here.
Use any file system as a transactional file system! Transactional File Manager is a .NET API that supports including file system operations such as file copy, move, delete in a transaction. It&#8217;s an implementation of [...]]]></description>
			<content:encoded><![CDATA[<p>It’s my first open source project! I’ve gone open source with my Transactional File Manager. Check out the CodePlex link <a href="http://transactionalfilemgr.codeplex.com/" target="_blank">here</a>.</p>
<p>Use any file system as a transactional file system! Transactional File Manager is a .NET API that supports including file system operations such as file copy, move, delete in a transaction. It&#8217;s an implementation of System.Transaction.IEnlistmentNotification (works with System.Transactions.TransactionScope).</p>
<p><a href="http://transactionalfilemgr.codeplex.com/"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.chinhdo.com/wp-content/uploads/2010/06/image_thumb.png" width="505" height="234" /></a></p>
<p>More on Transactional File Manager in my original blog <a href="http://www.chinhdo.com/20080825/transactional-file-manager/" target="_blank">post</a> on it. If you are interested in contributing to the project, let me know.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/ChinhDo?a=uUr523WpX28:pCIcUHTOOeE:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/ChinhDo?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ChinhDo?a=uUr523WpX28:pCIcUHTOOeE:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/ChinhDo?i=uUr523WpX28:pCIcUHTOOeE:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/ChinhDo/~4/uUr523WpX28" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.chinhdo.com/20100608/transactional-file-manager-is-now-on-codeplex/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://www.chinhdo.com/20100608/transactional-file-manager-is-now-on-codeplex/</feedburner:origLink></item>
		<item>
		<title>MSMQ Installation on Windows Server 2008 Fail with 0×80070643</title>
		<link>http://feedproxy.google.com/~r/ChinhDo/~3/YhzA4f4mvUM/</link>
		<comments>http://www.chinhdo.com/20100510/msmq-installation-on-windows-server-2008-fail-with-0x80070643/#comments</comments>
		<pubDate>Tue, 11 May 2010 01:49:00 +0000</pubDate>
		<dc:creator>Chinh Do</dc:creator>
				<category><![CDATA[Dotnet/.NET - C#]]></category>
		<category><![CDATA[MSMQ]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.chinhdo.com/20100515/msmq-installation-on-windows-server-2008-fail-with-0x80070643/</guid>
		<description><![CDATA[If you get one of these errors starting MSMQ Server or installing MSMQ on Windows (Server 2008), this article describes a potential solution:

You cannot start MSMQ Service with the following entry in the Application Event Log: The Message Queuing service cannot start. The internal private queue &#8216;admin_queue$&#8217; cannot be initialized. If the problem persists, reinstall [...]]]></description>
			<content:encoded><![CDATA[<p>If you get one of these errors starting MSMQ Server or installing MSMQ on Windows (Server 2008), this article describes a potential solution:</p>
<ul>
<li>You cannot start MSMQ Service with the following entry in the Application Event Log: The Message Queuing service cannot start. The internal private queue &#8216;admin_queue$&#8217; cannot be initialized. If the problem persists, reinstall Message Queuing. Error 0xc00e0001.</li>
<li>You cannot install MSMQ with the following error: Attempt to install Message Queuing Server failed with error code 0&#215;80070643. Fatal error during installation. The following features were not installed: Message Queuing Services/Message Queuing Server.
<p><a href="http://www.chinhdo.com/wp-content/uploads/2010/05/2.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="MSMQ Installation Result" border="0" alt="MSMQ Installation Result" src="http://www.chinhdo.com/wp-content/uploads/2010/05/2_thumb.png" width="575" height="434" /></a> </li>
</ul>
<p>&#160;</p>
<p>For me, the solution was to delete the Registry key KEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSMQ, then try the installation again.</p>
<h4>See also:</h4>
<ul>
<li><a href="http://blogs.msdn.com/johnbreakwell/archive/2009/06/04/msmq-won-t-install-on-windows-2008-with-a-fatal-error-0x80070643.aspx">MSMQ won&#8217;t install on Windows 2008 with a Fatal Error (0&#215;80070643)</a></li>
</ul>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/ChinhDo?a=YhzA4f4mvUM:jCKcbs1DUgU:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/ChinhDo?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ChinhDo?a=YhzA4f4mvUM:jCKcbs1DUgU:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/ChinhDo?i=YhzA4f4mvUM:jCKcbs1DUgU:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/ChinhDo/~4/YhzA4f4mvUM" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.chinhdo.com/20100510/msmq-installation-on-windows-server-2008-fail-with-0x80070643/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://www.chinhdo.com/20100510/msmq-installation-on-windows-server-2008-fail-with-0x80070643/</feedburner:origLink></item>
		<item>
		<title>Don’t hire ghost hunters who are afraid of ghosts</title>
		<link>http://feedproxy.google.com/~r/ChinhDo/~3/OhSkLiuSitY/</link>
		<comments>http://www.chinhdo.com/20100327/event-viewer-dependency-on-dotnet/#comments</comments>
		<pubDate>Sat, 27 Mar 2010 04:26:00 +0000</pubDate>
		<dc:creator>Chinh Do</dc:creator>
				<category><![CDATA[Dotnet/.NET - C#]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.chinhdo.com/20100327/event-viewer-dependency-on-dotnet/</guid>
		<description><![CDATA[Your house is haunted. You can’t stand living with the ghosts anymore and decide to call in the professional, a ghost hunter. The ghost hunter comes, nicely equipped with all kinds of shiny ghost hunting equipment, and proceeds to immediately pass out and fall to to the floor with a loud thud at first sight [...]]]></description>
			<content:encoded><![CDATA[<p>Your house is haunted. You can’t stand living with the ghosts anymore and decide to call in the professional, a ghost hunter. The ghost hunter comes, nicely equipped with all kinds of shiny ghost hunting equipment, and proceeds to immediately pass out and fall to to the floor with a loud thud at first sight of the ghosts.</p>
<p>Well, in a nutshell, that is the story of the new Event Viewer in Windows Vista and Windows Server 2008. The new Event Viewer looks very nice and all. Trouble is, it now won’t work when there is a syntax error in machine.config or other .NET Framework problems. Apparently, in Windows Vista and Windows 2008, someone at Microsoft decided to rewrite the Event Viewer utility (a perfectly usable and solid utility in previous versions of Windows) in .NET.</p>
<p><a href="http://www.chinhdo.com/wp-content/uploads/2010/03/image.png"><img title="MMC could not create the snap-in. The snap-in might not have been installed correctly. Name: Event Viewer." style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="253" alt="MMC could not create the snap-in. The snap-in might not have been installed correctly. Name: Event Viewer." src="http://www.chinhdo.com/wp-content/uploads/2010/03/image_thumb.png" width="450" border="0" /></a> </p>
<p>So, the lesson I learned from this is: don’t hire ghost hunters who are afraid of ghosts. Or, don’t write a utility designed to view monitoring and troubleshooting messages that can fail due to unnecessary dependencies. A critical system troubleshooting utility such as Event Viewer should be the last thing that fails.</p>
<h3>What to do when you cannot run Event Viewer in Windows Vista/Windows Server 2008/or Windows 7?</h3>
<p>If you get the following error:</p>
<blockquote><p>MMC could not create the snap-in. The snap-in might now have been installed correctly. Name: Event Viewer. CLSID: FX:{b05566ad-fe9c-4363-be05-7a4cbb7cb510}</p>
</blockquote>
<p>Try the following:</p>
<ul>
<li>Fix any syntax errors in machine.config. Restore to a previously known working copy.</li>
<li>Rename EventVwr.exe.config in %WINDIR%\System32.</li>
</ul>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/ChinhDo?a=OhSkLiuSitY:xVnGDF58ilQ:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/ChinhDo?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ChinhDo?a=OhSkLiuSitY:xVnGDF58ilQ:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/ChinhDo?i=OhSkLiuSitY:xVnGDF58ilQ:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/ChinhDo/~4/OhSkLiuSitY" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.chinhdo.com/20100327/event-viewer-dependency-on-dotnet/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.chinhdo.com/20100327/event-viewer-dependency-on-dotnet/</feedburner:origLink></item>
		<item>
		<title>SQL Server Implicit String Conversion/Concatenation (XML parsing: line &lt;x&gt;, character &lt;y&gt;, unexpected end of input)</title>
		<link>http://feedproxy.google.com/~r/ChinhDo/~3/pthV_oJCmJk/</link>
		<comments>http://www.chinhdo.com/20100220/sql-server-concatenation/#comments</comments>
		<pubDate>Sat, 20 Feb 2010 18:32:00 +0000</pubDate>
		<dc:creator>Chinh Do</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.chinhdo.com/20100220/sql-server-concatenation/</guid>
		<description><![CDATA[If you are getting this error in your SQL Server T-SQL script:, you may be running into an issue with implicit string conversion in SQL Server:
declare @xml varchar(max), @doc XML, @stringVariable varchar(256)
set @stringVariable = 'a string value'

-- @doc is set by concatenating multiple string literals
-- and string variables, with all the variables having less than
-- [...]]]></description>
			<content:encoded><![CDATA[<p>If you are getting this error in your SQL Server T-SQL script:, you may be running into an issue with implicit string conversion in SQL Server:</p>
<pre class="brush: sql;">declare @xml varchar(max), @doc XML, @stringVariable varchar(256)
set @stringVariable = 'a string value'

-- @doc is set by concatenating multiple string literals
-- and string variables, with all the variables having less than
-- or equal to 8000 characters
set @xml = '&lt;root&gt;' +
... + @stringVariable +
...
'&lt;/root&gt;'

print len(@xml)

set @doc = @xml</pre>
<p><strong>Output</strong> </p>
<pre style="padding-left: 15px; font-family: monospace">8000
<font color="#ff0000">Msg 9400, Level 16, State 1, Line 4
XML parsing: line 64, character 74, unexpected end of input</font></pre>
<p>As you can see in the output, the @xml variable was truncated to 8000 characters, resulting in an invalid XML. This is due to the way SQL Server performs implicit string conversions when concatenating strings. When all the string literals/variables involved in the concatenation are 8000 characters or less, the resulting string will be exactly 8000 characters.</p>
<p>The same issue occurs with NVARCHAR data type. Instead of the 8000-character limit, it’s 4000 characters.</p>
<p>A simple fix is to make sure at least one of the string variables is of type VARCHAR(MAX):</p>
<pre class="brush: sql;">declare @xml varchar(max), @doc XML, @stringVariable varchar(256)
declare @x varchar(max)

set @stringVariable = 'a string value'
set @x = ''

set @xml = @x + '&lt;root&gt;' +
... + @stringVariable +
...
'&lt;/root&gt;'

print len(@xml)

set @doc = @xml</pre>
<p>&#160;</p>
<h3>More Info</h3>
<ul>
<li><a href="http://hrubaru.blogspot.com/2010/01/string-concatenation-issues.html">String Concatenation Issues</a> (Hrubaru&#8217;s blog) </li>
</ul>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/ChinhDo?a=pthV_oJCmJk:_btYYAI2nQI:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/ChinhDo?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ChinhDo?a=pthV_oJCmJk:_btYYAI2nQI:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/ChinhDo?i=pthV_oJCmJk:_btYYAI2nQI:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/ChinhDo/~4/pthV_oJCmJk" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.chinhdo.com/20100220/sql-server-concatenation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.chinhdo.com/20100220/sql-server-concatenation/</feedburner:origLink></item>
		<item>
		<title>Instant Messaging Etiquette for the Workplace</title>
		<link>http://feedproxy.google.com/~r/ChinhDo/~3/j5sSxkD5g58/</link>
		<comments>http://www.chinhdo.com/20100213/work-instant-messaging-etiquette/#comments</comments>
		<pubDate>Sat, 13 Feb 2010 16:25:00 +0000</pubDate>
		<dc:creator>Chinh Do</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://www.chinhdo.com/20100213/work-instant-messaging-etiquette/</guid>
		<description><![CDATA[The use of instant messaging at the workplace is very prevalent these days. While instant messaging is very convenient for everyday communication, don’t treat it the same as email, face-to-face meetings, or phone calls. There are several significant differences between instant messaging and traditional forms of communications:

Instant messaging is not necessarily one-one-one. At any given [...]]]></description>
			<content:encoded><![CDATA[<p>The use of instant messaging at the workplace is very prevalent these days. While instant messaging is very convenient for everyday communication, don’t treat it the same as email, face-to-face meetings, or phone calls. There are several significant differences between instant messaging and traditional forms of communications:</p>
<ul>
<li>Instant messaging is not necessarily one-one-one. At any given moment, one person may be engaged in several simultaneous instant messaging conversations. </li>
<li>Even though your messages will be displayed on the recipient’s screen immediately, the recipient may not be able to read the messages and respond immediately. </li>
<li>With most instant messaging applications, the recipient cannot read your messages until you press the Enter key to send it. This limitation inherently makes instant messaging significantly slower than voice conversations.</li>
<li>Most people can speak faster than they can type.</li>
</ul>
<p>Here are some guidelines on basic/everyday instant messaging etiquette that will help you and your co-workers make the most out of this communication medium.</p>
<p><img title="Instant Messaging apps - AIM, MSN Messenger, Windows Live Messenger, Yahoo Messenger, Google Talk, ICQ" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="290" alt="Instant Messaging apps - AIM, MSN Messenger, Windows Live Messenger, Yahoo Messenger, Google Talk, ICQ" src="http://www.chinhdo.com/wp-content/uploads/2010/01/image6.png" width="251" border="0" />&#160;</p>
<h3>Include Relevant Info/Questions in The First Message</h3>
<p>Avoid typing greetings or non-essential messages separately first. Include the question or relevant information in your first message.</p>
<h4><strong>Not-so-good examples (avoid this)</strong></h4>
<blockquote><p><strong>Conversation 1</strong></p>
<ul>
<li><font size="+0">Jane (10:54:50 AM): Hi</font> </li>
<li><em><font color="#008000">Mike (10:55:01 AM): Hello</font></em> </li>
<li><font color="#800000">Jane (10:55:06 AM): The test server will be restarted in 1 minute.</font> </li>
<li><em><font color="#008000">Mike (10:56:11 AM): Thanks for the info</font></em> </li>
</ul>
<p><strong>Conversation 2</strong></p>
<ul>
<li><em><font color="#800000">Jane (2:15:08 PM): Good afternoon</font></em> </li>
<li><font color="#008000">Mike (2:15:13 PM): Good afternoon</font> </li>
<li><em><font color="#800000">Jane (2:15:13 PM): Do you have a few minutes to talk on the phone re project A? </font></em></li>
<li><font color="#008000">Mike (2:15:18 PM): Sure, let me call you.</font> </li>
</ul>
<p><strong>Conversation 3</strong></p>
<ul>
<li><font color="#800000">Jane (4:03:30 PM): You there? </font></li>
<li><em><font color="#008000">Mike (4:03:35 PM): Yes</font></em> </li>
<li><font color="#800000">Jane (4:03:42 PM): Can we have a short team meeting in conf room A</font> </li>
<li><em><font color="#008000">Mike (4:03:50 PM): Sure. Be there in 5.</font></em> </li>
</ul>
</blockquote>
<h4><strong>Good examples</strong></h4>
<blockquote><p><strong>Conversation 1</strong></p>
<ul>
<li><font color="#800000">Jane (10:54:50 AM): Hi, the test server will be restarted in 1 minute. </font></li>
<li><em><font color="#008000">Mike (10:54:55 AM): Thanks for the info </font></em></li>
</ul>
<p><strong>Conversation 2</strong></p>
<ul>
<li><font color="#800000">Jane (2:15:08 PM): Good afternoon, do you have a few minutes to talk on the phone re project A? </font></li>
<li><em><font color="#008000">Mike (2:15:13 PM): Sure I will call you.</font></em> </li>
</ul>
<p><strong>Conversation 3</strong></p>
<ul>
<li><font color="#800000">Jane (4:03:30 PM): Can we have a short team meeting in conf room A? </font></li>
<li><em><font color="#008000">Mike (4:03:35 PM): Sure, be right there.</font></em> </li>
</ul>
</blockquote>
<p>Every time you send a message, the recipient is disrupted from whatever he/she is doing. The more you can delay this disruption the better, even if it’s only seconds. It’s also not necessary to ask the recipient if he/she is there. That’s what the online status (away/available) is for. You can just type your message or ask your question. One exception to this would be if your message contains sensitive information.</p>
<h3></h3>
<h3>Send Complete Messages</h3>
<p>Good:</p>
<ul>
<li><font color="#800000">Jane (9:15:23 AM): Hi, all integration tests are failing in the integration environment for the admin user group. Can you take a look?”</font> </li>
</ul>
<p>No so good:</p>
<ul>
<li><font color="#800000">Jane (9:15:23 AM): Hi, all integration tests are failing…</font> </li>
<li><font color="#800000">Jane (9:15:27 AM): the integration environment…</font> </li>
<li><font color="#800000">Jane (9:15:32 AM): for the admin user group…”</font> </li>
<li><font color="#800000">Jane (9:15:38 AM): Can you take a look?</font> </li>
</ul>
<p>If you have to send several sentences in sequence, compose them in a separate editor first (notepad would do), then type them out quickly in succession. That way the recipient does not have to wait for you while you type your next message, make editing corrections, etc.</p>
<h3>Do Not Expect Responses Immediately</h3>
<p>Unless the recipient reports to you, do not expect a response immediately after you type a message. The recipient may be in the middle of five other instant message conversations, on the phone, or working on something else more important. If the recipient’s status is not set to “Away”, and you have not received a response after a few minutes, it’s ok to ping him/her again. Maybe they forgot about your message.</p>
<h3>Update Your Status and Respect Others’ Status</h3>
<p>If you need to step out, change your status to “Away”, or “In a Meeting”, or “Back in an Hour”, or whatever is appropriate for the situation. This tells everyone else that you are not available to respond to messages immediately and save them from having to wait for your responses.</p>
<h3><strong>Pick Up the Phone</strong></h3>
<p>If the instant messaging conversation starts to go into lots of details and may make take longer than a few minutes, consider picking up the phone and continue the conversation there.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/ChinhDo?a=j5sSxkD5g58:vyCx8CTfRhA:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/ChinhDo?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ChinhDo?a=j5sSxkD5g58:vyCx8CTfRhA:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/ChinhDo?i=j5sSxkD5g58:vyCx8CTfRhA:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/ChinhDo/~4/j5sSxkD5g58" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.chinhdo.com/20100213/work-instant-messaging-etiquette/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.chinhdo.com/20100213/work-instant-messaging-etiquette/</feedburner:origLink></item>
		<item>
		<title>Using a Different Configured Binding in WCF Client</title>
		<link>http://feedproxy.google.com/~r/ChinhDo/~3/P9es3FauYOE/</link>
		<comments>http://www.chinhdo.com/20100206/wcf-switch-binding/#comments</comments>
		<pubDate>Sat, 06 Feb 2010 23:38:00 +0000</pubDate>
		<dc:creator>Chinh Do</dc:creator>
				<category><![CDATA[Dotnet/.NET - C#]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.chinhdo.com/20100206/wcf-switch-binding/</guid>
		<description><![CDATA[To programmatically switch bindings on the fly, you can do it via the constructor of the generated client:
var client = new WeatherClient(“MyEndpoint”);
“MyEndpoint” is the name of the endpoint defined in your config file:
&#60;client&#62;
    &#60;endpoint address=&#34;&#34; binding=&#34;basicHttpBinding&#34; bindingConfiguration=&#34;http1&#34; contract=&#34;MyContract&#34; name=&#34;MyEndpoint&#34; /&#62;
&#60;/client&#62;
]]></description>
			<content:encoded><![CDATA[<p>To programmatically switch bindings on the fly, you can do it via the constructor of the generated client:</p>
<pre class="brush: csharp;">var client = new WeatherClient(“MyEndpoint”);</pre>
<p>“MyEndpoint” is the name of the endpoint defined in your config file:</p>
<pre class="brush: xml;">&lt;client&gt;
    &lt;endpoint address=&quot;&quot; binding=&quot;basicHttpBinding&quot; bindingConfiguration=&quot;http1&quot; contract=&quot;MyContract&quot; name=&quot;MyEndpoint&quot; /&gt;</pre>
<pre class="brush: xml;">&lt;/client&gt;</pre>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/ChinhDo?a=P9es3FauYOE:CuhNErbhaN4:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/ChinhDo?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ChinhDo?a=P9es3FauYOE:CuhNErbhaN4:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/ChinhDo?i=P9es3FauYOE:CuhNErbhaN4:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/ChinhDo/~4/P9es3FauYOE" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.chinhdo.com/20100206/wcf-switch-binding/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.chinhdo.com/20100206/wcf-switch-binding/</feedburner:origLink></item>
		<item>
		<title>Show Your Papers!</title>
		<link>http://feedproxy.google.com/~r/ChinhDo/~3/pBo5s-MaeFw/</link>
		<comments>http://www.chinhdo.com/20100130/show-your-paper/#comments</comments>
		<pubDate>Sun, 31 Jan 2010 02:28:00 +0000</pubDate>
		<dc:creator>Chinh Do</dc:creator>
				<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://www.chinhdo.com/20100203/show-your-paper/</guid>
		<description><![CDATA[They say a man’s home is his castle, and since my computer is my virtual home, I must have complete control over what goes on in it.&#160; When I see a stranger person walking around in my yard, he’s better be ready to tell me who he is, what company he works for, why he’s [...]]]></description>
			<content:encoded><![CDATA[<p>They say a man’s home is his castle, and since my computer is my virtual home, I must have complete control over what goes on in it.&#160; When I see a stranger person walking around in my yard, he’s better be ready to tell me who he is, what company he works for, why he’s in there. Likewise, when I see a strange window running in my computer, I must have the ability to easily tell what it is, who makes it, when it was installed, etc.</p>
<p>Yes, one would think that being able to quickly identify any running window would be a basic feature of any modern so called window operation system. It’s 25 years after the first release of Microsoft Windows, and the sad truth is that you still often cannot easily identify running windows.</p>
<p>Look at the example below. If you are not familiar with this utility, and you came back to your laptop seeing this, would you know what it&#8217;s about? Should you click Yes or No? Is this a legitimate application, or something more sinister?</p>
<p><a href="http://www.chinhdo.com/wp-content/uploads/2010/01/image2.png"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="130" alt="image" src="http://www.chinhdo.com/wp-content/uploads/2010/01/image-thumb1.png" width="189" border="0" /></a>&#160;</p>
<p>The first obvious problem is the missing message. That&#8217;s forgivable however. Bugs happen, files get corrupted, language resource files go missing, etc. What’s not acceptable is for the <strong>Windows</strong> OS not to provide any method to identify misbehaving windows.</p>
<p>So how about it Microsoft? Let us easily find out identifying information about any running Windows. Perhaps with with a click of a button, we can see:</p>
<ul>
<li>Name of owning application/process </li>
<li>Name of vendor (if available) </li>
<li>Folder where executable resides </li>
<li>Date the application was installed </li>
<li>User who installed the application </li>
<li>If the user didn&#8217;t run the application himself, identify the parent process or service that launches the application (shortcut in Startup folder, registry, etc.) </li>
<li>Available code signatures </li>
</ul>
<p>For now, if you want to identify any visible window, use <a href="http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx" target="_blank">Sysinternals’ Process Explorer</a>. Drag the “Find Window’s Process” icon and drop it on top of the target window and Process Explorer will highlight the owner process in its window. From there, you can get the executable name, company name, folder location, etc.</p>
<p><img title="Process Explorer Find Window&#39;s Process" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="120" alt="Process Explorer Find Window&#39;s Process" src="http://www.chinhdo.com/wp-content/uploads/2010/01/image3.png" width="240" border="0" /></p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/ChinhDo?a=pBo5s-MaeFw:IhHGTPemOGU:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/ChinhDo?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ChinhDo?a=pBo5s-MaeFw:IhHGTPemOGU:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/ChinhDo?i=pBo5s-MaeFw:IhHGTPemOGU:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/ChinhDo/~4/pBo5s-MaeFw" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.chinhdo.com/20100130/show-your-paper/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://www.chinhdo.com/20100130/show-your-paper/</feedburner:origLink></item>
		<item>
		<title>WCF Client Error “The connection was closed unexpectedly” Calling Java/WebSphere 7 Web Service</title>
		<link>http://feedproxy.google.com/~r/ChinhDo/~3/M8n5vU4YmTs/</link>
		<comments>http://www.chinhdo.com/20100123/wcf-java-100-continue/#comments</comments>
		<pubDate>Sun, 24 Jan 2010 01:31:00 +0000</pubDate>
		<dc:creator>Chinh Do</dc:creator>
				<category><![CDATA[Dotnet/.NET - C#]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.chinhdo.com/20100127/wcf-java-100-continue/</guid>
		<description><![CDATA[If you get the following exception calling a WebSphere web service from your .NET WCF Client (service reference):
System.ServiceModel.CommunicationException: The underlying connection was closed: The connection was closed unexpectedly. &#8212;&#62;  System.Net.WebException: The underlying connection was closed: The connection was closed unexpectedly.
Try adding this code before the service call:
System.Net.ServicePointManager.Expect100Continue = false;
More info on the 100-Continue behavior from [...]]]></description>
			<content:encoded><![CDATA[<p>If you get the following exception calling a WebSphere web service from your .NET WCF Client (service reference):</p>
<blockquote><p>System.ServiceModel.CommunicationException: The underlying connection was closed: The connection was closed unexpectedly. &#8212;&gt;  System.Net.WebException: The underlying connection was closed: The connection was closed unexpectedly.</p></blockquote>
<p>Try adding this code before the service call:</p>
<pre class="brush: csharp;">System.Net.ServicePointManager.Expect100Continue = false;</pre>
<p><a href="http://msdn.microsoft.com/en-us/library/system.net.servicepointmanager.expect100continue.aspx">More info</a> on the 100-Continue behavior from MSDN.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/ChinhDo?a=M8n5vU4YmTs:R3nX5UytuYE:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/ChinhDo?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ChinhDo?a=M8n5vU4YmTs:R3nX5UytuYE:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/ChinhDo?i=M8n5vU4YmTs:R3nX5UytuYE:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/ChinhDo/~4/M8n5vU4YmTs" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.chinhdo.com/20100123/wcf-java-100-continue/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://www.chinhdo.com/20100123/wcf-java-100-continue/</feedburner:origLink></item>
	</channel>
</rss>
