<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-31067545</id><updated>2011-11-28T12:36:09.866+13:00</updated><category term='mobile'/><category term='linux'/><category term='hibernate'/><category term='sysadmin'/><category term='applicationservers'/><category term='javascript'/><category term='java'/><category term='security'/><category term='interoperability'/><category term='memory'/><category term='osx'/><category term='networking'/><category term='telecoms'/><category term='databases'/><category term='regex'/><category term='shellscripts'/><category term='sql'/><category term='sound'/><category term='opensource'/><category term='python'/><category term='spring'/><category term='mac'/><category term='ssl'/><category term='nz'/><category term='eclipse'/><category term='testing'/><category term='virtualisation'/><category term='fitnesse'/><category term='hardware'/><category term='eco'/><category term='svn'/><title type='text'>Waxing Cerebral</title><subtitle type='html'>Somewhere for questions, answers, and whatever's in between...</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://waxingcerebral.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31067545/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://waxingcerebral.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Brad Milne</name><uri>http://www.blogger.com/profile/04366914158924437806</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>50</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-31067545.post-7588868775730138778</id><published>2011-03-29T11:57:00.003+13:00</published><updated>2011-03-29T12:08:13.176+13:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='eclipse'/><category scheme='http://www.blogger.com/atom/ns#' term='svn'/><title type='text'>simple svn project repository migration steps</title><content type='html'>Migrate repositories using the &lt;a href="http://www.eclipse.org/"&gt;eclipse&lt;/a&gt; &lt;a href="http://subclipse.tigris.org/"&gt;subclipse&lt;/a&gt; plugin.&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Note&lt;/span&gt; this method will &lt;span style="font-weight: bold;"&gt;not &lt;/span&gt;bring revision history into the new repository, so assumes you will still have ongoing access to the old respository. This technique is useful if the history isn't that rich, and you want a quick switch over, or if you don't directly manage the repositories, so &lt;a href="http://svnbook.red-bean.com/nightly/en/svn.ref.svnadmin.html"&gt;svnadmin&lt;/a&gt; commands aren't available (like our case, we use a hosted &lt;a href="http://www.atlassian.com/software/jira/"&gt;JIRA&lt;/a&gt; &lt;a href="http://www.atlassian.com/hosted/studio/"&gt;solution&lt;/a&gt;).&lt;br /&gt;&lt;br /&gt;Steps:&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Create the new project top-level folder in the new repository. Eg: /NEWREPO/projectA/trunk. Using 'new remote folder' in SVN repositories view is the easiest.&lt;/li&gt;&lt;li&gt;Open the existing project in eclipse&lt;/li&gt;&lt;li&gt;Choose team&amp;gt; switch to another branch/tag/revision.&lt;/li&gt;&lt;li&gt;Choose intended top-level project folder (eg /NEWREPO/projectA/trunk). Note this folder name doesn't have to become the eclipse project name&lt;/li&gt;&lt;li&gt;team&amp;gt; revert the project to remove local changes&lt;/li&gt;&lt;li&gt;team&amp;gt; merge (Install into eclipse the fantastic &lt;a href="http://www.open.collab.net/community/integrations/articles/mergeclient.html"&gt;CollabNet Merge client&lt;/a&gt;, if haven't already)&lt;/li&gt;&lt;li&gt;Untick best-practices check and choose 'Merge range of revisions', then Next&lt;/li&gt;&lt;li&gt;Select, then under Root, browse to the exisiting project folder (original repo) (eg /OLDREPO/projectA/trunk)&lt;/li&gt;&lt;li&gt;Commit the project&lt;/li&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/31067545-7588868775730138778?l=waxingcerebral.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://waxingcerebral.blogspot.com/feeds/7588868775730138778/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=31067545&amp;postID=7588868775730138778' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31067545/posts/default/7588868775730138778'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31067545/posts/default/7588868775730138778'/><link rel='alternate' type='text/html' href='http://waxingcerebral.blogspot.com/2011/03/simple-svn-project-repository-migration.html' title='simple svn project repository migration steps'/><author><name>Brad Milne</name><uri>http://www.blogger.com/profile/04366914158924437806</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-31067545.post-5082466480128360859</id><published>2011-01-19T12:25:00.002+13:00</published><updated>2011-01-19T12:36:27.235+13:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='sysadmin'/><category scheme='http://www.blogger.com/atom/ns#' term='memory'/><title type='text'>Linux swap space - real usage</title><content type='html'>Using top, ps aux, etc etc gives all kinds of memory usage with lots of blog posts and forum questions explaining how difficult they are to understand, and how typically aren't actually that useful.&lt;br /&gt;&lt;br /&gt;As of kernel 2.6.14, &lt;span style="font-weight:bold;"&gt;smaps&lt;/span&gt; has been introduced which means each process reports its own memory usage breakdown.&lt;br /&gt;&lt;br /&gt;smaps detail for a process can be seen by:&lt;br /&gt;&lt;div class="code"&gt;sudo cat /proc/PID/smaps&lt;/div&gt; where PID is the process ID of the process you're interested in. Note you won't see any content if not the process owner or root.&lt;br /&gt;&lt;br /&gt;So, use top, find the big memory hoggers first. Then look at the smaps file for the swap usage. You can use, for example:&lt;br /&gt;&lt;div class="code"&gt;sudo grep Swap /proc/30888/smaps | cut -d" " -f 10-20 | grep -v ' 0 kB'&lt;/div&gt; where 30888 is an eg PID.&lt;br /&gt;&lt;br /&gt;For more advanced smaps analysis, try the &lt;a href="http://bmaurer.blogspot.com/2006/03/memory-usage-with-smaps.html"&gt;smaps.pl&lt;/a&gt; tool. Not sure at this stage, though, whether that tool gives separate swap values.&lt;br /&gt;&lt;br /&gt;In &lt;a href="http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=347476"&gt;Debian&lt;/a&gt; at time of this post, the &lt;a href="http://virtualthreads.blogspot.com/2006/02/understanding-memory-usage-on-linux.html"&gt;pmap&lt;/a&gt; tool has been patched to use smaps, which may then offer swap values in its output.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/31067545-5082466480128360859?l=waxingcerebral.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://waxingcerebral.blogspot.com/feeds/5082466480128360859/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=31067545&amp;postID=5082466480128360859' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31067545/posts/default/5082466480128360859'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31067545/posts/default/5082466480128360859'/><link rel='alternate' type='text/html' href='http://waxingcerebral.blogspot.com/2011/01/linux-swap-space-real-usage.html' title='Linux swap space - real usage'/><author><name>Brad Milne</name><uri>http://www.blogger.com/profile/04366914158924437806</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-31067545.post-6234395444693673023</id><published>2010-09-23T22:15:00.003+12:00</published><updated>2010-09-23T22:21:22.144+12:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='fitnesse'/><category scheme='http://www.blogger.com/atom/ns#' term='shellscripts'/><category scheme='http://www.blogger.com/atom/ns#' term='testing'/><title type='text'>fitnesse - find disabled tests</title><content type='html'>&lt;a href="http://fitnesse.org/"&gt;FitNesse&lt;/a&gt; suites can grow enormous, so managing them becomes tough. Here's a simple script to find all pages in a given suite that are not marked as either a Test or as a Suite:&lt;br /&gt;&lt;br /&gt;&lt;div class="code"&gt;&lt;br /&gt;#! /bin/bash&lt;br /&gt;&lt;br /&gt;if [ $# -eq 0 ]; then&lt;br /&gt;  echo "Shows fitnesse tests that aren't enabled as either Test or Suite"&lt;br /&gt;  echo 'Usage: ./find_disabled_tests.sh {parent_dir}'&lt;br /&gt;  echo 'Eg: ./find_disabled_tests.sh /var/local/fitnesse/FitNesseRoot/SitTests/RichTests'&lt;br /&gt;  exit 0&lt;br /&gt;fi&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;cd $1&lt;br /&gt;&lt;br /&gt;find -name properties.xml -print | xargs egrep -L '(Test/|&lt;Test&gt;true&lt;/Test&gt;|Suite/|&lt;Suite&gt;true&lt;/Suite&gt;)' | sed -e 's,/properties.xml,,'&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/31067545-6234395444693673023?l=waxingcerebral.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://waxingcerebral.blogspot.com/feeds/6234395444693673023/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=31067545&amp;postID=6234395444693673023' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31067545/posts/default/6234395444693673023'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31067545/posts/default/6234395444693673023'/><link rel='alternate' type='text/html' href='http://waxingcerebral.blogspot.com/2010/09/fitnesse-find-disabled-tests.html' title='fitnesse - find disabled tests'/><author><name>Brad Milne</name><uri>http://www.blogger.com/profile/04366914158924437806</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-31067545.post-2316009035742669417</id><published>2010-08-16T20:22:00.006+12:00</published><updated>2010-08-16T20:30:52.399+12:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='python'/><category scheme='http://www.blogger.com/atom/ns#' term='osx'/><category scheme='http://www.blogger.com/atom/ns#' term='mac'/><title type='text'>python stdio in osx launchd</title><content type='html'>Running Python scripts via &lt;a href="http://developer.apple.com/mac/library/documentation/Darwin/Reference/ManPages/man5/launchd.plist.5.html#//apple_ref/doc/man/5/launchd.plist"&gt;launchd&lt;/a&gt; doesn't seem to flush stdout print statements (ie. using the basic 'print' command). This can be confirmed by importing sys and calling sys.stdout.flush() after the print statements to see them actually output.&lt;br /&gt;&lt;br /&gt;The solution? Add the &lt;a href="http://docs.python.org/using/cmdline.html#cmdoption-u"&gt;-u&lt;/a&gt; flag to tell python not to buffer its stdio.&lt;br /&gt;&lt;br /&gt;In an OSX launchd plist file, your solution may include:&lt;br /&gt;&lt;div class="code"&gt;&lt;br /&gt;        &amp;lt;key&amp;gt;ProgramArguments&amp;lt;/key&amp;gt;&lt;br /&gt;            &amp;lt;array&amp;gt;&lt;br /&gt;                &amp;lt;string&amp;gt;/usr/bin/python&amp;lt;/string&amp;gt;&lt;br /&gt;                &amp;lt;string&amp;gt;-u&amp;lt;/string&amp;gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/31067545-2316009035742669417?l=waxingcerebral.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://waxingcerebral.blogspot.com/feeds/2316009035742669417/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=31067545&amp;postID=2316009035742669417' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31067545/posts/default/2316009035742669417'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31067545/posts/default/2316009035742669417'/><link rel='alternate' type='text/html' href='http://waxingcerebral.blogspot.com/2010/08/python-stdio-in-osx-launchd.html' title='python stdio in osx launchd'/><author><name>Brad Milne</name><uri>http://www.blogger.com/profile/04366914158924437806</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-31067545.post-3617081573015478883</id><published>2010-05-31T22:28:00.003+12:00</published><updated>2010-05-31T22:40:11.985+12:00</updated><title type='text'>use old laptop as monitor and terminal</title><content type='html'>I have just had a new Mac Mini arrive that I want to use for mostly automated and headless tasks. But I also want to use this as a home computer for my wife, but it has no screen and no mic, plus not much room on the bench where it lives to fit a keyboard and mouse. My wife has a decrepit (no battery; no harddrive) laptop she's been using, so hey, why not use that as a terminal?&lt;br /&gt;&lt;br /&gt;Laptop is running &lt;a href="http://www.puppylinux.com/"&gt;puppy linux&lt;/a&gt; (4.3.1). Great little lightweight distro. It boots off CD and uses a USB key for storage.&lt;br /&gt;  - Installed &lt;a href="http://www.murga-linux.com/puppy/viewtopic.php?t=27424"&gt;tightvnc-client&lt;/a&gt;&lt;br /&gt;Mac is running Snow Leopard&lt;br /&gt;&lt;br /&gt;So by setting up the script below as a menu option (add to ~/.jwmrc), all she has to do is click it, and the connection begins, including sending all mic input sound (via dd with /dev/dsp) through an audio cable from laptop's headphone jack to Mac's input jack, registering as input on the Mac (Skype-ho!).&lt;br /&gt;&lt;br /&gt;Beauty&lt;br /&gt;&lt;br /&gt;[caveat: I cannot be held responsible for damage to hardware caused by plugging hardware into each other. Headphone jacks are pretty low voltage though, as I understand it, and it's worked for me]&lt;br /&gt;&lt;br /&gt;&lt;div class="code"&gt;&lt;br /&gt;#!/bin/sh&lt;br /&gt;&lt;br /&gt;echo 'Hi, this is how to connect to the Mac Mini'&lt;br /&gt;echo&lt;br /&gt;echo 'Testing for network connection'&lt;br /&gt;if ping -w 2 192.168.1.1 &gt; /dev/null; then&lt;br /&gt;  echo ":)  Found the router, we're connected already"&lt;br /&gt;else&lt;br /&gt;  echo 'Here comes the Network Wizard to connect to the network. You know what to do...'&lt;br /&gt;  echo&lt;br /&gt;  echo -n 'Press enter once the network is done...'&lt;br /&gt;  net-setup.sh &gt; /dev/null 2&gt;&amp;1&lt;br /&gt;  read resp&lt;br /&gt;fi&lt;br /&gt;echo&lt;br /&gt;if ping -w 2 192.168.1.9 &gt; /dev/null; then&lt;br /&gt;  echo ":)  Mac is on, we're ready to connect"&lt;br /&gt;else&lt;br /&gt;  echo 'Check the Mac is on. Look for the little white light on the front'&lt;br /&gt;  echo -n "Press enter when happy it's on. If only just turned on then wait a minute before continuing..."&lt;br /&gt;  read resp&lt;br /&gt;fi&lt;br /&gt;echo&lt;br /&gt;if ps -ef | grep "[d]d if"; then&lt;br /&gt;  echo ':)  Sound loopback for mic already running'&lt;br /&gt;else&lt;br /&gt;  echo 'Ok, starting the sound loopback so we can send the mic to Mac'&lt;br /&gt;  dd if=/dev/dsp | dd of=/dev/dsp &amp;&lt;br /&gt;fi&lt;br /&gt;echo&lt;br /&gt;echo 'Right, about to start the connection'&lt;br /&gt;echo "Enter '***' below as the password and you're good to go!"&lt;br /&gt;echo&lt;br /&gt;&lt;br /&gt;vncviewer 192.168.1.9:5900 -fullscreen&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/31067545-3617081573015478883?l=waxingcerebral.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://waxingcerebral.blogspot.com/feeds/3617081573015478883/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=31067545&amp;postID=3617081573015478883' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31067545/posts/default/3617081573015478883'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31067545/posts/default/3617081573015478883'/><link rel='alternate' type='text/html' href='http://waxingcerebral.blogspot.com/2010/05/use-old-laptop-as-monitor-and-terminal.html' title='use old laptop as monitor and terminal'/><author><name>Brad Milne</name><uri>http://www.blogger.com/profile/04366914158924437806</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-31067545.post-3858766873182881661</id><published>2010-05-28T10:21:00.005+12:00</published><updated>2010-05-28T10:50:24.694+12:00</updated><title type='text'>command line access to hosted JIRA files</title><content type='html'>Currently I'm on a project that uses an Atlassian-hosted JIRA Studio. We put scripts and config files as wiki page (confluence) attachments, then needed to access them from remote machines via the command line, even as part of a script. JIRA has it's own security methods, not simple http auth, which would be a piece of cake. So, another solution was needed.&lt;br /&gt;&lt;br /&gt;A &lt;a href="http://confluence.atlassian.com/display/JIRACOM/Automating+JIRA+operations+via+wget"&gt;page&lt;/a&gt; in the &lt;a href="http://confluence.atlassian.com/display/JIRACOM/Home"&gt;JIRA Community Space&lt;/a&gt; describes how to do this using wget with cookies. But it didn't work for me. Whether this is because we are using the hosted variant, or due to changes since that page was written, I found we had to access a different url to log in.&lt;br /&gt;&lt;br /&gt;So here's a current working solution that firstly interactively prompts for username and password to log in and creates a cookie:&lt;br /&gt;&lt;div class="code"&gt;echo -n "username: "; read uname; echo -n "password: "; stty -echo; read pass; stty echo; wget --save-cookies ~/jira_cookie.txt \&lt;br /&gt;--post-data "os_username=$uname&amp;os_password=$pass&amp;os_cookie=true" -O /tmp/login 'http://OURDOMAIN.jira.com/rest/gadget/1.0/login'; uname=''; pass=''&lt;/div&gt;&lt;br /&gt;Replace OURDOMAIN to make the url relevant for your site. This needs to be run only once per machine, at least until the cookie expires. The cookie file will be saved in your home dir.&lt;br /&gt;&lt;br /&gt;Next, to retrieve any files, use:&lt;br /&gt;&lt;div class="code"&gt;echo -n "file url: "; read url; wget --load-cookies ~/jira_cookie.txt "$url"&lt;/div&gt;&lt;br /&gt;Again replacing OURDOMAIN. Run this for each file, pasting the full url to the file to retrieve when prompted.&lt;br /&gt;&lt;br /&gt;From these you should be able to see how to strip out the interactivity to make them scriptable, too.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/31067545-3858766873182881661?l=waxingcerebral.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://waxingcerebral.blogspot.com/feeds/3858766873182881661/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=31067545&amp;postID=3858766873182881661' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31067545/posts/default/3858766873182881661'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31067545/posts/default/3858766873182881661'/><link rel='alternate' type='text/html' href='http://waxingcerebral.blogspot.com/2010/05/command-line-access-to-hosted-jira.html' title='command line access to hosted JIRA files'/><author><name>Brad Milne</name><uri>http://www.blogger.com/profile/04366914158924437806</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-31067545.post-9130380410460867333</id><published>2009-09-10T20:31:00.004+12:00</published><updated>2009-09-10T20:44:02.878+12:00</updated><title type='text'>change svn commit comment</title><content type='html'>It happens sometimes, committing something in svn then realising the comment was wrongly for something completely different, or the main thing was missed out. Here's how to change it.&lt;br /&gt;&lt;br /&gt;If you don't have the repo configured to allow post-commit changes (&lt;a href="http://svnbook.red-bean.com/en/1.4/svn-book.html#svn.reposadmin.maint.setlog"&gt;as per&lt;/a&gt;; it is off by default), then you can easily do it on the server as admin with no config changes:&lt;br /&gt;&lt;div class="code"&gt;sudo svnadmin setlog --bypass-hooks /path/to/repo /path/to/text-file-with-new-comment.txt -r ##&lt;/div&gt;&lt;br /&gt;This command is documented in svn versions 1.4 to 1.6.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://trac.edgewall.org/"&gt;&lt;span style="font-weight: bold;"&gt;Trac&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;If Trac is being used on the project, then prompt it to re-read the repo and pick up the change by:&lt;br /&gt;&lt;div class="code"&gt;trac-admin /path/to/trac-project resync ##&lt;/div&gt;&lt;br /&gt;where ## is the revision number to resync. If it is left out then all revisions will be resynchronised.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/31067545-9130380410460867333?l=waxingcerebral.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://svnbook.red-bean.com/en/1.4/svn-book.html#svn.reposadmin.maint.setlog' title='change svn commit comment'/><link rel='replies' type='application/atom+xml' href='http://waxingcerebral.blogspot.com/feeds/9130380410460867333/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=31067545&amp;postID=9130380410460867333' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31067545/posts/default/9130380410460867333'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31067545/posts/default/9130380410460867333'/><link rel='alternate' type='text/html' href='http://waxingcerebral.blogspot.com/2009/09/change-svn-commit-comment.html' title='change svn commit comment'/><author><name>Brad Milne</name><uri>http://www.blogger.com/profile/04366914158924437806</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-31067545.post-757665816561139800</id><published>2009-05-23T21:13:00.004+12:00</published><updated>2009-05-23T21:41:18.446+12:00</updated><title type='text'>netbeans - matisse - fix invalid components</title><content type='html'>Netbeans' Matisse Swing editor is a great tool. Keeping it running is the challenge. That is, carefully ensuring that .form files are kept in sync with the .java files, and no external editing gets too trigger-happy. The other challenge, it turns out, can be when migrating to a different dev box / dev environment.&lt;br /&gt;I was getting an error when trying to open forms that had opened fine in my previous environment, and I knew they were committed to my version control.&lt;br /&gt;&lt;br /&gt;The error:&lt;br /&gt;&lt;div class="code"&gt;Error in loading component xxxx... no such property exists.&lt;/div&gt;&lt;br /&gt;And then if you carry on to view the form, in navigator you get [invalid component] instead of classnames next to those components.&lt;br /&gt;&lt;br /&gt;Infuriating when you know it should work. But I've found it to be only caused by one of 2 reasons:&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;Compile the class!&lt;/span&gt; Ensure that every one of the beans that the form is trying to load is currently compiled (do 'clean and build' on the whole project if in doubt).&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;Netbeans' JRE incompatible&lt;/span&gt; For example, my current project is in Java 6, and the projects were configured fine in Netbeans to use Java 6. However, Netbeans itself was launching in Java 5, which is fine, except that you then get the above error. It would be so easy for the Netbeans team to add this compatbility check one would think, but oh well. So, if Netbeans' JRE (tools&gt; Java Platforms) is lower than your project JRE, change Netbeans' default runtime by either (as of NB 6.5):&lt;ul&gt;&lt;li&gt; running the IDE with the --jdkhome switch on the command line&lt;/li&gt;&lt;li&gt;or by entering the path to the JDK in the netbeans_jdkhome property of your INSTALLATION_DIRECTORY/etc/netbeans.conf file.&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;&lt;br /&gt;If these don't help, check out [user directory]/var/log/messages.log (eg. for OSX, user dir is '~/.netbeans/[version]/'), and your answer should lie in an exception thrown in there.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/31067545-757665816561139800?l=waxingcerebral.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://waxingcerebral.blogspot.com/feeds/757665816561139800/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=31067545&amp;postID=757665816561139800' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31067545/posts/default/757665816561139800'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31067545/posts/default/757665816561139800'/><link rel='alternate' type='text/html' href='http://waxingcerebral.blogspot.com/2009/05/netbeans-matisse-fix-invalid-components.html' title='netbeans - matisse - fix invalid components'/><author><name>Brad Milne</name><uri>http://www.blogger.com/profile/04366914158924437806</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-31067545.post-8775164100723427495</id><published>2009-04-17T11:03:00.002+12:00</published><updated>2009-04-17T11:15:02.547+12:00</updated><title type='text'>netbeans - matisse - convert panel to form</title><content type='html'>The Swing GUI editor in NetBeans is great. It has a number of samples to build from as well, one of which is the Master/Detail template. That's an example of one that generates a JPanel, and I wanted to convert to a JFrame. Here are the steps, assuming a form named NewForm (with NetBeans 6.5):&lt;br /&gt;&lt;ol&gt;&lt;li&gt;In NewForm.java:&lt;ol&gt;&lt;li&gt;Change &lt;span class="code"&gt;extends JPanel&lt;/span&gt; to &lt;span class="code"&gt;extends JFrame&lt;/span&gt;.&lt;/li&gt;&lt;li&gt;Change the &lt;span class="code"&gt;static void main..&lt;/span&gt; method content to be:&lt;div class="code"&gt;java.awt.EventQueue.invokeLater(new Runnable() {&lt;br /&gt;   public void run() {&lt;br /&gt;    new NewForm().setVisible(true);&lt;br /&gt;   }&lt;br /&gt;  });&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;In NewForm.form (may need to edit this outside of NetBeans):&lt;ol&gt;&lt;li&gt;Change the type attribute of Form (near the top) from &lt;span class="code"&gt;type="org.netbeans.modules.form.forminfo.J&lt;span style="font-weight:bold;"&gt;Panel&lt;/span&gt;FormInfo"&lt;/span&gt; to &lt;span class="code"&gt;type="org.netbeans.modules.form.forminfo.J&lt;span style="font-weight:bold;"&gt;Frame&lt;/span&gt;FormInfo"&lt;/span&gt;.&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;In the graphical editor, select the Frame and choose the &lt;span style="font-weight:bold;"&gt;Code&lt;/span&gt; tab. Under &lt;span style="font-weight:bold;"&gt;Form Size Policy&lt;/span&gt;, change to &lt;span style="font-weight:bold;"&gt;Generate pack()&lt;/span&gt;.&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;That should be it, good to go. May need to recompile, and/or open close the form to get NetBeans to recognise the changes.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/31067545-8775164100723427495?l=waxingcerebral.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://waxingcerebral.blogspot.com/feeds/8775164100723427495/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=31067545&amp;postID=8775164100723427495' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31067545/posts/default/8775164100723427495'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31067545/posts/default/8775164100723427495'/><link rel='alternate' type='text/html' href='http://waxingcerebral.blogspot.com/2009/04/netbeans-matisse-convert-panel-to-form.html' title='netbeans - matisse - convert panel to form'/><author><name>Brad Milne</name><uri>http://www.blogger.com/profile/04366914158924437806</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-31067545.post-4220017944515085511</id><published>2009-04-09T22:10:00.002+12:00</published><updated>2009-04-09T22:22:59.956+12:00</updated><title type='text'>checkpoint secureclient for mac</title><content type='html'>It's great that CheckPoint has a &lt;a href="http://www.checkpoint.com/downloads/quicklinks/downloads_sr.html"&gt;SecureClient for the Mac&lt;/a&gt;. It works really well. What doesn't work, is making it stop.&lt;br /&gt;&lt;br /&gt;There is no way to prevent it booting at startup. Oh, there are ways referred to by &lt;a href="https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&amp;amp;solutionid=sk30181"&gt;CheckPoint's docs&lt;/a&gt;, but as they say in the fine print, that just stops the gui from starting - any security policies (read: complete firewall lockdown) will still be in place. And if you do have the gui up and choose 'Stop VPN-1 SecureClient', again it's only the gui that goes, and you go mad like me having lost your svn, http, etc server, not knowing why. There are ways to control it via the command line which you could script, but your admins have to have allowed it to allow that via some centralised settings at their end.&lt;br /&gt;&lt;br /&gt;So, if you do need SC, always launch the gui. If you need access to services on that box, then always choose 'Tools&gt;Disable Security Policy' in SC. And if you don't need it anymore, then say goodbye to it, like I'm about to do.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/31067545-4220017944515085511?l=waxingcerebral.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://waxingcerebral.blogspot.com/feeds/4220017944515085511/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=31067545&amp;postID=4220017944515085511' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31067545/posts/default/4220017944515085511'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31067545/posts/default/4220017944515085511'/><link rel='alternate' type='text/html' href='http://waxingcerebral.blogspot.com/2009/04/checkpoint-secureclient-for-mac.html' title='checkpoint secureclient for mac'/><author><name>Brad Milne</name><uri>http://www.blogger.com/profile/04366914158924437806</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-31067545.post-8135183016265665368</id><published>2009-04-07T16:29:00.005+12:00</published><updated>2009-04-07T22:01:45.634+12:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='eclipse'/><category scheme='http://www.blogger.com/atom/ns#' term='regex'/><title type='text'>use eclipse to autowrap an object</title><content type='html'>I'm sure there's a better design methodology to do this, but I have an issue in Java where the &lt;a href="http://www.postgresql.org/"&gt;PostgreSQL&lt;/a&gt; &lt;a href="http://jdbc.postgresql.org/index.html"&gt;JDBC driver&lt;/a&gt; &lt;a href="http://jdbc.postgresql.org/todo.html"&gt;can't execute createBlob()&lt;/a&gt; (in JDBC3 spec), so I want to overwrite its &lt;a href="http://java.sun.com/javase/6/docs/api/java/sql/Connection.html"&gt;Connection&lt;/a&gt;. I can't subclass it, as it's returned from the call &lt;span class="code"&gt;DriverManager.getConnection(...)&lt;/span&gt;. So what I need to do is use the Wrapper design pattern, aka Decorator, aka Delegator. Oh wouldn't it be great to use &lt;a href="http://waxingcerebral.blogspot.com/2008/07/interface-fulfillment-using-fields-java.html"&gt;via&lt;/a&gt;? But alas, until my cry is heard, or someone corrects me, the solution is to:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Create a new class that also implements Connection.&lt;/li&gt;&lt;li&gt;Use this class to wrap the obtained PostgreSQLConnection&lt;/li&gt;&lt;li&gt;Painstakingly implement each and every method in Connection to pass through to the wrapped connection, except for the methods I want to meddle with.&lt;/li&gt;&lt;li&gt;Pass out of my Connection-obtainer class, not the raw Connection, but my new wrapper.&lt;/li&gt;&lt;li&gt;Accept resignedly that when the Connection interface changes, my Connection wrapper will now not fulfil the new interface and will break. Really good reason for &lt;a href="http://waxingcerebral.blogspot.com/2008/07/interface-fulfillment-using-fields-java.html"&gt;via&lt;/a&gt;.&lt;/li&gt;&lt;/ol&gt;So enough whinging. In Eclipse, it is just a matter of creating a new class, and implementing Connection. If the methods didn't appear then the class name will have an error; Ctrl+1 on this gives the option 'Add unimplemented methods'. And there they will be, all 50 of them (rough count), ready to type this.connection.blah() in each. But hey, Eclipse can do &lt;a href="http://dev.eclipse.org/newslists/news.eclipse.tools.jdt/msg18280.html"&gt;multiline regex finds&lt;/a&gt;, and we can use regular expressions in the find and replace, so....&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;To fix all wrapped method calls that return a value:&lt;/span&gt;&lt;br /&gt;In the new class, Ctrl-F to bring up the find/replace dialog. Make sure 'Wrap search' and 'Regular expression' are ticked, and 'Scope' is 'All', then copy and paste into Find:&lt;br /&gt;&lt;div class="code"&gt;(?s)[^\n]*(public (?!class)[^\n]* (\S*\([^\)]*\))[^\{]*\{)[^\}]*return[^\}]*}&lt;/div&gt;&lt;br /&gt;This searches for any lines having the word &lt;span style="font-style: italic;"&gt;public&lt;/span&gt;, not followed by &lt;span style="font-style: italic;"&gt;class&lt;/span&gt;, and having a &lt;span style="font-style: italic;"&gt;return&lt;/span&gt; statement.&lt;br /&gt;Hit Find a few times to validate it's matching correctly.&lt;br /&gt;&lt;br /&gt;Now, in Replace:&lt;br /&gt;&lt;div class="code"&gt;\1\nreturn this.&lt;span style="font-style: italic;"&gt;myWrappedFieldName&lt;/span&gt;.\2;\n}&lt;/div&gt;&lt;br /&gt;Takes the first match (\1) and appends the method call (\2) to the field name.&lt;br /&gt;&lt;br /&gt;Click 'Replace All' to see it happen.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;To fix the remaining method calls with no return value (ie void)&lt;/span&gt;&lt;br /&gt;In Find:&lt;br /&gt;&lt;div class="code"&gt;(?m).*(public void (\S*\([^\n]*\)).*\{)[^\}]*}&lt;/div&gt;&lt;br /&gt;Now, in Replace:&lt;br /&gt;&lt;div class="code"&gt;\1\nthis.&lt;span style="font-style: italic;"&gt;myWrappedFieldName&lt;/span&gt;.\2;\n}&lt;/div&gt;&lt;br /&gt;And 'Replace All' again.&lt;br /&gt;&lt;br /&gt;As yet the above regex statements don't remove parameter types from the calling statements, so you will have to go through and remove them, but that should be relatively little work.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/31067545-8135183016265665368?l=waxingcerebral.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://waxingcerebral.blogspot.com/feeds/8135183016265665368/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=31067545&amp;postID=8135183016265665368' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31067545/posts/default/8135183016265665368'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31067545/posts/default/8135183016265665368'/><link rel='alternate' type='text/html' href='http://waxingcerebral.blogspot.com/2009/04/use-eclipse-to-autowrap-object.html' title='use eclipse to autowrap an object'/><author><name>Brad Milne</name><uri>http://www.blogger.com/profile/04366914158924437806</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-31067545.post-2030995171855822654</id><published>2009-03-19T09:11:00.003+13:00</published><updated>2009-03-19T09:32:20.688+13:00</updated><title type='text'>SQuirreL SQL</title><content type='html'>For a long time I have been looking for an open source database management tool that would be able to access any &lt;a href="http://java.sun.com/javase/technologies/database/"&gt;JDBC&lt;/a&gt; compliant database. I've used the great Oracle product, &lt;a href="http://www.oracle.com/technology/products/database/sql_developer/index.html"&gt;SQLDeveloper&lt;/a&gt;, for a long time and found it great for SQL Server management (usually performing quicker than using Microsoft's own Management Studio!). But now I've started using &lt;a href="http://db.apache.org/derby/"&gt;Derby&lt;/a&gt; (aka JavaDB aka Cloudscape) and SQLDeveloper is limited to Oracle, SQL Server, and MySQL.&lt;br /&gt;&lt;br /&gt;Step in &lt;a href="http://www.squirrelsql.org/"&gt;SQuirreL SQL&lt;/a&gt;. It has a pretty smooth interface, with great features like SQL syntax highlighting and even code completion. Released under the &lt;a href="http://www.gnu.org/licenses/licenses.html#LGPL"&gt;LGPL&lt;/a&gt; license, it is open source and contributions are welcomed, particularly for plugins. The plugins are important as JDBC is obviously a restricted subset of a database's functionality - a number of the existing plugins enable extra features for specific database types (eg. Derby's triggers).&lt;br /&gt;&lt;br /&gt;Another very notable plugin is called &lt;span style="font-style:italic;"&gt;graph&lt;/span&gt; which enables production of simple entity relationship diagrams (&lt;a href="http://en.wikipedia.org/wiki/Entity-relationship_model"&gt;ERD&lt;/a&gt;) from a database connection. While it doesn't display multiplicity indicators, and some of the image exporting is a bit clunky, it is great to have this functionality in an open source product. (I now use &lt;a href="http://www.netbeans.org/features/uml/index.html"&gt;NetBeans' UML Modeling&lt;/a&gt; which is great for the common UML diagrams, but lacking ERDs).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/31067545-2030995171855822654?l=waxingcerebral.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://www.squirrelsql.org/' title='SQuirreL SQL'/><link rel='replies' type='application/atom+xml' href='http://waxingcerebral.blogspot.com/feeds/2030995171855822654/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=31067545&amp;postID=2030995171855822654' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31067545/posts/default/2030995171855822654'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31067545/posts/default/2030995171855822654'/><link rel='alternate' type='text/html' href='http://waxingcerebral.blogspot.com/2009/03/squirrel-sql.html' title='SQuirreL SQL'/><author><name>Brad Milne</name><uri>http://www.blogger.com/profile/04366914158924437806</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-31067545.post-8506703233824333858</id><published>2009-02-08T20:08:00.012+13:00</published><updated>2009-10-03T11:47:40.034+13:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ssl'/><category scheme='http://www.blogger.com/atom/ns#' term='security'/><category scheme='http://www.blogger.com/atom/ns#' term='mac'/><category scheme='http://www.blogger.com/atom/ns#' term='svn'/><title type='text'>secure svn server on osx tiger</title><content type='html'>My notes to help remember the processes to get a secure svn server using Apache 2 on OS X Tiger. I know these are documented in lots of places, but it seemed that parts of various HowTos were required in order to do it with current Apache (2.2) and with Tiger. For anyone with Leopard onwards, you can skip the installation of Apache2 as this is now standard from Leopard on (Tiger and earlier used Apache 1.3 and earlier) and &lt;a href="http://sonzea.com/articles/subversion-trac.html"&gt;here&lt;/a&gt; is probably your best bet.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Edit:&lt;/span&gt; I drafted this a year ago and never finished (or published) it. Now the server has reverted back to apache1.3 after an update and my ssl cert had expired - time to revive the post! Unfortunately I didn't capture all the steps, especially the setting up of mods-enabled etc, but I'll just use my install as reference. Ask if you need those bits. Meantime, &lt;a href="http://www.linux.com/archive/articles/47733"&gt;this link&lt;/a&gt; may be helpful. Brad.&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Edit 2&lt;/span&gt; (16/4/2009): It did it again. If svn access starts to fail, log in to a directory-displaying page or any page that gives the apache http server version - if it says 1.3 then it's reverted back from 2.0 (alternatively, if &lt;span class="code"&gt;ls -l /usr/sbin/apachectl&lt;/span&gt; shows a single file rather than a symlink to /sw/sbin directory, that also is an indicator it's reverted). Easy fix is (after stopping 'Personal Web Sharing' in System Prefs): &lt;span class="code"&gt;sudo ln -sf /sw/sbin/apache2ctl /usr/sbin/apachectl&lt;/span&gt; as below. Then start web sharing again; should now be 2.0 running.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-size:130%;" &gt;Installing Apache httpd 2&lt;br /&gt;&lt;span style="font-size:100%;"&gt;1. Apache2 Installation&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;The bulk of this guide comes from Tim Fanelli's great &lt;a href="http://www.timfanelli.com/item/5"&gt;howto&lt;/a&gt; (just the Fink, Apache2, Subversion, and WebDav steps for now). If you don't have XCode Tools installed prior to this, you can get them &lt;a href="http://developer.apple.com/tools/xcode/"&gt;here&lt;/a&gt; (requires free registration). Extra notes to the sections in Tim's guide follow:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Apache2: At the end of this section you can start up Apache2. Be sure to shut down the 1.3 WebServer first via the Sharing panel of SysPrefs, if it is running. You should then be able to view the Apache2 welcome screen by browsing to http://localhost. You probably won't be able to access this from another machine yet though (even within LAN) as the Mac's firewall won't be allowing it. We'll get to that later.&lt;/li&gt;&lt;li&gt;Subversion: If you will be carrying this on to use svn, you might as well do this and the WebDAV steps now. You'll need svn-ssl, but may not require svn-client-ssl. I didn't install it.&lt;/li&gt;&lt;/ul&gt;That's all we need from that blog for setting up the Apache2 server&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;2. Apache2 Configuration&lt;/span&gt;&lt;br /&gt;Next we'll configure Apache2 to be handled by the Sharing panel of SysPrefs, instead of old 1.3.&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;cd /usr/sbin&lt;/li&gt;&lt;li&gt;mv apachectl apachectl1.3 {–&gt; This renames default apache1.3/apachectl command}&lt;/li&gt;&lt;li&gt;ln -s /sw/sbin/apache2ctl apachectl {–&gt; This creates symlink for Apache2/apachectl command}&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;Edit /sw/etc/apache2/apache2.conf:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Change the pidfile location to:&lt;br&gt;&lt;br /&gt;&lt;div class="code"&gt;/private/var/run/httpd.pid&lt;/div&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;In order to easily view logs from Console, and to get free log rotation, change the ErrorLog parameter to:&lt;br&gt;&lt;br /&gt;&lt;div class="code"&gt;/var/log/httpd/error_log&lt;/div&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;And add a new entry:&lt;br&gt;&lt;br /&gt;&lt;div class="code"&gt;CustomLog /var/log/httpd/access_log common&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:100%;"&gt;3. SSL Certificate&lt;/span&gt;&lt;br /&gt;Go back to Tim's &lt;a href="http://www.timfanelli.com/item/5"&gt;post&lt;/a&gt; and the SSL step. You'll want to follow the link and generate the certificate &lt;span style="font-weight: bold;"&gt;Important: Ensure you create a CommonName attribute in the certificate. If it is missing then many svn clients will fail to access the site.&lt;/span&gt; After doing that though, a couple of the commands given back in the main howto are wrong. Change sudo cp ~/server.key /sw/etc/apache2/ssl.key/ to sudo cp ~/sslcert/server.key /sw/etc/apache2/ssl.key/ and the same for .crt.&lt;br /&gt;&lt;br /&gt;&lt;div style="border: thin solid black"&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Edit&lt;/span&gt; (13/5/2009): Looks like Tim's blog is having some technical issues. Here are the ssl certificate creation and installation steps:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;cd /tmp&lt;/li&gt;&lt;li&gt;openssl genrsa -des3 -out server.key      {generates the key}&lt;/li&gt;&lt;li&gt;openssl req -new -key server.key -out server.csr   {generates a certificate-signing request (CSR; holds the information about the certificate) using the created key}&lt;/li&gt;&lt;li&gt;openssl x509 -req [-days 365] server.csr -signkey server.key -out server.crt   {generates the certificate, with information in the CSR, using our key. The bit in the square brackets is optional, and is if you want the certificate to expire.}&lt;/li&gt;&lt;li&gt;sudo mv server.key /sw/etc/apache2/ssl.key/&lt;/li&gt;&lt;li&gt;sudo mv server.crt /sw/etc/apache2/ssl.crt/&lt;/li&gt;&lt;li&gt;sudo chmod 0400 /sw/etc/apache2/ssl.key/  {if server won't start later, try also: sudo chmod u+xw on this path}&lt;br /&gt;&lt;/li&gt;&lt;li&gt;sudo chmod 0400 /sw/etc/apache2/ssl.crt/&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;For better security, don't do the decryption suggested. However, for&lt;br /&gt;pragmatism and to be able to control the server via the SysPrefs, just&lt;br /&gt;do it :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/31067545-8506703233824333858?l=waxingcerebral.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://waxingcerebral.blogspot.com/feeds/8506703233824333858/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=31067545&amp;postID=8506703233824333858' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31067545/posts/default/8506703233824333858'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31067545/posts/default/8506703233824333858'/><link rel='alternate' type='text/html' href='http://waxingcerebral.blogspot.com/2007/12/secure-svn-server-on-osx-tiger-part-1.html' title='secure svn server on osx tiger'/><author><name>Brad Milne</name><uri>http://www.blogger.com/profile/04366914158924437806</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-31067545.post-491799370565229610</id><published>2009-01-25T15:32:00.001+13:00</published><updated>2009-04-03T13:20:15.123+13:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sql'/><category scheme='http://www.blogger.com/atom/ns#' term='databases'/><title type='text'>mysql quick reference</title><content type='html'>Launch mysqld (server) on Linux (if not already running):&lt;br /&gt;sudo /etc/init.d/mysql start&lt;br /&gt;&lt;br /&gt;Connect to server [specific database]:&lt;br /&gt;mysql [-h host] -u user -p [dbname to use]&lt;br /&gt;&lt;br /&gt;Use the SHOW statement to find out what databases currently exist on the server:&lt;br /&gt;mysql&gt; SHOW DATABASES;&lt;br /&gt;&lt;br /&gt;Pick one:&lt;br /&gt;mysql&gt; USE dbname&lt;br /&gt;&lt;br /&gt;Create new one:&lt;br /&gt;mysql&gt; CREATE DATABASE dbname;&lt;br /&gt;&lt;br /&gt;List tables:&lt;br /&gt;mysql&gt; SHOW TABLES;&lt;br /&gt;&lt;br /&gt;Create table:&lt;br /&gt;mysql&gt; CREATE TABLE pet (name VARCHAR(20), owner VARCHAR(20),&lt;br /&gt;    -&gt; species VARCHAR(20), sex CHAR(1), birth DATE, death DATE);&lt;br /&gt;&lt;br /&gt;List tables columns:&lt;br /&gt;mysql&gt; DESCRIBE tablename;&lt;br /&gt;&lt;br /&gt;Generate schema:&lt;br /&gt;mysql&gt; SHOW CREATE TABLE tablename;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/31067545-491799370565229610?l=waxingcerebral.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://waxingcerebral.blogspot.com/feeds/491799370565229610/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=31067545&amp;postID=491799370565229610' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31067545/posts/default/491799370565229610'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31067545/posts/default/491799370565229610'/><link rel='alternate' type='text/html' href='http://waxingcerebral.blogspot.com/2009/01/mysql-quick-reference.html' title='mysql quick reference'/><author><name>Brad Milne</name><uri>http://www.blogger.com/profile/04366914158924437806</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-31067545.post-4461660225185201713</id><published>2009-01-13T14:37:00.008+13:00</published><updated>2010-09-23T22:28:31.382+12:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='applicationservers'/><category scheme='http://www.blogger.com/atom/ns#' term='spring'/><title type='text'>use jndi with spring to access external properties file</title><content type='html'>On the surface, external configuration files in a JEE environment provide a simple mechanism to store environment-specific data, but they can be a pain to access. How to access it when file system access isn't allowed? Since it's outside the classpath, where is the file in each environment? If I'm using Spring, how do I access this movable file?&lt;br /&gt;&lt;br /&gt;The best solution I've found is to use &lt;a href="http://en.wikipedia.org/wiki/Java_Naming_and_Directory_Interface"&gt;jndi&lt;/a&gt; resources. The following is a solution using Websphere (6) and Spring (2.01).&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Step 1: Configure the jndi reference for Websphere&lt;/span&gt;&lt;br /&gt;This step was based on information from IBM's page "&lt;a href="http://www.ibm.com/developerworks/websphere/library/techarticles/0502_botzum/0502_botzum.html"&gt;&lt;span style="font-size:100%;"&gt;Using URL resources to manage J2EE property files in IBM WebSphere Application Server V5&lt;/span&gt;&lt;/a&gt;", steps A and B. Websphere Studio isn't required, however, so briefly:&lt;br /&gt;a) Navigate to Resources &gt; URL &gt; URLs and create a new URL. Make up a JNDI name starting with "url/". In 'specification', enter the path to the properties file as a URI, eg. "file:///E:/project.properties". So now Websphere has a URL Resource pointing to the properties file for this environment.&lt;br /&gt;b) In the code, edit web.xml. Configure a new resource-ref as shown in IBM's &lt;a href="http://www.ibm.com/developerworks/websphere/library/techarticles/0502_botzum/0502_botzum_images/fig6.gif"&gt;figure 6&lt;/a&gt;.  'res-ref-name' is the jndi name we set up in a). Then in ibm-web-bnd.xmi, add a new resRefBindings as shown in IBM's &lt;a href="http://www.ibm.com/developerworks/websphere/library/techarticles/0502_botzum/0502_botzum_images/fig7.gif"&gt;figure 7&lt;/a&gt;.&lt;br /&gt;That completes the configuration of Websphere and the jndi configuration in the code.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Step 2: Next Spring needs to be able to load the properties file by looking up the jndi location.&lt;/span&gt;&lt;br /&gt;c) I'll assume that you want the properties file to be set as a property on a class 'pkg.MyClass'. To do this, we use a PropertyFactoryBean to convert from properties file to Properties class. The PropertyFactoryBean takes a Resource as location property, so we create a UrlResource bean for this, with the java.net.Url as constructor argument. This java.net.Url is the result of using a JndiObjectFactoryBean to look up the jndi name and return the Url object. The following bean config shows these conversions:&lt;br /&gt;&lt;div class=""&gt;&lt;br /&gt;&amp;lt;bean class="myclass"&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;lt;property name="props"&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;lt;!-- Load from the .properties file--&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;lt;bean class="org.springframework.beans.factory.config.PropertiesFactoryBean"&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;property name="location"&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;!-- Generate a UrlResource from the java.net.Url --&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;bean class="org.springframework.core.io.UrlResource"&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;constructor-arg&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;!-- use jndi to look up the location of the parameters.properties file --&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;bean class="org.springframework.jndi.JndiObjectFactoryBean"&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;property name="jndiName" value="java:comp/env/url/analysisParametersURL" /&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/bean&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/constructor-arg&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/bean&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/property&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;lt;/bean&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;lt;/property&amp;gt;&lt;br /&gt;&amp;lt;/bean&amp;gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;And that's it. In summary, Spring looks up a jndi URL reference to a properties file, configured in the JEE server. Spring beans are created that convert the URL to a URLResource to a Properties object, available for injection into your custom class.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/31067545-4461660225185201713?l=waxingcerebral.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://waxingcerebral.blogspot.com/feeds/4461660225185201713/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=31067545&amp;postID=4461660225185201713' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31067545/posts/default/4461660225185201713'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31067545/posts/default/4461660225185201713'/><link rel='alternate' type='text/html' href='http://waxingcerebral.blogspot.com/2009/01/use-jndi-with-spring-to-access-external.html' title='use jndi with spring to access external properties file'/><author><name>Brad Milne</name><uri>http://www.blogger.com/profile/04366914158924437806</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-31067545.post-3065409258093924744</id><published>2008-10-26T07:30:00.003+13:00</published><updated>2008-10-26T07:49:12.241+13:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='mobile'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='nz'/><category scheme='http://www.blogger.com/atom/ns#' term='telecoms'/><category scheme='http://www.blogger.com/atom/ns#' term='networking'/><title type='text'>mobile phone as modem</title><content type='html'>There are a number of posts around the place on getting gprs or 3g cellphone connections working on linux. I wasn't interested in bluetooth as I have limited batteries and a usb cable. And you don't always know what your locla settings should be.&lt;br /&gt;&lt;br /&gt;Here's all I did on Xubuntu Hardy:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Plug the phone into the computer using the usb cable.&lt;/li&gt;&lt;li&gt;In a terminal, type "sudo wvdialconf". (This sets up available baud rates, etc)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;In a terminal, type "sudo vi /etc/wvdial.conf".&lt;/li&gt;&lt;li&gt;Edit this file with:&lt;/li&gt;&lt;li&gt;phone = [for my nokia on Vodafone New Zealand, the number is "*99#". I phoned them to find out.]&lt;/li&gt;&lt;li&gt;name = [the login name, &lt;span style="font-style: italic;"&gt;if&lt;/span&gt; your mobile company requires it. Vfone NZ doesn't, but wvdial needed something here. I used "name"].&lt;/li&gt;&lt;li&gt;password = [as with name. I used "password"].&lt;/li&gt;&lt;li&gt;Save and close the file.&lt;/li&gt;&lt;li&gt;Connect to the internet via your mobile by typing "wvdial" in a terminal window.&lt;/li&gt;&lt;li&gt;When done, press ctrl-c in that window.&lt;/li&gt;&lt;/ol&gt;So easy and so great!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/31067545-3065409258093924744?l=waxingcerebral.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://waxingcerebral.blogspot.com/feeds/3065409258093924744/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=31067545&amp;postID=3065409258093924744' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31067545/posts/default/3065409258093924744'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31067545/posts/default/3065409258093924744'/><link rel='alternate' type='text/html' href='http://waxingcerebral.blogspot.com/2008/10/mobile-phone-as-modem.html' title='mobile phone as modem'/><author><name>Brad Milne</name><uri>http://www.blogger.com/profile/04366914158924437806</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-31067545.post-2913733448413612779</id><published>2008-10-09T13:03:00.003+13:00</published><updated>2008-10-09T13:08:54.025+13:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><title type='text'>java modulus for floating point numbers</title><content type='html'>The java modulus (or remainder) operator (%) &lt;a href="http://mindprod.com/jgloss/modulus.html"&gt;truncates instead of rounds&lt;/a&gt; with floating point numbers (ie float, double), so the solution is to use &lt;a href="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/StrictMath.html#IEEEremainder%28double,%20double%29"&gt;Math.IEEEremainder&lt;/a&gt; instead. It's fine to use % for ints.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/31067545-2913733448413612779?l=waxingcerebral.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://waxingcerebral.blogspot.com/feeds/2913733448413612779/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=31067545&amp;postID=2913733448413612779' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31067545/posts/default/2913733448413612779'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31067545/posts/default/2913733448413612779'/><link rel='alternate' type='text/html' href='http://waxingcerebral.blogspot.com/2008/10/java-modulus-for-floating-point-numbers.html' title='java modulus for floating point numbers'/><author><name>Brad Milne</name><uri>http://www.blogger.com/profile/04366914158924437806</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-31067545.post-7474541804290924975</id><published>2008-09-29T13:55:00.008+13:00</published><updated>2009-01-25T14:21:08.742+13:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='opensource'/><title type='text'>linux tools</title><content type='html'>What I use on xubuntu linux for specific tasks:....&lt;br /&gt;&lt;br /&gt;&lt;table class="mytable"&gt;&lt;br /&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Task&lt;/th&gt;&lt;th&gt;Tool&lt;/th&gt;&lt;th&gt;Date&lt;/th&gt;&lt;th&gt;Ubuntu Package&lt;/th&gt;&lt;th&gt;Comment&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;br /&gt;&lt;tbody&gt;&lt;br /&gt;&lt;tr&gt;&lt;td&gt;pdf annotating&lt;/td&gt;&lt;td&gt;&lt;a href="http://www.ecademix.com/JohannesHofmann/flpsed.html"&gt;flpsed&lt;/a&gt;&lt;/td&gt;&lt;td&gt;Sep 2008&lt;/td&gt;&lt;td&gt;flpsed&lt;/td&gt;&lt;td class="leftcell"&gt;Very basic app that enables load/save of ps and pdf. Multi-line text can be added to the docs. No highlighting option or editing of existing content.&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;br /&gt;&lt;tr&gt;&lt;td&gt;pdf editing&lt;/td&gt;&lt;td&gt;&lt;a href="http://sourceforge.net/projects/pdfedit"&gt;pdfedit&lt;/a&gt;&lt;/td&gt;&lt;td&gt;Sep 2008&lt;/td&gt;&lt;td&gt;pdfedit&lt;/td&gt;&lt;td class="leftcell"&gt;Allows editing of any part of multi-page PDF documents. Can be very slow to use on long documents. New content such as highlighting and single-line text can be added also.&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;br /&gt;&lt;tr&gt;&lt;td&gt;vector graphics / single-page pdf annotating&lt;/td&gt;&lt;td&gt;&lt;a href="http://www.inkscape.org/"&gt;inkscape&lt;/a&gt;&lt;/td&gt;&lt;td&gt;Sep 2008&lt;/td&gt;&lt;td&gt;inkscape&lt;/td&gt;&lt;td class="leftcell"&gt;Great tool for vector graphics, quick and easy results. Can import a single page of PDF documents.&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;br /&gt;&lt;tr&gt;&lt;td&gt;xml viewing / formatting&lt;/td&gt;&lt;td&gt;&lt;a href="http://sourceforge.net/projects/xml-copy-editor/"&gt;XML Copy Editor&lt;/a&gt;&lt;/td&gt;&lt;td&gt;Sep 2008&lt;/td&gt;&lt;td&gt;xmlcopyeditor&lt;/td&gt;&lt;td class="leftcell"&gt;Load and view xml. Validate form and against dtd etc, plus nicely format. Quick and easy.&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;br /&gt;&lt;tr&gt;&lt;td&gt;diff&lt;/td&gt;&lt;td&gt;&lt;a href="http://meld.sourceforge.net/"&gt;meld&lt;/a&gt;&lt;/td&gt;&lt;td&gt;Sep 2008&lt;/td&gt;&lt;td&gt;meld&lt;/td&gt;&lt;td class="leftcell"&gt;Excellent visual diff/merge tool.&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;br /&gt;&lt;tr&gt;&lt;td&gt;text/source editor&lt;/td&gt;&lt;td&gt;&lt;a href="http://www.scintilla.org/SciTE.html"&gt;SciTE&lt;/a&gt;&lt;/td&gt;&lt;td&gt;Sep 2008&lt;/td&gt;&lt;td&gt;SciTE&lt;/td&gt;&lt;td class="leftcell"&gt;Excellent text editor with awareness of many languages and markups. Tabbed view.&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;/tbody&gt;&lt;br /&gt;&lt;/table&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/31067545-7474541804290924975?l=waxingcerebral.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://waxingcerebral.blogspot.com/feeds/7474541804290924975/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=31067545&amp;postID=7474541804290924975' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31067545/posts/default/7474541804290924975'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31067545/posts/default/7474541804290924975'/><link rel='alternate' type='text/html' href='http://waxingcerebral.blogspot.com/2008/09/linux-tools.html' title='linux tools'/><author><name>Brad Milne</name><uri>http://www.blogger.com/profile/04366914158924437806</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-31067545.post-4471404148100950465</id><published>2008-09-24T15:02:00.005+12:00</published><updated>2008-12-11T15:23:37.342+13:00</updated><title type='text'>sql where not with nulls</title><content type='html'>Ah ha! Sound confusing? Why yes it is.&lt;br /&gt;&lt;br /&gt;Turns out that SQL (and &lt;a href="http://www.hibernate.org/hib_docs/core/reference/en/html/queryhql.html"&gt;HQL&lt;/a&gt; for that matter) don't allow regular operators to run against a null field. Fair enough, it means:&lt;br /&gt;&lt;div class="code"&gt;SELECT * FROM myTable WHERE id=6&lt;/div&gt;&lt;br /&gt;will evaluate to false if the id is null, so rows with null values won't be returned. Ok.&lt;br /&gt;&lt;br /&gt;However, where it gets tricky is in NOT clauses, which also won't return if the value is null. If an operator (other than &lt;span style="font-weight: bold;"&gt;is null or is not null&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;/span&gt;) is used on a null field, SQL evaluates it to null, which the where clause in turn evaluates to false. So...&lt;br /&gt;&lt;div class="code"&gt;SELECT * FROM myTable WHERE NOT id=6&lt;/div&gt;&lt;br /&gt;will return rows where id is: 1, 2, 3, 4, 5, 7, 8 etc...&lt;br /&gt;but NOT where id is: 6 or null&lt;br /&gt;&lt;br /&gt;The way around it? If the field you are 'NOT' selecting on can be null, then you must include a 'is null' OR match:&lt;br /&gt;&lt;div class="code"&gt;SELECT * FROM myTable WHERE (NOT id=6 OR id is null)&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/31067545-4471404148100950465?l=waxingcerebral.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://archives.postgresql.org/pgsql-sql/1999-07/msg00142.php' title='sql where not with nulls'/><link rel='replies' type='application/atom+xml' href='http://waxingcerebral.blogspot.com/feeds/4471404148100950465/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=31067545&amp;postID=4471404148100950465' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31067545/posts/default/4471404148100950465'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31067545/posts/default/4471404148100950465'/><link rel='alternate' type='text/html' href='http://waxingcerebral.blogspot.com/2008/09/sql-where-not-with-nulls.html' title='sql where not with nulls'/><author><name>Brad Milne</name><uri>http://www.blogger.com/profile/04366914158924437806</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-31067545.post-5424563794619414287</id><published>2008-09-20T17:37:00.014+12:00</published><updated>2008-09-20T19:09:03.758+12:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><title type='text'>javascript scripting tricks</title><content type='html'>I often write little javascript scripts to get a job done on the web, and usually using &lt;a href="https://addons.mozilla.org/firefox/addon/748"&gt;greasemonkey&lt;/a&gt;. So, to keep track of the little useful tidbits that I tend to forget cos I use them so infrequently, I'll keep this post updated with them as I remember/come across them.&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Adding elements to html&lt;/h4&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;b&gt;&lt;a href="http://www.java2s.com/Code/JavaScript/HTML/Addingcellstoatablerow.htm"&gt;Adding a cell to a table row&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;var row=document.getElementById('myTable').rows[0]; //or however you find the row&lt;br /&gt;var mycell=row.insertCell(2); //0-based index of the insertion position&lt;br /&gt;mycell.innerHTML="NEW CELL";  //raw html content of the cell&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;h4&gt;Working with greasemonkey&lt;/h4&gt;&lt;br /&gt;Greasemonkey differs from writing a script that loads with the page, as actions that you define don't implicitly have access to the functions within the greasemonkey script. So setting up things like onclick won't work. My solution to this used to be to add a script element (defining my functions) to the page using addelement. While this worked, it was very messy and hard to maintain. Here's a much better solution, which involves using an event listener rather than just defining onclick (for example).&lt;br /&gt;This is from &lt;a href="http://www.consumingexperience.com/2005/12/updated-multiple-word-technorati-tag.html"&gt;consuming experience&lt;/a&gt;:&lt;br /&gt;In the orignal html page&lt;br /&gt;&lt;div class="code"&gt;&amp;lt;div id="thediv"&amp;gt;...&amp;lt;/div&amp;gt;&lt;/div&gt;&lt;br /&gt;So our greasemonkey script contains&lt;br /&gt;&lt;div class="code"&gt;document.getElementById('thediv').addEventListener('click', myFunction, true);&lt;/div&gt;&lt;br /&gt;and then anywhere in the greasemonkey script we can define myFunction&lt;br /&gt;&lt;div class="code"&gt;function myFunction() {doStuff();...}&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/31067545-5424563794619414287?l=waxingcerebral.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://waxingcerebral.blogspot.com/feeds/5424563794619414287/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=31067545&amp;postID=5424563794619414287' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31067545/posts/default/5424563794619414287'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31067545/posts/default/5424563794619414287'/><link rel='alternate' type='text/html' href='http://waxingcerebral.blogspot.com/2008/09/javascript-scripting-tricks.html' title='javascript scripting tricks'/><author><name>Brad Milne</name><uri>http://www.blogger.com/profile/04366914158924437806</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-31067545.post-1631921900859035605</id><published>2008-08-26T20:27:00.002+12:00</published><updated>2008-08-26T20:37:17.905+12:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='eco'/><title type='text'>1 million people in a self-sustained bubble</title><content type='html'>Inhabitat has an article about a new concept from a Dubai environmental design firm, touted as a completely green, self-sustained mega-structure that could house a million people. A big leap from what we can comprehend right now, but could this be the way of the future, particularly for the developing world?&lt;br /&gt;&lt;br /&gt;Wow&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/31067545-1631921900859035605?l=waxingcerebral.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://www.inhabitat.com/2008/08/25/ziggurat-dubai-carbon-neutral-pyramid-will-house-1-million/' title='1 million people in a self-sustained bubble'/><link rel='replies' type='application/atom+xml' href='http://waxingcerebral.blogspot.com/feeds/1631921900859035605/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=31067545&amp;postID=1631921900859035605' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31067545/posts/default/1631921900859035605'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31067545/posts/default/1631921900859035605'/><link rel='alternate' type='text/html' href='http://waxingcerebral.blogspot.com/2008/08/1-million-people-in-self-sustained.html' title='1 million people in a self-sustained bubble'/><author><name>Brad Milne</name><uri>http://www.blogger.com/profile/04366914158924437806</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-31067545.post-4926264388647714914</id><published>2008-07-11T20:12:00.013+12:00</published><updated>2008-08-05T22:26:25.989+12:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><title type='text'>interface fulfillment using fields - a java language proposition - part 2 of 2</title><content type='html'>I'm proposing a new keyword in Java class definitions, &lt;span class="javakeyword"&gt;via&lt;/span&gt;. It essentially provides a methodology to simply and maintainably perform automatic delegation of interface methods to member fields. &lt;a href="http://waxingcerebral.blogspot.com/2008/07/interface-fulfillment-using-fields-java.html"&gt;Part one&lt;/a&gt; introduced the concept, while part two will delve into more of the finer points.&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Inheritance model integrity&lt;/h4&gt;&lt;br /&gt;The integrity of the inheritance model is maintained, as a class using &lt;span class="javakeyword"&gt;via&lt;/span&gt; can also subclass another class, eg:&lt;br /&gt;&lt;div class="code"&gt;public class Laptop extends Computer implements Chargeable &lt;span class="javakeyword"&gt;via&lt;/span&gt; this.internalBattery&lt;/div&gt;&lt;br /&gt;And this class can even be subclassed itself:&lt;br /&gt;&lt;div class="code"&gt;public class MacBook extends Laptop&lt;/div&gt;&lt;br /&gt;As seen in &lt;a href="http://waxingcerebral.blogspot.com/2008/07/interface-fulfillment-using-fields-java.html"&gt;Part one&lt;/a&gt;, the classes compile to a traditional POJO so inheritance is not adversely affected. Of course any class can only &lt;emph&gt;extend&lt;/emph&gt; one class, but&lt;br /&gt;&lt;span class="javakeyword"&gt;via&lt;/span&gt; can wrap many classes.&lt;br /&gt;&lt;br /&gt;An illustration: If obj.method() is invoked and Obj uses &lt;span class="javakeyword"&gt;via&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;an implementation of method() defined by Obj is looked for first.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;If not found, then tries Obj.super.method() and so on up to Object.method() when not found.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;If not found in the object's hierarchy up to and including Object then its implemented interfaces are searched (and the method invoked on the corresponding field).&lt;/li&gt;&lt;br /&gt;&lt;li&gt;If Obj's interfaces don't define it then work up the inheritance tree again, checking for any interfaces fulfilled with &lt;span class="javakeyword"&gt;via&lt;/span&gt;.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;In the situation where two or more interfaces are mapped with &lt;span class="javakeyword"&gt;via&lt;/span&gt; in the same class and define the same method, obviously the JVM wouldn't know which field to invoke the method on. In this case a compiler error will be thrown. The solution is to explicitly override the method in Obj.&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;IOC and DI&lt;/h4&gt;&lt;br /&gt;What about the &lt;a href="http://martinfowler.com/articles/injection.html"&gt;IOC&lt;/a&gt; pattern? As far as I see it, &lt;span class="javakeyword"&gt;via&lt;/span&gt; is an awesome tool to use with IOC patterns, such as the &lt;a href="http://springframework.org"&gt;Spring Framework&lt;/a&gt;. The idea with the IOC pattern (or &lt;i&gt;Dependency Injection (DI)&lt;/i&gt;) is that any implementation class that fulfils the required interface can be swapped in at runtime. As far as I know DI can't be used to inject in a class to be subclassed, as the inheritance is defined as the subclassing of a given concrete class. As we saw in &lt;a href="http://waxingcerebral.blogspot.com/2008/07/interface-fulfillment-using-fields-java.html"&gt;Part one&lt;/a&gt;, &lt;span class="javakeyword"&gt;via&lt;/span&gt; basically lets us subclass interfaces. This means that a given interface can have our extra functionality or handling (using &lt;span class="javakeyword"&gt;via&lt;/span&gt;), but that interface can be any class, it's just whatever the IOC container passes in. Very cool.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Multi-class interface fulfilment&lt;/h4&gt;&lt;br /&gt;&lt;a href="http://waxingcerebral.blogspot.com/2008/07/interface-fulfillment-using-fields-java.html"&gt;Part one&lt;/a&gt; mentioned the idea of fulfilling an interface by the combining of two or more classes. The problem this is trying to solve is basically that to implement one interface method might require the help of a number of private methods. This then encourages splitting up interfaces so that the implementation classes don't suffer from unreadability and complexity. The problem this creates is that the exposed interfaces then increase in number and each is more basic than it need be.&lt;br /&gt;The idea is that an interface can be defined with as many methods as the pure design requires, without concern about the resulting complexity of any implementors. Using &lt;span class="javakeyword"&gt;via&lt;/span&gt;, a single class can implement an interface and define a number of implementation classes that combine to fulfil it. Here's a full example:&lt;br /&gt;&lt;div class="code"&gt;// first two package-visible interfaces&lt;br /&gt;interface PackageIface1 {&lt;br /&gt;  void setName(String name);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;interface PackageIface2 {&lt;br /&gt;  void setNumber(int number);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;// now the public interface that combines them&lt;br /&gt;public interface PublicIface extends PackageIface1, PackageIface2 {}&lt;br /&gt;&lt;br /&gt;// the implemetation classes (package-visible)&lt;br /&gt;class PackageClass1 implements PackageIface1 {&lt;br /&gt;  public void setName(String name) {...}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;class PackageClass2 implements PackageIface2 {&lt;br /&gt;  public void setNumber(int number) {...}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;// and the integration class that brings them all together&lt;br /&gt;public class PublicClass implements PublicIface &lt;span class="javakeyword"&gt;via&lt;/span&gt; this.pkgIface1Obj &amp; this.pkgIface2Obj {&lt;br /&gt;  // class just defines the two fields and constructor(s)&lt;br /&gt;}&lt;/div&gt;&lt;br /&gt;(Note: The '&amp;' symbol is arbitrarily chosen and could be anything that makes sense and is acheivable).&lt;br /&gt;So the PublicIface is the only interface that needs to be exposed publicly. The PublicClass will be a fixed implementation to use. Discrete functionality subsets of PublicIface can be changed by swapping in a different implementation of PackageIface1 or PackageIface2 that get passed to PublicClass's constructor. And there is no limit to the number of classes that can be used to fulfil the main interface, provided that each one exclusively implements an interface that is extended by the main interface.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;I may be way off track, but I dreamed this up when coming across the same problem for the tenth time in an enterprise Java project using Spring, and it just seems to fit. It may be that there are techniques or patterns out there that mean I can do all this already, or just that I should be slapped for suggesting such things. All feedback welcome.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/31067545-4926264388647714914?l=waxingcerebral.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://waxingcerebral.blogspot.com/feeds/4926264388647714914/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=31067545&amp;postID=4926264388647714914' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31067545/posts/default/4926264388647714914'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31067545/posts/default/4926264388647714914'/><link rel='alternate' type='text/html' href='http://waxingcerebral.blogspot.com/2008/07/interface-fulfillment-using-fields-java_11.html' title='interface fulfillment using fields - a java language proposition - part 2 of 2'/><author><name>Brad Milne</name><uri>http://www.blogger.com/profile/04366914158924437806</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-31067545.post-6577719354307820072</id><published>2008-07-11T08:17:00.021+12:00</published><updated>2008-08-05T21:59:22.607+12:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><title type='text'>interface fulfillment using fields - a java language proposition - part 1 of 2</title><content type='html'>I'm proposing a new keyword in Java class definitions, &lt;span class="javakeyword"&gt;via&lt;/span&gt;. It essentially provides a methodology to simply and maintainably perform automatic delegation of interface methods to member fields.&lt;br /&gt;&lt;br /&gt;This provides:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Encouragement for coding to interfaces over inheritance&lt;/li&gt;&lt;li&gt;Object wrappers that do not need to subclass the wrapped object, yet still expose the wrapped object's methods directly (exposed as 'is-a' rather than having to manually delegate because of 'has-a')&lt;/li&gt;&lt;li&gt;Can 'swap out' the effective superclass (like subclassing an interface, not a class)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Advantages of multiple-inheritance&lt;/li&gt;&lt;li&gt;and potentially: Interface fulfillment by combining two or more classes&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;Here's an example of what it might look like:&lt;br /&gt;&lt;div class="code"&gt;public class Car implements Driveable &lt;span class="javakeyword"&gt;via&lt;/span&gt; this.vehicle {&lt;/div&gt;&lt;br /&gt;Which says, I have a class, Car, which implements the interface Driveable. Car as an object definition may not fulfill all (or any) of the requirements for Driveable, but via its field 'vehicle', the contract is met.&lt;br /&gt;&lt;br /&gt;And the code for Car might look like:&lt;br /&gt;&lt;div class="code"&gt;{&lt;br /&gt;private Driveable vehicle;&lt;br /&gt;&lt;br /&gt;public Car() {&lt;br /&gt;this.vehicle = new DefaultCar();&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public void doCarStuff() {...}&lt;br /&gt;}&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;So we can see here that the requirements for the Driveable interface can be met by anything that can be assigned to the 'vehicle' field. In this case a new instance of DefaultCar. As with any class, Car can also define any other additional members as well (e.g. doCarStuff()), enriching the functionality of DefaultCar (as subclassing would). It is essentially a methodology for automatic and type-safe delegation. But we gain nothing in this example, we may as well just extend the DefaultCar class. To get the advantages we need to make some changes...&lt;br /&gt;&lt;div class="code"&gt;{&lt;br /&gt;private Driveable vehicle;&lt;br /&gt;&lt;br /&gt;public Car() {&lt;br /&gt;this.vehicle = new DefaultCar();&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public Car(Driveable driveableClass) {&lt;br /&gt;this.vehicle = driveableClass;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public void doCarStuff() {...}&lt;br /&gt;}&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;In this way Car's new functionality can enrich &lt;span style="font-style: italic;"&gt;any&lt;/span&gt; implementation of Driveable. At runtime we can instantiate different instances of Car, each of which could have a unique implementation of Driveable. Swapping in different driveableClass objects could be useful for endowing different classes with the same extra features. Also for testing, Mocks or test doubles can be passed to the constructor so that only the added features are under test.&lt;br /&gt;&lt;br /&gt;In this example Car could also override any of the Driveable methods, as with traditional class inheritance. More on overriding in &lt;a href="http://waxingcerebral.blogspot.com/2008/07/interface-fulfillment-using-fields-java_11.html"&gt;Part two&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Under the hood&lt;/h4&gt;&lt;br /&gt;So how is it working? I imagine the compiler would generate bytecode representing the code below. You could write this yourself, but it would be messy and require duplication.&lt;br /&gt;Firstly an example of the Driveable interface:&lt;br /&gt;&lt;div class="code"&gt;public interface Driveable {&lt;br /&gt;&lt;br /&gt;void setSpeed(int speed);&lt;br /&gt;&lt;br /&gt;boolean isMoving();&lt;br /&gt;}&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Then the effective resulting code (ie the developer wouldn't see it written like this):&lt;br /&gt;&lt;div class="code"&gt;public class Car implements Driveable &lt;span class="javakeyword"&gt;via&lt;/span&gt; this.vehicle {&lt;br /&gt;private Driveable vehicle;&lt;br /&gt;&lt;br /&gt;public Car() {&lt;br /&gt;this.vehicle = new DefaultCar();&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public Car(Driveable driveableClass) {&lt;br /&gt;this.vehicle = driveableClass;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public void doCarStuff() {...}&lt;br /&gt;&lt;br /&gt;//delegation&lt;br /&gt;public void setSpeed(int speed) {&lt;br /&gt;  this.vehicle.setSpeed(speed);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;//delegation&lt;br /&gt;public boolean isMoving() {&lt;br /&gt;  return this.vehicle.isMoving();&lt;br /&gt;}&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Multiple inheritance&lt;/h4&gt;&lt;br /&gt;While some debate the merits of multiple inheritance, this is often imitated by subclassing and using an inner class that has subclassed also. The &lt;span class="javakeyword"&gt;via&lt;/span&gt; keyword, however, allows us to do this directly.&lt;br /&gt;&lt;div class="code"&gt;public class Car implements Driveable &lt;span class="javakeyword"&gt;via&lt;/span&gt; this.vehicle,&lt;br /&gt;  Runnable &lt;span class="javakeyword"&gt;via&lt;/span&gt; this.runner {&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;The construct would not break existing Java inheritance relationships, as a class can both extend a class as well as use interface fulfillment via fields, and a class that uses that construct can itself be subclassed.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;More to follow...&lt;/h4&gt;&lt;br /&gt;More benefits and some finer points will follow in &lt;a href="http://waxingcerebral.blogspot.com/2008/07/interface-fulfillment-using-fields-java_11.html"&gt;Part 2&lt;/a&gt;, including benefit [5] hinted at earlier...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/31067545-6577719354307820072?l=waxingcerebral.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://waxingcerebral.blogspot.com/feeds/6577719354307820072/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=31067545&amp;postID=6577719354307820072' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31067545/posts/default/6577719354307820072'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31067545/posts/default/6577719354307820072'/><link rel='alternate' type='text/html' href='http://waxingcerebral.blogspot.com/2008/07/interface-fulfillment-using-fields-java.html' title='interface fulfillment using fields - a java language proposition - part 1 of 2'/><author><name>Brad Milne</name><uri>http://www.blogger.com/profile/04366914158924437806</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-31067545.post-2505554803335629455</id><published>2008-07-09T09:10:00.002+12:00</published><updated>2008-07-09T09:25:26.517+12:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sound'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><title type='text'>debug sound in linux - first steps!!</title><content type='html'>My sound stopped after having worked for 6 months. I hadn't run any updates, and even tried booting into previous kernels to check, but that didn't help. Finally I discovered the answer, but not thanks to internet searching. Here are the requirements:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;If you are running linux&lt;/li&gt;&lt;li&gt;If you have Windows on another partition you can dual boot into&lt;/li&gt;&lt;li&gt;If sound works ok in Windows&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;and here is the first 2 steps:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Check for a hardware mute switch and/or volume control on the machine (especially laptops) - this will affect Windows as well, so if it's &lt;span style="font-style: italic;"&gt;currently&lt;/span&gt; working there then this won't be the problem&lt;/li&gt;&lt;li&gt;Boot into Windows. &lt;span style="font-weight: bold;"&gt;Unmute the sound&lt;/span&gt;. Try linux again&lt;/li&gt;&lt;/ol&gt;So that was my problem. I had muted sound whilst in Windows, not realising that Windows can hardware-mute the sound card, something that linux doesn't have control over. So when re-booting into linux, it thought it was playing sound fine, but I could hear nada. Hope this helps someone :)&lt;br /&gt;&lt;br /&gt;The silver-lining in this exercise in frustration was fixing my &lt;a href="http://www.videolan.org/vlc/"&gt;VLC&lt;/a&gt; performance. I had noticed for a few weeks that music and movies played in VLC would be silent for the first 10s or so. Running VLC in terminal gave complaints about pulseaudio not found.&lt;br /&gt;Solution here for me was to go into the VLC preferences&gt; Output Modules and check the box for advanced options. Change 'Audio Output Module' from default to 'ALSA audio output'.&lt;br /&gt;The alternative option would be to install &lt;a href="http://www.pulseaudio.org/"&gt;pulseaudio&lt;/a&gt; (sudo aptitude install pulseaudio). It &lt;a href="https://wiki.ubuntu.com/PulseAudio"&gt;seems&lt;/a&gt; pulseaudio is the new default sound server in Ubuntu and provides more advanced sound functionality, particularly when it comes to combining sounds, so this may be the best chouce.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/31067545-2505554803335629455?l=waxingcerebral.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://waxingcerebral.blogspot.com/feeds/2505554803335629455/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=31067545&amp;postID=2505554803335629455' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31067545/posts/default/2505554803335629455'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31067545/posts/default/2505554803335629455'/><link rel='alternate' type='text/html' href='http://waxingcerebral.blogspot.com/2008/07/debug-sound-in-linux-first-steps.html' title='debug sound in linux - first steps!!'/><author><name>Brad Milne</name><uri>http://www.blogger.com/profile/04366914158924437806</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-31067545.post-5810109806882348770</id><published>2008-06-11T13:21:00.003+12:00</published><updated>2008-06-27T09:43:28.877+12:00</updated><title type='text'>greasemonkey for ff3rc1</title><content type='html'>Use greasemonkey and the latest firefox 3 releases as they come out? Well greasemonkey was only compatible up to ff3b5, but you can get a version (supposedly production-ready) from this link. Phew!&lt;br /&gt;&lt;br /&gt;EDIT: Not required now as firefox3 is officially &lt;a href="http://www.mozilla.com/en-US/firefox/"&gt;released&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/31067545-5810109806882348770?l=waxingcerebral.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://arantius.info/gm/greasemonkey-0.8.20080505.0.xpi' title='greasemonkey for ff3rc1'/><link rel='replies' type='application/atom+xml' href='http://waxingcerebral.blogspot.com/feeds/5810109806882348770/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=31067545&amp;postID=5810109806882348770' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31067545/posts/default/5810109806882348770'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31067545/posts/default/5810109806882348770'/><link rel='alternate' type='text/html' href='http://waxingcerebral.blogspot.com/2008/06/greasemonkey-for-ff3rc1.html' title='greasemonkey for ff3rc1'/><author><name>Brad Milne</name><uri>http://www.blogger.com/profile/04366914158924437806</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-31067545.post-6348906617843909822</id><published>2008-05-27T15:05:00.003+12:00</published><updated>2008-06-11T13:23:23.889+12:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='hardware'/><category scheme='http://www.blogger.com/atom/ns#' term='opensource'/><category scheme='http://www.blogger.com/atom/ns#' term='networking'/><title type='text'>opensource hardware in nz</title><content type='html'>Came across &lt;a href="http://nicegear.co.nz/"&gt;this site&lt;/a&gt; that stocks some really fun looking hardware. Of particular note is stocking only opensource-capable routers, laptops without an OS (no M$ tax!) and single-board computers that use only 5-7 watts that you could really have some fun with. Oh and who could pass up a GSM modem with built-in GPS? Oh, the gadgetry and geekyness.&lt;br&gt;&lt;br&gt;&lt;a href="http://nicegear.co.nz/"&gt;nicegear.co.nz&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/31067545-6348906617843909822?l=waxingcerebral.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://nicegear.co.nz/' title='opensource hardware in nz'/><link rel='replies' type='application/atom+xml' href='http://waxingcerebral.blogspot.com/feeds/6348906617843909822/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=31067545&amp;postID=6348906617843909822' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31067545/posts/default/6348906617843909822'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31067545/posts/default/6348906617843909822'/><link rel='alternate' type='text/html' href='http://waxingcerebral.blogspot.com/2008/05/opensource-hardware-in-nz.html' title='opensource hardware in nz'/><author><name>Brad Milne</name><uri>http://www.blogger.com/profile/04366914158924437806</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-31067545.post-3119631785280210179</id><published>2008-05-23T21:09:00.007+12:00</published><updated>2008-05-23T22:22:57.708+12:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='interoperability'/><title type='text'>jni - call C/C++/Assembly from Java</title><content type='html'>&lt;ol&gt;&lt;li&gt; Create Java class containing native method(s) (static or instance) defining interface with C code.&lt;br /&gt;&lt;div class="code"&gt;public class Processor {&lt;br /&gt;public static native double process(double x, double y);&lt;br /&gt;}&lt;/div&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Compile to Java class file.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Run &lt;div class="code"&gt;javah -jni [-o path/to/CProcessor.h] Processor&lt;/div&gt; to generate C header file from the Java. Eg. CProcessor.h:&lt;div class="code"&gt;/* DO NOT EDIT THIS FILE - it is machine generated */&lt;br /&gt;#include &amp;lt;jni.h&amp;gt;&lt;br /&gt;/* Header for class Processor */&lt;br /&gt;&lt;br /&gt;#ifndef _Included_Processor&lt;br /&gt;#define _Included_Processor&lt;br /&gt;#ifdef __cplusplus&lt;br /&gt;extern "C" {&lt;br /&gt;#endif&lt;br /&gt;/*&lt;br /&gt; * Class:     Processor&lt;br /&gt; * Method:    process&lt;br /&gt; * Signature: (DD)D&lt;br /&gt; */&lt;br /&gt;JNIEXPORT jdouble JNICALL Java_Processor_process&lt;br /&gt;  (JNIEnv *, jclass, jdouble, jdouble);&lt;br /&gt;&lt;br /&gt;#ifdef __cplusplus&lt;br /&gt;}&lt;br /&gt;#endif&lt;br /&gt;#endif&lt;/div&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Create a .c C source file - this is the stub to call the target code. Include header &lt;jni.h&gt; and "Processor.h". The angle brackets mean it is registered as a library file for the compiler, whereas the speech marks denote a stand-alone header file. May need to include the path the Processor.h within the speech marks. Here is a simple example that just sums the two input numbers, rather than calling any other C:&lt;br /&gt;&lt;div class="code"&gt;#include &amp;lt;jni.h&amp;gt;&lt;br /&gt;#include &amp;lt;math.h&amp;gt;&lt;br /&gt;#include "../headers/CProcessor.h"&lt;br /&gt;#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;JNIEXPORT jdouble JNICALL Java_Processor_process&lt;br /&gt;  (JNIEnv *env , jclass obj, jdouble val1, jdouble val2) {&lt;br /&gt;  return (val1+val2);&lt;br /&gt;}&lt;/div&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Run (eg for linux)&lt;div class="code"&gt;gcc -shared -I /usr/lib/jvm/java-1.5.0-sun-1.5.0.15/include/ -I &lt;br /&gt;/usr/lib/jvm/java-1.5.0-sun-1.5.0.15/include/linux/ -o CProcessor.so CProcessor.c&lt;/div&gt; to create the library file (indicated by 'shared' flag). Any compiler errors about missing .h headers should be solved by the inclusion (-I) of the jni and jni for linux paths.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Either in a method inside original Java class, or in a new calling class, create a static block to either load (System.load()) the .so library via its file path, or load (System.loadLibrary()) a registered library (e.g. dll on Windows) via system-specific addressing. &lt;/li&gt;&lt;br /&gt;&lt;li&gt;Once the static block has loaded the library, the methods are available either statically or from an object as determined in 1.&lt;div class="code"&gt;public class Caller {&lt;br /&gt; static {&lt;br /&gt;  System.load("/home/me/_projects/JNI/C/CProcessor.so");&lt;br /&gt; }&lt;br /&gt; public static void main(String[] args) {&lt;br /&gt;  double result = Processor.process(2, 3);&lt;br /&gt;  System.out.println(result);&lt;br /&gt; }&lt;br /&gt;}&lt;/div&gt;In this case our Processor in Java calls the CProcessor in C which adds the 2 doubles we passed it and returns a double. Here it is 2 + 3 with the output 5.&lt;/li&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/31067545-3119631785280210179?l=waxingcerebral.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://waxingcerebral.blogspot.com/feeds/3119631785280210179/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=31067545&amp;postID=3119631785280210179' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31067545/posts/default/3119631785280210179'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31067545/posts/default/3119631785280210179'/><link rel='alternate' type='text/html' href='http://waxingcerebral.blogspot.com/2008/05/jni-call-ccassembly-from-java.html' title='jni - call C/C++/Assembly from Java'/><author><name>Brad Milne</name><uri>http://www.blogger.com/profile/04366914158924437806</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-31067545.post-7242012615760838361</id><published>2008-04-03T17:07:00.003+13:00</published><updated>2008-04-03T17:49:16.700+13:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='virtualisation'/><title type='text'>printing from Windows virtual machine on linux host</title><content type='html'>It's great to be able to use a printer that you have defined in your linux host from within virtualised Windows guest OS (where the printer is either connected directly to your box or over a network). This post assumes you've already setup networking between your guest and host.&lt;br /&gt;&lt;br /&gt;Firstly in your printer settings on the host, make sure access hasn't been restricted (open access by default on Ubuntu).&lt;br /&gt;Find the &lt;span style="font-weight: bold;"&gt;name&lt;/span&gt; of the printer that you want to access (ie not the Description which is what appears in network browsing)&lt;br /&gt;&lt;br /&gt;Then on the virtual windows machine (for XP):&lt;br /&gt;Choose Add Printer&lt;br /&gt;Select network printer&lt;br /&gt;Select Printer on Internet&lt;br /&gt;For the url, use:&lt;br /&gt;&lt;div class="code"&gt;http://{host ip}:631/printers/{CUPS printer name}&lt;/div&gt;It won't be able to install missing drivers if they're not found (ie can't load the linux drivers into Windows), so find the drivers from somewhere and select the Have Disk option to point Windows at the .inf file.&lt;br /&gt;Should be away laughing!&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.pantz.org/software/qemu/qemuinstallandnotes.html"&gt;This howto&lt;/a&gt; is has more direct &lt;a href="http://www.cups.org/"&gt;CUPS&lt;/a&gt; fiddling than is needed for Ubuntu now, but I got key information from there to find out the above.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/31067545-7242012615760838361?l=waxingcerebral.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://waxingcerebral.blogspot.com/feeds/7242012615760838361/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=31067545&amp;postID=7242012615760838361' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31067545/posts/default/7242012615760838361'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31067545/posts/default/7242012615760838361'/><link rel='alternate' type='text/html' href='http://waxingcerebral.blogspot.com/2008/04/printing-from-windows-virtual-machine.html' title='printing from Windows virtual machine on linux host'/><author><name>Brad Milne</name><uri>http://www.blogger.com/profile/04366914158924437806</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-31067545.post-5935719813328700428</id><published>2008-04-03T16:56:00.004+13:00</published><updated>2008-04-03T17:49:45.033+13:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='virtualisation'/><title type='text'>run a open-source virtual machine with qemu</title><content type='html'>I use the awesome &lt;a href="http://fabrice.bellard.free.fr/qemu/"&gt;qemu&lt;/a&gt; open-source processor emulator, that lets you run virtual OSs (guests) on a host computer (on my Xubuntu box, in my case). Qemu has the power to have guest os's think they're on a box with entirely different processor types (eg have a PowerPC guest on a x86 box). But what I've found awesome is that with the relatively new Kernel Based Virtual Machine (aka &lt;a href="http://kvm.qumranet.com/kvmwiki"&gt;KVM&lt;/a&gt;) on linux, with a &lt;a href="http://en.wikipedia.org/wiki/X86_virtualization"&gt;supported processor&lt;/a&gt;, virtualisation goes right down to the cpu level - so it's fast!&lt;br /&gt;&lt;br /&gt;If you're on linux and want to check if your processor does support it, use:&lt;br /&gt;&lt;div class="code"&gt;egrep '^flags.*(vmx|svm)' /proc/cpuinfo&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/31067545-5935719813328700428?l=waxingcerebral.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://waxingcerebral.blogspot.com/feeds/5935719813328700428/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=31067545&amp;postID=5935719813328700428' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31067545/posts/default/5935719813328700428'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31067545/posts/default/5935719813328700428'/><link rel='alternate' type='text/html' href='http://waxingcerebral.blogspot.com/2008/04/run-open-source-virtual-machine-with.html' title='run a open-source virtual machine with qemu'/><author><name>Brad Milne</name><uri>http://www.blogger.com/profile/04366914158924437806</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-31067545.post-4894460908339232686</id><published>2008-03-27T14:27:00.002+13:00</published><updated>2008-03-27T14:30:44.919+13:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='applicationservers'/><title type='text'>set ear file's context root in WebSphere</title><content type='html'>WebSphere lets you set the context root of a war file directly on page 1 of the update screens. ear files are different however:&lt;br /&gt;Turns out when Updating an ear, you need to select on the first screen to show all build/config options.&lt;br /&gt;Then skip to step 8 'Map context roots for Web modules'. There the context can be specified.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/31067545-4894460908339232686?l=waxingcerebral.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://waxingcerebral.blogspot.com/feeds/4894460908339232686/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=31067545&amp;postID=4894460908339232686' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31067545/posts/default/4894460908339232686'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31067545/posts/default/4894460908339232686'/><link rel='alternate' type='text/html' href='http://waxingcerebral.blogspot.com/2008/03/set-ear-files-context-root-in-websphere.html' title='set ear file&apos;s context root in WebSphere'/><author><name>Brad Milne</name><uri>http://www.blogger.com/profile/04366914158924437806</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-31067545.post-7851382366741849217</id><published>2008-03-26T15:22:00.003+13:00</published><updated>2008-03-27T14:30:25.101+13:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='networking'/><title type='text'>managing networks without gnome</title><content type='html'>Having Xubuntu on my machine, gnome's &lt;a href="http://www.gnome.org/projects/NetworkManager/"&gt;Network Manager&lt;/a&gt; is an option, but I try to avoid the bloat of gnome. A great alternative (which &lt;a href="http://lilserenity.wordpress.com/2008/02/06/ubuntu-with-xfce-xubuntu/"&gt;many&lt;/a&gt; &lt;a href="http://emptybits.com/hackenv/eeepc"&gt;say&lt;/a&gt; is better) is &lt;a href="http://wicd.sourceforge.net/"&gt;wicd&lt;/a&gt;. It successfully scans for wireless networks, handles WEP connections, and is the only way I could find to connect to WPA/WPA2 networks. Great product. (&lt;a href="http://www.linux.com/feature/118224?theme=print"&gt;howto&lt;/a&gt;)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/31067545-7851382366741849217?l=waxingcerebral.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://waxingcerebral.blogspot.com/feeds/7851382366741849217/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=31067545&amp;postID=7851382366741849217' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31067545/posts/default/7851382366741849217'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31067545/posts/default/7851382366741849217'/><link rel='alternate' type='text/html' href='http://waxingcerebral.blogspot.com/2008/03/managing-networks-without-gnome.html' title='managing networks without gnome'/><author><name>Brad Milne</name><uri>http://www.blogger.com/profile/04366914158924437806</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-31067545.post-3495633164686330941</id><published>2008-03-06T09:54:00.006+13:00</published><updated>2008-03-06T10:12:34.788+13:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><title type='text'>keep grub boot switches between kernel updates</title><content type='html'>I have been frustrated on numerous Linux systems where I have to use custom boot switches in &lt;a href="https://help.ubuntu.com/community/GrubHowto"&gt;Grub&lt;/a&gt;, so add them to the relevant entry in /boot/grub/menu.lst, but then a new kernel version (which adds a new boot entry) then doesn't have this new option. This has been simply annoying in the past because I've had to go back in and add the text to the entry. But now I've built a machine for a paying customer and I can't go round every time there's a kernel update!&lt;br /&gt;&lt;br /&gt;It turns out the solution is simple: &lt;br /&gt;Between the flags&lt;br /&gt;### BEGIN AUTOMAGIC KERNELS LIST&lt;br /&gt;and&lt;br /&gt;## ## End Default Options ##&lt;br /&gt;are settings that the updater will read in order to create the new boot entries.&lt;br /&gt;&lt;br /&gt;The one we want is&lt;br /&gt;&lt;div class="code"&gt;# &lt;a href="http://users.bigpond.net.au/hermanzone/p15.htm#defoptions"&gt;defoptions&lt;/a&gt;=&lt;/div&gt;Add text here and it will get added to any new boot list entries.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;While I'm on the topic, another useful setting in this set is&lt;br /&gt;&lt;div class="code"&gt;# &lt;a href="http://users.bigpond.net.au/hermanzone/p15.htm#howmanyall"&gt;howmany&lt;/a&gt;=&lt;/div&gt;which lets us reduce the number of kernels that remain as options in the boot list&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/31067545-3495633164686330941?l=waxingcerebral.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://waxingcerebral.blogspot.com/feeds/3495633164686330941/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=31067545&amp;postID=3495633164686330941' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31067545/posts/default/3495633164686330941'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31067545/posts/default/3495633164686330941'/><link rel='alternate' type='text/html' href='http://waxingcerebral.blogspot.com/2008/03/keep-grub-boot-switches-between-kernel.html' title='keep grub boot switches between kernel updates'/><author><name>Brad Milne</name><uri>http://www.blogger.com/profile/04366914158924437806</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-31067545.post-5249966403867463453</id><published>2008-03-04T10:01:00.002+13:00</published><updated>2008-03-27T14:29:56.262+13:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='hibernate'/><title type='text'>lock hibernate session to avoid lazy loading exceptions in tests</title><content type='html'>//Lock this hibernate session so we don't get lazy loading exceptions&lt;br /&gt;               SessionFactory sessionFactory = (SessionFactory) appContext.getBean("sessionFactory");&lt;br /&gt;               Session session = SessionFactoryUtils.getSession(sessionFactory, true);&lt;br /&gt;               TransactionSynchronizationManager.bindResource(sessionFactory, new SessionHolder(session));&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/31067545-5249966403867463453?l=waxingcerebral.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://waxingcerebral.blogspot.com/feeds/5249966403867463453/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=31067545&amp;postID=5249966403867463453' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31067545/posts/default/5249966403867463453'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31067545/posts/default/5249966403867463453'/><link rel='alternate' type='text/html' href='http://waxingcerebral.blogspot.com/2008/03/lock-hibernate-session-to-avoid-lazy.html' title='lock hibernate session to avoid lazy loading exceptions in tests'/><author><name>Brad Milne</name><uri>http://www.blogger.com/profile/04366914158924437806</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-31067545.post-3857400547836152639</id><published>2008-01-17T17:03:00.001+13:00</published><updated>2009-01-25T15:27:51.815+13:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='security'/><category scheme='http://www.blogger.com/atom/ns#' term='networking'/><title type='text'>ssh tunnels</title><content type='html'>Using &lt;a href="http://www.openssh.com/"&gt;ssh&lt;/a&gt; we can create tunnels to route bi-directional traffic. Depending  on our selection of destination and server computers to connect to, the complete tunnel is made of a fully secure ssh tunnel, and possibly an additional tunnel continuing on that is not secure. The examples below should help explain this.&lt;br /&gt;Here's the command:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;ssh -NL localport:targethost:hostport server [-p serverport]&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Where&lt;br /&gt;&lt;ul&gt;&lt;li&gt;-N means don't start a remote ssh session (useful if just port fowarding)&lt;/li&gt;&lt;li&gt;-L indicates a tunnel is to be set up with the following params:&lt;/li&gt;&lt;ul&gt;&lt;li&gt;localport: tunnel 'entry'. Port number to connect to locally (ie at localhost)&lt;/li&gt;&lt;li&gt;targethost: tunnel 'destination'. Which computer (name or ip) to connect to&lt;/li&gt;&lt;li&gt;hostport: tunnel 'exit'. Port number to appear as on the other side of the tunnel.&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;server: computer to validate ssh connection on (needs to be running ssh server). This forms part of the tunnel and three variations of this are explained below. You can make this 'user@server' in order to specify a username for the authentication if required.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;serverport: this is optional, but if you want to create the ssh connection over a non-standard port (ie not 22) then use this. You'll need to get the sshd listening on the new port in this case.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;Remember these funky things are 2-way so if whatever you're communicating with at the other end of the tunnel sends info back down the tunnel (via hostport) then you'll get it right back at your end (localport). It's cool.&lt;br /&gt;&lt;br /&gt;Example 1, target computer is running ssh server:&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;ssh -NL 8081:192.168.1.4:8090 192.168.1.4&lt;/span&gt;&lt;br /&gt;Create a tunnel from 8081 locally to 192.168.1.4, and appear there at port 8090. Validate at 192.168.1.4. This is a short tunnel, between just the client and host, but completely secure. All traffic in this case will be over port 22 (ssh default).&lt;br /&gt;&lt;br /&gt;Example 2, host computer is running ssh server:&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;ssh -NL 8081:192.168.1.4:8090 localhost&lt;/span&gt;&lt;br /&gt;Exactly as in example 1, only this time the local machine is both ssh server and client. There is effectively no secure tunnel here (ie it's only between ports on the local machine), so unsecure over port 8090 to 192.168.1.4.&lt;br /&gt;&lt;br /&gt;Example 3, 3rd computer is running ssh server:&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;ssh -NL 8081:192.168.1.4:8090 192.168.1.5 -p 3389&lt;/span&gt;&lt;br /&gt;In this case, locally we are the ssh client, connecting securely (over port 3389) to the ssh server, 192.168.1.5. From there traffic travels over port 8090 to the destination box, 192.168.1.4. This is very powerful as traffic can be securely routed into a limited-access network. For example in this case if Microsoft's Remote Desktop Protocol (&lt;a href="http://en.wikipedia.org/wiki/Remote_Desktop_Protocol"&gt;RDP&lt;/a&gt;) was the only traffic allowed in and out (eg through VPN), then the client externally can run this command, connect through on the RDP port (3389), connecting to a box inside the network (192.168.1.5). From there the destination IP is resolved, so this needn't be visible from the client computer, and traffic flows freely inside the network over 8090.&lt;br /&gt;&lt;br /&gt;Another option is remote tunnels (instead of local tunnels). These use essentially the same commands, but with -R in place of -L. With a remote tunnel it is possible to declare a port on a foreign machine as the tunnel entry.&lt;br /&gt;&lt;br /&gt;A nice way to test your tunnel is to use &lt;a href="http://www.openbsd.org/cgi-bin/man.cgi?query=nc"&gt;netcat&lt;/a&gt;. For the above examples this test would be:&lt;br /&gt;&lt;br /&gt;On 192.168.1.4:&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;nc -l -p 8090&lt;/span&gt;&lt;br /&gt;listen (-l) on port (-p) 8090 - end of the tunnel&lt;br /&gt;&lt;br /&gt;On localhost:&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;nc localhost 8081 &lt;/span&gt;&lt;br /&gt;connect to localhost on 8081 - start of the tunnel&lt;br /&gt;&lt;br /&gt;The localhost connection should get tunneled to the remote box and you'll be able to type at either end and see it appear in the terminals.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/31067545-3857400547836152639?l=waxingcerebral.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://waxingcerebral.blogspot.com/feeds/3857400547836152639/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=31067545&amp;postID=3857400547836152639' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31067545/posts/default/3857400547836152639'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31067545/posts/default/3857400547836152639'/><link rel='alternate' type='text/html' href='http://waxingcerebral.blogspot.com/2008/01/ssh-tunnels.html' title='ssh tunnels'/><author><name>Brad Milne</name><uri>http://www.blogger.com/profile/04366914158924437806</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-31067545.post-1001366819745020545</id><published>2007-12-05T22:57:00.002+13:00</published><updated>2008-03-27T14:31:38.672+13:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><title type='text'>gtk dialogs in linux</title><content type='html'>Bash scripts are fantastic. I could end the post there, but they can be made even better for end users by using one of the simple GUI applications out there that can be run from bash. Here's a great little example (using &lt;a href="http://linux.pte.hu/~pipas/gtkdialog/"&gt;gtkdialog&lt;/a&gt;)that pretties-up the interface for my infrared phone script from &lt;a href="http://waxingcerebral.blogspot.com/2007/12/get-connected-with-infrared-device-in.html"&gt;this post&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;div class="code"&gt;#! /bin/bash&lt;br /&gt;&lt;br /&gt;OUTPUT=$(/usr/local/bin/phone-connect $1 | sed -e 's/\(.*\)$/&lt;text&gt;&lt;label&gt;\1&lt;\/label&gt;&lt;\/text&gt;/')&lt;br /&gt;&lt;br /&gt;export DIALOG='&lt;br /&gt; &amp;lt;window title="phone-connect '$1'" window_position="1"&amp;gt;&lt;br /&gt;   &amp;lt;vbox&amp;gt;'$OUTPUT'&amp;lt;hbox&amp;gt;&lt;br /&gt;       &amp;lt;button&amp;gt;&amp;lt;/button&amp;gt;&lt;br /&gt;     &amp;lt;/hbox&amp;gt;&lt;br /&gt;   &amp;lt;/vbox&amp;gt;&lt;br /&gt; &amp;lt;/window&amp;gt;'&lt;br /&gt;&lt;br /&gt;gtkdialog --program=DIALOG&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Beautiful&lt;/label&gt;&lt;/text&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/31067545-1001366819745020545?l=waxingcerebral.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://waxingcerebral.blogspot.com/feeds/1001366819745020545/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=31067545&amp;postID=1001366819745020545' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31067545/posts/default/1001366819745020545'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31067545/posts/default/1001366819745020545'/><link rel='alternate' type='text/html' href='http://waxingcerebral.blogspot.com/2007/12/gtk-dialogs-in-linux.html' title='gtk dialogs in linux'/><author><name>Brad Milne</name><uri>http://www.blogger.com/profile/04366914158924437806</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-31067545.post-1852912869234040482</id><published>2007-12-05T22:48:00.001+13:00</published><updated>2008-10-26T07:49:48.718+13:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='mobile'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='telecoms'/><title type='text'>get connected with infrared device in linux</title><content type='html'>&lt;div&gt;Using Ubuntu (known to work for Feisty and Gutsy), follow the instructions &lt;a href="http://ubuntuforums.org/showpost.php?p=3182410&amp;amp;postcount=1"&gt;here&lt;/a&gt;. The only change to those instructions I needed to make was to set automatic="true' in irda-utils.&lt;br /&gt;&lt;br /&gt;Then use the following script:&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="code"&gt;#! /bin/bash&lt;br /&gt;&lt;br /&gt;# phone-connect. Copyright Brad Milne, 2007. Search for infrared phone&lt;br /&gt;# and mount it using obexfs if available.&lt;br /&gt;&lt;br /&gt;case "$1" in&lt;br /&gt;start)&lt;br /&gt;      echo -n "Starting connection to phone..."&lt;br /&gt;&lt;br /&gt;      #first restart irda-utils if phone not visible&lt;br /&gt;      grep nickname /proc/net/irda/discovery &gt; /dev/null&lt;br /&gt;      if [ $? -eq 0 ]; then&lt;br /&gt;              /etc/init.d/irda-utils restart &gt; /dev/null&lt;br /&gt;      fi&lt;br /&gt;      obexfs -i /mnt/phone&lt;br /&gt;&lt;br /&gt;      if [ $? -eq 0 ]; then&lt;br /&gt;              PHONE=$(grep nickname /proc/net/irda/discovery | sed -e 's/nickname: //' | cut -d, -f1)&lt;br /&gt;              echo "Connected to $PHONE"&lt;br /&gt;      else&lt;br /&gt;              echo "Connection failed. Does phone have infrared turned on?"&lt;br /&gt;      fi&lt;br /&gt;      ;;&lt;br /&gt;stop)&lt;br /&gt;      # 'stop' I haven't yet been able to implement due to restrictions&lt;br /&gt;      # on unmounting the fuse device. For now I use 'sudo umount /mnt/phone'&lt;br /&gt;      echo -n "Stopping connection to phone..."&lt;br /&gt;      /bin/fusermount -u /mnt/phone/&lt;br /&gt;      if [ $? -eq 0 ]; then&lt;br /&gt;              echo "Done"&lt;br /&gt;      else&lt;br /&gt;              echo "Failed. Was it connected?"&lt;br /&gt;      fi&lt;br /&gt;      ;;&lt;br /&gt;status)&lt;br /&gt;      ifconfig irda0 | grep irda0 &gt; /dev/null&lt;br /&gt;      if [ $? -eq 0 ]; then&lt;br /&gt;              echo "Infrared device is active"&lt;br /&gt;&lt;br /&gt;              grep nickname /proc/net/irda/discovery &gt; /dev/null&lt;br /&gt;              if [ $? -eq 0 ]; then&lt;br /&gt;                      PHONE=$(grep nickname /proc/net/irda/discovery | sed -e 's/nickname: //' | cut -d, -f1)&lt;br /&gt;                      echo "Currently connected to phone"&lt;br /&gt;&lt;br /&gt;                      if [ $(ls -l /mnt/phone | wc -l) -gt 1 ]; then&lt;br /&gt;                              echo "Phone files accessible at /mnt/phone"&lt;br /&gt;                      else&lt;br /&gt;                              echo "Phone not mounted"&lt;br /&gt;                      fi&lt;br /&gt;              else&lt;br /&gt;                      echo "Not connected to phone"&lt;br /&gt;              fi&lt;br /&gt;      else&lt;br /&gt;              echo "Infrared device not active. Is infrared device plugged in?"&lt;br /&gt;      fi&lt;br /&gt;      ;;&lt;br /&gt;*)&lt;br /&gt;      echo "Usage: phone-connect {start|stop|status}"&lt;br /&gt;      ;;&lt;br /&gt;esac&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;Then to make it runnable by any user, do a chmod 4711 as described &lt;a href="http://www.linuxjournal.com/article/2114"&gt;here&lt;/a&gt;, on the script itself, obexfs, irda-utils, and on fusermount (which needs to be readable by all users also).&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/31067545-1852912869234040482?l=waxingcerebral.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://waxingcerebral.blogspot.com/feeds/1852912869234040482/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=31067545&amp;postID=1852912869234040482' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31067545/posts/default/1852912869234040482'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31067545/posts/default/1852912869234040482'/><link rel='alternate' type='text/html' href='http://waxingcerebral.blogspot.com/2007/12/get-connected-with-infrared-device-in.html' title='get connected with infrared device in linux'/><author><name>Brad Milne</name><uri>http://www.blogger.com/profile/04366914158924437806</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-31067545.post-8018090186364533577</id><published>2007-11-22T16:56:00.002+13:00</published><updated>2010-08-16T21:59:07.532+12:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='telecoms'/><title type='text'>router disconnecting from telstraclear?</title><content type='html'>If you're in NZ, and you've got TelstraClear cable internet, congrats cos that's the best option we have.&lt;br /&gt;&lt;br /&gt;But if you have the experience I've had, you'll be tearing your hair out. I have a couple of computers at home (only my wife's work laptop runs Windows :) and a Netgear router (WGR614 v7) connecting them to the cable modem. Since the first weeks of having the setup though, the &lt;span style="font-weight: bold;"&gt;internet connection drops off&lt;/span&gt; way too often (3-4 times in a work day). Telstraclear and the modem were fine; connecting just one computer direct to the modem would chug along for weeks without issues. I am on my second replacement router (that means 3rd in total) and have had conversations with Dick Smiths (router retailer) and Netgear, and still have the same problem.&lt;br /&gt;&lt;br /&gt;Frustrations!&lt;br /&gt;&lt;br /&gt;So today I managed to talk directly to the right people at TC to help me troubleshoot things. And lo! I have the &lt;span style="font-style: italic;"&gt;wrong type of cable modem&lt;/span&gt;!!&lt;br /&gt;That's right, they have two (at least) models they provide customers with, the Motorola SB5101 and 5100. I had been given the 5101, and not knowing there was an option, had blindly accepted it as &lt;span style="font-weight: bold;"&gt;the&lt;/span&gt; modem.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;TelstraClear cable customers using a router should be provided a model 5100 cable modem.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;If this is you, and you are having these problems then call them. They should replace it without a call-out fee if you had a router from the start. And how are we mere customers supposed to know this? Beat your head against various unyielding walls for a year seems to be the answer...&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;EDIT: Just had the modem replaced this morning. Turns out the 5101's were introduced to be more compatible with Windows XP! What a joke - you know not everyone uses Windows! And the 5100's won't fix the problem, but they should reduce the disconnects. The main cause is an issue with TC's hardware, for which they're getting in some new equipment which should resolve the issue by the end of February 2008.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;Also, on the topic of things TC doesn't tell you about their cable internet service, they recently rolled out a 'customer security' measure whereby any change in &lt;a href="http://en.wikipedia.org/wiki/MAC_address"&gt;MAC address&lt;/a&gt; connected directly to the modem will not work for a stand-down period of a number of hours. So if you change computers that are directly connected (or switch from router to computer while troubleshooting!) then you won't get a connection anyway. That took a bit of figuring out at the time. You have to ring them and ask for that 'feature' to be removed from your account. It does have security benefits, but it's a wired connection, so someone would have to be sneakily plugging into your modem or cable anyway.&lt;br /&gt;&lt;br /&gt;Good service, but keep us informed Telstra.&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/31067545-8018090186364533577?l=waxingcerebral.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://waxingcerebral.blogspot.com/feeds/8018090186364533577/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=31067545&amp;postID=8018090186364533577' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31067545/posts/default/8018090186364533577'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31067545/posts/default/8018090186364533577'/><link rel='alternate' type='text/html' href='http://waxingcerebral.blogspot.com/2007/11/routing-disconnecting-from-telstraclear.html' title='router disconnecting from telstraclear?'/><author><name>Brad Milne</name><uri>http://www.blogger.com/profile/04366914158924437806</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-31067545.post-8003029949328479853</id><published>2007-10-11T22:20:00.001+13:00</published><updated>2008-10-26T07:42:59.225+13:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><title type='text'>tell apt your proxy settings</title><content type='html'>Apt needs to be configured to use a proxy if you're using one (eg if using &lt;a href="http://waxingcerebral.blogspot.com/2007/09/accessing-isa-proxies-in-linux.html"&gt;cntlm&lt;/a&gt;). This is done by creating /etc/apt/apt.conf.d/proxy, with content similar to:&lt;br /&gt;&lt;br /&gt;Acquire {&lt;br /&gt;Retries "0";&lt;br /&gt;HTTP {&lt;br /&gt;Proxy "http://127.0.0.1:3128";&lt;br /&gt;};&lt;br /&gt;};&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/31067545-8003029949328479853?l=waxingcerebral.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://waxingcerebral.blogspot.com/feeds/8003029949328479853/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=31067545&amp;postID=8003029949328479853' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31067545/posts/default/8003029949328479853'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31067545/posts/default/8003029949328479853'/><link rel='alternate' type='text/html' href='http://waxingcerebral.blogspot.com/2007/10/tell-apt-your-proxy-settings.html' title='tell apt your proxy settings'/><author><name>Brad Milne</name><uri>http://www.blogger.com/profile/04366914158924437806</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-31067545.post-8990062529822021903</id><published>2007-09-18T20:18:00.001+12:00</published><updated>2008-10-26T07:43:21.131+13:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><title type='text'>Restore Grub</title><content type='html'>How to restore grub, the linux boot manager. Maybe a Windows installation has written over the MBR?&lt;br /&gt;&lt;br /&gt;Use a boot disk, such as Knoppix or Ubuntu LiveCD.&lt;br /&gt;&lt;br /&gt;1.  $ sudo grub&lt;br /&gt;2.  grub&gt; find /boot/grub/stage1&lt;br /&gt;(If it fails here, jump to 'preparing root' below)&lt;br /&gt;3.  grub&gt; root (hd#,#)               (where 'hd#,#' is the result of step 2)&lt;br /&gt;4.  grub&gt; setup (hd#)&lt;br /&gt;5.  grub&gt; quit&lt;br /&gt;That's it. Done!&lt;br /&gt;&lt;br /&gt;-------------------------------------------------------------------------&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Preparing root&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;If step 2 failed above then do these steps first:&lt;br /&gt;A.  $ sudo mkdir /mnt/root&lt;br /&gt;B.  $ sudo mount /dev/sda1 /mnt/root          (where sda1 is your linux partition)&lt;br /&gt;C.  $ sudo mount -t proc none /mnt/root/proc&lt;br /&gt;D.  $ sudo mount -o bind /dev /mnt/root/dev&lt;br /&gt;E.  $ sudo chroot /mnt/root /bin/bash&lt;br /&gt;Now start again from step 2 above.&lt;br /&gt;&lt;br /&gt;Full credit to the guys on &lt;a href="http://ubuntuforums.org/showthread.php?t=224351"&gt;this thread&lt;/a&gt; at ubuntuforums.&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/31067545-8990062529822021903?l=waxingcerebral.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://waxingcerebral.blogspot.com/feeds/8990062529822021903/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=31067545&amp;postID=8990062529822021903' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31067545/posts/default/8990062529822021903'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31067545/posts/default/8990062529822021903'/><link rel='alternate' type='text/html' href='http://waxingcerebral.blogspot.com/2007/09/restore-grub.html' title='Restore Grub'/><author><name>Brad Milne</name><uri>http://www.blogger.com/profile/04366914158924437806</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-31067545.post-2974068637924597876</id><published>2007-09-12T20:32:00.000+12:00</published><updated>2007-10-03T15:38:50.896+13:00</updated><title type='text'>log4j logging levels</title><content type='html'>&lt;ul&gt;&lt;li&gt;FATAL&lt;/li&gt;&lt;li&gt;ERROR&lt;/li&gt;&lt;li&gt;WARN&lt;/li&gt;&lt;li&gt;INFO&lt;/li&gt;&lt;li&gt;DEBUG&lt;/li&gt;&lt;li&gt;TRACE&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;From &lt;a href="http://en.wikipedia.org/wiki/Log4j"&gt;&lt;span style="text-decoration: underline;"&gt;wikipedia site&lt;/span&gt;&lt;/a&gt;&lt;a href="http://logging.apache.org/log4j/1.2/faq.html"&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/31067545-2974068637924597876?l=waxingcerebral.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://waxingcerebral.blogspot.com/feeds/2974068637924597876/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=31067545&amp;postID=2974068637924597876' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31067545/posts/default/2974068637924597876'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31067545/posts/default/2974068637924597876'/><link rel='alternate' type='text/html' href='http://waxingcerebral.blogspot.com/2007/09/log4j-logging-levels.html' title='log4j logging levels'/><author><name>Brad Milne</name><uri>http://www.blogger.com/profile/04366914158924437806</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-31067545.post-826631234541492036</id><published>2007-09-03T14:43:00.000+12:00</published><updated>2007-10-11T22:24:33.925+13:00</updated><title type='text'>Accessing ISA proxies in Linux</title><content type='html'>I was stuck trying to get through a MS Proxy Server. Thankfully people have magicked a way around it. Get &lt;a href="http://ntlmaps.sourceforge.net/"&gt;NTLMaps&lt;/a&gt; and read these &lt;a href="http://michaelcarden.net/blog/index.php?p=58"&gt;instructions&lt;/a&gt;, particularly note the dpkg-reconfigure line, it's easily missed.&lt;br /&gt;&lt;br /&gt;EDIT: Wohoa! While NTLMaps is a great tool, it was using 130% of my dual-core 2GHz processor! Thankfully there is a much slicker alternative: &lt;a href="http://cntlm.sourceforge.net/"&gt;cntlm&lt;/a&gt;. This puppy is C-based and has a much lower overhead. Http responses seem to be faster as well. The compilation from source is quite straight forward as well, with no dependencies.&lt;br /&gt;&lt;br /&gt;You'll need to configure proxy settings on the box now, e.g.:&lt;br /&gt;&lt;a href="http://waxingcerebral.blogspot.com/2007/10/tell-apt-your-proxy-settings.html"&gt;apt&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/31067545-826631234541492036?l=waxingcerebral.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://waxingcerebral.blogspot.com/feeds/826631234541492036/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=31067545&amp;postID=826631234541492036' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31067545/posts/default/826631234541492036'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31067545/posts/default/826631234541492036'/><link rel='alternate' type='text/html' href='http://waxingcerebral.blogspot.com/2007/09/accessing-isa-proxies-in-linux.html' title='Accessing ISA proxies in Linux'/><author><name>Brad Milne</name><uri>http://www.blogger.com/profile/04366914158924437806</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-31067545.post-5115545246422691726</id><published>2007-09-02T20:57:00.003+12:00</published><updated>2008-10-26T07:46:30.053+13:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='hardware'/><category scheme='http://www.blogger.com/atom/ns#' term='opensource'/><title type='text'>Ubuntu (Feisty) Installation on Toshiba Tecra P5</title><content type='html'>A place for my notes on the things I've done to get Xubuntu Feisty (Ubuntu is the same procedure) running from scratch on my Toshiba Tecra P5 laptop (PTS53A-02F01D).&lt;br /&gt;&lt;br /&gt;Started by trying to boot into the LiveCD. This failed with:&lt;br /&gt;&lt;span style="font-style: italic;"&gt;     /bin/sh: can't access tty; job control turned off&lt;/span&gt;&lt;br /&gt;This message is a symptom of &lt;span style="font-style: italic;"&gt;any&lt;/span&gt; boot problems - after some figuring out it turned out that there were problems with the cd module.&lt;br /&gt;To fix, restart and on the boot screen, push F6. Edit the boot command ('e'), add:&lt;br /&gt;&lt;span style="font-style: italic;"&gt;    break=top&lt;br /&gt;&lt;/span&gt;&lt;span&gt;(type 'b') to boot&lt;/span&gt;&lt;span style="font-style: italic;"&gt;&lt;br /&gt;&lt;/span&gt;This causes booting to stop early in the boot process (I think) and lets you type in stuff. When the prompt comes up, type:&lt;br /&gt;&lt;span style="font-style: italic;"&gt;    modprobe piix&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;   exit&lt;/span&gt;&lt;br /&gt;This loads the module required to read the cd.&lt;br /&gt;&lt;br /&gt;Booting then seems to continue happily but eventually it just freezes with text on the screen. This is because it doesn't recognise the video driver properly. We need to use the &lt;a href="http://www.x.org/wiki/"&gt;xorg&lt;/a&gt; default driver for now.&lt;br /&gt;Pushing Ctrl+Alt+F1 takes you to the single user login.&lt;br /&gt;&lt;span style="font-style: italic;"&gt;    sudo -s&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;    vi /etc/X11/xorg.conf  -  &lt;/span&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;This uses the editor 'vi'. If you're not familiar with this, use 'i' to change to edit mode, 'esc' to come back out of edit mode, 'x' to delete a letter (when not in edit mode), ':w' to save (write) the file and ':q' to quit.)&lt;/span&gt;&lt;br /&gt;change driver "nv" to "vesa" then exit&lt;br /&gt;&lt;span style="font-style: italic;"&gt;    /etc/init.d/gdm restart&lt;/span&gt;&lt;br /&gt;And Ubuntu should boot!&lt;br /&gt;&lt;br /&gt;So play with it, enjoy the LiveCD, and when ready, double click 'install' on the desktop.&lt;br /&gt;&lt;br /&gt;At first it couldn't manage to partition the hard drive, and unfortunately killed Windows :(.&lt;br /&gt;-----------------------------------------------------------------------------------------------------------&lt;br /&gt;ONLY DO THIS SECTION IF IT CAN NOT WRITE THE PARTITIONS - THIS WILL KILL WINDOWS.&lt;br /&gt;&lt;br /&gt;I managed to get the disk manageable again by running:&lt;br /&gt;&lt;span style="font-style: italic;font-family:courier new;" &gt;&lt;span style="font-family:courier new;"&gt;    mkfs /dev/sda&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-family:courier new;"&gt;&lt;br /&gt;Now I could partition with:&lt;br /&gt;&lt;span style="font-style: italic;"&gt;    cfdisk&lt;/span&gt;&lt;br /&gt;--------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;Congratulations, you should now be booting into Ubuntu :)&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;CD&lt;/span&gt;&lt;br /&gt;So, in order to get continued cd support, we need to tell Ubuntu to load piix each time it boots. To do this, open a terminal and type:&lt;br /&gt;&lt;span style="font-style: italic;"&gt;    sudo vi /etc/modules&lt;/span&gt;&lt;br /&gt;To the end of this file, add:&lt;br /&gt;&lt;span style="font-style: italic;"&gt;    piix&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Graphics&lt;br /&gt;&lt;/span&gt;I had difficulty setting up the nvidia graphics driver and really wanted the goods. So I found &lt;a href="http://www.albertomilone.com/nvidia_scripts1.html"&gt;envy.&lt;/a&gt; Brilliant. Get it, run it. It downloads and installs the correct nvidia proprietary video drivers.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Sound&lt;/span&gt;&lt;br /&gt;Initially I had a hardware problem so couldn't get sound at all which was very frustrating. Now that the hardware's fixed, it's fine. (Antony Williams also has a &lt;a href="http://www.antonywilliams.com/2007/10/bash-script-to-automate-compiling-alsa.html"&gt;great script&lt;/a&gt; for automatically getting the latest alsa development drivers, should you need them.) Currently, plugging in headphones has no impact (i.e. sound still comes out of speakers and headphones are dead), so will update here when I resolve.&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;EDIT (Feb 08): I now have headphones sound as of alsa v1.0.16.&lt;/span&gt; You can find out your current alsa version by running:&lt;br /&gt;&lt;div class="code"&gt;alsamixer -v&lt;/div&gt;&lt;br /&gt;Use the script above to get this version if you don't have it. Issues still outstanding with sound:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;I need to mute the main speakers manually when I plug in the headphones&lt;/li&gt;&lt;li&gt;Microphone doesn't work, either built-in or plugged-in&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-family:courier new;"&gt;--------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Upgrade&lt;br /&gt;-Gutsy&lt;br /&gt;&lt;/span&gt;Upgraded to gutsy gibbon October 07 without a hitch. Great advances, so highly recommend. Still sticking with the lighter-weight Xubuntu distro, using the xfce window manager. It's nice :)&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Wireless&lt;br /&gt;&lt;/span&gt;Prior to Gutsy, &lt;a href="http://ndiswrapper.sourceforge.net/joomla/"&gt;ndiswrapper&lt;/a&gt; was needed to run the Tecra's Intel Corporation PRO/Wireless 4965 AG network card. From gutsy onwards, however, it is supported with the &lt;a href="http://www.intellinuxwireless.org/?p=iwlwifi&amp;amp;n=News"&gt;iwl4965&lt;/a&gt; driver (pre-installed). Hurrah!&lt;br /&gt;I still have to use WEP with my router (I know!), so just remember with WEP to use Hex keys, not ASCII and it should work fine.&lt;br /&gt;If you aren't using &lt;a href="http://www.gnome.org/projects/NetworkManager/"&gt;network manager&lt;/a&gt; like I'm not (trying to minimise services), then EDIT:&lt;span style="text-decoration: line-through;"&gt;if you boot with wireless switched off, you'll need to do 'sudo ifdown wlan0' then 'sudo ifup wlan0' after switching it on&lt;/span&gt; use &lt;a href="http://waxingcerebral.blogspot.com/2008/03/managing-networks-without-gnome.html"&gt;wicd&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-family:courier new;"&gt;--------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Upgrade&lt;br /&gt;-Hardy&lt;br /&gt;&lt;/span&gt;&lt;span&gt;Upgrade went without a hitch. Have upgraded successfully from Feisty to Gutsy to Hardy (and have now been using that for 6 months).&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-family:courier new;"&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/31067545-5115545246422691726?l=waxingcerebral.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://waxingcerebral.blogspot.com/feeds/5115545246422691726/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=31067545&amp;postID=5115545246422691726' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31067545/posts/default/5115545246422691726'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31067545/posts/default/5115545246422691726'/><link rel='alternate' type='text/html' href='http://waxingcerebral.blogspot.com/2007/09/ubuntu-installation-on-toshiba-tecra-p5.html' title='Ubuntu (Feisty) Installation on Toshiba Tecra P5'/><author><name>Brad Milne</name><uri>http://www.blogger.com/profile/04366914158924437806</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-31067545.post-8969779912197540127</id><published>2007-06-04T17:19:00.001+12:00</published><updated>2008-10-26T07:48:07.055+13:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='mac'/><title type='text'>mac boot tricks</title><content type='html'>Hold down the following keys at boot time for:&lt;br /&gt;&lt;br /&gt;Single user: command + s&lt;br /&gt;&lt;br /&gt;Select boot drive: opt&lt;br /&gt;&lt;br /&gt;Boot from dvd drive: c&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;At command line, mount the harddrive by: # /sbin/mount -wu /&lt;br /&gt;Start OS X by: # /sbin/SystemStarter&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/31067545-8969779912197540127?l=waxingcerebral.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://waxingcerebral.blogspot.com/feeds/8969779912197540127/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=31067545&amp;postID=8969779912197540127' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31067545/posts/default/8969779912197540127'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31067545/posts/default/8969779912197540127'/><link rel='alternate' type='text/html' href='http://waxingcerebral.blogspot.com/2007/06/mac-boot-tricks.html' title='mac boot tricks'/><author><name>Brad Milne</name><uri>http://www.blogger.com/profile/04366914158924437806</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-31067545.post-838843185720435077</id><published>2007-05-03T20:12:00.001+12:00</published><updated>2008-03-27T14:31:23.296+13:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><title type='text'>exact copies in unix</title><content type='html'>So often you want to copy files and folders between directories, but using cp all the file permissions are stuffed up and symlinks just cause problems. Not with good old tar!&lt;br /&gt;&lt;br /&gt;cd into source dir&lt;br /&gt;&lt;br /&gt;$ tar cf - * | (cd ../targetdir; tar -xf -)&lt;br /&gt;&lt;br /&gt;with 'sudo' before &lt;span style="font-weight: bold;"&gt;each&lt;/span&gt; tar if required.&lt;br /&gt;&lt;br /&gt;It's too good!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/31067545-838843185720435077?l=waxingcerebral.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://waxingcerebral.blogspot.com/feeds/838843185720435077/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=31067545&amp;postID=838843185720435077' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31067545/posts/default/838843185720435077'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31067545/posts/default/838843185720435077'/><link rel='alternate' type='text/html' href='http://waxingcerebral.blogspot.com/2007/05/exact-copies-in-unix.html' title='exact copies in unix'/><author><name>Brad Milne</name><uri>http://www.blogger.com/profile/04366914158924437806</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-31067545.post-7477812173799295439</id><published>2007-05-03T20:09:00.001+12:00</published><updated>2008-10-26T07:48:25.175+13:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='mac'/><title type='text'>examining pkg package contents</title><content type='html'>On mac osx&lt;br /&gt;&lt;br /&gt;$ lsbom {package name}.pkg/Contents/Archive.bom&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Very handy for uninstalls!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/31067545-7477812173799295439?l=waxingcerebral.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://waxingcerebral.blogspot.com/feeds/7477812173799295439/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=31067545&amp;postID=7477812173799295439' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31067545/posts/default/7477812173799295439'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31067545/posts/default/7477812173799295439'/><link rel='alternate' type='text/html' href='http://waxingcerebral.blogspot.com/2007/05/examining-pkg-package-contents.html' title='examining pkg package contents'/><author><name>Brad Milne</name><uri>http://www.blogger.com/profile/04366914158924437806</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-31067545.post-115462600986187558</id><published>2006-08-04T05:22:00.001+12:00</published><updated>2008-08-26T20:39:10.469+12:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='eco'/><title type='text'>electric car doco</title><content type='html'>Just came across this trailer for a new movie-doco detailing all about the electric cars that were in production and completely viable 10 years ago, but were inexplicably scrapped by GM. Mike Moore-style conspiracy theories maybe, but there seem to be facts aplenty in the movie to support hidden agendas. But as with all big corporate and political (did I differentiate the two?) agendas, what can you do?&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.apple.com/trailers/sony/whokilledtheelectriccar/trailer/"&gt;Who Killed the Electric Car?&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/31067545-115462600986187558?l=waxingcerebral.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://www.apple.com/trailers/sony/whokilledtheelectriccar/trailer/' title='electric car doco'/><link rel='replies' type='application/atom+xml' href='http://waxingcerebral.blogspot.com/feeds/115462600986187558/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=31067545&amp;postID=115462600986187558' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31067545/posts/default/115462600986187558'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31067545/posts/default/115462600986187558'/><link rel='alternate' type='text/html' href='http://waxingcerebral.blogspot.com/2006/08/electric-car-doco.html' title='electric car doco'/><author><name>Brad Milne</name><uri>http://www.blogger.com/profile/04366914158924437806</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-31067545.post-115332041457566018</id><published>2006-07-21T02:15:00.000+12:00</published><updated>2006-07-22T00:35:29.310+12:00</updated><title type='text'>ajax and google</title><content type='html'>Turns out that as recently as May this year Google has released an API called the &lt;a href="http://code.google.com/webtoolkit/"&gt;Google Web Toolkit&lt;/a&gt; for designing Ajax sites using Java and Google's own 'Java-to-JavaScript Compiler'. Interesting stuff; this of course enables full debugging within suites like Eclipse, plus source management and a variety of Java tools. O'Reilly's &lt;a href="http://www.xml.com/pub/a/2006/07/12/google-web-toolkit-ajax-java-ant-xml.html"&gt;xml.com&lt;/a&gt; has a great tutorial on getting this running using Mac OS X.&lt;br /&gt;&lt;br /&gt;I have my reservations about this, however. &lt;br /&gt;&lt;ul&gt;&lt;li&gt;The final code appearing on the site is whatever Google has opted to implement, meaning there is less flexibility is the choice of Ajax components and not necessarily my desired solution. Their Grid class, for example, uses html tables to align page elements! Urrghh!.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Scores of sites will be based on this same easy-to-access code, making the technology less unique.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;It keeps me removed from the base Ajax code meaning that I don't pick up new skills in this area.&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;...but they have opted to release it under an open source Apache &lt;a href="http://code.google.com/webtoolkit/download.html"&gt;license&lt;/a&gt;, it does look like a stunningly clever idea, and it does have the popularity of Google behind it, so if it is well adopted, the toolkit could quickly expand.&lt;br /&gt;There are discussions at &lt;a href="http://www.ajaxian.com/archives/google-web-toolkit-the-correct-level-of-abstraction"&gt;Ajaxian&lt;/a&gt;, an interview at &lt;a href="http://www.oreillynet.com/onjava/blog/2006/06/some_realworld_experience_with.html"&gt;O'Reilly&lt;/a&gt;...&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;I want control. I'm not going with the toolkit.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/31067545-115332041457566018?l=waxingcerebral.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://waxingcerebral.blogspot.com/feeds/115332041457566018/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=31067545&amp;postID=115332041457566018' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31067545/posts/default/115332041457566018'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31067545/posts/default/115332041457566018'/><link rel='alternate' type='text/html' href='http://waxingcerebral.blogspot.com/2006/07/ajax-and-google.html' title='ajax and google'/><author><name>Brad Milne</name><uri>http://www.blogger.com/profile/04366914158924437806</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-31067545.post-115323884539006385</id><published>2006-07-19T03:50:00.000+12:00</published><updated>2006-07-25T23:33:52.310+12:00</updated><title type='text'>choosing a web framework</title><content type='html'>I've got some ideas floating around about some pretty comprehensive websites I'd like to put together, and decided it was time to start looking at what to learn next to help me put together something really professional. I have a strong preference for Java and like the speed and presentation of DHTML.&lt;br /&gt;I started looking around, and a number of sites pointed out that the old framework of MVC (Model-View-Controller; &lt;a href="http://en.wikipedia.org/wiki/Model-view-controller"&gt;here&lt;/a&gt; and &lt;a href="http://osteele.com/archives/2004/08/web-mvc"&gt;here&lt;/a&gt;) (eg &lt;a href="http://struts.apache.org/"&gt;Struts&lt;/a&gt;) is old news. The newer Component Based Frameworks are much more highly regarded, with examples such as JSF, &lt;a href="http://tapestry.apache.org/tapestry4/"&gt;Tapestry&lt;/a&gt; and &lt;a href="http://wicket.sourceforge.net/"&gt;Wicket&lt;/a&gt;. I felt the most positive about Wicket: it is the newest, but has good adoption, is open source, and is code driven rather than depending heavily on XML (like Tapestry). A great review of the Java options can be found at the &lt;a href="http://www.javalobby.org/java/forums/t19742.html"&gt;javalobby&lt;/a&gt;.&lt;br /&gt;I had a look at the &lt;a href="http://wicket.sourceforge.net/"&gt;Wicket&lt;/a&gt; site and was very impressed, but knew this wasn't what I wanted. It is too static, having no active pages, instead every click requests an entirely new page from the server - nah! So onto DHTML it was.&lt;br /&gt;&lt;br /&gt;On looking into DHTML, I came across &lt;a href="http://en.wikipedia.org/wiki/AJAX"&gt;Ajax&lt;/a&gt;. DHTML and Ajax can be differentiated on the basis that Ajax is a group of technologies, and DHTML is a subset group of those technologies (think Venn diagrams here). And from what I can see, the only technology that Ajax has that DHTML doesn't is the XMLHttpRequest object (XHR; see &lt;a href="http://blogs.msdn.com/dmassy/archive/2005/03/20/399412.aspx"&gt;Dave Massy's succinct formula&lt;/a&gt; and &lt;a href="http://www.killersites.com/mvnforum/mvnforum/viewthread?thread=3477"&gt;Stefan Mischook's comment&lt;/a&gt;). In fact if you &lt;a href="http://www.google.co.uk/search?hl=en&amp;q=ajax+dhtml&amp;meta="&gt;google&lt;/a&gt; it you'll quickly see that a lot of people consider them one in the same.&lt;br /&gt;&lt;br /&gt;Ajax's XHR is very important, as it is this that enables communication with the web server without complete page requests (ie. enables 'asynchronous' updates). So it looks like Ajax is my answer, and with exciting resources such as &lt;a href="http://jstween.blogspot.com/"&gt;JSTween&lt;/a&gt; and repositories like &lt;a href="http://www.dynamicdrive.com/"&gt;DynamicDrive.com&lt;/a&gt; and &lt;a href="http://script.aculo.us/"&gt;script.aculo.us&lt;/a&gt;, I can see a colourful and exciting web presence ahead.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/31067545-115323884539006385?l=waxingcerebral.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://waxingcerebral.blogspot.com/feeds/115323884539006385/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=31067545&amp;postID=115323884539006385' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31067545/posts/default/115323884539006385'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31067545/posts/default/115323884539006385'/><link rel='alternate' type='text/html' href='http://waxingcerebral.blogspot.com/2006/07/choosing-web-framework.html' title='choosing a web framework'/><author><name>Brad Milne</name><uri>http://www.blogger.com/profile/04366914158924437806</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-31067545.post-115280685943702638</id><published>2006-07-14T03:57:00.000+12:00</published><updated>2006-07-14T23:28:09.356+12:00</updated><title type='text'>claiming uk tax refunds</title><content type='html'>I've spent the past 12 and a bit months living in London and as an antipodean, see ads everywhere by companies advertising that they can get you an income tax rebate. For a small fee (about 15%), they'll go through all the hassle of calculating how much should get back and, with the combined forces of 20 of the countries top lawyers, they'll wrest your hard-earned tax back off the taxman. Most of them operate a 'no-rebate, no-fee' service. This should tip you off that their effort is minimal.&lt;br /&gt;&lt;br /&gt;I eventually worked out, once you have received your P60 at the end of the tax year you can follow these steps (and it won't cost you a cent in commission!):&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Go to one of the many online &lt;a href="http://www.rebatecheque.com/"&gt;rebate&lt;/a&gt; &lt;a href="http://www.taxback.co.uk/taxcalc.shtml"&gt;calculators&lt;/a&gt; and find out if you really are due a rebate.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Contact your employer to find out which IRD (excuse me, now &lt;a href="http://www.hmrc.gov.uk/"&gt;HMRC&lt;/a&gt;) branch is &lt;em&gt;your&lt;/em&gt; tax office.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Contact your tax office and tell them how much you earned and how much tax you paid, and that you think you're due a rebate.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;If they agree, write a very simple letter (mine consisted of 1 paragraph) saying you think you've paid too much tax.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Post the letter and the &lt;em&gt;original&lt;/em&gt; P60 (take a copy for your records first in case Royal Mail lose it) to your tax office.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Sit back and wait for your cheque.&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;If you have any earnings from self-employment that's a different matter and you'll need to complete a &lt;a href="http://www.hmrc.gov.uk/individuals/tmaself-assessment.shtml"&gt;full return&lt;/a&gt;. But for most of us, that's it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/31067545-115280685943702638?l=waxingcerebral.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://waxingcerebral.blogspot.com/feeds/115280685943702638/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=31067545&amp;postID=115280685943702638' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31067545/posts/default/115280685943702638'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31067545/posts/default/115280685943702638'/><link rel='alternate' type='text/html' href='http://waxingcerebral.blogspot.com/2006/07/claiming-uk-tax-refunds.html' title='claiming uk tax refunds'/><author><name>Brad Milne</name><uri>http://www.blogger.com/profile/04366914158924437806</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-31067545.post-115279385420987013</id><published>2006-07-14T00:30:00.000+12:00</published><updated>2006-07-14T22:38:05.780+12:00</updated><title type='text'>welcome</title><content type='html'>Welcome to the first ever post on this blog. I think I have an idea how this will turn out, but with the organics of the web (and swings and roundabouts of my own interests) who knows where it will go?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/31067545-115279385420987013?l=waxingcerebral.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://waxingcerebral.blogspot.com/feeds/115279385420987013/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=31067545&amp;postID=115279385420987013' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/31067545/posts/default/115279385420987013'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/31067545/posts/default/115279385420987013'/><link rel='alternate' type='text/html' href='http://waxingcerebral.blogspot.com/2006/07/welcome.html' title='welcome'/><author><name>Brad Milne</name><uri>http://www.blogger.com/profile/04366914158924437806</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
