<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
<title type="text">Eyes On Code</title>
<generator uri="https://github.com/mojombo/jekyll">Jekyll</generator>
<link rel="self" type="application/atom+xml" href="http://don.het.guru/feed.xml" />
<link rel="alternate" type="text/html" href="http://don.het.guru" />
<updated>2015-01-23T18:18:30+00:00</updated>
<id>http://don.het.guru/</id>
<author>
  <name>Hetal Patel</name>
  <uri>http://don.het.guru/</uri>
  <email></email>
</author>


<entry>
  <title type="html"><![CDATA[Git Setup On Windows]]></title>
  <link rel="alternate" type="text/html" href="http://don.het.guru/2014/04/06/git-setup-on-windows"/>
  <id>http://don.het.guru/2014/04/06/git-setup-on-windows</id>
  <published>2014-04-06T17:02:00+01:00</published>
  <updated>2014-04-06T17:02:00+01:00</updated>
  <author>
    <name>Hetal Patel</name>
    <uri>http://don.het.guru</uri>
    <email></email>
  </author>
  <content type="html">&lt;p&gt;I have been using Git now for nearly a year. In that time I have tried many tools with Visual Studio 2012/21013. What follows is my preferred setup for Git.&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;
    &lt;p&gt;&lt;a href=&quot;http://git-scm.com/downloads&quot;&gt;Git&lt;/a&gt;&lt;/p&gt;

    &lt;p&gt;This will install git for windows. It also includes the command line tool as well as git-gui.&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;&lt;a href=&quot;http://gitcredentialstore.codeplex.com/&quot;&gt;Windows Credential Store for Git&lt;/a&gt;&lt;/p&gt;

    &lt;p&gt;This will come in handy when you start pushing and pulling from &lt;a href=&quot;http://www.github.com&quot;&gt;GitHub&lt;/a&gt; repos. This tools uses the Windows Credential Manager with the defined Git credential API.&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;&lt;a href=&quot;https://code.google.com/p/conemu-maximus&quot;&gt;Conemu-Maximus5&lt;/a&gt;&lt;/p&gt;

    &lt;p&gt;This is great tool. As anyone who has used windows and its command-line tools will tell you. Best way to configure this tool is to select  the Developer build, when you open it up for the first time. This will configure all the prompts like cmd, powershell. You can then switch back to the stable version.&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;&lt;a href=&quot;https://github.com/dahlbyk/posh-git&quot;&gt;Posh-git&lt;/a&gt;&lt;/p&gt;

    &lt;p&gt;Check out the readme file. It explains it very well. Trust me, you definitely want this if you plan to use git from command-line.&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;&lt;a href=&quot;https://sourcegear.com/diffmerge/&quot;&gt;Compare Tool&lt;/a&gt;&lt;/p&gt;

    &lt;p&gt;If you do not not have paid tool for comparing files. I recommend Diffmerge, as it is a free tool. I have used this for several years without any issues.&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Some usefull Git aliases&lt;/p&gt;

    &lt;ul&gt;
      &lt;li&gt;&lt;strong&gt;ahead = log –stat origin/master..HEAD&lt;/strong&gt; : Check what commits have not been pushed to remote branch.&lt;/li&gt;
      &lt;li&gt;&lt;strong&gt;newpush = push -u origin HEAD&lt;/strong&gt;: Push a local branch to remote server.&lt;/li&gt;
      &lt;li&gt;&lt;strong&gt;tagpush = push –tags&lt;/strong&gt;: Push a newly created tag to remote server.&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Would love hear what other people have for using Git on windows.&lt;/p&gt;


  &lt;p&gt;&lt;a href=&quot;http://don.het.guru/2014/04/06/git-setup-on-windows&quot;&gt;Git Setup On Windows&lt;/a&gt; was originally published by Hetal Patel at &lt;a href=&quot;http://don.het.guru&quot;&gt;Eyes On Code&lt;/a&gt; on April 06, 2014.&lt;/p&gt;</content>
</entry>


<entry>
  <title type="html"><![CDATA[Read Large XML Files]]></title>
  <link rel="alternate" type="text/html" href="http://don.het.guru/2014/03/19/read-large-xml-file"/>
  <id>http://don.het.guru/2014/03/19/read-large-xml-file</id>
  <published>2014-03-19T14:38:00+00:00</published>
  <updated>2014-03-19T14:38:00+00:00</updated>
  <author>
    <name>Hetal Patel</name>
    <uri>http://don.het.guru</uri>
    <email></email>
  </author>
  <content type="html">&lt;p&gt;This is a note to myself if ever in the future I need to read a large xml file. I know I know, reading xml is so 90’s but it does happen.&lt;/p&gt;

&lt;p&gt;Standard approach is it Google the answer. As it is not one of those things you use on a regular basis. Which is what I was about to do like any other developer. Then thought to myself that the .NET framework has been around for at least 10 years. They must have provided a way to accomplish this.&lt;/p&gt;

&lt;p&gt;So here is an extension method to read large xml files.&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-c#&quot; data-lang=&quot;c#&quot;&gt;&lt;span class=&quot;k&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Extension&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;IEnumerable&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;XElement&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;ReadElements&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;this&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;XmlReader&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;reader&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;XName&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;elementName&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;reader&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Name&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Equals&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;elementName&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;LocalName&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;StringComparison&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;OrdinalIgnoreCase&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; 
            &lt;span class=&quot;p&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;reader&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;NamespaceURI&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Equals&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;elementName&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;NamespaceName&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;StringComparison&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;OrdinalIgnoreCase&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;k&quot;&gt;yield&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;XElement&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;XNode&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ReadFrom&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;reader&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

        &lt;span class=&quot;k&quot;&gt;while&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;reader&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ReadToNextSibling&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;elementName&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;LocalName&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;elementName&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;NamespaceName&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;k&quot;&gt;yield&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;XElement&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;XNode&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ReadFrom&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;reader&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Here is example of how to use the extension method:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-c#&quot; data-lang=&quot;c#&quot;&gt;&lt;span class=&quot;k&quot;&gt;using&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;XmlReader&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;reader&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;XmlReader&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Create&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;path&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;foreach&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;XElement&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;etext&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;reader&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ReadElements&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;quot;product&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    	&lt;span class=&quot;c1&quot;&gt;// extract data from xml element...&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;The path is the location of the xml file. In this example the xml contains collection of products. Hence passing the elemnt name “product”.&lt;/p&gt;

&lt;p&gt;The trick here is the XNode which makes a copy of the elements at the current position of xml reader. This allows the reader to move onto next element in the file.&lt;/p&gt;

&lt;p&gt;That is all.&lt;/p&gt;

  &lt;p&gt;&lt;a href=&quot;http://don.het.guru/2014/03/19/read-large-xml-file&quot;&gt;Read Large XML Files&lt;/a&gt; was originally published by Hetal Patel at &lt;a href=&quot;http://don.het.guru&quot;&gt;Eyes On Code&lt;/a&gt; on March 19, 2014.&lt;/p&gt;</content>
</entry>


<entry>
  <title type="html"><![CDATA[Hello World!]]></title>
  <link rel="alternate" type="text/html" href="http://don.het.guru/jekyll/2014/03/09/hello-world"/>
  <id>http://don.het.guru/jekyll/2014/03/09/hello-world</id>
  <published>2014-03-09T16:19:00+00:00</published>
  <updated>2014-03-09T16:19:00+00:00</updated>
  <author>
    <name>Hetal Patel</name>
    <uri>http://don.het.guru</uri>
    <email></email>
  </author>
  <content type="html">&lt;p&gt;As in true form, whenever doing anything for the first time in software development. You create a hello world application. Who am I to go against tradition.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href=&quot;http://www.spacecowboyrocketcompany.com/&quot;&gt;Zan a friend of mine&lt;/a&gt;&lt;/strong&gt; introduced me to something called &lt;a href=&quot;http://jekyllrb.com&quot;&gt;Jekyll&lt;/a&gt; which, is a static website builder. &lt;strong&gt;I know what your thinking, a static site in this day and age&lt;/strong&gt;. It took me while to get my head around it too. From knowing nothing to getting a blog site up and running took me a Sunday afternoon.&lt;/p&gt;

&lt;p&gt;This was all possible because GitHub now provide users with free hosting, they call it &lt;a href=&quot;http://pages.github.com&quot;&gt;GitHub Pages&lt;/a&gt;. Once you follow the instructions from the &lt;a href=&quot;http://jekyllrb.com/docs/home/&quot;&gt;Jekyll&lt;/a&gt; site. It becomes trivial if don’t mind getting your hands dirty with coding. Saying that I spent most of my time googling as there is a lot of help out there, especially when it came to picking my theme.&lt;/p&gt;

&lt;p&gt;If you are a windows user, like I am. You get the distinct feeling that Jekyll style does take getting used too. I would say persevere because it is with it. Viewed in a different way, you are exposing your self to a different development environment. Working on real world problem that beats any text book examples.&lt;/p&gt;


  &lt;p&gt;&lt;a href=&quot;http://don.het.guru/jekyll/2014/03/09/hello-world&quot;&gt;Hello World!&lt;/a&gt; was originally published by Hetal Patel at &lt;a href=&quot;http://don.het.guru&quot;&gt;Eyes On Code&lt;/a&gt; on March 09, 2014.&lt;/p&gt;</content>
</entry>

</feed>
