<?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>Surya&#039;s Sandbox</title>
	<atom:link href="http://www.nyayapati.com/surya/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.nyayapati.com/surya</link>
	<description>Just another personal Sandbox</description>
	<lastBuildDate>Thu, 22 Dec 2011 19:24:26 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>To make a calculator from scratch</title>
		<link>http://www.nyayapati.com/surya/2011/12/to-make-a-calculator-from-scratch/</link>
		<comments>http://www.nyayapati.com/surya/2011/12/to-make-a-calculator-from-scratch/#comments</comments>
		<pubDate>Thu, 22 Dec 2011 19:24:26 +0000</pubDate>
		<dc:creator>Surya</dc:creator>
				<category><![CDATA[Rant]]></category>

		<guid isPermaLink="false">http://www.nyayapati.com/surya/?p=46</guid>
		<description><![CDATA[I created a Calculator (On May 2011) from scratch using .net code http://codereview.stackexchange.com/questions/2334/to-make-a-calculator-from-scratch]]></description>
			<content:encoded><![CDATA[<p>I created a Calculator (On May 2011) from scratch using .net code<br />
<a href="http://codereview.stackexchange.com/questions/2334/to-make-a-calculator-from-scratch" title="To make a calculator from scratch" target="_blank">http://codereview.stackexchange.com/questions/2334/to-make-a-calculator-from-scratch</a></p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.nyayapati.com%2Fsurya%2F2011%2F12%2Fto-make-a-calculator-from-scratch%2F&amp;title=To%20make%20a%20calculator%20from%20scratch" id="wpa2a_2"><img src="http://www.nyayapati.com/surya/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.nyayapati.com/surya/2011/12/to-make-a-calculator-from-scratch/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>VisualSVN pre-commit hook</title>
		<link>http://www.nyayapati.com/surya/2011/06/visualsvn-pre-commit-hook/</link>
		<comments>http://www.nyayapati.com/surya/2011/06/visualsvn-pre-commit-hook/#comments</comments>
		<pubDate>Fri, 03 Jun 2011 18:33:22 +0000</pubDate>
		<dc:creator>Surya</dc:creator>
				<category><![CDATA[Rant]]></category>

		<guid isPermaLink="false">http://www.nyayapati.com/surya/?p=39</guid>
		<description><![CDATA[1.Start VisualSVN Server Manager 2.Under Repositories, Select your repository and then Open Properties 3.Select Hooks tab 4.double click the pre-commit hook 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 setlocal &#160; set REPOS=%1 set TXN=%2 &#160; set SVNLOOK=&#34;C:\Program Files\VisualSVN Server\bin\svnlook.exe&#34; REM Make sure &#8230; <a class="read-excerpt" href="http://www.nyayapati.com/surya/2011/06/visualsvn-pre-commit-hook/">Continue reading <span class="meta-nav">&#187;</span></a>]]></description>
			<content:encoded><![CDATA[<p>1.Start VisualSVN Server Manager<br />
2.Under Repositories, Select your repository and then Open Properties<br />
3.Select Hooks tab<br />
4.double click the pre-commit hook</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
</pre></td><td class="code"><pre class="dos" style="font-family:monospace;"><span style="color: #b1b100; font-weight: bold;">setlocal</span>
&nbsp;
<span style="color: #b1b100; font-weight: bold;">set</span> REPOS=<span style="color: #33cc33;">%</span><span style="color: #448888;">1</span>
<span style="color: #b1b100; font-weight: bold;">set</span> TXN=<span style="color: #33cc33;">%</span><span style="color: #448888;">2</span>
&nbsp;
<span style="color: #b1b100; font-weight: bold;">set</span> SVNLOOK=&quot;C:\Program Files\VisualSVN Server\bin\svnlook.exe&quot;
<span style="color: #808080; font-style: italic;">
REM Make sure that the log message contains some text.</span>
<span style="color: #00b100; font-weight: bold;">FOR</span> /F &quot;usebackq delims==&quot; <span style="color: #33cc33;">%%</span><span style="color: #448888;">g</span> <span style="color: #00b100; font-weight: bold;">IN</span> <span style="color: #33cc33;">(</span>`<span style="color: #33cc33;">%</span><span style="color: #448888;">SVNLOOK</span><span style="color: #33cc33;">%</span> log -t <span style="color: #33cc33;">%</span><span style="color: #448888;">TXN</span><span style="color: #33cc33;">%</span> <span style="color: #33cc33;">%</span><span style="color: #448888;">REPOS</span><span style="color: #33cc33;">%</span> FINDSTR /R /C:......`<span style="color: #33cc33;">)</span> <span style="color: #00b100; font-weight: bold;">DO</span> <span style="color: #00b100; font-weight: bold;">goto</span> NORMAL_EXIT
&nbsp;
:<span style="color: #b100b1; font-weight: bold;">ERROR_TOO_SHORT</span>
<span style="color: #b1b100; font-weight: bold;">echo</span> &quot;Comment must be at least 6 letters&quot; <span style="color: #33cc33;">&amp;</span>gt;<span style="color: #33cc33;">&amp;</span>amp;2
<span style="color: #00b100; font-weight: bold;">goto</span> ERROR_EXIT
&nbsp;
:<span style="color: #b100b1; font-weight: bold;">ERROR_EXIT</span>
<span style="color: #00b100; font-weight: bold;">exit</span> /b 1
<span style="color: #808080; font-style: italic;">
REM All checks passed, so allow the commit.</span>
:<span style="color: #b100b1; font-weight: bold;">NORMAL_EXIT</span>
<span style="color: #00b100; font-weight: bold;">exit</span> 0</pre></td></tr></table></div>

<p>The above code will make the comment of at least 6 letters mandatory.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.nyayapati.com%2Fsurya%2F2011%2F06%2Fvisualsvn-pre-commit-hook%2F&amp;title=VisualSVN%20pre-commit%20hook" id="wpa2a_4"><img src="http://www.nyayapati.com/surya/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.nyayapati.com/surya/2011/06/visualsvn-pre-commit-hook/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>My Experience with SQL Azure</title>
		<link>http://www.nyayapati.com/surya/2011/05/my-experience-with-sql-azure/</link>
		<comments>http://www.nyayapati.com/surya/2011/05/my-experience-with-sql-azure/#comments</comments>
		<pubDate>Mon, 09 May 2011 05:09:06 +0000</pubDate>
		<dc:creator>Surya</dc:creator>
				<category><![CDATA[Rant]]></category>

		<guid isPermaLink="false">http://www.nyayapati.com/surya/?p=21</guid>
		<description><![CDATA[We are in the process of developing a prototype for Windows Azure. Since its a fairly a new technology not many online help/discussions are available. and if there are, then they are obsolete (as these steps would become in couple of months) the reason being, Microsoft comes out with updates for major/minor versions pretty quickly. &#8230; <a class="read-excerpt" href="http://www.nyayapati.com/surya/2011/05/my-experience-with-sql-azure/">Continue reading <span class="meta-nav">&#187;</span></a>]]></description>
			<content:encoded><![CDATA[<p>We are in the process of developing a prototype for Windows Azure.<br />
Since its a fairly a new technology not many online help/discussions<br />
are available. and if there are, then they are obsolete (as these steps would become in couple of months)<br />
the reason being, Microsoft comes out with updates for major/minor versions pretty quickly.<br />
Anyway these are the challenges we faced until now and maybe would face some more in future. Most of them are<br />
due to our ignorance or lack of knowledge on how it could be done in a certain way (thats one more problem with new tech, where<br />
nobody knows what`s the standard way until you make errors).<br />
Now Azure requires latest and greatest. Hence, we decided to use virtual machine to make Win 7 images and install azure sdk<br />
and sql server 2008 (big mistake for sql server&#8230;as we painfully found out later that we needed SQL server 2008 R2 CTP!).<br />
So during R&#038;D, we realized that we could use Windows Azure with Storage as our backend. But, it turned out to be a<br />
Hash Table, which is only used to save key value pair, where value can be anything from blob to complex objects etc.  However again, we needed a RDBMS. On further research, we found a service called SQL Azure which was exactly what we required for Storage.<br />
And now when we tried to open it with Management Studio, we could only do scripts and not objects.. Bummer!! I am more<br />
used to the GUI aspect of sqlserver then scripts, which made us search for different alternatives in codeplex i.e.<br />
http://hanssens.org/tools/sqlazuremanager/ which were all buggy or mostly incomplete! Turns out we had to install<br />
SQL server 2008 R2 CTP. sigh!!! Who knew??<br />
Once everything was set, we now had to move our existing data from oracle to Azure. We used Microsoft&#8217;s tool <???> to migrate data, which was slow but worked fine. Finally, it was a success&#8230;Yippee!!</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.nyayapati.com%2Fsurya%2F2011%2F05%2Fmy-experience-with-sql-azure%2F&amp;title=My%20Experience%20with%20SQL%20Azure" id="wpa2a_6"><img src="http://www.nyayapati.com/surya/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.nyayapati.com/surya/2011/05/my-experience-with-sql-azure/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Simple OS A designers dream, a programmers pride</title>
		<link>http://www.nyayapati.com/surya/2011/05/simple-os-a-designers-dream-a-programmers-pride/</link>
		<comments>http://www.nyayapati.com/surya/2011/05/simple-os-a-designers-dream-a-programmers-pride/#comments</comments>
		<pubDate>Mon, 09 May 2011 04:10:01 +0000</pubDate>
		<dc:creator>Surya</dc:creator>
				<category><![CDATA[Rant]]></category>

		<guid isPermaLink="false">http://www.nyayapati.com/surya/?p=20</guid>
		<description><![CDATA[I would like an Operating System which is open source. Which has two options when its started for the first time.(Basic, Advanced) Basic:my mother can use.Advanced: something a hardcore programmer hacker can use which behaves like iPhoneOS/android i.e desktop with icons only(apps)/ no tray or task bar or menus or right clicks apps can do &#8230; <a class="read-excerpt" href="http://www.nyayapati.com/surya/2011/05/simple-os-a-designers-dream-a-programmers-pride/">Continue reading <span class="meta-nav">&#187;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I would like an Operating System which is open source.<br />
Which has two options when its started for the first time.(Basic, Advanced)<br />
Basic:my mother can use.Advanced: something a hardcore programmer hacker can use<br />
which behaves like iPhoneOS/android i.e desktop with icons only(apps)/ no tray or task bar or menus or right clicks<br />
apps can do what ever they want.<br />
everything set to optimal default, plug and play, like boxee, xbmc (even they are a little complicated/clunky)<br />
A single place to store documents,music,videos,settings,app store (with repository can use windows,linux apps).<br />
A Closed App Ecosystem (only through repos like cydia)<br />
no need of c drive,program files.</p>
<p>should have good games and social apps to appeal masses<br />
In short, i want everything which iPad has and also the things it lacks.(multitasking,flash,plugins etc)<br />
I guess future ChromeOS would be pretty close to what i want. There is also Jolicloud</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.nyayapati.com%2Fsurya%2F2011%2F05%2Fsimple-os-a-designers-dream-a-programmers-pride%2F&amp;title=Simple%20OS%20A%20designers%20dream%2C%20a%20programmers%20pride" id="wpa2a_8"><img src="http://www.nyayapati.com/surya/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.nyayapati.com/surya/2011/05/simple-os-a-designers-dream-a-programmers-pride/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>I Love Innovation</title>
		<link>http://www.nyayapati.com/surya/2011/05/i-love-innovation/</link>
		<comments>http://www.nyayapati.com/surya/2011/05/i-love-innovation/#comments</comments>
		<pubDate>Mon, 09 May 2011 04:06:44 +0000</pubDate>
		<dc:creator>Surya</dc:creator>
				<category><![CDATA[Rant]]></category>

		<guid isPermaLink="false">http://www.nyayapati.com/surya/?p=24</guid>
		<description><![CDATA[Google, Apple, Microsoft&#8230; big names you get to hear about them almost everyday and lot of flamewar going around with brand loyalty&#8230;like X company blows or Y company is awesome!! For me its the products these big names produce which i love and not the brand, i have macbookpro with windows 7 installed and use &#8230; <a class="read-excerpt" href="http://www.nyayapati.com/surya/2011/05/i-love-innovation/">Continue reading <span class="meta-nav">&#187;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Google, Apple, Microsoft&#8230; big names you get to hear about them almost everyday and lot of flamewar going around with brand loyalty&#8230;like X company blows or Y company is awesome!! For me its the products these big names produce which i love and not the brand, i have  macbookpro with windows 7 installed and use google search and alternatively use bing. My mouth waters if i see any cool innovative gadget/software which is a game changer. For me i dont care if its closed or opensource as long as its easy on the wallet (free is good too), easy to use and looks cool and if there is competition it definitely helps</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.nyayapati.com%2Fsurya%2F2011%2F05%2Fi-love-innovation%2F&amp;title=I%20Love%20Innovation" id="wpa2a_10"><img src="http://www.nyayapati.com/surya/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.nyayapati.com/surya/2011/05/i-love-innovation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hello world!</title>
		<link>http://www.nyayapati.com/surya/2010/02/hello-world/</link>
		<comments>http://www.nyayapati.com/surya/2010/02/hello-world/#comments</comments>
		<pubDate>Mon, 08 Feb 2010 03:53:04 +0000</pubDate>
		<dc:creator>Surya</dc:creator>
				<category><![CDATA[Rant]]></category>

		<guid isPermaLink="false">http://www.codinguru.net/surya/?p=1</guid>
		<description><![CDATA[Hello! I recently changed from Drupal to WordPress, Why? Cause, I was hearing a lot of buzz and I had nothing better to do this weekend ^_^. I am happy i did, and my inital reaction is&#8230; Wordpress is made by designers and Drupal is made by programmers. Why do i say this? &#8216;Cause, WordPress  is a &#8230; <a class="read-excerpt" href="http://www.nyayapati.com/surya/2010/02/hello-world/">Continue reading <span class="meta-nav">&#187;</span></a>]]></description>
			<content:encoded><![CDATA[<div id="_mcePaste">Hello! I recently changed from Drupal to WordPress, Why? Cause, I was hearing a lot of buzz and I had nothing better to do this weekend ^_^.</div>
<div id="_mcePaste">I am happy i did, and my inital reaction is&#8230; Wordpress is made by designers and Drupal is made by programmers. Why do i say this? &#8216;Cause, WordPress  is a very user friendly and easy to manage application and at the same time powerful too, for example you can extend it using plugins and themes, especially themes. You can also make changes if you want. where as Drupal is little complex and intimidating but very powerful and extensible at the same time. Stick with it if you know your way around it.</div>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.nyayapati.com%2Fsurya%2F2010%2F02%2Fhello-world%2F&amp;title=Hello%20world%21" id="wpa2a_12"><img src="http://www.nyayapati.com/surya/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.nyayapati.com/surya/2010/02/hello-world/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>HOWTO export/copy ADODB recordset to excel spreadsheet via IronPython</title>
		<link>http://www.nyayapati.com/surya/2009/06/howto-exportcopy-adodb-recordset-to-excel-spreadsheet-via-ironpython/</link>
		<comments>http://www.nyayapati.com/surya/2009/06/howto-exportcopy-adodb-recordset-to-excel-spreadsheet-via-ironpython/#comments</comments>
		<pubDate>Fri, 26 Jun 2009 04:19:57 +0000</pubDate>
		<dc:creator>Surya</dc:creator>
				<category><![CDATA[Rant]]></category>

		<guid isPermaLink="false">http://www.nyayapati.com/surya/?p=11</guid>
		<description><![CDATA[1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 &#8230; <a class="read-excerpt" href="http://www.nyayapati.com/surya/2009/06/howto-exportcopy-adodb-recordset-to-excel-spreadsheet-via-ironpython/">Continue reading <span class="meta-nav">&#187;</span></a>]]></description>
			<content:encoded><![CDATA[
<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
</pre></td><td class="code"><pre class="python" style="font-family:monospace;"><span style="color: #483d8b;">&quot;&quot;&quot;
Export or Copy ADODB Recordset to Excel Spreadsheet
@Author Surya Nyayapati
@Date Jun-25-2009
&quot;&quot;&quot;</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">import</span> clr
&nbsp;
<span style="color: #ff7700;font-weight:bold;">from</span> System.<span style="color: black;">Reflection</span> <span style="color: #ff7700;font-weight:bold;">import</span> Assembly
<span style="color: #ff7700;font-weight:bold;">from</span> System.<span style="color: black;">Reflection</span> <span style="color: #ff7700;font-weight:bold;">import</span> Missing
&nbsp;
<span style="color: #808080; font-style: italic;">#From C:\WINDOWS\assembly Copied the Display name for ADODB</span>
clr.<span style="color: black;">AddReferenceByName</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'ADODB, Version=7.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'</span><span style="color: black;">&#41;</span>
<span style="color: #ff7700;font-weight:bold;">from</span> ADODB <span style="color: #ff7700;font-weight:bold;">import</span> ConnectionClass, RecordsetClass, CursorLocationEnum
&nbsp;
connString = <span style="color: #483d8b;">&quot;DSN=myDsn;Uid=myUsername;Pwd=myPassword;&quot;</span>
&nbsp;
conn = ConnectionClass<span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
rs = RecordsetClass<span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
conn.<span style="color: black;">Open</span><span style="color: black;">&#40;</span>connString<span style="color: black;">&#41;</span>
&nbsp;
conn.<span style="color: black;">CursorLocation</span> = CursorLocationEnum.<span style="color: black;">adUseClient</span>
query = <span style="color: #483d8b;">&quot;SELECT * FROM user_group&quot;</span> <span style="color: #808080; font-style: italic;"># Any SELECT SQL</span>
rs = conn.<span style="color: black;">Execute</span><span style="color: black;">&#40;</span>query<span style="color: black;">&#41;</span>
<span style="color: #483d8b;">&quot;&quot;&quot;
#To iterate over Recordset
while rs.EOF &lt;&gt; True:	
	print &quot;%s - %s&quot; %(rs[0].Item[0].Name.ToString(),rs[0].Item[0].Value.ToString())
	print &quot;%s - %s&quot; %(rs[0].Item[1].Name.ToString(),rs[0].Item[1].Value.ToString())	
        # ...
	rs.MoveNext()
&quot;&quot;&quot;</span>	
&nbsp;
<span style="color: #808080; font-style: italic;">#Start a New Excel Instance</span>
VSTOpath = <span style="color: #483d8b;">&quot;C:<span style="color: #000099; font-weight: bold;">\\</span>Program Files<span style="color: #000099; font-weight: bold;">\\</span>Microsoft Visual Studio 9.0<span style="color: #000099; font-weight: bold;">\\</span>Visual Studio Tools for Office<span style="color: #000099; font-weight: bold;">\\</span>PIA<span style="color: #000099; font-weight: bold;">\\</span>Office11<span style="color: #000099; font-weight: bold;">\\</span>&quot;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">#Load and add reference to Excel dll</span>
excelAssemblyPath = <span style="color: #483d8b;">&quot;%sMicrosoft.Office.Interop.Excel.dll&quot;</span> <span style="color: #66cc66;">%</span> VSTOpath
excelAssembly = Assembly.<span style="color: black;">LoadFile</span><span style="color: black;">&#40;</span>excelAssemblyPath<span style="color: black;">&#41;</span>
clr.<span style="color: black;">AddReference</span><span style="color: black;">&#40;</span>excelAssembly<span style="color: black;">&#41;</span>
<span style="color: #ff7700;font-weight:bold;">from</span> Microsoft.<span style="color: black;">Office</span>.<span style="color: black;">Interop</span> <span style="color: #ff7700;font-weight:bold;">import</span> Excel
&nbsp;
<span style="color: #ff7700;font-weight:bold;">import</span> System.<span style="color: black;">IO</span>.<span style="color: black;">Directory</span>
excelApp = Excel.<span style="color: black;">ApplicationClass</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>   
excelApp.<span style="color: black;">DefaultFilePath</span> = System.<span style="color: black;">IO</span>.<span style="color: black;">Directory</span>.<span style="color: black;">GetCurrentDirectory</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
excelApp.<span style="color: black;">Visible</span> = <span style="color: #008000;">True</span>
excelApp.<span style="color: black;">ScreenUpdating</span> = <span style="color: #008000;">False</span><span style="color: #66cc66;">;</span>
excelApp.<span style="color: black;">DisplayAlerts</span> = <span style="color: #008000;">False</span>   
excelApp.<span style="color: black;">UserControl</span> = <span style="color: #008000;">False</span><span style="color: #66cc66;">;</span>
<span style="color: #ff7700;font-weight:bold;">try</span>:
	book1 = excelApp.<span style="color: black;">Workbooks</span>.<span style="color: black;">Add</span><span style="color: black;">&#40;</span>Excel.<span style="color: black;">XlWBATemplate</span>.<span style="color: black;">xlWBATWorksheet</span><span style="color: black;">&#41;</span>
	sheet1 = book1.<span style="color: black;">ActiveSheet</span>
&nbsp;
        headRange = sheet1.<span style="color: black;">Range</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;A1&quot;</span>, <span style="color: #483d8b;">&quot;D1&quot;</span><span style="color: black;">&#41;</span>	
&nbsp;
	<span style="color: #808080; font-style: italic;">#Python does not provide built-in support for multi-dimensional arrays</span>
	<span style="color: #ff7700;font-weight:bold;">from</span> System <span style="color: #ff7700;font-weight:bold;">import</span> Array
	array2D = Array.<span style="color: black;">CreateInstance</span><span style="color: black;">&#40;</span><span style="color: #008000;">object</span>, <span style="color: #ff4500;">2</span>, <span style="color: #ff4500;">4</span><span style="color: black;">&#41;</span>
	array2D<span style="color: black;">&#91;</span><span style="color: #ff4500;">0</span>,<span style="color: #ff4500;">0</span><span style="color: black;">&#93;</span> = <span style="color: #483d8b;">&quot;HEADER 1&quot;</span>
	array2D<span style="color: black;">&#91;</span><span style="color: #ff4500;">0</span>,<span style="color: #ff4500;">1</span><span style="color: black;">&#93;</span> = <span style="color: #483d8b;">&quot;HEADER 2&quot;</span>
	array2D<span style="color: black;">&#91;</span><span style="color: #ff4500;">0</span>,<span style="color: #ff4500;">2</span><span style="color: black;">&#93;</span> = <span style="color: #483d8b;">&quot;HEADER 3&quot;</span>
	array2D<span style="color: black;">&#91;</span><span style="color: #ff4500;">0</span>,<span style="color: #ff4500;">3</span><span style="color: black;">&#93;</span> = <span style="color: #483d8b;">&quot;HEADER 4&quot;</span>
&nbsp;
	headRange.<span style="color: black;">Value2</span> = array2D
	headRange.<span style="color: black;">Font</span>.<span style="color: black;">Bold</span> = <span style="color: #008000;">True</span>
	sheet1.<span style="color: black;">Range</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;A2&quot;</span><span style="color: black;">&#41;</span>.<span style="color: black;">CopyFromRecordset</span><span style="color: black;">&#40;</span>rs, Missing.<span style="color: black;">Value</span>, Missing.<span style="color: black;">Value</span><span style="color: black;">&#41;</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">except</span> <span style="color: #008000;">StandardError</span>, <span style="color: black;">&#40;</span>ErrorMessage<span style="color: black;">&#41;</span>:
	<span style="color: #ff7700;font-weight:bold;">print</span> <span style="color: #483d8b;">&quot;something wrong (%s)&quot;</span> <span style="color: #66cc66;">%</span> ErrorMessage
&nbsp;
<span style="color: #ff7700;font-weight:bold;">finally</span>:
	excelApp.<span style="color: black;">ScreenUpdating</span> = <span style="color: #008000;">True</span><span style="color: #66cc66;">;</span>
        excelApp.<span style="color: black;">DisplayAlerts</span> = <span style="color: #008000;">True</span><span style="color: #66cc66;">;</span>
        excelApp.<span style="color: black;">UserControl</span> = <span style="color: #008000;">True</span><span style="color: #66cc66;">;</span>
	<span style="color: #808080; font-style: italic;">#excelApp.Quit()</span></pre></td></tr></table></div>

<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.nyayapati.com%2Fsurya%2F2009%2F06%2Fhowto-exportcopy-adodb-recordset-to-excel-spreadsheet-via-ironpython%2F&amp;title=HOWTO%20export%2Fcopy%20ADODB%20recordset%20to%20excel%20spreadsheet%20via%20IronPython" id="wpa2a_14"><img src="http://www.nyayapati.com/surya/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.nyayapati.com/surya/2009/06/howto-exportcopy-adodb-recordset-to-excel-spreadsheet-via-ironpython/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Howto create a dev server</title>
		<link>http://www.nyayapati.com/surya/2009/05/howto-create-a-dev-server/</link>
		<comments>http://www.nyayapati.com/surya/2009/05/howto-create-a-dev-server/#comments</comments>
		<pubDate>Wed, 20 May 2009 04:26:29 +0000</pubDate>
		<dc:creator>Surya</dc:creator>
				<category><![CDATA[Rant]]></category>

		<guid isPermaLink="false">http://www.nyayapati.com/surya/?p=15</guid>
		<description><![CDATA[From childhood i have always been fascinated by computers and my first box was a 386 machine with a monochrome monitor. Whereas now i have a powerful Quad core machine ^_^ I have a home network which connects couple of wired desktops, XBox (which is now a media center with XBMC) and also wireless iPhone &#8230; <a class="read-excerpt" href="http://www.nyayapati.com/surya/2009/05/howto-create-a-dev-server/">Continue reading <span class="meta-nav">&#187;</span></a>]]></description>
			<content:encoded><![CDATA[<p>From childhood i have always been fascinated by computers and my first box was a 386 machine with a monochrome monitor. Whereas now i have a powerful Quad core machine ^_^  I have a home network which connects couple of wired desktops, XBox (which is now a media center with XBMC) and also wireless iPhone and Macbook pro.  I have dedicated a box which is not publicly accessible to be a Dev server, and i recommend you doing the same. In this box i have Windows XP and the first thing i installed were Avira AntiVir (<a href="http://av-comparatives.org/">best free antivirus</a>), SuperAntiSpyware and Microsoft BitDefender.</p>
<h2>Installing XAMPP as WAMP Server</h2>
<p>Moving on, i installed <a href="http://www.apachefriends.org/en/xampp-windows.html">XAMPP</a> in c:\xampp because it makes your life easier to install Apache Web Server 2.x with Openssl, PHP 5.x, MySQL 5.x, phpmyadmin, FTP server and a Mail server in one go. I installed all except FTP and mail server as a service. And if you want you can configure each piece separately by changing their ini files once installed. So this takes care of Webserver with php Scripting, Database with Web based GUI (BTW phpmyadmin is the web based GUI if you haven&#8217;t already figured it out ^_~ ). After installing go to <a title="http://localhost" href="http://localhost/">http://localhost</a> and by default you will see xampp&#8217;s page its due to index.php which redirects the browser to xampp&#8217;s folder. its recommended to change all of the default settings i.e change password because sometimes people forget to change it and a hackers first attempt is to try the default password. its pretty simple, click security and follow instructions. one more advantage of using xampp is that you can also plugin other components perl, python if you want.Also it comes with a cool control panel from which you can control turning on and off the server.i will show apache+php configuration when i start a project</p>
<h2>Installing Tomcat as app server</h2>
<p>Now lets install <a href="http://tomcat.apache.org/download-60.cgi">tomcat</a>, a servlet container which will act as app server for now. but first you have to install the latest stable <a href="http://java.sun.com/javase/downloads/index.jsp">JDK</a>. My preference is to create a folder called c:\java and keep all my java related software and library there so its easy to organize and find java related stuff, plus i don&#8217;t like spaces in my folder names i.e. C:\Program Files , since there are few programmes out there which fails due to this reason alone O_O. make sure to change the path in the wizard for both jdk and jre its installed as C:\java\jdk1.6.0_13 and C:\java\jre6 also in your environment variable set JAVA_HOME value to C:\java\jdk1.6.0_13. Once that&#8217;s done get the latest tomcat&#8217;s windows service installer and install tomcat as a service. so i installed it as C:\java\apache-tomcat-6.0.18. During install it will confirm for new port (8080 by default) and admin password. I will show tomcat configuration when i start a project</p>
<h2>Installing Subversion as server for revision control system</h2>
<p>Next step is to install revision control system, I choose <a href="http://subversion.tigris.org/">subversion</a> cause i feel this is the next generation of cvs, and they have a good number of quality and easy to use clients like <a href="http://tortoisesvn.net/downloads">Tortoisesvn</a> (windows GUI client), <a href="http://www.sliksvn.com/en/download">Slik subersion</a> (command line client), <a href="http://subclipse.tigris.org/install.html">Subclipse</a> (Eclipse), <a href="http://ankhsvn.open.collab.net/">Anksvn</a> (visual studio) i have installed all four. On my server i installed <a href="http://www.open.collab.net/downloads/subversion/">CollabNet Subversion</a> (Certified binary for subversion) because it was easy and i just followed its readme for the setup. Couple of things to note, you have register for free at collabnet before downloading and there are multiple ways of installing and since i am using it for internal dev only i am installing the svnserve (svn:// protocol) instead of apache as svn server(http:// protocol) </p>
<pre>
<fieldset>
<legend>svnserve's readme</legend>
<div>
<div>
<h2>svnserve's readme</h2>

A. Using svnserve
      ==============

   To use svnserve as your server, follow these steps:

     1. Open a new terminal (command prompt).

        NOTE: If you have an old command prompt open (prior to the Subversion
              installation), remember to open a brand new command prompt.

     2. Create a subversion repository.

        cd
        svnadmin create 

        For example:
        cd \repositories
        svnadmin create my-first-repos

     3. Setup a password database.

        Using notepad, edit the svnserve.conf file inside the conf directory of your
        repository.

        For example:
        If your repository is C:\repositories\my-first-repos
        svnserve.conf is:
        C:\repositories\my-first-repos\conf\svnserve.conf

        Inside svnserve.conf, you see the following information:

         ### The password-db option controls the location of the password
         ### database file.  Unless you specify a path starting with a /,
         ### the file's location is relative to the conf directory.
         ### Uncomment the line below to use the default password file.
         #password-db = passwd

       Follow the above instructions, and uncomment the "password-db=passwd"
       line, so that it simply says:

          password-db = passwd

     4. Setup usernames and passwords.

       Next, edit the passwd file. This passwd file is located in the
       same directory as svnserve.conf.

       Inside the passwd file, you see the following information:

       ### This file is an example password file for svnserve.
       ### Its format is similar to that of svnserve.conf. As shown in the
       ### example below it contains one section labelled [users].
       ### The name and password for each user follow, one account per line.

       [users]
       #harry = harryssecret
       #sally = sallyssecret

       To add a new user account, add your own username and password
       inside the [users] section. For example, if your name is "joe",
       and you want to set your password to "super-secret", add a
       new line like this:

         joe = super-secret

       Add as many users as you like.

     5. Open Port on Windows firewall.

        Before starting the server, the firewall must be notified that
        this particular port is going to be used. To enable this port in the
        Windows firewall, follow the instructions found here:

    <a title="http://www.microsoft.com/windowsxp/using/security/internet/sp2_wfexceptions.mspx" href="http://www.microsoft.com/windowsxp/using/security/internet/sp2_wfexceptions.mspx">http://www.microsoft.com/windowsxp/using/security/internet/sp2_wfexcepti...</a>

        Note: svnserve.exe is the program name which needs to be added to the
        exceptions list. Alternatively, you can also use the port where
        you decide to run the server. By default, svnserve runs on 3690.

     6. Start svnserve.

        If you elected to have the installer setup svnserve as a service, then open
        the Services application, find the entry for the Subversion server, and take
        the Start option. The service has been configured to start automatically
        on reboot. You can also run this command from the command line:

        net start svnserve

        If you did not install svnserve as a service and want to start the server
        manually, run this command:

        svnserve -d -r 

        For example: svnserve -d -r C:\repositories

     7. To provide read and write access to anonymous users, modify the
        conf/svnserve.conf file inside the repository.

        anon-access = write

        To restrict an anonymous user from the repository:

        anon-access = none

     8. Check out the repository.

        svn co svn://localhost/

        For example: svn co svn://localhost/my-first-repos

     Tip: If you check out your Subversion repository from a different computer,
     replace 'localhost' with the IP address or hostname of the machine which
     hosts the Subversion repository.
</div>

 
</div>
</fieldset>

 
</pre>
<h2>Installing Hudson, A Continuous Integration Server</h2>
<p>Download <a href="http://hudson.gotdns.com/latest/hudson.war" class="broken_link">Hudson</a>, if it downloads as a zip rename the extension as war(basically jar, war and ear are just zip files) and place it under tomcats webapps folder i.e. C:\java\apache-tomcat-6.0.18\webapps. Start tomcat and thats it you have installed Hudson.</p>
<h2>Installing  Maven</h2>
<p>For Java using Ant is old school. You should use maven instead. Why? because its so much better for project/dependency management and its plugin system adds so much more functionality than ant, for example take a look at <a href="http://maven.apache.org/plugins/index.html">apache&#8217;s plugins</a> and <a href="http://mojo.codehaus.org/plugins.html">codehaus plugins</a>. So we are going to create a Maven repository. First Download maven2 extract the zip to say c:\java\apache-maven-2.1.0 then set the environment variable M2_HOME to c:\java\apache-maven-2.1.0 and Path as %Path%;c:\java\apache-maven-2.1.0\bin open c:\java\apache-maven-2.1.0\conf\settings.xml uncomment localrepository and change the path to C:\java\maven-repo create a folder .m2 in your home folder which would be C:\Documents and Settings\\.m2 you can do this by command prompt C:\Documents and Settings\surya&gt;mkdir .m2 then create settings.xml and copy paste <a href="http://www.sonatype.com/books/nexus-book/reference/maven-sect-single-group.html">Example 3.1</a> (make sure to change the port) I also installed Nexus a Maven Repository Manager (due to m2eclipse supports nexus) Downloaded the open source war renamed to nexus.war and placed it inside tomcats webapp folder. logged in as administrator with username/password as admin/admin123 If you can see the repo that means its successfully installed.</p>
<h2>Installing  Trac</h2>
<p>Under Construction&#8230;</p>
<h2>In Conclusion</h2>
<p>Right now in this article i am focused on installing the dev system. Whenever i start working on my project, i will configure each system individually and will write about it.  You might have noticed, i am big fan of prepackaged binaries or wizard based software since they save time and do most of the work for you. Power user prefer to compile the source or extract from zip and manually configure it, the pros is, it increases your understanding and knowledge of the product , the cons would be it takes time, learning and going through documentation (which is not necessarily a bad thing ^_^). So personally (since i am developer and not administrator) if i can find a good wizard based software i will use that, otherwise i will use the zip version.  (Under Construction&#8230;,Jira)</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.nyayapati.com%2Fsurya%2F2009%2F05%2Fhowto-create-a-dev-server%2F&amp;title=Howto%20create%20a%20dev%20server" id="wpa2a_16"><img src="http://www.nyayapati.com/surya/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.nyayapati.com/surya/2009/05/howto-create-a-dev-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Maven: a lot better then Ant</title>
		<link>http://www.nyayapati.com/surya/2008/04/maven-a-lot-better-then-ant/</link>
		<comments>http://www.nyayapati.com/surya/2008/04/maven-a-lot-better-then-ant/#comments</comments>
		<pubDate>Sat, 05 Apr 2008 03:53:53 +0000</pubDate>
		<dc:creator>Surya</dc:creator>
				<category><![CDATA[Rant]]></category>

		<guid isPermaLink="false">http://www.nyayapati.com/surya/?p=7</guid>
		<description><![CDATA[Maven is a software tool for Java project management and build automation similar in functionality to the Apache Ant. Now a days a lot of open source java project are using Maven. Some of the main features are:- Making the build process easy and it is network-ready A way to share JARs across several projects &#8230; <a class="read-excerpt" href="http://www.nyayapati.com/surya/2008/04/maven-a-lot-better-then-ant/">Continue reading <span class="meta-nav">&#187;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Maven is a software tool for Java project management and build automation similar in functionality to the Apache Ant. Now a days a lot of open source java project are using Maven.<br />
Some of the main features are:-</p>
<ul>
<li>Making the build process easy and it is network-ready</li>
<li>A way to share JARs across several projects</li>
<li>Providing guidelines for best practices development i.e. to write unit test</li>
<li>Creates common configuration for eclipse for users of same project.</li>
<li><a href="http://maven.apache.org/maven-features.html">more</a>&#8230;</li>
</ul>
<p>To get started go here <a href="http://maven.apache.org/guides/getting-started/index.html">http://maven.apache.org/guides/getting-started/index.html</a><br />
also checkout <a href="http://en.wikipedia.org/wiki/Apache_Maven">http://en.wikipedia.org/wiki/Apache_Maven</a></p>
<p>A sample web project would look like<br />
/project-name<br />
/project-name/src/main/java<br />
/project-name/src/main/resources<br />
/project-name/src/test/java<br />
/project-name/src/test/resources<br />
/project-name/pom.xml<br />
/project-name/src/main/webapp/project-name/src/main/webapp/WEB-INF</p>
<p>Some of the commands i use</p>
<p>mvn eclipse:eclipse<br />
mvn clean<br />
mvn install<br />
<a href="http://maven.apache.org/plugins/index.html">more</a> &#8230;</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.nyayapati.com%2Fsurya%2F2008%2F04%2Fmaven-a-lot-better-then-ant%2F&amp;title=Maven%3A%20a%20lot%20better%20then%20Ant" id="wpa2a_18"><img src="http://www.nyayapati.com/surya/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.nyayapati.com/surya/2008/04/maven-a-lot-better-then-ant/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

