<?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>TechnoHippy &#187; Code</title>
	<atom:link href="http://www.technohippy.geek.nz/tag/code/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.technohippy.geek.nz</link>
	<description>&#60;a href=&#34;/me&#34;&#62;What is a TechnoHippy?&#60;/a&#62;</description>
	<lastBuildDate>Thu, 19 Aug 2010 01:43:13 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Lets hope&#8230;</title>
		<link>http://www.technohippy.geek.nz/2010/01/lets-hope/</link>
		<comments>http://www.technohippy.geek.nz/2010/01/lets-hope/#comments</comments>
		<pubDate>Mon, 11 Jan 2010 06:06:57 +0000</pubDate>
		<dc:creator>kiwinewt</dc:creator>
				<category><![CDATA[1]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://www.technohippy.geek.nz/?p=643</guid>
		<description><![CDATA[This works: order allow,deny deny from 203.97.120.87 deny from 121.73.214.121 deny from 219.88.68.120 allow from all Can anyone confirm it before I test tomorrow?]]></description>
			<content:encoded><![CDATA[<p>This works:</p>
<p><code>order allow,deny<br />
deny from 203.97.120.87<br />
deny from 121.73.214.121<br />
deny from 219.88.68.120<br />
allow from all</code></p>
<p>Can anyone confirm it before I test tomorrow?</p>
 <img src="http://www.technohippy.geek.nz/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=643" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://www.technohippy.geek.nz/2010/01/lets-hope/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sorting Multidimensional Arrays</title>
		<link>http://www.technohippy.geek.nz/2009/07/sorting-multidimensional-arrays/</link>
		<comments>http://www.technohippy.geek.nz/2009/07/sorting-multidimensional-arrays/#comments</comments>
		<pubDate>Thu, 16 Jul 2009 04:32:29 +0000</pubDate>
		<dc:creator>kiwinewt</dc:creator>
				<category><![CDATA[Code]]></category>

		<guid isPermaLink="false">http://nate.walkerfamily.net.nz/?p=525</guid>
		<description><![CDATA[For future reference really: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 Controller::loadModel&#40;'Student'&#41;; $students = array&#40;&#41;; foreach &#40;$courseStudents as $crsstd&#41; &#123; $students&#91;&#93; = array&#40;$crsstd, $this-&#62;Student-&#62;find&#40;'first', array&#40;'conditions' =&#62; array&#40;'Student.id' =&#62; $crsstd&#91;'student_id'&#93;&#41;&#41;&#41;&#41;; &#125; &#160; function compare&#40;$x, $y&#41; &#123; if &#40; $x&#91;1&#93;&#91;'Student'&#93;&#91;'lastName'&#93; == $y&#91;1&#93;&#91;'Student'&#93;&#91;'lastName'&#93; &#41; return 0; else if &#40; [...]]]></description>
			<content:encoded><![CDATA[<p>For future reference really:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">Controller<span style="color: #339933;">::</span><span style="color: #004000;">loadModel</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Student'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$students</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$courseStudents</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$crsstd</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #000088;">$students</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$crsstd</span><span style="color: #339933;">,</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Student</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">find</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'first'</span><span style="color: #339933;">,</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'conditions'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Student.id'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$crsstd</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'student_id'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> compare<span style="color: #009900;">&#40;</span><span style="color: #000088;">$x</span><span style="color: #339933;">,</span> <span style="color: #000088;">$y</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #000088;">$x</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'Student'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'lastName'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">==</span> <span style="color: #000088;">$y</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'Student'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'lastName'</span><span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#41;</span>
		<span style="color: #b1b100;">return</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">else</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #000088;">$x</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'Student'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'lastName'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">&lt;</span> <span style="color: #000088;">$y</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'Student'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'lastName'</span><span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#41;</span>
		<span style="color: #b1b100;">return</span> <span style="color: #339933;">-</span><span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">else</span>
		<span style="color: #b1b100;">return</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #990000;">usort</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$students</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'compare'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

 <img src="http://www.technohippy.geek.nz/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=525" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://www.technohippy.geek.nz/2009/07/sorting-multidimensional-arrays/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Why</title>
		<link>http://www.technohippy.geek.nz/2009/01/why/</link>
		<comments>http://www.technohippy.geek.nz/2009/01/why/#comments</comments>
		<pubDate>Fri, 30 Jan 2009 08:58:59 +0000</pubDate>
		<dc:creator>kiwinewt</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Rant]]></category>
		<category><![CDATA[RoR]]></category>

		<guid isPermaLink="false">http://nate.walkerfamily.net.nz/2009/01/why/</guid>
		<description><![CDATA[Why does RoR not support multi-table inheritance? Theres no way at all (apart from an obscure plugin that noone knows how to use) to get it working without writing SQL views and such, which just gets messy. It should not be so hard!]]></description>
			<content:encoded><![CDATA[<p>Why does RoR not support multi-table inheritance? Theres no way at all (apart from an obscure plugin that noone knows how to use) to get it working without writing SQL views and such, which just gets messy.</p>
<p><img src="http://nate.walkerfamily.net.nz/wp-content/uploads/2009/01/meep.png" alt="inheritance" title="inheritance" width="541" height="155" /></p>
<p>It should not be so hard!</p>
 <img src="http://www.technohippy.geek.nz/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=444" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://www.technohippy.geek.nz/2009/01/why/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New Design</title>
		<link>http://www.technohippy.geek.nz/2009/01/new-design/</link>
		<comments>http://www.technohippy.geek.nz/2009/01/new-design/#comments</comments>
		<pubDate>Mon, 26 Jan 2009 00:39:14 +0000</pubDate>
		<dc:creator>kiwinewt</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://nate.walkerfamily.net.nz/?p=433</guid>
		<description><![CDATA[As many of you may have seen (If you have ever visited my blog), I have implemented a new design. It&#8217;s still based on the good old wordpress backend but now is more oriented towards the business end of things (since I will be getting business traffic pointed here. Yeah I know, I&#8217;m only a [...]]]></description>
			<content:encoded><![CDATA[<p>As many of you may have seen (If you have ever visited my blog), I have implemented a new design. It&#8217;s still based on the good old wordpress backend but now is more oriented towards the business end of things (since I will be getting business traffic pointed here.</p>
<p>Yeah I know, I&#8217;m only a one-man shop and put in a load of &#8216;we&#8217; stuff, but it does sound a bit more professional I think. Just a case of working out where &#8216;I&#8217; ends and &#8216;We&#8217; begins&#8230; See. Even the grammar associated with that is buggering up!</p>
<p>Oh, and yes I did do the logo myself <img src='http://www.technohippy.geek.nz/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
 <img src="http://www.technohippy.geek.nz/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=433" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://www.technohippy.geek.nz/2009/01/new-design/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Lets See&#8230;</title>
		<link>http://www.technohippy.geek.nz/2009/01/lets-see/</link>
		<comments>http://www.technohippy.geek.nz/2009/01/lets-see/#comments</comments>
		<pubDate>Mon, 19 Jan 2009 03:28:34 +0000</pubDate>
		<dc:creator>kiwinewt</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Rant]]></category>
		<category><![CDATA[RoR]]></category>
		<category><![CDATA[Testing]]></category>

		<guid isPermaLink="false">http://nate.walkerfamily.net.nz/?p=370</guid>
		<description><![CDATA[Currently working on a project that I really dont want to be doing any more on now&#8230; So, from Procrastinators-r-us: user = User.new(:username => &#8220;Frankie&#8221;, :password => &#8220;Fishy&#8221;, :password_confirmation => &#8220;Fishy&#8221;, :email => &#8220;frankie@fishlovers.com&#8221;, :first_name => &#8220;Frank&#8221;, :last_name => &#8220;EnStein&#8221;)]]></description>
			<content:encoded><![CDATA[<p>Currently working on a project that I really dont want to be doing any more on now&#8230;<br />
So, from Procrastinators-r-us:<br />
user = User.new(:username => &#8220;Frankie&#8221;, :password => &#8220;Fishy&#8221;, :password_confirmation => &#8220;Fishy&#8221;, :email => &#8220;frankie@fishlovers.com&#8221;, :first_name => &#8220;Frank&#8221;, :last_name => &#8220;EnStein&#8221;)</p>
 <img src="http://www.technohippy.geek.nz/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=370" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://www.technohippy.geek.nz/2009/01/lets-see/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>RoR &#8211; Reloading Classes</title>
		<link>http://www.technohippy.geek.nz/2009/01/ror-reloading-classes/</link>
		<comments>http://www.technohippy.geek.nz/2009/01/ror-reloading-classes/#comments</comments>
		<pubDate>Tue, 13 Jan 2009 00:17:03 +0000</pubDate>
		<dc:creator>kiwinewt</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[RoR]]></category>

		<guid isPermaLink="false">http://nate.walkerfamily.net.nz/2009/01/ror-reloading-classes/</guid>
		<description><![CDATA[For future reference&#8230; With the later version of Rails, you can reload your models and controllers with the following command. Be sure to recreate any instances of your models as they will still be using the old class reload!]]></description>
			<content:encoded><![CDATA[<p>For future reference&#8230;</p>
<p>With the later version of Rails, you can reload your models and controllers with the following command. Be sure to recreate any instances of your models as they will still be using the old class</p>
<p>reload!</p>
 <img src="http://www.technohippy.geek.nz/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=369" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://www.technohippy.geek.nz/2009/01/ror-reloading-classes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
