Sunday, January 19, 2014

Bjarne Stroustrup's quotation on C/C++

C makes it easy for you to shoot yourself in the foot. C++ makes that harder, but when you do, it blows away your whole leg. -- Bjarne Stroustrup

Friday, January 17, 2014

Which version of RedHat are you running?

Which version of RedHat are you running?
Just open a terminal and type this command

cat /etc/redhat-release

That's it!

Wednesday, January 8, 2014

Not enough free disk space (but there is!) error

Are you trying to save a big file (bigger than 4GB) on your pretty empty and pretty capable USB stick but you get the error "Not enough free disk space"?
The problem is probably due to the fact that your USB is formatted as FAT32.
This file system simply cannot handle file bigger than 4GB.
The solution is to format your USB drive to NTFS, this is the file system used by Windows XP/VISTA/7/8.
In this way your USB drive will be fully writable/readable by Windows/Linux and Mac (with Paragorn installed) systems.

NOTE:
Formatting your USB drive WILL DELETE its content! So make a backup first!

Monday, January 6, 2014

What is the best online backup solution?

My favorite online backup solution is Dropbox.
Easy to use. Powerful. Available for all the major platforms. And it has nice icons too!
The only drawback is the available space. With a free account you start with 2 GB but with referrals among your friends you can reach 16 GB.

Sunday, January 5, 2014

JAVA: Difference between Integer.valueOf and Integer.parseInt

In Java, to convert a String into an integer you can use either

Integer.valueOf(String) 

or

Integer.parseInt(String). 

But what is the difference between them? Well 

Integer.valueOf(String) gives as result an Integer object.

Integer.parseInt(String) gives the primitive Java type int

How to display your bash history on OSX

To diplay (in a new TextEdit window) the last commands typed in your terminal, just open a new terminal, give the command cd to go into your home folder and type this command:

open .bash_history

By default,  the number of lines saved in your .bash_history file is set to 500.