<?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>sigma.squared &#187; Science</title>
	<atom:link href="http://www.sigmasquared.co.za/category/science/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.sigmasquared.co.za</link>
	<description>Random Thoughts and Inconsistencies</description>
	<lastBuildDate>Sun, 26 Jun 2011 11:19:36 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
<atom:link rel="hub" href="http://pubsubhubbub.appspot.com"/><atom:link rel="hub" href="http://superfeedr.com/hubbub"/>		<item>
		<title>All Aboard The Gautrain</title>
		<link>http://www.sigmasquared.co.za/2010/03/all-aboard-the-gautrain/</link>
		<comments>http://www.sigmasquared.co.za/2010/03/all-aboard-the-gautrain/#comments</comments>
		<pubDate>Sat, 13 Mar 2010 17:33:22 +0000</pubDate>
		<dc:creator>Ross</dc:creator>
				<category><![CDATA[Science]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://www.sigmasquared.co.za/?p=289</guid>
		<description><![CDATA[Last week sometime, I got a notice from Poken Africa on their Facebook page saying something along the lines of &#8216;sign up to come and view the Gautrain&#8217;. I have been interested for a long while in seeing what the technological marvel of the Gautrain was all about, so I notified the lass and we [...]]]></description>
			<content:encoded><![CDATA[<p>Last week sometime, I got a notice from <a href="http://www.poken.co.za" target="_blank">Poken Africa</a> on their <a href="http://www.facebook.com/PokenAfrica" target="_blank">Facebook page</a> saying something along the lines of &#8216;sign up to come and view the Gautrain&#8217;. I have been interested for a long while in seeing what the technological marvel of the Gautrain was all about, so I notified the lass and we signed up.</p>
<p align="right"><span id="more-289"></span></p>
<p align="center"><img src="http://www.sigmasquared.co.za/wp-content/uploads/2010/03/100_8510-475x421.jpg" alt="" title="100_8510" width="475" height="421" class="aligncenter size-medium wp-image-293" /></p>
<p>We arrived at the Bombardier depot off Allandale road just after 10am, and were led into the main depot by the friendly staff from the project. Coffee and snacks were served, and much mingling (and pokening) was done by all! After a while, we were addressed by the CEO of the Gautrain Management Agency, Jack van der Merwe and Bombela marketing manager, Errol Braithwaite, who took everyone&#8217;s questions regarding the train, safety, technology and various other aspects of it.   After Errol&#8217;s speech, he introduced Sandy, who &#8216;owned and washed&#8217; the Gautrains.   We were then told (to our wide eyes) that if we scream &#8220;Ag please Sandy&#8221; really loud, we&#8217;d get to actually go on the train.   Well, 200 people clearly made enough noise, and we were allowed our ride!</p>
<p align="center"><img src="http://www.sigmasquared.co.za/wp-content/uploads/2010/03/100_8535-475x517.jpg" alt="" title="100_8535" width="475" height="517" class="aligncenter size-medium wp-image-294" /></p>
<p>We started from the Allandale depot, heading out towards what we thought was the test track.   What we didn&#8217;t realise, was that we were actually being taken to the Marlboro station.   There was absolute shock when we realised that in what seemed like 3 odd minutes, we&#8217;d made it from Allandale to Marlboro, a trip that during peak hour would easily take 45 minutes.   To be certain, we timed it on the way back, and sure enough from Marlboro to Allandale depot took 2:52.</p>
<p align="center"><img src="http://www.sigmasquared.co.za/wp-content/uploads/2010/03/100_8538-475x356.jpg" alt="" title="100_8538" width="475" height="356" class="aligncenter size-medium wp-image-295" /></p>
<p>The train itself is very neatly done up, with all upholstery in the train matching and branded to the Gautrain.   The airconditioning keeps you nice and cool, and the air suspension and lack of bolted rails makes for a smooth glide along the tracks.   Reaching 160km/h was also astonishingly fast, and felt like we were going only around 60km/h.   The Gautrain uses 25,000 volts on running and accelerating, and so in the interest of the environment (and as someone put it, the &#8220;bunnyhuggers&#8221;), the trains are all equipped with a regenerative braking system which feeds power back into the circuit when the brakes are applied on the trains.</p>
<p>All in all this was an awesome experience, be sure to check out the <a href="http://www.facebook.com/Gautrain" target="_blank">Gautrain Facebook page</a> and the <a href="http://twitter.com/#search?q=%23tweetuponrails" target="_blank">Tweet Up On Rails topic</a> for more feedback, pictures and information!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sigmasquared.co.za/2010/03/all-aboard-the-gautrain/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	<price></price>	</item>
		<item>
		<title>DIY WordPress Social Media Icons</title>
		<link>http://www.sigmasquared.co.za/2010/01/diy-wordpress-social-media-icons/</link>
		<comments>http://www.sigmasquared.co.za/2010/01/diy-wordpress-social-media-icons/#comments</comments>
		<pubDate>Sun, 10 Jan 2010 20:52:38 +0000</pubDate>
		<dc:creator>Ross</dc:creator>
				<category><![CDATA[General Geekery]]></category>
		<category><![CDATA[How To's]]></category>
		<category><![CDATA[Science]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://www.sigmasquared.co.za/?p=144</guid>
		<description><![CDATA[So, I was using a third party plugin to handle all my social media sharing, which was very cool at first, but it started slowing my site down (as it connected to another site), so a few hours ago I ventured out onto the web trying to find the code to do this all myself. [...]]]></description>
			<content:encoded><![CDATA[<p>So, I was using a third party plugin to handle all my social media sharing, which was very cool at first, but it started slowing my site down (as it connected to another site), so a few hours ago I ventured out onto the web trying to find the code to do this all myself.</p>
<p align="right"><span id="more-144"></span></p>
<p>The majority of what I used is copied and pasted from various sources, but also customised for WordPress and its functions.   Speaking of functions, that is where you should head off to first.</p>
<h3>Shortening your URLs</h3>
<p>There is a wicked little URL shortening service that has an openly usable API which is very easy to implement.   To edit functions, browse to your current theme&#8217;s folder, and edit the <strong>functions.php </strong>file.   At the end of the file, add the following lines:</p>
<blockquote>
<div id="_mcePaste">&lt;?php</div>
<div id="_mcePaste">function CompressURL($url) {</div>
<div id="_mcePaste">$ch = curl_init();</div>
<div id="_mcePaste">curl_setopt($ch, CURLOPT_URL, &#8220;http://to.ly/api.php?longurl=&#8221;.urlencode($url));</div>
<div id="_mcePaste">curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);</div>
<div id="_mcePaste">curl_setopt($ch, CURLOPT_HEADER, 0);</div>
<div id="_mcePaste">$shorturl = curl_exec ($ch);</div>
<div id="_mcePaste">curl_close ($ch);</div>
<div id="_mcePaste">return $shorturl;</div>
<div id="_mcePaste">}</div>
<div id="_mcePaste">?&gt;</div>
</blockquote>
<p>This will allow you to share shortened URLs using the to.ly service.   This code was taken from the <a href="http://to.ly/api_info.php" target="_blank">to.ly API documentation</a>.</p>
<p>For the rest of the steps in this document, you will need to edit <strong>single.php.  <span style="font-weight: normal;"> I placed the code within a &lt;div class=&#8221;SocialIcons&#8221;&gt; [code for sharing] &lt;/div&gt; block.</span></strong></p>
<h3>Facebook</h3>
<p>This was the easiest of the lot, which I got from trawling through the design of<a href="http://www.nomnomnom.co.za/" target="_blank"> nomnomnom.co.za</a> (thanks to <a href="http://www.battica.co.za" target="_blank">battica</a> for the code in there!).   Here is the code used for Facebook:</p>
<blockquote><p>&lt;a target="_blank" title="Facebook" href="http://www.facebook.com/sharer.php?u=&lt;?php $turl = CompressURL(get_permalink($post-&gt;ID)); echo $turl; ?&gt;&amp;t=&lt;?php the_title(); ?&gt;" rel="nofollow" class="social-bookmark"&gt;<br />
&lt;img alt="Facebook" src="&lt;?php bloginfo('template_directory'); ?&gt;/images/facebook.jpg"/&gt;<br />
&lt;/a&gt;</p></blockquote>
<p>This should work off the bat (make sure you have an image ready in your theme's images folder).</p>
<h3>Twitter</h3>
<p>This one was a bit more complex, and took me a while because I had many many issues with the URL compression that was originally suggested in the site I used (cannot remember the site as I closed the tab by accident).   Turned out that it wasn't as plug and play as the author had stated, and I had to play with this for a good hour or more...   Here is the Twitter code I ended up using, any variables that you would need to change for your blog are in <strong><em>bold italic</em></strong>.</p>
<blockquote><p>&lt;a target="_blank" title="Twitter" href="http://twitter.com/home?status=Reading: &lt;?php the_title(); ?&gt; - &lt;?php $turl = CompressURL(get_permalink($post-&gt;ID)); echo $turl; ?&gt; (via @<strong><em>nightwulfe</em></strong>)" rel="nofollow" class="social-bookmark"&gt;<br />
&lt;img alt="Twitter" src="&lt;?php bloginfo('template_directory'); ?&gt;/images/twitter.jpg"/&gt;<br />
&lt;/a&gt;</p></blockquote>
<p>Again, make sure you have the required images in your theme folder.   Replace the name after the '@' with your Twitter account name.</p>
<h3>LinkedIn</h3>
<p>This one was a difficult one, in fact, it still is.   Tonight was my <em>first attempt </em>at php.   Thankfully I have the equivalent of an SCJP, so I could read code and play with functions/methods etc, and be able to understand the <a href="http://codex.wordpress.org/Function_Reference" target="_blank">WordPress function API</a>.   Having said that, this one is still messing me about.   Don't get me wrong, it does work.   However, I believe it could work better.   The code for this is based on the <a href="http://www.linkedin.com/static?key=developers_widget_shareonlinkedin" target="_blank">LinkedIn developer</a> widgets (<em>note that there is a license agreement involved with LinkedIn!</em>).   Again, variables to change are in <em><strong>bold italic</strong></em>.</p>
<blockquote><p>&lt;a target="_blank" title="LinkedIn" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=&lt;?php the_permalink(); ?&gt;&amp;title=&lt;?php the_title(); ?&gt;&amp;source=<strong><em>add_your_url_here</em></strong>" class="social-bookmark"&gt;<br />
&lt;img alt="LinkedIn" src="&lt;?php bloginfo('template_directory'); ?&gt;/images/linkedin.jpg"/&gt;<br />
&lt;/a&gt;</p></blockquote>
<p>Yet again, make sure your image is there...   Now, the thing that got me.   As stated with the LinkedIn widgets, there is a variable in the URL called &amp;summary=.   In here, I was hoping to place my post excerpt from within WordPress for that particular post.   I tried various degrees of <em>&lt;?php wp_trim_excerpt("&lt;?php get_the_content(); ?&gt;); ?&gt;</em>, just plain <em>&lt;?php get_the_content(); ?&gt;</em>, and a whole bunch of other methods I no longer care to remember, however all I could get generated in the output string was nothing.   It always stayed at <em>'...&amp;summary=&amp;source=www.sigmasquared.co.za...'</em>.   So, if you know how I can extract my excerpt from a post, please please, let me know in a comment!</p>
<h3>RSS 2.0</h3>
<p>Last but not least, I wanted my whole site to have a link to the RSS 2.0 feed.   I placed this in my <strong>header.php</strong>, but really, it is up to you where you want it.</p>
<blockquote><p>&lt;a title="&lt;?php _e('RSS 2.0 Feed'); ?&gt;" href="&lt;?php bloginfo('rss2_url'); ?&gt;"&gt;<br />
&lt;img src="&lt;?php bloginfo('template_directory'); ?&gt;/images/rss.jpg" alt="RSS 2.0 Feed" /&gt;</p></blockquote>
<p>And, yet again, make sure you have the image in the right place...</p>
<p>So that was my entire afternoon/evening, and I have such a feeling of accomplishment from it!</p>
<p>In hindsight, I could have done this by copy pasting the whole lot from the site I eventually found <a href="http://blogs.business.com/b2b-online-marketing/2009/create-share-buttons/" target="_blank">here</a> at B2B Online Marketing, but as Murphy would have it, I would only find that site once I had finished everything else...</p>
<p><strong>Note</strong>: If the code above does not work for you, please leave me a comment, I neatened it up in the article above here and may have wiped out a space or two in the process.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sigmasquared.co.za/2010/01/diy-wordpress-social-media-icons/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	<price></price>	</item>
		<item>
		<title>High-Speed Robotic Hand</title>
		<link>http://www.sigmasquared.co.za/2009/11/high-speed-robotic-hand/</link>
		<comments>http://www.sigmasquared.co.za/2009/11/high-speed-robotic-hand/#comments</comments>
		<pubDate>Mon, 09 Nov 2009 19:57:23 +0000</pubDate>
		<dc:creator>Ross</dc:creator>
				<category><![CDATA[Mental Images]]></category>
		<category><![CDATA[Science]]></category>

		<guid isPermaLink="false">http://www.sigmasquared.co.za/?p=28</guid>
		<description><![CDATA[This robotic hand is just too awesome.   Imagine the potential!]]></description>
			<content:encoded><![CDATA[<p>This robotic hand is just too awesome.   Imagine the potential!</p>
<p align="right"><span id="more-28"></span></p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="445" height="364" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/-KxjVlaLBmk&amp;hl=en&amp;fs=1&amp;rel=0&amp;color1=0x3a3a3a&amp;color2=0x999999&amp;border=1" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="445" height="364" src="http://www.youtube.com/v/-KxjVlaLBmk&amp;hl=en&amp;fs=1&amp;rel=0&amp;color1=0x3a3a3a&amp;color2=0x999999&amp;border=1" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="445" height="364" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/bfdHY26E2jc&amp;hl=en&amp;fs=1&amp;rel=0&amp;color1=0x3a3a3a&amp;color2=0x999999&amp;border=1" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="445" height="364" src="http://www.youtube.com/v/bfdHY26E2jc&amp;hl=en&amp;fs=1&amp;rel=0&amp;color1=0x3a3a3a&amp;color2=0x999999&amp;border=1" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://www.sigmasquared.co.za/2009/11/high-speed-robotic-hand/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<price></price>	</item>
	</channel>
</rss>

