<?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/"
	xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Random Noise</title>
	<atom:link href="http://serialize.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://serialize.wordpress.com</link>
	<description>cat /dev/random &#62;&#62; /dev/dsp</description>
	<lastBuildDate>Thu, 16 Jul 2009 02:37:37 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='serialize.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/d626fb44befde701a9300e0799683cc5?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>Random Noise</title>
		<link>http://serialize.wordpress.com</link>
	</image>
			<item>
		<title>IDataReader GetValue Extension method</title>
		<link>http://serialize.wordpress.com/2009/07/15/idatareader-getvalue-extension-method/</link>
		<comments>http://serialize.wordpress.com/2009/07/15/idatareader-getvalue-extension-method/#comments</comments>
		<pubDate>Wed, 15 Jul 2009 21:27:41 +0000</pubDate>
		<dc:creator>Vivek Unune</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[.NET 3.5]]></category>
		<category><![CDATA[c#]]></category>

		<guid isPermaLink="false">http://serialize.wordpress.com/?p=79</guid>
		<description><![CDATA[It is offten desired to get a value from DataReader using column name with known Type. For example you want to get a string value of column &#8216;first_name&#8217; and int value of column &#8216;account_number&#8217;. The following extension method makes it easy to fetch values from a DataReader using Type and column name:
public static class ReaderHelper
{
 [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=serialize.wordpress.com&blog=4194111&post=79&subd=serialize&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>It is offten desired to get a value from DataReader using column name with known Type. For example you want to get a string value of column &#8216;first_name&#8217; and int value of column &#8216;account_number&#8217;. The following extension method makes it easy to fetch values from a DataReader using Type and column name:</p>
<pre><span style="font-size:small;"><span style="color:#0000FF;">public</span><span style="color:#000000;"> </span><span style="color:#0000FF;">static</span><span style="color:#000000;"> </span><span style="color:#0000FF;">class</span><span style="color:#000000;"> ReaderHelper
{
    </span><span style="color:#0000FF;">public</span><span style="color:#000000;"> </span><span style="color:#0000FF;">static</span><span style="color:#000000;"> </span><span style="color:#0000FF;">bool</span><span style="color:#000000;"> IsNullableType(Type valueType)
    {
        </span><span style="color:#0000FF;">return</span><span style="color:#000000;"> (valueType.IsGenericType &amp;&amp;
            valueType.GetGenericTypeDefinition().Equals(</span><span style="color:#0000FF;">typeof</span><span style="color:#000000;">(Nullable&lt;&gt;)));
    }

    </span><span style="color:#0000FF;">public</span><span style="color:#000000;"> </span><span style="color:#0000FF;">static</span><span style="color:#000000;"> T GetValue&lt;T&gt;(</span><span style="color:#0000FF;">this</span><span style="color:#000000;"> IDataReader reader, </span><span style="color:#0000FF;">string</span><span style="color:#000000;"> columnName)
    {
        </span><span style="color:#0000FF;">object</span><span style="color:#000000;"> value = reader[columnName];
        Type valueType = </span><span style="color:#0000FF;">typeof</span><span style="color:#000000;">(T);
        </span><span style="color:#0000FF;">if</span><span style="color:#000000;"> (value != DBNull.Value)
        {
            </span><span style="color:#0000FF;">if</span><span style="color:#000000;"> (!IsNullableType(valueType))
            {
                </span><span style="color:#0000FF;">return</span><span style="color:#000000;"> (T)Convert.ChangeType(value, valueType);
            }
            </span><span style="color:#0000FF;">else</span><span style="color:#000000;">
            {
                NullableConverter nc = </span><span style="color:#0000FF;">new</span><span style="color:#000000;"> NullableConverter(valueType);
                </span><span style="color:#0000FF;">return</span><span style="color:#000000;"> (T)Convert.ChangeType(value, nc.UnderlyingType);
            }
        }
        </span><span style="color:#0000FF;">return</span><span style="color:#000000;"> </span><span style="color:#0000FF;">default</span><span style="color:#000000;">(T);
    }
}</span></pre>
<p>It can be used as:</p>
<pre><span style="font-size:small;"><span style="color:#000000;">User GetUser(IDataReader reader)
{
    User user = </span><span style="color:#0000FF;">new</span><span style="color:#000000;"> User();
    user.FirstName = reader.GetValue&lt;</span><span style="color:#0000FF;">string</span><span style="color:#000000;">&gt;(</span><span style="color:#800000;">"first_name"</span><span style="color:#000000;">);
    user.LastName = reader.GetValue&lt;</span><span style="color:#0000FF;">string</span><span style="color:#000000;">&gt;(</span><span style="color:#800000;">"last_name"</span><span style="color:#000000;">);
    user.Email = reader.GetValue&lt;</span><span style="color:#0000FF;">string</span><span style="color:#000000;">&gt;(</span><span style="color:#800000;">"email"</span><span style="color:#000000;">);
    user.AccountNumber = reader.GetValue&lt;</span><span style="color:#0000FF;">int</span><span style="color:#000000;">&gt;(</span><span style="color:#800000;">"account_number"</span><span style="color:#000000;">);
    user.NumberOfVehiclesOwned = reader.GetValue&lt;</span><span style="color:#0000FF;">int?</span><span style="color:#000000;">&gt;(</span><span style="color:#800000;">"vehicle_count"</span><span style="color:#000000;">); </span><span style="color:#008000;">// nullable data field</span><span style="color:#000000;">
    </span><span style="color:#0000FF;">return</span><span style="color:#000000;"> user;
}
</span></span></pre>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/serialize.wordpress.com/79/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/serialize.wordpress.com/79/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/serialize.wordpress.com/79/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/serialize.wordpress.com/79/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/serialize.wordpress.com/79/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/serialize.wordpress.com/79/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/serialize.wordpress.com/79/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/serialize.wordpress.com/79/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/serialize.wordpress.com/79/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/serialize.wordpress.com/79/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=serialize.wordpress.com&blog=4194111&post=79&subd=serialize&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://serialize.wordpress.com/2009/07/15/idatareader-getvalue-extension-method/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/54fbdf814723425c6ce3e94aefaad4c1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Vivek</media:title>
		</media:content>
	</item>
		<item>
		<title>Experiments with OpenWRT and USR5465</title>
		<link>http://serialize.wordpress.com/2008/12/10/experiments-with-openwrt-and-usr5465/</link>
		<comments>http://serialize.wordpress.com/2008/12/10/experiments-with-openwrt-and-usr5465/#comments</comments>
		<pubDate>Wed, 10 Dec 2008 03:28:48 +0000</pubDate>
		<dc:creator>Vivek Unune</dc:creator>
				<category><![CDATA[openwrt]]></category>
		<category><![CDATA[usrobotics]]></category>
		<category><![CDATA[vpnc]]></category>

		<guid isPermaLink="false">http://serialize.wordpress.com/?p=68</guid>
		<description><![CDATA[I recently purchased U.S Robotics USR5465 router. I chose it because it had 4MB flash and 16MB ram; enough to run  linux based distribution for router such as OpenWRT. Out of the box, this router runs linux kernel 2.4 along with busy box. But I was very much interested to run latest kernel (2.6.x) on [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=serialize.wordpress.com&blog=4194111&post=68&subd=serialize&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I recently purchased U.S Robotics USR5465 router. I chose it because it had 4MB flash and 16MB ram; enough to run  linux based distribution for router such as OpenWRT. Out of the box, this router runs linux kernel 2.4 along with busy box. But I was very much interested to run latest kernel (2.6.x) on it. With OpenWRT it is easy to create the development environment. Just login to your favorite linux as a non-root and follow few steps mention here. Once you configure your router kernel and run make command. OpenWRT automatically downloads required toochain source and compiles it for your PC.</p>
<p>USR5465 has one serial port and possibly a 12 pin JTAG. So, I brought myself a Nokia DKU-5 cable (SN: WT048000317).  This cable has a usb to serial converter; and it&#8217;s cheap! I cut/removed the phone connector end of the cable. After a little research, I found out that:</p>
<pre>Phone connector Pin#        Wire Color        Signal
            8                 RED              GND
            7                 GREEN            TX
            6                 WHITE            RX
            4                 ORANGE           3.3 OUT  (Not used, do not connect!!)</pre>
<p>After connecting wires to jumper J301, compiling ark3116 kernel module  and using 115200 baud rate with 8-N-1, I was able to connect my laptop to the router. When I restarted the router I saw the boot messages from router. Here is how I connected the wires:</p>
<pre>j301
|o|  ---&gt;   GREEN   (TX)
|o|  ---&gt;   WHITE   (RX)
|o|
|o|  ---&gt;   RED     (GND)

______
o -&gt; Power led

#################################     &lt;--- Motherboard edge</pre>
<p>Another advantage of this router is that it has a USB 2.0 port. To use usb, I had to use revision 13088 and patched it using <a href="http://dongsupark.de/openwrt/kamikaze-r13088-b43ssb-2.6.27.diff" target="_blank">this patch</a></p>
<p>svn checkout -r13088 https://svn.openwrt.org/openwrt/trunk kamikaze<br />
patch -p1 &lt; kamikaze-r13088-b43ssb-2.6.27.diff</p>
<p>I had to change &#8220;BUSWIDTH 2&#8243; to &#8220;BUSWIDTH 1&#8243; in drivers/mtd/maps/bcm47xx-flash.c file in order to get a working image. Otherwise I saw few &#8220;error -5&#8243; lines after booting.</p>
<p>I wasn&#8217;t able to connect to the internet, even after I got the image to boot successfully. I found that the problem was due to incorrect labeling of the WAN and the LAN ports by OpenWRT.  Since I was able to connect to the router using the serial port I changed the VLAN config in /etc/config/network to:</p>
<pre>#### VLAN configuration
config switch eth0
        option vlan0    "0 1 2 3 5*"
        option vlan1    "4 5"</pre>
<p>Only then I was able to get a valid IP address and connect to the internet.</p>
<p>Other than wireless (which didn&#8217;t bother me, as I always use wired connection) everything is now working perfectly. Since this model is not supported by OpenWRT, it doesn&#8217;t know the led configurations and does not recognize the model. So I had to add that info. in diag.c file. gpioctl utility was useful to find out the led and  reset button gpios.</p>
<p>You can download modified diag.c from <a href="http://serialize.files.wordpress.com/2008/12/diagc.doc" target="_blank">here</a>. Once you compile you should see WAN led and USB led litup (need to do some configuration for USB led).</p>
<p>Further I was also able to install VPNC on the router and connect to CISCO VPN without any problem <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  This makes it easier for me when using Vista x64, as cisco doesn&#8217;t provide vpn client for 64bit windows.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/serialize.wordpress.com/68/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/serialize.wordpress.com/68/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/serialize.wordpress.com/68/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/serialize.wordpress.com/68/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/serialize.wordpress.com/68/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/serialize.wordpress.com/68/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/serialize.wordpress.com/68/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/serialize.wordpress.com/68/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/serialize.wordpress.com/68/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/serialize.wordpress.com/68/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=serialize.wordpress.com&blog=4194111&post=68&subd=serialize&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://serialize.wordpress.com/2008/12/10/experiments-with-openwrt-and-usr5465/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/54fbdf814723425c6ce3e94aefaad4c1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Vivek</media:title>
		</media:content>
	</item>
		<item>
		<title>Visual Studio 2008 color settings</title>
		<link>http://serialize.wordpress.com/2008/09/27/visual-studio-2008-color-settings/</link>
		<comments>http://serialize.wordpress.com/2008/09/27/visual-studio-2008-color-settings/#comments</comments>
		<pubDate>Sat, 27 Sep 2008 21:14:22 +0000</pubDate>
		<dc:creator>Vivek Unune</dc:creator>
				<category><![CDATA[Misc.]]></category>
		<category><![CDATA[color settings]]></category>
		<category><![CDATA[vs2008]]></category>

		<guid isPermaLink="false">http://serialize.wordpress.com/?p=54</guid>
		<description><![CDATA[I recently switched to &#8220;dark&#8221; vs2008 color scheme since it is easy on eyes.
I started with RagnaRok color scheme created by Tomas Restrepo and modified it to my convenience.
You can download the modified version from here: RagnaRok-modified.

       <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=serialize.wordpress.com&blog=4194111&post=54&subd=serialize&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I recently switched to &#8220;dark&#8221; vs2008 color scheme since it is easy on eyes.</p>
<p>I started with RagnaRok color scheme created by Tomas Restrepo and modified it to my convenience.</p>
<p>You can download the modified version from here: <a href="http://www.hotlinkfiles.com/files/1891615_pazaw/RagnaRok-Modified.zip" target="_blank">RagnaRok-modified</a>.</p>
<p><a href="http://serialize.files.wordpress.com/2008/09/vs20081.png"><img class="aligncenter size-full wp-image-61" title="vs20081" src="http://serialize.files.wordpress.com/2008/09/vs20081.png?w=500&#038;h=426" alt="" width="500" height="426" /></a></p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/serialize.wordpress.com/54/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/serialize.wordpress.com/54/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/serialize.wordpress.com/54/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/serialize.wordpress.com/54/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/serialize.wordpress.com/54/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/serialize.wordpress.com/54/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/serialize.wordpress.com/54/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/serialize.wordpress.com/54/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/serialize.wordpress.com/54/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/serialize.wordpress.com/54/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=serialize.wordpress.com&blog=4194111&post=54&subd=serialize&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://serialize.wordpress.com/2008/09/27/visual-studio-2008-color-settings/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/54fbdf814723425c6ce3e94aefaad4c1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Vivek</media:title>
		</media:content>

		<media:content url="http://serialize.files.wordpress.com/2008/09/vs20081.png" medium="image">
			<media:title type="html">vs20081</media:title>
		</media:content>
	</item>
		<item>
		<title>RotateString v2.0</title>
		<link>http://serialize.wordpress.com/2008/09/27/rotatestring-v20/</link>
		<comments>http://serialize.wordpress.com/2008/09/27/rotatestring-v20/#comments</comments>
		<pubDate>Sat, 27 Sep 2008 16:46:57 +0000</pubDate>
		<dc:creator>Vivek Unune</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[stackoverflow]]></category>

		<guid isPermaLink="false">http://serialize.wordpress.com/?p=47</guid>
		<description><![CDATA[I added the ability to rotate string right or left. Here is the code:

public enum Direction { Right, Left }

string rotateString(string source, int rotationCount, Direction direction)
{
    if (String.IsNullOrEmpty(source) &#124;&#124; rotationCount &#60;= 0)
        return source;

    int pivot = 0;
    List&#60;int&#62; [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=serialize.wordpress.com&blog=4194111&post=47&subd=serialize&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I added the ability to rotate string right or left. Here is the code:</p>
<pre><span style="font-size:small;">
<span style="color:#0000ff;">public</span><span style="color:#000000;"> </span><span style="color:#0000ff;">enum</span><span style="color:#000000;"> Direction { Right, Left }

</span><span style="color:#0000ff;">string</span><span style="color:#000000;"> rotateString(</span><span style="color:#0000ff;">string</span><span style="color:#000000;"> source, </span><span style="color:#0000ff;">int</span><span style="color:#000000;"> rotationCount, Direction direction)
{
    </span><span style="color:#0000ff;">if</span><span style="color:#000000;"> (String.IsNullOrEmpty(source) </span><span style="color:#000000;">||</span><span style="color:#000000;"> rotationCount </span><span style="color:#000000;">&lt;=</span><span style="color:#000000;"> </span><span style="color:#800080;">0</span><span style="color:#000000;">)
        </span><span style="color:#0000ff;">return</span><span style="color:#000000;"> source;

    </span><span style="color:#0000ff;">int</span><span style="color:#000000;"> pivot </span><span style="color:#000000;">=</span><span style="color:#000000;"> </span><span style="color:#800080;">0</span><span style="color:#000000;">;
    List</span><span style="color:#000000;">&lt;</span><span style="color:#0000ff;">int</span><span style="color:#000000;">&gt;</span><span style="color:#000000;"> delimiterLocations </span><span style="color:#000000;">=</span><span style="color:#000000;"> </span><span style="color:#0000ff;">new</span><span style="color:#000000;"> List</span><span style="color:#000000;">&lt;</span><span style="color:#0000ff;">int</span><span style="color:#000000;">&gt;</span><span style="color:#000000;">();
    </span><span style="color:#0000ff;">char</span><span style="color:#000000;">[] sourceChars </span><span style="color:#000000;">=</span><span style="color:#000000;"> </span><span style="color:#0000ff;">new</span><span style="color:#000000;"> </span><span style="color:#0000ff;">char</span><span style="color:#000000;">;

    </span><span style="color:#0000ff;">char</span><span style="color:#000000;"> temp;
    </span><span style="color:#008000;">//</span><span style="color:#008000;"> Reverse the whole string and
    </span><span style="color:#008000;">//</span><span style="color:#008000;"> save the dilimiter locations</span><span style="color:#008000;">
</span><span style="color:#000000;">    </span><span style="color:#0000ff;">for</span><span style="color:#000000;"> (</span><span style="color:#0000ff;">int</span><span style="color:#000000;"> i </span><span style="color:#000000;">=</span><span style="color:#000000;"> </span><span style="color:#800080;">0</span><span style="color:#000000;">; i </span><span style="color:#000000;">&lt;</span><span style="color:#000000;"> source.Length; i</span><span style="color:#000000;">++</span><span style="color:#000000;">)
    {
        sourceChars </span><span style="color:#000000;">=</span><span style="color:#000000;"> source[i];

        </span><span style="color:#0000ff;">if</span><span style="color:#000000;"> (source[i] </span><span style="color:#000000;">==</span><span style="color:#000000;"> </span><span style="color:#800000;">'</span><span style="color:#800000;"> </span><span style="color:#800000;">'</span><span style="color:#000000;">)
            delimiterLocations.Add(source.Length </span><span style="color:#000000;">-</span><span style="color:#000000;"> i </span><span style="color:#000000;">-</span><span style="color:#000000;"> </span><span style="color:#800080;">1</span><span style="color:#000000;">);
    }

    </span><span style="color:#008000;">//</span><span style="color:#008000;"> calculate neededDelimiters mod wordCount
    </span><span style="color:#008000;">//</span><span style="color:#008000;"> (assume words = delimiterCount + 1)</span><span style="color:#008000;">
</span><span style="color:#000000;">    pivot </span><span style="color:#000000;">=</span><span style="color:#000000;"> rotationCount </span><span style="color:#000000;">%</span><span style="color:#000000;"> delimiterLocations.Count;

    </span><span style="color:#0000ff;">if</span><span style="color:#000000;"> (pivot </span><span style="color:#000000;">&gt;</span><span style="color:#000000;"> </span><span style="color:#800080;">0</span><span style="color:#000000;">)
    {
        </span><span style="color:#0000ff;">if</span><span style="color:#000000;"> (direction </span><span style="color:#000000;">==</span><span style="color:#000000;"> Direction.Left)
            pivot </span><span style="color:#000000;">=</span><span style="color:#000000;"> delimiterLocations.Count </span><span style="color:#000000;">-</span><span style="color:#000000;"> pivot;

        pivot </span><span style="color:#000000;">=</span><span style="color:#000000;"> delimiterLocations[delimiterLocations.Count </span><span style="color:#000000;">-</span><span style="color:#000000;"> pivot];
    }
    </span><span style="color:#0000ff;">else</span><span style="color:#000000;">
    { </span><span style="color:#0000ff;">return</span><span style="color:#000000;"> source; }

    </span><span style="color:#008000;">//</span><span style="color:#008000;"> reverse the first part</span><span style="color:#008000;">
</span><span style="color:#000000;">    </span><span style="color:#0000ff;">for</span><span style="color:#000000;"> (</span><span style="color:#0000ff;">int</span><span style="color:#000000;"> i </span><span style="color:#000000;">=</span><span style="color:#000000;"> </span><span style="color:#800080;">0</span><span style="color:#000000;">, j </span><span style="color:#000000;">=</span><span style="color:#000000;"> pivot </span><span style="color:#000000;">-</span><span style="color:#000000;"> </span><span style="color:#800080;">1</span><span style="color:#000000;">; i </span><span style="color:#000000;">&lt;=</span><span style="color:#000000;"> j; i</span><span style="color:#000000;">++</span><span style="color:#000000;">, j</span><span style="color:#000000;">--</span><span style="color:#000000;">)
    {
        temp </span><span style="color:#000000;">=</span><span style="color:#000000;"> sourceChars[i];
        sourceChars[i] </span><span style="color:#000000;">=</span><span style="color:#000000;"> sourceChars[j];
        sourceChars[j] </span><span style="color:#000000;">=</span><span style="color:#000000;"> temp;
    }

    </span><span style="color:#008000;">//</span><span style="color:#008000;"> reverse the second part</span><span style="color:#008000;">
</span><span style="color:#000000;">    </span><span style="color:#0000ff;">for</span><span style="color:#000000;"> (</span><span style="color:#0000ff;">int</span><span style="color:#000000;"> i </span><span style="color:#000000;">=</span><span style="color:#000000;"> pivot </span><span style="color:#000000;">+</span><span style="color:#000000;"> </span><span style="color:#800080;">1</span><span style="color:#000000;">, j </span><span style="color:#000000;">=</span><span style="color:#000000;"> sourceChars.Length </span><span style="color:#000000;">-</span><span style="color:#000000;"> </span><span style="color:#800080;">1</span><span style="color:#000000;">;
         i </span><span style="color:#000000;">&lt;=</span><span style="color:#000000;"> j; i</span><span style="color:#000000;">++</span><span style="color:#000000;">, j</span><span style="color:#000000;">--</span><span style="color:#000000;">)
    {
        temp </span><span style="color:#000000;">=</span><span style="color:#000000;"> sourceChars[i];
        sourceChars[i] </span><span style="color:#000000;">=</span><span style="color:#000000;"> sourceChars[j];
        sourceChars[j] </span><span style="color:#000000;">=</span><span style="color:#000000;"> temp;
    }

    </span><span style="color:#0000ff;">return</span><span style="color:#000000;"> </span><span style="color:#0000ff;">new</span><span style="color:#000000;"> </span><span style="color:#0000ff;">string</span><span style="color:#000000;">(sourceChars);
}</span>
</span></pre>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/serialize.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/serialize.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/serialize.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/serialize.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/serialize.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/serialize.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/serialize.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/serialize.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/serialize.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/serialize.wordpress.com/47/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=serialize.wordpress.com&blog=4194111&post=47&subd=serialize&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://serialize.wordpress.com/2008/09/27/rotatestring-v20/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/54fbdf814723425c6ce3e94aefaad4c1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Vivek</media:title>
		</media:content>
	</item>
		<item>
		<title>StackOverflow &#8211; RotateString</title>
		<link>http://serialize.wordpress.com/2008/09/25/stackoverflow-rotatestring/</link>
		<comments>http://serialize.wordpress.com/2008/09/25/stackoverflow-rotatestring/#comments</comments>
		<pubDate>Thu, 25 Sep 2008 05:04:07 +0000</pubDate>
		<dc:creator>Vivek Unune</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[stackoverflow]]></category>

		<guid isPermaLink="false">http://serialize.wordpress.com/?p=25</guid>
		<description><![CDATA[Someone asked the following question on StackOverflow. Before I could post my answer, it was removed. Hmm, so He/She tried to abuse StackOverflow! Anyway, I found that question interesting.
The question was to write a function to rotate a string of words. Words are separated by &#8216; &#8216; (space). In the result string, the words should [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=serialize.wordpress.com&blog=4194111&post=25&subd=serialize&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Someone asked the following question on StackOverflow. Before I could post my answer, it was removed. Hmm, so He/She tried to abuse StackOverflow! Anyway, I found that question interesting.</p>
<p>The question was to write a function to rotate a string of words. Words are separated by &#8216; &#8216; (space). In the result string, the words should remain human readable. The function will also take an integer argument that will specify number of words to rotate.</p>
<p>example:</p>
<p>string source = &#8220;A quick brown fox jumps over the lazy dog.&#8221;</p>
<p>rotateString(source, 3);</p>
<p>Should give:</p>
<p>the lazy dog. A quick brown fox jumps over</p>
<p>Here is my solution:</p>
<pre><span style="font-size:small;"><span style="color:#0000ff;">static</span><span style="color:#000000;"> </span><span style="color:#0000ff;">string</span><span style="color:#000000;"> rotateString(</span><span style="color:#0000ff;">string</span><span style="color:#000000;"> source, </span><span style="color:#0000ff;">int</span><span style="color:#000000;"> rotationCount)
{
    </span><span style="color:#0000ff;">if</span><span style="color:#000000;"> (String.IsNullOrEmpty(source) </span><span style="color:#000000;">||</span><span style="color:#000000;"> rotationCount </span><span style="color:#000000;">&lt;=</span><span style="color:#000000;"> </span><span style="color:#800080;">0</span><span style="color:#000000;">)
        </span><span style="color:#0000ff;">return</span><span style="color:#000000;"> source;

    </span><span style="color:#0000ff;">int</span><span style="color:#000000;"> pivot </span><span style="color:#000000;">=</span><span style="color:#000000;"> </span><span style="color:#800080;">0</span><span style="color:#000000;">;
    List</span><span style="color:#000000;">&lt;</span><span style="color:#0000ff;">int</span><span style="color:#000000;">&gt;</span><span style="color:#000000;"> delimiterLocations </span><span style="color:#000000;">=</span><span style="color:#000000;"> </span><span style="color:#0000ff;">new</span><span style="color:#000000;"> List</span><span style="color:#000000;">&lt;</span><span style="color:#0000ff;">int</span><span style="color:#000000;">&gt;</span><span style="color:#000000;">();
    </span><span style="color:#0000ff;">char</span><span style="color:#000000;">[] sourceChars </span><span style="color:#000000;">=</span><span style="color:#000000;"> </span><span style="color:#0000ff;">new</span><span style="color:#000000;"> </span><span style="color:#0000ff;">char</span><span style="color:#000000;">;

    </span><span style="color:#0000ff;">char</span><span style="color:#000000;"> temp;
    </span><span style="color:#008000;">//</span><span style="color:#008000;"> Reverse the whole string and
    </span><span style="color:#008000;">//</span><span style="color:#008000;"> save the dilimiter locations</span><span style="color:#008000;">
</span><span style="color:#000000;">    </span><span style="color:#0000ff;">for</span><span style="color:#000000;"> (</span><span style="color:#0000ff;">int</span><span style="color:#000000;"> i </span><span style="color:#000000;">=</span><span style="color:#000000;"> </span><span style="color:#800080;">0</span><span style="color:#000000;">; i </span><span style="color:#000000;">&lt;</span><span style="color:#000000;"> source.Length; i</span><span style="color:#000000;">++</span><span style="color:#000000;">)
    {
        sourceChars </span><span style="color:#000000;">=</span><span style="color:#000000;"> source[i];

        </span><span style="color:#0000ff;">if</span><span style="color:#000000;"> (delimiterLocations.Count </span><span style="color:#000000;">&lt;</span><span style="color:#000000;"> rotationCount </span><span style="color:#000000;">&amp;&amp;</span><span style="color:#000000;"> source[i] </span><span style="color:#000000;">==</span><span style="color:#000000;"> </span><span style="color:#800000;">'</span><span style="color:#800000;"> </span><span style="color:#800000;">'</span><span style="color:#000000;">)
            delimiterLocations.Add(source.Length </span><span style="color:#000000;">-</span><span style="color:#000000;"> i </span><span style="color:#000000;">-</span><span style="color:#000000;"> </span><span style="color:#800080;">1</span><span style="color:#000000;">);

    }

    </span><span style="color:#008000;">//</span><span style="color:#008000;"> calculate neededDelimiters mod wordCount
    </span><span style="color:#008000;">//</span><span style="color:#008000;"> (assume words = delimiterCount + 1)</span><span style="color:#008000;">
</span><span style="color:#000000;">    pivot </span><span style="color:#000000;">=</span><span style="color:#000000;"> rotationCount </span><span style="color:#000000;">%</span><span style="color:#000000;"> (delimiterLocations.Count </span><span style="color:#000000;">+</span><span style="color:#000000;"> </span><span style="color:#800080;">1</span><span style="color:#000000;">);

    </span><span style="color:#0000ff;">if</span><span style="color:#000000;"> (pivot </span><span style="color:#000000;">&gt;</span><span style="color:#000000;"> </span><span style="color:#800080;">0</span><span style="color:#000000;">)
        pivot </span><span style="color:#000000;">=</span><span style="color:#000000;"> delimiterLocations[pivot</span><span style="color:#000000;">-</span><span style="color:#800080;">1</span><span style="color:#000000;">];
    </span><span style="color:#0000ff;">else</span><span style="color:#000000;">
        </span><span style="color:#0000ff;">return</span><span style="color:#000000;"> source;

    </span><span style="color:#008000;">//</span><span style="color:#008000;"> reverse the first part</span><span style="color:#008000;">
</span><span style="color:#000000;">    </span><span style="color:#0000ff;">for</span><span style="color:#000000;"> (</span><span style="color:#0000ff;">int</span><span style="color:#000000;"> i </span><span style="color:#000000;">=</span><span style="color:#000000;"> </span><span style="color:#800080;">0</span><span style="color:#000000;">, j </span><span style="color:#000000;">=</span><span style="color:#000000;"> pivot </span><span style="color:#000000;">-</span><span style="color:#000000;"> </span><span style="color:#800080;">1</span><span style="color:#000000;">; i </span><span style="color:#000000;">&lt;=</span><span style="color:#000000;"> j; i</span><span style="color:#000000;">++</span><span style="color:#000000;">, j</span><span style="color:#000000;">--</span><span style="color:#000000;">)
    {
        temp </span><span style="color:#000000;">=</span><span style="color:#000000;"> sourceChars[i];
        sourceChars[i] </span><span style="color:#000000;">=</span><span style="color:#000000;"> sourceChars[j];
        sourceChars[j] </span><span style="color:#000000;">=</span><span style="color:#000000;"> temp;
    }

    </span><span style="color:#008000;">//</span><span style="color:#008000;"> reverse the second part</span><span style="color:#008000;">
</span><span style="color:#000000;">    </span><span style="color:#0000ff;">for</span><span style="color:#000000;"> (</span><span style="color:#0000ff;">int</span><span style="color:#000000;"> i </span><span style="color:#000000;">=</span><span style="color:#000000;"> pivot </span><span style="color:#000000;">+</span><span style="color:#000000;"> </span><span style="color:#800080;">1</span><span style="color:#000000;">, j </span><span style="color:#000000;">=</span><span style="color:#000000;"> sourceChars.Length </span><span style="color:#000000;">-</span><span style="color:#000000;"> </span><span style="color:#800080;">1</span><span style="color:#000000;">;
         i </span><span style="color:#000000;">&lt;=</span><span style="color:#000000;"> j; i</span><span style="color:#000000;">++</span><span style="color:#000000;">, j</span><span style="color:#000000;">--</span><span style="color:#000000;">)
    {
        temp </span><span style="color:#000000;">=</span><span style="color:#000000;"> sourceChars[i];
        sourceChars[i] </span><span style="color:#000000;">=</span><span style="color:#000000;"> sourceChars[j];
        sourceChars[j] </span><span style="color:#000000;">=</span><span style="color:#000000;"> temp;
    }

    </span><span style="color:#0000ff;">return</span><span style="color:#000000;"> </span><span style="color:#0000ff;">new</span><span style="color:#000000;"> </span><span style="color:#0000ff;">string</span><span style="color:#000000;">(sourceChars);
}</span></span></pre>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/serialize.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/serialize.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/serialize.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/serialize.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/serialize.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/serialize.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/serialize.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/serialize.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/serialize.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/serialize.wordpress.com/25/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=serialize.wordpress.com&blog=4194111&post=25&subd=serialize&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://serialize.wordpress.com/2008/09/25/stackoverflow-rotatestring/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/54fbdf814723425c6ce3e94aefaad4c1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Vivek</media:title>
		</media:content>
	</item>
		<item>
		<title>Asus G1S CPU, GPU and Arctic Silver 5</title>
		<link>http://serialize.wordpress.com/2008/06/21/asus-g1s-cpu-gpu-and-arctic-silver-5/</link>
		<comments>http://serialize.wordpress.com/2008/06/21/asus-g1s-cpu-gpu-and-arctic-silver-5/#comments</comments>
		<pubDate>Sat, 21 Jun 2008 04:29:00 +0000</pubDate>
		<dc:creator>Vivek Unune</dc:creator>
				<category><![CDATA[G1S]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[AS5]]></category>
		<category><![CDATA[Asus G1S-A1]]></category>
		<category><![CDATA[CPU]]></category>
		<category><![CDATA[GPU]]></category>
		<category><![CDATA[Thermal Paste]]></category>

		<guid isPermaLink="false">http://serialize.wordpress.com/2008/06/21/asus-g1s-cpu-gpu-and-arctic-silver-5/</guid>
		<description><![CDATA[My laptop usually got very hot and CPU and GPU idle temperatures were in the range of ~75C and ~80C respectively. Its about eight months I bought my laptop and I finally decided to open it up and apply thermal paste to both CPU and GPU.
Getting to the CPU was fairly simple just remove 2+4 [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=serialize.wordpress.com&blog=4194111&post=15&subd=serialize&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>My laptop usually got very hot and CPU and GPU idle temperatures were in the range of ~75C and ~80C respectively. Its about eight months I bought my laptop and I finally decided to open it up and apply thermal paste to both CPU and GPU.</p>
<p>Getting to the CPU was fairly simple just remove 2+4 screws and apply the thermal paste.</p>
<p>But, getting to the GPU was real pain. So, I decided to write a post to describe it in simple steps and gotchas that I discovered.</p>
<p><span style="color:#999999;">Disclaimer: Opening and applying thermal paste to CPU or GPU will void your laptop&#8217;s warranty! Author assumes absolutely no liability for these opinions nor for any damages that may result from reading and/or implementing following steps.</span></p>
<p>Before starting anything, unplug the power <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  and remove the battery.</p>
<p>1. Remove the keyboard. For this remove the two screws that are labeled &#8216;K&#8217; from the under side of the laptop, then using a small flat(slotted) screw driver, un-clip three plastic holders at the top edge of the keyboard . Then tilt it over and unplug two flat cables and one connector with wires grouped together.</p>
<p>2. Then remove the covers of  the ram and the hard drive compartment. Carefully remove the rams modules and hard drive and keep it a side. If you haven&#8217;t removed CPU compartment cover do it now.<br />
* In the CPU compartment, there is a screw hidden just between the heat sink exhaust and the edge of the laptop. The is covered by the aluminum foil so you have to peel it to remove it.<br />
* Also don&#8217;t forget to remove a screw just beneath the hard drive!</p>
<p>3. Remove 3-4 tiny steel screws from the battery compartment. Then remove the rest of the screws from the laptop base. Also remove six screws from the under side of the hinges. Two hinge covers will come off.</p>
<p>4. Remove screws from backside and remove the lid covering the LCD cables. Carefully remove two screws under this lid. Then unplug the two connectors.</p>
<p>5. Tilt screen to the max and remove two long screws that hold the LCD panel in the grooves. Carefully remove the LCD panel and keep it aside.</p>
<p>6. Now slowly lift the upper cover. It should come off w/o problem. You&#8217;ll get a first look at the motherboard. But you still don&#8217;t see the GPU!!!</p>
<p>7. You have to remove couple more screws and unplug speaker cables and the DVD drive. And volia! you can lift the motherboard and turn it over. And there you&#8217;ll see the other heat sink.</p>
<p>8. Go ahead and remove the screws from the GPU heat sink, unplug the fan power connector and carefully detach the heatsink. You&#8217;ll see that the underside of the GPU heat sink  has a thin aluminum foil that according to me prevents thermal paste short circuiting the connectors on the GPU. There is another reason for doing it this way. During laptop assembly the person gets hardly few minutes to apply the paste and set the heatsink, it is easy to just use the foil to cover the die and apply paste and slap the sink on to it &#8211; quick and dirty huh? But as I told earlier it does prevents thermal paste spreading over the GPU circuitry around the die!</p>
<p>9. Remove the foil and the thermal paste. Observe how excessive paste was used! I used a plastic card to get rid of it and finally cleaned it up with some 90% isopropyl alcohol (picked it from local Wallgreens for $2) and cotton swabs.  The copper heat sink was now smooth and clean like a mirror. The die should be clean as new &#8211; but just to make sure clean it as well using a new cotton swab and alcohol.</p>
<p><a href="http://bp0.blogger.com/_0ObWSMNjJpY/SFybRyX7x1I/AAAAAAAAAsk/T_NqsLsT77Y/s1600-h/HPIM2055.JPG"><img style="display:block;text-align:center;cursor:pointer;margin:0 auto 10px;" src="http://bp0.blogger.com/_0ObWSMNjJpY/SFybRyX7x1I/AAAAAAAAAsk/T_NqsLsT77Y/s400/HPIM2055.JPG" border="0" alt="" /></a></p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/serialize.wordpress.com/15/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/serialize.wordpress.com/15/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/serialize.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/serialize.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/serialize.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/serialize.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/serialize.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/serialize.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/serialize.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/serialize.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/serialize.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/serialize.wordpress.com/15/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=serialize.wordpress.com&blog=4194111&post=15&subd=serialize&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://serialize.wordpress.com/2008/06/21/asus-g1s-cpu-gpu-and-arctic-silver-5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/54fbdf814723425c6ce3e94aefaad4c1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Vivek</media:title>
		</media:content>

		<media:content url="http://bp0.blogger.com/_0ObWSMNjJpY/SFybRyX7x1I/AAAAAAAAAsk/T_NqsLsT77Y/s400/HPIM2055.JPG" medium="image" />
	</item>
		<item>
		<title>MSI Bootstraper</title>
		<link>http://serialize.wordpress.com/2008/06/01/msi-bootstraper/</link>
		<comments>http://serialize.wordpress.com/2008/06/01/msi-bootstraper/#comments</comments>
		<pubDate>Sun, 01 Jun 2008 02:54:00 +0000</pubDate>
		<dc:creator>Vivek Unune</dc:creator>
				<category><![CDATA[Windows Installer]]></category>
		<category><![CDATA[bootstrapper]]></category>
		<category><![CDATA[MSI]]></category>
		<category><![CDATA[msistuff]]></category>
		<category><![CDATA[WIX]]></category>

		<guid isPermaLink="false">http://serialize.wordpress.com/2008/06/01/msi-bootstraper/</guid>
		<description><![CDATA[Msistuff.exe and Setup.exe are two important binaries are needed to create MSI bootstraper. Unfortunately you need to download the whole Windows SDK to access these binaries.
Fortunately there are pre-built msistuff.exe and setup.exe binaries available from WIX examples page:
http://sourceforge.net/tracker/?group_id=105970&#38;atid=654188
Download the Bootstraper example from this page.
       <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=serialize.wordpress.com&blog=4194111&post=13&subd=serialize&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Msistuff.exe and Setup.exe are two important binaries are needed to create MSI bootstraper. Unfortunately you need to download the whole Windows SDK to access these binaries.</p>
<p>Fortunately there are pre-built msistuff.exe and setup.exe binaries available from WIX examples page:</p>
<p><a href="http://sourceforge.net/tracker/?group_id=105970&amp;atid=654188">http://sourceforge.net/tracker/?group_id=105970&amp;atid=654188</a></p>
<p>Download the Bootstraper example from this page.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/serialize.wordpress.com/13/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/serialize.wordpress.com/13/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/serialize.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/serialize.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/serialize.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/serialize.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/serialize.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/serialize.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/serialize.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/serialize.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/serialize.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/serialize.wordpress.com/13/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=serialize.wordpress.com&blog=4194111&post=13&subd=serialize&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://serialize.wordpress.com/2008/06/01/msi-bootstraper/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/54fbdf814723425c6ce3e94aefaad4c1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Vivek</media:title>
		</media:content>
	</item>
		<item>
		<title>Right Click to Open Elevated Command prompt in Vista</title>
		<link>http://serialize.wordpress.com/2008/05/25/right-click-to-open-elevated-command-prompt-in-vista/</link>
		<comments>http://serialize.wordpress.com/2008/05/25/right-click-to-open-elevated-command-prompt-in-vista/#comments</comments>
		<pubDate>Sun, 25 May 2008 01:39:00 +0000</pubDate>
		<dc:creator>Vivek Unune</dc:creator>
				<category><![CDATA[Windows Tip]]></category>
		<category><![CDATA[Administrator]]></category>
		<category><![CDATA[cmd.exe]]></category>
		<category><![CDATA[Command]]></category>
		<category><![CDATA[runas]]></category>

		<guid isPermaLink="false">http://serialize.wordpress.com/2008/05/25/right-click-to-open-elevated-command-prompt-in-vista/</guid>
		<description><![CDATA[To open command prompt with administrator privileges by right clicking on a directory in windows explorer: copy the following text and save it in a file with extension .reg. Then right click it and select merge.
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Directory\shell\runas]
@=&#8221;Open Admin Command prompt Here&#8221;
[HKEY_CLASSES_ROOT\Directory\shell\runas\command]
@=&#8221;cmd.exe /s /k pushd \&#8221;%V\&#8221;"
Similarly if you need to open Visiual Studio [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=serialize.wordpress.com&blog=4194111&post=12&subd=serialize&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>To open command prompt with administrator privileges by right clicking on a directory in windows explorer: copy the following text and save it in a file with extension .reg. Then right click it and select merge.</p>
<p><span style="font-family:courier new;">Windows Registry Editor Version 5.00</span></p>
<p><span style="font-family:courier new;">[HKEY_CLASSES_ROOT\Directory\shell\runas]</span><br />
<span style="font-family:courier new;">@=&#8221;Open Admin Command prompt Here&#8221;</span></p>
<p><span style="font-family:courier new;">[HKEY_CLASSES_ROOT\Directory\shell\runas\command]</span><br />
<span style="font-family:courier new;">@=&#8221;cmd.exe /s /k pushd \&#8221;%V\&#8221;"</span></p>
<p><span style="font-family:georgia;">Similarly if you need to open Visiual Studio 2008 command prompt with elevated permissions in Vista use this to create the registry file:</span></p>
<p><span style="font-family:courier new;">Windows Registry Editor Version 5.00</span></p>
<p><span style="font-family:courier new;">[HKEY_CLASSES_ROOT\Directory\shell\runas]</span></p>
<p><span style="font-family:courier new;">@=&#8221;Elevated VS 2008 Command Prompt&#8221;</span></p>
<p><span style="font-family:courier new;">[HKEY_CLASSES_ROOT\Directory\shell\runas\command]</span></p>
<p><span style="font-family:courier new;">@=&#8221;cmd.exe /s /k pushd \&#8221;%V\&#8221; &amp;&amp; \&#8221;C:\Program Files\Microsoft Visual Studio 9.0\Common7\Tools\vsvars32.bat\&#8221;"</span></p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/serialize.wordpress.com/12/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/serialize.wordpress.com/12/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/serialize.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/serialize.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/serialize.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/serialize.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/serialize.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/serialize.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/serialize.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/serialize.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/serialize.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/serialize.wordpress.com/12/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=serialize.wordpress.com&blog=4194111&post=12&subd=serialize&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://serialize.wordpress.com/2008/05/25/right-click-to-open-elevated-command-prompt-in-vista/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/54fbdf814723425c6ce3e94aefaad4c1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Vivek</media:title>
		</media:content>
	</item>
		<item>
		<title>Ripped opened FreeAgent Pro 750 GB, finally!</title>
		<link>http://serialize.wordpress.com/2008/05/04/ripped-opened-freeagent-pro-750-gb-finally/</link>
		<comments>http://serialize.wordpress.com/2008/05/04/ripped-opened-freeagent-pro-750-gb-finally/#comments</comments>
		<pubDate>Sun, 04 May 2008 05:51:00 +0000</pubDate>
		<dc:creator>Vivek Unune</dc:creator>
				<category><![CDATA[Hardware]]></category>
		<category><![CDATA[750GB]]></category>
		<category><![CDATA[eSATA]]></category>
		<category><![CDATA[FreeAgent]]></category>
		<category><![CDATA[Seagate]]></category>

		<guid isPermaLink="false">http://serialize.wordpress.com/2008/05/04/ripped-opened-freeagent-pro-750-gb-finally/</guid>
		<description><![CDATA[I don&#8217;t generally give reviews for any products as there are plenty out there. But I have had some complaints with FreeAgent Pro 750Gb external drive since I bought it.
Mainly related to
1. Over heating of the base (the detachable module)
2. System lockups
3. Choppy performance, performance drop after running the drive for few hours.
The performance is [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=serialize.wordpress.com&blog=4194111&post=11&subd=serialize&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><div>I don&#8217;t generally give reviews for any products as there are plenty out there. But I have had some complaints with FreeAgent Pro 750Gb external drive since I bought it.<br />
Mainly related to<br />
1. Over heating of the base (the detachable module)<br />
2. System lockups<br />
3. Choppy performance, performance drop after running the drive for few hours.</p>
<p>The performance is good when you turn on the drive then it gradually degrades <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' />  I&#8217;ve tried moving/copying several GBs of stuff on to the drive and it does work great (when it does).</p>
<p>I bought this drive mainly because of it has the eSATA port and can deliver up to 300MB/sec bandwith (I doubt usb or firewire for that matter anything can beat this. <a href="http://cameronfuller.spaces.live.com/blog/cns%21A231E4EB0417CB76%211248.entry">Stats for the same</a>).<br />
You need eSATA port on your PC/Laptop as well to use this. My Asus G1S-A1 has one.</p>
<p>I tried installing various drivers but in vane, the drive still show signs of problems.</p>
<p>Finally I gave up and decided to shell out few more bucks on an external eSATA enclosure. I bought MagDog 3.5&#8243; eSATA enclosure for $28. You have to be careful while removing the drive from the Seagate FreeAgent enclosure. You can find instructions on the web. There&#8217;s a youtube <a href="http://www.youtube.com/watch?v=NIs3Pz15OFU">video </a>that shows how to open this baby. Once I transfered the drive (which is Segate barracuda 7200.11) the performance has been consistent and haven&#8217;t had heating issues.</p>
<p>I was able to run some tests on it using the HD Tach utility and the drive gives me about 244MB/sec! (Note: For some reason HD Tach utility kept running after I had closed it &#8211; finally had to  kill and eventually uninstall it).</p></div>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/serialize.wordpress.com/11/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/serialize.wordpress.com/11/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/serialize.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/serialize.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/serialize.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/serialize.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/serialize.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/serialize.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/serialize.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/serialize.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/serialize.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/serialize.wordpress.com/11/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=serialize.wordpress.com&blog=4194111&post=11&subd=serialize&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://serialize.wordpress.com/2008/05/04/ripped-opened-freeagent-pro-750-gb-finally/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/54fbdf814723425c6ce3e94aefaad4c1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Vivek</media:title>
		</media:content>
	</item>
		<item>
		<title>Asus G1S-A1 1.3M Pixel webcam adventure</title>
		<link>http://serialize.wordpress.com/2008/02/24/asus-g1s-a1-13m-pixel-webcam-adventure/</link>
		<comments>http://serialize.wordpress.com/2008/02/24/asus-g1s-a1-13m-pixel-webcam-adventure/#comments</comments>
		<pubDate>Sun, 24 Feb 2008 23:08:00 +0000</pubDate>
		<dc:creator>Vivek Unune</dc:creator>
				<category><![CDATA[Hardware]]></category>
		<category><![CDATA[gentoo]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[174F]]></category>
		<category><![CDATA[5A35]]></category>
		<category><![CDATA[Asus G1S-A1]]></category>
		<category><![CDATA[D-MAX]]></category>
		<category><![CDATA[GD-5A35A]]></category>
		<category><![CDATA[Sonix]]></category>
		<category><![CDATA[uvc-linux]]></category>

		<guid isPermaLink="false">http://serialize.wordpress.com/2008/02/24/asus-g1s-a1-13m-pixel-webcam-adventure/</guid>
		<description><![CDATA[I use gentoo linux on my laptop (G1S-A1). Everything is working including wireless, bluetooth, media keys etc.
The only thing that annoys me is when I use skype beta (with video) or any other webcam utility. The webcam image is 180° inverted!! I know it sounds funny..but its annoying after a while&#8230; Anyway, as usual I [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=serialize.wordpress.com&blog=4194111&post=10&subd=serialize&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I use gentoo linux on my laptop (G1S-A1). Everything is working including wireless, bluetooth, media keys etc.<br />
The only thing that annoys me is when I use skype beta (with video) or any other webcam utility. The webcam image is 180° inverted!! I know it sounds funny..but its annoying after a while&#8230; Anyway, as usual I set out on the quest <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' />  to find out the cause and possible remedy. A quick lsusb gives tells me that the device id and vendor id information.</p>
<p><span style="font-family:courier new;">localhost ~# lsusb</span><br />
<span style="font-family:courier new;">Bus 002 Device 001: ID 0000:0000</span><br />
<span style="font-family:courier new;">Bus 007 Device 002: ID 0b05:1712 ASUSTek Computer, Inc.</span><br />
<span style="font-family:courier new;">Bus 007 Device 001: ID 0000:0000</span><br />
<span style="font-family:courier new;">Bus 006 Device 001: ID 0000:0000</span><br />
<span style="font-family:courier new;">Bus 005 Device 002: ID 046d:c521 Logitech, Inc.</span><br />
<span style="font-family:courier new;">Bus 005 Device 001: ID 0000:0000</span><br />
<span style="font-family:courier new;">Bus 001 Device 003: ID 0b05:1726 ASUSTek Computer, Inc.</span><br />
<span style="font-weight:bold;background-color:yellow;font-family:courier new;">Bus 001 Device 002: ID 174f:5a35</span><br />
<span style="font-family:courier new;">Bus 001 Device 001: ID 0000:0000</span><br />
<span style="font-family:courier new;">Bus 004 Device 001: ID 0000:0000</span><br />
<span style="font-family:courier new;">Bus 003 Device 001: ID 0000:0000</span></p>
<p>To get more information about the webcam from vendor/device id</p>
<p><span style="font-family:courier new;">localhost ~ # lsusb -v -d 174f:5a35</span><br />
<span style="font-family:courier new;">&#8230;</span><br />
<span style="font-family:courier new;">iManufacturer 2 Sonix Technology Co., Ltd.</span><br />
<span style="font-family:courier new;">iProduct 1 USB 2.0 Camera</span><br />
<span style="font-family:courier new;">&#8230;</span></p>
<p>I tried to google the combination of device id and sonix to find any information about the camera. But it turned out that there is no such device manufactured/assembled by Sonix. I was curious and I thought lets see what the windows driver for this webcam has to say. I rebooted into Vista and bingo! the device information clearly mentions D-Max/Sonix 1.3M pixel camera. All the description regarding their camera modules can be found their <a href="http://www.d-max.com.tw/module.html">website.</a> Two weeks ago I was able to find the module along with device id mentioned. Unfortunately today I&#8217;m unable to locate the 5A35 module on that page because all the camera modules have generic names now(e.g 1.3M_UVC 5). I couldn&#8217;t find any cached page on google either. Looks like they D-Max doesn&#8217;t want to disclose that information.</p>
<p>On further digging through windows driver files, snp2uvc.inf (version 04/18/2007, 6.21.70.001) reveals some cool information.</p>
<p><span style="font-family:courier new;">[SN.NTx86.5.1]<br />
;1.3M<br />
<span style="font-weight:bold;background-color:yellow;">%SN.USBVideo.DeviceDesc% = SN.USBVideo.XP,USB\VID_174f&amp;PID_5a35 ;GD-5A35A(Ov9655)</span><br />
%SN.USBVideo.DeviceDesc% = SN.USBVideo.XP,USB\VID_174f&amp;PID_5a31 ;GD-5A31A(MI1320)<br />
;2M<br />
%SN.USBVideo2M.DeviceDesc% = SN.USBVideo2M.XP,USB\VID_174f&amp;PID_5a51 ;GD-5A51A<br />
;VGA<br />
%SN.USBVideoVGA.DeviceDesc% = SN.USBVideoVGA.XP,USB\VID_174f&amp;PID_5a11 ;GD-5A11A(Ov7670)<br />
</span><br />
Hmm&#8230;After searching for GD-5A35A I found <a href="http://72.14.205.104/search?q=cache:wgyDw78scPkJ:dmaxtech.manufacturer.globalsources.com/si/6008805514869/Showroom/3000000163943/ALL.htm%3Fdiffsupp%3DprodL4+GD-5A35A&amp;hl=en&amp;ct=clnk&amp;cd=3&amp;gl=us">this cached link</a> that links 5A35 to the generic model number that is 1.3M_UVC 1. So, here are the specifications:</p>
<p>1.3M_UVC 1 USB 2.0 1.3MP Camera Module Support UVC</p>
<p>SPECIFICATION:</p>
<p>• SXGA Resolution Image Sensor<br />
•Video Resolution:<br />
1280 x 1024, 1280 x 800<br />
1204 x 768, 800 x 600<br />
640 x 480, 352 x 288<br />
320 x 240.<br />
•Frame Rate:<br />
640 x 480 at 30fps maximum<br />
1280 x 1024 at 8fps maximum<br />
•Video Format: YUY2<br />
•LED Indicator<br />
•DOF on 30~80cm<br />
•Support UVC<br />
•Auto Exposure<br />
•Auto White Balance Control<br />
•High Speed USB 2.0 Interface<br />
•Low Power Consumption<br />
•RoHS Compliant<br />
•Dimension(LxWxH) 60 x 8.5 x 7.05mm</p>
<p>On careful inspection of snp2uvc.inf you can see that my webcam uses OV9655 sensor &#8211; cool! And the datasheet for that can be found here: <a href="http://rapidshare.com/files/94672360/OV9655-datasheet.pdf.html" target="_blank">http://rapidshare.com/files/94672360/OV9655-datasheet.pdf.html</a></p>
<p>Interestingly the newer version of the webcam driver doesn&#8217;t specify the sensor (OV9655) or the model number (GD-5A35A) information.</p>
<p>Most of the datasheet information went over my head except some interesting bits.<br />
If you skip to &#8220;Register Set&#8221; and checkout register 1E :</p>
<pre>1E MVFP 00 RW  Mirror / Vertical Flip Enable                

Bit[7:6] Reserved
Bit[5]   Mirror
    0: Normal Image
    1: Mirror Image
Bit[4]   Vertical Flip
    0: Vertical Flip Disable
    1: Vertical Flip Enable
Bit[3:0] Reserved</pre>
<p>Default value for bit[4] is <span style="font-weight:bold;font-family:courier new;">0</span>, i.e VFlip is disabled. We get upside down image which means that the webcam module is installed upside down on G1S-A1, so the linux uvc driver must find a way to set the bit[4] of this register.</p>
<p>I&#8217;m reading through <a href="http://developer.berlios.de/svn/?group_id=5681">uvc-linux</a> source to understand the driver and make appropriate changes. But it can take sometime&#8230; Sole purpose of this blog entry is to inform you guys about my findings, so someone with the right knowledge can add the vflip support for this webcam.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/serialize.wordpress.com/10/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/serialize.wordpress.com/10/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/serialize.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/serialize.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/serialize.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/serialize.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/serialize.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/serialize.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/serialize.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/serialize.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/serialize.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/serialize.wordpress.com/10/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=serialize.wordpress.com&blog=4194111&post=10&subd=serialize&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://serialize.wordpress.com/2008/02/24/asus-g1s-a1-13m-pixel-webcam-adventure/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/54fbdf814723425c6ce3e94aefaad4c1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Vivek</media:title>
		</media:content>
	</item>
	</channel>
</rss>