Posts From January, 2012

The Android tutorials doesn't work? 

Posted by Magnetic_dud Friday, January 27, 2012 10:48:00 AM Categories: Android Coding

Have you ever tried to follow the Android programming tutorials at

The writer gives too much for granted, many examples do not work as written if you copy them with a simple copy&paste. To permit a simplified view of the code, the header is omitted and the overall vision of how methods and classes are placed is not very clear.

You might end up with errors as:

array cannot be resolved or is not a field


The method setOnItemClickListener(AdapterView.OnItemClickListener) in the type AdapterView<ListAdapter> is not applicable for the arguments (new OnItemClickListener(){})


So, I created a public Bitbucket repository where beginners can go and compare the code.

Migrating to Springpad 

Posted by Magnetic_dud Wednesday, January 25, 2012 5:41:00 AM Categories: Internet

After the Google Notebook shutdown, I was forced to find an alternative that would work well on my phone.

I found Catch Notes (which was previously known as Snaptic and before that as 3Banana) but has the annoying habit of disconnecting the session each time it is used on another computer: bad, I need to access it from 3 computers, and therefore is very irritating to type the password every now and then.

So I tried Evernote, but has two intolerable flaws:

  • You need to pay $45 a year if you want to access the notes without being connected to the Internet
  • The application for Android is huge, not optimized, and although it supports App2SD, uses a lot of space: I do not have enough of it to install it

During a conference, I noticed that the relator used Springpad to take notes. When I came back home, I was curious about it, so I joined the service.

At first I did not like it at all, everything seemed so counter-intuitive... then I installed the application on my phone, I started to get the hang of, and I must say I was extremely pleased!

Ok, how to transfer years of Google Notebook notes to Springpad? Doing it manually is extremely boring ...

By using the converter! (Evernote Version)

In a few minutes will migrate all the notes, although the Japanese characters will be replaced by question marks... it's a pity, so I had to review all the imported notes...

It looks like the BlackBerry PlayBook doesn't sell like hot cakes... 

Posted by Magnetic_dud Monday, January 23, 2012 5:20:00 AM Categories: Gadgets

Maybe due to the Kindle Fire at $ 199, and rumors of poor sales, at the beginning ot the month, RIM lowered the price of the BlackBerry PlayBook: pick any model at $ 299

It would seem a good opportunity to have a discount of 400 dollars on the 64 gig PlayBook, but almost three weeks are passed and it's still in stock, even the 64 gig model... (for the same price, what will you choose: 16, 32 or 64 gig?)

About the recent Megaupload closure 

Posted by Magnetic_dud Friday, January 20, 2012 12:00:00 PM Categories: Internet

This TorrentFreak article explains how Megaupload knew that it was mostly used for illegal purposes.

And this PDF instead tells the ups and downs of the founder of Megaupload. Bankruptcy, insider trading, fraud, money laundering, embezzlement, trafficking in stolen credit cards, mistaken identity, corruption, hacking NASA and Pentagon systems and much more.

In light of these facts, even if it sometimes was an "useful" website, in the end they deserved this ending...


it seems that a site called Megaupload is still accessible at, but I do not have the absolute certainty that it is real; I think it's just a fake trying to make money with adverts

Using my rDNS tool you can see that this address belongs to a WorldStream customer, based in the Netherlands

Doraemon in HTML5 

Posted by Magnetic_dud Friday, January 20, 2012 5:54:00 AM Categories: Coding Internet Japan

While I was searching some tips about web design, I found this japanese designer.

He shows how you can let your browser draw Doraemon using SVG and HTML5

Here it is:

And this is the code behind:

<svg height="300px" width="400px">
<circle cx="200" cy="150" r="100" fill="#000000"></circle>
<circle cx="200" cy="150" r="98" fill="#5ccff0"></circle>
<circle cx="200" cy="168" r="80" fill="#ffffff"></circle>
<circle cx="180" cy="90" r="20" fill="#000000"></circle>
<circle cx="220" cy="90" r="20" fill="#000000"></circle>
<circle cx="180" cy="90" r="19" fill="#FFFFFF"></circle>
<circle cx="220" cy="90" r="19" fill="#FFFFFF"></circle>
<circle cx="190" cy="92" r="5" fill="#000000"></circle>
<circle cx="210" cy="92" r="5" fill="#000000"></circle>
<circle cx="200" cy="110" r="14" fill="#000000"></circle>
<circle cx="200" cy="110" r="13" fill="#ff0000"></circle>
<circle cx="200" cy="182" r="58" fill="#ff0000"></circle>
<rect x="140" y="124" width="120" height="58" fill="#ffffff"></rect>
<rect x="199" y="124" width="1" height="58" fill="#000000"></rect>
<rect x="210" y="130" width="40" height="1" fill="#000000"></rect>
<rect x="152" y="130" width="40" height="1" fill="#000000"></rect>
<rect x="210" y="150" width="50" height="1" fill="#000000"></rect>
<rect x="142" y="150" width="50" height="1" fill="#000000"></rect>
<rect x="210" y="170" width="60" height="1" fill="#000000"></rect>
<rect x="132" y="170" width="60" height="1" fill="#000000"></rect>

The explanation: first he creates a new layer (<div> ...</ div>), then puts in a tag that tells the browser to interprete the following instructions as an svg design (<svg> ...</ svg> ). Inside the svg tag he has specified the height and width of the drawing, and then there are the instructions for drawing circles and rectangles to make the face, eyes, whiskers, etc., and here it seems pretty obvious: rect is for rectangles, circle is for cirles, xy the relative position, width, height, is width and height (want to draw a linge? Set the height to 1 pixel) and fill designates a color to fill, in 8bit RGB hexadecimal.

The main advantages of using this technique instead of placing an image are two:

  1. takes up much less space and so is faster to load
  2. you can enlarge the image indefinitely without losing quality or making it look pixelated

A furin that doesn't need wind to chime 

Posted by Magnetic_dud Wednesday, January 18, 2012 5:47:00 AM Categories: Gadgets Japan

Do you know the furin?

It is an ornamental bell very popular in Japan, usually made of glass, with a clapper attached to a strip of cardboard. When the wind blows you hear a relaxing "ding-ding-ding."

But what if we want to place it in our room, or in other windless places?

That's easy, there is the electronic furin:

The most useful Firefox extensions 

Posted by Magnetic_dud Tuesday, January 17, 2012 2:55:00 PM Categories: Internet

Although now my usage of Firefox is in sharp decline, thanks to the thousands of extensions available, there is always a moment when it becomes necessary.

These ones are the most useful, in my opinion:

  • Clean and close - Allows you to delete completed downloads and close the Downloads window with a single click
  • Deng Google Bookmarks - Inserts a bookmark menu to access Google Bookmarks. Definitely useful if you use more than one computer and don't like Firefox Sync
  • DownThemAll - The best download manager for Firefox!
  • Lazarus - A must! In the event that the browser crashes or the web page has a timeout error while you're filling out a form, you can open it and fill it again with one click! Cool!
  • IE Tab - Allows you to open the page with one click using Internet Explorer. The original link does not work anymore in the latest Firefox (5 versions in the last year!), There are several clones, one is an adware, but the best one is IE Tab 2
  • Rikaichan - A great extension that allows us to know the meaning and the reading of Japanese words unknown to us (Also install the dictionaries - You need to know the hiragana)
  • Super Start - A start page inspired by Google Chrome
For advanced users avanzati:
  • Aging Tabs - Change the color of the less used tabs, it is very nice, too bad it does not work in the latest versions of Firefox...
  • Ghostery - Blocks tracking scripts
  • Gmail Manager - If you have many, too many gmail accounts, by using this extension you can manage them all without too many worries
  • Greasemonkey - Allows you to change the behavior / appearance of some websites by downloading the appropriate script from
  • NoScript - Blocks all the javascripts except those authorized by you, for added security - Use only if you are paranoid - many sites will not function as well as before
  • Springpad - For adding notes to any page - terribly useful and productive
  • WiseStamp - For adding a custom signature to Gmail emails
For web designers:
  • Colorzilla - For seeing the color of any object on the page
  • FireFTP - One of the best FTP client I've ever tried! The integration with Firefox is great!
  • Firebug - All-in-one tool for development
  • Measureit - For measuring the elements of a page in pixels, is more useful than you can think
  • Screenshot Pimp - To make a screenshot of an entire page, even the parts that aren't visible. WARNING - It's a very invasive adware - install only when necessary and then immediately remove
  • Qute - A very balanced skin that adapts to each operating system. Too bad that is no longer compatible with new versions of Firefox ...


Forward ports in VMware Server 

Posted by Magnetic_dud Tuesday, January 17, 2012 5:41:00 AM Categories: Linux

Fortuitously, today I found a note that some years ago I marked as "critical", so here I am to share it with those who might need it one day

When nearly four years ago I moved Serverland from a virtual server to a real one, I thought that it was a good idea to continue to be virtualized, so I installed VMWare Server (it's free!).

Then, the shockingly low performance in accessing the virtual disks, led me to uninstall it, but at the time I had a problem: in the Windows version of VMware Server, there is a convenient panel for configuring the virtual network, but in linux version is absent ... what we can do?

The answer is here:

How to delete files older than X days on linux 

Posted by Magnetic_dud Monday, January 16, 2012 8:50:00 AM Categories: Linux

Sometimes can happen that you want to keep only the files of the last X days in a directory.

On Linux you can do that with a single command line:

find /path/where-are-the/files* -mtime +7 -exec rm {} \;

How it works:

-mtime indicates the days to keep. In the example, having written +7, we only keep files from the last week.

-exec indicates the command to execute in the event that a match is found (ie: the files older than a week), and in this case we pass rm, which eliminates them

Reverse DNS lookup (rDNS) 

Posted by Magnetic_dud Saturday, January 14, 2012 2:35:00 PM Categories: Coding Internet

Have you ever wanted to know which URL belongs to an ip address? For example, what is the URL of the Google public DNS service,

To overcome to this problem I wrote a program to do the reverse DNS lookup (rDNS), of a given IP address, here it is:

For example, looking, you get

Page 1 of 2 1 2 > >>