<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Inside bytes and codes</title>
	<atom:link href="http://leonardom.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://leonardom.wordpress.com</link>
	<description>Playing with Java, Ruby, Flex and Scala languages</description>
	<lastBuildDate>Wed, 18 Jan 2012 10:44:46 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='leonardom.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Inside bytes and codes</title>
		<link>http://leonardom.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://leonardom.wordpress.com/osd.xml" title="Inside bytes and codes" />
	<atom:link rel='hub' href='http://leonardom.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Install Wireless USB Adapter TL-WN721N driver on Ubuntu 10.4</title>
		<link>http://leonardom.wordpress.com/2010/05/24/install-wireless-usb-adapter-tl-wn721n-driver-on-ubuntu-10-4/</link>
		<comments>http://leonardom.wordpress.com/2010/05/24/install-wireless-usb-adapter-tl-wn721n-driver-on-ubuntu-10-4/#comments</comments>
		<pubDate>Mon, 24 May 2010 13:59:17 +0000</pubDate>
		<dc:creator>Leonardo</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[TL-WN721N]]></category>
		<category><![CDATA[usb]]></category>
		<category><![CDATA[wireless]]></category>

		<guid isPermaLink="false">http://leonardom.wordpress.com/?p=141</guid>
		<description><![CDATA[Hello Folks, This last weekend and I have to play a little bit with Ubuntu 10.4 and my new wireless USB adapter TP-LINK model TL-WN721N. The Ubuntu 10.4 has not recognized the adapter, so I had to ask Google how to make that works. I&#8217;ve tried many things, one was using diswrapper with Windows Driver, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=leonardom.wordpress.com&amp;blog=4884969&amp;post=141&amp;subd=leonardom&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Hello Folks,</p>
<p>This last weekend and I have to play a little bit with Ubuntu 10.4 and my new wireless USB adapter TP-LINK model TL-WN721N. The Ubuntu 10.4 has not recognized the adapter, so I had to ask Google how to make that works. I&#8217;ve tried many things, one was using diswrapper with Windows Driver, but did not work. After another attempts I found a solution, and I decide to write here.</p>
<p>The first step is to get the firmware, you can download it from the following link:<br />
<a href="http://git.kernel.org/?p=linux/kernel/git/dwmw2/linux-firmware.git;a=blob_plain;f=ar9271.fw;hb=35b308409dc18991ec833c24972fd631c9f479a1" target="_blank">http://git.kernel.org/?p=linux/kernel/git/dwmw2/linux-firmware.git;a=blob_plain;f=ar9271.fw;hb=35b308409dc18991ec833c24972fd631c9f479a1</a></p>
<p>After the download you need to copy it to /dev/firmware directory:</p>
<pre>sudo cp -r ~/Downloads/ar9271.fw /lib/firmware</pre>
<p>Now we need to get the latest version of compact wireless, you can get it from the link below:</p>
<p><a href="http://wireless.kernel.org/download/compat-wireless-2.6/">http://wireless.kernel.org/download/compat-wireless-2.6/</a></p>
<p>I got the file <a href="http://wireless.kernel.org/download/compat-wireless-2.6/compat-wireless-2.6.tar.bz2">compat-wireless-2.6.tar.bz2</a></p>
<p>After the download you will need to uncompress the file:</p>
<pre>tar -xjvf compat-wireless-2.6.tar.bz2</pre>
<p>Now, it&#8217;s time to compile the driver. Enter in directory:</p>
<pre>cd compat-wireless-2010-05-23/</pre>
<p>and type the command:</p>
<pre>sudo make</pre>
<p>After the compilation, you can install the driver using the command:</p>
<pre>sudo make install</pre>
<p>Now, you need to unload the old driver and load the new one:</p>
<pre>sudo make unload
sudo make load ath9k_htc</pre>
<p>After loading the new driver you must reboot you system and once the system rebooted you will be able to use your wireless connection.</p>
<p>I hope this tip will be useful for you.</p>
<p>See you!!</p>
<p>Leo</p>
<p><strong>Reference: </strong><a href="http://www.theinquirer.net/inquirer/news/1603562/canonical-releases-ubuntu-linux-04-lts">http://www.theinquirer.net/inquirer/news/1603562/canonical-releases-ubuntu-linux-04-lts</a></p>
<p><strong><br />
</strong></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/leonardom.wordpress.com/141/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/leonardom.wordpress.com/141/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/leonardom.wordpress.com/141/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/leonardom.wordpress.com/141/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/leonardom.wordpress.com/141/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/leonardom.wordpress.com/141/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/leonardom.wordpress.com/141/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/leonardom.wordpress.com/141/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/leonardom.wordpress.com/141/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/leonardom.wordpress.com/141/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/leonardom.wordpress.com/141/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/leonardom.wordpress.com/141/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/leonardom.wordpress.com/141/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/leonardom.wordpress.com/141/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=leonardom.wordpress.com&amp;blog=4884969&amp;post=141&amp;subd=leonardom&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://leonardom.wordpress.com/2010/05/24/install-wireless-usb-adapter-tl-wn721n-driver-on-ubuntu-10-4/feed/</wfw:commentRss>
		<slash:comments>44</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b1bf996ed6c1c7b3492d9b38eb0fa803?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Leo</media:title>
		</media:content>
	</item>
		<item>
		<title>Glassfish v3 as Windows Service</title>
		<link>http://leonardom.wordpress.com/2010/01/26/glassfish-v3-as-windows-service/</link>
		<comments>http://leonardom.wordpress.com/2010/01/26/glassfish-v3-as-windows-service/#comments</comments>
		<pubDate>Tue, 26 Jan 2010 14:02:40 +0000</pubDate>
		<dc:creator>Leonardo</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[glassfishv3]]></category>
		<category><![CDATA[service]]></category>

		<guid isPermaLink="false">http://leonardom.wordpress.com/?p=136</guid>
		<description><![CDATA[That&#8217;s is something simple but I&#8217;ve taken a long time to figure out how to set my Glassfish v3 server as a Windows Service. After a long time doing google searching, I came across a simple solution. All that you need to do is enter in your Glassfish v3 bin directory and run the command: [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=leonardom.wordpress.com&amp;blog=4884969&amp;post=136&amp;subd=leonardom&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>That&#8217;s is something simple but I&#8217;ve taken a long time to figure out how to set my Glassfish v3 server as a Windows Service.</p>
<p>After a long time doing google searching, I came across a simple solution. All that you need to do is enter in your Glassfish v3 bin directory and run the command:</p>
<pre>c:\glassfishv3\bin\asadmin create-service</pre>
<p>Yeah! Just it will work!</p>
<p>I hope this tip be useful for you too!</p>
<p>See you . . .</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/leonardom.wordpress.com/136/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/leonardom.wordpress.com/136/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/leonardom.wordpress.com/136/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/leonardom.wordpress.com/136/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/leonardom.wordpress.com/136/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/leonardom.wordpress.com/136/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/leonardom.wordpress.com/136/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/leonardom.wordpress.com/136/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/leonardom.wordpress.com/136/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/leonardom.wordpress.com/136/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/leonardom.wordpress.com/136/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/leonardom.wordpress.com/136/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/leonardom.wordpress.com/136/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/leonardom.wordpress.com/136/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=leonardom.wordpress.com&amp;blog=4884969&amp;post=136&amp;subd=leonardom&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://leonardom.wordpress.com/2010/01/26/glassfish-v3-as-windows-service/feed/</wfw:commentRss>
		<slash:comments>21</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b1bf996ed6c1c7b3492d9b38eb0fa803?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Leo</media:title>
		</media:content>
	</item>
		<item>
		<title>Aprenda DB2, um dos bancos que mais cresce no mercado!</title>
		<link>http://leonardom.wordpress.com/2009/11/30/aprenda-db2-um-dos-bancos-que-mais-cresce-no-mercado/</link>
		<comments>http://leonardom.wordpress.com/2009/11/30/aprenda-db2-um-dos-bancos-que-mais-cresce-no-mercado/#comments</comments>
		<pubDate>Mon, 30 Nov 2009 11:51:48 +0000</pubDate>
		<dc:creator>Leonardo</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[DB2]]></category>
		<category><![CDATA[ibm]]></category>

		<guid isPermaLink="false">http://leonardom.wordpress.com/?p=133</guid>
		<description><![CDATA[Não conhece o Banco de Dados IBM DB2? Ele é um dos bancos com maior participação corportiva! Grandes empresas o utilizam e estão migrando para o mesmo! Recentemente a IBM ganhou uma conta num dos maiores bancos do Brasil para implementar a solução de DataWarehouse, baseada no DB2 é claro! E essa conta não foi [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=leonardom.wordpress.com&amp;blog=4884969&amp;post=133&amp;subd=leonardom&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong>Não conhece o Banco de Dados IBM DB2? </strong></p>
<p>Ele é um dos bancos com maior participação <strong>corportiva</strong>! Grandes empresas o utilizam e estão migrando para o mesmo! Recentemente a IBM ganhou uma conta num dos maiores bancos do Brasil para implementar a solução de DataWarehouse, baseada no DB2 é claro! E essa conta não foi a primeira e nem será a última!</p>
<p>A IBM está altamente comprometida com sua área de Information Management, e está investindo pesado em desenvolvimento, pesquisa e marketing. Um ponto importantíssimo para o Brasil, é que a IBM recentemente inaugurou um Laboratório de desenvolvimento do DB2 em São Paulo, no qual eu trabalho!</p>
<p>Já percebeu então que é importante conhecer DB2 para conseguir uma boa alocação no mercado de TI não é? Então ai vão alguns links para você começar sua brincadeira:</p>
<p>Para baixar gratuitamente o Banco de dados DB2, <a href="http://www.ibm.com/developerworks/downloads/im/udbexp/?S_CMP=ECDDWW01&amp;S_TACT=JMM1">clique aqui</a>.<br />
<a href="http://www.ibm.com/developerworks/wikis/display/DB2/FREE+Book-+Getting+Started+with+DB2+Express-C">Aqui temos um livro gratuito</a> em português com tudo que você precisa para começar.<br />
A página do <a href="http://www.ibm.com/developerworks/br/data">Developer Works do DB2</a> tem vários artigos e tutóriais, em português para sua comodidade!<br />
Caso precise de suporte, pode pedir em <a href="http://www.ibm.com/developerworks/forums/forum.jspa?forumID=805">nosso fórum</a>.<br />
Finalmente temos uma série de vídeos sobre banco de dados <a href="http://www.channeldb2.com/group/db2oncampus">aqui</a>.</p>
<p>É isso ai, faça bom proveito dos recursos e participe ativamente da comunidade!</p>
<p><a href="http://jmmwrite.blogspot.com/2009/11/aprenda-db2-um-dos-bancos-que-mais.html">Post original por Juliano Martins</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/leonardom.wordpress.com/133/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/leonardom.wordpress.com/133/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/leonardom.wordpress.com/133/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/leonardom.wordpress.com/133/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/leonardom.wordpress.com/133/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/leonardom.wordpress.com/133/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/leonardom.wordpress.com/133/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/leonardom.wordpress.com/133/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/leonardom.wordpress.com/133/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/leonardom.wordpress.com/133/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/leonardom.wordpress.com/133/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/leonardom.wordpress.com/133/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/leonardom.wordpress.com/133/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/leonardom.wordpress.com/133/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=leonardom.wordpress.com&amp;blog=4884969&amp;post=133&amp;subd=leonardom&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://leonardom.wordpress.com/2009/11/30/aprenda-db2-um-dos-bancos-que-mais-cresce-no-mercado/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b1bf996ed6c1c7b3492d9b38eb0fa803?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Leo</media:title>
		</media:content>
	</item>
		<item>
		<title>Balsamiq Mockups</title>
		<link>http://leonardom.wordpress.com/2009/08/26/balsamiq-mockups/</link>
		<comments>http://leonardom.wordpress.com/2009/08/26/balsamiq-mockups/#comments</comments>
		<pubDate>Wed, 26 Aug 2009 19:32:36 +0000</pubDate>
		<dc:creator>Leonardo</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[balsamiq]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[mockup]]></category>
		<category><![CDATA[screen]]></category>

		<guid isPermaLink="false">http://leonardom.wordpress.com/?p=126</guid>
		<description><![CDATA[Hello All, If you like me work with application development, you know how difficult is sometimes to produce screen mockups to show to your customers. I&#8217;ve used to do that using pencil and paper but today I&#8217;ve run into Balsamiq Mockups which is a application developed in Flash specially for design screen mockups. It works [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=leonardom.wordpress.com&amp;blog=4884969&amp;post=126&amp;subd=leonardom&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Hello All,</p>
<p>If you like me work with application development, you know how difficult is sometimes to produce screen mockups to show to your customers. I&#8217;ve used to do that using pencil and paper but today I&#8217;ve run into <a href="http://www.balsamiq.com/products/mockups">Balsamiq Mockups</a> which is a application developed in Flash specially for design screen mockups. It works on Windows, Linux and Mac OS.</p>
<p>You can take a look how easy is to produce mockups watching the video below:</p>
<span style="text-align:center; display: block;"><a href="http://leonardom.wordpress.com/2009/08/26/balsamiq-mockups/"><img src="http://img.youtube.com/vi/zLysy3IPfFI/2.jpg" alt="" /></a></span>
<p>Balsamiq has a lot of components available:  Labels, Textbox, Combos, Buttons, List, etc.</p>
<p>Another interesting feature is you can export the screen mockup as PNG.</p>
<p>Balsamiq is not free. You can try it <a href="http://www.balsamiq.com/demos/mockups/Mockups.html">online</a>, but I think it&#8217;s  tool which values each cent.</p>
<p>See ya!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/leonardom.wordpress.com/126/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/leonardom.wordpress.com/126/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/leonardom.wordpress.com/126/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/leonardom.wordpress.com/126/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/leonardom.wordpress.com/126/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/leonardom.wordpress.com/126/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/leonardom.wordpress.com/126/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/leonardom.wordpress.com/126/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/leonardom.wordpress.com/126/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/leonardom.wordpress.com/126/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/leonardom.wordpress.com/126/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/leonardom.wordpress.com/126/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/leonardom.wordpress.com/126/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/leonardom.wordpress.com/126/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=leonardom.wordpress.com&amp;blog=4884969&amp;post=126&amp;subd=leonardom&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://leonardom.wordpress.com/2009/08/26/balsamiq-mockups/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b1bf996ed6c1c7b3492d9b38eb0fa803?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Leo</media:title>
		</media:content>
	</item>
		<item>
		<title>Installing CouchDB on Mac OS X Leopard</title>
		<link>http://leonardom.wordpress.com/2009/08/25/installing-couchdb-on-mac-os-x-leopard/</link>
		<comments>http://leonardom.wordpress.com/2009/08/25/installing-couchdb-on-mac-os-x-leopard/#comments</comments>
		<pubDate>Tue, 25 Aug 2009 20:20:35 +0000</pubDate>
		<dc:creator>Leonardo</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Mac OS]]></category>
		<category><![CDATA[couchdb]]></category>
		<category><![CDATA[Database]]></category>
		<category><![CDATA[mac]]></category>

		<guid isPermaLink="false">http://leonardom.wordpress.com/?p=120</guid>
		<description><![CDATA[Howdy! I had installed CouchDB using Mac Ports but looks like ports installs an old and bugged version of CouchDb. So I decided to uninstall the couchdb and install it straight from source. Here we go. Open your terminal and follow the instructions. Installing CouchDB dependencies First step is to install the ICU (International Components [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=leonardom.wordpress.com&amp;blog=4884969&amp;post=120&amp;subd=leonardom&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Howdy!</p>
<p>I had installed CouchDB using Mac Ports but looks like ports installs an old and bugged version of CouchDb. So I decided to uninstall the couchdb and install it straight from source.</p>
<p>Here we go. Open your terminal and follow the instructions.</p>
<h2>Installing CouchDB dependencies</h2>
<p>First step is to install the ICU (International Components for Unicode). Execute the following commands:</p>
<pre>$ curl -O http://download.icu-project.org/files/icu4c/4.2.1/icu4c-4_2_1-src.tgz
$ tar xvf icu4c-4_2_1-src.tgz
$ cd icu/source
$ ./configure --prefix=/usr/local
$ make
$ make install
$ cd ~</pre>
<p>Now, we need to install another dependency, the SpiderMonkey, which is a Mozilla Foundation Javascript engine.</p>
<pre>$ curl -O ftp://ftp.mozilla.org/pub/mozilla.org/js/js-1.7.0.tar.gz
$ tar xvf js-1.7.0.tar.gz
$ cd js/src
$ make BUILD_OPT=1 -f Makefile.ref
$ sudo mkdir -p /usr/include/smjs
$ sudo cp *.(h,tbl} /usr/include/smjs/
$ cd Darwin_OPT.OBJ
$ sudo cp *.h /usr/include/smjs/
$ sudo cp js /usr/local/bin/
$ sudo cp libjs.dylib /usr/local/lib/
$ cd ~</pre>
<p>CouchDB is developed in Erlang, so we also need to install Erlang</p>
<pre>$ curl -O http://www.erlang.org/download/otp_src_R13B01.tar.gz
$ tar xzf otp_src_R13B01.tar.gz
$ cd otp_src_R13B01
$ ./configure --prefix=/usr/local \
  --enable-smp-support --enable-hipe --enable-darwin-universal \
  --enable-threads
$ make
$ make install
$ cd ~</pre>
<h2>Installing CouchDB</h2>
<pre>$ svn co http://svn.apache.org/repos/asf/couchdb/trunk couchdb
$ cd couchdb
$ ./bootstrap
$ ./configure --prefix=/usr/local
$ make
$ sudo make install
$ cd ~</pre>
<p>After the compiling and installing, you can check the couchdb version</p>
<pre>$ couchdb -V</pre>
<p>To start the couchdb:</p>
<pre>$ sudo couchdb -b</pre>
<p>Now, you can open your browser and access the couchdb:</p>
<pre>http://127.0.0.1:5984/_utils</pre>
<p>To stop couchdb:</p>
<pre>$ sudo couchdb -d</pre>
<p>That&#8217;s all folks</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/leonardom.wordpress.com/120/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/leonardom.wordpress.com/120/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/leonardom.wordpress.com/120/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/leonardom.wordpress.com/120/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/leonardom.wordpress.com/120/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/leonardom.wordpress.com/120/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/leonardom.wordpress.com/120/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/leonardom.wordpress.com/120/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/leonardom.wordpress.com/120/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/leonardom.wordpress.com/120/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/leonardom.wordpress.com/120/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/leonardom.wordpress.com/120/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/leonardom.wordpress.com/120/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/leonardom.wordpress.com/120/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=leonardom.wordpress.com&amp;blog=4884969&amp;post=120&amp;subd=leonardom&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://leonardom.wordpress.com/2009/08/25/installing-couchdb-on-mac-os-x-leopard/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b1bf996ed6c1c7b3492d9b38eb0fa803?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Leo</media:title>
		</media:content>
	</item>
		<item>
		<title>Tutorial de Scala &#8211; Parte 1</title>
		<link>http://leonardom.wordpress.com/2009/08/24/tutorial-de-scala-parte-1/</link>
		<comments>http://leonardom.wordpress.com/2009/08/24/tutorial-de-scala-parte-1/#comments</comments>
		<pubDate>Tue, 25 Aug 2009 00:54:35 +0000</pubDate>
		<dc:creator>Leonardo</dc:creator>
				<category><![CDATA[Scala]]></category>
		<category><![CDATA[jvm]]></category>
		<category><![CDATA[language]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://leonardom.wordpress.com/?p=115</guid>
		<description><![CDATA[O que é? Scala é uma linguagem de programação hibrida, isto é, ele é uma linguagem orientada a objetos e funcional. Scala foi desenvolvida para rodar em um Máquina Virtual, primeiramente em um Java Virtual Machine. O principal compilador, scalac, gera bytecodes que rodam na JVM. Entretanto, existe outro compilador que pode gerar código para [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=leonardom.wordpress.com&amp;blog=4884969&amp;post=115&amp;subd=leonardom&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h2>O que é?</h2>
<p>Scala é uma linguagem de programação hibrida, isto é, ele é uma linguagem orientada a objetos e funcional. Scala foi desenvolvida para rodar em um Máquina Virtual, primeiramente em um Java Virtual Machine. O principal compilador, <em><strong>scalac</strong></em>, gera bytecodes que rodam  na JVM. Entretanto, existe outro compilador que pode gerar código para rodar em .NET CLR.</p>
<p>Scala é uma linguagem produtiva e concisa.</p>
<h2>Donwload and Instalação</h2>
<p>Faça download da última versão de Scala na página de <a href="http://www.scala-lang.org/node/211">download</a>. Depois do download faça a instalação e não se esquece de adicionar o diretório <strong>bin</strong> no seu PATH. E neste diretório que se encontra os executáveis, incluindo o compilador e o interpretador.</p>
<h2>Usando o Interpretador Scala</h2>
<p>O jeito mais fácil de começar com Scala é através do seu intepretador que é um &#8220;shell&#8221; interativo para escrever código Scala.</p>
<p>Para iniciar o interpretador, abra seu terminal e digite: scala</p>
<pre>leonardo:~$ scala
Welcome to Scala version 2.7.5.final (Java HotSpot(TM) 64-Bit Server VM, Java 1.6.0_13).
Type in expressions to have them evaluated.
Type :help for more information.

scala&gt;</pre>
<p>Tente digitar no interpretador algo como  1 + 1 e pressione enter.</p>
<pre>scala&gt; 1 + 1</pre>
<p>O interpretador vai imprimir:</p>
<pre>res0: Int = 2</pre>
<p>Você pode usar esse resultado para fazer outras operações, por exemplo:</p>
<pre>scala&gt; res0 * 10</pre>
<p>E você agora terá o resultado:</p>
<p>res1: Int = 20</p>
<p>Para imprimir valores, você pode fazer assim:</p>
<pre>scala&gt; println("Hello Scala")
Hello Scala</pre>
<p>
<h2>Definindo Variáveis</h2>
<p>Para definir variáveis em Scala nos usamos a palavras chaves <strong>val</strong> e <strong>var</strong>, a diferença é que quando usamos <strong>val</strong>, estamos definindo uma variável imutável, isto é, somente podemos definir o valor uma única vez e não será permitido alterá-la. Já com <strong>var</strong>, podemos mudar o valor normalmente quando necessário.</p>
<p>Vamos dar um exemplo usando <strong>val</strong>:</p>
<pre>scala&gt; val msg = "Hello Scala"
msg: java.lang.String = Hello Scala</pre>
<p>Este exemplo também mostra um caracteristica importante de Scala, o type inference (inferência de tipo). Como pode perceber nos definimos a variável msg e não especificamos o tipo da variável, porém o interpretador (compilador) Scala inferiu definindo o tipo automaticamente. Ele faz isso com base no valor que está sendo usado para iniciar a variável. Como nesse exemplo estamos inicializando a variável com &#8220;Hello Scala&#8221;, isto é, uma String, o interpretador (compilador) vai dar o tipo java.lang.String para a variável automaticamente.</p>
<p>Bom, mas lembre-se que estamos usando <strong>val</strong>, portanto não vamos setar um novo valor para essa variável. Se tentarmos isso vamos receber um erro como abaixo:</p>
<pre>scala&gt; msg = "Hello Folks"
&lt;console&gt;:5: error: reassignment to val
 msg = "Hello Folks"</pre>
<p>Se o que queremos é poder alterar o valor da variável, então devemos usar <strong>var</strong> para definir a variável:</p>
<pre>scala&gt; var greeting = "Hello Scala"
greeting: java.lang.String = Hello Scala</pre>
<p>Agora que <em>greeting</em> é uma variável definida com <strong>var</strong> não um valor (definido com <strong>val</strong>), podemos redefinir seu valor a qualquer momento.</p>
<pre>scala&gt; greeting = "Hello Folks"
greeting: java.lang.String = Hello Folks</pre>
<h2>Definindo Métodos</h2>
<p>Em Scala nós usamos <strong>def</strong> para definir um método, veja um exemplo:</p>
<pre>scala&gt; def max(x: Int, y: Int):Int =  if (x &lt; y) y else x
max: (Int,Int)Int</pre>
<p>O nome do método, neste caso <em>max</em>, é seguido por uma lista de parâmetros entre parenteses. Os parâmetros precisam ter seus tipos definidos porque o interpretador (compilador) não infere nos tipos dos parâmetros. Neste exemplo, o método <em>max</em> tem dois parâmetros do tipo Int. Após a definição dos parâmetros, você pode notar que temos &#8220;:Int&#8221;. Isto define o tipo de retorno do método.</p>
<p>As vezes o compilador vai requerer que você defina o tipo de retorno. Se o método é recursivo, por exemplo, você deve explicitamente declarar o tipo de retorno do método. No caso do nosso método <em>max</em> não é necessário. Neste caso o compilador vai inferir definindo o tipo de retorno automaticamente. Então nesse caso podemos definir o método <em>max</em> da seguinte forma:</p>
<pre>scala&gt; def max(x: Int, y: Int):Int =  if (x &lt; y) y else x
max: (Int,Int)Int</pre>
<p>Perceba que no caso dos parâmetros nos sempre devemos definir os tipos independente se definimos o tipo de retorno do método ou não.</p>
<p>O nome, os parâmetros e tipo de retorno formam a assinatura do método. Após a assinatura do método, devemos colocar um sinal de igual (=) e então o corpo do método. Como nosso método <em>max</em> consistem em apenas um linha não é necessário colocar o corpo do método entre chaves { }. Mas você pode se quiser:</p>
<pre>scala&gt; def max(x: Int, y: Int) = {     
 |   if (x &lt; y) y else x
 | }
max: (Int,Int)Int</pre>
<p>Se seu método for ter mais que uma linha, então será necessário colocar o corpo do método entre chaves.</p>
<p>Uma vez que temos nosso método definido, podemos usá-lo invocando da seguinte forma:</p>
<pre>scala&gt; max(3, 5)
res5: Int = 5</pre>
<p>Quando temos um método que não tem parâmetros como esse:</p>
<pre>scala&gt; def greet() = println("Hello Scala")
greet: ()Unit</pre>
<p>Podemos invocá-lo usando ou não parenteses:</p>
<pre>scala&gt; greet()
Hello Scala

scala&gt; greet
Hello Scala</pre>
<p>Por hoje é tudo pessoal.</p>
<p>Prentendo escrever a segunda parte desse tutorial em breve.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/leonardom.wordpress.com/115/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/leonardom.wordpress.com/115/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/leonardom.wordpress.com/115/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/leonardom.wordpress.com/115/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/leonardom.wordpress.com/115/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/leonardom.wordpress.com/115/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/leonardom.wordpress.com/115/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/leonardom.wordpress.com/115/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/leonardom.wordpress.com/115/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/leonardom.wordpress.com/115/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/leonardom.wordpress.com/115/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/leonardom.wordpress.com/115/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/leonardom.wordpress.com/115/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/leonardom.wordpress.com/115/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=leonardom.wordpress.com&amp;blog=4884969&amp;post=115&amp;subd=leonardom&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://leonardom.wordpress.com/2009/08/24/tutorial-de-scala-parte-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b1bf996ed6c1c7b3492d9b38eb0fa803?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Leo</media:title>
		</media:content>
	</item>
		<item>
		<title>I do Mac now!</title>
		<link>http://leonardom.wordpress.com/2009/08/22/i-do-mac-now/</link>
		<comments>http://leonardom.wordpress.com/2009/08/22/i-do-mac-now/#comments</comments>
		<pubDate>Sat, 22 Aug 2009 12:50:22 +0000</pubDate>
		<dc:creator>Leonardo</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Mac OS]]></category>
		<category><![CDATA[Apple]]></category>

		<guid isPermaLink="false">http://leonardom.wordpress.com/?p=112</guid>
		<description><![CDATA[Hello Fellows, After a long time desiring and dreaming, I got bought my first Mac Book. No, I didn&#8217;t buy an Aluminum, but I bought the White. I&#8217;m still adapting with it, specially with the keyboard, but I can tell you guys that&#8217;s the Apple is amazing! Everything detail is so special and thought here. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=leonardom.wordpress.com&amp;blog=4884969&amp;post=112&amp;subd=leonardom&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Hello Fellows,</p>
<p>After a long time desiring and dreaming, I got bought my first Mac Book. No, I didn&#8217;t buy an Aluminum, but I bought the White.</p>
<p>I&#8217;m still adapting with it, specially with the keyboard, but I can tell you guys that&#8217;s the Apple is amazing! Everything detail is so special and thought here. The Mac OS X Leopard is very stable and also very easy to use. Looks everything you try here is pretty easy to do.</p>
<p>The Mac OS X Leopard already comes with many tools for development. I already have Java, Ruby and Rails. You just have to update them to the latest version and that tasks is to easy.</p>
<p>I am still preparing my development environment, but I&#8217;ve already installed Eclipse, Git, Flex SDK, MySQL. For development with Ruby and Rails, I&#8217;ve installed Mac Vim and the Ruby plugin, but I am thinking of buying the famous Text Mate editor.</p>
<p>Well, now I&#8217;ll install JRuby and also Scala to keep by studies with Scala programming language.</p>
<p>I hope to back here soon sharing my  experiences with Mac.</p>
<p>See you soon!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/leonardom.wordpress.com/112/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/leonardom.wordpress.com/112/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/leonardom.wordpress.com/112/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/leonardom.wordpress.com/112/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/leonardom.wordpress.com/112/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/leonardom.wordpress.com/112/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/leonardom.wordpress.com/112/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/leonardom.wordpress.com/112/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/leonardom.wordpress.com/112/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/leonardom.wordpress.com/112/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/leonardom.wordpress.com/112/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/leonardom.wordpress.com/112/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/leonardom.wordpress.com/112/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/leonardom.wordpress.com/112/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=leonardom.wordpress.com&amp;blog=4884969&amp;post=112&amp;subd=leonardom&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://leonardom.wordpress.com/2009/08/22/i-do-mac-now/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b1bf996ed6c1c7b3492d9b38eb0fa803?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Leo</media:title>
		</media:content>
	</item>
		<item>
		<title>8 Regular Expressions You Should Know</title>
		<link>http://leonardom.wordpress.com/2009/08/12/8-regular-expressions-you-should-know/</link>
		<comments>http://leonardom.wordpress.com/2009/08/12/8-regular-expressions-you-should-know/#comments</comments>
		<pubDate>Wed, 12 Aug 2009 18:24:59 +0000</pubDate>
		<dc:creator>Leonardo</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[regex]]></category>

		<guid isPermaLink="false">http://leonardom.wordpress.com/?p=110</guid>
		<description><![CDATA[This is a quick post with a tip. In this tutorial you can learn the 8 Regular Expression you should know. That&#8217;s very useful. See You<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=leonardom.wordpress.com&amp;blog=4884969&amp;post=110&amp;subd=leonardom&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This is a quick post with a tip. In this <a href="http://net.tutsplus.com/tutorials/other/8-regular-expressions-you-should-know/">tutorial</a> you can learn the 8 Regular Expression you should know. That&#8217;s very useful.</p>
<p>See You</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/leonardom.wordpress.com/110/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/leonardom.wordpress.com/110/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/leonardom.wordpress.com/110/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/leonardom.wordpress.com/110/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/leonardom.wordpress.com/110/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/leonardom.wordpress.com/110/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/leonardom.wordpress.com/110/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/leonardom.wordpress.com/110/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/leonardom.wordpress.com/110/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/leonardom.wordpress.com/110/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/leonardom.wordpress.com/110/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/leonardom.wordpress.com/110/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/leonardom.wordpress.com/110/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/leonardom.wordpress.com/110/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=leonardom.wordpress.com&amp;blog=4884969&amp;post=110&amp;subd=leonardom&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://leonardom.wordpress.com/2009/08/12/8-regular-expressions-you-should-know/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b1bf996ed6c1c7b3492d9b38eb0fa803?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Leo</media:title>
		</media:content>
	</item>
		<item>
		<title>Getting Parameters from HttpExchange</title>
		<link>http://leonardom.wordpress.com/2009/08/06/getting-parameters-from-httpexchange/</link>
		<comments>http://leonardom.wordpress.com/2009/08/06/getting-parameters-from-httpexchange/#comments</comments>
		<pubDate>Thu, 06 Aug 2009 18:33:07 +0000</pubDate>
		<dc:creator>Leonardo</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[http]]></category>
		<category><![CDATA[httpserver]]></category>
		<category><![CDATA[java6]]></category>

		<guid isPermaLink="false">http://leonardom.wordpress.com/?p=102</guid>
		<description><![CDATA[You now in Java 6 has some APIs to create lightweight HTTP server. Well, today, I had to created a lightweight HTTP server embedded in an application, but when I try to get the parameters for a request I noticed the HttpExchange class doesn&#8217;t have a method for that. After some researches on Google, I [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=leonardom.wordpress.com&amp;blog=4884969&amp;post=102&amp;subd=leonardom&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>You now in Java 6 has some APIs to create lightweight HTTP server. Well, today, I had to created a lightweight HTTP server embedded in an application, but when I try to get the parameters for a request I noticed the HttpExchange class doesn&#8217;t have a method for that.</p>
<p>After some researches on Google, I come across a solution.</p>
<p>What I did was to create a Filter class which will deal with the parameters parse:</p>
<pre>public class ParameterFilter extends Filter {

    @Override
    public String description() {
        return "Parses the requested URI for parameters";
    }

    @Override
    public void doFilter(HttpExchange exchange, Chain chain)
        throws IOException {
        parseGetParameters(exchange);
        parsePostParameters(exchange);
        chain.doFilter(exchange);
    }    

    private void parseGetParameters(HttpExchange exchange)
        throws UnsupportedEncodingException {

        Map&lt;String, Object&gt; parameters = new HashMap&lt;String, Object&gt;();
        URI requestedUri = exchange.getRequestURI();
        String query = requestedUri.getRawQuery();
        parseQuery(query, parameters);
        exchange.setAttribute("parameters", parameters);
    }

    private void parsePostParameters(HttpExchange exchange)
        throws IOException {

        if ("post".equalsIgnoreCase(exchange.getRequestMethod())) {
            @SuppressWarnings("unchecked")
            Map&lt;String, Object&gt; parameters =
                (Map&lt;String, Object&gt;)exchange.getAttribute("parameters");
            InputStreamReader isr =
                new InputStreamReader(exchange.getRequestBody(),"utf-8");
            BufferedReader br = new BufferedReader(isr);
            String query = br.readLine();
            parseQuery(query, parameters);
        }
    }

     @SuppressWarnings("unchecked")
     private void parseQuery(String query, Map&lt;String, Object&gt; parameters)
         throws UnsupportedEncodingException {

         if (query != null) {
             String pairs[] = query.split("[&amp;]");

             for (String pair : pairs) {
                 String param[] = pair.split("[=]");

                 String key = null;
                 String value = null;
                 if (param.length &gt; 0) {
                     key = URLDecoder.decode(param[0],
                         System.getProperty("file.encoding"));
                 }

                 if (param.length &gt; 1) {
                     value = URLDecoder.decode(param[1],
                         System.getProperty("file.encoding"));
                 }

                 if (parameters.containsKey(key)) {
                     Object obj = parameters.get(key);
                     if(obj instanceof List&lt;?&gt;) {
                         List&lt;String&gt; values = (List&lt;String&gt;)obj;
                         values.add(value);
                     } else if(obj instanceof String) {
                         List&lt;String&gt; values = new ArrayList&lt;String&gt;();
                         values.add((String)obj);
                         values.add(value);
                         parameters.put(key, values);
                     }
                 } else {
                     parameters.put(key, value);
                 }
             }
         }
    }
}</pre>
<p>After that you can add this filter to your HttpServer context:</p>
<pre>HttpServer server = HttpServer.create(new InetSocketAddress(80), 0);
HttpContext context = server.createContext("/myapp", new myHttpHandler());
context.getFilters().add(new ParameterFilter());
server.start();</pre>
<p>Then you can do something like below in your HttpHandler  to get the parameters:</p>
<pre>public class MyHttpHandler implements HttpHandler {

    @Override
    public void handle(HttpExchange exchange) throws IOException {
        Map&lt;String, Object&gt; params =
           (Map&lt;String, Object&gt;)exchange.getAttribute("parameters");

        //now you can use the params
    }
}</pre>
<p>Well, that&#8217;s all! I hope you enjoy the tip!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/leonardom.wordpress.com/102/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/leonardom.wordpress.com/102/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/leonardom.wordpress.com/102/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/leonardom.wordpress.com/102/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/leonardom.wordpress.com/102/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/leonardom.wordpress.com/102/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/leonardom.wordpress.com/102/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/leonardom.wordpress.com/102/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/leonardom.wordpress.com/102/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/leonardom.wordpress.com/102/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/leonardom.wordpress.com/102/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/leonardom.wordpress.com/102/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/leonardom.wordpress.com/102/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/leonardom.wordpress.com/102/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=leonardom.wordpress.com&amp;blog=4884969&amp;post=102&amp;subd=leonardom&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://leonardom.wordpress.com/2009/08/06/getting-parameters-from-httpexchange/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b1bf996ed6c1c7b3492d9b38eb0fa803?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Leo</media:title>
		</media:content>
	</item>
		<item>
		<title>How to run JRuby on Rails on Google&#8217;s App Engine</title>
		<link>http://leonardom.wordpress.com/2009/08/06/how-to-run-jruby-on-rails-on-googles-app-engine/</link>
		<comments>http://leonardom.wordpress.com/2009/08/06/how-to-run-jruby-on-rails-on-googles-app-engine/#comments</comments>
		<pubDate>Thu, 06 Aug 2009 12:26:25 +0000</pubDate>
		<dc:creator>Leonardo</dc:creator>
				<category><![CDATA[JRuby]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[google]]></category>

		<guid isPermaLink="false">http://leonardom.wordpress.com/?p=100</guid>
		<description><![CDATA[Are you wondering how to install your JRuby on Rails application on Google&#8217;s App Engine? If so, go to this cookbook. I have not tried yet, but I&#8217;ll try soon. See you! Leo<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=leonardom.wordpress.com&amp;blog=4884969&amp;post=100&amp;subd=leonardom&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Are you wondering how to install your JRuby on Rails application on Google&#8217;s App Engine?</p>
<p>If so, go to this <a href="http://rails-primer.appspot.com/">cookbook.</a></p>
<p>I have not tried yet, but I&#8217;ll try soon.</p>
<p>See you! Leo</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/leonardom.wordpress.com/100/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/leonardom.wordpress.com/100/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/leonardom.wordpress.com/100/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/leonardom.wordpress.com/100/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/leonardom.wordpress.com/100/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/leonardom.wordpress.com/100/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/leonardom.wordpress.com/100/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/leonardom.wordpress.com/100/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/leonardom.wordpress.com/100/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/leonardom.wordpress.com/100/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/leonardom.wordpress.com/100/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/leonardom.wordpress.com/100/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/leonardom.wordpress.com/100/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/leonardom.wordpress.com/100/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=leonardom.wordpress.com&amp;blog=4884969&amp;post=100&amp;subd=leonardom&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://leonardom.wordpress.com/2009/08/06/how-to-run-jruby-on-rails-on-googles-app-engine/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b1bf996ed6c1c7b3492d9b38eb0fa803?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Leo</media:title>
		</media:content>
	</item>
	</channel>
</rss>
