<?xml version="1.0" encoding="UTF-8"?> <rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
><channel><title>P Nash</title> <atom:link href="http://plumnash.com/feed/" rel="self" type="application/rss+xml" /><link>http://plumnash.com</link> <description>adventures of a gentleman</description> <lastBuildDate>Sun, 21 Feb 2010 21:46:09 +0000</lastBuildDate> <generator>http://wordpress.org/?v=2.9.2</generator> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <item><title>Guardian on Science and Technology</title><link>http://plumnash.com/uk/guardian-on-science-and-technology/</link> <comments>http://plumnash.com/uk/guardian-on-science-and-technology/#comments</comments> <pubDate>Sun, 21 Feb 2010 21:46:09 +0000</pubDate> <dc:creator>peter</dc:creator> <category><![CDATA[UK]]></category> <category><![CDATA[comment]]></category> <category><![CDATA[feminism]]></category><guid
isPermaLink="false">http://plumnash.com/?p=190</guid> <description><![CDATA[I find the media&#8217;s interpretation of science and technology fascinating. Technology appears a tad voyeuristic next to it&#8217;s more serious cousin &#8211; never more so than when I casually browsed the site. Let&#8217;s play spot the difference between the two!
Furthermore I dislike the prostituting of women (the male nudes were far less sexualized)  for [...]]]></description> <content:encoded><![CDATA[<p>I find the media&#8217;s interpretation of science and technology fascinating. Technology appears a tad voyeuristic next to it&#8217;s more serious cousin &#8211; never more so than when I casually browsed the site. Let&#8217;s play spot the difference between the two!</p><div
id="attachment_193" class="wp-caption alignright" style="width: 640px"><a
href="http://plumnash.com/wp-content/uploads/2010/02/Screenshot1.png"><img
class="size-full wp-image-193" title="The Guardian Science Section" src="http://plumnash.com/wp-content/uploads/2010/02/Screenshot1.png" alt="" width="630" height="530" /></a><p
class="wp-caption-text">The Guardian Science Section</p></div><div
id="attachment_194" class="wp-caption alignright" style="width: 644px"><a
href="http://plumnash.com/wp-content/uploads/2010/02/Screenshot-11.png"><img
class="size-full wp-image-194" title="The Guardian Technology Section" src="http://plumnash.com/wp-content/uploads/2010/02/Screenshot-11.png" alt="" width="634" height="544" /></a><p
class="wp-caption-text">The Guardian Technology Section</p></div><p>Furthermore I dislike the prostituting of women (the male nudes were far less sexualized)  for a &#8220;good cause&#8221;.</p> ]]></content:encoded> <wfw:commentRss>http://plumnash.com/uk/guardian-on-science-and-technology/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Mobile Optimised Website W3C Link Checker</title><link>http://plumnash.com/it/mobile-optimised-website-w3c-link-checker/</link> <comments>http://plumnash.com/it/mobile-optimised-website-w3c-link-checker/#comments</comments> <pubDate>Sun, 14 Feb 2010 22:55:39 +0000</pubDate> <dc:creator>peter</dc:creator> <category><![CDATA[IT]]></category> <category><![CDATA[mobile]]></category> <category><![CDATA[iphone]]></category> <category><![CDATA[link checker]]></category> <category><![CDATA[W3C]]></category> <category><![CDATA[web]]></category> <category><![CDATA[web development]]></category><guid
isPermaLink="false">http://plumnash.com/?p=173</guid> <description><![CDATA[This post is about link checking your  mobile optimised site to W3C standard.W3C are a standards body who provides free link checking software, which can be run from their website. Link checking is a great way of improving a site&#8217;s quality and it can be done automatically! But where&#8217;s the support for mobile? I [...]]]></description> <content:encoded><![CDATA[<p>This post is about link checking your  mobile optimised site to W3C standard.W3C are a standards body who provides <a
title="W3C link checker" href="http://validator.w3.org/checklink">free link checking software</a>, which can be run from their website. Link checking is a great way of improving a site&#8217;s quality and it can be done automatically! But where&#8217;s the support for mobile? I found it hard to run any link checkers whilst developing our mobile optimized site, so I tweaked the existing W3C link checker&#8230;</p><p><strong>W3C Link Checker for Mobile</strong></p><p>Finding no mobile link checkers I extended the <a
title="W3C link checker" href="http://search.cpan.org/dist/W3C-LinkChecker/">W3C link checker</a> to do the job. For security reasons you should go to the official site and alter the Perl script manually, but for the trusting the edited script can be downloaded <a
title="Mobile W3C Link Checker" href="http://plumnash.com/checklink-m">here</a> (I&#8217;ve also removed the 1 page per second limit).</p><p>To extend checklink for mobile user agents, add a new line to <strong>line 1307</strong> of the checklink code containing:</p><pre>$request-&gt;header('User-Agent', 'Mobile');
</pre><p>To run this link checker across your entire site you&#8217;ll need to run it recursively (using -r), I run the script using (For -S0 to work you&#8217;ll need to alter the script again):</p><pre>checklink-m -Hbrq -S0 http://stripeylines.com &gt; release-12.2.m.html</pre><p><strong>Future Work<br
/> </strong></p><p>Ideally, the <em>checklink</em> script would be extended and the user-agent passes as a parameter (permitting both PC and mobile site checking). If anyone wishes to take this further I&#8217;d be interested in the end result. If I have no responses in the following weeks I&#8217;ll contact W3C with my suggestions.</p> ]]></content:encoded> <wfw:commentRss>http://plumnash.com/it/mobile-optimised-website-w3c-link-checker/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>iPhone Web Development using Spring Web MVC</title><link>http://plumnash.com/it/iphone-web-development-using-spring/</link> <comments>http://plumnash.com/it/iphone-web-development-using-spring/#comments</comments> <pubDate>Wed, 03 Feb 2010 21:28:20 +0000</pubDate> <dc:creator>peter</dc:creator> <category><![CDATA[IT]]></category> <category><![CDATA[mobile]]></category> <category><![CDATA[iphone]]></category> <category><![CDATA[Java]]></category> <category><![CDATA[m-development]]></category> <category><![CDATA[Spring]]></category> <category><![CDATA[Spring MVC]]></category> <category><![CDATA[Spring Web]]></category> <category><![CDATA[web development]]></category><guid
isPermaLink="false">http://plumnash.com/?p=134</guid> <description><![CDATA[A summary of]]></description> <content:encoded><![CDATA[<p>This post builds on last week&#8217;s post about <a
title="iPhone web optimization" href="http://plumnash.com/it/iphone-mobile-web-optimization/">how to polish your mobile optimized website to work best with the iPhone</a>. This week I&#8217;ll talk about mobile web development using the <a
href="http://static.springsource.org/spring/docs/3.0.x/spring-framework-reference/html/spring-web.html">Spring Web Framework</a>. I&#8217;ve been using the Spring Framework to integrate most of my code base and I was interested in how Spring Web Framework would work with a mobile optimized site. As the Spring Web Framework is mostly back-end I didn&#8217;t really expect any front-end integration issues&#8230;.</p><h2>Spring Web</h2><p>Spring Web MVC provides a Web framework around the Model-View-Controller paradigm. As we see with the workflow picture below this paradigm neatly integrates your presentation level (the View) with your business logic (the Controller) written in Java and XML.</p><div
class="wp-caption alignright" style="width: 514px"><img
class="  " title="Incoming Request workflow in Spring Web MVC" src="http://static.springsource.org/spring/docs/2.0.x/reference/images/mvc.png" alt="Picture describing an incoming Request workflow in Spring Web MVC" width="504" height="323" /><p
class="wp-caption-text">Incoming Request workflow in Spring Web MVC (courtesy of http://static.springsource.org)</p></div><p>If this diagram looks intimidating you might want to check out the <a
href="http://static.springsource.org/spring/docs/3.0.x/spring-framework-reference/html/spring-web.html">Spring Web Framework</a> documentation.</p><h3>Spring Web for Mobile</h3><p>Most major websites  need some form of mobile optimization. Here we talk about the specific changes to Spring Web to develop our iPhone app&#8217;s website: <a
title="Link to mobile site example" href="http://stripeylines.com/">StripeyLines</a>. These changes are split into three main sections:</p><ol><li><strong>Structuring our mobile optimized site</strong> &#8211; We wanted our website for <a
title="Link to mobile site example" href="http://stripeylines.com/">StripeyLines</a> to show one set of HTML pages for our mobile users and another set for our non-mobile (err PC?) users.</li><li><strong>Detecting mobile browsers</strong> &#8211; We wanted to neatly structure how the browsers <em>user-agent</em> was detected.</li><li><strong>Using mobile optimized forms</strong> &#8211; We wanted to have mobile optimized forms in the style of my <a
title="How to create mobile optimised forms." href="http://plumnash.com/it/iphone-mobile-web-optimization/">previous post</a>.</li></ol><h4>Structuring our mobile optimized site</h4><p>Ideally, to make a website for multiple devices we would have the same HTML for both browser types and swapped HTML &#8211; but the <em>defacto</em> mobile web standards set by Apply forbid this. Instead we have mirrored content across both  mobile optimized and  our PC website. This was organised using a strict naming convention:  all our PC pages ended in <em>.jsp</em> all the corresponding mobile pages ended in <em>-m.jsp </em>- which is manageable for our size project. If anyone has a different preferred style you can add to the discussion below.</p><h4>Detecting mobile browsers</h4><p>Having neatly structured out the HTML content into PC and mobile files all we needed was to direct the user to their corresponding page. We followed the Spring Web standard and made  all our public URL&#8217;s  end in <em>.htm</em> which then  resolved to a JSP page ending in <em>.jsp</em> or <em>-m.jsp</em>.</p><p>Implementing this involved extending the standard Spring Web workflow to intercept incoming requests, notably the <a
title="Describes the handler mapping" href="http://static.springsource.org/spring/docs/2.0.x/reference/mvc.html#mvc-handlermapping">SimpleUrlHandlerMapping</a>, which can be found in your Spring &lt;servlet-name&gt;-servlet.xml file. Here is ours below:</p><pre>&lt;!--
This bean maps URL requests to controllers.
--&gt;
&lt;bean id="handlerMapping" class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping"&gt;
&lt;!--
  This interceptor catches all requests and redirects them to portal or mobile html content.
--&gt;
&lt;property name="interceptors"&gt;
   &lt;list&gt;
     &lt;ref bean="MultiViewController"/&gt;
   &lt;/list&gt;
&lt;/property&gt;

&lt;!--
   Catch all .htm requests and use a simple controller to present them
--&gt;
&lt;property name="mappings"&gt;
  &lt;props&gt;
    &lt;prop key="/*.htm"&gt;ForwardViewController&lt;/prop&gt;
  &lt;/props&gt;
&lt;/property&gt;

&lt;/bean&gt;
</pre><p>There are two beans we reference in the exert above: the MultiViewController, which intercepts each incoming request, and the ForwardViewController which handles incoming requests ending in .htm. Whilst the ForwardViewController does nothing, the MultiViewController integrates with Spring by extending the Interceptor interface as shown below.</p><pre><code>/**
 * This Interceptor decides whether to present mobile or PC html content.
 */
public class MultiViewController extends HandlerInterceptorAdapter {
</code></pre><p>This class overrides the <em>postHandle</em> method to additionally:</p><ol><li>Detect the user-agent</li><li>Alter the incoming request to either <em>-m.jsp</em> or <em>.jsp</em></li><li>Handle requests of unknown pages</li></ol><h4>Spring Web Forms</h4><p><a
title="Spring Form Tag library" href="http://static.springsource.org/spring/docs/3.0.x/spring-framework-reference/html/view.html#view-jsp-formtaglib">Spring Forms</a> are a nice feature of the Spring Web Framework. Spring Forms simplifies Web Development for Java Developers by abstracting  HTML forms to  Java Objects. For example, the follow snippet in my JSP:</p><pre>&lt;form:form&gt;
     First Name:&lt;form:input path="firstName" /&gt;
</pre><p>would automatically populate the attribute &#8216;firstName&#8217; of a Java Object when submitted.For those fearful of frameworks, the JSP is compiled to this familiar HTML:</p><pre>&lt;input type="text" value="" name="userEmail" id="userEmail"&gt;
</pre><p>Note the type of &#8220;text&#8221; is assumed by the Spring Integration.</p><h4>Spring Web Forms for iPhone</h4><p>Last week, we optimized HTML forms for the iPhone. This optimization required  un-standard HTML but surprise surprise Spring  Forms only generate standard HTML. Spring Form&#8217;s inputs have the standard HTML types: input, select &#8211; they do not have an &#8216;email&#8217; type. Any tinkering  is blocked at compile time by <a
title="Spring Form Tag library" href="http://static.springsource.org/spring/docs/3.0.x/spring-framework-reference/html/spring-form.tld.html#spring-form.tld.form">Spring&#8217;s Form Tag library definition</a>.<br
/> I&#8217;ve thought of recommending this extension to future Spring Web implementations but I wouldn&#8217;t want to encourage un-standard approaches to web development &#8211; have readers any views on the matter?</p><p>In the end, I opted for a Javascript solution to change the HTML dynamically when the page is loaded.</p><p>So, I defined a Javascript  function to convert the input element</p><pre>/**
 * This javascript is a workaround for presenting mobile safari tags using spring MVC.
 */

/**
 * This function takes an element id and converts it to an email input, removing
 * apple's auto correct / capitalise.
 *
 * @param elementId
 *            the HTML text input into an email input for iPhone optimization
 */
function convertToEmailInput(elementId) {
	document.getElementById(elementId).type = 'email';
	document.getElementById(elementId).setAttribute('autocapitalize', 'off');
	document.getElementById(elementId).setAttribute('autocorrect', 'off');
}
</pre><p>On page load I call the Javascript function with its reference to convert any HTML input fields. The following HTML snippet converts the userEmail input introduced above:</p><pre>&lt;body onload="convertToEmailInput('userEmail');"&gt;
</pre><p>I swallow a bit of pride in posting this, but if anyone has anything to contribute to this page please comment. When I was developing this solution I couldn&#8217;t find any Web resources to my aid! In the following weeks I&#8217;ll contact the Spring Web team and ask  for some mobile extensions &#8211; if you have any thoughts on the matter leave a comment.</p> ]]></content:encoded> <wfw:commentRss>http://plumnash.com/it/iphone-web-development-using-spring/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>iPhone Web Development Tips and Tricks</title><link>http://plumnash.com/it/iphone-mobile-web-optimization/</link> <comments>http://plumnash.com/it/iphone-mobile-web-optimization/#comments</comments> <pubDate>Tue, 26 Jan 2010 22:39:18 +0000</pubDate> <dc:creator>peter</dc:creator> <category><![CDATA[IT]]></category> <category><![CDATA[mobile]]></category> <category><![CDATA[iphone]]></category> <category><![CDATA[ipod]]></category> <category><![CDATA[web]]></category> <category><![CDATA[web development]]></category><guid
isPermaLink="false">http://plumnash.com/?p=127</guid> <description><![CDATA[This post is all about how to polish your mobile optimized website to work best with the iPhone. Mobile is taking off:  it&#8217;s now just a little bit more convenient to pick up your phone for something, then to go and sit in front of a computer. That said, mobile is still extremely inconvenient [...]]]></description> <content:encoded><![CDATA[<p>This post is all about how to polish your mobile optimized website to work best with the iPhone. Mobile is taking off:  it&#8217;s now just a little bit more convenient to pick up your phone for something, then to go and sit in front of a computer. That said, mobile is still extremely inconvenient &#8211; mobile and web developers can make this easier and that&#8217;s the point of this post: a more polished site means higher conversion. Making mobile more convenient is what I&#8217;m currently working on as a day job, see the <a
title="Making mobile more convenient" href="http://stripeylines.com">Stripeylines</a> iPhone app.</p><p>Whilst developing the mobile optimized version for our iPhone app, <a
title="Link to examples" href="http://stripeylines.com">StripeyLines</a>, I discovered that our site (such as our login page) needed some tweaking. These were:</p><ol><li>Stopping auto capitalision on some text input fields (such as usernames)</li><li>Selecting a suitable keyboard</li></ol><a
href='http://plumnash.com/it/iphone-mobile-web-optimization/attachment/photo/' title='An example page without iPhone polish'><img
width="100" height="150" src="http://plumnash.com/wp-content/uploads/2010/01/photo.jpg" class="attachment-thumbnail" alt="Page without polish - pretty inconvenient" title="An example page without iPhone polish" /></a> <a
href='http://plumnash.com/it/iphone-mobile-web-optimization/attachment/photo_sl/' title='Page with email keyboard'><img
width="100" height="150" src="http://plumnash.com/wp-content/uploads/2010/01/photo_sl.jpg" class="attachment-thumbnail" alt="A login with no-autocaps and an email keyboard - perfect!" title="Page with email keyboard" /></a><h3>Autocapitalisation</h3><p>Auto-capitalisation is supposedly to help users using  Apple&#8217;s mobile Safari. You don&#8217;t want this on any case sensitive fields like: <strong>username</strong>, <strong>userId</strong>. To remove apply propriety html to each tag:<br
/> <code>&lt;input autocorrect="off"<br
/> autocapitalize="off" class="text-field" type="email" name="j_username"<br
/> value=""&gt;</code></p><p>Nasty eh? It doesn&#8217;t appear like this Apple plan to standardise this method. It&#8217;s a presentation level, mobile specific style &#8211; why isn&#8217;t this in CSS? For mobile CSS Apple are   following the standards route &#8211; why not on this? All their new mobile specific CSS (those ones starting with -webkit) are typically being proposed for future CSS versions.</p><p>For more info, on these tags and form designing, see <a
href="http://developer.apple.com/iphone/library/documentation/AppleApplications/Reference/SafariWebContent/DesigningForms/DesigningForms.html#//apple_ref/doc/uid/TP40006512-SW2">Apple Dev Docs</a>.</p><h3>Selecting Keyboards</h3><p>We all know user-names which are email addresses are a good idea (except affiliatewindow.com &#8211; shame!). To show an email keyboard, more custom HTML is required. This time Apple has extended the input type to contain the &#8216;email&#8217; field.</p><p><code>&lt;input type="email" /&gt;</code></p><p>To select other  keyboards see <a
href="http://developer.apple.com/safari/library/codinghowtos/Mobile/UserExperience/index.html#GENERAL-CONTROL_WHICH_KEYBOARD_IS_DISPLAYED_WHEN_A_USER_TOUCHES_A_TEXT_FIELD">the Apple Coding How to</a> &#8211; documentation, anyone?</p><h3>Integrating these into the Spring Web Framework</h3><p>Next week, I&#8217;ll take you on the adventure of integrating these tags into the Spring Web Framework.</p> ]]></content:encoded> <wfw:commentRss>http://plumnash.com/it/iphone-mobile-web-optimization/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>UK Social Trends</title><link>http://plumnash.com/uk/uk-social-trends/</link> <comments>http://plumnash.com/uk/uk-social-trends/#comments</comments> <pubDate>Sun, 04 Jan 2009 20:59:16 +0000</pubDate> <dc:creator>peter</dc:creator> <category><![CDATA[UK]]></category><guid
isPermaLink="false">http://www.pjlnash.co.uk/blog/?p=81</guid> <description><![CDATA[The following post highlights some of the more interesting tables from the UK National Statistics report on Social Trends.
This post is split into the following categories:Equality and Inequality
Girls are better than boys at Maths and Science
Table 3.12 Pupils reaching or exceeding expected standards through teacher assessment: by Key Stage and sex (page 38 )
At all [...]]]></description> <content:encoded><![CDATA[<p>The following post highlights some of the more interesting tables from the <a
href="http://www.statistics.gov.uk/statbase/Product.asp?vlnk=13675">UK National Statistics report on Social Trends.</a></p><p>This post is split into the following categories:<br
/></p><h1>Equality and Inequality</h1><h3>Girls are better than boys at Maths and Science</h3><p><a
href="http://www.statistics.gov.uk/downloads/theme_social/Social_Trends38/03_12.xls">Table 3.12 Pupils reaching or exceeding expected standards through teacher assessment: by Key Stage and sex (page 38 )</a></p><h3>At all ages males commit more crimes than females.</h3><div
id="attachment_102" class="wp-caption alignright" style="width: 240px"><a
href="http://www.pjlnash.co.uk/blog/wp-content/uploads/2008/12/picture-3.png"><img
class="alignright size-thumbnail wp-image-84" src="http://www.pjlnash.co.uk/blog/wp-content/uploads/2008/12/picture-3-150x150.png" alt="" width="150" height="150" /></a><p
class="wp-caption-text">Crimes committed by age and gender</p></div><p><a
href="http://www.statistics.gov.uk/downloads/theme_social/Social_Trends38/09_12.xls">Figure 9.12 Offenders as a percentage of the population: by sex and age, 2006 (page 129)</a></p><h1>Social Myths</h1><h3>Only 42% of Burglaries result in loss</h3><p>Also, only 57% of burglaries involve entry.<br
/> <a
href="http://www.statistics.gov.uk/downloads/theme_social/Social_Trends38/09_03.xls">Table 9.3 Domestic burglary: by type (page 124)</a></p><h3>Only 29% of phone thefts happen when carried by its owner</h3><p><a
href="http://www.statistics.gov.uk/downloads/theme_social/Social_Trends38/09_04.xls">Figure 9.4 Mobile phone theft: by circumstance of how the phone was stolen, 2005/06 (page 124)</a></p><h3>Young girls are more promiscuous then young men (16-19)</h3><div
id="attachment_102" class="wp-caption alignright" style="width: 240px"><a
href="http://www.pjlnash.co.uk/blog/wp-content/uploads/2008/12/picture-2.png"><img
class="size-thumbnail wp-image-102" title="picture-2" src="http://www.pjlnash.co.uk/blog/wp-content/uploads/2008/12/picture-2-150x150.png" alt="No. of sexual partners by gender (16-19 years)" width="150" height="150" /></a><p
class="wp-caption-text">No. of sexual partners by gender (16-19 years)</p></div><p><a
href="http://www.statistics.gov.uk/downloads/theme_social/Social_Trends38/07_19.xls">Table 7.19 Number of sexual partners in the previous year: by sex and age, 2006/07 (page 104)</a></p><p><br/><br/><br/></p><h3>More new HIV diagnosis is due to heterosexual sex</h3><p>Nearly double the amount of new HIV diagnosis were the result of heterosexual sex, than homosexual sex; also Heterosexual sex caused 25 times more infections than injecting drug use. Note, this is per thousand and <strong>not</strong> a percentage of each group.</p><div
id="attachment_85" class="wp-caption alignright" style="width: 240px"><a
href="http://www.pjlnash.co.uk/blog/wp-content/uploads/2008/12/picture-4.png"><img
class="size-thumbnail wp-image-85" title="picture-4" src="http://www.pjlnash.co.uk/blog/wp-content/uploads/2008/12/picture-4-150x150.png" alt="New Diagnosis of HIV" width="150" height="150" /></a><p
class="wp-caption-text">New Diagnosis of HIV</p></div><p><a
href="http://www.statistics.gov.uk/downloads/theme_social/Social_Trends38/07_22.xls"> Figure 7.22 New HIV diagnoses: by year and route of transmission (page 106)</a></p><h3>Only half of people summoned actually serve Jury duty</h3><p>Table 9.21 Jury summons for Crown and Civil Courts (page 134)</p><h3>Safer to be a cyclist than a pedestrian</h3><p>Cycling is the third most lethal form of transport, after walking and motorcycling.<br
/> <a
href="http://www.statistics.gov.uk/downloads/theme_social/Social_Trends38/12_18.xls">Table 12.18 Passenger death rates: by mode of transport (page 173)</a></p><h1><span
id="more-81"></span>Social Questions</h1><h3><a
href="http://www.statistics.gov.uk/downloads/theme_social/Social_Trends38/11_10.xls">Suicide rates for women(44+) drop by 2/3ds between 1980 and 2000, while men(25-44) double from 1980 to 2000</a></h3><p><a
href="http://www.statistics.gov.uk/downloads/theme_social/Social_Trends38/07_08.xls">Figure 7.18 Suicide rates: by sex and age (page 103)</a></p><h3>More likely to be beaten up by acquaintance than violently mugged</h3><p><a
href="http://www.statistics.gov.uk/downloads/theme_social/Social_Trends38/09_05.xls">Figure 9.5 Violent crimes: by type (page 125)</a></p><h3>Reoffending rate of 82% for theft from vehicles &#8211; is prison the solution?</h3><p><a
href="http://www.statistics.gov.uk/downloads/theme_social/Social_Trends38/09_18.xls">Figure 9.18 Prisoners reconvicted within two years: by offence category (page 132)</a></p><h1>A little surprising&#8230;</h1><p></p><h3>Nearly half of people &#8216;don&#8217;t have good enough health&#8217; to play sport</h3><p>This strikes me as a surprising reason to provide for not playing sport, which presumably improves health?<br
/> <a
href="http://www.statistics.gov.uk/downloads/theme_social/Social_Trends38/13_13.xls">Figure 13.13 Main reason for non-participation in an active sport, 2005/06 (page 186)</a></p><h3>Domestic energy consumption is higher for water than for lighting, appliances and cooking combined</h3><div
id="attachment_88" class="wp-caption alignright" style="width: 240px"><a
href="http://www.pjlnash.co.uk/blog/wp-content/uploads/2008/12/picture-5.png"><img
class="size-thumbnail wp-image-88" title="picture-5" src="http://www.pjlnash.co.uk/blog/wp-content/uploads/2008/12/picture-5-150x150.png" alt="Domestic Energy Consumption" width="150" height="150" /></a><p
class="wp-caption-text">Domestic Energy Consumption</p></div><p><a
href="http://www.statistics.gov.uk/downloads/theme_social/Social_Trends38/11_10.xls">Figure 11.10 Domestic energy consumption: by final use (page 156)</a><br
/></p><p></p> ]]></content:encoded> <wfw:commentRss>http://plumnash.com/uk/uk-social-trends/feed/</wfw:commentRss> <slash:comments>2</slash:comments> </item> <item><title>A40(M) Roundabout</title><link>http://plumnash.com/urban/a40m-roundabout/</link> <comments>http://plumnash.com/urban/a40m-roundabout/#comments</comments> <pubDate>Sun, 16 Nov 2008 21:11:14 +0000</pubDate> <dc:creator>peter</dc:creator> <category><![CDATA[Urban]]></category> <category><![CDATA[art]]></category> <category><![CDATA[commute]]></category> <category><![CDATA[distopian]]></category> <category><![CDATA[porn]]></category> <category><![CDATA[urban art]]></category> <category><![CDATA[utopian]]></category><guid
isPermaLink="false">http://www.pjlnash.co.uk/blog/?p=61</guid> <description><![CDATA[A day in the life of a lonely roundabout from Transport for London camera 547304.
]]></description> <content:encoded><![CDATA[<p>A day in the life of a lonely roundabout from Transport for London camera 547304.</p><p><object
width="425" height="350"><param
name="movie" value="http://www.youtube.com/v/X1NS-5Am-tk&#038;autoplay=1"></param> <embed
src="http://www.youtube.com/v/X1NS-5Am-tk&#038;autoplay=1" type="application/x-shockwave-flash" width="425" height="350"></embed></object></p> ]]></content:encoded> <wfw:commentRss>http://plumnash.com/urban/a40m-roundabout/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>VirtualBox Enhancement for Opening WinXP Applications</title><link>http://plumnash.com/it/virtualbox-enhancement-for-opening-winxp-applications/</link> <comments>http://plumnash.com/it/virtualbox-enhancement-for-opening-winxp-applications/#comments</comments> <pubDate>Sun, 16 Nov 2008 20:13:54 +0000</pubDate> <dc:creator>peter</dc:creator> <category><![CDATA[IT]]></category> <category><![CDATA[microsoft word on linux]]></category> <category><![CDATA[office]]></category> <category><![CDATA[seamless integration]]></category> <category><![CDATA[ubuntu]]></category> <category><![CDATA[VirtualBox]]></category> <category><![CDATA[virtualisation]]></category> <category><![CDATA[winxp]]></category><guid
isPermaLink="false">http://www.pjlnash.co.uk/blog/?p=39</guid> <description><![CDATA[This guide explains how to open Microsoft Word Files from an Ubuntu host in Microsoft Word using a Windows XP Virtual Machine. In fact, this mechanism can be used to open lots of file types in seamlessly in any Guest from any Host. This extensions builds upon the seamless integration provided by VirtualBox to create [...]]]></description> <content:encoded><![CDATA[<p>This guide explains how to open Microsoft Word Files from an Ubuntu host in Microsoft Word using a Windows XP Virtual Machine. In fact, this mechanism can be used to open lots of file types in seamlessly in any Guest from any Host. This extensions builds upon the seamless integration provided by VirtualBox to create a more convenient user interface for using multiple operating systems in parallel.</p><h3>Motivation</h3><p>I use VirtualBox to open Microsoft Word programs on my Ubuntu host in my Windows XP Virtual Machine. I found this was extremely frustrating, firstly finding the file in my Ubuntu, then navigating to the same file in my Windows Virtual Machine and so I requested a new feature: <a
href="http://www.virtualbox.org/ticket/2482">http://www.virtualbox.org/ticket/2482</a>, to run commands in my Windows Guest Machine from my Ubuntu Host.</p><h3>Brief Overview</h3><p>The application launcher installation involves four main steps:</p><ol><li><a
href="#toc-share-of-ubuntu-host-folders">Share of Ubuntu Host folders</a></li><li><a
href="#toc-mapping-of-host-folders-in-windows-xp-guest">Mapping of Host folders in Windows XP guest</a></li><li><a
href="#toc-write-a-script-in-ubuntu-host-used-to-send-file-names-to-open">Write a Script in Ubuntu Host, used to send file names to open</a></li><li><a
href="#toc-write-a-script-in-windows-xp-guest-listening-for-file-names-to-open">Write a Script in Windows XP Guest, listening for file names to open</a></li></ol><h3>Technical Detail</h3><p>The file name is sent from the Host Machine to the Guest Machine using a VirtualBox guestproperty which both the Host and Guest Machines can access. This is periodically checked by the Guest Machine, launching the file using Window XP&#8217;s default launcher.</p><h3>Share of Ubuntu Host folders</h3><p>The Windows Virtual Machine needs to access Host&#8217;s files. Only shared files can be opened on the Window&#8217;s Virtual Machine. I found VirtualBox&#8217;s shared folders too slow, so I shared my ubuntu root using samba; so the files on my hardisk are accessible on the network using //my-laptop/root. This is a potential security risk, so I configured Samba to require credentials (there is also a I.P. filtering option). For people concerned about security, I&#8217;d recommend sharing only your Documents folder.</p><p>To recap, share your root folder, or a &#8216;Documents&#8217; folder. Note only files in this directory can be opened on the Virtual Machine.</p><h3>Mapping of Host folders in Windows XP guest</h3><p>Having presented your Documents folder on the network, map the network drive to Z: (this drive letter is configurable in the Window&#8217;s Script listed below). I found that on a starting my Windows Virtual Machine my machines hostname was not accessible immediately, if you rarely change networks considering using your I.P. which can be resolved instantly.</p><h3>Write a Script in Ubuntu Host, used to send file names to open</h3><p>We need a <a
href="http://www.pjlnash.co.uk/files/vmword.sh">Bash Script</a> to be run in Ubuntu to send the document&#8217;s filename to a named Window&#8217;s Virtual Machine. This script expects a Virtual Machine called &#8216;WinXP&#8217;, change this reference if your Window&#8217;s Virtual Machine name is different.<br
/> <br
/> This script should be used to open Word files, instead of OpenOffice, this can be specified the &#8216;Open with Other Applications&#8217; menu item, when right clicking on a word file. Don&#8217;t forget to make the file executable, using:</p><blockquote><p> chmod +x vmword.sh</p></blockquote><p>If you experience difficulties with this step try running the script from the command line, checking /tmp/vmword.log for output.</p><blockquote><p># This program sends all arguments to a guest property called &#8216;wordfile&#8217; for a Virtual Machine called &#8216;WinXP&#8217;<br
/> VBoxManage guestproperty set WinXP wordfile &#8220;$*&#8221; &gt; /tmp/vmword.log</p></blockquote><h3>Write a Script in Windows XP Guest, listening for file names to open</h3><p>We now need a more complex <a
href="http://www.pjlnash.co.uk/files/vmword.bat">Window&#8217;s Batch Script</a> to receive and open the filename. This should be started on Window&#8217;s startup, by copying into the Startup folder in the Windows Startup Menu; there may be better ways to make this a daemon.</p><p>I am unfamiliar with Batch Programming, so this script could probably be neatened, but it does the following:</p><ol><li>Checks for new filenames every second (unfortunately using inefficient polling)</li><li>Converts the filename from the Linux Location to the Windows location</li><li>Opens the file</li></ol><p>The script requires the sleep program, this is included the rktools.exe, which can be downloaded from: <a
href="http://www.microsoft.com/downloads/details.aspx?familyid=9d467a69-57ff-4ae7-96ee-b18c4790cffd&amp;displaylang=en">http://www.microsoft.com/downloads/details.aspx?familyid=9d467a69-57ff-4ae7-96ee-b18c4790cffd&amp;displaylang=en</a><br
/> <br
/> The filename conversion process is dependent on which folder you shared, and which drive is mapped to that share.<br
/> My conversion process is basic and does the following:</p><ol><li>Removes &#8216;Value:  &#8216; from the Value returned from the VBoxcommand</li><li>Prefixes filename with &#8216;z:&#8217;</li></ol><blockquote><p>@echo off<br
/> rem This batch script listens to the guestproperty &#8216;wordfile&#8217; for its machine.<br
/> rem The program checks to see if a value is set, and if so, changes the name from<br
/> rem &#8216;/file.doc/&#8217; to &#8216;z:/file.doc&#8217;<br
/> rem The word file is then opened in a new cmd window executing the filename, which opens in the default application.<br
/> rem This program requires sleep, which is included in rktool.exe to be installed from<br
/> rem http://www.microsoft.com/downloads/details.aspx?familyid=9d467a69-57ff-4ae7-96ee-b18c4790cffd&amp;displaylang=en</p><p>:start</p><p>sleep 1<br
/> VBoxControl -nologo guestproperty get wordfile | find /v &#8220;No value set!&#8221; &gt; read.txt</p><p>if errorlevel 1 goto start</p><p>rem Read file and get filename and convert</p><p>type read.txt<br
/> setlocal enabledelayedexpansion<br
/> set SEPARATOR=/<br
/> set filecontent=<br
/> set root=z:<br
/> for /f &#8220;delims=&#8221; %%a in (&#8216;type read.txt&#8217;) do (<br
/> set currentline=%%a<br
/> set filecontent=!currentline!<br
/> )</p><p>rem trim string; removing VirtualBox text<br
/> set filecontent=%filecontent:~7%</p><p>set overallfilecontent=&#8221;!root!%filecontent%&#8221;</p><p>echo The file contents are: %overallfilecontent%</p><p>rem start program<br
/> start cmd /C %overallfilecontent%</p><p>rem delete filename from guestproperty.<br
/> VBoxControl -nologo guestproperty set wordfile</p><p>goto start</p></blockquote> ]]></content:encoded> <wfw:commentRss>http://plumnash.com/it/virtualbox-enhancement-for-opening-winxp-applications/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>Art Nouveau Furniture</title><link>http://plumnash.com/regrets/art-nouveau-furniture/</link> <comments>http://plumnash.com/regrets/art-nouveau-furniture/#comments</comments> <pubDate>Wed, 12 Nov 2008 22:23:30 +0000</pubDate> <dc:creator>peter</dc:creator> <category><![CDATA[Regrets]]></category> <category><![CDATA[art noveau]]></category> <category><![CDATA[decoration]]></category> <category><![CDATA[gothic]]></category> <category><![CDATA[peter nash]]></category><guid
isPermaLink="false">http://www.pjlnash.co.uk/blog/?p=32</guid> <description><![CDATA[One night of broken dreams.]]></description> <content:encoded><![CDATA[<h3>The Plan</h3><p>I planned to decorate my room in an art nouveau style.</p><h3>The design</h3><p
style="text-align: center;"><a
href="http://www.pjlnash.co.uk/blog/wp-content/uploads/2008/11/dsc_0132_black_invert.jpg"><img
class="aligncenter size-medium wp-image-33" title="Furniture Plan" src="http://www.pjlnash.co.uk/blog/wp-content/uploads/2008/11/dsc_0132_black_invert.jpg" alt="This is my design for two window frames." width="381" height="139" /></a></p><p>I envisioned making covers for my two windows, and stenciled drawings of winding plants.</p><h3>What went wrong</h3><p>I swiftly lost interest in the idea, after the cardboard tried to kill me.</p> ]]></content:encoded> <wfw:commentRss>http://plumnash.com/regrets/art-nouveau-furniture/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> </channel> </rss>
<!-- This site's performance optimized by W3 Total Cache. Dramatically improve the speed and reliability of your blog!

Learn more about our WordPress Plugins: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using disk (user agent is rejected)
Database Caching 8/15 queries in 0.034 seconds using disk

Served from: pjlnash.localdomain @ 2010-03-10 18:32:07 -->