<?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"
	>

<channel>
	<title>Green Spring Design, LLC</title>
	<atom:link href="http://greenspringdesign.com/blog/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://greenspringdesign.com/blog</link>
	<description>Just another WordPress weblog</description>
	<pubDate>Fri, 22 Jan 2010 19:23:41 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
	<language>en</language>
			<item>
		<title>E4X: no &#62; for you</title>
		<link>http://greenspringdesign.com/blog/?p=26</link>
		<comments>http://greenspringdesign.com/blog/?p=26#comments</comments>
		<pubDate>Fri, 22 Jan 2010 19:20:09 +0000</pubDate>
		<dc:creator>Jeremy Lizakowski</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://greenspringdesign.com/blog/?p=26</guid>
		<description><![CDATA[In E4X (for actionscript 3), the &#8220;greater than&#8221; symbol is not always XML encoded as &#8220;&#62;&#8221;.  However, the &#8220;less than&#8221; symbol is encoded.  While this looks odd, it&#8217;s actually valid according to the XML spec.
var bar:String="&#60; wokka &#62;";
var xml:XML =  &#60;foo value= {bar} &#62; The value is unbalanced &#60;/foo&#62;;

trace(xml.toXMLString());

/*
&#60;foo value="&#60; wokka &#62;"&#62;The value is unbalanced&#60;/foo&#62;
*/

http://www.w3.org/TR/REC-xml/
The [...]]]></description>
			<content:encoded><![CDATA[<p>In E4X (for actionscript 3), the &#8220;greater than&#8221; symbol is not always XML encoded as &#8220;&gt;&#8221;.  However, the &#8220;less than&#8221; symbol is encoded.  While this looks odd, it&#8217;s actually valid according to the XML spec.</p>
<p><code>var bar:String="&lt; wokka &gt;";<br />
var xml:XML =  &lt;foo value= {bar} &gt; The value is unbalanced &lt;/foo&gt;;</code><br />
<code><br />
trace(xml.toXMLString());</code><br />
<code><br />
/*<br />
&lt;foo value="&lt; wokka &gt;"&gt;The value is unbalanced&lt;/foo&gt;<br />
*/<br />
</code><br />
<a title="http://www.w3.org/TR/REC-xml/" href="http://">http://www.w3.org/TR/REC-xml/</a></p>
<blockquote><p>The ampersand character (&amp;) and the left angle bracket (&lt;) <em class="rfc2119" title="Keyword in RFC 2119 context">MUST NOT</em> appear in their literal form, except when used as markup delimiters, or within a <a title="Comment" href="http://www.w3.org/TR/REC-xml/#dt-comment">comment</a>, a <a title="Processing instruction" href="http://www.w3.org/TR/REC-xml/#dt-pi">processing instruction</a>, or a <a title="CDATA Section" href="http://www.w3.org/TR/REC-xml/#dt-cdsection">CDATA section</a>.  If they are needed elsewhere, they <em class="rfc2119" title="Keyword in RFC 2119 context">MUST</em> be <a title="escape" href="http://www.w3.org/TR/REC-xml/#dt-escape">escaped</a> using either <a title="Character Reference" href="http://www.w3.org/TR/REC-xml/#dt-charref">numeric character references</a> or the strings &#8221; 						<code>&amp;</code> &#8221; and &#8221; 						<code>&lt;</code> &#8221; respectively. The right angle bracket (&gt;) may be represented using the string &#8221; 						<code>&gt;</code> &#8220;, and <em class="rfc2119" title="Keyword in RFC 2119 context">MUST</em>, <a title="For Compatibility" href="http://www.w3.org/TR/REC-xml/#dt-compat">for compatibility</a>, be escaped using either &#8221; 						<code>&gt;</code> &#8221; or a character reference when it appears in the string &#8221; 						<code>]]&gt;</code> &#8221; in content, when that string is not marking the end of a <a title="CDATA Section" href="http://www.w3.org/TR/REC-xml/#dt-cdsection">CDATA section</a>.</p>
<p>In the content of elements, character data is any string of characters which does not contain the start-delimiter of any markup and does not include the CDATA-section-close delimiter, &#8221; 						<code>]]&gt;</code> &#8220;. In a CDATA section, character data is any string of characters not including the CDATA-section-close delimiter, &#8221; 						<code>]]&gt;</code> &#8220;.</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://greenspringdesign.com/blog/?feed=rss2&amp;p=26</wfw:commentRss>
		</item>
		<item>
		<title>Coming soon: Lizakowski Labs</title>
		<link>http://greenspringdesign.com/blog/?p=24</link>
		<comments>http://greenspringdesign.com/blog/?p=24#comments</comments>
		<pubDate>Tue, 05 Jan 2010 15:06:58 +0000</pubDate>
		<dc:creator>Jeremy Lizakowski</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://greenspringdesign.com/blog/?p=24</guid>
		<description><![CDATA[I&#8217;m creating another blog to show some of my technical side-projects and research. This covers everything from programming, to robotics, number theory, optics &#38; lasers, circuit design, polymer chemistry, physics, psychology, economics, simulations, data visualization, and random experiments ala mythbusters.
Those who know me find these entertaining.  I figure that these random adventures should be shared.
At [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m creating another blog to show some of my technical side-projects and research. This covers everything from programming, to robotics, number theory, optics &amp; lasers, circuit design, polymer chemistry, physics, psychology, economics, simulations, data visualization, and random experiments ala mythbusters.</p>
<p>Those who know me find these entertaining.  I figure that these random adventures should be shared.</p>
<p>At present, the design is not finished - I&#8217;m adding some content before we tweak it.  It&#8217;s also a lower priority than client work. But I expect it to be launched this month.</p>
<p>When it&#8217;s ready, it will be at <a title="http://labs.lizakowski.com" href="http://labs.lizakowski.com">http://labs.lizakowski.com</a></p>
]]></content:encoded>
			<wfw:commentRss>http://greenspringdesign.com/blog/?feed=rss2&amp;p=24</wfw:commentRss>
		</item>
		<item>
		<title>Using multiple iTunes accounts on the same desktop</title>
		<link>http://greenspringdesign.com/blog/?p=23</link>
		<comments>http://greenspringdesign.com/blog/?p=23#comments</comments>
		<pubDate>Tue, 05 Jan 2010 14:56:58 +0000</pubDate>
		<dc:creator>Jeremy Lizakowski</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://greenspringdesign.com/blog/?p=23</guid>
		<description><![CDATA[I&#8217;m trying to use multiple iTunes accounts on my mac.  Some things, like music, I want to purchase with my personal iTunes account.  Other things, like work-related apps, I want to purchase with my business account.  I only want one desktop, so these two iTunes accounts must work on the same desktop / mac login.  [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m trying to use multiple iTunes accounts on my mac.  Some things, like music, I want to purchase with my personal iTunes account.  Other things, like work-related apps, I want to purchase with my business account.  I only want one desktop, so these two iTunes accounts must work on the same desktop / mac login.  Some googling found conflicting advice on how to do this, but I think I&#8217;m close to arranging it.  Here is what I have so far.</p>
<p>iTunes only allows one account to be associated with a library.  However, if you hold down the alt key when starting iTunes, it let&#8217;s you select or create a new library.  I created one library for personal and one for work.</p>
<p>The next step is to associate each library with a different account.  This does seem to work.  However, my initial finding is that itunes tends to stick with one or the other.  So, for now, one has to logout as the first user and then login as the other user.</p>
<p>I&#8217;d like to see if I can get it to remember the association of library-&gt;account.  However, the situation does seem workable.</p>
<p>One caveat is that an iPod can only be associated with one account.  If you leave it plugged in and open the other iTunes library, it offers to nuke the contents and sync with the other library.  You can make the message go away, and I&#8217;m guessing you could undo the erasure by syncing with the original iTunes library.  In fact, that might be handy - if it works that way.  I&#8217;m not quite ready to try this, as I&#8217;ve only had the iPod touch for a couple days, but it&#8217;s on my list for experimentation.</p>
]]></content:encoded>
			<wfw:commentRss>http://greenspringdesign.com/blog/?feed=rss2&amp;p=23</wfw:commentRss>
		</item>
		<item>
		<title>Prevent RSI injuries with RSIBreak</title>
		<link>http://greenspringdesign.com/blog/?p=21</link>
		<comments>http://greenspringdesign.com/blog/?p=21#comments</comments>
		<pubDate>Wed, 08 Apr 2009 22:43:26 +0000</pubDate>
		<dc:creator>Jeremy Lizakowski</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://greenspringdesign.com/blog/?p=21</guid>
		<description><![CDATA[On Kubuntu (and other distros), there is a program called RSIBreak.  It works like a screensaver, monitoring how much you type or use the mouse.   If you don&#8217;t stop for a break occasionally, per a schedule of breaks, then it reminds you to relax for 20-60 seconds.  As a result, the breaks are not based [...]]]></description>
			<content:encoded><![CDATA[<p>On Kubuntu (and other distros), there is a program called RSIBreak.  It works like a screensaver, monitoring how much you type or use the mouse.   If you don&#8217;t stop for a break occasionally, per a schedule of breaks, then it reminds you to relax for 20-60 seconds.  As a result, the breaks are not based on a fixed times, such as every 10 minutes, but are dynamic and depend on your natural usage.</p>
<p>It really works well, and stays out of the way more than I expected. It turns out that I take a lot of breaks anyways, usually while reading a webpage, so it only needs to remind me when I&#8217;m deep in coding or typing a long email.  Usually when it tells me to stop, I can tell that I need a break anyways.</p>
<p>If you don&#8217;t observe the popup, it optionally dims the screen and gives you the option to cancel or lock.  Often, if I&#8217;m &#8220;in the flow&#8221; while coding, I won&#8217;t notice the popup, and the dim screen is actually useful.  If you cancel, you can go back to working.  If you press &#8216;lock&#8217;, it locks you out for the prescribed number of seconds.  I believe you can also configure it to forcibly lock the desktop for every break without a cancel option, if you need the extra persuasion.</p>
]]></content:encoded>
			<wfw:commentRss>http://greenspringdesign.com/blog/?feed=rss2&amp;p=21</wfw:commentRss>
		</item>
		<item>
		<title>If your Ubuntu Jaunty Alpha or Beta has no keyboard or mouse&#8230;</title>
		<link>http://greenspringdesign.com/blog/?p=20</link>
		<comments>http://greenspringdesign.com/blog/?p=20#comments</comments>
		<pubDate>Wed, 08 Apr 2009 22:31:43 +0000</pubDate>
		<dc:creator>Jeremy Lizakowski</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://greenspringdesign.com/blog/?p=20</guid>
		<description><![CDATA[The keyboard and mouse fail to work under a certain kernel.  For whatever reason, the kbd and mouse drivers don&#8217;t load, and logging in becomes difficult.
Until a fix is sent during the beta testing, the secret is to boot with a different kernel.  Instead of the default, which was the server kernel for me, I [...]]]></description>
			<content:encoded><![CDATA[<p>The keyboard and mouse fail to work under a certain kernel.  For whatever reason, the kbd and mouse drivers don&#8217;t load, and logging in becomes difficult.</p>
<p>Until a fix is sent during the beta testing, the secret is to boot with a different kernel.  Instead of the default, which was the server kernel for me, I just used the generic kernel, which was the third option (on a fresh kubuntu install).  Then everything works fiine.</p>
]]></content:encoded>
			<wfw:commentRss>http://greenspringdesign.com/blog/?feed=rss2&amp;p=20</wfw:commentRss>
		</item>
		<item>
		<title>Google Calendar + Thunderbird + iCal Email invitations</title>
		<link>http://greenspringdesign.com/blog/?p=19</link>
		<comments>http://greenspringdesign.com/blog/?p=19#comments</comments>
		<pubDate>Fri, 03 Apr 2009 06:33:50 +0000</pubDate>
		<dc:creator>Jeremy Lizakowski</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://greenspringdesign.com/blog/?p=19</guid>
		<description><![CDATA[If you are trying to get google calendar working with thunderbird email invitations, it seems there are a few tricks to get it working.  Here are some quick notes that might be helpful:
Install lightning .9 or later.  If you are on x64, select &#8216;other systems&#8217; and you&#8217;ll be lead to the x64 version of the [...]]]></description>
			<content:encoded><![CDATA[<p>If you are trying to get google calendar working with thunderbird email invitations, it seems there are a few tricks to get it working.  Here are some quick notes that might be helpful:</p>
<p>Install lightning .9 or later.  If you are on x64, select &#8216;other systems&#8217; and you&#8217;ll be lead to the x64 version of the XPI file.  Firefox will offer to install this, but it&#8217;s a lightning plugin not a firefox plugin.  Ignore that and save to your hard drive, and install from lightning&#8217;s addons page instead.</p>
<p>Install google calendar provider 5.1 or later.</p>
<p>Add a new calendar, from the network, using &#8216;google&#8217;</p>
<p>Grab the ical link for private calendars on the sharing tab of your calendar&#8217;s properties page (I also tried xml but ical seemed better).</p>
<p>Check the error console if you have issues.</p>
<p>modification_failed:  due to wrong timezone in lightning.  If tz list doesn&#8217;t appear in the preferences, go to advaced config editor and blank out the timezone setting (it was set to &#8216;floating&#8217; in my case)</p>
<p>You need to set enablecalendarinvites option to true in the advanced options editor.  I also set the auto refresh timeout to 15  The default was 3, and the internet connection was slow (not sure if this helped)</p>
<p>To see updates, reload the remote calendars in lightning, then click the refresh link in google calendar.</p>
<p>Make sure that your thunderbird email account is selected in the properties for the local calendar.  You might also want to disable all calendars that are not google.  Otherwise, it&#8217;s easy to see an event that&#8217;s actually on your local non-google calendar, and then wonder why it&#8217;s not syncing.  Don&#8217;t just hide the calendar, actually disable it temporarily.</p>
<p>And, after much testing and trying, it finally worked.  It seemed that the specific recipe had been tested more than once, and only succeeded eventually.  Ditto on my windows laptop, which worked much better after chilling for 24 hours.</p>
<p>Some say you can make it work with just calDav.  That seemed to have too many issues when I tried it.  You don&#8217;t need all of this if you just want bi-directional calendar edits.  These extra steps are for enabling email invitations to be received and reflected both locally and on google.</p>
]]></content:encoded>
			<wfw:commentRss>http://greenspringdesign.com/blog/?feed=rss2&amp;p=19</wfw:commentRss>
		</item>
		<item>
		<title>Blackberry at Mach 8</title>
		<link>http://greenspringdesign.com/blog/?p=17</link>
		<comments>http://greenspringdesign.com/blog/?p=17#comments</comments>
		<pubDate>Sat, 21 Mar 2009 02:53:15 +0000</pubDate>
		<dc:creator>Jeremy Lizakowski</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://greenspringdesign.com/blog/?p=17</guid>
		<description><![CDATA[Apparently the blackberry simulator can&#8217;t handle a GPS simulation speed of around 2700 m/s.   The simulator crashed as soon as the setting took effect.
]]></description>
			<content:encoded><![CDATA[<p>Apparently the blackberry simulator can&#8217;t handle a GPS simulation speed of around 2700 m/s.   The simulator crashed as soon as the setting took effect.</p>
]]></content:encoded>
			<wfw:commentRss>http://greenspringdesign.com/blog/?feed=rss2&amp;p=17</wfw:commentRss>
		</item>
		<item>
		<title>Getting started with Blackberry Storm development</title>
		<link>http://greenspringdesign.com/blog/?p=16</link>
		<comments>http://greenspringdesign.com/blog/?p=16#comments</comments>
		<pubDate>Fri, 20 Mar 2009 22:42:58 +0000</pubDate>
		<dc:creator>Jeremy Lizakowski</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://greenspringdesign.com/blog/?p=16</guid>
		<description><![CDATA[After having the Blackberry Storm for a few weeks, and it&#8217;s time to build some apps.
To get started, you need the JDE (which is essentially Eclipse).  Java may be cross platform, but the JDE for the storm is not.  The JDE and simulator only runs on windows, and while they offer a plugin [...]]]></description>
			<content:encoded><![CDATA[<p>After having the Blackberry Storm for a few weeks, and it&#8217;s time to build some apps.</p>
<p>To get started, you need the JDE (which is essentially Eclipse).  Java may be cross platform, but the JDE for the storm is not.  The JDE and simulator only runs on windows, and while they offer a plugin for eclipse, it was easier just to install the prepackaged eclipse that has the plugin already configured.</p>
<p>A good resource for getting started is this document.</p>
<p><a href=" http://na.blackberry.com/eng/deliverables/5813/BlackBerry_Java_Development_Environment_getting_started.pdf">BlackBerry_Java_Development_Environment_getting_started.pdf</a></p>
<p>Also, make sure to set your PATH variable, or the compiler will fail to find javac.  I expected that to be done as part of the install process, but it has to be done manually.</p>
<p>The tutorial below has a good description of the steps required:</p>
<p><a href="http://devsushi.com/2007/11/15/getting-started-with-the-blackberry-java-development-environment-jde/">getting-started-with-the-blackberry-java-development-environment-jde/<br />
</a></p>
]]></content:encoded>
			<wfw:commentRss>http://greenspringdesign.com/blog/?feed=rss2&amp;p=16</wfw:commentRss>
		</item>
		<item>
		<title>SQL to find quickly find nearby addresses in Rails</title>
		<link>http://greenspringdesign.com/blog/?p=12</link>
		<comments>http://greenspringdesign.com/blog/?p=12#comments</comments>
		<pubDate>Fri, 20 Mar 2009 22:11:58 +0000</pubDate>
		<dc:creator>Jeremy Lizakowski</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://greenspringdesign.com/blog/?p=12</guid>
		<description><![CDATA[If you want to find nearby restaurants, gas stations, or hotels, in a Rails app, and if you want to sort by distance, you can use a custom sql query in Rails.  This will give better performance that trying to do it through ActiveRecord methods.
I profiled Active Record &#38; Rails last year, and found that [...]]]></description>
			<content:encoded><![CDATA[<p>If you want to find nearby restaurants, gas stations, or hotels, in a Rails app, and if you want to sort by distance, you can use a custom sql query in Rails.  This will give better performance that trying to do it through ActiveRecord methods.</p>
<p>I profiled Active Record &amp; Rails last year, and found that most of the application&#8217;s time was spent loading in *all* columns from the database, and parsing the values.  By only grabbing the necessary columns, and by pre-filtering with sql, this boosted performance by an order of magnitude.  As of early 2008, it was also faster to push the math calculations into sql.  With the new Ruby, Rails, and Merb combo coming out soon, these performance values will change.</p>
<p>The code below will create an array of Location objects.    First, it creates a bounding box, and limits record that fall within that rectangle.  Then, for remaining records, it calculates the sum of the squared differences to sort by distance.  The Sqrt isn&#8217;t necessary for sorting purposes.  If you want the distance, you can just take the sqrt of that value as needed.</p>
<p>The performance of this query will vary by database type, and it can be optimized further.  But this was sufficient for the app we were building.</p>
<p>This code expects variables called lat, lon, and offset_degrees (which is the search radius to limit results)<br />
<code><br />
search_results=Location.find_by_sql(<br />
[<br />
"SELECT<br />
loc.id, loc.name, loc.address, loc.city, loc.postalcode, loc.lat, loc.lon,<br />
( pow((lat - :testlat),2) + pow((lon - :testlon),2)) AS dist<br />
FROM locations AS loc<br />
WHERE (lat&lt; :maxlat AND lat &gt; :minlat AND lon &lt; :maxlon AND lon &gt; :minlon #{kwclause})<br />
HAVING dist&lt;:maxdist<br />
ORDER BY dist<br />
LIMIT 15;",<br />
{ :maxlat=&gt;(lat+offset_degrees), :minlat=&gt;(lat-offset_degrees), :maxlon=&gt;(lon+offset_degrees),<br />
:minlon=&gt;(lon-offset_degrees), :testlat=&gt;lat, :testlon=&gt;lon, :maxdist=&gt;(offset_degrees**2)<br />
}<br />
])<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://greenspringdesign.com/blog/?feed=rss2&amp;p=12</wfw:commentRss>
		</item>
		<item>
		<title>no such file to load &#8212; net/ssh (LoadError)</title>
		<link>http://greenspringdesign.com/blog/?p=15</link>
		<comments>http://greenspringdesign.com/blog/?p=15#comments</comments>
		<pubDate>Mon, 16 Mar 2009 22:25:44 +0000</pubDate>
		<dc:creator>Jeremy Lizakowski</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://greenspringdesign.com/blog/?p=15</guid>
		<description><![CDATA[no such file to load -- net/ssh (LoadError)
If you get that error, you might need to add  &#8216;require rubygems&#8217;
I received this error while trying to do a deployment without capistrano.  Cap was mostly undocumented, and now might be unsupported, so I&#8217;m trying to see if one can do the same with net-ssh directly.
]]></description>
			<content:encoded><![CDATA[<p><code>no such file to load -- net/ssh (LoadError)</code></p>
<p>If you get that error, you might need to add  &#8216;require rubygems&#8217;</p>
<p>I received this error while trying to do a deployment without capistrano.  Cap was mostly undocumented, and now might be unsupported, so I&#8217;m trying to see if one can do the same with net-ssh directly.</p>
]]></content:encoded>
			<wfw:commentRss>http://greenspringdesign.com/blog/?feed=rss2&amp;p=15</wfw:commentRss>
		</item>
	</channel>
</rss>
