<?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>Sai Panyam.NET &#187; Technology</title>
	<atom:link href="http://www.saipanyam.net/topics/technology/feed" rel="self" type="application/rss+xml" />
	<link>http://www.saipanyam.net</link>
	<description>On all things .NET &#38; Software Engineering</description>
	<lastBuildDate>Sat, 10 Apr 2010 02:52:10 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Algorithms in Computational Geometry – Part 2</title>
		<link>http://www.saipanyam.net/2010/04/computational-geometry-part-2.html</link>
		<comments>http://www.saipanyam.net/2010/04/computational-geometry-part-2.html#comments</comments>
		<pubDate>Fri, 09 Apr 2010 05:01:58 +0000</pubDate>
		<dc:creator>Sai Panyam</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[.Net]]></category>
		<category><![CDATA[.NET 3.5]]></category>
		<category><![CDATA[Algorithms]]></category>
		<category><![CDATA[Computational Geometry]]></category>
		<category><![CDATA[Expression Design]]></category>

		<guid isPermaLink="false">http://www.saipanyam.net/?p=277</guid>
		<description><![CDATA[In Part 1 we discussed the base technique for determining relative orientation. We used that to answer the first two questions: To find relative orientation of two points and two directed segments with a common end point. In Part 2 we answer the next two questions: Given two line segments p0p1 and p1p2, if we [...]]]></description>
			<content:encoded><![CDATA[<p>In <a href="/2010/04/computational-geometry-part-1.html">Part 1</a> we discussed the base technique for determining relative orientation. We used that to answer the first two questions: To find relative orientation of two points and two directed segments with a common end point. In Part 2 we answer the next two questions:</p>
<ul>
<li>Given two line segments p<sub>0</sub>p<sub>1</sub> and p<sub>1</sub>p<sub>2</sub>, if we traverse from p<sub>0</sub> to p<sub>2</sub>, did we make a left, right or no turn at p<sub>1</sub>?</li>
<li>Do line segments p<sub>1</sub>p<sub>2</sub> and p<sub>3</sub>p<sub>4</sub> intersect?</li>
</ul>
<p>We build on what we learned in <a href="/2010/04/computational-geometry-part-1.html">Part 1</a>, the <strong>cross product</strong>. </p>
<p>Download the demo application <a href="/code-center/computational-geometry">here</a></p>
<p><strong>Determining whether consecutive segments turn left or right</strong></p>
<p>Given two line segments p<sub>0</sub>p<sub>1</sub> and p<sub>1</sub>p<sub>2</sub> we simply check whether the directed segment p<sub>0</sub>p<sub>2</sub> is clockwise or counterclockwise relative to directed segment p<sub>0</sub>p<sub>1</sub>. This is similar to the solution to question 2 in <a href="/2010/04/computational-geometry-part-1.html">Part 1</a>. If the cross product is negative, then p<sub>0</sub>p<sub>2</sub> is counterclockwise to p<sub>0</sub>p<sub>1</sub>. Hence we should turn <strong>left</strong> when we reach p<sub>1</sub> to reach p<sub>2</sub> while traversing p<sub>0</sub>, p<sub>1</sub> and p<sub>2</sub>. If the cross product is <strong>0</strong> (boundary condition) then it means all the three points are <strong>collinear</strong> (on the same line). The image below shows the three possible scenarios<br />
<div id="attachment_287" class="wp-caption alignnone" style="width: 610px"><img src="http://www.saipanyam.net/wp-content/uploads/2010/04/Consecutive-Segments1-e1270768161354.png" alt="Consecutive Segments Cross Product" title="Consecutive Segments" width="600" height="375" class="size-full wp-image-287" /><p class="wp-caption-text">Using the cross product to determine how p0p1 and p1p2 turn at p1</p></div></p>
<p><strong>Determining whether two line segments intersect</strong></p>
<p>Two line segments intersect if and only if either or both of the following conditions are true:</p>
<ul>
<li>Each line segment straddles the other line segment.</li>
<li>An end point of one line segment is on the other line segment</li>
</ul>
<p>A line segment p<sub>1</sub>p<sub>2</sub> <strong>straddles</strong> another line if p<sub>1</sub> and p<sub>2</sub> are on opposite sides of the line. A boundary condition occurs when one of the end points is <strong>on</strong> the other line.</p>
<p><strong>Algorithm</strong></p>
<p>Calculate the orientation (using cross product!) d<sub>i</sub> for each point of one segment w.r.t the end points of the other segment. For line segments p<sub>1</sub>p<sub>2</sub> and p<sub>3</sub>p<sub>4</sub> we will get d<sub>1</sub>, d<sub>2</sub>, d<sub>3</sub> and d<sub>4</sub>.</p>
<p>if none of the d<sub>i</sub> are collinear (i.e. d<sub>i</sub> !=0) we check if d<sub>1</sub> and d<sub>2</sub> <strong>and</strong> d<sub>3</sub> and d<sub>4</sub> have opposite orientations (if one is clockwise,other should be counterclockwise). If this condition is true then we know that the line segments <strong>straddle</strong> each other and hence <strong>intersect</strong>. If it is false we can straight away say they <strong>don&#8217;t intersect</strong>.</p>
<p>If any d<sub>i</sub> is collinear (boundary condition) and the corresponding p<sub>i</sub> is <strong>on</strong> the other line segment, the lines <strong>intersect</strong>.<br />
<div id="attachment_306" class="wp-caption alignnone" style="width: 610px"><img src="http://www.saipanyam.net/wp-content/uploads/2010/04/Intersects-e1270789093105.png" alt="Intersect cases" title="Intersects" width="600" height="375" class="size-full wp-image-306" /><p class="wp-caption-text">Shows the different cases that we encounter visually</p></div></p>
<pre>
bool Intersects(p<sub>1</sub>, p<sub>2</sub>, p<sub>3</sub>, p<sub>4</sub>)
{
    d<sub>1</sub> = CrossProduct (p<sub>1</sub>p<sub>3</sub>, p<sub>1</sub>p<sub>2</sub>)
    d<sub>2</sub> = CrossProduct (p<sub>1</sub>p<sub>4</sub>, p<sub>1</sub>p<sub>2</sub>)
    d<sub>3</sub> = CrossProduct (p<sub>3</sub>p<sub>1</sub>, p<sub>3</sub>p<sub>4</sub>)
    d<sub>4</sub> = CrossProduct (p<sub>3</sub>p<sub>2</sub>, p<sub>3</sub>p<sub>4</sub>)

    if( ((d<sub>1</sub> > 0 and d<sub>2</sub><0) or (d<sub>2</sub> > 0 and d<sub>1</sub><0)) <strong>and </strong> ((d<sub>3</sub> > 0 and d<sub>4</sub><0) or (d<sub>4</sub> > 0 and d<sub>3</sub><0)))
    {
      then return <strong>true</strong>
    }
    else if (d<sub>1</sub> = 0 <strong>and</strong> PointOnLine (p<sub>3</sub>, p<sub>4</sub>, p<sub>1</sub>))
    {
       then return <strong>true</strong>
    }
    else if (d<sub>2</sub> = 0 <strong>and</strong> PointOnLine (p<sub>3</sub>, p<sub>4</sub>, p<sub>2</sub>))
    {
       then return <strong>true</strong>
    }
    else if (d<sub>3</sub> = 0 <strong>and</strong> PointOnLine (p<sub>1</sub>, p<sub>2</sub>, p<sub>3</sub>))
    {
       then return <strong>true</strong>
    }
    else if (d<sub>4</sub> = 0 <strong>and</strong> PointOnLine (p<sub>1</sub>, p<sub>2</sub>, p<sub>4</sub>))
    {
       then return <strong>true</strong>
    }
    else
    {
       return <strong>false</strong>
    }
}

bool PointOnLine (p<sub>i</sub>, p<sub>j</sub>, p<sub>k</sub>)
{
    if ( Min (x<sub>i</sub>, x<sub>j</sub>)<= x<sub>k</sub> <= Max (x<sub>i</sub>, x<sub>j</sub>) <strong>and</strong> Min (y<sub>i</sub>, y<sub>j</sub>)<= y<sub>k</sub> <= Max (y<sub>i</sub>, y<sub>j</sub>) )
    {
        return <strong>true</strong>
    }
    else
    {
        return <strong>false</strong>
    }
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.saipanyam.net/2010/04/computational-geometry-part-2.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Algorithms in Computational Geometry &#8211; Part 1</title>
		<link>http://www.saipanyam.net/2010/04/computational-geometry-part-1.html</link>
		<comments>http://www.saipanyam.net/2010/04/computational-geometry-part-1.html#comments</comments>
		<pubDate>Thu, 08 Apr 2010 18:52:32 +0000</pubDate>
		<dc:creator>Sai Panyam</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[.Net]]></category>
		<category><![CDATA[.NET 3.5]]></category>
		<category><![CDATA[Algorithms]]></category>
		<category><![CDATA[Computational Geometry]]></category>
		<category><![CDATA[Expression Design]]></category>

		<guid isPermaLink="false">http://www.saipanyam.net/?p=219</guid>
		<description><![CDATA[Computational Geometry (CG) deals with algorithms for solving geometric problems. It is used in computer graphics, robotics, computer aided design,statistics among others. A typical CG problem takes as input a set of geometric objects like a set of points, a set of line segments etc. The output is most commonly finding certain attributes of the [...]]]></description>
			<content:encoded><![CDATA[<p>Computational Geometry (CG) deals with algorithms for solving geometric problems. It is used in computer graphics, robotics, computer aided design,statistics among others. A typical CG problem takes as input a set of geometric objects like a set of points, a set of line segments etc. The output is most commonly finding certain attributes of the geometric objects. For e.g. we are interested in answering the following questions in two dimensions (in a plane):</p>
<ol>
<li>Given two points p<sub>1</sub> &#038; p<sub>2</sub> in a co-ordinate plane, is the directed segment p<sub>0</sub>p<sub>1</sub> clockwise, counterclockwise or collinear to directed segment p<sub>0</sub>p<sub>2</sub>? Where p<sub>0</sub> is the <em>origin</em> of the co-ordinate plane</li>
<li>Given two directed segments p<sub>0</sub>p<sub>1</sub> and p<sub>0</sub>p<sub>2</sub>, is p<sub>0</sub>p<sub>1</sub> clockwise, counterclockwise or collinear to p<sub>0</sub>p<sub>2</sub> with respect to the common end point p<sub>0</sub>?</li>
<li>Given two line segments p<sub>0</sub>p<sub>1</sub> and p<sub>1</sub>p<sub>2</sub>, if we traverse from p<sub>0</sub> to p<sub>2</sub>, did we make a left, right or no turn at p<sub>1</sub>?</li>
<li>Do line segments p<sub>1</sub>p<sub>2</sub> and p<sub>3</sub>p<sub>4</sub> intersect?</li>
</ol>
<p>Download the demo application <a href="/code-center/computational-geometry">here</a></p>
<p>Before we proceed any further a few definitions. <strong>Clockwise </strong>and <strong>Counterclockwise </strong>are intuitively easy to understand. They have the usual colloquial meaning. There is one thing to note though. A co-ordinate plane is not a <em>watch face</em>! Here we are determining the <em>relative orientations</em> of one segment w.r.t the other. Instead of trying to explain it in words, I will show you a picture (should replace a thousand words!).</p>
<div style="float:left">
<div id="attachment_225" class="wp-caption alignnone" style="width: 310px"><img src="http://www.saipanyam.net/wp-content/uploads/2010/04/Orientation-300x225.png" alt="Orientation" title="Orientation" width="300" height="225" class="size-medium wp-image-225" /><p class="wp-caption-text">The darkly shaded orientation region contains vectors counterclockwise relative to p. The lightly shaded region contains vectors clockwise to p </p></div></div>
<p> Two vectors are <strong>collinear</strong> if they are pointing in the same or opposite direction. In the picture all vectors that lie along the diagonal will be collinear to p. </p>
<p>With definitions out of the way, let us proceed to answer the initial queries that we posed. A brute force method of computing whether two line segments intersect, would be to find the line equations of the form y=mx + c where m is the slope and c the y-intercept and then compute the point of intersection, and verify whether this point lies on both lines. This involves a lot of expensive computational resources. Further this involves division which is sensitive to round-off errors depending upon the precision of the division operation. For e.g. almost parallel line segments will give incorrect results.</p>
<p>The algorithms given here will only use additions, multiplications, subtractions and comparisons ! No trigonometry also !<br />
We do this by computing the <strong>cross product</strong>. This is a fundamental technique that is at the base of most CG algorithms. Let me say that again. <strong>Cross Product</strong> is a most fundamental and important technique for solving CG problems. A <strong>cross product</strong> p<sub>1</sub> X p<sub>2</sub> is defined as the determinant of the matrix comprising of x and y values of the points.</p>
<div style="float:left"><div id="attachment_255" class="wp-caption alignnone" style="width: 210px"><img src="http://www.saipanyam.net/wp-content/uploads/2010/04/Determinant1-300x225.png" alt="Determinant" title="Determinant of Matrix" width="300" height="225" class="size-medium wp-image-255" /><p class="wp-caption-text">Determinant of the above matrix will be equal to (x1y2-x2y1)</p></div></div>
<p>If the <strong>cross product </strong>is positive then p<sub>1</sub> is clockwise to p<sub>2</sub>. A boundary condition occurs if the cross product is <strong>0</strong>. In that case p<sub>1</sub> and p<sub>2</sub> are <strong>collinear</strong>.</p>
<p><strong>Proof</strong>: We use trigonometric function <strong>tan</strong> on the angle formed by the point (x,y), origin (0,0) and (x,0) for both the points. If the ratio of one tangent to other determines orientation depending upon whether the value is greater than 1 or not.</p>
<pre>
//Clockwise:
x1y2-x2y1>0

//So
x1y2>x2y1

//alternatively
(x1y2)/(x2y1)>1

//rearranging the terms
(y2/x2)/(y1/x1)>1

//Notice that tan &theta; is the ratio of opposite side by adjacent side
//in a right angled triangle
//so the numerator of the above fraction is tan &theta;<sub>2</sub> and
//denominator tan &theta;<sub>1</sub>

(tan &theta;<sub>2</sub>)/(tan &theta;<sub>1</sub>)>1

<strong>If the angle &theta;<sub>2</sub> is greater than &theta;<sub>1</sub>
then we have proved that p<sub>1</sub> is clockwise to p<sub>2</sub></strong>
</pre>
<p>The above technique of using cross product makes for an easy and efficient way to answer <strong>Question 1</strong>.<br />
To answer <strong>Question 2</strong> just involves an extra pre-processing step before doing the cross product. To determine whether two directed segments p<sub>0</sub>p<sub>1</sub> and p<sub>0</sub>p<sub>2</sub>, is p<sub>0</sub>p<sub>1</sub> clockwise, counterclockwise or collinear to p<sub>0</sub>p<sub>2</sub> with respect to the common end point p<sub>0</sub> we just translate the axis to use p<sub>0</sub> as the origin and use the cross product as above. </p>
<pre>
// To translate the origin to the common end point p<sub>0</sub>
//We let p<sub>1</sub>' (p prime) be the point where 

x<sub>1</sub>' =x<sub>1</sub> - x<sub>0</sub> and
y<sub>1</sub>' =y<sub>1</sub> - y<sub>0</sub>

//We do the above for  p<sub>2</sub> and calculate its prime: p<sub>2</sub>' 

x<sub>2</sub>' =x<sub>2</sub> - x<sub>0</sub> and
y<sub>2</sub>' =y<sub>2</sub> - y<sub>0</sub>

//Then we calculate the cross product of p<sub>1</sub>' x p<sub>2</sub>' 

<strong>If it is positive then the directed segment p<sub>0</sub>p<sub>1</sub> is clockwise to
directed segment p<sub>0</sub>p<sub>2</sub></strong>
</pre>
<p>In <a href="/2010/04/computational-geometry-part-2.html">Part 2</a> we will answer <strong>questions 3 &#038; 4</strong> using the techniques and principles learned here. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.saipanyam.net/2010/04/computational-geometry-part-1.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A simple way to encrypt query strings</title>
		<link>http://www.saipanyam.net/2010/03/encrypt-query-strings.html</link>
		<comments>http://www.saipanyam.net/2010/03/encrypt-query-strings.html#comments</comments>
		<pubDate>Fri, 26 Mar 2010 23:12:06 +0000</pubDate>
		<dc:creator>Sai Panyam</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[.NET 3.5]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[cryptography]]></category>
		<category><![CDATA[encryption]]></category>

		<guid isPermaLink="false">http://www.saipanyam.net/?p=190</guid>
		<description><![CDATA[Query strings are used to carry information. We might need to obfuscate them and provide some basic security without writing some elaborate encryption mechanism. Some standard ways of obfuscating, you will find is to Base64Encode the query string(remember to Url encode the resulting string as it is going to be on a url!): string data="query [...]]]></description>
			<content:encoded><![CDATA[<p>Query strings are used to carry information. We might need to obfuscate them and provide some basic security without writing some elaborate encryption mechanism. Some standard ways of obfuscating, you will find is to Base64Encode the query string(remember to Url encode the resulting string as it is going to be on a url!):</p>
<pre>
     string data="query string";
     string encodedData = String.Empty;
       try
       {
           byte[] data_byte = Encoding.UTF8.GetBytes(data);
           encodedData = HttpUtility.UrlEncode(Convert.ToBase64String(data_byte));
        }
        catch (Exception exception)
        {
           //Log exception
        }
        return encodedData;
</pre>
<p>While this works, it provides only <em>obfuscation</em>, but no <em>security</em>. Anyone can do the reverse:</p>
<pre>
        string data="encoded data";
        string decodedData = String.Empty;
        try
        {
             byte[] data_byte = Convert.FromBase64String(HttpUtiltity.UrlDecode(data));
             decodedData = Encoding.UTF8.GetString(data_byte);
        }
        catch (Exception exception)
        {
             //Log exception
         }
         return decodedData;
</pre>
<p>A little more advanced method is to use  <a href="http://msdn.microsoft.com/en-us/library/system.security.cryptography.passwordderivebytes.aspx">PasswordDeriveBytes </a> class in .NET to do proper encryption. This has since been replaced with  <a href="http://msdn.microsoft.com/en-us/library/system.security.cryptography.rfc2898derivebytes.aspx">Rfc2898DeriveBytes</a> in .NET 2.0. The reason you would want to use Rfc2898DeriveBytes is because it meets the PKCS #5 standard, which PasswordDerrivedBytes, does not. Both of them are present in<em> System.Security.Cryptography</em> namespace.</p>
<p>What we need to do is:</p>
<ul>
<li>Generate the encryption key and IV(Initialization Vector) from the password and salt.</li>
<li>Create a new instance of the encryptor with the key and IV.</li>
<li>Encrypt the query string.</li>
</ul>
<p>We are not done yet. Improper use of Rfc2898DeriveBytes will result in a performance impact on large sets of data. The cause is the call to GetBytes(int32) method on Rfc2898DeriveBytes class. It uses a pseudo-random number generator based on HMACSHA1. GetBytes initializes a new instance of HMAC is the killer in terms of performance. But the redeeming factor is, subsequent calls to GetBytes does not need to do this initialization.</p>
<p>So we change our implementation to do this expensive call once. Since there is no need to create a new instance of Rfc2898DeriveBytes for each call to encrypt, we will use the same key but change the IV for each message. So remove Rfc2898DeriveBytes from the Encrypt method and pass along the key and IV instead of the password and salt.</p>
<p>Putting all this together here is the final code (fast and efficient):</p>
<pre>
      public static class MyHelper
      {

          #region Private variables and Constants
          private const string ENCRYPTION_KEY = "Wx0Te1rc0pA";
          // Generated from Pass Phrase  "xxxxxxxx12012010" or some pass phrase that you can remember from
          // https://www.bigbiz.com/genkey.html Key Generator Site

          private const string QUERY_PARTS_DELIMITOR = "&amp;";
          private const string QUERY_PARAMS_DELIMITOR = "=";

          ///
          /// The salt value used to strengthen the encryption.
          ///
          private readonly static byte[] SALT = Encoding.ASCII.GetBytes(ENCRYPTION_KEY);
          private readonly static byte[] key;
          private readonly static byte[] iv;
          private static readonly Rfc2898DeriveBytes keyGenerator;

          #endregion

         #region Constructor

         static MyHelper()
         {
            //We create the Rfc2898DerveBytes once as
            //Rfc2898DeriveBytes uses a pseudo-random number generator based on HMACSHA1.
            //When calling GetBytes it initializes a new instance of HMAC which takes some time.
            //Subsequent calls to GetBytes does not need to do this initialization.
            keyGenerator =new Rfc2898DeriveBytes(ENCRYPTION_KEY,SALT);
            key = keyGenerator.GetBytes(32);
            //Generate Initialization Vector - This will be less expensive as we have already intialized Rfc2898DeriveBytes
            iv = keyGenerator.GetBytes(16);
        }

       #endregion

       #region Encrypt/Decrypt Methods

        ///
<summary>
        /// Encrypts any string using the Rijndael algorithm.
        /// </summary>

        ///
<param name="inputText">The string to encrypt.</param>
        ///
<param name="queryStringParam">The name of the query string paramater</param>
        /// <returns>A Base64 encrypted string.</returns>
        public static string Encrypt(string inputText, string queryStringParam)
        {
            //Create a new RijndaelManaged cipher for the symmetric algorithm from the key and iv
            RijndaelManaged rijndaelCipher = new RijndaelManaged {Key = key, IV = iv};

            byte[] plainText = Encoding.Unicode.GetBytes(inputText);

            using (ICryptoTransform encryptor = rijndaelCipher.CreateEncryptor())
            {
                using (MemoryStream memoryStream = new MemoryStream())
                {
                    using (CryptoStream cryptoStream = new CryptoStream(memoryStream, encryptor, CryptoStreamMode.Write))
                    {
                        cryptoStream.Write(plainText, 0, plainText.Length);
                        cryptoStream.FlushFinalBlock();
                        return "?" + queryStringParam + "=" + Convert.ToBase64String(memoryStream.ToArray());
                    }
                }
            }
        }

        ///
<summary>
        /// Decrypts a previously encrypted string.
        /// </summary>

        ///
<param name="inputText">The encrypted string to decrypt.</param>
        /// <returns>A decrypted string.</returns>
        public static string Decrypt(string inputText)
        {
            RijndaelManaged rijndaelCipher = new RijndaelManaged();
            byte[] encryptedData = Convert.FromBase64String(inputText);

            using (ICryptoTransform decryptor = rijndaelCipher.CreateDecryptor(key, iv))
            {
                using (MemoryStream memoryStream = new MemoryStream(encryptedData))
                {
                    using (CryptoStream cryptoStream = new CryptoStream(memoryStream, decryptor, CryptoStreamMode.Read))
                    {
                        byte[] plainText = new byte[encryptedData.Length];
                        int decryptedCount = cryptoStream.Read(plainText, 0, plainText.Length);
                        return Encoding.Unicode.GetString(plainText, 0, decryptedCount);
                    }
                }
            }
        }

        #endregion

       }
</pre>
<p>The only draw back is this doesn&#8217;t give you full security.  This method will provide basic security in terms of stopping the hacker from deterministically manipulating the encrypted string. So it is a more a deterrence than a verification strategy. We can tell if someone tampers with the encrypted string only if the decryption &#8216;fails&#8217; to decrypt to something you recognize or expect.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.saipanyam.net/2010/03/encrypt-query-strings.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>&#8220;God Mode&#8221; in Windows 7</title>
		<link>http://www.saipanyam.net/2010/01/god-mode-in-windows-7.html</link>
		<comments>http://www.saipanyam.net/2010/01/god-mode-in-windows-7.html#comments</comments>
		<pubDate>Thu, 07 Jan 2010 00:28:05 +0000</pubDate>
		<dc:creator>Sai Panyam</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[interesting]]></category>
		<category><![CDATA[Windows7]]></category>

		<guid isPermaLink="false">http://www.saipanyam.net/?p=165</guid>
		<description><![CDATA[If you haven&#8217;t heard about &#8220;GodMode&#8221; in Windows 7, then read on. Windows 7 has a &#8220;GodMode&#8221; feature, which isn&#8217;t as grandiose as it sounds. Actually GodMode is not even the name that Microsoft has given it. In fact Microsoft doesn&#8217;t have an official name for it, as the feature itself is undocumented. GodMode is [...]]]></description>
			<content:encoded><![CDATA[<p>If you haven&#8217;t heard about &#8220;GodMode&#8221; in Windows 7, then read on. Windows 7 has a &#8220;GodMode&#8221; feature, which isn&#8217;t as grandiose as it sounds. Actually GodMode is not even the name that Microsoft has given it. In fact Microsoft doesn&#8217;t have an official name for it, as the feature itself is undocumented. GodMode is the name given by bloggers who found it accidentally. I cannot imagine how they could have found it aside from getting some inside information from Microsoft developers themselves. I will attempt to give it a definition.</p>
<p><strong>GodMode:</strong> A feature that transforms a folder to a shortcut pointing to some windows tasks, just by appending a folder name with a period (&#8216;.&#8217;), followed by a special string (&#8216;{GUID}&#8217;).</p>
<p>It includes direct access to all kinds of settings, from choosing a location to managing power settings to identifying biometric sensors, to name a few.</p>
<p>To keep them all grouped together and &#8216;know&#8217; what they do with a glance, I followed this pattern-<br />
                                                    [folder name].{GUID}<br />
In my case, I chose &#8216;GodMode&#8217; as the folder name. Once the shortcut is made, I change the name to the following format before moving on to the next God Mode- [folder name].[feature name] For e.g. with the Control Panel God Mode, I would call it something like &#8216;GodMode.ControlPanel&#8217;.</p>
<p><strong>This is how it looks on my computer:</strong></p>
<div id="attachment_172" class="wp-caption alignnone" style="width: 430px"><img class="size-full wp-image-172" title="GodModeCapture" src="http://www.saipanyam.net/wp-content/uploads/2010/01/GodModeCapture.JPG" alt="God Mode Folders" width="420" height="341" /><p class="wp-caption-text">God Mode Folders</p></div>
<p>Here is a list of God Modes that I have found so far with a short description:</p>
<p><strong>Control Panel :</strong> {ED7BA470-8E54-465E-825C-99712043E01C}<br />
<strong>Description:</strong> A shortcut to all Control Panel functions</p>
<p><strong>Location Info :</strong> {00C6D95F-329C-409a-81D7-C46C66EA7F33}<br />
<strong>Description:</strong> A shortcut to set up default location for programs to use when a location sensor, such as GPS receiver, is unavailable. On can also enter Geographic location (latitude and longitude) too.</p>
<p><strong>Biometric Info :</strong> {0142e4d0-fb7a-11dc-ba4a-000ffe7ab428}<br />
<strong>Description:</strong> A shortcut showing the information of any biometric device like fingerprint reader etc, if installed.</p>
<p><strong>Power Plan :</strong> {025A5937-A6BE-4686-A844-36FE4BEC8B6D}<br />
<strong>Description:</strong> A shortcut to select the power consumption settings for your computer.</p>
<p><strong>System Tray :</strong> {05d7b0f4-2121-4eff-bf6b-ed3f69b894d9}<br />
<strong>Description:</strong> A shortcut which opens the icon and notifications settings, where you can set whether you want to show/hide icons in system tray and whether to show only notifications etc.</p>
<p><strong>Windows Vault :</strong> {1206F5F1-0569-412C-8FEC-3204630DFB70}<br />
<strong>Description:</strong> A shortcut which points to Windows Vault. We can store credentials for automatic logon here.</p>
<p><strong> Program Install:</strong> {15eae92e-f17a-4431-9f28-805e482dafd4}<br />
<strong>Description:</strong> A shortcut to install a program from the network.</p>
<p><strong> Default Programs:</strong> {17cd9488-1228-4b2f-88ce-4298e93e0966}<br />
<strong>Description:</strong> A shortcut to choose programs that Windows uses by default.</p>
<p><strong>Manage Wireless:</strong> {1FA9085F-25A2-489B-85D4-86326EEDCD87}<br />
<strong>Description:</strong> A shortcut to manage wireless networks.</p>
<p><strong>Manage Network:</strong> {208D2C60-3AEA-1069-A2D7-08002B30309D}<br />
<strong>Description:</strong> A shortcut to network computers, websites, FTP sites etc.<br />
<strong>Remarks</strong>: This God Mode doesn&#8217;t allow us to rename the folder to anything else. It keeps changing back to &#8216;Network (MS)&#8217;</p>
<p><strong>Manage Network:</strong> {1D2680C9-0E2A-469d-B787-065558BC7D43}<br />
<strong>Description:</strong> A shortcut to GAC (Global Assembly Cache).<br />
<strong>Remarks</strong>: This God Mode doesn&#8217;t change its folder icon or hide its GUID string like others. But it correctly points to the GAC on the computer.</p>
<p><strong>Computer Drives:</strong> {20D04FE0-3AEA-1069-A2D8-08002B30309D}<br />
<strong>Description:</strong> A shortcut which shows the current drives on the computer.</p>
<p><strong>Printers:</strong> {2227A280-3AEA-1069-A2DE-08002B30309D}<br />
<strong>Description:</strong> A shortcut to the printers added to the computer.</p>
<p><strong>Remote Connections:</strong> {241D7C96-F8BF-4F85-B01F-E2B043341A4B}<br />
<strong>Description:</strong> A shortcut to manage your RemoteApp and Desktop Connections.</p>
<p><strong>Windows Firewall:</strong> {4026492F-2F69-46B8-B9BF-5654FC07E423}<br />
<strong>Description:</strong> A shortcut to setup Windows Firewall settings to prevent malicious hackers from getting access to your computer.</p>
<p><strong>Computer Performance:</strong> {78F3955E-3B90-4184-BD14-5397C15F1EFC}<br />
<strong>Description:</strong> A shortcut to get your computer&#8217;s speed and performance information.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.saipanyam.net/2010/01/god-mode-in-windows-7.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
