<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/" xmlns:blogger="http://schemas.google.com/blogger/2008" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"><channel><atom:id>tag:blogger.com,1999:blog-542398624287876588</atom:id><lastBuildDate>Sun, 19 May 2013 12:15:13 +0000</lastBuildDate><category>this</category><category>operator</category><category>tools</category><category>javascript</category><category>asynchronous</category><category>debugging</category><category>news</category><category>web</category><category>pitfall</category><category>bug</category><category>defaults</category><category>my-projects</category><category>functions</category><category>method</category><category>types</category><category>library</category><category>getting-it-wrong</category><category>browsers</category><category>non-coding</category><category>t-sql</category><category>exceptions</category><category>creativity</category><category>beautiful</category><category>inheritance</category><category>css</category><category>scrollbars</category><category>configuration</category><category>plugin</category><category>class</category><category>maintenance</category><category>contribute</category><category>link</category><category>performance</category><category>v8</category><category>FogBugz</category><category>google-code</category><category>closures</category><category>update</category><category>rant</category><category>humor</category><category>apache</category><category>philosophical</category><category>virtualbox</category><category>math</category><category>idea</category><category>event-handlers</category><category>children</category><category>specification</category><category>names</category><category>mysql</category><category>java</category><category>loops</category><category>engineering</category><category>system-administration</category><category>patterns</category><category>arrays</category><category>ajax</category><category>false-dichotomy</category><category>scope</category><category>Opera</category><category>ecmascript5</category><category>Prototype</category><category>S3</category><category>script-tags</category><category>links</category><category>gae</category><category>tip</category><category>private</category><category>patents</category><category>var</category><category>regular-expressions</category><category>google-plus</category><category>meta</category><category>jquery</category><category>anonymous</category><category>off-topic</category><category>sql-server</category><category>welcome</category><category>irritations</category><category>sql</category><category>hacks</category><category>html</category><category>reference</category><category>history</category><category>mnemonic</category><category>design</category><category>operators</category><category>framework</category><category>testing</category><category>internet-explorer</category><category>ubuntu</category><category>myths</category><category>grumble</category><category>VS.Net</category><category>google</category><title>Nifty Snippets</title><description>Nifty Snippets&lt;sup&gt;TM&lt;/sup&gt; of code, techniques, and information focussing on Ajax, web scripting, and engineering.</description><link>http://blog.niftysnippets.org/</link><managingEditor>noreply@blogger.com (T.J. Crowder)</managingEditor><generator>Blogger</generator><openSearch:totalResults>87</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/NiftySnippets" /><feedburner:info uri="niftysnippets" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item><guid isPermaLink="false">tag:blogger.com,1999:blog-542398624287876588.post-9092955113385630926</guid><pubDate>Sat, 18 May 2013 18:01:00 +0000</pubDate><atom:updated>2013-05-18T19:01:46.110+01:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">css</category><title>Help me find something?</title><atom:summary type="text">Very unusual post today, folks: I'd like to ask you to help me find something.
Several years ago, I found a blog post by a woman whose name I can't remember where she (incredibly) created a tabbed interface in an HTML page using nothing but HTML and CSS — and it didn't rely on the :checked pseudo-selector. It even worked in IE6 (not that I care about that these days). The way it worked was by </atom:summary><link>http://feedproxy.google.com/~r/NiftySnippets/~3/9nWmNpo6_oE/help-me-find-something.html</link><author>noreply@blogger.com (T.J. Crowder)</author><thr:total>4</thr:total><description>&lt;img src="http://feeds.feedburner.com/~r/NiftySnippets/~4/9nWmNpo6_oE" height="1" width="1"/&gt;</description><feedburner:origLink>http://blog.niftysnippets.org/2013/05/help-me-find-something.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-542398624287876588.post-5505074525096683185</guid><pubDate>Wed, 15 May 2013 16:27:00 +0000</pubDate><atom:updated>2013-05-16T09:31:34.065+01:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">javascript</category><category domain="http://www.blogger.com/atom/ns#">patterns</category><category domain="http://www.blogger.com/atom/ns#">private</category><title>Private properties in ES6 -- and ES3, and ES5</title><atom:summary type="text">JavaScript famously lacks private properties on objects. The next version will have them (more on that below), but we can have most of the benefits of the upcoming improvement right now (without resorting to the usual hidden variables in the constructor), even on older engines. In this post, I look at what's coming, and what we can do now.
"But wait," I hear you say, "Don't we already know how to</atom:summary><link>http://feedproxy.google.com/~r/NiftySnippets/~3/nrxceOT3Ztw/private-properties-in-es6-and-es3-and.html</link><author>noreply@blogger.com (T.J. Crowder)</author><thr:total>2</thr:total><description>&lt;img src="http://feeds.feedburner.com/~r/NiftySnippets/~4/nrxceOT3Ztw" height="1" width="1"/&gt;</description><feedburner:origLink>http://blog.niftysnippets.org/2013/05/private-properties-in-es6-and-es3-and.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-542398624287876588.post-6163449082441361004</guid><pubDate>Wed, 13 Feb 2013 17:40:00 +0000</pubDate><atom:updated>2013-02-13T17:40:07.917Z</atom:updated><category domain="http://www.blogger.com/atom/ns#">news</category><category domain="http://www.blogger.com/atom/ns#">link</category><category domain="http://www.blogger.com/atom/ns#">browsers</category><category domain="http://www.blogger.com/atom/ns#">Opera</category><title>Opera switching to WebKit+V8</title><atom:summary type="text">Opera has decided to switch to using WebKit and V8 for for all new products. First they'll start with a product for smartphones (since as they say, many mobile-facing sites are only/best tested on WebKit anyway), and then Opera Desktop and other products will follow.By my count, that leaves us with three major rendering engines (WebKit, Gecko, and Trident), and three major JavaScript engines (V8,</atom:summary><link>http://feedproxy.google.com/~r/NiftySnippets/~3/gC65V-ydVqU/opera-switching-to-webkitv8.html</link><author>noreply@blogger.com (T.J. Crowder)</author><thr:total>0</thr:total><description>&lt;img src="http://feeds.feedburner.com/~r/NiftySnippets/~4/gC65V-ydVqU" height="1" width="1"/&gt;</description><feedburner:origLink>http://blog.niftysnippets.org/2013/02/opera-switching-to-webkitv8.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-542398624287876588.post-6294557667935070472</guid><pubDate>Sat, 29 Dec 2012 12:20:00 +0000</pubDate><atom:updated>2012-12-29T12:21:23.186Z</atom:updated><category domain="http://www.blogger.com/atom/ns#">S3</category><category domain="http://www.blogger.com/atom/ns#">news</category><category domain="http://www.blogger.com/atom/ns#">link</category><title>Amazon S3 Adds Root Domain Support</title><atom:summary type="text">More interesting news from Amazon: Now S3 supports static website hosting on the root of your domain. So in addition to http://www.example.com you can now have http://example.com. This comes warm on the heels of their having added CORS support in August and redirections in October. The directon is fairly clear, eh?</atom:summary><link>http://feedproxy.google.com/~r/NiftySnippets/~3/C1aSSjkSA5A/amazon-s3-adds-root-domain-support.html</link><author>noreply@blogger.com (T.J. Crowder)</author><thr:total>0</thr:total><description>&lt;img src="http://feeds.feedburner.com/~r/NiftySnippets/~4/C1aSSjkSA5A" height="1" width="1"/&gt;</description><feedburner:origLink>http://blog.niftysnippets.org/2012/12/amazon-s3-adds-root-domain-support.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-542398624287876588.post-7889057508937397512</guid><pubDate>Tue, 18 Dec 2012 13:43:00 +0000</pubDate><atom:updated>2012-12-18T13:47:52.548Z</atom:updated><category domain="http://www.blogger.com/atom/ns#">rant</category><category domain="http://www.blogger.com/atom/ns#">design</category><title>Website Feedback Popups</title><atom:summary type="text">You want my feedback on your website? Here's my feedback: Website "feedback" popups are irritating and intrusive.</atom:summary><link>http://feedproxy.google.com/~r/NiftySnippets/~3/089aBkoamLA/website-feedback-popups.html</link><author>noreply@blogger.com (T.J. Crowder)</author><thr:total>1</thr:total><description>&lt;img src="http://feeds.feedburner.com/~r/NiftySnippets/~4/089aBkoamLA" height="1" width="1"/&gt;</description><feedburner:origLink>http://blog.niftysnippets.org/2012/12/website-feedback-popups.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-542398624287876588.post-1881892301352508677</guid><pubDate>Fri, 09 Nov 2012 09:49:00 +0000</pubDate><atom:updated>2012-11-09T09:50:34.477Z</atom:updated><category domain="http://www.blogger.com/atom/ns#">design</category><category domain="http://www.blogger.com/atom/ns#">web</category><category domain="http://www.blogger.com/atom/ns#">links</category><category domain="http://www.blogger.com/atom/ns#">css</category><title>Font Size Units</title><atom:summary type="text">I've always used points (pt values) for sizing fonts on web pages, e.g.:body {
    font-size: 12pt;
}Those of you who know me know that I'm a developer, not a designer (in the web designer sense; I design systems, but that's different). I couldn't visual-design my way out of a paper bag. (Okay, maybe that's a bit harsh.) I don't think I'm a one-trick pony, but I'm definitely much more left- than </atom:summary><link>http://feedproxy.google.com/~r/NiftySnippets/~3/XlijcXyWnSo/font-size-units.html</link><author>noreply@blogger.com (T.J. Crowder)</author><thr:total>2</thr:total><description>&lt;img src="http://feeds.feedburner.com/~r/NiftySnippets/~4/XlijcXyWnSo" height="1" width="1"/&gt;</description><feedburner:origLink>http://blog.niftysnippets.org/2012/11/font-size-units.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-542398624287876588.post-3076102803177243625</guid><pubDate>Wed, 31 Oct 2012 15:44:00 +0000</pubDate><atom:updated>2012-11-01T08:22:27.750Z</atom:updated><category domain="http://www.blogger.com/atom/ns#">testing</category><category domain="http://www.blogger.com/atom/ns#">web</category><title>Blitz.io Updates Pricing Model</title><atom:summary type="text">Early this month I was checking out blitz.io and although it looked like a cool tool (and fun), the pricing model stopped me looking at it too closely, for reasons I explained to them:Hi folks,

Was just checking out blitz.io, which looks really cool (and fun), but I 
was stopped pretty early on by the pricing. I don't understand why 
the length of a rush is tied to the number of concurrent users</atom:summary><link>http://feedproxy.google.com/~r/NiftySnippets/~3/8UhMHR93LSc/blitzio-updates-pricing-model.html</link><author>noreply@blogger.com (T.J. Crowder)</author><thr:total>0</thr:total><description>&lt;img src="http://feeds.feedburner.com/~r/NiftySnippets/~4/8UhMHR93LSc" height="1" width="1"/&gt;</description><feedburner:origLink>http://blog.niftysnippets.org/2012/10/blitzio-updates-pricing-model.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-542398624287876588.post-4113348548699234882</guid><pubDate>Wed, 24 Oct 2012 04:32:00 +0000</pubDate><atom:updated>2012-10-24T05:41:03.093+01:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">javascript</category><category domain="http://www.blogger.com/atom/ns#">ajax</category><category domain="http://www.blogger.com/atom/ns#">asynchronous</category><title>Asynchronicity</title><atom:summary type="text">I see questions like this one a fair bit: The author has written this code (and is apparently using jQuery):function Obj() {
    this.id = 0;
    this.name = '';
}

Obj.prototype.setName = function(name) {
    this.name = name;
};

function init() {
    var object1;

    object1 = new Obj();
    object1.setName("Chris");
    alert(object1.name); // alerts 'Chris'

    $.post('my_json_list.php', </atom:summary><link>http://feedproxy.google.com/~r/NiftySnippets/~3/6WlVUppj-Hg/asynchronicity.html</link><author>noreply@blogger.com (T.J. Crowder)</author><thr:total>1</thr:total><description>&lt;img src="http://feeds.feedburner.com/~r/NiftySnippets/~4/6WlVUppj-Hg" height="1" width="1"/&gt;</description><feedburner:origLink>http://blog.niftysnippets.org/2012/10/asynchronicity.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-542398624287876588.post-7432386317523965167</guid><pubDate>Thu, 04 Oct 2012 14:20:00 +0000</pubDate><atom:updated>2012-10-04T15:24:15.842+01:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">rant</category><category domain="http://www.blogger.com/atom/ns#">design</category><title>I Don't Want To Create An Account</title><atom:summary type="text">Note to online vendors:I don't want to have to create an account to give you business.Got it? By all means offer me the option of doing so, if that makes you happy, but if I'm buying 10 quid of lightbulbs from your site, or a one-off rail ticket, I really don't want to create a username and password, opt out of your effing mailing list, etc., etc. Imagine if you had to "create an account" with </atom:summary><link>http://feedproxy.google.com/~r/NiftySnippets/~3/QeLX9uzap5o/i-dont-want-to-create-account.html</link><author>noreply@blogger.com (T.J. Crowder)</author><thr:total>2</thr:total><description>&lt;img src="http://feeds.feedburner.com/~r/NiftySnippets/~4/QeLX9uzap5o" height="1" width="1"/&gt;</description><feedburner:origLink>http://blog.niftysnippets.org/2012/10/i-dont-want-to-create-account.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-542398624287876588.post-1503274435653754598</guid><pubDate>Wed, 03 Oct 2012 22:29:00 +0000</pubDate><atom:updated>2012-10-03T23:29:45.434+01:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">contribute</category><category domain="http://www.blogger.com/atom/ns#">reference</category><category domain="http://www.blogger.com/atom/ns#">web</category><title>You can contribute to caniuse.com</title><atom:summary type="text">I'm sure most of us have referred to (and probably cited) caniuse.com at some point. It's probably the most comprehensive collection of browser feature support around. Want to know the status of CORS support? Here you go.Well, now if you spot an error or want to add further information, you can do so fairly directly: caniuse.com is now on GitHub.I should probably note that caniuse.com is </atom:summary><link>http://feedproxy.google.com/~r/NiftySnippets/~3/2GvCBiae9VA/you-can-contribute-to-caniusecom.html</link><author>noreply@blogger.com (T.J. Crowder)</author><thr:total>0</thr:total><description>&lt;img src="http://feeds.feedburner.com/~r/NiftySnippets/~4/2GvCBiae9VA" height="1" width="1"/&gt;</description><feedburner:origLink>http://blog.niftysnippets.org/2012/10/you-can-contribute-to-caniusecom.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-542398624287876588.post-4315267520815219504</guid><pubDate>Thu, 27 Sep 2012 10:51:00 +0000</pubDate><atom:updated>2012-09-27T11:51:08.513+01:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">javascript</category><title>Quick note on RegExp#lastIndex</title><atom:summary type="text">Just a quick note on RegExp#lastIndex: It's misnamed. It's not the "last" index of anything, it's the index of the next character in the string that will be looked at by the regex instance's exec function (if the regex has the global flag and exec is used on a string that's long enough). It's 0 on freshly-created instances. Just useful to remember, if you ever need to set it explicitly (which </atom:summary><link>http://feedproxy.google.com/~r/NiftySnippets/~3/ir6JZEKDmvM/quick-note-on-regexplastindex.html</link><author>noreply@blogger.com (T.J. Crowder)</author><thr:total>0</thr:total><description>&lt;img src="http://feeds.feedburner.com/~r/NiftySnippets/~4/ir6JZEKDmvM" height="1" width="1"/&gt;</description><feedburner:origLink>http://blog.niftysnippets.org/2012/09/quick-note-on-regexplastindex.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-542398624287876588.post-5594910120649776103</guid><pubDate>Wed, 26 Sep 2012 10:41:00 +0000</pubDate><atom:updated>2012-09-26T11:41:47.065+01:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">beautiful</category><category domain="http://www.blogger.com/atom/ns#">link</category><category domain="http://www.blogger.com/atom/ns#">off-topic</category><title>Incredible. Extraordinary. Inspiring. Beautiful.</title><atom:summary type="text">Ten years of Hubble photographs of a tiny portion of the night sky, well away from the glare of the Milky Way, deep into the infrared and then corrected back to visible, the eXtreme Deep Field is nothing less than a breathtaking view deep into the Universe. Just...impossibly incredible.</atom:summary><link>http://feedproxy.google.com/~r/NiftySnippets/~3/-1o0yu1iclI/incredible-extraordinary-inspiring.html</link><author>noreply@blogger.com (T.J. Crowder)</author><thr:total>0</thr:total><description>&lt;img src="http://feeds.feedburner.com/~r/NiftySnippets/~4/-1o0yu1iclI" height="1" width="1"/&gt;</description><feedburner:origLink>http://blog.niftysnippets.org/2012/09/incredible-extraordinary-inspiring.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-542398624287876588.post-156396409420662868</guid><pubDate>Sat, 01 Sep 2012 16:08:00 +0000</pubDate><atom:updated>2012-09-01T17:08:08.318+01:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">S3</category><category domain="http://www.blogger.com/atom/ns#">news</category><category domain="http://www.blogger.com/atom/ns#">link</category><title>S3 Adds CORS Support</title><atom:summary type="text">Some interesting news today: Amazon's S3 now supports CORS, the Cross-Origin Resource Sharing standard. This means that in addition to storing your images, stylesheets, and JavaScript files in S3 as you might be now, you can now also store any static data or templates you want to retrieve via ajax there, assuming your user is using a browser that supports CORS (all modern ones do, one way or </atom:summary><link>http://feedproxy.google.com/~r/NiftySnippets/~3/aioW9JE0rcY/s3-adds-cors-support.html</link><author>noreply@blogger.com (T.J. Crowder)</author><thr:total>0</thr:total><description>&lt;img src="http://feeds.feedburner.com/~r/NiftySnippets/~4/aioW9JE0rcY" height="1" width="1"/&gt;</description><feedburner:origLink>http://blog.niftysnippets.org/2012/09/s3-adds-cors-support.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-542398624287876588.post-8559097172709605839</guid><pubDate>Thu, 23 Aug 2012 06:54:00 +0000</pubDate><atom:updated>2012-08-23T08:11:23.646+01:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">link</category><category domain="http://www.blogger.com/atom/ns#">browsers</category><category domain="http://www.blogger.com/atom/ns#">history</category><title>A reminder how Microsoft used to drive web innovation</title><atom:summary type="text">As IE6 finally rides into the sunset,* Nicholas C. Zakas offers us a reminder of how, in a series of browser releases culminating in IE6, Microsoft introduced many of the key web innovations we use today such as innerHTML, access to all elements (not just forms and such), Ajax, modern events, and several others. This isn't in any way to discount what Netscape and others have done, but it's worth </atom:summary><link>http://feedproxy.google.com/~r/NiftySnippets/~3/TY3Eei4DPVU/a-reminder-how-microsoft-used-to-drive.html</link><author>noreply@blogger.com (T.J. Crowder)</author><thr:total>0</thr:total><description>&lt;img src="http://feeds.feedburner.com/~r/NiftySnippets/~4/TY3Eei4DPVU" height="1" width="1"/&gt;</description><feedburner:origLink>http://blog.niftysnippets.org/2012/08/a-reminder-how-microsoft-used-to-drive.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-542398624287876588.post-1882146817358366199</guid><pubDate>Tue, 14 Aug 2012 10:30:00 +0000</pubDate><atom:updated>2012-08-15T07:00:54.331+01:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">javascript</category><category domain="http://www.blogger.com/atom/ns#">scrollbars</category><title>Measuring Scrollbar Size</title><atom:summary type="text">Normally we want to avoid doing this sort of thing, but sometimes you just end up having no other option: Recently I couldn't avoid doing some sizing logic in JavaScript rather than CSS and markup, and I had to know the size of the scrollbars on specific elements. I found this post by Alexandre Gomes (which in turn was based on a MooTools forum thread; those forums are gone now), which shows a </atom:summary><link>http://feedproxy.google.com/~r/NiftySnippets/~3/_njM6KBo40c/measuring-scrollbar-size.html</link><author>noreply@blogger.com (T.J. Crowder)</author><thr:total>0</thr:total><description>&lt;img src="http://feeds.feedburner.com/~r/NiftySnippets/~4/_njM6KBo40c" height="1" width="1"/&gt;</description><feedburner:origLink>http://blog.niftysnippets.org/2012/08/measuring-scrollbar-size.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-542398624287876588.post-4381938006254898024</guid><pubDate>Wed, 08 Aug 2012 08:46:00 +0000</pubDate><atom:updated>2012-08-08T09:50:17.162+01:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">javascript</category><category domain="http://www.blogger.com/atom/ns#">jquery</category><category domain="http://www.blogger.com/atom/ns#">link</category><category domain="http://www.blogger.com/atom/ns#">update</category><title>jQuery - Element cleanup update</title><atom:summary type="text">For those who saw my jQuery - Cleaning up when elements go away post yesterday, I've updated it showing how we can do this right now, today, without waiting for the enhancement (or if the enhancement is never accepted). Oh, and the enhancement went from six lines to three. Many thanks to Dave Methvin for showing how (in both cases). Enjoy!</atom:summary><link>http://feedproxy.google.com/~r/NiftySnippets/~3/0EKQXfzKRuk/jquery-element-cleanup-update.html</link><author>noreply@blogger.com (T.J. Crowder)</author><thr:total>0</thr:total><description>&lt;img src="http://feeds.feedburner.com/~r/NiftySnippets/~4/0EKQXfzKRuk" height="1" width="1"/&gt;</description><feedburner:origLink>http://blog.niftysnippets.org/2012/08/jquery-element-cleanup-update.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-542398624287876588.post-6183435470988905015</guid><pubDate>Tue, 07 Aug 2012 19:19:00 +0000</pubDate><atom:updated>2012-08-08T14:48:29.735+01:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">javascript</category><category domain="http://www.blogger.com/atom/ns#">jquery</category><title>jQuery - Cleaning up when elements go away</title><atom:summary type="text">(Updated 08/08/2012.)
Have you ever wanted to get a notification when an element is removed from the DOM so you could clean up? For instance, maybe you have events hooked on a different object (like resize on window) that you want to unhook when the element goes away.Recently I wanted to, and since I know that jQuery does cleanup when elements are removed (so it can clear out event handlers and </atom:summary><link>http://feedproxy.google.com/~r/NiftySnippets/~3/U_GMTBvfDaM/jquery-cleaning-up-when-elements-go-away.html</link><author>noreply@blogger.com (T.J. Crowder)</author><thr:total>0</thr:total><description>&lt;img src="http://feeds.feedburner.com/~r/NiftySnippets/~4/U_GMTBvfDaM" height="1" width="1"/&gt;</description><feedburner:origLink>http://blog.niftysnippets.org/2012/08/jquery-cleaning-up-when-elements-go-away.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-542398624287876588.post-944359936398770040</guid><pubDate>Thu, 02 Aug 2012 08:24:00 +0000</pubDate><atom:updated>2012-08-02T09:24:28.085+01:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">javascript</category><category domain="http://www.blogger.com/atom/ns#">library</category><category domain="http://www.blogger.com/atom/ns#">framework</category><category domain="http://www.blogger.com/atom/ns#">link</category><title>Steve Sanderson's Round-Up of Eight Rich JS Libs/Frameworks</title><atom:summary type="text">Steve Sanderson's done an interesting round up of the eight libraries and frameworks represented at the Throne of JS conference recently. The conference was about JavaScript applications, not web pages, and focuses on the kinds of projects that help you do your Model-View-Whatever stuff. Worth reading, bookmarking, and re-reading later. Steve declares his interest — he's on the KnockoutJS core </atom:summary><link>http://feedproxy.google.com/~r/NiftySnippets/~3/weRXaK7Kq3Y/steve-sandersons-round-up-of-eight-rich.html</link><author>noreply@blogger.com (T.J. Crowder)</author><thr:total>0</thr:total><description>&lt;img src="http://feeds.feedburner.com/~r/NiftySnippets/~4/weRXaK7Kq3Y" height="1" width="1"/&gt;</description><feedburner:origLink>http://blog.niftysnippets.org/2012/08/steve-sandersons-round-up-of-eight-rich.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-542398624287876588.post-5787416278420086914</guid><pubDate>Sat, 07 Jul 2012 12:06:00 +0000</pubDate><atom:updated>2012-07-07T17:29:36.454+01:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">performance</category><category domain="http://www.blogger.com/atom/ns#">javascript</category><category domain="http://www.blogger.com/atom/ns#">operators</category><category domain="http://www.blogger.com/atom/ns#">math</category><title>Well, I'm floored</title><atom:summary type="text">How do you floor (or truncate) a floating-point number in JavaScript? (E.g., take a value like 5.7 and get just the 5?). The answer is simple: Use Math.floor. That's the right answer at least 99.99% of the time. It's clear, straightforward, easy to read, easy to maintain. It does what it says on the tin:
console.log(Math.floor(5.7)); // "5"
Sorted.
But you see people doing other things in the </atom:summary><link>http://feedproxy.google.com/~r/NiftySnippets/~3/n0zhoMrqHy8/well-im-floored.html</link><author>noreply@blogger.com (T.J. Crowder)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/-HEmfoZ8gXUw/T_gLIk4JJ7I/AAAAAAAAAB0/ZoLA1qhq0vw/s72-c/flooring_a_number.png" height="72" width="72" /><thr:total>6</thr:total><description>&lt;img src="http://feeds.feedburner.com/~r/NiftySnippets/~4/n0zhoMrqHy8" height="1" width="1"/&gt;</description><feedburner:origLink>http://blog.niftysnippets.org/2012/07/well-im-floored.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-542398624287876588.post-1377474959080542810</guid><pubDate>Mon, 18 Jun 2012 09:20:00 +0000</pubDate><atom:updated>2012-06-18T10:26:59.301+01:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">grumble</category><category domain="http://www.blogger.com/atom/ns#">design</category><category domain="http://www.blogger.com/atom/ns#">css</category><title>9pt grey text on a dark grey background</title><atom:summary type="text">Is it just me? Am I getting old? (Well, yes, but...) Surely 9pt grey text (#646464) on a dark-grey background (#1C1C1C) qualifies as a Bad IdeaTM? How's this for readable:


Form Factormini-PC
CPU SocketIntel® Atom™ D525 (dual-core) (1.8 GHz) Intel® HyperThreading™ technology
ChipsetNM10 Express
GPUIntel® GMA 3150
MemoryUp to 4GB
Harddrive2.5“ drive bay SATA 3.0 Gb/s compatible
Graphics Output1 </atom:summary><link>http://feedproxy.google.com/~r/NiftySnippets/~3/daAafXzN5RI/9pt-grey-text-on-dark-grey-background.html</link><author>noreply@blogger.com (T.J. Crowder)</author><thr:total>0</thr:total><description>&lt;img src="http://feeds.feedburner.com/~r/NiftySnippets/~4/daAafXzN5RI" height="1" width="1"/&gt;</description><feedburner:origLink>http://blog.niftysnippets.org/2012/06/9pt-grey-text-on-dark-grey-background.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-542398624287876588.post-5337559054923592830</guid><pubDate>Thu, 14 Jun 2012 14:07:00 +0000</pubDate><atom:updated>2012-06-14T15:07:00.938+01:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">internet-explorer</category><category domain="http://www.blogger.com/atom/ns#">link</category><category domain="http://www.blogger.com/atom/ns#">humor</category><title>Too Funny - An IE7 Tax</title><atom:summary type="text">An Australian online retailer has started charging users of IE7 a tax to use the browser on their website. This was inspired, they say, by the amount of time it took their developers to make the site work correctly with IE7 (which 3% of their users were still using). The tax is currently 6.8% — 0.1% per month since IE7 was released.
Presumably they just aren't supporting IE6 at all — if they did,</atom:summary><link>http://feedproxy.google.com/~r/NiftySnippets/~3/3eKO75i3PqA/too-funny-ie7-tax.html</link><author>noreply@blogger.com (T.J. Crowder)</author><thr:total>0</thr:total><description>&lt;img src="http://feeds.feedburner.com/~r/NiftySnippets/~4/3eKO75i3PqA" height="1" width="1"/&gt;</description><feedburner:origLink>http://blog.niftysnippets.org/2012/06/too-funny-ie7-tax.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-542398624287876588.post-4101120594126619894</guid><pubDate>Thu, 14 Jun 2012 08:56:00 +0000</pubDate><atom:updated>2012-09-14T09:28:17.131+01:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">non-coding</category><category domain="http://www.blogger.com/atom/ns#">maintenance</category><category domain="http://www.blogger.com/atom/ns#">ubuntu</category><title>Cleaning up old Ubuntu kernels from /boot</title><atom:summary type="text">My Ubuntu system told me today that it was running quite low on room in /boot. I searched around for what to do about that, and found this answer on Ask Ubuntu. It turns out that when kernel updates are applied, old kernels are left lying around in /boot.
So what to do? It's quite simple:

Ensure you don't have a restart pending (Linux can update just about anything without rebooting...except the</atom:summary><link>http://feedproxy.google.com/~r/NiftySnippets/~3/z86mqq021_A/cleaning-up-old-ubuntu-kernels-from.html</link><author>noreply@blogger.com (T.J. Crowder)</author><thr:total>3</thr:total><description>&lt;img src="http://feeds.feedburner.com/~r/NiftySnippets/~4/z86mqq021_A" height="1" width="1"/&gt;</description><feedburner:origLink>http://blog.niftysnippets.org/2012/06/cleaning-up-old-ubuntu-kernels-from.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-542398624287876588.post-3051745027407524405</guid><pubDate>Thu, 24 May 2012 20:46:00 +0000</pubDate><atom:updated>2012-05-24T21:46:01.208+01:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">javascript</category><category domain="http://www.blogger.com/atom/ns#">specification</category><title>Finally, the normative ECMAScript Spec - in HTML</title><atom:summary type="text">Finally a normative ECMAScript specification in HTML. Very worthy private efforts notwithstanding (here, here), having a normative deeply-linkable, HTML edition is huge — and long overdue.</atom:summary><link>http://feedproxy.google.com/~r/NiftySnippets/~3/irnWW324dqg/finally-normative-ecmascript-spec-in.html</link><author>noreply@blogger.com (T.J. Crowder)</author><thr:total>0</thr:total><description>&lt;img src="http://feeds.feedburner.com/~r/NiftySnippets/~4/irnWW324dqg" height="1" width="1"/&gt;</description><feedburner:origLink>http://blog.niftysnippets.org/2012/05/finally-normative-ecmascript-spec-in.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-542398624287876588.post-466587625997286365</guid><pubDate>Tue, 17 Apr 2012 08:26:00 +0000</pubDate><atom:updated>2012-04-17T09:26:49.017+01:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">creativity</category><category domain="http://www.blogger.com/atom/ns#">link</category><category domain="http://www.blogger.com/atom/ns#">humor</category><title>John Cleese on Creativity</title><atom:summary type="text">My good friend Jock Murphy blogged about this video, where John Cleese spends 36 minutes talking about creativity and telling "how many (blank)s does it take to change a light bulb" jokes. I can only echo Jock's sentiments here:

Go watch it. Go watch it now. Utterly brilliant.</atom:summary><link>http://feedproxy.google.com/~r/NiftySnippets/~3/D2sf3P_4OLA/john-cleese-on-creativity.html</link><author>noreply@blogger.com (T.J. Crowder)</author><thr:total>1</thr:total><description>&lt;img src="http://feeds.feedburner.com/~r/NiftySnippets/~4/D2sf3P_4OLA" height="1" width="1"/&gt;</description><feedburner:origLink>http://blog.niftysnippets.org/2012/04/john-cleese-on-creativity.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-542398624287876588.post-2241779075925525685</guid><pubDate>Wed, 04 Apr 2012 16:06:00 +0000</pubDate><atom:updated>2012-04-04T18:57:49.309+01:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">javascript</category><category domain="http://www.blogger.com/atom/ns#">tools</category><category domain="http://www.blogger.com/atom/ns#">inheritance</category><category domain="http://www.blogger.com/atom/ns#">my-projects</category><title>Announcing Lineage</title><atom:summary type="text">Just a brief post to announce my latest mini-project, Lineage. It's a small, simple toolkit for creating JavaScript constructor functions and their prototypes ("classes," if you will) in a straight-forward and concise way. From the project home page:Lineage's API lets you define prototypes with a very concise syntax, while still encouraging you to create functions with real names (rather than </atom:summary><link>http://feedproxy.google.com/~r/NiftySnippets/~3/p-EhmBc-ymA/announcing-lineage.html</link><author>noreply@blogger.com (T.J. Crowder)</author><thr:total>0</thr:total><description>&lt;img src="http://feeds.feedburner.com/~r/NiftySnippets/~4/p-EhmBc-ymA" height="1" width="1"/&gt;</description><feedburner:origLink>http://blog.niftysnippets.org/2012/04/announcing-lineage.html</feedburner:origLink></item></channel></rss>
