<?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>Computer Solutions Blog</title>
	<atom:link href="http://www.computersolutions.cn/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.computersolutions.cn/blog</link>
	<description>Whats happening at Computer Solutions</description>
	<lastBuildDate>Fri, 13 Jan 2012 02:32:34 +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>Product Integration &#8211; eBuddy, ZoneMinder and me.</title>
		<link>http://www.computersolutions.cn/blog/2011/12/product-integration-ebuddy-zoneminder-and-me/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=product-integration-ebuddy-zoneminder-and-me</link>
		<comments>http://www.computersolutions.cn/blog/2011/12/product-integration-ebuddy-zoneminder-and-me/#comments</comments>
		<pubDate>Tue, 06 Dec 2011 04:08:26 +0000</pubDate>
		<dc:creator>Lawrence Sheed</dc:creator>
				<category><![CDATA[China Related]]></category>
		<category><![CDATA[Cool Hunting]]></category>
		<category><![CDATA[Tao Bao]]></category>

		<guid isPermaLink="false">http://www.computersolutions.cn/blog/?p=814</guid>
		<description><![CDATA[Once again, random browsing on Taobao brought the need for me to shop for random crap^Hstuff. This time, I bought a USB eBuddy (for a grand total of 60RMB including shipping) The eBuddy is a small MSN / QQ physical avatar that performs certain actions based on its software &#8211; e.g. flashing lights, moving its [...]]]></description>
			<content:encoded><![CDATA[<p>Once again, random browsing on Taobao brought the need for me to shop for random crap^Hstuff.</p>
<p>This time, I bought a USB eBuddy (for a grand total of 60RMB including shipping)</p>
<p><a href="http://www.flickr.com/photos/sheedl/6456511375/" title="e-Buddy by sheedl, on Flickr"><img src="http://farm8.staticflickr.com/7159/6456511375_49a60fe145.jpg" width="500" height="500" alt="e-Buddy"></a></p>
<p><a href="http://www.flickr.com/photos/sheedl/6456655347/" title="eBuddy by sheedl, on Flickr"><img src="http://farm8.staticflickr.com/7009/6456655347_1b5a20ef5f.jpg" width="500" height="500" alt="eBuddy"></a></p>
<p>The eBuddy is a small MSN / QQ physical avatar that performs certain actions based on its software &#8211; e.g. flashing lights, moving its wings, shaking left or right etc.</p>
<p>It looks like a little white angel with MSN color wings.</p>
<p><a href="http://www.flickr.com/photos/sheedl/6456668803/" title="eBuddy by sheedl, on Flickr"><img src="http://farm8.staticflickr.com/7156/6456668803_397da87895.jpg" width="500" height="500" alt="eBuddy"></a></p>
<p>For a cheap toy, its actually quite cool.  Cute too, but cool also.</p>
<p>Out of the box, its aimed squarely at Windows users.  As I don&#8217;t actually run the devil&#8217;s OS, I hooked it up to a Debian box instead.<br />
I was hoping for a little bit of fun integrating it with things, but that was not to be.<br />
There is already a perfectly fine library written in Python that works beautifully to make it dance and sing* <a href="http://code.google.com/p/pybuddy-dx">here</a></p>
<p>*Dancing and singing void where prohibited.</p>
<p>The python library is already set to run as a daemon on port 8888, and sits waiting for action out of the box.<br />
The settings below snarfed from the code give an idea of what actions can be given:</p>
<p>Commands:</p>
<pre class="wp-code-highlight prettyprint">
# GLADNESS =        00
# FEAR =            01
# FIZZ =            02
# PLEASANTSURPRISE =03
# GRIEF = 		04
# FURY = 		05
# QUELL = 		06
# REDHEAD = 		07
# GREENHEAD = 		08
# BLUEHEAD = 		09
# YELLOWHEAD =		10
# BLAME = 		11
# BLUEGREENHEAD =	12
# WHITEHEAD = 		13
# HEART = 		14
# WINGS = 		15
# BODY = 		16
# NOEFFECT = 		17
# ONLINE = 		18
# BUSY = 		19
# DAZE = 		20
# BACKSOON = 		21
# AWAY = 		22
# PHONE = 		23
# LUNCH = 		24
# OFFLINE = 		25
</pre>
<p>Mostly they consist of flashing various LED&#8217;s within the eBuddy on/off and optionally moving the wings or shaking the eBuddy left right.<br />
Simple, but effective.</p>
<p>I use Zoneminder in the office on my Debian based ZFS NAS (HP Proliant Microserver), so thought one fun way would be to integrate the eBuddy to Zoneminder.  This also proved to be too easy sadly.</p>
<p>Zoneminder has a wiki entry which gives 99% of whats needed <a href="http://www.zoneminder.com/wiki/index.php/FAQ#How_can_I_use_ZoneMinder_to_trigger_something_else_when_there_is_an_alarm.3F">here</a></p>
<p>I literally had to write 1 line of code to integrate the eBuddy with Zoneminder.</p>
<pre class="wp-code-highlight prettyprint">
#!/usr/bin/perl -w

use strict;

use ZoneMinder;

$| = 1;

zmDbgInit( &quot;myscript&quot;, level=&gt;0, to_log=&gt;0, to_syslog=&gt;0, to_term=&gt;1 );

my $dbh = DBI-&gt;connect( &quot;DBI:mysql:database=&quot;.ZM_DB_NAME.&quot;;host=&quot;.ZM_DB_HOST, ZM_DB_USER, ZM_DB_PASS );

my $sql = &quot;select M.*, max(E.Id) as LastEventId from Monitors as M left join Events as E on M.Id = E.MonitorId where M.Function != 'None' group by (M.Id)&quot;;
my $sth = $dbh-&gt;prepare_cached( $sql ) or die( &quot;Can't prepare '$sql': &quot;.$dbh-&gt;errstr() );

my $res = $sth-&gt;execute() or die( &quot;Can't execute '$sql': &quot;.$sth-&gt;errstr() );
my @monitors;
while ( my $monitor = $sth-&gt;fetchrow_hashref() )
{
    push( @monitors, $monitor );
}

while( 1 )
{
    foreach my $monitor ( @monitors )
    {
        next if ( !zmMemVerify( $monitor ) );

        if ( my $last_event_id = zmHasAlarmed( $monitor, $monitor-&gt;{LastEventId} ) )
        {
            $monitor-&gt;{LastEventId} = $last_event_id;
            print( &quot;Monitor &quot;.$monitor-&gt;{Name}.&quot; has alarmed\n&quot; );
	    #The Single Line of Code - it sends a flash green signal to the Python Daemon
            system (&quot;echo 8 | nc -q0 -u localhost 8888&quot;);
	    #
            # Do your stuff here
            #
        }
    }
    sleep( 1 );
}
</pre>
<p>I think I&#8217;ll be getting a couple more of these, as the integration is easy.<br />
Next up, server load monitoring &#8211; I can have a couple of these on the top of my desk for each server, and hopefully address each one separately for load purposes &#8211; e.g. flash yellow, red on load average, and shake if queue&#8217;s are large.<br />
Gimmicky, but useful.</p>
<p>Here are a couple of shots of the current incumbent in situ -</p>
<p><a href="http://www.flickr.com/photos/sheedl/6456694399/" title="eBuddy by sheedl, on Flickr"><img src="http://farm8.staticflickr.com/7008/6456694399_a277521e75.jpg" width="500" height="500" alt="eBuddy"></a></p>
<p>&#8230;and one of it actually working.<br />
(It flashes green if someone comes up the stairs and zone minder triggers.)</p>
<p><a href="http://www.flickr.com/photos/sheedl/6463884749/" title="eBuddy by sheedl, on Flickr"><img src="http://farm8.staticflickr.com/7002/6463884749_1f56a47238.jpg" width="500" height="500" alt="eBuddy"></a></p>
<p>I&#8217;m quite happy I spent the 60rmb, although I would have enjoyed more hacking.  I literally spent 5 minutes getting things running.<br />
Thats not a bad thing, but I was hoping for something a little deeper!</p>
<p>Going to order a few more now.<br />
I got mine here &#8211; <a href="http://item.taobao.com/item.htm?id=1799393549">http://item.taobao.com/item.htm?id=1799393549</a></p>
<p>Recommended.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.computersolutions.cn/blog/2011/12/product-integration-ebuddy-zoneminder-and-me/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Art for arts sake&#8230; &#8211; Mao goes Dotty.</title>
		<link>http://www.computersolutions.cn/blog/2011/12/art-for-arts-sake-mao-goes-dotty/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=art-for-arts-sake-mao-goes-dotty</link>
		<comments>http://www.computersolutions.cn/blog/2011/12/art-for-arts-sake-mao-goes-dotty/#comments</comments>
		<pubDate>Fri, 02 Dec 2011 04:13:53 +0000</pubDate>
		<dc:creator>Lawrence Sheed</dc:creator>
				<category><![CDATA[China Related]]></category>
		<category><![CDATA[Cool Hunting]]></category>
		<category><![CDATA[Tao Bao]]></category>
		<category><![CDATA[art]]></category>
		<category><![CDATA[mao]]></category>
		<category><![CDATA[poster]]></category>
		<category><![CDATA[shopping]]></category>
		<category><![CDATA[taobao]]></category>

		<guid isPermaLink="false">http://www.computersolutions.cn/blog/?p=808</guid>
		<description><![CDATA[As its been a long while since I&#8217;ve done a non computer related post, its now time for something completely different. Anyone who has visited our office has noticed that we receive a bazillion packages daily from my various shopping exploits on Taobao, slayer of money. I just bought a new house back home, which [...]]]></description>
			<content:encoded><![CDATA[<p>As its been a long while since I&#8217;ve done a non computer related post, its now time for something completely different.</p>
<p>Anyone who has visited our office has noticed that we receive a bazillion packages daily from my various shopping exploits on Taobao, slayer of money.</p>
<p>I just bought a new house back home, which has started competing with Taobao on the where do I spend my spare change, and I&#8217;ve been interested in decorating it with some &#8220;art&#8221;.<br />
Yes, I know that one persons art is another persons &#8216;meh &#8211; you like that?  icky&#8217;, but each to his own.</p>
<p>I found a gorgeous looking <a href="http://www.image1000.cn/item.htm?spm=1103PYoj.3-37*to.h-1MfDN_&#038;id=8988995475&#038;frm=&#038;"> hi-res map of Shanghai</a> for sale at one quite nicely designed store ( <a href="http://www.image1000.cn/">http://www.image1000.cn/</a> ), and contacted the seller.</p>
<p><a href="http://www.computersolutions.cn/blog/wp-content/uploads/2011/12/T2lalOXeRaXXXXXXXX_12840958.jpg"><img src="http://www.computersolutions.cn/blog/wp-content/uploads/2011/12/T2lalOXeRaXXXXXXXX_12840958-300x160.jpg" alt="" title="T2lalOXeRaXXXXXXXX_!!12840958" width="300" height="160" class="aligncenter size-medium wp-image-809" /></a></p>
<p>Unfortunately he couldn&#8217;t sell the canvas image on a roll, as I needed for easy shipping back home, and could only sell pre-framed.  </p>
<p>Roll on two weeks later, and I was still thinking about having that in my lounge back home, so decided on making a test order to check out the packaging, and its survivability vs Shanghai kuaidi (delivery) companies.</p>
<p>I picked a minimalist dot version of Mao for 100RMB including shipping, and ordered.<br />
Two days later, Mao arrived.</p>
<p>Unpacking below:</p>
<p><a href="http://www.flickr.com/photos/sheedl/6439618171/" title="Mao by sheedl, on Flickr"><img src="http://farm8.staticflickr.com/7017/6439618171_b334f28a42.jpg" width="500" height="500" alt="Mao"></a><br />
Fresh from the Kuaidi company!</p>
<p><a href="http://www.flickr.com/photos/sheedl/6439619527/" title="Mao by sheedl, on Flickr"><img src="http://farm8.staticflickr.com/7147/6439619527_4940b34d7b.jpg" width="500" height="500" alt="Mao"></a><br />
Nice packaging touches.</p>
<p><a href="http://www.flickr.com/photos/sheedl/6439621125/" title="Mao by sheedl, on Flickr"><img src="http://farm8.staticflickr.com/7146/6439621125_8239fe15d9.jpg" width="500" height="500" alt="Mao"></a><br />
Uh oh!</p>
<p><a href="http://www.flickr.com/photos/sheedl/6439627441/" title="Mao by sheedl, on Flickr"><img src="http://farm8.staticflickr.com/7025/6439627441_c494412557.jpg" width="500" height="500" alt="Mao"></a><br />
Still well packed.</p>
<p><a href="http://www.flickr.com/photos/sheedl/6439629353/" title="Mao by sheedl, on Flickr"><img src="http://farm8.staticflickr.com/7141/6439629353_5e67b95944.jpg" width="500" height="500" alt="Mao"></a><br />
Kuaidi vs Packaging, who will win?</p>
<p><a href="http://www.flickr.com/photos/sheedl/6439640051/" title="Mao by sheedl, on Flickr"><img src="http://farm8.staticflickr.com/7143/6439640051_881bdeb415.jpg" width="500" height="500" alt="Mao"></a><br />
More uh-oh..</p>
<p><a href="http://www.flickr.com/photos/sheedl/6439643337/" title="Mao by sheedl, on Flickr"><img src="http://farm8.staticflickr.com/7141/6439643337_6fd64d2f16.jpg" width="500" height="500" alt="Mao"></a><br />
Packaging wins (although it was a close call).</p>
<p><a href="http://www.flickr.com/photos/sheedl/6439632593/" title="Mao by sheedl, on Flickr"><img src="http://farm8.staticflickr.com/7142/6439632593_7027d99bc5.jpg" width="500" height="500" alt="Mao"></a><br />
Phew, looks ok.</p>
<p><a href="http://www.flickr.com/photos/sheedl/6439639081/" title="Untitled by sheedl, on Flickr"><img src="http://farm8.staticflickr.com/7005/6439639081_0cd65138c4.jpg" width="500" height="500" alt=""></a><br />
Inside packaging (really really well packaged!)</p>
<p><a href="http://www.flickr.com/photos/sheedl/6439646029/" title="Mao by sheedl, on Flickr"><img src="http://farm8.staticflickr.com/7175/6439646029_d7d1e0b52a.jpg" width="500" height="500" alt="Mao"></a><br />
Even comes with the hanging equipment, which is a nice touch.</p>
<p><a href="http://www.flickr.com/photos/sheedl/6439647251/" title="Mao by sheedl, on Flickr"><img src="http://farm8.staticflickr.com/7008/6439647251_2ac567b8a5.jpg" width="500" height="500" alt="Mao"></a><br />
So much attention to detail (plastic cover strip for acrylic front frame &#8220;glass&#8221;)</p>
<p><a href="http://www.flickr.com/photos/sheedl/6439651899/" title="Twister^H Mao by sheedl, on Flickr"><img src="http://farm8.staticflickr.com/7145/6439651899_65bf4f8a32.jpg" width="500" height="500" alt="Twister^H Mao"></a><br />
Its Twister!</p>
<p><a href="http://www.flickr.com/photos/sheedl/6439654761/" title="Mao by sheedl, on Flickr"><img src="http://farm8.staticflickr.com/7019/6439654761_ea7478b711.jpg" width="500" height="500" alt="Mao"></a><br />
Oh wait, no, its Mao <img src='http://www.computersolutions.cn/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><a href="http://www.flickr.com/photos/sheedl/6439662399/" title="Mao by sheedl, on Flickr"><img src="http://farm8.staticflickr.com/7033/6439662399_4c0b038aff.jpg" width="500" height="500" alt="Mao"></a><br />
Amjellybaby models the artwork.</p>
<p><a href="http://www.flickr.com/photos/sheedl/6439690529/" title="Mao by sheedl, on Flickr"><img src="http://farm8.staticflickr.com/7035/6439690529_922f3c1c87.jpg" width="500" height="500" alt="Mao"></a><br />
Finally, in situ!</p>
<p>Overall, reasonably happy with this.  Price is reasonable, and it (barely) survived the shipping company, so I think there would be a chance that a slightly better packaged version (i.e. adding a few layers of bubble wrap on the outside) will survive.</p>
<p>So, looks like I&#8217;ll be springing the 900rmb odd for the large canvas map version.</p>
<p>Wish me luck!</p>
<hr />
<p>Addendum </p>
<p>Ordered the large triptych and crossed my fingers that it would survive Emirates.<br />
It made the journey in better shape than the Mao print above did across Shanghai.  No dents and zero issues.</p>
<p>Here they are in my new house, awaiting hanging&#8230;</p>
<p><a href="http://www.flickr.com/photos/sheedl/6594259945/" title="Shanghai triptych by sheedl, on Flickr"><img src="http://farm8.staticflickr.com/7141/6594259945_cee902c23a.jpg" width="500" height="500" alt="Shanghai triptych"></a></p>
<p><a href="http://www.flickr.com/photos/sheedl/6594260349/" title="Shanghai triptych by sheedl, on Flickr"><img src="http://farm8.staticflickr.com/7153/6594260349_51ec11ffa0.jpg" width="500" height="500" alt="Shanghai triptych"></a></p>
<p>Pricey at 900rmb, but worth it.  Now I can point at locations on the satellite image and tell people I was here when they come visit the house!</p>
<p>2nd Addendum &#8211; final shot of this in place, finally on the wall after 2 weeks of sitting on the floor&#8230;  </p>
<p><a href="http://www.flickr.com/photos/sheedl/6685774499/" title="Untitled by sheedl, on Flickr"><img src="http://farm8.staticflickr.com/7143/6685774499_5a47e6870c.jpg" width="500" height="500" alt=""></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.computersolutions.cn/blog/2011/12/art-for-arts-sake-mao-goes-dotty/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Chinese Laser Engraver modding</title>
		<link>http://www.computersolutions.cn/blog/2011/11/chinese-laser-engraver-modding/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=chinese-laser-engraver-modding</link>
		<comments>http://www.computersolutions.cn/blog/2011/11/chinese-laser-engraver-modding/#comments</comments>
		<pubDate>Tue, 22 Nov 2011 16:22:54 +0000</pubDate>
		<dc:creator>Lawrence Sheed</dc:creator>
				<category><![CDATA[Lasers]]></category>
		<category><![CDATA[Useful Info]]></category>
		<category><![CDATA[cnc]]></category>
		<category><![CDATA[cutter]]></category>
		<category><![CDATA[engraver]]></category>
		<category><![CDATA[hacking]]></category>
		<category><![CDATA[hardware]]></category>
		<category><![CDATA[laos]]></category>
		<category><![CDATA[laser]]></category>

		<guid isPermaLink="false">http://www.computersolutions.cn/blog/?p=799</guid>
		<description><![CDATA[As I&#8217;ve been dabbling in the mad sciences recently, I thought I&#8217;d get some more toys. This culminated in the purchase of a laser engraver. This is it sitting next to another interesting toy I own &#8211; a CNC. He who dies with the most toys wins dontcha know The engraver came with some exceedingly [...]]]></description>
			<content:encoded><![CDATA[<p>As I&#8217;ve been dabbling in the mad sciences recently, I thought I&#8217;d get some more toys.<br />
This culminated in the purchase of a laser engraver.</p>
<p>This is it sitting next to another interesting toy I own &#8211; a CNC.  He who dies with the most toys wins dontcha know <img src='http://www.computersolutions.cn/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
<a href="http://www.flickr.com/photos/sheedl/6382391577/" title="My Desktop Fab :) by sheedl, on Flickr"><img src="http://farm7.staticflickr.com/6060/6382391577_10cfe089ae.jpg" width="500" height="500" alt="My Desktop Fab :)"></a></p>
<p>The engraver came with some exceedingly shite Chinese software (Moshi Engraver), but I did know that, and had ordered a cnc controller board with the idea of retrofitting that in. (its actually in the photo above funnily enough)</p>
<p>It has sat in the office mildly unused, but still in my thoughts.</p>
<p>One of my clients finally asked what was that large orange thing upstairs, and I dragged it out and setup for them to show off some test paper cuts.</p>
<p>Tomorrow will take a closer look at working out the pinouts as I didn&#8217;t get very far today in getting EMC2 talking nicely to to the Y axis (which was the goal for tonight).</p>
<p>Long term will be interested in making it work as a printer driven hardware device, but for now EMC2 is good enough.<br />
http://www.laoslaser.org/ is making interesting progress in that regard, and I might look at talking directly to the Engraver factory about integrating and making a few with a few to selling a *decent* version.</p>
<p>As this will be a work in progress, here are the links that will be useful.<br />
Some need a vee pee en to view in China sadly.</p>
<p><a href="http://www.cnczone.com/forums/laser_engraving_cutting_machines/138554-cheap_laser_cutter_modifications.html">http://www.cnczone.com/forums/laser_engraving_cutting_machines/138554-cheap_laser_cutter_modifications.html</a><br />
<a href="http://www.thinkhaus.org/2010/06/19/howto-turn-a-cheap-chinese-laser-engraver-into-a-pretty-good-laser-cutter/">http://www.thinkhaus.org/2010/06/19/howto-turn-a-cheap-chinese-laser-engraver-into-a-pretty-good-laser-cutter/</a><br />
<a href="http://www.stephenhobley.com/blog/2011/04/15/upgrading-a-laser-cutter-from-china/">http://www.stephenhobley.com/blog/2011/04/15/upgrading-a-laser-cutter-from-china/</a><br />
<a href="http://www.andyslater.com/laser-cutting/cnc-conversion.html">http://www.andyslater.com/laser-cutting/cnc-conversion.html</a><br />
<a href="http://dank.bengler.no/-/page/show/5473_connectinggrbl">http://dank.bengler.no/-/page/show/5473_connectinggrbl</a><br />
<a href="http://www.synthfool.com/laser/">http://www.synthfool.com/laser/</a><br />
<a href="http://www.laoslaser.org/">http://www.laoslaser.org/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.computersolutions.cn/blog/2011/11/chinese-laser-engraver-modding/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Seagate FreeAgent GoFlex Desk disassembly</title>
		<link>http://www.computersolutions.cn/blog/2011/11/seagate-freeagent-goflex-desk-disassembly/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=seagate-freeagent-goflex-desk-disassembly</link>
		<comments>http://www.computersolutions.cn/blog/2011/11/seagate-freeagent-goflex-desk-disassembly/#comments</comments>
		<pubDate>Sun, 13 Nov 2011 07:53:34 +0000</pubDate>
		<dc:creator>Lawrence Sheed</dc:creator>
				<category><![CDATA[Useful Info]]></category>
		<category><![CDATA[disassembly]]></category>
		<category><![CDATA[freeagent]]></category>
		<category><![CDATA[goflex]]></category>
		<category><![CDATA[seagate]]></category>

		<guid isPermaLink="false">http://www.computersolutions.cn/blog/?p=786</guid>
		<description><![CDATA[As drive prices have increased somewhat to roughly 200% in price locally over the last few weeks for raw drives, and external drive cases have not, I advised a client recently to purchase an external hard drive to save some money. The drive case he brought over to me to have installed in his desktop [...]]]></description>
			<content:encoded><![CDATA[<p>As drive prices have increased somewhat to roughly 200% in price locally over the last few weeks for raw drives, and external drive cases have not, I advised a client recently to purchase an external hard drive to save some money.</p>
<p>The drive case he brought over to me to have installed in his desktop was a Seagate GoFlex drive.</p>
<p>Seagate unfortunately doesn&#8217;t use screws to put the case together like other manufacturers, instead they use the dreaded plastic clips to hold the drive case together.</p>
<p>Below is a quick pictorial to safely take apart one of these cases to remove a drive (or swap a broken drive).</p>
<p>Essentially -</p>
<p>1. remove the base (pulls of easily).</p>
<p>2. stick a credit card under the top edge (I used a flat jewel screwdriver to get enough space), and unclip top</p>
<p>3. slide drive out</p>
<p>4. remove plastic feet and unscrew screws.</p>
<p>5. fold down metal sticker and remove drive.</p>
<p>&nbsp;</p>

<a href='http://www.computersolutions.cn/blog/2011/11/seagate-freeagent-goflex-desk-disassembly/10-drive/' title='10 - drive'><img width="150" height="150" src="http://www.computersolutions.cn/blog/wp-content/uploads/2011/11/10-drive-150x150.jpg" class="attachment-thumbnail" alt="10 - drive" title="10 - drive" /></a>
<a href='http://www.computersolutions.cn/blog/2011/11/seagate-freeagent-goflex-desk-disassembly/9-unscrewed/' title='9 - unscrewed'><img width="150" height="150" src="http://www.computersolutions.cn/blog/wp-content/uploads/2011/11/9-unscrewed-150x150.jpg" class="attachment-thumbnail" alt="9 - unscrewed" title="9 - unscrewed" /></a>
<a href='http://www.computersolutions.cn/blog/2011/11/seagate-freeagent-goflex-desk-disassembly/8-remove-plastic-feet-and-unscrew-screws/' title='8 - remove plastic feet, and unscrew screws'><img width="150" height="150" src="http://www.computersolutions.cn/blog/wp-content/uploads/2011/11/8-remove-plastic-feet-and-unscrew-screws-150x150.jpg" class="attachment-thumbnail" alt="8 - remove plastic feet, and unscrew screws" title="8 - remove plastic feet, and unscrew screws" /></a>
<a href='http://www.computersolutions.cn/blog/2011/11/seagate-freeagent-goflex-desk-disassembly/7-slide-drive-out/' title='7 - slide drive out'><img width="150" height="150" src="http://www.computersolutions.cn/blog/wp-content/uploads/2011/11/7-slide-drive-out-150x150.jpg" class="attachment-thumbnail" alt="7 - slide drive out" title="7 - slide drive out" /></a>
<a href='http://www.computersolutions.cn/blog/2011/11/seagate-freeagent-goflex-desk-disassembly/6-note-annoying-side-tabs/' title='6 - note annoying side tabs'><img width="150" height="150" src="http://www.computersolutions.cn/blog/wp-content/uploads/2011/11/6-note-annoying-side-tabs-150x150.jpg" class="attachment-thumbnail" alt="6 - note annoying side tabs" title="6 - note annoying side tabs" /></a>
<a href='http://www.computersolutions.cn/blog/2011/11/seagate-freeagent-goflex-desk-disassembly/5-remove-top/' title='5 - remove top'><img width="150" height="150" src="http://www.computersolutions.cn/blog/wp-content/uploads/2011/11/5-remove-top-150x150.jpg" class="attachment-thumbnail" alt="5 - remove top" title="5 - remove top" /></a>
<a href='http://www.computersolutions.cn/blog/2011/11/seagate-freeagent-goflex-desk-disassembly/4-wedge-credit-card-and-wiggle/' title='4 - wedge credit card and wiggle'><img width="150" height="150" src="http://www.computersolutions.cn/blog/wp-content/uploads/2011/11/4-wedge-credit-card-and-wiggle-150x150.jpg" class="attachment-thumbnail" alt="4 - wedge credit card and wiggle" title="4 - wedge credit card and wiggle" /></a>
<a href='http://www.computersolutions.cn/blog/2011/11/seagate-freeagent-goflex-desk-disassembly/3-remove-base/' title='3 - remove base'><img width="150" height="150" src="http://www.computersolutions.cn/blog/wp-content/uploads/2011/11/3-remove-base-150x150.jpg" class="attachment-thumbnail" alt="3 - remove base" title="3 - remove base" /></a>
<a href='http://www.computersolutions.cn/blog/2011/11/seagate-freeagent-goflex-desk-disassembly/2-case/' title='2 - case'><img width="150" height="150" src="http://www.computersolutions.cn/blog/wp-content/uploads/2011/11/2-case-150x150.jpg" class="attachment-thumbnail" alt="2 - case" title="2 - case" /></a>
<a href='http://www.computersolutions.cn/blog/2011/11/seagate-freeagent-goflex-desk-disassembly/1-box/' title='1 - box'><img width="150" height="150" src="http://www.computersolutions.cn/blog/wp-content/uploads/2011/11/1-box-150x150.jpg" class="attachment-thumbnail" alt="1 - box" title="1 - box" /></a>

]]></content:encoded>
			<wfw:commentRss>http://www.computersolutions.cn/blog/2011/11/seagate-freeagent-goflex-desk-disassembly/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Debian Locales error quick fix</title>
		<link>http://www.computersolutions.cn/blog/2011/11/debian-locales-error-quick-fix/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=debian-locales-error-quick-fix</link>
		<comments>http://www.computersolutions.cn/blog/2011/11/debian-locales-error-quick-fix/#comments</comments>
		<pubDate>Tue, 08 Nov 2011 14:50:23 +0000</pubDate>
		<dc:creator>Lawrence Sheed</dc:creator>
				<category><![CDATA[Technical Mumbo Jumbo]]></category>
		<category><![CDATA[apt-get]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[locale: Cannot set LC_ALL]]></category>
		<category><![CDATA[locale: Cannot set LC_CTYPE]]></category>
		<category><![CDATA[locale: Cannot set LC_MESSAGES]]></category>
		<category><![CDATA[locales]]></category>

		<guid isPermaLink="false">http://www.computersolutions.cn/blog/?p=772</guid>
		<description><![CDATA[If you get similar messages to this when you use apt-get perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LANGUAGE = (unset), LC_ALL = (unset), LC_CTYPE = &#34;UTF-8&#34;, LANG = &#34;en_US&#34; are supported and installed on your system. perl: warning: Falling back to the standard locale (&#34;C&#34;). locale: Cannot set [...]]]></description>
			<content:encoded><![CDATA[<p>If you get similar messages to this when you use apt-get</p>
<pre class="wp-code-highlight prettyprint">
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
	LANGUAGE = (unset),
	LC_ALL = (unset),
	LC_CTYPE = &quot;UTF-8&quot;,
	LANG = &quot;en_US&quot;
    are supported and installed on your system.
perl: warning: Falling back to the standard locale (&quot;C&quot;).
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
</pre>
<p>and the advice to </p>
<pre class="wp-code-highlight prettyprint">
dpkg-reconfigure locales
</pre>
<p>doesn&#8217;t work, then try this &#8211; </p>
<pre class="wp-code-highlight prettyprint">export LANGUAGE=en_US.UTF-8
export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8
locale-gen en_US.UTF-8
dpkg-reconfigure locales</pre>
<p>Short and sweet solution.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.computersolutions.cn/blog/2011/11/debian-locales-error-quick-fix/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Macbook Pro top replacement issue &#8211; or how I fixed my Macbook and sorted out the function keys.</title>
		<link>http://www.computersolutions.cn/blog/2011/11/macbook-pro-top-replacement-issue-or-how-i-fixed-my-macbook-and-sorted-out-the-function-keys/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=macbook-pro-top-replacement-issue-or-how-i-fixed-my-macbook-and-sorted-out-the-function-keys</link>
		<comments>http://www.computersolutions.cn/blog/2011/11/macbook-pro-top-replacement-issue-or-how-i-fixed-my-macbook-and-sorted-out-the-function-keys/#comments</comments>
		<pubDate>Mon, 07 Nov 2011 18:17:50 +0000</pubDate>
		<dc:creator>Lawrence Sheed</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[Technical Mumbo Jumbo]]></category>
		<category><![CDATA[function keys]]></category>
		<category><![CDATA[keyboard]]></category>
		<category><![CDATA[plist]]></category>
		<category><![CDATA[Replace]]></category>
		<category><![CDATA[top case]]></category>

		<guid isPermaLink="false">http://www.computersolutions.cn/blog/?p=764</guid>
		<description><![CDATA[I&#8217;ve been buying broken Macbook&#8217;s in SA when I&#8217;ve been home, for repair in China. My latest purchase is a pre unibody Mac Book Pro that had been dropped &#8211; the top case was dented,and the screen shattered. The LCD was fairly painless to replace &#8211; I&#8217;ve done quite a few already on various models, [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been buying broken Macbook&#8217;s in SA when I&#8217;ve been home, for repair in China.</p>
<p>My latest purchase is a pre unibody Mac Book Pro that had been dropped &#8211; the top case was dented,and the screen shattered.<br />
The LCD was fairly painless to replace &#8211; I&#8217;ve done quite a few already on various models, and I have a bazillion suppliers for raw panels.</p>
<p>The top case was a little more problematic &#8211; I ordered 2 consecutive replacements off of Taobao, but unfortunately the delivery company (ShenTong) destroyed both in shipping.  Took about a month to sort that out and find a yet another replacement with explicit instructions please not to send via ShenTong (aka destroyer of parts).</p>
<p>The third case arrived in pristine condition, and I installed the keyboard from the previous case, only to find that the function keys didn&#8217;t work, and the caps lock didn&#8217;t work.</p>
<p>It wasn&#8217;t a hardware issue with the keyboard, as it worked fine in another laptop.  I even ordered another one just to make sure.</p>
<p>A bit of googling revealed that the keyboard kext gets the layout from the USB hardware ID present in the top case.<br />
As my top case didn&#8217;t quite match up hardware id wise, I was seeing that as an issue.</p>
<p>Fixing this is a bit tricky, but doable.</p>
<p>First up was to find out what the hardware id is for the USB case.<br />
In my case this was as below (snarfed from System Information / USB)</p>
<pre class="wp-code-highlight prettyprint">
Apple Internal Keyboard / Trackpad:

  Product ID:	0x0231
  Vendor ID:	0x05ac  (Apple Inc.)
  Version:	0,70
  Speed:	Up to 12 Mb/sec
  Manufacturer:	Apple, Inc.
  Location ID:	0x5d200000 / 3
  Current Available (mA):	500
  Current Required (mA):	40
</pre>
<p>Product ID is the useful bit &#8211; 0&#215;0231 =  561 in decimal.<br />
So, we need to lookup 561 in the kext (driver) for the keyboard.</p>
<p>In Lion / Snow Leopard, this is in the AppleUSBTopCase.kext over in System / Library / Extensions.</p>
<p>If you open up that kext, it has the plist for the keyboard layouts over here -</p>
<p>AppleUSBTopCase.kext » Contents » PlugIns » AppleUSBTCKeyEventDriver.kext » Contents » Info.plist</p>
<p>Open up the Info.plist, and look for the Product ID that matches your Product ID &#8211; in my case 560.</p>
<p>The key FnFunctionUsageMap contains the mapping for the keyboard.  In my case I had to change it to this:</p>
<pre class="wp-code-highlight prettyprint">
&lt;key&gt;FnFunctionUsageMap&lt;/key&gt;
&lt;string&gt;0x0007003a,0x00ff0005,0x0007003b,0x00ff0004,0x0007003c,0x000c00e2,0x0007003d,0x000c00ea,0x0007003e,0x000c00e9,0x0007003f,0x00070083,0x00070040,0x00ff0006,0x00070041,0x00ff0007,0x00070042,0x00ff0009,0x00070043,0x00ff0008&lt;/string&gt;
</pre>
<p>Each value is a pair &#8211; first the key number, then the value to set it to.<br />
0x0007003a = F1<br />
0x0007003b = F2<br />
&#8230;</p>
<p>My above settings are for<br />
F1 = brightness down<br />
F2 = brightness up<br />
F3 = mute<br />
F4 = volume down<br />
F5 = volume up<br />
F6 = num lock<br />
F7 = Expose<br />
F8 = Keyboard Light off<br />
F9 = Keyboard Light down<br />
F10 = Keyboard Light Up<br />
F11 = n/a<br />
F12 = n/a</p>
<p>I got these values from here &#8211; </p>
<p>// usage IDs from the hid<br />
#define FF_BRIGHTNESS_DOWN_ID_LAPTOP @&#8221;0x00ff0005&#8243; // for laptops<br />
#define FF_BRIGHTNESS_UP_ID_LAPTOP @&#8221;0x00ff0004&#8243; // for laptops<br />
#define FF_BRIGHTNESS_DOWN_ID_EXTERNAL @&#8221;0xff010021&#8243; // for external keyboards<br />
#define FF_BRIGHTNESS_UP_ID_EXTERNAL @&#8221;0xff010020&#8243; // for external keyboards<br />
#define FF_EXPOSE_ID @&#8221;0xff010010&#8243;<br />
#define FF_DASHBOARD_ID @&#8221;0xff010002&#8243;<br />
#define FF_ILLUMINATION_TOGGLE_ID @&#8221;0x00ff0007&#8243;<br />
#define FF_ILLUMINATION_DOWN_ID @&#8221;0x00ff0009&#8243;<br />
#define FF_ILLUMINATION_UP_ID @&#8221;0x00ff0008&#8243;<br />
#define FF_VIDEO_MIRROR_ID @&#8221;0x00ff0006&#8243;<br />
#define FF_REWIND_ID @&#8221;0x000C00B4&#8243;<br />
#define FF_PLAYPAUSE_ID @&#8221;0x000C00CD&#8221;<br />
#define FF_FASTFORWARD_ID @&#8221;0x000C00B3&#8243;<br />
#define FF_MUTE_ID @&#8221;0x000C00E2&#8243;<br />
#define FF_VOLUME_DOWN_ID @&#8221;0x000C00EA&#8221;<br />
#define FF_VOLUME_UP_ID @&#8221;0x000C00E9&#8243;</p>
<p>Once I&#8217;d done that, I also needed to rebuild (or in my case build), the Kext cache so that the OS would use it on next reboot.<br />
Heres how to do that in Lion</p>
<pre class="wp-code-highlight prettyprint">
sudo kextcache -v 1 -a i386 -a x86_64 -m /System/Library/Caches/com.apple.kext.caches/Startup/Extensions.mkext /System/Library/Extensions
</pre>
<p>&#8230;oh, and lastly, reboot of course!</p>
<p>Post reboot my function keys were working normally.<br />
The caps lock key is still non-functional, but I&#8217;m ok with that, as its means a bit more work for little effort.</p>
<p>I may look into setting up a special plist to override the usb_id its getting from the hardware via the method here  -<a href="http://www.projectosx.com/forum/index.php?showtopic=798">http://www.projectosx.com/forum/index.php?showtopic=798</a></p>
<p>..but again, time vs effort&#8230;</p>
<p>Still, my Macbook is working now more or less, so its good enough for me <img src='http://www.computersolutions.cn/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Of course, subsequently to doing this the hard way, I found a program to do it all for me!</p>
<p><a href="http://pqrs.org/macosx/keyremap4macbook/">http://pqrs.org/macosx/keyremap4macbook/</a></p>
<p>Suggest unless you are a masochist, use that!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.computersolutions.cn/blog/2011/11/macbook-pro-top-replacement-issue-or-how-i-fixed-my-macbook-and-sorted-out-the-function-keys/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to disable XCache per domain</title>
		<link>http://www.computersolutions.cn/blog/2011/11/how-to-disable-xcache-per-domain/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=how-to-disable-xcache-per-domain</link>
		<comments>http://www.computersolutions.cn/blog/2011/11/how-to-disable-xcache-per-domain/#comments</comments>
		<pubDate>Thu, 03 Nov 2011 05:34:18 +0000</pubDate>
		<dc:creator>Lawrence Sheed</dc:creator>
				<category><![CDATA[Technical Mumbo Jumbo]]></category>
		<category><![CDATA[Useful Info]]></category>

		<guid isPermaLink="false">http://www.computersolutions.cn/blog/?p=762</guid>
		<description><![CDATA[We use xcache as a php caching mechanism on our servers. Its pretty painless for us for the most part. One of our clients did complain that their app was now crapping out. A check of the software forums for that app (ActiveCollab) showed that it was an issue with PHP5.3.2 and XCache and ActiveCollab. [...]]]></description>
			<content:encoded><![CDATA[<p>We use xcache as a php caching mechanism on our servers.<br />
Its pretty painless for us for the most part.</p>
<p>One of our clients did complain that their app was now crapping out.</p>
<p>A check of the software forums for that app (ActiveCollab) showed that it was an issue with PHP5.3.2 and XCache and ActiveCollab.<br />
So, needed to disable Xcache.</p>
<p>This should be relatively easy I thought, but the documentation sucks, so took a while to find out how.<br />
Its pretty simple to do though.</p>
<p>Assuming you&#8217;ve allowed htaccess files in apache, you can do the below -</p>
<p>Add an htaccess file in the root folder of the website with the following info</p>
<pre class="wp-code-highlight prettyprint">
php_flag xcache.cacher Off
php_flag xcache.size 0
php_flag xcache.stat Off
</pre>
<p>Thats it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.computersolutions.cn/blog/2011/11/how-to-disable-xcache-per-domain/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MODx &#8211; How to setup an Events Page using Ditto and CALx</title>
		<link>http://www.computersolutions.cn/blog/2011/10/modx-how-to-setup-an-events-page-using-ditto-and-calx/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=modx-how-to-setup-an-events-page-using-ditto-and-calx</link>
		<comments>http://www.computersolutions.cn/blog/2011/10/modx-how-to-setup-an-events-page-using-ditto-and-calx/#comments</comments>
		<pubDate>Mon, 24 Oct 2011 09:25:56 +0000</pubDate>
		<dc:creator>Lawrence Sheed</dc:creator>
				<category><![CDATA[MODx]]></category>
		<category><![CDATA[Useful Info]]></category>
		<category><![CDATA[CALx]]></category>
		<category><![CDATA[Ditto]]></category>
		<category><![CDATA[howto]]></category>

		<guid isPermaLink="false">http://www.computersolutions.cn/blog/?p=735</guid>
		<description><![CDATA[We&#8217;ve been using MODx for a number of years now for site development, and one thing that repeatedly comes up in all our sites is how to add Events. This is actually pretty easy within MODx, as you&#8217;ll see. Ditto and CALx are two plugins that make this doable. First up, I recommend you setup [...]]]></description>
			<content:encoded><![CDATA[<p>We&#8217;ve been using MODx for a number of years now for site development, and one thing that repeatedly comes up in all our sites is how to add Events.</p>
<p>This is actually pretty easy within MODx, as you&#8217;ll see.<br />
Ditto and CALx are two plugins that make this doable.</p>
<p>First up, I recommend you setup a folder for the events to be held in. I usually sit this outside of the main site tree, and set it to be not shown in the menu.</p>
<p>Lets call this the Events Folder.<br />
Heres one I made earlier that has some events inside.</p>
<p><a href="http://www.computersolutions.cn/blog/wp-content/uploads/2011/10/events_folder.jpg"><img class="alignnone size-full wp-image-736" title="events_folder" src="http://www.computersolutions.cn/blog/wp-content/uploads/2011/10/events_folder.jpg" alt="" width="265" height="173" /></a></p>
<p>Lets not get ahead of ourselves though.</p>
<p>So, now we have a folder to place stuff into.<br />
Next, we need some details for our events.</p>
<p>At a minimum, we&#8217;ll need an Event Start Date, and End Date (although to be honest, most clients don&#8217;t use that many fields).</p>
<p>So, lets setup 2 Template Variables called&#8230; EventStartDate, and EventEndDate.</p>
<p>As we&#8217;ll be using Ditto and CALx, we need to tell MODx to use UnixTime for these, so that we can sort with them later. Make a new Template Variable, set the Input Type to Date, and set the Widget to UnixTime.</p>
<p>See below for an example. (do the same for both Template Variables)</p>
<p><a href="http://www.computersolutions.cn/blog/wp-content/uploads/2011/10/eventenddate.jpg"><img class="alignnone size-medium wp-image-738" title="eventenddate" src="http://www.computersolutions.cn/blog/wp-content/uploads/2011/10/eventenddate-300x135.jpg" alt="" width="300" height="135" /></a></p>
<p>Don&#8217;t forget to make sure that both template variables are accessible in whatever templates you will be using.</p>
<p>Ok, so now we have a folder, and two template variables.<br />
Lets make some data.</p>
<p>Go to the Events folder you created, right click, and Create New Resource Here.<br />
You should see the two template variables we created listed in the page. Set them to something appropriate.</p>
<p><a href="http://www.computersolutions.cn/blog/wp-content/uploads/2011/10/template_var_values.jpg"><img class="alignnone size-full wp-image-739" title="template_var_values" src="http://www.computersolutions.cn/blog/wp-content/uploads/2011/10/template_var_values.jpg" alt="" width="459" height="91" /></a></p>
<p>Save the page.<br />
Create another few entries with different dates so we&#8217;ll have something to sort by.</p>
<p>You should now have a folder, our template variables, and some sample data.<br />
At this point we&#8217;ll need to make a chunk so that we can display the output of running Ditto against our data.</p>
<p>Make a new Chunk,call it chkShowEvent, and put this inside.</p>
<pre class="wp-code-highlight prettyprint">
Title: [+title+]
Start: [+EventStartDate:date=`%d-%b-%y %H:%M`+]
End: [+EventEndDate:date=`%d-%b-%y %H:%M`+]
</pre>
<p>(You&#8217;ll note that we&#8217;re formatting the UnixTime based data automagically by using MODx&#8217;s built in formatting functions.)</p>
<p>Neat huh.</p>
<p>Ok, so now we have almost all our details together.<br />
All we need now is to create some code to show off the data.</p>
<p>If you recall way back to the top of this page, we setup a Start Date and an End Date.<br />
Our Start Date is called EventStartDate.</p>
<p>Lets make some code to show off a single event using Ditto.</p>
<pre class="wp-code-highlight prettyprint">[!Ditto? &amp;amp;startID=`4` &amp;amp;tpl=`chkShowEvent` &amp;amp;displayArchive=`0` &amp;amp;multiLevel=`1` &amp;amp;paginate=`0` &amp;amp;paginateAlwaysShowLinks=`0` &amp;amp;orderBy=`EventStartDate ASC` &amp;amp;extenders=`summary,dateFilter` &amp;amp;dateSource=`EventStartDate` &amp;amp;summarize=`1` &amp;amp;dateFormat=`%d. %b. %y` &amp;amp;filter=`EventStartDate,@EVAL return strtotime(&quot;now&quot;);,3`!]</pre>
<p>Looks complicated, doesn&#8217;t it!.<br />
Actually not that bad, what we&#8217;re doing is telling Ditto to give us one single result, ordered by date.<br />
We then tell Ditto to filter out anything thats older than the current time/date.<br />
This gives us one single result &#8211; our most recent upcoming event.</p>
<p>IMPORTANT &#8211; The StartID needs to be the same one that YOU are using. Make sure that your folder number and the Ditto call number match. My folder ID is 4, so I&#8217;m using 4. You&#8217;ll need to use whatever number shows in your MODx.</p>
<p>Ah, I hear you say, but how do I show more than one upcoming event?<br />
Easy peasy. We&#8217;ll also need to add a little piece of code for the pagination underneath our Ditto call, so don&#8217;t forget to do that.</p>
<p>This Ditto call will show you a listing of upcoming events in date order (past events won&#8217;t be displayed)</p>
<pre class="wp-code-highlight prettyprint">[!Ditto? &amp;amp;startID=`4`&amp;amp;tpl=`events` &amp;amp;showInMenuOnly=`1` &amp;amp;displayArchive=`0` &amp;amp;multiLevel=`1` &amp;amp;paginate=`1` &amp;amp;paginateAlwaysShowLinks=`1` &amp;amp;orderBy=`EventStartDate ASC` &amp;amp;extenders=`summary,dateFilter` &amp;amp;dateSource=`EventStartDate` &amp;amp;summarize=`5` &amp;amp;dateFormat=`%d. %b. %y` &amp;amp;filter=`EventStartDate,@EVAL return strtotime(&quot;now&quot;);,3`!]

[+previous+] [+pages+] [+next+]</pre>
<p>Again, remember to make sure that startID is the one YOU are using.</p>
<p>Ok, so thats pretty straightforward. Where does CALx come in?<br />
Well, most of the time, people want a Calendar as well as an events listing.</p>
<p>As we&#8217;ve created the EventStartDate and EventEndDate as UnixTime, CALx doesn&#8217;t need any special help.</p>
<p>Here&#8217;s a sample call using the fields we&#8217;ve made</p>
<pre class="wp-code-highlight prettyprint">[!CALx? &amp;amp;getFolder=`4` &amp;amp;idMultiEvent=`4` &amp;amp;lang=`english` &amp;amp;useTV=`true` &amp;amp;dateStartTVName=`EventStartDate` &amp;amp;dateEndTVName=`EventEndDate` &amp;amp;showOtherMonth=`both` &amp;amp;getTypeProcess=`createCal` &amp;amp;popupType=`3`!]</pre>
<p>This will show a calendar for the current month on the page its used on, and list the events for that month. Again, make sure that the folder id that YOU need is used &#8211; change getFolder=`4` to your folder ID.</p>
<p>Read up on CAlx, and Ditto at the MODx site for a rundown on the various parameters used.<br />
This should give you an idea of how to setup and use them though.</p>
<p>Good luck.</p>
<p>Feel free to ask questions.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.computersolutions.cn/blog/2011/10/modx-how-to-setup-an-events-page-using-ditto-and-calx/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Repairing a Nespresso Cube (Krups XN5005)</title>
		<link>http://www.computersolutions.cn/blog/2011/09/repairing-a-nespresso-cube-krups-xn5005/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=repairing-a-nespresso-cube-krups-xn5005</link>
		<comments>http://www.computersolutions.cn/blog/2011/09/repairing-a-nespresso-cube-krups-xn5005/#comments</comments>
		<pubDate>Sat, 24 Sep 2011 06:35:17 +0000</pubDate>
		<dc:creator>Lawrence Sheed</dc:creator>
				<category><![CDATA[Useful Info]]></category>
		<category><![CDATA[coffee]]></category>
		<category><![CDATA[cube]]></category>
		<category><![CDATA[disassembly]]></category>
		<category><![CDATA[krups]]></category>
		<category><![CDATA[nespresso]]></category>

		<guid isPermaLink="false">http://www.computersolutions.cn/blog/?p=726</guid>
		<description><![CDATA[My coffee machine decided it would give up the ghost a while ago (due to lack of use I think). I tried descaling, but that wasn&#8217;t working, and from what I could see (or hear in my case) happening looked like something simple had happened &#8211; one of the hoses had come off or wasn&#8217;t [...]]]></description>
			<content:encoded><![CDATA[<p>My coffee machine decided it would give up the ghost a while ago (due to lack of use I think).</p>
<p>I tried descaling, but that wasn&#8217;t working, and from what I could see (or hear in my case) happening looked like something simple had happened &#8211; one of the hoses had come off or wasn&#8217;t completely on, as not enough water was coming through the front, and the bottom had a small leak.</p>
<p>As I have successfully fixed other coffee machines in the past with similar issues, I thought I&#8217;d have a go at repairing mine.</p>
<p>First up was a quick google for my machine (Krups Cube XN5005) &#8211; unfortunately most of the posts were of people with similar issues, and no help.<br />
I brought the machine to the office and took a closer look.  First issue is that it uses security oval style screws on some of the parts.  Thats a pain in the ass, as its hard to find the exact screwdriver.</p>
<p>I drove off to the local tools market and did some shopping around, but no luck, so I bought a selection of needle nosed pliers instead.<br />
There is zero reason to use security screws unless you&#8217;re trying to piss off the consumer.  If I&#8217;ve bought something I should be able to take it apart myself and repair it.</p>
<p>I also managed to find the Nespresso service manual for it (<a href='http://www.computersolutions.cn/blog/wp-content/uploads/2011/09/Krups-Cube-Nespresso-Service-Manual-xn5005-manual.pdf'>Krups Cube Nespresso Service Manual &#8211; xn5005 manual</a>).  While the external design is nice, the engineering is a bit crappy.  If they weren&#8217;t trying to overcomplicate the design to keep the consumer out it would be a lot simpler.  Sigh.</p>
<p>First to come off is the front chromed plastic part.   Push both sides in and pull off.  </p>
<p><a href="http://www.flickr.com/photos/sheedl/6176745623/" title="Untitled by sheedl, on Flickr"><img src="http://farm7.static.flickr.com/6169/6176745623_1b3a6c070a.jpg" width="500" height="374" alt=""></a></p>
<p>I managed to get one side off, then the other.  Once you see how it clips on its fairly easy to get off. </p>
<p><a href="http://www.flickr.com/photos/sheedl/6177274452/" title="Untitled by sheedl, on Flickr"><img src="http://farm7.static.flickr.com/6180/6177274452_2f27a2a301.jpg" width="500" height="374" alt=""></a></p>
<p>With that off, unclip the next plastic part on the nozzle.</p>
<p><a href="http://www.flickr.com/photos/sheedl/6177274940/" title="Untitled by sheedl, on Flickr"><img src="http://farm7.static.flickr.com/6164/6177274940_e451b53e23.jpg" width="500" height="374" alt=""></a></p>
<p>Next up is to remove the front faceplate.<br />
Flip the unit upside down, then get 2 flat screwdrivers and put into both of the entry slots at the bottom. Twist slightly and it should come off.  If you have trouble, do one side first, then the other.  I usually get a credit card into the gap I make when I twist the screwdriver so that its easier to do.</p>
<p><a href="http://www.flickr.com/photos/sheedl/6176747831/" title="Untitled by sheedl, on Flickr"><img src="http://farm7.static.flickr.com/6173/6176747831_76b4964fbf.jpg" width="500" height="374" alt=""></a></p>
<p>The top should come straight off without too much hassle once you have the evil clips off at the bottom.</p>
<p><a href="http://www.flickr.com/photos/sheedl/6177275764/" title="Untitled by sheedl, on Flickr"><img src="http://farm7.static.flickr.com/6155/6177275764_2ebf9a58ae.jpg" width="500" height="374" alt=""></a></p>
<p>Next up is the back panel, with the security screws. As I couldn&#8217;t find the exact screwdriver, I bought a selection of pliers and they came out fairly easily.</p>
<p><a href="http://www.flickr.com/photos/sheedl/6177276542/" title="Untitled by sheedl, on Flickr"><img src="http://farm7.static.flickr.com/6153/6177276542_c36b015467.jpg" width="500" height="374" alt=""></a></p>
<p>In case anyone can find them, the diameter is a 4mm oval shape.</p>
<p><a href="http://www.flickr.com/photos/sheedl/6177276806/" title="Untitled by sheedl, on Flickr"><img src="http://farm7.static.flickr.com/6164/6177276806_bed9e81c2a.jpg" width="374" height="500" alt=""></a></p>
<p>I basically sat and twisted gently to get the screws out.</p>
<p><a href="http://www.flickr.com/photos/sheedl/6176748577/" title="Untitled by sheedl, on Flickr"><img src="http://farm7.static.flickr.com/6171/6176748577_572c94a514.jpg" width="374" height="500" alt=""></a></p>
<p><a href="http://www.flickr.com/photos/sheedl/6177277454/" title="Untitled by sheedl, on Flickr"><img src="http://farm7.static.flickr.com/6180/6177277454_41575cc0bc.jpg" width="374" height="500" alt=""></a></p>
<p>You need to remove the 3 at the back, and the two front ones at the bottom (closest to the back), for a total of 5 screws.</p>
<p><a href="http://www.flickr.com/photos/sheedl/6177278234/" title="Untitled by sheedl, on Flickr"><img src="http://farm7.static.flickr.com/6168/6177278234_7a91611861.jpg" width="374" height="500" alt=""></a></p>
<p>Once those five screws are out, the back can come off.  Its a bit fiddly, as it didn&#8217;t want to budge much on the water tank side, but perseverance paid off.</p>
<p><a href="http://www.flickr.com/photos/sheedl/6176750501/" title="Untitled by sheedl, on Flickr"><img src="http://farm7.static.flickr.com/6178/6176750501_d780e45f27.jpg" width="500" height="374" alt=""></a></p>
<p>Once you have the back off, the machine is reasonably accessible.</p>
<p><a href="http://www.flickr.com/photos/sheedl/6176750775/" title="Untitled by sheedl, on Flickr"><img src="http://farm7.static.flickr.com/6172/6176750775_db8b4289c5.jpg" width="500" height="374" alt=""></a></p>
<p>In my case, I just had to reseat one of the hoses, and retest.<br />
The manual does give further instructions on how to get more of it disassembled from there, but thats as far as I needed to go.</p>
<p>While I was in there I gave it a bit of a clean also.<br />
Compared to the other machine I have (a Saeco fully automatic), this is slightly better designed, but less serviceable.  It still has the issue of electrics and water routing in the same area&#8217;s, which is silly, as that could be a failure/hazard point, but its safer than some i&#8217;ve seen.</p>
<p>Hopefully mine will now continue to give a few more years of service!.</p>
<p>If you need parts for them, this site appears to have some &#8211; </p>
<p><a href="http://www.buyspares.co.uk/krups/coffee-makers/xn5005-white/catalogue.pl?shop=krups&#038;path=561166&#038;model_ref=781507">http://www.buyspares.co.uk/krups/coffee-makers/xn5005-white/catalogue.pl?shop=krups&#038;path=561166&#038;model_ref=781507</a></p>
<p>And of course after I finish this post, I find someone else doing similar things here -<br />
<a href="http://www.maultech.com/chrislott/blog/20100627_nespresso.html">http://www.maultech.com/chrislott/blog/20100627_nespresso.html</a></p>
<p>Oh well..</p>
<p>Good luck!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.computersolutions.cn/blog/2011/09/repairing-a-nespresso-cube-krups-xn5005/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Train Safety</title>
		<link>http://www.computersolutions.cn/blog/2011/07/train-safety/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=train-safety</link>
		<comments>http://www.computersolutions.cn/blog/2011/07/train-safety/#comments</comments>
		<pubDate>Sun, 24 Jul 2011 06:37:50 +0000</pubDate>
		<dc:creator>Lawrence Sheed</dc:creator>
				<category><![CDATA[China Related]]></category>
		<category><![CDATA[General Talk]]></category>
		<category><![CDATA[atc]]></category>
		<category><![CDATA[crash]]></category>
		<category><![CDATA[ertms]]></category>
		<category><![CDATA[ptc]]></category>
		<category><![CDATA[safety systems]]></category>
		<category><![CDATA[train]]></category>
		<category><![CDATA[wenzhou]]></category>

		<guid isPermaLink="false">http://www.computersolutions.cn/blog/?p=717</guid>
		<description><![CDATA[The recent accident in Wenzhou has highlighted some of the issues that are present in train systems today. The facts &#8211; One high-speed rail train D301 from Beijing was headed for Fuzhou, this train was followed by train D3115 from Hangzhou to Fuzhou. At 20:34 or so, the train D3115 was hit by thunder, subsequently [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.computersolutions.cn/blog/wp-content/uploads/2011/07/r-CHINA-BULLET-TRAIN-large570.jpg"><img src="http://www.computersolutions.cn/blog/wp-content/uploads/2011/07/r-CHINA-BULLET-TRAIN-large570.jpg" alt="" title="r-CHINA-BULLET-TRAIN-large570" width="570" height="238" class="alignright size-full wp-image-723" /></a></p>
<p>The recent accident in Wenzhou has highlighted some of the issues that are present in train systems today.</p>
<p>The facts &#8211; </p>
<blockquote><p>
One high-speed rail train D301 from Beijing was headed for Fuzhou, this train was followed by train D3115 from Hangzhou to Fuzhou. At 20:34 or so, the train D3115 was hit by thunder, subsequently lost power and stopped.<br />
Train D301 did not, and crashed into train D3115.<br />
Two cars from train D3115 as well as four cars from D301 derailed, some falling off of a bridge.</p>
<p>The trains are from different manufacturers &#8211;<br />
D301 &#8211;  CRH1 (Bombardier Regina, Swedish)<br />
D3115 &#8211; CRH2 (Shinkansen E2, Japanese)
</p></blockquote>
<p><span id="more-717"></span><br />
First &#8211; a quick overview of technology.</p>
<p>The 2 trains used come from different design ethos &#8211;<br />
The Japanese design trains to travel fast, and light.  The trains are fuel efficient.<br />
They don&#8217;t design for crash safety, as the Japanese train system is designed explicitly with the idea that no train can crash into another;  signalling and train positioning systems are used to ensure this.<br />
This has been quite successful in Japan, and other countries where Japans system can be implemented.<br />
This does mean that in the event of a collision, Japanese trains are more prone to derailment, as can be seen in this instance.</p>
<p>The Europeans design trains based on the idea that crashes or derailments happen.<br />
This is mainly historical due to the mixture of systems in place throughout the European network, and track size, grade plus other issues not present in other rail systems.<br />
This means european trains are heavier, require more power/fuel to run, but that derailment occurs less.  European &#8216;safety&#8217; standards (more on this later) ensure that European trains can withstand much higher impacts<br />
than a Japanese train can.</p>
<p>In this case, the heavier European train crashed into the lighter Japanese train, and caused a derailment, with cars falling off the viaduct.</p>
<p>As far as I can tell, the news reports state that the driver of the D301 train manually activated braking, but it was too late to prevent the accident.</p>
<p>What could have been done to prevent this tragedy?</p>
<p>Lets take another look at the Japanese ethos &#8211; don&#8217;t crash.</p>
<p>The Japanese have an enviable safety record for their train systems, and for good reason, they track their trains carefully.  Tracking doesn&#8217;t save lives though, stopping does.  In most systems signals tell drivers to stop in case of emergency, but humans are fallable, and after some bad accidents due to human error in the 60&#8242;s, they took the human out of equation, and introduced automated stopping systems to avoid issues due to human error (ATS)</p>
<p>In the train industry there are two main implementations for arranging train movement &#8211; Moving Block, and Fixed block.</p>
<p>These both use similar idea&#8217;s &#8211; that two trains cannot occupy the same track at a given time.<br />
To do this, they use signal systems on track to tell the driver to slow down or stop as appropriate.<br />
This method of visual signaling has been around since the beginning of trains, and automated systems date back to the 1800&#8242;s.</p>
<p>Fixed block signaling works by breaking track into segments.  If a train is on segment B, then a train in segment A cannot proceed until the other train has moved onto segment C.</p>
<p>Moving block signaling works by adding a virtual buffer zone around a train of a few hundred meters.  If a train is on Segment B, then another train can proceed from A to B as long as the two trains are separated by the safe buffer zone difference.</p>
<p>Moving block signaling allows train companies to run trains closer together, but increases the danger risk.</p>
<p>With the invention of GPS, there is a another safety system coming into place called PTC (Positional Tracking Control)</p>
<p>With positional tracking control, each train gets fitted with a GPS device that tells relevant parties where the train is.</p>
<p>Those familiar with Onstar or other vehicle tracking systems will recognize the concept.</p>
<p>Essentially each train reports back its location to a central location, and this gets updated in some kind of tracking control system.</p>
<p><a href="http://www.computersolutions.cn/blog/wp-content/uploads/2011/07/loadBinary.aspx_.gif"><img src="http://www.computersolutions.cn/blog/wp-content/uploads/2011/07/loadBinary.aspx_.gif" alt="" title="loadBinary.aspx" width="560" height="338" class="aligncenter size-full wp-image-718" /></a></p>
<p>This can be added to existing systems to warn about crash collisions.  Positional tracking control is known as Positive Track Control in the train world (PTC).</p>
<p>Given that there are a number of safety systems in place, and some countries have been using them successfully for many years, what is in use in China?</p>
<p>China unsurprisingly, does have safety systems in place, as one would expect given the major train network here, and the amount of train traffic on those networks.  Anyone who has noted the <em>immense</em> amount of train travel during Chinese New Year will know this.</p>
<p>China has a reasonably good train safety record despite its traffic volume, so what happened here?</p>
<p>According to early reports the PTC system failed in this instance.  China uses the European PTC system, known as ERTMS. While its too early to know what exactly happened, this isn&#8217;t looking very good for the Europeans, as their system failed, and failed badly.</p>
<p>References:</p>
<p><a href="http://www.jrtr.net/jrtr21/F44_Technology.html">http://www.jrtr.net/jrtr21/F44_Technology.html</a><br />
<a href="http://www.railjournal.com/this-month/yet-more-ertms-challenges-ahead.html">http://www.railjournal.com/this-month/yet-more-ertms-challenges-ahead.html</a><br />
<a href="http://www.accessscience.com/content/Positive%20train%20control/YB110191">http://www.accessscience.com/content/Positive%20train%20control/YB110191</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.computersolutions.cn/blog/2011/07/train-safety/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

