<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>dreamchain</title>
	<atom:link href="http://www.dreamchain.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dreamchain.com</link>
	<description>It&#039;s all about code</description>
	<lastBuildDate>Fri, 11 May 2012 21:33:17 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>rApache on Debian 6.0 squeeze or Ubuntu 10.04 Lucid Lynx</title>
		<link>http://www.dreamchain.com/rapache-on-debian-6-0-squeeze/</link>
		<comments>http://www.dreamchain.com/rapache-on-debian-6-0-squeeze/#comments</comments>
		<pubDate>Wed, 07 Mar 2012 13:38:33 +0000</pubDate>
		<dc:creator>Simon</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[R]]></category>

		<guid isPermaLink="false">http://www.dreamchain.com/?p=152</guid>
		<description><![CDATA[This is how I installed and configured rApache on Debian 6.0 (squeeze). It should work on Ubuntu 10.04 Lucid Lynx also. Install R and Apache MPM prefork (I assume that Apache 2 is installed already): &#62; sudo aptitude install r-base r-base-dev apache2-mpm-prefork apache2-prefork-dev Download and build rApache from source: &#62; cd /usr/local/src &#62; sudo wget [...]]]></description>
			<content:encoded><![CDATA[<p>This is how I installed and configured rApache on Debian 6.0 (squeeze). It should work on Ubuntu 10.04 Lucid Lynx also.</p>
<p>Install R and Apache MPM prefork (I assume that Apache 2 is installed already):</p>
<p><code></p>
<pre>
&gt; sudo aptitude install r-base r-base-dev apache2-mpm-prefork apache2-prefork-dev
</pre>
<p></code></p>
<p>Download and build rApache from source:</p>
<p><code></p>
<pre>
&gt; cd /usr/local/src
&gt; sudo wget http://biostat.mc.vanderbilt.edu/rapache/rapache-1.1.17.tar.gz
&gt; sudo tar xzf rapache-1.1.17.tar.gz
&gt; cd rapache-1.1.17
&gt; sudo ./configure
&gt; sudo make
&gt; sudo make install
</pre>
<p></code></p>
<p>Create file <code>/etc/apache2/mods-available/R.load</code> with content:<br />
<code></p>
<pre>
LoadModule R_module /usr/lib/apache2/modules/mod_R.so
</pre>
<p></code></p>
<p>Enable mod_R:<br />
<code></p>
<pre>
&gt; sudo a2enmod R
</pre>
<p></code></p>
<p>Create folder <code>/var/www/r-scripts</code> .</p>
<p>Add the following to <code>/etc/apache2/sites-available/default</code> inside <code>&lt;VirtualHost *:80&gt;</code>:</p>
<p><code></p>
<pre>
&lt;VirtualHost *:80&gt;
	...
	&lt;Directory /var/www/r-scripts/&gt;
		SetHandler r-script
		RHandler sys.source
	&lt;/Directory&gt;
	...
&lt;/Directory&gt;
</pre>
<p></code></p>
<p>Created file <code>/var/www/r-scripts/hello.R</code> with the following content:<br />
<code></p>
<pre>
setContentType(type='text/plain')
cat('Hello')
DONE
</pre>
<p></code></p>
<p>Restart Apache:<br />
<code></p>
<pre>
sudo /etc/init.d/apache2 restart
</pre>
<p></code></p>
<p>Verify that it works:<br />
<code></p>
<pre>
wget -qO- http://localhost/r-scripts/hello.R
Hello
</pre>
<p></code></p>
<p>Done.</p>
<p>References:</p>
<ul>
<li><a href="http://rapache.net/manual.html">http://rapache.net/manual.html</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.dreamchain.com/rapache-on-debian-6-0-squeeze/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Apache Server, Tomcat and mod_jk on Debian 6.0 squeeze</title>
		<link>http://www.dreamchain.com/apache-server-tomcat-mod_jk-on-debian-6-0-squeeze/</link>
		<comments>http://www.dreamchain.com/apache-server-tomcat-mod_jk-on-debian-6-0-squeeze/#comments</comments>
		<pubDate>Wed, 07 Mar 2012 08:14:17 +0000</pubDate>
		<dc:creator>Simon</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[tomcat]]></category>
		<category><![CDATA[Unix]]></category>

		<guid isPermaLink="false">http://www.dreamchain.com/?p=125</guid>
		<description><![CDATA[This is how I integrated Tomcat 6 with Apache 2 on Debian 6.0 (squeeze) using mod_jk. It should also work on Ubuntu 10.04 Lucid Lynx. Install Apache Web Server: &#62; aptitude install apache2 Verify that the server is running: &#62; wget -qO- http://localhost &#124; head -1 &#60;html&#62;&#60;body&#62;&#60;h1&#62;It works!&#60;/h1&#62; Install Tomcat (you don&#8217;t need to install [...]]]></description>
			<content:encoded><![CDATA[<p>This is how I integrated Tomcat 6 with Apache 2 on Debian 6.0 (squeeze) using mod_jk. It should also work on Ubuntu 10.04 Lucid Lynx.</p>
<p>Install Apache Web Server:<br />
<code></p>
<pre>
&gt; aptitude install apache2
</pre>
<p></code></p>
<p>Verify that the server is running:<br />
<code></p>
<pre>
&gt; wget -qO- http://localhost | head -1
&lt;html&gt;&lt;body&gt;&lt;h1&gt;It works!&lt;/h1&gt;
</pre>
<p></code></p>
<p>Install Tomcat (you don&#8217;t need to install tomcat6-examples, I did it only for the purpose of this How To):<br />
<code></p>
<pre>
&gt; aptitude install tomcat6 tomcat6-examples
</pre>
<p></code></p>
<p>Verify that Tomcat server is running:<br />
<code></p>
<pre>
&gt; wget -qO- http://localhost:8080 | head -11 | tail -1
&lt;h1&gt;It works !&lt;/h1&gt;
</pre>
<p></code></p>
<p>Install mod_jk:<br />
<code></p>
<pre>
&gt; aptitude install libapache2-mod-jk
</pre>
<p></code></p>
<p>Create file <code>/etc/apache2/workers.properties</code> with the following content:<br />
<code></p>
<pre>
worker.list=worker1
worker.worker1.type=ajp13
worker.worker1.host=localhost
worker.worker1.port=8009
</pre>
<p></code></p>
<p>Create file <code>/etc/apache2/mods-available/jk.conf</code> with the following content:<br />
<code></p>
<pre>
JkWorkersFile	/etc/apache2/workers.properties
JkShmFile	/var/log/apache2/mod_jk.shm
JkLogFile	/var/log/apache2/mod_jk.log
JkLogLevel	info
</pre>
<p></code></p>
<p>Enable jk conf:<br />
<code></p>
<pre>
&gt; a2enmod jk
</pre>
<p></code></p>
<p>Add mount point to /etc/apache2/sites-available/default:<br />
<code></p>
<pre>
&lt;VirtualHost *:80&gt;
	...
	JkMount		/examples/* worker1
	...
&lt;/VirtualHost&gt;
</pre>
<p></code></p>
<p>Uncomment the following line in /etc/tomcat6/server.xml:<br />
<code></p>
<pre>
&lt;Connector port=&quot;8009&quot; protocol=&quot;AJP/1.3&quot; redirectPort=&quot;8443&quot; /&gt;
</pre>
<p></code></p>
<p>Restart Tomcat:<br />
<code></p>
<pre>
&gt; /etc/init.d/tomcat6 restart
</pre>
<p></code></p>
<p>Restart Apache web server:<br />
<code></p>
<pre>
&gt; /etc/init.d/apache2 restart
</pre>
<p></code></p>
<p>Now verify that everything works:</p>
<p><code></p>
<pre>
&gt; wget -qO- http://localhost/examples/ | tail -7 | head -1
&lt;H3&gt;Apache Tomcat Examples&lt;/H3&gt;
</pre>
<p></code></p>
<p>Done.</p>
<p>Here is a <a href="https://github.com/shagstrom/lucid32/blob/master/setup-apache2-tomcat6-modjk.bash">complete script for setting up Apache 2, Tomcat 6 and mod_jk</a> on Ubuntu 10.04.</p>
<p>References:</p>
<ul>
<li><a href="http://tomcat.apache.org/connectors-doc/generic_howto/quick.html">http://tomcat.apache.org/connectors-doc/generic_howto/quick.html</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.dreamchain.com/apache-server-tomcat-mod_jk-on-debian-6-0-squeeze/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>MacPorts, Clojure and ClassNotFoundException</title>
		<link>http://www.dreamchain.com/macports-clojure-and-classnotfoundexception/</link>
		<comments>http://www.dreamchain.com/macports-clojure-and-classnotfoundexception/#comments</comments>
		<pubDate>Wed, 11 Jan 2012 11:15:14 +0000</pubDate>
		<dc:creator>Simon</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Clojure]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[MacPorts]]></category>

		<guid isPermaLink="false">http://www.dreamchain.com/?p=119</guid>
		<description><![CDATA[After installing Clojure with MacPorts I got the following exception when running a basic Clojure script: Exception in thread "main" java.lang.NoClassDefFoundError: Pad:/opt/local/share/java/clojure/bin////lib/clojure/jar Caused by: java.lang.ClassNotFoundException: Pad:.opt.local.share.java.clojure.bin....lib.clojure.jar at java.net.URLClassLoader$1.run(URLClassLoader.java:202) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:247) As it turned out, I had run the script from a folder with a space in [...]]]></description>
			<content:encoded><![CDATA[<p>After installing Clojure with MacPorts I got the following exception when running a basic Clojure script:</p>
<p><code></p>
<pre>
Exception in thread "main" java.lang.NoClassDefFoundError: Pad:/opt/local/share/java/clojure/bin////lib/clojure/jar
Caused by: java.lang.ClassNotFoundException: Pad:.opt.local.share.java.clojure.bin....lib.clojure.jar
	at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
</pre>
<p></code></p>
<p>As it turned out, I had run the script from a folder with a space in it&#8217;s name, &#8220;Scratch Pad&#8221;. After moving the script to an other folder, the script ran just fine.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dreamchain.com/macports-clojure-and-classnotfoundexception/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Grails, CoffeeScript and Eclipse</title>
		<link>http://www.dreamchain.com/grails-coffeescript-and-eclipse/</link>
		<comments>http://www.dreamchain.com/grails-coffeescript-and-eclipse/#comments</comments>
		<pubDate>Sun, 30 Oct 2011 00:49:29 +0000</pubDate>
		<dc:creator>Simon</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[CoffeeScript]]></category>
		<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[Grails]]></category>

		<guid isPermaLink="false">http://www.dreamchain.com/?p=115</guid>
		<description><![CDATA[I&#8217;m using the Grails CoffeeScript plugin, but when running my Grails application from Eclipse, with run-app, I got the following error: Compiling CoffeeScript Files ...ERROR Launching CoffeeScript compiler: Cannot run program "coffee": error=2, No such file or directory Now, in order to fix this you need to tell the CoffeeScript Grails plugin where to find [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m using the Grails CoffeeScript plugin, but when running my Grails application from Eclipse, with run-app, I got the following error:</p>
<p><code></p>
<pre>
Compiling CoffeeScript Files ...ERROR Launching CoffeeScript compiler: Cannot run program "coffee": error=2, No such file or directory
</pre>
<p></code></p>
<p>Now, in order to fix this you need to tell the CoffeeScript Grails plugin where to find the <code>coffee</code> command. You can do this in <code>BuildConfig.groovy</code> by adding this line:</p>
<p><code></p>
<pre>
grails.coffeescript.compiler.location="/opt/local/bin/coffee"
</pre>
<p></code></p>
<p>But, this is not enough, because now I get the following error:</p>
<p><code></p>
<pre>
Compiling CoffeeScript Files ...env: node: No such file or directory
</pre>
<p></code></p>
<p>The solution I found to this problem was editing <code>/opt/local/bin/coffee</code>, changing</p>
<p><code></p>
<pre>
#!/usr/bin/env node
</pre>
<p></code></p>
<p>to</p>
<p><code></p>
<pre>
#!/opt/local/bin/node
</pre>
<p></code></p>
<p>Now I&#8217;m able to do <code>run-app</code> from within Eclipse.</p>
<p>Keep in mind that I&#8217;m on a Mac having installed CoffeeScript with npm, and node and npm with MacPorts. You might have your CoffeeScript installation in a different location.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dreamchain.com/grails-coffeescript-and-eclipse/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Port forwarding from port 80 to port 8080 with iptables</title>
		<link>http://www.dreamchain.com/port-forwarding-from-port-80-to-port-8080-with-iptables/</link>
		<comments>http://www.dreamchain.com/port-forwarding-from-port-80-to-port-8080-with-iptables/#comments</comments>
		<pubDate>Mon, 24 Oct 2011 16:01:44 +0000</pubDate>
		<dc:creator>Simon</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[tomcat]]></category>

		<guid isPermaLink="false">http://www.dreamchain.com/?p=113</guid>
		<description><![CDATA[If you need to do port forwarding from port 80 to port 8080 (maybe you are running tomcat on port 8080) you can do it with iptables like this: sudo iptables -A PREROUTING -d $HOSTNAME -p tcp --dport 80 -j REDIRECT --to-ports 8080 -t nat If you want to revert the change to iptables do [...]]]></description>
			<content:encoded><![CDATA[<p>If you need to do port forwarding from port 80 to port 8080 (maybe you are running tomcat on port 8080) you can do it with iptables like this:</p>
<p><code></p>
<pre>
sudo iptables -A PREROUTING -d $HOSTNAME -p tcp --dport 80 -j REDIRECT --to-ports 8080 -t nat
</pre>
<p></code></p>
<p>If you want to revert the change to iptables do this:</p>
<p><code></p>
<pre>
sudo iptables -F -t nat
</pre>
<p></code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.dreamchain.com/port-forwarding-from-port-80-to-port-8080-with-iptables/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>max-width and height: auto for images in IE8</title>
		<link>http://www.dreamchain.com/max-width-and-height-auto-for-images-in-ie8/</link>
		<comments>http://www.dreamchain.com/max-width-and-height-auto-for-images-in-ie8/#comments</comments>
		<pubDate>Fri, 21 Oct 2011 21:49:22 +0000</pubDate>
		<dc:creator>Simon</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Internet Explorer]]></category>

		<guid isPermaLink="false">http://www.dreamchain.com/?p=98</guid>
		<description><![CDATA[In IE8, if you have an image with the following markup and css: &#60;img src="image.png" width="400" height="300" /&#62; img { width: 100%; max-width: 400px; height: auto; } the image height is going to grow past 300px in non-compatibility view! In order to fix this issue add max-height: 300px; to the css.]]></description>
			<content:encoded><![CDATA[<p>In IE8, if you have an image with the following markup and css:</p>
<pre class="brush:xml">&lt;img src="image.png" width="400" height="300" /&gt;</pre>
<pre class="brush:css">img {
	width: 100%;
	max-width: 400px;
	height: auto;
}</pre>
<p>the image height is going to grow past 300px in non-compatibility view!</p>
<p>In order to fix this issue add <code>max-height: 300px;</code> to the css.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dreamchain.com/max-width-and-height-auto-for-images-in-ie8/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to sync MacPorts without rsync</title>
		<link>http://www.dreamchain.com/how-to-sync-mac-ports-without-rsync/</link>
		<comments>http://www.dreamchain.com/how-to-sync-mac-ports-without-rsync/#comments</comments>
		<pubDate>Fri, 21 Oct 2011 21:31:32 +0000</pubDate>
		<dc:creator>Simon</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[MacPorts]]></category>

		<guid isPermaLink="false">http://www.dreamchain.com/?p=93</guid>
		<description><![CDATA[If port 873 is blocked on your network and you need to sync MacPorts do this: In /opt/local/etc/macports/sources.conf replace rsync://rsync.macports.org/release/ports/ [default] with http://www.macports.org/files/ports.tar.gz [default] and run sudo port sync instead of sudo port selfupdate MacPorts is now synching using http over port 80 instead of rsync over port 873.]]></description>
			<content:encoded><![CDATA[<p>If port 873 is blocked on your network and you need to sync MacPorts do this:</p>
<p>In <code>/opt/local/etc/macports/sources.conf</code> replace <br />
<code></p>
<pre>
rsync://rsync.macports.org/release/ports/ [default]
</pre>
<p></code></p>
<p>with <br />
<code></p>
<pre>
http://www.macports.org/files/ports.tar.gz [default]
</pre>
<p></code></p>
<p>and run<br />
<code></p>
<pre>
sudo port sync
</pre>
<p></code></p>
<p>instead of<br />
<code></p>
<pre>
sudo port selfupdate
</pre>
<p></code></p>
<p>MacPorts is now synching using http over port 80 instead of rsync over port 873.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dreamchain.com/how-to-sync-mac-ports-without-rsync/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tuckey rewrite rule has new default value</title>
		<link>http://www.dreamchain.com/tuckey-rewrite-rule-has-new-default-value/</link>
		<comments>http://www.dreamchain.com/tuckey-rewrite-rule-has-new-default-value/#comments</comments>
		<pubDate>Thu, 30 Jun 2011 16:11:36 +0000</pubDate>
		<dc:creator>Simon</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://www.dreamchain.com/?p=73</guid>
		<description><![CDATA[After upgrading from Tuckey UrlRewrite 3.0 to 3.1 I noticed that the default value for the last attribute has changed from true to false, so I had to do some small changes to the xml configuration. Old rules: &#60;!DOCTYPE urlrewrite PUBLIC "-//tuckey.org//DTD UrlRewrite 3.0//EN" "http://www.tuckey.org/res/dtds/urlrewrite3.1.dtd"&#62; &#60;urlrewrite default-match-type="wildcard"&#62; &#60;rule&#62; &#60;from&#62;/images/**&#60;/from&#62; &#60;to&#62;/images/$1&#60;/to&#62; &#60;/rule&#62; &#60;rule&#62; &#60;from&#62;/scripts/**&#60;/from&#62; &#60;to&#62;/scripts/$1&#60;/to&#62; &#60;/rule&#62; [...]]]></description>
			<content:encoded><![CDATA[<p>After upgrading from Tuckey UrlRewrite 3.0 to 3.1 I noticed that the default value for the <code>last</code>  attribute has changed from <code>true</code> to <code>false</code>, so I had to do some small changes to the xml configuration.</p>
<p>Old rules:</p>
<pre class="brush:xml">&lt;!DOCTYPE urlrewrite PUBLIC "-//tuckey.org//DTD UrlRewrite 3.0//EN"
		"http://www.tuckey.org/res/dtds/urlrewrite3.1.dtd"&gt;
&lt;urlrewrite default-match-type="wildcard"&gt;
	&lt;rule&gt;
		&lt;from&gt;/images/**&lt;/from&gt;
		&lt;to&gt;/images/$1&lt;/to&gt;
	&lt;/rule&gt;
	&lt;rule&gt;
		&lt;from&gt;/scripts/**&lt;/from&gt;
		&lt;to&gt;/scripts/$1&lt;/to&gt;
	&lt;/rule&gt;
	&lt;rule&gt;
		&lt;from&gt;/styles/**&lt;/from&gt;
		&lt;to&gt;/styles/$1&lt;/to&gt;
	&lt;/rule&gt;
 	&lt;rule&gt;
		&lt;from&gt;/**&lt;/from&gt;
		&lt;to&gt;/app/$1&lt;/to&gt;
	&lt;/rule&gt;
	&lt;outbound-rule&gt;
		&lt;from&gt;/app/**&lt;/from&gt;
		&lt;to&gt;/$1&lt;/to&gt;
	&lt;/outbound-rule&gt;
&lt;/urlrewrite&gt;</pre>
<p>New rules:</p>
<pre class="brush:xml">
&lt;!DOCTYPE urlrewrite PUBLIC "-//tuckey.org//DTD UrlRewrite 3.1//EN"
		"http://www.tuckey.org/res/dtds/urlrewrite3.1.dtd"&gt;
&lt;urlrewrite default-match-type="wildcard"&gt;
	&lt;rule&gt;
		&lt;from&gt;/images/**&lt;/from&gt;
		&lt;to last="true"&gt;/images/$1&lt;/to&gt;
	&lt;/rule&gt;
	&lt;rule&gt;
		&lt;from&gt;/scripts/**&lt;/from&gt;
		&lt;to last="true"&gt;/scripts/$1&lt;/to&gt;
	&lt;/rule&gt;
	&lt;rule&gt;
		&lt;from&gt;/styles/**&lt;/from&gt;
		&lt;to last="true"&gt;/styles/$1&lt;/to&gt;
	&lt;/rule&gt;
 	&lt;rule&gt;
		&lt;from&gt;/**&lt;/from&gt;
		&lt;to&gt;/app/$1&lt;/to&gt;
	&lt;/rule&gt;
	&lt;outbound-rule&gt;
		&lt;from&gt;/app/**&lt;/from&gt;
		&lt;to&gt;/$1&lt;/to&gt;
	&lt;/outbound-rule&gt;
&lt;/urlrewrite&gt;</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.dreamchain.com/tuckey-rewrite-rule-has-new-default-value/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fastest JavaScript framework</title>
		<link>http://www.dreamchain.com/fastest-javascript-framework/</link>
		<comments>http://www.dreamchain.com/fastest-javascript-framework/#comments</comments>
		<pubDate>Tue, 28 Jun 2011 03:40:41 +0000</pubDate>
		<dc:creator>Simon</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[MooTools]]></category>
		<category><![CDATA[Prototype]]></category>

		<guid isPermaLink="false">http://www.dreamchain.com/?p=56</guid>
		<description><![CDATA[I had to implement what I call a &#8220;row selector&#8221; for a web application. It looks something like this (try it out by clicking the checkboxes in the first column): Now, the tricky part is that this should work for large documents, say 500 rows. I have implemented this with jQuery, Prototype, MooTools and pure [...]]]></description>
			<content:encoded><![CDATA[<p>I had to implement what I call a &#8220;row selector&#8221; for a web application.</p>
<p>It looks something like this (try it out by clicking the checkboxes in the first column):</p>
<p><iframe scrolling="no" src="http://www.dreamchain.com/static/speed-test/row-selector.html"></iframe></p>
<p>Now, the tricky part is that this should work for large documents, say 500 rows.</p>
<p>I have implemented this with jQuery, Prototype, MooTools and pure JavaScript, and these are the results I get when toggling all 500 rows in IE8 on a Windows box with 512MB RAM:</p>
<ul>
<li>jQuery 1.6.1: 2000ms</li>
<li>Prototype 1.7.0: 2450ms</li>
<li>MooTools 1.3.2: 6300ms (first toggle) / 1100ms</li>
<li>JavaScript: 250ms</li>
</ul>
<p>These are some numbers for Firefox 5, running on the same machine:</p>
<ul>
<li>jQuery 1.6.1: 150ms</li>
<li>Prototype 1.7.0: 120ms</li>
<li>MooTools 1.3.2: 230ms</li>
<li>JavaScript: 100ms</li>
</ul>
<p>We have to support IE, so choosing the pure JavaScript version was a no-brainer.</p>
<p>Here are the results for the jQuery version on an iMac with 2GB RAM:</p>
<ul>
<li>Google Chrome 12: 380ms</li>
<li>Safari 5: 150ms</li>
<li>Firefox 5: 140ms</li>
</ul>
<p>It looks like Chrome is falling behind&#8230;</p>
<p>Try it out for yourself: <a href="http://www.dreamchain.com/static/speed-test/jquery.php">jQuery</a>, <a href="http://www.dreamchain.com/static/speed-test/prototype.php">Prototype</a>, <a href="http://www.dreamchain.com/static/speed-test/mootools.php">MooTools</a> and <a href="http://www.dreamchain.com/static/speed-test/javascript.php">JavaScript</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dreamchain.com/fastest-javascript-framework/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CSS only drop-down menus (with submenus)</title>
		<link>http://www.dreamchain.com/css-only-drop-down-menus/</link>
		<comments>http://www.dreamchain.com/css-only-drop-down-menus/#comments</comments>
		<pubDate>Sun, 26 Jun 2011 15:48:59 +0000</pubDate>
		<dc:creator>Simon</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML]]></category>

		<guid isPermaLink="false">http://www.dreamchain.com/?p=33</guid>
		<description><![CDATA[Who needs JavaScript to do drop-down menus on a HTML web-page? Anyway, I gave it a try. This does not work in IE6, since I&#8217;m using the child selector and the :hover pseudo class. Personally, I think that we should stop supporting IE6, so that we can all focus on other things. I&#8217;m using a CSS [...]]]></description>
			<content:encoded><![CDATA[<p>Who needs JavaScript to do drop-down menus on a HTML web-page? Anyway, I gave it a try.</p>
<p>This does <strong>not</strong> work in IE6, since I&#8217;m using the <a href="http://www.w3.org/TR/CSS2/selector.html#child-selectors">child selector</a> and the <a href="http://www.w3.org/TR/CSS2/selector.html#dynamic-pseudo-classes">:hover pseudo class</a>. Personally, I think that we should <a href="http://www.ie6nomore.com/">stop supporting IE6</a>, so that we can all focus on other things.</p>
<p>I&#8217;m using a CSS IE hack below since IE doesn&#8217;t do inline-block on block elements.</p>
<p>With the following HTML:</p>
<pre class="brush:xml">&lt;ul class="navbar"&gt;
	&lt;li&gt;Meat&lt;/li&gt;
	&lt;li&gt;Vegetables&lt;/li&gt;
	&lt;li&gt;Fruit and lots of fruit
		&lt;ul&gt;
			&lt;li&gt;Organge&lt;/li&gt;
			&lt;li&gt;Apple
				&lt;ul&gt;
					&lt;li&gt;Fuji&lt;/li&gt;
					&lt;li&gt;Gala&lt;/li&gt;
					&lt;li&gt;Granny Smith
						&lt;ul&gt;
							&lt;li&gt;Red&lt;/li&gt;
							&lt;li&gt;Green&lt;/li&gt;
						&lt;/ul&gt;
					&lt;/li&gt;
				&lt;/ul&gt;
			&lt;/li&gt;
			&lt;li&gt;Pomgranade&lt;/li&gt;
		&lt;/ul&gt;
	&lt;/li&gt;
&lt;/ul&gt;</pre>
<p>just add this CSS:</p>
<pre class="brush:css">
.navbar, .navbar ul {
	list-style-type: none;
	margin: 0;
	padding: 0;
}

.navbar li {
	position: relative;
	padding: 0.5em;
	white-space: nowrap;
}

.navbar &gt; li {
	display: inline-block;
	zoom: 1;
	*display: inline;
}

.navbar ul {
	display: none;
	position: absolute;
	left: 0;
	top: 100%;
}

.navbar li:hover &gt; ul {
	display: block;
}

.navbar ul ul {
	left: 100%;
	top: 0;
}
</pre>
<p>If you put it all together, this is what it looks like, with a <a href="/static/navbar.css">tiny theme</a> added:</p>
<p><iframe scrolling="no" height="300px" src="http://www.dreamchain.com/static/drop-down-menu.html"></iframe></p>
]]></content:encoded>
			<wfw:commentRss>http://www.dreamchain.com/css-only-drop-down-menus/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

