<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/">
	<channel>
		<title>Codestore Activity Log</title>
		<description>Latest ten updates to codestore, be they blogs or articles.</description>
		<language>en-gb</language>
		<link>http://www.codestore.net</link>
		<lastBuildDate>Thu, 2 Feb 2012 08:05:56 -0500</lastBuildDate>
		<atom:link href="http://www.codestore.net/store.nsf/rss.xml" rel="self" type="application/rss+xml" />

		<item>
			<title>Blocking Google Search Results | Blog</title>
			<pubDate>Thu, 2 Feb 2012 08:05:56 -0500</pubDate>
			<author>Jake Howlett</author>
			<description><![CDATA[ <p>I've wanted this feature for ages - the ability to tell Google not to include results from certain websites. And now it's here:</p> <p><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.codestore.net/store.nsf/rsrc/3B7ED77283CBBDF086257998004D7260/$file/image_57d9064a-1fcb-43e8-864c-d383ded9aa8b.png" width="575" height="433"></p> <p>I first noticed it when doing the following:</p> <ol> <li>Searched for a solution to some obscure (often Notes-related) issue.</li> <li>Accidentally hit a result for a site that requires registration and/or payment.</li> <li>Immediately hit the back button.</li></ol> <p>If now that, if you press the back button quickly enough, Google will show a "block this site" link under the result you clicked on.</p> <p>Or you can try and manually add sites <a href="http://www.google.co.uk/reviews/t?hl=en">at this page</a> (?) if you're logged in to Google.</p>
<p><a href="http://www.codestore.net/store.nsf/unid/BLOG-20120202-0805?open#post"><img border="0" src="http://www.codestore.net/store.nsf/images/rss_reply.gif" alt="Click here to post a response" /></a></p> 		]]></description>
			<link>http://www.codestore.net/store.nsf/unid/BLOG-20120202-0805</link>
			<guid isPermaLink="true">http://www.codestore.net/store.nsf/unid/BLOG-20120202-0805</guid>
			<comments>http://www.codestore.net/store.nsf/unid/BLOG-20120202-0805?Open#comments</comments>
			<slash:comments>10</slash:comments>
			<wfw:commentRss>http://www.codestore.net/store.nsf/blog.xml?Open=20120202-0805</wfw:commentRss>
		</item>
		<item>
			<title>Why Might Notes Consider a MIME Field To Be Rich Text? | Blog</title>
			<pubDate>Tue, 31 Jan 2012 06:56:36 -0500</pubDate>
			<author>Jake Howlett</author>
			<description><![CDATA[ <p>I hate the idea of turning this site in to my own forum, but have an "interesting" problem for you, which might help to have the answer on the internet, so...</p> <p>I'm in the process of writing code to loop all messages in a Notes inbox, so I can examine their content. Now, consider this document and its Body field:</p> <p><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.codestore.net/store.nsf/rsrc/88212B07774BA26086257996004717B6/$file/image_1e30ea50-50fe-4237-bf8f-c3ffda65000c.png" width="324" height="220"></p> <p>The Body field is obviously MIME, right?</p> <p>As confirmed by ScanEz.</p> <p><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.codestore.net/store.nsf/rsrc/2CA58C458057F4D486257996004718EE/$file/image_88b0a8ba-868d-4492-9880-afda14d15dc0.png" width="509" height="285"></p> <p>If you were to run the following code against the above document, what would you expect to see?</p><pre class="code2">Item item <span class="TPoperator">= </span>document.getFirstItem<span class="TPbracket">(</span><span class="TPstring">"Body"</span><span class="TPbracket">)</span>;

<span class="TPkeyword1">if </span><span class="TPbracket">(</span>item.getType<span class="TPbracket">()</span><span class="TPoperator">==</span>Item.RICHTEXT<span class="TPbracket">){</span>
    <span class="TPkeyword2">System</span>.out.println<span class="TPbracket">(</span><span class="TPstring">"Item is Rich Text"</span><span class="TPbracket">)</span>;
    
<span class="TPbracket">} </span><span class="TPkeyword1">else if </span><span class="TPbracket">(</span>item.getType<span class="TPbracket">()</span><span class="TPoperator">==</span>Item.MIME_PART<span class="TPbracket">){</span>
    <span class="TPkeyword2">System</span>.out.println<span class="TPbracket">(</span><span class="TPstring">"Item is MIME"</span><span class="TPbracket">)</span>;
    
<span class="TPbracket">} </span><span class="TPkeyword1">else </span><span class="TPbracket">{</span>
    <span class="TPkeyword2">System</span>.out.println<span class="TPbracket">(</span><span class="TPstring">"Item is another type"</span><span class="TPbracket">)</span>;
    
<span class="TPbracket">}</span>
</pre>
<p>Now, I'd expect it to say it was a MIME field. Wouldn't you? But it doesn't. It says it's Rich Text!</p>
<p>I put this down to a quirk and decided to ignore what it was telling me and just go ahead and examine the MIME parts directly. Here's the code I used at first:</p><pre class="code2">session.setConvertMIME<span class="TPbracket">(</span><span class="TPkeyword1">false</span><span class="TPbracket">)</span>;

MIMEEntity me <span class="TPoperator">= </span>document.getMIMEEntity<span class="TPbracket">(</span><span class="TPstring">"Body"</span><span class="TPbracket">)</span>;

<span class="TPkeyword1">if </span><span class="TPbracket">(</span><span class="TPkeyword1">null</span><span class="TPoperator">!=</span>me<span class="TPbracket">){</span>
    <span class="TPkeyword2">System</span>.out.println<span class="TPbracket">(</span><span class="TPstring">"FOUND MIME ITEM!"</span><span class="TPbracket">)</span>;
<span class="TPbracket">} </span><span class="TPkeyword1">else </span><span class="TPbracket">{</span>
    <span class="TPkeyword2">System</span>.out.println<span class="TPbracket">(</span><span class="TPstring">"CAN'T FIND MIME ITEM!"</span><span class="TPbracket">)</span>;
<span class="TPbracket">}</span>

session.setConvertMIME<span class="TPbracket">(</span><span class="TPkeyword1">true</span><span class="TPbracket">)</span>;
</pre>I'd expect it say it found a MIME item by that name, but this code says it can't find a MIME item. WTH? 
<p>Why on earth might Notes not be able to find a MIME field when it's obviously there and why might it consider it Rich Text instead? It's driving me spare.</p>
<h4>UPDATE: Found the Solution</h4>
<p>Ok, here's why it happens. If you combine the two code snippets above, like so:</p><pre class="code2">Item item <span class="TPoperator">= </span>document.getFirstItem<span class="TPbracket">(</span><span class="TPstring">"Body"</span><span class="TPbracket">)</span>;

<span class="TPkeyword1">if </span><span class="TPbracket">(</span>item.getType<span class="TPbracket">()</span><span class="TPoperator">==</span>Item.MIME_PART<span class="TPbracket">){</span>
    session.setConvertMIME<span class="TPbracket">(</span><span class="TPkeyword1">false</span><span class="TPbracket">)</span>;
        
    MIMEEntity me <span class="TPoperator">= </span>item.getMIMEEntity<span class="TPbracket">()</span>;        
    <span class="TPkeyword1">if </span><span class="TPbracket">(</span><span class="TPkeyword1">null</span><span class="TPoperator">!=</span>me<span class="TPbracket">){</span>
        <span class="TPkeyword2">System</span>.out.println<span class="TPbracket">(</span><span class="TPstring">"FOUND MIME ITEM!"</span><span class="TPbracket">)</span>;
    <span class="TPbracket">} </span><span class="TPkeyword1">else </span><span class="TPbracket">{</span>
        <span class="TPkeyword2">System</span>.out.println<span class="TPbracket">(</span><span class="TPstring">"CAN'T FIND MIME ITEM!"</span><span class="TPbracket">)</span>;
    <span class="TPbracket">}        </span>
    session.setConvertMIME<span class="TPbracket">(</span><span class="TPkeyword1">true</span><span class="TPbracket">)</span>;
    
<span class="TPbracket">} </span><span class="TPkeyword1">else </span><span class="TPbracket">{</span>
    <span class="TPkeyword2">System</span>.out.println<span class="TPbracket">(</span><span class="TPstring">"Item is another type"</span><span class="TPbracket">)</span>;
<span class="TPbracket">}</span>
</pre>
<p>This won't work. The code will never get as far as the MIMEEntity bit as Item.getType() will never return MIME_PART.</p>
<p>However, this code will work:</p><pre class="code2">session.setConvertMIME<span class="TPbracket">(</span><span class="TPkeyword1">false</span><span class="TPbracket">)</span>;

Item item <span class="TPoperator">= </span>document.getFirstItem<span class="TPbracket">(</span><span class="TPstring">"Body"</span><span class="TPbracket">)</span>;

<span class="TPkeyword1">if </span><span class="TPbracket">(</span>item.getType<span class="TPbracket">()</span><span class="TPoperator">==</span>Item.MIME_PART<span class="TPbracket">){</span>
    MIMEEntity me <span class="TPoperator">= </span>item.getMIMEEntity<span class="TPbracket">()</span>;        
    <span class="TPkeyword1">if </span><span class="TPbracket">(</span><span class="TPkeyword1">null</span><span class="TPoperator">!=</span>me<span class="TPbracket">){</span>
        <span class="TPkeyword2">System</span>.out.println<span class="TPbracket">(</span><span class="TPstring">"FOUND MIME ITEM!"</span><span class="TPbracket">)</span>;
    <span class="TPbracket">} </span><span class="TPkeyword1">else </span><span class="TPbracket">{</span>
        <span class="TPkeyword2">System</span>.out.println<span class="TPbracket">(</span><span class="TPstring">"CAN'T FIND MIME ITEM!"</span><span class="TPbracket">)</span>;
    <span class="TPbracket">}        </span>
    
<span class="TPbracket">} </span><span class="TPkeyword1">else </span><span class="TPbracket">{</span>
    <span class="TPkeyword2">System</span>.out.println<span class="TPbracket">(</span><span class="TPstring">"Item is another type"</span><span class="TPbracket">)</span>;
<span class="TPbracket">}</span>

session.setConvertMIME<span class="TPbracket">(</span><span class="TPkeyword1">true</span><span class="TPbracket">)</span>;
</pre>
<p>It all comes down to where you turn off MIME conversion for the session. It needs to happen before you look at the types of any field. Makes "sense". I guess. In a kind of it doesn't really kind of way.</p>
<p><a href="http://www.codestore.net/store.nsf/unid/BLOG-20120131-0656?open#post"><img border="0" src="http://www.codestore.net/store.nsf/images/rss_reply.gif" alt="Click here to post a response" /></a></p> 		]]></description>
			<link>http://www.codestore.net/store.nsf/unid/BLOG-20120131-0656</link>
			<guid isPermaLink="true">http://www.codestore.net/store.nsf/unid/BLOG-20120131-0656</guid>
			<comments>http://www.codestore.net/store.nsf/unid/BLOG-20120131-0656?Open#comments</comments>
			<slash:comments>8</slash:comments>
			<wfw:commentRss>http://www.codestore.net/store.nsf/blog.xml?Open=20120131-0656</wfw:commentRss>
		</item>
		<item>
			<title>Two Websites I've Been Asked To Make | Blog</title>
			<pubDate>Fri, 27 Jan 2012 03:44:02 -0500</pubDate>
			<author>Jake Howlett</author>
			<description><![CDATA[ <p>Normally when family or friends say they need a website I roll my eyes and hope there's a way I can get out of doing it. But then my older brother, Tim, asked me to do one that actually got me quite interested.</p> <p>Tim's the engineer for a local radio station and is responsible for making sure - amongst other things - the station stays on air. He wants a way to monitor the output level of the station's signal remotely. So he's bought an Arduino kit and written a "sketch" file to have it monitor audio signal levels via a 3.5mm input jack.</p> <p><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="2012-01-27 09.24.23" border="0" alt="2012-01-27 09.24.23" src="http://www.codestore.net/store.nsf/rsrc/73B5966E1C77F07C862579920035750A/$file/2012-01-27%2009.24.23_6b0ad8ba-c557-4c6c-850b-a98e7c5707c7.jpg" width="564" height="424"></p> <p>The Arduino board has a network connection and the plan is to put it on their network and it give a publically resolvable IP address. The Arduino board will respond to a HTTP request with a text/plain response that contains a number from 1 to 20 that is a measure of the output at that moment.</p> <p>What Tim wants me to do is write a web front end to this. It needs to regularly "ping" the Arduino board to get the output signal and make some kind of visual indicator of historic output. If it drops to 0 for any length of time then he's got an issue. Either the Arduino has packed up or station is off air.</p> <p>This is the kind of geekery I enjoy and I'm looking forward to getting stuck in to it. The Arduino in the shot above is in my possession and I'm free to mess about with it as I please.</p> <p>Also on my to-do list is to make a website for Quinn's boyfriend's dad's driving school. He too has produced a "sketch" to show me how it should look:</p> <p><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.codestore.net/store.nsf/rsrc/0DE090DCC00019428625799200357831/$file/image_45a120ff-b3b8-4d2e-9cb5-8420c3b5e985.png" width="528" height="487"></p> <p>Quinn's boyfriend is a talented artist and currently studying on a Computer Animation course at university. He must have gotten his talents from his mum's side me thinks.</p> <p>Which website do you think I'll do first? Hmm....</p>
<p><a href="http://www.codestore.net/store.nsf/unid/BLOG-20120127-0344?open#post"><img border="0" src="http://www.codestore.net/store.nsf/images/rss_reply.gif" alt="Click here to post a response" /></a></p> 		]]></description>
			<link>http://www.codestore.net/store.nsf/unid/BLOG-20120127-0344</link>
			<guid isPermaLink="true">http://www.codestore.net/store.nsf/unid/BLOG-20120127-0344</guid>
			<comments>http://www.codestore.net/store.nsf/unid/BLOG-20120127-0344?Open#comments</comments>
			<slash:comments>11</slash:comments>
			<wfw:commentRss>http://www.codestore.net/store.nsf/blog.xml?Open=20120127-0344</wfw:commentRss>
		</item>
		<item>
			<title>New Desk Speakers: Bose Companion 5s | Blog</title>
			<pubDate>Thu, 26 Jan 2012 03:51:40 -0500</pubDate>
			<author>Jake Howlett</author>
			<description><![CDATA[ <p>Almost ten years ago I <a href="http://www.codestore.net/store.nsf/unid/BLOG-20020702">bought some Bose MediaMate</a>. Thankfully Bose have got their online act together since then and buying the new pair you see below was quite a bit easier.</p> <p><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="2012-01-26 09.21.12" border="0" alt="2012-01-26 09.21.12" src="http://www.codestore.net/store.nsf/rsrc/40294720372B27A386257991003628FA/$file/2012-01-26%2009.21.12_57af559d-c851-4229-a194-36d848498521.jpg" width="564" height="416"></p> <p>I've replaced the MediaMates with a set of <a href="http://www.bose.co.uk/GB/en/home-and-personal-audio/digital-music-solutions/computer-speakers/companion-5-speaker-system/">Companion 5s</a>. They're a bit pricey, but I listen to music 8 hours a day, 5 days a week. The speakers I use are arguably as important a choice as the monitor. Well, that's the argument I made to my wife anyway.</p> <p>The MediaMate's (which are <a href="http://www.ebay.co.uk/itm/Bose-MediaMate-Computer-Speakers-/280811689643">on ebay</a> if you want them) were always good speakers, but the Companions have blown me away (almost literally until I turned the "bass compensation" knob down). I can't believe the difference. Probably made by the subwoofer - sorry, "AcoustiMass Module" - under my desk.</p> <p>I'm not an expert in acoustics but have an appreciation for what - to me - seems like a decent sound. If you read in the forums, which I don't, then you'll hear a lot of bad stuff about Bose. Over-priced and cleverly marketed, apparently, which may be true but they've got me. I get "brand blindness". Once I've bought something I like then I'll only ever buy another of them from the same company. </p> <p>If you want to test out your speakers here's <a href="http://soundcloud.com/florian-meindl/florian-meindl-ritter-butzke">a good track</a>. If they can't handle that you need a new pair.</p>
<p><a href="http://www.codestore.net/store.nsf/unid/BLOG-20120126-0351?open#post"><img border="0" src="http://www.codestore.net/store.nsf/images/rss_reply.gif" alt="Click here to post a response" /></a></p> 		]]></description>
			<link>http://www.codestore.net/store.nsf/unid/BLOG-20120126-0351</link>
			<guid isPermaLink="true">http://www.codestore.net/store.nsf/unid/BLOG-20120126-0351</guid>
			<comments>http://www.codestore.net/store.nsf/unid/BLOG-20120126-0351?Open#comments</comments>
			<slash:comments>8</slash:comments>
			<wfw:commentRss>http://www.codestore.net/store.nsf/blog.xml?Open=20120126-0351</wfw:commentRss>
		</item>
		<item>
			<title>Adding Even More HTML5 Goodness to Codestore | Blog</title>
			<pubDate>Mon, 23 Jan 2012 03:24:07 -0500</pubDate>
			<author>Jake Howlett</author>
			<description><![CDATA[ <p>I used to pride myself on keeping this site up there on the bleeding edge of best web design practice. That hasn't been the case as much lately though and this site's backend HTML has stagnated for years. It keeps up with things but generally lags behind. </p> <p>In trying to catch up with the pace I posted on Friday about how <a href="http://www.codestore.net/store.nsf/unid/BLOG-20120120-0204">I'd funked-up the search box</a>. Not wanting to stop there I've now taken it a little further and converted as much of the site's markup to HTML5 as I dare.</p> <p>The general structure of a page is now like this:</p><pre class="code2"><p><span class="TPkeyword1">&lt;!doctype html&gt;
&lt;body&gt;</span>
<span class="TPkeyword1"> &lt;div </span><span class="TPkeyword3">id</span>=<span class="TPstring">"container"</span><span class="TPkeyword1">&gt;</span>
  <span class="TPkeyword1">&lt;</span>header<span class="TPkeyword1">&gt;</span>
   <span class="TPkeyword1">&lt;</span>nav<span class="TPkeyword1">&gt;</span>
    <span class="TPkeyword1">&lt;ul&gt;&lt;/ul&gt;</span>
   <span class="TPkeyword1">&lt;/</span>nav<span class="TPkeyword1">&gt;</span>
  <span class="TPkeyword1">&lt;/</span>header<span class="TPkeyword1">&gt;</span>
  <span class="TPkeyword1">&lt;</span>section <span class="TPkeyword3">id</span>=<span class="TPstring">"side"</span><span class="TPkeyword1">&gt;</span>
  <span class="TPkeyword1">&lt;/</span>section<span class="TPkeyword1">&gt;</span>
  <span class="TPkeyword1">&lt;</span>section <span class="TPkeyword3">id</span>=<span class="TPstring">"content"</span><span class="TPkeyword1">&gt;</span>
   <span class="TPkeyword1">&lt;</span>article<span class="TPkeyword1">&gt;&lt;/</span>article<span class="TPkeyword1">&gt;</span>
   <span class="TPkeyword1">&lt;</span>article<span class="TPkeyword1">&gt;&lt;/</span>article<span class="TPkeyword1">&gt;</span>
   <span class="TPkeyword1">&lt;</span>article<span class="TPkeyword1">&gt;&lt;/</span>article<span class="TPkeyword1">&gt;</span>
   <span class="TPkeyword1">&lt;</span>article<span class="TPkeyword1">&gt;&lt;/</span>article<span class="TPkeyword1">&gt;</span>
  <span class="TPkeyword1">&lt;/</span>section<span class="TPkeyword1">&gt;</span>
<span class="TPkeyword1"> &lt;</span>footer<span class="TPkeyword1">&gt;</span>
  <span class="TPkeyword1">&lt;</span>nav<span class="TPkeyword1">&gt;</span>
   <span class="TPkeyword1">&lt;ul&gt;&lt;/ul&gt;</span>
  <span class="TPkeyword1">&lt;/</span>nav<span class="TPkeyword1">&gt;</span>
<span class="TPkeyword1"> &lt;/</span>footer<span class="TPkeyword1">&gt;</span>
<span class="TPkeyword1"> &lt;/div&gt;<br>&lt;/body&gt;</span></p></pre>
<p>If you're left wondering what all these new HTML elements are then worry not - they're simply new HTML5 elements. Most of them are simply used where you'd normally use a &lt;div&gt; but they give the markup more semantic meaning.</p>
<p>I now feel a bit better about the state of site.</p>
<h4>Backwards Compatibility</h4>
<p>Nothing's ever simple is it. To make sure these changes were backwards compatible I had to do two things.</p>
<p>First I had to add the HTML5Shiv trick, which uses conditional comments to load an extra JavaScript file for IE8 or less:</p><pre class="code2">&lt;!--&#91;if lt IE 9&#93;&gt;
&lt;script src="//html5shiv.googlecode.com/svn/trunk/html5.js"&gt;&lt;/script&gt;
&lt;!&#91;endif&#93;--&gt;
</pre>
<p>Can't say I'm over the moon that my site now needs JavaScript to make the CSS work, and I've always liked that fact that one code-base rules all browsers, but I don't want to be held back by old browsers.</p>
<p>At some point in the future I'll remove the above Shim trick and remove "support" for &lt;IE8.</p>
<p>The other thing I had to do was add the following CSS to make sure older browsers like Firefox 3.6 understood what these new elements were.</p><pre class="code2">article, aside, canvas, details,
figcaption, figure, footer, header,
hgroup, nav, section, summary, video {
    display: block;
}
</pre>
<p>All done.</p>
<p><a href="http://www.codestore.net/store.nsf/unid/BLOG-20120123-0324?open#post"><img border="0" src="http://www.codestore.net/store.nsf/images/rss_reply.gif" alt="Click here to post a response" /></a></p> 		]]></description>
			<link>http://www.codestore.net/store.nsf/unid/BLOG-20120123-0324</link>
			<guid isPermaLink="true">http://www.codestore.net/store.nsf/unid/BLOG-20120123-0324</guid>
			<comments>http://www.codestore.net/store.nsf/unid/BLOG-20120123-0324?Open#comments</comments>
			<slash:comments>14</slash:comments>
			<wfw:commentRss>http://www.codestore.net/store.nsf/blog.xml?Open=20120123-0324</wfw:commentRss>
		</item>
		<item>
			<title>Adding a Little HTML5 and CSS3 to CodeStore | Blog</title>
			<pubDate>Fri, 20 Jan 2012 02:04:26 -0500</pubDate>
			<author>Jake Howlett</author>
			<description><![CDATA[ <p>For the last <strong>seven</strong> years the site-wide search field on this site has looked like this:</p> <p><img alt="scanez-grab1" src="http://www.codestore.net/store.nsf/rsrc/A289B90EA4CB82F586257983004E4739/$file/scanez-grab1_a7f5f999-044b-4b3f-98c8-18eed1ecdafd.png"></p> <p>This week - in a moment of boredom - I decided to spruce it up a little and now it <em>should</em> look like this:</p> <p><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.codestore.net/store.nsf/rsrc/379031BBD5DC06E68625798B002C59A3/$file/image_7e9b975c-c21d-436a-ad04-2b57a98545e2.png" width="451" height="280"></p> <p>Whether it looks like that for you or not depends on the browser you're using. If you're using a modern and capable browser it should. If not you might see something like this:</p> <p><img style="background-image: none; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.codestore.net/store.nsf/rsrc/75BB256BD6034F028625798B002C5A0B/$file/image_2b2c3c9d-d801-45e6-b37a-5b6e92ae6555.png" width="407" height="300"></p> <p>Either way it should still be obvious what it is without the field label or the "Go" button?</p> <h4>How'd I Do That?</h4> <p>Simple. First I changed the HTML markup to use a little HTML5:</p><pre class="code2">&lt;form method="post" action="search?CreateDocument"&gt;
        &lt;input type="<strong>search</strong>" <strong>placeholder="Search"</strong> name="Query"&gt;
&lt;/form&gt;
</pre>
<p>I've highlighted the key parts. Adding the placeholder attribute is what puts the "Search" text inside the field and removes it when clicked on (no JavaScript required!). That's a new HTML feature and you can use it on any input field.</p>
<p>Then I added some CSS3:</p><pre class="code2">input&#91;type="search"&#93; {
        padding: 4px 6px 4px 23px;
        border-radius: 10px;
        background: white url(images/icons/search.png) no-repeat 2px 50%;
        -webkit-appearance: none;
        border: 0;
        -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.4);
        -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.4);
        box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.4);
}

input&#91;type="search"&#93;:focus{
	outline: none;
}
</pre>
<p>The last rule in the code above is to stop the field getting and orangey outline when the user clicks inside it.</p>
<p>And that's all there was to it really. Next time you add a search field to a form why not consider using a similar approach?</p>
<p><a href="http://www.codestore.net/store.nsf/unid/BLOG-20120120-0204?open#post"><img border="0" src="http://www.codestore.net/store.nsf/images/rss_reply.gif" alt="Click here to post a response" /></a></p> 		]]></description>
			<link>http://www.codestore.net/store.nsf/unid/BLOG-20120120-0204</link>
			<guid isPermaLink="true">http://www.codestore.net/store.nsf/unid/BLOG-20120120-0204</guid>
			<comments>http://www.codestore.net/store.nsf/unid/BLOG-20120120-0204?Open#comments</comments>
			<slash:comments>18</slash:comments>
			<wfw:commentRss>http://www.codestore.net/store.nsf/blog.xml?Open=20120120-0204</wfw:commentRss>
		</item>
		<item>
			<title>Writing LESS CSS | Blog</title>
			<pubDate>Thu, 19 Jan 2012 04:27:33 -0500</pubDate>
			<author>Jake Howlett</author>
			<description><![CDATA[ <p>Of all the code I write my CSS is probably the messiest and least well-maintained. While I get near-obsessed over the tidiness of other "actual" code I often find my CSS is a complete mess.</p> <p>When coding I try and follow the DRY approach but with CSS am usually "happy" to duplicate rules over and over; copy and pasting all over the place until CSS files become unmanageable.</p> <p>Writing CSS if no fun! Especially when you get to the nitty gritty of vendor-specific stuff in CSS3 like border radiuses, background gradients and drop shadows. If you plan on embracing CSS3 then you might want to read on for a better way to code CSS.</p> <h4>A Better Way</h4> <p>Writing CSS should be more like programming - with variables, methods and the like. This is where <a href="http://lesscss.org/">LESS</a> steps in - calling itself a "dynamic stylesheet" - it lets you use variables, operators, functions and arguments.</p> <p>LESS is how CSS <strong>should</strong> have been implemented in the first place!</p> <h4>Show Me Some LESS</h4> <p>Here's a basic example of some LESS code:</p><pre class="code2">@the-border: 1px;
@base-color: #111;
@red:        #842210;

#header {
  color: @base-color * 3;
  border-left: @the-border;
  border-right: @the-border * 2;
}
#footer { 
  color: @base-color + #003300;
  border-color: desaturate(@red, 10%);
}</pre>
<p>When the above code is passed through the LESS "compiler" you get the following CSS out the other end:</p><pre class="code2">#header{
 color:#333333;
 border-left:1px;
 border-right:2px;
}
#footer{
 color:#114411;
 border-color:#7d2717;
}
</pre>
<p>Perhaps that's enough to convince you of the need to use LESS? If not, read on.</p>
<p>Getting a bit more advanced let's look at another example:</p><pre class="code2">input{
 .border-radius(8px);
 .inner-shadow();
}</pre>
<p>The CSS outputted for the above LESS code is:</p><pre class="code2">input{
    -webkit-border-top-right-radius:8px;
    -webkit-border-bottom-right-radius:8px;
    -webkit-border-bottom-left-radius:8px;
    -webkit-border-top-left-radius:8px;
    -moz-border-radius-topright:8px;
    -moz-border-radius-bottomright:8px;
    -moz-border-radius-bottomleft:8px;
    -moz-border-radius-topleft:8px;
    border-top-right-radius:8px;
    border-bottom-right-radius:8px;
    border-bottom-left-radius:8px;
    border-top-left-radius:8px;
    -webkit-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.4);
    -moz-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.4);
    box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.4);
}
</pre>
<p>Which would you rather maintain - the LESS or the CSS? If you want to change the border radius to 6px you'd have to do it in about a dozen places in CSS, compared to 1 place in LESS. Sold on the idea yet? You ought to be!</p>
<p>In the LESS code above the .border-radius() and .inner-shadow() bits are what's known as "mixins" in LESS parlance. You can write your own mixins but I just downloaded a load of predefined ones called "<a href="http://lesselements.com/">LESS Elements</a>". This gives you a file called elements.less which you need to include in your LESS code before using the mixins. So the LESS code I pasted above should actually have been this:</p><pre class="code2">@import "elements.less";

input{
 .border-radius(8px);
 .inner-shadow();
}</pre>
<p>For a good example of advanced use of LESS <a href="http://twitter.github.com/bootstrap/">download Bootstrap</a> and take a look at how they organise their LESS files and how it all works.</p>
<p>If you do any decent amount of CSS coding then I'd say it's worth your while looking at how using LESS could help with that. I love it! </p>
<p>I've only really scraped the surface of what it can do in this post. To get a better example, take a look <a href="http://lesscss.org/">the LESS website</a> and the <a href="http://twitter.github.com/bootstrap/">Bootstrap</a> code.</p>
<h4>Where to Write LESS?</h4>
<p>The best way I've found to write LESS code and compile to CSS is with the <a href="http://crunchapp.net/">Crunch App</a>, which you can see below:</p>
<p><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.codestore.net/store.nsf/rsrc/50C3AAA37F2458AD8625798A00397353/$file/image_e54e299f-b73c-4a8e-877b-c7fd27db4bf8.png" width="564" height="460"></p>
<p>There's <a href="http://www.dotlesscss.org/">a .Net library</a> with which you can write LESS directly in Visual Studio and have .Net produce a cacheable CSS file from it - on the fly!</p>
<p>If you're a Domino developer then you'll have to resign yourself to the idea of maintaining the CSS outside of Domino Designer. Although I guess you could use WebDAV to save CSS files directly in to the NSF? That's a rainy day project I guess...</p>
<p><a href="http://www.codestore.net/store.nsf/unid/BLOG-20120119-0427?open#post"><img border="0" src="http://www.codestore.net/store.nsf/images/rss_reply.gif" alt="Click here to post a response" /></a></p> 		]]></description>
			<link>http://www.codestore.net/store.nsf/unid/BLOG-20120119-0427</link>
			<guid isPermaLink="true">http://www.codestore.net/store.nsf/unid/BLOG-20120119-0427</guid>
			<comments>http://www.codestore.net/store.nsf/unid/BLOG-20120119-0427?Open#comments</comments>
			<slash:comments>21</slash:comments>
			<wfw:commentRss>http://www.codestore.net/store.nsf/blog.xml?Open=20120119-0427</wfw:commentRss>
		</item>
		<item>
			<title>Chrome Plugin to Open Documents in ScanEz | Blog</title>
			<pubDate>Thu, 12 Jan 2012 08:15:09 -0500</pubDate>
			<author>Jake Howlett</author>
			<description><![CDATA[ <p>If you're a Domino developer and you're not using either Chrome and/or <a href="http://www.ytria.com/website.nsf/WebPageRequest/Solutions_scanEZen?OpenDocument&amp;Lang=en">Ytria's ScanEz</a> then you need to <strong>stop</strong> and question why.</p> <p>While any browser will do (but Chrome is IMHO the best) you really need to check out ScanEz! </p> <p class="sidePanel">My love of ScanEz is in no way influenced by the fact they gave it me for free. I say it because I genuinely think you'll be better off once using it. My promotion of it is like a public service kind of thing.</p> <p>Imagine for a second that you <em>do</em> use both. Wouldn't it be nice to link them? To have a button that magically appeared in Chrome when viewing a Domino website, which, when clicked, opens ScanEz straight to the document you're currently viewing in Chrome.</p> <p>Like this:</p> <p><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto; padding-top: 0px" title="scanez-grab1" border="0" alt="scanez-grab1" src="http://www.codestore.net/store.nsf/rsrc/A289B90EA4CB82F586257983004E4739/$file/scanez-grab1_a7f5f999-044b-4b3f-98c8-18eed1ecdafd.png" width="444" height="284"></p> <p>For me this is a massive time-saver. If you like the idea you can <a href="https://chrome.google.com/webstore/detail/ajilhdcfhhhhmmibanpidbophflkedlc?hl=en-US">get it for yourself here</a>. </p> <p>Here's a quick video of the concept:</p> <p><iframe height="400" src="http://www.screenr.com/embed/LQ3s" frameborder="0" width="560"></iframe></p> <h4>Over-Coming Hurdles</h4> <p>It wasn't long after I started working on this that I realised there were two flaws in the idea. Firstly that the hostname used in URLs doesn't always match the actual name of the Notes server. It needs to in order for ScanEz to connect. </p> <p>As an example, <a href="http://www.codestore.net">www.codestore.net</a> is hosted on a server called domino-99.codestore.net and ScanEz can't find a route to <a href="http://www.codestore.net">www.codestore.net</a> but can to the latter. So I added an Options pages for the extension which lets you add a hosts-like list of mappings:</p> <p><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="scanez-grab3" border="0" alt="scanez-grab3" src="http://www.codestore.net/store.nsf/rsrc/020488C98CB3335586257983004E48D5/$file/scanez-grab3.png" width="564" height="470"></p> <p>The other hurdle was that not all URLs to Domino document have the document UNID in them. For these cases I had the extension look for a special Meta tag in the HTML of a page, which would look like this:</p> <p><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.codestore.net/store.nsf/rsrc/5BB70E35F6D40DD386257983004E4A0E/$file/image_d9f54149-ff6b-4c89-a925-84633e12097d.png" width="564" height="218"></p> <p>If it finds this meta tag it knows where to send ScanEz to. Problem solved.</p> <p>If you're not excited by this then you obviously don't know how brilliant ScanEz is and what you're missing out on. That's a topic for another blog entry though...</p>
<p><a href="http://www.codestore.net/store.nsf/unid/BLOG-20120112-0815?open#post"><img border="0" src="http://www.codestore.net/store.nsf/images/rss_reply.gif" alt="Click here to post a response" /></a></p> 		]]></description>
			<link>http://www.codestore.net/store.nsf/unid/BLOG-20120112-0815</link>
			<guid isPermaLink="true">http://www.codestore.net/store.nsf/unid/BLOG-20120112-0815</guid>
			<comments>http://www.codestore.net/store.nsf/unid/BLOG-20120112-0815?Open#comments</comments>
			<slash:comments>2</slash:comments>
			<wfw:commentRss>http://www.codestore.net/store.nsf/blog.xml?Open=20120112-0815</wfw:commentRss>
		</item>
		<item>
			<title>Open a Notes Document in ScanEz from a Browser | Blog</title>
			<pubDate>Tue, 10 Jan 2012 05:08:06 -0500</pubDate>
			<author>Jake Howlett</author>
			<description><![CDATA[ <p><a href="http://www.ytria.com/website.nsf/WebPageRequest/Solutions_scanEZen?OpenDocument&amp;Lang=en">ScanEz</a> just keeps getting better and better. The latest gem added is that there's now support for URLs beginning with "scanez://". So you can launch it direct from the browser (or desktop shortcuts etc). </p> <p>The major benefit of this - for me at least - is easier debugging. I use ScanEz day in and day out for all sorts of tasks. If you haven't tried it you really should. As I've said many times before I couldn't get by without it. Well, I could, but... </p> <h4>Debugging Web Documents</h4> <p>When working on a Domino web app I often need to take a look at all the fields stored on the document and this is where ScanEz comes in. To get to see a web document in ScanEz here's what I normally do:</p> <ol> <li>Copy the document's UNID from the URL.  <li>Tab to Notes and click on the database's icon in the workspace.  <li>Click the ScanEz toolbar icon.  <li>Press F6 to open the "Search by UNID" dialog.  <li>Paste in the UNID in question to open the document.</li></ol> <p>It works but takes time. Now that we have a scanez:// URL I can just add links to documents, like the one below:</p> <p><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.codestore.net/store.nsf/rsrc/9ED19FC39E0C47CA86257981003D2768/$file/image_fe463287-34c8-4e00-b49a-e09d86be9553.png" width="564" height="315"></p> <p>I added the link like this:</p> <p><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.codestore.net/store.nsf/rsrc/64F7D1E441DD72DD86257981003D296B/$file/image_f39e83b3-a9f7-4f17-847d-bb9a110a3dee.png" width="564" height="332"></p> <p>The link in the above screenshot points to the following URL:</p><pre>scanez://tyne/8025740000797E3D/0/4B4D390AE16FCDFB80257981003A00BD</pre>
<p>Once clicked it opens ScanEz automagically to the document itself as below. <strong>Brilliant</strong>!</p>
<p><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.codestore.net/store.nsf/rsrc/5AAC1B651558A33F86257981003D2A85/$file/image_cab0a3e7-1cc9-42c3-9da5-904d9da9aab5.png" width="564" height="263"></p>

<p>Notice that I've selected the option to enable the scanez:// URL from the Tools menu!</p>
<h4>Practical Use</h4>
<p>To make practical use of this I'd probably hide a button like it in the footer of a database but either remove it before going live or (probably better) hide it using an &#91;Developer&#93; role and an <a href="http://www.codestore.net/store.nsf/unid/EPSD-4TNT2U">isDeveloper</a> field.</p>
<p><a href="http://www.codestore.net/store.nsf/unid/BLOG-20120110-0508?open#post"><img border="0" src="http://www.codestore.net/store.nsf/images/rss_reply.gif" alt="Click here to post a response" /></a></p> 		]]></description>
			<link>http://www.codestore.net/store.nsf/unid/BLOG-20120110-0508</link>
			<guid isPermaLink="true">http://www.codestore.net/store.nsf/unid/BLOG-20120110-0508</guid>
			<comments>http://www.codestore.net/store.nsf/unid/BLOG-20120110-0508?Open#comments</comments>
			<slash:comments>5</slash:comments>
			<wfw:commentRss>http://www.codestore.net/store.nsf/blog.xml?Open=20120110-0508</wfw:commentRss>
		</item>
		<item>
			<title>Olive Oil Fries Mac Mini | Blog</title>
			<pubDate>Mon, 9 Jan 2012 05:05:31 -0500</pubDate>
			<author>Jake Howlett</author>
			<description><![CDATA[ <p>In the kitchen on Friday I reached to the back of the fridge and the inner light went out. I assumed it was dead. In the mean time the house's RCD had tripped, so I moved the fridge to unplug it before resetting the RCD. No joy - the RCD kept tripping out. So I unplug <strong>everything</strong> in the kitchen (which has it's own ring) and it's still tripping. </p> <p>Then I realised what had happened. A couple of minutes before I'd mopped up a spillage after one of the kids knocked over a jar of olives on the kitchen worktop. The "brine" from which had trickled down the back of the worktop and in to an electrical socket beneath. Ten minutes with a hair dryer on it and everything's back up and running.</p> <p>Meanwhile, out in the office, this series of 5 or so power outages in the space of half an hour was more than my Mac Mini could handle and it was now refusing to start. Only after a PMU reset could I get it to boot and - when it finally did - the fan was running full speed making it way too noisy to serve its primary purpose as an iTunes jukebox.</p> <p>To add to my stress levels the laptop needed a hard reboot as well (the docking station doesn't like losing power) and it too refused to boot following this. Only after a couple of attempts did it finally boot. All this at the same time I'm in an email exchange with a customer I'm trying to fix a "top priority" bug for. Needless to say I was a bit stressed out.</p> <p>To make sure this never happens again I did two things:</p> <ol> <li>Sealed around the edge of the electrical socket in question with some decorator's caulk.  <li>Made sure the docking station and Mac Mini were supplied by one of the two UPS units in the office.</li></ol> <p>Everything in my office is now running with a backup power supply!</p> <p>From what I can gather on the forums the noisy fan issue is not un-common on Mac Minis and there's no known fix. I'm now on the market for a Mac!</p> <p>On the plus side, at least I don't need a new fridge. I'd much rather be buying a new Mac than a boring old fridge any day. I "needed" a new Mac anyway... </p>
<p><a href="http://www.codestore.net/store.nsf/unid/BLOG-20120109-0505?open#post"><img border="0" src="http://www.codestore.net/store.nsf/images/rss_reply.gif" alt="Click here to post a response" /></a></p> 		]]></description>
			<link>http://www.codestore.net/store.nsf/unid/BLOG-20120109-0505</link>
			<guid isPermaLink="true">http://www.codestore.net/store.nsf/unid/BLOG-20120109-0505</guid>
			<comments>http://www.codestore.net/store.nsf/unid/BLOG-20120109-0505?Open#comments</comments>
			<slash:comments>4</slash:comments>
			<wfw:commentRss>http://www.codestore.net/store.nsf/blog.xml?Open=20120109-0505</wfw:commentRss>
		</item>


	</channel>
</rss> 

