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

<channel>
	<title>Chinh Do &#187; Dotnet/.NET &#8211; C#</title>
	<atom:link href="http://www.chinhdo.com/category/programming/dotnet/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.chinhdo.com</link>
	<description>Chinh's not quite random thoughts on software development, .NET, gadgets, and other things.</description>
	<lastBuildDate>Sat, 06 Aug 2011 21:04:25 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Transactional File Manager Version 1.2 .1 Released</title>
		<link>http://www.chinhdo.com/20110806/transactional-file-manager-version-1-2-released/</link>
		<comments>http://www.chinhdo.com/20110806/transactional-file-manager-version-1-2-released/#comments</comments>
		<pubDate>Sat, 06 Aug 2011 21:04:14 +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/20110806/transactional-file-manager-version-1-2-released/</guid>
		<description><![CDATA[Version 1.2 of Transactional File Manager is now available on CodePlex. Here’s the release notes: Release Notes This is a minor bug-fix/minor refactor release. Fixes: Copy now uses the overwrite parameter correctly. Fixes crashing problem on some machines due to use of GetsequentialGuid. CreateDirectory now supports rolling back nested directories. RollbackFile Rollback() may throw exception [...]]]></description>
			<content:encoded><![CDATA[<p>Version 1.2 of Transactional File Manager is <a href="http://transactionalfilemgr.codeplex.com/releases/view/46998">now available on CodePlex</a>.</p>
<p>Here’s the release notes:</p>
<h5>Release Notes</h5>
<p>This is a minor bug-fix/minor refactor release.   <br /><b>Fixes:</b></p>
<ul>
<li>Copy now uses the overwrite parameter correctly. </li>
<li>Fixes crashing problem on some machines due to use of GetsequentialGuid. </li>
<li>CreateDirectory now supports rolling back nested directories. </li>
<li>RollbackFile Rollback() may throw exception when original directory has been deleted. </li>
<li>Security issue when writing to event logs.</li>
</ul>
<p><b>Enhancements:</b>
<ul>
<li>Upgrade solution/project files to Visual Studio 2010 </li>
<li>Use NUnit instead of VSTS framework </li>
<li>Changes to support Visual Studio Express</li>
</ul>
<p>Thanks to karbuke and dorong for their contributions.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.chinhdo.com/20110806/transactional-file-manager-version-1-2-released/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Getting the Starting Day of the Week for Any Date</title>
		<link>http://www.chinhdo.com/20100907/getting-the-starting-day-of-the-week-for-any-date/</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; [...]]]></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>
]]></content:encoded>
			<wfw:commentRss>http://www.chinhdo.com/20100907/getting-the-starting-day-of-the-week-for-any-date/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Transactional File Manager Is Now On CodePlex</title>
		<link>http://www.chinhdo.com/20100608/transactional-file-manager-is-now-on-codeplex/</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 [...]]]></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>
]]></content:encoded>
			<wfw:commentRss>http://www.chinhdo.com/20100608/transactional-file-manager-is-now-on-codeplex/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>MSMQ Installation on Windows Server 2008 Fail with 0&#215;80070643</title>
		<link>http://www.chinhdo.com/20100510/msmq-installation-on-windows-server-2008-fail-with-0x80070643/</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, [...]]]></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>
]]></content:encoded>
			<wfw:commentRss>http://www.chinhdo.com/20100510/msmq-installation-on-windows-server-2008-fail-with-0x80070643/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Don&#8217;t hire ghost hunters who are afraid of ghosts</title>
		<link>http://www.chinhdo.com/20100327/event-viewer-dependency-on-dotnet/</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>
]]></content:encoded>
			<wfw:commentRss>http://www.chinhdo.com/20100327/event-viewer-dependency-on-dotnet/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Using a Different Configured Binding in WCF Client</title>
		<link>http://www.chinhdo.com/20100206/wcf-switch-binding/</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>
]]></content:encoded>
			<wfw:commentRss>http://www.chinhdo.com/20100206/wcf-switch-binding/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WCF Client Error “The connection was closed unexpectedly” Calling Java/WebSphere 7 Web Service</title>
		<link>http://www.chinhdo.com/20100123/wcf-java-100-continue/</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 [...]]]></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>
]]></content:encoded>
			<wfw:commentRss>http://www.chinhdo.com/20100123/wcf-java-100-continue/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Convert List&lt;T&gt;/IEnumerable to DataTable/DataView</title>
		<link>http://www.chinhdo.com/20090402/convert-list-to-datatable/</link>
		<comments>http://www.chinhdo.com/20090402/convert-list-to-datatable/#comments</comments>
		<pubDate>Thu, 02 Apr 2009 23:00:10 +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/20090402/convert-list-to-datatable/</guid>
		<description><![CDATA[Here&#8217;s a method to convert a generic List&#60;T&#62; to a DataTable. This can be used with ObjectDataSource so you get automatic sorting, etc. /// &#60;summary&#62; /// Convert a List{T} to a DataTable. /// &#60;/summary&#62; private DataTable ToDataTable&#60;T&#62;(List&#60;T&#62; items) { var tb = new DataTable(typeof (T).Name); PropertyInfo[] props = typeof (T).GetProperties(BindingFlags.Public &#124; BindingFlags.Instance); foreach (PropertyInfo prop [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a method to convert a generic List&lt;T&gt; to a DataTable. This can be used with ObjectDataSource so you get automatic sorting, etc.</p>
<pre class="brush: csharp;">/// &lt;summary&gt;
/// Convert a List{T} to a DataTable.
/// &lt;/summary&gt;
private DataTable ToDataTable&lt;T&gt;(List&lt;T&gt; items)
{
    var tb = new DataTable(typeof (T).Name);

    PropertyInfo[] props = typeof (T).GetProperties(BindingFlags.Public | BindingFlags.Instance);

    foreach (PropertyInfo prop in props)
    {
        Type t = GetCoreType(prop.PropertyType);
        tb.Columns.Add(prop.Name, t);
    }

    foreach (T item in items)
    {
        var values = new object[props.Length];

        for (int i = 0; i &lt; props.Length; i++)
        {
            values[i] = props[i].GetValue(item, null);
        }

        tb.Rows.Add(values);
    }22/

    return tb;
}

/// &lt;summary&gt;
/// Determine of specified type is nullable
/// &lt;/summary&gt;
public static bool IsNullable(Type t)
{
    return !t.IsValueType || (t.IsGenericType &amp;&amp; t.GetGenericTypeDefinition() == typeof(Nullable&lt;&gt;));
}

/// &lt;summary&gt;
/// Return underlying type if type is Nullable otherwise return the type
/// &lt;/summary&gt;
public static Type GetCoreType(Type t)
{
    if (t != null &amp;&amp; IsNullable(t))
    {
        if (!t.IsValueType)
        {
            return t;
        }
        else
        {
            return Nullable.GetUnderlyingType(t);
        }
    }
    else
    {
        return t;
    }
}</pre>
<ul>
<li>
<h3>1/22/2010 – Fix to support Nullable types.</h3>
</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.chinhdo.com/20090402/convert-list-to-datatable/feed/</wfw:commentRss>
		<slash:comments>18</slash:comments>
		</item>
		<item>
		<title>Problem with jqModal/jQuery JavaScript Intellisense and Workaround</title>
		<link>http://www.chinhdo.com/20090331/jqmodal-jquery-intellisense/</link>
		<comments>http://www.chinhdo.com/20090331/jqmodal-jquery-intellisense/#comments</comments>
		<pubDate>Tue, 31 Mar 2009 11:15:37 +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/20090331/jqmodal-jquery-intellisense/</guid>
		<description><![CDATA[Is anyone else experiencing a problem with Visual Studio 2008 Intellisense with jQuery and jqModal? It seems that jqModal (a jQuery plugin for modal dialogs) is breaking jQuery Intellisense on my Visual Studio 2008 setup. Without a reference to jqModal.js, jQuery Intellisense works fine: As soon as I add the reference to jqModal.js, the Intellisense [...]]]></description>
			<content:encoded><![CDATA[<p>Is anyone else experiencing a problem with <a href="http://weblogs.asp.net/scottgu/archive/2008/11/21/jquery-intellisense-in-vs-2008.aspx">Visual Studio 2008 Intellisense with jQuery</a> and jqModal?</p>
<p>It seems that <a href="http://weblogs.asp.net/scottgu/archive/2008/11/21/jquery-intellisense-in-vs-2008.aspx">jqModal</a> (a jQuery plugin for modal dialogs) is breaking jQuery Intellisense on my Visual Studio 2008 setup. Without a reference to jqModal.js, jQuery Intellisense works fine:</p>
<p><a href="http://www.chinhdo.com/wp-content/uploads/2009/03/image.png"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="255" alt="image" src="http://www.chinhdo.com/wp-content/uploads/2009/03/image-thumb.png" width="416" border="0"></a> </p>
<p>As soon as I add the reference to jqModal.js, the Intellisense stops working with this error:</p>
<p>Warning&nbsp;&nbsp;&nbsp; 1&nbsp;&nbsp;&nbsp; Error updating JScript IntelliSense: &#8230;\scripts\jquery-1.3.2-vsdoc.js: &#8216;jQuery.support.htmlSerialize&#8217; is null or not an object @ 1430:4<br />
<h3>Workaround</h3>
<p>To work around the problem, generate the script include tag dynamically so that the JavaScript Intellisense engine doesn&#8217;t see the jqModal reference at design time.</p>
<div style="border-right: gray 1px solid; padding-right: 4px; border-top: gray 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, 'Courier New', courier, monospace; background-color: #f4f4f4">
<div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #0000ff">&lt;</span><span style="color: #800000">head</span> <span style="color: #ff0000">runat</span><span style="color: #0000ff">="server"</span><span style="color: #0000ff">&gt;</span></pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">    <span style="color: #0000ff">&lt;</span><span style="color: #800000">title</span><span style="color: #0000ff">&gt;</span>My Web<span style="color: #0000ff">&lt;/</span><span style="color: #800000">title</span><span style="color: #0000ff">&gt;</span></pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">    <span style="color: #0000ff">&lt;</span><span style="color: #800000">asp:Literal</span> <span style="color: #ff0000">ID</span><span style="color: #0000ff">="LitJqModalScript"</span> <span style="color: #ff0000">runat</span><span style="color: #0000ff">="server"</span><span style="color: #0000ff">&gt;&lt;/</span><span style="color: #800000">asp:Literal</span><span style="color: #0000ff">&gt;</span></pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">    <span style="color: #0000ff">&lt;</span><span style="color: #800000">script</span> <span style="color: #ff0000">src</span><span style="color: #0000ff">="../scripts/jquery-1.3.2.js"</span> <span style="color: #ff0000">type</span><span style="color: #0000ff">="text/javascript"</span><span style="color: #0000ff">&gt;&lt;/</span><span style="color: #800000">script</span><span style="color: #0000ff">&gt;</span></pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #0000ff">&lt;/</span><span style="color: #800000">head</span><span style="color: #0000ff">&gt;</span></pre>
</div>
</div>
<p>&nbsp;</p>
<div style="border-right: gray 1px solid; padding-right: 4px; border-top: gray 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, 'Courier New', courier, monospace; background-color: #f4f4f4">
<div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #0000ff">protected</span> <span style="color: #0000ff">override</span> <span style="color: #0000ff">void</span> OnLoad(EventArgs e)</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">{</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">    <span style="color: #0000ff">base</span>.OnLoad(e);</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">&nbsp;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">    LitJqModalScript.Text = <span style="color: #006080">@"&lt;script src="</span><span style="color: #006080">"../scripts/jqModal.js"</span><span style="color: #006080">" type="</span><span style="color: #006080">"text/javascript"</span><span style="color: #006080">"&gt;&lt;/script&gt;"</span>;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">}</pre>
</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.chinhdo.com/20090331/jqmodal-jquery-intellisense/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>My Multiple-Monitor Programming Setup</title>
		<link>http://www.chinhdo.com/20090223/multi-monitor-setup/</link>
		<comments>http://www.chinhdo.com/20090223/multi-monitor-setup/#comments</comments>
		<pubDate>Tue, 24 Feb 2009 01:24:18 +0000</pubDate>
		<dc:creator>Chinh Do</dc:creator>
				<category><![CDATA[Dotnet/.NET - C#]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Software/tools]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://www.chinhdo.com/20090223/multi-monitor-setup/</guid>
		<description><![CDATA[In my opinion, the top three hardware items that help maximize programmer productivity are sufficient RAM, multiple monitors, and a fast multi-core CPU. For RAM, try to have at least 2GB for Visual Studio development, especially if you have additional applications such as Resharper, a local SQL Server instance, IIS, etc. Remember that on Windows [...]]]></description>
			<content:encoded><![CDATA[<p>In my opinion, the top three hardware items that help maximize programmer productivity are sufficient RAM, multiple monitors, and a fast multi-core CPU. For RAM, try to have at least 2GB for Visual Studio development, especially if you have additional applications such as Resharper, a local SQL Server instance, IIS, etc. Remember that on Windows XP or Vista 32-bit, the maximum usable RAM is <a href="http://www.chinhdo.com/20071114/vista-epox-4gb-issue/">limited to about 3.2 GB</a> or so.</p>
<p>My current company-provided laptop, which I must perform most programming activities on, is a Core 2 Duo 2.4 Ghz. It is satisfactory for what I am doing. Given the choice however, I would go for a quad-core CPU desktop. Desktop usually has faster drives, better video cards, etc. And the additional cores allow for smooth multitasking and better performance when using virtual machines.</p>
<p><a href="http://www.chinhdo.com/wp-content/uploads/2009/02/image1.png"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="121" alt="image" src="http://www.chinhdo.com/wp-content/uploads/2009/02/image-thumb1.png" width="240" border="0"></a> </p>
<p>Plenty of RAM and multiple fast CPU cores will keep the waiting down to a minimum. Now you need to give yourself the ability to see all of those things that you have going on. <a href="http://research.microsoft.com/en-us/news/features/vibe.aspx">Research</a> has demonstrated that multiple monitors increase productivity. For most programmers, I would recommend two monitors. Adding that second monitor is a relatively inexpensive affair. Most laptops or desktop video cards has built-in support for a second monitor so all you have to do is getting that second LCD, which cost very little these days compared to three years ago. The third monitor and beyond is where things start to get complicated. You either have to install a second video card, or use a second PC/laptop in conjunction with a software application named MaxiVista. Unless you have spare monitors sitting around, I think the return on investment starts to diminish greatly beyond two monitors.</p>
<p>Another way to use that third or fourth monitor is to simply attach them to additional computers. Sure, you won&#8217;t be able to control all those monitors with the same mouse and keyboard but this setup is not without advantages:</p>
<ul>
<li>When the first computer is rebooting or not responding, you still have a fully functioning computer.
<li>The screens on the second computer are not using CPU/memory resources on the first computer.</li>
</ul>
<h3>My 5-Monitor Setup</h3>
<p>I work from home most of the time and on my desk, there are five monitors, hooked up to three laptops. I know&#8230; it&#8217;s over the top but it&#8217;s not like I bought all of these laptops/monitors specifically for this setup. The second laptop is my personal laptop. The third one is another old personal laptop that would otherwise would be sitting around gathering dust. I might as well put them all to use. Here&#8217;s how the monitors are arranged:</p>
<p><a href="http://www.chinhdo.com/wp-content/uploads/2009/02/image2.png"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="62" alt="image" src="http://www.chinhdo.com/wp-content/uploads/2009/02/image-thumb2.png" width="450" border="0"></a> </p>
<p>The main laptop is hooked up to monitor #1, an ASUS 24&#8243; running at 1920&#215;1080 resolution and monitor #2, the main laptop&#8217;s built-in 15.4-inch LCD running at 1680&#215;1050. I spend most of my time on these two monitors. The ASUS 24&#8243; is great for programming/debugging and is where I normally park Visual Studio 2008 or Rational Software Architect. If you can get one with more vertical resolution (such as 1920&#215;1200), that&#8217;s even better.</p>
<p><a href="http://www.chinhdo.com/wp-content/uploads/2009/02/image3.png"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="273" alt="Visual Studio" src="http://www.chinhdo.com/wp-content/uploads/2009/02/image-thumb3.png" width="470" border="0"></a> </p>
<p>The extra width on the main monitor allows me to permanently open supporting panes like Solution Explorer that I otherwise would configure to &#8220;auto hide&#8221;. Note where I have my Start menu: on the right edge of the main monitor. This gives me more vertical space so I can see more code without scrolling. The additional benefits are that more opened windows can fit on the task bar, and that I don&#8217;t have to move the mouse as much to access the start menu.</p>
<p>The built-in laptop monitor (#2) is where I have miscellaneous supporting windows such as rolling logs, instant messaging client, email client, documents, etc.</p>
<p>For taking notes, I use Microsoft OneNote and since it&#8217;s not installed on my company PC, I use my own laptop for it. This laptop is monitor #3, sitting to the left of the main monitor. Monitors #4 and #5 are used once in a while to display server logs, various server telnet and remote desktop connections, and anything I don&#8217;t need to control often.</p>
<h3>Update 2/25/2008 &#8211; Synergy</h3>
<p>Rohan kindly pointed out to me a free keyboard/mouse sharing utility called <a href="http://synergy2.sourceforge.net/">Synergy</a>. You should give this a try if you have multiple computers on your desk. Synergy lets you use a single keyboard/mouse to control multiple computers, running multiple operating systems. Additional features include clipboard sharing, screen saver, and single password login. The configuration is not the most intuitive but once you have everything set up correctly, it works like a charm.</p>
<p>I now can control all three laptops and 5 monitors with one mouse/keyboard combo! Very nice.</p>
<p><img alt="Synergy animation" src="http://www.chinhdo.com/images/200902/synergy-warp.gif"></p>
]]></content:encoded>
			<wfw:commentRss>http://www.chinhdo.com/20090223/multi-monitor-setup/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>

