<?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>/home/edivad</title>
	<atom:link href="http://edivad.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://edivad.wordpress.com</link>
	<description>Tech Travels</description>
	<lastBuildDate>Fri, 06 Nov 2009 12:02:45 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='edivad.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/1710432a30683c2a7e744c61daad9815?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>/home/edivad</title>
		<link>http://edivad.wordpress.com</link>
	</image>
			<item>
		<title>emacs strip blank lines</title>
		<link>http://edivad.wordpress.com/2009/11/02/emacs-strip-blank-lines/</link>
		<comments>http://edivad.wordpress.com/2009/11/02/emacs-strip-blank-lines/#comments</comments>
		<pubDate>Sun, 01 Nov 2009 22:00:16 +0000</pubDate>
		<dc:creator>edivad</dc:creator>
				<category><![CDATA[emacs]]></category>
		<category><![CDATA[blank]]></category>
		<category><![CDATA[expression]]></category>
		<category><![CDATA[lines]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[regex]]></category>
		<category><![CDATA[regular]]></category>
		<category><![CDATA[regular expression]]></category>
		<category><![CDATA[strip]]></category>

		<guid isPermaLink="false">http://edivad.wordpress.com/?p=360</guid>
		<description><![CDATA[
Here is a quick way to strip (remove) blank lines from a file with emacs.

position on top of file: M-&#60;
Call a query-regex-replace: M-C-%
input the regex ^ C-q C-j that stand for match all lines that consist in only a carriage return.
RET-RET. The first one confirm the regex and the last one is for &#8220;replace with [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=edivad.wordpress.com&blog=285424&post=360&subd=edivad&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p style="text-align:center;">
<div class="wp-caption aligncenter" style="width: 250px"><a href="http://www.flickr.com/photos/hippie/2475849569/"><img title="Spiral-Bound Pad" src="http://farm4.static.flickr.com/3080/2475849569_514e542c25_m_d.jpg" alt="Spiral-Bound Pad" width="240" height="161" /></a><p class="wp-caption-text">Spiral-Bound Pad (by incurable_hippie)</p></div>
<p>Here is a quick way to strip (remove) blank lines from a file with emacs.</p>
<ol>
<li>position on top of file: <em>M-&lt;</em></li>
<li>Call a query-regex-replace: <em>M-C-%</em></li>
<li>input the regex <em>^ C-q C-j</em> that stand for match all lines that consist in only a carriage return.</li>
<li><em>RET-RET</em>. The first one confirm the regex and the last one is for &#8220;replace with nothing&#8221;.</li>
<li>When asked use <em>!</em> to replace-all.</li>
</ol>
<p>Summing all commands:</p>
<p style="text-align:center;"><strong>M-&lt; C-M-% ^ C-q C-j RET RET !</strong></p>
<p>here you are <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/edivad.wordpress.com/360/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/edivad.wordpress.com/360/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/edivad.wordpress.com/360/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/edivad.wordpress.com/360/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/edivad.wordpress.com/360/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/edivad.wordpress.com/360/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/edivad.wordpress.com/360/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/edivad.wordpress.com/360/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/edivad.wordpress.com/360/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/edivad.wordpress.com/360/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=edivad.wordpress.com&blog=285424&post=360&subd=edivad&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://edivad.wordpress.com/2009/11/02/emacs-strip-blank-lines/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6828981a1371d96adaa4477723195795?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">edivad</media:title>
		</media:content>

		<media:content url="http://farm4.static.flickr.com/3080/2475849569_514e542c25_m_d.jpg" medium="image">
			<media:title type="html">Spiral-Bound Pad</media:title>
		</media:content>
	</item>
		<item>
		<title>SSL and Java (ciak 2)</title>
		<link>http://edivad.wordpress.com/2009/09/14/ssl-and-java-ciak-2/</link>
		<comments>http://edivad.wordpress.com/2009/09/14/ssl-and-java-ciak-2/#comments</comments>
		<pubDate>Sun, 13 Sep 2009 22:00:01 +0000</pubDate>
		<dc:creator>edivad</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[http]]></category>
		<category><![CDATA[httpclient]]></category>
		<category><![CDATA[https]]></category>
		<category><![CDATA[keystore]]></category>
		<category><![CDATA[keytool]]></category>
		<category><![CDATA[ssl]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://edivad.wordpress.com/?p=312</guid>
		<description><![CDATA[Last time we spoke about accessing a site via HTTPS using the pure Sun way.
Today, we see the same problem, solved with the apache HttpClient libraries. This library require a keystore specified in the code. In order to generate a keystore, you will have to download a certification file as described in the previous post [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=edivad.wordpress.com&blog=285424&post=312&subd=edivad&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><div class="wp-caption alignleft" style="width: 250px"><a href="http://www.flickr.com/photos/keoki/1417422595/"><img title="padlock" src="http://farm2.static.flickr.com/1412/1417422595_2415d348bf_m_d.jpg" alt="credits: Vagamundos (from flickr)" width="240" height="180" /></a><p class="wp-caption-text">credits: Vagamundos (from flickr)</p></div>
<p><a href="http://edivad.wordpress.com/2009/09/07/ssl-and-java/">Last time</a> we spoke about accessing a site via HTTPS using the pure Sun way.</p>
<p>Today, we see the same problem, solved with the <a href="http://hc.apache.org/httpclient-3.x/">apache HttpClient libraries</a>. This library require a <a href="http://www.google.com/search?q=keystore">keystore</a> specified in the code. In order to generate a keystore, you will have to download a certification file as described in the previous post and then create a keystore using the <em>keytool</em> program. I don&#8217;t remember well how to create a new keystore with the required certificate via keytool (I did&#8217;t write it down), but reading the help of the program it should be something like:</p>
<p><strong>keytool -importcert -alias <em>&lt;my_alias_certificate&gt;</em> -file <em>&lt;path_to_the_cer_file&gt;</em> -keystore myKeystore.ks</strong></p>
<p>where <em>myKeystore.ks</em> is the name of the file containing the keystore. The pros of using this approach is that you can provide a .ks file among with the program, in a location desired and the program will use it, avoiding post-installation procedures to register the certificate on each jvm.</p>
<p>So, assuming to have our keystore into a sub-directory <em>certs</em> the code for using the site is in the <a href="http://edivad.files.wordpress.com/2009/08/code1.pdf">pdf</a> as usual.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/edivad.wordpress.com/312/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/edivad.wordpress.com/312/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/edivad.wordpress.com/312/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/edivad.wordpress.com/312/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/edivad.wordpress.com/312/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/edivad.wordpress.com/312/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/edivad.wordpress.com/312/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/edivad.wordpress.com/312/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/edivad.wordpress.com/312/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/edivad.wordpress.com/312/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=edivad.wordpress.com&blog=285424&post=312&subd=edivad&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://edivad.wordpress.com/2009/09/14/ssl-and-java-ciak-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6828981a1371d96adaa4477723195795?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">edivad</media:title>
		</media:content>

		<media:content url="http://farm2.static.flickr.com/1412/1417422595_2415d348bf_m_d.jpg" medium="image">
			<media:title type="html">padlock</media:title>
		</media:content>
	</item>
		<item>
		<title>SSL and java</title>
		<link>http://edivad.wordpress.com/2009/09/07/ssl-and-java/</link>
		<comments>http://edivad.wordpress.com/2009/09/07/ssl-and-java/#comments</comments>
		<pubDate>Sun, 06 Sep 2009 22:00:53 +0000</pubDate>
		<dc:creator>edivad</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[autority]]></category>
		<category><![CDATA[certicate authority]]></category>
		<category><![CDATA[certificate]]></category>
		<category><![CDATA[http]]></category>
		<category><![CDATA[https]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[ssl]]></category>
		<category><![CDATA[sslexception]]></category>
		<category><![CDATA[url]]></category>
		<category><![CDATA[urlconnection]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://edivad.wordpress.com/?p=301</guid>
		<description><![CDATA[Sooner or later it happens that you have to access an https via Java. Accessing a generic http (non ssl) site is quite easy using the URL and URLConnection objects.
When you try to access a site through SSL the main problem is that most sites does not have a registration in the java&#8217;s  Certificate [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=edivad.wordpress.com&blog=285424&post=301&subd=edivad&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><div class="wp-caption alignleft" style="width: 190px"><a href="http://www.flickr.com/photos/ph0t0s/50858283/"><img title="locks" src="http://farm1.static.flickr.com/29/50858283_49b5133be8_m_d.jpg" alt="credits: ph0t0 (from flickr)" width="180" height="240" /></a><p class="wp-caption-text">credits: ph0t0 (from flickr)</p></div>
<p>Sooner or later it happens that you have to access an https via Java. Accessing a generic http (non ssl) site is quite easy using the <a href="http://java.sun.com/javase/6/docs/api/java/net/URL.html">URL</a> and <a href="http://java.sun.com/javase/6/docs/api/java/net/URLConnection.html">URLConnection</a> objects.</p>
<p>When you try to access a site through SSL the main problem is that most sites does not have a registration in the java&#8217;s <a href="http://en.wikipedia.org/wiki/Certificate_authority"> Certificate Autorithy</a> (CA), causing the framework to refuse connection to that site. So the main solution is to register the certificate of that site in the java&#8217;s CA.</p>
<p>So, the things to do are:</p>
<ol>
<li>download the site certificate</li>
<li>register it in the java&#8217;s CA</li>
<li>accessing the site</li>
</ol>
<h2>Downloading the certificate</h2>
<p>In order to download the certificate we are gonna use Firefox. With firefox navigate to the site and if required accept the certificate. Double click on the icon of the certificate (1), in the screen that appear choose <em>view certificate</em> (2), on <em>details</em> tab (3) use the <em>export</em> button (4) and save it wherever you want (5).</p>
<p><a href="http://edivad.files.wordpress.com/2009/08/screen.jpg"><img class="aligncenter size-medium wp-image-305" title="screen" src="http://edivad.files.wordpress.com/2009/08/screen.jpg?w=300&#038;h=211" alt="screen" width="300" height="211" /></a></p>
<h2>Register the certificate</h2>
<p>Once downloaded the <em>.cer</em> file (X 509 Certificate DER), you can import it into the CA using the a command line program deployed with the j2se installation: <em>keytool</em>.</p>
<p>Java&#8217;s CA and keytool are available in the <strong>$JAVA_HOME/lib/security/</strong> and an example of using the keytool (under windows) is the following</p>
<p><strong>C:\Program Files\Java\jre6\lib\security&gt;keytool -import -trustcacerts -alias fonsai -keystore cacerts -file fonsai.cer</strong></p>
<p>where <em>fonsai.cer</em> the file name of the certificate just downloaded.</p>
<p>Maybe if you are using eclipse, you will have to restart the workbench in order to make the registration visible to the jvm.</p>
<p>The main counterpart of using this approach is that you have to register the certificate for each jvm running the program and since certificate can expire you should have to do this operation more than one time. I advise to automate the registration operation with a shell script to be distributed among with the program.</p>
<h2>Accessing the site</h2>
<p>Once registered the site&#8217;s certificate, you can access it as usual using the URL and URLConnection objects. It should be enough to tell (via System.properties) an SSL provider. Here is a PDF with the <a href="http://edivad.files.wordpress.com/2009/08/code.pdf">code</a>.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/edivad.wordpress.com/301/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/edivad.wordpress.com/301/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/edivad.wordpress.com/301/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/edivad.wordpress.com/301/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/edivad.wordpress.com/301/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/edivad.wordpress.com/301/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/edivad.wordpress.com/301/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/edivad.wordpress.com/301/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/edivad.wordpress.com/301/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/edivad.wordpress.com/301/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=edivad.wordpress.com&blog=285424&post=301&subd=edivad&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://edivad.wordpress.com/2009/09/07/ssl-and-java/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6828981a1371d96adaa4477723195795?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">edivad</media:title>
		</media:content>

		<media:content url="http://farm1.static.flickr.com/29/50858283_49b5133be8_m_d.jpg" medium="image">
			<media:title type="html">locks</media:title>
		</media:content>

		<media:content url="http://edivad.files.wordpress.com/2009/08/screen.jpg?w=300" medium="image">
			<media:title type="html">screen</media:title>
		</media:content>
	</item>
		<item>
		<title>rounding double in java</title>
		<link>http://edivad.wordpress.com/2009/08/31/rounding-double-in-java/</link>
		<comments>http://edivad.wordpress.com/2009/08/31/rounding-double-in-java/#comments</comments>
		<pubDate>Sun, 30 Aug 2009 22:00:32 +0000</pubDate>
		<dc:creator>edivad</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[decimal]]></category>
		<category><![CDATA[double]]></category>
		<category><![CDATA[half-up]]></category>
		<category><![CDATA[number]]></category>
		<category><![CDATA[numbers]]></category>
		<category><![CDATA[precision]]></category>
		<category><![CDATA[round]]></category>
		<category><![CDATA[rounding]]></category>
		<category><![CDATA[scale]]></category>

		<guid isPermaLink="false">http://edivad.wordpress.com/?p=293</guid>
		<description><![CDATA[Rounding a double in java is very simple. If you have to round it to the nearest integer you could use the Math.round(double) method, but what about if you have to round it with a desired number of decimals?
Quite easy too. Using the BigDecimal.setScale(int,int) method you can choose how to round it. Following a quick [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=edivad.wordpress.com&blog=285424&post=293&subd=edivad&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><div class="wp-caption alignleft" style="width: 250px"><a href="http://www.flickr.com/photos/gabricabri/3849751029"><img title="3 orange" src="http://farm3.static.flickr.com/2639/3849751029_524f6a0171_m.jpg" alt="Credits: Gabri Le Cabri (from flickr)" width="240" height="180" /></a><p class="wp-caption-text">Credits: Gabri Le Cabri (from flickr)</p></div>
<p>Rounding a double in java is very simple. If you have to round it to the nearest integer you could use the <strong>Math.round(double)</strong> method, but what about if you have to round it with a desired number of decimals?</p>
<p>Quite easy too. Using the <a href="http://java.sun.com/j2se/1.4.2/docs/api/java/math/BigDecimal.html#setScale%28int,%20int%29">BigDecimal.setScale(int,int) </a>method you can choose how to round it. Following a quick example:</p>
<p><strong>BigDecimal bd = new BigDecimal(123.45);<br />
bd = bd.setScale(1,BigDecimal.ROUND_HALF_UP);<br />
System.out.println(bd.doubleValue()); //should output 123.5</strong></p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/edivad.wordpress.com/293/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/edivad.wordpress.com/293/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/edivad.wordpress.com/293/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/edivad.wordpress.com/293/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/edivad.wordpress.com/293/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/edivad.wordpress.com/293/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/edivad.wordpress.com/293/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/edivad.wordpress.com/293/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/edivad.wordpress.com/293/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/edivad.wordpress.com/293/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=edivad.wordpress.com&blog=285424&post=293&subd=edivad&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://edivad.wordpress.com/2009/08/31/rounding-double-in-java/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6828981a1371d96adaa4477723195795?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">edivad</media:title>
		</media:content>

		<media:content url="http://farm3.static.flickr.com/2639/3849751029_524f6a0171_m.jpg" medium="image">
			<media:title type="html">3 orange</media:title>
		</media:content>
	</item>
		<item>
		<title>MySQL add 3 years to a date</title>
		<link>http://edivad.wordpress.com/2009/07/20/mysql-add-3-years-to-a-date/</link>
		<comments>http://edivad.wordpress.com/2009/07/20/mysql-add-3-years-to-a-date/#comments</comments>
		<pubDate>Sun, 19 Jul 2009 22:00:12 +0000</pubDate>
		<dc:creator>edivad</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[date]]></category>
		<category><![CDATA[datetime]]></category>
		<category><![CDATA[date_add]]></category>
		<category><![CDATA[function]]></category>
		<category><![CDATA[interval]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[update]]></category>
		<category><![CDATA[year]]></category>
		<category><![CDATA[years]]></category>

		<guid isPermaLink="false">http://edivad.wordpress.com/?p=289</guid>
		<description><![CDATA[It may happens if you are silly like me, that you just inserted a lot of records and then realized that you have inserted a mistaken date. In my case the date was a 3 years earlier than the required.
In order to fix it rapidly with mysql you can use the date_add function. Following a [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=edivad.wordpress.com&blog=285424&post=289&subd=edivad&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>It may happens if you are silly like me, that you just inserted a lot of records and then realized that you have inserted a mistaken date. In my case the date was a 3 years earlier than the required.</p>
<p>In order to fix it rapidly with mysql you can use the <a href="http://dev.mysql.com/doc/refman/5.1/en/date-and-time-functions.html#function_date-add">date_add</a> function. Following a quick ad self explaining statement</p>
<p><strong>update <em>&lt;table&gt;</em> set <em>&lt;field&gt;</em>=date_add(<em>&lt;field&gt;</em>,interval 3 year) where id&gt;3289;</strong></p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/edivad.wordpress.com/289/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/edivad.wordpress.com/289/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/edivad.wordpress.com/289/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/edivad.wordpress.com/289/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/edivad.wordpress.com/289/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/edivad.wordpress.com/289/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/edivad.wordpress.com/289/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/edivad.wordpress.com/289/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/edivad.wordpress.com/289/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/edivad.wordpress.com/289/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=edivad.wordpress.com&blog=285424&post=289&subd=edivad&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://edivad.wordpress.com/2009/07/20/mysql-add-3-years-to-a-date/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6828981a1371d96adaa4477723195795?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">edivad</media:title>
		</media:content>
	</item>
		<item>
		<title>Debian, eclipse and exit code 127</title>
		<link>http://edivad.wordpress.com/2009/06/29/debian-eclipse-and-exit-code-127/</link>
		<comments>http://edivad.wordpress.com/2009/06/29/debian-eclipse-and-exit-code-127/#comments</comments>
		<pubDate>Sun, 28 Jun 2009 22:00:16 +0000</pubDate>
		<dc:creator>edivad</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[127]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[eclipse]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[exit code]]></category>
		<category><![CDATA[exit code 127]]></category>
		<category><![CDATA[java]]></category>

		<guid isPermaLink="false">http://edivad.wordpress.com/?p=286</guid>
		<description><![CDATA[Just after installing eclipse from lenny repository, it crashed me up with the error JVM terminated. Exit code=127. After a bit of searching and watching at what a console execution told me, I tried execute eclipse from command line with a simple java -jar /usr/lib/eclipse/startup.jar. Well, in this way it starts up successfully without any [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=edivad.wordpress.com&blog=285424&post=286&subd=edivad&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Just after installing eclipse from lenny repository, it crashed me up with the error <strong>JVM terminated. Exit code=127</strong>. After a bit of searching and watching at what a console execution told me, I tried execute eclipse from command line with a simple <strong>java -jar /usr/lib/eclipse/startup.jar</strong>. Well, in this way it starts up successfully without any problem. Then I tried again a startup from gnome menu and everything worked fine.</p>
<p>Now there is still the failing about integrated browser and the fact that eclipse shipped with lenny is the very obsolete 3.2.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/edivad.wordpress.com/286/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/edivad.wordpress.com/286/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/edivad.wordpress.com/286/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/edivad.wordpress.com/286/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/edivad.wordpress.com/286/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/edivad.wordpress.com/286/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/edivad.wordpress.com/286/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/edivad.wordpress.com/286/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/edivad.wordpress.com/286/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/edivad.wordpress.com/286/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=edivad.wordpress.com&blog=285424&post=286&subd=edivad&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://edivad.wordpress.com/2009/06/29/debian-eclipse-and-exit-code-127/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6828981a1371d96adaa4477723195795?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">edivad</media:title>
		</media:content>
	</item>
		<item>
		<title>execute shell command via java</title>
		<link>http://edivad.wordpress.com/2009/05/18/execute-shell-command-via-java/</link>
		<comments>http://edivad.wordpress.com/2009/05/18/execute-shell-command-via-java/#comments</comments>
		<pubDate>Sun, 17 May 2009 22:00:20 +0000</pubDate>
		<dc:creator>edivad</dc:creator>
				<category><![CDATA[java]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[attributes]]></category>
		<category><![CDATA[citrix]]></category>
		<category><![CDATA[extranet]]></category>
		<category><![CDATA[readonly]]></category>
		<category><![CDATA[shell]]></category>
		<category><![CDATA[windows]]></category>
		<category><![CDATA[WSAD]]></category>

		<guid isPermaLink="false">http://edivad.wordpress.com/?p=279</guid>
		<description><![CDATA[It happened to me that working via an extranet on a citrix environment in a WSAD workspace, that I needed to remove the attribute to at least 200 files in different directories.
Since do it one by one via WSAD is unthinkable, and I didn&#8217;t have time to going to the client, loggin into the net [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=edivad.wordpress.com&blog=285424&post=279&subd=edivad&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>It happened to me that working via an extranet on a <a href="http://www.citrix.com/">citrix</a> environment in a <a href="http://www.google.com/search?q=wsad">WSAD</a> workspace, that I needed to remove the attribute to at least 200 files in different directories.</p>
<p>Since do it one by one via WSAD is unthinkable, and I didn&#8217;t have time to going to the client, loggin into the net in order to have a shell and I dind&#8217;t have a shell by my hands, I did it via java.</p>
<p>The environment is Windows machine and here is the <a href="http://edivad.files.wordpress.com/2009/05/shell-command-runner.pdf">source</a></p>
<pre>package tests.runners;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStream;

public class ShellCommandRunner {
	public static void main(String[] args) throws IOException{
		OutputStream stdin = null;
		BufferedReader br = null;
		String line = null;
		String command = null;

		command = "cmd.exe /C attrib -r /S /D X:\\workspaces\\tuc-workspace\\*.*";

		System.out.println(command);
		Process p = Runtime.getRuntime().exec(command);
		stdin = p.getOutputStream(); //use this to push commands

		//processing stdout
		br = new BufferedReader(new InputStreamReader(p.getInputStream()));
		while((line=br.readLine())!=null) System.out.println(line);

		//processing stderr
		br = new BufferedReader(new InputStreamReader(p.getErrorStream()));
		while((line=br.readLine())!=null) System.err.println(line);

		System.out.println("done!");
	}
}</pre>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/edivad.wordpress.com/279/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/edivad.wordpress.com/279/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/edivad.wordpress.com/279/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/edivad.wordpress.com/279/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/edivad.wordpress.com/279/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/edivad.wordpress.com/279/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/edivad.wordpress.com/279/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/edivad.wordpress.com/279/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/edivad.wordpress.com/279/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/edivad.wordpress.com/279/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=edivad.wordpress.com&blog=285424&post=279&subd=edivad&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://edivad.wordpress.com/2009/05/18/execute-shell-command-via-java/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6828981a1371d96adaa4477723195795?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">edivad</media:title>
		</media:content>
	</item>
		<item>
		<title>[bash] format date</title>
		<link>http://edivad.wordpress.com/2009/05/11/bash-format-date/</link>
		<comments>http://edivad.wordpress.com/2009/05/11/bash-format-date/#comments</comments>
		<pubDate>Sun, 10 May 2009 22:00:32 +0000</pubDate>
		<dc:creator>edivad</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[date]]></category>
		<category><![CDATA[format]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[timestamp]]></category>

		<guid isPermaLink="false">http://edivad.wordpress.com/?p=271</guid>
		<description><![CDATA[It happens often a script I have the needs to append a simple timestamp in the format of YYYYMMDDHHMMSS to a generated file.
It&#8217;s very easy to get it to work in pure bash, without perl script and similia. Just use the native date command with his format option. Easy as drinking a glass of water, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=edivad.wordpress.com&blog=285424&post=271&subd=edivad&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>It happens often a script I have the needs to append a simple timestamp in the format of <strong>YYYYMMDDHHMMSS</strong> to a generated file.</p>
<p>It&#8217;s very easy to get it to work in pure bash, without perl script and similia. Just use the native <strong>date</strong> command with his format option. Easy as drinking a glass of water, the command is (for the format above)</p>
<p><strong>$ date +&#8221;%Y%m%d%H%M%S&#8221;</strong></p>
<p>for the full detail of the format arguments, refer to the <a href="http://www.google.com/search?q=bash+man+date">man page</a>.</p>
<p>A simple usage in script is</p>
<p><strong>#!/bin/bash<br />
set -e</strong></p>
<p><strong>NOW=`date +&#8221;%Y%m%d%H%M%S&#8221;`<br />
FILE=my-cool-file-${NOW}.txt</strong></p>
<p><strong>echo $FILE</strong></p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/edivad.wordpress.com/271/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/edivad.wordpress.com/271/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/edivad.wordpress.com/271/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/edivad.wordpress.com/271/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/edivad.wordpress.com/271/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/edivad.wordpress.com/271/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/edivad.wordpress.com/271/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/edivad.wordpress.com/271/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/edivad.wordpress.com/271/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/edivad.wordpress.com/271/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=edivad.wordpress.com&blog=285424&post=271&subd=edivad&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://edivad.wordpress.com/2009/05/11/bash-format-date/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6828981a1371d96adaa4477723195795?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">edivad</media:title>
		</media:content>
	</item>
		<item>
		<title>[eclipse-svn] branching, tagging and merging</title>
		<link>http://edivad.wordpress.com/2009/05/04/eclipse-svn-branching-tagging-and-merging/</link>
		<comments>http://edivad.wordpress.com/2009/05/04/eclipse-svn-branching-tagging-and-merging/#comments</comments>
		<pubDate>Sun, 03 May 2009 22:00:43 +0000</pubDate>
		<dc:creator>edivad</dc:creator>
				<category><![CDATA[eclipse-svn]]></category>
		<category><![CDATA[branch]]></category>
		<category><![CDATA[branching]]></category>
		<category><![CDATA[contributing]]></category>
		<category><![CDATA[eclipse]]></category>
		<category><![CDATA[merge]]></category>
		<category><![CDATA[merging]]></category>
		<category><![CDATA[svn]]></category>
		<category><![CDATA[tag]]></category>
		<category><![CDATA[tagging]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://edivad.wordpress.com/?p=246</guid>
		<description><![CDATA[branching, tagging and merging are foundamental concepts of the SVN operativity. For their means I redirect you to the Chapter 4 in the SVN book.
Here we will discuss the merging operativity. The case presented is the one in which I would like to merge (align) the latest fixes/development in the trunk in a specific branch [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=edivad.wordpress.com&blog=285424&post=246&subd=edivad&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>branching, tagging and merging are foundamental concepts of the SVN operativity. For their means I redirect you to the <a href="http://svnbook.red-bean.com/en/1.5/svn.branchmerge.html">Chapter 4</a> in the <a href="http://svnbook.red-bean.com/en/1.5/index.html">SVN book</a>.</p>
<p>Here we will discuss the merging operativity. The case presented is the one in which I would like to merge (align) the latest fixes/development in the trunk in a specific branch (say 2.2).</p>
<p>What I like to do is download a new project, as said in the preceding post, but pointing to the <a href="http://edivad.files.wordpress.com/2009/04/browse2.jpg">desired branch</a> instead of the trunk. Then when asked, specify a <a href="http://edivad.files.wordpress.com/2009/04/name.jpg">different project name</a>, in order to avoid naming conflicts.</p>
<p>When done, on the root of the branch project, select with a right click the <em>Team-&gt;Merge</em>.</p>
<p>Now in the URL field specify the url of the source from which you would like to take the latest version. Then in the <em>Start Revision</em> specify the version from which you would like to start search for editing and in <em>Stop Revision</em> specify the version to stop for searches. Generally the last one is the number beside the trunk project in the repository (if you want to align to the latest version). Here is how the <a href="http://edivad.files.wordpress.com/2009/04/merge1.jpg">form</a> should end up after compilation.</p>
<p>Before proceeding I prefer take a quick <a href="http://edivad.files.wordpress.com/2009/04/preview.jpg"><em>preview</em></a> with the suitable button. When assured that everything is ok, click on the <em>OK</em> button and wait for the end of the process.</p>
<p>When process complete it should be safe to give a Commit of everything but maybe it&#8217;s better to give a full recompile and a full test <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/edivad.wordpress.com/246/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/edivad.wordpress.com/246/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/edivad.wordpress.com/246/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/edivad.wordpress.com/246/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/edivad.wordpress.com/246/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/edivad.wordpress.com/246/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/edivad.wordpress.com/246/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/edivad.wordpress.com/246/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/edivad.wordpress.com/246/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/edivad.wordpress.com/246/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=edivad.wordpress.com&blog=285424&post=246&subd=edivad&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://edivad.wordpress.com/2009/05/04/eclipse-svn-branching-tagging-and-merging/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6828981a1371d96adaa4477723195795?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">edivad</media:title>
		</media:content>
	</item>
		<item>
		<title>edivad-suite 3.0.0 is out!</title>
		<link>http://edivad.wordpress.com/2009/04/28/edivad-suite-300-is-out/</link>
		<comments>http://edivad.wordpress.com/2009/04/28/edivad-suite-300-is-out/#comments</comments>
		<pubDate>Tue, 28 Apr 2009 12:17:56 +0000</pubDate>
		<dc:creator>edivad</dc:creator>
				<category><![CDATA[edivad-suite]]></category>
		<category><![CDATA[gimp]]></category>
		<category><![CDATA[release]]></category>
		<category><![CDATA[script-fu]]></category>

		<guid isPermaLink="false">http://edivad.wordpress.com/?p=268</guid>
		<description><![CDATA[edivad-suite, a suite of script-fu add-ons for automating some
operations in The Gimp has reached the 3.0.0 milestone which
accomplish requirements for running under gimp 2.4. Go to the download
page for getting it.
       <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=edivad.wordpress.com&blog=285424&post=268&subd=edivad&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><a href="http://edivad-suite.sourceforge.net/">edivad-suite</a>, a suite of script-fu add-ons for automating some<br />
operations in The Gimp has reached the 3.0.0 milestone which<br />
accomplish requirements for running under gimp 2.4. Go to the <a href="https://sourceforge.net/project/showfiles.php?group_id=242449">download<br />
page</a> for getting it.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/edivad.wordpress.com/268/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/edivad.wordpress.com/268/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/edivad.wordpress.com/268/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/edivad.wordpress.com/268/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/edivad.wordpress.com/268/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/edivad.wordpress.com/268/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/edivad.wordpress.com/268/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/edivad.wordpress.com/268/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/edivad.wordpress.com/268/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/edivad.wordpress.com/268/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=edivad.wordpress.com&blog=285424&post=268&subd=edivad&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://edivad.wordpress.com/2009/04/28/edivad-suite-300-is-out/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6828981a1371d96adaa4477723195795?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">edivad</media:title>
		</media:content>
	</item>
	</channel>
</rss>