<?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>wekadesign</title>
	<atom:link href="http://www.wekadesign.co.nz/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.wekadesign.co.nz</link>
	<description>web apps that solve problems</description>
	<lastBuildDate>Sat, 28 May 2011 08:40:10 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Easy, Beautiful Charts with Flot</title>
		<link>http://www.wekadesign.co.nz/2011/05/22/easy-beautiful-chart-with-flot/</link>
		<comments>http://www.wekadesign.co.nz/2011/05/22/easy-beautiful-chart-with-flot/#comments</comments>
		<pubDate>Sun, 22 May 2011 00:01:30 +0000</pubDate>
		<dc:creator>Mike McMurray</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Web Apps]]></category>

		<guid isPermaLink="false">http://www.wekadesign.co.nz/?p=351</guid>
		<description><![CDATA[I&#8217;ve been looking for a free, open source chart library for a while and was struggling to find something that was good enough (and handled time series and missing data [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been looking for a free, open source chart library for a while and was struggling to find something that was good enough (and handled time series and missing data points well). For a long time I&#8217;ve been using <a href="http://www.fusioncharts.com/">Fusion Charts</a> (FC) and <a href="http://teethgrinder.co.uk/open-flash-chart-2/">Open Flash Chart</a> (OFC) in any in-house work and those products are very good. But they&#8217;re Flash, a little slow and not supported by some popular mobile devices. I&#8217;ve also used pChart for some testing but it was fairly stale in development and being images, had no interaction.</p>
<p>The <a href="http://code.google.com/p/flot/">Flot</a> JS library was something I&#8217;d seen a while back, but before I became comfortable with JS and <a href="http://jquery.com/">jQuery</a>. It does almost exactly what I want, is farily light-weight, extensible and easy to use. In a few hours last week I swapped out the FC code I had written for <a title="Overview System Monitoring" href="http://www.wekadesign.co.nz/2010/09/14/overview-system-monitoring/">Overview</a> and put in something almost half the size with Flot that created (in my view) a better product.</p>
<p>So I thought I might let others know what a nice, easy option Flot is with a little example. Beware this is not a fully working, copy and paste sort of example, it&#8217;s really just a chunk of generic code I pulled out.<span id="more-351"></span></p>
<p>The final output is a 24 hour chart of CPU usage for a server.</p>
<p><a href="http://www.wekadesign.co.nz/blog/wp-content/uploads/2011/05/flot-cpu.png"><img class="aligncenter size-medium wp-image-352" title="flot-cpu" src="http://www.wekadesign.co.nz/blog/wp-content/uploads/2011/05/flot-cpu-300x201.png" alt="" width="300" height="201" /></a></p>
<p>I call a PHP script called plot.php from the page that displays other server info. That plot.php script needs to know some info about what to draw, so it runs off to the database and fetches the last 24 hours of data about a particular data collector. Time is handled by Flot using the standard JS date object and displays in UTC. Any missing points are handled by joining the two points either side while the x-axis maintains spacing. NULL data points are not plotted to give a nice gap as expected.</p>
<p>So here&#8217;s a dump of plot.php, showing some of the Flot basics. If you download Flot, the API.txt file has pretty much all the info you will need.</p>
<p><strong>Update</strong>: So the WordPress behaviour for pasting code is not the best, so have a look at this <a href="https://docs.google.com/document/pub?id=1Fuj_-w9BojoBQmXcHD87BMbxXwnBHRLqIiOAc3HbvRo">text file</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wekadesign.co.nz/2011/05/22/easy-beautiful-chart-with-flot/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>DisplayPoint</title>
		<link>http://www.wekadesign.co.nz/2011/03/31/displaypoint/</link>
		<comments>http://www.wekadesign.co.nz/2011/03/31/displaypoint/#comments</comments>
		<pubDate>Thu, 31 Mar 2011 07:22:44 +0000</pubDate>
		<dc:creator>Mike McMurray</dc:creator>
				<category><![CDATA[Web Apps Portfolio]]></category>
		<category><![CDATA[display]]></category>
		<category><![CDATA[web apps]]></category>

		<guid isPermaLink="false">http://www.wekadesign.co.nz/?p=240</guid>
		<description><![CDATA[DisplayPoint is a solution to meet the demands of displaying content as easily as possible on screens around your business or public space. All you need is a device that [...]]]></description>
			<content:encoded><![CDATA[<p>DisplayPoint is a solution to meet the demands of displaying content as easily as possible on screens around your business or public space. All you need is a device that runs a modern web browser and you can centrally manage your dashboards and big screens from your desk.</p>
<p>Anyone can schedule and show images, movies, messages, websites or RSS feeds to a group of computers. Rather than buy some sort of application that you must install on all your computers or a server, just get a low-powered machine and a web browser.</p>
<h3>Features</h3>
<p>DisplayPoint is being extended regularly and I&#8217;m open to requests for features which fit the general use of the product. Some of the current features are,</p>
<ul>
<li>completely browser-based</li>
<li>centrally managed by anyone with a web browser</li>
<li>content can be displayed for any duration</li>
<li>show images like a slide show</li>
<li>view movies from your own network or stream from YouTube</li>
<li>post messages to inform others of meetings, news, etc</li>
<li>import and cache RSS feeds from news sites</li>
<li>display web pages that automatically scroll down to show all content</li>
<li>set content to expire at a certain date and time</li>
<li>add multiple display devices to content groups e.g. marketing sees one content group and the engineering teams see another</li>
</ul>
<p>Use it to cycle through the photos from the company BBQ with messages about the next team meeting mixed in. You can even use it in public areas to highlight videos and show messages specific to that area.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wekadesign.co.nz/2011/03/31/displaypoint/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Debug PHP Function Calls</title>
		<link>http://www.wekadesign.co.nz/2011/02/11/debug-php-function-calls/</link>
		<comments>http://www.wekadesign.co.nz/2011/02/11/debug-php-function-calls/#comments</comments>
		<pubDate>Fri, 11 Feb 2011 07:49:23 +0000</pubDate>
		<dc:creator>Mike McMurray</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Web Apps]]></category>
		<category><![CDATA[backtrace]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.wekadesign.co.nz/?p=298</guid>
		<description><![CDATA[Logging errors can be very helpful as your code base becomes huge. But sometime it&#8217;s still difficult to find out what&#8217;s calling the function that&#8217;s giving the error. Wouldn&#8217;t it [...]]]></description>
			<content:encoded><![CDATA[<p>Logging errors can be very helpful as your code base becomes huge. But sometime it&#8217;s still difficult to find out what&#8217;s calling the function that&#8217;s giving the error. Wouldn&#8217;t it be nice if there was a way to see how you&#8217;d got to that function?</p>
<p>Well of course there&#8217;s a way in <a href="http://nz.php.net/manual/en/function.debug-backtrace.php" target="_blank">PHP</a> &#8211; <strong>debug_backtrace</strong>. Just add something similar in a suitable place in your code and you&#8217;ll be able to find what functions were called.</p>
<pre><code>$trace=debug_backtrace();
$caller = $trace[1]['function'];
// or just dump all the info
var_dump($trace);</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://www.wekadesign.co.nz/2011/02/11/debug-php-function-calls/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using SQL Management Studio in Windows 7</title>
		<link>http://www.wekadesign.co.nz/2010/12/17/using-sql-management-studio-in-windows-7/</link>
		<comments>http://www.wekadesign.co.nz/2010/12/17/using-sql-management-studio-in-windows-7/#comments</comments>
		<pubDate>Thu, 16 Dec 2010 19:20:44 +0000</pubDate>
		<dc:creator>Mike McMurray</dc:creator>
				<category><![CDATA[Sys Admin]]></category>
		<category><![CDATA[SQL 2005]]></category>
		<category><![CDATA[SQL Management Studio]]></category>
		<category><![CDATA[windows 7]]></category>

		<guid isPermaLink="false">http://www.wekadesign.co.nz/?p=281</guid>
		<description><![CDATA[If you happen to be using SQL Management Studio in Windows 7 and need to connect to a SQL 2005 instance not running on the standard port of 1433, you [...]]]></description>
			<content:encoded><![CDATA[<p>If you happen to be using SQL Management Studio in Windows 7 and need to connect to a SQL 2005 instance not running on the standard port of 1433, you might be having some problems connecting. For some reason this mix seems to require the SQL port to be manually defined when connecting to any named instance.</p>
<p>The fix is to specify the port in the server name used in the Connection prompt. So if your SQL instance was called SQL02 and running on port 3433, you&#8217;d use &#8220;MySql2005Server,3433 \SQL02&#8243;.</p>
<p><img class="aligncenter size-full wp-image-285" title="SQLConnection" src="http://www.wekadesign.co.nz/blog/wp-content/uploads/2010/12/SQLConnection.png" alt="" width="431" height="328" /></p>
<p>If you don&#8217;t know the port that SQL server is running on (maybe you have an external vendor supporting SQL), you can connect to the server from a Windows XP machine and run,</p>
<pre>netstat -a | find /i "mysqlserver"</pre>
<p>This will show you the network connection from your machine to the SQL server and the port being used.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wekadesign.co.nz/2010/12/17/using-sql-management-studio-in-windows-7/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Beware the leading zero in Javascript parseInt()!</title>
		<link>http://www.wekadesign.co.nz/2010/12/09/beware-the-leading-zero-in-javascript-parseint/</link>
		<comments>http://www.wekadesign.co.nz/2010/12/09/beware-the-leading-zero-in-javascript-parseint/#comments</comments>
		<pubDate>Thu, 09 Dec 2010 01:08:33 +0000</pubDate>
		<dc:creator>Mike McMurray</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://www.wekadesign.co.nz/?p=276</guid>
		<description><![CDATA[Exhibit A, parseInt('01'); //equals 1 parseInt('02'); //equals 2 parseInt('03'); //equals 3 parseInt('04'); //equals 4 parseInt('05'); //equals 5 parseInt('06'); //equals 6 parseInt('07'); //equals 7 parseInt('08'); //equals 0 !! parseInt('09'); //equals 0 [...]]]></description>
			<content:encoded><![CDATA[<p>Exhibit A,</p>
<pre><code>parseInt('01'); //equals 1
parseInt('02'); //equals 2
parseInt('03'); //equals 3
parseInt('04'); //equals 4
parseInt('05'); //equals 5
parseInt('06'); //equals 6
parseInt('07'); //equals 7
parseInt('08'); //equals 0 !!
parseInt('09'); //equals 0 !!
</code></pre>
<p>When Javascript encounters a leading zero it assumes an octal number. So when it sees 08 or 09 then there are problems.</p>
<p>The fix is to add the radix to the function call,</p>
<pre><code>myInt = parseInt('08',10); //equals 8</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://www.wekadesign.co.nz/2010/12/09/beware-the-leading-zero-in-javascript-parseint/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using PHP exec() with IIS6</title>
		<link>http://www.wekadesign.co.nz/2010/10/12/using-php-exec-with-iis6/</link>
		<comments>http://www.wekadesign.co.nz/2010/10/12/using-php-exec-with-iis6/#comments</comments>
		<pubDate>Tue, 12 Oct 2010 02:15:12 +0000</pubDate>
		<dc:creator>Mike McMurray</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Sys Admin]]></category>
		<category><![CDATA[Web Apps]]></category>

		<guid isPermaLink="false">http://www.wekadesign.co.nz/?p=242</guid>
		<description><![CDATA[There are a few work arounds I&#8217;ve found since having to use PHP under IIS6 and Windows 2003. Every now and again I come across something that just doesn&#8217;t work [...]]]></description>
			<content:encoded><![CDATA[<p>There are a few work arounds I&#8217;ve found since having to use PHP under IIS6 and Windows 2003. Every now and again I come across something that just doesn&#8217;t work the same way with this variation of web server, OS and PHP.</p>
<p>I needed to double-check the DNS hostname being reported from users on an internal website. Our DNS is a little scratchy when it comes to scavenging and keeping itself tidy, so often a DNS lookup of the client IP will give an incorrect name. This happens especially for laptops that hop off and on wireless APs.</p>
<p>So to compare against DNS (and because it&#8217;s an internal site) I thought to query the machines NetBIOS name with,</p>
<pre>exec("nbtstat.exe -A 123.123.123.123",$r);</pre>
<p>and that quickly fails with an error about &#8220;failing to fork&#8221;. Essentially this means, PHP can&#8217;t do what you want.</p>
<p>It boils down to file permissions. you need to run <em>cmd.exe</em> and <em>nbtstat.exe</em> with that single command. Both those files are secured against non-system users &#8211; probably rightly so too.</p>
<p>To resolve, just allow your IUSR_SERVER user to have read and execute permissions on both those files. Your exec() command should now be working.</p>
<p>REMEMBER: You are responsible for the security of your server. If you really don&#8217;t need to let programs run on your web server, then don&#8217;t.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wekadesign.co.nz/2010/10/12/using-php-exec-with-iis6/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dashboards and Displaying Business Data</title>
		<link>http://www.wekadesign.co.nz/2010/09/24/dashboards-and-displaying-business-data/</link>
		<comments>http://www.wekadesign.co.nz/2010/09/24/dashboards-and-displaying-business-data/#comments</comments>
		<pubDate>Fri, 24 Sep 2010 08:27:43 +0000</pubDate>
		<dc:creator>Mike McMurray</dc:creator>
				<category><![CDATA[Interesting Stuff]]></category>

		<guid isPermaLink="false">http://www.wekadesign.co.nz/?p=236</guid>
		<description><![CDATA[From Monolith Software blog, &#8220;even the best dashboards are somewhat myopic, and badly designed dashboards can lead to complacency, poor communication and eventually overlooked issues, degradations or outages.&#8221; This is [...]]]></description>
			<content:encoded><![CDATA[<p>From <a href="http://www.monolith-software.com/blog" target="_blank">Monolith Software blog</a>, &#8220;even the best dashboards are somewhat myopic, and badly designed dashboards can lead to complacency, poor communication and eventually overlooked issues, degradations or outages.&#8221;</p>
<p>This is something that comes up repeatedly when displaying data from one area to those from the wider business. Data in any form needs to come with the required info or education to provide clarity. The most basic chart can be mis-interpreted by those who make assumptions on the colours, format, numbers, etc before them. Admittedly, providing clear, functional, beautiful dashboards of a business&#8217;s data is difficult &#8211; and that&#8217;s one of the key reasons I enjoy doing it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wekadesign.co.nz/2010/09/24/dashboards-and-displaying-business-data/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ignore Network Latency at Your Peril</title>
		<link>http://www.wekadesign.co.nz/2010/09/19/ignore-network-latency-at-your-peril/</link>
		<comments>http://www.wekadesign.co.nz/2010/09/19/ignore-network-latency-at-your-peril/#comments</comments>
		<pubDate>Sat, 18 Sep 2010 20:57:12 +0000</pubDate>
		<dc:creator>Mike McMurray</dc:creator>
				<category><![CDATA[Interesting Stuff]]></category>
		<category><![CDATA[Web Apps]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[network]]></category>

		<guid isPermaLink="false">http://www.wekadesign.co.nz/?p=233</guid>
		<description><![CDATA[We all know developers need to consider a few things outside their own backyard. Things like hardware and the network affect software even if there&#8217;s not much that can be [...]]]></description>
			<content:encoded><![CDATA[<p>We all know developers need to consider a few things outside their own backyard. Things like hardware and the network affect software even if there&#8217;s not much that can be done to control them (even if you&#8217;re Apple). This is especially true for the network if you develop software for mobile devices.</p>
<p>So to help us all understand why the nuances of any network are important to all of us, <a href="http://www.fastchicken.co.nz/" target="_blank">Nic Wise</a> has a good little<a href="http://www.fastchicken.co.nz/2010/09/18/bandwidth-vrs-latency/" target="_blank"> blog post</a> about what to keep in mind. It&#8217;s written in people language and not TCP layers, so we can all benefit from this one.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wekadesign.co.nz/2010/09/19/ignore-network-latency-at-your-peril/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Watching your Network Usage</title>
		<link>http://www.wekadesign.co.nz/2010/09/16/watching-your-network-usage/</link>
		<comments>http://www.wekadesign.co.nz/2010/09/16/watching-your-network-usage/#comments</comments>
		<pubDate>Thu, 16 Sep 2010 03:19:16 +0000</pubDate>
		<dc:creator>Mike McMurray</dc:creator>
				<category><![CDATA[Sys Admin]]></category>
		<category><![CDATA[cmd line]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[networking]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.wekadesign.co.nz/?p=227</guid>
		<description><![CDATA[I&#8217;m sure everyone else knows about the iftop tool, but it was new to me. I needed to confirm that traffic from DRBD was using a particular interface and iftop [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m sure everyone else knows about the iftop tool, but it was new to me. I needed to confirm that traffic from DRBD was using a particular interface and iftop does the job by showing traffic sources, speed and culmulative data counts per interface.</p>
<div id="attachment_228" class="wp-caption alignnone" style="width: 474px"><a href="http://www.wekadesign.co.nz/blog/wp-content/uploads/2010/09/iftop.gif"><img class="size-full wp-image-228" title="iftop" src="http://www.wekadesign.co.nz/blog/wp-content/uploads/2010/09/iftop.gif" alt="" width="464" height="336" /></a><p class="wp-caption-text">The iftop tool shows you usage per interface</p></div>
]]></content:encoded>
			<wfw:commentRss>http://www.wekadesign.co.nz/2010/09/16/watching-your-network-usage/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Missing Network Interfaces in Ubuntu Under VMware ESXi</title>
		<link>http://www.wekadesign.co.nz/2010/09/16/missing-network-interfaces-in-ubuntu-under-vmware-esxi/</link>
		<comments>http://www.wekadesign.co.nz/2010/09/16/missing-network-interfaces-in-ubuntu-under-vmware-esxi/#comments</comments>
		<pubDate>Wed, 15 Sep 2010 20:41:02 +0000</pubDate>
		<dc:creator>Mike McMurray</dc:creator>
				<category><![CDATA[How-To]]></category>
		<category><![CDATA[Sys Admin]]></category>
		<category><![CDATA[esxi]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[vmware]]></category>

		<guid isPermaLink="false">http://www.wekadesign.co.nz/?p=225</guid>
		<description><![CDATA[Every now and again I clone a VM and add it to another host. ESXi prompts you for a new UID when you start the VM and I always remove [...]]]></description>
			<content:encoded><![CDATA[<p>Every now and again I clone a VM and add it to another host. ESXi prompts you for a new UID when you start the VM and I always remove the virtual network card(s) from the machine and re-add them later. I do this to make sure I don&#8217;t have two machines with the same MAC addresses on the network. But if you do this with Ubuntu, the new NIC(s) don&#8217;t get picked up by the OS. This is almost certainly <span style="text-decoration: underline;">not</span> specific to VMware or their ESXi product, it&#8217;s just the environment I&#8217;m using.</p>
<p>This problem seems to be caused by a lack of automatic hardware probing at boot, probably for a good reason but I&#8217;m no Linux kernel guru so won&#8217;t make a judgement there. The root of the issue is located in the file <em>/etc/udev/rules.d/70-persistent-net.rules</em> where you&#8217;ll see the old interfaces still listed alongside the new ones. Simply remove the old NIC(s) and ensure the new ones have the MAC addresses you expect and the correct eth<em>x</em> labels. Give the system a reboot and you should be happy.</p>
<p>Steps to resolve a missing network interface in Ubuntu 10.04 Lucid Lynx (and possibly earlier):</p>
<ol>
<li><em>sudo nano /etc/udev/rules.d/70-persistent-net.rules</em></li>
<li>Delete the lines with the old interfaces after comparing with your VMs newly assigned MAC addresses.</li>
<li>Confirm the interface names are what you expect at the end of each line.</li>
<li>Ctrl-X to save and exit.</li>
<li><em>sudo shutdown -r now</em></li>
<li>Run ifconfig to confirm the interfaces are up with the correct IPs.</li>
<li>If the interfaces are up, check your <em>/etc/network/interfaces</em> config to adjust IP settings as required.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.wekadesign.co.nz/2010/09/16/missing-network-interfaces-in-ubuntu-under-vmware-esxi/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: basic
Database Caching 10/17 queries in 0.011 seconds using disk: basic

Served from: www.wekadesign.co.nz @ 2012-05-21 00:10:56 -->
