<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-6493659385036206035</id><updated>2011-12-12T15:10:41.384+01:00</updated><category term='i/o'/><category term='reflection'/><category term='UTF8'/><category term='JSP'/><category term='Download'/><category term='hooks'/><category term='64bit'/><category term='dos join-files'/><category term='tomcat'/><category term='regexp'/><category term='gzip'/><category term='Tutorial'/><category term='Oracle'/><category term='odbc'/><category term='Syntax Highlighting'/><category term='assembly'/><category term='Web design'/><category term='Greasemonkey'/><category term='spellchecking sublist'/><category term='shell'/><category term='python'/><category term='plugin'/><category term='java jar classpath'/><category term='Macro'/><category term='Visual Basic'/><category term='Libri'/><category term='windows'/><category term='csv'/><category term='file'/><category term='liferay 5.2'/><category term='deploy'/><category term='debug'/><category term='hibernate'/><category term='Struts'/><category term='tagfile'/><category term='MySQL'/><category term='yoxel'/><category term='Javascript'/><category term='php'/><category term='Interfacce utente'/><category term='polyglot posting'/><category term='autohotkey'/><category term='remote'/><category term='performances'/><category term='windows scripting host'/><category term='Mylyn'/><category term='Extensions'/><category term='yslow'/><category term='traduzione'/><category term='subclipse'/><category term='java spellchecking sort comparator'/><category term='Java'/><category term='Blogger'/><category term='Word'/><category term='properties'/><category term='batch'/><category term='VBA'/><category term='AspectJ'/><category term='Firefox'/><category term='Ruby'/><category term='Maven'/><category term='aspect oriented programming'/><category term='directories'/><category term='Eclipse'/><category term='ant deploy'/><category term='unit testing'/><category term='quotes'/><category term='automatizzare'/><category term='Bugzilla'/><category term='parser'/><category term='Cookies'/><category term='Citazioni'/><category term='Douglas Adams'/><category term='svn'/><category term='subversion'/><category term='java spellchecking  edit-distance'/><title type='text'>Babil Senior</title><subtitle type='html'>Frammenti di codice e informazioni utili per chi sviluppa software</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://babilsenior.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://babilsenior.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Manrico Corazzi</name><uri>http://www.blogger.com/profile/10866541980869905892</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>68</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-6493659385036206035.post-6865740718992710212</id><published>2011-11-11T10:18:00.002+01:00</published><updated>2011-11-11T10:22:28.017+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='debug'/><category scheme='http://www.blogger.com/atom/ns#' term='Eclipse'/><category scheme='http://www.blogger.com/atom/ns#' term='remote'/><category scheme='http://www.blogger.com/atom/ns#' term='tomcat'/><title type='text'>Tomcat Debug Mode [ENG]</title><content type='html'>&lt;p&gt;Just a quick note. To start Tomcat in debug mode:&lt;/p&gt;
&lt;pre&gt;
%java_bin%\bin\java.exe 
-Xms48m 
-Xmx384m 
-Xdebug 
-Xrunjdwp:transport=dt_socket,address=1044,server=y,suspend=n 
-jar -Duser.dir="%catalina_home%" "%catalina_home%\bin\bootstrap.jar" start
&lt;/pre&gt;
&lt;p&gt;In Eclipse create a new Debug Configuration/Remote Java App, Standard (Socket Attach) with the actual Host and Port (1044 in my example)&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6493659385036206035-6865740718992710212?l=babilsenior.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://babilsenior.blogspot.com/feeds/6865740718992710212/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6493659385036206035&amp;postID=6865740718992710212' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default/6865740718992710212'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default/6865740718992710212'/><link rel='alternate' type='text/html' href='http://babilsenior.blogspot.com/2011/11/tomcat-debug-mode-eng.html' title='Tomcat Debug Mode [ENG]'/><author><name>Manrico Corazzi</name><uri>http://www.blogger.com/profile/10866541980869905892</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6493659385036206035.post-19946862058584281</id><published>2011-09-21T23:19:00.003+02:00</published><updated>2011-09-21T23:49:36.668+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='unit testing'/><category scheme='http://www.blogger.com/atom/ns#' term='php'/><title type='text'>Extremely Simple PHP Unit Test Framework/3 [ENG]</title><content type='html'>&lt;p&gt;&lt;a href="http://babilsenior.blogspot.com/2011/09/extremely-simple-php-unit-test.html" target="ontop"&gt;Part I&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://babilsenior.blogspot.com/2011/09/extremely-simple-php-unit-test_21.html" target="ontop"&gt;Part II&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;We've seen the test suite, the test, the test runner (the contraption required to get the test to run). The last thing is the test base class which implements the assertions.&lt;/p&gt;
&lt;pre class="brush:php"&gt;
class Test
{

 function assertEquals($expected, $got)
 {
  if ($expected!=$got)
  {
   trigger_error("Expected '" .$expected. "' but got '" .$got. "'", E_USER_ERROR);
  }
 }

 function assertContains($haystack, $needle)
 {
  if (strpos($haystack, $needle)&lt;0)
  {
   trigger_error("String '" .$needle. "' is not contained in '" .$haystack. "'", E_USER_ERROR);
  }
 }
 
 function assertNotNull($object)
 {
  if ($object==NULL)
  {
   trigger_error("assertNotNull failure", E_USER_ERROR);
  }
 }
 
 function assertTrue($condition)
 {
  if (!$condition)
  {
   trigger_error("assertTrue failed", E_USER_ERROR);
  }
 } 
 
}
&lt;/pre&gt;
&lt;p&gt;As you can see I kept that really really simple.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6493659385036206035-19946862058584281?l=babilsenior.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://babilsenior.blogspot.com/feeds/19946862058584281/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6493659385036206035&amp;postID=19946862058584281' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default/19946862058584281'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default/19946862058584281'/><link rel='alternate' type='text/html' href='http://babilsenior.blogspot.com/2011/09/extremely-simple-php-unit-test_8429.html' title='Extremely Simple PHP Unit Test Framework/3 [ENG]'/><author><name>Manrico Corazzi</name><uri>http://www.blogger.com/profile/10866541980869905892</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6493659385036206035.post-7199566956256400892</id><published>2011-09-21T00:49:00.003+02:00</published><updated>2011-09-21T23:12:28.254+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='unit testing'/><category scheme='http://www.blogger.com/atom/ns#' term='php'/><title type='text'>Extremely Simple PHP Unit Test Framework/2 [ENG]</title><content type='html'>&lt;p&gt;How does ESP-UTF (see  &lt;a href="http://babilsenior.blogspot.com/2011/09/extremely-simple-php-unit-test.html" target="ontop"&gt;part 1&lt;/a&gt;) run the single test?&lt;/p&gt;
&lt;pre class="brush:php"&gt;
function doTest($testClassName, $testMethodName)
{
 global $testFailed;
 global $testFailedCause;
 $testFailedCause = "";
 $testFailed = false;
 
 $object = new $testClassName();
 $object-&gt;$testMethodName();
 
 $result = new TestResult($testClassName, $testMethodName, !$testFailed, $testFailedCause);
 
 return $result;
}
&lt;/pre&gt;
&lt;p&gt;Things to note here:
&lt;ul&gt;
&lt;li&gt;the test result is held by a pair of global variables (lines 3 and 4); that's how I handled the errors; more on that later&lt;/li&gt;
&lt;li&gt;strings can be used as class and methods names without further ado (lines 8 and 9)&lt;/li&gt;
&lt;li&gt;the result is returned as a &lt;tt&gt;TestResult&lt;/tt&gt; object&lt;/li&gt;
&lt;/ul&gt;
&lt;/p&gt;
&lt;p&gt;I did not know how to trap errors (did I already say that I'm stuck with PHP4 and no exception handling?) other than by setting an error handler:&lt;/p&gt;
&lt;pre class="brush:php"&gt;
set_error_handler ('errorHandler');

function errorHandler($errno, $errstr, $errfile, $errline)
{
 global $testFailed;
 global $testFailedCause;
 $testFailedCause = "\nError: &lt;i&gt;" . $errno . "&lt;/i&gt;, file: &lt;i&gt;" . $errfile . "&lt;/i&gt;; line: &lt;i&gt;" . $errline . "&lt;/i&gt;; error: &lt;i&gt;". $errstr . "&lt;/i&gt;";
 $testFailed = true;
 return true;
}
&lt;/pre&gt;
&lt;p&gt;There's catch of course: if an assertion fails the execution of the method does not get stopped, it just goes on through to the end because that's how the error handler's supposed to work. Since I consider that a minor annoyance I did not waste further effort trying to mend that.&lt;/p&gt;
&lt;p&gt;Here's the TestResult class:&lt;/p&gt;
&lt;pre class="brush:php"&gt;
class TestResult
{
 var $testClassName;
 var $testMethodName;
 var $testBooleanResult;
 var $testMessageResult;
 
 function TestResult($className, $methodName, $booleanResult, $messageResult)
 {
  $this-&gt;testClassName = $className;
  $this-&gt;testMethodName = $methodName;
  $this-&gt;testBooleanResult = $booleanResult;
  $this-&gt;testMessageResult = $messageResult;
 }
 
 function x()
 {
  return $this-&gt;testClassName . "." . $this-&gt;testClassMethod . "='" . $this-&gt;testMessageResult . "'";
 }
 
}
&lt;/pre&gt;
&lt;p&gt;Nothing fancy, in fact.&lt;/p&gt;
&lt;p&gt;In the next episode the Test class&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6493659385036206035-7199566956256400892?l=babilsenior.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://babilsenior.blogspot.com/feeds/7199566956256400892/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6493659385036206035&amp;postID=7199566956256400892' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default/7199566956256400892'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default/7199566956256400892'/><link rel='alternate' type='text/html' href='http://babilsenior.blogspot.com/2011/09/extremely-simple-php-unit-test_21.html' title='Extremely Simple PHP Unit Test Framework/2 [ENG]'/><author><name>Manrico Corazzi</name><uri>http://www.blogger.com/profile/10866541980869905892</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6493659385036206035.post-69366939577962204</id><published>2011-09-19T23:26:00.006+02:00</published><updated>2011-09-20T09:35:17.674+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='unit testing'/><category scheme='http://www.blogger.com/atom/ns#' term='php'/><title type='text'>Extremely Simple PHP Unit Test Framework [ENG]</title><content type='html'>&lt;p&gt;Ok, I know. There is &lt;a href="https://github.com/sebastianbergmann/phpunit/"&gt;PHPUnit&lt;/a&gt;, already, and enough &lt;a href="http://giorgiosironi.blogspot.com/2009/12/practical-php-testing-is-here.html"&gt;good books&lt;/a&gt; to get you started if you want to go down that path (that is the sensible thing to do, by the way).&lt;/p&gt;
&lt;p&gt;Since I had to play with PHP for a pet project, got stuck with PHP4, was not able to set up PHPUnit and lost my patience, I decided to whip up something on my own. ESP-UTF is just an experiment: I wanted to peek behind the curtains to see how a unit test framework is made. Hope you may find something interesting among this crap.&lt;/p&gt;
&lt;p&gt;First of all I only knew how to send the output of PHP scripts to a web page, so that's how I thought to show the test outcome.&lt;/p&gt;
&lt;p&gt;How will the test cases look like? Well something like this:&lt;/p&gt;
&lt;pre class="brush:php"&gt;
class TestLanguage extends Test
{

 function testLanguageUK()
 {
  $pLang = new phpI18N('en');
   $testResult = $pLang-&gt;getPhrase('register', 'first_name');
  $this-&gt;assertEquals('First Name', $testResult);
 }

}
&lt;/pre&gt;
&lt;p&gt;As in JUnit 3 I need to extend a basic Test class, and the test method has to be called testName. Since that's exactly what you have to do in Groovy I can live with that.&lt;/p&gt;
&lt;p&gt;Now, how do I create a test runner? I did not want to do anything complicated, just a simple report. And I wanted my framework to handle test suites. Here's how I did that:&lt;/p&gt;
&lt;pre class="brush:php"&gt;
$testSuite = array(
 "TestDAOArticoli",
 "TestDAOUtente",
 "TestDAOCategoria",
 "TestLanguage",
 "TestCart"
);

$testResults = doTestSuite($testSuite);

render($testResults);
&lt;/pre&gt;
&lt;p&gt;Could there be anything simpler? How do I load the test methods from each class?&lt;/p&gt;
&lt;pre class="brush:php"&gt;
function doTestSuite($testSuite)
{
 $testResults = array();
 foreach($testSuite as $testClass)
 {
  $testResults = array_merge($testResults, doTests($testClass));
 }
 return $testResults;
}
&lt;/pre&gt;
&lt;p&gt;I collect the test results in an array. The render function will display that in a fancy style. Here's the doTests() method (more interesting):&lt;/p&gt;
&lt;pre class="brush:php"&gt;
function doTests($testClassName)
{
 $testResults = array();
 $class_methods = get_class_methods($testClassName);
 foreach ($class_methods as $method_name) 
 {
     if (preg_match("/^test/", $method_name))
     {
          $testResults[] = doTest($testClassName, $method_name);
     }
 }
 return $testResults;
}
&lt;/pre&gt;
&lt;p&gt;No rocket science, so far, right? In the next episode: how to do the test?&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6493659385036206035-69366939577962204?l=babilsenior.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://babilsenior.blogspot.com/feeds/69366939577962204/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6493659385036206035&amp;postID=69366939577962204' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default/69366939577962204'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default/69366939577962204'/><link rel='alternate' type='text/html' href='http://babilsenior.blogspot.com/2011/09/extremely-simple-php-unit-test.html' title='Extremely Simple PHP Unit Test Framework [ENG]'/><author><name>Manrico Corazzi</name><uri>http://www.blogger.com/profile/10866541980869905892</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6493659385036206035.post-1034838852541910239</id><published>2011-07-08T14:16:00.005+02:00</published><updated>2011-07-08T14:23:12.319+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='Greasemonkey'/><title type='text'>Greasemonkey e Il Post [ITA]</title><content type='html'>&lt;p&gt;Il sito &lt;a href="http://www.ilpost.it/" target="ontop"&gt;Il Post&lt;/a&gt; pubblica alcune news in formato "Post-it", vale a dire che riporta solo il link all'articolo originale. Chi segue il sito tramite feed RSS deve quindi fare due clic per raggiungere il contenuto.&lt;/p&gt;
&lt;p&gt;Oppure usare questo script Greasemonkey:&lt;/p&gt;
&lt;pre class="brush:js"&gt;
// ==UserScript==
// @name           Il Post - Post-it
// @namespace      personal
// @description    Inoltra da post-it a destinazione finale
// @include        http://www.ilpost.it/*
// ==/UserScript==

var h1 = document.getElementsByTagName("h1")[0];

var h1_a_href = h1.childNodes[1].getAttribute("href");

var isPostIt = document.body.innerHTML.indexOf("categoria Post-it");

if (isPostIt&gt;=0)
{
  document.location.href = h1_a_href;
}
&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6493659385036206035-1034838852541910239?l=babilsenior.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://babilsenior.blogspot.com/feeds/1034838852541910239/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6493659385036206035&amp;postID=1034838852541910239' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default/1034838852541910239'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default/1034838852541910239'/><link rel='alternate' type='text/html' href='http://babilsenior.blogspot.com/2011/07/greasemonkey-e-il-post.html' title='Greasemonkey e Il Post [ITA]'/><author><name>Manrico Corazzi</name><uri>http://www.blogger.com/profile/10866541980869905892</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6493659385036206035.post-4100590405927588124</id><published>2011-01-14T17:37:00.005+01:00</published><updated>2011-07-08T14:16:22.363+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='file'/><category scheme='http://www.blogger.com/atom/ns#' term='Ruby'/><category scheme='http://www.blogger.com/atom/ns#' term='directories'/><title type='text'>Ruby: flatten directory [ENG]</title><content type='html'>&lt;p&gt;
We've organized files in subdirectories &lt;a href="http://babilsenior.blogspot.com/2008/08/ruby-file-sieve.html"&gt;according to tags&lt;/a&gt; and &lt;a href="http://babilsenior.blogspot.com/2009/10/sorting-files-into-folders-by-date-eng.html"&gt;according to creation date&lt;/a&gt;. What if you would like to flatten a tree, moving all files from the sub-directories into a single directory? 
&lt;/p&gt;
&lt;pre class="brush: ruby"&gt;
"Move all the files from the tree starting at source_dir"
"into dest_dir out of the tree"
def flatten(source_dir, dest_dir)
 Dir.foreach(source_dir) do |filename|
    # exclude current dir and parent dir
    if (!filename.eql?(".") and !filename.eql?("..")) 
     if File.directory?(filename) # subdirectory
       flatten(filename, dest_dir) # recursively flatten subdir
     else #file
       dirname = File.dirname(filename)
       filenameonly = filename[(dirname.length-1)..-1]
       old_name = source_dir + "/" + filename
       new_name = dest_dir + "/" + filenameonly
       puts("moving '#{old_name}' to '#{new_name}'")
       File.rename(old_name, new_name) 
     end
    end
  end
end

# read line parameters

source_dir = ARGV.shift
# default source dir is current dir
if (source_dir == nil) 
  source_dir = "."
end

dest_dir = ARGV.shift
# default destination dir current dir
if (dest_dir == nil)
  dest_dir = "."
end 

flatten(source_dir, dest_dir)
&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6493659385036206035-4100590405927588124?l=babilsenior.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://babilsenior.blogspot.com/feeds/4100590405927588124/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6493659385036206035&amp;postID=4100590405927588124' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default/4100590405927588124'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default/4100590405927588124'/><link rel='alternate' type='text/html' href='http://babilsenior.blogspot.com/2011/01/ruby-flatten-directory.html' title='Ruby: flatten directory [ENG]'/><author><name>Manrico Corazzi</name><uri>http://www.blogger.com/profile/10866541980869905892</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6493659385036206035.post-1954725275713894767</id><published>2011-01-11T17:51:00.012+01:00</published><updated>2011-01-12T10:55:09.331+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='csv'/><category scheme='http://www.blogger.com/atom/ns#' term='reflection'/><category scheme='http://www.blogger.com/atom/ns#' term='parser'/><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><title type='text'>Java: Reflect on this [ENG]</title><content type='html'>&lt;p&gt;
Reflection in Java is a powerful tool, expecially useful when your code must get in touch with the outer world (configuration files, database, http protocol...).
Here's an example, a simple parser for a CSV string where every value has a tag:
&lt;/p&gt;
&lt;pre class="brush: java"&gt;
id=1112396889697; t=22740834120; 
x=184549969; y=8389273; f=89; 
q0=0.18810; q1=0.07500; q2=-0.23573; q3=0.96616
&lt;/pre&gt;
&lt;p&gt;
What I would like to do here is parsing the data into an object with (a subset of) the fields in each line. The solution is overly simplified, but it just works:
&lt;/p&gt;
&lt;pre  class="brush: java"&gt;
import java.lang.reflect.Field;

public class Sample
{

    class SampleData
    {
        public Long t = new Long(0);
    
        public Long x = new Long(0);
        public Long y = new Long(0);
        public Long f = new Long(0);
    
        public Double q0 = new Double(0);
        public Double q1 = new Double(0);
        public Double q2 = new Double(0);
        public Double q3 = new Double(0);
    }

    private SampleData data = new SampleData();
    
    public Sample(String taggedCsv)
    {
        if (taggedCsv != null &amp;&amp; !"".equals(taggedCsv))
        {
            String[] chunks = taggedCsv.split(";");
            for (String chunk : chunks)
            {
                chunk = chunk.trim();
                String[] parts = chunk.split("=");
                String tag = parts[0].trim();
                String value = parts[1].trim();
                try
                {
                    Class&amp;lt;? extends SampleData&gt; class1 = data.getClass();
                    Field f = class1.getField(tag);
                    if (f!=null)
                    {
                        if (f.getType().equals(java.lang.Double.class))
                        {
                            f.set(data, new Double(value));
                        }
                        else
                        if (f.getType().equals(java.lang.Long.class))
                        {
                            f.set(data, new Long(value));
                        }
                    }
                }
                catch (Exception e)
                {
                    System.out.println(e.getMessage());
                }
            }
        }
    }

    public long getT()
    {
        return data.t.longValue();
    }

    public double getX()
    {
        return data.x.longValue();
    }

    public double getY()
    {
        return data.y.longValue();
    }

    public double getF()
    {
        return data.f.longValue();
    }

    public double getQ0()
    {
        return data.q0.doubleValue();
    }

    public double getQ1()
    {
        return data.q1.doubleValue();
    }

    public double getQ2()
    {
        return data.q2.doubleValue();
    }

    public double getQ3()
    {
        return data.q3.doubleValue();
    }

}
&lt;/pre&gt;
&lt;p&gt;
It seems like it's doing its job just fine:
&lt;/p&gt;
&lt;pre  class="brush: java"&gt;
    @Test
    public void firstTest()
    {
        Sample a = new Sample(
"id=1112396889697; t=22740834120; " + 
"x=184549969; y=8389273; f=89; " +
"q0=0.18810; q1=0.07500; q2=-0.23573; q3=0.96616"); 
        assertTrue(22740834120L==a.getT());
        assertTrue(184549969L==a.getX());
        assertTrue(8389273L==a.getY());
        
    }
&lt;/pre&gt;
&lt;p&gt;
&lt;b&gt;NOTE&lt;/b&gt;: there is an awkward thing in the code up there. To obtain encapsulation I had to use a PRIVATE class (DataSample) with PUBLIC fields because &lt;code&gt;getField()&lt;/code&gt; can not access PRIVATE fields. There are other ways round, but they are not as lean. Still don't like it, though.
&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6493659385036206035-1954725275713894767?l=babilsenior.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://babilsenior.blogspot.com/feeds/1954725275713894767/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6493659385036206035&amp;postID=1954725275713894767' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default/1954725275713894767'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default/1954725275713894767'/><link rel='alternate' type='text/html' href='http://babilsenior.blogspot.com/2011/01/java-reflect-on-this-eng.html' title='Java: Reflect on this [ENG]'/><author><name>Manrico Corazzi</name><uri>http://www.blogger.com/profile/10866541980869905892</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6493659385036206035.post-1333258966369707175</id><published>2010-10-18T15:02:00.004+02:00</published><updated>2011-08-22T14:34:17.994+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='odbc'/><category scheme='http://www.blogger.com/atom/ns#' term='64bit'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><title type='text'>Oracle 10g: ODBC on a 64 bit machine [ENG]</title><content type='html'>Ok, I admit I didn't see that coming.&lt;br/&gt;
After installing Oracle 10g 32 Bit Client on a Windows 2K8 64 bit machine ODBC drivers were nowhere to be found.&lt;br/&gt;
The trick is (apparently) of abysmal stupidity: you have to launch an EXE (&lt;span style="font-weight:bold;"&gt;C:\WINDOWS\SysWOW64\odbcad32.exe&lt;/span&gt;) to make them show up in Administrative Tools / ODBC Data Sources. &lt;br/&gt;
Thanks to &lt;a href="http://gerardnico.com/weblog/"&gt;Nicolas Gerard&lt;/a&gt; for saving my bacon with &lt;a href="http://gerardnico.com/wiki/odbc/system_dsn#i_don_t_find_my_driver_on_a_64_bit_machine"&gt;his precious hint&lt;/a&gt;.&lt;br/&gt;
More about this &lt;a href="http://sqlblog.com/blogs/jorg_klein/archive/2011/06/09/ssis-connect-to-oracle-on-a-64-bit-machine.aspx" target="ontop"&gt;here&lt;/a&gt; (thanks to Paolo C. for the link).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6493659385036206035-1333258966369707175?l=babilsenior.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://babilsenior.blogspot.com/feeds/1333258966369707175/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6493659385036206035&amp;postID=1333258966369707175' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default/1333258966369707175'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default/1333258966369707175'/><link rel='alternate' type='text/html' href='http://babilsenior.blogspot.com/2010/10/oracle-10g-odbc-on-64-bit-machine-eng.html' title='Oracle 10g: ODBC on a 64 bit machine [ENG]'/><author><name>Manrico Corazzi</name><uri>http://www.blogger.com/profile/10866541980869905892</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6493659385036206035.post-1864575911081228930</id><published>2010-07-12T14:20:00.006+02:00</published><updated>2010-10-21T10:46:06.238+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='regexp'/><title type='text'>Fun with RegExp [ENG]</title><content type='html'>Today it is another of those &lt;a href="http://www.regular-expressions.info/" target="_blank"&gt;Regular Expressions&lt;/a&gt; Appreciation Days I sometimes like to hold. RegExp are not beautiful nor elegant, but they are very powerful. &lt;br/&gt;
Let's say you have a batch file which begins setting some variables:
&lt;pre name="code"&gt;
set REGASM_HOME=c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727
set V_HOME=c:\programmi\v
set V_HOME=c:\programmi\v
set DWVF_DLL=D.V.dll
set TEMPDIR=c:\dev\_deploy
set VFAP_DLL=VPOD.dll
&lt;/pre&gt;
If you need to echo the stuff for debugging purposes (and don't want to use a SET command) you must add as many lines like this:
&lt;pre name="code"&gt;
echo REGASM_HOME=%REGASM_HOME%
&lt;/pre&gt;
Putting that all in by hand, even with smart cut &amp; paste, would require time and is prone to errors (and it is so not cool, is it now?). What about &lt;a href="http://www.pspad.com/it/" target="_blank"&gt;a good editor&lt;/a&gt; and some regular expressions? I copied the above lines and applied these search &amp; replace patterns:
&lt;pre name="code"&gt;
search for: set (\w*)(=)(.*)$
replace with: echo $1=%$1%
&lt;/pre&gt;
et voilà, les jeux sont fait!&lt;br/&gt;
If you want to toy with regular expressions try &lt;a href="http://www.weitz.de/regex-coach/" target="_blanck"&gt;Regex Coach&lt;/a&gt;: it is a very useful tool.&lt;br/&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6493659385036206035-1864575911081228930?l=babilsenior.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://babilsenior.blogspot.com/feeds/1864575911081228930/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6493659385036206035&amp;postID=1864575911081228930' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default/1864575911081228930'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default/1864575911081228930'/><link rel='alternate' type='text/html' href='http://babilsenior.blogspot.com/2010/07/fun-with-regexp-eng.html' title='Fun with RegExp [ENG]'/><author><name>Manrico Corazzi</name><uri>http://www.blogger.com/profile/10866541980869905892</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6493659385036206035.post-589125343214479307</id><published>2010-07-01T17:05:00.004+02:00</published><updated>2010-07-04T08:47:27.222+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='dos join-files'/><title type='text'>Join multiple files [ENG]</title><content type='html'>Do you always forget how to join multiple files in DOS? Example: multiple &lt;tt&gt;.log&lt;/tt&gt; files into an &lt;tt&gt;aggregate.txt&lt;/tt&gt; file&lt;br/&gt;
&lt;hr/&gt;
&lt;b&gt;Method #1: command line copy&lt;/b&gt;
&lt;pre name="code"&gt;
copy /a *.log aggregate.txt
&lt;/pre&gt;
&lt;b&gt;Method #2: command line for loop&lt;/b&gt;
&lt;pre name="code"&gt;
for %f in (*.log) do type "%f" &gt;&gt; aggregate.txt
&lt;/pre&gt;
&lt;b&gt;Method #3: batch loop (note the double %)&lt;/b&gt;
&lt;pre name="code"&gt;
for %%f in (*.log) do type "%%f" &gt;&gt; aggregate.txt
&lt;/pre&gt;
&lt;hr/&gt;
Thanks to &lt;a href="http://www.howtogeek.com/howto/keyboard-ninja/keyboard-ninja-concatenate-multiple-text-files-in-windows/"&gt;HowToGeek&lt;/a&gt;!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6493659385036206035-589125343214479307?l=babilsenior.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://babilsenior.blogspot.com/feeds/589125343214479307/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6493659385036206035&amp;postID=589125343214479307' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default/589125343214479307'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default/589125343214479307'/><link rel='alternate' type='text/html' href='http://babilsenior.blogspot.com/2010/07/join-multiple-files-eng.html' title='Join multiple files [ENG]'/><author><name>Manrico Corazzi</name><uri>http://www.blogger.com/profile/10866541980869905892</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6493659385036206035.post-4645913741023337918</id><published>2010-06-25T10:03:00.006+02:00</published><updated>2011-01-12T10:05:54.719+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='spellchecking sublist'/><title type='text'>How to suggest alternate spellings/3 [ENG]</title><content type='html'>&lt;p&gt;
The scenario is well defined already:
&lt;ol&gt;
&lt;li&gt;
the user types in a string in a field restricted to a dictionary
&lt;/li&gt;
&lt;li&gt;we know &lt;a href="http://babilsenior.blogspot.com/2010/06/how-to-suggest-alternate-spellings1-eng.html"&gt;how to calculate the edit distance&lt;/a&gt; between every string in our dictionary and the user input&lt;/li&gt;
&lt;li&gt;so &lt;a href="http://babilsenior.blogspot.com/2010/06/how-to-suggest-alternate-spellings2-eng.html"&gt;we bundle up a word with its score and define a sorting rule&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
Time to wrap it up:
&lt;/p&gt;
&lt;pre  class="brush: java"&gt;
public class SpellSuggester
{
    
    private List&amp;lt;Word&gt; dictionary;
    
  
    public SpellSuggester(...)
    {
       // load the dictionary however you prefer
    }
    
    public List&amp;lt;Word&gt; getSimilarWords(String wordToSearch, int limit)
    {
        // 1. compute the score
        for (Word word : dictionary)
        {
            word.setScore(spellChecking.levenshteinDistance(word.getWord(), wordToSearch));
        }
        
        // 2. sort
        Collections.sort(dictionary, new WordComparator());

        // 3. extract the first 'limit' entries (if limit == 0 returns the whole list)
        if (limit&amp;lt;=0)
        {
            return dictionary;
        }
        else
        {
            return dictionary.subList(0, limit);
        }
    }
    
}
&lt;/pre&gt;
&lt;p&gt;Pretty simple isn't it?&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6493659385036206035-4645913741023337918?l=babilsenior.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://babilsenior.blogspot.com/feeds/4645913741023337918/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6493659385036206035&amp;postID=4645913741023337918' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default/4645913741023337918'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default/4645913741023337918'/><link rel='alternate' type='text/html' href='http://babilsenior.blogspot.com/2010/06/how-to-suggest-alternate-spellings3-eng.html' title='How to suggest alternate spellings/3 [ENG]'/><author><name>Manrico Corazzi</name><uri>http://www.blogger.com/profile/10866541980869905892</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6493659385036206035.post-2172861655269112742</id><published>2010-06-24T09:47:00.006+02:00</published><updated>2011-01-12T10:08:09.434+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java spellchecking sort comparator'/><title type='text'>How to suggest alternate spellings/2 [ENG]</title><content type='html'>&lt;p&gt;
We learned &lt;a href="http://babilsenior.blogspot.com/2010/06/how-to-suggest-alternate-spellings1-eng.html"&gt;how to estimate the edit distance of two strings&lt;/a&gt;. How do we use this information?&lt;/p&gt;
&lt;p&gt;
I thought of giving each word in my dictionary a score over the user's input and showing the entries in the list sorted by this score.&lt;/p&gt;
&lt;p&gt;
Since the "edit distance" is a small number when the words are similar it would be an ascending order (the first entries are closer to user input).&lt;/p&gt;
&lt;p&gt;
First I defined a &lt;code&gt;Word&lt;/code&gt; class:
&lt;/p&gt;
&lt;pre  class="brush: java"&gt;
    public static class Word 
    {
        @Override
        public String toString()
        {
            return "word='" + word + "'; score=" + score;
        }

        Word(String word)
        {
            this.word = word;
        }
        
        private String word;
        private int score;
        
        public void setScore(int score)
        {
            this.score = score;
        }

        public int getScore()
        {
            return score;
        }
        
        public String getWord()
        {
            return word;
        }
    }
&lt;/pre&gt;
&lt;p&gt;
To sort this stuff we are going to need a comparator:
&lt;/p&gt;
&lt;pre  class="brush: java"&gt;
    public class WordComparator implements Comparator&amp;lt;Word&gt; 
    {
        public int compare(Word word1, Word word2) 
        {
            return word1.getScore()-word2.getScore();
        }
    }
&lt;/pre&gt;
&lt;p&gt;
We are almost there...
&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6493659385036206035-2172861655269112742?l=babilsenior.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://babilsenior.blogspot.com/feeds/2172861655269112742/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6493659385036206035&amp;postID=2172861655269112742' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default/2172861655269112742'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default/2172861655269112742'/><link rel='alternate' type='text/html' href='http://babilsenior.blogspot.com/2010/06/how-to-suggest-alternate-spellings2-eng.html' title='How to suggest alternate spellings/2 [ENG]'/><author><name>Manrico Corazzi</name><uri>http://www.blogger.com/profile/10866541980869905892</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6493659385036206035.post-6153063508029867216</id><published>2010-06-24T01:01:00.006+02:00</published><updated>2011-01-12T10:17:10.558+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java spellchecking  edit-distance'/><title type='text'>How to suggest alternate spellings/1 [ENG]</title><content type='html'>&lt;p&gt;
How to suggest a list of alternate spellings to the user when s/he is typing something?
&lt;/p&gt;
&lt;p&gt;
Since you have a dictionary - a set of "allowed" strings for a field - you might first want to evaluate which of these strings are similar to the user input.
&lt;/p&gt;
&lt;p&gt;
There are &lt;a href="http://en.wikipedia.org/wiki/Edit_distance" target="ontop"&gt;several strategies&lt;/a&gt; to accomplish that.&lt;/p&gt;
&lt;p&gt;
Here is a very naive and plain implementation of &lt;a href="http://en.wikipedia.org/wiki/Levenshtein_distance"&gt;Levenshtein Distance&lt;/a&gt;:&lt;/p&gt;

&lt;pre class="brush: java"&gt;
        // Strings sanitizing
        if (s==null) s="";
        if (t==null) t="";
        s = s.toUpperCase();
        t = t.toUpperCase();

        // d is a table with m+1 rows and n+1 columns
        int m = s.length();
        int n = t.length();
        int[][] d = new int[m+1][n+1];

        for (int i = 1; i &amp;lt;= m; i++)
        {
            d[i][0] = i; // deletion
        }
        
        for (int j = 1; j &amp;lt;= n; j++)
        {
            d[0][j] = j; // insertion
        }
        
        for (int j = 1; j &amp;lt;= n; j++)
        {
            for (int i = 1; i &amp;lt;= m; i++)
            {
                if (s.charAt(i-1) == t.charAt(j-1))
                {
                    d[i][j] = d[i - 1][j - 1];
                }
                else
                {
                    d[i][j] = minimum(d[i - 1][j] + 1, // deletion
                            d[i][j - 1] + 1, // insertion
                            d[i - 1][j - 1] + 1 // substitution
                    );
                }
            }
        }

        return d[m][n];
    }

    public int minimum(int i, int j, int k)
    {
        if ((i &amp;lt; j) &amp;&amp; (i &amp;lt; k))
            return i;
        if ((j &amp;lt; i) &amp;&amp; (j &amp;lt; k))
            return j;
        return k;
    }
&lt;/pre&gt;

&lt;p&gt;And here are some tests results:&lt;/p&gt;

&lt;pre class="brush: java"&gt;
PAMPLONA - PIMPLONA = 1
PAMPLONA - PIMPONA = 2
PAMPLONA - pippona = 3
PAMPLONA - RAMbONA = 3
PAMPLONA - RusTIcheLLA = 10
&lt;/pre&gt;
&lt;p&gt;
&lt;b&gt;EDIT:&lt;/b&gt; there was a bug in the algorhytm, corrected
&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6493659385036206035-6153063508029867216?l=babilsenior.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://babilsenior.blogspot.com/feeds/6153063508029867216/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6493659385036206035&amp;postID=6153063508029867216' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default/6153063508029867216'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default/6153063508029867216'/><link rel='alternate' type='text/html' href='http://babilsenior.blogspot.com/2010/06/how-to-suggest-alternate-spellings1-eng.html' title='How to suggest alternate spellings/1 [ENG]'/><author><name>Manrico Corazzi</name><uri>http://www.blogger.com/profile/10866541980869905892</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6493659385036206035.post-1976953335968285438</id><published>2010-04-08T23:27:00.001+02:00</published><updated>2010-04-08T23:57:30.572+02:00</updated><title type='text'>Eclipse Plugin: PHPEclipse</title><content type='html'>&lt;i&gt;home page&lt;/i&gt;: &lt;a href="http://www.phpeclipse.com/"&gt;PHPEclipse&lt;/a&gt;&lt;br/&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6493659385036206035-1976953335968285438?l=babilsenior.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://babilsenior.blogspot.com/feeds/1976953335968285438/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6493659385036206035&amp;postID=1976953335968285438' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default/1976953335968285438'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default/1976953335968285438'/><link rel='alternate' type='text/html' href='http://babilsenior.blogspot.com/2010/04/eclipse-plugin-phpeclipse.html' title='Eclipse Plugin: PHPEclipse'/><author><name>Manrico Corazzi</name><uri>http://www.blogger.com/profile/10866541980869905892</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6493659385036206035.post-23108112568749082</id><published>2010-01-27T12:35:00.010+01:00</published><updated>2011-01-12T10:19:02.100+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ant deploy'/><title type='text'>Deploy scripts: ANT [ENG]</title><content type='html'>Notwithstanding its ugly XML syntax, &lt;a href="http://ant.apache.org/" target="_blank"&gt;Apache ANT&lt;/a&gt; is a powerful tool. It is generally used for automatic repetitive tasks (such as deploying applications). Here's one of my scripts, a little bit trimmed down (so it may not work as it is). &lt;br/&gt;
&lt;pre  class="brush: xml"&gt;
&amp;lt;?xml version="1.0"?&gt;

&amp;lt;project name="projectName" basedir="."&gt;

  &amp;lt;property environment="env" /&gt;

  &amp;lt;property file="build.properties" /&gt;

  &amp;lt;fileset dir="${local.install.dir}" id="deployable"&gt;
    &amp;lt;exclude name="WEB-INF/web.xml" /&gt;
    &amp;lt;exclude name="WEB-INF/jboss-web.xml" /&gt;
    &amp;lt;exclude name="index.jsp" /&gt;
    &amp;lt;exclude name="WEB-INF/lib/activation.jar" /&gt;

    &amp;lt;!-- well, you get the idea --&gt;
    
    &amp;lt;/fileset&gt;

  &amp;lt;!-- remote service invocations --&gt;
  &amp;lt;target name="remote.service"&gt;
    &amp;lt;exec executable="sc"&gt;
      &amp;lt;arg value="\\remote_host" /&gt;
      &amp;lt;arg value="${service.command}" /&gt;
      &amp;lt;arg value="service-name" /&gt;
    &amp;lt;/exec&gt;
  &amp;lt;/target&gt;

  &amp;lt;target name="remote.service.stop"&gt;
    &amp;lt;antcall target="remote.service"&gt;
      &amp;lt;param name="service.command" value="stop" /&gt;
    &amp;lt;/antcall&gt;
  &amp;lt;/target&gt;

  &amp;lt;target name="remote.service.start"&gt;
    &amp;lt;antcall target="remote.service"&gt;
      &amp;lt;param name="service.command" value="start" /&gt;
    &amp;lt;/antcall&gt;
  &amp;lt;/target&gt;

  &amp;lt;target name="remote.copy"&gt;
    &amp;lt;copy todir="${remote.deploy.dir}"&gt;
      &amp;lt;fileset refid="deployable" /&gt;
    &amp;lt;/copy&gt;
  &amp;lt;/target&gt;

  &amp;lt;target name="delete.tmp"&gt;
    &amp;lt;delete dir="${work.dir}" /&gt;
    &amp;lt;delete dir="${tmp.dir}" /&gt;
  &amp;lt;/target&gt;
  
  &amp;lt;target name="deploy" description="remote deploy"&gt;
    &amp;lt;!--
    1. stop application server service
    2. perform full "backup" in a nearby directory 
    3. clean deploy directory
    4. copy files (except server specific ones)
    5. restore missing files (the server specific ones, which we backed up in 2.)
    6. copy configuration files
    7. delete work and tmp directories (for Tomcat)
    8. restart service
    --&gt;

    &amp;lt;!-- 0. initialize timestamp --&gt;
    &amp;lt;tstamp /&gt;

    &amp;lt;!-- 1. stop application server service --&gt;
    &amp;lt;antcall target="remote.service.stop" /&gt;

    &amp;lt;!-- 2. full "backup" in a nearby directory --&gt;
    &amp;lt;echo message="backup" /&gt;
    &amp;lt;property name="backup.dir" value="${remote.backup.dir}/application.war" /&gt;
    &amp;lt;copy todir="${backup.dir}"&gt;
      &amp;lt;fileset refid="deployed.application" /&gt;
    &amp;lt;/copy&gt;

    &amp;lt;!-- 3. clean deploy directory --&gt;
    &amp;lt;echo message="cleanup deploy dir" /&gt;
    &amp;lt;delete dir="${deploy.dir}" /&gt;

    &amp;lt;!-- 4. copy files (except server specific ones) --&gt;
    &amp;lt;echo message="copy files" /&gt;
    &amp;lt;antcall target="remote.copy" /&gt;

    &amp;lt;!-- 5. restore missing files (the server specific ones, which we backed up in 2.) --&gt;
    &amp;lt;echo message="restore files" /&gt;
    &amp;lt;copy todir="${deploy.dir}"&gt;
      &amp;lt;fileset dir="${backup.dir}"&gt;
        &amp;lt;include name="whatever_1" /&gt;
        &amp;lt;include name="whatever_2" /&gt;
      &amp;lt;/fileset&gt;
    &amp;lt;/copy&gt;

    &amp;lt;!-- 6. copy configuration files --&gt;
    &amp;lt;echo message="copy configuration" /&gt;
    &amp;lt;copy todir="${configuration.dir}"&gt;
      &amp;lt;fileset refid="configuration.files" /&gt;
    &amp;lt;/copy&gt;

    &amp;lt;!-- 7. wipe work and tmp --&gt;
    &amp;lt;echo message="removing work and tmp" /&gt;
    &amp;lt;antcall target="delete.tmp" /&gt;

    &amp;lt;!-- 8. restart service --&gt;
    &amp;lt;antcall target="remote.service.start" /&gt;

  &amp;lt;/target&gt;

&amp;lt;/project&gt;
&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6493659385036206035-23108112568749082?l=babilsenior.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://babilsenior.blogspot.com/feeds/23108112568749082/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6493659385036206035&amp;postID=23108112568749082' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default/23108112568749082'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default/23108112568749082'/><link rel='alternate' type='text/html' href='http://babilsenior.blogspot.com/2010/01/deploy-scripts-ant-eng.html' title='Deploy scripts: ANT [ENG]'/><author><name>Manrico Corazzi</name><uri>http://www.blogger.com/profile/10866541980869905892</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6493659385036206035.post-5341073448873150096</id><published>2010-01-27T12:17:00.005+01:00</published><updated>2011-01-12T10:21:42.224+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='deploy'/><category scheme='http://www.blogger.com/atom/ns#' term='batch'/><title type='text'>Deploy scripts: DOS batch file [ENG]</title><content type='html'>From time to time I need to deploy a new web application to a server. There are many ways to do so, but I found this small Windows batch script mighty useful.&lt;br/&gt;
&lt;ol&gt;
&lt;li&gt;stops the application server service&lt;/li&gt;
&lt;li&gt;copies the files from the directory &lt;code&gt;./latest&lt;/code&gt; to the proper destination directory&lt;/li&gt;
&lt;li&gt;starts the application server service again&lt;/li&gt;
&lt;li&gt;renames the directory &lt;code&gt;./latest&lt;/code&gt; with the current date and time (in case you have to rollback)&lt;/li&gt;
&lt;/ol&gt;
&lt;pre  class="brush: ps"&gt;
@echo off
echo Stopping "service x"...
sc \\localhost stop "service x"
echo Deploying files...
xcopy ".\latest\*.*" "destination_dir" /Y /S
echo Restarting "service x"...
sc \\localhost start "schd service"
set Filename=%Date:~-4,4%%Date:~-7,2%%Date:~-10,2%_%Time:~0,2%%Time:~3,2%_application_name
echo Renaming "latest" folder to "%Filename%"...
rename latest %Filename%
pause
&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6493659385036206035-5341073448873150096?l=babilsenior.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://babilsenior.blogspot.com/feeds/5341073448873150096/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6493659385036206035&amp;postID=5341073448873150096' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default/5341073448873150096'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default/5341073448873150096'/><link rel='alternate' type='text/html' href='http://babilsenior.blogspot.com/2010/01/deploy-script-eng.html' title='Deploy scripts: DOS batch file [ENG]'/><author><name>Manrico Corazzi</name><uri>http://www.blogger.com/profile/10866541980869905892</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6493659385036206035.post-1388994026968225942</id><published>2010-01-27T10:22:00.004+01:00</published><updated>2011-01-12T10:26:52.543+01:00</updated><title type='text'>JSP functions [ENG]</title><content type='html'>&lt;p&gt;
The usage of JSP scriptlets is discouraged, and for many good reasons. But just in case you didn't know you might add methods to the implicit class generated by Jasper from the JSP source file.
&lt;/p&gt;
&lt;p&gt;
A couple of days ago I found this in our code base:
&lt;/p&gt;
&lt;pre  class="brush: java"&gt;
  try
  {
    strPagina = CString.isNullReplace(request.getParameter("pic_pagina")).trim();
    if (strPagina.length() == 0)
    {
      strPagina = CString.isNullReplace(authentBean.getString("pic_pagina")).trim();
    }
    authentBean.set("pic_pagina", strPagina);
    strDatePic = CString.isNullReplace(request.getParameter("pic_date")).trim();
    if (strDatePic.length() == 0)
    {
      strDatePic = CString.isNullReplace(authentBean.getString("pic_date")).trim();
    }
    authentBean.set("pic_data", strDatePic);    
    strEventPic = CString.isNullReplace(request.getParameter("pic_event")).trim();
    if (strEventPic.length() == 0)
    {
      strEventPic = CString.isNullReplace(authentBean.getString("pic_event")).trim();
    }
    authentBean.set("pic_event", strEventPic);    
  }
  catch (Exception e)
  {
    throw new Exception(param_error);
  }
&lt;/pre&gt;

&lt;p&gt;
and felt compelled to refactor it:
&lt;/p&gt;

&lt;pre  class="brush: java"&gt;
  try
  {
      set("pic_pagina", authentBean, request);
      set("pic_date", authentBean, request);
      set("pic_event", authentBean, request);
  }
  catch (Exception e)
  {
      throw new Exception(param_error);
  }
&lt;/pre&gt;

&lt;p&gt;
How did I implement the set method?
&lt;/p&gt;

&lt;pre name="code" language="java"&gt;
&amp;lt;%!
    void set(String parameterName, ArrayBean authentBean, HttpServletRequest request)
    {
       String strValue = CString.isNullReplace(request.getParameter(parameterName)).trim();
       if (strValue.length() == 0)
       {
         strValue = CString.isNullReplace(authentBean.getString(parameterName)).trim();
       }
       authentBean.set(parameterName, strValue);
    }
%&gt;
&lt;/pre&gt;

&lt;p&gt;
Please note the &lt;b&gt;&amp;lt;%!&lt;/b&gt; opening tag.&lt;br/&gt;
&lt;/p&gt;
&lt;p&gt;
See also &lt;a href="http://www.jsptut.com/Declarations.jsp" target="_blank"&gt;this JSP Tutorial&lt;/a&gt;.
&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6493659385036206035-1388994026968225942?l=babilsenior.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://babilsenior.blogspot.com/feeds/1388994026968225942/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6493659385036206035&amp;postID=1388994026968225942' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default/1388994026968225942'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default/1388994026968225942'/><link rel='alternate' type='text/html' href='http://babilsenior.blogspot.com/2010/01/jsp-functions-eng.html' title='JSP functions [ENG]'/><author><name>Manrico Corazzi</name><uri>http://www.blogger.com/profile/10866541980869905892</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6493659385036206035.post-5113464985930461733</id><published>2009-12-18T16:45:00.003+01:00</published><updated>2009-12-18T16:47:31.590+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='plugin'/><category scheme='http://www.blogger.com/atom/ns#' term='Eclipse'/><title type='text'>Eclipse: Open Extern Plugin</title><content type='html'>Per aprire una risorsa direttamente in Explorer, o per aprire la shell:&lt;br/&gt;
Sito: &lt;a href="http://code.google.com/p/openextern/"&gt;http://code.google.com/p/openextern&lt;/a&gt;&lt;br/&gt;
Update site: &lt;a href="http://openextern.googlecode.com/svn/trunk/openextern_update/"&gt;http://openextern.googlecode.com/svn/trunk/openextern_update&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6493659385036206035-5113464985930461733?l=babilsenior.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://babilsenior.blogspot.com/feeds/5113464985930461733/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6493659385036206035&amp;postID=5113464985930461733' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default/5113464985930461733'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default/5113464985930461733'/><link rel='alternate' type='text/html' href='http://babilsenior.blogspot.com/2009/12/eclipse-open-extern-plugin.html' title='Eclipse: Open Extern Plugin'/><author><name>Manrico Corazzi</name><uri>http://www.blogger.com/profile/10866541980869905892</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6493659385036206035.post-2713955397872008999</id><published>2009-11-06T14:15:00.002+01:00</published><updated>2011-01-12T10:34:52.641+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><category scheme='http://www.blogger.com/atom/ns#' term='file'/><category scheme='http://www.blogger.com/atom/ns#' term='i/o'/><title type='text'>Java: reading &amp; writing files [ENG]</title><content type='html'>&lt;p&gt;Since I can NEVER remember... here's the (very) quick and dirty code to read &amp; write from text files.&lt;/p&gt;

&lt;pre  class="brush: java"&gt;
private String readFile(String fileName)
  {
    if (fileName==null || "".equals(fileName))
    {
      return null;
    }
    try
    {
      FileReader reader = new FileReader(fileName);
      int next = -1;
      StringBuffer s = new StringBuffer();
      do 
      {
          next = reader.read();  
          if (next != -1) 
          {
              s.append((char)next); 
          }

      } while (next != -1);

      reader.close();  
      return s.toString();
    }
    catch (Exception e)
    {
      log(e.getMessage(), Project.MSG_ERR);
      throw new BuildException(e);
    }
  }
  
  private void writeFile(String content, String fileName)
  {
    try
    {
      FileWriter writer = new FileWriter(fileName, false);
      writer.write(content);
      writer.close();
    }
    catch (Exception e)
    {
      log(e.getMessage(), Project.MSG_ERR);
      throw new BuildException(e);
    }
  }
&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6493659385036206035-2713955397872008999?l=babilsenior.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://babilsenior.blogspot.com/feeds/2713955397872008999/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6493659385036206035&amp;postID=2713955397872008999' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default/2713955397872008999'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default/2713955397872008999'/><link rel='alternate' type='text/html' href='http://babilsenior.blogspot.com/2009/11/java-reading-writing-files-eng.html' title='Java: reading &amp; writing files [ENG]'/><author><name>Manrico Corazzi</name><uri>http://www.blogger.com/profile/10866541980869905892</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6493659385036206035.post-1850309333971175492</id><published>2009-10-16T11:57:00.009+02:00</published><updated>2011-01-12T14:45:54.606+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='batch'/><category scheme='http://www.blogger.com/atom/ns#' term='windows'/><category scheme='http://www.blogger.com/atom/ns#' term='shell'/><title type='text'>Sorting files into folders by date [ENG]</title><content type='html'>&lt;p&gt;
If you happen to have a folder ridden with tons of files and want to split them in folders by arrival date (think log files, or automatic downloads, or... ehm... p0rn, maybe?) these batch script may lend a hand:&lt;p&gt;
&lt;hr/&gt;
&lt;strong&gt;move_file_to_date_dir.bat&lt;/strong&gt;
&lt;hr/&gt;
&lt;pre class="brush:ps"&gt;
@echo off
set tempo=%~t1
if NOT "%tempo%" EQU "" goto do_it
echo Error processing file "%~f1": time was not set
goto :exit_batch
:do_it
set tempo_formatted=%tempo:~6,4%%tempo:~3,2%%tempo:~0,2%
echo Moving "%~f1" to "%tempo_formatted%"...
if exist "%tempo_formatted%" goto move_file
mkdir "%tempo_formatted%"
:move_file
move "%~f1" "%tempo_formatted%"
:exit_batch
&lt;/pre&gt;
&lt;hr/&gt;
&lt;strong&gt;move_files_to_date_dir.bat&lt;/strong&gt;
&lt;hr/&gt;
&lt;pre class="brush:ps"&gt;
@echo off
for %%v in (%1) do (
call "move_file_to_date_dir.bat" "%%v"
)
&lt;/pre&gt;
&lt;p&gt;
The latter loops through the files in a given directory and invokes the former to move the file to a directory based on the file creation date. If the directory does not exist it will be created. With little tweaks these can be used to group files for month or year.
&lt;/p&gt;
&lt;p&gt;
NOTE: there was a very good reason for the double &lt;code&gt;%%&lt;/code&gt; in the second batch, but at the moment I can't remember it to save my life
&lt;/p&gt;
&lt;p&gt;
NOTE2: there was a very good reason for splitting the script in two, but at the moment I can't remember it to save my life
&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6493659385036206035-1850309333971175492?l=babilsenior.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://babilsenior.blogspot.com/feeds/1850309333971175492/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6493659385036206035&amp;postID=1850309333971175492' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default/1850309333971175492'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default/1850309333971175492'/><link rel='alternate' type='text/html' href='http://babilsenior.blogspot.com/2009/10/sorting-files-into-folders-by-date-eng.html' title='Sorting files into folders by date [ENG]'/><author><name>Manrico Corazzi</name><uri>http://www.blogger.com/profile/10866541980869905892</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6493659385036206035.post-3441048165978759074</id><published>2009-10-13T16:52:00.002+02:00</published><updated>2009-10-13T16:55:41.736+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JSP'/><category scheme='http://www.blogger.com/atom/ns#' term='gzip'/><category scheme='http://www.blogger.com/atom/ns#' term='Web design'/><category scheme='http://www.blogger.com/atom/ns#' term='performances'/><category scheme='http://www.blogger.com/atom/ns#' term='yslow'/><category scheme='http://www.blogger.com/atom/ns#' term='tomcat'/><title type='text'>Why slow? [ENG]</title><content type='html'>&lt;a href="http://developer.yahoo.com/yslow/" target="ontop"&gt;Yahoo! YSlow&lt;/a&gt;: A tool which analyzes web pages and suggests ways to improve their performance&lt;br/&gt;
&lt;a href="http://viralpatel.net/blogs/2008/11/enable-gzip-compression-in-tomcat.html" target="ontop"&gt;Gzip&lt;/a&gt;: how to enable GZip compression in Tomcat&lt;br/&gt;
&lt;br/&gt;
(&lt;i&gt;Thanks to Leonardo A.&lt;/i&gt;)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6493659385036206035-3441048165978759074?l=babilsenior.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://babilsenior.blogspot.com/feeds/3441048165978759074/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6493659385036206035&amp;postID=3441048165978759074' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default/3441048165978759074'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default/3441048165978759074'/><link rel='alternate' type='text/html' href='http://babilsenior.blogspot.com/2009/10/why-slow-eng.html' title='Why slow? [ENG]'/><author><name>Manrico Corazzi</name><uri>http://www.blogger.com/profile/10866541980869905892</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6493659385036206035.post-4627169793702103100</id><published>2009-09-01T14:57:00.006+02:00</published><updated>2009-09-01T15:51:33.128+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='liferay 5.2'/><category scheme='http://www.blogger.com/atom/ns#' term='hooks'/><title type='text'>Liferay: Hook [ENG]</title><content type='html'>So someone in your management (or in your customer's management) heard that Liferay is cool and decided that &lt;u&gt;you&lt;/u&gt; are the one who is going to make it work. You install it, toy with it a little, build your community, &lt;a href="http://babilsenior.blogspot.com/2009/09/liferay-lost-in-translation.html"&gt;translate it in your language&lt;/a&gt;, start fiddling with the themes, user permissions and such.&lt;br/&gt;
Then one day you have to write your first hook. A hook is a class which handles events or changes in the underlying model structure. For example you might want to do something when a new user is added to the database.&lt;br/&gt;
You google around a bit and find &lt;a href="http://www.liferay.com/web/raymond.auge/blog/-/blogs/portal-hook-plugins"&gt;a lovely tutorial&lt;/a&gt;. Lovely but, alas, outdated, because, you know, to stir things up a bit &lt;a href="http://www.liferay.com/web/guest/community/forums/-/message_boards/message/2757602"&gt;someone thought to change hooks configuration between version 5.1 and 5.2&lt;/a&gt;.&lt;br/&gt;
Basically you have to move the hook declaration in a property file. Just a heads up, since I struggled with this a bit.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6493659385036206035-4627169793702103100?l=babilsenior.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://babilsenior.blogspot.com/feeds/4627169793702103100/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6493659385036206035&amp;postID=4627169793702103100' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default/4627169793702103100'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default/4627169793702103100'/><link rel='alternate' type='text/html' href='http://babilsenior.blogspot.com/2009/09/liferay-hook-eng.html' title='Liferay: Hook [ENG]'/><author><name>Manrico Corazzi</name><uri>http://www.blogger.com/profile/10866541980869905892</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6493659385036206035.post-4858198775180936387</id><published>2009-09-01T11:51:00.007+02:00</published><updated>2009-09-08T10:57:55.450+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='liferay 5.2'/><category scheme='http://www.blogger.com/atom/ns#' term='traduzione'/><title type='text'>Liferay: Lost In Translation</title><content type='html'>Sicuramente avrete provato a installare Liferay 5.2 e vi sarete divertiti a selezionare la lingua italiana dalla pagina "Il mio account". Avrete certamente incontrato perle come "Aggiunga l'entrata della lima" ("Add File Entry"), o "Aggiunga il soddisfare di fotoricettore" ("Add Web Content"), o "Vada al dispositivo di piegatura" ("Go to folder"). Chiari sintomi dell'intervento di un traduttore automatico (configurato anche abbastanza male).

Se volete limitare la confusione degli utenti (generalmente abbastanza confusi per loro conto) potete:
&lt;ol&gt;
&lt;li&gt;estrarre da &lt;tt&gt;${catalina.home}/webapps/ROOT/WEB-INF/libportal-impl.jar&lt;/tt&gt; il file &lt;tt&gt;content/language_it.properties&lt;/tt&gt;&lt;/li&gt;
&lt;li&gt;rinominare il file in &lt;tt&gt;language-ext_it.properties&lt;/tt&gt;&lt;/li&gt;
&lt;li&gt;modificarlo a piacimento&lt;/li&gt;
&lt;li&gt;copiarlo in &lt;tt&gt;${catalina.home}/webapps/ROOT/WEB-INF/classes/content&lt;/tt&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;b&gt;credits&lt;/b&gt;: &lt;a href="http://www.liferay.com/web/guest/community/forums/-/message_boards/message/116819?_19_redirect=%2Fweb%2Fguest%2Fcommunity%2Fforums%3Fp_p_id%3D19%26p_p_lifecycle%3D0%26p_p_state%3Dmaximized%26p_p_mode%3Dview%26_19_struts_action%3D%252Fmessage_boards%252Fsearch%26_19_redirect%3D%252Fweb%252Fguest%252Fcommunity%252Fforums%252F-%252Fmessage_boards%252Fcategory%252F35290%26_19_breadcrumbsCategoryId%3D35290%26_19_searchCategoryId%3D35290%26_19_tabs1TabsScroll%3D%26_19_keywords%3Dtraduzione"&gt;forum ufficiale di Liferay in italiano&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6493659385036206035-4858198775180936387?l=babilsenior.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://babilsenior.blogspot.com/feeds/4858198775180936387/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6493659385036206035&amp;postID=4858198775180936387' title='4 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default/4858198775180936387'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default/4858198775180936387'/><link rel='alternate' type='text/html' href='http://babilsenior.blogspot.com/2009/09/liferay-lost-in-translation.html' title='Liferay: Lost In Translation'/><author><name>Manrico Corazzi</name><uri>http://www.blogger.com/profile/10866541980869905892</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6493659385036206035.post-2900574273031188878</id><published>2009-08-20T10:05:00.000+02:00</published><updated>2009-08-20T10:07:04.407+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='quotes'/><title type='text'>Quotes: the science of hunches [ENG]</title><content type='html'>&lt;blockquote&gt;We have hunches, certainly about danger, that are wrong all the time. It’s basic survival logic – if you have two creatures, one who is a little paranoid and worries about things that often don’t happen, and one that is totally carefree and fears nothing, the former has higher odds of survival.&lt;/blockquote&gt;

&lt;div style='text-align: right;'&gt;Scott Berkun, &lt;a href="http://www.scottberkun.com/blog/2009/the-science-of-hunches/"&gt;blog&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6493659385036206035-2900574273031188878?l=babilsenior.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://babilsenior.blogspot.com/feeds/2900574273031188878/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6493659385036206035&amp;postID=2900574273031188878' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default/2900574273031188878'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default/2900574273031188878'/><link rel='alternate' type='text/html' href='http://babilsenior.blogspot.com/2009/08/quotes-science-of-hunches-eng.html' title='Quotes: the science of hunches [ENG]'/><author><name>Manrico Corazzi</name><uri>http://www.blogger.com/profile/10866541980869905892</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6493659385036206035.post-5297287663646094966</id><published>2009-05-24T11:58:00.006+02:00</published><updated>2009-05-24T16:59:01.932+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java jar classpath'/><title type='text'>Java: Jar classpath [ENG]</title><content type='html'>So you have these jars in your &lt;tt&gt;c:\tmp\&lt;/tt&gt; directory:
&lt;blockquote&gt;
main.jar&lt;br/&gt;
lib1.jar&lt;br/&gt;
lib2.jar&lt;br/&gt;
&lt;/blockquote&gt;
and you issue the command:
&lt;blockquote&gt;
c:\tmp\&gt; java -cp lib1.jar;lib2.jar -jar main.jar
&lt;/blockquote&gt;
Right?&lt;br/&gt;
&lt;strong&gt;Wrong!&lt;/strong&gt; All you get is the dreaded &lt;tt&gt;java.lang.NoClassDefFound&lt;/tt&gt;&lt;br/&gt; exception.
As I recently found out (much to my chagrin: I'm supposed to be a veteran Java developer) &lt;a href="http://stackoverflow.com/questions/250166/noclassdeffounderror-while-trying-to-run-my-jar-with-java-exe-jar-whats-wrong" target="ontop"&gt;the &lt;tt&gt;-jar&lt;/tt&gt; option is mutually exclusive of &lt;tt&gt;-classpath&lt;/tt&gt;&lt;/a&gt;.&lt;br/&gt;
Why did Sun made it this way? Why &lt;tt&gt;java.exe&lt;/tt&gt; does not complain and provide help in that case? Beats me. How you work this around? You have to specify the classpath in your &lt;tt&gt;MANIFEST.MF&lt;/tt&gt; file packaged with your jar.&lt;br/&gt;
So to make the jar work in the previous example:
&lt;blockquote&gt;
java -jar main.jar
&lt;/blockquote&gt;
and, in your &lt;tt&gt;MANIFEST.MF&lt;/tt&gt;:
&lt;blockquote&gt;
Class-Path: lib1.jar lib2.jar
&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6493659385036206035-5297287663646094966?l=babilsenior.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://babilsenior.blogspot.com/feeds/5297287663646094966/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6493659385036206035&amp;postID=5297287663646094966' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default/5297287663646094966'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default/5297287663646094966'/><link rel='alternate' type='text/html' href='http://babilsenior.blogspot.com/2009/05/java-jar-classpath-eng.html' title='Java: Jar classpath [ENG]'/><author><name>Manrico Corazzi</name><uri>http://www.blogger.com/profile/10866541980869905892</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6493659385036206035.post-7382045486131855023</id><published>2009-05-20T10:22:00.005+02:00</published><updated>2011-01-12T14:49:40.059+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='hibernate'/><title type='text'>Hibernate: generate toString() and equals() [ENG]</title><content type='html'>&lt;p&gt;If you want Hibernate Tools to generate &lt;tt&gt;toString()&lt;/tt&gt; and &lt;tt&gt;equals()&lt;/tt&gt; methods picking some fields from &lt;b&gt;.hbm.xml&lt;/b&gt; mapping files you may use these meta-tags:&lt;/p&gt;
&lt;pre class="brush:xml"&gt;
&amp;lt;id name="id" type="long"&amp;gt;
        &amp;lt;meta attribute="use-in-tostring"&amp;gt;true&amp;lt;/meta&amp;gt;
        &amp;lt;meta attribute="use-in-equals"&amp;gt;true&amp;lt;/meta&amp;gt;
        &amp;lt;column name="id" /&amp;gt;
&amp;lt;/id&amp;gt;
&amp;lt;property name="number" type="string" unique-key="UK_t_table1"&amp;gt;
        &amp;lt;meta attribute="use-in-tostring"&amp;gt;true&amp;lt;/meta&amp;gt;
        &amp;lt;column name="number" length="5" /&amp;gt;
&amp;lt;/property&amp;gt;
&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6493659385036206035-7382045486131855023?l=babilsenior.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://babilsenior.blogspot.com/feeds/7382045486131855023/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6493659385036206035&amp;postID=7382045486131855023' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default/7382045486131855023'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default/7382045486131855023'/><link rel='alternate' type='text/html' href='http://babilsenior.blogspot.com/2009/05/hibernate-generate-tostring-and-equals.html' title='Hibernate: generate toString() and equals() [ENG]'/><author><name>Manrico Corazzi</name><uri>http://www.blogger.com/profile/10866541980869905892</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6493659385036206035.post-6693840715745239755</id><published>2009-05-14T15:25:00.004+02:00</published><updated>2011-01-12T14:50:54.388+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='unit testing'/><title type='text'>Unit Testing Sucks! [ENG]</title><content type='html'>&lt;p&gt;Unsurprisingly, not everyone loves unit testing. &lt;A HREF="http://wilshipley.com/blog/2005/09/unit-testing-is-teh-suck-urr.html" TARGET="ontop"&gt;Here's one&lt;/A&gt;.
&lt;/p&gt;
&lt;p&gt;
Not everything in this post is to be agreed with. Nonetheless there's a whole lot of brain food in here.
&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6493659385036206035-6693840715745239755?l=babilsenior.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://babilsenior.blogspot.com/feeds/6693840715745239755/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6493659385036206035&amp;postID=6693840715745239755' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default/6693840715745239755'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default/6693840715745239755'/><link rel='alternate' type='text/html' href='http://babilsenior.blogspot.com/2009/05/unit-testing-sucks-eng.html' title='Unit Testing Sucks! [ENG]'/><author><name>Manrico Corazzi</name><uri>http://www.blogger.com/profile/10866541980869905892</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6493659385036206035.post-3733824222407188454</id><published>2009-04-17T15:12:00.002+02:00</published><updated>2009-04-17T15:14:01.234+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><title type='text'>Java: top 10 unused features [ENG]</title><content type='html'>Interesting post on Javalobby: &lt;a href="http://java.dzone.com/articles/top-10-unused-features-java"&gt;Top 10 unused Java features&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6493659385036206035-3733824222407188454?l=babilsenior.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://babilsenior.blogspot.com/feeds/3733824222407188454/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6493659385036206035&amp;postID=3733824222407188454' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default/3733824222407188454'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default/3733824222407188454'/><link rel='alternate' type='text/html' href='http://babilsenior.blogspot.com/2009/04/java-top-10-unused-features-eng.html' title='Java: top 10 unused features [ENG]'/><author><name>Manrico Corazzi</name><uri>http://www.blogger.com/profile/10866541980869905892</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6493659385036206035.post-2900929261466153250</id><published>2009-03-10T15:49:00.004+01:00</published><updated>2009-03-10T16:26:51.096+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='autohotkey'/><category scheme='http://www.blogger.com/atom/ns#' term='Macro'/><title type='text'>Autohotkey</title><content type='html'>Ero riluttante all'idea di inserire l'ennesimo programmino nella mia tray, ma devo ammettere che &lt;a href="http://www.autohotkey.it/"&gt;AutoHotKey&lt;/a&gt; è abbastanza leggero (poco più di 3.5MB di RAM), utile e divertente da usare. Permette di creare facilmente delle macro da associare a combinazioni di tasti. Ecco lo script che uso quotidianamente:
&lt;pre&gt;
; ------------------------------------------------------------- 
; print help text for this script
^#h:: 
{
 MsgBox Ctrl+Win+S: salva in scratchpad.txt`n
 Ctrl+Win+U: converte in maiuscolo`n
 Ctrl+Win+L: converte in minuscolo`n
 Ctrl+Win+G: cerca con Google`n
 Ctrl+Win+T: circonda con tag
}

; ------------------------------------------------------------- 
; append selected text to DESKTOP/scratchpad.txt
^#s:: 
{ 
  Send ^c
  ClipWait
  FileAppend, %clipboard%`n, %A_Desktop%/scratchpad.txt 
  return 
} 
; ------------------------------------------------------------- 
; converts selected text to upper case
^#u:: 
{ 
  Send ^c
  ClipWait
  StringUpper, up, clipboard 
  Send %up% 
  return 
} 
; ------------------------------------------------------------- 
; convert selected text to lower case
^#l:: 
{ 
  Send ^c
  ClipWait
  StringLower, low, clipboard 
  Send %low% 
  return 
}

; ------------------------------------------------------------- 
; search selected text in google
^#g::
{    
  Send ^c
  ClipWait
  Run http://www.google.com/search?q=%clipboard%
  return
}

; -------------------------------------------------------------
; surround selected text with tag
^#t::
{    
  Send ^c
  ClipWait
  InputBox, tag , Tag
  Send &amp;lt;%tag%&amp;gt;%clipboard%&amp;lt;/%tag%&amp;gt;
  return
}

; -------------------------------------------------------------
; zahada
^#z::
{    
  InputBox, soluzione , Soluzione
  Run http://www.mcgov.co.uk/riddles/%soluzione%.html
  return
}
&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6493659385036206035-2900929261466153250?l=babilsenior.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://babilsenior.blogspot.com/feeds/2900929261466153250/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6493659385036206035&amp;postID=2900929261466153250' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default/2900929261466153250'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default/2900929261466153250'/><link rel='alternate' type='text/html' href='http://babilsenior.blogspot.com/2009/03/autohotkey.html' title='Autohotkey'/><author><name>Manrico Corazzi</name><uri>http://www.blogger.com/profile/10866541980869905892</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6493659385036206035.post-4648684843388338897</id><published>2008-12-18T16:24:00.008+01:00</published><updated>2011-01-12T14:55:19.270+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JSP'/><category scheme='http://www.blogger.com/atom/ns#' term='tagfile'/><title type='text'>JSP: accedere al context da tagfile</title><content type='html'>&lt;p&gt;Come accedere agli attributi passati al &lt;b&gt;tagfile&lt;/b&gt; dal codice Java di una scriptlet? Accedendo al context tramite i metodi di &lt;a href="http://tomcat.apache.org/tomcat-5.5-doc/jspapi/javax/servlet/jsp/tagext/SimpleTagSupport.html"&gt;SimpleTagSupport&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Esempio:&lt;/p&gt;
&lt;pre class="brush:java"&gt;
&amp;lt;%@ attribute name="requiredPermissions" type="java.lang.String" required="true" %&gt;
&amp;lt;%@tag import="it.___.security.AuthorizationException" %&gt; 
&amp;lt;%@tag import="it.___.web.beans.SessionBean" %&gt;

&amp;lt;% 
SessionBean sb = (SessionBean)session.getAttribute("sessionBean");
String requiredPermissions = (String)this.getJspContext().getAttribute("requiredPermissions");
if (sb.getEhealthSession().isDisabled(requiredPermissions))
{
 throw new AuthorizationException("permission.check.permission.denied.header", new String[0]);
}
%&gt;
&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6493659385036206035-4648684843388338897?l=babilsenior.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://babilsenior.blogspot.com/feeds/4648684843388338897/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6493659385036206035&amp;postID=4648684843388338897' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default/4648684843388338897'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default/4648684843388338897'/><link rel='alternate' type='text/html' href='http://babilsenior.blogspot.com/2008/12/jsp-accedere-al-context-da-tagfile.html' title='JSP: accedere al context da tagfile'/><author><name>Manrico Corazzi</name><uri>http://www.blogger.com/profile/10866541980869905892</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6493659385036206035.post-655434241457261608</id><published>2008-11-26T10:54:00.003+01:00</published><updated>2009-02-16T22:49:53.136+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><category scheme='http://www.blogger.com/atom/ns#' term='UTF8'/><category scheme='http://www.blogger.com/atom/ns#' term='Struts'/><title type='text'>Struts2 and WTF8 [ENG]</title><content type='html'>&lt;b&gt;Struts 2&lt;/b&gt; is, overall, a good piece of software, but as many other frameworks has its annoying shortcomings. For example: it doesn't deal well with UTF8 encoding at all. The solution - found by my colleague Leonardo A. (second name omitted for privacy's sake) - is to use a filter that will set the request encoding. &lt;br/&gt;
The source of the workaround is &lt;a href="http://ianpurton.com/struts-utf-8-and-form-submissions/" target="ontop"&gt;Ian Purton's Blog&lt;/a&gt;. &lt;br/&gt;
Hope this helps since it was not so easy to smoke out.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6493659385036206035-655434241457261608?l=babilsenior.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://babilsenior.blogspot.com/feeds/655434241457261608/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6493659385036206035&amp;postID=655434241457261608' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default/655434241457261608'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default/655434241457261608'/><link rel='alternate' type='text/html' href='http://babilsenior.blogspot.com/2008/11/struts2-and-wtf8-eng.html' title='Struts2 and WTF8 [ENG]'/><author><name>Manrico Corazzi</name><uri>http://www.blogger.com/profile/10866541980869905892</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6493659385036206035.post-3948399136915228455</id><published>2008-11-18T12:16:00.003+01:00</published><updated>2008-11-18T12:45:41.902+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Ruby'/><title type='text'>Google SketchUp &amp; Ruby [ENG]</title><content type='html'>&lt;b&gt;Google&lt;/b&gt; pulled another rabbit out of the hat. &lt;a href="http://sketchup.google.com/" target="ontop"&gt;Google SketchUp&lt;/a&gt; is a full-fledged desktop CAD software with a user friendly GUI. The truly interesting part is the &lt;a href="http://download.sketchup.com/OnlineDoc/gsu6_ruby/Docs/index.html" target="ontop"&gt;Ruby API&lt;/a&gt; which allows to create plugins very easily. I'll give that a try as soon as possible.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6493659385036206035-3948399136915228455?l=babilsenior.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://babilsenior.blogspot.com/feeds/3948399136915228455/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6493659385036206035&amp;postID=3948399136915228455' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default/3948399136915228455'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default/3948399136915228455'/><link rel='alternate' type='text/html' href='http://babilsenior.blogspot.com/2008/11/google-sketchup-ruby-eng.html' title='Google SketchUp &amp; Ruby [ENG]'/><author><name>Manrico Corazzi</name><uri>http://www.blogger.com/profile/10866541980869905892</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6493659385036206035.post-3821628992538809181</id><published>2008-10-28T09:56:00.007+01:00</published><updated>2011-01-12T14:57:55.492+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='Greasemonkey'/><category scheme='http://www.blogger.com/atom/ns#' term='yoxel'/><title type='text'>Yoxel: autologin &amp; task highlight [ENG]</title><content type='html'>&lt;p&gt;If you think that &lt;a href="http://yoxel.com/"&gt;Yoxel&lt;/a&gt; leaves a lot to be desired, but you are still stuck with it, then you might be interested in these two Greasemonkey scripts.&lt;/p&gt;
&lt;p&gt;
The first deals with the "remember password" feature of Firefox that the clever design of Yoxel is apparently able to break:&lt;/p&gt;
&lt;pre class="brush:js"&gt;
var itUsernames = document.getElementsByName("yoxelid");
var itPasswords = document.getElementsByName("pw");
var itForms = document.getElementsByName("login_form");
itUsernames[0].value = "mcorazzi";
itPasswords[0].value = "________";
itForms[0].submit();
&lt;/pre&gt;
&lt;p&gt;
The second highlights all the table rows where the chosen identifier is found, to easily spot what tasks someone is up to:
&lt;/p&gt;
&lt;pre class="brush:js"&gt;
var identifier = "Manrico Corazzi";

var TDs = document.getElementsByTagName("td");

for (j=0; j&amp;lt;TDs.length; j++)
{
    if (TDs[j].innerHTML.indexOf(identifier )&amp;gt;=0)
    {
      TDs[j].innerHTML = TDs[j].innerHTML.replace(identifier , "&amp;lt;strong&amp;gt;" + identifier +"&amp;lt;/strong&amp;gt;");
      TDs[j].parentNode.style.backgroundColor = '#FF8833';
    }
}
&lt;/pre&gt;
&lt;p&gt;
I'm afraid more's to come...
&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6493659385036206035-3821628992538809181?l=babilsenior.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://babilsenior.blogspot.com/feeds/3821628992538809181/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6493659385036206035&amp;postID=3821628992538809181' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default/3821628992538809181'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default/3821628992538809181'/><link rel='alternate' type='text/html' href='http://babilsenior.blogspot.com/2008/10/yoxel-autologin-task-highlight-eng.html' title='Yoxel: autologin &amp; task highlight [ENG]'/><author><name>Manrico Corazzi</name><uri>http://www.blogger.com/profile/10866541980869905892</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6493659385036206035.post-1323564193880549216</id><published>2008-10-23T14:31:00.002+02:00</published><updated>2011-01-12T15:02:27.854+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='automatizzare'/><category scheme='http://www.blogger.com/atom/ns#' term='windows scripting host'/><title type='text'>AriaDSL Autologin /3</title><content type='html'>&lt;p&gt;Segue da &lt;a href="http://babilsenior.blogspot.com/2008/10/ariadsl-autologin-2.html"&gt;AriaDSL Autologin /2&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Effettuare una request HTTP e leggere la relativa response con WSH è relativamente semplice. L'unico aspetto "delicato" è la creazione dell'oggetto XMLHTTP, che viene inizializzato tramite l'invocazione del metodo CreateObject dell'oggetto WScript.&lt;/p&gt;
&lt;pre class="brush:js"&gt;
function getPage(strURL)
{
    return httpRequest("GET", strURL, "");
}

function postPage(strURL, strParm)
{
    return httpRequest("POST", strURL, strParm);
}

function httpRequest(requestType, strURL, strParms)
{
    var xmlHTTP = WScript.CreateObject("Microsoft.XMLHTTP")
    xmlHTTP.open(requestType, strURL, false);
    if (strParms=="")
    {
        xmlHTTP.send();
    }
    else
    {
        xmlHTTP.send(strParms);
    }
    return xmlHTTP.responseText;
}
&lt;/pre&gt;
&lt;p&gt;Una piccola funzione per gestire l'accodamento dei parametri all'URL:&lt;/p&gt;
&lt;pre class="brush:js"&gt;
function buildParametersList(strParametersList, parameterName, parameterValue)
{
    var result = strParametersList;
    if (strParametersList!="")
    {
        result += "&amp;";
    }
   
    result += parameterName;
    result += "=";
    result += parameterValue
   
    return result;
}
&lt;/pre&gt;
&lt;p&gt;Un po' di espressioni regolari per recuperare la password:&lt;/p&gt;
&lt;pre class="brush:js"&gt;
function extractPassword(strReturn)
{
    var infoRE = /hexMD5\('(.*)'\);/;

    var info = infoRE.exec(strReturn);

    var result = RegExp.$1;

    // prende i primi 4 caratteri
    var head = result.substr(0, 4);
   
    // prende dal 39° carattere fino in fondo
    var tail = result.substr(41, result.length-1);
   
    var pass = head + tail;
   
    return pass;
}
&lt;/pre&gt;
&lt;p&gt;
Uno dei maggiori problemi incontrati è stato nell'interfaccia con la funzione di hashing, che si aspetta una stringa di caratteri unicode. Soluzione:&lt;/p&gt;
&lt;pre class="brush:js"&gt;
function convertToCharString(strPassword)
{
    var splitted = strPassword.split("\\");
    var charString = "";
    for (i=1; i&amp;lt;splitted.length; i++)
    {
        var numeric = parseInt(splitted[i], 8);
        var charCode = String.fromCharCode(numeric);
        charString += charCode;
    }
    return charString;
}
&lt;/pre&gt;
&lt;p&gt;Per quanto riguarda la funzione di hashing... beh, ho copincollato il file &lt;b&gt;.js&lt;/b&gt; linkato dalla pagina di login dentro il mio script.&lt;/p&gt;
&lt;p&gt;Pur trattandosi di un'implementazione molto naif sta funzionando da &lt;span style="text-decoration: line-through;"&gt;alcune settimane&lt;/span&gt; alcuni anni senza grossi problemi.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6493659385036206035-1323564193880549216?l=babilsenior.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://babilsenior.blogspot.com/feeds/1323564193880549216/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6493659385036206035&amp;postID=1323564193880549216' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default/1323564193880549216'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default/1323564193880549216'/><link rel='alternate' type='text/html' href='http://babilsenior.blogspot.com/2008/10/ariadsl-autologin-3.html' title='AriaDSL Autologin /3'/><author><name>Manrico Corazzi</name><uri>http://www.blogger.com/profile/10866541980869905892</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6493659385036206035.post-2491878170615537703</id><published>2008-10-23T14:08:00.002+02:00</published><updated>2011-01-12T15:21:13.004+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='automatizzare'/><category scheme='http://www.blogger.com/atom/ns#' term='windows scripting host'/><title type='text'>AriaDSL Autologin /2</title><content type='html'>&lt;p&gt;Segue da &lt;a href="http://babilsenior.blogspot.com/2008/10/ariadsl-autologin-1.html"&gt;AriaDSL Autologin /1&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;
Visto che la funzione che esegue l'hash MD5 è scritta in Javascript e visto che non avevo assolutamente voglia di convertirla decisi di adottare Windows Scripting Host per automatizzare la procedura, con la consapevolezza che in seguito un (eventuale) porting su Linux sarebbe stato difficoltoso, ma anche curioso di imparare a usare questo strumento. L'idea generale è rappresentata dal corpo dello script:&lt;/p&gt;
&lt;pre class="brush:js"&gt;
var strURL = "http://login.ariadsl.it/login"
var strPopupTitle = "Connessione ad AriaDSL";

autoConnect();

function autoConnect()
{
    // 1. scarica la pagina di login
    var strLoginPageBody = getPage(strURL);
   
    // 2. estrae la 'password' generata dal sistema e ne fa l'hash MD5
    var strPassword = extractPassword(strLoginPageBody);
   
    var charStringPassword = convertToCharString(strPassword);
    var strMD5 = hexMD5(charStringPassword);
   
    var strUsername = "ariadsl";
   
    // 3. prepara la chiamata alla pagina di login con i parametri
    var strParms = "";
    strParms = buildParametersList(strParms, "username", strUsername);
    strParms = buildParametersList(strParms, "password", strMD5);
    strParms = buildParametersList(strParms, "popup", "true");
    strParms = buildParametersList(strParms, "dst", "");
   
    // 4. invia la richiesta
    var resultPage = postPage(strURL, strParms);
   
    var WshShell = WScript.CreateObject("Wscript.Shell");
   
    // 5. visualizza un messaggio di successo/fallimento
    if (resultPage.indexOf("You are logged in")&lt;0)
    {
        intButton = WshShell.Popup("Problema con la connessione!", 60, strPopupTitle, 21);
        if (intButton==4)
        {
            autoConnect();
        }
        else
        {
            intButton = WshShell.Popup("Connessione non effettuata!", 10, strPopupTitle, 16);
        }
    }
    else
    {
        intButton = WshShell.Popup("Connessione effettuata con successo", 5, strPopupTitle, 64);
    }
}
&lt;/pre&gt;
&lt;p&gt;
Le funzioni invocate verranno descritte in un post successivo (&lt;i&gt;&lt;a href="http://babilsenior.blogspot.com/2008/10/ariadsl-autologin-3.html"&gt;continua&lt;/a&gt;&lt;/i&gt;)&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6493659385036206035-2491878170615537703?l=babilsenior.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://babilsenior.blogspot.com/feeds/2491878170615537703/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6493659385036206035&amp;postID=2491878170615537703' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default/2491878170615537703'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default/2491878170615537703'/><link rel='alternate' type='text/html' href='http://babilsenior.blogspot.com/2008/10/ariadsl-autologin-2.html' title='AriaDSL Autologin /2'/><author><name>Manrico Corazzi</name><uri>http://www.blogger.com/profile/10866541980869905892</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6493659385036206035.post-6836811867380620424</id><published>2008-10-23T13:51:00.003+02:00</published><updated>2011-01-12T15:41:30.919+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='automatizzare'/><category scheme='http://www.blogger.com/atom/ns#' term='Ruby'/><title type='text'>AriaDSL Autologin /1</title><content type='html'>&lt;p&gt;Per poter accedere a Internet con la connessione Ariacom (a.k.a. AriaDSL) occorre ogni volta accedere a una pagina web di login - generata dall'antenna/router - in cui inserire username e password (peraltro uguali per tutti gli utenti). Questa procedura è piuttosto noiosa e tempo fa, in pieno spirito &lt;a href="http://babilsenior.blogspot.com/2008/06/automatizzare-tutti-i-costi.html"&gt;automatizzare a ogni costo&lt;/a&gt;, mi misi a studiare il problema, illudendomi che fosse di semplice e rapida soluzione.&lt;/p&gt;
&lt;/p&gt;
La prima idea fu quella di inviare in POST i due parametri tramite uno script Ruby alla pagina di login:
&lt;/p&gt;

&lt;pre class="brush:ruby"&gt;
require 'net/http'
require 'uri'
res = Net::HTTP.post_form(URI.parse('http://login.ariadsl.it/login'), {'username'=&gt;'ariadsl', 'password'=&gt;''})
puts res.body
&lt;/pre&gt;

&lt;p&gt;
Purtroppo... &lt;b&gt;invalid username or password&lt;/b&gt;.&lt;/p&gt;
&lt;p&gt;
La cosa richiedeva un'analisi più approfondita. Osservando il sorgente della pagina di login notai un interessante frammento legato alla submit del form:
&lt;/p&gt;
&lt;pre class="brush:js"&gt;
function doLogin() 
{
document.sendin.username.value = document.login.username.value;
document.sendin.password.value = hexMD5('\231' + document.login.password.value + '\077\131\115\326...[SNIP]...\210\040\053\053\173\066\024');
document.sendin.submit();
return false;
}
&lt;/pre&gt;
&lt;p&gt;
Quindi:
&lt;ol&gt;
&lt;li&gt;la password apparentemente "vuota" è in realtà accompagnata da alcuni caratteri aggiunti proditoriamente dallo script&lt;/li&gt;
&lt;li&gt;la password viene convertita con una funzione di hash MD5 lato client prima di essere inviata al router&lt;/li&gt;
&lt;/ol&gt;
&lt;/p&gt;
&lt;p&gt;
Senza darmi per vinto modificai la pagina salvata in modo che la action del form puntasse a una pagina PHP su WampServer creata appositamente per fare il dump dei parametri della request. Copiai il parametro 'password' e lo incollai nello script Ruby ma... &lt;b&gt;invalid username or password&lt;/b&gt;.
&lt;/p&gt;
&lt;p&gt;
Piuttosto perplesso esaminai di nuovo la pagina e... sorpresa (ma fino a un certo punto)! I caratteri di controllo presenti nella pagina erano diversi! Evidentemente vengono generati dal router di volta in volta.&lt;/p&gt;
&lt;p&gt;
La faccenda stava diventando sempre più interessante... (&lt;i&gt;&lt;a href="http://babilsenior.blogspot.com/2008/10/ariadsl-autologin-2.html"&gt;continua&lt;/a&gt;&lt;/i&gt;)&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6493659385036206035-6836811867380620424?l=babilsenior.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://babilsenior.blogspot.com/feeds/6836811867380620424/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6493659385036206035&amp;postID=6836811867380620424' title='1 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default/6836811867380620424'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default/6836811867380620424'/><link rel='alternate' type='text/html' href='http://babilsenior.blogspot.com/2008/10/ariadsl-autologin-1.html' title='AriaDSL Autologin /1'/><author><name>Manrico Corazzi</name><uri>http://www.blogger.com/profile/10866541980869905892</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6493659385036206035.post-2579212628113166964</id><published>2008-10-20T17:52:00.000+02:00</published><updated>2008-10-20T17:54:25.501+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='AspectJ'/><category scheme='http://www.blogger.com/atom/ns#' term='aspect oriented programming'/><category scheme='http://www.blogger.com/atom/ns#' term='plugin'/><category scheme='http://www.blogger.com/atom/ns#' term='Eclipse'/><title type='text'>Eclipse Plugin: AspectJ Development Tool</title><content type='html'>&lt;a href="http://www.eclipse.org/ajdt/"&gt;Eclipse AspectJ Development Tool&lt;/a&gt;&lt;br/&gt;
&lt;b&gt;Update site:&lt;/b&gt; http://download.eclipse.org/tools/ajdt/34/update&lt;br/&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6493659385036206035-2579212628113166964?l=babilsenior.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://babilsenior.blogspot.com/feeds/2579212628113166964/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6493659385036206035&amp;postID=2579212628113166964' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default/2579212628113166964'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default/2579212628113166964'/><link rel='alternate' type='text/html' href='http://babilsenior.blogspot.com/2008/10/eclipse-plugin-aspectj-development-tool.html' title='Eclipse Plugin: AspectJ Development Tool'/><author><name>Manrico Corazzi</name><uri>http://www.blogger.com/profile/10866541980869905892</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6493659385036206035.post-4991103206141036838</id><published>2008-10-03T13:59:00.005+02:00</published><updated>2008-10-03T14:34:15.975+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='unit testing'/><title type='text'>Test Driven Development/1 [ENG]</title><content type='html'>&lt;a href="http://en.wikipedia.org/wiki/Test-driven_development" target="ontop"&gt;TDD (Test Driven Development)&lt;/a&gt; became very popular recently thanks to Kent Beck and his eXtreme Programming books where it was first presented (as far as I know).&lt;br/&gt;
In an &lt;a href="http://www.xprogramming.com/testfram.htm" target="ontop"&gt;article about the subject&lt;/a&gt; (pertaining to smalltalk, but general enough to be adapted to many other languages) he describes his testing pattern.&lt;br/&gt;
There's a lot to say on testing, many frameworks and tools for different languages, many philosophical arguments and abstract concepts.&lt;br/&gt;
Here I only want to testify that, well, it worked for me: I find that it made developing and debugging a bit easier.&lt;br/&gt;
The strong points of TDD are:
&lt;ul&gt;
&lt;li&gt;you get to think about the structure and interface of your classes earlier&lt;/li&gt;
&lt;li&gt;you develop faster because you have a tool that make you see your code in action earlier&lt;/li&gt;
&lt;li&gt;you find bug earlier&lt;/li&gt;
&lt;/ul&gt;
So how do I do that? (NOTE: these are my personal preferences, your mileage may vary).&lt;br/&gt;
First I write the test. I had to force myself to do that, in the beginning, but then it came naturally. Since my IDE is Eclipse and it starts to complain as soon as you save a class with missing dependencies I then write the stub methods for the class I want to test just so the project compiles.&lt;br/&gt;
I then write tests for boundaries (null parameters, empty lists, maximum allowed size of containers) and for normal situations (your average data set), and then for exception handling. I write one or more tests for the same method with different data set. I prefer text files, constants or SQL scripts to initialize the database rather than using mock objects.&lt;br/&gt;
Then I run the tests. I expect every one of them to fail, of course.&lt;br/&gt;
After that I get to work on every method of the class under test, and every time I run the tests again until every one passes.&lt;br/&gt;
I will try and add some practical example in the next posts about this subject.&lt;br/&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6493659385036206035-4991103206141036838?l=babilsenior.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://babilsenior.blogspot.com/feeds/4991103206141036838/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6493659385036206035&amp;postID=4991103206141036838' title='1 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default/4991103206141036838'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default/4991103206141036838'/><link rel='alternate' type='text/html' href='http://babilsenior.blogspot.com/2008/10/test-driven-development1-eng.html' title='Test Driven Development/1 [ENG]'/><author><name>Manrico Corazzi</name><uri>http://www.blogger.com/profile/10866541980869905892</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6493659385036206035.post-7772033492250699063</id><published>2008-10-03T13:55:00.004+02:00</published><updated>2008-10-03T15:06:22.539+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='polyglot posting'/><title type='text'>Posting in English [ENG]</title><content type='html'>Since I joined &lt;a href="http://stackoverflow.com/" target="ontop"&gt;Stack Overflow&lt;/a&gt; I think I will write some posts in English from time to time to go along with my questions &amp; answers there.&lt;br/&gt;
In this case the title of the post will have the &lt;b&gt;[ENG]&lt;/b&gt; tag.&lt;br/&gt;
Sorry for any mistake in advance (any suggestion/correction is welcome).&lt;br/&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6493659385036206035-7772033492250699063?l=babilsenior.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://babilsenior.blogspot.com/feeds/7772033492250699063/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6493659385036206035&amp;postID=7772033492250699063' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default/7772033492250699063'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default/7772033492250699063'/><link rel='alternate' type='text/html' href='http://babilsenior.blogspot.com/2008/10/posting-in-english-eng.html' title='Posting in English [ENG]'/><author><name>Manrico Corazzi</name><uri>http://www.blogger.com/profile/10866541980869905892</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6493659385036206035.post-4552448723599236596</id><published>2008-09-09T14:57:00.005+02:00</published><updated>2011-01-12T15:47:53.664+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='hibernate'/><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><title type='text'>Hibernate Tools: Custom Reverse Engineering/2</title><content type='html'>&lt;p&gt;Gli &lt;b&gt;Hibernate Tools&lt;/b&gt; fanno un discreto lavoro per il reverse Engineering del database, e già &lt;a href="http://babilsenior.blogspot.com/2008/09/hibernate-tools-custom-reverse.html"&gt;personalizzare i modelli&lt;/a&gt; usati per la generazione automatica del codice permette di incrementare la produttività.&lt;/p&gt;
&lt;p&gt;
Si può anche personalizzare la naming convention. Di default infatti una tabella &lt;tt&gt;t_utenti&lt;/tt&gt; verrebbe mappata come &lt;tt&gt;TUtenti&lt;/tt&gt;; se volessimo modificare questo comportamento (magari per togliere il prefisso "T" convenzionale nel database ma abbastanza inutile nel contesto OOP) dovremmo creare una nostra classe che faccia l'override del metodo &lt;tt&gt;tableToClassName&lt;/tt&gt;:&lt;/p&gt;
&lt;pre class="brush:java"&gt;
package reveng;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

import org.hibernate.cfg.reveng.DelegatingReverseEngineeringStrategy;
import org.hibernate.cfg.reveng.ReverseEngineeringStrategy;
import org.hibernate.cfg.reveng.TableIdentifier;

public class CustomReverseEngineeringStrategy extends DelegatingReverseEngineeringStrategy
{

  private static final String TABLE_PREFIX = "t_";

  private Properties properties = null;
  
  public CustomReverseEngineeringStrategy(ReverseEngineeringStrategy delegate)
  {
    super(delegate);
    try
    {
      properties = getPropertiesFromClasspath("reveng.properties");
    }
    catch (IOException e)
    {
      e.printStackTrace();
    }
  }

  public static Properties getPropertiesFromClasspath(String propFileName) throws IOException
  {
    
    if (propFileName==null || "".equals(propFileName)) return null;
    
    Properties props = new Properties();
    InputStream inputStream = getInputStreamFromClasspath(propFileName);

    if (inputStream != null)
    {
      props.load(inputStream);
      return props;     
    }

    else
    {
      return null;
    }
  }

  public static InputStream getInputStreamFromClasspath(String resourceFileName)
  {
    return CustomReverseEngineeringStrategy.class.getResourceAsStream(resourceFileName);
  }
  
  @Override
  /**
   * Genera il nome della classe a partire dal nome della tabella, ignorando il prefisso "t_"
   */
  public String tableToClassName(TableIdentifier tableIdentifier)
  {
    String tableName = tableIdentifier.getName();
    
    String className = super.tableToClassName(tableIdentifier);
    String qualifiedName = getPackageName(className);
    
    // default
    String result = className;
    
    // proprietà mappata
    String mappedProperty = (String) properties.get("table."+tableName);
    if (mappedProperty != null &amp;&amp; mappedProperty.length()&gt;0)
    {
      result = qualifiedName + "." + mappedProperty;
    }
    // proprietà non mappata, rimuovo il prefisso delle tabelle - se presente
    else if (tableName.startsWith(TABLE_PREFIX))
    {
      String cleanClassName = getClassName(className).substring(1);
      result = qualifiedName + "." + cleanClassName;  
    }
    
    return result;
  }
  
  public String getPackageName(String fullyQualifiedName)
  {
    int dotIndex = fullyQualifiedName.lastIndexOf('.');
    return fullyQualifiedName.substring(0, dotIndex);
  }

  public String getClassName(String fullyQualifiedName)
  {
    int dotIndex = fullyQualifiedName.lastIndexOf('.');
    return fullyQualifiedName.substring(dotIndex+1);
  }
  
  public static void main(String[] args)
  {
    CustomReverseEngineeringStrategy cres = new   CustomReverseEngineeringStrategy(null);
    System.out.println(cres.getPackageName("it.package.test.Class1"));
    System.out.println(cres.getClassName("it.package.test.Class1"));
  }
  
}
&lt;/pre&gt;
&lt;b&gt;NOTA&lt;/b&gt;: questa classe tra l'altro cerca un file &lt;tt&gt;.properties&lt;/tt&gt; nel quale siano definite le chiavi &lt;tt&gt;table.t_nome_tabella=NomeClasse&lt;/tt&gt; per un ulteriore livello di personalizzazione.&lt;br/&gt;
&lt;b&gt;NOTA2&lt;/b&gt;: il metodo main serve solo per effettuare un test&lt;br/&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6493659385036206035-4552448723599236596?l=babilsenior.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://babilsenior.blogspot.com/feeds/4552448723599236596/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6493659385036206035&amp;postID=4552448723599236596' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default/4552448723599236596'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default/4552448723599236596'/><link rel='alternate' type='text/html' href='http://babilsenior.blogspot.com/2008/09/hibernate-tools-custom-reverse_09.html' title='Hibernate Tools: Custom Reverse Engineering/2'/><author><name>Manrico Corazzi</name><uri>http://www.blogger.com/profile/10866541980869905892</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6493659385036206035.post-5619173601834667724</id><published>2008-09-09T09:12:00.004+02:00</published><updated>2008-09-09T12:49:36.745+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='hibernate'/><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><title type='text'>Hibernate Tools: Custom Reverse Engineering/1</title><content type='html'>&lt;a href="http://www.hibernate.org/"&gt;Hibernate&lt;/a&gt; non sarebbe granché utile se non fosse accompagnato da strumenti che permettono di creare automaticamente le classi POJO, i DAO e i mapping. Cionondimeno il comportamento standard dei tool (v. &lt;a hfref="http://www.jboss.org/tools/"&gt;JBoss Tools&lt;/a&gt;) potrebbe non essere quello desiderato.&lt;br/&gt; 
La configurazione di base si può cambiare aggiustando il file &lt;tt&gt;reveng.xml&lt;/tt&gt;, ma si può andare ben oltre. Ad esempio si potrebbe volere un codice diverso per i DAO (che JBoss Tools chiama "Home") che forniscono - tabella per tabella - gli strumenti di base per cercare, inserire, modificare e cancellare record.&lt;br/&gt;
A tal fine è necessario recuperare il template del file in questione dal JAR &lt;tt&gt;hibernate-tools&lt;/tt&gt; che in genere si trova nella cartella del plugin di &lt;b&gt;Eclipse&lt;/b&gt;. Una volta scompattata la cartella (conservando la struttura dei package) si possono modificare i file &lt;tt&gt;*.ftl&lt;/tt&gt; desiderati e cancellare quelli non intessanti (il tool prenderà quelli standard dal jar). Bisogna anche far puntare il tool alla cartella dei nuovi template, nella configurazione di lancio.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6493659385036206035-5619173601834667724?l=babilsenior.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://babilsenior.blogspot.com/feeds/5619173601834667724/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6493659385036206035&amp;postID=5619173601834667724' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default/5619173601834667724'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default/5619173601834667724'/><link rel='alternate' type='text/html' href='http://babilsenior.blogspot.com/2008/09/hibernate-tools-custom-reverse.html' title='Hibernate Tools: Custom Reverse Engineering/1'/><author><name>Manrico Corazzi</name><uri>http://www.blogger.com/profile/10866541980869905892</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6493659385036206035.post-3812556963183625836</id><published>2008-08-06T14:49:00.008+02:00</published><updated>2011-01-12T15:53:00.744+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Ruby'/><title type='text'>Ruby: file sieve [ENG]</title><content type='html'>&lt;p&gt;
I use this rough but simple script to organize the files from a folder into a tree of folders according to the file name. Whene I create a file I add some "tags" to its name. The script moves a file with this name:&lt;br/&gt;
&lt;blockquote&gt;[tag1-tag2-tag3] file.ext&lt;/blockquote&gt;
to this directory:
&lt;blockquote&gt;tag1/tag2/tag3/file.ext&lt;/blockquote&gt;
buildind the tree as it goes.
&lt;/p&gt;
&lt;pre class="brush:ruby"&gt;
"Moves the 'tagged' files to the appropriate dir"
def sieve_files(source_dir, dest_dir)
  # default source dir is current dir
  if (source_dir == nil) 
    source_dir = "."
  end
  # default destination dir is "./file_sieve"
  if (dest_dir == nil)
    dest_dir = "/file_sieve"
  end
  pattern = Regexp.new("\\[.*\\].*") # picks file with a "[tag]"
  Dir.foreach(source_dir) do |filename|
    if pattern.match(filename)
      tag = filename[1, filename.index(']')-1] # gets the "[tag]"
      clean_filename = filename[filename.index(']')+2, filename.length].strip() # gets the file name
      dir_structure = tag.split('-') # use tag to determine folder structure
      old_name = source_dir + "/" + filename # builds the directory tree
      new_name = implode(dest_dir, dir_structure) + clean_filename # builds the full path to the file
      create_dir(dest_dir, dir_structure) # creates the directory tree
      File.rename(old_name, new_name) # moves the file
    end
  end
end

"Create path string concatenating the path components" 
"(and stripping them of white spaces)"
def implode(base_dir, dirlist)
  res = base_dir + "/"
  dirlist.each { |item| res += item.strip() + "/"}
  res
end

"Create a directory tree"
def create_dir(base_dir, dirlist)
  dir_to_create = base_dir + "/"
  Dir.mkdir(dir_to_create) unless (File.exist?(dir_to_create))
  dirlist.each do |item|
    dir_to_create += item.strip() + "/"
    Dir.mkdir(dir_to_create) unless (File.exist?(dir_to_create))
  end
end

source_dir = ARGV.shift
dest_dir = ARGV.shift 
sieve_files(source_dir, dest_dir)
&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6493659385036206035-3812556963183625836?l=babilsenior.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://babilsenior.blogspot.com/feeds/3812556963183625836/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6493659385036206035&amp;postID=3812556963183625836' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default/3812556963183625836'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default/3812556963183625836'/><link rel='alternate' type='text/html' href='http://babilsenior.blogspot.com/2008/08/ruby-file-sieve.html' title='Ruby: file sieve [ENG]'/><author><name>Manrico Corazzi</name><uri>http://www.blogger.com/profile/10866541980869905892</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6493659385036206035.post-2323792649554685468</id><published>2008-07-10T17:46:00.004+02:00</published><updated>2008-07-11T09:03:56.281+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='MySQL'/><title type='text'>MySQL * MyISAM - InnoDB = Caos</title><content type='html'>"Ma... è tutto dentro una transazione?"&lt;br/&gt;
"Sìssì... ecco, vedi? beginTransaction..."&lt;br/&gt;
"Com'è allora che crea il record su questa tabella, solleva l'eccezione quando lo dovrebbe creare nell'altra, fa rollback e lascia il record spurio?"&lt;br/&gt;
"Sarà Hibernate?"&lt;br/&gt;
"Sulla carta no... guarda, secondo me è che MySQL sta facendo casino con le transazioni. Guarda un po' se la tabella è MyISAM o InnoDB, per caso..."&lt;br/&gt;
"Ecco, è MyISAM... aspetta, la cambio... oh... SQLYog non me la fa cambiare..."&lt;br/&gt;
"Ma che versione hai?"&lt;br/&gt;
"[versione_sqlyog]"&lt;br/&gt;
"Va bene, pure più aggiornata della mia... e di MySQL?"&lt;br/&gt;
"[versione_mysql]"&lt;br/&gt;
"Anche questa va bene, getto un occhio da Andrea, magari lui..."&lt;br/&gt;
&lt;i&gt;(vado &amp;amp; torno)&lt;/i&gt;&lt;br/&gt;
"No, stesse versioni, a lui funziona... aspe', facciamo la query a manina... ALTER TABLE pippo ENGINE=InnoDB... pare abbia funzionato!"&lt;br/&gt;
"No guarda, controlla... è sempre MyISAM"&lt;br/&gt;
"Putt... aspe', vuoi vedere che è in my.ini che sta l'inghippo... aaaaah: intanto il default sta a MyISAM... e poi... EPPOI CHE ACCIDENTI &amp;Egrave; &lt;pre&gt;skip_innodb&lt;/pre&gt;???"&lt;br/&gt;
Morale: si impara sempre qualche nuovo trucco (anche se questo è vecchio: &lt;b&gt;non ti fidare delle installazioni di default di MySQL&lt;/b&gt;)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6493659385036206035-2323792649554685468?l=babilsenior.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://babilsenior.blogspot.com/feeds/2323792649554685468/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6493659385036206035&amp;postID=2323792649554685468' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default/2323792649554685468'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default/2323792649554685468'/><link rel='alternate' type='text/html' href='http://babilsenior.blogspot.com/2008/07/mysql-myisam-innodb-caos.html' title='MySQL * MyISAM - InnoDB = Caos'/><author><name>Manrico Corazzi</name><uri>http://www.blogger.com/profile/10866541980869905892</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6493659385036206035.post-1931657405134098842</id><published>2008-06-30T15:51:00.003+02:00</published><updated>2008-08-25T15:13:41.366+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='plugin'/><category scheme='http://www.blogger.com/atom/ns#' term='subclipse'/><category scheme='http://www.blogger.com/atom/ns#' term='Eclipse'/><category scheme='http://www.blogger.com/atom/ns#' term='subversion'/><category scheme='http://www.blogger.com/atom/ns#' term='svn'/><title type='text'>Eclipse Plugin: Subclipse</title><content type='html'>Integrazione di &lt;b&gt;Subversion&lt;/b&gt; in &lt;b&gt;Eclipse&lt;/b&gt;:&lt;br/&gt;
&lt;b&gt;web:&lt;/b&gt; &lt;a href="http://subclipse.tigris.org/"&gt;http://subclipse.tigris.org&lt;/a&gt;&lt;br/&gt;
&lt;b&gt;update sites:&lt;/b&gt;&lt;br/&gt;
&lt;pre&gt;
Name: Subclipse 1.4.x (Eclipse 3.2+)
URL:  http://subclipse.tigris.org/update_1.4.x

Name: Subclipse 1.2.x (Eclipse 3.2+)
URL:  http://subclipse.tigris.org/update_1.2.x
   
Name: Subclipse 1.0.x (Eclipse 3.0/3.1)
URL:  http://subclipse.tigris.org/update_1.0.x
&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6493659385036206035-1931657405134098842?l=babilsenior.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://babilsenior.blogspot.com/feeds/1931657405134098842/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6493659385036206035&amp;postID=1931657405134098842' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default/1931657405134098842'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default/1931657405134098842'/><link rel='alternate' type='text/html' href='http://babilsenior.blogspot.com/2008/06/eclipse-plugin-subclipse.html' title='Eclipse Plugin: Subclipse'/><author><name>Manrico Corazzi</name><uri>http://www.blogger.com/profile/10866541980869905892</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6493659385036206035.post-2838221195539244563</id><published>2008-06-16T16:14:00.005+02:00</published><updated>2011-01-12T15:54:07.810+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><title type='text'>Top Ten Errors Java Programmers Make</title><content type='html'>&lt;p&gt;Interessante... &lt;a href="http://www.javacoffeebreak.com/articles/toptenerrors.html"&gt;Top Ten Errors Java Programmers Make&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;
Aggiungo il mio personalissimo tallone d'achille:&lt;/p&gt;
&lt;pre class="brush:java"&gt;
private void foo(MyClass smtg)
{
    smtg = new MyClass();
}

private MyClass bar()
{
    return new MyClass();
}

MyClass mc = null;

foo(mc);

assertNull(mc); // ANCORA NULL! foo() NON HA SIDE EFFECTS!

mc = bar();

assertNotNull(mc); // ORA INIZIALIZZATO
&lt;/pre&gt;
&lt;br/&gt;
Ancora più interessante, a margine: &lt;a href="http://sanaulla.wordpress.com/2008/02/29/overriding-vs-hiding/"&gt;Overriding vs. Hiding&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6493659385036206035-2838221195539244563?l=babilsenior.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://babilsenior.blogspot.com/feeds/2838221195539244563/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6493659385036206035&amp;postID=2838221195539244563' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default/2838221195539244563'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default/2838221195539244563'/><link rel='alternate' type='text/html' href='http://babilsenior.blogspot.com/2008/06/top-ten-errors-java-programmers-make.html' title='Top Ten Errors Java Programmers Make'/><author><name>Manrico Corazzi</name><uri>http://www.blogger.com/profile/10866541980869905892</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6493659385036206035.post-372775830963121192</id><published>2008-06-10T01:09:00.011+02:00</published><updated>2011-01-12T16:00:16.720+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Javascript'/><title type='text'>Javascript: riordinare oggetti di una lista interattivamente</title><content type='html'>&lt;p&gt;Un frammento di Javascript che permette di riordinare gli oggetti di una lista (facendo clic su "UP" e "DOWN"):&lt;/p&gt;
&lt;pre class="brush:js"&gt;
function Item(_id, _name, _position)
{
 this.id = _id;
 this.name = _name;
 this.position = _position;
}

Item.prototype.toString = function()
{
 return "[" + this.id + "] " + this.name;
}

function sortBy(item1, item2)
{
 return item1.position-item2.position;
}

function printMe(_arr)
{
 clearOutput();
 var parameter = "";
 for (i=0; i&lt;_arr.length; i++)
 {
  var item = _arr[i]; 
  output(item);
  output(" | ");
  upControl(i);
  output(" | ");
  downControl(i, (_arr.length-1));
  output("&lt;br/&gt;");
  parameter += item.id + "=&gt;" + item.position + ";"; 
 }
 output("&lt;br/&gt;"+parameter);
}

function upControl(index)
{
 if (index&gt;0)
 {
  output("&amp;lt;span onclick='javascript:up("+index+");'&gt;UP&amp;lt;/span&gt;"); 
 }
}

function downControl(index, _max)
{
 if (index&lt;_max)
 {
  output("&amp;lt;span onclick='javascript:down("+index+");'&gt;DOWN&amp;lt;/span&gt;");
 }
}

function up(index)
{
 var index1 = arr[index].position;
 var index2 = arr[index-1].position;
 arr[index].position=index2;
 arr[index-1].position=index1;
 printMe(arr.sort(sortBy));
}

function down(index)
{
 var index1 = arr[index].position;
 var index2 = arr[index+1].position;
 arr[index].position=index2;
 arr[index+1].position=index1;
 printMe(arr.sort(sortBy));
}

function clearOutput(x)
{
 var panel = document.getElementById('panel');
 panel.innerHTML = "";
}

function output(x)
{
 var panel = document.getElementById('panel');
 panel.innerHTML += x;
}
&lt;/pre&gt;
&lt;p&gt;Per provarlo:&lt;/p&gt;
&lt;pre class="brush:xml"&gt;
&amp;lt;body&amp;gt;
 &amp;lt;div id='panel' style='border: 1px solid black;'&amp;gt;
 &amp;lt;/div&amp;gt;
 &amp;lt;script&amp;gt;
 var arr = new Array(6);
 arr[0] = new Item(10, "Articolo 6", 6);
 arr[1] = new Item(40, "Articolo 5", 5);
 arr[2] = new Item(100, "Articolo 4", 4);
 arr[3] = new Item(130, "Articolo 3", 3);
 arr[4] = new Item(400, "Articolo 2", 2);
 arr[5] = new Item(555, "Articolo 1", 1);
 printMe(arr.sort(sortBy));
 &amp;lt;/script&amp;gt;
&amp;lt;/body&amp;gt;
&lt;/pre&gt;
Elementi di interesse sono:
&lt;ul&gt;
&lt;li&gt;
la modalità di creazione di nuovi oggetti in Javascript (v. &lt;b&gt;Item&lt;/b&gt;) (vedere anche &lt;a href="http://www.javascriptkit.com/javatutors/oopjs.shtml"&gt;questo tutorial&lt;/a&gt;)
&lt;/li&gt;
&lt;li&gt;
come utilizzare un criterio di ordinamento per gli array (v. &lt;b&gt;sortBy&lt;/b&gt;)
&lt;/li&gt;
&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6493659385036206035-372775830963121192?l=babilsenior.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://babilsenior.blogspot.com/feeds/372775830963121192/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6493659385036206035&amp;postID=372775830963121192' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default/372775830963121192'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default/372775830963121192'/><link rel='alternate' type='text/html' href='http://babilsenior.blogspot.com/2008/06/javascript-riordinare-oggetti.html' title='Javascript: riordinare oggetti di una lista interattivamente'/><author><name>Manrico Corazzi</name><uri>http://www.blogger.com/profile/10866541980869905892</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6493659385036206035.post-4760767346449628555</id><published>2008-06-06T14:30:00.008+02:00</published><updated>2011-01-12T16:15:09.759+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='VBA'/><category scheme='http://www.blogger.com/atom/ns#' term='Visual Basic'/><category scheme='http://www.blogger.com/atom/ns#' term='Word'/><category scheme='http://www.blogger.com/atom/ns#' term='Macro'/><title type='text'>Automatizzare a tutti i costi 2</title><content type='html'>Mi è capitato di recente di dover completare una matrice di copertura dei requisiti.
In breve: il documento dei requisiti aveva un certo numero di tabelle con i requisiti di dettaglio contrassegnati da un codice a 21 caratteri e da un riferimento al requisito utente da cui aveva avuto origine:&lt;br/&gt;
&lt;table border="1"&gt;
&lt;tr&gt;
&lt;td&gt;N.&lt;/td&gt;&lt;td&gt;Codice&lt;/td&gt;&lt;td&gt;Descrizione&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;1.&lt;/td&gt;
&lt;td&gt;xxx-xxx-xxx-xxx-00100&lt;/td&gt;
&lt;td&gt;Rif: yyy-yyy-yyy-yyy-01234&lt;br/&gt;&lt;i&gt;Descrizione...&lt;/i&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;2.&lt;/td&gt;
&lt;td&gt;xxx-xxx-xxx-xxx-00110&lt;/td&gt;
&lt;td&gt;Rif: yyy-yyy-yyy-yyy-01234&lt;br/&gt;&lt;i&gt;Descrizione...&lt;/i&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;3.&lt;/td&gt;
&lt;td&gt;xxx-xxx-xxx-xxx-00120&lt;/td&gt;
&lt;td&gt;Rif: yyy-yyy-yyy-yyy-01235&lt;br/&gt;&lt;i&gt;Descrizione...&lt;/i&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td colspan="3"&gt;...&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;&lt;br/&gt;
L'ultima tabella rappresentava invece i requisiti utente originari da cui i requisiti software di dettaglio erano stati estrapolati:&lt;br/&gt;
&lt;table border="1"&gt;
&lt;tr&gt;&lt;td&gt;Codice&lt;/td&gt;&lt;td&gt;Descrizione&lt;/td&gt;&lt;td&gt;Dettaglio&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;yyy-yyy-yyy-yyy-01234&lt;/td&gt;&lt;td&gt;blah blah blah&lt;/td&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;yyy-yyy-yyy-yyy-01235&lt;/td&gt;&lt;td&gt;bluh bluh bluh&lt;/td&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;&lt;br/&gt;
In pratica manualmente avrei dovuto cercare tutti i riferimenti e riportare nella colonna "Dettaglio" l'elenco dei requisiti con quel riferimento:&lt;br/&gt;
&lt;table border="1"&gt;
&lt;tr&gt;&lt;td&gt;Codice&lt;/td&gt;&lt;td&gt;Descrizione&lt;/td&gt;&lt;td&gt;Dettaglio&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;yyy-yyy-yyy-yyy-01234&lt;/td&gt;&lt;td&gt;blah blah blah&lt;/td&gt;
&lt;td&gt;
xxx-xxx-xxx-xxx-00100&lt;br/&gt;
xxx-xxx-xxx-xxx-00110
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;yyy-yyy-yyy-yyy-01235&lt;/td&gt;&lt;td&gt;bluh bluh bluh&lt;/td&gt;
&lt;td&gt;xxx-xxx-xxx-xxx-00120&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;&lt;br/&gt;
Seguendo la regola &lt;a href='http://babilsenior.blogspot.com/2008/06/automatizzare-tutti-i-costi.html'&gt;automatizzare a tutti i costi&lt;/a&gt; mi sono rivolto a una macro in VBA non semplice, sicuramente da ottimizzare, ma che ha raggiunto lo scopo:&lt;br/&gt;
&lt;pre class="brush:vb"&gt;
Option Explicit

Const rifTag = "Rif: " ' Tag che identifica il requisito di riferimento
Const firstTable As Integer = 18 ' Indice della prima tabella da esaminare
Const reqDettLength = 21 ' Lunghezza del codice del requisito di dettaglio

' Compila la tabella con la mappa dei requisiti
Sub requirementsMap()
    
    Dim element As String ' Elemento estratto dalla tabella
        
    Dim lastTable As Integer ' Ultima tabella da esaminare
    lastTable = ActiveDocument.Tables.Count - 1
    
    Const firstRowIndex As Integer = 1 ' Prima riga da esaminare
    Dim lastRowIndex As Integer ' Ultima riga da esaminare
    
    Dim reqId As Integer ' Contatore dei requisiti
    reqId = 1
    
    Dim tableIndex As Integer ' Cursore delle tabelle
    Dim currentTable
    
    ' Scorre le tabelle
    For tableIndex = firstTable To lastTable
        currentTable = ActiveDocument.Tables(tableIndex)
        lastRowIndex = currentTable.Rows.Count
        
        Dim currentRowIndex As Integer ' Cursore delle righe
        Dim currentRow
        
        ' Scorre le righe della tabella corrente
        For currentRowIndex = firstRowIndex To lastRowIndex
            
            currentRow = currentTable.Rows(currentRowIndex)
            
            Dim reqDett As String ' Requisito di dettaglio (prima colonna della tabella in esame)
            reqDett = extractReqDett(currentRow)
            
            Dim reqGen As String ' Requisito generale (indicato dalla parola "Rif. ")
            reqGen = extractReqGen(currentRow)
            
            Dim reqIndex ' Indice del requisito generale
            Dim reqMap ' Tabella contenente la mappa dei requisiti
            Dim foundRow ' Riga del requisito generale (-1 se non trovato)
            Dim cellContent ' Contenuto della cella DETTAGLIO
          
            If (Len(reqDett) = reqDettLength) Then
                reqIndex = findInTable(reqGen)
                ' Se il requisito generale è stato trovato
                If (reqIndex &gt; -1) Then
                    reqMap = ActiveDocument.Tables(ActiveDocument.Tables.Count)
                    foundRow = reqMap.Rows(reqIndex)
                    cellContent = foundRow.Cells(3)
                    foundRow.Cells(3) = cellContent + reqDett
                End If
                
                reqId = reqId + 1
            End If
        Next
    Next
End Sub

' Prendo solo il codice di 21 caratteri del
' requisito di dettaglio escludendo la descrizione
Function extractReqDett(currentRow)
    Dim element As String
    element = extractCell(currentRow, 2)
    If Len(element) &gt; 21 Then
        extractReqDett = Left(element, 21)
    Else
        extractReqDett = element
    End If
End Function

' Prendo solo il codice del requisito
' generale tagliando via "Rif. "
Function extractReqGen(currentRow)
    Dim reqGen As String
    reqGen = extractCell(currentRow, 3)
    If (Len(reqGen) &gt; Len(rifTag)) Then
        Dim beginsWith As String
        beginsWith = Left(reqGen, Len(rifTag))
        If (beginsWith = rifTag) Then
            extractReqGen = Right(reqGen, Len(reqGen) - Len(rifTag)) ' Prendo solo il codice escludendo "Rif. "
        Else
            extractReqGen = "???"
        End If
    Else
        extractReqGen = "???"
    End If
End Function

' Estrae una cella di una tabella tagliando al primo
' ritorno a capo ed eliminando gli spazi a contorno
Function extractCell(row, cellIndex) As String
    extractCell = Trim(truncateAtCRLF(row.Cells(cellIndex)))
End Function

' Tronca una stringa al primo CR/LF
Function truncateAtCRLF(text As String) As String
    truncateAtCRLF = truncate(text, Chr(13))
End Function

' Tronca una stringa alla prima occorrenza del delimitatore
Function truncate(text As String, delimiter As String) As String
    Dim delimiterIndex
    delimiterIndex = InStr(1, text, delimiter, vbTextCompare)
    Dim temp As String
    If (delimiterIndex &gt; 1) Then
        temp = Left(text, delimiterIndex - 1)
    Else
        temp = text
    End If
    truncate = temp
End Function

' Ritorna l'indice della riga della tabella in cui si trova S
Function findInTable(S As String) As Integer
    Dim reqMap
    reqMap = ActiveDocument.Tables(ActiveDocument.Tables.Count)
    Dim j As Integer
    j = 2 ' Skip riga d'intestazione
    Dim rowFound As Integer
    rowFound = -1
    Dim currentRow
    Dim reqId
    While (j &lt;= reqMap.Rows.Count And rowFound = -1)
        currentRow = reqMap.Rows(j)
        reqId = truncate(currentRow.Cells(1), " ")
        If (reqId = S) Then rowFound = j
        j = j + 1
    Wend
    findInTable = rowFound
End Function
&lt;/pre&gt;
Sempre bene accette le idee per migliorare il codice, ovviamente (per esempio: la ricerca lineare sulla tabella di destinazione non mi piace molto, in Java avrei usato una HashTable per indicizzare i contenuti).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6493659385036206035-4760767346449628555?l=babilsenior.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://babilsenior.blogspot.com/feeds/4760767346449628555/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6493659385036206035&amp;postID=4760767346449628555' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default/4760767346449628555'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default/4760767346449628555'/><link rel='alternate' type='text/html' href='http://babilsenior.blogspot.com/2008/06/automatizzare-tutti-i-costi-2.html' title='Automatizzare a tutti i costi 2'/><author><name>Manrico Corazzi</name><uri>http://www.blogger.com/profile/10866541980869905892</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6493659385036206035.post-2568475901561111273</id><published>2008-06-06T11:22:00.001+02:00</published><updated>2008-06-06T11:25:49.606+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><category scheme='http://www.blogger.com/atom/ns#' term='debug'/><title type='text'>Java native debugging</title><content type='html'>Segnalo un &lt;A HREF="http://weblogs.java.net/blog/kohsuke/archive/2008/06/debugging_java.html"&gt;post di Kohsuke Kawaguchi nel suo blog&lt;/A&gt; in cui dà alcune dritte su come effettuare il debugging del codice nativo di Java. Oltre alle ovvie applicazioni (scovare cioè quel bug così profondo nello stack di strati software da sfuggire agli altri strumenti di analisi) Kawaguchi suggerisce di usare questa tecnica per il debug di JNI.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6493659385036206035-2568475901561111273?l=babilsenior.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://babilsenior.blogspot.com/feeds/2568475901561111273/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6493659385036206035&amp;postID=2568475901561111273' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default/2568475901561111273'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default/2568475901561111273'/><link rel='alternate' type='text/html' href='http://babilsenior.blogspot.com/2008/06/java-native-debugging.html' title='Java native debugging'/><author><name>Manrico Corazzi</name><uri>http://www.blogger.com/profile/10866541980869905892</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6493659385036206035.post-6208073587720547612</id><published>2008-06-04T00:16:00.005+02:00</published><updated>2008-07-29T09:02:23.073+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Douglas Adams'/><category scheme='http://www.blogger.com/atom/ns#' term='Citazioni'/><title type='text'>Automatizzare a tutti i costi</title><content type='html'>&lt;i&gt;I (...) am rarely happier than when spending an entire day programming my computer to perform automatically a task that would otherwise take me a good ten seconds to do by hand.&lt;/i&gt;&lt;br/&gt;
&lt;b&gt;Douglas Adams&lt;/b&gt;, &lt;i&gt;Last Chance to See&lt;/i&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6493659385036206035-6208073587720547612?l=babilsenior.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://babilsenior.blogspot.com/feeds/6208073587720547612/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6493659385036206035&amp;postID=6208073587720547612' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default/6208073587720547612'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default/6208073587720547612'/><link rel='alternate' type='text/html' href='http://babilsenior.blogspot.com/2008/06/automatizzare-tutti-i-costi.html' title='Automatizzare a tutti i costi'/><author><name>Manrico Corazzi</name><uri>http://www.blogger.com/profile/10866541980869905892</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6493659385036206035.post-9170088347806307644</id><published>2008-06-04T00:09:00.004+02:00</published><updated>2008-08-25T15:13:05.824+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='plugin'/><category scheme='http://www.blogger.com/atom/ns#' term='Eclipse'/><category scheme='http://www.blogger.com/atom/ns#' term='Maven'/><title type='text'>Eclipse Plugin: Maven</title><content type='html'>&lt;a href="http://maven.apache.org/"&gt;Maven&lt;/a&gt; è un potente tool che permette la gestione dei progetti.
Per integrarlo in &lt;b&gt;Eclipse&lt;/b&gt;:&lt;br/&gt;
&lt;i&gt;Update site:&lt;/i&gt;  http://m2eclipse.sonatype.org/update/&lt;br/&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6493659385036206035-9170088347806307644?l=babilsenior.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://babilsenior.blogspot.com/feeds/9170088347806307644/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6493659385036206035&amp;postID=9170088347806307644' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default/9170088347806307644'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default/9170088347806307644'/><link rel='alternate' type='text/html' href='http://babilsenior.blogspot.com/2008/06/eclipse-maven.html' title='Eclipse Plugin: Maven'/><author><name>Manrico Corazzi</name><uri>http://www.blogger.com/profile/10866541980869905892</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6493659385036206035.post-8718201167960868960</id><published>2008-05-20T14:43:00.004+02:00</published><updated>2008-05-22T23:37:04.552+02:00</updated><title type='text'>Ruby: aggiungere supporto TCL/TK in Windows</title><content type='html'>Per far funzionare il supporto Tk in Ruby su Windows:
&lt;ol&gt;
&lt;li&gt;
installare &lt;a href="http://www.activestate.com/Products/activetcl/?_x=1"&gt;ActiveTcl&lt;/a&gt; versione 8.4
&lt;/li&gt;
&lt;li&gt;
copiare le directory &lt;b&gt;tcl8.4&lt;/b&gt; e &lt;b&gt;tk8.4&lt;/b&gt; da &lt;b&gt;${tcl_install_dir}\lib&lt;/b&gt; in &lt;b&gt;${ruby_install_dir}\lib&lt;/b&gt;
&lt;/li&gt;
&lt;li&gt;
copiare &lt;b&gt;tcl84.dll&lt;/b&gt; e &lt;b&gt;tk84.dll&lt;/b&gt; da &lt;b&gt;${tcl_install_dir}\bin&lt;/b&gt; in &lt;b&gt;${ruby_install_dir}\bin&lt;/b&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;br/&gt;
Per effettuare un test:
&lt;ol&gt;
&lt;li&gt;lanciare &lt;b&gt;irb&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;scrivere &lt;pre&gt;require 'Tk'&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;scrivere &lt;pre&gt;Tk.mainloop()&lt;/pre&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;br/&gt;
&lt;strong&gt;Update:&lt;/strong&gt;&lt;br/&gt;
irb dopo la &lt;b&gt;require 'Tk'&lt;/b&gt; si lamenta un po' (con una serie di errori), ma sembra che Tk funzioni lo stesso... qualche idea su come risolvere il problema?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6493659385036206035-8718201167960868960?l=babilsenior.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://babilsenior.blogspot.com/feeds/8718201167960868960/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6493659385036206035&amp;postID=8718201167960868960' title='2 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default/8718201167960868960'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default/8718201167960868960'/><link rel='alternate' type='text/html' href='http://babilsenior.blogspot.com/2008/05/ruby-aggiungere-supporto-tcltk-in.html' title='Ruby: aggiungere supporto TCL/TK in Windows'/><author><name>Manrico Corazzi</name><uri>http://www.blogger.com/profile/10866541980869905892</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6493659385036206035.post-3602919609661717951</id><published>2008-04-14T15:16:00.003+02:00</published><updated>2008-08-25T15:14:07.800+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='plugin'/><category scheme='http://www.blogger.com/atom/ns#' term='Eclipse'/><category scheme='http://www.blogger.com/atom/ns#' term='Mylyn'/><title type='text'>Eclipse Plugin: Mylyn</title><content type='html'>&lt;b&gt;Mylyn&lt;/b&gt; è un plug-in per &lt;b&gt;Eclipse&lt;/b&gt; che permette di gestire task, importandoli da &lt;b&gt;bugzilla&lt;/b&gt; e da &lt;b&gt;trac&lt;/b&gt;. 
Ha la possibilità di gestire le categorie, lo stato di avanzamento, le scadenze, le durate, le note, le associazioni con i frammenti di codice sorgente.
Un primo tentativo di collegamento al bugzilla aziendale mi sta dando qualche problema di autenticazione (ma il certificato digitale del server è scaduto, e questo potrebbe creare problemi).&lt;br/&gt;
&lt;b&gt;Mylyn&lt;/b&gt;&lt;br/&gt;
&lt;i&gt;home page&lt;/i&gt;: &lt;a href="http://www.eclipse.org/mylyn/" target="ontop"&gt;http://www.eclipse.org/mylyn/&lt;/a&gt;&lt;br/&gt;
&lt;i&gt;update site&lt;/i&gt;: http://download.eclipse.org/tools/mylyn/update/e3.3 (&lt;b&gt;NOTA&lt;/b&gt;: cambiare la versione "e3.3" in accordo con la vostra versione di Eclipse)&lt;br/&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6493659385036206035-3602919609661717951?l=babilsenior.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://babilsenior.blogspot.com/feeds/3602919609661717951/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6493659385036206035&amp;postID=3602919609661717951' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default/3602919609661717951'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default/3602919609661717951'/><link rel='alternate' type='text/html' href='http://babilsenior.blogspot.com/2008/04/eclipse-mylyn.html' title='Eclipse Plugin: Mylyn'/><author><name>Manrico Corazzi</name><uri>http://www.blogger.com/profile/10866541980869905892</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6493659385036206035.post-7802118860343687164</id><published>2008-04-14T15:13:00.004+02:00</published><updated>2008-08-25T15:14:57.642+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='plugin'/><category scheme='http://www.blogger.com/atom/ns#' term='Eclipse'/><category scheme='http://www.blogger.com/atom/ns#' term='python'/><title type='text'>Eclipse Plugin: PyDev</title><content type='html'>Per sviluppare in &lt;a href="http://www.python.it/" target="ontop"&gt;Python&lt;/a&gt; con &lt;b&gt;Eclipse&lt;/b&gt;: &lt;br/&gt;
&lt;b&gt;PyDev&lt;/b&gt;&lt;br/&gt;
&lt;i&gt;home page&lt;/i&gt;: &lt;a href="http://pydev.sourceforge.net/" target="ontop"&gt;http://pydev.sourceforge.net/&lt;/a&gt;&lt;br/&gt;
&lt;i&gt;update site&lt;/i&gt;: http://pydev.sourceforge.net/updates/&lt;br/&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6493659385036206035-7802118860343687164?l=babilsenior.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://babilsenior.blogspot.com/feeds/7802118860343687164/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6493659385036206035&amp;postID=7802118860343687164' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default/7802118860343687164'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default/7802118860343687164'/><link rel='alternate' type='text/html' href='http://babilsenior.blogspot.com/2008/04/eclipse-pydev.html' title='Eclipse Plugin: PyDev'/><author><name>Manrico Corazzi</name><uri>http://www.blogger.com/profile/10866541980869905892</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6493659385036206035.post-7409258132300634559</id><published>2008-04-01T12:23:00.002+02:00</published><updated>2008-04-01T12:28:02.632+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><category scheme='http://www.blogger.com/atom/ns#' term='assembly'/><title type='text'>Java to Assembly</title><content type='html'>Un interessante esperimento di Johsuke Kawaguchi, di &lt;b&gt;Java.net&lt;/b&gt;: che codice assembly viene generato a partire da codice Java?
&lt;br/&gt;
&lt;br/&gt;
&lt;a href="http://weblogs.java.net/blog/kohsuke/archive/2008/03/deep_dive_into.html"&gt;Deep dive into assembly code from Java (Kohsuke  Kawaguchi @ Java.net)&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6493659385036206035-7409258132300634559?l=babilsenior.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://babilsenior.blogspot.com/feeds/7409258132300634559/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6493659385036206035&amp;postID=7409258132300634559' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default/7409258132300634559'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default/7409258132300634559'/><link rel='alternate' type='text/html' href='http://babilsenior.blogspot.com/2008/04/java-to-assembly.html' title='Java to Assembly'/><author><name>Manrico Corazzi</name><uri>http://www.blogger.com/profile/10866541980869905892</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6493659385036206035.post-4906565450213040833</id><published>2008-03-07T10:26:00.001+01:00</published><updated>2008-03-07T10:27:32.430+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Eclipse'/><title type='text'>Effective Eclipse</title><content type='html'>Una serie di articoli su &lt;b&gt;Eclipse&lt;/b&gt; e su come incrementare la produttività.&lt;br/&gt;
&lt;a href="http://eclipse.dzone.com/news/effective-eclipse-setup-your-e"&gt;Setup your environment&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://eclipse.dzone.com/news/effective-eclipse-shortcut-key"&gt;Shortcuts&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://eclipse.dzone.com/news/effective-eclipse-dont-write-c"&gt;Template #1&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://eclipse.dzone.com/news/effective-eclipse-custom-templ"&gt;Template #2&lt;/a&gt;&lt;br/&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6493659385036206035-4906565450213040833?l=babilsenior.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://babilsenior.blogspot.com/feeds/4906565450213040833/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6493659385036206035&amp;postID=4906565450213040833' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default/4906565450213040833'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default/4906565450213040833'/><link rel='alternate' type='text/html' href='http://babilsenior.blogspot.com/2008/03/effective-eclipse.html' title='Effective Eclipse'/><author><name>Manrico Corazzi</name><uri>http://www.blogger.com/profile/10866541980869905892</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6493659385036206035.post-8754750577633611112</id><published>2008-03-06T11:08:00.001+01:00</published><updated>2008-03-06T11:09:22.078+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='plugin'/><category scheme='http://www.blogger.com/atom/ns#' term='Eclipse'/><category scheme='http://www.blogger.com/atom/ns#' term='properties'/><title type='text'>Eclipse Plugin: JInto</title><content type='html'>Per modificare rapidamente un set di file properties multilingua: &lt;a href="http://www.guh-software.de/eclipse/"&gt;JInto&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6493659385036206035-8754750577633611112?l=babilsenior.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://babilsenior.blogspot.com/feeds/8754750577633611112/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6493659385036206035&amp;postID=8754750577633611112' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default/8754750577633611112'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default/8754750577633611112'/><link rel='alternate' type='text/html' href='http://babilsenior.blogspot.com/2008/03/eclipse-plugin-jinto.html' title='Eclipse Plugin: JInto'/><author><name>Manrico Corazzi</name><uri>http://www.blogger.com/profile/10866541980869905892</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6493659385036206035.post-4757578688942048769</id><published>2008-02-29T22:24:00.003+01:00</published><updated>2008-02-29T22:28:07.454+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Web design'/><category scheme='http://www.blogger.com/atom/ns#' term='Interfacce utente'/><title type='text'>Web design: 10 cose da evitare</title><content type='html'>Da &lt;b&gt;Jakob Nielsen&lt;/b&gt; una &lt;a href="http://www.useit.com/alertbox/designmistakes.html"&gt;top-ten delle cose da evitare&lt;/a&gt; che tutti coloro che sviluppano per il web (ma non solo) dovrebbero imparare a memoria.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6493659385036206035-4757578688942048769?l=babilsenior.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://babilsenior.blogspot.com/feeds/4757578688942048769/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6493659385036206035&amp;postID=4757578688942048769' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default/4757578688942048769'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default/4757578688942048769'/><link rel='alternate' type='text/html' href='http://babilsenior.blogspot.com/2008/02/web-design-10-cose-da-evitare.html' title='Web design: 10 cose da evitare'/><author><name>Manrico Corazzi</name><uri>http://www.blogger.com/profile/10866541980869905892</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6493659385036206035.post-5975000096669073521</id><published>2008-02-29T22:04:00.006+01:00</published><updated>2011-01-12T16:22:51.398+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JSP'/><category scheme='http://www.blogger.com/atom/ns#' term='tagfile'/><title type='text'>JSP: i tagfile</title><content type='html'>I tag file (v. &lt;a href="http://java.sun.com/j2ee/1.4/docs/tutorial/doc/JSPTags5.html" target="onto"&gt;http://java.sun.com/j2ee/1.4/docs/tutorial/doc/JSPTags5.html&lt;/a&gt;) sono una valida alternativa alla scrittura di un custom tag, consigliati nei casi più semplici e per riutilizzare il codice anche nelle pagine JSP.&lt;br/&gt;

1. Creare un file con estensione &lt;b&gt;.tag&lt;/b&gt; nella cartella &lt;b&gt;WEB-INF/tags&lt;/b&gt; (es: &lt;b&gt;question.tag&lt;/b&gt;):

&lt;pre class="brush:xml"&gt;
&amp;lt;%@ taglib uri=&amp;quot;/WEB-INF/c.tld&amp;quot; prefix=&amp;quot;c&amp;quot;%&amp;gt;

&amp;lt;%@ attribute name=&amp;quot;question&amp;quot; type=&amp;quot;it.aaa.bbb.Question&amp;quot; %&amp;gt;
&amp;lt;%@ attribute name=&amp;quot;formName&amp;quot; type=&amp;quot;java.lang.String&amp;quot; %&amp;gt;

&amp;lt;c:set var=&amp;quot;questionId&amp;quot; value=&amp;quot;${questionnaire.formId};${question.id.id}&amp;quot; 
scope=&amp;quot;request&amp;quot; /&amp;gt;

&amp;lt;c:out value=&amp;quot;${formName}&amp;quot;/&amp;gt;
&amp;lt;c:out value=&amp;quot;${question.queTesto}&amp;quot;/&amp;gt;
&amp;lt;c:out value=&amp;quot;${questionId}&amp;quot; /&amp;gt;
&lt;/pre&gt;

2. Per usarlo, nelle pagine JSP:

&lt;pre class="brush:xml"&gt;
&amp;lt;%@ taglib prefix=&amp;quot;tag&amp;quot; tagdir=&amp;quot;/WEB-INF/tags/&amp;quot; %&amp;gt;

&amp;lt;tag:question question=&amp;quot;${question}&amp;quot; formName=&amp;quot;questionnaireForm&amp;quot;/&amp;gt;
&lt;/pre&gt;

&lt;p&gt;&lt;b&gt;NOTA&lt;/b&gt;: per inserire il contenuto di un tag usare &lt;pre&gt;&amp;lt;jsp:doBody/&gt;&lt;/pre&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6493659385036206035-5975000096669073521?l=babilsenior.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://babilsenior.blogspot.com/feeds/5975000096669073521/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6493659385036206035&amp;postID=5975000096669073521' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default/5975000096669073521'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default/5975000096669073521'/><link rel='alternate' type='text/html' href='http://babilsenior.blogspot.com/2008/02/jsp-i-tagfile.html' title='JSP: i tagfile'/><author><name>Manrico Corazzi</name><uri>http://www.blogger.com/profile/10866541980869905892</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6493659385036206035.post-4557545790940880304</id><published>2008-02-29T21:49:00.005+01:00</published><updated>2011-01-12T16:25:55.941+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JSP'/><category scheme='http://www.blogger.com/atom/ns#' term='tagfile'/><title type='text'>JSP: scriptlet nei tagfile</title><content type='html'>&lt;p&gt;I tagfile non supportano la directiva &lt;tt&gt;page&lt;/tt&gt;:&lt;/p&gt;
&lt;blockquote&gt;java.lang.RuntimeException: org.apache.jasper.JasperException ... page directive cannot be used in a tag file&lt;/blockquote&gt;
&lt;p&gt;
Per esempio per importare le classi necessarie per gli scriptlet bisogna ricordare di usare invece la direttiva &lt;tt&gt;tag&lt;/tt&gt;, invece:&lt;/p&gt;
&lt;pre class="brush:xml"&gt;
&amp;lt;%@tag import=&amp;quot;java.util.Random&amp;quot; %&amp;gt;

&amp;lt;%@ taglib uri=&amp;quot;/WEB-INF/struts-html.tld&amp;quot; prefix=&amp;quot;html&amp;quot;%&amp;gt;
&amp;lt;%@ taglib uri=&amp;quot;/WEB-INF/c.tld&amp;quot; prefix=&amp;quot;c&amp;quot;%&amp;gt;

&amp;lt;%
Random generator = new Random();
int randomIndex = generator.nextInt(4)+1;
%&amp;gt;

&amp;lt;c:set var=&amp;quot;randomIndex&amp;quot; value=&amp;quot;&amp;lt;%=randomIndex%&amp;gt;&amp;quot;/&amp;gt;

&amp;lt;html:img page=&amp;quot;/images/back_header0${randomIndex}.jpg&amp;quot; /&amp;gt;
&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6493659385036206035-4557545790940880304?l=babilsenior.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://babilsenior.blogspot.com/feeds/4557545790940880304/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6493659385036206035&amp;postID=4557545790940880304' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default/4557545790940880304'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default/4557545790940880304'/><link rel='alternate' type='text/html' href='http://babilsenior.blogspot.com/2008/02/jsp-scriptlet-nei-tagfile.html' title='JSP: scriptlet nei tagfile'/><author><name>Manrico Corazzi</name><uri>http://www.blogger.com/profile/10866541980869905892</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6493659385036206035.post-6696632635659510707</id><published>2008-02-29T21:41:00.004+01:00</published><updated>2011-01-12T16:26:56.455+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JSP'/><category scheme='http://www.blogger.com/atom/ns#' term='Struts'/><title type='text'>Struts: passare parametri con html:link</title><content type='html'>&lt;pre class="brush:xml"&gt;
&amp;lt;bean:define id=&amp;quot;queueType&amp;quot; name=&amp;quot;WorkFlowForm&amp;quot; property=&amp;quot;queueType&amp;quot; /&amp;gt;
&amp;lt;bean:define id=&amp;quot;taskId&amp;quot; name=&amp;quot;queues&amp;quot; property=&amp;quot;taskId&amp;quot; /&amp;gt;
&amp;lt;bean:define id=&amp;quot;queueName&amp;quot; name=&amp;quot;queues&amp;quot; property=&amp;quot;queueName&amp;quot; /&amp;gt;

&amp;lt;%
java.util.HashMap params = new java.util.HashMap();
params.put(&amp;quot;queueName&amp;quot;, queueName);
params.put(&amp;quot;pageMode&amp;quot;, queueType);
params.put(&amp;quot;taskId&amp;quot;, taskId);
pageContext.setAttribute(&amp;quot;parameters&amp;quot;, params);
%&amp;gt;

&amp;lt;html:link name=&amp;quot;parameters&amp;quot; scope=&amp;quot;page&amp;quot; page=&amp;quot;&amp;lt;%=path%&amp;gt;&amp;quot;&amp;gt;
 Anchor
&amp;lt;/html:link&amp;gt;
&lt;/pre&gt;
&lt;p&gt;
(v. &lt;a href="http://www.theserverside.com/discussions/thread.tss?thread_id=26150"&gt;TheServerSide.com&lt;/a&gt;)&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6493659385036206035-6696632635659510707?l=babilsenior.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://babilsenior.blogspot.com/feeds/6696632635659510707/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6493659385036206035&amp;postID=6696632635659510707' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default/6696632635659510707'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default/6696632635659510707'/><link rel='alternate' type='text/html' href='http://babilsenior.blogspot.com/2008/02/struts-passare-parametri-con-htmllink.html' title='Struts: passare parametri con html:link'/><author><name>Manrico Corazzi</name><uri>http://www.blogger.com/profile/10866541980869905892</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6493659385036206035.post-2371222994871647368</id><published>2008-02-28T16:06:00.005+01:00</published><updated>2011-01-12T16:29:28.520+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Javascript'/><title type='text'>JavaScript e lo scroll</title><content type='html'>&lt;p&gt;
Avete presente quando, scorrendo una lunga pagina web, fate clic su un (apparentemente) innocuo link o su un (altrettanto apparentemente) innocuo pulsante che modifica solo una parte della pagina, ma che effettua anche la POST o la GET e - conseguentemente - il reload della pagina e - alla fine - vi riporta in cima alla pagina stessa?&lt;/p&gt;
&lt;p&gt;
Per evitare questo fastidioso problema si può usare un po' di JavaScript.
Ho trovato un interessante frammento di codice su &lt;a href="http://aspnet.4guysfromrolla.com/articles/111704-1.aspx"&gt;4GuysFromRolla&lt;/a&gt;, e l'ho solo leggermente modificato per usare i cookie anziché gli hidden input per il passaggio dei parametri:
&lt;/p&gt;
&lt;pre  class="brush:js"&gt;
// Recupera le coordinate e le salva nei cookie
function sstchur_SmartScroller_GetCoords()
{
  var scrollX, scrollY;
          
  if (document.all)
  {
    if (!document.documentElement.scrollLeft)
    {
      scrollX = document.body.scrollLeft;
    }
    else
    {
      scrollX = document.documentElement.scrollLeft;
    }
    if (!document.documentElement.scrollTop)
    {
      scrollY = document.body.scrollTop;
    }
    else
    {
      scrollY = document.documentElement.scrollTop;
    }
  }   
  else
  {
    scrollX = window.pageXOffset;
    scrollY = window.pageYOffset;
  }
       
  createCookie("scrollX", scrollX, 1);
  createCookie("scrollY", scrollY, 1);
}

// Riposiziona la pagina alle coordinate salvate nei cookie
function sstchur_SmartScroller_Scroll()
{
  var x = readCookie("scrollX");
  var y = readCookie("scrollY");
  window.scrollTo(x, y);
}

// Associa l'operazione di riposizionamento all'evento di reload della pagina
window.onload = sstchur_SmartScroller_Scroll;

/* 
 * Associa l'operazione di salvataggio delle coordinate 
 * a ogni evento che possa modificarle
 */
window.onscroll = sstchur_SmartScroller_GetCoords;
window.onkeypress = sstchur_SmartScroller_GetCoords;
window.onclick = sstchur_SmartScroller_GetCoords;
&lt;/pre&gt;
&lt;p&gt;
&lt;b&gt;NOTA:&lt;/b&gt; richiede le &lt;a href="http://babilsenior.blogspot.com/2008/02/cookies-con-javascript.html"&gt;funzioni per la gestione dei cookie&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;
&lt;b&gt;NOTA:&lt;/b&gt; benché l'articolo originale usasse lo script nell'ambito ASP.NET può essere inserito in qualunque contesto&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6493659385036206035-2371222994871647368?l=babilsenior.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://babilsenior.blogspot.com/feeds/2371222994871647368/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6493659385036206035&amp;postID=2371222994871647368' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default/2371222994871647368'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default/2371222994871647368'/><link rel='alternate' type='text/html' href='http://babilsenior.blogspot.com/2008/02/javascript-e-lo-scroll.html' title='JavaScript e lo scroll'/><author><name>Manrico Corazzi</name><uri>http://www.blogger.com/profile/10866541980869905892</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6493659385036206035.post-7314268730942881092</id><published>2008-02-28T16:01:00.005+01:00</published><updated>2011-01-12T16:33:29.147+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='Cookies'/><title type='text'>Cookies con Javascript</title><content type='html'>&lt;p&gt;Come si gestiscono i cookie con JavaScript? &lt;a href="http://www.quirksmode.org/js/cookies.html"&gt;Quirkmodes&lt;/a&gt; presenta questo frammento di codice molto utile e pulito:&lt;/p&gt;
&lt;pre class="brush:js"&gt;
function createCookie(name, value, days) 
{
 if (days) 
 {
  var date = new Date();
  date.setTime(date.getTime()+(days*24*60*60*1000));
  var expires = "; expires="+date.toGMTString();
 }
 else 
 {
   var expires = "";
 }
 document.cookie = name+"="+value+expires+"; path=/";
}

function readCookie(name) 
{
 var nameEQ = name + "=";
 var ca = document.cookie.split(';');
 for(var i=0;i &lt; ca.length;i++) {
  var c = ca[i];
  while (c.charAt(0)==' ') c = c.substring(1,c.length);
  if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
 }
 return null;
}

function eraseCookie(name) 
{
  createCookie(name,"",-1);
}
&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6493659385036206035-7314268730942881092?l=babilsenior.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://babilsenior.blogspot.com/feeds/7314268730942881092/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6493659385036206035&amp;postID=7314268730942881092' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default/7314268730942881092'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default/7314268730942881092'/><link rel='alternate' type='text/html' href='http://babilsenior.blogspot.com/2008/02/cookies-con-javascript.html' title='Cookies con Javascript'/><author><name>Manrico Corazzi</name><uri>http://www.blogger.com/profile/10866541980869905892</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6493659385036206035.post-5593869924442143014</id><published>2008-02-26T23:37:00.003+01:00</published><updated>2011-01-12T11:04:39.601+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='Blogger'/><category scheme='http://www.blogger.com/atom/ns#' term='Syntax Highlighting'/><title type='text'>Syntax Highlight in Blogger</title><content type='html'>&lt;p&gt;
Per avere il codice colorato nei post ho usato una libreria open source che si chiama &lt;b&gt;SyntaxHighlighter&lt;/b&gt;. Alcuni suggerimenti su come utilizzarla in &lt;span style="font-weight:bold;"&gt;Blogger&lt;/span&gt; dal blog &lt;a href="http://morten.lyhr.dk/2007/12/how-to-get-syntax-highlighting-in.html"&gt;Silver Bullet&lt;/a&gt;.
&lt;/p&gt;
&lt;p style="text-decoration: line-through;"&gt;Però io per salvare i file js, css e swf necessari al funzionamento della libreria ho usato &lt;a href="http://pages.google.com/"&gt;Google PageCreator&lt;/a&gt; come suggerito nel commento di Pietro Bonanno&lt;/p&gt;.

&lt;p&gt;&lt;b&gt;EDIT 2011.01.13:&lt;/b&gt; Con la nuova versione di &lt;a href="http://alexgorbatchev.com/SyntaxHighlighter/" target="ontop"&gt;Syntax Highlighter&lt;/a&gt; la sintassi è cambiata. Inoltre l'autore offre hosting per le librerie. Accetta donazioni.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6493659385036206035-5593869924442143014?l=babilsenior.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://babilsenior.blogspot.com/feeds/5593869924442143014/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6493659385036206035&amp;postID=5593869924442143014' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default/5593869924442143014'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default/5593869924442143014'/><link rel='alternate' type='text/html' href='http://babilsenior.blogspot.com/2008/02/syntax-highlight-in-blogger.html' title='Syntax Highlight in Blogger'/><author><name>Manrico Corazzi</name><uri>http://www.blogger.com/profile/10866541980869905892</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6493659385036206035.post-8855871744783323004</id><published>2008-02-25T23:20:00.019+01:00</published><updated>2011-01-12T11:28:57.234+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='Greasemonkey'/><category scheme='http://www.blogger.com/atom/ns#' term='Bugzilla'/><category scheme='http://www.blogger.com/atom/ns#' term='Firefox'/><title type='text'>Bugzilla: cosmetic</title><content type='html'>&lt;p&gt;Questo è lo script &lt;a href="http://it.wikipedia.org/wiki/Greasemonkey"&gt;Greasemonkey&lt;/a&gt; che utilizzo in Firefox per migliorare l'aspetto della lista dei bug delle query di &lt;a href="http://www.bugzilla.org/"&gt;Bugzilla&lt;/a&gt;:&lt;/p&gt;

&lt;pre  class="brush: js"&gt;
var tableHeaderBackgroundColor = '#BBFFBB';
var tableEvenRowBackgroundColor = '#DDDDDD';
var tableOddRowBackgroundColor = '#FFFFFF';
var pageFont = "Consolas";

/**
 * alterna i colori delle righe
 */
function doEvenOdd(table)
{
 var tr = table.getElementsByTagName('tr');
 // intestazione della tabela
 toChange = tr[0];
 toChange.style.backgroundColor = tableHeaderBackgroundColor;
 // righe del corpo della tabella
 for(var j = 1; j &amp;lt; tr.length; j++)
 {
   var toChange = tr[j];
   if(j % 2 == 0)
   {
     toChange.style.backgroundColor = tableEvenRowBackgroundColor;
   }
   else
   {
     toChange.style.backgroundColor = tableOddRowBackgroundColor;
   }
 }
}

// cambia il font della pagina
document.body.style.fontFamily = pageFont;

// elimina tutto quello che segue il simbolo '@' dagli indirizzi di posta elettronica
var bodyText = document.body.innerHTML.replace(/@.*\.\.\./g, "");
document.body.innerHTML = bodyText;

// alterna i colori della tabella dei bug
var tables = document.getElementsByTagName('table');
doEvenOdd(tables[3]);
&lt;/pre&gt;

&lt;p&gt;
Ovviamente accetto suggerimenti per migliorarlo (ad esempio: credo che sia possibile impostare l'alternanza dei colori delle righe della tabella in altri modi).
&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6493659385036206035-8855871744783323004?l=babilsenior.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://babilsenior.blogspot.com/feeds/8855871744783323004/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6493659385036206035&amp;postID=8855871744783323004' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default/8855871744783323004'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default/8855871744783323004'/><link rel='alternate' type='text/html' href='http://babilsenior.blogspot.com/2008/02/bugzilla-cosmetic.html' title='Bugzilla: cosmetic'/><author><name>Manrico Corazzi</name><uri>http://www.blogger.com/profile/10866541980869905892</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6493659385036206035.post-8536934355450138143</id><published>2008-02-24T22:30:00.001+01:00</published><updated>2008-02-24T22:31:40.230+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Extensions'/><category scheme='http://www.blogger.com/atom/ns#' term='Firefox'/><title type='text'>Tutorial: Developing Firefox Extensions</title><content type='html'>&lt;span style="font-family: verdana;"&gt;Un tutorial per intraprendere i primi passi nello sviluppo di estensioni per &lt;span style="font-weight: bold;"&gt;Mozilla Firefox&lt;/span&gt;:
&lt;a href="http://www.rietta.com/firefox/Tutorial/overview.html"&gt;http://www.rietta.com/firefox/Tutorial/overview.html&lt;/a&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6493659385036206035-8536934355450138143?l=babilsenior.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://babilsenior.blogspot.com/feeds/8536934355450138143/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6493659385036206035&amp;postID=8536934355450138143' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default/8536934355450138143'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default/8536934355450138143'/><link rel='alternate' type='text/html' href='http://babilsenior.blogspot.com/2008/02/tutorial-developing-firefox-extensions.html' title='Tutorial: Developing Firefox Extensions'/><author><name>Manrico Corazzi</name><uri>http://www.blogger.com/profile/10866541980869905892</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6493659385036206035.post-3102407804325653197</id><published>2008-02-22T16:43:00.004+01:00</published><updated>2008-02-22T22:58:37.287+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Download'/><category scheme='http://www.blogger.com/atom/ns#' term='Libri'/><category scheme='http://www.blogger.com/atom/ns#' term='Citazioni'/><title type='text'>Ipse Dixit #1</title><content type='html'>&lt;span style="font-style: italic;font-family:verdana;" &gt;Programming is not a zero-sum game. Teaching something to a fellow programmer doesn’t take it away from you. I’m happy to share what I can, because I’m in it for the love of programming. The Ferraris are just gravy, honest! &lt;/span&gt;
&lt;span style="font-family:verdana;"&gt;(John Carmack, dall'introduzione a &lt;/span&gt;&lt;span style="font-weight: bold;font-family:verdana;" &gt;Graphics Programming Black Book&lt;/span&gt;&lt;span style="font-family:verdana;"&gt; di Michael Abrash; &lt;a href="http://www.byte.com/abrash/"&gt;disponibile in formato PDF&lt;/a&gt;)&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6493659385036206035-3102407804325653197?l=babilsenior.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://babilsenior.blogspot.com/feeds/3102407804325653197/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6493659385036206035&amp;postID=3102407804325653197' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default/3102407804325653197'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default/3102407804325653197'/><link rel='alternate' type='text/html' href='http://babilsenior.blogspot.com/2008/02/ipse-dixit-1.html' title='Ipse Dixit #1'/><author><name>Manrico Corazzi</name><uri>http://www.blogger.com/profile/10866541980869905892</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6493659385036206035.post-1691589513498692690</id><published>2008-02-22T16:15:00.005+01:00</published><updated>2010-04-08T23:25:12.859+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tutorial'/><category scheme='http://www.blogger.com/atom/ns#' term='Ruby'/><title type='text'>Why's (poignant) guide to Ruby</title><content type='html'>&lt;p style="font-family:verdana;"&gt;Segnalo un tutorial decisamente originale su &lt;span style="font-weight: bold;"&gt;Ruby&lt;/span&gt;:
&lt;a href="http://mislav.uniqpath.com/poignant-guide/" target="_blank"&gt;Why's (poignant) guide to Ruby&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;&lt;b&gt;NOTA:&lt;/b&gt; Il link segnalato è un mirror HTML; Why ha lasciato il libro incompleto, a metà 2009 ha messo offline il sito ed è quasi scomparso da Internet... v. &lt;a href="http://en.wikipedia.org/wiki/Why_the_lucky_stiff" target="_blank"&gt;wikipedia&lt;/a&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6493659385036206035-1691589513498692690?l=babilsenior.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://babilsenior.blogspot.com/feeds/1691589513498692690/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6493659385036206035&amp;postID=1691589513498692690' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default/1691589513498692690'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default/1691589513498692690'/><link rel='alternate' type='text/html' href='http://babilsenior.blogspot.com/2008/02/whys-poignant-guide-to-ruby.html' title='Why&apos;s (poignant) guide to Ruby'/><author><name>Manrico Corazzi</name><uri>http://www.blogger.com/profile/10866541980869905892</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6493659385036206035.post-3368660224331384118</id><published>2008-02-22T15:34:00.003+01:00</published><updated>2008-08-25T15:39:53.514+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='plugin'/><category scheme='http://www.blogger.com/atom/ns#' term='Ruby'/><category scheme='http://www.blogger.com/atom/ns#' term='Eclipse'/><title type='text'>Eclipse Plugin: Ruby Development Tools</title><content type='html'>&lt;span style="font-family: verdana;"&gt;Un ottimo plug-in per &lt;span style="font-weight: bold;"&gt;Eclipse&lt;/span&gt; per chi programma in &lt;span style="font-weight: bold;"&gt;Ruby&lt;/span&gt;:
&lt;/span&gt;
&lt;br/&gt;&lt;b style="font-family: verdana;"&gt;Ruby Development Tools - &lt;/b&gt;
&lt;a style="font-family: verdana;" href="http://rubyeclipse.sourceforge.net/"&gt;http://rubyeclipse.sourceforge.net/&lt;/a&gt;
&lt;br/&gt;&lt;b style="font-family: verdana;"&gt;Eclipse Update Site - &lt;/b&gt;&lt;a style="font-family: verdana;" href="http://updatesite.rubypeople.org/release"&gt;http://updatesite.rubypeople.org/release&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6493659385036206035-3368660224331384118?l=babilsenior.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://babilsenior.blogspot.com/feeds/3368660224331384118/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6493659385036206035&amp;postID=3368660224331384118' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default/3368660224331384118'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6493659385036206035/posts/default/3368660224331384118'/><link rel='alternate' type='text/html' href='http://babilsenior.blogspot.com/2008/02/eclipse-plugin-ruby-development-tools.html' title='Eclipse Plugin: Ruby Development Tools'/><author><name>Manrico Corazzi</name><uri>http://www.blogger.com/profile/10866541980869905892</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
