<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0"><channel><atom:link rel="hub" href="http://tumblr.superfeedr.com/" xmlns:atom="http://www.w3.org/2005/Atom"/><description>Myti s.r.l.

Torre Athena
via Orzinuovi 20
25125 Brescia</description><title>Myti Blog</title><generator>Tumblr (3.0; @myti-blog)</generator><link>http://blog.myti.it/</link><item><title>Fiera Affidabilità e Tecnologie</title><description>&lt;p&gt;&lt;p class="p1"&gt;&lt;img height="100" src="http://www.affidabilita.eu/eventoaet/imgAet/banner2012_lug2011.png" width="980"/&gt;&lt;/p&gt;

&lt;p class="p2"&gt;&lt;strong&gt;Siamo alla fiera Affidabilità e Tecnologie&lt;/strong&gt;&lt;/p&gt;
&lt;p class="p3"&gt;&lt;strong&gt;ll salone specialistico dell’Innovazione:Tecnologie, Soluzioni, Strumenti e Servizi&lt;/strong&gt;&lt;/p&gt;
&lt;p class="p4"&gt;&lt;strong&gt;Lingotto Fiere 18-19 Aprile stand G35&lt;/strong&gt;&lt;/p&gt;
&lt;p class="p4"&gt;&lt;strong&gt;&lt;br/&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p class="p4"&gt;&lt;strong&gt;&lt;a href="http://www.affidabilita.eu/" target="_blank"&gt;Vai al sito&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;&lt;/p&gt;</description><link>http://blog.myti.it/post/19784445023</link><guid>http://blog.myti.it/post/19784445023</guid><pubDate>Fri, 23 Mar 2012 16:43:33 +0100</pubDate><dc:creator>gbounch</dc:creator></item><item><title>Automatically show the content of a specific Lotus notes mail</title><description>&lt;p&gt;&lt;strong&gt;REQUIREMENTS&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;The IMAP id of the Gmail email to be open&lt;/li&gt;
&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;Lotus notes needs to be installed in the client machine and you need to know the path of the executable&lt;/li&gt;
&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;&lt;a&gt;Install and configure the Domingo API for Lotus notes see &lt;/a&gt; &lt;/li&gt;
&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;Basic knowledge of Java Programming &lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;&lt;strong&gt;CODE&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The program consist of two main classes&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;DBService&lt;/strong&gt; – this class creates a connection to the Lotus Notes database using the Domingo API. Il contains a method &lt;em&gt;&lt;strong&gt;getDDocuments(String gmailImapID)&lt;/strong&gt;&lt;/em&gt; that searches the Lotus Notes database  for the Lotus Notes document using the gmailIMapID.&lt;/p&gt;
&lt;p&gt; DBService class&lt;/p&gt;
&lt;pre class="brush: java;"&gt;package it.myti.lotusNotes.integrator.db;

import java.util.Iterator;
import de.bea.domingo.DBaseItem;
import de.bea.domingo.DDatabase;
import de.bea.domingo.DDocument;
import de.bea.domingo.DNotesException;
import de.bea.domingo.DNotesFactory;
import de.bea.domingo.DSession;

public class DBService  {
	private DDatabase database = null;	
	private DNotesFactory factory = DNotesFactory.getInstance();
	private DSession session = factory.getSession();
	
	public DBService() {
		try {			
			database = session.getMailDatabase();
		} catch (DNotesException e) {
			e.printStackTrace();
		}
	}
	
	public DDatabase getDatabase() {
		return database;
	}
	
    public DDocument getDDocument(String gmailImapID) {
    	DDocument document =  null;   	
    	if( database != null) {
    		Iterator docs =  database.search("$MessageID = \"" + gmailImapID + "\"") ;
    		
    		while( docs.hasNext()) {
    			document = (DDocument)docs.next(); 
    			break;
    	     }
		 }else {
			System.out.println("Error: cannot connect to lotus database"); 
		 }
    	
    	return document;
	}
    
    
    

&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;DomingoMain&lt;/strong&gt;&lt;span&gt; – This class contains the Java main method. In this class, I invoked the method &lt;/span&gt;&lt;em&gt;&lt;strong&gt;getDDocument(gmailImapID)&lt;/strong&gt;&lt;/em&gt;&lt;span&gt; on the &lt;/span&gt;&lt;strong&gt;DBService&lt;/strong&gt;&lt;span&gt; &lt;/span&gt;&lt;em&gt;&lt;strong&gt;db&lt;/strong&gt;&lt;/em&gt;&lt;span&gt; object to get the Lotus Notes document passing the gmailIMapID of the Lotus Notes to be opened. Then I launched the Lotus Notes program using  the method &lt;/span&gt;&lt;em&gt;&lt;strong&gt;Runtime.getRuntime().exec(execString)&lt;/strong&gt;&lt;/em&gt;&lt;span&gt;.  Where &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;execString&lt;/strong&gt;&lt;/em&gt;&lt;span&gt; = &lt;/span&gt;&lt;strong&gt;Lotus Notes executable path&lt;/strong&gt;&lt;span&gt; + &lt;/span&gt;&lt;strong&gt;space&lt;/strong&gt;&lt;span&gt; + &lt;/span&gt;&lt;strong&gt;Lotus Notes Universal Unique ID&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;as can be seen in the screenshot below.&lt;/p&gt;
&lt;p&gt;DomingoMain class&lt;/p&gt;
&lt;pre class="brush: java;"&gt;package it.myti.lotusNotes.integrator.core;

import java.io.IOException;
import de.bea.domingo.DDocument;
import it.myti.lotusNotes.integrator.db.DBService;

public class DomingoMain  {

	public static void main(String[] args) {
		//search by Gmail IMAP ID
		String gmailImapID= ""; 
		
		//Path to the Lotus Notes executable
		String path =  "C:\\Program Files\\IBM\\Lotus\\Notes\\notes.exe";
		DBService db =  new DBService(); 
		DDocument document = db.getDDocument(gmailImapID);
		String exeString = path + " " + document.getURL();
		
		if(document != null ) {
		   try {
				Runtime.getRuntime().exec( exeString );
		    } catch (IOException e) {
				e.printStackTrace();
		    }
		}else {
			System.out.println("Error: Lotus Notes document non found.");
		}
	    
	 	
	}
}

&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;RESULT&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;img src="http://media.tumblr.com/tumblr_m098mvJVQ81qiu4vy.png"/&gt;&lt;br/&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;br/&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;br/&gt;&lt;/strong&gt;&lt;/p&gt;</description><link>http://blog.myti.it/post/18601683123</link><guid>http://blog.myti.it/post/18601683123</guid><pubDate>Fri, 02 Mar 2012 11:39:00 +0100</pubDate><dc:creator>tmngassa</dc:creator></item><item><title>La presentazione “NFC Programming in Android” che è...</title><description>&lt;iframe src="http://www.slideshare.net/slideshow/embed_code/10495501?rel=0" width="400" height="334" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"&gt;&lt;/iframe&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;La presentazione “NFC Programming in Android” che è stata presentata 24 Novembre 2011 nell’incontro di GTUG (Google Technology User Group) Milano.&lt;/p&gt;</description><link>http://blog.myti.it/post/13868306281</link><guid>http://blog.myti.it/post/13868306281</guid><pubDate>Wed, 07 Dec 2011 11:19:00 +0100</pubDate><category>NFC</category><category>Android</category><category>GTUG</category><dc:creator>ishanf</dc:creator></item><item><title>Liferay: Disable the IE Compatibility View </title><description>&lt;p&gt;If Internet Explorer detects that a web page is not compatible, the address bar displays the Compatibility View button. When you turn on Compatibility View, the Web site open appears as if you were using an earlier version of Internet Explorer.&lt;br/&gt;However, this is an emulation of an earlier version of Explorer, which creates additional display problems when compared with other browsers like Firefox and Chrome.&lt;br/&gt;&lt;br/&gt;The solution to this problem is to disable the choice (sometimes automatic) browser by entering this meta tag&lt;/p&gt;
&lt;pre class="brush:html"&gt;&amp;lt;meta http-equiv="X-UA-Compatible" content="IE=edge"&amp;gt;
&lt;/pre&gt;
&lt;p&gt;&lt;br/&gt;In Liferay , this meta is to be included as soon as the first command after &amp;lt;head&amp;gt; portal_normal.vm within the file that is located in the Templates folder of the theme used.&lt;br/&gt;&lt;br/&gt;&lt;/p&gt;
&lt;pre class="brush:html"&gt;&amp;lt;head&amp;gt;
&amp;lt;meta http-equiv=”X-UA-Compatible” content=”IE=edge”&amp;gt;
 
&amp;lt;script type=”text/javascript” src=”http://code.jquery.com/jquery-1.4.2.min.js”&amp;gt;
&amp;lt;/ script&amp;gt;
&amp;lt;title&amp;gt; $ the_title - $ company_name &amp;lt;/ title&amp;gt;
$ theme.include ($ top_head_include)
&amp;lt;/ head&amp;gt;
&lt;/pre&gt;</description><link>http://blog.myti.it/post/7930229501</link><guid>http://blog.myti.it/post/7930229501</guid><pubDate>Fri, 22 Jul 2011 17:56:00 +0200</pubDate><dc:creator>andreamombelli</dc:creator></item><item><title>Split svn repository into multiple repositories</title><description>&lt;p&gt;Sometimes it appends that a project is divided in different sub project. Each one then, can earn ti&amp;#8217;s own prioriry and become a full project.&lt;/p&gt;
&lt;p&gt;If everything was stored into the same svn repository, how can you move away one directory of it without loosing all the commit history?&lt;/p&gt;
&lt;p&gt;Here&amp;#8217;s how&amp;#160;:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;1. create a dump from the repository&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;To create a dump file use the &lt;a href="http://svnbook.red-bean.com/en/1.1/re31.html"&gt;svnadmin dump&lt;/a&gt; command or your svn online service admin page.&lt;/p&gt;
&lt;pre class="brush: shell;"&gt;svnadmin dump [my repo url] | gzip &amp;gt; dump.gz&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;2. check the first directory level&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;use this script to check the first directory level contained in your dump file&lt;/p&gt;
&lt;pre class="brush: shell;"&gt;gzcat dump.gz | egrep -a "^Node-path" | cut -d '/' -f 1 | cut -d ':' -f2 | sort | uniq&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;3. split into multiple dumps&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Now it&amp;#8217;s time to split this. To achieve this we can use &lt;a href="http://svnbook.red-bean.com/en/1.5/svn.ref.svndumpfilter.html"&gt;svndumpfilter&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Exec this line for every directory you want to separate&lt;/p&gt;
&lt;pre class="brush: shell;"&gt;gzcat dump.gz | svndumpfilter include directory1 | gzip &amp;gt; dump_directory1.gz&lt;/pre&gt;
&lt;p&gt;You can even separate more than one directory per file&lt;/p&gt;
&lt;pre class="brush: shell;"&gt;gzcat dump.gz | svndumpfilter include directory1 directory2 | gzip &amp;gt; dump_directory12.gz&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;4. import every dump into different repositories&lt;/strong&gt;&lt;/p&gt;
&lt;pre class="brush: shell;"&gt;gzcat dump_directory1.gz | svnadmin load [my new repo url 1]
gzcat dump_directory2.gz | svnadmin load [my new repo url 2]&lt;/pre&gt;</description><link>http://blog.myti.it/post/6863237594</link><guid>http://blog.myti.it/post/6863237594</guid><pubDate>Fri, 24 Jun 2011 14:50:00 +0200</pubDate><dc:creator>mauropiccini</dc:creator></item><item><title>NFC operating modes</title><description>&lt;p&gt;In these days you should probably heard talking about NFC. Through &lt;a title="Google Wallet" target="_blank" href="http://www.google.com/wallet/"&gt;Google&amp;#8217;s new mobile payment method&lt;/a&gt; news, rumors which talk about &lt;a title="iPhone NFC functionality" target="_blank" href="http://mashable.com/2011/01/25/apple-nfc-iphone-ipad/"&gt;up coming iPhone&amp;#8217;s NFC functionality&lt;/a&gt; and so on.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;NFC (Near Field Communication)&lt;/strong&gt; is a short-range (&amp;lt; 5cm) wireless communication technology. Working in &lt;a title="Myti" target="_blank" href="http://www.myti.it"&gt;Myti&lt;/a&gt; I got some opportunities to implements several mobile applications which based on this technology. Here I&amp;#8217;d like to describe one of the many things I learned during the implementation of those applications. It&amp;#8217;s about operating (using) modes of NFC. According to specification it has &lt;strong&gt;three different operating modes&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;&lt;img src="http://media.tumblr.com/tumblr_lm0ime8vWb1qacmlm.png"/&gt;&lt;/p&gt;
&lt;p&gt;The first mode is &lt;strong&gt;Read/Write Mode&lt;/strong&gt;. This mode gives ability to read and write a passive RFID tag using NFC enabled divides. Common example of utility of this mode is smart poster which you can get more information/contents from those posters by swiping your mobile device over it .&lt;/p&gt;
&lt;p&gt;The second mode is communication between two NFC devices (&lt;strong&gt;P2P Mode&lt;/strong&gt;). Using this mode divides can exchange data between each other like virtual business cars or photos.&lt;/p&gt;
&lt;p&gt;The last mode is &lt;strong&gt;Card Emulation Mode&lt;/strong&gt;. These devices can emulate an existing contactless card which give a possibility to communicate with contactless reader for example to make a payment by swiping over a payment termina&lt;span&gt;l.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;But unfortunately these operating modes depend on device implementation. Not every device has all these modes. I got a possibility to work with three NFC enabled mobile phones and only two of them (&lt;a title="Nokia 6212 classic" target="_blank" href="http://www.forum.nokia.com/Devices/Device_specifications/6212_classic/"&gt;Nokia 6212 classic&lt;/a&gt; and &lt;a title="Nokia 6131 NFC" target="_blank" href="http://www.forum.nokia.com/Devices/Device_specifications/6131_NFC/"&gt;Nokia 6131 NFC&lt;/a&gt;) have all three modes. The other phone (&lt;a title="Samsung GT-5230N" target="_blank" href="http://innovator.samsungmobile.com/prd/sym/productDetl.view.do?modelCode=BGT-S5230N&amp;amp;platformId=3"&gt;Samsung GT-5230N&lt;/a&gt;) doesn&amp;#8217;t have P2P mode implemented.&lt;/p&gt;
&lt;p&gt;It&amp;#8217;s important to know about what are the operating modes and which devices support them before you start your NFC project.&lt;/p&gt;</description><link>http://blog.myti.it/post/6036601997</link><guid>http://blog.myti.it/post/6036601997</guid><pubDate>Tue, 31 May 2011 15:30:00 +0200</pubDate><category>nfc</category><category>mobile</category><dc:creator>ishanf</dc:creator></item><item><title>Creating a osx app bundle in Java registered to a protocol url</title><description>&lt;p&gt;Recently we extended our enterprise search engine &lt;a href="http://www.bleen.it/"&gt;&lt;span&gt;bleen&lt;/span&gt;&lt;/a&gt; adding a desktop utility automatically launched clicking on a result link.&lt;/p&gt;
&lt;p&gt;To achieve this we created a native applciation ( for windows and osx ) registered to the protocol url bleen://&lt;/p&gt;
&lt;p&gt;In this tutorial we will see how to build this utility in Java for Mac OS X.&lt;/p&gt;
&lt;p&gt;The base code is a simple java class displaying a Dialog&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Application bundle&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Creating a OSX application bundle is as easy as creating a directory structure following some simple rules.&lt;/p&gt;
&lt;p&gt;Out directory tree will contain&amp;#160;:&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;a jar with out classes&lt;/li&gt;
&lt;li&gt;the dependency jars&lt;/li&gt;
&lt;li&gt;the info.plist file&lt;/li&gt;
&lt;li&gt;a native executable  &lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;The following is a ant tast that creates the dir tree.&lt;/p&gt;
&lt;pre class="brush: xml;"&gt;	
&amp;lt;target name="application-bundle" depends="jar" description="create mac Os X Application bundle"&amp;gt;	
	&amp;lt;mkdir dir="${dist.appbundle}/Contents/MacOS" /&amp;gt;
	&amp;lt;mkdir dir="${dist.appbundle}/Contents/Resources/Java" /&amp;gt;
	&amp;lt;copy file="${auxes.dir}/JavaApplicationStub" todir="${dist.appbundle}/Contents/MacOS" /&amp;gt;
	&amp;lt;exec executable="chmod"&amp;gt;
		&amp;lt;arg value="755" /&amp;gt;
		&amp;lt;arg value="${dist.appbundle}/Contents/MacOS/JavaApplicationStub" /&amp;gt;
	&amp;lt;/exec&amp;gt;
	&amp;lt;copy file="${auxes.dir}/Info.plist" todir="${dist.appbundle}/Contents" /&amp;gt;
	&amp;lt;copy file="${auxes.dir}/icon.icns" todir="${dist.appbundle}/Contents/Resources" /&amp;gt;
	&amp;lt;copy file="${dist.dir}/application.jar" todir="${dist.appbundle}/Contents/Resources/Java" /&amp;gt;
	&amp;lt;copy file="lib/libreria1.jar" todir="${dist.appbundle}/Contents/Resources/Java"/&amp;gt;
&amp;lt;/target&amp;gt;	&lt;br/&gt;&lt;/pre&gt;
&lt;p&gt;The result is a directory tree viewed ad a application document by OSX.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;URL protocol&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The application runtime information are stored in info.plist file.&lt;/p&gt;
&lt;p&gt;We edited this file inserting a couple of new keys. These keys link out app to the protocol demo://&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;URL Types&lt;/li&gt;
&lt;li&gt;URL Identifier&lt;/li&gt;
&lt;li&gt;URL Schemes&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;Now, the system will launch our utility every time the user clicks on a link starting with demo://&lt;/p&gt;
&lt;p&gt;&lt;img src="http://media.tumblr.com/tumblr_lkm8kxGvDh1qb0on9.png"/&gt;&lt;/p&gt;
&lt;p&gt;To allow osx to know out utility exist we must&amp;#160;:&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;copy the app to /Application directory&lt;/li&gt;
&lt;li&gt;or manually launch it at least once &lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;&lt;strong&gt;OpenURL&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Now we reached our target but we don’t use the clicked url in our code, yet. &lt;/p&gt;
&lt;p&gt;To use it, we must relay on a system event osx raises to ask applications to manage urls. We use an extension library provided by Apple, registering a handler to the OpenURI event. &lt;/p&gt;
&lt;pre class="brush: java;"&gt;public static void main(final String[] args) {
	Application.getApplication().setOpenURIHandler(
		new OpenURIHandler() {
			@Override 
			public void openURI(final OpenURIEvent pEvent) {
				JOptionPane.showMessageDialog (
					null, 
					pEvent.getURI().toString(), 
					“demo”,
					JOptionPane.ERROR_MESSAGE);
		}
	});
}
&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Dependencies&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Note that our dependencies jar must be located in &lt;strong&gt;Contents/Resources/Java&lt;/strong&gt; and every jar must be declared in Info.plist under the keys &lt;strong&gt;Java/Classpath&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Download&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;You can find a demo project download on our public space in Assembla - &lt;a href="https://www.assembla.com/code/myti_oss/git/nodes"&gt;link&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;References&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;a href="http://www.xmldatabases.org/WK/blog/1154%5FHandling%5FURL%5Fschemes%5Fin%5FCocoa.item"&gt;Handling URL shemes in Cocoa&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;a href="http://www.informagen.com/JarBundler/StubFile.html"&gt;JavaApplicationStub&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;a href="http://developer.apple.com/library/mac/#samplecode/AppleJavaExtensions/Introduction/Intro.html"&gt;AppleJavaExtensions&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;a href="http://java.net/projects/mrjadapter"&gt;MRJAdapter&lt;/a&gt;&lt;/span&gt; - java library to enhance osx integration&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;a href="http://developer.apple.com/library/mac/#documentation/Java/Reference/Java_InfoplistRef/Articles/JavaDictionaryInfo.plistKeys.html"&gt;Apple doc&lt;/a&gt;&lt;/span&gt; - References to the java info.plist keys&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;a href="http://developer.apple.com/library/mac/#documentation/Java/Conceptual/Java14Development/03-JavaDeployment/JavaDeployment.html"&gt;Apple doc&lt;/a&gt;&lt;/span&gt; - References to application bundles creations&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;a href="http://developer.apple.com/library/mac/documentation/Java/Reference/1.5.0/appledoc/api/index.html"&gt;Apple javadoc&lt;/a&gt;&lt;/span&gt; - Javadoc for Apple Java extensions&lt;/p&gt;</description><link>http://blog.myti.it/post/5158151441</link><guid>http://blog.myti.it/post/5158151441</guid><pubDate>Tue, 03 May 2011 12:42:00 +0200</pubDate><category>osx</category><category>java</category><category>application bundle</category><category>info.plist</category><category>protocol</category><category>url</category><dc:creator>mauropiccini</dc:creator></item><item><title>Benvenuto Tomson</title><description>&lt;p&gt;Da oggi abbiamo un nuovo collega. &lt;a title="Tomson" target="_self" href="http://www.myti.it/who.php#tomson"&gt;Tomson&lt;/a&gt; è uno sviluppatore java, viene dal Camerun e la seconda laurea (!) l&amp;#8217;ha presa alla facoltà di Ingegneria di Brescia. Tomson mangerà pane-grails-e-liferay per le prossime settimane.&lt;br/&gt;Buon lavoro!&lt;/p&gt;</description><link>http://blog.myti.it/post/4255981580</link><guid>http://blog.myti.it/post/4255981580</guid><pubDate>Fri, 01 Apr 2011 12:51:44 +0200</pubDate><dc:creator>emacrq</dc:creator></item><item><title>Cloud computing e Enterprise Search</title><description>&lt;p&gt;In questo periodo di forte fermento della IT, tutta eccitata dall&amp;#8217;avvento del &lt;em&gt;Cloud&lt;/em&gt;, quali sono le prospettive a medio periodo di una applicazione di &lt;em&gt;Enterprise Search&lt;/em&gt;, per sua natura funzionante in rete locale (&lt;em&gt;in-premise&lt;/em&gt;)?&lt;br/&gt;&lt;br/&gt;Credo che l&amp;#8217;Enterprise Search sarà uno dei pochi ambiti di applicazioni Enterprise che otterrà vantaggi dal &lt;em&gt;Cloud&lt;/em&gt;.&lt;br/&gt;&lt;br/&gt;Innanzitutto dal punto di vista tecnico può permettere di ricercare tra informazioni in rete come anche residenti nella nuvola.&lt;br/&gt;&lt;br/&gt;Qualunque altra applicazione standard, non di nicchia, venduta nel mercato delle applicazioni in-premise si troverà davanti ad una esplosione di fornitori on-demand, del tutto comparabili dal punto di vista delle funzioni, con il vantaggio di approcci commerciali innovativi ed aggressivi.&lt;br/&gt;&lt;br/&gt;Un gestionale commerciale qualsiasi (fatture, ordini bolle tc) avrà come concorrenti applicazioni di vari fornitori di tutto il mondo che si offrono cloud con prezzi a utente più bassi e nessun costo di infrastruttura.&lt;br/&gt;&lt;br/&gt;Questo però non porterà alla completa distruzione del mercato delle applicazioni in-premise. Si avrà una &amp;#8220;dispersione&amp;#8221; nella nuvola di tutti i servizi standard e che non creano valore aggiunto.&lt;br/&gt;Gli altri resteranno:&lt;/p&gt;
&lt;ul&gt;&lt;li&gt; il gestionale di produzione&lt;/li&gt;
&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;il file system (anche a causa della banda disponibile in italia) per tenere  i documenti e tutto il materiale vicino al &amp;#8220;ciclo caratteristico&amp;#8221; dell&amp;#8217;azienda&lt;/li&gt;
&lt;/ul&gt;&lt;ul&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;I database di dati sensibili e privati&lt;/li&gt;
&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;Tutte le applicazioni specifiche, di processo, di nicchia, quelle insomma che rendono una azienda diversa dalle altre&lt;/li&gt;
&lt;/ul&gt;&lt;ul&gt;&lt;/ul&gt;&lt;p&gt;&lt;br/&gt;In questo contesto un sistema di Enterprise Search Engine può fare da enabler di applicazioni Cloud. E ne prende tutti i vantaggi.&lt;br/&gt;&lt;br/&gt;&lt;a href="http://www.bleen.it"&gt;Bleen&lt;/a&gt;, ad esempio, si propone come sistema unico per accedere a tutte le informazioni aziendali. Per &amp;#8220;accedere&amp;#8221; intendo trovare ed usare.&lt;br/&gt;&amp;#8220;Usare &amp;#8221; significa agire sull&amp;#8217;oggetto trovato in modo rispettoso della sorgente dati o in modo innovativo.&lt;br/&gt;&lt;br/&gt;Un cliente mi ha chiesto: &amp;#8220;Ho un problema che vorrei mi risolvesse Bleen. Mi capita spesso di dovere richiamare backup di file dai miei DAT perché gli utenti li cancellano o li alterano in modo errato. Perché non fate gestire le versioni a Bleen?&amp;#8221;&lt;br/&gt;Io ho risposto: &amp;#8220;Comprati Egnyte (applicazione cloud based che tra le varie cose ti fa il backup dei file nella rete gestendo le versioni. &lt;a href="http://www.egnyte.com"&gt;www.egnyte.com&lt;/a&gt;), ha costi bassi a utente e a tera&amp;#8221; &lt;br/&gt;E lui: &amp;#8220;Ma vorrei che l&amp;#8217;utente fosse autonomo nell&amp;#8217;estrarre le versioni&amp;#8221;&lt;br/&gt;E io: &amp;#8220;Ti faccio il connettore per Egnyte così l&amp;#8217;utente cerca in Bleen, trova il file e le versioni e da lì fa il download.  Una unica interfaccia per tutti i sistemi. Una sola metafora da spiegare all&amp;#8217;utente per agire sui dati dell&amp;#8217;azienda&amp;#8221;&lt;/p&gt;</description><link>http://blog.myti.it/post/3466326641</link><guid>http://blog.myti.it/post/3466326641</guid><pubDate>Wed, 23 Feb 2011 18:46:00 +0100</pubDate><category>enterprise search</category><category>bleen</category><category>cloud</category><dc:creator>gbounch</dc:creator></item><item><title>Ascii art in groovy</title><description>&lt;p&gt;Giocando con groovy, ho scritto un semplice programma per trasformare un&amp;#8217;immagine in &amp;#8220;&lt;a title="ascii art" href="http://it.wikipedia.org/wiki/ASCII_art"&gt;ascii art&lt;/a&gt;&amp;#8221;.&lt;/p&gt;
&lt;p&gt;
&lt;script src="https://gist.github.com/838892.js?file=AsciiArt.groovy"&gt;&lt;/script&gt;&lt;/p&gt;
&lt;p&gt;(su &lt;a title="gist" href="https://gist.github.com/838892"&gt;gist&lt;/a&gt; trovate il codice completo)&lt;/p&gt;
&lt;p&gt;Il programma è molto semplice: un ciclo recupera, per ogni pixel dell&amp;#8217;immagine un intero (tramite il metodo image.getRGB) che rappresenta il valore RGB del pixel stesso.&lt;/p&gt;
&lt;p&gt;Il metodo image.getRGB ritorna un unsigned integer nella forma AARRGGBB, quindi le istruzioni:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;r = 0xff &amp;amp; (argb &amp;#187;16)&lt;/p&gt;
&lt;p&gt;g = 0xff &amp;amp; (argb&amp;#160;&amp;#187; 8)&lt;/p&gt;
&lt;p&gt;b = 0xff &amp;amp; argb&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;servono naturalmente per recuperare i valori delle componenti R (rosso), G (verde) e B (blue).&lt;/p&gt;
&lt;p&gt;Il valore massimo tra r, g, b è poi utilizzato per la scelta del carattere che rappresenta il pixel.&lt;/p&gt;
&lt;p&gt;Naturalmente si possono pensare algoritmi più evoluti per la scelta del carattere, nonchè espandere il set di caratteri utilizzabili.&lt;/p&gt;
&lt;p&gt;A titolo di esempio, questo è un fantastico ritratto del Venni trasformato in ascii art:&lt;/p&gt;
&lt;p&gt;&lt;img src="http://media.tumblr.com/tumblr_lh133l7q4c1qz6yu2.jpg"/&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src="http://media.tumblr.com/tumblr_lh1517PgxV1qz6yu2.png"/&gt;&lt;/p&gt;
&lt;p&gt;Cambiando le impostazioni del terminale si può anche ottenere il negativo :)&lt;/p&gt;

&lt;p&gt;&lt;img src="http://media.tumblr.com/tumblr_lh134iamOc1qz6yu2.png"/&gt;&lt;/p&gt;</description><link>http://blog.myti.it/post/3446541451</link><guid>http://blog.myti.it/post/3446541451</guid><pubDate>Tue, 22 Feb 2011 18:17:00 +0100</pubDate><dc:creator>enricod</dc:creator></item><item><title>Leggere e denormalizzare una tabella con un campo XPath in Kettle</title><description>&lt;p&gt;&lt;span&gt;
&lt;p class="MsoNormal"&gt;Lo step &amp;#8220;Get Data From XML&amp;#8221; di Kettle è decisamente versatile: ci permette, infatti, non solo di leggere e trasformare un file XML, ma ci consente anche di effettuare le medesime operazioni sfruttando un campo di una tabella, che usiamo come input. Come fare?&lt;/p&gt;
&lt;p class="MsoNormal"&gt;Innanzitutto, dovremo necessariamente alimentare il &amp;#8220;Get Data From XML&amp;#8221; con un &amp;#8220;Table Input&amp;#8221;:&lt;/p&gt;
&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;img src="http://media.tumblr.com/tumblr_lggoptCebu1qb43h1.png"/&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;Questa volta, la configurazione dello step sarà un po&amp;#8217; più complessa rispetto alla normale amministrazione, in cui viene alimentato da un file: in particolare, con questo disegno, non sarà infatti possibile che il sistema intuisca la struttura XPath che stiamo leggendo.&lt;/p&gt;
&lt;p class="MsoNormal"&gt;Per cui, dovremo prima specificare il campo di origine XML:&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;img src="http://media.tumblr.com/tumblr_lggoroHMvV1qb43h1.png"/&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;In seguito, andremo a definire il loop dell&amp;#8217;XPath:&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;img src="http://media.tumblr.com/tumblr_lggotexRKy1qb43h1.png"/&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;E, infine, i campi che andremo a generare tramite la denormalizzazione.&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;img src="http://media.tumblr.com/tumblr_lggovbvOuo1qb43h1.png"/&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;Anche in questo caso, non potremo sfruttare l&amp;#8217;intelligenza del sistema nella definizione di questi ultimi (tramite la funzione &amp;#8220;Preleva Campi&amp;#8221;), ma dovremo specificarli manualmente.&lt;/p&gt;
&lt;p class="MsoNormal"&gt;Notate che, allo stesso modo, non avremo la possibilità di usufruire della funzione di anteprima contestualmente allo step, e non potremo fare altro che, prima, confermare le modifiche allo step, e, in un secondo momento, lanciare l&amp;#8217;anteprima della trasformazione.&lt;/p&gt;
&lt;p class="MsoNormal"&gt;Un&amp;#8217;ultima nota: personalmente, su Postgres, definire il datatype nel medesimo step (&amp;#8220;Get Data From XML&amp;#8221;) mi ha creato problemi, per cui, in un primo tempo, ho definito tutti i campi come String. In seguito, aggiungendo al flusso lo step &amp;#8220;Select Values&amp;#8221;, ho potuto alterare i datatype.&lt;/p&gt;</description><link>http://blog.myti.it/post/3235215328</link><guid>http://blog.myti.it/post/3235215328</guid><pubDate>Fri, 11 Feb 2011 17:39:00 +0100</pubDate><dc:creator>venni82</dc:creator></item><item><title>Grails portlets : eager fetching in service class</title><description>&lt;p&gt;Developing portlets with Grails is great but there are still some issue to solve. Today I would talk about two problems related to GORM and Hibernate.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;First&lt;/strong&gt;: some GORM stuff works, while some others don&amp;#8217;t and cause exceptions about the Hibernate session not being found.&lt;/p&gt;
&lt;p&gt;For example, if we have a domain class like this:&lt;/p&gt;
&lt;pre class="brush: java;"&gt;class Car {
   Manufacturer manufacturer
   Engine engine
   Tyre tyres
   Integer seats
}
&lt;/pre&gt;
&lt;p&gt;calling &lt;/p&gt;
&lt;pre class="brush: java;"&gt;Car.get(id)&lt;/pre&gt;
&lt;p&gt;will works, but&lt;/p&gt;
&lt;pre class="brush: java;"&gt;Car.findByManufacturer()&lt;/pre&gt;
&lt;p&gt;won&amp;#8217;t.&lt;/p&gt;
&lt;p&gt;There are also different behaviours by calling this methods in the render phase or in the action phase.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Second&lt;/strong&gt;: lazy load doesn&amp;#8217;t work in .gsp views and portlet classes.&lt;/p&gt;
&lt;p&gt;So writing&lt;/p&gt;
&lt;pre class="brush: java;"&gt;&amp;lt;label&amp;gt; ${car.manufacturer.name} &amp;lt;/label&amp;gt;&lt;/pre&gt;
&lt;p&gt;cause an exception &lt;/p&gt;
&lt;pre class="brush: java;"&gt;org.codehaus.groovy.runtime.InvokerInvocationException: org.hibernate.HibernateException: No Hibernate Session bound to thread, and configuration does not allow creation of non-transactional one here&lt;/pre&gt;
&lt;p&gt;and, of course, the portal isn&amp;#8217;t able to render the page.&lt;/p&gt;
&lt;p&gt;In summary, it turns out the problem is that the OpenSessionInViewFilter doesn&amp;#8217;t work properly in a portlet environment.&lt;/p&gt;
&lt;p&gt;I faced this problem a few days ago and I found this &lt;strong&gt;solution&lt;/strong&gt;:&lt;/p&gt;
&lt;p&gt;first of all, I suggest to put the code that use GORM in a service class and call the service method from the portlet class. That&amp;#8217;s because service classes can get the hibernate session with no problems and use all of the cool dynamic methods for domain classes.&lt;/p&gt;
&lt;p&gt;Then, that service method must use domain class dynamic methods with the fetch argument set to &amp;#8220;eager&amp;#8221;, so the model will be fully loaded.&lt;/p&gt;
&lt;p&gt;Your renderView closure in the portlet class will look like this:&lt;/p&gt;
&lt;pre class="brush: java;"&gt;def renderView = {
   def cars = carService.loadAllCars()
   ['cars' : cars]
  }
&lt;/pre&gt;
&lt;p&gt;and here is the service method:&lt;/p&gt;
&lt;pre class="brush: java;"&gt;def loadAllCars() {
   Car.findAll([fetch:[manufacturer:"eager", engine:"eager", tyres:"eager"]])
  }
&lt;/pre&gt;
&lt;p&gt;Of course setting the fetch mode to eager leads into using fewer queries than the lazy mode, because the Car model and its associations will be loaded all at once. However, if you have many associations loaded with eager fetching you will have a lots of objects loaded into memory, so be careful and pay attention while designing your service methods.&lt;/p&gt;</description><link>http://blog.myti.it/post/452438745</link><guid>http://blog.myti.it/post/452438745</guid><pubDate>Tue, 16 Mar 2010 17:12:50 +0100</pubDate><category>grails</category><category>portlet</category><category>liferay</category><dc:creator>electricste</dc:creator></item><item><title>Clojure first steps</title><description>&lt;p&gt;This post is the first (I hope) of a series about my adventure in &lt;a title="clojure web site" href="http://www.clojure.org"&gt;Clojure&lt;/a&gt; land.&lt;/p&gt;
&lt;p&gt;Being Clojure hosted on the JVM, it&amp;#8217;s a natural choice for a Java developer wanting to study and learn functional languages.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;A simple exercise&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;I started with a simple exercise: a&lt;i&gt;dd all the natural numbers between 1 and 100 which are multiple of 5 or 7&lt;/i&gt;&lt;/p&gt;
&lt;pre&gt;; Add all the natural numbers below 100 that are multiples of 5 or 7.
(def r (range 1 100))
&lt;/pre&gt;
&lt;p&gt;The lines starting with&amp;#160;; are comments.&lt;/p&gt;
&lt;p&gt;The second line creates a range of numbers, starting from 1 to 100, and assigns the sequence to the symbol r.&lt;/p&gt;
&lt;p&gt;I then defined a function which, given a number, returns true if the number is divisible by 5 or 7.&lt;/p&gt;
&lt;pre class="sh_clojure"&gt;(defn divisibile [x]
  (if (== 0 (mod x 5)) true
    (if (== 0 (mod x 7)) true false)))
&lt;/pre&gt;
&lt;p&gt;The following statement filters the range returning a list of the values which are divisible by 5 or 7.&lt;/p&gt;
&lt;pre&gt;(def validValues (filter #(divisibile %) r))
&lt;/pre&gt;
&lt;p&gt;Then I sum the validValues, using the reduce function; int the following statement it applies the + operator to the elements of the sequence: if the sequence is (a b c), the expression  returns (a+b)+c&lt;/p&gt;
&lt;pre&gt;(def tot (reduce + validValues))
; print the result
(println tot)
&lt;/pre&gt;
&lt;p&gt;I&amp;#8217;m an absolute beginner in clojure and functional programming, so I would be happy to receive comments or suggestions. Thanks!&lt;/p&gt;

&lt;p&gt;Enrico&lt;/p&gt;</description><link>http://blog.myti.it/post/443469891</link><guid>http://blog.myti.it/post/443469891</guid><pubDate>Fri, 12 Mar 2010 16:38:51 +0100</pubDate><category>development</category><category>clojure</category><dc:creator>enricod</dc:creator></item><item><title>Custom property editor for Grails</title><description>&lt;p&gt;&lt;strong&gt;Problem:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Create a custom property editor between Model and View to show it as we need. (example: we wanted to change how shows the java Date.class in a view, from default format &lt;em&gt;‘yyyy-MM-dd HH:mm:ss.S’&lt;/em&gt; to &lt;em&gt;‘dd-MM-yyyy’&lt;/em&gt;).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Solution:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;There are 2 solutions which I can see now. The first one is, when every time we show a Date object, format it using a java DateFormat implement and show it. But the pretty solution is the second one, create a custom property editor to show it. So you don’t have to modify every date field that views show. To do that you have to create your property editor by implementing &lt;a title="PropertyEditor API" target="_blank" href="http://java.sun.com/javase/6/docs/api/java/beans/PropertyEditor.html"&gt;PropertyEditor&lt;/a&gt; and property editor registrar by implementing &lt;a title="PropertyEditorRegistrar API" target="_blank" href="http://static.springsource.org/spring/docs/2.5.6/api/org/springframework/beans/PropertyEditorRegistrar.html"&gt;PropertyEditorRegistrar&lt;/a&gt; to register your property editor. &lt;br/&gt;For example we created our &lt;em&gt;‘CustomPropertyEditorRegistrar’&lt;/em&gt; as property editor register and we used spring’s &lt;a title="CustomDateEditor API" target="_blank" href="http://static.springsource.org/spring/docs/2.5.x/api/org/springframework/beans/propertyeditors/CustomDateEditor.html"&gt;CustomDateEditor&lt;/a&gt; as a property editor:&lt;/p&gt;
&lt;pre class="brush: java;"&gt;import java.util.Date
import java.text.SimpleDateFormat
import org.springframework.beans.propertyeditors.CustomDateEditor
import org.springframework.beans.PropertyEditorRegistrar
import org.springframework.beans.PropertyEditorRegistry

public class CustomPropertyEditorRegistrar implements PropertyEditorRegistrar {
public void registerCustomEditors(PropertyEditorRegistry registry) {
registry.registerCustomEditor(Date.class, new CustomDateEditor(new SimpleDateFormat("dd-MM-yyyy"), true));

 }
}




&lt;/pre&gt;
&lt;p&gt;And finally you must add your custom property editor registrar to grails resources (&lt;em&gt;‘grails-app/config/spring/resources.groovy’&lt;/em&gt;):&lt;/p&gt;
&lt;pre class="brush: java;"&gt;beans = {
 customPropertyEditorRegistrar(CustomPropertyEditorRegistrar)
}
&lt;/pre&gt;
&lt;p&gt;That’s all!&lt;/p&gt;</description><link>http://blog.myti.it/post/441330811</link><guid>http://blog.myti.it/post/441330811</guid><pubDate>Thu, 11 Mar 2010 16:33:00 +0100</pubDate><category>Grails</category><category>Groovy</category><category>Development</category><dc:creator>ishanf</dc:creator></item><item><title>Groovy tip for simpler test case</title><description>&lt;p&gt;When writing a groovy test case you almost want to be concise and expressive&amp;#8230; next time you&amp;#8217;ll see the test you must undestand it quickly.&lt;/p&gt;
&lt;p&gt;Here&amp;#8217;s a small tip to enhance test writing.&lt;/p&gt;
&lt;p&gt;Having &amp;#160;:&lt;/p&gt;
&lt;pre class="brush: groovy;"&gt;def car = new Car()
def jack = new People()
def tom = new Cat();
&lt;/pre&gt;
&lt;p&gt;Instead of writing somethings like&amp;#160;:&lt;/p&gt;
&lt;pre class="brush: groovy;"&gt;car.addPeople ( people )
car.addCat ( tom )
&lt;/pre&gt;
&lt;p&gt;it&amp;#8217;s really simpler to write:&lt;/p&gt;
&lt;pre class="brush: groovy;"&gt;car += jack
car += tom
&lt;/pre&gt;
&lt;p&gt;To achieve this it&amp;#8217;s as easy as writing a plus method in you model object.&lt;/p&gt;
&lt;pre class="brush: java;"&gt;public Object plus(Object o) {
  if(o instanceof People) {
     this.addPeople((People)o);
  }
  if(o instanceof Cat) {
     this.addCat((Cat)o);
  }
  return this;
}
&lt;/pre&gt;
&lt;p&gt;Just remember this method must return this.&lt;/p&gt;</description><link>http://blog.myti.it/post/441329123</link><guid>http://blog.myti.it/post/441329123</guid><pubDate>Thu, 11 Mar 2010 16:32:00 +0100</pubDate><category>groovy</category><category>test</category><dc:creator>mauropiccini</dc:creator></item></channel></rss>

