<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns: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/" xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>The Nexus</title>
	
	<link>http://nexus.zteo.com</link>
	<description>Where Schtuff Happens</description>
	<lastBuildDate>Sat, 26 May 2012 07:10:36 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/TheNexus" /><feedburner:info uri="thenexus" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><creativeCommons:license>http://creativecommons.org/licenses/by-sa/3.0/</creativeCommons:license><image><link>http://creativecommons.org/licenses/by-sa/3.0/</link><url>http://creativecommons.org/images/public/somerights20.gif</url><title>Some Rights Reserved</title></image><feedburner:emailServiceId>TheNexus</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><item>
		<title>Second Life for Enterprise: Yup, it died</title>
		<link>http://feedproxy.google.com/~r/TheNexus/~3/gPfG6Az9y7w/</link>
		<comments>http://nexus.zteo.com/blog/2012/03/15/second-life-for-enterprise-yup-it-died/#comments</comments>
		<pubDate>Thu, 15 Mar 2012 23:21:40 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[opinion]]></category>
		<category><![CDATA[social]]></category>
		<category><![CDATA[secondlife]]></category>
		<category><![CDATA[socialnetworking]]></category>

		<guid isPermaLink="false">http://nexus.zteo.com/?p=3497</guid>
		<description><![CDATA[How Bad Was Second Life Enterprise? This is the first post in a series about Virtual Reality in an Enterprise environment. I expect to talk about more positive experiences in future posts but I need to start somewhere, so why not with what did not work for us? My (and my company&#8217;s) experience Second Life for Enterprise was a failure, [...]]]></description>
			<content:encoded><![CDATA[<p><div id="attachment_3498" class="wp-caption alignleft" style="width: 310px"><a href="http://slwtf.com/2008/05/22/unashamed-of-what-it-is/"><img src="http://nexus.zteo.com/files/2012/03/fujitsusiemens1-300x176.jpg" alt="" title="Alone" width="300" height="176" class="size-medium wp-image-3498" /></a><p class="wp-caption-text">Credit: slwtf.com</p></div>
<p>How Bad Was Second Life Enterprise?</p>
<p>This is the first post in a series about Virtual Reality in an Enterprise environment. I expect to talk about more positive experiences in future posts but I need to start somewhere, so why not with what did not work for us?</p>
<p><br style='clear:both' /></p>
<h2 id="myandmycompanysexperience">My (and my company&#8217;s) experience</h2>
<p>Second Life for Enterprise was a failure, in my case, for several reasons. Note that this experience is my own, maybe other beta users had a better one. Linden Labs announced the end of the experiment in August 2010.</p>
<p>Let&#8217;s see what really did not pan out despite the promises of the platform.</p>
<h2 id="idealconferencing--not.">Ideal conferencing &#8211; not.</h2>
<p>Features that would really have brought it closer to the ideal conferencing tool were still far in the future:</p>
<ol>
<li>Face capture and video feed embedded in avatar: this would allow other users to measure one&#8217;s state of mind through their facial expressions. We were sold on the idea through a cool video of Ashton Kutcher&#8217;s face mapped to this avatar&#8217;s &#8220;head&#8221; showing him interact with Second Life and expressing obvious delight at what he was seeing.</li>
<li>Seamless Office documents integration: what a leap in the future this would have been! The only alternative available when giving a presentation using Powerpoint was to take screenshots of every slide, convert them using suitable jpg settings, then map them as textures to wall surfaces in Second Life. Supposedly this painful exercise was about to become a thing of the past &#8220;anytime soon.&#8221;</li>
</ol>
<h2 id="notworththecost">Not worth the cost</h2>
<p>&#8220;cost&#8221; can be interpreted in &#8211; at least &#8211; two different ways, both of which apply here.</p>
<p>Firsly, the entry cost to simply be a part of the beta, was between $50,000 and $100,000. For the first year.</p>
<p>For that money, you would receive two servers and access to an online help desk. Tickets only.</p>
<p>Secondly, the ownership cost was just too high. So many prerequisites would pop up as we progressed through the setup process that I reached a point when I became quite convinced that the Linden people had never talked to anyone who works in a big company. I could not imagine a use case that their process would satisfy.</p>
<p>To wit:</p>
<ul>
<li>the customer did not have root access to their machines; that part I can understand. However, in order to perform simple configuration, I needed to be able to get our IT department to poke a hole for incoming SSH sessions in our firewall at the most random times. The Linden gremlins would then come in through this wall and type whatever one-liner was required.</li>
<li>software upgrades were performed by swapping the existing hard drives with new hard drives they sent in the mail. In order to perform the swap successfully, I needed to work with our IT guys to have unfettered access to the data center for two days. Alternately, I could ask for an IT guy&#8217;s time to be dedicated to this task for two days. The Linden people expected us to have someone continuously available to be on the phone with them as the upgrade went through. Note that, even if I did the upgrade myself, basic security rules require for IT personnel to be present in the data center at the same time as a non-IT person (me!) We originally thought this would be a non-issue as the tool was being marketed as a &#8220;turnkey&#8221; solution.</li>
<li>support tickets could go unanswered for days and in some instances weeks. After several weeks of this frustrating dance, I finally realized what was going on: they were using the same ticket system for both enterprise customers and public grid Second Life users. Now, I do not know what their triage policy was but considering the delays in getting any kind of reply, I suspect it was not what an enterprise customer would have expected.</li>
<li>I was not trying to do anything fancy; simply getting the servers up (which I eventually did) and run a few grids. Some of my basic questions left them dumbfounded. Questions I would have expected other beta testers to have asked as well.</li>
<li>No tool was available to automatically export our existing public grid area and import it to our private grid. Instead, we had to compile a full inventory of every single prim, mesh, texture, animation, etc., and send them this list along with proof that we had all the copyrights cleared for all of them. They would then, after an indefinite period of time, send us an archive containing, hopefully, our stuff. That&#8217;s when I started looking into the banned tools that some enterprising users had created to &#8220;steal&#8221; content and transfer it to OpenSim (or sometimes for quite shadier purposes)</li>
</ul>
<h2 id="irony">Irony</h2>
<p>An important aspect of owning our private grid was using it to provide training to our customers. We already had at least one major account asking for virtual training since it would allow us to train geographically dispersed technicians. We were also considering the potential for internal training and this was obviously the first direction we would have taken the grid&#8217;s design.</p>
<p>Unfortunately, educational tools such as (http://www.sloodle.org/moodle/)[SLoodle] were only available for OpenSim, the free and open-source competing virtual world package.</p>
<p>Worse, Linden Labs added a paragraph to their &#8220;leasing agreement&#8221; (I do not remember what it was called exactly) that stipulated that we could only use the grid internally, which meant keeping customers&#8217; employees off the grid. I talked to the salesperson about my concern with that clause and got verbal assurance that we would not have to worry about it. The agreement was not amended, though.</p>
<p><del datetime="2012-03-15T23:15:18+00:00">Un</del>fortunately, that&#8217;s when I decided that it was definitely &#8220;not worth it.&#8221;</p>
<h2 id="theaftermath">The aftermath</h2>
<p>It is now obvious that Linden Lab&#8217;s proverbial heart was never really in the whole endeavor. Unfortunately, this means that the technologies I listed earlier, such as real-time face capture and seamless office integration, were never deployed in the enterprise.</p>
<p>Instead, we spent time and resources attempting to set up a product that did not offer the minimum set of features that would have benefitted our company. The vendor, likely realizing that they had waded in quicksands they knew or cared little for, threw the towel not long after I had decided to cut our losses.</p>
<p>An interesting take away lesson here is that, had we gone with an open-source alternative, we would now be working with a product that&#8217;s more current, was not end-of-lifed and for which plenty of support is available. And the return on investment would be, in comparison, astronomical.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/TheNexus?a=gPfG6Az9y7w:xSiDo_jl0E0:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/TheNexus?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/TheNexus?a=gPfG6Az9y7w:xSiDo_jl0E0:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/TheNexus?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/TheNexus?a=gPfG6Az9y7w:xSiDo_jl0E0:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/TheNexus?i=gPfG6Az9y7w:xSiDo_jl0E0:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/TheNexus?a=gPfG6Az9y7w:xSiDo_jl0E0:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/TheNexus?d=qj6IDK7rITs" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/TheNexus/~4/gPfG6Az9y7w" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://nexus.zteo.com/blog/2012/03/15/second-life-for-enterprise-yup-it-died/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://nexus.zteo.com/blog/2012/03/15/second-life-for-enterprise-yup-it-died/</feedburner:origLink></item>
		<item>
		<title>Install Parallel Tools in Arch/Chakra Linux</title>
		<link>http://feedproxy.google.com/~r/TheNexus/~3/_zPOHfNwE9A/</link>
		<comments>http://nexus.zteo.com/blog/2012/02/12/install-parallel-tools-in-archchakra-linux/#comments</comments>
		<pubDate>Mon, 13 Feb 2012 04:08:14 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://nexus.zteo.com/?p=3486</guid>
		<description><![CDATA[As niche posts go, I think this one may take the cake since it is about my experience installing Parallel 7&#8242;s tools in a Chakra Linux guest (of the venerable Arch family) Let me begin with pointing out that there are no Parallel Tools for Arch/Chakra but you can still make this work. What you need Parallels 7 Chakra Linux [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://nexus.zteo.com/files/2012/02/chakra-project.jpg" alt="" title="chakra-project" width="240" height="210" class="alignleft size-full wp-image-3491" />As niche posts go, I think this one may take the cake since it is about my experience installing Parallel 7&#8242;s tools in a Chakra Linux guest (of the venerable Arch family)</p>
<p>Let me begin with pointing out that there are no Parallel Tools for Arch/Chakra but you can still make this work.<br />
<br style='clear:both' /><br />
<strong>What you need</strong></p>
<ul>
<li>Parallels 7</li>
<li>Chakra Linux</li>
<li>Kernel 3.2</li>
</ul>
<p><strong>Let&#8217;s do this</strong></p>
<p>1. On your host, select <span class="cfrbreadcrumb">Install Parallel Tools</span></p>
<p>2. Shell time! You may first need to mount Parallel Tools manually.</p>

<div class="wp_codebox"><table><tr id="p34864"><td class="code" id="p3486code4"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">su</span>
<span style="color: #c20cb9; font-weight: bold;">mount</span> <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>cdrom <span style="color: #000000; font-weight: bold;">/</span>mnt</pre></td></tr></table></div>

<p>3. Let&#8217;s make a copy of the tools and patch it for kernel 3.2.</p>

<div class="wp_codebox"><table><tr id="p34865"><td class="code" id="p3486code5"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #660033;">-p</span> ~<span style="color: #000000; font-weight: bold;">/</span>Tmp<span style="color: #000000; font-weight: bold;">/</span>PT
<span style="color: #7a0874; font-weight: bold;">cd</span> ~<span style="color: #000000; font-weight: bold;">/</span>Tmp<span style="color: #000000; font-weight: bold;">/</span>PT
<span style="color: #c20cb9; font-weight: bold;">cp</span> <span style="color: #660033;">-r</span> <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/*</span> .
<span style="color: #7a0874; font-weight: bold;">cd</span> kmods
<span style="color: #c20cb9; font-weight: bold;">tar</span> zxvf prl_mod.tar.gz
<span style="color: #c20cb9; font-weight: bold;">vi</span> prl_eth<span style="color: #000000; font-weight: bold;">/</span>pvmnet<span style="color: #000000; font-weight: bold;">/</span>pvmnet.c
Replace .ndo_set_multicast_list with .ndo_set_rx_mode
<span style="color: #c20cb9; font-weight: bold;">tar</span> zcvf prl_mod.tar.gz prl_eth prl_fs prl_fs_freeze prl_pv prl_tg dkms.conf Makefile.kmods</pre></td></tr></table></div>

<p>4. And finally, let&#8217;s run the installer (cross your fingers!)</p>

<div class="wp_codebox"><table><tr id="p34866"><td class="code" id="p3486code6"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> ..
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">def_sysconfdir</span>=<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>rc.d
.<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">install</span></pre></td></tr></table></div>

<p>You may or may not have to set correct the resolution in <strong>/etc/X11/xorg.conf</strong>. Personally I added &#8220;1920&#215;1080&#8243; logged out, logged back in&#8230;it just worked.</p>
<p>Note that all the host&#8217;s shares can be found in <strong>/media/psf/</strong></p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/TheNexus?a=_zPOHfNwE9A:X695tr7iBBQ:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/TheNexus?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/TheNexus?a=_zPOHfNwE9A:X695tr7iBBQ:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/TheNexus?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/TheNexus?a=_zPOHfNwE9A:X695tr7iBBQ:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/TheNexus?i=_zPOHfNwE9A:X695tr7iBBQ:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/TheNexus?a=_zPOHfNwE9A:X695tr7iBBQ:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/TheNexus?d=qj6IDK7rITs" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/TheNexus/~4/_zPOHfNwE9A" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://nexus.zteo.com/blog/2012/02/12/install-parallel-tools-in-archchakra-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://nexus.zteo.com/blog/2012/02/12/install-parallel-tools-in-archchakra-linux/</feedburner:origLink></item>
		<item>
		<title>DEVONthink: MarkDown to Viewer</title>
		<link>http://feedproxy.google.com/~r/TheNexus/~3/P1pktOngBNc/</link>
		<comments>http://nexus.zteo.com/blog/2012/01/19/devonthink-markdown-to-viewer/#comments</comments>
		<pubDate>Thu, 19 Jan 2012 22:43:42 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[hacks]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[software]]></category>

		<guid isPermaLink="false">http://nexus.zteo.com/?p=3434</guid>
		<description><![CDATA[Like many other DEVONthink users, I have started to feel regret that MarkDown is not natively supported. Now, a piece of good news is that, as long as you edit a plain-text document in DT, you are, in effect, editing a potential MarkDown document. In the past, it was possible to open a DT document in an application such as [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://nexus.zteo.com/files/2012/01/DateLine.jpg" alt="" title="DEVONthink Marked" width="231" height="134" class="alignleft size-full wp-image-3440" /><br />
Like many other DEVONthink users, I have started to feel regret that MarkDown is not natively supported.<br />
Now, a piece of good news is that, as long as you edit a plain-text document in DT, you are, in effect, editing a potential MarkDown document.<br />
In the past, it was possible to open a DT document in an application such as the excellent Marked.app. <a href="http://support.markedapp.com/discussions/problems/30-marked-no-longer-appears-in-open-with-context-menu">But it is not any longer</a>. I totally understand the author&#8217;s argument: as a pure viewer, it feels wrong for an application to register as an editor.</p>
<p>So, here is my solution:</p>
<p>Create a short script</p>

<div class="wp_codebox"><table><tr id="p34348"><td class="code" id="p3434code8"><pre class="applescript" style="font-family:monospace;"><span style="color: #ff0033; font-weight: bold;">tell</span> <span style="color: #0066ff;">application</span> <span style="color: #0066ff;">id</span> <span style="color: #009900;">&quot;com.devon-technologies.thinkpro2&quot;</span>
	<span style="color: #ff0033; font-weight: bold;">set</span> docInfo <span style="color: #ff0033; font-weight: bold;">to</span> <span style="color: #ff0033;">the</span> <span style="color: #0066ff;">content</span> record
	<span style="color: #ff0033; font-weight: bold;">set</span> docPath <span style="color: #ff0033; font-weight: bold;">to</span> <span style="color: #ff0033; font-weight: bold;">get</span> <span style="color: #ff0033;">the</span> path <span style="color: #ff0033; font-weight: bold;">of</span> docInfo
	<span style="color: #ff0033; font-weight: bold;">tell</span> <span style="color: #0066ff;">application</span> <span style="color: #009900;">&quot;Marked&quot;</span>
		<span style="color: #0066ff;">activate</span>
		<span style="color: #0066ff;">open</span> docPath
	<span style="color: #ff0033; font-weight: bold;">end</span> <span style="color: #ff0033; font-weight: bold;">tell</span>
<span style="color: #ff0033; font-weight: bold;">end</span> <span style="color: #ff0033; font-weight: bold;">tell</span></pre></td></tr></table></div>

<p>Save this script as <em><your home directory>/Application\ Support/DEVONthink\ Pro\ 2/Scripts/DTInMarkdown.scpt</em><br />
Note: your actual DEVONthink folder name may differ based on which version you are using.</p>
<p>In DT, select <span class="cfrbreadcrumb">Script menu (icon)</span><span class="cfrbreadcrumb">Update Scripts Menu</span>: you should now see your new script.</p>
<p>From the System Menu, open <span class="cfrbreadcrumb">System Preferences&#8230;</span> then:<br />
<span class="cfrbreadcrumb">Keyboard</span><span class="cfrbreadcrumb">Keyboard Shortcuts</span><span class="cfrbreadcrumb">Application Shortcuts</span></p>
<p>Create a new entry for DEVONthink Pro (or DEVONthink Pro Office); enter Menu Title: <em>DTInMarkdown</em> and enter a keyboard shortcut. I personally use <strong>Cmd+Shift+Return</strong>.</p>
<p>Now, next time you are editing a plain text/MarkDown document in DT, that keyboard shortcut should open the document in Marked.app for instant preview. Note that the preview is updated every time you save your document.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/TheNexus?a=P1pktOngBNc:g0rbiN0Zifc:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/TheNexus?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/TheNexus?a=P1pktOngBNc:g0rbiN0Zifc:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/TheNexus?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/TheNexus?a=P1pktOngBNc:g0rbiN0Zifc:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/TheNexus?i=P1pktOngBNc:g0rbiN0Zifc:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/TheNexus?a=P1pktOngBNc:g0rbiN0Zifc:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/TheNexus?d=qj6IDK7rITs" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/TheNexus/~4/P1pktOngBNc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://nexus.zteo.com/blog/2012/01/19/devonthink-markdown-to-viewer/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://nexus.zteo.com/blog/2012/01/19/devonthink-markdown-to-viewer/</feedburner:origLink></item>
		<item>
		<title>Bad SEO: today, picking on strategiesreferencement.com</title>
		<link>http://feedproxy.google.com/~r/TheNexus/~3/C3yonTo6QKM/</link>
		<comments>http://nexus.zteo.com/blog/2012/01/06/bad-seo-today-picking-on-strategiesreferencement-com/#comments</comments>
		<pubDate>Fri, 06 Jan 2012 08:29:41 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[business]]></category>
		<category><![CDATA[opinion]]></category>

		<guid isPermaLink="false">http://nexus.zteo.com/?p=3426</guid>
		<description><![CDATA[Note: I contacted Manon (whose last name shall be withheld) for comments but, ironically for someone so eager, she has not replied. < rant alert! > Like many of us who own somewhat traffic-friendly websites, my inbox has filled regularly with unsolicited SEO-related emails. Of course, these offers are worthless. They will only get you links in traffic farms, which [...]]]></description>
			<content:encoded><![CDATA[<p><div id="attachment_3430" class="wp-caption alignleft" style="width: 310px"><a href="http://www.flickr.com/photos/atelier_tee/392536206/"><img src="http://nexus.zteo.com/files/2012/01/392536206_2a8ffa9d97-300x201.jpg" alt="" title="Clown Car" width="300" height="201" class="size-medium wp-image-3430" /></a><p class="wp-caption-text">Atelier Teee</p></div><em>Note: I contacted Manon (whose last name shall be withheld) for comments but, ironically for someone so eager, she has not replied.</em></p>
<p>< rant alert! ><br />
Like many of us who own somewhat traffic-friendly websites, my inbox has filled regularly with unsolicited SEO-related emails.<br />
Of course, these offers are worthless. They will only get you links in traffic farms, which Google has learnt long ago to carefully avoid.<br />
Due to this game of cat-and-mouse between these SEO companies and Google, they have been desperate to find new venues as well as new customers and that&#8217;s how I end up receiving the weirdest solicitations.</p>
<p>The latest funny comes from Manon, who works for strategiesreferencement.com, a french SEO outfit.<br />
She sent me an email offering improved ranking for boyunderwear.clicdev.com. If you visit that website, you will see that it&#8217;s one of the tends of thousands of sites hosted by ClicDev (which I own) and that said site was suspended long ago for being a spam site, of all things.</p>
<p>I really wonder what, of the multitude of sites hosted by ClicDev, prompted such enthusiasm for one that sounds like it would host &#8220;tasteful pictures of young boys.&#8221;</p>
<p>Please note: not all SEO companies are run like clown cars. If you go with the right guys, you sites will  likely enjoy a nice ranking bump.</p>
<p>Who are the right companies, then? I would say:
<ul>
<li>the ones that come recommended by existing customers</li>
<li>and who never sent you unsolicited emails</li>
</ul>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/TheNexus?a=C3yonTo6QKM:-WMS7qMSKeE:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/TheNexus?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/TheNexus?a=C3yonTo6QKM:-WMS7qMSKeE:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/TheNexus?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/TheNexus?a=C3yonTo6QKM:-WMS7qMSKeE:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/TheNexus?i=C3yonTo6QKM:-WMS7qMSKeE:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/TheNexus?a=C3yonTo6QKM:-WMS7qMSKeE:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/TheNexus?d=qj6IDK7rITs" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/TheNexus/~4/C3yonTo6QKM" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://nexus.zteo.com/blog/2012/01/06/bad-seo-today-picking-on-strategiesreferencement-com/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://nexus.zteo.com/blog/2012/01/06/bad-seo-today-picking-on-strategiesreferencement-com/</feedburner:origLink></item>
		<item>
		<title>Delicious4Shelves</title>
		<link>http://feedproxy.google.com/~r/TheNexus/~3/RUUBItXNZIQ/</link>
		<comments>http://nexus.zteo.com/blog/2012/01/02/delicious4shelves/#comments</comments>
		<pubDate>Mon, 02 Jan 2012 10:38:50 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[software]]></category>

		<guid isPermaLink="false">http://nexus.zteo.com/?p=3420</guid>
		<description><![CDATA[I like things neatly organized. I absolutely hate the idea that I could buy a book I already own. So, it&#8217;s not surprise that, as a Mac user, I trust Delicious Library to keep tracks of my books, DVS and video games. As an Android user, I also like that Shelves even exists. After all, it is mostly when I [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://nexus.zteo.com/files/2012/01/delicious4shelvesicon.png" alt="" title="Delicious 4 Shelves" width="124" height="124" class="alignleft size-full wp-image-3424" /><br />
I like things neatly organized. I absolutely hate the idea that I could buy a book I already own. So, it&#8217;s not surprise that, as a Mac user, I trust <a href="http://www.delicious-monster.com/">Delicious Library</a> to keep tracks of my books, DVS and video games.<br />
As an Android user, I also like that <a href="http://www.shelvesforandroid.com/">Shelves</a> even exists. After all, it is mostly when I am walking the aisles of Barnes &#038; Noble that I am the most susceptible to wonder whether I already own a given book &#8212; although Amazon may eventually lure me away from that experience &#8212; and if that information is only available on my Mac happily waiting for my return back home, it&#8217;s not very helpful to me. Therefore, Shelves is my saviour.</p>
<p>Unfortunately, keeping Shelves updated with Delicious Library&#8217;s information is too involved a process: select export, check all the correct variables, select separators, rename the exported file, etc. This is not a good process for the procrastinator in me.</p>
<p>So, I wrote a small application &#8212; a compiled Apple Script really &#8212; that queries Delicious Library&#8217;s database and exports the relevant information to a file placed on my desktop. This file is already called &#8216;Delicious_Library_Books.txt&#8217; and I only need to copy it to my phone and re-import it every time I add new books to my collection.</p>
<p>I could of course work on it some more to, for instance, handle other types of collections, but it fits my needs as is. If there is a request for a more complete script, I may modify it accordingly.</p>
<p>In the meantime, if you think it could help you, you are welcome to download it!</p>
<a href="http://nexus.zteo.com/download/17"><img src="http://nexus.zteo.com/wp-content/plugins/download-monitor/img/download.gif" /></a>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/TheNexus?a=RUUBItXNZIQ:y2MUfEn1hp0:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/TheNexus?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/TheNexus?a=RUUBItXNZIQ:y2MUfEn1hp0:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/TheNexus?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/TheNexus?a=RUUBItXNZIQ:y2MUfEn1hp0:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/TheNexus?i=RUUBItXNZIQ:y2MUfEn1hp0:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/TheNexus?a=RUUBItXNZIQ:y2MUfEn1hp0:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/TheNexus?d=qj6IDK7rITs" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/TheNexus/~4/RUUBItXNZIQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://nexus.zteo.com/blog/2012/01/02/delicious4shelves/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://nexus.zteo.com/blog/2012/01/02/delicious4shelves/</feedburner:origLink></item>
		<item>
		<title>Android: self-contained “libraries,” seamless component persistence</title>
		<link>http://feedproxy.google.com/~r/TheNexus/~3/o2CjIoWFYuU/</link>
		<comments>http://nexus.zteo.com/blog/2011/12/31/android-self-contained-libraries-seamless-component-persistence/#comments</comments>
		<pubDate>Sat, 31 Dec 2011 09:33:02 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Android]]></category>

		<guid isPermaLink="false">http://nexus.zteo.com/?p=3414</guid>
		<description><![CDATA[Hello. Today, I am going to write about persisting a component&#8217;s values simply, using a hidden dialog; and how to turn a set of classes and assets into a &#8220;library&#8221; that other developers will not need to refactor prior to using it. A few months ago, needing an Android widget that would let me select values &#8220;naturally&#8221; using one or [...]]]></description>
			<content:encoded><![CDATA[<p><div id="attachment_3415" class="wp-caption alignleft" style="width: 310px"><a href="http://www.flickr.com/photos/tamaki/1402365/"><img src="http://nexus.zteo.com/files/2011/12/1402365_aa34336932_z-300x225.jpg" alt="" title="Slider by Yamanaka Tamaki" width="300" height="225" class="size-medium wp-image-3415" /></a><p class="wp-caption-text">Slider by Yamanaka Tamaki</p></div><br />
Hello. Today, I am going to write about persisting a component&#8217;s values simply, using a hidden dialog; and how to turn a set of classes and assets into a &#8220;library&#8221; that other developers will not need to refactor prior to using it.</p>
<p>A few months ago, needing an Android widget that would let me select values &#8220;naturally&#8221; using one or more sliders, I found Daniel Berndt&#8217;s excellent <a href="http://code.google.com/p/android-dateslider/">DateSlider</a>.</p>
<p>I added a few functionalities to it:</p>
<p>1. Cohabitation of sliders in a tabbed interface<br />
2. An &#8220;Enumeration&#8221; type of slider (so, not necessarily dates anymore!)<br />
3. Sliders can now belong to a dialog or be embedded in an activity (ala progress bar)<br />
4. Now truly self-contained in a <del datetime="2011-12-31T09:23:35+00:00">jar</del> zip file.</p>
<p>For more information on the new features, have a look at the additional <a href="https://github.com/Fusion/DateSlider/blob/develop/CFR_README">readme file</a> I created.</p>
<p>For those of you who have tried to play with these concepts, you will immediately identify a few painful items here:</p>
<p>1. How can a component be a dialog&#8217;s content, or not, at will?<br />
2. How can a single component automatically persist its values, for instance over an orientation change?<br />
3. How do you include all assets in a jar file when the SDK dislikes that?</p>
<p>These are the challenges that I had to address. I exchanged a few emails with Daniel about pushing these changes back to DateSlider&#8217;s main branch but I guess we&#8217;ve both been working on other things since July.</p>
<p>The source code is, of course, available on <a href="https://github.com/Fusion/DateSlider">GitHub</a> so for in-depth understanding, I would recommend having a look at the commit history.</p>
<p>Regarding the three annoyances mentioned above:</p>
<p><strong>How can a component be a dialog&#8217;s content, or not, at will?</strong></p>
<p>This was the easiest one. I simply refactored the parent class (DateSlider) so that it is now a child of LinearLayout rather than Dialog.<br />
This object is now instanced normally, and two methods, <em>asDialog()</em> and <em>asEmbed()</em>, allow you to get the component properly wrapped.</p>
<p><strong>How can a single component automatically persist its values, for instance over an orientation change?</strong></p>
<p>The idea I had is a bit appalling but not too bad, in my opinion: dialogs come with their own <em>onSaveInstanceState()</em> method, which is automatically invoked when your application is about to be paused. That is, as long as this dialog was displayed using <em>showDialog()</em> rather than directly realized in your code. This takes care of dialogs.<br />
Components found in a regular activity, however, have no such method. So, what to do?<br />
My approach is to use an inner class representing an invisible dialog &#8212; conveniently called FauxDialog &#8212; that sits next to the slider, and that dialog is the one whose methods get invoked for saving and restoring your component&#8217;s state. </p>
<p>That invisible dialog&#8217;s style is:</p>

<div class="wp_codebox"><table><tr id="p341413"><td class="code" id="p3414code13"><pre class="java" style="font-family:monospace;">    <span style="color: #339933;">&lt;</span>style name<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;dateslider_InvisibleDialog&quot;</span> parent<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;android:Theme.Dialog&quot;</span><span style="color: #339933;">&gt;</span>
        <span style="color: #339933;">&lt;</span>item name<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;android:windowBackground&quot;</span><span style="color: #339933;">&gt;</span>@null<span style="color: #339933;">&lt;/</span>item<span style="color: #339933;">&gt;</span>
        <span style="color: #339933;">&lt;</span>item name<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;android:layout_width&quot;</span><span style="color: #339933;">&gt;</span>1px<span style="color: #339933;">&lt;/</span>item<span style="color: #339933;">&gt;</span>
        <span style="color: #339933;">&lt;</span>item name<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;android:layout_height&quot;</span><span style="color: #339933;">&gt;</span>1px<span style="color: #339933;">&lt;/</span>item<span style="color: #339933;">&gt;</span>
    <span style="color: #339933;">&lt;/</span>style<span style="color: #339933;">&gt;</span></pre></td></tr></table></div>

<p>and its save method can be as simple as:</p>

<div class="wp_codebox"><table><tr id="p341414"><td class="code" id="p3414code14"><pre class="java" style="font-family:monospace;">        @Override
        <span style="color: #000000; font-weight: bold;">public</span> Bundle onSaveInstanceState<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            Bundle savedInstanceState <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">super</span>.<span style="color: #006633;">onSaveInstanceState</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>savedInstanceState<span style="color: #339933;">==</span><span style="color: #000066; font-weight: bold;">null</span><span style="color: #009900;">&#41;</span> savedInstanceState <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Bundle<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            savedInstanceState.<span style="color: #006633;">putSerializable</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;time&quot;</span>, getTime<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #000000; font-weight: bold;">return</span> savedInstanceState<span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p><strong>How do you include all assets in a jar file when the SDK dislikes that?</strong></p>
<p>This one is actually VERY simple, thanks &#8212; again &#8212; to the guys at <a href="http://commonsware.com/">CommonsWare</a>.</p>
<p>They provide an incredibly convenient file called <a href="https://github.com/Fusion/DateSlider/blob/develop/src/com/commonsware/cwac/parcel/ParcelHelper.java">ParcelHelper.java</a><br />
This file allows developers to invoke a package&#8217;s resources through a class called, obviously ParcelHelper.</p>
<p>Therefore, all I had to do to turn DateSlider into a usable jar library, was:</p>
<p>1. Create a class called SliderController, that uses the singleton pattern to return an instance of ParcelHelper (I know! A singleton! Where is my pitchfork?)<br />
2. Replace direct references to resources, such as</p>

<div class="wp_codebox"><table><tr id="p341415"><td class="code" id="p3414code15"><pre class="java" style="font-family:monospace;">R.<span style="color: #006633;">styleable</span>.<span style="color: #006633;">ScrollLayout_childWidth</span></pre></td></tr></table></div>

<p> with their helper counterpart:</p>

<div class="wp_codebox"><table><tr id="p341416"><td class="code" id="p3414code16"><pre class="java" style="font-family:monospace;">SliderController.<span style="color: #006633;">instance</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">getParcel</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">getStyleableId</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;ScrollLayout&quot;</span>, <span style="color: #0000ff;">&quot;childWidth&quot;</span><span style="color: #009900;">&#41;</span></pre></td></tr></table></div>

<p>3. Rename the resources, prefixing them a string specified in ParcelHelper&#8217;s <em>getParcel()</em> method<br />
4. And finally, after generating the jar file, store it into a zip file along with its own resources (i.e. icons and layouts)</p>
<p>Now, any developer who wishes to use this &#8220;library&#8221; can simply extract this zip file at the root of their project and the jar file and the renamed resources will be made available to their own code.</p>
<p>As usual, feel free to ask questions if there are things that make little sense to you in this fairly succinct write-up.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/TheNexus?a=o2CjIoWFYuU:XNwrVEHyiFs:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/TheNexus?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/TheNexus?a=o2CjIoWFYuU:XNwrVEHyiFs:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/TheNexus?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/TheNexus?a=o2CjIoWFYuU:XNwrVEHyiFs:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/TheNexus?i=o2CjIoWFYuU:XNwrVEHyiFs:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/TheNexus?a=o2CjIoWFYuU:XNwrVEHyiFs:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/TheNexus?d=qj6IDK7rITs" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/TheNexus/~4/o2CjIoWFYuU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://nexus.zteo.com/blog/2011/12/31/android-self-contained-libraries-seamless-component-persistence/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://nexus.zteo.com/blog/2011/12/31/android-self-contained-libraries-seamless-component-persistence/</feedburner:origLink></item>
		<item>
		<title>Your own Dynamic DNS in 3 steps</title>
		<link>http://feedproxy.google.com/~r/TheNexus/~3/yqp-hwYmdzg/</link>
		<comments>http://nexus.zteo.com/blog/2011/12/28/your-own-dynamic-dns-in-3-steps/#comments</comments>
		<pubDate>Thu, 29 Dec 2011 02:00:48 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[hacks]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[networking]]></category>
		<category><![CDATA[osx]]></category>

		<guid isPermaLink="false">http://nexus.zteo.com/?p=3395</guid>
		<description><![CDATA[This is a &#8220;niche&#8221; post: it will really only appeal to you if you have access to your own &#8212; or a friend&#8217;s &#8212; name servers and want to use your own domain to track your dynamic IP addresses, such as your home router&#8217;s. You will still have to buy your own domain, cheap if you go to internet.bs or [...]]]></description>
			<content:encoded><![CDATA[<p><a href='http://www.flickr.com/photos/chazzlayne/3849853039/in/photostream/'><img src="http://nexus.zteo.com/files/2011/12/3849853039_7a466ff65a_z-225x300.jpg" alt="" title="3849853039_7a466ff65a_z" width="225" height="300" class="alignleft size-medium wp-image-3396" alt="Picture by Chazz Layne" /></a><br />
This is a &#8220;niche&#8221; post: it will really only appeal to you if you have access to your own &#8212; or a friend&#8217;s &#8212; name servers and want to use your own domain to track your dynamic IP addresses, such as your home router&#8217;s.<br />
You will still have to buy your own domain, cheap if you go to <a href="http://internet.bs">internet.bs</a> or <a href="http://namecheap.com">namecheap.com</a>. I hear that the latter even provide their own dynamic DNS service although I cannot tell you anything about its quality/flexibility.</p>
<p>So, why this post? It&#8217;s for you, my friends, budding entrepreneurs who wish to bootstrap your business and know that every cent counts. Maybe you feel that you could host your product&#8217;s web site on a home computer. Maybe you need more control over what happens on that server. Or maybe you want to be able to log on to your development machine from anywhere in the world.</p>
<p>Whatever your reasons, you&#8217;re still here. So let&#8217;s get started.</p>
<p><strong>1. NTP</strong></p>
<p>First, for DNS updates to be accepted by BIND, the client that sends updates needs for its internal clock to be closely in step with the DNS&#8217; clock. This is, of course, achieved by running the network time protocol (NTP) at both ends.</p>
<p>On RedHat:</p>

<div class="wp_codebox"><table><tr id="p339526"><td class="code" id="p3395code26"><pre class="bash" style="font-family:monospace;">yum <span style="color: #c20cb9; font-weight: bold;">install</span> ntp</pre></td></tr></table></div>

<p>On Debian/Ubuntu/Mint:</p>

<div class="wp_codebox"><table><tr id="p339527"><td class="code" id="p3395code27"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> ntp</pre></td></tr></table></div>

<p>OS X comes with NTP pre-installed.</p>
<p>Your NTP client should come with a configuration that will work with the distro&#8217;s own NTP servers. Check the content of <em>/etc/ntp.conf</em>. If no server is provided, you can still test your configuration against <em><strong>0.pool.ntp.org</strong></em>. It is nowhere near as nice as <a href="http://www.pool.ntp.org/en/join.html">adding your own ntp server to the ntp system</a> though. </p>
<p>Start the NTP daemon; this is typically done using:</p>

<div class="wp_codebox"><table><tr id="p339528"><td class="code" id="p3395code28"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>ntpd start</pre></td></tr></table></div>

<p>Install this daemon so that it will always be automatically started:</p>

<div class="wp_codebox"><table><tr id="p339529"><td class="code" id="p3395code29"><pre class="bash" style="font-family:monospace;">chkconfig ntpd on</pre></td></tr></table></div>

<p>In OS X, this is a much easier configuration: open <em>System Preferences > Data &#038; Time</em> and check &#8216;Set date and time automatically&#8217;</p>
<p>On Windows, various options are available, including the open-source <a href="http://www.timesynctool.com/">NetTime</a>.</p>
<p><strong>2. BIND</strong></p>
<p>Here is a bit of info that you need to know: dynamic DNS will generate zone files that will not be human-readable. Therefore you are not going to want to maintain files that mix dynamic and static DNS information. That is why I typically make a subdomain dynamic while leaving the domain itself static. For instance, if you own the domain <strong>mydomain.com</strong>, I would recommend that you create a new zone for <strong>d.mydomain.com</strong> and only that zone will be dynamic.</p>
<p>If, on the other hand, you do not need to maintain both static and dynamic IPs, you obviously can make the whole <strong>mydomain.com</strong> dynamic.</p>
<p>OK, so that&#8217;s where I&#8217;m lying. By omission. After all there is nothing preventing you, as we shall soon see, to maintain a set of static addresses alongside the dynamic ones in your update script.</p>
<p>Let&#8217;s declare a dynamic zone in <em>/etc/named.conf</em> (or <em>/var/named/chroot/etc/named.conf</em> if running BIND in a chroot environment):</p>

<div class="wp_codebox"><table><tr id="p339530"><td class="code" id="p3395code30"><pre class="ini" style="font-family:monospace;">zone <span style="color: #933;">&quot;d.mydomain.com&quot;</span> <span style="">&#123;</span>
        type master<span style="color: #666666; font-style: italic;">;</span>
        file <span style="color: #933;">&quot;/var/named/data/d.mydomain.com.db&quot;</span><span style="color: #666666; font-style: italic;">; </span>
        allow-update <span style="">&#123;</span> key host1.d.mydomain.com.<span style="color: #666666; font-style: italic;">; };</span>
<span style="">&#125;</span><span style="color: #666666; font-style: italic;">;</span></pre></td></tr></table></div>

<p>This tells BIND that a client providing the correct key &#8216;host1.d.mydomain.com&#8217; is allowed to update this zone file (d.mydomain.com.db)</p>
<p>This key needs to be present in named.conf as well:</p>

<div class="wp_codebox"><table><tr id="p339531"><td class="code" id="p3395code31"><pre class="ini" style="font-family:monospace;">key host1.d.mydomain.com. <span style="">&#123;</span>
        algorithm hmac-md5<span style="color: #666666; font-style: italic;">;</span>
        secret <span style="color: #933;">&quot;&lt; your public key here &gt;&quot;</span><span style="color: #666666; font-style: italic;">;</span>
<span style="">&#125;</span><span style="color: #666666; font-style: italic;">;</span></pre></td></tr></table></div>

<p>We will see very soon where we get this key from. Note that you could decide that you wish to be cleaner and store that key in an external file.</p>
<p>So, that was easy. However, this approach gives access to a full domain (<strong>d.mydomain.com</strong>) to a single user as long as they have the correct private key in their possession.<br />
What if you wish to share a domain among multiple users, each only allowed to modify their own host name?</p>
<p>That&#8217;s where &#8216;update-policy&#8217; can be useful.<br />
Here is your updated named.conf file to allow two different users to update their respective host info:</p>

<div class="wp_codebox"><table><tr id="p339532"><td class="code" id="p3395code32"><pre class="ini" style="font-family:monospace;">zone <span style="color: #933;">&quot;d.mydomain.com&quot;</span> <span style="">&#123;</span>
    type master<span style="color: #666666; font-style: italic;">;</span>
        file <span style="color: #933;">&quot;/var/named/data/d.mydomain.com.db&quot;</span><span style="color: #666666; font-style: italic;">; </span>
&nbsp;
    update-policy <span style="">&#123;</span>
        grant host1.d.mydomain.com. name host1.d.mydomain.com. A TXT<span style="color: #666666; font-style: italic;">;</span>
        grant host2.d.mydomain.com. name host2.d.mydomain.com. A TXT<span style="color: #666666; font-style: italic;">;</span>
    <span style="">&#125;</span><span style="color: #666666; font-style: italic;">;</span>
<span style="">&#125;</span><span style="color: #666666; font-style: italic;">;</span></pre></td></tr></table></div>

<p>Of course, the keys &#8216;host1.d.mydomain.com&#8217; and &#8216;host2.d.mydomain.com&#8217; need to be present in the same file.</p>
<p>OK, we&#8217;re almost there. Just one last bit of preparation will go a long way, though: make sure that the user BIND is running as has write-access to the zone hierarchy! Keep in mind that BIND will end up generating zone files, unlike with static zones.</p>
<p><strong>3. UPDATES</strong></p>
<p>Now, to update these zones remotely, we will rely on a traditional BIND tool known as <em><strong>nsupdate</strong></em>.<br />
It is available on Linux and OS X. Instructions for installing on Windows can be found <a href="http://wiki.inisec.com/index.php/Nsupdate_for_windows">here</a> and, of course, as usual Cygwin provides its own version.</p>
<p>Let&#8217;s generate a key for our host1.d.mydomain.com. host:</p>

<div class="wp_codebox"><table><tr id="p339533"><td class="code" id="p3395code33"><pre class="bash" style="font-family:monospace;">dnssec-keygen <span style="color: #660033;">-a</span> hmac-md5 <span style="color: #660033;">-b</span> <span style="color: #000000;">128</span> <span style="color: #660033;">-n</span> USER host1.d.mydomain.com.</pre></td></tr></table></div>

<p>This will output two files:<br />
<em>Khost1.d.mydomain.com.XXXXX.key</em><br />
and<br />
<em>Khost1.d.mydomain.com.XXXXX.private</em></p>
<p>Get the key from the first file (just the segment that ends in &#8216;==&#8217;) and use it to replace &#8216;< your public key here >&#8216; in named.conf.</p>
<p>You can now focus on the client.</p>
<p>Here is a sample script I wrote that will perform a very minimal update every half-hour. This script lives in /home/< your home dir >/DNS_KEY along with the <em>Khost1.d.mydomain.com.XXXXX.private</em> file.<br />
Obviously you will need to modify < your home dir >, < master DNS name >, host1.d.mydomain.com and Khost1.d.mydomain.com.XXXXX.private:</p>

<div class="wp_codebox"><table><tr id="p339534"><td class="code" id="p3395code34"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/bash</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Servers: http://dynupdate.no-ip.com/ip.php, http://www.antedes.com/getip.php, ..?</span>
<span style="color: #666666; font-style: italic;"># Less straifghtforward: http://checkip.dyndns.org/, ...</span>
<span style="color: #007800;">IPS</span>=http:<span style="color: #000000; font-weight: bold;">//</span>dynupdate.no-ip.com<span style="color: #000000; font-weight: bold;">/</span>ip.php
&nbsp;
<span style="color: #007800;">DNSP</span>=<span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/&lt;</span> your home <span style="color: #c20cb9; font-weight: bold;">dir</span> <span style="color: #000000; font-weight: bold;">&gt;/</span>DNS_KEY
&nbsp;
<span style="color: #000000; font-weight: bold;">while</span> <span style="color: #c20cb9; font-weight: bold;">true</span>; <span style="color: #000000; font-weight: bold;">do</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># First, retrieve IP address</span>
	<span style="color: #007800;">CURIP</span>=<span style="color: #000000; font-weight: bold;">`</span>curl <span style="color: #660033;">-s</span> <span style="color: #007800;">$IPS</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">awk</span> <span style="color: #ff0000;">'{ print $1 }'</span><span style="color: #000000; font-weight: bold;">`</span>
	<span style="color: #007800;">OLDIP</span>=<span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">cat</span> <span style="color: #007800;">$DNSP</span><span style="color: #000000; font-weight: bold;">/</span>oldip<span style="color: #000000; font-weight: bold;">`</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Compare to previously saved IP</span>
	<span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$CURIP</span>&quot;</span> == <span style="color: #ff0000;">&quot;<span style="color: #007800;">$OLDIP</span>&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> <span style="color: #7a0874; font-weight: bold;">continue</span>
	<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #007800;">$CURIP</span> <span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #007800;">$DNSP</span><span style="color: #000000; font-weight: bold;">/</span>oldip
&nbsp;
<span style="color: #666666; font-style: italic;"># If different, tell DNS</span>
	<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;server &lt; master DNS name &gt;&quot;</span> <span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #007800;">$DNSP</span><span style="color: #000000; font-weight: bold;">/</span>zone
	<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;zone d.mydomain.com&quot;</span> <span style="color: #000000; font-weight: bold;">&gt;&gt;</span> <span style="color: #007800;">$DNSP</span><span style="color: #000000; font-weight: bold;">/</span>zone
	<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;update delete host1.d.mydomain.com. A&quot;</span> <span style="color: #000000; font-weight: bold;">&gt;&gt;</span> <span style="color: #007800;">$DNSP</span><span style="color: #000000; font-weight: bold;">/</span>zone
	<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;update add host1.d.mydomain.com. 14400 A <span style="color: #007800;">$CURIP</span>&quot;</span> <span style="color: #000000; font-weight: bold;">&gt;&gt;</span> <span style="color: #007800;">$DNSP</span><span style="color: #000000; font-weight: bold;">/</span>zone
	<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;show&quot;</span> <span style="color: #000000; font-weight: bold;">&gt;&gt;</span> <span style="color: #007800;">$DNSP</span><span style="color: #000000; font-weight: bold;">/</span>zone
	<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;send&quot;</span> <span style="color: #000000; font-weight: bold;">&gt;&gt;</span> <span style="color: #007800;">$DNSP</span><span style="color: #000000; font-weight: bold;">/</span>zone
	<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>nsupdate <span style="color: #660033;">-k</span> <span style="color: #007800;">$DNSP</span><span style="color: #000000; font-weight: bold;">/</span>Khost1.d.mydomain.com.XXXXX.private <span style="color: #007800;">$DNSP</span><span style="color: #000000; font-weight: bold;">/</span>zone
&nbsp;
<span style="color: #666666; font-style: italic;"># Sleeeeeeep I tell you</span>
<span style="color: #666666; font-style: italic;"># 1800 = 30 minutes</span>
	<span style="color: #c20cb9; font-weight: bold;">sleep</span> <span style="color: #000000;">1800</span>
<span style="color: #000000; font-weight: bold;">done</span></pre></td></tr></table></div>

<p>You can install this script on Linux as your own daemon or run it manually using &#8216;nohup < scriptname > &#038;&#8217; or get rid of the loop and use crontab.<br />
On OS X, I ask <a href="http://www.peterborgapps.com/lingon/">Lingon</a> to start it early on.</p>
<p>Do not modify the 30 minutes sleep time; be polite to these services that provide your IP for fre.</p>
<p><strong>CONCLUSION</strong></p>
<p>Of course, you want to remember to restart BIND so that it will read its new configuration. It will not need to be restarted again; it will automatically integrate all dynamic updates.<br />
Hope this helps and as usual if you have questions I will try not to ignore them for too long <img src='http://nexus.zteo.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/TheNexus?a=yqp-hwYmdzg:o0WXxIqEKKE:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/TheNexus?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/TheNexus?a=yqp-hwYmdzg:o0WXxIqEKKE:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/TheNexus?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/TheNexus?a=yqp-hwYmdzg:o0WXxIqEKKE:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/TheNexus?i=yqp-hwYmdzg:o0WXxIqEKKE:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/TheNexus?a=yqp-hwYmdzg:o0WXxIqEKKE:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/TheNexus?d=qj6IDK7rITs" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/TheNexus/~4/yqp-hwYmdzg" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://nexus.zteo.com/blog/2011/12/28/your-own-dynamic-dns-in-3-steps/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://nexus.zteo.com/blog/2011/12/28/your-own-dynamic-dns-in-3-steps/</feedburner:origLink></item>
		<item>
		<title>RootTools 1.5, NativeTools 1.0</title>
		<link>http://feedproxy.google.com/~r/TheNexus/~3/r3D56zMUBLE/</link>
		<comments>http://nexus.zteo.com/blog/2011/11/21/roottools-1-5-nativetools-1-0/#comments</comments>
		<pubDate>Tue, 22 Nov 2011 02:51:52 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[opensource]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[library]]></category>

		<guid isPermaLink="false">http://nexus.zteo.com/?p=3385</guid>
		<description><![CDATA[I am both happy and relieved to announce RootTools 1.5 and NativeTools 1.0. What&#8217;s new in RootTools 1.5? Mostly build improvements: a new AndroidManifest.xml file for easier building in Eclipse; example version number is now taken from the manifest file; new makejar.ant for building and zipping the library. This version also offers a new function: isNativeToolsready(). This function does a [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft" title="RootTools" src="http://nexus.zteo.com/wp-content/CFR/project_roottools_thumb.png" alt="" width="204" height="182" />I am both happy and relieved to announce <a href="http://code.google.com/p/roottools/">RootTools 1.5</a> and <a href="https://github.com/Fusion/NativeTools">NativeTools 1.0</a>.</p>
<p><strong>What&#8217;s new in RootTools 1.5?</strong></p>
<p>Mostly build improvements: a new AndroidManifest.xml file for easier building in Eclipse; example version number is now taken from the manifest file; new makejar.ant for building and zipping the library.</p>
<p>This version also offers a new function: <em>isNativeToolsready()</em>. This function does a silent install/check for correct install of the nativetools binary (you could conceivably use your own binary as you provide your resource id to the function)</p>
<p><strong>What is NativeTools 1.0?</strong></p>
<p>It&#8217;s the piece that has been, until now, missing from the equation. I recommend reading readme.md for more information but the short version is that NativeTools provide C/C++ functions in a convenient package that you can invoke to perform all sorts of operations (retrieve partition size, get file content, etc) without having to worry about the current device&#8217;s shell idiosyncrasies.</p>
<p>Its other advantage is that is runs much, much faster that performing the same operations recursively in Java.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/TheNexus?a=r3D56zMUBLE:DSVz96jqABU:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/TheNexus?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/TheNexus?a=r3D56zMUBLE:DSVz96jqABU:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/TheNexus?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/TheNexus?a=r3D56zMUBLE:DSVz96jqABU:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/TheNexus?i=r3D56zMUBLE:DSVz96jqABU:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/TheNexus?a=r3D56zMUBLE:DSVz96jqABU:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/TheNexus?d=qj6IDK7rITs" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/TheNexus/~4/r3D56zMUBLE" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://nexus.zteo.com/blog/2011/11/21/roottools-1-5-nativetools-1-0/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://nexus.zteo.com/blog/2011/11/21/roottools-1-5-nativetools-1-0/</feedburner:origLink></item>
		<item>
		<title>Android StatusBar Height, the cautious way</title>
		<link>http://feedproxy.google.com/~r/TheNexus/~3/M8sRqAF1bkk/</link>
		<comments>http://nexus.zteo.com/blog/2011/11/08/android-statusbar-height-the-cautious-way/#comments</comments>
		<pubDate>Tue, 08 Nov 2011 08:47:28 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[android]]></category>

		<guid isPermaLink="false">http://nexus.zteo.com/?p=3380</guid>
		<description><![CDATA[A lot of applications expect the status bar to be at the top of your device&#8217;s screen. It&#8217;s true in most cases so their developers are somewhat justified in making this assumption. However, with more and more tablets on the market, this is becoming an increasingly dangerous assumption. Also somewhat dangerous: the notion that your status bar&#8217;s height will be [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.flickr.com/photos/asirap/5587611705/sizes/z/in/photostream/"><img src="http://nexus.zteo.com/files/2011/11/5587611705_2aa6dfbe31_z-300x200.jpg" alt="" title="5587611705_2aa6dfbe31_z" width="300" height="200" class="alignleft size-medium wp-image-3374" /></a>A lot of applications expect the status bar to be at the top of your device&#8217;s screen. It&#8217;s true in most cases so their developers are somewhat justified in making this assumption.<br />
However, with more and more tablets on the market, this is becoming an increasingly dangerous assumption.</p>
<p>Also somewhat dangerous: the notion that your status bar&#8217;s height will be (your visible area&#8217;s height &#8211; zero). Google never made any commitment that the status bar will always start at pixel zero.</p>
<p>So, here is how I do it:</p>

<div class="wp_codebox"><table><tr id="p338036"><td class="code" id="p3380code36"><pre class="java" style="font-family:monospace;">        Rect outerRect <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Rect<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        Rect usableRect <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Rect<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Awindow+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">Window</span></a> window<span style="color: #339933;">=</span> Home.<span style="color: #006633;">getInstance</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">getWindow</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        window.<span style="color: #006633;">getDecorView</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">getGlobalVisibleRect</span><span style="color: #009900;">&#40;</span>outerRect<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        window.<span style="color: #006633;">getDecorView</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">getWindowVisibleDisplayFrame</span><span style="color: #009900;">&#40;</span>usableRect<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        statusBarHeight <span style="color: #339933;">=</span> usableRect.<span style="color: #006633;">top</span> <span style="color: #339933;">-</span> outerRect.<span style="color: #006633;">top</span><span style="color: #339933;">;</span>
        <span style="color: #666666; font-style: italic;">// Sometimes, status bar is at bottom...</span>
        <span style="color: #000066; font-weight: bold;">int</span> bottomGap <span style="color: #339933;">=</span> outerRect.<span style="color: #006633;">bottom</span> <span style="color: #339933;">-</span> usableRect.<span style="color: #006633;">bottom</span><span style="color: #339933;">;</span>
        <span style="color: #000000; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>bottomGap <span style="color: #339933;">&gt;</span> statusBarHeight<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            statusBarHeight <span style="color: #339933;">=</span> bottomGap<span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/TheNexus?a=M8sRqAF1bkk:XoKMOnwJ0QE:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/TheNexus?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/TheNexus?a=M8sRqAF1bkk:XoKMOnwJ0QE:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/TheNexus?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/TheNexus?a=M8sRqAF1bkk:XoKMOnwJ0QE:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/TheNexus?i=M8sRqAF1bkk:XoKMOnwJ0QE:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/TheNexus?a=M8sRqAF1bkk:XoKMOnwJ0QE:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/TheNexus?d=qj6IDK7rITs" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/TheNexus/~4/M8sRqAF1bkk" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://nexus.zteo.com/blog/2011/11/08/android-statusbar-height-the-cautious-way/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://nexus.zteo.com/blog/2011/11/08/android-statusbar-height-the-cautious-way/</feedburner:origLink></item>
		<item>
		<title>A fast, low-memory growable array for Android</title>
		<link>http://feedproxy.google.com/~r/TheNexus/~3/pCoczFRLoTI/</link>
		<comments>http://nexus.zteo.com/blog/2011/11/01/a-fast-low-memory-growable-array-for-android/#comments</comments>
		<pubDate>Tue, 01 Nov 2011 08:02:47 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Android]]></category>

		<guid isPermaLink="false">http://nexus.zteo.com/?p=3364</guid>
		<description><![CDATA[A classic problem: you need an array where you are going to hold a set of values; you do not know that array&#8217;s size in advance but it may grow to be quite the monster. If you use, say, an ArrayList, you have a memory-hungry beast to deal with, making sure that Android will really think about your app when [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.flickr.com/photos/asirap/5587611705/sizes/z/in/photostream/"><img src="http://nexus.zteo.com/files/2011/11/5587611705_2aa6dfbe31_z-300x200.jpg" alt="" title="5587611705_2aa6dfbe31_z" width="300" height="200" class="alignleft size-medium wp-image-3374" /></a>A classic problem: you need an array where you are going to hold a set of values; you do not know that array&#8217;s size in advance but it may grow to be quite the monster.<br />
If you use, say, an ArrayList, you have a memory-hungry beast to deal with, making sure that Android will really think about your app when it needs to kill background processes to reclaim some memory.</p>
<p>The solutions offered here have a few downsides, not least of them being the copy operations; however they are kept to a minimum.</p>
<p>Upon closer inspection you will notice that this code tries to deal with two-dimensional arrays by storing booleans in a [row][col] array; it is outside the scope of this post but, yes, I am using integers as bit fields to represent these booleans. The memory savings are huge.</p>
<p><strong>Solution #1 &#8212; for an array growing linearly</strong><br />
I know that this table will be filled &#8220;top to bottom&#8221; so I simply double its size whenever I am about to reach its current boundary. If I waited to effectively reach the boundary, a loop relying on size() would not go beyond its original size. Since we are using this boundary, this is not geometric growth but staggered linear growth.</p>

<div class="wp_codebox"><table><tr id="p336439"><td class="code" id="p3364code39"><pre class="java" style="font-family:monospace;">    <span style="color: #000000; font-weight: bold;">class</span> GridInfo <span style="color: #009900;">&#123;</span>
        <span style="color: #000066; font-weight: bold;">int</span> mSize<span style="color: #339933;">;</span>
        <span style="color: #000066; font-weight: bold;">int</span> mRow<span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #000000; font-weight: bold;">public</span> GridInfo<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #000000; font-weight: bold;">this</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">2</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
&nbsp;
        <span style="color: #000000; font-weight: bold;">public</span> GridInfo<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">int</span> size<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            mSize <span style="color: #339933;">=</span> size<span style="color: #339933;">;</span>
            mRow <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #000066; font-weight: bold;">int</span><span style="color: #009900;">&#91;</span>mSize<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
&nbsp;
        <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">int</span> size<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #000000; font-weight: bold;">return</span> mSize<span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
&nbsp;
        <span style="color: #000066; font-weight: bold;">void</span> resize<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #000066; font-weight: bold;">int</span> resizedArray<span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #000066; font-weight: bold;">int</span><span style="color: #009900;">&#91;</span>mSize <span style="color: #339933;">*</span> <span style="color: #cc66cc;">2</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
            <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Asystem+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">System</span></a>.<span style="color: #006633;">arraycopy</span><span style="color: #009900;">&#40;</span>mRow, <span style="color: #cc66cc;">0</span>, resizedArray, <span style="color: #cc66cc;">0</span>, mSize<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            mRow <span style="color: #339933;">=</span> resizedArray<span style="color: #339933;">;</span>
            mSize <span style="color: #339933;">*=</span> <span style="color: #cc66cc;">2</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
&nbsp;
        <span style="color: #000066; font-weight: bold;">void</span> flickOn<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">int</span> row, <span style="color: #000066; font-weight: bold;">int</span> col<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #000000; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>row <span style="color: #339933;">+</span> <span style="color: #cc66cc;">1</span> <span style="color: #339933;">&gt;=</span> mSize<span style="color: #009900;">&#41;</span> resize<span style="color: #009900;">&#40;</span>row<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            mRow<span style="color: #009900;">&#91;</span>row<span style="color: #009900;">&#93;</span> <span style="color: #339933;">|=</span> <span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">2</span><span style="color: #339933;">&lt;&lt;</span>col<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
&nbsp;
        <span style="color: #000066; font-weight: bold;">void</span> flickOff<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">int</span> row, <span style="color: #000066; font-weight: bold;">int</span> col<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #000000; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>row <span style="color: #339933;">+</span> <span style="color: #cc66cc;">1</span> <span style="color: #339933;">&gt;=</span> mSize<span style="color: #009900;">&#41;</span> resize<span style="color: #009900;">&#40;</span>row<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            mRow<span style="color: #009900;">&#91;</span>row<span style="color: #009900;">&#93;</span> <span style="color: #339933;">&amp;=</span> ~<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">2</span><span style="color: #339933;">&lt;&lt;</span>col<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
&nbsp;
        <span style="color: #000066; font-weight: bold;">boolean</span> isFlicked<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">int</span> row, <span style="color: #000066; font-weight: bold;">int</span> col<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #000000; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>row  <span style="color: #339933;">+</span> <span style="color: #cc66cc;">1</span> <span style="color: #339933;">&gt;=</span> mSize<span style="color: #009900;">&#41;</span> resize<span style="color: #009900;">&#40;</span>row<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #000000; font-weight: bold;">return</span> <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span>mRow<span style="color: #009900;">&#91;</span>row<span style="color: #009900;">&#93;</span> <span style="color: #339933;">&amp;</span> <span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">2</span><span style="color: #339933;">&lt;&lt;</span>col<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">!=</span> <span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
    <span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p><strong>Solution #2 &#8212; for a random-access array</strong><br />
Here, the developer using this class may decide to look ahead for a value that may or may not exist. By resizing the array to 2 to the power of (log2(our desired row number&#8217;s)+1), we make sure that this yet uncharted territory exists.</p>

<div class="wp_codebox"><table><tr id="p336440"><td class="code" id="p3364code40"><pre class="java" style="font-family:monospace;">    <span style="color: #000000; font-weight: bold;">class</span> GridInfo <span style="color: #009900;">&#123;</span>
        <span style="color: #000066; font-weight: bold;">int</span> mSize<span style="color: #339933;">;</span>
        <span style="color: #000066; font-weight: bold;">int</span> mRow<span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #000000; font-weight: bold;">public</span> GridInfo<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #000000; font-weight: bold;">this</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">2</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
&nbsp;
        <span style="color: #000000; font-weight: bold;">public</span> GridInfo<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">int</span> size<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            mSize <span style="color: #339933;">=</span> size<span style="color: #339933;">;</span>
            mRow <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #000066; font-weight: bold;">int</span><span style="color: #009900;">&#91;</span>mSize<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
&nbsp;
        <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">int</span> size<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #000000; font-weight: bold;">return</span> mSize<span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
&nbsp;
        <span style="color: #000066; font-weight: bold;">void</span> resize<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">int</span> row<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #000066; font-weight: bold;">int</span> l2 <span style="color: #339933;">=</span> <span style="color: #cc66cc;">1</span> <span style="color: #339933;">+</span> <span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">int</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Amath+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">Math</span></a>.<span style="color: #006633;">log</span><span style="color: #009900;">&#40;</span>row <span style="color: #339933;">+</span> <span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">/</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Amath+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">Math</span></a>.<span style="color: #006633;">log</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">2</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #000066; font-weight: bold;">int</span> pw <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">int</span><span style="color: #009900;">&#41;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Amath+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">Math</span></a>.<span style="color: #006633;">pow</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">2</span>, l2<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #000000; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>pw <span style="color: #339933;">&gt;</span> mSize<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                <span style="color: #000066; font-weight: bold;">int</span> resizedArray<span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #000066; font-weight: bold;">int</span><span style="color: #009900;">&#91;</span>pw<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
                <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Asystem+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">System</span></a>.<span style="color: #006633;">arraycopy</span><span style="color: #009900;">&#40;</span>mRow, <span style="color: #cc66cc;">0</span>, resizedArray, <span style="color: #cc66cc;">0</span>, mSize<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                mRow <span style="color: #339933;">=</span> resizedArray<span style="color: #339933;">;</span>
                mSize <span style="color: #339933;">=</span> pw<span style="color: #339933;">;</span>
            <span style="color: #009900;">&#125;</span>
        <span style="color: #009900;">&#125;</span>
&nbsp;
        <span style="color: #000066; font-weight: bold;">void</span> flickOn<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">int</span> row, <span style="color: #000066; font-weight: bold;">int</span> col<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #000000; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>row <span style="color: #339933;">+</span> <span style="color: #cc66cc;">1</span> <span style="color: #339933;">&gt;=</span> mSize<span style="color: #009900;">&#41;</span> resize<span style="color: #009900;">&#40;</span>row<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            mRow<span style="color: #009900;">&#91;</span>row<span style="color: #009900;">&#93;</span> <span style="color: #339933;">|=</span> <span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">2</span><span style="color: #339933;">&lt;&lt;</span>col<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
&nbsp;
        <span style="color: #000066; font-weight: bold;">void</span> flickOff<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">int</span> row, <span style="color: #000066; font-weight: bold;">int</span> col<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #000000; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>row <span style="color: #339933;">+</span> <span style="color: #cc66cc;">1</span> <span style="color: #339933;">&gt;=</span> mSize<span style="color: #009900;">&#41;</span> resize<span style="color: #009900;">&#40;</span>row<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            mRow<span style="color: #009900;">&#91;</span>row<span style="color: #009900;">&#93;</span> <span style="color: #339933;">&amp;=</span> ~<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">2</span><span style="color: #339933;">&lt;&lt;</span>col<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
&nbsp;
        <span style="color: #000066; font-weight: bold;">boolean</span> isFlicked<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">int</span> row, <span style="color: #000066; font-weight: bold;">int</span> col<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #000000; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>row  <span style="color: #339933;">+</span> <span style="color: #cc66cc;">1</span> <span style="color: #339933;">&gt;=</span> mSize<span style="color: #009900;">&#41;</span> resize<span style="color: #009900;">&#40;</span>row<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #000000; font-weight: bold;">return</span> <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span>mRow<span style="color: #009900;">&#91;</span>row<span style="color: #009900;">&#93;</span> <span style="color: #339933;">&amp;</span> <span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">2</span><span style="color: #339933;">&lt;&lt;</span>col<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">!=</span> <span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
    <span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>Of course, make sure to pick an initial value as close as possible to what you expect your array&#8217;s average size to be. &#8220;2&#8243; is not a very likely choice in most cases.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/TheNexus?a=pCoczFRLoTI:3_15jQeJOb0:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/TheNexus?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/TheNexus?a=pCoczFRLoTI:3_15jQeJOb0:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/TheNexus?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/TheNexus?a=pCoczFRLoTI:3_15jQeJOb0:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/TheNexus?i=pCoczFRLoTI:3_15jQeJOb0:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/TheNexus?a=pCoczFRLoTI:3_15jQeJOb0:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/TheNexus?d=qj6IDK7rITs" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/TheNexus/~4/pCoczFRLoTI" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://nexus.zteo.com/blog/2011/11/01/a-fast-low-memory-growable-array-for-android/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://nexus.zteo.com/blog/2011/11/01/a-fast-low-memory-growable-array-for-android/</feedburner:origLink></item>
	</channel>
</rss>

