I have just updated my Ubuntu box to the latest release ( 13.04 ) and I found out that not only it had broken all my previous plugins installations, but also that I could not install practically anything : the software sites list was empty !

In order to fix this issue you can either run eclipse as administrator and install every single plugin/extension you need using this method, or keep on reading :)

The solution is actually simple ( once you figured it out ) : add the sites manually !

Go to Window->Preferences, open the tree menu entry Install/Update and click on Available Software. If this panel does not contain at least the following sites you need to add them :

Also, you are likely to not have the very friendly "Eclipse Marketplace ..." entry under "Help" menu; if this is the case, you only need to install it :

Open Help->Install New Software ...

Select --All Available Sites--

In the filter text box type marketplace

Select Marketplace Client and install it

That shall be it !

]]>Marco Ferrettihttp://www.fermasoft.com/Blog/The-First-Level-of-Super-Mario-Bros-is-Easy-with-Lexicographic-Orderings-and-Time-Travel-after-that-it-gets-a-little-tricky?when=2013-04-15T09:03:38Z
Blog / The First Level of Super Mario Bros. is Easy with Lexicographic Orderings and Time Travel... after that it gets a little tricky2013-04-15T08:55:00ZMon, 15 Apr 2013 08:55:00 GMTIn the 28 years since Super Mario Bros. was released, and it's obviously been comprehensively beaten, thoroughly, many thousands of times in that time by players around the world. But have you ever made the game beat itself?

That's what computer scientist Tom Murphy has done. At SigBovik 2013, he presented a program that "solves" how to play Super Mario Bros., or any other NES game, like it's just another kind of mathematical problem. And for those who know that SigBovik is an annual computer science conference dedicated to spoof research, hosted on April 1 every year, Murphy stresses that this is "100 percent real."

]]>Marco Ferrettihttp://www.fermasoft.com/Blog/Fixing-Liferay-606-Diff-Plugin?when=2012-10-15T14:19:56Z
Blog / Fixing Liferay 6.0.6 Diff Plugin2012-10-15T13:52:00ZMon, 15 Oct 2012 13:52:00 GMTSince Liferay 5 there is a very neat diff plugin that works out of the box in the document library. The plugin permits to compare text files but, provided you have activated the Open Office Integration you can compare other kind of files like .doc, .docx and odt.
Unfortunately there's a bug in Liferay 6.0.6 that prevents this from working.

The bug

The bug consists in a "wrong" call in the document library portlet's compare document action : the name in the request is actually the document's id and trying to get the extension of the document results in an empty string .

The solution

The solution is quite simple ... provided you can recompile portal-impl.jar :

in com.liferay.portlet.documentlibrary.action.CompareVersionsAction change

Alternatively, and if you trust me, you can download a patched Attach:portal-impl.jar from this site.
The md5sum
f223ae66e1bfb93fb0658e215507e6f5 portal-impl.jar

Hope it helps !

]]>http://www.fermasoft.com/Blog/ECryptFs-has-a-home?when=2012-05-10T08:06:42Z
Blog / ECryptFs has a home2012-05-10T07:58:00ZThu, 10 May 2012 07:58:00 GMTFor the first time in the 7 year history of the project, eCryptfs has it's very own, dedicated home on the web at eCryptfs.org.

A special thanks goes out to the original authors and developers of eCryptfs in the IBM Linux Technology Center Security Team, the Canonical Kernel and Security Team, Red Hat and beyond, as well as all of the contributors to eCryptfs over the last 7 years. Gazzang commissioned the artwork and web design, and is sponsoring the web hosting of eCryptfs.org as a bit of a "thank you" to the eCryptfs community growing far and wide.

]]>http://www.fermasoft.com/Blog/Liferay-6-something-they-don-t-tell-you?when=2012-04-26T19:39:02Z
Blog / Liferay 6 : something they don't tell you2012-04-26T19:21:00ZThu, 26 Apr 2012 19:21:00 GMTToday I just realized that Liferay 6 ships with a new filter and a new servlet ... the problem is that they both map to /documents/* ! The problem is that,if you have little fantasy like I do, you will add your document library portlet ( or document library display portlet ) in a page that maps to /documents !
If that worked up to the previous version (5.2.3) you will find that the new version breaks your installation ( if you have a layout like I did ).

If we analyze what happens in the servlet container, the filter is fired and then the servlet is fired ( I didn't actually debug/test this but that's what I expected to happen ) then everything should have been sent to the document library portlet and the file should have been served... should

That was not the case and, up to this morning, I had no idea that the problem was the page name.
To make a long story short, I tested, instead of using the friendly url 'documents', using the canonical liferay path : http://myhost/web/mycommunity/documents/-/document_library/view/21794 and magically the file was served !
What happened ? As far as I can tell : neither the filter nor the servlet was fired.
This, to me, looks like a bug : I asked the liferay forum for a confirmation bofore opening a big report but haven't received any reply up to now.

If you are willing to test/replicate the issue, please update the liferay forum report so that the staff @liferay can actually be aware of the issue an maybe come up with a better solutio/update of the documentation !

]]>Marco Ferrettihttp://www.fermasoft.com/Blog/Install-ZFS-on-Debian-GNULinux?when=2012-04-18T08:33:25Z
Blog / Install ZFS on Debian GNU/Linux2012-04-18T07:52:00ZWed, 18 Apr 2012 07:52:00 GMTThis is a post on installing ZFS as a kernel module, not FUSE, on Debian GNU/Linux. Everything you are reading here already exist for getting this going, I just want to spread the word ... in case you are unaware that it exists.

The Lawrence Livermore National Laboratory has been working on porting the native Solaris ZFS source to the Linux kernel as a kernel module. I believe that as long as the project remains under contract with the DoD there will be continuous updates. You can check what's going on at http://zfsonlinux.org.

Start playing with it

Now, make your zpool:

$ sudo zpool create test raidz sdd sde sdf sdg sdh sdi

It is stable enough to run a ZFS root filesystem on a GNU/Linux installation for your workstation as something to play around with. It is copy-on-write, supports compression, deduplication, file atomicity, off-disk caching, encryption, and much more.

References :

]]>Marco FerrettiMarco Ferrettihttp://www.fermasoft.com/Blog/Postgresql-load-csv-data?when=2012-04-04T09:54:16Z
Blog / Postgresql : load csv data2012-04-04T09:22:00ZWed, 04 Apr 2012 09:22:00 GMTOne of the most common action that one has to do with a database is to load data into it. Usually the data comes either in a dump/sql file or in csv format. Today I am going to brag about loading the latter format into a PostgreSQL database.
The first thing to keep in mind is that PostgreSQL is able to do it without magic .
The second thing to put attention on is which is the user who is connecting to the database to load the data.

The easy pattern : you have superuser privileges

In this scenario, the user is superuser ( postgres ) or is inheriting from the superuser role. If that's the case then all you need to do is open a psql shell and issue the command

copy <table> from <file> with delimiter '<delimiter>' ;

where

<table> is the name of the table that you want to populate with the data

<file> is the path to the file that contains your csv data

<delimiter> is the delimiter used in your csv file to separate the fields ( usually ',' or ';' )

The way you open a connection depends on what you are using : if you are using a gui ( such as pgAdmin ) you simply double click on the database that contains the table that you want to populate and then hit the SQL button in the toolbar. If you are using a console then you have to use pql command :

psql -h <servername> -U <username> <databasename>

where

<servername> is the name or ip address of the PostgreSQL server you are connecting to

<username> is the username that you are using to connect

<databasename> is the name of the database that contains the table you want to work on

The not so obvious pattern : you are a regular user

In this scenario you are connecting to the database via a user that has ( at least ) connect and insert privileges on the table that you want to populate. In this situation you cannot "simply" use the copy command telling postgres to get the data from a file because you need superuser privileges in order to import from a file . The work around here is to use stdin since everybody can use it ! This is going to limit the options a little but still ...
Open a terminal and issue the commad :

Variation of the problem

Then you need to modify the copy command in order to specify the column names that you want to manipulate :

copy <table>(field1,field2, ..., fieldn) from ...

The file contains headers : I don't want to import that too !

Then you need to tell the copy command that the filed contains headers ! As simple as that :

copy <table> from [stdin|<filename>] with CSV HEADER;

The file contains special characters :

You will have to identify the charset of the file and tell psql which charset to use when issuing the copy command;e.g. you are importing a file that has accents or umlauts (i assume you are already connected via psql) :

]]>Marco Ferrettihttp://www.fermasoft.com/Blog/LibreOffice-Calc-collaborative-editing-prototype?when=2012-04-03T11:39:25Z
Blog / LibreOffice Calc collaborative editing prototype2012-04-02T19:51:00ZMon, 02 Apr 2012 19:51:00 GMTThe other day I came across this this post : it's a proof of concept of a real time collaborative spreadsheet that uses just open source technology. The idea is to make two spreadsheets talk to each other via telepathy protocol; this way two or more person can work on the same spreadsheet and share the ongoing modification by only being on each other telepathy list.

I think the instructions I found online to be, at best, confusing. The best bet you have is going with the docs that come along the package ... but there are some mistakes there too .

First things first .
I would suggest to download a separate tomcat instance for your tests then, when you're ready and satisfied with the configuration of your mondrian demo, deploy into your "production" tomcat/servlet container.

For my tests and for the sake of these mini how-to, I have used tomcat 6, Sun Jdk 6 and MySQL ( installed using apt-get ).The other thing you need is the MySQL jdbc : download it and put it somewhere on your machine - I have a ~/libs/java dir where I store all my java libraries .

Unzip and start tomcat and fire mysql; test that tomcat responds by looking at http://localhost:8080 ( change the port if you modified the server configuration ) then test that mysql is up and running by issuing mysqlshow -u root mysql .
Once you are sure you have everything installed, up and running you can download Mondrian from SourceForge.

Unzip your mondrian archive file somewhere. For my tests I used ~/devel/ETL. Wherever you unzipped your files you should have a tree that looks like this :

under the lib dir there's what you're looking for : mondrian.war.
Now, stop tomcat and unzip mondrian.war into <TOMCAT_HOME>/webapps . At this point you need to create the sample database for your mondrian installation. The Mondrian demo comes with a foodmart database ... in ACCESS ( OMG ! ) format. Thanks God they provided a plain SQL file that you can upload into your mysql ... not !
What they forgot to tell you is that :

you have to create the schema yourself

you have to create the user yourself

the instructions don't work

Let's proceed :

open your mysql console ( as root ) and issue the following :

create database foodmart;
grant all privileges on foodmart.* to foodmart@localhost identified by 'foodmart';

the first line creates a schema 'foodmart', the second line creates a user 'foodmart' with password 'foodmart' that can do anything on the 'foodmart' schema when connecting from localhost.

Now, exit the mysql root shell and test your new user :
mysql -u foodmart -p
type 'foodmart' (or whatever password you chose) when promped and see if you can connect. If everything went fine you can now exit the console.

Now it's time to fill the demo database : go to <TOMCAT_HOME>/webapps/mondrian/WEB-INF and issue the command :

into whatever suits your configuration. When you get the prompt again you're almost there : your database is created but you still need to configure your mondrian installation to use mysql ( by default it tries a jdbc/odbc bridge connection to the above mentioned Access database ) .

Now, go to <TOMCAT_HOME>/mondrian/WEB-INF/ and change web.xml so that every instance of

The Hebrew University of Jerusalem has released 80,000 ( yes, you read correctly ) Einstein's scanned documents and made them searchable in the Einstein Archive online website they launched.

Don't hold your breath : it's not a collection of unpublished scientific work rather, quoting the site, a collection of an Autograph, Calculation, Transcript or one of many other document types. In other words you can find postcards or letters that have nothing to do with the scientist's work together with proper scientific work ( sorry for the horrible english :) )