<?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>CodeCompetition.com</title>
	<atom:link href="http://www.codecompetition.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.codecompetition.com</link>
	<description>Software Development, and Technology Information</description>
	<lastBuildDate>Tue, 15 Sep 2009 16:55:21 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Optional Parameters and Named Parameters in C# 4.0 Explained</title>
		<link>http://www.codecompetition.com/news/optional-parameters-and-named-parameters-in-c-4-0-explained/</link>
		<comments>http://www.codecompetition.com/news/optional-parameters-and-named-parameters-in-c-4-0-explained/#comments</comments>
		<pubDate>Mon, 14 Sep 2009 02:21:53 +0000</pubDate>
		<dc:creator>Shane</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[csharp]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://www.codecompetition.com/?p=107</guid>
		<description><![CDATA[C# 4.0 has added two very useful features called Optional Parameters and Named Parameters. For years C# coders have had to settle for overloading their methods to account for parameters that will not always be used.
Optional Parameters Explained

private string YourMethod&#40;string firstName,
string lastName = &#34;Doe&#34;, int age = 20&#41;
&#123;
   return firstName + &#34; &#34; [...]


Related posts:<ol><li><a href='http://www.codecompetition.com/general-programming/c-data-types-explained/' rel='bookmark' title='Permanent Link: C# Data Types Explained'>C# Data Types Explained</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>C# 4.0 has added two very useful features called <strong>Optional Parameters</strong> and <strong>Named Parameters</strong>. For years C# coders have had to settle for overloading their methods to account for parameters that will not always be used.</p>
<h2>Optional Parameters Explained</h2>

<div class="wp_syntax"><div class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #0600FF;">private</span> <span style="color: #FF0000;">string</span> YourMethod<span style="color: #000000;">&#40;</span><span style="color: #FF0000;">string</span> firstName,
<span style="color: #FF0000;">string</span> lastName <span style="color: #008000;">=</span> <span style="color: #666666;">&quot;Doe&quot;</span>, <span style="color: #FF0000;">int</span> age <span style="color: #008000;">=</span> <span style="color: #FF0000;">20</span><span style="color: #000000;">&#41;</span>
<span style="color: #000000;">&#123;</span>
   <span style="color: #0600FF;">return</span> firstName <span style="color: #008000;">+</span> <span style="color: #666666;">&quot; &quot;</span> <span style="color: #008000;">+</span> lastName<span style="color: #008000;">;</span>
<span style="color: #000000;">&#125;</span></pre></div></div>

<p>In the code above the only required parameter is the first parameter, firstName. The second and third parameters are optional. Below are three different ways you can call this one single method:</p>

<div class="wp_syntax"><div class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #FF0000;">string</span> name <span style="color: #008000;">=</span> null<span style="color: #008000;">;</span>
name <span style="color: #008000;">=</span> YourMethod<span style="color: #000000;">&#40;</span><span style="color: #666666;">&quot;John&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span></pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #FF0000;">string</span> name <span style="color: #008000;">=</span> null<span style="color: #008000;">;</span>
name <span style="color: #008000;">=</span> YourMethod<span style="color: #000000;">&#40;</span><span style="color: #666666;">&quot;John&quot;</span>,<span style="color: #666666;">&quot;Smith&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span></pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #FF0000;">string</span> name <span style="color: #008000;">=</span> null<span style="color: #008000;">;</span>
name <span style="color: #008000;">=</span> YourMethod<span style="color: #000000;">&#40;</span><span style="color: #666666;">&quot;John&quot;</span>,<span style="color: #666666;">&quot;Smith&quot;</span>,<span style="color: #FF0000;">30</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span></pre></div></div>

<p>After looking at the above examples you may be wondering, what do I do if I want to pass just the first and third parameters, skipping the second? That is where Named Parameters come in:</p>
<h2>Named Parameters Explained</h2>

<div class="wp_syntax"><div class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #FF0000;">string</span> name <span style="color: #008000;">=</span> null<span style="color: #008000;">;</span>
name <span style="color: #008000;">=</span> YourMethod<span style="color: #000000;">&#40;</span><span style="color: #666666;">&quot;John&quot;</span>, age<span style="color: #008000;">:</span> <span style="color: #FF0000;">40</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span></pre></div></div>

<p>As you can see in the above example, we are able to pass the age parameter by using the new Named Parameters feature.</p>
<img src="http://www.codecompetition.com/?ak_action=api_record_view&id=107&type=feed" alt="" />

<p>Related posts:<ol><li><a href='http://www.codecompetition.com/general-programming/c-data-types-explained/' rel='bookmark' title='Permanent Link: C# Data Types Explained'>C# Data Types Explained</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.codecompetition.com/news/optional-parameters-and-named-parameters-in-c-4-0-explained/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Use LINQ to Delete Old Files</title>
		<link>http://www.codecompetition.com/windows/use-linq-to-delete-old-files/</link>
		<comments>http://www.codecompetition.com/windows/use-linq-to-delete-old-files/#comments</comments>
		<pubDate>Sun, 13 Sep 2009 06:13:27 +0000</pubDate>
		<dc:creator>Shane</dc:creator>
				<category><![CDATA[General Programming]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[csharp]]></category>
		<category><![CDATA[LINQ]]></category>
		<category><![CDATA[vb.net]]></category>

		<guid isPermaLink="false">http://www.codecompetition.com/?p=98</guid>
		<description><![CDATA[I commonly write applications that will write a new log file every day, and as you can imagine, over time this be be quite a task to keep things clean and tidy. I recently found that LINQ is perfect for this scenario.
Just be sure to have a reference to System.IO and then here is the [...]


Related posts:<ol><li><a href='http://www.codecompetition.com/general-programming/c-data-types-explained/' rel='bookmark' title='Permanent Link: C# Data Types Explained'>C# Data Types Explained</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>I commonly write applications that will write a new log file every day, and as you can imagine, over time this be be quite a task to keep things clean and tidy. I recently found that LINQ is perfect for this scenario.</p>
<p>Just be sure to have a reference to <strong>System.IO</strong> and then here is the code you need:</p>
<h2>C#</h2>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
</pre></td><td class="code"><pre class="csharp" style="font-family:monospace;">var query <span style="color: #008000;">=</span> from o <span style="color: #0600FF;">in</span> Directory.<span style="color: #0000FF;">GetFiles</span><span style="color: #000000;">&#40;</span><span style="color: #666666;">&quot;/YourFolder&quot;</span>, <span style="color: #666666;">&quot;*.*&quot;</span>, SearchOption.<span style="color: #0000FF;">AllDirectories</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
let x <span style="color: #008000;">=</span> <span style="color: #008000;">new</span> FileInfo<span style="color: #000000;">&#40;</span>o<span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
where x.<span style="color: #0000FF;">CreationTime</span> <span style="color: #008000;">&lt;=</span> DateTime.<span style="color: #0000FF;">Now</span>.<span style="color: #0000FF;">AddMonths</span><span style="color: #000000;">&#40;</span><span style="color: #008000;">-</span><span style="color: #FF0000;">6</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
select o<span style="color: #008000;">;</span>
<span style="color: #0600FF;">foreach</span> <span style="color: #000000;">&#40;</span>var item <span style="color: #0600FF;">in</span> query<span style="color: #000000;">&#41;</span>
<span style="color: #000000;">&#123;</span>
   File.<span style="color: #0000FF;">Delete</span><span style="color: #000000;">&#40;</span>item<span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
<span style="color: #000000;">&#125;</span></pre></td></tr></table></div>

<h2>VB</h2>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
</pre></td><td class="code"><pre class="vbnet" style="font-family:monospace;"><span style="color: #0600FF;">Dim</span> query <span style="color: #008000;">=</span> _
From o In <span style="color: #0600FF;">Directory</span>.<span style="color: #0000FF;">GetFiles</span><span style="color: #000000;">&#40;</span><span style="color: #808080;">&quot;/YourFolder&quot;</span>, <span style="color: #808080;">&quot;*.*&quot;</span>, _
SearchOption.<span style="color: #0000FF;">AllDirectories</span><span style="color: #000000;">&#41;</span> _
<span style="color: #0600FF;">Let</span> x <span style="color: #008000;">=</span> <span style="color: #FF8000;">New</span> FileInfo<span style="color: #000000;">&#40;</span>o<span style="color: #000000;">&#41;</span> _
Where x.<span style="color: #0000FF;">CreationTime</span> &lt;<span style="color: #008000;">=</span> DateTime.<span style="color: #0600FF;">Now</span>.<span style="color: #0000FF;">AddMonths</span><span style="color: #000000;">&#40;</span><span style="color: #008000;">-</span><span style="color: #FF0000;">6</span><span style="color: #000000;">&#41;</span> _
<span style="color: #0600FF;">Select</span> o
&nbsp;
<span style="color: #FF8000;">For</span> <span style="color: #0600FF;">Each</span> item In query
<span style="color: #008000;">File</span>.<span style="color: #0000FF;">Delete</span><span style="color: #000000;">&#40;</span>item<span style="color: #000000;">&#41;</span>
<span style="color: #FF8000;">Next</span> item</pre></td></tr></table></div>

<h2>Summary</h2>
<p>The code above will find all files older than 6 months, and delete them. Be sure if you use this code to update the search directory, and to change the search pattern (&#8220;*.*&#8221;) to only delete the files you intend to delete.</p>
<img src="http://www.codecompetition.com/?ak_action=api_record_view&id=98&type=feed" alt="" />

<p>Related posts:<ol><li><a href='http://www.codecompetition.com/general-programming/c-data-types-explained/' rel='bookmark' title='Permanent Link: C# Data Types Explained'>C# Data Types Explained</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.codecompetition.com/windows/use-linq-to-delete-old-files/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>C# Data Types Explained</title>
		<link>http://www.codecompetition.com/general-programming/c-data-types-explained/</link>
		<comments>http://www.codecompetition.com/general-programming/c-data-types-explained/#comments</comments>
		<pubDate>Sun, 13 Sep 2009 05:17:10 +0000</pubDate>
		<dc:creator>Shane</dc:creator>
				<category><![CDATA[General Programming]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[csharp]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://www.codecompetition.com/?p=89</guid>
		<description><![CDATA[In C# you can define two types of variables: value types and reference types. With the value type of variable you can store actual values, while the reference type simply holds references to values that are stored somewhere in memory.
The first thing to understand is that value types are allocated on the stack and are [...]


Related posts:<ol><li><a href='http://www.codecompetition.com/news/optional-parameters-and-named-parameters-in-c-4-0-explained/' rel='bookmark' title='Permanent Link: Optional Parameters and Named Parameters in C# 4.0 Explained'>Optional Parameters and Named Parameters in C# 4.0 Explained</a></li>
<li><a href='http://www.codecompetition.com/windows/use-linq-to-delete-old-files/' rel='bookmark' title='Permanent Link: Use LINQ to Delete Old Files'>Use LINQ to Delete Old Files</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>In C# you can define two types of variables: <strong>value types</strong> and <strong>reference types</strong>. With the value type of variable you can store actual values, while the reference type simply holds references to values that are stored somewhere in memory.</p>
<p>The first thing to understand is that value types are allocated on the stack and are available in almost all programming languages. Reference types are allocated on the heap and normally will represent class instances.</p>
<h2>Predefined C# value types</h2>
<ul>
<li><strong>sbyte:</strong> Holds 8-bit signed integers. The s in sbyte stands for signed, meaning that the variable&#8217;s value can be either positive or negative. The smallest possible value for an sbyte variable is -128; the largest possible value is 127.</li>
</ul>
<ul>
<li><strong>byte:</strong> Holds 8-bit unsigned integers. Unlike sbyte variables, byte variables are not signed and can only hold positive numbers. The smallest possible value for a byte variable is 0; the largest possible value is 255.</li>
</ul>
<ul>
<li><strong>short:</strong> Holds 16-bit signed integers. The smallest possible value for a short variable is -32,768; the largest possible value is 32,767.</li>
</ul>
<ul>
<li><strong>ushort:</strong> Holds 16-bit unsigned integers. The u in ushort stands for unsigned. The smallest possible value of an ushort variable is 0; the largest possible value is 65,535.</li>
</ul>
<ul>
<li><strong>int:</strong> Holds 32-bit signed integers. The smallest possible value of an int variable is -2,147,483,648; the largest possible value is 2,147,483,647.</li>
</ul>
<ul>
<li><strong>uint:</strong> Holds 32-bit unsigned integers. The u in uint stands for unsigned. The smallest possible value of a uint variable is 0; the largest possible value is 4,294,967,295.</li>
</ul>
<ul>
<li><strong>long:</strong> Holds 64-bit signed integers. The smallest possible value of a long variable is 9,223,372,036,854,775,808; the largest possible value is 9,223,372,036,854,775,807.</li>
</ul>
<ul>
<li><strong>ulong:</strong> Holds 64-bit unsigned integers. The u in ulong stands for unsigned. The smallest possible value of a ulong variable is 0; the largest possible value is 18,446,744,073,709,551,615.</li>
</ul>
<ul>
<li><strong>char:</strong> Holds 16-bit Unicode characters. The smallest possible value of a char variable is the Unicode character whose value is 0; the largest possible value is the Unicode character whose value is 65,535.</li>
</ul>
<ul>
<li><strong>float:</strong> Holds a 32-bit signed floating-point value. The smallest possible value of a float type is approximately 1.5 times 10 to the 45th power; the largest possible value is approximately 3.4 times 10 to the 38th power.</li>
</ul>
<ul>
<li><strong>double:</strong> Holds a 64-bit signed floating-point value. The smallest possible value of a double is approximately 5 times 10 to the 324th; the largest possible value is approximately 1.7 times 10 to the 308th.</li>
</ul>
<ul>
<li><strong>decimal:</strong> Holds a 128-bit signed floating-point value. Variables of type decimal are good for financial calculations. The smallest possible value of a decimal type is approximately 1 times 10 to the 28th power; the largest possible value is approximately 7.9 times 10 to the 28th power.</li>
</ul>
<ul>
<li><strong>bool:</strong> Holds one of two possible values, true or false. The use of the bool type is one of the areas in which C# breaks from its C and C++ heritage. In C and C++, the integer value 0 was synonymous with false, and any nonzero value was synonymous with true. In C#, however, the types are not synonymous. You cannot convert an integer variable into an equivalent bool value. If you want to work with a variable that needs to represent a true or false condition, use a bool variable and not an int variable.</li>
</ul>
<h2>Predefined C# reference types</h2>
<ul>
<li><strong>string:</strong> Represents a string of Unicode characters. It allows easy manipulation and assignment of strings. Strings are immutable, meaning that once it is created it can&#8217;t be modified. So when you try to modify a string, such as concatenating it with another string, a new string object is actually created to hold the new resulting string.</li>
</ul>
<ul>
<li><strong>object:</strong> Represents a general purpose type. In C#, all predefined and user-defined types inherit from the object type or System.Object class.</li>
</ul>
<h2>Summary</h2>
<p>Proper usage of correct data types allows developers to make the most of the language, but may take some time for those who have used different programming languages prior to switching to C#.</p>
<img src="http://www.codecompetition.com/?ak_action=api_record_view&id=89&type=feed" alt="" />

<p>Related posts:<ol><li><a href='http://www.codecompetition.com/news/optional-parameters-and-named-parameters-in-c-4-0-explained/' rel='bookmark' title='Permanent Link: Optional Parameters and Named Parameters in C# 4.0 Explained'>Optional Parameters and Named Parameters in C# 4.0 Explained</a></li>
<li><a href='http://www.codecompetition.com/windows/use-linq-to-delete-old-files/' rel='bookmark' title='Permanent Link: Use LINQ to Delete Old Files'>Use LINQ to Delete Old Files</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.codecompetition.com/general-programming/c-data-types-explained/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to run PHP5 on 1AND1.com</title>
		<link>http://www.codecompetition.com/news/how-to-run-php5-on-1and1-com/</link>
		<comments>http://www.codecompetition.com/news/how-to-run-php5-on-1and1-com/#comments</comments>
		<pubDate>Sun, 13 Sep 2009 05:02:59 +0000</pubDate>
		<dc:creator>Shane</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.codecompetition.com/?p=84</guid>
		<description><![CDATA[While the fix for this issue is extremely easy to complete, I have found that the 1&#38;1 technical staff do not always give an easy explanation to solve these types of issues.
The Problem:
You are probably using 1&#38;1 to host your website, and just found out your site needs to use PHP5, but is currently using [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p>While the fix for this issue is extremely easy to complete, I have found that the 1&amp;1 technical staff do not always give an easy explanation to solve these types of issues.</p>
<h2>The Problem:</h2>
<p>You are probably using 1&amp;1 to host your website, and just found out your site needs to use PHP5, but is currently using PHP4.</p>
<h2>The Solution:</h2>
<p>To fix this issue you can simply add the following two lines to the .htaccess file located in your sites root directory:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">AddType x-mapp-php5 .php
AddHandler x-mapp-php5 .php</pre></div></div>

<p>And that&#8217;s it! You are now using PHP5.</p>
<img src="http://www.codecompetition.com/?ak_action=api_record_view&id=84&type=feed" alt="" />

<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.codecompetition.com/news/how-to-run-php5-on-1and1-com/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SM Bus Controller Driver</title>
		<link>http://www.codecompetition.com/windows/sm-bus-controller-driver/</link>
		<comments>http://www.codecompetition.com/windows/sm-bus-controller-driver/#comments</comments>
		<pubDate>Sun, 13 Sep 2009 04:55:39 +0000</pubDate>
		<dc:creator>Shane</dc:creator>
				<category><![CDATA[Windows]]></category>
		<category><![CDATA[Drivers]]></category>

		<guid isPermaLink="false">http://www.codecompetition.com/?p=75</guid>
		<description><![CDATA[Maybe you recently installed Windows, and now you found this page because you are looking for the driver for a device called SM Bus Controller that is in your device manager with a yellow question mark, or maybe an exclamation mark?
Here is the issue:

Windows did not find the driver for the device: SMBus Controller?
The device [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p>Maybe you recently installed Windows, and now you found this page because you are looking for the driver for a device called SM Bus Controller that is in your device manager with a yellow question mark, or maybe an exclamation mark?</p>
<h2>Here is the issue:</h2>
<ul>
<li>Windows did not find the driver for the device: SMBus Controller?</li>
<li>The device manager shows a yellow question mark for the SMBus Controller?</li>
<li>The device manager lists the SMBus controller under Other Devices?</li>
</ul>
<p>The SMBus Controller is the System Management Bus device that controls low-speed system management communications. This device is common to most Intel chipsets.</p>
<p>To fix this issue you can simply download and run the <a href="http://www.intel.com/support/chipsets/inf/">Intel Chipset Software Installation Utility</a>. This download will install the chipset driver files so Windows can properly recognize the chipset&#8217;s built-in SMBus Controller.</p>
<p>This will apply to the following Operating Systems:</p>
<p>Windows 98, Windows 98 SE, Windows 2000, Windows Me, Windows XP Professional, Windows XP Home Edition, Windows XP Tablet PC Edition, Windows Server 2003, Windows XP Media Center Edition, Windows 2000 Server, Windows 2000 Advanced Server</p>
<img src="http://www.codecompetition.com/?ak_action=api_record_view&id=75&type=feed" alt="" />

<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.codecompetition.com/windows/sm-bus-controller-driver/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setup Subversion on Ubuntu</title>
		<link>http://www.codecompetition.com/featured/setup-subversion-on-ubuntu/</link>
		<comments>http://www.codecompetition.com/featured/setup-subversion-on-ubuntu/#comments</comments>
		<pubDate>Thu, 10 Sep 2009 23:46:40 +0000</pubDate>
		<dc:creator>Shane</dc:creator>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[Linux / Unix]]></category>
		<category><![CDATA[Subversion]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.codecompetition.com/?p=31</guid>
		<description><![CDATA[Here is a quick tutorial that will walk you through step by step to setup and configure Subversion on Ubuntu. This will get you going whether your installing on your local machine or deploying Subversion to a server where you will be hosting lots of projects.
Step 1: Update Software and Grab Tools 
You should always [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p>Here is a quick tutorial that will walk you through step by step to setup and configure Subversion on Ubuntu. This will get you going whether your installing on your local machine or deploying Subversion to a server where you will be hosting lots of projects.</p>
<p><strong>Step 1: Update Software and Grab Tools </strong></p>
<p>You should always start off the same way and ensure your system is up to date, and has the tools you will need.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> update
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> openssh-server</pre></div></div>

<p><strong>Step 2: Install Subversion</strong></p>
<p>This will install Subversion, and set the base for you to use to create your repositories:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> subversion</pre></div></div>

<p><strong>Step 3: Security</strong></p>
<p lang="bash">
<p>At this step we will setup a security structure that will allow for expansion, but will not be too complex for the average home user. We will first create a group named &#8217;svn&#8217; and then add yourself and any other users you want to be able to access your repository.<strong> </strong></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> addgroup <span style="color: #c20cb9; font-weight: bold;">svn</span>
<span style="color: #c20cb9; font-weight: bold;">sudo</span> gpasswd <span style="color: #660033;">-a</span> yourusername <span style="color: #c20cb9; font-weight: bold;">svn</span></pre></div></div>

<p><strong>Step 4: Additional Security</strong></p>
<p>Next you will need to add a place to store your repositories, and will need to set permissions there that match what you did for step 3.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>repos
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">chown</span> root:<span style="color: #c20cb9; font-weight: bold;">svn</span> <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>repos
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">chmod</span> <span style="color: #660033;">-R</span> <span style="color: #000000;">770</span> <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>repos</pre></div></div>

<p>In order for the changes from steps 3 and four to take effect relating to the security group &#8217;svn&#8217; that we created you will need to reboot your machine. I suggest you bookmark this page and save any open work, because the next command will restart your machine:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> reboot</pre></div></div>

<p><strong>Step 5: Create Your Repository</strong></p>
<p>Now that you have rebooted, you should be able to create a new repository in the directory /home/repos</p>
<p>Be sure to <strong>not</strong> use <em>sudo</em> on this step.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">svnadmin</span> create <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>repos<span style="color: #000000; font-weight: bold;">/</span>reponame</pre></div></div>

<p>If all goes well and you don&#8217;t receive any errors, then go on to step 6. If you do receive permissions errors, go back to step 4 and run the second and third commands once again.</p>
<p><strong>Step 6: Add Files To Your Repository</strong></p>
<p>Now that you have your repository up and running you can go ahead and add files to it. Assuming you have a project named mycoolapp that is stored in /home/youruser/ you would type this command to import it:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">svn</span> import <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>youruser<span style="color: #000000; font-weight: bold;">/</span>mycoolapp <span style="color: #c20cb9; font-weight: bold;">file</span>:<span style="color: #000000; font-weight: bold;">///</span>home<span style="color: #000000; font-weight: bold;">/</span>repos<span style="color: #000000; font-weight: bold;">/</span>reponame <span style="color: #660033;">-m</span> <span style="color: #ff0000;">&quot;initial import&quot;</span></pre></div></div>

<p><strong>Step 7: Checkout Your Project</strong></p>
<p>Now that your project is stored in your repository you will need to check it out to work on it and make changes. Be sure to change the server name to the name of your machine.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">svn</span> <span style="color: #c20cb9; font-weight: bold;">co</span> <span style="color: #c20cb9; font-weight: bold;">svn</span>+<span style="color: #c20cb9; font-weight: bold;">ssh</span>:<span style="color: #000000; font-weight: bold;">//</span>servername.com<span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>repos<span style="color: #000000; font-weight: bold;">/</span>reponame</pre></div></div>

<p>That&#8217;s it! The next steps you may want to do include:</p>
<p>a) Learn more about Subversion with the free online svnbook: http://svnbook.red-bean.com/<br />
b) Setup Subversion to be accessible with Apache2 and WebDAV: (Article coming soon, let me know if you need it quickly)</p>
<img src="http://www.codecompetition.com/?ak_action=api_record_view&id=31&type=feed" alt="" />

<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.codecompetition.com/featured/setup-subversion-on-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Find Open Ports in Windows XP</title>
		<link>http://www.codecompetition.com/windows/find-open-ports-in-windows-xp/</link>
		<comments>http://www.codecompetition.com/windows/find-open-ports-in-windows-xp/#comments</comments>
		<pubDate>Thu, 10 Sep 2009 22:09:29 +0000</pubDate>
		<dc:creator>Shane</dc:creator>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://www.codecompetition.com/?p=14</guid>
		<description><![CDATA[So you need to find out what ports are currently being used in Windows XP and don't know where to start? Here is a quick way to find out what ports are open or exposed:


Related posts:<ol><li><a href='http://www.codecompetition.com/windows/sm-bus-controller-driver/' rel='bookmark' title='Permanent Link: SM Bus Controller Driver'>SM Bus Controller Driver</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>So you need to find out what ports are currently being used in Windows and don&#8217;t know where to start?</p>
<p>Here is a quick way to find out what ports are open or exposed:</p>
<p>Click: Start -&gt; Run and type: cmd {enter}<br />
At the command prompt type:</p>

<div class="wp_syntax"><div class="code"><pre class="dos" style="font-family:monospace;">netstat -a</pre></div></div>

<p>Netstat will display a list of all listening ports, and for established connections it will show who&#8217;s on the other end.</p>
<img src="http://www.codecompetition.com/?ak_action=api_record_view&id=14&type=feed" alt="" />

<p>Related posts:<ol><li><a href='http://www.codecompetition.com/windows/sm-bus-controller-driver/' rel='bookmark' title='Permanent Link: SM Bus Controller Driver'>SM Bus Controller Driver</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.codecompetition.com/windows/find-open-ports-in-windows-xp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
