<?xml version="1.0" encoding="UTF-8"?> <rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
><channel><title>Werx Limited &#187; javascript</title> <atom:link href="http://werxltd.com/wp/category/software-development/javascript-software-development/feed/" rel="self" type="application/rss+xml" /><link>http://werxltd.com/wp</link> <description>We make IT work.</description> <lastBuildDate>Mon, 23 Jan 2012 23:03:59 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.1</generator> <item><title>node.js at Facebook</title><link>http://werxltd.com/wp/2012/01/23/node-js-at-facebook/</link> <comments>http://werxltd.com/wp/2012/01/23/node-js-at-facebook/#comments</comments> <pubDate>Mon, 23 Jan 2012 14:18:24 +0000</pubDate> <dc:creator>wes</dc:creator> <category><![CDATA[it industry]]></category> <category><![CDATA[javascript]]></category> <category><![CDATA[facebook]]></category> <category><![CDATA[node.js]]></category> <category><![CDATA[scale]]></category><guid
isPermaLink="false">http://werxltd.com/wp/?p=1148</guid> <description><![CDATA[Slides No related content found.]]></description> <content:encoded><![CDATA[<p><iframe
src="http://blip.tv/play/g_MngtCYdgI.html?p=1" width="480" height="346" frameborder="0" allowfullscreen></iframe><embed
type="application/x-shockwave-flash" src="http://a.blip.tv/api.swf#g_MngtCYdgI" style="display:none"></embed></p><p><a
href="http://broofa.com/presentations/FacebookAtNode_NodeConf2011.pdf">Slides</a></p><div
class="betterrelated none"><p>No related content found.</p></div><p><!--[if IE]><iframe
frameborder="0" allowTransparency="true" class="addtoany_special_service facebook_like" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwerxltd.com%2Fwp%2F2012%2F01%2F23%2Fnode-js-at-facebook%2F&amp;layout=button_count&amp;show_faces=false&amp;width=75&amp;action=like&amp;colorscheme=light&amp;height=20&amp;ref=addtoany" scrolling="no" style="border:none;overflow:hidden;width:90px;height:21px"></iframe><![endif]--><!--[if !IE]><!--><iframe
class="addtoany_special_service facebook_like" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwerxltd.com%2Fwp%2F2012%2F01%2F23%2Fnode-js-at-facebook%2F&amp;layout=button_count&amp;show_faces=false&amp;width=75&amp;action=like&amp;colorscheme=light&amp;height=20&amp;ref=addtoany" scrolling="no" style="border:none;overflow:hidden;width:90px;height:21px"></iframe><!--<![endif]--><!--[if IE]><iframe
frameborder="0" allowTransparency="true" class="addtoany_special_service twitter_tweet" src="http://platform.twitter.com/widgets/tweet_button.html?url=http%3A%2F%2Fwerxltd.com%2Fwp%2F2012%2F01%2F23%2Fnode-js-at-facebook%2F&amp;counturl=http%3A%2F%2Fwerxltd.com%2Fwp%2F2012%2F01%2F23%2Fnode-js-at-facebook%2F&amp;count=none&amp;text=node.js%20at%20Facebook" scrolling="no" style="border:none;overflow:hidden;width:55px;height:20px"></iframe><![endif]--><!--[if !IE]><!--><iframe
class="addtoany_special_service twitter_tweet" src="http://platform.twitter.com/widgets/tweet_button.html?url=http%3A%2F%2Fwerxltd.com%2Fwp%2F2012%2F01%2F23%2Fnode-js-at-facebook%2F&amp;counturl=http%3A%2F%2Fwerxltd.com%2Fwp%2F2012%2F01%2F23%2Fnode-js-at-facebook%2F&amp;count=none&amp;text=node.js%20at%20Facebook" scrolling="no" style="border:none;overflow:hidden;width:55px;height:20px"></iframe><!--<![endif]--><!--[if IE]><iframe
frameborder="0" allowTransparency="true" class="addtoany_special_service google_plusone" src="https://plusone.google.com/u/0/_/%2B1/fastbutton?url=http%3A%2F%2Fwerxltd.com%2Fwp%2F2012%2F01%2F23%2Fnode-js-at-facebook%2F&amp;size=medium&amp;count=false" scrolling="no" style="border:none;overflow:hidden;width:32px;height:20px"></iframe><![endif]--><!--[if !IE]><!--><iframe
class="addtoany_special_service google_plusone" src="https://plusone.google.com/u/0/_/%2B1/fastbutton?url=http%3A%2F%2Fwerxltd.com%2Fwp%2F2012%2F01%2F23%2Fnode-js-at-facebook%2F&amp;size=medium&amp;count=false" scrolling="no" style="border:none;overflow:hidden;width:32px;height:20px"></iframe><!--<![endif]--><a
class="a2a_button_linkedin" href="http://www.addtoany.com/add_to/linkedin?linkurl=http%3A%2F%2Fwerxltd.com%2Fwp%2F2012%2F01%2F23%2Fnode-js-at-facebook%2F&amp;linkname=node.js%20at%20Facebook" title="LinkedIn" rel="nofollow" target="_blank"><img
src="http://werxltd.com/wp/wp-content/plugins/add-to-any/icons/linkedin.png?9d7bd4" width="16" height="16" alt="LinkedIn"/></a><a
class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwerxltd.com%2Fwp%2F2012%2F01%2F23%2Fnode-js-at-facebook%2F&amp;title=node.js%20at%20Facebook" id="wpa2a_2">Share/Save</a></p>]]></content:encoded> <wfw:commentRss>http://werxltd.com/wp/2012/01/23/node-js-at-facebook/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Fun with jsonselect</title><link>http://werxltd.com/wp/2011/11/16/fun-with-jsonselect/</link> <comments>http://werxltd.com/wp/2011/11/16/fun-with-jsonselect/#comments</comments> <pubDate>Wed, 16 Nov 2011 16:39:07 +0000</pubDate> <dc:creator>wes</dc:creator> <category><![CDATA[javascript]]></category> <category><![CDATA[css]]></category> <category><![CDATA[json]]></category> <category><![CDATA[jsonselect]]></category> <category><![CDATA[noschema]]></category> <category><![CDATA[selector]]></category><guid
isPermaLink="false">http://werxltd.com/wp/?p=1063</guid> <description><![CDATA[One of the strengths of CSS and jQuery is that it provides a common and powerful mechanism known as a selector language for referencing bits of data, especially data whose structure is not exactly known at runtime which makes such an addressing scheme a perfect fit for the often lumpy world of HTML. Increasingly JSON [...]]]></description> <content:encoded><![CDATA[<p>One of the strengths of CSS and jQuery is that it provides a common and powerful mechanism known as a selector language for referencing bits of data, especially data whose structure is not exactly known at runtime which makes such an addressing scheme a perfect fit for the often lumpy world of HTML.</p><p>Increasingly JSON is being used as a transport medium for data and with the rise of NoSQL solutions, having a selector language for JSON makes a lot of sense when dealing with JSON documents whose structure isn&#8217;t deterministic.</p><p><a
href="http://jsonselect.org/">JSONSelect</a> provides a good implementation of just such a JSON selector language but after working with it on a project I found myself needing to do more than it allowed me to do. Namely, I wanted 1. to be able to perform a selection and receive matching paths instead of the data contained in those paths and I wanted 2. to be able to modify data specified at a path location in-place.</p><pre class="brush:javascript">
jsonselect.match(sel, obj, asPath); // Added the asPath flag to return a path instead of the values
jsonselect.forEach(sel, obj, fun, asPath); // Added the same flag to forEach, I use this to
jsonselect.get(path,obj); // For getting the value using a path
jsonselect.set(path, value, obj); // For setting the value of a path
jsonselect.del(path,root); // For deleting a path
</pre><p><a
href="http://werxltd.com/wp/wp-content/uploads/2011/11/jsonselect.js?9d7bd4">Here is my modified version of jsonselect</a> in case anyone needs help solving the same problems I mentioned above.</p><div
class="betterrelated none"><p>No related content found.</p></div><p><!--[if IE]><iframe
frameborder="0" allowTransparency="true" class="addtoany_special_service facebook_like" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwerxltd.com%2Fwp%2F2011%2F11%2F16%2Ffun-with-jsonselect%2F&amp;layout=button_count&amp;show_faces=false&amp;width=75&amp;action=like&amp;colorscheme=light&amp;height=20&amp;ref=addtoany" scrolling="no" style="border:none;overflow:hidden;width:90px;height:21px"></iframe><![endif]--><!--[if !IE]><!--><iframe
class="addtoany_special_service facebook_like" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwerxltd.com%2Fwp%2F2011%2F11%2F16%2Ffun-with-jsonselect%2F&amp;layout=button_count&amp;show_faces=false&amp;width=75&amp;action=like&amp;colorscheme=light&amp;height=20&amp;ref=addtoany" scrolling="no" style="border:none;overflow:hidden;width:90px;height:21px"></iframe><!--<![endif]--><!--[if IE]><iframe
frameborder="0" allowTransparency="true" class="addtoany_special_service twitter_tweet" src="http://platform.twitter.com/widgets/tweet_button.html?url=http%3A%2F%2Fwerxltd.com%2Fwp%2F2011%2F11%2F16%2Ffun-with-jsonselect%2F&amp;counturl=http%3A%2F%2Fwerxltd.com%2Fwp%2F2011%2F11%2F16%2Ffun-with-jsonselect%2F&amp;count=none&amp;text=Fun%20with%20jsonselect" scrolling="no" style="border:none;overflow:hidden;width:55px;height:20px"></iframe><![endif]--><!--[if !IE]><!--><iframe
class="addtoany_special_service twitter_tweet" src="http://platform.twitter.com/widgets/tweet_button.html?url=http%3A%2F%2Fwerxltd.com%2Fwp%2F2011%2F11%2F16%2Ffun-with-jsonselect%2F&amp;counturl=http%3A%2F%2Fwerxltd.com%2Fwp%2F2011%2F11%2F16%2Ffun-with-jsonselect%2F&amp;count=none&amp;text=Fun%20with%20jsonselect" scrolling="no" style="border:none;overflow:hidden;width:55px;height:20px"></iframe><!--<![endif]--><!--[if IE]><iframe
frameborder="0" allowTransparency="true" class="addtoany_special_service google_plusone" src="https://plusone.google.com/u/0/_/%2B1/fastbutton?url=http%3A%2F%2Fwerxltd.com%2Fwp%2F2011%2F11%2F16%2Ffun-with-jsonselect%2F&amp;size=medium&amp;count=false" scrolling="no" style="border:none;overflow:hidden;width:32px;height:20px"></iframe><![endif]--><!--[if !IE]><!--><iframe
class="addtoany_special_service google_plusone" src="https://plusone.google.com/u/0/_/%2B1/fastbutton?url=http%3A%2F%2Fwerxltd.com%2Fwp%2F2011%2F11%2F16%2Ffun-with-jsonselect%2F&amp;size=medium&amp;count=false" scrolling="no" style="border:none;overflow:hidden;width:32px;height:20px"></iframe><!--<![endif]--><a
class="a2a_button_linkedin" href="http://www.addtoany.com/add_to/linkedin?linkurl=http%3A%2F%2Fwerxltd.com%2Fwp%2F2011%2F11%2F16%2Ffun-with-jsonselect%2F&amp;linkname=Fun%20with%20jsonselect" title="LinkedIn" rel="nofollow" target="_blank"><img
src="http://werxltd.com/wp/wp-content/plugins/add-to-any/icons/linkedin.png?9d7bd4" width="16" height="16" alt="LinkedIn"/></a><a
class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwerxltd.com%2Fwp%2F2011%2F11%2F16%2Ffun-with-jsonselect%2F&amp;title=Fun%20with%20jsonselect" id="wpa2a_4">Share/Save</a></p>]]></content:encoded> <wfw:commentRss>http://werxltd.com/wp/2011/11/16/fun-with-jsonselect/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Javascript color gradient calculator</title><link>http://werxltd.com/wp/2011/05/02/javascript-color-gradient-calculator/</link> <comments>http://werxltd.com/wp/2011/05/02/javascript-color-gradient-calculator/#comments</comments> <pubDate>Mon, 02 May 2011 15:00:18 +0000</pubDate> <dc:creator>wes</dc:creator> <category><![CDATA[javascript]]></category> <category><![CDATA[software development]]></category> <category><![CDATA[color]]></category> <category><![CDATA[design]]></category> <category><![CDATA[gradient]]></category><guid
isPermaLink="false">http://werxltd.com/wp/?p=953</guid> <description><![CDATA[Here is a color calculator I adapted from a friend&#8217;s PHP implementation: Color = function() { }; Color.hexdec = function(hex_string) { hex_string = (hex_string + '').replace(/[^a-f0-9]/gi, ''); return parseInt(hex_string, 16); } Color.dechex = function(number) { if (number < 0) { number = 0xFFFFFFFF + number + 1; } return parseInt(number, 10).toString(16); } Color.pad = function(number, [...]]]></description> <content:encoded><![CDATA[<p>Here is a color calculator I adapted from a <a
href="http://suddendevelopment.com/">friend&#8217;s</a> PHP implementation:</p><pre class="brush:javascript">
Color = function() {
};

Color.hexdec = function(hex_string) {
    hex_string = (hex_string + '').replace(/[^a-f0-9]/gi, '');
    return parseInt(hex_string, 16);
}

Color.dechex = function(number) {
    if (number < 0) {
        number = 0xFFFFFFFF + number + 1;
    }
    return parseInt(number, 10).toString(16);
}

Color.pad = function(number, length) {
    var str = '' + number;
    while (str.length < length) {
        str = '0' + str;
    }
    return str;
}

Color.calcgrad = function(val, color1, color2) {

    if(!color1.match(/^#[0-9a-f]{6}/) || !color2.match(/^#[0-9a-f]{6}/)) return 'match err!';

    if (val > 1) {
        val = 1;
    }
    if (val < 0) {
        val = 0;
    }
    val = parseFloat(val);

    c1 = [Color.hexdec(color1.substr(1,2)), Color.hexdec(color1.substr(3,2)), Color.hexdec(color1.substr(5,2))]; //b
    c2 = [Color.hexdec(color2.substr(1,2)), Color.hexdec(color2.substr(3,2)), Color.hexdec(color2.substr(5,2))]; //r

    if (val < .5) {
        delta = [(c2[0] - c1[0]), (c2[1] - c1[1]), (c1[2] - c2[2])];
        arrColor = [c1[0] +<sup><a href="http://werxltd.com/wp/2011/05/02/javascript-color-gradient-calculator/#footnote_0_953" id="identifier_0_953" class="footnote-link footnote-identifier-link" title="delta[0] * val) * 2), c1[1] + ((delta[1] * val) * 2), c1[2] - ((delta[2] * val) * 2)];
    } else {
        delta = [(c1[0] - c2[0]), (c1[1] - c2[1]), (c1[2] - c2[2])];
        arrColor = [c1[0] - ((delta[0] * (val - .5">1</a></sup> * 2), c1[1] -<sup><a href="http://werxltd.com/wp/2011/05/02/javascript-color-gradient-calculator/#footnote_1_953" id="identifier_1_953" class="footnote-link footnote-identifier-link" title="delta[1] * (val - .5">2</a></sup> * 2), c1[2] -<sup><a href="http://werxltd.com/wp/2011/05/02/javascript-color-gradient-calculator/#footnote_2_953" id="identifier_2_953" class="footnote-link footnote-identifier-link" title="delta[2] * (val - .5">3</a></sup> * 2)];
    }
    return '#'+Color.pad(Color.dechex(arrColor[0]),2)+Color.pad(Color.dechex(arrColor[1]),2)+Color.pad(Color.dechex(arrColor[2]),2);
}
</pre><div
class="betterrelated none"><p>No related content found.</p></div><ol
class="footnotes"><li
id="footnote_0_953" class="footnote">delta[0] * val) * 2), c1[1] + ((delta[1] * val) * 2), c1[2] - ((delta[2] * val) * 2)];
} else {
delta = [(c1[0] - c2[0]), (c1[1] - c2[1]), (c1[2] - c2[2])];
arrColor = [c1[0] - ((delta[0] * (val - .5</li><li
id="footnote_1_953" class="footnote">delta[1] * (val - .5</li><li
id="footnote_2_953" class="footnote">delta[2] * (val - .5</li></ol><p><!--[if IE]><iframe
frameborder="0" allowTransparency="true" class="addtoany_special_service facebook_like" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwerxltd.com%2Fwp%2F2011%2F05%2F02%2Fjavascript-color-gradient-calculator%2F&amp;layout=button_count&amp;show_faces=false&amp;width=75&amp;action=like&amp;colorscheme=light&amp;height=20&amp;ref=addtoany" scrolling="no" style="border:none;overflow:hidden;width:90px;height:21px"></iframe><![endif]--><!--[if !IE]><!--><iframe
class="addtoany_special_service facebook_like" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwerxltd.com%2Fwp%2F2011%2F05%2F02%2Fjavascript-color-gradient-calculator%2F&amp;layout=button_count&amp;show_faces=false&amp;width=75&amp;action=like&amp;colorscheme=light&amp;height=20&amp;ref=addtoany" scrolling="no" style="border:none;overflow:hidden;width:90px;height:21px"></iframe><!--<![endif]--><!--[if IE]><iframe
frameborder="0" allowTransparency="true" class="addtoany_special_service twitter_tweet" src="http://platform.twitter.com/widgets/tweet_button.html?url=http%3A%2F%2Fwerxltd.com%2Fwp%2F2011%2F05%2F02%2Fjavascript-color-gradient-calculator%2F&amp;counturl=http%3A%2F%2Fwerxltd.com%2Fwp%2F2011%2F05%2F02%2Fjavascript-color-gradient-calculator%2F&amp;count=none&amp;text=Javascript%20color%20gradient%20calculator" scrolling="no" style="border:none;overflow:hidden;width:55px;height:20px"></iframe><![endif]--><!--[if !IE]><!--><iframe
class="addtoany_special_service twitter_tweet" src="http://platform.twitter.com/widgets/tweet_button.html?url=http%3A%2F%2Fwerxltd.com%2Fwp%2F2011%2F05%2F02%2Fjavascript-color-gradient-calculator%2F&amp;counturl=http%3A%2F%2Fwerxltd.com%2Fwp%2F2011%2F05%2F02%2Fjavascript-color-gradient-calculator%2F&amp;count=none&amp;text=Javascript%20color%20gradient%20calculator" scrolling="no" style="border:none;overflow:hidden;width:55px;height:20px"></iframe><!--<![endif]--><!--[if IE]><iframe
frameborder="0" allowTransparency="true" class="addtoany_special_service google_plusone" src="https://plusone.google.com/u/0/_/%2B1/fastbutton?url=http%3A%2F%2Fwerxltd.com%2Fwp%2F2011%2F05%2F02%2Fjavascript-color-gradient-calculator%2F&amp;size=medium&amp;count=false" scrolling="no" style="border:none;overflow:hidden;width:32px;height:20px"></iframe><![endif]--><!--[if !IE]><!--><iframe
class="addtoany_special_service google_plusone" src="https://plusone.google.com/u/0/_/%2B1/fastbutton?url=http%3A%2F%2Fwerxltd.com%2Fwp%2F2011%2F05%2F02%2Fjavascript-color-gradient-calculator%2F&amp;size=medium&amp;count=false" scrolling="no" style="border:none;overflow:hidden;width:32px;height:20px"></iframe><!--<![endif]--><a
class="a2a_button_linkedin" href="http://www.addtoany.com/add_to/linkedin?linkurl=http%3A%2F%2Fwerxltd.com%2Fwp%2F2011%2F05%2F02%2Fjavascript-color-gradient-calculator%2F&amp;linkname=Javascript%20color%20gradient%20calculator" title="LinkedIn" rel="nofollow" target="_blank"><img
src="http://werxltd.com/wp/wp-content/plugins/add-to-any/icons/linkedin.png?9d7bd4" width="16" height="16" alt="LinkedIn"/></a><a
class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwerxltd.com%2Fwp%2F2011%2F05%2F02%2Fjavascript-color-gradient-calculator%2F&amp;title=Javascript%20color%20gradient%20calculator" id="wpa2a_6">Share/Save</a></p>]]></content:encoded> <wfw:commentRss>http://werxltd.com/wp/2011/05/02/javascript-color-gradient-calculator/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Ext.ux.JSONP for ExtJS 4</title><link>http://werxltd.com/wp/2011/04/07/ext-ux-jsonp-for-extjs-4/</link> <comments>http://werxltd.com/wp/2011/04/07/ext-ux-jsonp-for-extjs-4/#comments</comments> <pubDate>Thu, 07 Apr 2011 13:28:41 +0000</pubDate> <dc:creator>wes</dc:creator> <category><![CDATA[javascript]]></category> <category><![CDATA[extjs4]]></category> <category><![CDATA[jsonp]]></category> <category><![CDATA[scripttagproxy]]></category> <category><![CDATA[sencha]]></category><guid
isPermaLink="false">http://werxltd.com/wp/?p=938</guid> <description><![CDATA[Here is a solution for making simple JSONP requests in ExtJS 4 Ext.define('Ext.ux.JSONP', { extend: 'Ext.data.ScriptTagProxy', alias: 'ux.jsonp', createRequestCallback: function(request, operation, callback, scope) { var me = this; return function(response) { callback.apply(scope, [response]); operation.setCompleted(); operation.setSuccessful(); me.afterRequest(request, true); }; } }); No related content found.]]></description> <content:encoded><![CDATA[<p>Here is a solution for making simple JSONP requests in ExtJS 4</p><pre class="brush:javascript">
Ext.define('Ext.ux.JSONP', {
    extend: 'Ext.data.ScriptTagProxy',
    alias: 'ux.jsonp',

    createRequestCallback: function(request, operation, callback, scope) {
        var me = this;

        return function(response) {
            callback.apply(scope, [response]);

            operation.setCompleted();
            operation.setSuccessful();
            me.afterRequest(request, true);
        };
    }
});
</pre><div
class="betterrelated none"><p>No related content found.</p></div><p><!--[if IE]><iframe
frameborder="0" allowTransparency="true" class="addtoany_special_service facebook_like" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwerxltd.com%2Fwp%2F2011%2F04%2F07%2Fext-ux-jsonp-for-extjs-4%2F&amp;layout=button_count&amp;show_faces=false&amp;width=75&amp;action=like&amp;colorscheme=light&amp;height=20&amp;ref=addtoany" scrolling="no" style="border:none;overflow:hidden;width:90px;height:21px"></iframe><![endif]--><!--[if !IE]><!--><iframe
class="addtoany_special_service facebook_like" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwerxltd.com%2Fwp%2F2011%2F04%2F07%2Fext-ux-jsonp-for-extjs-4%2F&amp;layout=button_count&amp;show_faces=false&amp;width=75&amp;action=like&amp;colorscheme=light&amp;height=20&amp;ref=addtoany" scrolling="no" style="border:none;overflow:hidden;width:90px;height:21px"></iframe><!--<![endif]--><!--[if IE]><iframe
frameborder="0" allowTransparency="true" class="addtoany_special_service twitter_tweet" src="http://platform.twitter.com/widgets/tweet_button.html?url=http%3A%2F%2Fwerxltd.com%2Fwp%2F2011%2F04%2F07%2Fext-ux-jsonp-for-extjs-4%2F&amp;counturl=http%3A%2F%2Fwerxltd.com%2Fwp%2F2011%2F04%2F07%2Fext-ux-jsonp-for-extjs-4%2F&amp;count=none&amp;text=Ext.ux.JSONP%20for%20ExtJS%204" scrolling="no" style="border:none;overflow:hidden;width:55px;height:20px"></iframe><![endif]--><!--[if !IE]><!--><iframe
class="addtoany_special_service twitter_tweet" src="http://platform.twitter.com/widgets/tweet_button.html?url=http%3A%2F%2Fwerxltd.com%2Fwp%2F2011%2F04%2F07%2Fext-ux-jsonp-for-extjs-4%2F&amp;counturl=http%3A%2F%2Fwerxltd.com%2Fwp%2F2011%2F04%2F07%2Fext-ux-jsonp-for-extjs-4%2F&amp;count=none&amp;text=Ext.ux.JSONP%20for%20ExtJS%204" scrolling="no" style="border:none;overflow:hidden;width:55px;height:20px"></iframe><!--<![endif]--><!--[if IE]><iframe
frameborder="0" allowTransparency="true" class="addtoany_special_service google_plusone" src="https://plusone.google.com/u/0/_/%2B1/fastbutton?url=http%3A%2F%2Fwerxltd.com%2Fwp%2F2011%2F04%2F07%2Fext-ux-jsonp-for-extjs-4%2F&amp;size=medium&amp;count=false" scrolling="no" style="border:none;overflow:hidden;width:32px;height:20px"></iframe><![endif]--><!--[if !IE]><!--><iframe
class="addtoany_special_service google_plusone" src="https://plusone.google.com/u/0/_/%2B1/fastbutton?url=http%3A%2F%2Fwerxltd.com%2Fwp%2F2011%2F04%2F07%2Fext-ux-jsonp-for-extjs-4%2F&amp;size=medium&amp;count=false" scrolling="no" style="border:none;overflow:hidden;width:32px;height:20px"></iframe><!--<![endif]--><a
class="a2a_button_linkedin" href="http://www.addtoany.com/add_to/linkedin?linkurl=http%3A%2F%2Fwerxltd.com%2Fwp%2F2011%2F04%2F07%2Fext-ux-jsonp-for-extjs-4%2F&amp;linkname=Ext.ux.JSONP%20for%20ExtJS%204" title="LinkedIn" rel="nofollow" target="_blank"><img
src="http://werxltd.com/wp/wp-content/plugins/add-to-any/icons/linkedin.png?9d7bd4" width="16" height="16" alt="LinkedIn"/></a><a
class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwerxltd.com%2Fwp%2F2011%2F04%2F07%2Fext-ux-jsonp-for-extjs-4%2F&amp;title=Ext.ux.JSONP%20for%20ExtJS%204" id="wpa2a_8">Share/Save</a></p>]]></content:encoded> <wfw:commentRss>http://werxltd.com/wp/2011/04/07/ext-ux-jsonp-for-extjs-4/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>Simple message bus for extjs 4</title><link>http://werxltd.com/wp/2011/04/05/simple-message-bus-for-extjs-4/</link> <comments>http://werxltd.com/wp/2011/04/05/simple-message-bus-for-extjs-4/#comments</comments> <pubDate>Tue, 05 Apr 2011 18:52:54 +0000</pubDate> <dc:creator>wes</dc:creator> <category><![CDATA[javascript]]></category> <category><![CDATA[extjs]]></category> <category><![CDATA[sencha]]></category><guid
isPermaLink="false">http://werxltd.com/wp/?p=928</guid> <description><![CDATA[Here&#8217;s a simple message bus/broker I wrote for Ext.js 4 Ext.define('Ext.ux.MessageBroker', { extend: 'Ext.util.Observable', statics: { instance: null, setInstance: function(i) { this.instance = i; }, sendMessage: function(msg, data) { this.fireEvent('message',{"msg":msg,"data":data}); } }, constructor: function(config){ this.addEvents({ "message" : true }); if(config &#038;&#038; config.listeners) this.listeners = config.listeners; Ext.ux.MessageBroker.superclass.constructor.call(this, config) } }, function() { Ext.ux.MessageBroker.setInstance(new Ext.ux.MessageBroker()); }); // [...]]]></description> <content:encoded><![CDATA[<p>Here&#8217;s a simple message bus/broker I wrote for Ext.js 4</p><pre class="brush:javascript">
Ext.define('Ext.ux.MessageBroker', {
    extend: 'Ext.util.Observable',

    statics: {
        instance: null,
        setInstance: function(i) {
            this.instance = i;
        },
        sendMessage: function(msg, data) {
            this.fireEvent('message',{"msg":msg,"data":data});
        }
    },

    constructor: function(config){
        this.addEvents({
            "message" : true
        });

        if(config &#038;&#038; config.listeners) this.listeners = config.listeners;

        Ext.ux.MessageBroker.superclass.constructor.call(this, config)
    }

}, function() {
    Ext.ux.MessageBroker.setInstance(new Ext.ux.MessageBroker());
});

// Sending a message:
Ext.ux.MessageBroker.sendMessage("load_stock", {"symbol":"INTC"});

// Recieving a message:
Ext.util.Observable.observe(Ext.ux.MessageBroker);
Ext.ux.MessageBroker.on('message', function(msg) {
    console.log('message fired: ',msg);
});
</pre><div
class="betterrelated none"><p>No related content found.</p></div><p><!--[if IE]><iframe
frameborder="0" allowTransparency="true" class="addtoany_special_service facebook_like" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwerxltd.com%2Fwp%2F2011%2F04%2F05%2Fsimple-message-bus-for-extjs-4%2F&amp;layout=button_count&amp;show_faces=false&amp;width=75&amp;action=like&amp;colorscheme=light&amp;height=20&amp;ref=addtoany" scrolling="no" style="border:none;overflow:hidden;width:90px;height:21px"></iframe><![endif]--><!--[if !IE]><!--><iframe
class="addtoany_special_service facebook_like" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwerxltd.com%2Fwp%2F2011%2F04%2F05%2Fsimple-message-bus-for-extjs-4%2F&amp;layout=button_count&amp;show_faces=false&amp;width=75&amp;action=like&amp;colorscheme=light&amp;height=20&amp;ref=addtoany" scrolling="no" style="border:none;overflow:hidden;width:90px;height:21px"></iframe><!--<![endif]--><!--[if IE]><iframe
frameborder="0" allowTransparency="true" class="addtoany_special_service twitter_tweet" src="http://platform.twitter.com/widgets/tweet_button.html?url=http%3A%2F%2Fwerxltd.com%2Fwp%2F2011%2F04%2F05%2Fsimple-message-bus-for-extjs-4%2F&amp;counturl=http%3A%2F%2Fwerxltd.com%2Fwp%2F2011%2F04%2F05%2Fsimple-message-bus-for-extjs-4%2F&amp;count=none&amp;text=Simple%20message%20bus%20for%20extjs%204" scrolling="no" style="border:none;overflow:hidden;width:55px;height:20px"></iframe><![endif]--><!--[if !IE]><!--><iframe
class="addtoany_special_service twitter_tweet" src="http://platform.twitter.com/widgets/tweet_button.html?url=http%3A%2F%2Fwerxltd.com%2Fwp%2F2011%2F04%2F05%2Fsimple-message-bus-for-extjs-4%2F&amp;counturl=http%3A%2F%2Fwerxltd.com%2Fwp%2F2011%2F04%2F05%2Fsimple-message-bus-for-extjs-4%2F&amp;count=none&amp;text=Simple%20message%20bus%20for%20extjs%204" scrolling="no" style="border:none;overflow:hidden;width:55px;height:20px"></iframe><!--<![endif]--><!--[if IE]><iframe
frameborder="0" allowTransparency="true" class="addtoany_special_service google_plusone" src="https://plusone.google.com/u/0/_/%2B1/fastbutton?url=http%3A%2F%2Fwerxltd.com%2Fwp%2F2011%2F04%2F05%2Fsimple-message-bus-for-extjs-4%2F&amp;size=medium&amp;count=false" scrolling="no" style="border:none;overflow:hidden;width:32px;height:20px"></iframe><![endif]--><!--[if !IE]><!--><iframe
class="addtoany_special_service google_plusone" src="https://plusone.google.com/u/0/_/%2B1/fastbutton?url=http%3A%2F%2Fwerxltd.com%2Fwp%2F2011%2F04%2F05%2Fsimple-message-bus-for-extjs-4%2F&amp;size=medium&amp;count=false" scrolling="no" style="border:none;overflow:hidden;width:32px;height:20px"></iframe><!--<![endif]--><a
class="a2a_button_linkedin" href="http://www.addtoany.com/add_to/linkedin?linkurl=http%3A%2F%2Fwerxltd.com%2Fwp%2F2011%2F04%2F05%2Fsimple-message-bus-for-extjs-4%2F&amp;linkname=Simple%20message%20bus%20for%20extjs%204" title="LinkedIn" rel="nofollow" target="_blank"><img
src="http://werxltd.com/wp/wp-content/plugins/add-to-any/icons/linkedin.png?9d7bd4" width="16" height="16" alt="LinkedIn"/></a><a
class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwerxltd.com%2Fwp%2F2011%2F04%2F05%2Fsimple-message-bus-for-extjs-4%2F&amp;title=Simple%20message%20bus%20for%20extjs%204" id="wpa2a_10">Share/Save</a></p>]]></content:encoded> <wfw:commentRss>http://werxltd.com/wp/2011/04/05/simple-message-bus-for-extjs-4/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>Simulating Markers with Tile Layers</title><link>http://werxltd.com/wp/2011/03/26/simulating-markers-with-tile-layers/</link> <comments>http://werxltd.com/wp/2011/03/26/simulating-markers-with-tile-layers/#comments</comments> <pubDate>Sat, 26 Mar 2011 23:42:13 +0000</pubDate> <dc:creator>wes</dc:creator> <category><![CDATA[hosting]]></category> <category><![CDATA[javascript]]></category> <category><![CDATA[software development]]></category> <category><![CDATA[google mapping]]></category> <category><![CDATA[mapping]]></category> <category><![CDATA[tile]]></category> <category><![CDATA[tile server]]></category><guid
isPermaLink="false">http://werxltd.com/wp/?p=915</guid> <description><![CDATA[Here is a great video I found on Youtube on displaying lots of markers (more than a couple hundred points) through tile layers. He makes some great points, but I like my raphael overlay system I used in the church heatmap project. Related content: Fun with heatmaps Better Related Posts Plugin]]></description> <content:encoded><![CDATA[<p>Here is a great video I found on Youtube on displaying lots of markers (more than a couple hundred points) through tile layers. He makes some great points, but I like my raphael overlay system I used in the <a
href="http://heatmap.reasontostand.org/">church heatmap project</a>.</p><p><iframe
title="YouTube video player" width="480" height="390" src="http://www.youtube.com/embed/hNbFkLuRk5Y" frameborder="0" allowfullscreen></iframe></p><div
class="betterrelated"><p><strong>Related content:</strong></p><ol><li> <a
href="http://werxltd.com/wp/2011/02/28/fun-with-heatmaps/" title="Permanent link to Fun with heatmaps">Fun with heatmaps</a></li></ol><a
class="thanks" style="font-size: smaller; text-decoration: none;" title="Related content found by the Better Related Posts plugin" href="http://www.nkuttler.de/wordpress-plugin/wordpress-related-posts-plugin/">Better Related Posts Plugin</a></div><p><!--[if IE]><iframe
frameborder="0" allowTransparency="true" class="addtoany_special_service facebook_like" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwerxltd.com%2Fwp%2F2011%2F03%2F26%2Fsimulating-markers-with-tile-layers%2F&amp;layout=button_count&amp;show_faces=false&amp;width=75&amp;action=like&amp;colorscheme=light&amp;height=20&amp;ref=addtoany" scrolling="no" style="border:none;overflow:hidden;width:90px;height:21px"></iframe><![endif]--><!--[if !IE]><!--><iframe
class="addtoany_special_service facebook_like" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwerxltd.com%2Fwp%2F2011%2F03%2F26%2Fsimulating-markers-with-tile-layers%2F&amp;layout=button_count&amp;show_faces=false&amp;width=75&amp;action=like&amp;colorscheme=light&amp;height=20&amp;ref=addtoany" scrolling="no" style="border:none;overflow:hidden;width:90px;height:21px"></iframe><!--<![endif]--><!--[if IE]><iframe
frameborder="0" allowTransparency="true" class="addtoany_special_service twitter_tweet" src="http://platform.twitter.com/widgets/tweet_button.html?url=http%3A%2F%2Fwerxltd.com%2Fwp%2F2011%2F03%2F26%2Fsimulating-markers-with-tile-layers%2F&amp;counturl=http%3A%2F%2Fwerxltd.com%2Fwp%2F2011%2F03%2F26%2Fsimulating-markers-with-tile-layers%2F&amp;count=none&amp;text=Simulating%20Markers%20with%20Tile%20Layers" scrolling="no" style="border:none;overflow:hidden;width:55px;height:20px"></iframe><![endif]--><!--[if !IE]><!--><iframe
class="addtoany_special_service twitter_tweet" src="http://platform.twitter.com/widgets/tweet_button.html?url=http%3A%2F%2Fwerxltd.com%2Fwp%2F2011%2F03%2F26%2Fsimulating-markers-with-tile-layers%2F&amp;counturl=http%3A%2F%2Fwerxltd.com%2Fwp%2F2011%2F03%2F26%2Fsimulating-markers-with-tile-layers%2F&amp;count=none&amp;text=Simulating%20Markers%20with%20Tile%20Layers" scrolling="no" style="border:none;overflow:hidden;width:55px;height:20px"></iframe><!--<![endif]--><!--[if IE]><iframe
frameborder="0" allowTransparency="true" class="addtoany_special_service google_plusone" src="https://plusone.google.com/u/0/_/%2B1/fastbutton?url=http%3A%2F%2Fwerxltd.com%2Fwp%2F2011%2F03%2F26%2Fsimulating-markers-with-tile-layers%2F&amp;size=medium&amp;count=false" scrolling="no" style="border:none;overflow:hidden;width:32px;height:20px"></iframe><![endif]--><!--[if !IE]><!--><iframe
class="addtoany_special_service google_plusone" src="https://plusone.google.com/u/0/_/%2B1/fastbutton?url=http%3A%2F%2Fwerxltd.com%2Fwp%2F2011%2F03%2F26%2Fsimulating-markers-with-tile-layers%2F&amp;size=medium&amp;count=false" scrolling="no" style="border:none;overflow:hidden;width:32px;height:20px"></iframe><!--<![endif]--><a
class="a2a_button_linkedin" href="http://www.addtoany.com/add_to/linkedin?linkurl=http%3A%2F%2Fwerxltd.com%2Fwp%2F2011%2F03%2F26%2Fsimulating-markers-with-tile-layers%2F&amp;linkname=Simulating%20Markers%20with%20Tile%20Layers" title="LinkedIn" rel="nofollow" target="_blank"><img
src="http://werxltd.com/wp/wp-content/plugins/add-to-any/icons/linkedin.png?9d7bd4" width="16" height="16" alt="LinkedIn"/></a><a
class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwerxltd.com%2Fwp%2F2011%2F03%2F26%2Fsimulating-markers-with-tile-layers%2F&amp;title=Simulating%20Markers%20with%20Tile%20Layers" id="wpa2a_12">Share/Save</a></p>]]></content:encoded> <wfw:commentRss>http://werxltd.com/wp/2011/03/26/simulating-markers-with-tile-layers/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Calculate a color gradient in Javascript</title><link>http://werxltd.com/wp/2011/03/08/calculate-a-color-gradient-in-javascript/</link> <comments>http://werxltd.com/wp/2011/03/08/calculate-a-color-gradient-in-javascript/#comments</comments> <pubDate>Tue, 08 Mar 2011 16:44:33 +0000</pubDate> <dc:creator>wes</dc:creator> <category><![CDATA[javascript]]></category> <category><![CDATA[software development]]></category> <category><![CDATA[canvas]]></category> <category><![CDATA[color]]></category> <category><![CDATA[gradient]]></category><guid
isPermaLink="false">http://werxltd.com/wp/?p=908</guid> <description><![CDATA[Here is a simple Javascript class to calculate the percent of a gradient between two colors given the percent (as a float 0-1) and two colors. Uses functions from php.js. Color = function() { }; Color.hexdec = function(hex_string) { hex_string = (hex_string + '').replace(/[^a-f0-9]/gi, ''); return parseInt(hex_string, 16); } Color.dechex = function(number) { if (number [...]]]></description> <content:encoded><![CDATA[<p>Here is a simple Javascript class to calculate the percent of a gradient between two colors given the percent (as a float 0-1) and two colors. Uses functions from <a
href="http://phpjs.org/">php.js</a>.</p><pre class="brush:javascript">
Color = function() {
};

Color.hexdec = function(hex_string) {
    hex_string = (hex_string + '').replace(/[^a-f0-9]/gi, '');
    return parseInt(hex_string, 16);
}

Color.dechex = function(number) {
    if (number < 0) {
        number = 0xFFFFFFFF + number + 1;
    }
    return parseInt(number, 10).toString(16);
}

Color.pad = function(number, length) {
    var str = '' + number;
    while (str.length < length) {
        str = '0' + str;
    }
    return str;
}

Color.calcgrad = function(val, color1, color2) {

    if(!color1.match(/^#[0-9a-f]{6}/) || !color2.match(/^#[0-9a-f]{6}/)) return 'match err!';

    if (val > 1) {
        val = 1;
    }
    if (val < 0) {
        val = 0;
    }
    val = parseFloat(val);

    c1 = [Color.hexdec(color1.substr(1,2)), Color.hexdec(color1.substr(3,2)), Color.hexdec(color1.substr(5,2))];
    c2 = [Color.hexdec(color2.substr(1,2)), Color.hexdec(color2.substr(3,2)), Color.hexdec(color2.substr(5,2))];

    if (val < .5) {
        delta = [(c2[0] - c1[0]), (c2[1] - c1[1]), (c1[2] - c2[2])];
        arrColor = [c1[0] +<sup><a href="http://werxltd.com/wp/2011/03/08/calculate-a-color-gradient-in-javascript/#footnote_0_908" id="identifier_0_908" class="footnote-link footnote-identifier-link" title="delta[0] * val) * 2), c1[1] + ((delta[1] * val) * 2), c1[2] - ((delta[2] * val) * 2)];
    } else {
        delta = [(c1[0] - c2[0]), (c1[1] - c2[1]), (c1[2] - c2[2])];
        arrColor = [c1[0] - ((delta[0] * (val - .5">1</a></sup> * 2), c1[1] -<sup><a href="http://werxltd.com/wp/2011/03/08/calculate-a-color-gradient-in-javascript/#footnote_1_908" id="identifier_1_908" class="footnote-link footnote-identifier-link" title="delta[1] * (val - .5">2</a></sup> * 2), c1[2] -<sup><a href="http://werxltd.com/wp/2011/03/08/calculate-a-color-gradient-in-javascript/#footnote_2_908" id="identifier_2_908" class="footnote-link footnote-identifier-link" title="delta[2] * (val - .5">3</a></sup> * 2)];
    }
    return '#'+Color.pad(Color.dechex(arrColor[0]),2)+Color.pad(Color.dechex(arrColor[1]),2)+Color.pad(Color.dechex(arrColor[2]),2);
}
</pre><div
class="betterrelated none"><p>No related content found.</p></div><ol
class="footnotes"><li
id="footnote_0_908" class="footnote">delta[0] * val) * 2), c1[1] + ((delta[1] * val) * 2), c1[2] - ((delta[2] * val) * 2)];
} else {
delta = [(c1[0] - c2[0]), (c1[1] - c2[1]), (c1[2] - c2[2])];
arrColor = [c1[0] - ((delta[0] * (val - .5</li><li
id="footnote_1_908" class="footnote">delta[1] * (val - .5</li><li
id="footnote_2_908" class="footnote">delta[2] * (val - .5</li></ol><p><!--[if IE]><iframe
frameborder="0" allowTransparency="true" class="addtoany_special_service facebook_like" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwerxltd.com%2Fwp%2F2011%2F03%2F08%2Fcalculate-a-color-gradient-in-javascript%2F&amp;layout=button_count&amp;show_faces=false&amp;width=75&amp;action=like&amp;colorscheme=light&amp;height=20&amp;ref=addtoany" scrolling="no" style="border:none;overflow:hidden;width:90px;height:21px"></iframe><![endif]--><!--[if !IE]><!--><iframe
class="addtoany_special_service facebook_like" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwerxltd.com%2Fwp%2F2011%2F03%2F08%2Fcalculate-a-color-gradient-in-javascript%2F&amp;layout=button_count&amp;show_faces=false&amp;width=75&amp;action=like&amp;colorscheme=light&amp;height=20&amp;ref=addtoany" scrolling="no" style="border:none;overflow:hidden;width:90px;height:21px"></iframe><!--<![endif]--><!--[if IE]><iframe
frameborder="0" allowTransparency="true" class="addtoany_special_service twitter_tweet" src="http://platform.twitter.com/widgets/tweet_button.html?url=http%3A%2F%2Fwerxltd.com%2Fwp%2F2011%2F03%2F08%2Fcalculate-a-color-gradient-in-javascript%2F&amp;counturl=http%3A%2F%2Fwerxltd.com%2Fwp%2F2011%2F03%2F08%2Fcalculate-a-color-gradient-in-javascript%2F&amp;count=none&amp;text=Calculate%20a%20color%20gradient%20in%20Javascript" scrolling="no" style="border:none;overflow:hidden;width:55px;height:20px"></iframe><![endif]--><!--[if !IE]><!--><iframe
class="addtoany_special_service twitter_tweet" src="http://platform.twitter.com/widgets/tweet_button.html?url=http%3A%2F%2Fwerxltd.com%2Fwp%2F2011%2F03%2F08%2Fcalculate-a-color-gradient-in-javascript%2F&amp;counturl=http%3A%2F%2Fwerxltd.com%2Fwp%2F2011%2F03%2F08%2Fcalculate-a-color-gradient-in-javascript%2F&amp;count=none&amp;text=Calculate%20a%20color%20gradient%20in%20Javascript" scrolling="no" style="border:none;overflow:hidden;width:55px;height:20px"></iframe><!--<![endif]--><!--[if IE]><iframe
frameborder="0" allowTransparency="true" class="addtoany_special_service google_plusone" src="https://plusone.google.com/u/0/_/%2B1/fastbutton?url=http%3A%2F%2Fwerxltd.com%2Fwp%2F2011%2F03%2F08%2Fcalculate-a-color-gradient-in-javascript%2F&amp;size=medium&amp;count=false" scrolling="no" style="border:none;overflow:hidden;width:32px;height:20px"></iframe><![endif]--><!--[if !IE]><!--><iframe
class="addtoany_special_service google_plusone" src="https://plusone.google.com/u/0/_/%2B1/fastbutton?url=http%3A%2F%2Fwerxltd.com%2Fwp%2F2011%2F03%2F08%2Fcalculate-a-color-gradient-in-javascript%2F&amp;size=medium&amp;count=false" scrolling="no" style="border:none;overflow:hidden;width:32px;height:20px"></iframe><!--<![endif]--><a
class="a2a_button_linkedin" href="http://www.addtoany.com/add_to/linkedin?linkurl=http%3A%2F%2Fwerxltd.com%2Fwp%2F2011%2F03%2F08%2Fcalculate-a-color-gradient-in-javascript%2F&amp;linkname=Calculate%20a%20color%20gradient%20in%20Javascript" title="LinkedIn" rel="nofollow" target="_blank"><img
src="http://werxltd.com/wp/wp-content/plugins/add-to-any/icons/linkedin.png?9d7bd4" width="16" height="16" alt="LinkedIn"/></a><a
class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwerxltd.com%2Fwp%2F2011%2F03%2F08%2Fcalculate-a-color-gradient-in-javascript%2F&amp;title=Calculate%20a%20color%20gradient%20in%20Javascript" id="wpa2a_14">Share/Save</a></p>]]></content:encoded> <wfw:commentRss>http://werxltd.com/wp/2011/03/08/calculate-a-color-gradient-in-javascript/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Fun with heatmaps</title><link>http://werxltd.com/wp/2011/02/28/fun-with-heatmaps/</link> <comments>http://werxltd.com/wp/2011/02/28/fun-with-heatmaps/#comments</comments> <pubDate>Mon, 28 Feb 2011 15:00:50 +0000</pubDate> <dc:creator>wes</dc:creator> <category><![CDATA[c++]]></category> <category><![CDATA[hosting]]></category> <category><![CDATA[it industry]]></category> <category><![CDATA[javascript]]></category> <category><![CDATA[python]]></category> <category><![CDATA[software development]]></category> <category><![CDATA[big data]]></category> <category><![CDATA[canvas]]></category> <category><![CDATA[gRaphaël]]></category> <category><![CDATA[heatmap]]></category> <category><![CDATA[html5]]></category> <category><![CDATA[map reduce]]></category> <category><![CDATA[mongodb]]></category> <category><![CDATA[node.js]]></category> <category><![CDATA[nodejs]]></category> <category><![CDATA[raphael]]></category> <category><![CDATA[socket.io]]></category> <category><![CDATA[web scale]]></category><guid
isPermaLink="false">http://werxltd.com/wp/?p=903</guid> <description><![CDATA[Recently I&#8217;ve been playing with a few new technologies. Some are new to me while most are simply new. My base project to use these technologies is a heatmap visualization of churches in Georgia. While heatmaps in themselves aren&#8217;t exactly exciting, having the ability to map more than 10,000 data points at a time in [...]]]></description> <content:encoded><![CDATA[<p>Recently I&#8217;ve been playing with a few new technologies. Some are new to me while most are simply new. My base project to use these technologies is a <a
href="http://heatmap.reasontostand.org">heatmap visualization of churches in Georgia</a>. While heatmaps in themselves aren&#8217;t exactly exciting, having the ability to map more than 10,000 data points at a time in real-time is.</p><p>So here are the various technologies I used in the creation of my app.</p><h2>YQL</h2><p>To get the data for this project I used a simple Python script and <a
href="http://developer.yahoo.com/yql/">YQL</a> to get a list of locations in each Zip code in Georgia with the term &#8220;Church&#8221; in them. This yielded approximately 10,000 results, including a few from South Carolina.</p><h2>MongoDB</h2><p>I stored the data I got from YQL in <a
href="http://www.mongodb.org/">MongoDB</a>. Specifically, I used <a
href="https://mongolab.com/home/">MongoLab&#8217;s</a> to host the data because they have a generous free storage limit (256Meg) and can be accessed from a RackSpace server without incurring an additional bandwidth charge.</p><p>MongoDB is a JavaScript-based <a
href="http://en.wikipedia.org/wiki/NoSQL">NoSQL</a> solution used by sites like Foursquare. It has built-in support for Geo queries and is built to scale.</p><h2>node.js</h2><p>For the application layer I decided to try out <a
href="http://nodejs.org/">node.js</a>. Node is also JavaScript-based, based on <a
href="http://www.webkit.org/">WebKit</a>, the engine behind Google&#8217;s Chrome and Apple&#8217;s Safari browsers. Node is event-based which means it has the potential to be lightning fast.</p><h2>Canvas</h2><p>The biggest factor in how well a heatmap solution performs is the graphics package that&#8217;s used. After searching around I found a pretty decent <a
href="http://www.labsmedia.com/clickheat/156914.html">PHP heatmap solution</a>, but it used GD and was very slow. I also found <a
href="http://www.patrick-wied.at/static/heatmap/">a JavaScript solution</a> that used the new <a
href="http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html">HTML5 Canvas element</a>, but it choked when given a significant amount of datapoints to render all at once. So I decided to refactor some of the utility functions from the PHP solution and combine them with the Canvas function.</p><p>The great thing about the resulting solution is that it has the ability to run on either the client-side or the server-side. And in the end the heatmap application I built uses both. If the number of data points in a tile is less than a preset threshold defined per browser<sup><a
href="http://werxltd.com/wp/2011/02/28/fun-with-heatmaps/#footnote_0_903" id="identifier_0_903" class="footnote-link footnote-identifier-link" title="1000 for WebKit-based browsers, 250 for Mozilla-based browsers, and 0 for IE because IE still sucks.">1</a></sup> the raw data is sent back to the browser which renders the tiles client-side rather than consuming precious server resources.</p><h2>Web Sockets</h2><p>The usual way to serve tiles is by serving images to overlay the map. And while the heatmap solution I developed does serve static PNG files from cache, I decided to use the new <a
href="http://en.wikipedia.org/wiki/WebSockets">HTML5 Web Sockets</a> to make things a bit more interesting. What is great about web sockets is that it allows me to pass events between the server and client very easily. <a
href="http://socket.io/">Socket.io</a> made it easy to forget where the server ended and where the client began.</p><h2>ZeroMQ</h2><p>As applications scale to multiple threads, processes, and eventually across servers and networks, they need to have a way for each component to communicate with other components in an efficient manner. So add a bit of future-proofing to my solution I decided to use <a
href="http://www.zeromq.org/">ZeroMQ</a> to pass messages between the front-end web server component and the back-end tile generator component. This allows me to tune the performance of the application in both directions, up or down<sup><a
href="http://werxltd.com/wp/2011/02/28/fun-with-heatmaps/#footnote_1_903" id="identifier_1_903" class="footnote-link footnote-identifier-link" title="Tuning performance down comes in handy when you are on a shared server with limited resources.">2</a></sup>.</p><h2>Raphaël</h2><p>To add some extra pizzazz to the app I decided to add in the ability to display each individual data point along with some additional detailed information. I found that Google&#8217;s native Marker system was a bit slow when it came to displaying over 2,000 markers at a time so I decided to give the <a
href="http://raphaeljs.com/">Raphaël</a> graphics library a try. The results were impressive. Raphael was not only able to draw thousands of data points on the map seamlessly, but was able to do it with smooth animations. Look for <a
href="http://g.raphaeljs.com/">gRaphaël</a> to be employed in future renditions of this heatmap solution.</p><h2>Conclusion</h2><p>Every now and then I run across a programming challenge that reminds me why I love doing what I do. These technologies and this project have done that for me. Being able to throw together a large, complex project like this in a relatively quick manner reminded me of Fred Brooks&#8217;s comment on <a
href="http://werxltd.com/wp/2010/08/26/why-programming-is-fun/">why programming is fun</a>.</p><div
class="betterrelated"><p><strong>Related content:</strong></p><ol><li> <a
href="http://werxltd.com/wp/2010/10/12/fred-brooks-on-the-promise-of-object-oriented-programming/" title="Permanent link to Fred Brooks on the promise of object oriented programming">Fred Brooks on the promise of object oriented programming</a></li><li> <a
href="http://werxltd.com/wp/2010/09/27/mcafee-secure-url-shortener-firefox-add-on/" title="Permanent link to McAfee Secure URL Shortener Firefox Add-on">McAfee Secure URL Shortener Firefox Add-on</a></li><li> <a
href="http://werxltd.com/wp/2010/04/29/hiphop-for-php/" title="Permanent link to HipHop for PHP">HipHop for PHP</a></li><li> <a
href="http://werxltd.com/wp/2010/10/18/using-punycode-to-access-non-latin-domains/" title="Permanent link to Using punycode to access non-Latin domains">Using punycode to access non-Latin domains</a></li><li> <a
href="http://werxltd.com/wp/2011/03/26/simulating-markers-with-tile-layers/" title="Permanent link to Simulating Markers with Tile Layers">Simulating Markers with Tile Layers</a></li><li> <a
href="http://werxltd.com/wp/2009/08/26/getting-starte-with-hadoop-and-mapreduce/" title="Permanent link to Getting started with Hadoop and MapReduce">Getting started with Hadoop and MapReduce</a></li><li> <a
href="http://werxltd.com/wp/2010/09/22/mcafee-url-shortener-chrome-extension/" title="Permanent link to McAfee URL Shortener Chrome Extension">McAfee URL Shortener Chrome Extension</a></li><li> <a
href="http://werxltd.com/wp/2011/03/17/gtk-in-the-browser/" title="Permanent link to GTK in the browser">GTK in the browser</a></li><li> <a
href="http://werxltd.com/wp/2012/01/23/node-js-at-facebook/" title="Permanent link to node.js at Facebook">node.js at Facebook</a></li><li> <a
href="http://werxltd.com/wp/2011/03/08/calculate-a-color-gradient-in-javascript/" title="Permanent link to Calculate a color gradient in Javascript">Calculate a color gradient in Javascript</a></li></ol><a
class="thanks" style="font-size: smaller; text-decoration: none;" title="Related content found by the Better Related Posts plugin" href="http://www.nkuttler.de/wordpress-plugin/wordpress-related-posts-plugin/">Better Related Posts Plugin</a></div><ol
class="footnotes"><li
id="footnote_0_903" class="footnote">1000 for WebKit-based browsers, 250 for Mozilla-based browsers, and 0 for IE because IE still sucks.</li><li
id="footnote_1_903" class="footnote">Tuning performance down comes in handy when you are on a shared server with limited resources.</li></ol><p><!--[if IE]><iframe
frameborder="0" allowTransparency="true" class="addtoany_special_service facebook_like" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwerxltd.com%2Fwp%2F2011%2F02%2F28%2Ffun-with-heatmaps%2F&amp;layout=button_count&amp;show_faces=false&amp;width=75&amp;action=like&amp;colorscheme=light&amp;height=20&amp;ref=addtoany" scrolling="no" style="border:none;overflow:hidden;width:90px;height:21px"></iframe><![endif]--><!--[if !IE]><!--><iframe
class="addtoany_special_service facebook_like" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwerxltd.com%2Fwp%2F2011%2F02%2F28%2Ffun-with-heatmaps%2F&amp;layout=button_count&amp;show_faces=false&amp;width=75&amp;action=like&amp;colorscheme=light&amp;height=20&amp;ref=addtoany" scrolling="no" style="border:none;overflow:hidden;width:90px;height:21px"></iframe><!--<![endif]--><!--[if IE]><iframe
frameborder="0" allowTransparency="true" class="addtoany_special_service twitter_tweet" src="http://platform.twitter.com/widgets/tweet_button.html?url=http%3A%2F%2Fwerxltd.com%2Fwp%2F2011%2F02%2F28%2Ffun-with-heatmaps%2F&amp;counturl=http%3A%2F%2Fwerxltd.com%2Fwp%2F2011%2F02%2F28%2Ffun-with-heatmaps%2F&amp;count=none&amp;text=Fun%20with%20heatmaps" scrolling="no" style="border:none;overflow:hidden;width:55px;height:20px"></iframe><![endif]--><!--[if !IE]><!--><iframe
class="addtoany_special_service twitter_tweet" src="http://platform.twitter.com/widgets/tweet_button.html?url=http%3A%2F%2Fwerxltd.com%2Fwp%2F2011%2F02%2F28%2Ffun-with-heatmaps%2F&amp;counturl=http%3A%2F%2Fwerxltd.com%2Fwp%2F2011%2F02%2F28%2Ffun-with-heatmaps%2F&amp;count=none&amp;text=Fun%20with%20heatmaps" scrolling="no" style="border:none;overflow:hidden;width:55px;height:20px"></iframe><!--<![endif]--><!--[if IE]><iframe
frameborder="0" allowTransparency="true" class="addtoany_special_service google_plusone" src="https://plusone.google.com/u/0/_/%2B1/fastbutton?url=http%3A%2F%2Fwerxltd.com%2Fwp%2F2011%2F02%2F28%2Ffun-with-heatmaps%2F&amp;size=medium&amp;count=false" scrolling="no" style="border:none;overflow:hidden;width:32px;height:20px"></iframe><![endif]--><!--[if !IE]><!--><iframe
class="addtoany_special_service google_plusone" src="https://plusone.google.com/u/0/_/%2B1/fastbutton?url=http%3A%2F%2Fwerxltd.com%2Fwp%2F2011%2F02%2F28%2Ffun-with-heatmaps%2F&amp;size=medium&amp;count=false" scrolling="no" style="border:none;overflow:hidden;width:32px;height:20px"></iframe><!--<![endif]--><a
class="a2a_button_linkedin" href="http://www.addtoany.com/add_to/linkedin?linkurl=http%3A%2F%2Fwerxltd.com%2Fwp%2F2011%2F02%2F28%2Ffun-with-heatmaps%2F&amp;linkname=Fun%20with%20heatmaps" title="LinkedIn" rel="nofollow" target="_blank"><img
src="http://werxltd.com/wp/wp-content/plugins/add-to-any/icons/linkedin.png?9d7bd4" width="16" height="16" alt="LinkedIn"/></a><a
class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwerxltd.com%2Fwp%2F2011%2F02%2F28%2Ffun-with-heatmaps%2F&amp;title=Fun%20with%20heatmaps" id="wpa2a_16">Share/Save</a></p>]]></content:encoded> <wfw:commentRss>http://werxltd.com/wp/2011/02/28/fun-with-heatmaps/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Javascript performance</title><link>http://werxltd.com/wp/2010/11/04/javascript-performance/</link> <comments>http://werxltd.com/wp/2010/11/04/javascript-performance/#comments</comments> <pubDate>Thu, 04 Nov 2010 12:00:39 +0000</pubDate> <dc:creator>wes</dc:creator> <category><![CDATA[general]]></category> <category><![CDATA[javascript]]></category> <category><![CDATA[software development]]></category> <category><![CDATA[optimisation]]></category> <category><![CDATA[optimization]]></category> <category><![CDATA[performance]]></category> <category><![CDATA[speed]]></category><guid
isPermaLink="false">http://werxltd.com/wp/?p=832</guid> <description><![CDATA[His biggest point is &#8220;do not optimize prematurely&#8221;. This is a sentiment I&#8217;ve heard a few times. Fred Brooks emphasizes it in Mythical Man Month, and Eric Raymond harps on it a bit in Art of Unix Programming. Another point he makes is how using &#8220;weird language syntax&#8221; like double bitwise not is sometimes faster [...]]]></description> <content:encoded><![CDATA[<p><object
classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="480" height="300" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param
name="src" value="http://blip.tv/play/AYG4omIC" /><param
name="allowfullscreen" value="true" /><embed
type="application/x-shockwave-flash" width="480" height="300" src="http://blip.tv/play/AYG4omIC" allowfullscreen="true"></embed></object></p><p>His biggest point is &#8220;do not optimize prematurely&#8221;. This is a sentiment I&#8217;ve heard a few times. Fred Brooks emphasizes it in <a
href="http://www.amazon.com/Mythical-Man-Month-Software-Engineering-Anniversary/dp/0201835959/ref=sr_1_1?s=books&amp;ie=UTF8&amp;qid=1288620729&amp;sr=1-1">Mythical Man Month</a>, and Eric Raymond harps on it a bit in <a
href="http://www.amazon.com/Art-UNIX-Programming-Eric-Raymond/dp/0131429019">Art of Unix Programming</a>.</p><p>Another point he makes is how using &#8220;weird language syntax&#8221; like <a
href="http://james.padolsey.com/javascript/double-bitwise-not/">double bitwise not</a> is sometimes faster than their functional equivalents like <a
href="http://www.w3schools.com/jsref/jsref_parseint.asp">parseInt</a>.</p><p>And one surprising revelation (for me anyway) is that <a
href="http://fatagnus.com/unrolling-your-loop-for-better-performance-in-javascript/">unrolled loops</a> can sometimes be faster.</p><p>Overall, a great presentation, well worth your time if you work with javascript a lot.</p><div
class="betterrelated"><p><strong>Related content:</strong></p><ol><li> <a
href="http://werxltd.com/wp/2010/10/12/fred-brooks-on-the-promise-of-object-oriented-programming/" title="Permanent link to Fred Brooks on the promise of object oriented programming">Fred Brooks on the promise of object oriented programming</a></li><li> <a
href="http://werxltd.com/wp/2010/09/27/mcafee-secure-url-shortener-firefox-add-on/" title="Permanent link to McAfee Secure URL Shortener Firefox Add-on">McAfee Secure URL Shortener Firefox Add-on</a></li></ol><a
class="thanks" style="font-size: smaller; text-decoration: none;" title="Related content found by the Better Related Posts plugin" href="http://www.nkuttler.de/wordpress-plugin/wordpress-related-posts-plugin/">Better Related Posts Plugin</a></div><p><!--[if IE]><iframe
frameborder="0" allowTransparency="true" class="addtoany_special_service facebook_like" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwerxltd.com%2Fwp%2F2010%2F11%2F04%2Fjavascript-performance%2F&amp;layout=button_count&amp;show_faces=false&amp;width=75&amp;action=like&amp;colorscheme=light&amp;height=20&amp;ref=addtoany" scrolling="no" style="border:none;overflow:hidden;width:90px;height:21px"></iframe><![endif]--><!--[if !IE]><!--><iframe
class="addtoany_special_service facebook_like" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwerxltd.com%2Fwp%2F2010%2F11%2F04%2Fjavascript-performance%2F&amp;layout=button_count&amp;show_faces=false&amp;width=75&amp;action=like&amp;colorscheme=light&amp;height=20&amp;ref=addtoany" scrolling="no" style="border:none;overflow:hidden;width:90px;height:21px"></iframe><!--<![endif]--><!--[if IE]><iframe
frameborder="0" allowTransparency="true" class="addtoany_special_service twitter_tweet" src="http://platform.twitter.com/widgets/tweet_button.html?url=http%3A%2F%2Fwerxltd.com%2Fwp%2F2010%2F11%2F04%2Fjavascript-performance%2F&amp;counturl=http%3A%2F%2Fwerxltd.com%2Fwp%2F2010%2F11%2F04%2Fjavascript-performance%2F&amp;count=none&amp;text=Javascript%20performance" scrolling="no" style="border:none;overflow:hidden;width:55px;height:20px"></iframe><![endif]--><!--[if !IE]><!--><iframe
class="addtoany_special_service twitter_tweet" src="http://platform.twitter.com/widgets/tweet_button.html?url=http%3A%2F%2Fwerxltd.com%2Fwp%2F2010%2F11%2F04%2Fjavascript-performance%2F&amp;counturl=http%3A%2F%2Fwerxltd.com%2Fwp%2F2010%2F11%2F04%2Fjavascript-performance%2F&amp;count=none&amp;text=Javascript%20performance" scrolling="no" style="border:none;overflow:hidden;width:55px;height:20px"></iframe><!--<![endif]--><!--[if IE]><iframe
frameborder="0" allowTransparency="true" class="addtoany_special_service google_plusone" src="https://plusone.google.com/u/0/_/%2B1/fastbutton?url=http%3A%2F%2Fwerxltd.com%2Fwp%2F2010%2F11%2F04%2Fjavascript-performance%2F&amp;size=medium&amp;count=false" scrolling="no" style="border:none;overflow:hidden;width:32px;height:20px"></iframe><![endif]--><!--[if !IE]><!--><iframe
class="addtoany_special_service google_plusone" src="https://plusone.google.com/u/0/_/%2B1/fastbutton?url=http%3A%2F%2Fwerxltd.com%2Fwp%2F2010%2F11%2F04%2Fjavascript-performance%2F&amp;size=medium&amp;count=false" scrolling="no" style="border:none;overflow:hidden;width:32px;height:20px"></iframe><!--<![endif]--><a
class="a2a_button_linkedin" href="http://www.addtoany.com/add_to/linkedin?linkurl=http%3A%2F%2Fwerxltd.com%2Fwp%2F2010%2F11%2F04%2Fjavascript-performance%2F&amp;linkname=Javascript%20performance" title="LinkedIn" rel="nofollow" target="_blank"><img
src="http://werxltd.com/wp/wp-content/plugins/add-to-any/icons/linkedin.png?9d7bd4" width="16" height="16" alt="LinkedIn"/></a><a
class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwerxltd.com%2Fwp%2F2010%2F11%2F04%2Fjavascript-performance%2F&amp;title=Javascript%20performance" id="wpa2a_18">Share/Save</a></p>]]></content:encoded> <wfw:commentRss>http://werxltd.com/wp/2010/11/04/javascript-performance/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Using punycode to access non-Latin domains</title><link>http://werxltd.com/wp/2010/10/18/using-punycode-to-access-non-latin-domains/</link> <comments>http://werxltd.com/wp/2010/10/18/using-punycode-to-access-non-latin-domains/#comments</comments> <pubDate>Mon, 18 Oct 2010 14:00:40 +0000</pubDate> <dc:creator>wes</dc:creator> <category><![CDATA[it industry]]></category> <category><![CDATA[javascript]]></category> <category><![CDATA[software development]]></category> <category><![CDATA[domain names]]></category> <category><![CDATA[icann]]></category> <category><![CDATA[internationalization]]></category> <category><![CDATA[punycode]]></category> <category><![CDATA[unicode]]></category><guid
isPermaLink="false">http://werxltd.com/wp/?p=603</guid> <description><![CDATA[The Internet Corporation on Assigned Names and Numbers recently decided to allow for the issuing of non-Latin domain names. Previously all countries were forced to use the ASCII character set, including countries whose native language included non-ASCII characters. To aid in the transition, ICANN devised a micro-language of sorts to allow a smooth transition between [...]]]></description> <content:encoded><![CDATA[<p><a
href="http://werxltd.com/wp/wp-content/uploads/2010/10/idn-to-punycode.jpg?9d7bd4"><img
class="alignleft size-medium wp-image-809" style="margin: 5px;" title="idn-to-punycode" src="http://werxltd.com/wp/wp-content/uploads/2010/10/idn-to-punycode-300x138.jpg?9d7bd4" alt="" width="300" height="138" /></a>The <a
href="http://www.icann.org/">Internet Corporation on Assigned Names and Numbers</a> recently <a
href="http://news.cnet.com/8301-1023_3-10387139-93.html">decided to allow for the issuing of non-Latin domain names</a>. Previously all countries were forced to use the <a
href="http://www.asciitable.com/">ASCII character set</a>, including countries whose native language included non-ASCII characters.</p><p>To aid in the transition, ICANN devised a micro-language of sorts to allow a smooth transition between ASCII-only domain names and the more robust Unicode domain names (which allows for non-Latin characters). This micro-language is known as <a
href="http://en.wikipedia.org/wiki/Punycode">Punycode</a>.</p><p>To give you an example of how this language works, let&#8217;s take the <a
href="http://www.circleid.com/posts/20101015_iran_non_latin_top_level_domain_approved_by_icann/">recent top level domain (TLD) approval of .iran</a> in their native language of Farsi. <a
href="http://icann.org/en/topics/idn/fast-track/string-evaluation-completion-i-en.htm#ir">Click here</a> to see what this domain looks like in both it&#8217;s native Unicode (in Arabic script) and it&#8217;s punycode equivalent (xn--mgba3a4f16a).</p><p>There are a number of punycode decoders and encoders like <a
href="http://www.motobit.com/util/punycode-decoder-encoder.asp">this one</a>. There are also excellent libraries available to convert punycode, like <a
href="http://stackoverflow.com/questions/183485/can-anyone-recommend-a-good-free-javascript-for-punycode-to-unicode-conversion">this javascript one</a>.</p><p><a
href="http://werxltd.com/lab/punycode.php">Here is my own rendition using the javascript library above.</a></p><p>So if you have a need to use punycode and/or non-Latin domain names. I hope this helps.</p><div
class="betterrelated"><p><strong>Related content:</strong></p><ol><li> <a
href="http://werxltd.com/wp/2010/09/27/mcafee-secure-url-shortener-firefox-add-on/" title="Permanent link to McAfee Secure URL Shortener Firefox Add-on">McAfee Secure URL Shortener Firefox Add-on</a></li><li> <a
href="http://werxltd.com/wp/2010/09/22/mcafee-url-shortener-chrome-extension/" title="Permanent link to McAfee URL Shortener Chrome Extension">McAfee URL Shortener Chrome Extension</a></li><li> <a
href="http://werxltd.com/wp/2011/02/28/fun-with-heatmaps/" title="Permanent link to Fun with heatmaps">Fun with heatmaps</a></li><li> <a
href="http://werxltd.com/wp/2010/10/12/fred-brooks-on-the-promise-of-object-oriented-programming/" title="Permanent link to Fred Brooks on the promise of object oriented programming">Fred Brooks on the promise of object oriented programming</a></li></ol><a
class="thanks" style="font-size: smaller; text-decoration: none;" title="Related content found by the Better Related Posts plugin" href="http://www.nkuttler.de/wordpress-plugin/wordpress-related-posts-plugin/">Better Related Posts Plugin</a></div><p><!--[if IE]><iframe
frameborder="0" allowTransparency="true" class="addtoany_special_service facebook_like" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwerxltd.com%2Fwp%2F2010%2F10%2F18%2Fusing-punycode-to-access-non-latin-domains%2F&amp;layout=button_count&amp;show_faces=false&amp;width=75&amp;action=like&amp;colorscheme=light&amp;height=20&amp;ref=addtoany" scrolling="no" style="border:none;overflow:hidden;width:90px;height:21px"></iframe><![endif]--><!--[if !IE]><!--><iframe
class="addtoany_special_service facebook_like" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwerxltd.com%2Fwp%2F2010%2F10%2F18%2Fusing-punycode-to-access-non-latin-domains%2F&amp;layout=button_count&amp;show_faces=false&amp;width=75&amp;action=like&amp;colorscheme=light&amp;height=20&amp;ref=addtoany" scrolling="no" style="border:none;overflow:hidden;width:90px;height:21px"></iframe><!--<![endif]--><!--[if IE]><iframe
frameborder="0" allowTransparency="true" class="addtoany_special_service twitter_tweet" src="http://platform.twitter.com/widgets/tweet_button.html?url=http%3A%2F%2Fwerxltd.com%2Fwp%2F2010%2F10%2F18%2Fusing-punycode-to-access-non-latin-domains%2F&amp;counturl=http%3A%2F%2Fwerxltd.com%2Fwp%2F2010%2F10%2F18%2Fusing-punycode-to-access-non-latin-domains%2F&amp;count=none&amp;text=Using%20punycode%20to%20access%20non-Latin%20domains" scrolling="no" style="border:none;overflow:hidden;width:55px;height:20px"></iframe><![endif]--><!--[if !IE]><!--><iframe
class="addtoany_special_service twitter_tweet" src="http://platform.twitter.com/widgets/tweet_button.html?url=http%3A%2F%2Fwerxltd.com%2Fwp%2F2010%2F10%2F18%2Fusing-punycode-to-access-non-latin-domains%2F&amp;counturl=http%3A%2F%2Fwerxltd.com%2Fwp%2F2010%2F10%2F18%2Fusing-punycode-to-access-non-latin-domains%2F&amp;count=none&amp;text=Using%20punycode%20to%20access%20non-Latin%20domains" scrolling="no" style="border:none;overflow:hidden;width:55px;height:20px"></iframe><!--<![endif]--><!--[if IE]><iframe
frameborder="0" allowTransparency="true" class="addtoany_special_service google_plusone" src="https://plusone.google.com/u/0/_/%2B1/fastbutton?url=http%3A%2F%2Fwerxltd.com%2Fwp%2F2010%2F10%2F18%2Fusing-punycode-to-access-non-latin-domains%2F&amp;size=medium&amp;count=false" scrolling="no" style="border:none;overflow:hidden;width:32px;height:20px"></iframe><![endif]--><!--[if !IE]><!--><iframe
class="addtoany_special_service google_plusone" src="https://plusone.google.com/u/0/_/%2B1/fastbutton?url=http%3A%2F%2Fwerxltd.com%2Fwp%2F2010%2F10%2F18%2Fusing-punycode-to-access-non-latin-domains%2F&amp;size=medium&amp;count=false" scrolling="no" style="border:none;overflow:hidden;width:32px;height:20px"></iframe><!--<![endif]--><a
class="a2a_button_linkedin" href="http://www.addtoany.com/add_to/linkedin?linkurl=http%3A%2F%2Fwerxltd.com%2Fwp%2F2010%2F10%2F18%2Fusing-punycode-to-access-non-latin-domains%2F&amp;linkname=Using%20punycode%20to%20access%20non-Latin%20domains" title="LinkedIn" rel="nofollow" target="_blank"><img
src="http://werxltd.com/wp/wp-content/plugins/add-to-any/icons/linkedin.png?9d7bd4" width="16" height="16" alt="LinkedIn"/></a><a
class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwerxltd.com%2Fwp%2F2010%2F10%2F18%2Fusing-punycode-to-access-non-latin-domains%2F&amp;title=Using%20punycode%20to%20access%20non-Latin%20domains" id="wpa2a_20">Share/Save</a></p>]]></content:encoded> <wfw:commentRss>http://werxltd.com/wp/2010/10/18/using-punycode-to-access-non-latin-domains/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using apc
Page Caching using apc
Database Caching 2/47 queries in 0.172 seconds using apc
Object Caching 1340/1452 objects using apc

Served from: werxltd.com @ 2012-02-09 21:35:38 -->
