<?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; wes</title> <atom:link href="http://werxltd.com/wp/author/wes/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>Simple init.d script template</title><link>http://werxltd.com/wp/2012/01/05/simple-init-d-script-template/</link> <comments>http://werxltd.com/wp/2012/01/05/simple-init-d-script-template/#comments</comments> <pubDate>Thu, 05 Jan 2012 19:25:24 +0000</pubDate> <dc:creator>wes</dc:creator> <category><![CDATA[bash]]></category> <category><![CDATA[hosting]]></category> <category><![CDATA[administration]]></category> <category><![CDATA[daemon]]></category> <category><![CDATA[init.d]]></category> <category><![CDATA[script]]></category> <category><![CDATA[startup]]></category> <category><![CDATA[system]]></category><guid
isPermaLink="false">http://werxltd.com/wp/?p=1077</guid> <description><![CDATA[Recently I found the need to create an init.d script and since I had a hard time finding an example elsewhere1, here&#8217;s the overly simple script I came up with to get the job done: #!/bin/bash # myapp daemon # chkconfig: 345 20 80 # description: myapp daemon # processname: myapp DAEMON_PATH="/home/wes/Development/projects/myapp" DAEMON=myapp DAEMONOPTS="-my opts" [...]]]></description> <content:encoded><![CDATA[<p>Recently I found the need to create an init.d script and since I had a hard time finding an example elsewhere<sup><a
href="http://werxltd.com/wp/2012/01/05/simple-init-d-script-template/#footnote_0_1077" id="identifier_0_1077" class="footnote-link footnote-identifier-link" title="That said, if you know of such an example I&amp;#8217;d love to hear from you.">1</a></sup>, here&#8217;s the overly simple script I came up with to get the job done:</p><pre class="brush:bash">
#!/bin/bash
# myapp daemon
# chkconfig: 345 20 80
# description: myapp daemon
# processname: myapp

DAEMON_PATH="/home/wes/Development/projects/myapp"

DAEMON=myapp
DAEMONOPTS="-my opts"

NAME=myapp
DESC="My daemon description"
PIDFILE=/var/run/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME

case "$1" in
start)
	printf "%-50s" "Starting $NAME..."
	cd $DAEMON_PATH
	PID=`$DAEMON $DAEMONOPTS > /dev/null 2>&#038;1 &#038; echo $!`
	#echo "Saving PID" $PID " to " $PIDFILE
        if [ -z $PID ]; then
            printf "%s\n" "Fail"
        else
            echo $PID > $PIDFILE
            printf "%s\n" "Ok"
        fi
;;
status)
        printf "%-50s" "Checking $NAME..."
        if [ -f $PIDFILE ]; then
            PID=`cat $PIDFILE`
            if [ -z `ps axf | grep 5003 | grep -v grep` ]; then
                printf "%s\n" "Process dead but pidfile exists"
            else
                echo "Running"
            fi
        else
            printf "%s\n" "Service not running"
        fi
;;
stop)
        printf "%-50s" "Stopping $NAME"
            PID=`cat $PIDFILE`
            cd $DAEMON_PATH
        if [ -f $PIDFILE ]; then
            kill -HUP $PID
            printf "%s\n" "Ok"
            rm -rf $PIDFILE
        else
            printf "%s\n" "pidfile not found"
        fi
;;

restart)
  	$0 stop
  	$0 start
;;

*)
        echo "Usage: $0 {status|start|stop|restart}"
        exit 1
esac
</pre><p>This script will work in /etc/init.d on Xubuntu 11.10 (so most Debian-based systems) and CentOS 5.5 and you can control it via chkconfig.</p><div
class="betterrelated none"><p>No related content found.</p></div><ol
class="footnotes"><li
id="footnote_0_1077" class="footnote">That said, if you know of such an example I&#8217;d love to hear from you.</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%2F2012%2F01%2F05%2Fsimple-init-d-script-template%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%2F05%2Fsimple-init-d-script-template%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%2F05%2Fsimple-init-d-script-template%2F&amp;counturl=http%3A%2F%2Fwerxltd.com%2Fwp%2F2012%2F01%2F05%2Fsimple-init-d-script-template%2F&amp;count=none&amp;text=Simple%20init.d%20script%20template" 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%2F05%2Fsimple-init-d-script-template%2F&amp;counturl=http%3A%2F%2Fwerxltd.com%2Fwp%2F2012%2F01%2F05%2Fsimple-init-d-script-template%2F&amp;count=none&amp;text=Simple%20init.d%20script%20template" 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%2F05%2Fsimple-init-d-script-template%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%2F05%2Fsimple-init-d-script-template%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%2F05%2Fsimple-init-d-script-template%2F&amp;linkname=Simple%20init.d%20script%20template" 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%2F05%2Fsimple-init-d-script-template%2F&amp;title=Simple%20init.d%20script%20template" id="wpa2a_4">Share/Save</a></p>]]></content:encoded> <wfw:commentRss>http://werxltd.com/wp/2012/01/05/simple-init-d-script-template/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Hollywood vs the internet</title><link>http://werxltd.com/wp/2011/11/16/hollywood-vs-the-internet/</link> <comments>http://werxltd.com/wp/2011/11/16/hollywood-vs-the-internet/#comments</comments> <pubDate>Wed, 16 Nov 2011 22:00:53 +0000</pubDate> <dc:creator>wes</dc:creator> <category><![CDATA[it industry]]></category> <category><![CDATA[censorship]]></category> <category><![CDATA[copyright]]></category> <category><![CDATA[intellectual property]]></category><guid
isPermaLink="false">http://werxltd.com/wp/?p=1069</guid> <description><![CDATA[[HT Forbes] PROTECT IP Act Breaks The Internet from Fight for the Future on Vimeo. No related content found.]]></description> <content:encoded><![CDATA[<p>[HT <a
href="http://www.forbes.com/sites/jeffbercovici/2011/11/16/silicon-valley-vs-hollywood-in-battle-over-piracy/">Forbes</a>]</p><p><iframe
src="http://player.vimeo.com/video/31100268?byline=0&amp;portrait=0" width="400" height="225" frameborder="0" webkitAllowFullScreen allowFullScreen></iframe><p><a
href="http://vimeo.com/31100268">PROTECT IP Act Breaks The Internet</a> from <a
href="http://vimeo.com/fightforthefuture">Fight for the Future</a> on <a
href="http://vimeo.com">Vimeo</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%2F2011%2F11%2F16%2Fhollywood-vs-the-internet%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%2Fhollywood-vs-the-internet%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%2Fhollywood-vs-the-internet%2F&amp;counturl=http%3A%2F%2Fwerxltd.com%2Fwp%2F2011%2F11%2F16%2Fhollywood-vs-the-internet%2F&amp;count=none&amp;text=Hollywood%20vs%20the%20internet" 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%2Fhollywood-vs-the-internet%2F&amp;counturl=http%3A%2F%2Fwerxltd.com%2Fwp%2F2011%2F11%2F16%2Fhollywood-vs-the-internet%2F&amp;count=none&amp;text=Hollywood%20vs%20the%20internet" 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%2Fhollywood-vs-the-internet%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%2Fhollywood-vs-the-internet%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%2Fhollywood-vs-the-internet%2F&amp;linkname=Hollywood%20vs%20the%20internet" 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%2Fhollywood-vs-the-internet%2F&amp;title=Hollywood%20vs%20the%20internet" id="wpa2a_6">Share/Save</a></p>]]></content:encoded> <wfw:commentRss>http://werxltd.com/wp/2011/11/16/hollywood-vs-the-internet/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_8">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>Finding yesterday&#8217;s beginning and ending unix timestamp</title><link>http://werxltd.com/wp/2011/08/25/finding-yesterdays-beginning-and-ending-unix-timestamp/</link> <comments>http://werxltd.com/wp/2011/08/25/finding-yesterdays-beginning-and-ending-unix-timestamp/#comments</comments> <pubDate>Thu, 25 Aug 2011 20:03:58 +0000</pubDate> <dc:creator>wes</dc:creator> <category><![CDATA[python]]></category> <category><![CDATA[data]]></category> <category><![CDATA[data management]]></category> <category><![CDATA[database]]></category> <category><![CDATA[reports]]></category><guid
isPermaLink="false">http://werxltd.com/wp/?p=1047</guid> <description><![CDATA[When writing reports I&#8217;ve often come across the need to find the unix timestamp beginning and end of a day. Here is a Python snippet that does just that. yesterday = datetime.datetime.now() - datetime.timedelta(days = 1) yesterday_beginning = datetime.datetime(yesterday.year, yesterday.month, yesterday.day,0,0,0,0) yesterday_beginning_time = int(time.mktime(yesterday_beginning.timetuple())) yesterday_end = datetime.datetime(yesterday.year, yesterday.month, yesterday.day,23,59,59,999) yesterday_end_time = int(time.mktime(yesterday_end.timetuple())) print yesterday_beginning_time print [...]]]></description> <content:encoded><![CDATA[<p>When writing reports I&#8217;ve often come across the need to find the unix timestamp beginning and end of a day. Here is a Python snippet that does just that.</p><pre class="brush:python">
yesterday = datetime.datetime.now() - datetime.timedelta(days = 1)
yesterday_beginning = datetime.datetime(yesterday.year, yesterday.month, yesterday.day,0,0,0,0)
yesterday_beginning_time = int(time.mktime(yesterday_beginning.timetuple()))
yesterday_end = datetime.datetime(yesterday.year, yesterday.month, yesterday.day,23,59,59,999)
yesterday_end_time = int(time.mktime(yesterday_end.timetuple()))

print yesterday_beginning_time
print yesterday_end_time
</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%2F08%2F25%2Ffinding-yesterdays-beginning-and-ending-unix-timestamp%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%2F08%2F25%2Ffinding-yesterdays-beginning-and-ending-unix-timestamp%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%2F08%2F25%2Ffinding-yesterdays-beginning-and-ending-unix-timestamp%2F&amp;counturl=http%3A%2F%2Fwerxltd.com%2Fwp%2F2011%2F08%2F25%2Ffinding-yesterdays-beginning-and-ending-unix-timestamp%2F&amp;count=none&amp;text=Finding%20yesterday%26%238217%3Bs%20beginning%20and%20ending%20unix%20timestamp" 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%2F08%2F25%2Ffinding-yesterdays-beginning-and-ending-unix-timestamp%2F&amp;counturl=http%3A%2F%2Fwerxltd.com%2Fwp%2F2011%2F08%2F25%2Ffinding-yesterdays-beginning-and-ending-unix-timestamp%2F&amp;count=none&amp;text=Finding%20yesterday%26%238217%3Bs%20beginning%20and%20ending%20unix%20timestamp" 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%2F08%2F25%2Ffinding-yesterdays-beginning-and-ending-unix-timestamp%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%2F08%2F25%2Ffinding-yesterdays-beginning-and-ending-unix-timestamp%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%2F08%2F25%2Ffinding-yesterdays-beginning-and-ending-unix-timestamp%2F&amp;linkname=Finding%20yesterday%26%238217%3Bs%20beginning%20and%20ending%20unix%20timestamp" 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%2F08%2F25%2Ffinding-yesterdays-beginning-and-ending-unix-timestamp%2F&amp;title=Finding%20yesterday%26%238217%3Bs%20beginning%20and%20ending%20unix%20timestamp" id="wpa2a_10">Share/Save</a></p>]]></content:encoded> <wfw:commentRss>http://werxltd.com/wp/2011/08/25/finding-yesterdays-beginning-and-ending-unix-timestamp/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>MongoDB script to check the status of background index builds</title><link>http://werxltd.com/wp/2011/08/21/mongodb-script-to-check-the-status-of-background-index-builds/</link> <comments>http://werxltd.com/wp/2011/08/21/mongodb-script-to-check-the-status-of-background-index-builds/#comments</comments> <pubDate>Sun, 21 Aug 2011 13:55:04 +0000</pubDate> <dc:creator>wes</dc:creator> <category><![CDATA[hosting]]></category> <category><![CDATA[administration]]></category> <category><![CDATA[background]]></category> <category><![CDATA[big data]]></category> <category><![CDATA[mongodb]]></category> <category><![CDATA[nosql]]></category><guid
isPermaLink="false">http://werxltd.com/wp/?p=1044</guid> <description><![CDATA[Here is a simple script I&#8217;ve found to be quite helpful for monitoring the status of background index builds across shards on a system: var currentOps = db.currentOp(); if(!currentOps.inprog &#124;&#124; currentOps.inprog.length < 1) { print("No operations in progress"); } else { for(o in currentOps.inprog) { var op = currentOps.inprog[o]; if(op.msg &#038;&#038; op.msg.match(/bg index build/)) { [...]]]></description> <content:encoded><![CDATA[<p>Here is a simple script I&#8217;ve found to be quite helpful for monitoring the status of background index builds across shards on a system:</p><pre class="brush:javascript">
var currentOps = db.currentOp();

if(!currentOps.inprog || currentOps.inprog.length < 1) {
    print("No operations in progress");
} else {
    for(o in currentOps.inprog) {
        var op = currentOps.inprog[o];
        if(op.msg &#038;&#038; op.msg.match(/bg index build/)) {
            print(op.opid+' - '+op.msg);
        }
    }
}
</pre><p>Here's the output:</p><pre class="brush:bash">
$ mongo mycluster:30000/mydb bgIndexBuildStatus.js
MongoDB shell version: 1.8.1
connecting to: mycluster:30000/mydb
shard0000:343812263 - bg index build 122042652/165365928 73%
shard0001:355224633 - bg index build 111732254/165568168 67%
</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%2F08%2F21%2Fmongodb-script-to-check-the-status-of-background-index-builds%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%2F08%2F21%2Fmongodb-script-to-check-the-status-of-background-index-builds%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%2F08%2F21%2Fmongodb-script-to-check-the-status-of-background-index-builds%2F&amp;counturl=http%3A%2F%2Fwerxltd.com%2Fwp%2F2011%2F08%2F21%2Fmongodb-script-to-check-the-status-of-background-index-builds%2F&amp;count=none&amp;text=MongoDB%20script%20to%20check%20the%20status%20of%20background%20index%20builds" 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%2F08%2F21%2Fmongodb-script-to-check-the-status-of-background-index-builds%2F&amp;counturl=http%3A%2F%2Fwerxltd.com%2Fwp%2F2011%2F08%2F21%2Fmongodb-script-to-check-the-status-of-background-index-builds%2F&amp;count=none&amp;text=MongoDB%20script%20to%20check%20the%20status%20of%20background%20index%20builds" 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%2F08%2F21%2Fmongodb-script-to-check-the-status-of-background-index-builds%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%2F08%2F21%2Fmongodb-script-to-check-the-status-of-background-index-builds%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%2F08%2F21%2Fmongodb-script-to-check-the-status-of-background-index-builds%2F&amp;linkname=MongoDB%20script%20to%20check%20the%20status%20of%20background%20index%20builds" 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%2F08%2F21%2Fmongodb-script-to-check-the-status-of-background-index-builds%2F&amp;title=MongoDB%20script%20to%20check%20the%20status%20of%20background%20index%20builds" id="wpa2a_12">Share/Save</a></p>]]></content:encoded> <wfw:commentRss>http://werxltd.com/wp/2011/08/21/mongodb-script-to-check-the-status-of-background-index-builds/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Coffee: The Greatest Addiction Ever</title><link>http://werxltd.com/wp/2011/06/23/coffee-the-greatest-addiction-ever/</link> <comments>http://werxltd.com/wp/2011/06/23/coffee-the-greatest-addiction-ever/#comments</comments> <pubDate>Thu, 23 Jun 2011 13:17:11 +0000</pubDate> <dc:creator>wes</dc:creator> <category><![CDATA[general]]></category> <category><![CDATA[coffee]]></category> <category><![CDATA[drugs]]></category><guid
isPermaLink="false">http://werxltd.com/wp/?p=1025</guid> <description><![CDATA[No related content found.]]></description> <content:encoded><![CDATA[<p><iframe
width="560" height="349" src="http://www.youtube.com/embed/OTVE5iPMKLg" frameborder="0" allowfullscreen></iframe></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%2F06%2F23%2Fcoffee-the-greatest-addiction-ever%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%2F06%2F23%2Fcoffee-the-greatest-addiction-ever%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%2F06%2F23%2Fcoffee-the-greatest-addiction-ever%2F&amp;counturl=http%3A%2F%2Fwerxltd.com%2Fwp%2F2011%2F06%2F23%2Fcoffee-the-greatest-addiction-ever%2F&amp;count=none&amp;text=Coffee%3A%20The%20Greatest%20Addiction%20Ever" 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%2F06%2F23%2Fcoffee-the-greatest-addiction-ever%2F&amp;counturl=http%3A%2F%2Fwerxltd.com%2Fwp%2F2011%2F06%2F23%2Fcoffee-the-greatest-addiction-ever%2F&amp;count=none&amp;text=Coffee%3A%20The%20Greatest%20Addiction%20Ever" 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%2F06%2F23%2Fcoffee-the-greatest-addiction-ever%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%2F06%2F23%2Fcoffee-the-greatest-addiction-ever%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%2F06%2F23%2Fcoffee-the-greatest-addiction-ever%2F&amp;linkname=Coffee%3A%20The%20Greatest%20Addiction%20Ever" 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%2F06%2F23%2Fcoffee-the-greatest-addiction-ever%2F&amp;title=Coffee%3A%20The%20Greatest%20Addiction%20Ever" id="wpa2a_14">Share/Save</a></p>]]></content:encoded> <wfw:commentRss>http://werxltd.com/wp/2011/06/23/coffee-the-greatest-addiction-ever/feed/</wfw:commentRss> <slash:comments>3</slash:comments> </item> <item><title>How Intellectual Property Hampers the Free Market</title><link>http://werxltd.com/wp/2011/06/21/how-intellectual-property-hampers-the-free-market/</link> <comments>http://werxltd.com/wp/2011/06/21/how-intellectual-property-hampers-the-free-market/#comments</comments> <pubDate>Tue, 21 Jun 2011 12:00:50 +0000</pubDate> <dc:creator>wes</dc:creator> <category><![CDATA[it industry]]></category> <category><![CDATA[security]]></category> <category><![CDATA[copyright]]></category> <category><![CDATA[economics]]></category> <category><![CDATA[economy]]></category> <category><![CDATA[intellectual property]]></category> <category><![CDATA[licensing]]></category> <category><![CDATA[open source]]></category><guid
isPermaLink="false">http://werxltd.com/wp/?p=1011</guid> <description><![CDATA[[HT Mises Blog] No related content found.]]></description> <content:encoded><![CDATA[<p>[HT <a
href="http://feeds.mises.org/~r/MisesBlog/~3/dtjDTzRpIFo/">Mises Blog</a>]</p><p><iframe
width="640" height="390" src="http://www.youtube.com/embed/cWShFz4d2RY" frameborder="0" allowfullscreen></iframe></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%2F06%2F21%2Fhow-intellectual-property-hampers-the-free-market%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%2F06%2F21%2Fhow-intellectual-property-hampers-the-free-market%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%2F06%2F21%2Fhow-intellectual-property-hampers-the-free-market%2F&amp;counturl=http%3A%2F%2Fwerxltd.com%2Fwp%2F2011%2F06%2F21%2Fhow-intellectual-property-hampers-the-free-market%2F&amp;count=none&amp;text=How%20Intellectual%20Property%20Hampers%20the%20Free%20Market" 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%2F06%2F21%2Fhow-intellectual-property-hampers-the-free-market%2F&amp;counturl=http%3A%2F%2Fwerxltd.com%2Fwp%2F2011%2F06%2F21%2Fhow-intellectual-property-hampers-the-free-market%2F&amp;count=none&amp;text=How%20Intellectual%20Property%20Hampers%20the%20Free%20Market" 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%2F06%2F21%2Fhow-intellectual-property-hampers-the-free-market%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%2F06%2F21%2Fhow-intellectual-property-hampers-the-free-market%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%2F06%2F21%2Fhow-intellectual-property-hampers-the-free-market%2F&amp;linkname=How%20Intellectual%20Property%20Hampers%20the%20Free%20Market" 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%2F06%2F21%2Fhow-intellectual-property-hampers-the-free-market%2F&amp;title=How%20Intellectual%20Property%20Hampers%20the%20Free%20Market" id="wpa2a_16">Share/Save</a></p>]]></content:encoded> <wfw:commentRss>http://werxltd.com/wp/2011/06/21/how-intellectual-property-hampers-the-free-market/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Open-source blueprint for civilization</title><link>http://werxltd.com/wp/2011/06/18/open-source-blueprint-for-civilization/</link> <comments>http://werxltd.com/wp/2011/06/18/open-source-blueprint-for-civilization/#comments</comments> <pubDate>Sat, 18 Jun 2011 15:48:23 +0000</pubDate> <dc:creator>wes</dc:creator> <category><![CDATA[hardware development]]></category> <category><![CDATA[it industry]]></category> <category><![CDATA[culture]]></category> <category><![CDATA[hardware]]></category> <category><![CDATA[open source]]></category> <category><![CDATA[sustainability]]></category> <category><![CDATA[technology]]></category><guid
isPermaLink="false">http://werxltd.com/wp/?p=1019</guid> <description><![CDATA[[HT Mises Blog] No related content found.]]></description> <content:encoded><![CDATA[<p>[HT <a
href="http://feeds.mises.org/~r/MisesBlog/~3/JnYajaSHHIk/">Mises Blog</a>]</p><p><object
width="512" height="288"><param
name="movie" value="http://www.hulu.com/embed/71-Z_HGC1UFQFJPZpd8hPQ"></param><param
name="allowFullScreen" value="true"></param><embed
src="http://www.hulu.com/embed/71-Z_HGC1UFQFJPZpd8hPQ" type="application/x-shockwave-flash"  width="512" height="288" allowFullScreen="true"></embed></object></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%2F06%2F18%2Fopen-source-blueprint-for-civilization%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%2F06%2F18%2Fopen-source-blueprint-for-civilization%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%2F06%2F18%2Fopen-source-blueprint-for-civilization%2F&amp;counturl=http%3A%2F%2Fwerxltd.com%2Fwp%2F2011%2F06%2F18%2Fopen-source-blueprint-for-civilization%2F&amp;count=none&amp;text=Open-source%20blueprint%20for%20civilization" 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%2F06%2F18%2Fopen-source-blueprint-for-civilization%2F&amp;counturl=http%3A%2F%2Fwerxltd.com%2Fwp%2F2011%2F06%2F18%2Fopen-source-blueprint-for-civilization%2F&amp;count=none&amp;text=Open-source%20blueprint%20for%20civilization" 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%2F06%2F18%2Fopen-source-blueprint-for-civilization%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%2F06%2F18%2Fopen-source-blueprint-for-civilization%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%2F06%2F18%2Fopen-source-blueprint-for-civilization%2F&amp;linkname=Open-source%20blueprint%20for%20civilization" 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%2F06%2F18%2Fopen-source-blueprint-for-civilization%2F&amp;title=Open-source%20blueprint%20for%20civilization" id="wpa2a_18">Share/Save</a></p>]]></content:encoded> <wfw:commentRss>http://werxltd.com/wp/2011/06/18/open-source-blueprint-for-civilization/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Check an array for all null values</title><link>http://werxltd.com/wp/2011/06/13/check-an-array-for-all-null-values/</link> <comments>http://werxltd.com/wp/2011/06/13/check-an-array-for-all-null-values/#comments</comments> <pubDate>Mon, 13 Jun 2011 20:38:00 +0000</pubDate> <dc:creator>wes</dc:creator> <category><![CDATA[php]]></category> <category><![CDATA[software development]]></category> <category><![CDATA[function]]></category> <category><![CDATA[null]]></category> <category><![CDATA[utility]]></category><guid
isPermaLink="false">http://werxltd.com/wp/?p=978</guid> <description><![CDATA[Here is a simple function to check an array to see if it contains all null values. function allNulls($arr) { if(is_array($arr) &#038;&#038; count(array_diff($arr, array(null))) == 0) { return true; } return false; } echo (allNulls(array(null,null,null)) ? "true" : "false") . PHP_EOL; echo (allNulls(array(null,1,null)) ? "true" : "false") . PHP_EOL; echo (allNulls(array("test",null,null)) ? "true" : "false") [...]]]></description> <content:encoded><![CDATA[<p>Here is a simple function to check an array to see if it contains all null values.</p><pre class="brush:php">
function allNulls($arr) {
    if(is_array($arr) &#038;&#038; count(array_diff($arr, array(null))) == 0) {
            return true;
    }

    return false;
}

echo (allNulls(array(null,null,null)) ? "true" : "false") . PHP_EOL;
echo (allNulls(array(null,1,null)) ? "true" : "false") . PHP_EOL;
echo (allNulls(array("test",null,null)) ? "true" : "false") . PHP_EOL;
echo (allNulls(array("",null,null)) ? "true" : "false") . PHP_EOL;
echo (allNulls(array(0,null,null)) ? "true" : "false") . PHP_EOL;
</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%2F06%2F13%2Fcheck-an-array-for-all-null-values%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%2F06%2F13%2Fcheck-an-array-for-all-null-values%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%2F06%2F13%2Fcheck-an-array-for-all-null-values%2F&amp;counturl=http%3A%2F%2Fwerxltd.com%2Fwp%2F2011%2F06%2F13%2Fcheck-an-array-for-all-null-values%2F&amp;count=none&amp;text=Check%20an%20array%20for%20all%20null%20values" 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%2F06%2F13%2Fcheck-an-array-for-all-null-values%2F&amp;counturl=http%3A%2F%2Fwerxltd.com%2Fwp%2F2011%2F06%2F13%2Fcheck-an-array-for-all-null-values%2F&amp;count=none&amp;text=Check%20an%20array%20for%20all%20null%20values" 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%2F06%2F13%2Fcheck-an-array-for-all-null-values%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%2F06%2F13%2Fcheck-an-array-for-all-null-values%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%2F06%2F13%2Fcheck-an-array-for-all-null-values%2F&amp;linkname=Check%20an%20array%20for%20all%20null%20values" 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%2F06%2F13%2Fcheck-an-array-for-all-null-values%2F&amp;title=Check%20an%20array%20for%20all%20null%20values" id="wpa2a_20">Share/Save</a></p>]]></content:encoded> <wfw:commentRss>http://werxltd.com/wp/2011/06/13/check-an-array-for-all-null-values/feed/</wfw:commentRss> <slash:comments>0</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 1/43 queries in 0.448 seconds using apc
Object Caching 985/1104 objects using apc

Served from: werxltd.com @ 2012-02-08 14:04:14 -->
