<?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>Rhyous</title>
	<atom:link href="http://www.rhyous.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.rhyous.com</link>
	<description>Knight of the Code</description>
	<lastBuildDate>Mon, 06 Feb 2012 04:20:08 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Table Layouts still win over CSS layouts in 2012</title>
		<link>http://www.rhyous.com/2012/02/01/table-layouts-still-win-over-css-layouts-in-2012/</link>
		<comments>http://www.rhyous.com/2012/02/01/table-layouts-still-win-over-css-layouts-in-2012/#comments</comments>
		<pubDate>Thu, 02 Feb 2012 00:29:32 +0000</pubDate>
		<dc:creator>Rhyous</dc:creator>
				<category><![CDATA[HTML & CSS]]></category>

		<guid isPermaLink="false">http://www.rhyous.com/?p=4624</guid>
		<description><![CDATA[The longer I am blogging and the more often I mess with my html layout (which is done in CSS) the more I come to realize that while CSS is a solution for HTML layouts but it not a good solution&#160;and it has in my opinion completely failed to address the layout problem. Look at [...]]]></description>
			<content:encoded><![CDATA[<p>The longer I am blogging and the more often I mess with my html layout (which is done in CSS) the more I come to realize that while <a href="http://www.rhyous.com/2011/05/30/css-is-a-solution-for-html-layouts-but-it-not-a-good-solution/">CSS is a solution for HTML layouts but it not a good solution</a>&nbsp;and it has in my opinion completely failed to address the layout problem.</p>
<p>Look at any development language, GTK, QT, wxWidgets,&nbsp;Windows Forms, Windows Presentation Foundation, and a dozen others and they all have simple and easy to use layout systems. It is common to have Grid layouts, wrapping layouts, and more.</p>
<p><strong>What does CSS2 and HTML4 have specifically for layout?</strong></p>
<p>Nothing specific to layout. A div is not specific to layout. I was using what the author called <em>Holy Grail 3 column liquid-layout.</em>&nbsp;However, after two days, I still can&#8217;t change the width of my right side bar without breaking the layout in some way, which is mostly because the layers and layers of div elements is a mess in this layout.</p>
<p><strong>What does CSS3 and HTML5 have specifically for layout?</strong><br />
They have new elements: article, aside, audio, bdo, canvas, command, datalist, details, embed, figcaption, figure, footer, header, hgroup, keygen, mark, meter, nav, output, progress, rp, rt, ruby, section, source, summary, time, video, wbr </p>
<p>However, while you can use HTML5 and CSS3, just be aware your website will only look good in newer browser. Please don&#8217;t try to view your site on Windows XP with IE7 or IE8.</p>
<p>I want the developers of Firefox, Opera, Internet Explorer, Safari, Chrome, HTML5 and CSS3 to know that when it comes to layout, YOU HAVE FAILED!!!!</p>
<p>If there is one reason that I wish Silverlight could become the de facto internet standard is for the simple reason that the layout features in XAML are so far superior than those of even the new HTML5 and CSS3 that there isn&#8217;t even a comparison.</p>
<p><strong>So what is the solution to an easy HTML layout?</strong></p>
<p>It just doesn&#8217;t get easier than the good old table layout, but you can at least style your layout with CSS. &nbsp;CSS is good at styling even if it fails at layouts.</p>
<p>Look how easy it is:</p>
<pre class="brush: xml; title: ; notranslate">
&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Strict//EN&quot;
    &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd&quot;&gt;
&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;
&lt;head&gt;
&lt;title&gt;3 Column Table Layout&lt;/title&gt;
&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=utf-8&quot; /&gt;
&lt;style type=&quot;text/css&quot;&gt;

html, body {
  height: 100%;
}

body {
    margin:0
}

table.layout {
  height:100%;
  width: 100%;
  border-collapse:collapse;
}

tr.header {
  height:150px;
  background:black
}

tr.menu {
  height:50px;
  background:DarkGrey;
}

tr.body {
  height:100%;
}

tr.footer {
  height:150px;
  background:DarkGrey;
  height:150px;
}

td.leftcol {
  padding: 15px;
  width: 170px;
  min-width: 170px;
  background-color:Navy;
}

td.midcol {
  background-color:Grey;
  min-width: 625px; /* Make 425px for min res of 800x600 */
}

td.rightcol {
  padding: 15px;
  width: 205px;
  min-width: 205px;
  background-color:Navy;
}
&lt;/style&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;table class=&quot;layout&quot;&gt;
&lt;tr class=&quot;header&quot;&gt;
&lt;td colspan=&quot;3&quot;&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class=&quot;menu&quot;&gt;
&lt;td colspan=&quot;3&quot;&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class=&quot;body&quot;&gt;
&lt;td class=&quot;leftcol&quot;&gt;&lt;/td&gt;
&lt;td class=&quot;midcol&quot;&gt;&lt;/td&gt;
&lt;td class=&quot;rightcol&quot;&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class=&quot;footer&quot;&gt;
&lt;td colspan=&quot;3&quot;&gt;
  &lt;p style=&quot;text-align: center;&quot;&gt;
    &lt;a href=&quot;http://validator.w3.org/check?uri=referer&quot;&gt;
	  &lt;img src=&quot;http://www.w3.org/Icons/valid-xhtml10&quot; alt=&quot;Valid XHTML 1.0 Strict&quot; height=&quot;31&quot; width=&quot;88&quot; /&gt;
    &lt;/a&gt;
  &lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
&lt;/body&gt;
&lt;/html&gt;
</pre>
<ol>
<li>t took less than 30 minutes to make this layout.</li>
<li>It still uses CSS to style the layout.</li>
<li>Changes are easy (any column can be re-sized in seconds).</li>
<li>Left and right columns are always the same height.</li>
<li>The background colors always extend vertically as far as needed.</li>
<li>It is of course, W3C compliant.</li>
</ol>
<p>Sorry CSS, until you have a real layout solution I think you lose to a good old-fashioned table.</p>
<p><strong>But what about dynamically changing the layout?</strong></p>
<p>Well, lets face, it. Dynamic changes are done in code anyway, and any good developer can code up that solution. Besides, most web sites are using some sort of Content Management System, like WordPress, Drupal, SilverStripe, or others. Each of these allow for Themes or Styles and so you can easily code up a way to switch styles with code such as php, asp.net, ruby, or any programming language. &nbsp;Unfortunately,</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rhyous.com/2012/02/01/table-layouts-still-win-over-css-layouts-in-2012/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>WPF Localization at run-time</title>
		<link>http://www.rhyous.com/2012/01/27/wpf-localization-at-run-time/</link>
		<comments>http://www.rhyous.com/2012/01/27/wpf-localization-at-run-time/#comments</comments>
		<pubDate>Fri, 27 Jan 2012 20:44:52 +0000</pubDate>
		<dc:creator>Rhyous</dc:creator>
				<category><![CDATA[Localization]]></category>
		<category><![CDATA[WPF]]></category>

		<guid isPermaLink="false">http://www.rhyous.com/?p=4615</guid>
		<description><![CDATA[I needed a better WPF Localization solution and I came up with one and posted it over on my WPF blog. I would love some feed back, so if you are interested, check it out. How to change language at run-time in WPF with loadable Resource Dictionaries and DynamicResource Binding (Example 1)]]></description>
			<content:encoded><![CDATA[<p>I needed a better WPF Localization solution and I came up with one and posted it over on my WPF blog.</p>
<p>I would love some feed back, so if you are interested, check it out.</p>
<p><a href="http://www.wpfsharp.com/2012/01/27/how-to-change-language-at-run-time-in-wpf-with-loadable-resource-dictionaries-and-dynamicresource-binding-example-1/">How to change language at run-time in WPF with loadable Resource Dictionaries and DynamicResource Binding (Example 1)</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.rhyous.com/2012/01/27/wpf-localization-at-run-time/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>C# Dictionary</title>
		<link>http://www.rhyous.com/2012/01/24/c-sharpdictionary/</link>
		<comments>http://www.rhyous.com/2012/01/24/c-sharpdictionary/#comments</comments>
		<pubDate>Wed, 25 Jan 2012 02:47:29 +0000</pubDate>
		<dc:creator>Rhyous</dc:creator>
				<category><![CDATA[C# (C-Sharp)]]></category>

		<guid isPermaLink="false">http://www.rhyous.com/?p=4602</guid>
		<description><![CDATA[In C# there is an object called Dictionary&#60;TKey, TValue&#62; that can be used to store data.  The Dictionary&#60;TKey, TValue&#62; is essentially a collection of KeyValuePair&#60;TKey, TValue&#62; objects. C# Dictionary Example 1 &#8211; A word dictionary In this example, we create a simple dictionary with a few words and there definitions and show you how they [...]]]></description>
			<content:encoded><![CDATA[<p>In C# there is an object called Dictionary&lt;TKey, TValue&gt; that can be used to store data.  The Dictionary&lt;TKey, TValue&gt; is essentially a collection of KeyValuePair&lt;TKey, TValue&gt; objects.</p>
<h2>C# Dictionary Example 1 &#8211; A word dictionary</h2>
<p>In this example, we create a simple dictionary with a few words and there definitions and show you how they are accessed.</p>
<pre class="brush: csharp; title: ; notranslate">
using System;
using System.Collections.Generic;
using System.Linq;

namespace DictionaryExample
{
    class Program
    {
        static void Main(string[] args)
        {
            Dictionary&lt;String, String&gt; words = new Dictionary&lt;string, string&gt;();
            words.Add(&quot;Hello&quot;, &quot;An expression or gesture of greeting.&quot;);
            words.Add(&quot;Goodbye&quot;, &quot;A concluding remark or gesture at parting.&quot;);
            words.Add(&quot;Computer&quot;, &quot;A programmable usually electronic device that can store, retrieve, and process data.&quot;);
            words.Add(&quot;Friend&quot;, &quot;One attached to another by affection or esteem&quot;);

            Console.WriteLine(&quot;Word - Definition&quot;);
            Console.WriteLine(&quot;===================================================&quot;);
            foreach (KeyValuePair&lt;string, string&gt; pair in words)
            {
                Console.WriteLine(string.Format(&quot;{0} - {1}&quot;, pair.Key, pair.Value));
            }
        }
    }
}
</pre>
<h2>Accessing values in a C# Dictionary</h2>
<p>You can access the value using the key. In the case of our word dictionary, the word is the key and the definition is the value.</p>
<p>While you could access the value as follows, there is a problem with the below method.</p>
<pre class="brush: csharp; title: ; notranslate">
    private string GetDefinition(String inWord, Dictionary&lt;String, String&gt; inDictionary)
    {
        return inDictionary[inWord];
    }
</pre>
<p>Do you know what the problem is?  Right, it doesn&#8217;t handle a missing value.  If the value doesn&#8217;t exist, this will throw a <a href="http://msdn.microsoft.com/en-us/library/system.collections.generic.keynotfoundexception.aspx" rel="nofollow">KeyNotFoundException</a>.</p>
<h2>Handling a missing value in a C# Dictionary</h2>
<p>There are two ways to prevent the KeyNotFoundException.</p>
<h3>Method 1 &#8211; Use TryGetValue()</h3>
<p>TryGetValue() return a bool It takes in the Key and also an out reference. It populates the out reference. Here is an example.</p>
<pre class="brush: csharp; title: ; notranslate">
    private string GetDefinition(String inWord, Dictionary&lt;String, String&gt; inDictionary)
    {
        string retVal;
        // String is set to null if the value is not found
        return inDictionary.TryGetValue(inWord, out retVal) ? retVal : ;
    }
</pre>
<p>I am not a big fan of how the TryGetValue() function was implemented to return a bool However, I understand why it was implemented to return a bool. One might wonder why it returns bool. You may be thinking that TryGetValue() could return a value if found, null otherwise, right? Wrong! Reason 1 &#8211; Don&#8217;t forget that the value might actually be null. Reason 2 &#8211; While this Dictionary used a nullable type, string, another implementation might implement using a type that is not nullable, such as int.</p>
<h3>Method 2 &#8211; Using ContainsKey()</h3>
<p>Alternately you could check if the value exists first using ContainsKey(). Here is an example.</p>
<pre class="brush: csharp; title: ; notranslate">
    private string GetDefinition(String inWord, Dictionary&lt;String, String&gt; inDictionary)
    {
        return inDictionary.ContainsKey(inWord) ? inDictionary[inWord] : string.Empty;
    }
</pre>
<p>I prefer this because to me, it is more readable than the TryGetValue() function, but feel free to make your own opinion.</p>
<h2>Looping through a C# Dictionary</h2>
<p>Now imagine you wanted to get all the words and their definitions that start with a certain letter. In this case you are creating a Dictionary that is a subset of the full Dictionary. You could do this with a foreach loop. Notice that the object in the foreach loop is a KeyValuePair.</p>
<pre class="brush: csharp; title: ; notranslate">
        private Dictionary&lt;String,String&gt; GetWordsAndDefinitionsWhereWordsStartWith(Dictionary&lt;String, String&gt; inDictionary, char inChar)
        {
            Dictionary&lt;String, String&gt; wordsAndDefinitionsWhereWordsStartWithC = new Dictionary&lt;string, string&gt;();
            foreach (KeyValuePair&lt;string, string&gt; pair in inDictionary)
            {
                if (pair.Value.StartsWith(inChar.ToString(), StringComparison.CurrentCultureIgnoreCase))
                    wordsAndDefinitionsWhereWordsStartWithC.Add(pair.Key, pair.Value);
            }
            return wordsAndDefinitionsWhereWordsStartWithC;
        }
</pre>
<p>You could alternately use LINQ against the C# Dictionary to get the method body to be a single line.</p>
<pre class="brush: csharp; title: ; notranslate">
    private Dictionary&lt;String,String&gt; GetWordsAndDefinitionsWhereWordsStartWith(Dictionary&lt;String, String&gt; inDictionary, char inChar)
    {
        return inDictionary.Where(pair =&gt; pair.Value.StartsWith(inChar.ToString(), StringComparison.CurrentCultureIgnoreCase)).ToDictionary(pair =&gt; pair.Key, pair =&gt; pair.Value);
    }
</pre>
<p>You could just get the words and not the definitions in a List&lt;String&gt; as well.</p>
<pre class="brush: csharp; title: ; notranslate">
    private List&lt;String&gt; GetWordstartingWith(Dictionary&lt;String, String&gt; inDictionary, char inChar)
    {
        List&lt;String&gt; wordsStartingWith = new List&lt;String&gt;();
        foreach (KeyValuePair&lt;string, string&gt; pair in inDictionary)
        {
            if (pair.Value.StartsWith(inChar.ToString(), StringComparison.CurrentCultureIgnoreCase))
                wordsStartingWith.Add(pair.Key);
        }
        return wordsStartingWith;
    }
</pre>
<p>Again, you could use LINQ against the C# Dictionary to make this function one line.</p>
<pre class="brush: csharp; title: ; notranslate">
    private List&lt;String&gt; GetWordstartingWith(Dictionary&lt;String, String&gt; inDictionary, char inChar)
    {
        return (from pair in inDictionary where pair.Value.StartsWith(inChar.ToString(), StringComparison.CurrentCultureIgnoreCase) select pair.Key).ToList();
    }
</pre>
<h2>References</h2>
<ul>
<li><a href="http://msdn.microsoft.com/en-us/library/xfhwa508(v=vs.110).aspx" rel="nofollow">http://msdn.microsoft.com/en-us/library/xfhwa508(v=vs.110).aspx</a></li>
<li><a href="http://www.dotnetperls.com/dictionary" rel="nofollow">http://www.dotnetperls.com/dictionary</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.rhyous.com/2012/01/24/c-sharpdictionary/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to add a corner banner to your web page?</title>
		<link>http://www.rhyous.com/2012/01/23/how-to-add-a-corner-banner-to-your-web-page/</link>
		<comments>http://www.rhyous.com/2012/01/23/how-to-add-a-corner-banner-to-your-web-page/#comments</comments>
		<pubDate>Mon, 23 Jan 2012 22:12:50 +0000</pubDate>
		<dc:creator>Rhyous</dc:creator>
				<category><![CDATA[HTML & CSS]]></category>

		<guid isPermaLink="false">http://www.rhyous.com/?p=4587</guid>
		<description><![CDATA[Today I noticed that a few sites, including WordPress.com have a corner banner on their pages to help alert others to a specific cause (in this case they are against SOPA &#38; PIPA). And so everyone can add a corner banner to their sites, I am going to post how to do it. Step 1 [...]]]></description>
			<content:encoded><![CDATA[<p>Today I noticed that a few sites, including WordPress.com have a corner banner on their pages to help alert others to a specific cause (in this case they are against <a href="http://fightforthefuture.org/pipa">SOPA &amp; PIPA</a>).</p>
<p>And so everyone can add a corner banner to their sites, I am going to post how to do it.</p>
<h2>Step 1 &#8211; Create the image</h2>
<p>There are dozens of ways to create the images and if you can create it yourself, just do so.</p>
<p>Note: While I for this cause WordPress would care if you used their image, I thought it best to make my own if for no other reason than to use my color style.</p>
<ol>
<li>Using your favorite image editor create a new image.<br />
Note: I am going to use the free Paint.NET program.</li>
<li>Change the canvase size to be a square. Use a size between 150&#215;150 to 200&#215;200. I went with 175&#215;175.</li>
<li>Make the background transparent.</li>
<li>Draw a line from corner 0,0 to corner 175,175.<br />
Note: In some applications, holding down shift while drawing your line will guarantee the line is a perfect 45 degree diagonal.</li>
<li>Draw a second line from  60,0 to about 175,115.<br />
Note: Mine came out to 175,114, which is close enough.</li>
<li>Fill the  area inside the lines as you desire.<br />
Note: I used a nice soft gradient.</li>
<li> In a new layer (also transparent), add text in a normal horizontal way.</li>
<li>Rotate only the new layer 45 degrees. (-45.00 degree.)</li>
<li>Show both layers.</li>
<li>Move the text to the appropriate place in the image.</li>
<li>Save as a png or jpg file.</li>
<li>Upload the image to your site.</li>
</ol>
<p>Here is my image. Feel free to download it and use it.</p>
<div><a href="http://www.rhyous.com/wp-content/uploads/2012/01/Stop-Censorship.png"><img class="alignnone size-full wp-image-4588" title="Stop-Censorship" src="/wp-content/uploads/2012/01/Stop-Censorship.png" alt="Stop Censorship" width="175" height="175" /></a></div>
<h2>Step 2 &#8211; Change your web site code to display the image</h2>
<ol>
<li>Add the following style to your css file.
<pre class="brush: css; title: ; notranslate">
#right-corner {
	position: fixed; /* Make sure you can align it exactly */
	cursor: pointer; /* Change the cursor on mouse over */
	top: 0px; /* Change to 100px to put it under a 100px banner */
	right: 0px; /* Change to 100px to put it left of a 100px right-side bar */
	z-index: 99999; /* make sure it is the top element always */
}
</pre>
<p>Note: If you do not have a css file, then go to step two and add this as well in step 2.</p>
<pre class="brush: css; title: ; notranslate">
&lt;style&gt;
#right-corner {
	position: fixed; /* Make sure you can align it exactly */
	cursor: pointer; /* Change the cursor on mouse over */
	top: 0px; /* Change to 100px to put it under a 100px banner */
	right: 0px; /* Change to 100px to put it left of a 100px right-side bar */
	z-index: 99999; /* make sure it is the top element always */
}
&lt;/style&gt;
</pre>
</li>
<li>Open whatever html or script file that create the top part of your web site.<br />
Note: Often it is a top.htm, header.htm, or something similar.</li>
<li>Find your &lt;body&gt; tag and add a link to http://americancensorship.org anywhere inside the &lt;body&gt; tag.</li>
<li>For the <a> tag, set the &#8220;id&#8221; to the css id called right-corner.</a></li>
<li>Put your image inside the link.The code should look as follows:
<pre class="brush: xml; title: ; notranslate">
&lt;a id=&quot;right-corner&quot; href=&quot;http://americancensorship.org/&quot; target=&quot;_blank&quot;&gt;
	&lt;img src=&quot;/wp-content/uploads/2012/01/Stop-Censorship.png&quot; alt=&quot;Stop Censorship&quot;&gt;
&lt;/a&gt;
</pre>
</li>
<li>Save your changes.</li>
<li>Refresh your page.</li>
</ol>
<p>You now have a corner banner image on your page.</p>
<hr />
<p>While I want to add a corner banner to my site and state that I am against SOPA and PIPA as well, here is my disclaimer:</p>
<p>I haven&#8217;t fully read the SOPA &amp; PIPA document, so I am against it based on hearsay&#8230;but it is reliable hearsay. Also there may be statement in the document that I am for. Instead of telling you what I am against in the SOPA &amp; PIPA document, it is easier just to write my thoughts.</p>
<ol>
<li>The U.S. Government should not censor the internet for the public in any way.</li>
<li>The government should in no way tamper with or hinder the freedom of speech on the internet</li>
<li>Certain organizations, such as parents at home, schools, or a business (except ISPs) may censor/filter the internet for their specific internet connection. (And hence anyone only using their internet access is also censored).</li>
<li>The Government may censor the internet in locations they naturally control, such as in Government Buildings, military facilities, or government-paid-for schools.</li>
<li>An ISP may provide an optional censorship/filtering service so long as it is not applied by default or when not specifically requested. If the ISPs whole business plan is based on the idea of a safe internet for families, such as MStar, then defaulting to enabling certain censorship/filtering service is allowed.</li>
<li>Internet Registrars may enforce rules that make filtering easier, like having all porn sites end in .xxx or all gambling sites end in .gmb so they can easily be filtered, especially in homes, schools, and some work places.  But enforcement should be done by agreement of internet registrars and not really by the U.S. Government.</li>
<li>The government should pursue theft of intellectual property the same on the internet as is does with theft of intellectual property off the internet with one stipulation: Only the most minimal part of a site should altered. For example, if a site posts a copyrighted movie, only the movie itself should be removed, every other part of the site should remain, including a broken link to the movie.</li>
</ol>
<p>If the bill could be written with those few sentences, it would pass easily and I don&#8217;t think anyone would care.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rhyous.com/2012/01/23/how-to-add-a-corner-banner-to-your-web-page/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to install MySQL on FreeBSD</title>
		<link>http://www.rhyous.com/2012/01/23/how-to-install-mysql-on-freebsd/</link>
		<comments>http://www.rhyous.com/2012/01/23/how-to-install-mysql-on-freebsd/#comments</comments>
		<pubDate>Mon, 23 Jan 2012 12:30:53 +0000</pubDate>
		<dc:creator>Rhyous</dc:creator>
				<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://www.rhyous.com/?p=4560</guid>
		<description><![CDATA[Note: Tested on FreeBSD 9 Step 1 &#8211; Install FreeBSD First install FreeBSD. Instructions for installing FreeBSD is contained in this article. How I install FreeBSD 9? (Legacy) How I install FreeBSD? Second update FreeBSD and install the ports tree. Instructions for this are in this article. What are the first commands I run after [...]]]></description>
			<content:encoded><![CDATA[<p>Note: Tested on FreeBSD 9</p>
<h2>Step 1 &#8211; Install FreeBSD</h2>
<ol>
<li>First install FreeBSD.  Instructions for installing FreeBSD is contained in this article.<br />
<a href="/2012/01/13/how-to-install-freebsd-9/">How I install FreeBSD 9?</a><br />
<a href="/2009/11/04/how-do-i-install-freebsd/">(Legacy) How I install FreeBSD?</a>
</li>
<li>Second update FreeBSD and install the ports tree. Instructions for this are in this article.<br />
<a href="http://rhyous.com/2009/11/03/what-are-the-first-commands-i-run-after-installing-freebsd/">What are the first commands I run after installing FreeBSD?</a></li>
</ol>
<h2>Step 2 &#8211; Installing MySQL</h2>
<h3>Install MySQL from Ports</h3>
<ol>
<li>Change to the directory of the mysql55-server port.
<pre class="shell"># cd /usr/ports/databases/mysql55-server</pre>
<li>Now install mysql55-server with &#8216;make install&#8217;.
<pre class="shell"># make install</pre>
<p>MySQL 5.5 Server (and MySQL 5.5 client) will download, compile, and install automagically for you.</p>
<p>Note: You may be wondering about the WITH_CHARSET option that used to exist. This is not necessary during compile and install and we will set the character set in a later step. Don&#8217;t start the MySQL service until we make these changes.
</li>
</ol>
<h3>Installing MySQL from Packages</h3>
<ol>
<li>Install easily as a binary package with this simple command.
<pre class="shell">pkg_add -r mysql55-server</pre>
</li>
</ol>
<h2>Step 3 &#8211; Configure MySQL</h2>
<p>Configuration of MySQL is done in the my.cnf file.  </p>
<h3>Example 1 &#8211; Configuring mysql to use UTF8</h3>
<p>For this example, we will change our server to use UTF8.</p>
<ol>
<li>Change to the /usr/local/etc/ directory. This is the default location for the my.cnf file.
<pre clas="shell">cd /usr/local/etc/</pre>
<li>Add the following to the my.cnf file.
<pre class="shell">
<table>
<tr>
<td valign="top">#
#
#</td>
<td> > /usr/local/etc/my.cnf echo '[mysqld]'
>> /usr/local/etc/my.cnf echo character-set-server=utf8
>> /usr/local/etc/my.cnf echo collation-server=utf8_general_ci </td>
</tr>
</table>
</pre>
</li>
</ol>
<p>Note: FreeBSD has multiple example my.cnf files here: /usr/local/share/</p>
<ul>
<li>my-huge.cnf</li>
<li>my-innodb-heavy-4G.cnf</li>
<li>my-large.cnf</li>
<li>my-medium.cnf</li>
<li>my-small.cnf</li>
</ul>
<h2>Step 4 &#8211; Configure MySQL to start on boot</h2>
<ol>
<li>Add the following lines to the /etc/rc.conf file.
<pre class="shell">
<table>
<tr>
<td valign="top">#
#</td>
<td>echo # MySQL 5.5 Server >> /etc/rc.conf
echo 'mysql_enable="YES"' >> /etc/rc.conf</td>
</tr>
</table>
</pre>
</li>
<li>Now start your server.
<pre class="shell"># /usr/local/etc/rc.d/mysql-server start</pre>
</li>
</ol>
<h2>Step 5 &#8211; Secure your MySQL installation</h2>
<p>MySQL documentation covers this and I&#8217;ll not repeat it here. Instead, go here:<br />
<a href="http://dev.mysql.com/doc/mysql-security-excerpt/5.5/en/default-privileges.html">2.2 Securing the Initial MySQL Accounts</a></p>
<h2>Integration with Apache and PHP</h2>
<p>If you want to integrate Apache and PHP see these articles.</p>
<ul>
<li><a href="/2009/11/06/installing-an-apache-ssl-on-freebsd-using-the-ports-tree/">Installing an Apache + SSL on FreeBSD using the ports tree</a></li>
<li><a href="/2009/11/06/how-to-install-php5-and-php5-extensions-on-freebsd/">How to install PHP5 and PHP5 Extensions on FreeBSD?</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.rhyous.com/2012/01/23/how-to-install-mysql-on-freebsd/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to install FreeBSD 9?</title>
		<link>http://www.rhyous.com/2012/01/13/how-to-install-freebsd-9/</link>
		<comments>http://www.rhyous.com/2012/01/13/how-to-install-freebsd-9/#comments</comments>
		<pubDate>Fri, 13 Jan 2012 09:00:58 +0000</pubDate>
		<dc:creator>Rhyous</dc:creator>
				<category><![CDATA[FreeBSD]]></category>

		<guid isPermaLink="false">http://www.rhyous.com/?p=4489</guid>
		<description><![CDATA[FreeBSD 9 comes with a new installer and installing it is quite fast. Part 1 &#8211; Download the media Step 1 &#8211; Download the DVD ISO Go to http://www.freebsd.org/where.html and click to the ISO link for FreeBSD 9 for you architecture. (x86, amd64, etc&#8230;) Click to download the FreeBSD-9.0-RELEASE-amd64-dvd1.iso. Step 2 &#8211; Burn the ISO to a [...]]]></description>
			<content:encoded><![CDATA[<p>FreeBSD 9 comes with a new installer and installing it is quite fast.</p>
<h2>Part 1 &#8211; Download the media</h2>
<h3>Step 1 &#8211; Download the DVD ISO</h3>
<ol>
<li>Go to <a href="http://www.freebsd.org/where.html">http://www.freebsd.org/where.html</a> and click to the ISO link for FreeBSD 9 for you architecture. (x86, amd64, etc&#8230;)</li>
<li>Click to download the FreeBSD-9.0-RELEASE-amd64-dvd1.iso.</li>
</ol>
<h3>Step 2 &#8211; Burn the ISO to a DVD</h3>
<p>I am not going to give you steps for burning an ISO, as you could be on Windows, Linux, OS X, and you could be using any of the DVD burning tools out there.</p>
<p>I&#8217;ll give you this hint though&#8230;Do not burn the ISO file onto the disk as a file.</p>
<p>Note: Skip this step if you are installing to  a virtual machine.</p>
<h2>Part 2 &#8211; Install FreeBSD</h2>
<h3>Step 1 &#8211; Boot off the DVD</h3>
<ol>
<li>Put the DVD in your drive. (Or if using a virtual machine, point the virtual machine&#8217;s DVD drive to the ISO file.)</li>
<li>Boot your system.<br />
Note: If you system doesn&#8217;t boot off the DVD check the BIOS settings or try pressing F12 to select the boot device<br />
<a href="http://www.rhyous.com/wp-content/uploads/2012/01/FreeBSD-9-Install-01.png"><img class="alignnone size-full wp-image-4490" title="FreeBSD 9 Install 01" src="http://www.rhyous.com/wp-content/uploads/2012/01/FreeBSD-9-Install-01.png" alt="" width="720" height="400" /><br />
</a></li>
<li>The next screen will automatically boot but delays 9 seconds.<br />
Press enter to continue without waiting.<br />
<a href="http://www.rhyous.com/wp-content/uploads/2012/01/FreeBSD-9-install-02.png"><img class="alignnone size-full wp-image-4491" title="FreeBSD 9 install 02" src="http://www.rhyous.com/wp-content/uploads/2012/01/FreeBSD-9-install-02.png" alt="" width="720" height="400" /><br />
</a><br />
Your now booting to the installer.</li>
</ol>
<h3>Step 2 &#8211; Install FreeBSD</h3>
<ol>
<li>Click Install on the first screen.<br />
<a href="http://www.rhyous.com/wp-content/uploads/2012/01/FreeBSD-9-Install-03.png"><img title="FreeBSD 9 Install 03" src="http://www.rhyous.com/wp-content/uploads/2012/01/FreeBSD-9-Install-03.png" alt="" width="720" height="400" /><br />
</a></li>
<li>If you need a special keyboard layout, click yes, otherwise, click no. I clicked no.<br />
<a href="http://www.rhyous.com/wp-content/uploads/2012/01/FreeBSD-9-Install-04.png"><img class="alignnone size-full wp-image-4493" title="FreeBSD 9 Install 04" src="http://www.rhyous.com/wp-content/uploads/2012/01/FreeBSD-9-Install-04.png" alt="" width="720" height="400" /></a></li>
<li>Enter the host name for this new installation.<br />
<a href="http://www.rhyous.com/wp-content/uploads/2012/01/FreeBSD-9-Install-05.png"><img class="alignnone size-full wp-image-4494" title="FreeBSD 9 Install 05" src="http://www.rhyous.com/wp-content/uploads/2012/01/FreeBSD-9-Install-05.png" alt="" width="720" height="400" /></a></li>
<li>Select the optional system components and press enter.<br />
<a href="http://www.rhyous.com/wp-content/uploads/2012/01/FreeBSD-9-Install-06.png"><img class="alignnone size-full wp-image-4495" title="FreeBSD 9 Install 06" src="http://www.rhyous.com/wp-content/uploads/2012/01/FreeBSD-9-Install-06.png" alt="" width="720" height="400" /><br />
</a></li>
<li>Partitioning can be done for you with Guided or you can do it yourself with Manual.Note: With todays hard drives, there is little to no benefit from having  multiple partitions as there was in the past. Just use Guided and the root partition will fill the drive.Note: Doesn&#8217;t look like we have ZFS options yet.<br />
<a href="http://www.rhyous.com/wp-content/uploads/2012/01/FreeBSD-9-Install-07.png"><img class="alignnone size-full wp-image-4496" title="FreeBSD 9 Install 07" src="http://www.rhyous.com/wp-content/uploads/2012/01/FreeBSD-9-Install-07.png" alt="" width="720" height="400" /><br />
</a></li>
<li>Look over the guided partition settings.<br />
<a href="http://www.rhyous.com/wp-content/uploads/2012/01/FreeBSD-9-Install-09.png"><img class="alignnone size-full wp-image-4498" title="FreeBSD 9 Install 09" src="http://www.rhyous.com/wp-content/uploads/2012/01/FreeBSD-9-Install-09.png" alt="" width="720" height="400" /></a></li>
<li>Click Commit to perform the installation.<br />
<a href="http://www.rhyous.com/wp-content/uploads/2012/01/FreeBSD-9-Install-10.png"><img class="alignnone size-full wp-image-4499" title="FreeBSD 9 Install 10" src="http://www.rhyous.com/wp-content/uploads/2012/01/FreeBSD-9-Install-10.png" alt="" width="720" height="400" /><br />
</a>It runs the checksum verification to make sure media is valid.<br />
<a href="http://www.rhyous.com/wp-content/uploads/2012/01/FreeBSD-9-Install-11.png"><br />
<img class="alignnone size-full wp-image-4500" title="FreeBSD 9 Install 11" src="http://www.rhyous.com/wp-content/uploads/2012/01/FreeBSD-9-Install-11.png" alt="" width="720" height="400" /><br />
</a>It then commits the install.<br />
<a href="http://www.rhyous.com/wp-content/uploads/2012/01/FreeBSD-9-Install-12.png"><img class="alignnone size-full wp-image-4501" title="FreeBSD 9 Install 12" src="http://www.rhyous.com/wp-content/uploads/2012/01/FreeBSD-9-Install-12.png" alt="" width="720" height="400" /><br />
</a>It is actually not that long of a wait before you are pretty much done.<br />
<a href="http://www.rhyous.com/wp-content/uploads/2012/01/FreeBSD-9-Install-13.png"><img class="alignnone size-full wp-image-4502" title="FreeBSD 9 Install 13" src="http://www.rhyous.com/wp-content/uploads/2012/01/FreeBSD-9-Install-13.png" alt="" width="720" height="400" /><br />
</a>The installation has committed. You will now be asked post-installation configuration questions.</li>
</ol>
<h3>Step 3 &#8211; Configure Post-installation settings</h3>
<ol>
<li>Enter a password for the root account when prompted. Enter it again to verify it.<br />
<a href="http://www.rhyous.com/wp-content/uploads/2012/01/FreeBSD-9-Install-14.png"><img class="alignnone size-full wp-image-4503" title="FreeBSD 9 Install 14" src="http://www.rhyous.com/wp-content/uploads/2012/01/FreeBSD-9-Install-14.png" alt="" width="720" height="400" /></a></li>
<li>Select your network card.<br />
<a href="http://www.rhyous.com/wp-content/uploads/2012/01/FreeBSD-9-Install-15.png"><img class="alignnone size-full wp-image-4504" title="FreeBSD 9 Install 15" src="http://www.rhyous.com/wp-content/uploads/2012/01/FreeBSD-9-Install-15.png" alt="" width="720" height="400" /></a></li>
<li>Unless you know for sure you are going to use IPv6 only, say Yes to enabling IPv4.<br />
<a href="http://www.rhyous.com/wp-content/uploads/2012/01/FreeBSD-9-Install-16.png"><img class="alignnone size-full wp-image-4505" title="FreeBSD 9 Install 16" src="http://www.rhyous.com/wp-content/uploads/2012/01/FreeBSD-9-Install-16.png" alt="" width="720" height="400" /></a></li>
<li>Unless you have been given a specific IP address to use, say Yes to enabling DHCP.<br />
<a href="http://www.rhyous.com/wp-content/uploads/2012/01/FreeBSD-9-Install-17.png"><img class="alignnone size-full wp-image-4506" title="FreeBSD 9 Install 17" src="http://www.rhyous.com/wp-content/uploads/2012/01/FreeBSD-9-Install-17.png" alt="" width="720" height="400" /></a></li>
<li>Lately I like to enable IPv6 because all my operating systems now support it. But you probably don&#8217;t need it unless you know you need it.<br />
<a href="http://www.rhyous.com/wp-content/uploads/2012/01/FreeBSD-9-Install-18.png"><img class="alignnone size-full wp-image-4506" title="FreeBSD 9 Install 18" src="http://www.rhyous.com/wp-content/uploads/2012/01/FreeBSD-9-Install-18.png" alt="" width="720" height="400" /></a></li>
<li>If you enabled IPv6, you probably want this option, unless you have a specific IPv6 address you need to use.<br />
<a href="http://www.rhyous.com/wp-content/uploads/2012/01/FreeBSD-9-Install-19.png"><img class="alignnone size-full wp-image-4506" title="FreeBSD 9 Install 19" src="http://www.rhyous.com/wp-content/uploads/2012/01/FreeBSD-9-Install-19.png" alt="" width="720" height="400" /></a><br />
Your dynamic network settings are determined.<br />
<a href="http://www.rhyous.com/wp-content/uploads/2012/01/FreeBSD-9-Install-21.png"><img class="alignnone size-full wp-image-4506" title="FreeBSD 9 Install 21" src="http://www.rhyous.com/wp-content/uploads/2012/01/FreeBSD-9-Install-21.png" alt="" width="720" height="400" /></a></li>
<li>Your DNS setting may be detected for you, but if not, you can enter your DNS settings manually. I only entered a single DNS entry for IPv4.<br />
<a href="http://www.rhyous.com/wp-content/uploads/2012/01/FreeBSD-9-Install-22.png"><img class="alignnone size-full wp-image-4506" title="FreeBSD 9 Install 22" src="http://www.rhyous.com/wp-content/uploads/2012/01/FreeBSD-9-Install-22.png" alt="" width="720" height="400" /></a></li>
<li>Unless you have a server that needs its clocked synchronized to UTC, select No when prompted.<br />
<a href="http://www.rhyous.com/wp-content/uploads/2012/01/FreeBSD-9-Install-24.png"><img class="alignnone size-full wp-image-4506" title="FreeBSD 9 Install 24" src="http://www.rhyous.com/wp-content/uploads/2012/01/FreeBSD-9-Install-24.png" alt="" width="720" height="400" /></a></li>
<li>Select your time Region.<br />
<a href="http://www.rhyous.com/wp-content/uploads/2012/01/FreeBSD-9-Install-25.png"><img class="alignnone size-full wp-image-4506" title="FreeBSD 9 Install 25" src="http://www.rhyous.com/wp-content/uploads/2012/01/FreeBSD-9-Install-25.png" alt="" width="720" height="400" /></a></li>
<li>Select your Country.<br />
Note: United States is number 49.<br />
<a href="http://www.rhyous.com/wp-content/uploads/2012/01/FreeBSD-9-Install-26.png"><img class="alignnone size-full wp-image-4506" title="FreeBSD 9 Install 26" src="http://www.rhyous.com/wp-content/uploads/2012/01/FreeBSD-9-Install-26.png" alt="" width="720" height="400" /></a></li>
<li>Select your Time Zone.<br />
<a href="http://www.rhyous.com/wp-content/uploads/2012/01/FreeBSD-9-Install-27.png"><img class="alignnone size-full wp-image-4506" title="FreeBSD 9 Install 27" src="http://www.rhyous.com/wp-content/uploads/2012/01/FreeBSD-9-Install-27.png" alt="" width="720" height="400" /></a></li>
<li>You may get a prompt to very whether the Time Zone you selected is correct. Select Yes if it is correct.<a href="http://www.rhyous.com/wp-content/uploads/2012/01/FreeBSD-9-Install-28.png"><img class="alignnone size-full wp-image-4506" title="FreeBSD 9 Install 28" src="http://www.rhyous.com/wp-content/uploads/2012/01/FreeBSD-9-Install-28.png" alt="" width="720" height="400" /></a></li>
<li>Choose what to install.<br />
Note: If you are on a laptop you consider selecting powerd.<br />
<a href="http://www.rhyous.com/wp-content/uploads/2012/01/FreeBSD-9-Install-29.png"><img class="alignnone size-full wp-image-4506" title="FreeBSD 9 Install 29" src="http://www.rhyous.com/wp-content/uploads/2012/01/FreeBSD-9-Install-29.png" alt="" width="720" height="400" /></a></li>
<li>If you want to contribute to FreeBSD and help them resolve bugs (especially yours) select yes. Otherwise, select No.<br />
<a href="http://www.rhyous.com/wp-content/uploads/2012/01/FreeBSD-9-Install-30.png"><img class="alignnone size-full wp-image-4506" title="FreeBSD 9 Install 30" src="http://www.rhyous.com/wp-content/uploads/2012/01/FreeBSD-9-Install-30.png" alt="" width="720" height="400" /></a></li>
<li>Select Yes when prompted to Add user accounts.<br />
<a href="http://www.rhyous.com/wp-content/uploads/2012/01/FreeBSD-9-Install-31.png"><img class="alignnone size-full wp-image-4506" title="FreeBSD 9 Install 31" src="http://www.rhyous.com/wp-content/uploads/2012/01/FreeBSD-9-Install-31.png" alt="" width="720" height="400" /></a></li>
<li>Enter a user name and follow the prompts.<br />
<a href="http://www.rhyous.com/wp-content/uploads/2012/01/FreeBSD-9-Install-32.png"><img class="alignnone size-full wp-image-4506" title="FreeBSD 9 Install 32" src="http://www.rhyous.com/wp-content/uploads/2012/01/FreeBSD-9-Install-32.png" alt="" width="720" height="400" /><br />
</a><br />
Note: Don&#8217;t forget to invite the user to the wheel group if they are going su to root.<br />
<a href="http://www.rhyous.com/wp-content/uploads/2012/01/FreeBSD-9-Install-33.png"><img class="alignnone size-full wp-image-4506" title="FreeBSD 9 Install 33" src="http://www.rhyous.com/wp-content/uploads/2012/01/FreeBSD-9-Install-33.png" alt="" width="720" height="400" /></a></li>
<li>Enter Yes when all the settings are correct.<br />
<a href="http://www.rhyous.com/wp-content/uploads/2012/01/FreeBSD-9-Install-34.png"><img class="alignnone size-full wp-image-4506" title="FreeBSD 9 Install 34" src="http://www.rhyous.com/wp-content/uploads/2012/01/FreeBSD-9-Install-34.png" alt="" width="720" height="400" /></a></li>
<li>Select Yes if you want to add more users and repeat these steps. Once you are done adding users, select No.<br />
<a href="http://www.rhyous.com/wp-content/uploads/2012/01/FreeBSD-9-Install-35.png"><img class="alignnone size-full wp-image-4506" title="FreeBSD 9 Install 35" src="http://www.rhyous.com/wp-content/uploads/2012/01/FreeBSD-9-Install-35.png" alt="" width="720" height="400" /></a></li>
<li>Press Enter to Exit.<br />
<a href="http://www.rhyous.com/wp-content/uploads/2012/01/FreeBSD-9-Install-36.png"><img class="alignnone size-full wp-image-4506" title="FreeBSD 9 Install 36" src="http://www.rhyous.com/wp-content/uploads/2012/01/FreeBSD-9-Install-36.png" alt="" width="720" height="400" /></a></li>
<li>I don&#8217;t have any special settings to make, so I select No here.<br />
<a href="http://www.rhyous.com/wp-content/uploads/2012/01/FreeBSD-9-Install-37.png"><img class="alignnone size-full wp-image-4506" title="FreeBSD 9 Install 37" src="http://www.rhyous.com/wp-content/uploads/2012/01/FreeBSD-9-Install-37.png" alt="" width="720" height="400" /></a></li>
<li>Go ahead an press Enter to reboot.<br />
<a href="http://www.rhyous.com/wp-content/uploads/2012/01/FreeBSD-9-Install-38.png"><img class="alignnone size-full wp-image-4506" title="FreeBSD 9 Install 38" src="http://www.rhyous.com/wp-content/uploads/2012/01/FreeBSD-9-Install-38.png" alt="" width="720" height="400" /><br />
</a><br />
Your system will now boot and create an SSH key on its own and give you a login prompt.<br />
<a href="http://www.rhyous.com/wp-content/uploads/2012/01/FreeBSD-9-Install-39.png"><img class="alignnone size-full wp-image-4506" title="FreeBSD 9 Install 39" src="http://www.rhyous.com/wp-content/uploads/2012/01/FreeBSD-9-Install-39.png" alt="" width="720" height="400" /><br />
</a><br />
FreeBSD is now installed.</li>
</ol>
<h2>Part 3 &#8211; Configure Your FreeBSD Install as Desired</h2>
<p>What do you want to do next?</p>
<ul>
<li><a href="/2009/11/06/installing-an-apache-ssl-on-freebsd-using-the-ports-tree/">Configure Apache + SSL, PHP, MySQL</a></li>
<li>Configure a FreeBSD Desktop</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.rhyous.com/2012/01/13/how-to-install-freebsd-9/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Why a developer&#8217;s next computer should be an Apple</title>
		<link>http://www.rhyous.com/2012/01/11/why-a-developers-next-computer-should-be-an-apple/</link>
		<comments>http://www.rhyous.com/2012/01/11/why-a-developers-next-computer-should-be-an-apple/#comments</comments>
		<pubDate>Wed, 11 Jan 2012 17:20:32 +0000</pubDate>
		<dc:creator>Rhyous</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Operating Systems]]></category>

		<guid isPermaLink="false">http://www.rhyous.com/?p=4477</guid>
		<description><![CDATA[It is not because OS X is better Let me start by saying that I do not fall into the &#8220;my os is better than yours&#8221; mantra. I like to talk about the right tool for the job. For a home user, Windows 7 and OS X still beat Linux (yes, even Ubuntu). For a [...]]]></description>
			<content:encoded><![CDATA[<h2>It is not because OS X is better</h2>
<p>Let me start by saying that I do not fall into the &#8220;my os is better than yours&#8221; mantra. I like to talk about the right tool for the job.</p>
<ul>
<li>For a home user, Windows 7 and OS X still beat Linux (yes, even Ubuntu).</li>
<li>For a geeky home user, Ubuntu or any other OS might be more fun.</li>
<li>If you want to give away your old computer but not give away your Operating System license, put Ubuntu or PC-BSD on it.</li>
<li>Similarly if you get a free computer without an OS and you don&#8217;t want to buy one, put Ubuntu or PC-BSD on it.</li>
<li>For most businesses, Windows 7 is the better solution for a lot of reasons, many of which are IT related and not even user related.</li>
<li>For an artist, OS X is the right choice. Sure Windows has caught up in graphic tools, but not in peer knowledge.</li>
<li>For a Web Server, I would never run windows or MAC, I would recommend BSD or Linux.</li>
<li>For a NAS server, I would use FreeNAS.</li>
<li>For an enterprise to sell a secure appliance I would recommend a BSD derivative.</li>
</ul>
<p>Those are just a generalizations based on the idea of using the right tool for the job.&nbsp;In every case others have different opinions and there are always exceptions. The appropriate thought is that you should use the right tool for the job.<br />
So if you are a developer, what is the right tool for the job? Here is my new generalization.</p>
<ul>
<li><strong>For a Developer, I now recommend Apple hardware.</strong></li>
</ul>
<p>Notice I said <strong>Apple Hardware</strong>, but I didn&#8217;t say that I recommend OS X. Run whatever OS you need.</p>
<h2>It is not because Apple Hardware is better</h2>
<p>Also, this has nothing to do with saying that Apple hardware is better. Dell, HP, Lenovo, Sony, and others all make some great hardware for running whatever OS you can run.</p>
<p>Many argue that Alienware makes the best hardware, not any of the above vendors. &nbsp;It is not about the best hardware. &nbsp;So if it was a hardware issue, I would be recommending Alienware. But it is not.</p>
<p>Let me repeat.</p>
<ul>
<li><strong>For a Developer, I now recommend Macintosh hardware.</strong></li>
</ul>
<p>Notice, I qualified this by saying <strong>For a developer</strong>. I am not telling everybody to get Apple hardware.</p>
<h2>Answer #1: It is simply a licensing issue</h2>
<p>Legally you cannot run OS X on any hardware other than Apple hardware (an no Hacintosh is not legal) . Since iOS development realistically can only happen on OS X, you cannot legally run iOS on hardware designed for windows either.</p>
<h2>Answer #2 &#8211; The cross-platform world</h2>
<p>You need every Operating System today.</p>
<p>Lets talk about where development has taken us. &nbsp;We have gone from not really cross-platform (Windows only and sometimes support Macintosh too), to having to be able to code on Windows, Windows Phone 7, OS X, iOS, Android, and possibly&nbsp;Linux and Unix as well.</p>
<p>Lets list these in a table and you will see why buying an Apple Laptop frees you to develop on all those platforms.</p>
<table width="550">
<tbody>
<tr>
<th>Operating System</th>
<th>Apple Hardware</th>
<th>Windows Hardware</th>
</tr>
<tr>
<td>Windows</td>
<td>Run OS and Develop for it</td>
<td>Run OS and Develop for it</td>
</tr>
<tr>
<td>BSD/Linux</td>
<td>Run OS and Develop for it</td>
<td>Run OS and Develop for it</td>
</tr>
<tr>
<td>Android</td>
<td>Emulate OS and Develop for it</td>
<td>Emulate OS and Develop for it</td>
</tr>
<tr>
<td>OS X</td>
<td>Run OS and Develop for it</td>
<td>Not supported*</td>
</tr>
<tr>
<td>iOS</td>
<td>Emulate OS and Develop for it</td>
<td>Not supported*</td>
</tr>
</tbody>
</table>
<p>* While it can be done it is illegal and breaks license agreements.</p>
<p>Only Apple hardware allows you to install on all the popular Operating Systems that exist today.</p>
<p>So Apple has put themselves in an interesting position where cross-platform development on all popular operating systems can only occur on Apple hardware. It is this position that has me making this statement.</p>
<ul>
<li><strong>For a Developer, I now recommend Macintosh hardware.</strong></li>
</ul>
<p>As for the operating system that I recommend, you probably have guessed from this post my recommendation: If you are a developer, run them all.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rhyous.com/2012/01/11/why-a-developers-next-computer-should-be-an-apple/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How to compile WinNFSd with Visual Studio?</title>
		<link>http://www.rhyous.com/2011/12/29/how-to-compile-winnfsd-with-visual-studio/</link>
		<comments>http://www.rhyous.com/2011/12/29/how-to-compile-winnfsd-with-visual-studio/#comments</comments>
		<pubDate>Thu, 29 Dec 2011 23:31:21 +0000</pubDate>
		<dc:creator>Rhyous</dc:creator>
				<category><![CDATA[C++]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[NFS]]></category>

		<guid isPermaLink="false">http://www.rhyous.com/?p=4461</guid>
		<description><![CDATA[Recently I needed an NFS server on Windows, preferably written in C++. A long time ago I had used WinNFSd and sure enough the project still exists on Sourceforge, though unfortunately it hasn&#8217;t been updated since 2005. However, I found that someone had updated it here: https://github.com/noodle1983/winnfsd-nd So the big question, how do you compile this [...]]]></description>
			<content:encoded><![CDATA[<div style="float: right;margin-left: 15px;margin-bottom: 10px"><iframe src="http://rcm.amazon.com/e/cm?t=rhys127001or1-20&#038;o=1&#038;p=8&#038;l=as1&#038;asins=B0038KTO8S&#038;ref=qf_sp_asin_til&#038;fc1=000000&#038;IS2=1&#038;lt1=_blank&#038;m=amazon&#038;lc1=0000FF&#038;bc1=000000&#038;bg1=FFFFFF&#038;f=ifr" style="width:120px;height:240px;" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"></iframe></div>
<p>Recently I needed an NFS server on Windows, preferably written in C++. A long time ago I had used <a href="https://sourceforge.net/projects/winnfsd/" rel="nofollow">WinNFSd</a> and sure enough the project still exists on Sourceforge, though unfortunately it hasn&#8217;t been updated since 2005.</p>
<p>However, I found that someone had updated it here: <a href="https://github.com/noodle1983/winnfsd-nd" rel="nofollow">https://github.com/noodle1983/winnfsd-nd</a></p>
<p>So the big question, how do you compile this on windows with Visual Studio?</p>
<h2>Step 1 &#8211; Download and extract the WinNFSd source</h2>
<ol>
<li>Go to <a href="https://sourceforge.net/projects/winnfsd/">https://sourceforge.net/projects/winnfsd</a> and download the source.<br />
Note: You can alternately download the git hub source as it has an update you might like:<br />
<a href="https://github.com/noodle1983/winnfsd-nd" rel="nofollow">https://github.com/noodle1983/winnfsd-nd</a></li>
<li>Click the Zip button at the top of the page to download the source as a zip.<br />
Note: Alternately if you have git working already you can clone this repo.</li>
<li>Extract the zip file to a directory.  Remember where you extracted it as we will copy the source files later.</li>
</ol>
<h2>Step 2 &#8211; Create a new Visual Studio solution</h2>
<ol>
<li>In Visual Studio, go to File | New | Project.</li>
<li>Select Other Languages | Visual C++ | Empty Project.<br />
Note: Depending on your Visual Studio configuration you may Visual C++ in a different place.</li>
<li>Name the solution WinNFSd.</li>
<li>Click Ok.</li>
</ol>
<h2>Step 3 &#8211; Add the WinNFSd files to your solution</h2>
<ol>
<li>In Visual Studio, right-click on your Project and click <em>Open Folder in Windows Explorer</em>.</li>
<li>Create a new folder to hold your source code.<br />
Note: I simply named my folder src.</li>
<li>Copy the source you extracted in Step 1 into the src directory.</li>
<li>Highlight all the files in the src directory.</li>
<li>Drag the files into Visual Studio and drop them on your project.</li>
</ol>
<div>Note: If you try to build now, you will get 22 errors in debug mode and maybe 17 in release mode.</div>
<h2>Step 4 &#8211; Configure the project properties</h2>
<ol>
<li>In Visual Studio, right-click on your project and choose Properties.<br />
Note: The Configuration should say Active(Debug) currently.</li>
<li>Go to Configuration Properties | Linker | Input.</li>
<li>Add ws2_32.lib to the Additional Dependencies.</li>
<li>Change the Configuration to Release and add ws2_32.lib for release as well.</li>
</ol>
<h2>Step 5 &#8211; Handle the Visual Studio C++ Runtime</h2>
<p>If you were to compile now, and try to run your project on a different machine (not the one running Visual Studio) you would likely get an error due to a missing dll.  Here is the error you will likely receive.</p>
<p style="padding-left: 30px;">The program can’t start because MSVCR100.dll is missing from your computer. Try reinstalling the program to fix this problem.</p>
<p>I am not going to explain the solution again here, because it is all documented here:<br />
<a title="Avoiding the MSVCR100.dll or MSVCR100D.dll is missing error" href="http://www.rhyous.com/2010/09/16/avoiding-the-msvcr100-dll-or-msvcr100d-dll/" rel="bookmark">Avoiding the MSVCR100.dll or MSVCR100D.dll is missing error</a></p>
<p>Choose the best of the three solutions for you from the link above.</p>
<p>Note: For this single file exe, I prefer the statically linked option.</p>
<h2>Step 6 &#8211; Build WinNFSd</h2>
<ol>
<li>You should now be able to click Build | Build Solution and it should build.</li>
</ol>
<p>You should be able to test both debug and release.</p>
<p>Note: I received 37 warnings, which would be nice to resolve, but I wouldn&#8217;t worry too much about them.</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rhyous.com/2011/12/29/how-to-compile-winnfsd-with-visual-studio/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>LANDesk Support Tools &#8211; Android Edition (Demo)</title>
		<link>http://www.rhyous.com/2011/12/14/landesk-support-tools-android-edition-demo/</link>
		<comments>http://www.rhyous.com/2011/12/14/landesk-support-tools-android-edition-demo/#comments</comments>
		<pubDate>Thu, 15 Dec 2011 00:20:12 +0000</pubDate>
		<dc:creator>Rhyous</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[C# (C-Sharp)]]></category>
		<category><![CDATA[Tablets]]></category>

		<guid isPermaLink="false">http://www.rhyous.com/?p=4457</guid>
		<description><![CDATA[This is my first real project written for Android. Yes, I wrote it in C# using Mono for Android.]]></description>
			<content:encoded><![CDATA[<p>This is my first real project written for Android. Yes, I wrote it in C# using Mono for Android.</p>
<p><iframe width="420" height="315" src="http://www.youtube.com/embed/C62KHyuzea4" frameborder="0" allowfullscreen></iframe></p>
]]></content:encoded>
			<wfw:commentRss>http://www.rhyous.com/2011/12/14/landesk-support-tools-android-edition-demo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to connect to the LANDesk MBSDK using C#?</title>
		<link>http://www.rhyous.com/2011/12/10/how-to-connect-to-the-landesk-mbsdk-using-c/</link>
		<comments>http://www.rhyous.com/2011/12/10/how-to-connect-to-the-landesk-mbsdk-using-c/#comments</comments>
		<pubDate>Sun, 11 Dec 2011 02:12:49 +0000</pubDate>
		<dc:creator>Rhyous</dc:creator>
				<category><![CDATA[C# (C-Sharp)]]></category>
		<category><![CDATA[LANDesk]]></category>

		<guid isPermaLink="false">http://www.rhyous.com/?p=4445</guid>
		<description><![CDATA[This article is to demonstrate to LANDesk admins how to connect to the LANDesk MBSDK with C#. Prerequisites LANDesk A LANDesk Core Server accessible via the network. Credentials to connect to the LANDesk Core Server. Basically if you can hit the MBSDK with a browser and login, you are good to go. http://CoreServer/mbsdkservice/msgsdk.asmx Visual Studio [...]]]></description>
			<content:encoded><![CDATA[<p>This article is to demonstrate to LANDesk admins how to connect to the LANDesk MBSDK with C#.</p>
<h2>Prerequisites</h2>
<p><strong>LANDesk</strong></p>
<ol>
<li>A LANDesk Core Server accessible via the network.</li>
<li>Credentials to connect to the LANDesk Core Server.</li>
</ol>
<p>Basically if you can hit the MBSDK with a browser and login, you are good to go.</p>
<p>http://CoreServer/mbsdkservice/msgsdk.asmx</p>
<p><strong>Visual Studio</strong></p>
<ol>
<li>It is assumed that you have Visual Studio Professional installed</li>
</ol>
<h2>Step 1 &#8211; Create a Visual Studio Project</h2>
<ol>
<li>In Visual Studio, Go to File | New | Project.</li>
<li>Select that project type.<br />
Note: For this example I chose Console Application.</li>
<li>Give the Project a name.<br />
Note: I named my project TalkToMBSDK.</li>
<li>Click OK.<br />
Note: I went ahead and left my client application configured for .NET 4 even though I know the server currently is .NET 3.5 Sp1.</li>
</ol>
<h2>Step 2 &#8211; Add a Web Reference to the MBSDK</h2>
<ol>
<li> In you new Visual Studio project, right-click on the project and click Add Service Reference.<br />
Note: We actually need a Web  Reference but this is how we get there.</li>
<li>Click Advanced on the bottom left.</li>
<li>Click on Add Web Reference, also on the bottom left.</li>
<li>Enter the URL to the MBSDK on your Core Server: http://CoreServer/mbsdkservice/msgsdk.asmx</li>
<li>Change the Web Reference Name (on the right) to mbsdk.<br />
Note: You can name it whatever you want, but because there is an object called MBSDK (all uppercase), I chose to make the namespace mbsdk (all lowercase).</li>
<li>Click Add Reference.</li>
</ol>
<h2>Step 3 &#8211; Test using the LANDesk SDK</h2>
<ol>
<li>In the Program.cs add the following code.  You next steps are in the code comments.</li>
</ol>
<pre class="brush: csharp; title: ; notranslate">
using System.Net;
using TalkToMBSDK.mbsdk;

namespace TalkToMBSDK
{
    class Program
    {
        static void Main(string[] args)
        {
            // Step 1 - You need to use your credentials
            string user = &quot;SomeUser&quot;;
            string password = &quot;SomePassword&quot;;
            string domain = &quot;SomeDomain.tld&quot;;

            // Step 2 - Configure a CredentialCache object with the URL and your creds
            string uri = &quot;http://CoreServer/MBSDKService/MsgSDK.asmx&quot;;
            CredentialCache MyCredentialCache = new System.Net.CredentialCache();
            MyCredentialCache.Add(new System.Uri(uri), &quot;NTLM&quot;, new NetworkCredential(user, password, domain));

            // Step 3 - Create an MBSDK object and set its CredentialCache object to the one you just created
            MBSDK sdk = new MBSDK();
            sdk.Credentials = MyCredentialCache;

            // Step 4 - Go ahead an call methods from the MBSDK
            // Note: If you get 401 unathorized, are you a LANDesk Administrator?
            string[] configs = sdk.GetClientConfigurations();
            DeviceList list = sdk.ListMachines(&quot;&quot;);
            string who = sdk.WhoAmI();
        }
    }
}
</pre>
<p>Have fun LANDesk Admins.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rhyous.com/2011/12/10/how-to-connect-to-the-landesk-mbsdk-using-c/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

