by neuromancer - Published: October 26th, 2009

ocr_1Just a quick post about tesseract, a quite good solution for OCR under GNU/Linux (specifically Ubuntu Karmic Koala).
First install it trough apt-get
sudo apt-get tesseract-ocr
Install also your preferred language (in my case eng -> tesseract-ocr-eng and ita -> tesseract-ocr-ita).

Ok, we are ready to do some text recognition…
But, under Karmic Koala, there is a problem with tif image as reported by myself here: https://bugs.launchpad.net/ubuntu/+source/tesseract/+bug/461177
The problem is due to a transparent alpha layer that some tif images have (investigation needed here…*), so before do text recognition is necessary to eliminate it, elsewhere tesseract will generate an empty file…
Just install imagemagick and from a shell do this steps:
convert inputimage.tif inputimage_tmp.pbm
convert inputimage_tmp.pbm inputimage_ok.tif

Original solution founded here.

Now we are finally ready to launch tesseract on our tif image.
Just do
tesseract inputimage_ok.tif outputfile
and tesseract will generate outputfile.txt with recognized text.

ps. The packaged version under karmic is 2.03 and not the last one, 2.04, that, as advised on this page, fixed it. So if you prefer, remove old version and install the new version from source.

* Solved. In Gimp is possible to remove the alpha layer. Just go to
Layer (Livello) -> Transparency (Trasparenza) -> Remove alpha layer (Rimuovi canale alpha)

Comments: No Comment - Category: gnu/linux, software, ubuntu
by ed0t - Published: October 10th, 2009

jQuery logo: write less, do more

In these months i have worked on an ecommerce project with a lot of products’ list. Since the customer had asked a carousel solution to show her products, we have chosen for jCarousel, an amazing plugin for jQuery.

jCarousel is great and highly configurable but it has a small lack: it does not remember the position of the carousel when a user came back to product list page after a quick view of a product detail.

I came out with a simple but practical solution that solves this problem using the support of cookies.

To do this we need few lines of Javascript. Read more…

Comments: 2 Comments - Category: howto, programming
by neuromancer - Published: October 9th, 2009

A few day ago I began to use Ubuntu Karmic Koala 9.10 beta on my laptop.
It’s look very fine and also work great but yesterday I’ve found a big problem for me and all developer that use Eclipse as preferred IDE.

The problem is that Eclipse Galileo doesn’t work right with the new version of gtk (gtk+ 2.18), and therefore all the Eclipse GUI is unusable.
In particular I’ve noted that click of mouse are not intercepted correctly and also some interface redraw (for example if I change perspective or move some bar) doesn’t work.

Now, this morning I’ve found the bug and also a workaround for the moment.
Just open a terminal, then give this command export GDK_NATIVE_WINDOWS=true and finally launch eclipse from the same terminal.

Open Source community it’s amazing!

Update
Now eclipse packaged in Ubuntu official repository work without above trick. Simply install eclipse 3.5.1-0ubuntu7 (or later) from the Ubuntu archive.
Eclipse version in the official eclipse site doesn’t work right yet. (See #28 in this bug for a complete explanation of this Eclipse bug)

Comments: No Comment - Category: open source, programming, ubuntu
by neuromancer - Published: August 22nd, 2009

Great article by Colin Guthrie, a Pulseaudio hacker (read it as developer), about the actual state of sound stack in GNU/Linux.

Many improvements are done to ALSA and now the code is better and cleaned in the kernel driver while the userspace library it’s rather complex, for backward compatibility. Pulseaudio, the sound server, go forward, and manage some new requirements of an actual multi-user, multi-source desktop environment, like, quote Colin:

  • Software mixing
  • Independent (per-application) volume control
  • Dealing with permissions (is the user allowed to access the sound device?)
  • Dealing with Bluetooth devices
  • Dealing with Network based devices (UPnP, Apple Airtunes, Native PulseAudio etc).
  • Handling the moving of streams between outputs.
  • Handling sound from remote applications run via X11 over a network.
  • Dealing with routing policy (Music goes to USB speakers, Desktop sound events to built in speakers, VoIP to Bluetooth headset)
  • Effects to promote HCI (e.g. positional event sounds  – button clicks etc, coming out louder on the left hand speaker when triggered from the left hand side of the desktop)
  • Power Consumption and Efficient savings.
  • Reduces risk of buffer under-runs.

So, GNU/Linux users stay calm and contribute everyone in your manner to the FLOSS world.
Also the sound stack is an a good state :)

Comments: No Comment - Category: gnu/linux, open source, software
by ed0t - Published: April 16th, 2009

I have recently discovered Evolution Mirror, an interesting Thunderbird add-on that aims to mirror Thunderbird calendars to Evolution Data Server. This lets me to manage my calendars with Thunderbird as usual and to see my events in the Gnome Clock applet.

gnomeclockIt is still in development but it is a great intitiative of Teester because it’s a good way to integrate Thunderbird with Gnome.

The plugin is written in Python, and it needs the python-evolution binding. Now i will explain you how to install it. I am using Ubuntu 8.10 Intrepid Ibex 64 bit version.

Obviously you need on your system Thunderbird and its calendar extension: Lightning.

Open Synaptic and install these packages and their dependencies:

python2.5-dev, python-gtk2-dev, libecal1.2-dev,
libgdk-pixbuf-dev, libebook1.2-dev

or using a terminal:

sudo apt-get install python2.5-dev python-gtk2-dev libecal1.2-dev \
libgdk-pixbuf-dev libebook1.2-dev

Download the evolution-python binding from Conduit site.

Open a terminal and digit:

tar zxvf evolution-python-0.0.4
cd evolution-python-0.0.4
./configure
make
sudo make install

Well done, now evolution-python bindings are installed. Now download Evolution Mirror add-on and add it to your Thunderbird Add-ons.

Open Evolution, create an account. You have to do this because it creates some basic data such as the Personal calendar.

Now open your Thunderbird and start add Tasks or Events and you’ll see them on the Gnome Clock applet.

As i have already said, the plugin is still in development, for now it does not add events and tasks that has been already inserted before. It also merge all calendars’ data in one unique Evolution calendar. These are some missing but i think and hope that they will be fixed soon.

Anyway is a great work! I hope to have time to help the developer in this add-on, also because it will be very useful with my still-in-development tool called SyncIt. Take a look on my Trac to know something about it even if it is not updated and poorly documented.

Comments: 4 Comments - Category: howto, open source, software
by ed0t - Published: April 14th, 2009

Today i’ve decided to add to my Eclipse IDE the Mylyn plugin, an add-on that lets manage bugs and planning of a project inside the IDE itself. Mylyn can be used with a lot of bug tracking tools and since i use Trac i’ve decided to link them together inside Eclipse.

I assume you have installed Trac on your local server, or on your Dreamhost account. To enable communication between Trac and Mylyn we have to install and enable the XmlRpcPlugin that you can download from trac-hacks.

After the download, copy your plugin on the system where Trac is installed. Uncompress the archive and go to the 0.10 folder if you have Trac 0.10 or trunk folder otherwise.

Now digit these commands:

chmod 755 -R *
python setup.py bdist_egg

Wait until the Python egg is created and then copy it into the plugins directory of your Trac environment. The egg file is in the dist directory created during the egg building.

Now go into your Admin account of your Trac web interface and go to Plugins page. You’ll see a TracXMLRPC 0.1 field. Clicking on it you’ll see some component. You have to enable these components as shown in the next figure.

Trac XMLRPC plugin components

Well we’ve almost done. Now we have to install Mylyn and Mylyn extras into Eclipse.

Start Eclipse and click on Help -> Software Updates. Click on the Availabe Software tab. Click on Add Site button and paste these two “repository”:

http://download.eclipse.org/tools/mylyn/update/e3.4

http://download.eclipse.org/tools/mylyn/update/extras

Now select to install these features:

Mylyn Plugin

Wait until Eclipse asks you to restart to update changes and then you’ll be able to use Mylyn with your Trac environment.


Comments: No Comment - Category: howto, programming, software
by neuromancer - Published: March 30th, 2009

E allo stesso modo in cui cent’anni fa la gente non si curava dell’inquinamento nella
corsa alla realizzazione dell’Era Industriale, oggi non ci curiamo delle informazioni nella
corsa alla realizzazione dell’Era dell’Informazione.

Bruce Schneier (cryptogram march 2009)

Spesso la difficoltà maggiore nello spiegare a persone poco “informatiche” quale sia il reale problema della privacy e dei nostri dati personali che quotidianamente diffondiamo online ed in ogni transazione mediata da un computer, riguarda proprio l’incapacità di saper comunicare con poche ed efficaci parole l’importanza di tali informazioni ed il perchè dovrebbero preoccuparsene.

O forse, come sempre, è semplicemente dovuto alla natura umana di fare le cose senza pensare ai possibili effetti collaterali. Solo dopo ci si accorge.

Comments: No Comment - Category: Uncategorized
by ed0t - Published: January 13th, 2009

Recently i’ve watched an intresting speech by Miško Hevery.

He explains how to use the correct polymorphic approach instead of a succession of if/switch statements. Polymorphism is better because it lets everybody to understand, to extend and to test the code.

Watch the video at: http://googletesting.blogspot.com/2008/12/by-miko-hevery-google-tech-talks.html

Comments: No Comment - Category: programming
by ed0t - Published: October 28th, 2008

Oracle and CentosIn the past few days i’ve spent my time at work setting up a Linux server with Oracle database. Since i have had some problems i have decided to write how to install it without any trouble.

In our company we have bought two Dell servers QuadCore with 4Gb of Ram and 2Tb of hard disk. We have decided to use one of them as a powerful machine to execute some automatic tests on a complex project that requires a lot of computation.

Since the project uses Oracle database, Oracle Warehouse Builder and Oracle Data Integrator, available for Linux and Windows both, i have decided to setup a Linux machine instead of a Windows one to get the more benefits i could.

I admit, i like Ubuntu too much, so my first try has been an Ubuntu Server 8.04 installation, but i’ve had lots of problem during the installation of the database.

So i’ve decided to switch to a more supported Linux version and the solution has been Centos 5.2 AMD64. Read more…

Comments: 1 Comment - Category: howto
by neuromancer - Published: September 19th, 2008

From Pirate Party:

The Pirate Party of Germany got a secret Document of the bavarian Ministry of Justice from a Whistleblower. In this Document, the Ministry discussed the Price of using a “trojan horse”-malware to wiretap Skype. It looks like the bavarian has already used such a Software, but that would be illegal.
The Price is interesting: 3500€ per month and use. Only mass use could produce such a low price.

And after this announcement the German police have searched the office of Pirate Party and now is searching the people who have liberated this information.
World is upset… Spy on private communication is anti-constitutional in Germany or not??

The Big Brother is here, and if you disagree they install you a trojan horse.
Good ;)

For other info visit wikileaks or the register.

ps. If you want privacy (ah ah), don’t use skype or other proprietary closed software.
First rule is: no security through obscurity.
And before all, use GNU/Linux.

Comments: No Comment - Category: Uncategorized
« Previous PageNext Page »