<?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>stJhimy - Playing around with codes!</title>
	<atom:link href="http://www.stjhimy.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.stjhimy.com</link>
	<description>Playing around with codes!</description>
	<lastBuildDate>Tue, 16 Feb 2010 03:04:01 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>How to put numbers on DataGridView rows!</title>
		<link>http://www.stjhimy.com/2010/02/16/how-to-put-number-on-datagridview-rows/</link>
		<comments>http://www.stjhimy.com/2010/02/16/how-to-put-number-on-datagridview-rows/#comments</comments>
		<pubDate>Tue, 16 Feb 2010 02:25:55 +0000</pubDate>
		<dc:creator>stJhimy</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[Random but Helpful]]></category>
		<category><![CDATA[DATAGRIDVIEW]]></category>

		<guid isPermaLink="false">http://www.stjhimy.com/2010/02/16/how-to-put-number-on-datagridview-rows/</guid>
		<description><![CDATA[Useless stuff but you will need someday. I was playing with .NET this afternoon and i get stocked in a question, how to put numbers on every row in a DataGridView?
The default is something like that:
 
 
Ok, if you go to your app and take a look at the DataGridView.rows.Add method you will see [...]]]></description>
			<content:encoded><![CDATA[<p>Useless stuff but you will need someday. I was playing with .NET this afternoon and i get stocked in a question, how to put numbers on every row in a DataGridView?</p>
<p>The default is something like that:</p>
<p><a href="http://www.stjhimy.com/wp-content/uploads/2010/02/image12.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.stjhimy.com/wp-content/uploads/2010/02/image_thumb9.png" width="521" height="296" /></a> </p>
<p> <span id="more-352"></span>
<p>Ok, if you go to your app and take a look at the DataGridView.rows.Add method you will see that returning an integer, it is the index of the new row.</p>
<p>So if get this number you can change the HeaderCell of this row.</p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:a3d6a02d-01e6-4975-9f17-d57827aedd63" class="wlWriterEditableSmartContent">
<div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt">
<div style="background: #000080; color: #fff; font-family: Verdana, Tahoma, Arial, sans-serif; font-weight: bold; padding: 2px 5px">Code Snippet</div>
<div style="background: #ddd; max-height: 300px; overflow: auto">
<ol style="background: #ffffff; margin: 0 0 0 2em; padding: 0 0 0 5px;">
<li><span style="color:#0000ff">for</span> (<span style="color:#0000ff">int</span> i = 0; i &lt; 3; i++)</li>
<li style="background: #f3f3f3">{</li>
<li>    <span style="color:#0000ff">int</span> row = dataGridView1.Rows.Add(<span style="color:#a31515">&quot;I saw a number&#8230;&quot;</span>, <span style="color:#a31515">&quot;I saw a number&#8230;&quot;</span>, <span style="color:#a31515">&quot;I saw a number&#8230;&quot;</span>);</li>
<li style="background: #f3f3f3">    <span style="color:#2b91af">DataGridViewRowHeaderCell</span> header = <span style="color:#0000ff">new</span> <span style="color:#2b91af">DataGridViewRowHeaderCell</span>();</li>
<li>    header.Value = row.ToString();</li>
<li style="background: #f3f3f3">    dataGridView1.Rows[row].HeaderCell = header;</li>
<li>}</li>
</ol></div>
</p></div>
</p></div>
<p>&#160;</p>
<p><a href="http://www.stjhimy.com/wp-content/uploads/2010/02/image61.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.stjhimy.com/wp-content/uploads/2010/02/image6_thumb.png" width="519" height="295" /></a></p>
<p><a href="http://www.stjhimy.com/wp-content/uploads/2010/02/image13.png"></a></p>
</p>
<p>Like i said … Useless stuff… but you will need someday <img src='http://www.stjhimy.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.stjhimy.com%2F2010%2F02%2F16%2Fhow-to-put-number-on-datagridview-rows%2F&amp;linkname=How%20to%20put%20numbers%20on%20DataGridView%20rows%21"><img src="http://www.stjhimy.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://www.stjhimy.com/2010/02/16/how-to-put-number-on-datagridview-rows/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Five Reasons why Monkeys &gt; #Fail Project Managers!</title>
		<link>http://www.stjhimy.com/2010/02/11/five-reasons-why-monkeys-fail-project-managers/</link>
		<comments>http://www.stjhimy.com/2010/02/11/five-reasons-why-monkeys-fail-project-managers/#comments</comments>
		<pubDate>Thu, 11 Feb 2010 22:18:22 +0000</pubDate>
		<dc:creator>stJhimy</dc:creator>
				<category><![CDATA[Random but Helpful]]></category>
		<category><![CDATA[MANAGERS]]></category>
		<category><![CDATA[MONKEYS]]></category>
		<category><![CDATA[TEAM]]></category>

		<guid isPermaLink="false">http://www.stjhimy.com/2010/02/11/five-reasons-why-monkeys-fail-project-managers/</guid>
		<description><![CDATA[
&#160;
Fail Managers can be quite burdens trying to lead a team to the success. Have you ever thought about the differences between a fail manager and a monkey?
Yeah, i think there’s just one, a monkey can lead your team to the success!&#160;

So, let’s think about that:
 
1 – Monkeys can learn with bad experiences
 
&#160;
They [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.stjhimy.com/wp-content/uploads/2010/02/monkey_suit.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; margin-left: 0px; border-left-width: 0px; margin-right: 0px" title="monkey_suit" border="0" alt="monkey_suit" align="left" src="http://www.stjhimy.com/wp-content/uploads/2010/02/monkey_suit_thumb.jpg" width="116" height="207" /></a></p>
<p>&#160;</p>
<p>Fail Managers can be quite burdens trying to lead a team to the success. Have you ever thought about the differences between a fail manager and a monkey?</p>
<p>Yeah, i think there’s just one, <strong>a monkey can lead your team to the success!</strong>&#160;</p>
</p>
<p>So, let’s think about that:</p>
<p> <span id="more-343"></span>
<p>1 – Monkeys can learn with bad experiences</p>
<p><a href="http://www.stjhimy.com/wp-content/uploads/2010/02/1.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; margin-left: 0px; border-left-width: 0px; margin-right: 0px" title="1" border="0" alt="1" align="left" src="http://www.stjhimy.com/wp-content/uploads/2010/02/1_thumb.jpg" width="110" height="121" /></a> </p>
<p>&#160;</p>
<p>They can make the wrong choice one..two…even three times, but one day they will learn and make the right choice, your fail manager can&#8217;t!</p>
<p>&#160;</p>
<p>2 – Monkeys Don’t fall in love like a child</p>
<p><a href="http://www.stjhimy.com/wp-content/uploads/2010/02/2.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; margin-left: 0px; border-left-width: 0px; margin-right: 0px" title="2" border="0" alt="2" align="left" src="http://www.stjhimy.com/wp-content/uploads/2010/02/2_thumb.jpg" width="125" height="160" /></a> </p>
<p>&#160;</p>
<p>and forgot about the job. Fail manager do!</p>
<p>&#160;</p>
<p>&#160;</p>
<p>&#160;</p>
<p>3 – Monkeys can defend their instincts</p>
<p><a href="http://www.stjhimy.com/wp-content/uploads/2010/02/3.jpg"><img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="3" border="0" alt="3" src="http://www.stjhimy.com/wp-content/uploads/2010/02/3_thumb.jpg" width="253" height="217" /></a> </p>
<p>and don&#8217;t get by some random guy. Fail managers do!</p>
<p>4 – Monkeys know the differences between night and day</p>
<p><a href="http://www.stjhimy.com/wp-content/uploads/2010/02/4.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; margin-left: 0px; border-left-width: 0px; margin-right: 0px" title="4" border="0" alt="4" align="left" src="http://www.stjhimy.com/wp-content/uploads/2010/02/4_thumb.jpg" width="138" height="138" /></a> </p>
<p>&#160;</p>
<p>And they know when is the right moment to work and when is the right moment to sleep.</p>
<p>&#160;</p>
<p>&#160;</p>
<p>5 – Monkeys can express themselves better than humans sometimes…</p>
<p><a href="http://www.stjhimy.com/wp-content/uploads/2010/02/image6.png"><img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="image" border="0" alt="image" src="http://www.stjhimy.com/wp-content/uploads/2010/02/image_thumb6.png" width="264" height="293" /></a>&#160; </p>
<p>Definitely let’s hire monkeys to our teams. Your future&#8217;s projects depends on it. <img src='http://www.stjhimy.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>
<p><a href="http://www.stjhimy.com/wp-content/uploads/2010/02/last.jpg"><img style="border-bottom: 0px; border-left: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px" title="last" border="0" alt="last" src="http://www.stjhimy.com/wp-content/uploads/2010/02/last_thumb.jpg" width="432" height="517" /></a> </p>
<p>PS1 &#8211; Let your comments and spread the word, publish my post in your social media networks if you like.</p>
<p>PS2 &#8211; Feel free to find me on your social networks using the right bar!</p>
<p>PS3 – Thanks for the tips <a href="http://twitter.com/facirollitalita">@facirollitalita</a></p>
<p>&#160;</p>
<p>Thanks everyone and cya!</p>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.stjhimy.com%2F2010%2F02%2F11%2Ffive-reasons-why-monkeys-fail-project-managers%2F&amp;linkname=Five%20Reasons%20why%20Monkeys%20%26gt%3B%20%23Fail%20Project%20Managers%21"><img src="http://www.stjhimy.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://www.stjhimy.com/2010/02/11/five-reasons-why-monkeys-fail-project-managers/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>.NET Pipelines and Filters!</title>
		<link>http://www.stjhimy.com/2010/02/07/net-pipelines-and-filters/</link>
		<comments>http://www.stjhimy.com/2010/02/07/net-pipelines-and-filters/#comments</comments>
		<pubDate>Sun, 07 Feb 2010 18:12:52 +0000</pubDate>
		<dc:creator>stJhimy</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[CODES]]></category>
		<category><![CDATA[FILTERS]]></category>
		<category><![CDATA[PIPELINES]]></category>

		<guid isPermaLink="false">http://www.stjhimy.com/2010/02/07/net-pipelines-and-filters/</guid>
		<description><![CDATA[ 
&#160;
&#160;
First of all, we need to understand the concept of pipelines and filters, Wikipedia says:
Pipeline (computing)


 Instruction scheduling on the Intel Pentium 4.
In computing, a pipeline is a set of data processing elements connected in series, so that the output of one element is the input of the next one. The elements of a [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.stjhimy.com/wp-content/uploads/2010/02/filter256.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; margin-left: 0px; border-top: 0px; margin-right: 0px; border-right: 0px" title="filter-256" border="0" alt="filter-256" align="left" src="http://www.stjhimy.com/wp-content/uploads/2010/02/filter256_thumb.png" width="116" height="116" /></a> </p>
<p>&#160;</p>
<p>&#160;</p>
<p>First of all, we need to understand the concept of pipelines and filters, Wikipedia says:</p>
<h3>Pipeline (computing)</h3>
<h5>
<p><a href="http://en.wikipedia.org/wiki/Pipeline_%28computing%29#searchInput"></a></p>
<p> Instruction scheduling on the Intel Pentium 4.</h5>
<p>In <a href="http://en.wikipedia.org/wiki/Computing">computing</a>, a <b>pipeline</b> is a set of data processing elements connected in series, so that the output of one element is the input of the next one. The elements of a pipeline are often executed in parallel or in time-sliced fashion; in that case, some amount of <a href="http://en.wikipedia.org/wiki/Buffer_%28computer_science%29">buffer storage</a> is often inserted between elements.</p>
<p>&#160;</p>
<h3>Filter (higher-order function)</h3>
<h5>
<p><a href="http://en.wikipedia.org/wiki/Filter_%28higher-order_function%29#searchInput"></a></p>
<p> In <a href="http://en.wikipedia.org/wiki/Functional_programming">functional programming</a>, <b>filter</b> is a <a href="http://en.wikipedia.org/wiki/Higher-order_function">higher-order function</a> that processes a <a href="http://en.wikipedia.org/wiki/Data_structure">data structure</a> (typically a <a href="http://en.wikipedia.org/wiki/List_%28data_structure%29">list</a>) in some order to produce a new data structure containing exactly those elements of the original data structure for which a given <a href="http://en.wikipedia.org/wiki/Predicate_%28computer_programming%29">predicate</a> returns the <a href="http://en.wikipedia.org/wiki/Boolean_value">boolean value</a> true.</h5>
<p>&#160;</p>
<p>Basically we can create a pipeline with filters resulting in some final product we want.</p>
<p>Let’s make it clear:</p>
<p> <span id="more-328"></span>
<p>We have a class called PC with the properties LCD (boolean) and WiFi(boolean):</p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:1a51c812-75a3-4223-af99-27865be5851c" class="wlWriterEditableSmartContent">
<div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt">
<div style="background: #000080; color: #fff; font-family: Verdana, Tahoma, Arial, sans-serif; font-weight: bold; padding: 2px 5px">Code Snippet</div>
<div style="background: #ddd; max-height: 300px; overflow: auto">
<ol style="background: #ffffff; margin: 0 0 0 2.5em; padding: 0 0 0 5px;">
<li><span style="color:#0000ff">using</span> System;</li>
<li style="background: #f3f3f3"><span style="color:#0000ff">using</span> System.Collections.Generic;</li>
<li><span style="color:#0000ff">using</span> System.Linq;</li>
<li style="background: #f3f3f3"><span style="color:#0000ff">using</span> System.Text;</li>
<li>&nbsp;</li>
<li style="background: #f3f3f3"><span style="color:#0000ff">namespace</span> PipeLinesAndFilters</li>
<li>{</li>
<li style="background: #f3f3f3">    <span style="color:#0000ff">public</span> <span style="color:#0000ff">class</span> <span style="color:#2b91af">PC</span></li>
<li>    {</li>
<li style="background: #f3f3f3">        <span style="color:#0000ff">public</span> <span style="color:#0000ff">bool</span> LCD { <span style="color:#0000ff">get</span>; <span style="color:#0000ff">set</span>; }</li>
<li>        <span style="color:#0000ff">public</span> <span style="color:#0000ff">bool</span> WiFI { <span style="color:#0000ff">get</span>; <span style="color:#0000ff">set</span>; }</li>
<li style="background: #f3f3f3">    }</li>
<li>}</li>
</ol></div>
</p></div>
</p></div>
<p>We have 3 PCS: </p>
<table border="0" cellspacing="0" cellpadding="2" width="400">
<tbody>
<tr>
<td valign="top" width="133">PC</td>
<td valign="top" width="133">LCD</td>
<td valign="top" width="133">WiFi</td>
</tr>
<tr>
<td valign="top" width="133">1</td>
<td valign="top" width="133">true</td>
<td valign="top" width="133">true</td>
</tr>
<tr>
<td valign="top" width="133">2</td>
<td valign="top" width="133">true</td>
<td valign="top" width="133">false</td>
</tr>
<tr>
<td valign="top" width="133">3</td>
<td valign="top" width="133">false</td>
<td valign="top" width="133">false</td>
</tr>
</tbody>
</table>
<p>&#160;</p>
<p>We code this:</p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:cceaae9e-edf5-40e7-b859-e3444fc18c1b" class="wlWriterEditableSmartContent">
<div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt">
<div style="background: #000080; color: #fff; font-family: Verdana, Tahoma, Arial, sans-serif; font-weight: bold; padding: 2px 5px">Code Snippet</div>
<div style="background: #ddd; overflow: auto">
<ol style="background: #ffffff; margin: 0 0 0 2.5em; padding: 0 0 0 5px;">
<li><span style="color:#2b91af">PC</span> pc1 = <span style="color:#0000ff">new</span> <span style="color:#2b91af">PC</span>();</li>
<li style="background: #f3f3f3">pc1.LCD = <span style="color:#0000ff">true</span>;</li>
<li>pc1.WiFI = <span style="color:#0000ff">true</span>;</li>
<li style="background: #f3f3f3">&nbsp;</li>
<li><span style="color:#2b91af">PC</span> pc2 = <span style="color:#0000ff">new</span> <span style="color:#2b91af">PC</span>();</li>
<li style="background: #f3f3f3">pc2.LCD = <span style="color:#0000ff">true</span>;</li>
<li>pc2.WiFI = <span style="color:#0000ff">false</span>;</li>
<li style="background: #f3f3f3">&nbsp;</li>
<li><span style="color:#2b91af">PC</span> pc3 = <span style="color:#0000ff">new</span> <span style="color:#2b91af">PC</span>();</li>
<li style="background: #f3f3f3">pc3.LCD = <span style="color:#0000ff">false</span>;</li>
<li>pc3.WiFI = <span style="color:#0000ff">false</span>;</li>
</ol></div>
</p></div>
</p></div>
<p>&#160;</p>
<p>We put this pcs into a list</p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:ff249042-348a-4d80-acd0-217e701e9b94" class="wlWriterEditableSmartContent">
<div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt">
<div style="background: #000080; color: #fff; font-family: Verdana, Tahoma, Arial, sans-serif; font-weight: bold; padding: 2px 5px">Code Snippet</div>
<div style="background: #ddd; overflow: auto">
<ol style="background: #ffffff; margin: 0 0 0 2.5em; padding: 0 0 0 5px;">
<li><span style="color:#2b91af">List</span>&lt;<span style="color:#2b91af">PC</span>&gt; lstPcs = <span style="color:#0000ff">new</span> <span style="color:#2b91af">List</span>&lt;<span style="color:#2b91af">PC</span>&gt;();</li>
<li style="background: #f3f3f3">&nbsp;</li>
<li><span style="color:#2b91af">PC</span> pc1 = <span style="color:#0000ff">new</span> <span style="color:#2b91af">PC</span>();</li>
<li style="background: #f3f3f3">pc1.LCD = <span style="color:#0000ff">true</span>;</li>
<li>pc1.WiFI = <span style="color:#0000ff">true</span>;</li>
<li style="background: #f3f3f3">lstPcs.Add(pc1);</li>
<li>&nbsp;</li>
<li style="background: #f3f3f3"><span style="color:#2b91af">PC</span> pc2 = <span style="color:#0000ff">new</span> <span style="color:#2b91af">PC</span>();</li>
<li>pc2.LCD = <span style="color:#0000ff">true</span>;</li>
<li style="background: #f3f3f3">pc2.WiFI = <span style="color:#0000ff">false</span>;</li>
<li>lstPcs.Add(pc2);</li>
<li style="background: #f3f3f3">&nbsp;</li>
<li><span style="color:#2b91af">PC</span> pc3 = <span style="color:#0000ff">new</span> <span style="color:#2b91af">PC</span>();</li>
<li style="background: #f3f3f3">pc3.LCD = <span style="color:#0000ff">false</span>;</li>
<li>pc3.WiFI = <span style="color:#0000ff">false</span>;</li>
<li style="background: #f3f3f3">lstPcs.Add(pc3);</li>
</ol></div>
</p></div>
</p></div>
<p>&#160;</p>
<p>So now we start working with pipelines and filters.</p>
<p>We will create extension methods(<a href="http://www.stjhimy.com/2009/12/15/extension-methods-in-net-how-to-customize-internal-c-classes/">Here’s my post about extension methods</a>) so we can filter this list, and then we&#8217;ll be able to do something like that: </p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:5ef74651-cb8e-435b-b4ac-fa89c9f4a512" class="wlWriterEditableSmartContent">
<div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt">
<div style="background: #000080; color: #fff; font-family: Verdana, Tahoma, Arial, sans-serif; font-weight: bold; padding: 2px 5px">Code Snippet</div>
<div style="background: #ddd; max-height: 300px; overflow: auto">
<ol style="background: #ffffff; margin: 0 0 0 2em; padding: 0 0 0 5px;">
<li>lstPcs.WithLCD(<span style="color:#0000ff">true</span>);</li>
</ol></div>
</p></div>
</p></div>
<p>&#160;</p>
<p>Or</p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:a24de502-2523-4ef2-820e-9ef86fb89231" class="wlWriterEditableSmartContent">
<div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt">
<div style="background: #000080; color: #fff; font-family: Verdana, Tahoma, Arial, sans-serif; font-weight: bold; padding: 2px 5px">Code Snippet</div>
<div style="background: #ddd; max-height: 300px; overflow: auto">
<ol style="background: #ffffff; margin: 0 0 0 2em; padding: 0 0 0 5px;">
<li>lstPcs.WithWiFi(<span style="color:#0000ff">false</span>);</li>
</ol></div>
</p></div>
</p></div>
<p>&#160;</p>
<p>Now we must create our PCFilters class and implement our extension methods.</p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:b3f1a0ed-c757-4606-8938-a67c5dd933db" class="wlWriterEditableSmartContent">
<div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt">
<div style="background: #000080; color: #fff; font-family: Verdana, Tahoma, Arial, sans-serif; font-weight: bold; padding: 2px 5px">Code Snippet</div>
<div style="background: #ddd; overflow: auto">
<ol style="background: #ffffff; margin: 0 0 0 2.5em; padding: 0 0 0 5px;">
<li><span style="color:#0000ff">using</span> System;</li>
<li style="background: #f3f3f3"><span style="color:#0000ff">using</span> System.Collections.Generic;</li>
<li><span style="color:#0000ff">using</span> System.Linq;</li>
<li style="background: #f3f3f3"><span style="color:#0000ff">using</span> System.Text;</li>
<li>&nbsp;</li>
<li style="background: #f3f3f3"><span style="color:#0000ff">namespace</span> PipeLinesAndFilters</li>
<li>{</li>
<li style="background: #f3f3f3">    <span style="color:#0000ff">public</span> <span style="color:#0000ff">static</span> <span style="color:#0000ff">class</span> <span style="color:#2b91af">PCFilters</span></li>
<li>    {</li>
<li style="background: #f3f3f3">        <span style="color:#0000ff">public</span> <span style="color:#0000ff">static</span> <span style="color:#2b91af">List</span>&lt;<span style="color:#2b91af">PC</span>&gt; WithLCD(<span style="color:#0000ff">this</span> <span style="color:#2b91af">List</span>&lt;<span style="color:#2b91af">PC</span>&gt; lstPCS, <span style="color:#0000ff">bool</span> lcd)</li>
<li>        {</li>
<li style="background: #f3f3f3">&nbsp;</li>
<li>        }</li>
<li style="background: #f3f3f3">&nbsp;</li>
<li>        <span style="color:#0000ff">public</span> <span style="color:#0000ff">static</span> <span style="color:#2b91af">List</span>&lt;<span style="color:#2b91af">PC</span>&gt; WithWiFi(<span style="color:#0000ff">this</span> <span style="color:#2b91af">List</span>&lt;<span style="color:#2b91af">PC</span>&gt; lstPCS, <span style="color:#0000ff">bool</span> wifi)</li>
<li style="background: #f3f3f3">        {</li>
<li>&nbsp;</li>
<li style="background: #f3f3f3">        }</li>
<li>    }</li>
<li style="background: #f3f3f3">}</li>
</ol></div>
</p></div>
</p></div>
<p>&#160;</p>
<p>Ok, we have our methods, but we need to return something, and that is our primary list List&lt;PC&gt; lstPCS filtered.</p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:55ecca88-1e81-4db4-a868-bb9cb2b64cc6" class="wlWriterEditableSmartContent">
<div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt">
<div style="background: #000080; color: #fff; font-family: Verdana, Tahoma, Arial, sans-serif; font-weight: bold; padding: 2px 5px">Code Snippet</div>
<div style="background: #ddd; max-height: 300px; overflow: auto">
<ol style="background: #ffffff; margin: 0 0 0 2.5em; padding: 0 0 0 5px;">
<li><span style="color:#0000ff">public</span> <span style="color:#0000ff">static</span> <span style="color:#0000ff">class</span> <span style="color:#2b91af">PCFilters</span></li>
<li style="background: #f3f3f3">{</li>
<li>    <span style="color:#0000ff">public</span> <span style="color:#0000ff">static</span> <span style="color:#2b91af">List</span>&lt;<span style="color:#2b91af">PC</span>&gt; WithLCD(<span style="color:#0000ff">this</span> <span style="color:#2b91af">List</span>&lt;<span style="color:#2b91af">PC</span>&gt; lstPCS, <span style="color:#0000ff">bool</span> lcd)</li>
<li style="background: #f3f3f3">    {</li>
<li>        <span style="color:#0000ff">return</span> lstPCS.FindAll(p =&gt; p.LCD == lcd);</li>
<li style="background: #f3f3f3">    }</li>
<li>&nbsp;</li>
<li style="background: #f3f3f3">    <span style="color:#0000ff">public</span> <span style="color:#0000ff">static</span> <span style="color:#2b91af">List</span>&lt;<span style="color:#2b91af">PC</span>&gt; WithWiFi(<span style="color:#0000ff">this</span> <span style="color:#2b91af">List</span>&lt;<span style="color:#2b91af">PC</span>&gt; lstPCS, <span style="color:#0000ff">bool</span> wifi)</li>
<li>    {</li>
<li style="background: #f3f3f3">        <span style="color:#0000ff">return</span> lstPCS.FindAll(p =&gt; p.WiFI == wifi);</li>
<li>    }</li>
<li style="background: #f3f3f3">}</li>
</ol></div>
</p></div>
</p></div>
<p>&#160;</p>
<p>Now you can try filter our primary list using this extension methods (our filters) and create pipelines with this filters resulting in anything you want:</p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:7c799fd8-14bb-4b04-b3da-3c3dc1508fa5" class="wlWriterEditableSmartContent">
<div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt">
<div style="background: #000080; color: #fff; font-family: Verdana, Tahoma, Arial, sans-serif; font-weight: bold; padding: 2px 5px">Code Snippet</div>
<div style="background: #ddd; max-height: 300px; overflow: auto">
<ol style="background: #ffffff; margin: 0 0 0 2em; padding: 0 0 0 5px;">
<li>lstPcs.WithLCD(<span style="color:#0000ff">true</span>).WithWiFi(<span style="color:#0000ff">false</span>);</li>
<li style="background: #f3f3f3">lstPcs.WithWiFi(<span style="color:#0000ff">true</span>).WithLCD(<span style="color:#0000ff">true</span>);</li>
</ol></div>
</p></div>
</p></div>
<p>&#160;</p>
<p>Ok! Our Pipelines and filters works like a charm&#160; <img src='http://www.stjhimy.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>
<p>It may sound stupid when you have a class with 2 properties, but it can make your code really clear when you have a big project with hundreds of classes and properties.</p>
<p>Get your logic classes away from LinqToSql queries is nice <img src='http://www.stjhimy.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>PS1 &#8211; Let your comments and spread the word, publish my post in your social media networks if you like.</p>
<p>PS2 &#8211; Feel free to find me on your social networks using the right bar!</p>
<p>&#160;</p>
<p>Thanks everyone and cya!</p>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.stjhimy.com%2F2010%2F02%2F07%2Fnet-pipelines-and-filters%2F&amp;linkname=.NET%20Pipelines%20and%20Filters%21"><img src="http://www.stjhimy.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://www.stjhimy.com/2010/02/07/net-pipelines-and-filters/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>JRuby on Rails using Windows!</title>
		<link>http://www.stjhimy.com/2010/02/07/jruby-on-rails-using-windows/</link>
		<comments>http://www.stjhimy.com/2010/02/07/jruby-on-rails-using-windows/#comments</comments>
		<pubDate>Sun, 07 Feb 2010 16:22:36 +0000</pubDate>
		<dc:creator>stJhimy</dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[JRuby]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[RubyOnRails]]></category>

		<guid isPermaLink="false">http://www.stjhimy.com/2010/02/07/jruby-on-rails-using-windows/</guid>
		<description><![CDATA[ 

Everyone knows that developing rails applications on Windows is quite a burden, right?
It’s so slow and …i cannot find the right word, but it really sucks.
If you are tired of that, there’s a solution to speed up your rails development on windows, that’s called JRuby on Rails!

 
But first, what is JRuby? 
Wikipedia says: [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.stjhimy.com/wp-content/uploads/2010/02/image.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.stjhimy.com/wp-content/uploads/2010/02/image_thumb.png" width="606" height="168" /></a> </p>
<p>
<p>Everyone knows that developing rails applications on Windows is quite a burden, right?</p>
<p>It’s so slow and …i cannot find the right word, but it really sucks.</p>
<p>If you are tired of that, there’s a solution to speed up your rails development on windows, that’s called <strong>JRuby on Rails!</strong></p>
</p>
<p> <span id="more-324"></span>
<p>But first, what is JRuby? </p>
<p>Wikipedia says: </p>
<p><b>JRuby</b> is a <a href="http://en.wikipedia.org/wiki/Java_%28programming_language%29">Java</a> implementation of the <a href="http://en.wikipedia.org/wiki/Ruby_%28programming_language%29">Ruby programming language</a>, being developed by the JRuby team. It is <a href="http://en.wikipedia.org/wiki/Free_software">free software</a> released under a three-way <a href="http://en.wikipedia.org/wiki/Common_Public_License">CPL</a>/<a href="http://en.wikipedia.org/wiki/GNU_General_Public_License">GPL</a>/<a href="http://en.wikipedia.org/wiki/GNU_Lesser_General_Public_License">LGPL</a> license. JRuby is tightly integrated with <a href="http://en.wikipedia.org/wiki/Java_%28programming_language%29">Java</a> to allow the embedding of the interpreter into any Java application with full two-way access between the Java and the Ruby code (similar to <a href="http://en.wikipedia.org/wiki/Jython">Jython</a> for the Python language).</p>
<p>&#160;</p>
<p>Basically is your ruby running in the JVM which is faster than ruby on windows. </p>
<p>So, we got the idea, let’s install that now, first download the next packages:</p>
<p>links: </p>
<p>- <a href="http://java.sun.com/javase/downloads/widget/jdk6.jsp">Java Development Kit</a> aka JDK (if you don’t have java on your pc)</p>
<p>- <a href="http://jruby.kenai.com/downloads/1.4.0/jruby_windows_1_4_0.exe">JRuby Windows Installer</a></p>
<p>&#160;</p>
<p>First double click on Java Development Kit and install, just next next next, forever next.</p>
<p>Then install the JRuby Windows Installer, double click and next next, you should see something like that:</p>
<p><a href="http://www.stjhimy.com/wp-content/uploads/2010/02/image1.png"><img style="border-bottom: 0px; border-left: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px" title="image" border="0" alt="image" src="http://www.stjhimy.com/wp-content/uploads/2010/02/image_thumb1.png" width="453" height="353" /></a> </p>
<p>Check out the box so we haven&#8217;t to add the Jruby to our windows path. Click next and wait for the end of the installation.</p>
</p>
<p>So now we can check if JRuby was installed correctly, open your cmd console and type:</p>
<p><a href="http://www.stjhimy.com/wp-content/uploads/2010/02/image2.png"><img style="border-bottom: 0px; border-left: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px" title="image" border="0" alt="image" src="http://www.stjhimy.com/wp-content/uploads/2010/02/image_thumb2.png" width="590" height="295" /></a> </p>
<p>ok, as we can see, we have the Jruby 1.4.0 installed, next step is to install the rails gem .</p>
<p>in your console type: </p>
<table border="0" cellspacing="0" cellpadding="2" width="400">
<tbody>
<tr>
<td valign="top" width="400">
<pre>1 - jruby -S gem install mongrel activerecord-jdbcmysql-adapter rails</pre>
</td>
</tr>
</tbody>
</table>
<p>&#160;</p>
<p>That will install the mongrel server, the jdbcmysql driver so we can connect with a&#160; mysql database and the rails gems.</p>
<p><a href="http://www.stjhimy.com/wp-content/uploads/2010/02/image3.png"><img style="border-bottom: 0px; border-left: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px" title="image" border="0" alt="image" src="http://www.stjhimy.com/wp-content/uploads/2010/02/image_thumb3.png" width="618" height="309" /></a> </p>
<p>Ok, now if you type :</p>
<table border="0" cellspacing="0" cellpadding="2" width="400">
<tbody>
<tr>
<td valign="top" width="400">2 – rails –v</td>
</tr>
</tbody>
</table>
<p>&#160;</p>
<p><a href="http://www.stjhimy.com/wp-content/uploads/2010/02/image4.png"><img style="border-bottom: 0px; border-left: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px" title="image" border="0" alt="image" src="http://www.stjhimy.com/wp-content/uploads/2010/02/image_thumb4.png" width="624" height="309" /></a> </p>
<p>OHAY! Our JRuby on Rails is running fine : ) </p>
<p>Let’s try to create an application:</p>
<p>First create the app:</p>
<table border="0" cellspacing="0" cellpadding="2" width="400">
<tbody>
<tr>
<td valign="top" width="400">
<pre>jruby -S rails myapp -d mysql</pre>
</td>
</tr>
</tbody>
</table>
<p>&#160;</p>
<p>Go to your database.yml and change the adapter, remember now we are running JRuby so we need the jdbcmysql adapter:</p>
<table border="0" cellspacing="0" cellpadding="2" width="400">
<tbody>
<tr>
<td valign="top" width="400">
<pre>   1: development:</pre>
<pre>   2:   adapter: jdbcmysql</pre>
<pre>   3:   encoding: utf8</pre>
<pre>   4:   database: myapp_development</pre>
<pre>   5:   username: root</pre>
<pre>   6:   password:</pre>
</td>
</tr>
</tbody>
</table>
<p>&#160;</p>
<p>Run your server:</p>
<table border="0" cellspacing="0" cellpadding="2" width="400">
<tbody>
<tr>
<td valign="top" width="400">
<pre> jruby script/server</pre>
</td>
</tr>
</tbody>
</table>
<p>&#160;</p>
<p>Go to your browser and type <a href="http://localhost:3000/">http://localhost:3000/</a></p>
<p><a href="http://www.stjhimy.com/wp-content/uploads/2010/02/image5.png"><img style="border-bottom: 0px; border-left: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px" title="image" border="0" alt="image" src="http://www.stjhimy.com/wp-content/uploads/2010/02/image_thumb5.png" width="567" height="424" /></a> </p>
<p>OHAY! we are done and our application is running like a charm <img src='http://www.stjhimy.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>
<p>PS1: I do not use Internet Explorer 6, since i was in a virtual machine running windows xp and i am too lazy to install firefox 6 i&#8217;ve decided to use I.E for this tutorial <img src='http://www.stjhimy.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>
<p>PS2: Let your comments and spread the word, publish my post in your social media networks if you like.</p>
<p>PS3: Feel free to find me in your social networks using the right bar!</p>
<p>&#160;</p>
<p>Thanks everyone and cya!</p>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.stjhimy.com%2F2010%2F02%2F07%2Fjruby-on-rails-using-windows%2F&amp;linkname=JRuby%20on%20Rails%20using%20Windows%21"><img src="http://www.stjhimy.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://www.stjhimy.com/2010/02/07/jruby-on-rails-using-windows/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>My First Firefox Theme &#8211; Part II</title>
		<link>http://www.stjhimy.com/2010/01/16/my-first-firefox-theme-part-ii/</link>
		<comments>http://www.stjhimy.com/2010/01/16/my-first-firefox-theme-part-ii/#comments</comments>
		<pubDate>Sun, 17 Jan 2010 00:31:07 +0000</pubDate>
		<dc:creator>stJhimy</dc:creator>
				<category><![CDATA[Random but Helpful]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[FIREFOX]]></category>
		<category><![CDATA[THEMES]]></category>

		<guid isPermaLink="false">http://www.stjhimy.com/2010/01/16/my-first-firefox-theme-part-ii/</guid>
		<description><![CDATA[Hi everyone. I’m back here to talk a little bit more about Firefox Themes. For those who read the last part, you guys remember that it was just an introduction about themes.
Today I’m going to talk how to put a background in your first Firefox theme. It’s pretty easy.
 
I’m supposing that everything that has [...]]]></description>
			<content:encoded><![CDATA[<p>Hi everyone. I’m back here to talk a little bit more about Firefox Themes. For those who read the last part, you guys remember that it was just an introduction about themes.</p>
<p>Today I’m going to talk how to put a background in your first Firefox theme. It’s pretty easy.</p>
<p> <span id="more-311"></span>
<p>I’m supposing that everything that has been said in the last part is working. By the way, if you found anything wrong there, please let your comment here. </p>
<p>Now, let’s get this work started.</p>
<p>Go to the folder: /global/ and find the CSS file named toolbar.css.</p>
<p>This CSS file controls everything you see when you open Firefox. Theme background, borders, palettes and all that stuff. For you who don’t understand so much, or anything about CSS. There are some links here which can help you:</p>
<p>- <a href="http://www.html.net/tutorials/CSS/">http://www.html.net/tutorials/CSS/</a> (A bunch of lessons about CSS)</p>
<p>- <a href="http://htmldog.com/guides/">http://htmldog.com/guides/</a> (A lot of tutorials for beginners, and advanced users)</p>
<p>Now open this file using a text writer you prefer. Ignore those comments and let’s try to put a background in your theme. To insert a background, use the first part of this CSS file: “/*::::: toolbox ::::: */”, and copy/paste this code, it’s really simple:</p>
<p><a href="http://www.stjhimy.com/wp-content/uploads/2010/01/clip_image002.jpg"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="clip_image002" border="0" alt="clip_image002" src="http://www.stjhimy.com/wp-content/uploads/2010/01/clip_image002_thumb.jpg" width="494" height="86" /></a></p>
<p>PS: url is where you put your image’s path.</p>
<p>PS2: About the picture, as far as I could see, Firefox doesn’t resize your image, so I recommend creating a picture 2000&#215;200. I don’t believe a lot of people use screen resolution higher than 2000x but, it’s on your way.</p>
<p>Pretty simple, han? </p>
<p>That’s all for today, if I find anything else that can be important I’ll be pleasure to share with you.    <br />What I can say about Firefox themes is, try to understand every single CSS file, and to connect them to their images. I think background was the only thing I thought it’d not be so obvious to do. But there it is, hope you enjoy. My First Firefox Theme ends here. </p>
<p>Feel free to let your comments here. Thanks a million!</p>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.stjhimy.com%2F2010%2F01%2F16%2Fmy-first-firefox-theme-part-ii%2F&amp;linkname=My%20First%20Firefox%20Theme%20%26ndash%3B%20Part%20II"><img src="http://www.stjhimy.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://www.stjhimy.com/2010/01/16/my-first-firefox-theme-part-ii/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>My First Firefox Theme &#8211; Part 1</title>
		<link>http://www.stjhimy.com/2010/01/06/my-first-firefox-theme-part-1/</link>
		<comments>http://www.stjhimy.com/2010/01/06/my-first-firefox-theme-part-1/#comments</comments>
		<pubDate>Thu, 07 Jan 2010 01:33:51 +0000</pubDate>
		<dc:creator>stJhimy</dc:creator>
				<category><![CDATA[Random but Helpful]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[FIREFOX]]></category>
		<category><![CDATA[PNG]]></category>
		<category><![CDATA[THEMES]]></category>

		<guid isPermaLink="false">http://www.stjhimy.com/2010/01/06/my-first-firefox-theme-part-1/</guid>
		<description><![CDATA[Hi, welcome back…i’m not having a lot of time to post new useful things so&#160; a friend of mine will  post something awesome, how to create themes for firefox!
You can follow him here: @fpgentil 
So enjoy it!
 
First of all, you should know what exactly you must have to build your first Firefox theme. [...]]]></description>
			<content:encoded><![CDATA[<p>Hi, welcome back…i’m not having a lot of time to post new useful things so&#160; a friend of mine will <a href="http://www.stjhimy.com/wp-content/uploads/2010/01/Firefox_256x256.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; margin-left: 0px; border-top: 0px; margin-right: 0px; border-right: 0px" title="Firefox_256x256" border="0" alt="Firefox_256x256" align="left" src="http://www.stjhimy.com/wp-content/uploads/2010/01/Firefox_256x256_thumb.png" width="98" height="98" /></a> post something awesome, how to create themes for firefox!</p>
<p>You can follow him here: <code><a href="http://twitter.com/fpgentil">@fpgentil</a> </code></p>
<p><code><strong>So enjoy it!</strong></code></p>
<p> <span id="more-305"></span>
<p>First of all, you should know what exactly you must have to build your first Firefox theme. Let’s get it started by understanding some concepts.</p>
<p>Basically a Firefox theme is a bunch of CSS and PNG files, which are interpreted by Firefox. But, as far as Firefox follows some rules, the best and easiest way to start, is get a classic Firefox Theme, and work on it.</p>
<p>So, let’s stop talking and get some work to do. We should start by getting this classic theme. It starts by creating your theme folder, then go to the Firefox folder:</p>
<p><b>Windows</b>:<code> \Program Files\Mozilla Firefox\chrome\classic.jar</code></p>
<p><b>Linux</b>: <code>/usr/lib/MozillaFirefox/chrome/classic.jar</code> <em>or</em> <code>/usr/lib/firefox-*.*.*/chrome/classic.jar</code></p>
<p><b>Mac OS X</b>: <code>/Applications/Firefox.app/Contents/MacOS/chrome/classic.jar</code></p>
<p> <code></code>
<p><code><font face="Lucida Sans">Unpack this .jar file. Open “..\classic\skin\classic” and copy all folders (browser, communicator, global and mozapps) to your Firefox theme one.</font></code></p>
<p><code><font face="Lucida Sans">Now let’s talk about some other files you must create before start developing your application.</font></code></p>
<p> <code><font face="Lucida Sans">&#160;</font></code>
<p><code><font face="Lucida Sans">Open notepad or any other text writer you prefer, and create two empty files called: ‘install.rdf’, and ‘chrome.manifest’, without extension.</font></code></p>
<p><code><font face="Lucida Sans">Then, using Photoshop, paint brush, or any other image maker software, create two pictures: icon.png (32x32) and preview.png(150x150).</font></code></p>
<p><code><font face="Lucida Sans">Icon.png is going to be your theme icon, and preview the picture you see before install your application.</font></code></p>
<p> <code><font face="lucida sa">&#160;</font></code>
<p><code><font face="Lucida Sans">Now you should have something like this:</font></code></p>
<p> <code>&#160;</code>
<p>fftheme.xpi: (.jar)</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <b>/install.rdf</b></p>
<p><b>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; /chrome.manifest</b></p>
<p><b>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; /preview.png</b></p>
<p><b>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; /icon.png</b></p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; /browser/</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; /communicator/</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; /global/</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; /mozapps/</p>
<p>&#160;&#160;
<p>PS. XPI is a technology for installing Mozilla extensions that add functionality to the main application. (More about XPI: <a href="http://en.wikipedia.org/wiki/XPInstall">http://en.wikipedia.org/wiki/XPInstall</a>)</p>
<p>&#160;&#160;
<p>Well, and now let’s talk a little bit about those files.</p>
<p><b>- Install.rdf</b></p>
<p> <i>&#160;</i>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; This is a manifest file, used to determine all information about this add-on (in this case, the theme) while it’s being installed. It contains a metadata (more about it: <a href="http://en.wikipedia.org/wiki/Metadata">http://en.wikipedia.org/wiki/Metadata</a>) which identify the add-on, and also some information about who created it. At this point, the file MUST be called “install.rdf”.</p>
<p>&#160;&#160;
<p>Here, I have an example of the Install Manifest:</p>
<p>&#160;&#160;
<p><a href="http://www.stjhimy.com/wp-content/uploads/2010/01/clip_image0026.jpg"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="clip_image002[6]" border="0" alt="clip_image002[6]" src="http://www.stjhimy.com/wp-content/uploads/2010/01/clip_image0026_thumb.jpg" width="544" height="450" /></a></p>
<p>&#160;&#160;
<p><b><u>ID</u></b><u> </u></p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; It’s the identification of your add-on. Firefox 1.0 used it as GUID (Globally Unique Identifier), as the name suggests is used to identify your add-on.</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; If you are developing a theme for Firefox 1.0, you should generate in some specific format, which can be found here <a href="http://www.somacon.com/p113.php">http://www.somacon.com/p113.php</a>. </p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; However, if you are creating something for Firefox 1.5 or previous version, the id field should be a string formatted as an e-mail, it doesn’t have to be a valid email. </p>
<p>&#160;&#160;
<p>Examples:</p>
<p>Firefox 1.0: &lt;em:id&gt;{daf44bf7-a45e-4450-979c-91cf07434c3d}&lt;/em:id&gt;</p>
<p>Firefox 1.5 or previous: &lt;em:id&gt;myfirstfirefoxtheme@theme.net&lt;/em:id&gt;</p>
<p>&#160;&#160;
<p><b><u>VERSION</u></b></p>
<p><b>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </b>You must write the limits your theme will be supported by Firefox, although it won’t be installed. It’s the same way in all Firefox versions.</p>
<p>&#160;&#160;
<p>Example:</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;em:minVersion&gt;3.0&lt;/em:minVersion&gt;</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;em:maxVersion&gt;3.5.*&lt;/em:maxVersion&gt;</p>
<p>&#160;&#160;
<p>PS: “3.5.*” means that your add-on will be supported by all 3.5 versions of Firefox.</p>
<p>PS2<b>: </b><strong>For add-ons hosted on addons.mozilla.org</strong><b>, </b>Mozilla&#8217;s update website may repackage your add-on and correct or reject malformed version strings. (Mozilla Developer Community)</p>
<p>&#160;&#160;
<p><b><u>TYPE</u></b></p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; It’s an integer which represents a type of you add-on</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;
<p>List of valid numbers:</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#8211; 2 Extensions </p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#8211; 4 Themes </p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#8211; 8 Locale </p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#8211; 32 Multiple Item Package</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#8211; 16 plug-ins (Firefox 2.0 or previous)</p>
<p>&#160;&#160;
<p>PS: This type stuff, was added for Firefox 1.5, so if you are developing a theme for Firefox 1.0, you don’t have worry about this.</p>
<p>&#160;&#160;
<p><b><u>TARGET APPLICATION</u></b></p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Your application will work based on this information, by the ID specified, and from the minimum to the maximum version. For valid id, min and max versions see: <a href="https://addons.mozilla.org/en-US/firefox/pages/appversions">https://addons.mozilla.org/en-US/firefox/pages/appversions</a>. </p>
<p>&#160;&#160;
<p>PS. If you are not interested in knowing about this, just copy exactly it is in the Install Manifest.</p>
<p>&#160;&#160;
<p><b><u>NAME, INTERNAL NAME, DESCRTIPTION, CREATOR and HOME PAGE URL</u></b></p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; These are information about you, developer. Feel free to inform what you want.&#160;&#160;&#160;&#160; </p>
<p>&#160;&#160;&#160;
<p><b>- CHROME.MANIFEST</b></p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;
<p><b>What is Chrome?</b></p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Chrome is the set of user interface elements of the application window that are outside of a window&#8217;s content area. Toolbars, menu bars, progress bars, and window title bars are all examples of elements that are typically part of the chrome.</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; The root chrome.manifest is the only thing read for most bundles. XULRunner application bundles also read any additional chrome/chrome.manifest file, but that&#8217;s &quot;special&quot;.</p>
<p>More about Chrome can be found here, <a href="https://developer.mozilla.org/en/Chrome_Registration">https://developer.mozilla.org/en/Chrome_Registration</a>. </p>
<p>&#160;&#160;
<p>Since we are getting started with Firefox add-on, you don’t have to worry about this. Let’s make it simpler. We have to tell Firefox where to find you files, don’t we? So, Chrome packages are the best way to do this. </p>
<p><b>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; (by Mozilla Developers Community)</b></p>
<p>&#160;&#160;
<p>Add this code:</p>
<p>&#160;&#160;
<p><a href="http://www.stjhimy.com/wp-content/uploads/2010/01/clip_image0046.jpg"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="clip_image004[6]" border="0" alt="clip_image004[6]" src="http://www.stjhimy.com/wp-content/uploads/2010/01/clip_image0046_thumb.jpg" width="486" height="74" /></a></p>
<p>&#160;&#160;
<p>PS: Do not forget the trailing slash ‘/’, although your add-on won’t be registered.</p>
<p>PS2: ADD-ON_Name, you should put your theme’s internal name, the same one that you’ve already put in install.rdf file.</p>
<p>&#160;&#160;
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; In a few words, this skin mapping, is telling to Firefox, when you are using ADD-ON_Name as a theme, Firefox should search files about brownser, in brownser/ directory. Thus, all folders you have in your theme’s directory are now ready to be ‘read’ and ‘interpreted’ by Firefox. You are free to change the names of the folders, but I don’t recommend.</p>
<p>&#160;&#160;
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Ok, now you have everything you need to pack your first Firefox theme, but you haven’t changed anything yet, so let’s make some changes, and test it.</p>
<p>&#160;&#160;
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Open the ‘browser/’ folder, and there you’ll see “toolbar.png” which means the toolbar buttons. You can make any change you want, try to change a button. There are four lines of each buttons, so it means that you have 4 states for those buttons (enabled, when mouse is over it, disabled and clicked).</p>
<p>&#160;&#160;
<p><b><u>TEST</u></b></p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; In fact, there are two ways to test your theme.</p>
<p>&#160;&#160;
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; First one is packing everything you have in your theme’s folder, as a .jar file. Drag and drop to Firefox &gt; Tools &gt; Complements. And you are able to test your theme. But doing this every time you make a littlest change is kind of uncomfortable.</p>
<p>&#160;&#160;
<p>For Linux or Mac OS users, you can use the command to zip it:</p>
<p>zip -r my_theme.xpi install.rdf chrome.manifest browser communicator global mozapps</p>
<p>&#160;&#160;
<p><strong>Note:</strong> The command-line tool will <strong>update</strong> an existing zip file, not replace it &#8211; so if you have files you&#8217;ve deleted from your theme, be sure to remove the <code>.xpi </code>file before running the zip command again.&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <b>(By Firefox Developer Community)</b></p>
<p>&#160;&#160;
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; The second way goes like this: Now you will be able to use and test your theme in the same time, only needing a Firefox reboot. First of all, you must find your Firefox profile:</p>
<p>&#160;&#160;
<p>1.&#160;&#160;&#160;&#160; Win + R (Start &gt; Run) and type <b>%appdata%\Mozilla\Firefox\Profiles</b></p>
<p>2.&#160;&#160;&#160;&#160; Open your &lt;profile_id.default&gt; folder. </p>
<p>3.&#160;&#160;&#160;&#160; Open the ‘extensions’ folder (create if necessary) </p>
<p>4.&#160;&#160;&#160;&#160; Create a text file without extension, and name it with the id of your theme (string-email format one, or {12312312} format for Firefox 1.0)</p>
<p>5.&#160;&#160;&#160;&#160; In the content of the file, put the full path of your theme. (Ex: C:\themes\my theme\)</p>
<p>&#160;&#160;
<p>PS: Do not forget the trailing slash at the end.</p>
<p>PS2: For Windows users, retain the OS’s slash direction. </p>
<p>&#160;&#160;
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; At this point, you should be able to test your theme. Start Firefox, it will detect your new theme, and if necessary, go to Firefox &gt; Tools &gt; Complements, and select your application. Now you can go back, change any CSS or PNG files, restart Firefox, and you’ll be able to see the updates.</p>
<p>&#160;&#160;
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; That’s it!</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Free your mind, and be happy <img src='http://www.stjhimy.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Next part, I’m going to talk about those CSS files, and how to put a background in your Firefox theme.</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Hope you enjoy this tutorial. Feel free to let your comments here. </p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; I’d like to thank Mozilla Developer Community, which helped me a lot with great tutorials.</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Cya!</p>
<p>&#160;</p>
<p>All Credits to Felipe Pelizaro Gentil : ) </p>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.stjhimy.com%2F2010%2F01%2F06%2Fmy-first-firefox-theme-part-1%2F&amp;linkname=My%20First%20Firefox%20Theme%20%26ndash%3B%20Part%201"><img src="http://www.stjhimy.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://www.stjhimy.com/2010/01/06/my-first-firefox-theme-part-1/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>Dependency Injection using .NET!</title>
		<link>http://www.stjhimy.com/2009/12/20/dependency-injection-using-net/</link>
		<comments>http://www.stjhimy.com/2009/12/20/dependency-injection-using-net/#comments</comments>
		<pubDate>Sun, 20 Dec 2009 21:10:59 +0000</pubDate>
		<dc:creator>stJhimy</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[DEPENDECY]]></category>
		<category><![CDATA[PATTERNS]]></category>

		<guid isPermaLink="false">http://www.stjhimy.com/2009/12/20/dependency-injection-using-net/</guid>
		<description><![CDATA[ Last week I was working in a solution for Database Versioning in C#. The first idea was to create a toll for PostGre and Mysql, but then I started to think: Why not create a toll which works for every database?
To make it possible I needed to use Dependency Injection so I decided to [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.stjhimy.com/wp-content/uploads/2009/12/Networkconnections_64.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; margin-left: 0px; border-top: 0px; margin-right: 0px; border-right: 0px" title="Network connections_64" border="0" alt="Network connections_64" align="left" src="http://www.stjhimy.com/wp-content/uploads/2009/12/Networkconnections_64_thumb.png" width="92" height="92" /></a> Last week I was working in a solution for Database Versioning in C#. The first idea was to create a toll for PostGre and Mysql, but then I started to think: Why not create a toll which works for every database?</p>
<p>To make it possible I needed to use Dependency Injection so I decided to write this tutorial! : )</p>
<p> <span id="more-293"></span>
<p>So first let&#8217;s understand the dependency injection:</p>
<p>Without the concept of dependency injection, a consumer who needs a particular <a href="http://en.wikipedia.org/wiki/Service_%28systems_architecture%29">service</a> in order to accomplish a certain task would be responsible for handling the life-cycle (instantiating, opening and closing streams, disposing, etc.) of that service. Using the concept of dependency injection, however, the life-cycle of a service is handled by a dependency provider (typically a container) rather than the consumer. The consumer would thus only need a reference to an <a href="http://en.wikipedia.org/wiki/Programming_language_implementation">implementation</a> of the service that it needed in order to accomplish the necessary task.</p>
<p>More here: <a href="http://en.wikipedia.org/wiki/Dependency_injection">http://en.wikipedia.org/wiki/Dependency_injection</a></p>
<p>Ok, that just doesn’t help a lot? Let’s code, so you can understand.</p>
<p>Image that we are building a class, and that class will be responsible to execute some commands in some random database. Let’s think about PostGre.</p>
<p>You have something like that:</p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:c4366f49-0f5c-42a1-9230-83216c292ef0" class="wlWriterEditableSmartContent">
<div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt">
<div style="background: #000080; color: #fff; font-family: Verdana, Tahoma, Arial, sans-serif; font-weight: bold; padding: 2px 5px">Code Snippet</div>
<div style="background: #ddd; overflow: auto">
<ol style="background: #ffffff; margin: 0 0 0 2.5em; padding: 0 0 0 5px;">
<li><span style="color:#0000ff">class</span> <span style="color:#2b91af">DatabaseWithoutDependencyInjection</span></li>
<li style="background: #f3f3f3">{</li>
<li>&nbsp;</li>
<li style="background: #f3f3f3">&#160;&#160;&#160;&#160;<span style="color:#2b91af">NpgsqlConnection</span> connection;</li>
<li>&nbsp;</li>
<li style="background: #f3f3f3">&#160;&#160;&#160;&#160;<span style="color:#0000ff">public</span> DatabaseWithoutDependencyInjection()</li>
<li>&#160;&#160;&#160;&#160;{</li>
<li style="background: #f3f3f3">&nbsp;</li>
<li>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;connection = <span style="color:#0000ff">new</span> <span style="color:#2b91af">NpgsqlConnection</span>(<span style="color:#a31515">&quot;Connection string&quot;</span>);</li>
<li style="background: #f3f3f3">&nbsp;</li>
<li>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<span style="color:#0000ff">this</span>.connection.Open();</li>
<li style="background: #f3f3f3">&nbsp;</li>
<li>&#160;&#160;&#160;&#160;}</li>
<li style="background: #f3f3f3">&nbsp;</li>
<li>&#160;&#160;&#160;&#160;<span style="color:#0000ff">public</span> <span style="color:#0000ff">void</span> executeCommand(<span style="color:#0000ff">string</span> command)</li>
<li style="background: #f3f3f3">&#160;&#160;&#160;&#160;{</li>
<li>&nbsp;</li>
<li style="background: #f3f3f3">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<span style="color:#2b91af">NpgsqlCommand</span> com = <span style="color:#0000ff">new</span> <span style="color:#2b91af">NpgsqlCommand</span>(command);</li>
<li>&nbsp;</li>
<li style="background: #f3f3f3">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;com.ExecuteNonQuery();</li>
<li>&nbsp;</li>
<li style="background: #f3f3f3">&#160;&#160;&#160;&#160;}</li>
<li>&nbsp;</li>
<li style="background: #f3f3f3">}</li>
</ol></div>
</p></div>
</p></div>
<p>&#160;</p>
<p>Ok. Looking at our class you should see that was created a new connection in our constructor and that class created a NpgsqlConnection which is the PostGre connection, right? Obviously that class will work just for postgre, but now imagine if you can make it works for every kind of database in the world;</p>
<p>For that, we will need to insert the database injection.</p>
<p>Look at our constructor, it directly depends on the NpgsqlConnection and that makes our class work just for PostGre. To insert the dependency injection, we work with interfaces which describes the methods in a more generic way. If you right click on the NpgsqlConnection and “Go to definition” you will see that our connection implements the interface DbConnection, and if you go and check every database connection, it will implement the same interface.</p>
<p>Ok, now we know that all kind of database connections implements the DbConnection interface. What about we receive in our constructor that DbConnection? <b><i>We just know that every kind a connection implements the DbConnection so we can do that.</i></b></p>
<p>Our constructor should be something like that now:</p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:c1378a96-21e2-4430-90f9-e6f3acb53f5c" class="wlWriterEditableSmartContent">
<div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt">
<div style="background: #000080; color: #fff; font-family: Verdana, Tahoma, Arial, sans-serif; font-weight: bold; padding: 2px 5px">Code Snippet</div>
<div style="background: #ddd; max-height: 300px; overflow: auto">
<ol style="background: #ffffff; margin: 0 0 0 2em; padding: 0 0 0 5px;">
<li><span style="color:#2b91af">DbConnection</span> connection;</li>
<li style="background: #f3f3f3">&nbsp;</li>
<li><span style="color:#0000ff">public</span> DatabaseWithoutDependencyInjection(<span style="color:#2b91af">DbConnection</span> connection)</li>
<li style="background: #f3f3f3">{</li>
<li>&nbsp;</li>
<li style="background: #f3f3f3">&#160;&#160;&#160;&#160;<span style="color:#0000ff">this</span>.connection = connection;</li>
<li>&nbsp;</li>
<li style="background: #f3f3f3">}</li>
</ol></div>
</p></div>
</p></div>
<p>&#160;</p>
<p>Now we are receiving the DbConnection interface in our constructor&#8230; so we can pass every kind of connection to this class.</p>
<p>Our constructor is already under dependency injection, we are not connected to the NpgsqlConnection<i> type </i>in the constructor, now we receive a interface like parameter and that interface can be any database : )</p>
<p>Now we need to make our executeCommand method generic too, so we can send commands to any databases.</p>
<p>Let’s change our method to something like that:</p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:9f9d2ea6-2acf-42e8-ab3a-37c64c36a38d" class="wlWriterEditableSmartContent">
<div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt">
<div style="background: #000080; color: #fff; font-family: Verdana, Tahoma, Arial, sans-serif; font-weight: bold; padding: 2px 5px">Code Snippet</div>
<div style="background: #ddd; max-height: 300px; overflow: auto">
<ol style="background: #ffffff; margin: 0 0 0 2em; padding: 0 0 0 5px;">
<li><span style="color:#0000ff">public</span> <span style="color:#0000ff">void</span> executeCommand(<span style="color:#0000ff">string</span> command)</li>
<li style="background: #f3f3f3">{</li>
<li>&nbsp;</li>
<li style="background: #f3f3f3">&#160;&#160;&#160;&#160;<span style="color:#2b91af">DbCommand</span> com = connection.CreateCommand();</li>
<li>&#160;&#160;&#160;&#160;com.CommandText = command;</li>
<li style="background: #f3f3f3">&#160;&#160;&#160;&#160;com.ExecuteNonQuery();</li>
<li>&nbsp;</li>
<li style="background: #f3f3f3">}</li>
</ol></div>
</p></div>
</p></div>
<p>&#160;</p>
<p>We&#8217;ve just created an object which implements the DbCommand interface and execute the command, like the connection, that command should work for any database <img src='http://www.stjhimy.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  </p>
<p>Now to use this is simple, we just pass our connection like a parameter:</p>
<p>For postgre:</p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:d60809f8-26c5-4f65-bfba-7acc4294bedf" class="wlWriterEditableSmartContent">
<div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt">
<div style="background: #000080; color: #fff; font-family: Verdana, Tahoma, Arial, sans-serif; font-weight: bold; padding: 2px 5px">Code Snippet</div>
<div style="background: #ddd; max-height: 300px; overflow: auto">
<ol style="background: #ffffff; margin: 0 0 0 2em; padding: 0 0 0 5px;">
<li><span style="color:#2b91af">NpgsqlConnection</span> conPgsql = <span style="color:#0000ff">new</span> <span style="color:#2b91af">NpgsqlConnection</span>(<span style="color:#a31515">&quot;connection string&quot;</span>);</li>
<li style="background: #f3f3f3">&nbsp;</li>
<li><span style="color:#2b91af">DatabaseWithoutDependencyInjection</span> database = <span style="color:#0000ff">new</span> <span style="color:#2b91af">DatabaseWithoutDependencyInjection</span>(conPgsql);</li>
<li style="background: #f3f3f3">&nbsp;</li>
<li>database.executeCommand(<span style="color:#a31515">&quot;Random command&quot;</span>);</li>
</ol></div>
</p></div>
</p></div>
<p>&#160;</p>
<p>For mysql:</p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:3e23632a-3bb3-4d9e-89c5-e5f9c65f0ce6" class="wlWriterEditableSmartContent">
<div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt">
<div style="background: #000080; color: #fff; font-family: Verdana, Tahoma, Arial, sans-serif; font-weight: bold; padding: 2px 5px">Code Snippet</div>
<div style="background: #ddd; max-height: 300px; overflow: auto">
<ol style="background: #ffffff; margin: 0 0 0 2em; padding: 0 0 0 5px;">
<li><span style="color:#2b91af">MySqlConnection</span> conMysql = <span style="color:#0000ff">new</span> <span style="color:#2b91af">MySqlConnection</span>(<span style="color:#a31515">&quot;connection string&quot;</span>);</li>
<li style="background: #f3f3f3">&nbsp;</li>
<li><span style="color:#2b91af">DatabaseWithoutDependencyInjection</span> database = <span style="color:#0000ff">new</span> <span style="color:#2b91af">DatabaseWithoutDependencyInjection</span>(conMysql);</li>
<li style="background: #f3f3f3">&nbsp;</li>
<li>database.executeCommand(<span style="color:#a31515">&quot;Random command&quot;</span>);</li>
</ol></div>
</p></div>
</p></div>
<p>&#160;</p>
<p>And the same time for any database <img src='http://www.stjhimy.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>So that’s it. Dependency injection is a great pattern and helps a lot in huge applications.</p>
<p>Hope you enjoy the tutorial, share the link if you like <img src='http://www.stjhimy.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>If you prefer, let your comments below or follow me in your social networks using the right bar!</p>
<p>Cya</p>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.stjhimy.com%2F2009%2F12%2F20%2Fdependency-injection-using-net%2F&amp;linkname=Dependency%20Injection%20using%20.NET%21"><img src="http://www.stjhimy.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://www.stjhimy.com/2009/12/20/dependency-injection-using-net/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>Extension Methods in .NET : How to Customize Internal C# Classes!</title>
		<link>http://www.stjhimy.com/2009/12/15/extension-methods-in-net-how-to-customize-internal-c-classes/</link>
		<comments>http://www.stjhimy.com/2009/12/15/extension-methods-in-net-how-to-customize-internal-c-classes/#comments</comments>
		<pubDate>Tue, 15 Dec 2009 23:39:44 +0000</pubDate>
		<dc:creator>stJhimy</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[CUSTOMIZATION]]></category>
		<category><![CDATA[METHODS]]></category>

		<guid isPermaLink="false">http://www.stjhimy.com/2009/12/15/extension-methods-in-net-how-to-customize-internal-c-classes/</guid>
		<description><![CDATA[ Do you ever ask how to add a new method to a internal class of C#? You probably think about writing a partial class but unfortunately it&#8217;s not going to work if the class is not partial.
Imagine how beautiful would be if you could write a method for a DateTime? Or a String? 
So [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.stjhimy.com/wp-content/uploads/2009/12/LaSTCobaltCustomize.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; margin-left: 0px; border-top: 0px; margin-right: 0px; border-right: 0px" title="LaST (Cobalt) Customize" border="0" alt="LaST (Cobalt) Customize" align="left" src="http://www.stjhimy.com/wp-content/uploads/2009/12/LaSTCobaltCustomize_thumb.png" width="128" height="128" /></a> Do you ever ask how to add a new method to a internal class of C#? You probably think about writing a partial class but unfortunately it&#8217;s not going to work if the class is not partial.</p>
<p>Imagine how beautiful would be if you could write a method for a DateTime? Or a String? </p>
<p>So I introduce to you the <strong>Extension Methods!</strong></p>
<p> <span id="more-289"></span>
<p>Let’s code an example to make it clear. Imagine that you need to write a method for a String that verifies if that is or not Capitalized.</p>
<p>You want to be able to do something like that:</p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:01190b3b-6431-47b4-8463-849e788ea8be" class="wlWriterEditableSmartContent">
<div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt">
<div style="background: #000080; color: #fff; font-family: Verdana, Tahoma, Arial, sans-serif; font-weight: bold; padding: 2px 5px">Code Snippet</div>
<div style="background: #ddd; max-height: 300px; overflow: auto">
<ol style="background: #ffffff; margin: 0 0 0 2em; padding: 0 0 0 5px;">
<li><span style="color:#a31515">&quot;Stjhimy&quot;</span>.IsCapitalized()</li>
</ol></div>
</p></div>
</p></div>
<p>&#160;</p>
<p>So, first we need to create a class, so then we can write our Extension Method. Create a class named “String Helper”, it must be a public static class.</p>
<p>After creating our class, we need to write our extended method, and it must be a public static method and it needs to receive a parameter which represents the String.</p>
<p>Your code should be something like that:</p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:c6c7278d-51a3-4c03-bbf4-b27f73085d59" class="wlWriterEditableSmartContent">
<div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt">
<div style="background: #000080; color: #fff; font-family: Verdana, Tahoma, Arial, sans-serif; font-weight: bold; padding: 2px 5px">Code Snippet</div>
<div style="background: #ddd; overflow: auto">
<ol style="background: #ffffff; margin: 0 0 0 2.5em; padding: 0 0 0 5px;">
<li><span style="color:#0000ff">using</span> System;</li>
<li style="background: #f3f3f3"><span style="color:#0000ff">using</span> System.Collections.Generic;</li>
<li><span style="color:#0000ff">using</span> System.Linq;</li>
<li style="background: #f3f3f3"><span style="color:#0000ff">using</span> System.Text;</li>
<li>&nbsp;</li>
<li style="background: #f3f3f3"><span style="color:#0000ff">namespace</span> ExtensionMethods</li>
<li>{</li>
<li style="background: #f3f3f3">&#160;&#160;&#160;&#160;<span style="color:#0000ff">public</span> <span style="color:#0000ff">static</span> <span style="color:#0000ff">class</span> <span style="color:#2b91af">StringHelper</span></li>
<li>&#160;&#160;&#160;&#160;{</li>
<li style="background: #f3f3f3">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<span style="color:#0000ff">public</span> <span style="color:#0000ff">static</span> <span style="color:#0000ff">bool</span> IsCapitalized(<span style="color:#0000ff">this</span> <span style="color:#0000ff">string</span> s)</li>
<li>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;{</li>
<li style="background: #f3f3f3">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<span style="color:#0000ff">if</span> (<span style="color:#0000ff">string</span>.IsNullOrEmpty(s)) <span style="color:#0000ff">return</span> <span style="color:#0000ff">false</span>;</li>
<li>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<span style="color:#0000ff">return</span> <span style="color:#0000ff">char</span>.IsUpper(s[0]);</li>
<li style="background: #f3f3f3">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;}</li>
<li>&nbsp;</li>
<li style="background: #f3f3f3">&#160;&#160;&#160;&#160;}</li>
<li>}</li>
</ol></div>
</p></div>
</p></div>
<p>&#160;</p>
<p>Now if you try:</p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:e2cfb906-1d1f-4e1c-ae6a-4e478677602e" class="wlWriterEditableSmartContent">
<div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt">
<div style="background: #000080; color: #fff; font-family: Verdana, Tahoma, Arial, sans-serif; font-weight: bold; padding: 2px 5px">Code Snippet</div>
<div style="background: #ddd; max-height: 300px; overflow: auto">
<ol style="background: #ffffff; margin: 0 0 0 2em; padding: 0 0 0 5px;">
<li><span style="color:#2b91af">MessageBox</span>.Show(<span style="color:#a31515">&quot;stjhimy&quot;</span>.IsCapitalized().ToString());</li>
</ol></div>
</p></div>
</p></div>
<p>&#160;</p>
<p>You should see that:</p>
<p><a href="http://www.stjhimy.com/wp-content/uploads/2009/12/clip_image0022.jpg"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="clip_image002" border="0" alt="clip_image002" src="http://www.stjhimy.com/wp-content/uploads/2009/12/clip_image002_thumb2.jpg" width="158" height="156" /></a></p>
<p>&#160;</p>
<p>And if you try this:</p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:d403ec85-ab24-4761-b12d-ad8af66dcde1" class="wlWriterEditableSmartContent">
<div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt">
<div style="background: #000080; color: #fff; font-family: Verdana, Tahoma, Arial, sans-serif; font-weight: bold; padding: 2px 5px">Code Snippet</div>
<div style="background: #ddd; max-height: 300px; overflow: auto">
<ol style="background: #ffffff; margin: 0 0 0 2em; padding: 0 0 0 5px;">
<li><span style="color:#2b91af">MessageBox</span>.Show(<span style="color:#a31515">&quot;Stjhimy&quot;</span>.IsCapitalized().ToString());</li>
</ol></div>
</p></div>
</p></div>
<p>&#160;</p>
<p>You should see that:</p>
<p><a href="http://www.stjhimy.com/wp-content/uploads/2009/12/clip_image0042.jpg"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="clip_image004" border="0" alt="clip_image004" src="http://www.stjhimy.com/wp-content/uploads/2009/12/clip_image004_thumb2.jpg" width="158" height="156" /></a></p>
<p>&#160;</p>
<p>YAY! Our first Extension Method works like a charm!</p>
<p>That’s a pretty basic tip but really useful.</p>
<p>Hope you enjoy the micro-tutorial , fell free to let your comments and if you like follow me on your social networks using the right bar.</p>
<p>Cya</p>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.stjhimy.com%2F2009%2F12%2F15%2Fextension-methods-in-net-how-to-customize-internal-c-classes%2F&amp;linkname=Extension%20Methods%20in%20.NET%20%3A%20How%20to%20Customize%20Internal%20C%23%20Classes%21"><img src="http://www.stjhimy.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://www.stjhimy.com/2009/12/15/extension-methods-in-net-how-to-customize-internal-c-classes/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>If Keyboard Keys Were Alive?</title>
		<link>http://www.stjhimy.com/2009/12/14/if-keyboard-keys-were-alive/</link>
		<comments>http://www.stjhimy.com/2009/12/14/if-keyboard-keys-were-alive/#comments</comments>
		<pubDate>Mon, 14 Dec 2009 21:30:53 +0000</pubDate>
		<dc:creator>stJhimy</dc:creator>
				<category><![CDATA[Random but Helpful]]></category>
		<category><![CDATA[KEYBOARD]]></category>

		<guid isPermaLink="false">http://www.stjhimy.com/2009/12/14/if-keyboard-keys-were-alive/</guid>
		<description><![CDATA[
 
&#160;

&#160;  &#160; &#160;  &#160;      









: ) 
Quick post, enjoy it.
Cya.
]]></description>
			<content:encoded><![CDATA[<p><img style="border-bottom: 0px; border-left: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px" title="if-keyboard-keys-were-alive01" border="0" alt="if-keyboard-keys-were-alive01" src="http://www.stjhimy.com/wp-content/uploads/2009/12/ifkeyboardkeyswerealive01_thumb.jpg" width="482" height="313" /></p>
<p> <span id="more-281"></span>
<p>&#160;</p>
<p><u></u></p>
<p><a href="http://www.stjhimy.com/wp-content/uploads/2009/12/ifkeyboardkeyswerealive01.gif"><u></u><img style="display: block; float: none; margin-left: auto; margin-right: auto" title="if-keyboard-keys-were-alive01" alt="if-keyboard-keys-were-alive01" src="http://www.stjhimy.com/wp-content/uploads/2009/12/ifkeyboardkeyswerealive01_thumb.gif" width="496" height="413" /></a>&#160; <a href="http://www.stjhimy.com/wp-content/uploads/2009/12/ifkeyboardkeyswerealive02.gif"><img style="display: block; float: none; margin-left: auto; margin-right: auto" title="if-keyboard-keys-were-alive02" alt="if-keyboard-keys-were-alive02" src="http://www.stjhimy.com/wp-content/uploads/2009/12/ifkeyboardkeyswerealive02_thumb.gif" width="414" height="414" /></a> <a href="http://www.stjhimy.com/wp-content/uploads/2009/12/ifkeyboardkeyswerealive02.jpg"><img style="border-bottom: 0px; border-left: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px" title="if-keyboard-keys-were-alive02" border="0" alt="if-keyboard-keys-were-alive02" src="http://www.stjhimy.com/wp-content/uploads/2009/12/ifkeyboardkeyswerealive02_thumb.jpg" width="501" height="451" /></a>&#160; <a href="http://www.stjhimy.com/wp-content/uploads/2009/12/ifkeyboardkeyswerealive04.jpg"><img style="border-bottom: 0px; border-left: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px" title="if-keyboard-keys-were-alive04" border="0" alt="if-keyboard-keys-were-alive04" src="http://www.stjhimy.com/wp-content/uploads/2009/12/ifkeyboardkeyswerealive04_thumb.jpg" width="490" height="383" /></a>&#160; <a href="http://www.stjhimy.com/wp-content/uploads/2009/12/ifkeyboardkeyswerealive06.jpg"><img style="border-bottom: 0px; border-left: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px" title="if-keyboard-keys-were-alive06" border="0" alt="if-keyboard-keys-were-alive06" src="http://www.stjhimy.com/wp-content/uploads/2009/12/ifkeyboardkeyswerealive06_thumb.jpg" width="461" height="200" /></a> <a href="http://www.stjhimy.com/wp-content/uploads/2009/12/ifkeyboardkeyswerealive05.jpg"><img style="border-bottom: 0px; border-left: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px" title="if-keyboard-keys-were-alive05" border="0" alt="if-keyboard-keys-were-alive05" src="http://www.stjhimy.com/wp-content/uploads/2009/12/ifkeyboardkeyswerealive05_thumb.jpg" width="330" height="439" /></a><a href="http://www.stjhimy.com/wp-content/uploads/2009/12/ifkeyboardkeyswerealive08.jpg"><img style="border-bottom: 0px; border-left: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px" title="if-keyboard-keys-were-alive08" border="0" alt="if-keyboard-keys-were-alive08" src="http://www.stjhimy.com/wp-content/uploads/2009/12/ifkeyboardkeyswerealive08_thumb.jpg" width="440" height="463" /></a>&#160;<a href="http://www.stjhimy.com/wp-content/uploads/2009/12/ifkeyboardkeyswerealive09.jpg"><img style="border-bottom: 0px; border-left: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px" title="if-keyboard-keys-were-alive09" border="0" alt="if-keyboard-keys-were-alive09" src="http://www.stjhimy.com/wp-content/uploads/2009/12/ifkeyboardkeyswerealive09_thumb.jpg" width="460" height="217" /></a> <a href="http://www.stjhimy.com/wp-content/uploads/2009/12/ifkeyboardkeyswerealive10.jpg"><img style="border-bottom: 0px; border-left: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px" title="if-keyboard-keys-were-alive10" border="0" alt="if-keyboard-keys-were-alive10" src="http://www.stjhimy.com/wp-content/uploads/2009/12/ifkeyboardkeyswerealive10_thumb.jpg" width="461" height="354" /></a> <a href="http://www.stjhimy.com/wp-content/uploads/2009/12/ifkeyboardkeyswerealive11.jpg"><img style="border-bottom: 0px; border-left: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px" title="if-keyboard-keys-were-alive11" border="0" alt="if-keyboard-keys-were-alive11" src="http://www.stjhimy.com/wp-content/uploads/2009/12/ifkeyboardkeyswerealive11_thumb.jpg" width="438" height="252" /></a> <a href="http://www.stjhimy.com/wp-content/uploads/2009/12/ifkeyboardkeyswerealive12.jpg"><img style="border-bottom: 0px; border-left: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px" title="if-keyboard-keys-were-alive12" border="0" alt="if-keyboard-keys-were-alive12" src="http://www.stjhimy.com/wp-content/uploads/2009/12/ifkeyboardkeyswerealive12_thumb.jpg" width="378" height="378" /></a> <a href="http://www.stjhimy.com/wp-content/uploads/2009/12/ifkeyboardkeyswerealive13.jpg"><img style="border-bottom: 0px; border-left: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px" title="if-keyboard-keys-were-alive13" border="0" alt="if-keyboard-keys-were-alive13" src="http://www.stjhimy.com/wp-content/uploads/2009/12/ifkeyboardkeyswerealive13_thumb.jpg" width="419" height="263" /></a> <a href="http://www.stjhimy.com/wp-content/uploads/2009/12/ifkeyboardkeyswerealive15.jpg"><img style="border-bottom: 0px; border-left: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px" title="if-keyboard-keys-were-alive15" border="0" alt="if-keyboard-keys-were-alive15" src="http://www.stjhimy.com/wp-content/uploads/2009/12/ifkeyboardkeyswerealive15_thumb.jpg" width="439" height="249" /></a> </p>
</p>
</p>
</p>
</p>
</p>
</p>
</p>
</p>
</p>
<p>: ) </p>
<p>Quick post, enjoy it.</p>
<p>Cya.</p>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.stjhimy.com%2F2009%2F12%2F14%2Fif-keyboard-keys-were-alive%2F&amp;linkname=If%20Keyboard%20Keys%20Were%20Alive%3F"><img src="http://www.stjhimy.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://www.stjhimy.com/2009/12/14/if-keyboard-keys-were-alive/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to Send an Email Using C#!</title>
		<link>http://www.stjhimy.com/2009/12/13/how-to-send-an-email-using-c/</link>
		<comments>http://www.stjhimy.com/2009/12/13/how-to-send-an-email-using-c/#comments</comments>
		<pubDate>Sun, 13 Dec 2009 22:12:39 +0000</pubDate>
		<dc:creator>stJhimy</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[E-MAIL]]></category>
		<category><![CDATA[GMAIL]]></category>

		<guid isPermaLink="false">http://www.stjhimy.com/2009/12/13/how-to-send-an-email-using-c/</guid>
		<description><![CDATA[I’m working with some technical support stuff at my job and we are trying to make that  easy for the user and for us. Nothing better than having the possibility to the user send you the report bugs of the software, right? I’ve been thinking about what’s the best solution for that and e-mail [...]]]></description>
			<content:encoded><![CDATA[<p>I’m working with some technical support stuff at my job and we are trying to make that <a href="http://www.stjhimy.com/wp-content/uploads/2009/12/Mail128.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; margin-left: 0px; border-top: 0px; margin-right: 0px; border-right: 0px" title="Mail-128" border="0" alt="Mail-128" align="left" src="http://www.stjhimy.com/wp-content/uploads/2009/12/Mail128_thumb.png" width="128" height="128" /></a> easy for the user and for us. Nothing better than having the possibility to the user send you the report bugs of the software, right? I’ve been thinking about what’s the best solution for that and <b>e-mail</b> beat every other solution.</p>
<p>So I’ve started playing with that in .Net (C#) and I’ve decided to write this tutorial: How to send an email using c#!</p>
<p>Hope you enjoy guys, let’s code.</p>
<p> <span id="more-252"></span>
<p>I ‘m using Gmail. Today, this one and almost every other email service requires authentication and SSL… So here’s the code to send an email:</p>
<p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:7a236ae3-0989-4bac-9849-f89ac7d7039e" class="wlWriterEditableSmartContent">
<div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt">
<div style="background: #000080; color: #fff; font-family: Verdana, Tahoma, Arial, sans-serif; font-weight: bold; padding: 2px 5px">Code Snippet</div>
<div style="background: #ddd; max-height: 300px; overflow: auto">
<ol style="background: #ffffff; margin: 0 0 0 2em; padding: 0 0 0 5px;">
<li><span style="color:#2b91af">SmtpClient</span> client = <span style="color:#0000ff">new</span> <span style="color:#2b91af">SmtpClient</span>();</li>
<li style="background: #f3f3f3">client.Host = <span style="color:#a31515">&quot;smtp.gmail.com&quot;</span>;</li>
<li>client.EnableSsl = <span style="color:#0000ff">true</span>;</li>
<li style="background: #f3f3f3">client.Credentials = <span style="color:#0000ff">new</span> <span style="color:#2b91af">NetworkCredential</span>(<span style="color:#a31515">&quot;username&quot;</span>, <span style="color:#a31515">&quot;password&quot;</span>);</li>
<li>&nbsp;</li>
<li style="background: #f3f3f3">client.Send(<span style="color:#a31515">&quot;stjhimy@gmail.com&quot;</span>, <span style="color:#a31515">&quot;stjhimy@gmail.com&quot;</span>,</li>
<li>&#160;&#160;&#160;&#160;<span style="color:#a31515">&quot;I just send an email with c#!&quot;</span>, <span style="color:#a31515">&quot;YEAH, i received the email <img src='http://www.stjhimy.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> &quot;</span>);</li>
</ol></div>
</p></div>
</p></div>
</p>
<p>The <b>host</b> specifies the SMTP server; <b>EnableSsl</b> specifies if the connection use or not SSL to send the email; the <b>Credentials</b> are to authenticate the user and password.</p>
<p>The parameters to the <b>Send methods</b> is “From”, “To”, “Subject” and “Body”.</p>
<p>Run your application and then check your e-mail. You should see something like that:</p>
<p><a href="http://www.stjhimy.com/wp-content/uploads/2009/12/image.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.stjhimy.com/wp-content/uploads/2009/12/image_thumb.png" width="620" height="33" /></a> </p>
</p>
<p>You can also split the message into an object MailMessage like this:</p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:6aafc75c-db72-4918-9b5e-9e0ec27235b0" class="wlWriterEditableSmartContent">
<div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt">
<div style="background: #000080; color: #fff; font-family: Verdana, Tahoma, Arial, sans-serif; font-weight: bold; padding: 2px 5px">Code Snippet</div>
<div style="background: #ddd; overflow: auto">
<ol style="background: #ffffff; margin: 0 0 0 2.5em; padding: 0 0 0 5px;">
<li><span style="color:#2b91af">SmtpClient</span> client = <span style="color:#0000ff">new</span> <span style="color:#2b91af">SmtpClient</span>();</li>
<li style="background: #f3f3f3">client.Host = <span style="color:#a31515">&quot;smtp.gmail.com&quot;</span>;</li>
<li>client.EnableSsl = <span style="color:#0000ff">true</span>;</li>
<li style="background: #f3f3f3">client.Credentials = <span style="color:#0000ff">new</span> <span style="color:#2b91af">NetworkCredential</span>(<span style="color:#a31515">&quot;username&quot;</span>, <span style="color:#a31515">&quot;password&quot;</span>);</li>
<li>&nbsp;</li>
<li style="background: #f3f3f3"><span style="color:#2b91af">MailMessage</span> message = <span style="color:#0000ff">new</span> <span style="color:#2b91af">MailMessage</span>();</li>
<li>message.Sender = <span style="color:#0000ff">new</span> <span style="color:#2b91af">MailAddress</span>(<span style="color:#a31515">&quot;stjhimy@gmail.com&quot;</span>, <span style="color:#a31515">&quot;stJhimy&quot;</span>);</li>
<li style="background: #f3f3f3">message.From = <span style="color:#0000ff">new</span> <span style="color:#2b91af">MailAddress</span>(<span style="color:#a31515">&quot;stjhimy@gmail.com&quot;</span>, <span style="color:#a31515">&quot;stJhimy&quot;</span>);</li>
<li>message.To.Add(<span style="color:#0000ff">new</span> <span style="color:#2b91af">MailAddress</span>(<span style="color:#a31515">&quot;jhimy@neotechti.com&quot;</span>, <span style="color:#a31515">&quot;stJhimy&quot;</span>));</li>
<li style="background: #f3f3f3">message.Subject = <span style="color:#a31515">&quot;Hello!&quot;</span>;</li>
<li>message.Body = <span style="color:#a31515">&quot;Just trying another way <img src='http://www.stjhimy.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> &quot;</span>;</li>
<li style="background: #f3f3f3">message.IsBodyHtml = <span style="color:#0000ff">false</span>;</li>
<li>message.Priority = <span style="color:#2b91af">MailPriority</span>.High;</li>
<li style="background: #f3f3f3">&nbsp;</li>
<li>client.Send(message);</li>
</ol></div>
</p></div>
</p></div>
<p>&#160;</p>
<p>Run the application and you should see something like that:</p>
<p><a href="http://www.stjhimy.com/wp-content/uploads/2009/12/image1.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.stjhimy.com/wp-content/uploads/2009/12/image_thumb1.png" width="613" height="33" /></a> </p>
<p>&#160;</p>
<p>There are lots of properties that you can set in MailMessage:</p>
<p><a href="http://www.stjhimy.com/wp-content/uploads/2009/12/image2.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.stjhimy.com/wp-content/uploads/2009/12/image_thumb2.png" width="292" height="238" /></a> <a href="http://www.stjhimy.com/wp-content/uploads/2009/12/image3.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.stjhimy.com/wp-content/uploads/2009/12/image_thumb3.png" width="285" height="234" /></a> </p>
<p>&#160;</p>
<p>And to make this tutorial more complete, let’s attach a file to the email.</p>
<p>We can do that using the Attachment. We just set the file that we want to attach and then put that on the message.</p>
<p>I use the <b>OpenFileDialog</b> to get the path of the file…But feel free to specify like you want:</p>
</p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:3dfafbb5-8688-4b4e-80c7-dced2378dac2" class="wlWriterEditableSmartContent">
<div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt">
<div style="background: #000080; color: #fff; font-family: Verdana, Tahoma, Arial, sans-serif; font-weight: bold; padding: 2px 5px">Code Snippet</div>
<div style="background: #ddd; overflow: auto">
<ol style="background: #ffffff; margin: 0 0 0 2.5em; padding: 0 0 0 5px;">
<li><span style="color:#2b91af">SmtpClient</span> client = <span style="color:#0000ff">new</span> <span style="color:#2b91af">SmtpClient</span>();</li>
<li style="background: #f3f3f3">client.Host = <span style="color:#a31515">&quot;smtp.gmail.com&quot;</span>;</li>
<li>client.EnableSsl = <span style="color:#0000ff">true</span>;</li>
<li style="background: #f3f3f3">client.Credentials = <span style="color:#0000ff">new</span> <span style="color:#2b91af">NetworkCredential</span>(<span style="color:#a31515">&quot;username&quot;</span>, <span style="color:#a31515">&quot;password&quot;</span>);</li>
<li>&nbsp;</li>
<li style="background: #f3f3f3"><span style="color:#2b91af">MailMessage</span> message = <span style="color:#0000ff">new</span> <span style="color:#2b91af">MailMessage</span>();</li>
<li>message.Sender = <span style="color:#0000ff">new</span> <span style="color:#2b91af">MailAddress</span>(<span style="color:#a31515">&quot;stjhimy@gmail.com&quot;</span>, <span style="color:#a31515">&quot;stJhimy&quot;</span>);</li>
<li style="background: #f3f3f3">message.From = <span style="color:#0000ff">new</span> <span style="color:#2b91af">MailAddress</span>(<span style="color:#a31515">&quot;stjhimy@gmail.com&quot;</span>, <span style="color:#a31515">&quot;stJhimy&quot;</span>);</li>
<li>message.To.Add(<span style="color:#0000ff">new</span> <span style="color:#2b91af">MailAddress</span>(<span style="color:#a31515">&quot;jhimy@neotechti.com&quot;</span>, <span style="color:#a31515">&quot;stJhimy&quot;</span>));</li>
<li style="background: #f3f3f3">message.Subject = <span style="color:#a31515">&quot;Hello!&quot;</span>;</li>
<li>message.Body = <span style="color:#a31515">&quot;Just trying another way <img src='http://www.stjhimy.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> &quot;</span>;</li>
<li style="background: #f3f3f3">message.IsBodyHtml = <span style="color:#0000ff">false</span>;</li>
<li>message.Priority = <span style="color:#2b91af">MailPriority</span>.High;</li>
<li style="background: #f3f3f3">&nbsp;</li>
<li>&nbsp;</li>
<li style="background: #f3f3f3"><span style="color:#2b91af">OpenFileDialog</span> dialog = <span style="color:#0000ff">new</span> <span style="color:#2b91af">OpenFileDialog</span>();</li>
<li>dialog.ShowDialog();</li>
<li style="background: #f3f3f3"><span style="color:#2b91af">Attachment</span> at = <span style="color:#0000ff">new</span> <span style="color:#2b91af">Attachment</span>(dialog.FileName);</li>
<li>message.Attachments.Add(at);</li>
<li style="background: #f3f3f3">&nbsp;</li>
<li>client.Send(message);</li>
</ol></div>
</p></div>
</p></div>
<p>&#160;</p>
<p>Run your application and check your email, you should see the attachment there : ) </p>
<p><a href="http://www.stjhimy.com/wp-content/uploads/2009/12/image4.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.stjhimy.com/wp-content/uploads/2009/12/image_thumb4.png" width="226" height="171" /></a> </p>
<p>&#160;</p>
<p>So that’s it. Hope you enjoy the tutorial guys.</p>
<p>Feel free to let your comments and follow me on your social networks using the right bar.</p>
<p>The entire code is in <a href="http://github.com/stjhimy/SendEmailCSharp">stJhimy’s Github</a> as usual.</p>
<p>Cya.</p>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.stjhimy.com%2F2009%2F12%2F13%2Fhow-to-send-an-email-using-c%2F&amp;linkname=How%20to%20Send%20an%20Email%20Using%20C%23%21"><img src="http://www.stjhimy.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://www.stjhimy.com/2009/12/13/how-to-send-an-email-using-c/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Really Cool T-Shirts for Developers and Designers!</title>
		<link>http://www.stjhimy.com/2009/12/05/really-cool-t-shirts-for-developers-and-designers/</link>
		<comments>http://www.stjhimy.com/2009/12/05/really-cool-t-shirts-for-developers-and-designers/#comments</comments>
		<pubDate>Sat, 05 Dec 2009 18:39:40 +0000</pubDate>
		<dc:creator>stJhimy</dc:creator>
				<category><![CDATA[Random but Helpful]]></category>
		<category><![CDATA[DESIGNERS]]></category>
		<category><![CDATA[Developers]]></category>
		<category><![CDATA[T-SHIRTS]]></category>

		<guid isPermaLink="false">http://www.stjhimy.com/2009/12/05/really-cool-t-shirts-for-developers-and-designers/</guid>
		<description><![CDATA[A really random post and not so helpful but really cool! : )
If you are a developer or a design take a look at this t-shirts:
&#160;
 
 
&#160;
&#160;                  
&#160;&#160;  












Hope you enjoy.
Let your comments and find me [...]]]></description>
			<content:encoded><![CDATA[<p>A really random post and not so helpful but really cool! : )</p>
<p>If you are a developer or a design take a look at this t-shirts:</p>
<p>&#160;</p>
<p><a href="http://www.stjhimy.com/wp-content/uploads/2009/12/1.jpg"><img style="border-bottom: 0px; border-left: 0px; display: inline; margin-left: 0px; border-top: 0px; margin-right: 0px; border-right: 0px" title="1" border="0" alt="1" src="http://www.stjhimy.com/wp-content/uploads/2009/12/1_thumb.jpg" width="287" height="352" /></a> <a href="http://www.stjhimy.com/wp-content/uploads/2009/12/3.jpg"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="3" border="0" alt="3" src="http://www.stjhimy.com/wp-content/uploads/2009/12/3_thumb.jpg" width="315" height="310" /></a></p>
<p> <span id="more-237"></span>
<p>&#160;</p>
<p><a href="http://www.stjhimy.com/wp-content/uploads/2009/12/2.jpg"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="2" border="0" alt="2" src="http://www.stjhimy.com/wp-content/uploads/2009/12/2_thumb.jpg" width="270" height="352" /></a>&#160; <a href="http://www.stjhimy.com/wp-content/uploads/2009/12/5.jpg"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="5" border="0" alt="5" src="http://www.stjhimy.com/wp-content/uploads/2009/12/5_thumb.jpg" width="328" height="328" /></a> <a href="http://www.stjhimy.com/wp-content/uploads/2009/12/wddtshirt3.jpg"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="wddtshirt3" border="0" alt="wddtshirt3" src="http://www.stjhimy.com/wp-content/uploads/2009/12/wddtshirt3_thumb.jpg" width="308" height="200" /></a> <a href="http://www.stjhimy.com/wp-content/uploads/2009/12/wddtshirt4.jpg"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="wddtshirt4" border="0" alt="wddtshirt4" src="http://www.stjhimy.com/wp-content/uploads/2009/12/wddtshirt4_thumb.jpg" width="302" height="196" /></a> <a href="http://www.stjhimy.com/wp-content/uploads/2009/12/wddtshirt5.jpg"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="wddtshirt5" border="0" alt="wddtshirt5" src="http://www.stjhimy.com/wp-content/uploads/2009/12/wddtshirt5_thumb.jpg" width="309" height="201" /></a> <a href="http://www.stjhimy.com/wp-content/uploads/2009/12/wddtshirt8.jpg"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="wddtshirt8" border="0" alt="wddtshirt8" src="http://www.stjhimy.com/wp-content/uploads/2009/12/wddtshirt8_thumb.jpg" width="292" height="206" /></a> <a href="http://www.stjhimy.com/wp-content/uploads/2009/12/wddtshirt10.jpg"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="wddtshirt10" border="0" alt="wddtshirt10" src="http://www.stjhimy.com/wp-content/uploads/2009/12/wddtshirt10_thumb.jpg" width="313" height="244" /></a> <a href="http://www.stjhimy.com/wp-content/uploads/2009/12/wddtshirt12.jpg"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="wddtshirt12" border="0" alt="wddtshirt12" src="http://www.stjhimy.com/wp-content/uploads/2009/12/wddtshirt12_thumb.jpg" width="294" height="194" /></a> <a href="http://www.stjhimy.com/wp-content/uploads/2009/12/wddtshirt13.jpg"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="wddtshirt13" border="0" alt="wddtshirt13" src="http://www.stjhimy.com/wp-content/uploads/2009/12/wddtshirt13_thumb.jpg" width="277" height="182" /></a> <a href="http://www.stjhimy.com/wp-content/uploads/2009/12/wddtshirt15.jpg"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="wddtshirt15" border="0" alt="wddtshirt15" src="http://www.stjhimy.com/wp-content/uploads/2009/12/wddtshirt15_thumb.jpg" width="338" height="263" /></a> <a href="http://www.stjhimy.com/wp-content/uploads/2009/12/wddtshirt16.jpg"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="wddtshirt16" border="0" alt="wddtshirt16" src="http://www.stjhimy.com/wp-content/uploads/2009/12/wddtshirt16_thumb.jpg" width="289" height="225" /></a> <a href="http://www.stjhimy.com/wp-content/uploads/2009/12/wddtshirt17.jpg"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="wddtshirt17" border="0" alt="wddtshirt17" src="http://www.stjhimy.com/wp-content/uploads/2009/12/wddtshirt17_thumb.jpg" width="315" height="245" /></a> <a href="http://www.stjhimy.com/wp-content/uploads/2009/12/wddtshirt18.jpg"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="wddtshirt18" border="0" alt="wddtshirt18" src="http://www.stjhimy.com/wp-content/uploads/2009/12/wddtshirt18_thumb.jpg" width="305" height="200" /></a> <a href="http://www.stjhimy.com/wp-content/uploads/2009/12/wddtshirt20.jpg"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="wddtshirt20" border="0" alt="wddtshirt20" src="http://www.stjhimy.com/wp-content/uploads/2009/12/wddtshirt20_thumb.jpg" width="299" height="233" /></a> <a href="http://www.stjhimy.com/wp-content/uploads/2009/12/wddtshirt21.jpg"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="wddtshirt21" border="0" alt="wddtshirt21" src="http://www.stjhimy.com/wp-content/uploads/2009/12/wddtshirt21_thumb.jpg" width="304" height="237" /></a> <a href="http://www.stjhimy.com/wp-content/uploads/2009/12/wddtshirt24.jpg"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="wddtshirt24" border="0" alt="wddtshirt24" src="http://www.stjhimy.com/wp-content/uploads/2009/12/wddtshirt24_thumb.jpg" width="304" height="214" /></a> <a href="http://www.stjhimy.com/wp-content/uploads/2009/12/wddtshirt32.jpg"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="wddtshirt32" border="0" alt="wddtshirt32" src="http://www.stjhimy.com/wp-content/uploads/2009/12/wddtshirt32_thumb.jpg" width="322" height="228" /></a> <a href="http://www.stjhimy.com/wp-content/uploads/2009/12/wddtshirt34.jpg"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="wddtshirt34" border="0" alt="wddtshirt34" src="http://www.stjhimy.com/wp-content/uploads/2009/12/wddtshirt34_thumb.jpg" width="288" height="224" /></a> <a href="http://www.stjhimy.com/wp-content/uploads/2009/12/wddtshirt35.jpg"></a><img style="border-bottom: 0px; border-left: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px" title="wddtshirt35" border="0" alt="wddtshirt35" src="http://www.stjhimy.com/wp-content/uploads/2009/12/wddtshirt35_thumb.jpg" width="440" height="343" /></p>
<p>&#160;&#160; <a href="http://www.stjhimy.com/wp-content/uploads/2009/12/wddtshirt40.jpg"><img style="border-bottom: 0px; border-left: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px" title="wddtshirt40" border="0" alt="wddtshirt40" src="http://www.stjhimy.com/wp-content/uploads/2009/12/wddtshirt40_thumb.jpg" width="428" height="431" /></a> <a href="http://www.stjhimy.com/wp-content/uploads/2009/12/wddtshirt46.jpg"><img style="border-bottom: 0px; border-left: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px" title="wddtshirt46" border="0" alt="wddtshirt46" src="http://www.stjhimy.com/wp-content/uploads/2009/12/wddtshirt46_thumb.jpg" width="427" height="208" /></a>
</p>
</p>
</p>
</p>
</p>
</p>
</p>
</p>
</p>
</p>
</p>
</p>
<p>Hope you enjoy.</p>
<p>Let your comments and find me in your social networks using the right bar!</p>
<p>Share the post if you like : )</p>
<p>Cya</p>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.stjhimy.com%2F2009%2F12%2F05%2Freally-cool-t-shirts-for-developers-and-designers%2F&amp;linkname=Really%20Cool%20T-Shirts%20for%20Developers%20and%20Designers%21"><img src="http://www.stjhimy.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://www.stjhimy.com/2009/12/05/really-cool-t-shirts-for-developers-and-designers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>.Net Operators, more than you can imagine!</title>
		<link>http://www.stjhimy.com/2009/12/05/net-operators/</link>
		<comments>http://www.stjhimy.com/2009/12/05/net-operators/#comments</comments>
		<pubDate>Sat, 05 Dec 2009 17:48:49 +0000</pubDate>
		<dc:creator>stJhimy</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[OPERATORS]]></category>

		<guid isPermaLink="false">http://www.stjhimy.com/2009/12/05/net-operators/</guid>
		<description><![CDATA[

 All kind of operators that you can find in .NET. Hmmmm and you believe there’s just ++ ? haha!


 


&#160;




Category
Operator symbol
Operator name
Example
User-overloadable




Primary
( )
Grouping
while(x)
No


&#160;
.
Member access
x.y
No


&#160;
-&#62;
Pointer to struct (unsafe)
x-&#62;y
No


&#160;
( )
Function call
x( )
No


&#160;
[]
Array/index
a[x]
Via indexer


&#160;
++
Post-increment
x++
Yes


&#160;
--
Post-decrement
x--
Yes


&#160;
new
Create instance
new Foo( )
No


&#160;
stackalloc
Unsafe stack allocation
stackalloc(10)
No


&#160;
typeof
Get type from identifier
typeof(int)
No


&#160;
checked
Integral overflow check on
checked(x)
No


&#160;
unchecked
Integral overflow check off
unchecked(x)
No


Unary
sizeof
Get size of struct
sizeof(int)
No


&#160;
+
Positive value of
+x
Yes


&#160;
-
Negative value of
-x
Yes


&#160;
!
Not
!x
Yes


&#160;
~
Bitwise complement
~x
Yes


&#160;
++
Pre-increment
++x
Yes


&#160;
--
Post-increment
--x
Yes


&#160;
( )
Cast
(int)x
No


&#160;
*
Value [...]]]></description>
			<content:encoded><![CDATA[<div>
<div>
<p><a href="http://www.stjhimy.com/wp-content/uploads/2009/12/Visual_Studio_icon_by_Obinoobie.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; margin-left: 0px; border-top: 0px; margin-right: 0px; border-right: 0px" title="Visual_Studio_icon_by_Obinoobie" border="0" alt="Visual_Studio_icon_by_Obinoobie" align="left" src="http://www.stjhimy.com/wp-content/uploads/2009/12/Visual_Studio_icon_by_Obinoobie_thumb.png" width="61" height="61" /></a> All kind of operators that you can find in .NET. Hmmmm and you believe there’s just ++ ? haha!</p>
</p></div>
</p></div>
<p> <span id="more-189"></span>
<div>
<div>
<p>&#160;</p>
<p>
<table border="1" cellspacing="0" width="100%">
<thead>
<tr>
<th style="text-align: left" class="docTableCell thead" valign="bottom" scope="col" align="left">Category</th>
<th style="text-align: left" class="docTableCell thead" valign="bottom" scope="col" align="left">Operator symbol</th>
<th style="text-align: left" class="docTableCell thead" valign="bottom" scope="col" align="left">Operator name</th>
<th style="text-align: left" class="docTableCell thead" valign="bottom" scope="col" align="left">Example</th>
<th style="text-align: left" class="docTableCell thead" valign="bottom" scope="col" align="left">User-overloadable</th>
</tr>
</thead>
<tbody>
<tr>
<td class="docTableCell" valign="top" align="left">Primary</td>
<td class="docTableCell" valign="top" align="left"><tt>( )</tt></td>
<td class="docTableCell" valign="top" align="left">Grouping</td>
<td class="docTableCell" valign="top" align="left"><tt>while(x)</tt></td>
<td class="docTableCell" valign="top" align="left">No</td>
</tr>
<tr>
<td class="docTableCell">&#160;</td>
<td class="docTableCell" valign="top" align="left"><tt>.</tt></td>
<td class="docTableCell" valign="top" align="left">Member access</td>
<td class="docTableCell" valign="top" align="left"><tt>x.y</tt></td>
<td class="docTableCell" valign="top" align="left">No</td>
</tr>
<tr>
<td class="docTableCell">&#160;</td>
<td class="docTableCell" valign="top" align="left"><tt>-&gt;</tt></td>
<td class="docTableCell" valign="top" align="left"><a name="to struct"></a>Pointer to struct (unsafe)</td>
<td class="docTableCell" valign="top" align="left"><tt>x-&gt;y</tt></td>
<td class="docTableCell" valign="top" align="left">No</td>
</tr>
<tr>
<td class="docTableCell">&#160;</td>
<td class="docTableCell" valign="top" align="left"><tt>( )</tt></td>
<td class="docTableCell" valign="top" align="left">Function call</td>
<td class="docTableCell" valign="top" align="left"><tt>x( )</tt></td>
<td class="docTableCell" valign="top" align="left">No</td>
</tr>
<tr>
<td class="docTableCell">&#160;</td>
<td class="docTableCell" valign="top" align="left"><tt>[]</tt></td>
<td class="docTableCell" valign="top" align="left">Array/index</td>
<td class="docTableCell" valign="top" align="left"><tt>a[x]</tt></td>
<td class="docTableCell" valign="top" align="left">Via indexer</td>
</tr>
<tr>
<td class="docTableCell">&#160;</td>
<td class="docTableCell" valign="top" align="left"><tt>++</tt></td>
<td class="docTableCell" valign="top" align="left">Post-increment</td>
<td class="docTableCell" valign="top" align="left"><tt>x++</tt></td>
<td class="docTableCell" valign="top" align="left">Yes</td>
</tr>
<tr>
<td class="docTableCell">&#160;</td>
<td class="docTableCell" valign="top" align="left"><tt>--</tt></td>
<td class="docTableCell" valign="top" align="left">Post-decrement</td>
<td class="docTableCell" valign="top" align="left"><tt>x--</tt></td>
<td class="docTableCell" valign="top" align="left">Yes</td>
</tr>
<tr>
<td class="docTableCell">&#160;</td>
<td class="docTableCell" valign="top" align="left"><tt>new</tt></td>
<td class="docTableCell" valign="top" align="left">Create instance</td>
<td class="docTableCell" valign="top" align="left"><tt>new Foo( )</tt></td>
<td class="docTableCell" valign="top" align="left">No</td>
</tr>
<tr>
<td class="docTableCell">&#160;</td>
<td class="docTableCell" valign="top" align="left"><tt>stackalloc</tt></td>
<td class="docTableCell" valign="top" align="left">Unsafe stack allocation</td>
<td class="docTableCell" valign="top" align="left"><tt>stackalloc(10)</tt></td>
<td class="docTableCell" valign="top" align="left">No</td>
</tr>
<tr>
<td class="docTableCell">&#160;</td>
<td class="docTableCell" valign="top" align="left"><tt>typeof</tt></td>
<td class="docTableCell" valign="top" align="left">Get type from identifier</td>
<td class="docTableCell" valign="top" align="left"><tt>typeof(int)</tt></td>
<td class="docTableCell" valign="top" align="left">No</td>
</tr>
<tr>
<td class="docTableCell">&#160;</td>
<td class="docTableCell" valign="top" align="left"><tt>checked</tt></td>
<td class="docTableCell" valign="top" align="left">Integral overflow check on</td>
<td class="docTableCell" valign="top" align="left"><tt>checked(x)</tt></td>
<td class="docTableCell" valign="top" align="left">No</td>
</tr>
<tr>
<td class="docTableCell">&#160;</td>
<td class="docTableCell" valign="top" align="left"><tt>unchecked</tt></td>
<td class="docTableCell" valign="top" align="left">Integral overflow check off</td>
<td class="docTableCell" valign="top" align="left"><tt>unchecked(x)</tt></td>
<td class="docTableCell" valign="top" align="left">No</td>
</tr>
<tr>
<td class="docTableCell" valign="top" align="left">Unary</td>
<td class="docTableCell" valign="top" align="left"><tt>sizeof</tt></td>
<td class="docTableCell" valign="top" align="left">Get size of struct</td>
<td class="docTableCell" valign="top" align="left"><tt>sizeof(int)</tt></td>
<td class="docTableCell" valign="top" align="left">No</td>
</tr>
<tr>
<td class="docTableCell">&#160;</td>
<td class="docTableCell" valign="top" align="left"><tt>+</tt></td>
<td class="docTableCell" valign="top" align="left">Positive value of</td>
<td class="docTableCell" valign="top" align="left"><tt>+x</tt></td>
<td class="docTableCell" valign="top" align="left">Yes</td>
</tr>
<tr>
<td class="docTableCell">&#160;</td>
<td class="docTableCell" valign="top" align="left"><tt>-</tt></td>
<td class="docTableCell" valign="top" align="left">Negative value of</td>
<td class="docTableCell" valign="top" align="left"><tt>-x</tt></td>
<td class="docTableCell" valign="top" align="left">Yes</td>
</tr>
<tr>
<td class="docTableCell">&#160;</td>
<td class="docTableCell" valign="top" align="left"><tt>!</tt></td>
<td class="docTableCell" valign="top" align="left">Not</td>
<td class="docTableCell" valign="top" align="left"><tt>!x</tt></td>
<td class="docTableCell" valign="top" align="left">Yes</td>
</tr>
<tr>
<td class="docTableCell">&#160;</td>
<td class="docTableCell" valign="top" align="left"><tt>~</tt></td>
<td class="docTableCell" valign="top" align="left">Bitwise complement</td>
<td class="docTableCell" valign="top" align="left"><tt>~x</tt></td>
<td class="docTableCell" valign="top" align="left">Yes</td>
</tr>
<tr>
<td class="docTableCell">&#160;</td>
<td class="docTableCell" valign="top" align="left"><tt>++</tt></td>
<td class="docTableCell" valign="top" align="left">Pre-increment</td>
<td class="docTableCell" valign="top" align="left"><tt>++x</tt></td>
<td class="docTableCell" valign="top" align="left">Yes</td>
</tr>
<tr>
<td class="docTableCell">&#160;</td>
<td class="docTableCell" valign="top" align="left"><tt>--</tt></td>
<td class="docTableCell" valign="top" align="left">Post-increment</td>
<td class="docTableCell" valign="top" align="left"><tt>--x</tt></td>
<td class="docTableCell" valign="top" align="left">Yes</td>
</tr>
<tr>
<td class="docTableCell">&#160;</td>
<td class="docTableCell" valign="top" align="left"><tt>( )</tt></td>
<td class="docTableCell" valign="top" align="left">Cast</td>
<td class="docTableCell" valign="top" align="left"><tt>(int)x</tt></td>
<td class="docTableCell" valign="top" align="left">No</td>
</tr>
<tr>
<td class="docTableCell">&#160;</td>
<td class="docTableCell" valign="top" align="left"><tt>*</tt></td>
<td class="docTableCell" valign="top" align="left">Value at address (unsafe)</td>
<td class="docTableCell" valign="top" align="left"><tt>*x</tt></td>
<td class="docTableCell" valign="top" align="left">No</td>
</tr>
<tr>
<td class="docTableCell">&#160;</td>
<td class="docTableCell" valign="top" align="left"><tt>&amp;</tt></td>
<td class="docTableCell" valign="top" align="left">Address of value (unsafe)</td>
<td class="docTableCell" valign="top" align="left"><tt>&amp;x</tt></td>
<td class="docTableCell" valign="top" align="left">No</td>
</tr>
<tr>
<td class="docTableCell" valign="top" align="left">Multiplicative</td>
<td class="docTableCell" valign="top" align="left"><tt>*</tt></td>
<td class="docTableCell" valign="top" align="left">Multiply</td>
<td class="docTableCell" valign="top" align="left"><tt>x * y</tt></td>
<td class="docTableCell" valign="top" align="left">Yes</td>
</tr>
<tr>
<td class="docTableCell">&#160;</td>
<td class="docTableCell" valign="top" align="left"><tt>/</tt></td>
<td class="docTableCell" valign="top" align="left">Divide</td>
<td class="docTableCell" valign="top" align="left"><tt>x / y</tt></td>
<td class="docTableCell" valign="top" align="left">Yes</td>
</tr>
<tr>
<td class="docTableCell">&#160;</td>
<td class="docTableCell" valign="top" align="left"><tt>%</tt></td>
<td class="docTableCell" valign="top" align="left">Remainder</td>
<td class="docTableCell" valign="top" align="left"><tt>x % y</tt></td>
<td class="docTableCell" valign="top" align="left">Yes</td>
</tr>
<tr>
<td class="docTableCell" valign="top" align="left">Additive</td>
<td class="docTableCell" valign="top" align="left"><tt>+</tt></td>
<td class="docTableCell" valign="top" align="left">Add</td>
<td class="docTableCell" valign="top" align="left"><tt>x + y</tt></td>
<td class="docTableCell" valign="top" align="left">Yes</td>
</tr>
<tr>
<td class="docTableCell">&#160;</td>
<td class="docTableCell" valign="top" align="left"><tt>-</tt></td>
<td class="docTableCell" valign="top" align="left">Subtract</td>
<td class="docTableCell" valign="top" align="left"><tt>x - y</tt></td>
<td class="docTableCell" valign="top" align="left">Yes</td>
</tr>
<tr>
<td class="docTableCell" valign="top" align="left">Shift</td>
<td class="docTableCell" valign="top" align="left"><tt>&lt;&lt;</tt></td>
<td class="docTableCell" valign="top" align="left">Shift left</td>
<td class="docTableCell" valign="top" align="left"><tt>x &gt;&gt; 1</tt></td>
<td class="docTableCell" valign="top" align="left">Yes</td>
</tr>
<tr>
<td class="docTableCell">&#160;</td>
<td class="docTableCell" valign="top" align="left"><tt>&gt;&gt;</tt></td>
<td class="docTableCell" valign="top" align="left">Shift right</td>
<td class="docTableCell" valign="top" align="left"><tt>x &lt;&lt; 1</tt></td>
<td class="docTableCell" valign="top" align="left">Yes</td>
</tr>
<tr>
<td class="docTableCell" valign="top" align="left">Relational</td>
<td class="docTableCell" valign="top" align="left"><tt>&lt;</tt></td>
<td class="docTableCell" valign="top" align="left">Less than</td>
<td class="docTableCell" valign="top" align="left"><tt>x &lt; y</tt></td>
<td class="docTableCell" valign="top" align="left">Yes</td>
</tr>
<tr>
<td class="docTableCell">&#160;</td>
<td class="docTableCell" valign="top" align="left"><tt>&gt;</tt></td>
<td class="docTableCell" valign="top" align="left">Greater than</td>
<td class="docTableCell" valign="top" align="left"><tt>x &gt; y</tt></td>
<td class="docTableCell" valign="top" align="left">Yes</td>
</tr>
<tr>
<td class="docTableCell">&#160;</td>
<td class="docTableCell" valign="top" align="left"><tt>&lt;=</tt></td>
<td class="docTableCell" valign="top" align="left">Less than or equal to</td>
<td class="docTableCell" valign="top" align="left"><tt>x &lt;= y</tt></td>
<td class="docTableCell" valign="top" align="left">Yes</td>
</tr>
<tr>
<td class="docTableCell">&#160;</td>
<td class="docTableCell" valign="top" align="left"><tt>&gt;=</tt></td>
<td class="docTableCell" valign="top" align="left">Greater than or equal to</td>
<td class="docTableCell" valign="top" align="left"><tt>x &gt;= y</tt></td>
<td class="docTableCell" valign="top" align="left">Yes</td>
</tr>
<tr>
<td class="docTableCell">&#160;</td>
<td class="docTableCell" valign="top" align="left"><tt>is</tt></td>
<td class="docTableCell" valign="top" align="left">Type is or is subclass of</td>
<td class="docTableCell" valign="top" align="left"><tt>x is y</tt></td>
<td class="docTableCell" valign="top" align="left">No</td>
</tr>
<tr>
<td class="docTableCell">&#160;</td>
<td class="docTableCell" valign="top" align="left"><tt>as</tt></td>
<td class="docTableCell" valign="top" align="left">Type conversion</td>
<td class="docTableCell" valign="top" align="left"><tt>x as y</tt></td>
<td class="docTableCell" valign="top" align="left">No</td>
</tr>
<tr>
<td class="docTableCell" valign="top" align="left">Equality</td>
<td class="docTableCell" valign="top" align="left"><tt>==</tt></td>
<td class="docTableCell" valign="top" align="left">Equals</td>
<td class="docTableCell" valign="top" align="left"><tt>x == y</tt></td>
<td class="docTableCell" valign="top" align="left">Yes</td>
</tr>
<tr>
<td class="docTableCell">&#160;</td>
<td class="docTableCell" valign="top" align="left"><tt>!=</tt></td>
<td class="docTableCell" valign="top" align="left">Not equals</td>
<td class="docTableCell" valign="top" align="left"><tt>x != y</tt></td>
<td class="docTableCell" valign="top" align="left">Yes</td>
</tr>
<tr>
<td class="docTableCell" valign="top" align="left">Logical And</td>
<td class="docTableCell" valign="top" align="left"><tt>&amp;</tt></td>
<td class="docTableCell" valign="top" align="left">And</td>
<td class="docTableCell" valign="top" align="left"><tt>x &amp; y</tt></td>
<td class="docTableCell" valign="top" align="left">Yes</td>
</tr>
<tr>
<td class="docTableCell" valign="top" align="left">Logical Xor</td>
<td class="docTableCell" valign="top" align="left"><tt>^</tt></td>
<td class="docTableCell" valign="top" align="left">Exclusive Or</td>
<td class="docTableCell" valign="top" align="left"><tt>x ^ y</tt></td>
<td class="docTableCell" valign="top" align="left">Yes</td>
</tr>
<tr>
<td class="docTableCell" valign="top" align="left">Logical Or</td>
<td class="docTableCell" valign="top" align="left"><tt>|</tt></td>
<td class="docTableCell" valign="top" align="left">Or</td>
<td class="docTableCell" valign="top" align="left"><tt>x | y</tt></td>
<td class="docTableCell" valign="top" align="left">Yes</td>
</tr>
<tr>
<td class="docTableCell" valign="top" align="left">Conditional And</td>
<td class="docTableCell" valign="top" align="left"><tt>&amp;&amp;</tt></td>
<td class="docTableCell" valign="top" align="left">Conditional And</td>
<td class="docTableCell" valign="top" align="left"><tt>x &amp;&amp; y</tt></td>
<td class="docTableCell" valign="top" align="left">Via <tt>&amp;</tt></td>
</tr>
<tr>
<td class="docTableCell" valign="top" align="left">Conditional Or</td>
<td class="docTableCell" valign="top" align="left"><tt>||</tt></td>
<td class="docTableCell" valign="top" align="left">Conditional Or</td>
<td class="docTableCell" valign="top" align="left"><tt>x || y</tt></td>
<td class="docTableCell" valign="top" align="left">Via <tt>|</tt></td>
</tr>
<tr>
<td class="docTableCell" valign="top" align="left">Null Coalescing</td>
<td class="docTableCell" valign="top" align="left"><tt>??</tt></td>
<td class="docTableCell" valign="top" align="left">Null Coalescing</td>
<td class="docTableCell" valign="top" align="left"><tt>x ?? y</tt></td>
<td class="docTableCell" valign="top" align="left">No</td>
</tr>
<tr>
<td class="docTableCell" valign="top" align="left">Conditional</td>
<td class="docTableCell" valign="top" align="left"><tt>?:</tt></td>
<td class="docTableCell" valign="top" align="left">Conditional</td>
<td class="docTableCell" valign="top" align="left"><tt>isTrue ? thenThisValue : elseThisValue</tt></td>
<td class="docTableCell" valign="top" align="left">No</td>
</tr>
<tr>
<td class="docTableCell" valign="top" align="left">Assignment</td>
<td class="docTableCell" valign="top" align="left"><tt>=</tt></td>
<td class="docTableCell" valign="top" align="left">Assign</td>
<td class="docTableCell" valign="top" align="left"><tt>x = y</tt></td>
<td class="docTableCell" valign="top" align="left">No</td>
</tr>
<tr>
<td class="docTableCell">&#160;</td>
<td class="docTableCell" valign="top" align="left"><tt>*=</tt></td>
<td class="docTableCell" valign="top" align="left">Multiply self by</td>
<td class="docTableCell" valign="top" align="left"><tt>x *= 2</tt></td>
<td class="docTableCell" valign="top" align="left">Via <tt>*</tt></td>
</tr>
<tr>
<td class="docTableCell">&#160;</td>
<td class="docTableCell" valign="top" align="left"><tt>/=</tt></td>
<td class="docTableCell" valign="top" align="left">Divide self by</td>
<td class="docTableCell" valign="top" align="left"><tt>x /= 2</tt></td>
<td class="docTableCell" valign="top" align="left">Via <tt>/</tt></td>
</tr>
<tr>
<td class="docTableCell">&#160;</td>
<td class="docTableCell" valign="top" align="left"><tt>+=</tt></td>
<td class="docTableCell" valign="top" align="left">Add to self</td>
<td class="docTableCell" valign="top" align="left"><tt>x += 2</tt></td>
<td class="docTableCell" valign="top" align="left">Via <tt>+</tt></td>
</tr>
<tr>
<td class="docTableCell">&#160;</td>
<td class="docTableCell" valign="top" align="left"><tt>-=</tt></td>
<td class="docTableCell" valign="top" align="left">Subtract from self</td>
<td class="docTableCell" valign="top" align="left"><tt>x -= 2</tt></td>
<td class="docTableCell" valign="top" align="left">Via <tt>-</tt></td>
</tr>
<tr>
<td class="docTableCell">&#160;</td>
<td class="docTableCell" valign="top" align="left"><tt>&lt;&lt;=</tt></td>
<td class="docTableCell" valign="top" align="left">Shift self left by</td>
<td class="docTableCell" valign="top" align="left"><tt>x &lt;&lt;= 2</tt></td>
<td class="docTableCell" valign="top" align="left">Via <tt>&lt;&lt;</tt></td>
</tr>
<tr>
<td class="docTableCell">&#160;</td>
<td class="docTableCell" valign="top" align="left"><tt>&gt;&gt;=</tt></td>
<td class="docTableCell" valign="top" align="left">Shift self right by</td>
<td class="docTableCell" valign="top" align="left"><tt>x &gt;&gt;= 2</tt></td>
<td class="docTableCell" valign="top" align="left">Via <tt>&gt;&gt;</tt></td>
</tr>
<tr>
<td class="docTableCell">&#160;</td>
<td class="docTableCell" valign="top" align="left"><tt>&amp;=</tt></td>
<td class="docTableCell" valign="top" align="left">And self by</td>
<td class="docTableCell" valign="top" align="left"><tt>x &amp;= 2</tt></td>
<td class="docTableCell" valign="top" align="left">Via <tt>&amp;</tt></td>
</tr>
<tr>
<td class="docTableCell">&#160;</td>
<td class="docTableCell" valign="top" align="left"><tt>^=</tt></td>
<td class="docTableCell" valign="top" align="left">Exclusive-Or self by</td>
<td class="docTableCell" valign="top" align="left"><tt>x ^= 2</tt></td>
<td class="docTableCell" valign="top" align="left">Via <tt>^</tt></td>
</tr>
<tr>
<td class="docTableCell">&#160;</td>
<td class="docTableCell" valign="top" align="left"><tt>|=</tt></td>
<td class="docTableCell" valign="top" align="left">Or self by</td>
<td class="docTableCell" valign="top" align="left"><tt>x |= 2</tt></td>
<td class="docTableCell" valign="top" align="left">Via <tt>|</tt></td>
</tr>
<tr>
<td class="docTableCell" valign="top" align="left">Lambda</td>
<td class="docTableCell" valign="top" align="left"><tt>=&gt;</tt></td>
<td class="docTableCell" valign="top" align="left">Lambda</td>
<td class="docTableCell" valign="top" align="left"><tt>x =&gt; x++</tt></td>
<td class="docTableCell" valign="top" align="left">No</td>
</tr>
</tbody>
</table>
</p></div>
</p></div>
<p>&#160;</p>
<p>Like this post? Share on your social networks and comment : –) </p>
<p>Find me if you like for more tutorials using the right bar!</p>
<p>Cya</p>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.stjhimy.com%2F2009%2F12%2F05%2Fnet-operators%2F&amp;linkname=.Net%20Operators%2C%20more%20than%20you%20can%20imagine%21"><img src="http://www.stjhimy.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://www.stjhimy.com/2009/12/05/net-operators/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to get Excel files informations using .NET!</title>
		<link>http://www.stjhimy.com/2009/12/02/how-to-get-excel-files-informations-using-net/</link>
		<comments>http://www.stjhimy.com/2009/12/02/how-to-get-excel-files-informations-using-net/#comments</comments>
		<pubDate>Wed, 02 Dec 2009 23:58:41 +0000</pubDate>
		<dc:creator>stJhimy</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[EXCEL]]></category>
		<category><![CDATA[GIT]]></category>

		<guid isPermaLink="false">http://www.stjhimy.com/2009/12/02/how-to-get-excel-files-informations-using-net/</guid>
		<description><![CDATA[Guess the title is auto explanatory : P
 I was using that on my job this week and I’ve decided to share it. It’s just a few lines of codes but make things really easy when you need to get information from Excel files.
 
First create a new project:

&#160;
Add the reference to de Excel (Office):

&#160;
Create [...]]]></description>
			<content:encoded><![CDATA[<p>Guess the title is auto explanatory : P</p>
<p><a href="http://www.stjhimy.com/wp-content/uploads/2009/12/Excel_64.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; margin-left: 0px; border-top: 0px; margin-right: 0px; border-right: 0px" title="Excel_64" border="0" alt="Excel_64" align="left" src="http://www.stjhimy.com/wp-content/uploads/2009/12/Excel_64_thumb.png" width="64" height="64" /></a> I was using that on my job this week and I’ve decided to share it. It’s just a few lines of codes but make things really easy when you need to get information from Excel files.</p>
<p> <span id="more-175"></span>
<p>First create a new project:</p>
<p><a href="http://www.stjhimy.com/wp-content/uploads/2009/12/clip_image0021.jpg"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="clip_image002" border="0" alt="clip_image002" src="http://www.stjhimy.com/wp-content/uploads/2009/12/clip_image002_thumb1.jpg" width="249" height="263" /></a></p>
<p>&#160;</p>
<p>Add the reference to de Excel (Office):</p>
<p><a href="http://www.stjhimy.com/wp-content/uploads/2009/12/clip_image0041.jpg"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="clip_image004" border="0" alt="clip_image004" src="http://www.stjhimy.com/wp-content/uploads/2009/12/clip_image004_thumb1.jpg" width="430" height="378" /></a></p>
<p>&#160;</p>
<p>Create a DataGridView in your Form just like that:</p>
<p><a href="http://www.stjhimy.com/wp-content/uploads/2009/12/clip_image0061.jpg"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="clip_image006" border="0" alt="clip_image006" src="http://www.stjhimy.com/wp-content/uploads/2009/12/clip_image006_thumb1.jpg" width="531" height="266" /></a></p>
<p>&#160;</p>
<p>Double click in your form. Should open the OnLoad event, just put the next lines:</p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:22768368-7800-4d36-9fef-428926af22aa" class="wlWriterEditableSmartContent">
<div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt">
<div style="background: #000080; color: #fff; font-family: Verdana, Tahoma, Arial, sans-serif; font-weight: bold; padding: 2px 5px">Code Snippet</div>
<div style="background: #ddd; overflow: auto">
<ol style="background: #ffffff; margin: 0 0 0 2.5em; padding: 0 0 0 5px;">
<li><span style="color:#0000ff">private</span> <span style="color:#0000ff">void</span> Form1_Load(<span style="color:#0000ff">object</span> sender, <span style="color:#2b91af">EventArgs</span> e)</li>
<li style="background: #f3f3f3">{</li>
<li>&#160;&#160;&#160;&#160;<span style="color:#2b91af">OpenFileDialog</span> openFile = <span style="color:#0000ff">new</span> <span style="color:#2b91af">OpenFileDialog</span>();</li>
<li style="background: #f3f3f3">&#160;&#160;&#160;&#160;openFile.Filter = <span style="color:#a31515">&quot;Excel 97-2003| *.xls|Excel 2007| *.xlsx&quot;</span>;</li>
<li>&#160;&#160;&#160;&#160;openFile.Title = <span style="color:#a31515">&quot;Selecione o Arquivo&quot;</span>;</li>
<li style="background: #f3f3f3">&nbsp;</li>
<li>&nbsp;</li>
<li style="background: #f3f3f3">&nbsp;</li>
<li>&#160;&#160;&#160;&#160;<span style="color:#0000ff">if</span> (openFile.ShowDialog() == <span style="color:#2b91af">DialogResult</span>.OK)</li>
<li style="background: #f3f3f3">&#160;&#160;&#160;&#160;{</li>
<li>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<span style="color:#2b91af">DataTable</span> dt = <span style="color:#0000ff">new</span> <span style="color:#2b91af">DataTable</span>();</li>
<li style="background: #f3f3f3">&nbsp;</li>
<li>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<span style="color:#2b91af">OleDbConnection</span> connection = <span style="color:#0000ff">new</span> <span style="color:#2b91af">OleDbConnection</span>(<span style="color:#a31515">&quot;provider=Microsoft.Jet.OLEDB.4.0;data source=&quot;</span> + openFile.FileName + <span style="color:#a31515">&quot;;Extended Properties=&#92;&quot;Excel 8.0;HDR=NO;IMEX=1;&#92;&quot;&quot;</span>);</li>
<li style="background: #f3f3f3">&nbsp;</li>
<li>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<span style="color:#2b91af">OleDbDataAdapter</span> da = <span style="color:#0000ff">new</span> <span style="color:#2b91af">OleDbDataAdapter</span>(<span style="color:#a31515">&quot;Select * From [Sheet1$]&quot;</span>, connection);</li>
<li style="background: #f3f3f3">&nbsp;</li>
<li>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;da.Fill(dt);</li>
<li style="background: #f3f3f3">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;dataGridView1.DataSource = dt;</li>
<li>&#160;&#160;&#160;&#160;}</li>
<li style="background: #f3f3f3">}</li>
</ol></div>
</p></div>
</p></div>
<p>&#160;</p>
<p>Create a random Excel File and save.</p>
<p><a href="http://www.stjhimy.com/wp-content/uploads/2009/12/clip_image0081.jpg"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="clip_image008" border="0" alt="clip_image008" src="http://www.stjhimy.com/wp-content/uploads/2009/12/clip_image008_thumb1.jpg" width="395" height="127" /></a></p>
<p>&#160;</p>
<p>Run the application and when it ask you to select a file, select the excel file that you just created. You should see your DataGridView with some information now : )</p>
<p><a href="http://www.stjhimy.com/wp-content/uploads/2009/12/clip_image0101.jpg"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="clip_image010" border="0" alt="clip_image010" src="http://www.stjhimy.com/wp-content/uploads/2009/12/clip_image010_thumb1.jpg" width="524" height="255" /></a></p>
<p>&#160;</p>
<p>Quick tip. I’m not having much time to post but the the next post will be legendary! I promess <img src='http://www.stjhimy.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>
<p>As usual you can download the entire code <a href="http://github.com/stjhimy/ExcelApp">at stJhimy’s github</a>, feel free to share and find me in yours social networks using the right bar : )</p>
<p>Hope you enjoy the tip guys.</p>
<p>Cya</p>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.stjhimy.com%2F2009%2F12%2F02%2Fhow-to-get-excel-files-informations-using-net%2F&amp;linkname=How%20to%20get%20Excel%20files%20informations%20using%20.NET%21"><img src="http://www.stjhimy.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://www.stjhimy.com/2009/12/02/how-to-get-excel-files-informations-using-net/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A Quick One: Complete Tutorials Collection About GIT!</title>
		<link>http://www.stjhimy.com/2009/11/24/a-quick-one-complete-tutorials-collection-about-git/</link>
		<comments>http://www.stjhimy.com/2009/11/24/a-quick-one-complete-tutorials-collection-about-git/#comments</comments>
		<pubDate>Tue, 24 Nov 2009 23:21:36 +0000</pubDate>
		<dc:creator>stJhimy</dc:creator>
				<category><![CDATA[Random but Helpful]]></category>
		<category><![CDATA[GIT]]></category>
		<category><![CDATA[GITHUB]]></category>
		<category><![CDATA[SVN]]></category>

		<guid isPermaLink="false">http://www.stjhimy.com/2009/11/24/a-quick-one-complete-tutorials-collection-about-git/</guid>
		<description><![CDATA[ For developers who are starting working with GIT and ask “how to start?” or “WTF?”
Here’s a collection of tutorials about git, hope you enjoy it : -)
First let’s just “understand” Git, its indispensable to read the next lines, please don’t ignore this.
 
Wikipedia says:
Git is a free distributed revision control, or software source code [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.stjhimy.com/wp-content/uploads/2009/11/octocat_fluid.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; margin-left: 0px; border-top: 0px; margin-right: 0px; border-right: 0px" title="octocat_fluid" border="0" alt="octocat_fluid" align="left" src="http://www.stjhimy.com/wp-content/uploads/2009/11/octocat_fluid_thumb.png" width="140" height="140" /></a> For developers who are starting working with GIT and ask “how to start?” or “WTF?”</p>
<p>Here’s a collection of tutorials about git, hope you enjoy it : -)</p>
<p>First let’s just “understand” Git, its indispensable to read the next lines, please don’t ignore this.</p>
<p> <span id="more-160"></span>
<p><strong>Wikipedia says:</strong></p>
<p><em><b>Git</b> is a </em><a href="http://en.wikipedia.org/wiki/Free_software"><em>free</em></a><em> </em><a href="http://en.wikipedia.org/wiki/Distributed_revision_control"><em>distributed revision control</em></a><em>, or software </em><a href="http://en.wikipedia.org/wiki/Source_code"><em>source code</em></a><em> management project with an emphasis on being fast. Git was initially designed and developed by </em><a href="http://en.wikipedia.org/wiki/Linus_Torvalds"><em>Linus Torvalds</em></a><em> for </em><a href="http://en.wikipedia.org/wiki/Linux_kernel"><em>Linux kernel</em></a><em> development.</em></p>
<p><em>Every Git working directory is a full-fledged repository with complete history and full revision tracking capabilities, not dependent on network access or a central server.</em></p>
<p><b><em>Characteristics</em></b></p>
<p><em>Git&#8217;s design is a synthesis of Torvalds&#8217;s experience maintaining a large distributed development project, his intimate knowledge of file system performance, and an urgent need to produce a working system in short order. (See the </em><a href="http://en.wikipedia.org/wiki/Git_%28software%29#Early_history"><em>history section</em></a><em> for details.) These influences led to the following implementation choices:</em></p>
<p><em>Strong support for non-linear development</em></p>
<p><em>Git supports rapid branching and merging, and includes specific tools for visualizing and navigating a non-linear development history. A core assumption in Git is that a change will be merged more often than it is written, as it is passed around various reviewers.</em></p>
<p><em>Distributed development</em></p>
<p><em>Like </em><a href="http://en.wikipedia.org/wiki/Darcs"><em>Darcs</em></a><em>, </em><a href="http://en.wikipedia.org/wiki/BitKeeper"><em>BitKeeper</em></a><em>, </em><a href="http://en.wikipedia.org/wiki/Mercurial_%28software%29"><em>Mercurial</em></a><em>, </em><a href="http://en.wikipedia.org/wiki/SVK"><em>SVK</em></a><em>, </em><a href="http://en.wikipedia.org/wiki/Bazaar_%28software%29"><em>Bazaar</em></a><em> and </em><a href="http://en.wikipedia.org/wiki/Monotone_%28software%29"><em>Monotone</em></a><em>, Git gives each developer a local copy of the entire development history, and changes are copied from one such repository to another. These changes are imported as additional development branches, and can be merged in the same way as a locally developed branch.</em></p>
<p><em>Compatibility with existing systems/protocols</em></p>
<p><em>Repositories can be published via </em><a href="http://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol"><em>HTTP</em></a><em>, </em><a href="http://en.wikipedia.org/wiki/File_Transfer_Protocol"><em>FTP</em></a><em>, </em><a href="http://en.wikipedia.org/wiki/Rsync"><em>rsync</em></a><em>, or a Git protocol over either a plain socket or </em><a href="http://en.wikipedia.org/wiki/Secure_Shell"><em>ssh</em></a><em>. Git also has a CVS server emulation, which enables the use of existing CVS clients and IDE plugins to access Git repositories. Subversion and svk repositories can be used directly with git-svn.</em></p>
<p><em>Efficient handling of large projects</em></p>
<p><em>Torvalds has described Git as being very fast and scalable,<sup><a href="http://en.wikipedia.org/wiki/Git_%28software%29#cite_note-21">[22]</a></sup> and performance tests done by </em><a href="http://en.wikipedia.org/wiki/Mozilla"><em>Mozilla</em></a><em> showed it was an </em><a href="http://en.wikipedia.org/wiki/Order_of_magnitude"><em>order of magnitude</em></a><em> faster than some revision control systems, and fetching revision history from locally stored repository can be two orders of magnitude faster than fetching it from the remote server.<sup><a href="http://en.wikipedia.org/wiki/Git_%28software%29#cite_note-22">[23]</a><a href="http://en.wikipedia.org/wiki/Git_%28software%29#cite_note-23">[24]</a></sup> In particular, Git does not get slower as the project history grows larger.<sup><a href="http://en.wikipedia.org/wiki/Git_%28software%29#cite_note-24">[25]</a></sup></em></p>
<p><em>Cryptographic authentication of history</em></p>
<p><em>The Git history is stored in such a way that the name of a particular revision (a &quot;commit&quot; in Git terms) depends upon the complete development history leading up to that commit. Once it is published, it is not possible to change the old versions without it being noticed. The structure is similar to a </em><a href="http://en.wikipedia.org/wiki/Hash_tree"><em>hash tree</em></a><em>, but with additional data at the nodes as well as the leaves.<sup><a href="http://en.wikipedia.org/wiki/Git_%28software%29#cite_note-25">[26]</a></sup> (</em><a href="http://en.wikipedia.org/wiki/Mercurial_%28software%29"><em>Mercurial</em></a><em> and </em><a href="http://en.wikipedia.org/wiki/Monotone_%28software%29"><em>Monotone</em></a><em> also have this property.)</em></p>
<p><em>Toolkit-based design</em></p>
<p><em>Git was designed as a set of programs written in </em><a href="http://en.wikipedia.org/wiki/C_%28programming_language%29"><em>C</em></a><em>, and a number of shell scripts that provide wrappers around those programs.<sup><a href="http://en.wikipedia.org/wiki/Git_%28software%29#cite_note-26">[27]</a></sup> Although most of those scripts have been rewritten in C as part of an ongoing effort to port it to Microsoft Windows<sup>[<a href="http://en.wikipedia.org/wiki/Wikipedia:Citation_needed">citation needed</a></sup><sup>]</sup>, the design remains, and it is easy to chain the components together.<sup><a href="http://en.wikipedia.org/wiki/Git_%28software%29#cite_note-27">[28]</a></sup></em></p>
<p><em>Pluggable merge strategies</em></p>
<p><em>As part of its toolkit design, Git has a well-defined model of an incomplete merge, and it has multiple algorithms for completing it, culminating in telling the user that it is unable to complete the merge automatically and manual editing is required.</em></p>
<p><a href="http://en.wikipedia.org/wiki/Garbage_%28computer_science%29"><em>Garbage</em></a><em> accumulates unless collected</em></p>
<p><em>Aborting operations or backing out changes will leave useless dangling objects in the database. These are generally a small fraction of the continuously growing history of wanted objects, but </em><a href="http://en.wikipedia.org/wiki/Garbage_collection_%28computer_science%29"><em>reclaiming the space</em></a><em> using git gc &#8211;prune can be slow.<sup><a href="http://en.wikipedia.org/wiki/Git_%28software%29#cite_note-28">[29]</a></sup></em></p>
<p><em>Periodic explicit object packing</em></p>
<p><em>Git stores each newly created object as a separate file. Although individually compressed, this takes a great deal of space and is inefficient. This is solved by the use of &quot;packs&quot; that store a large number of objects in a single file (or network byte stream), delta-compressed among themselves. Packs are compressed using the </em><a href="http://en.wikipedia.org/wiki/Heuristic_%28computer_science%29"><em>heuristic</em></a><em> that files with the same name are probably similar, but do not depend on it for correctness. Newly created objects (newly added history) are still stored singly, and periodic repacking is required to maintain space efficiency. Git does periodic repacking automatically but manual repacking is also possible with the git gc command.</em></p>
<p><em>Another property of Git is that it snapshots directory trees of files. The earliest systems for tracking versions of source code, </em><a href="http://en.wikipedia.org/wiki/Source_Code_Control_System"><em>SCCS</em></a><em> and </em><a href="http://en.wikipedia.org/wiki/Revision_Control_System"><em>RCS</em></a><em>, worked on individual files and emphasized the space savings to be gained from </em><a href="http://en.wikipedia.org/wiki/Delta_encoding"><em>delta encoding</em></a><em> the (mostly similar) versions. Later revision control systems maintained this notion of a file having an identity across multiple revisions of a project. However, Torvalds rejected this concept.<sup><a href="http://en.wikipedia.org/wiki/Git_%28software%29#cite_note-29">[30]</a></sup> Consequently, Git does not explicitly record file revision relationships at any level below the source code tree.</em></p>
<p><em>Inexplicit revision relationships has some significant consequences:</em></p>
<ul>
<li><em>It is slightly more expensive to examine the change history of a single file than the whole project.<sup><a href="http://en.wikipedia.org/wiki/Git_%28software%29#cite_note-30">[31]</a></sup> To obtain a history of changes affecting a given file, Git must walk the global history and then determine whether each change modified that file. This method of examining history does, however, let Git produce with equal efficiency a single history showing the changes to an arbitrary set of files. For example, a subdirectory of the source tree plus an associated global header file is a very common case.</em></li>
<li><em>Renames are handled implicitly rather than explicitly. A common complaint with </em><a href="http://en.wikipedia.org/wiki/Concurrent_Versions_System"><em>CVS</em></a><em> is that it uses the name of a file to identify its revision history, so moving or renaming a file is not possible without either interrupting its history, or renaming the history and thereby making the history inaccurate. Most post-CVS revision control systems solve this by giving a file a unique long-lived name (a sort of </em><a href="http://en.wikipedia.org/wiki/Inode"><em>inode number</em></a><em>) that survives renaming. Git does not record such an identifier, and this is claimed as an advantage.<sup><a href="http://en.wikipedia.org/wiki/Git_%28software%29#cite_note-31">[32]</a><a href="http://en.wikipedia.org/wiki/Git_%28software%29#cite_note-32">[33]</a></sup> </em><a href="http://en.wikipedia.org/wiki/Source_code"><em>Source code</em></a><em> files are sometimes split or merged as well as simply renamed,<sup><a href="http://en.wikipedia.org/wiki/Git_%28software%29#cite_note-33">[34]</a></sup> and recording this as a simple rename would freeze an inaccurate description of what happened in the (immutable) history. Git addresses the issue by detecting renames while browsing the history of snapshots rather than recording it when making the snapshot.<sup><a href="http://en.wikipedia.org/wiki/Git_%28software%29#cite_note-34">[35]</a></sup> (Briefly, given a file in revision N, a file of the same name in revision N−1 is its default ancestor. However, when there is no like-named file in revision N−1, Git searches for a file that existed only in revision N−1 and is very similar to the new file.) However, it does require more </em><a href="http://en.wikipedia.org/wiki/Central_processing_unit"><em>CPU</em></a><em>-intensive work every time history is reviewed, and a number of options to adjust the heuristics.</em></li>
</ul>
<p><em>Git implements several merging strategies; a non-default can be selected at merge time:<sup><a href="http://en.wikipedia.org/wiki/Git_%28software%29#cite_note-35">[36]</a></sup></em></p>
<p><em>resolve</em></p>
<p><em>the traditional </em><a href="http://en.wikipedia.org/wiki/Three-way_merge"><em>three-way merge</em></a><em> algorithm.</em></p>
<p><em>recursive</em></p>
<p><em>This is the default when pulling or merging one branch, and is a variant of the three-way merge algorithm. &quot;When there are more than one common ancestors that can be used for three-way merge, it creates a merged tree of the common ancestors and uses that as the reference tree for the three-way merge. This has been reported to result in fewer merge conflicts without causing mis-merges by tests done on actual merge commits taken from Linux 2.6 kernel development history. Additionally this can detect and handle merges involving renames.&quot;<sup><a href="http://en.wikipedia.org/wiki/Git_%28software%29#cite_note-36">[37]</a></sup></em></p>
<p><em>octopus</em></p>
<p><em>This is the default when merging more than two heads…</em></p>
<p><em></em></p>
<p><strong>The complete article is here: </strong><a href="http://en.wikipedia.org/wiki/Git_%28software%29"><strong>http://en.wikipedia.org/wiki/Git_%28software%29</strong></a></p>
<p>&#160;</p>
<p>Now that you understand the concept let’s see a couple of tutorials.</p>
<p><strong>First you will need to install:</strong></p>
<p><a href="http://book.git-scm.com/2_installing_git.html">http://book.git-scm.com/2_installing_git.html</a></p>
<p>&#160;</p>
<p><strong>So now you start to learn:</strong></p>
<p><a href="http://akitaonrails.com/2008/4/3/micro-tutorial-de-git">http://akitaonrails.com/2008/4/3/micro-tutorial-de-git</a></p>
<p>Credits to @AkitaOnRails for the great tutorial(Portuguese only)</p>
<p>&#160;</p>
<p><a href="http://carlopecchia.eu/blog/2008/08/26/git-by-example-a-little-tutorial/">http://carlopecchia.eu/blog/2008/08/26/git-by-example-a-little-tutorial/</a></p>
<p>Great tutorial for beginners.</p>
<p>&#160;</p>
<p><a href="http://gitcasts.com/">http://gitcasts.com/</a></p>
<p>And here we have a complete library with screencasts explaining EVERYTHING about GIT!</p>
<p>&#160;</p>
<p>Hope you enjoy the collection. Let me know if you have any question <img src='http://www.stjhimy.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>Feel free to find me in my social networks using the <strong>right bar</strong>.</p>
<p>Cya.</p>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.stjhimy.com%2F2009%2F11%2F24%2Fa-quick-one-complete-tutorials-collection-about-git%2F&amp;linkname=A%20Quick%20One%3A%20Complete%20Tutorials%20Collection%20About%20GIT%21"><img src="http://www.stjhimy.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://www.stjhimy.com/2009/11/24/a-quick-one-complete-tutorials-collection-about-git/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>The perfect tools for the perfect social networks: how to improve your Twitter and Facebook experience.</title>
		<link>http://www.stjhimy.com/2009/11/19/the-perfect-tools-for-the-perfect-social-networks-how-to-improve-your-twitter-and-facebook-experience/</link>
		<comments>http://www.stjhimy.com/2009/11/19/the-perfect-tools-for-the-perfect-social-networks-how-to-improve-your-twitter-and-facebook-experience/#comments</comments>
		<pubDate>Fri, 20 Nov 2009 00:33:50 +0000</pubDate>
		<dc:creator>stJhimy</dc:creator>
				<category><![CDATA[Random but Helpful]]></category>
		<category><![CDATA[FACEBOOK]]></category>
		<category><![CDATA[MOBILE]]></category>
		<category><![CDATA[NETWORK]]></category>
		<category><![CDATA[ORKUT]]></category>
		<category><![CDATA[TWITTER]]></category>

		<guid isPermaLink="false">http://www.stjhimy.com/2009/11/19/the-perfect-tools-for-the-perfect-social-networks-how-to-improve-your-twitter-and-facebook-experience/</guid>
		<description><![CDATA[&#160;  
The time has changed and TI guys are no more the “anti-social” guys, not on the internet concept. We all know that today the internet punch a lot of information every second and we have to be prepared to get that information and be always well informed.
 So if you use twitter or/and [...]]]></description>
			<content:encoded><![CDATA[<p>&#160; <a href="http://www.stjhimy.com/wp-content/uploads/2009/11/icontextowebdevsocialbookmark09bonus.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; margin-left: 0px; border-left-width: 0px; margin-right: 0px" title="icontexto-webdev-social-bookmark-09-bonus" border="0" alt="icontexto-webdev-social-bookmark-09-bonus" align="left" src="http://www.stjhimy.com/wp-content/uploads/2009/11/icontextowebdevsocialbookmark09bonus_thumb.png" width="64" height="64" /></a> </p>
<p>The time has changed and TI guys are no more the “anti-social” guys, not on the internet concept. We all know that today the internet punch a lot of information every second and we have to be prepared to get that information and be always well informed.</p>
<p><a href="http://www.stjhimy.com/wp-content/uploads/2009/11/facebook_64.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; margin-left: 0px; border-left-width: 0px; margin-right: 0px" title="facebook_64" border="0" alt="facebook_64" align="left" src="http://www.stjhimy.com/wp-content/uploads/2009/11/facebook_64_thumb.png" width="64" height="64" /></a> So if you use twitter or/and facebook that’s going to be a great article for you. I have the intention of showing some pretty useful tools to improve your experience with those social networks.</p>
<p> <span id="more-152"></span>
<p><strong><font color="#ff0000">The web lovers:</font></strong></p>
<p>If you are the kind of guy witch prefers keep your things on the web, IGOOGLE is the perfect tool for you. You can put your twitter account, check your facebook updates and a whole of other things like weather, youtube, orkut…</p>
<p>&#160;</p>
<p>IGOOGLE shows a great experience with the social networks, but the tolls are “not so complete”, understand? No? Let’s explain it.</p>
<p>The twitter gadget is not a&#160; complete twitter gadget, you just can see the updates and twit some things.</p>
<p>The facebook gadget is more complete, you can do everything from that gadget.</p>
<p><a href="http://www.stjhimy.com/wp-content/uploads/2009/11/clip_image002.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image002" border="0" alt="clip_image002" src="http://www.stjhimy.com/wp-content/uploads/2009/11/clip_image002_thumb.jpg" width="453" height="258" /></a></p>
<p>You can also get your feeds from Google Reader and customize with pretty themes, what I personally think is an awesome thing : )</p>
<p>You can try IGoogle here: <a href="http://www.igoogle.com">http://www.igoogle.com</a></p>
<p>&#160;</p>
<p><b><font color="#ff0000">For browser lovers:</font></b></p>
<p>For the guys witch prefers be in contact with the social networks in a web browser I have a very good solutions for Firefox.</p>
<p>&#160;</p>
<p><b>Echofon:</b></p>
<p>A great tool for Firefox, you can check your twits from your web browser, simple and functional. There’s also a MAC and IPHONE versions : -)</p>
<p>What sucks on this tool: is only for Twitter.</p>
<p><a href="http://www.stjhimy.com/wp-content/uploads/2009/11/clip_image004.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image004" border="0" alt="clip_image004" src="http://www.stjhimy.com/wp-content/uploads/2009/11/clip_image004_thumb.jpg" width="481" height="215" /></a></p>
<p>You can try Echofon for your Firefox here: <a href="http://echofon.com/twitter/firefox/">http://echofon.com/twitter/firefox/</a></p>
<p>&#160;</p>
<p><b>Yoono</b></p>
<p>That’s a powerful extension for Firefox, brings to you the whole twitter and facebook experience and more: you can read your emails and check your feeds too.</p>
<p>The appearance is great and very intuitive.</p>
<p><a href="http://www.stjhimy.com/wp-content/uploads/2009/11/clip_image006.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image006" border="0" alt="clip_image006" src="http://www.stjhimy.com/wp-content/uploads/2009/11/clip_image006_thumb.jpg" width="164" height="363" /></a><a href="http://www.stjhimy.com/wp-content/uploads/2009/11/clip_image008.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image008" border="0" alt="clip_image008" src="http://www.stjhimy.com/wp-content/uploads/2009/11/clip_image008_thumb.jpg" width="164" height="364" /></a></p>
<p>You can get more information and try Yoono here: <a href="http://yoono.com/">http://yoono.com/</a></p>
<p>&#160;</p>
<p><b><font color="#ff0000">For desktop lovers:</font></b></p>
<p>You love Desktop experience? So let’s see what we have:</p>
<p>&#160;</p>
<p><b>TweetDeck</b></p>
<p>That tool brings a complete experience with Facebook and Twitter; I use that for a long time.</p>
<p>It’s simple and functional tool, you can send twits and facebook updates, images and more.</p>
<p><a href="http://www.stjhimy.com/wp-content/uploads/2009/11/clip_image010.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image010" border="0" alt="clip_image010" src="http://www.stjhimy.com/wp-content/uploads/2009/11/clip_image010_thumb.jpg" width="465" height="327" /></a></p>
<p>You can try TweetDeck here: <a href="http://www.tweetdeck.com/beta/">http://www.tweetdeck.com/beta/</a></p>
<p><b></b></p>
<p><b>Yoono Desktop</b></p>
<p>We have a Yoono Desktop tool too : -)</p>
<p>The same browser version functions in your desktop.</p>
<p><a href="http://www.stjhimy.com/wp-content/uploads/2009/11/clip_image012.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image012" border="0" alt="clip_image012" src="http://www.stjhimy.com/wp-content/uploads/2009/11/clip_image012_thumb.jpg" width="404" height="306" /></a></p>
<p>You can get more information and try Yoono Desktop here: <a href="http://yoono.com/desktop_features.html">http://yoono.com/desktop_features.html</a></p>
<p>&#160;</p>
<p><b><font color="#ff0000">For mobile lovers:</font></b></p>
<p>Everyday, applications for mobile version gets more useful and helpful.</p>
<p>Imagine that you are at the bus and you have to check a feed. Your cellphone can be your best friend if it has the perfect tools.</p>
<p>&#160;</p>
<p><b>For Windows Mobile phones</b></p>
<p>We have lots of applications. I tested a great part of them… but the best solution using Microsoft Mobile was Twikini for both Twitter and Facebook applications.</p>
<p>That is a simple application which provides a complete experience for twitter, truly easy and helpful.</p>
<p><a href="http://www.stjhimy.com/wp-content/uploads/2009/11/clip_image014.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image014" border="0" alt="clip_image014" src="http://www.stjhimy.com/wp-content/uploads/2009/11/clip_image014_thumb.jpg" width="357" height="313" /></a></p>
<p>You can try Twikini here: <a title="http://www.trinketsoftware.com/twikini/" href="http://www.trinketsoftware.com/twikini/">http://www.trinketsoftware.com/twikini/</a></p>
<p>&#160;</p>
<p>Try Facebook for Windows Mobile using applications from Microsoft.</p>
<p><a href="http://www.stjhimy.com/wp-content/uploads/2009/11/clip_image016.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image016" border="0" alt="clip_image016" src="http://www.stjhimy.com/wp-content/uploads/2009/11/clip_image016_thumb.jpg" width="354" height="269" /></a></p>
<p>You can try that here: <a href="http://www.microsoft.com/windowsmobile/en-us/downloads/facebook.mspx">http://www.microsoft.com/windowsmobile/en-us/downloads/facebook.mspx</a></p>
<p>I personally use these two applications on my Motorola Q11 Windows Mobile phone : -)</p>
<p>Works like a charm!</p>
<p>&#160;</p>
<p><b>For Iphone lovers</b></p>
<p>I don’t know much about Iphones but I know Tweetie.</p>
<p>It shows to be a complete application for Iphone users.</p>
<p><a href="http://www.stjhimy.com/wp-content/uploads/2009/11/clip_image018.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image018" border="0" alt="clip_image018" src="http://www.stjhimy.com/wp-content/uploads/2009/11/clip_image018_thumb.jpg" width="165" height="244" /></a></p>
<p>You can find more about Tweetie here: <a href="http://www.atebits.com/tweetie-iphone/">http://www.atebits.com/tweetie-iphone/</a></p>
<p>&#160;</p>
<p>For those who have another Mobile, Fring is the best solution! </p>
<p>You can have the entire Web experience: MSN, Gtalk, Orkut, Facebook even your feeds.</p>
<p><a href="http://www.stjhimy.com/wp-content/uploads/2009/11/clip_image0201.jpg"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="clip_image020" border="0" alt="clip_image020" src="http://www.stjhimy.com/wp-content/uploads/2009/11/clip_image020_thumb1.jpg" width="383" height="145" /></a></p>
<p>You can find more about Fring here: <a href="http://profile.fring.com/existinguser/?u=existinguser">http://profile.fring.com/existinguser/?u=existinguser</a></p>
<p>So I hope that article have been helpful for you guys. I lost much time trying to find the perfect tool.</p>
<p>Feel free to let your comments, if you like find me in your social networks, you can use the right bar on the site!</p>
<p>Cya.</p>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.stjhimy.com%2F2009%2F11%2F19%2Fthe-perfect-tools-for-the-perfect-social-networks-how-to-improve-your-twitter-and-facebook-experience%2F&amp;linkname=The%20perfect%20tools%20for%20the%20perfect%20social%20networks%3A%20how%20to%20improve%20your%20Twitter%20and%20Facebook%20experience."><img src="http://www.stjhimy.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://www.stjhimy.com/2009/11/19/the-perfect-tools-for-the-perfect-social-networks-how-to-improve-your-twitter-and-facebook-experience/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Somebody you can&#8217;t avoid during your work life!</title>
		<link>http://www.stjhimy.com/2009/11/09/somebody-you-cant-avoid-during-your-work-life/</link>
		<comments>http://www.stjhimy.com/2009/11/09/somebody-you-cant-avoid-during-your-work-life/#comments</comments>
		<pubDate>Mon, 09 Nov 2009 23:48:41 +0000</pubDate>
		<dc:creator>stJhimy</dc:creator>
				<category><![CDATA[Random but Helpful]]></category>
		<category><![CDATA[Developers]]></category>
		<category><![CDATA[Work Life]]></category>

		<guid isPermaLink="false">http://www.stjhimy.com/2009/11/09/somebody-you-cant-avoid-during-your-work-life/</guid>
		<description><![CDATA[ 
That’s a random article but I believe it’s necessary. If you are at the job market you probably had faced some guy that type, if you are not at the market place yet be ready because this s almost a RULE: 
YOU WILL HAVE TO FACE THAT KIND OF GUY ONE DAY! 
 
Let’s [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.stjhimy.com/2009/11/09/somebody-you-cant-avoid-during-your-work-life/"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="SOMEBODY_AVOID" border="0" alt="SOMEBODY_AVOID" src="http://www.stjhimy.com/wp-content/uploads/2009/11/SOMEBODY_AVOID1.png" width="456" height="59" /></a> </p>
<p>That’s a random article but I believe it’s necessary. If you are at the job market you probably had faced some guy that type, if you are not at the market place yet be ready because this s almost a RULE: </p>
<p><strong><font color="#ff0000">YOU WILL HAVE TO FACE THAT KIND OF GUY ONE DAY!</font></strong> </p>
<p><a href="http://www.stjhimy.com/wp-content/uploads/2009/11/Developer.png"><img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="Developer" border="0" alt="Developer" src="http://www.stjhimy.com/wp-content/uploads/2009/11/Developer_thumb.png" width="203" height="285" /></a> </p>
<p>Let’s imagine that the company is receiving a new project. Everyone is so excited, yay! The client wants something simple and basic, a tool which makes possible for him to manage his finances and make some previsions/balances about how much his is spending in a month or year.</p>
<p>Really simple, but the project brings a surprise: THAT’S THE PROJECT WHICH IS GONNA BLOW YOUR COMPANY’S NAME AT THE DEVELOPER’S WORLD.</p>
<p>So then we met these guys:</p>
<p> <span id="more-122"></span>
<p><strong>1 – The simple guy.</strong></p>
<p>“What? Ohn, that’s project is pretty easy, let’s write a tutorial about how to use EXCEL 2007 and the client will be happy ”</p>
<p><strong>2 – The complicated guy.</strong></p>
<p>“What?? That’s a very huge project; let’s start making some research about the costs of one computer cloud because I’m quite sure: We will need a hole of processors and a very large traffic of information! And by the way, let’s open another 500 spot at the development department! ”</p>
<p><strong>3 – The social network guy.</strong></p>
<p>“HELL YEAH! We can make a web tool which makes possible to the client share his balances and previsions with the world using FaceBook! Better yet, we can implement auto twitts, that way the whole world will be reading about his financial life! YAY! And don’t forget, we HAVE to make a way for the client put his picture on the software, and share his favorite music at last.fm <img src='http://www.stjhimy.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':-D' class='wp-smiley' /> ”</p>
<p><strong>4 – The “don’t care” guy</strong></p>
<p>“I don’t care about this stupid project”</p>
<p><strong>5 –The retro guy</strong></p>
<p>“Let’s make an assembly application, go to the bar and drink some fucking beers! HELL YEAH BABY”</p>
<p><strong>5 – The revolution guy</strong></p>
<p>“First we create a new language, then a new framework for the new language and then we will be ready to implement the solution <img src='http://www.stjhimy.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> ”</p>
<p><strong>6 – The Microsoft guy</strong></p>
<p>“.NET .NET .NET .NET !!!!!!!!!!!!!! CRAZY, CRAZY,CRAZY!”</p>
<p><strong>7 – The Linux guy</strong></p>
<p>“UNIX + C, UNIX + C, UNIX + C, UNIX + C!!!!!!! CRAZY, CRAZY CRAZY! ”</p>
<p><strong>8 – The Apple guy</strong></p>
<p>“Steve Jobs, Steve Jobs, Steve JOOOBSS! CRAZYYYY”</p>
<p><strong>9 – The methodic guy</strong></p>
<p>“Without writing tests? Better don’t even start, learn how to write test first your moron!”</p>
<p><strong>10 –The mercenary guy</strong></p>
<p>“To hell that technology we’ll use. Let’s just make that worth a lot of money so we can buy our new BMW! YEAHHHH!! $_$”</p>
<p><strong>11 – The open source guy</strong></p>
<p>“That’s solution NEED to be an open source solution so we can share our pretty happy funny tool with the WHOLE WORLD without charge anything! YAYYY! God bless Google!”</p>
<p><strong>12 – The designer guy</strong></p>
<p>“I don’t care about the technology we’ll use, since we can make everything ANIMATED : D and of course a beautiful and easy interface. Oh, don’t forget: flash RULES!”</p>
<p><strong>13 – The lost guy</strong></p>
<p>“Project? WTF is that? Someone can help me find my IPHONE? L”</p>
<p><strong>14 – The religious guy</strong></p>
<p>“Oh god, I will pray every night so you can help my team to get success on this project!”</p>
<p><strong>15 – The atheist guy</strong></p>
<p>“There is no god, there’s no life, there’s no true, let’s just write codes.”</p>
<p><strong>16 – The internationalization guy</strong></p>
<p>“Our application will make support for every language in the world, Latin and Aramaic are indispensable.”</p>
<p><strong>17 –The TV SHOW guy</strong></p>
<p>“I saw an episode of Smallville and superman saved the world using an application like that!”</p>
<p><strong>18 – The Google Reader guy</strong></p>
<p>“Obama loves Twitter, I read that on BBC feeds, let’s write codes!”</p>
<p><strong>19 – The “I’m awesome” guy</strong></p>
<p>“Hey, I’m awesome, what up? Let’s code and pick some girls!”</p>
<p><strong>20 – The Music Guy</strong></p>
<p>“Billie Jean is not my loveeeeeeer, AWWW! Nice project”</p>
<p>&#160;</p>
<p>&#160;</p>
<p>Remembering I don’t have <strong><font color="#ff0000">ANYTHING against ANY KIND OF PEOPLE!</font></strong></p>
<p>That’s just a funny post : -) </p>
<p>Hope you enjoy the types that you can’t avoid during your work life.</p>
<p>If you like the post share it on your Facebook,Twitter or any other social network using the “SHARE” bar above.</p>
<p>If you prefer follow me on <a href="http://www.twitter.com/stJhimyBlog">stJhimyBlog’s Twitter</a> , <a href="http://www.youtube.com/jhimyyy">stJhimy’s Youtube Channel</a> or <a href="http://www.facebook.com/profile.php?id=1382762473&amp;ref=profile">Facebook.</a></p>
<p>Feel free to let your comments.</p>
<p>Cya.</p>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.stjhimy.com%2F2009%2F11%2F09%2Fsomebody-you-cant-avoid-during-your-work-life%2F&amp;linkname=Somebody%20you%20can%26rsquo%3Bt%20avoid%20during%20your%20work%20life%21"><img src="http://www.stjhimy.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://www.stjhimy.com/2009/11/09/somebody-you-cant-avoid-during-your-work-life/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Creating a RESTFUL WEBSERVICE using Ruby On Rails</title>
		<link>http://www.stjhimy.com/2009/11/07/creating-a-restful-webservice-using-ruby-on-rails/</link>
		<comments>http://www.stjhimy.com/2009/11/07/creating-a-restful-webservice-using-ruby-on-rails/#comments</comments>
		<pubDate>Sat, 07 Nov 2009 21:48:00 +0000</pubDate>
		<dc:creator>stJhimy</dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[HTTP Requests]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[RestFul]]></category>
		<category><![CDATA[WebServices]]></category>

		<guid isPermaLink="false">http://www.stjhimy.com/2009/11/07/creating-a-restful-webservice-using-ruby-on-rails/</guid>
		<description><![CDATA[
Since a friend of mine ask for something about how to create a restful web service using Ruby On Rails I decided to make that screen cast, and , since making a screen cast is really faster and more intuitive than wrote an entire tutorial, I will just put some explanations about restful here, and [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.stjhimy.com/2009/11/07/creating-a-restful-webservice-using-ruby-on-rails/"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="logo_webservice_rails" border="0" alt="logo_webservice_rails" src="http://www.stjhimy.com/wp-content/uploads/2009/11/logo_webservice_rails1.png" width="457" height="59" /></a></p>
<p>Since a friend of mine ask for something about how to create a restful web service using Ruby On Rails I decided to make that screen cast, and , since making a screen cast is really faster and more intuitive than wrote an entire tutorial, I will just put some explanations about restful here, and the complete tutorial will be a video hosted on YouTube!.</p>
<p><span style="color: #ff0000"><strong>What’s restful?</strong></span></p>
<p><span style="color: #ff0000"></span><span style="color: #ff0000"><strong></strong></span><span id="more-113"></span></p>
</p>
<p><em><strong>Representational state transfer</strong> (<strong>REST</strong>) is a style of </em><a href="http://en.wikipedia.org/wiki/Software_architecture"><em>software architecture</em></a><em> for </em><a href="http://en.wikipedia.org/wiki/Distributed_computing"><em>distributed</em></a><em> </em><a href="http://en.wikipedia.org/wiki/Hypermedia"><em>hypermedia</em></a><em> systems such as the </em><a href="http://en.wikipedia.org/wiki/World_Wide_Web"><em>World Wide Web</em></a><em>. The term Representational State Transfer (REST) was introduced and defined in 2000 by </em><a href="http://en.wikipedia.org/wiki/Roy_Fielding"><em>Roy Fielding</em></a><a href="http://en.wikipedia.org/wiki/Restful#cite_note-Fielding-Ch5-0"><em>[1]</em></a><a href="http://en.wikipedia.org/wiki/Restful#cite_note-1"><em>[2]</em></a><em> in his doctoral dissertation. Fielding is one of the principal authors of the </em><a href="http://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol"><em>Hypertext Transfer Protocol</em></a><em> (HTTP) specification versions 1.0 and 1.1.</em></p>
<p><em>Conforming to the REST constraints is often referred to as being ‘RESTful’.</em></p>
<p><strong>For more information (I truly recommend that ) read: </strong><a href="http://en.wikipedia.org/wiki/Restful"><strong>http://en.wikipedia.org/wiki/Restful</strong></a></p>
<p>If you want to make a service for some kind of validations or other things, that is going to be a pretty good video tutorial for you.</p>
<p>Basically we have to make a normal HTTP request passing the type<strong> (POST, GET, PUT,DELETE)</strong> and the parameters to get the result.</p>
<p>In this example we have one service that will verify the name we pass for the parameter. We gonna make a request to the url passing the parameter “name” and see what we get.</p>
<p>Rails make it really, really, <strong>reallllllyyyy easy.</strong></p>
<p>Here’s just a little bit about our tutorial, the controller that implements the web service.</p>
<pre class="brush: ruby;">class ServiceController &lt; ActionController::Base

  def verifyname

    if params[:name] and params[:name] == &quot;stJhimy&quot;
      response = &quot;Awesome! Follow new posts in http://www.stjhimy.com&quot;
    else
      response = &quot;Ohn =|, Not so awesome.&quot;
    end

  respond_to do |format|

    format.html {render :text =&gt;response.to_s}
    format.xml {render :text =&gt; response.to_s}
  end

  end

end</pre>
<p>So hands on, let&#8217;s see the entire tutorial:</p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:5737277B-5D6D-4f48-ABFC-DD9C333F4C5D:162d7aab-f364-44ee-924f-5b0631f5e944" class="wlWriterEditableSmartContent">
<div><object width="425" height="355"><param name="movie" value="http://www.youtube.com/v/Yoc3efb58qI&amp;hl=en"></param><embed src="http://www.youtube.com/v/Yoc3efb58qI&amp;hl=en" type="application/x-shockwave-flash" width="425" height="355"></embed></object></div>
</div>
<p>See? really easy!</p>
<p>Hope you guys enjoy the tutorial and if you like, please use the link above ”SHARE” to spread that in your social networks.</p>
<p>If you prefer subscribe to my channel on <a href="http://www.youtube.com/jhimyyy">YouTube</a>, if you have a twitter follow me there <a href="http://www.twitter.com/stjhimy">stJhimy’s Twitter</a> or in <a href="http://www.facebook.com/profile.php?id=1382762473&amp;ref=profile">stJhimy’s Facebook</a> for more tutorials.</p>
<p>You can download the entire code in <a href="http://github.com/stjhimy/PlayingAround_Rails_Webservices">stJhimy’s GitHub</a>.</p>
<p>Make yourself comfortable to let comments or ask about any doubt, I will answer as soon as possible.</p>
<p>Cya.</p>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.stjhimy.com%2F2009%2F11%2F07%2Fcreating-a-restful-webservice-using-ruby-on-rails%2F&amp;linkname=Creating%20a%20RESTFUL%20WEBSERVICE%20using%20Ruby%20On%20Rails"><img src="http://www.stjhimy.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://www.stjhimy.com/2009/11/07/creating-a-restful-webservice-using-ruby-on-rails/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>How to put Live Messenger on your site: An easier way to make technical support on your application</title>
		<link>http://www.stjhimy.com/2009/10/31/how-to-put-live-messenger-on-your-site-an-easier-way-to-make-technical-support-on-your-application/</link>
		<comments>http://www.stjhimy.com/2009/10/31/how-to-put-live-messenger-on-your-site-an-easier-way-to-make-technical-support-on-your-application/#comments</comments>
		<pubDate>Sun, 01 Nov 2009 00:13:36 +0000</pubDate>
		<dc:creator>stJhimy</dc:creator>
				<category><![CDATA[Random but Helpful]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[JAVASCRIPT]]></category>
		<category><![CDATA[MESSENGER]]></category>
		<category><![CDATA[WEB]]></category>

		<guid isPermaLink="false">http://www.stjhimy.com/2009/10/31/how-to-put-live-messenger-on-your-site-an-easier-way-to-make-technical-support-on-your-application/</guid>
		<description><![CDATA[
I was in a normal working day during this week, when someone of my programming team received a new e-mail from a TI company charging to put Live Messenger on their website. With a tiny little research on GOOGLE we discovered that this is incredibly simple and someone who charged for a service like that [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.stjhimy.com/2009/10/31/how-to-put-live-messenger-on-your-site-an-easier-way-to-make-technical-support-on-your-application/#more-108"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="logo_messenger_web" border="0" alt="logo_messenger_web" src="http://www.stjhimy.com/wp-content/uploads/2009/11/logo_messenger_web.png" width="465" height="60" /></a></p>
<p>I was in a normal working day during this week, when someone of my programming team received a new e-mail from a TI company charging to put Live Messenger on their website. With a tiny little research on <a href="http://www.google.com.br/">GOOGLE</a> we discovered that this is incredibly simple and someone who charged for a service like that is just dumb. Microsoft provides a FREE service which makes possible to put that service on your website with a few lines of codes.</p>
<p>So here we go, let’s code.</p>
<p> <span id="more-108"></span>First you need to enter that site:
</p>
<p><a href="http://settings.messenger.live.com/applications/websettings.aspx">http://settings.messenger.live.com/applications/websettings.aspx</a></p>
<p>Check to allow any person to see you online, and then save.</p>
<p><a href="http://www.stjhimy.com/wp-content/uploads/2009/10/clip_image0022.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image002" border="0" alt="clip_image002" src="http://www.stjhimy.com/wp-content/uploads/2009/10/clip_image002_thumb2.jpg" width="423" height="243" /></a></p>
<p>Then click in “Create Html”, now you’ll see some options to customize the Windows Live Messenger of your site.</p>
<p><a href="http://www.stjhimy.com/wp-content/uploads/2009/10/clip_image0042.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image004" border="0" alt="clip_image004" src="http://www.stjhimy.com/wp-content/uploads/2009/10/clip_image004_thumb2.jpg" width="475" height="395" /></a></p>
<p>Change what you want, then above that you should see the JavaScript ready to be used.</p>
<p><a href="http://www.stjhimy.com/wp-content/uploads/2009/10/clip_image0062.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image006" border="0" alt="clip_image006" src="http://www.stjhimy.com/wp-content/uploads/2009/10/clip_image006_thumb2.jpg" width="493" height="47" /></a></p>
<p>Copy the JavaScript and open any text editor (I’m using Notepad of Windows7). Create a new basic HTML and paste your script into the body tag, save that like an html page (.html).</p>
<p><a href="http://www.stjhimy.com/wp-content/uploads/2009/10/clip_image0082.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image008" border="0" alt="clip_image008" src="http://www.stjhimy.com/wp-content/uploads/2009/10/clip_image008_thumb2.jpg" width="499" height="363" /></a></p>
<p>After saving, open your html and enjoy the result. Now you have web messenger in you site WITHOUT DOIN’ ALMOST NOTHING!</p>
<p><a href="http://www.stjhimy.com/wp-content/uploads/2009/10/clip_image0102.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image010" border="0" alt="clip_image010" src="http://www.stjhimy.com/wp-content/uploads/2009/10/clip_image010_thumb2.jpg" width="549" height="328" /></a></p>
<p>See? Easy and you don’t have to pay nothing for this.</p>
<p>Like the category says, Random but Helpful.</p>
<p>Hope you enjoy the tip. Feel free to follow me on <a href="http://www.twitter.com/stjhimy">Twitter</a> / <a href="http://www.facebook.com/profile.php?id=1382762473&amp;ref=profile">Facebook</a> / <a href="http://www.youtube.com/jhimyyy">Youtube</a>.</p>
<p>Comments are always welcome.</p>
<p>Cya</p>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.stjhimy.com%2F2009%2F10%2F31%2Fhow-to-put-live-messenger-on-your-site-an-easier-way-to-make-technical-support-on-your-application%2F&amp;linkname=How%20to%20put%20Live%20Messenger%20on%20your%20site%3A%20An%20easier%20way%20to%20make%20technical%20support%20on%20your%20application"><img src="http://www.stjhimy.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://www.stjhimy.com/2009/10/31/how-to-put-live-messenger-on-your-site-an-easier-way-to-make-technical-support-on-your-application/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>ReportViewer and Linq to SQL: A better way to report your applications</title>
		<link>http://www.stjhimy.com/2009/10/25/reportviewer-and-linq-to-sql-a-better-way-to-report-your-applications/</link>
		<comments>http://www.stjhimy.com/2009/10/25/reportviewer-and-linq-to-sql-a-better-way-to-report-your-applications/#comments</comments>
		<pubDate>Sun, 25 Oct 2009 04:41:33 +0000</pubDate>
		<dc:creator>stJhimy</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[CODES]]></category>
		<category><![CDATA[LINQ TO SQL]]></category>
		<category><![CDATA[QUERIES]]></category>
		<category><![CDATA[REPORTS]]></category>
		<category><![CDATA[REPORTVIEWER]]></category>
		<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://www.stjhimy.com/2009/10/25/reportviewer-and-linq-to-sql-a-better-way-to-report-your-applications/</guid>
		<description><![CDATA[ 
For months I’ve been suffering with reports and .NET (C#), refusing to accept the idea: THERE’S NO BETTER WAY TO REPORT MY APPLICATIONS.
I tried almost everything, but the direct querys (pure SQL) still messing with me. Personally I don’t like that, pure SQL sounds ugly and, for me, it’s a bad practice.
Finally, I was [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.stjhimy.com/2009/10/25/reportviewer-and-linq-to-sql-a-better-way-to-report-your-applications/"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="logo_reportviewer_linq" border="0" alt="logo_reportviewer_linq" src="http://www.stjhimy.com/wp-content/uploads/2009/10/logo_reportviewer_linq1.png" width="453" height="59" /></a> </p>
<p>For months I’ve been suffering with reports and .NET (C#), refusing to accept the idea: THERE’S NO BETTER WAY TO REPORT MY APPLICATIONS.</p>
<p>I tried almost everything, but the direct querys (pure SQL) still messing with me. Personally I don’t like that, pure SQL sounds ugly and, for me, it’s a bad practice.</p>
<p>Finally, I was just playing with some codes and I found the solution, a way to make my reports WITHOUT direct querys using just LINQ TO SQL and C#.</p>
<p> <span id="more-65"></span>I made some video tutorials and I truly hope that it can help you guys like it helped me. Just watch the movies and tell me what you think.
</p>
<p>1 – Creating the report</p>
<p>1.1 – Create the database</p>
<p>1.2 – Put some random information in the database.</p>
<p>1.3 – Create the dataset (WITHOUT QUERIES, YAY)</p>
<p>1.4 – Create the report and put the fields</p>
<p>1.5 – Create the form and put the report</p>
<p>1.6 – Fill the report with informations from database using just LINQ TO SQL</p>
<p>1.7 – Put some parameters</p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:5737277B-5D6D-4f48-ABFC-DD9C333F4C5D:535acaf6-64ec-4f5f-8f00-5e06feddbf9b" class="wlWriterEditableSmartContent">
<div><object width="425" height="355"><param name="movie" value="http://www.youtube.com/v/ZGq8bV_UcMg&amp;hl=en"></param><embed src="http://www.youtube.com/v/ZGq8bV_UcMg&amp;hl=en" type="application/x-shockwave-flash" width="425" height="355"></embed></object></div>
</div>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:5737277B-5D6D-4f48-ABFC-DD9C333F4C5D:4a19565e-f3e0-47f1-a099-b4c2a51f0921" class="wlWriterEditableSmartContent">
<div><object width="425" height="355"><param name="movie" value="http://www.youtube.com/v/thB7xkj3icM&amp;hl=en"></param><embed src="http://www.youtube.com/v/thB7xkj3icM&amp;hl=en" type="application/x-shockwave-flash" width="425" height="355"></embed></object></div>
</div>
<p>2 – Making the sub report</p>
<p>2.1 –Create the table</p>
<p>2.2 – Put some random information</p>
<p>2.3 –Modify the dataset (WITHOUT QUERIES AGAIN, YAY)</p>
<p>2.4 – Create the sub report</p>
<p>2.5 – Connect the report with the sub report</p>
<p>2.6 – Fill the sub report with informations from database using just LINQ TO SQL</p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:5737277B-5D6D-4f48-ABFC-DD9C333F4C5D:1ac663bd-fc61-4d0f-a95f-05e78e76646c" class="wlWriterEditableSmartContent">
<div><object width="425" height="355"><param name="movie" value="http://www.youtube.com/v/i-PWu5DoOC0&amp;hl=en"></param><embed src="http://www.youtube.com/v/i-PWu5DoOC0&amp;hl=en" type="application/x-shockwave-flash" width="425" height="355"></embed></object></div>
</div>
<p>3 – Making it prettier</p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:5737277B-5D6D-4f48-ABFC-DD9C333F4C5D:c7d5aee1-8636-4126-aad2-864bb40f678e" class="wlWriterEditableSmartContent">
<div><object width="425" height="355"><param name="movie" value="http://www.youtube.com/v/SZNKZ7yiU7Q&amp;hl=en"></param><embed src="http://www.youtube.com/v/SZNKZ7yiU7Q&amp;hl=en" type="application/x-shockwave-flash" width="425" height="355"></embed></object></div>
</div>
<p>Let me know if someone has any doubt.</p>
<p>As usual the entire code is available in <a href="http://github.com/stjhimy/PlayingAround_ReportViewer">@stJhimy’s Github</a></p>
<p>Subscribe on my <a href="feed://http:/www.stjhimy.com/feed/">RSS</a> or <a href="http://www.youtube.com/jhimyyy">Youtube channel</a> for more tutorials and videos, if you prefer just follow me on<a href="http://twitter.com/stjhimy"> Twitter</a>.</p>
<p>Feel free to make comments and criticisms.</p>
<p>Cya, enjoy the tutorial.   <br /><a href="http://blogblogs.com.br/api/claim/568099500/231214/173717" rel="me">BlogBlogs.Com.Br </a></p>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.stjhimy.com%2F2009%2F10%2F25%2Freportviewer-and-linq-to-sql-a-better-way-to-report-your-applications%2F&amp;linkname=ReportViewer%20and%20Linq%20to%20SQL%3A%20A%20better%20way%20to%20report%20your%20applications"><img src="http://www.stjhimy.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://www.stjhimy.com/2009/10/25/reportviewer-and-linq-to-sql-a-better-way-to-report-your-applications/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>Playing Around with Visual Studio: make things quickly!</title>
		<link>http://www.stjhimy.com/2009/10/20/playing-around-with-visual-studio-make-things-quickly/</link>
		<comments>http://www.stjhimy.com/2009/10/20/playing-around-with-visual-studio-make-things-quickly/#comments</comments>
		<pubDate>Wed, 21 Oct 2009 00:57:49 +0000</pubDate>
		<dc:creator>stJhimy</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[GIT]]></category>
		<category><![CDATA[GITHUB]]></category>
		<category><![CDATA[IDE]]></category>
		<category><![CDATA[MICROSOFT]]></category>
		<category><![CDATA[QUICK OPEN]]></category>
		<category><![CDATA[TEXTMATE]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://www.stjhimy.com/2009/10/20/playing-around-with-visual-studio-make-things-quickly/</guid>
		<description><![CDATA[ 
Everyone knows that Visual Studio can be such a great IDE, but sometimes you feel that something is missing.   It&#8217;s okay if you have to search for each file in Visual Solution when you have four&#8230;maybe five files, but things can go really bad when you have sixty&#8230;seventy files in your solution. [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.stjhimy.com/2009/10/20/playing-around-with-visual-studio-make-things-quickly/"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="logo_quick_open" border="0" alt="logo_quick_open" src="http://www.stjhimy.com/wp-content/uploads/2009/10/logo_quick_open.png" width="457" height="59" /></a> </p>
<p>Everyone knows that Visual Studio can be such a great IDE, but sometimes you feel that something is missing.   <br />It&#8217;s okay if you have to search for each file in Visual Solution when you have four&#8230;maybe five files, but things can go really bad when you have sixty&#8230;seventy files in your solution. It&#8217;s a lot of waste of time having to search file by file every time you need something. Then we all think: doesn’t Visual Studio have a quick open file? Something that make possible for me to search files by the name, like quick open from TextMate? No, unfortunately Visual Studio doesn&#8217;t come with that option, but happly we have a solution. I&#8217;ve trying to find that for six months or more, until I got that plugin: Quick Open for Visual Studio 2008.    <br />That&#8217;s a complement developed for Visual Studio which makes possible the quick open file function. You press the keys and the window is going to open. You type the file’s name (or part of it) you want, find it, and then press “enter” to open it.    <br />The installation is pretty simple, just download the component here <a href="http://github.com/stjhimy/PlayingAround_VistualStudio_QuickOpen">@stJhimy’s github.</a></p>
<p> <span id="more-61"></span>Extract the RAR and open the installation. Let the images guide you:
</p>
<p><a href="http://www.stjhimy.com/wp-content/uploads/2009/10/clip_image0021.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image002" border="0" alt="clip_image002" src="http://www.stjhimy.com/wp-content/uploads/2009/10/clip_image002_thumb1.jpg" width="376" height="308" /></a></p>
<p>Next…</p>
<p><a href="http://www.stjhimy.com/wp-content/uploads/2009/10/clip_image0041.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image004" border="0" alt="clip_image004" src="http://www.stjhimy.com/wp-content/uploads/2009/10/clip_image004_thumb1.jpg" width="382" height="313" /></a></p>
<p>Next&#8230;</p>
<p><a href="http://www.stjhimy.com/wp-content/uploads/2009/10/clip_image0061.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image006" border="0" alt="clip_image006" src="http://www.stjhimy.com/wp-content/uploads/2009/10/clip_image006_thumb1.jpg" width="384" height="314" /></a></p>
<p>Next…</p>
<p><a href="http://www.stjhimy.com/wp-content/uploads/2009/10/clip_image0081.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image008" border="0" alt="clip_image008" src="http://www.stjhimy.com/wp-content/uploads/2009/10/clip_image008_thumb1.jpg" width="387" height="317" /></a></p>
<p>Wait…</p>
<p><a href="http://www.stjhimy.com/wp-content/uploads/2009/10/clip_image0101.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image010" border="0" alt="clip_image010" src="http://www.stjhimy.com/wp-content/uploads/2009/10/clip_image010_thumb1.jpg" width="390" height="319" /></a></p>
<p>Close.</p>
<p>That couldn’t be simpler. Now, if you open your Visual Studio 2008 and go to Tolls&gt;&gt;Customize&gt;&gt;Keyboard and try to find Edit.QuickOpenFile you should see that screen:</p>
<p><a href="http://www.stjhimy.com/wp-content/uploads/2009/10/clip_image0121.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image012" border="0" alt="clip_image012" src="http://www.stjhimy.com/wp-content/uploads/2009/10/clip_image012_thumb1.jpg" width="389" height="229" /></a></p>
<p>Just change the shortcut to whatever you want, personally I prefer CTRL + ALT + O, but that’s your choice.</p>
<p>After changing the shortcut, open some project and test it. You should see the quick open file screen like that one above when you press the shortcut:</p>
<p><a href="http://www.stjhimy.com/wp-content/uploads/2009/10/clip_image0141.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image014" border="0" alt="clip_image014" src="http://www.stjhimy.com/wp-content/uploads/2009/10/clip_image014_thumb1.jpg" width="391" height="270" /></a></p>
<p>It’s a simple tip but is something really cool and helpful.</p>
<p>Here’s a short video showing how it works:</p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:5737277B-5D6D-4f48-ABFC-DD9C333F4C5D:63203f01-bb3a-42a9-9bce-38d550fb5b9a" class="wlWriterEditableSmartContent">
<div><object width="425" height="355"><param name="movie" value="http://www.youtube.com/v/x5U9ycJ1vEs&amp;hl=en"></param><embed src="http://www.youtube.com/v/x5U9ycJ1vEs&amp;hl=en" type="application/x-shockwave-flash" width="425" height="355"></embed></object></div>
</div>
<p>As usual you can download the article (including Portuguese version and Visual Studio Quick Open File Installation) on <a href="http://github.com/stjhimy/PlayingAround_VistualStudio_QuickOpen">@stJhimy’s github.</a></p>
<p>Thanks again to Talita Facirolli for text corrections.</p>
<p>Feel free to make comments and criticisms</p>
<p>Hope you enjoy the micro tutorial.</p>
<p>Cya.</p>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.stjhimy.com%2F2009%2F10%2F20%2Fplaying-around-with-visual-studio-make-things-quickly%2F&amp;linkname=Playing%20Around%20with%20Visual%20Studio%3A%20make%20things%20quickly%21"><img src="http://www.stjhimy.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://www.stjhimy.com/2009/10/20/playing-around-with-visual-studio-make-things-quickly/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
