﻿<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:blogChannel="http://backend.userland.com/blogChannelModule" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:pingback="http://madskills.com/public/xml/rss/module/pingback/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#">
  <channel>
    <title>Tracker1's Blog</title>
    <description>Tips, tools and techniques for the frugal programmer...</description>
    <link>http://frugalcoder.us/</link>
    <docs>http://www.rssboard.org/rss-specification</docs>
    <generator>BlogEngine.NET 1.5.0.7</generator>
    <language>en-US</language>
    <blogChannel:blogRoll>http://frugalcoder.us/opml.axd</blogChannel:blogRoll>
    <dc:creator>Michael J. Ryan</dc:creator>
    <dc:title>Tracker1's Blog</dc:title>
    <geo:lat>0.000000</geo:lat>
    <geo:long>0.000000</geo:long>
    <item>
      <title>SQL vs Non-Relational (NoSQL) Databases</title>
      <description>It really depends on the application... If you have, for instance, a classifieds site... in a typical database (acid/sql) you would have many tables, with many joins typical to retrieve the data you want for a simple page view.  In a no-sql environment, you would probably want 3 base collections, one for accounts, one for articles, one for payments (though payment systems are better suited to SQL than Non-Relational DBs).  With SQL, when you request a page, you will query against the article table, then join the various property tables, for the type of article for tags/options/etc... you may join against the account table for contact information, if very normalized, you may then join again for email addresses, phone numbers, addresses etc.  Each of these lookups will query against multiple tables' indexes (provided they're properly indexed) to retrieve related records to be collated into a single object model, to then be rendered to the output.  ORMs take care of a lot of this heavy lifting, but on millions of results, there is an impact. With a Non-Relational DB, all related information is usually a full serialized object graph of everything related to that article, with specific options/properties codified making the data store "dumb".
&lt;br /&gt;&lt;br /&gt;
Now for searching... with SQL these queries will only ever run as fast as a single process on a single system can execute results.  With non-relational systems this can typically be split/spread across many servers for an aggregated result.  In the real world, with SQL, you will typically load several replicated (often read-only) servers as a front for your search queries, and for display lookups.  With NoSQL, you will typically scale your data across several servers.  This brings us to caching.  With SQL, when you need very large volume support, you will generally fall back to a caching system such as memcached, you may even cache your output rendering (full, partial and/or doughnut).  With NoSQL you don't generally need cached results for data, but may still do output caching.  Ironically, more and more, read-only data stores are now being fronted with the object graph in no-sql for faster lookups, with the SQL db as the authority, and the application persisting to both...
&lt;br /&gt;&lt;br /&gt;
Transactional data... when dealing with highly transactional data (often Money data), SQL is usually better suited, as many Non-Relational DBs don't support atomic+consistent commits.  With No-SQL, you can work around this by using a MessageQueue system as an authority for transactional updates, that ensures only one at a time goes through.
&lt;br /&gt;&lt;br /&gt;
NoSQL is better at non-transactional data where read/lookup speed is king.  NoSQL is better at serialization of codified objects.  NoSQL is worse at transactional systems.  SQL is better at transactional systems, and has a simpler query system to use (compared to Map/Reduce).  SQL has performance penalties for multi-table joins and often requires additional technology to scale well...  
&lt;br /&gt;&lt;br /&gt;
In closing, each *can* do a given job, but a complete solution requires different implementations.  In my own humble opinion, for a public facing website, having your front-end backed by a Non-Relational DB is usually a better use case. YMMV.</description>
      <link>http://frugalcoder.us/post/2012/07/16/SQL-vs-Non-Relational-(NoSQL)-Databases.aspx</link>
      <author>newuser09876</author>
      <comments>http://frugalcoder.us/post/2012/07/16/SQL-vs-Non-Relational-(NoSQL)-Databases.aspx#comment</comments>
      <guid>http://frugalcoder.us/post.aspx?id=c9a77b97-92b2-4452-aa77-b9c9ed98e691</guid>
      <pubDate>Mon, 16 Jul 2012 11:47:00 +0000</pubDate>
      <category>NoSQL</category>
      <category>SQL Server</category>
      <dc:publisher>newuser09876</dc:publisher>
      <pingback:server>http://frugalcoder.us/pingback.axd</pingback:server>
      <pingback:target>http://frugalcoder.us/post.aspx?id=c9a77b97-92b2-4452-aa77-b9c9ed98e691</pingback:target>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://frugalcoder.us/trackback.axd?id=c9a77b97-92b2-4452-aa77-b9c9ed98e691</trackback:ping>
      <wfw:comment>http://frugalcoder.us/post/2012/07/16/SQL-vs-Non-Relational-(NoSQL)-Databases.aspx#comment</wfw:comment>
      <wfw:commentRss>http://frugalcoder.us/syndication.axd?post=c9a77b97-92b2-4452-aa77-b9c9ed98e691</wfw:commentRss>
    </item>
    <item>
      <title>Build your JS, Less and CSS files via Node.js with Visual Studio</title>
      <description>&lt;p&gt;&lt;big&gt;The advice below is not what I would recommend today (late 2013), I would suggest using &lt;a href="https://github.com/wearefractal/gulp"&gt;gulp&lt;/a&gt; (gulpfile.js) script for building client-side resources, and would do this as a pre-build event, there's also grunt, but I believe that gulp is better.  There are plugins for VS (Web Essentials) that can build your .less for you, but they tend to be problematic, inconsistent, and can be outright troublesome.&lt;/big&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;In my previous article, I wanted to use NodeJS to build my .less files as part  	of my build process in Visual Studio 2010.  I've since refined this process  	slightly.  I've now placed my build scripts into the &lt;code&gt;~/build&lt;/code&gt; directory  	at the root of my web project.&lt;/p&gt;
&lt;p&gt;I've also added a package.json file to the solution, so I can make a call to  	npm install in order to download any required node packages for the build process 	as well as creating a &lt;code&gt;build.node.js&lt;/code&gt; file for the purpose of  	compiling my less files, as well as minification and merging of files for use 	elsewhere.&lt;/p&gt;
&lt;p&gt;In the future I'd like to expand this to include SASS and CoffeeScript support as  	well as an npm package wrapper.&lt;/p&gt;
&lt;p&gt;Here is an example &lt;code&gt;package.json&lt;/code&gt;&lt;/p&gt;
&lt;pre class="brush: js"&gt;{
	"name": "My.Website"
	,"description": "My Website"
	,"version": "0.0.1"
	,"author": "tracker1 (http://tracker1.info/"
	,"dependencies":{
	}
	,"devDependencies": {
		"uglify-js":"1.x.x"
		,"less":"1.x.x"
		,"cssmin":"0.3.x"
		,"async":"0.1.x"
	}
	,"builder":{
		"tasks":[
			{
				"type":"css"
				,"minify":"both"
				,"output":"../Content/css/main"
				,"files":[
					"../Content/bootstrap-less/bootstrap.less"
					,"../Content/bootstrap-less/responsive.less"
					,"../Content/site-less/site.less"
				]
			}
			,{
				"type":"js"
				,"minify":"both"
				,"output":"../Content/js/init"
				,"files":[
					"../Scripts/js-extensions/010-ConsoleStub.js"
					,"../Scripts/browser-extensions/Browser.js"
					,"../Scripts/browser-extensions/init1.js"
					,"../Scripts/browser-extensions/css_browser_selector.js"
					,"../Scripts/browser-extensions/modernizr-2.5.3.js"
					,"../Scripts/browser-extensions/topscroll.js"
				]
			}
			...
		]
	}
}
&lt;/pre&gt;
&lt;p&gt;As you can see, I added a "builder" section with a number of "tasks" right now,  	the only tasks I am supporting are "js" and "css".  The minify option should be  	either &lt;code&gt;true&lt;/code&gt;, &lt;code&gt;false&lt;/code&gt;, or &lt;code&gt;"both"&lt;/code&gt;.   	The process will create &lt;code&gt;outputfile.(min|full).(css|js)&lt;/code&gt; so don't  	include a file extension on the output path.&lt;/p&gt;
&lt;p&gt;My &lt;code&gt;build.cmd&lt;/code&gt; file is now as follows, I'm including the TFS commands to checkout  	my js and css output paths, if you're using git/svn you can comment those lines  	out.&lt;/p&gt;
&lt;pre class="brush: shell"&gt;:: Step up from ~/bin to ~/build directory
cd ..\build

:: Checkout the files to be built
"%VS100COMNTOOLS%\..\IDE\tf" checkout /lock:none "..\Content\css\*.*"
"%VS100COMNTOOLS%\..\IDE\tf" checkout /lock:none "..\Content\js\*.*"

echo.
echo installing package dependancies
call npm install

echo.
echo building min/merge js and css
node build.node.js
echo.&lt;/pre&gt;
&lt;p&gt;With all of that said, here is my &lt;code&gt;build.node.js&lt;/code&gt; file.&lt;/p&gt;
&lt;pre class="brush: js"&gt;var fs = require("fs");
var util = require("util");
var async = require("async");

var less = require("less");
var cssmin = require("cssmin").cssmin;

var jsp = require("uglify-js").parser;
var pro = require("uglify-js").uglify;

var cfg;

main();

function main() {
	var pkg = JSON.parse(fs.readFileSync("package.json"),"utf8");
	cfg = pkg.builder;
	cfg.startDir = process.cwd();
	runTasks();
}

function runTasks() {
	console.log("Building CSS &amp;amp; JS files.");

	//store an array of functions for running each task
	var tasks = [];

	//console.log(JSON.stringify(cfg));

	//input each task definition into a runner.
	cfg.tasks.forEach(function(t){
		tasks.push(function(cb){
			if (t.type == "css") return runCssTask(t,cb);
			if (t.type == "js") return runJsTask(t,cb);
			cb(null,-1); //unrecognized format
		});
	});
	async.series(
		tasks
		,function(err,data) {
			console.log("Finished building CSS &amp;amp; JS files.");
		}
	);
}

function runCssTask(task, cb) {
	//data should be a collection of tree, use tree.toCSS() and tree.toCSS({compress:true}) respectively
	var min = task.minify;
	var full = !task.minify || task.minify === "both";
	
	console.log("Building " + task.output + " css");

	var fx = [];
	task.files.forEach(function(f){
		console.log("Loading " + f);

		fx.push(function(cb){
			var fp = fs.realpathSync(f).replace(/[\\\/]+/g,'/');
			var p = f.replace(/(\/[^\/]+)$/g,'/');

			var src = fs.readFileSync(fp,'utf8');
			var parser = new(less.Parser)({
				paths:[p]
				,filename:fp
			});
			parser.parse(src,function(err,tree){
				if (err) return cb(err,null);
				return cb(null, {"file":f, "css":tree.toCSS()});
			});
		});
	});
	async.series(
		fx
		,function(err,results) {
			if (err) throw err; //don't continue on error

			var m = [];
			var f = [];

			if (results &amp;amp;&amp;amp; results.length) {
				results.forEach(function(item){
					if (min) {
						m.push("/*" + item.file + "*/\r\n");
						m.push(cssmin(item.css));
						m.push("\r\n\r\n");
					}
					if (full) {
						f.push("/*" + item.file + "*/\r\n");
						f.push(item.css);
						f.push("\r\n\r\n");
					}
				});
			}

			//write file(s)
			if (min) fs.writeFileSync(task.output + ".min.css", m.join(""), 'utf8');
			if (full) fs.writeFileSync(task.output + ".full.css", f.join(""), 'utf8');

			console.log("css handled for '" + task.output + "' " + results.length);

			cb(null,1);
		}
	)
}

function runJsTask(task, cb) {
	var min = task.minify;
	var full = !task.minify || task.minify === "both";

	console.log("Building " + task.output + " css");

	var fx = [];
	task.files.forEach(function(f){
		fx.push(function(cb){
			console.log("Loading " + f);
			var ret = {"file":f};
			var fp = fs.realpathSync(f).replace(/[\\\/]+/g,'/');
			var p = f.replace(/(\/[^\/]+)$/g,'/');
			
			ret.full = fs.readFileSync(f,'utf8');
			if (min) {
				var ast = jsp.parse(ret.full); //parse code for initial ast
				ast = pro.ast_mangle(ast); //get new ast with mangled names
				ast = pro.ast_squeeze(ast); //get an ast with compression optimizations
				ret.min = pro.gen_code(ast); //get compressed output
			}
			cb(null, ret);
		});
	});
	
	async.series(
		fx
		,function(err,results) {
						if (err) throw err; //don't continue on error

			//data should be a collection of tree, use tree.toCSS() and tree.toCSS({compress:true}) respectively

			var m = [];
			var f = [];

			if (results &amp;amp;&amp;amp; results.length) {
				results.forEach(function(item){
					if (min) {
						m.push(";/*" + item.file + "*/\r\n");
						m.push(item.min);
						m.push("\r\n\r\n");
					}
					if (full) {
						f.push(";/*" + item.file + "*/\r\n");
						f.push(item.full);
						f.push("\r\n\r\n");
					}
				});
			}
			
			//write file(s)
			if (min) fs.writeFileSync(task.output + ".min.js", m.join(""), 'utf8');
			if (full) fs.writeFileSync(task.output + ".full.js", f.join(""), 'utf8');

			console.log("js handled for '" + task.output + "' " + results.length);
			cb(null,2);
		}
	);
}&lt;/pre&gt;</description>
      <link>http://frugalcoder.us/post/2012/06/21/Build-your-JS-Less-and-CSS-files-via-Nodejs-with-Visual-Studio.aspx</link>
      <author>newuser09876</author>
      <comments>http://frugalcoder.us/post/2012/06/21/Build-your-JS-Less-and-CSS-files-via-Nodejs-with-Visual-Studio.aspx#comment</comments>
      <guid>http://frugalcoder.us/post.aspx?id=d25fdb6d-e8dd-413b-b678-1292df548b15</guid>
      <pubDate>Thu, 21 Jun 2012 12:29:00 +0000</pubDate>
      <category>CSS</category>
      <category>JavaScript</category>
      <category>NodeJS</category>
      <category>Visual Studio</category>
      <category>Web Development</category>
      <dc:publisher>newuser09876</dc:publisher>
      <pingback:server>http://frugalcoder.us/pingback.axd</pingback:server>
      <pingback:target>http://frugalcoder.us/post.aspx?id=d25fdb6d-e8dd-413b-b678-1292df548b15</pingback:target>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://frugalcoder.us/trackback.axd?id=d25fdb6d-e8dd-413b-b678-1292df548b15</trackback:ping>
      <wfw:comment>http://frugalcoder.us/post/2012/06/21/Build-your-JS-Less-and-CSS-files-via-Nodejs-with-Visual-Studio.aspx#comment</wfw:comment>
      <wfw:commentRss>http://frugalcoder.us/syndication.axd?post=d25fdb6d-e8dd-413b-b678-1292df548b15</wfw:commentRss>
    </item>
    <item>
      <title>Building Twitter Bootstrap With Visual Studio 2010</title>
      <description>&lt;img src="http://frugalcoder.us/image.axd?picture=2012%2f6%2fvs-bootstrap.png" alt="" style="float:left; margin: 3px 1em 1em 3px" /&gt;

&lt;p&gt;
	I've been a big fan of the &lt;a href="http://chirpy.codeplex.com/"&gt;Chirpy&lt;/a&gt; Add-In for Visual Studio for a couple of 
	years now.  Recently I started work on a project where it made sense to use
	&lt;a href="http://twitter.github.com/bootstrap/"&gt;Twitter Bootstrap&lt;/a&gt; as a base set of CSS and JavaScript within an ASP.Net MVC 3
	project.  Since I needed to adjust the colors, and a few other settings, I 
	figured it would be simple enough.  Unfortunately the main .less files use 
	&lt;code&gt;@import&lt;/code&gt; directives in order to include the necessary files in 
	the correct order, which Chirpy doesn't seem to support.
&lt;/p&gt;
&lt;p&gt;	
	I came across &lt;a href="http://www.annhoang.net/twitter-bootstrap-in-visual-studio-2010-with-chirpy-and-dotless/"&gt;another blog post&lt;/a&gt; that mentions using dotLess in the same scenario to build the .less 
	files as a pre-build event.  I went a slightly different route.  Instead 
	of using dotLess, I went with NodeJS and lessc as the compiler, this also 
	allows me to use cssmin as a css minifier within the same build event.
&lt;/p&gt;
&lt;p&gt;	
	First, you will want to download the latest Bootstrap source files, placing
	the less and img folders within the same parent.  In this case, I used
	&lt;code&gt;~/Content/bootstrap/less&lt;/code&gt; and &lt;code&gt;~/Content/bootstrap/img&lt;/code&gt;
	for the less and img content.  I placed the js into &lt;code&gt;~/Scripts/bootstrap&lt;/code&gt;.
&lt;/p&gt;
&lt;p&gt;	
	Second you will want to download and install the latest &lt;a href="http://nodejs.org/"&gt;NodeJS&lt;/a&gt; for windows. 
	After that, from a command prompt, you're going to need to use the 
	Node Package Manager (npm) to install the global utilities for &lt;code&gt;less&lt;/code&gt; and 
	&lt;code&gt;cssmin&lt;/code&gt; from a command prompt.
&lt;/p&gt;

&lt;pre class="brush: shell"&gt;npm -g install less
npm -g install cssmin&lt;/pre&gt;

&lt;p&gt;	
	Third, you'll need to setup your Post-build event. 
	Right-click the web project, then select properties.  Then bring up the "Build Events" tab.  
	From there, I have the following text in my "Pre-build event command line"
&lt;/p&gt;
	
&lt;pre class="brush: shell"&gt;"$(ProjectDir)!PreBuild.cmd" "$(ProjectDir)" "$(DevEnvDir)"&lt;/pre&gt;
	
&lt;/p&gt;
	With that in place, I added a "!PreBuild.cmd" batch file into the root of the project with the following content. 
	(note: make sure the file is saved with DOS/ASCII encoding mode text, not UTF.  Create it in Notepad if need be)
&lt;/p&gt;
	
&lt;pre class="brush: shell"&gt;@echo off
cls

echo.
echo !PreBuild.cmd %1

:: Remove quotes from project path...
SET _projpath=%1
SET _projpath=###%_projpath%###
SET _projpath=%_projpath:"###=%
SET _projpath=%_projpath:###"=%
SET _projpath=%_projpath:###=%

:: Remove quotes from _devenv path
SET _devenv=%2
SET _devenv=###%_devenv%###
SET _devenv=%_devenv:"###=%
SET _devenv=%_devenv:###"=%
SET _devenv=%_devenv:###=%


:: Checkout the files to be built
"%_devenv%tf" checkout /lock:none "%_projpath%Content\bootstrap\css\*.*"


echo.
echo Build bootstrap.less
call lessc "%_projpath%Content\bootstrap\less\bootstrap.less" "%_projpath%Content\bootstrap\css\bootstrap.css"
call cssmin "%_projpath%Content\bootstrap\css\bootstrap.css" &gt; "%_projpath%Content\bootstrap\css\bootstrap.min.css"

echo.
echo Build responsive.less
call lessc "%_projpath%Content\bootstrap\less\responsive.less" "%_projpath%Content\bootstrap\css\responsive.css"
call cssmin "%_projpath%Content\bootstrap\css\responsive.css" &gt; "%_projpath%Content\bootstrap\css\responsive.min.css"
&lt;/pre&gt;

&lt;p&gt;	
	With the above pre-build batch in place, the css directory will be checked out, and the bootstrap css files will 
	be created with a minified version.
&lt;/p&gt;</description>
      <link>http://frugalcoder.us/post/2012/06/07/Building-Twitter-Bootstrap-With-Visual-Studio-2010.aspx</link>
      <author>newuser09876</author>
      <comments>http://frugalcoder.us/post/2012/06/07/Building-Twitter-Bootstrap-With-Visual-Studio-2010.aspx#comment</comments>
      <guid>http://frugalcoder.us/post.aspx?id=cb204174-e998-4419-90da-003fc81fbc18</guid>
      <pubDate>Thu, 07 Jun 2012 12:11:00 +0000</pubDate>
      <category>ASP.Net</category>
      <category>ASP.Net MVC</category>
      <category>CSS</category>
      <dc:publisher>newuser09876</dc:publisher>
      <pingback:server>http://frugalcoder.us/pingback.axd</pingback:server>
      <pingback:target>http://frugalcoder.us/post.aspx?id=cb204174-e998-4419-90da-003fc81fbc18</pingback:target>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://frugalcoder.us/trackback.axd?id=cb204174-e998-4419-90da-003fc81fbc18</trackback:ping>
      <wfw:comment>http://frugalcoder.us/post/2012/06/07/Building-Twitter-Bootstrap-With-Visual-Studio-2010.aspx#comment</wfw:comment>
      <wfw:commentRss>http://frugalcoder.us/syndication.axd?post=cb204174-e998-4419-90da-003fc81fbc18</wfw:commentRss>
    </item>
    <item>
      <title>UUID/GUID in JavaScript</title>
      <description>&lt;p&gt;Just wanted to push out this somewhat useful JavaScript snippet for generating a UUID (GUID) in JavaScript.&lt;/p&gt;
&lt;br /&gt;
&lt;pre class="brush: js"&gt;//UUID/Guid Generator
// use: UUID.create() or UUID.createSequential()
// convenience:  UUID.empty, UUID.tryParse(string)
(function(w){
  // From http://baagoe.com/en/RandomMusings/javascript/
  // Johannes BaagÃ¸e &amp;lt;baagoe@baagoe.com&amp;gt;, 2010
  function Mash() {
    var n = 0xefc8249d;

    var mash = function(data) {
    data = data.toString();
    for (var i = 0; i &amp;lt; data.length; i++) {
      n += data.charCodeAt(i);
      var h = 0.02519603282416938 * n;
      n = h &amp;gt;&amp;gt;&amp;gt; 0;
      h -= n;
      h *= n;
      n = h &amp;gt;&amp;gt;&amp;gt; 0;
      h -= n;
      n += h * 0x100000000; // 2^32
    }
    return (n &amp;gt;&amp;gt;&amp;gt; 0) * 2.3283064365386963e-10; // 2^-32
    };

    mash.version = 'Mash 0.9';
    return mash;
  }

  // From http://baagoe.com/en/RandomMusings/javascript/
  function Kybos() {
    return (function(args) {
    // Johannes BaagÃ¸e &amp;lt;baagoe@baagoe.com&amp;gt;, 2010
    var s0 = 0;
    var s1 = 0;
    var s2 = 0;
    var c = 1;
    var s = [];
    var k = 0;

    var mash = Mash();
    var s0 = mash(' ');
    var s1 = mash(' ');
    var s2 = mash(' ');
    for (var j = 0; j &amp;lt; 8; j++) {
      s[j] = mash(' ');
    }

    if (args.length == 0) {
      args = [+new Date];
    }
    for (var i = 0; i &amp;lt; args.length; i++) {
      s0 -= mash(args[i]);
      if (s0 &amp;lt; 0) {
      s0 += 1;
      }
      s1 -= mash(args[i]);
      if (s1 &amp;lt; 0) {
      s1 += 1;
      }
      s2 -= mash(args[i]);
      if (s2 &amp;lt; 0) {
      s2 += 1;
      }
      for (var j = 0; j &amp;lt; 8; j++) {
      s[j] -= mash(args[i]);
      if (s[j] &amp;lt; 0) {
        s[j] += 1;
      }
      }
    }

    var random = function() {
      var a = 2091639;
      k = s[k] * 8 | 0;
      var r = s[k];
      var t = a * s0 + c * 2.3283064365386963e-10; // 2^-32
      s0 = s1;
      s1 = s2;
      s2 = t - (c = t | 0);
      s[k] -= s2;
      if (s[k] &amp;lt; 0) {
      s[k] += 1;
      }
      return r;
    };
    random.uint32 = function() {
      return random() * 0x100000000; // 2^32
    };
    random.fract53 = function() {
      return random() +
      (random() * 0x200000 | 0) * 1.1102230246251565e-16; // 2^-53
    };
    random.addNoise = function() {
      for (var i = arguments.length - 1; i &amp;gt;= 0; i--) {
      for (j = 0; j &amp;lt; 8; j++) {
        s[j] -= mash(arguments[i]);
        if (s[j] &amp;lt; 0) {
        s[j] += 1;
        }
      }
      }
    };
    random.version = 'Kybos 0.9';
    random.args = args;
    return random;

    } (Array.prototype.slice.call(arguments)));
  };

  var rnd = Kybos();

  // UUID/GUID implementation from http://frugalcoder.us/post/2012/01/13/javascript-guid-uuid-generator.aspx
  var UUID = {
    "empty": "00000000-0000-0000-0000-000000000000"
    ,"parse": function(input) {
      var ret = input.toString().trim().toLowerCase().replace(/^[\s\r\n]+|[\{\}]|[\s\r\n]+$/g, "");
      if ((/[a-f0-9]{8}\-[a-f0-9]{4}\-[a-f0-9]{4}\-[a-f0-9]{4}\-[a-f0-9]{12}/).test(ret))
        return ret;
      else
        throw new Error("Unable to parse UUID");
    }
    ,"createSequential": function() {
      var ret = new Date().valueOf().toString(16).replace("-","")
      for (;ret.length &amp;lt; 12; ret = "0" + ret);
      ret = ret.substr(ret.length-12,12); //only least significant part
      for (;ret.length &amp;lt; 32;ret += Math.floor(rnd() * 0xffffffff).toString(16));
      return [ret.substr(0,8), ret.substr(8,4), "4" + ret.substr(12,3), "89AB"[Math.floor(Math.random()*4)] + ret.substr(16,3),  ret.substr(20,12)].join("-");
    }
    ,"create": function() {
      var ret = "";
      for (;ret.length &amp;lt; 32;ret += Math.floor(rnd() * 0xffffffff).toString(16));
      return [ret.substr(0,8), ret.substr(8,4), "4" + ret.substr(12,3), "89AB"[Math.floor(Math.random()*4)] + ret.substr(16,3),  ret.substr(20,12)].join("-");
    }
    ,"random": function() {
      return rnd();
    }
    ,"tryParse": function(input) {
      try {
        return UUID.parse(input);
      } catch(ex) {
        return UUID.empty;
      }
    }
  };
  UUID["new"] = UUID.create;

  w.UUID = w.Guid = UUID;
}(window || this));&lt;/pre&gt;

&lt;p&gt;NOTE: Cryptographically strong random number generator thanks to &lt;a href="http://baagoe.com/en/RandomMusings/javascript/"&gt;Johannes Baagoe&lt;/a&gt;&lt;/p&gt;</description>
      <link>http://frugalcoder.us/post/2012/01/13/UUIDGUID-in-JavaScript.aspx</link>
      <author>newuser09876</author>
      <comments>http://frugalcoder.us/post/2012/01/13/UUIDGUID-in-JavaScript.aspx#comment</comments>
      <guid>http://frugalcoder.us/post.aspx?id=e576a7ee-7df9-4d38-9af3-220549b0dd0e</guid>
      <pubDate>Fri, 13 Jan 2012 12:43:00 +0000</pubDate>
      <category>JavaScript</category>
      <dc:publisher>newuser09876</dc:publisher>
      <pingback:server>http://frugalcoder.us/pingback.axd</pingback:server>
      <pingback:target>http://frugalcoder.us/post.aspx?id=e576a7ee-7df9-4d38-9af3-220549b0dd0e</pingback:target>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://frugalcoder.us/trackback.axd?id=e576a7ee-7df9-4d38-9af3-220549b0dd0e</trackback:ping>
      <wfw:comment>http://frugalcoder.us/post/2012/01/13/UUIDGUID-in-JavaScript.aspx#comment</wfw:comment>
      <wfw:commentRss>http://frugalcoder.us/syndication.axd?post=e576a7ee-7df9-4d38-9af3-220549b0dd0e</wfw:commentRss>
    </item>
    <item>
      <title>Mapping windows volume for keyboards without media keys</title>
      <description>&lt;p&gt;Okay, I've been using this for quite a while now, but figured it should be useful for those who aren't me.  I'm currently using a &lt;a href="http://www.pckeyboard.com/"&gt;Unicomp&lt;/a&gt; &lt;a href="http://pckeyboards.stores.yahoo.net/customizer.html"&gt;Customizer 104&lt;/a&gt; key keyboard at work, and home.  These keyboards do not have media keys on them, which is fine since I rarely use anything other than the volume controls on them.&lt;/p&gt;
&lt;p&gt;There is a program called &lt;a href="http://www.autohotkey.com/"&gt;AutoHotKey&lt;/a&gt; that can run scripts based on various keyboard inputs, or hotkey combinations.  I'm using the script below to match the Super/Windows key + [, ] and \ to volume down, up and mute respectively.&lt;/p&gt;
&lt;pre&gt;;; Map WIN + [ to Volume Down
#[::Send {Volume_Down 2}

;; Map WIN + ] to Volume Up
#]::Send {Volume_Up 2}

;; Map WIN + \ to toggle mute
#\::Send {Volume_Mute}&lt;/pre&gt;
&lt;p&gt;I should state that I am not affiliated with either Unicomp or Autohotkey.  This is because it was helpful to me, and took a while to find this, and figured it would be helpful to others as well.&lt;/p&gt;</description>
      <link>http://frugalcoder.us/post/2011/10/07/Mapping-windows-volume-for-keyboards-without-media-keys.aspx</link>
      <author>newuser09876</author>
      <comments>http://frugalcoder.us/post/2011/10/07/Mapping-windows-volume-for-keyboards-without-media-keys.aspx#comment</comments>
      <guid>http://frugalcoder.us/post.aspx?id=f7b05694-7914-4cbd-a0af-8a67c9b69fbc</guid>
      <pubDate>Fri, 07 Oct 2011 12:22:00 +0000</pubDate>
      <category>Hardware</category>
      <dc:publisher>newuser09876</dc:publisher>
      <pingback:server>http://frugalcoder.us/pingback.axd</pingback:server>
      <pingback:target>http://frugalcoder.us/post.aspx?id=f7b05694-7914-4cbd-a0af-8a67c9b69fbc</pingback:target>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://frugalcoder.us/trackback.axd?id=f7b05694-7914-4cbd-a0af-8a67c9b69fbc</trackback:ping>
      <wfw:comment>http://frugalcoder.us/post/2011/10/07/Mapping-windows-volume-for-keyboards-without-media-keys.aspx#comment</wfw:comment>
      <wfw:commentRss>http://frugalcoder.us/syndication.axd?post=f7b05694-7914-4cbd-a0af-8a67c9b69fbc</wfw:commentRss>
    </item>
    <item>
      <title>ASP.Net Grid with SqlDatasource using Stored Procedure is Blank</title>
      <description>&lt;p&gt;After a lot of searching, I finally found the answer &lt;a href="http://forums.asp.net/t/951579.aspx/2/10?Using+GridView+with+stored+procedure+in+datasource+does+not+work"&gt;here&lt;/a&gt;.  It seems that when you are using an SqlDataSource that when a parameter is null, it will cancel a select by default.  You need to add the attribute of &lt;code&gt;&lt;b&gt;CancelSelectOnNullParameter="false"&lt;/b&gt;&lt;/code&gt;.  It was very frustrating, as using the SQL Server Profiler, the query wasn't even being issued, and it was a pain to track down.&lt;/p&gt;
&lt;p&gt;I'm putting this up here, to hopefully help others with a similar situation in the future.&lt;/p&gt;
</description>
      <link>http://frugalcoder.us/post/2011/08/09/ASPNet-Grid-with-SqlDatasource-using-Stored-Procedure-is-Blank.aspx</link>
      <author>newuser09876</author>
      <comments>http://frugalcoder.us/post/2011/08/09/ASPNet-Grid-with-SqlDatasource-using-Stored-Procedure-is-Blank.aspx#comment</comments>
      <guid>http://frugalcoder.us/post.aspx?id=5725554d-85d4-4222-a181-b574052c0aed</guid>
      <pubDate>Tue, 09 Aug 2011 10:25:00 +0000</pubDate>
      <category>ASP.Net</category>
      <category>SQL Server</category>
      <category>T-SQL</category>
      <dc:publisher>newuser09876</dc:publisher>
      <pingback:server>http://frugalcoder.us/pingback.axd</pingback:server>
      <pingback:target>http://frugalcoder.us/post.aspx?id=5725554d-85d4-4222-a181-b574052c0aed</pingback:target>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://frugalcoder.us/trackback.axd?id=5725554d-85d4-4222-a181-b574052c0aed</trackback:ping>
      <wfw:comment>http://frugalcoder.us/post/2011/08/09/ASPNet-Grid-with-SqlDatasource-using-Stored-Procedure-is-Blank.aspx#comment</wfw:comment>
      <wfw:commentRss>http://frugalcoder.us/syndication.axd?post=5725554d-85d4-4222-a181-b574052c0aed</wfw:commentRss>
    </item>
    <item>
      <title>Generic Literals in VB.Net 2010</title>
      <description>&lt;p&gt;Okay, something very cool in VB.Net as of VS2010 is that you can use literals for assignments to generic collections...&lt;/p&gt;

&lt;pre class="brush: vb"&gt;'List from Literal
Dim myList As New List(Of Integer)() From {1,2,3,4,5}

'Dictionary from Literal
Dim myDic As New Dictionary(Of String, Integer)() From {
    {"key1", 1},
    {"key2", 2}
}
&lt;/pre&gt;

&lt;p&gt;Then when trying to load with Tuple's as the value, I ran into a snag, since it didn't understand the conversion of the tuple literal values.  I found that by creating the needed extension methods into &lt;a href="http://frugalcoder.us/file.axd?file=2011%2f3%2fTupleExtensionsForGenericCollectionsModule.vb.txt"&gt;this module&lt;/a&gt; that I could do what I wanted to accomplish.&lt;/p&gt;

&lt;pre class="brush: vb"&gt;Dim myQueue= New Queue(Of Tuple(Of Integer, Integer)) From {
    {19, 63},
    {20, 63}
}&lt;/pre&gt;

&lt;p&gt;As you can see, it really isn't so difficult to use, but can be really useful when using paired values in a given collection.  Generic classes such as Tuple, and Generic collections can help a lot in data iteration.&lt;/p&gt;

&lt;br /&gt;
&lt;p&gt;&lt;a href="http://frugalcoder.us/file.axd?file=2011%2f3%2fTupleExtensionsForGenericCollectionsModule.vb.txt"&gt;TupleExtensionsForGenericCollectionsModule.vb.txt (4.45 kb)&lt;/a&gt;&lt;/p&gt;</description>
      <link>http://frugalcoder.us/post/2011/03/31/Generic-Literals-in-VBNet-2010.aspx</link>
      <author>newuser09876</author>
      <comments>http://frugalcoder.us/post/2011/03/31/Generic-Literals-in-VBNet-2010.aspx#comment</comments>
      <guid>http://frugalcoder.us/post.aspx?id=d435b142-f556-4152-bc7b-357a2a174000</guid>
      <pubDate>Thu, 31 Mar 2011 12:57:00 +0000</pubDate>
      <category>.Net</category>
      <category>Visual Basic</category>
      <dc:publisher>newuser09876</dc:publisher>
      <pingback:server>http://frugalcoder.us/pingback.axd</pingback:server>
      <pingback:target>http://frugalcoder.us/post.aspx?id=d435b142-f556-4152-bc7b-357a2a174000</pingback:target>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://frugalcoder.us/trackback.axd?id=d435b142-f556-4152-bc7b-357a2a174000</trackback:ping>
      <wfw:comment>http://frugalcoder.us/post/2011/03/31/Generic-Literals-in-VBNet-2010.aspx#comment</wfw:comment>
      <wfw:commentRss>http://frugalcoder.us/syndication.axd?post=d435b142-f556-4152-bc7b-357a2a174000</wfw:commentRss>
    </item>
    <item>
      <title>Convert an integer to a base26 alpha string</title>
      <description>&lt;div class="text"&gt;&lt;p&gt;In case you ever need to convert an integer to an alpha (such as the top of a spreadsheet). A-Z, AA-AZ etc. &lt;/p&gt;

&lt;pre class="brush: js"&gt;function intToAlpha26String(input) {
    input = (+input).toString(26);
    var ret = [];
    while (input.length) {
        var a = input.charCodeAt(input.length-1);
        if (input.length &gt; 1)
            input = (parseInt(input.substr(0, input.length - 1), 26) - 1).toString(26);
        else
            input = "";

        if (a &gt;= 48/*'0'*/ &amp;&amp; a &lt;= 57 /*'9'*/)
            ret.unshift(String.fromCharCode(a + 49)); //raise to += 'a'
        else
            ret.unshift(String.fromCharCode(a + 10)); //raise + 10 (make room for 0-9)
    }
    return ret.join('').toUpperCase();
}&lt;/pre&gt;

Hope this helps, let me know if you need the reverse, may just work that one out.  Nice that JS supports some fairly broad base classifications that other languages don't.  This actually translates fairly nicely into actionscript.

&lt;hr /&gt;
T-SQL
&lt;pre class="brush: sql"&gt;CREATE FUNCTION [dbo].[IntToBase26Alpha]
(
	@input AS int
)
RETURNS varchar(MAX)
AS
BEGIN
	DECLARE @ret AS varchar(MAX)	
	DECLARE @debug as VARCHAR(MAX);
	
	DECLARE @process AS int
	DECLARE @current AS int
	
	SET @ret = ''
	SET @process = CASE WHEN (@input is null or @input &lt; 1) THEN 0 ELSE @input END
	SET @debug = ''
	
	WHILE (@process &gt;= 0)
	BEGIN

		SET @current = @process % 26
		SET @process = ROUND(@process / 26, 0) - 1
		SET @ret = CHAR(@current + 65) + @ret

	END
	
	Return @ret
END
GO&lt;/pre&gt;


&lt;p&gt;
&lt;/div&gt;</description>
      <link>http://frugalcoder.us/post/2011/02/24/Convert-an-integer-to-a-base26-alpha-string.aspx</link>
      <author>newuser09876</author>
      <comments>http://frugalcoder.us/post/2011/02/24/Convert-an-integer-to-a-base26-alpha-string.aspx#comment</comments>
      <guid>http://frugalcoder.us/post.aspx?id=4b033fe5-f2e4-466c-920b-12563d88dc2e</guid>
      <pubDate>Thu, 24 Feb 2011 15:18:00 +0000</pubDate>
      <category>JavaScript</category>
      <category>Web Development</category>
      <dc:publisher>newuser09876</dc:publisher>
      <pingback:server>http://frugalcoder.us/pingback.axd</pingback:server>
      <pingback:target>http://frugalcoder.us/post.aspx?id=4b033fe5-f2e4-466c-920b-12563d88dc2e</pingback:target>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://frugalcoder.us/trackback.axd?id=4b033fe5-f2e4-466c-920b-12563d88dc2e</trackback:ping>
      <wfw:comment>http://frugalcoder.us/post/2011/02/24/Convert-an-integer-to-a-base26-alpha-string.aspx#comment</wfw:comment>
      <wfw:commentRss>http://frugalcoder.us/syndication.axd?post=4b033fe5-f2e4-466c-920b-12563d88dc2e</wfw:commentRss>
    </item>
    <item>
      <title>CSS Hacks for IE</title>
      <description>&lt;p&gt;The following are a few techniques you can use to target specific IE versions via CSS markup.&lt;/p&gt;
&lt;pre class="brush: css"&gt;TAGIDENTIFIER {
    property:  valueA;   /* all browsers, of course */
    property:  valueB\9; /* IE9 and below, the 9 has nothing to do with the version in place */
    *property: valueC;   /* IE7 and below */
    _property: valueD;   /* IE6 */
}

/* IE6 ONLY */
    * html TAGIDENTIFIER

/* IE7 ONLY */
    *:first-child+html TAGIDENTIFIER

/* Modern Browsers &amp; IE7+ */
    html&gt;body TAGIDENTIFIER&lt;/pre&gt;
&lt;p&gt;
I would like to point out that using IE conditional comments is still the best way to address specific browsers, it's just worthwhile to know about these techniques.
&lt;/p&gt;</description>
      <link>http://frugalcoder.us/post/2010/11/01/CSS-Hacks-for-IE.aspx</link>
      <author>newuser09876</author>
      <comments>http://frugalcoder.us/post/2010/11/01/CSS-Hacks-for-IE.aspx#comment</comments>
      <guid>http://frugalcoder.us/post.aspx?id=e4b99b16-330f-4087-b349-ee5fda8a35e3</guid>
      <pubDate>Mon, 01 Nov 2010 18:24:00 +0000</pubDate>
      <category>CSS</category>
      <category>Web Development</category>
      <dc:publisher>newuser09876</dc:publisher>
      <pingback:server>http://frugalcoder.us/pingback.axd</pingback:server>
      <pingback:target>http://frugalcoder.us/post.aspx?id=e4b99b16-330f-4087-b349-ee5fda8a35e3</pingback:target>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://frugalcoder.us/trackback.axd?id=e4b99b16-330f-4087-b349-ee5fda8a35e3</trackback:ping>
      <wfw:comment>http://frugalcoder.us/post/2010/11/01/CSS-Hacks-for-IE.aspx#comment</wfw:comment>
      <wfw:commentRss>http://frugalcoder.us/syndication.axd?post=e4b99b16-330f-4087-b349-ee5fda8a35e3</wfw:commentRss>
    </item>
    <item>
      <title>Creating A Modern Web Application - Part 2 (Working with HTML5 and CSS3)</title>
      <description>&lt;p&gt;This is Part 2 in a series on creating a web application utilizing modern  techniques in order to deliver a fast, cohesive site.  The index for this series  can be found at the end of &lt;a href="http://frugalcoder.us/post/2010/10/25/modern-web-apps-part001.aspx"&gt;part 1 in this series&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;img style="float:left; margin-right:0.5em;" src="http://frugalcoder.us/image.axd?picture=2010%2f10%2ffiles.png" alt="file structure" /&gt;&lt;/p&gt;
&lt;div&gt;&lt;a href="http://demo.frugalcoder.us/modern-web-app/part-002/demo/index.html"&gt;View the Part2 demo page.&lt;/a&gt; &lt;br /&gt; &lt;a href="http://demo.frugalcoder.us/modern-web-app/part-002/part2-demo.zip"&gt;Download the Part2 demo.&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;As you can see on the left, we are starting out with a fairly simple  file structure.  In order to keep things simple, we are going to assume  that this is going to be run from the root of the website.&lt;/p&gt;
&lt;p&gt;The first thing I'd like to do is point out the PIE.htc file in the  root directory.  This comes from the &lt;a href="http://css3pie.com/"&gt;CSS3PIE&lt;/a&gt; project and will be used to aid IE6-8 in rendering CSS3 features such as  rounded borders and background gradients.  There isn't full support for  every feature of CSS3, and there are a couple of quirks.  However, this is  still a far better use of resources to work around these minor IEOLD issues  rather than having the additional images and markup needed to do  rounded corners and background gradients via other, more traditional  methods.&lt;/p&gt;
&lt;p&gt;Second, I'd like to point out that I'm starting off with two JavaScript files in place.  First is the wonderful  &lt;a href="http://code.google.com/p/html5shiv/"&gt;html5shiv&lt;/a&gt; which adds support for  HTML5 tags in IE6-8.  The second is &lt;a href="http://github.com/rafaelp/css_browser_selector"&gt;css_browser_selector.js&lt;/a&gt;, which adds specific classes to the HTML (documentElement) element in order to write  clean CSS rules when possible. This functionality is only useful when JavaScript  is enabled, so it should be used sparingly.  As IE is still the browser king, with several quirky variations  on rendering, we'll also be adding in some conditional elements in order to target  specific IE versions in our CSS.  The other JavaScript file in the head&lt;/p&gt;
&lt;p&gt;At this point I am going to point out that I've defined three stylesheets.  I've  created a general main.css as well as the addition of a main-ienew.css and  main-ieold.css.  Where the ienew variant will be fore IE9+ and the ieold will target IE6-8 specifically.  The main reason for this is because of some current  quirkiness in IE9 beta where it will load PIE.htc behavior on elements despite  being set not do to so.&lt;/p&gt;
&lt;pre class="brush: css"&gt;example: #ieold .className { behavior: url(/PIE.htc); }&lt;/pre&gt;
&lt;p&gt;At this point, I'm going to point out the actual markup of our starting page, then  go over the CSS that will be in place to support this.  This is a demonstration  of creating the rounded corners and background gradients only.  Other operations  will be covered in future articles.&lt;/p&gt;
&lt;pre class="brush: html"&gt;&amp;lt;!DOCTYPE html&amp;gt;
&amp;lt;html&amp;gt;
&amp;lt;head&amp;gt;
  &amp;lt;!-- Meta Data --&amp;gt;
  &amp;lt;meta http-equiv="X-UA-Compatible" content="IE=99,chrome=1" /&amp;gt;
  &amp;lt;meta name="description" content="" /&amp;gt;
  &amp;lt;meta name="keywords" content="" /&amp;gt;
  &amp;lt;link rel="shortcut icon" type="image/ico" href="http://frugalcoder.us/favicon.ico" /&amp;gt;

  &amp;lt;title&amp;gt;Part 2 - Creating A Modern Web Application&amp;lt;/title&amp;gt;

  &amp;lt;!-- Inject browser classes, and add support for HTML5 tags to IEOLD --&amp;gt;
  &amp;lt;script src="assets/scripts/browser-extensions/html5shiv.js"&amp;gt;&amp;lt;/script&amp;gt;
  &amp;lt;script src="assets/scripts/browser-extensions/css_browser_selector.js"&amp;gt;&amp;lt;/script&amp;gt;

  &amp;lt;!-- core css markup --&amp;gt;
  &amp;lt;link rel="stylesheet" type="text/css" href="assets/styles/common/main.css" /&amp;gt;
  &amp;lt;!--[if gte IE 9]&amp;gt;&amp;lt;link rel="stylesheet" type="text/css" href="assets/styles/common/main-ienew.css" /&amp;gt;&amp;lt;![endif]--&amp;gt;
  &amp;lt;!--[if lt IE 9]&amp;gt;&amp;lt;link rel="stylesheet" type="text/css" href="assets/styles/common/main-ieold.css" /&amp;gt;&amp;lt;![endif]--&amp;gt;

  &amp;lt;!-- print css markup --&amp;gt;
  &amp;lt;link rel="stylesheet" type="text/css" media="print" href="assets/styles/common/main-print.css" /&amp;gt;  
&amp;lt;/head&amp;gt;&lt;/pre&gt;
&lt;p&gt;Above you see the content through the HEAD section of the document.  We first start with the HTML5 DOCTYPE, which in essense tells the browser to  use whatever the newest/current rendering engine available has to offer.   Next we include some meta elements, the first of which &lt;code&gt;X-UA-Compatible&lt;/code&gt;. As of Internet Explorer version 8, the rendering engine for 7 and 8 are included,  unfortunately IE6 is not.  I suggest using IE Tester, or a stand-alone installer  for older IE version testing.  The X-UA-Compatible meta attribute can set the  IE renderer to be used and is set to 99 in our example to future-proof things.  If you come across issues with IE9 or later, this can be helpful to force the  older rendering until specific issues can be worked out.  You will also notice  the &lt;code&gt;chrome=1&lt;/code&gt; portion; which will tell IE browsers with the Chrome  Frame plugin installed to utilize the Chrome rendering engine where available.  I personally consider the Webkit rendering engine along with the V8 JavaScript  engine the gold standard to view against.  This may change in the future, but  for now, how it renders in Webkit (Chrome/Safari) should be considered how it  *should* be rendering.  This will give you the least resistance in adjusting  for non-compliant browsers.&lt;/p&gt;
&lt;p&gt;After the typical meta elements for keywords, description and a link to the favicon.  The regular TITLE element is encluded.  It's worth noting that within the TITLE element,  you should have your specific section of the site first, followed by more generic  information.  In this case, I'm starting with the specific page's name, followed  by the title of the site/series.  This can help will SEO, as having the same  content in every title dilutes the value of that title across a site.&lt;/p&gt;
&lt;p&gt;The first scripts we include are those that *must* be included in the head in  order to function properly, and before any stylesheets are loaded.  This will  reduce the impact of said scripts on the css that comes next.  After the main.css, I am including some conditional scripts for IENEW and IEOLD, where IEOLD is  anything prior to version 9 (our support target is 6-9), and IENEW is defined  as anything from version 9 on (which supports HTML5).  After the general  stylesheets we're including a css to establish print adjustments.  It's  important to establish a print media stylesheet that reduces the additional clutter  such as the header, footer and page margins in order for the printing experience  to be better.&lt;/p&gt;
&lt;p&gt;On to the rest of the html file...&lt;/p&gt;
&lt;pre class="brush: html"&gt;&amp;lt;body&amp;gt;
&amp;lt;!--[if IE 6]&amp;gt;&amp;lt;div id="ie6" class="ie"&amp;gt;&amp;lt;![endif]--&amp;gt;
&amp;lt;!--[if IE 7]&amp;gt;&amp;lt;div id="ie7" class="ie"&amp;gt;&amp;lt;![endif]--&amp;gt;
&amp;lt;!--[if IE 8]&amp;gt;&amp;lt;div id="ie8" class="ie"&amp;gt;&amp;lt;![endif]--&amp;gt;
&amp;lt;!--[if IE 9]&amp;gt;&amp;lt;div id="ie9" class="ie"&amp;gt;&amp;lt;![endif]--&amp;gt;
&amp;lt;!--[if lt IE 9]&amp;gt;&amp;lt;div id="ieold"&amp;gt;&amp;lt;![endif]--&amp;gt;
&amp;lt;!--[if gte IE 9]&amp;gt;&amp;lt;div id="ienew"&amp;gt;&amp;lt;![endif]--&amp;gt;
&amp;lt;![if !IE]&amp;gt;&amp;lt;div id="noie"&amp;gt;&amp;lt;![endif]&amp;gt;

  &amp;lt;article class="grid_4"&amp;gt;
    &amp;lt;hgroup&amp;gt;
      &amp;lt;h2&amp;gt;Article/Section Title Goes Here&amp;lt;/h2&amp;gt;
    &amp;lt;/hgroup&amp;gt;
    &amp;lt;details&amp;gt;
      &amp;lt;summary&amp;gt;This section has some interesting content.&amp;lt;/summary&amp;gt;
      &amp;lt;div&amp;gt;
        This section has some content that goes beyond the summary.
      &amp;lt;/div&amp;gt;
    &amp;lt;/details&amp;gt;
  &amp;lt;/article&amp;gt;

&amp;lt;!--[if IE 6]&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;![endif]--&amp;gt;
&amp;lt;!--[if IE 7]&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;![endif]--&amp;gt;
&amp;lt;!--[if IE 8]&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;![endif]--&amp;gt;
&amp;lt;!--[if IE 9]&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;![endif]--&amp;gt;
&amp;lt;!--[if lt IE 9]&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;![endif]--&amp;gt;
&amp;lt;!--[if gte IE 9]&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;![endif]--&amp;gt;
&amp;lt;![if !IE]&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;![endif]&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;&lt;/pre&gt;
&lt;p&gt;Within the BODY element, the first thing added is a number of DIV elements  surrounded by IE's conditional comments.  These comments allow for the CSS to  target a specific version of IE, or even a non IE browser without the need for  JavaScript (as added by the css_browser_selector.js), which can improve the  initial rendering.  It should be noted that we won't be avoiding JavaScript  and progressive enhancement, but one should be mindful of the rendering of a  page without JavaScript as this can help with visually impaired users as well  as the initial load impression of a given page/site.&lt;/p&gt;
&lt;p&gt;Within the browser elements, we see some very semantic markup.  An ARTICLE element  is a container, which has an HGROUP (Header Group) element followed by a DETAILS  element.  The DETAILS element's first child is a SUMMARY element which contains the  relative information regarding the rest of the DETAILS section.  This can be thought  of as similar to the relationship of a LEGEND element inside of a FIELDSET.  Though  the SUMMARY element is meant to be used as an inline element, we'll be displaying  it as a block element.  These tags may seem very blog oriented, and in a way  they are.  However, they do make for some very natural containers, as well as  being far shorter than adding class names to meaningless nested div tags.  There  is also a SECTION element that's been added which can be used to contain multiple  ARTICLE tags for example.  The use of these tags at a higher level allow for very  simple CSS rules, and can minimize the risk of a conflict in structure for nested  tags from external resources or controls down the road.&lt;/p&gt;
&lt;p&gt;Finally we get into the .css files.  I'll be stepping through the relevant  portions, though you'll be able to download the full demonstration as well as  view the demo page online.&lt;/p&gt;
&lt;pre class="brush: css"&gt;h1, h2, h3, h4, h5, h6 {
  margin:0;
  border:0;
  padding:0;  
}

/*sectioning content, (todo: use css grid) */
.grid_4 {
  display:block;
  position: relative;
  width: 400px;
  z-index: 100;
}&lt;/pre&gt;
&lt;p&gt;First, I reset the margin/border/padding for Heading elements.  The next article  will have a more complete reset css attached, along with some @font-face declarations  to ensure a consistant rendering.  Next is the &lt;code&gt;.grid_4&lt;/code&gt; declaration  which will be replaced with a generated grid 12 css in the next article as well.&lt;/p&gt;
&lt;pre class="brush: css"&gt;/*section header, gradient with rounded top-left and top-right border*/
hgroup {
  display:block;
  color: #333333;
  padding: 0.5em 1em 0.5em 1em;
  border: 1px solid #999;
  -webkit-border-radius: 0.6em 0.6em 0 0;
  -moz-border-radius: 0.6em 0.6em 0 0;
  border-radius: 0.6em 0.6em 0 0;
  background: #dddddd;
  background: -webkit-gradient(linear,left top,left bottom,color-stop(0.2,#eeeeee),color-stop(0.8,#cccccc));
  background: -moz-linear-gradient(#eeeeee, #cccccc);
  background: linear-gradient(#eeeeee, #cccccc);
  -pie-background: linear-gradient(#eeeeee, #cccccc);
}&lt;/pre&gt;
&lt;p&gt;Here is where we start digging into the meat of this article.  Within the HGROUP  we specify the various implementations of &lt;code&gt;border-radius&lt;/code&gt; as this  attribute is only recently being formalized by the W3C, webkit (Chrome &amp;amp; Safari)  and Mozilla (Firefox) browsers created their own vender specific css attributes,  so we start with them.  They all follow the same format allowing you to specify  each corner's value in a clockwise fashion starting with the TOP-LEFT position.&lt;/p&gt;
&lt;p&gt;After the &lt;code&gt;border-radius&lt;/code&gt; is defined, the background is then specified.  How this is done is to first specify a background color that will be used as a  fallback value.  After this, we specify the vendor specific implementations and  finally fallback to a common CSS3 implementation. You can find quite a bit of information on CSS gradients in this article.  It's  worth noting that the linked article has a few things that are at least  mis-represented in regards to IE9, I'll discuss these in more  detail when we reach part 5 in this series.&lt;/p&gt;
&lt;p&gt;For now I'll note that the -pie-background is required for the CSS3PIE  implementation for IEOLD (6-8) and that the z-index for the grid_4 is also  related to a quirk in using PIE.htc.  You can see the contents of the  &lt;code&gt;main-ieold.css&lt;/code&gt; file below.&lt;/p&gt;
&lt;pre class="brush: css"&gt;hgroup, details {
  behavior: url(/PIE.htc);
}&lt;/pre&gt;
&lt;p&gt;&lt;img style="float:left; margin-right:0.5em;" src="http://frugalcoder.us/image.axd?picture=2010%2f10%2frendered.png" alt="rendering preview" /&gt;&lt;/p&gt;
&lt;p&gt;Here we have a very short, very simple statement essentially telling the browser  to apply the PIE.htc component to the HGROUP and DETAILS elements (currently  the only ones using rounded corners or background-gradients.  Next, let's take a  quick look at the main-ienew.css.&lt;/p&gt;
&lt;p&gt;As you can see; the effect is rather nice, you can modify this example  for your specific needs.  It's definitely much lighter on resources and download  speeds by not having to rely on heavy markup and images to accomplish this effect.  However, there is one caveat with IE9 currently.&lt;/p&gt;
&lt;pre class="brush: css" style="clear:left;"&gt;hgroup {
  -ms-filter: "progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#eeeeee', endColorstr='#cccccc')";
}

details {
  -ms-filter: "progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#ffffff', endColorstr='#eeeeee')";
}&lt;/pre&gt;
&lt;p&gt;&lt;img style="clear:left; float:left; margin-right:0.5em;" src="http://frugalcoder.us/image.axd?picture=2010%2f10%2frendered-ie-error.png" alt="rendering preview IE9" /&gt;&lt;/p&gt;
&lt;p&gt;IE9 supports the rounded corners internally, but the background gradients require  falling back to utilizing an ActiveX based filter control via the &lt;code&gt;-ms-filter&lt;/code&gt; property.  We didn't add this into the main css as we wanted to avoid the potential  for IE8 to interpret this attribute. IE9 seems to have a rendering  bug where in some cases it will render the background gradient outside of the  containing border (with a border-radius) as can be seen to the left.&lt;/p&gt;
&lt;p&gt;&lt;br style="clear:left;" /&gt;&lt;/p&gt;</description>
      <link>http://frugalcoder.us/post/2010/10/28/Creating-A-Modern-Web-Application-Part-2-(Working-with-HTML5-and-CSS3).aspx</link>
      <author>newuser09876</author>
      <comments>http://frugalcoder.us/post/2010/10/28/Creating-A-Modern-Web-Application-Part-2-(Working-with-HTML5-and-CSS3).aspx#comment</comments>
      <guid>http://frugalcoder.us/post.aspx?id=67c5640d-22e7-4b95-9abf-dfd12f10a630</guid>
      <pubDate>Thu, 28 Oct 2010 17:36:00 +0000</pubDate>
      <category>Architecture</category>
      <category>CSS</category>
      <category>JavaScript</category>
      <category>Web Development</category>
      <dc:publisher>newuser09876</dc:publisher>
      <pingback:server>http://frugalcoder.us/pingback.axd</pingback:server>
      <pingback:target>http://frugalcoder.us/post.aspx?id=67c5640d-22e7-4b95-9abf-dfd12f10a630</pingback:target>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://frugalcoder.us/trackback.axd?id=67c5640d-22e7-4b95-9abf-dfd12f10a630</trackback:ping>
      <wfw:comment>http://frugalcoder.us/post/2010/10/28/Creating-A-Modern-Web-Application-Part-2-(Working-with-HTML5-and-CSS3).aspx#comment</wfw:comment>
      <wfw:commentRss>http://frugalcoder.us/syndication.axd?post=67c5640d-22e7-4b95-9abf-dfd12f10a630</wfw:commentRss>
    </item>
    <item>
      <title>Creating A Modern Web Application - Part 1 (Getting Started)</title>
      <description>&lt;p&gt;This series is meant to be a pragmatic look at creating a modern web application today. What this means to me is that older browsers still need to be supported. In some environments the use of Internet Explorer 6 is still well over 20%, especially in corporate environments where XP and IE6 are the standards they are bound by. Though dealing with a browser that is quickly reaching a decade in age, which is ancient by software standards that tend to churn a new generation every 2 years or so, there is hope. I'll be referencing IE versions 6-8 as IEOLD, since these really are the existing legacy of IE as it stands. IE 9 is shaping up to be a much more compliant browser that has a great UI and does a much better job of rendering content. There are a few quirks as it stands that I will point out in the next segment in this series, I'll be referring to IE9+ as IENEW.&lt;/p&gt;
&lt;p&gt;In this exercise we will be using &lt;a href="http://dev.w3.org/html5/spec/Overview.html"&gt;HTML5&lt;/a&gt;'s DOCTYPE  tag which is very simple and straight forward. In fact it's the first DOCTYPE  I actually committed to memory, (&amp;lt;!DOCTYPE html&amp;gt;) how cool is that. HTML5 by definition is very pragmatic in and of itself. The main lesson in HTML5 is to use what works for you, as many browsers have created enhancements for their own needs and then copied them from each other.  Starting with &lt;a href="http://www.whatwg.org/"&gt;WhatWG&lt;/a&gt; and moving into the W3C's group as a movement to formalize these enhancements as a standard, that doesn't mean you shouldn't be utilizing it today. Moving forward I will be using several HTML5 tags, in addition to using CSS3 to avoid the use of images for simple gradients and rounded corners. In order to facilitate this, I'll be first adding two shining stars into my tool-belt.&lt;/p&gt;
&lt;p&gt;The first of which is the wonderful &lt;a href="http://code.google.com/p/html5shiv/"&gt;html5shiv&lt;/a&gt;. This allows us to utilize the new tags defined as part of HTML5. As there are several new tags within the HTML5 space, it is much better to use these as a more semantic means of marking up our site, over simply using meaningless DIV tags with class attributes everywhere. The html5shiv is a fairly light script that will add support for these new tags in old IE versions (prior to 9). You will also want to take a look at &lt;a href="http://jdbartlett.github.com/innershiv/"&gt;html 5 innershiv&lt;/a&gt; if you intend to inject these new elements via the innerHTML DOM property.&lt;/p&gt;
&lt;p&gt;The second tool we will be using is the &lt;a href="http://css3pie.com/"&gt;CSS3PIE&lt;/a&gt; (Progressive IE) HTML Component which can be used with IE versions prior to 9. By defining behaviors against elements that will utilize background gradients and rounded borders for IEOLD, we will be able to eliminate the need for the use of images, and complex layouts to achieve these commonly used effects.&lt;/p&gt;
&lt;p&gt;Though both of these tools have been out for a while, I hope you find them useful. I'm outlining the series below, and will inject the links as these articles become live on the site. My goal is to have a the first eight articles in this series (including this one) released in the next two weeks.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Part 1 - Getting Started.&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;&lt;a href="http://frugalcoder.us/post/2010/10/28/modern-web-apps-part002.aspx"&gt;Part 2 - Working with HTML5 and CSS3.&lt;/a&gt;&lt;/strong&gt;&lt;br /&gt; In this article we'll work through how to utilize rounded corners and border radius properties as well as show how to deal with the issues that IE9 currently presents here in addition to utilizing Chrome Frame for those users that have it installed. &lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Part 3 - Getting the page laid out.&lt;/strong&gt;&lt;br /&gt; In this article we'll work on getting the overall page layout in place. This will include standardizing on our core fonts as well as utilizing a grid to keep our stuff lined up nicely. &lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Part 4 - Buttons, buttons and more buttons.&lt;/strong&gt;&lt;br /&gt; One of the most often stylized elements on any web based application is the button. The real question is, how we get them how we want them, along with some thoughts on tying buttons to inputs. &lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Part 5 - Ironing out the wrinkles.&lt;/strong&gt;&lt;br /&gt; We will now work on getting things a bit better organized. We'll also deal with a few IE6 specific issues, namely the lack of attribute based selectors in CSS. &lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Part 6 - Getting your script on.&lt;/strong&gt;&lt;br /&gt; In this article we'll get some initial functionality laid out in order to work through progressive enhancement as well as making sure to defer our scripts until after the content is ready for it. &lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Part 7 - Holy JavaScript Tool-belt Batman.&lt;/strong&gt;&lt;br /&gt; Here I discuss my fairly comprehensive list of scripts I'll be including, as well as mention some that I'm not actively using but will be there if you need them. &lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Part 8 - Inputs and Validation.&lt;/strong&gt;&lt;br /&gt; Now that I have my JavaScript Tool-belt in place, I'll work through dealing with some basic input validation. &lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Part 9 - Enhancing Inputs.&lt;/strong&gt;&lt;br /&gt; Here I'll create an enhanced input that will allow for a calendar control used in conjunction with a date validated input. &lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Part 10 - Custom Notifications.&lt;/strong&gt;&lt;br /&gt; In my current position notifications of input validation errors and other messages are shown in popover modal dialogs that purposefully interrupt the user's actions. Here we'll work through the initial creation of such a popover and extend the jQuery validation to support this behavior. &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I'll be adding additional articles in the future; the topics will present themselves as this project moves forward.&lt;/p&gt;</description>
      <link>http://frugalcoder.us/post/2010/10/25/Creating-A-Modern-Web-Application-Part-1-(Getting-Started).aspx</link>
      <author>newuser09876</author>
      <comments>http://frugalcoder.us/post/2010/10/25/Creating-A-Modern-Web-Application-Part-1-(Getting-Started).aspx#comment</comments>
      <guid>http://frugalcoder.us/post.aspx?id=e2c1071f-dfa0-4c1b-a472-ffba8c379224</guid>
      <pubDate>Mon, 25 Oct 2010 15:26:00 +0000</pubDate>
      <category>CSS</category>
      <category>Design</category>
      <category>JavaScript</category>
      <category>Web Development</category>
      <dc:publisher>newuser09876</dc:publisher>
      <pingback:server>http://frugalcoder.us/pingback.axd</pingback:server>
      <pingback:target>http://frugalcoder.us/post.aspx?id=e2c1071f-dfa0-4c1b-a472-ffba8c379224</pingback:target>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://frugalcoder.us/trackback.axd?id=e2c1071f-dfa0-4c1b-a472-ffba8c379224</trackback:ping>
      <wfw:comment>http://frugalcoder.us/post/2010/10/25/Creating-A-Modern-Web-Application-Part-1-(Getting-Started).aspx#comment</wfw:comment>
      <wfw:commentRss>http://frugalcoder.us/syndication.axd?post=e2c1071f-dfa0-4c1b-a472-ffba8c379224</wfw:commentRss>
    </item>
    <item>
      <title>JSON.parseAjax Method, handling encoded dates in a JSON string.</title>
      <description>&lt;div&gt;
&lt;p&gt;
Okay, the availability of JSON.parse and JSON.stringify is awesome in modern browsers.
I'm including my modifications to the &lt;a href="http://json.org/"&gt;JSON.org&lt;/a&gt; &lt;a href="http://www.json.org/js.html"&gt;json2.js&lt;/a&gt; script to include a 
method JSON.parseAjax that will revive ISO-8601 and Microsoft Ajax encoded 
Date strings into a native Date object.  I am also checking against the IE version 
as a bug in IE8's native JSON.parse method may raise an error that you can't catch 
when you extend the prototype of Array, Function, Object etc.
&lt;/p&gt;
&lt;pre class="brush: javascript"&gt;//parse a test string, where test1 is an ISO-8601 Date, and test2 is an MS-Ajax Date
var obj = JSON.parseAjax('{"test1":"1970-01-01T00:00:00Z", "test2":"\\\/Date(0)\\\/"}');

//object was returned and test1's value equals test2's value
alert( obj &amp;&amp; obj.test1.valueOf() == obj.test2.valueOf());&lt;/pre&gt;

&lt;p&gt;
This allows you to handle a number of different methods of returning Date-Time 
strings from the server.  It's worth noting that you should always send date 
times as UTC based when passing over the wire.
&lt;/p&gt;
&lt;p&gt;&lt;a href="http://frugalcoder.us/file.axd?file=2010%2f9%2fjson2-ajax.js"&gt;json2-ajax.js (15.25 kb)&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;</description>
      <link>http://frugalcoder.us/post/2010/09/28/JSONparseAjax-Method-handling-encoded-dates-in-a-JSON-string.aspx</link>
      <author>newuser09876</author>
      <comments>http://frugalcoder.us/post/2010/09/28/JSONparseAjax-Method-handling-encoded-dates-in-a-JSON-string.aspx#comment</comments>
      <guid>http://frugalcoder.us/post.aspx?id=ae33bd3b-b3f1-4e2f-a9fb-36b3770582dd</guid>
      <pubDate>Tue, 28 Sep 2010 14:37:00 +0000</pubDate>
      <category>JavaScript</category>
      <category>Web Development</category>
      <dc:publisher>newuser09876</dc:publisher>
      <pingback:server>http://frugalcoder.us/pingback.axd</pingback:server>
      <pingback:target>http://frugalcoder.us/post.aspx?id=ae33bd3b-b3f1-4e2f-a9fb-36b3770582dd</pingback:target>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://frugalcoder.us/trackback.axd?id=ae33bd3b-b3f1-4e2f-a9fb-36b3770582dd</trackback:ping>
      <wfw:comment>http://frugalcoder.us/post/2010/09/28/JSONparseAjax-Method-handling-encoded-dates-in-a-JSON-string.aspx#comment</wfw:comment>
      <wfw:commentRss>http://frugalcoder.us/syndication.axd?post=ae33bd3b-b3f1-4e2f-a9fb-36b3770582dd</wfw:commentRss>
    </item>
    <item>
      <title>Creating JavaScript Namespaces</title>
      <description>&lt;div&gt;
&lt;p&gt;When using JavaScript these days, it is generally a good idea to namespace your javascript methods so that they don't polute the global namespace.&lt;/p&gt;
&lt;pre class="brush: javascript"&gt;if (typeof mysite == 'undefined') var mysite = {};
mysite.section = mysite.section || {};
mysite.section.subNamespace = mysite.section.subNamespace || {};
mysite.section.subNamespace.component = (function(){ ... }());
&lt;/pre&gt;

&lt;p&gt;This allows you to create a clean separation of your utilization. Although you may not want to go as deep as the example above, you can see
how this could very well become cumbersome when you want to declare one or more namespaces.  It would be nice to have a helper method that 
lets you simply declare namespaces.&lt;/p&gt;
&lt;pre class="brush: javascript"&gt;//declare a single namespace
namespace('mysite.section.subNamespace.component');

//declare multiple namespaces at once
namespace('mysite.section2', 'mysite._utilities');&lt;/pre&gt;

&lt;p&gt;This works out much nicer, and is easier to repeate as-needed when creating your namespaces.  The function I am using for this is below.&lt;/p&gt;
&lt;pre class="brush: javascript"&gt;var namespace = (function(root){
	//regular expression to limit formatting of namespaces
	var nsre = /^([\$\_a-z][\$\_a-z\d]*\.?)+$/i

	//define returned function
	return function(ns) {
		var args = Array.prototype.slice.call(arguments);
		var ret = [];
		while (args.length) {
			ns = genNS(args.shift());
			if (ns) ret.push(ns);
		}
		if (ret.length == 0) return; //undefined, no valid input
		if (arguments.length == 1) return ret[0]; //only a single input, return that namespace
		return ret; //used overload for multiple namespaces, return the array/list
	}
	
	//private static method to generate a single namespace
	function genNS(ns) {
		if (!ns.match(nsre)) return;
		ns = ns.split('.');
		var base = root;
		for (var i=0; i&amp;lt;ns.length; i++) {
			base[ns[i]] = base[ns[i]] || {};
			base = base[ns[i]];
		}
		return base; //return resulting namespace object
	}
}(this));&lt;/pre&gt;

&lt;p&gt;
	This functionality is very useful, and is included in a number of API toolkits.
	You could replace the &lt;code&gt;&lt;b&gt;var namespace&lt;/b&gt;&lt;/code&gt; declaration and attach it
	to an existing object such as &lt;code&gt;&lt;b&gt;$.ns&lt;/b&gt;&lt;/code&gt;, which would 
	attach it to an existing reference.
&lt;/p&gt;
&lt;p&gt;
	If you have suggestions for future topics, feel free to leave a comment or 
	contact me via email.
&lt;/p&gt;
&lt;/div&gt;</description>
      <link>http://frugalcoder.us/post/2010/09/24/Creating-JavaScript-Namespaces.aspx</link>
      <author>newuser09876</author>
      <comments>http://frugalcoder.us/post/2010/09/24/Creating-JavaScript-Namespaces.aspx#comment</comments>
      <guid>http://frugalcoder.us/post.aspx?id=bf1eef16-1add-4877-b31a-87722974f0bf</guid>
      <pubDate>Fri, 24 Sep 2010 15:01:00 +0000</pubDate>
      <category>JavaScript</category>
      <category>jQuery</category>
      <category>Web Development</category>
      <dc:publisher>newuser09876</dc:publisher>
      <pingback:server>http://frugalcoder.us/pingback.axd</pingback:server>
      <pingback:target>http://frugalcoder.us/post.aspx?id=bf1eef16-1add-4877-b31a-87722974f0bf</pingback:target>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://frugalcoder.us/trackback.axd?id=bf1eef16-1add-4877-b31a-87722974f0bf</trackback:ping>
      <wfw:comment>http://frugalcoder.us/post/2010/09/24/Creating-JavaScript-Namespaces.aspx#comment</wfw:comment>
      <wfw:commentRss>http://frugalcoder.us/syndication.axd?post=bf1eef16-1add-4877-b31a-87722974f0bf</wfw:commentRss>
    </item>
    <item>
      <title>IE9 Background Gradient + Border Radius == Fail</title>
      <description>&lt;div&gt;&lt;img style="float:left; margin-right: 0.5em;" src="http://frugalcoder.us/image.axd?picture=2010%2f9%2fbutton-test-screenshot-ie9.png" alt="ie9 rounded corner with background radius fail" /&gt;
&lt;p&gt;Okay, I've been working on creating a CSS3 friendly version of the site where I am currently working.  I've been using the very cool &lt;a href="http://css3pie.com/"&gt;CSS3 PIE&lt;/a&gt;(Progressive IE) to bring a lot of functionality to the interface for IE.  It works natively in Firefox 3.x, Chrome, and Safari.  There is no support for background gradients in Opera 10, but the fallback doesn't look too bad for &amp;lt; 2% of users that have it.  IE 6-8 have been tricky, but I've managed to get a lot of it the way I want, with minimal JavaScript for interaction (only enough to make some UI elements bind consistently).  IE9 was just released in beta today, and I was glad to see it, and it's improved rendering enhancements.&lt;/p&gt;
&lt;p&gt;Then I come to find out that IE9 ate my PIE.  PIE simply didn't work for the background gradients or rounded corners in IE9.  So I pushed all the behavior declarations into an &lt;code&gt;&lt;strong&gt;IE lt 9&lt;/strong&gt;&lt;/code&gt; conditional comment.  I also added another stylesheet for IE9.  From here, I proceeded to add the necessary &lt;code&gt;&lt;strong&gt;DXImageTransform.Microsoft.gradient&lt;/strong&gt;&lt;/code&gt; references for IE9, which doesn't support the &lt;code&gt;&lt;strong&gt;background: linear-gradient(...)&lt;/strong&gt;&lt;/code&gt; css directive.  You can see the results to the left, the DX transformation clobbers the rounded corners.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;EDIT: 2011-01-10&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;With IE9, you can do an inset box-shadow to accomplish a similar effect, without failing to work with the borders.  The effect is better on buttons, and supported almost everywhere, including Opera 10.5+ ... for IE6-8 you can fall back to the linear-gradient with PIE.  Also, the latest CSS3PIE disables itself for IE9, until that feature set can be flushed out.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;EDIT: 2011-09-26&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;With IE9, you can do an inline SVG background in the CSS, Microsoft even created an &lt;a href="http://ie.microsoft.com/testdrive/graphics/svggradientbackgroundmaker/default.html"&gt;SVG Gradient Background Maker&lt;/a&gt;.  It is worth noting that all the browsers (that I know of) which support CSS3 background gradients also support an SVG in the CSS directly.  If you use the generation tool, you should wrap the url text in a single-quote. In other words &lt;code&gt;url('...')&lt;/code&gt; not &lt;code&gt;url(...)&lt;/code&gt; as the tool generates.  Many CSS minifiers will have issues if the url text isn't quoted.&lt;/p&gt;
&lt;br style="clear:left;" /&gt;&lt;/div&gt;</description>
      <link>http://frugalcoder.us/post/2010/09/15/IE9-Background-Gradient-2b-Border-Radius-3d3d-Fail.aspx</link>
      <author>newuser09876</author>
      <comments>http://frugalcoder.us/post/2010/09/15/IE9-Background-Gradient-2b-Border-Radius-3d3d-Fail.aspx#comment</comments>
      <guid>http://frugalcoder.us/post.aspx?id=cdbf7975-f031-4e43-8df2-488f1dfe8712</guid>
      <pubDate>Wed, 15 Sep 2010 15:09:00 +0000</pubDate>
      <category>CSS</category>
      <category>Web Development</category>
      <dc:publisher>newuser09876</dc:publisher>
      <pingback:server>http://frugalcoder.us/pingback.axd</pingback:server>
      <pingback:target>http://frugalcoder.us/post.aspx?id=cdbf7975-f031-4e43-8df2-488f1dfe8712</pingback:target>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://frugalcoder.us/trackback.axd?id=cdbf7975-f031-4e43-8df2-488f1dfe8712</trackback:ping>
      <wfw:comment>http://frugalcoder.us/post/2010/09/15/IE9-Background-Gradient-2b-Border-Radius-3d3d-Fail.aspx#comment</wfw:comment>
      <wfw:commentRss>http://frugalcoder.us/syndication.axd?post=cdbf7975-f031-4e43-8df2-488f1dfe8712</wfw:commentRss>
    </item>
    <item>
      <title>JavaScript Books That Should Be Required Reading</title>
      <description>&lt;div&gt;
	&lt;p&gt;
		I often get asked what books I recommend for developers looking to get 
		more into JavaScript.  Often they're looking for something specific to a 
		given framework, most often jQuery.  Although there are some great jQuery 
		and a couple of jQueryUI books as well, I'd recommend the following books 
		first and formost for those with some knowledge of JavaScript, but wanting
		to get a better grasp.
	&lt;/p&gt;
	&lt;p&gt;
		The first half of this year I read through eight recently published 
		books centered around JavaScript and these are the one's I would 
		recommend.  
	&lt;/p&gt;
	&lt;p&gt;
		&lt;div style="float:left;"&gt;&lt;a href="http://www.amazon.com/gp/product/0596517742?ie=UTF8&amp;tag=frugcode-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=0596517742"&gt;&lt;img src="http://frugalcoder.us/image.axd?picture=2010%2f9%2fjavascript-the-good-parts.jpg" alt="Book Cover--JavaScript: The Good Parts" /&gt;&lt;/a&gt;&lt;/div&gt;
		&lt;a href="http://www.amazon.com/gp/product/0596517742?ie=UTF8&amp;tag=frugcode-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=0596517742"&gt;JavaScript: The Good Parts&lt;/a&gt; 
		is one of two JavaScript books that I feel should be required reading for all 
		web developers.  Even if you've jumped into JS and don't care to start 
		with entry level re-hashes, this is a great read.  I don't agree 100% 
		with &lt;a href="http://javascript.crockford.com/"&gt;Douglas Crockford&lt;/a&gt;'s 
		views.  However, this is a great read that will give some insightful 
		concepts and ideas.  Also worth looking at is 
		&lt;a href="http://www.yuiblog.com/crockford/"&gt;Crockford's video series on YUI Blog&lt;/a&gt;.
		&lt;br style="clear:left;"/&gt;
	&lt;/p&gt;
	&lt;p style="clear:left;margin-top:1em;"&gt;
		&lt;div style="float:left;"&gt;&lt;a href="http://www.amazon.com/gp/product/0596522304?ie=UTF8&amp;tag=frugcode-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=0596522304"&gt;&lt;img src="http://frugalcoder.us/image.axd?picture=2010%2f9%2feven-faster-web-sites.jpg" alt="Book Cover--Even Faster Web Sites" /&gt;&lt;/a&gt;&lt;/div&gt;
		&lt;a href="http://www.amazon.com/gp/product/0596522304?ie=UTF8&amp;tag=frugcode-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=0596522304"&gt;Even Faster Web Sites: Performance Best Practices for Web Developers&lt;/a&gt; 
		is the other book I feel should be required reading for all web developers, 
		and even designers.  It covers a lot of great examples of how JavaScript 
		and other elemental decisions in the design and markup of a site impact 
		performance.  There isn't as much specific to JS as 
		&lt;a href="http://www.amazon.com/gp/product/059680279X?ie=UTF8&amp;tag=frugcode-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=059680279X"&gt;High Performance JavaScript (Build Faster Web Application Interfaces)&lt;/a&gt;, 
		which is another good read. There's about a 50% overlap between the two 
		books, and I feel that the former is a much more important read and 
		reading both will get very redundant, very quickly. 
	&lt;/p&gt;
	&lt;p&gt;
		&lt;br /&gt;Along with the books above, I would also suggest taking a look at the following books as well...
&lt;br /&gt;
	&lt;/p&gt;
	&lt;p&gt;
		&lt;div style="float:left;"&gt;&lt;a href="http://www.amazon.com/gp/product/0596101996?ie=UTF8&amp;tag=frugcode-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=0596101996"&gt;&lt;img src="http://frugalcoder.us/image.axd?picture=2010%2f9%2fjavascript-the-definitive-guide.jpg" alt="Book Cover--JavaScript: The Definitive Guide" /&gt;&lt;/a&gt;&lt;/div&gt;
		&lt;a href="http://www.amazon.com/gp/product/0596101996?ie=UTF8&amp;tag=frugcode-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=0596101996"&gt;JavaScript: The Definitive Guide&lt;/a&gt; 
		is a book that every beginning web developer should have on their bookshelf.  If you 
		want a more novice friendly text, I would suggest the 
		&lt;a href="http://www.amazon.com/gp/product/0470526912?ie=UTF8&amp;tag=frugcode-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=0470526912"&gt;JavaScript Bible&lt;/a&gt;
		(&lt;em&gt;I'm linking to the 2010 version, which should be out in October.&lt;/em&gt;).  
		The definitive guide is a bit better as a reference text, the bible is 
		better as a learning text.
		&lt;br style="clear:left;"/&gt;
	&lt;/p&gt;
	&lt;p style="clear:left;margin-top:1em;"&gt;
		&lt;div style="float:left;"&gt;&lt;a href="http://www.amazon.com/gp/product/159059908X?ie=UTF8&amp;tag=frugcode-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=159059908X"&gt;&lt;img src="http://frugalcoder.us/image.axd?picture=2010%2f9%2fpro-javascript-design-patterns.jpg" alt="Book Cover--Pro JavaScript Design Patterns" /&gt;&lt;/a&gt;&lt;/div&gt;
		&lt;a href="http://www.amazon.com/gp/product/159059908X?ie=UTF8&amp;tag=frugcode-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=159059908X"&gt;Pro JavaScript Design Patterns&lt;/a&gt; is another book worth looking at.
		Though I honestly feel that there will usually be simpler solutions to 
		most given problems, reading this book provides a gateway to several good 
		thought experiments and can provide some insightful ideas on how to 
		resolve some common issues with design patterns.
		&lt;br style="clear:left;"/&gt;
	&lt;/p&gt;
	&lt;p&gt;
		If you're first starting out, I would go through The 
		Definitive Guide, before looking into The Good Parts, or Even Faster 
		Web Sites.  Beyond this, there are a lot of blogs out there covering 
		JavaScript from many different vantage points, and lots of frameworks 
		and tools out there.  I feel that these books are a great starting 
		point to understanding JavaScript better and a greater understanding of 
		how JavaScript works, instead of blindly cutting and pasting framework 
		examples.
	&lt;/p&gt;
&lt;/div&gt;</description>
      <link>http://frugalcoder.us/post/2010/09/15/javascript-books-2010.aspx</link>
      <author>tracker1</author>
      <comments>http://frugalcoder.us/post/2010/09/15/javascript-books-2010.aspx#comment</comments>
      <guid>http://frugalcoder.us/post.aspx?id=7a420f9a-f3a5-4812-8db6-ee848faef2d8</guid>
      <pubDate>Wed, 15 Sep 2010 10:38:00 +0000</pubDate>
      <category>JavaScript</category>
      <category>Web Development</category>
      <dc:publisher>tracker1</dc:publisher>
      <pingback:server>http://frugalcoder.us/pingback.axd</pingback:server>
      <pingback:target>http://frugalcoder.us/post.aspx?id=7a420f9a-f3a5-4812-8db6-ee848faef2d8</pingback:target>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://frugalcoder.us/trackback.axd?id=7a420f9a-f3a5-4812-8db6-ee848faef2d8</trackback:ping>
      <wfw:comment>http://frugalcoder.us/post/2010/09/15/javascript-books-2010.aspx#comment</wfw:comment>
      <wfw:commentRss>http://frugalcoder.us/syndication.axd?post=7a420f9a-f3a5-4812-8db6-ee848faef2d8</wfw:commentRss>
    </item>
  </channel>
</rss>