Blog

Undo close tab in Eclipse

I don’t know about you, but I love the Firefox’s undo-close-tab feature (Ctrl+Shift+T). If you use Eclipse you might be glad to know you can undo the close-tab action in Eclipse as well. You can do that both using your mouse by clicking on the yellow left arrow you can see in the Eclipse toolbar and through the keybord using the Alt+Left Arrow key combination.

I hope this helps.

Read more...

Object not found | EasyPHP | MySQL | phpMyAdmin

After installing EasyPHP, when you try to run phpMyAdmin you might get the following error:

Object not found!

The requested URL was not found on this server. If you entered the URL manually please check your spelling and try again.

This might be due to the fact that it tries the following URL:

https://127.0.0.1/mysql/

Try this one instead:

https://127.0.0.1/home/mysql/

If it works then you can work it out by adding the following line to the httpd.conf file of Apache (you can find it under the %EASYPHP_HOME%/apache/conf path, where %EASYPHP_HOME% is the home directory of your EasyPHP installation). Open the file with a text editor and look up the following string: Alias /home/mysql

Read more...

Java split() of String | Multiple whitespace characters

The split method of the String class is very useful when you want to tokenize a string. Its power lies in the fact that it accepts a string, as a parameter, which can be a regular expression. However you must be careful when you want to split a string using the whitespace character as a delimiter. Consider the following snippet of code:

  
String str = "Testing split using two  whitespace characters";
String[] tokens = str.split("\\s");
for(String token : tokens) {
  System.out.println("-" + token + "-");
}

What’s the output produced by the previous code? If you think it is the following one you’re wrong:

Read more...

OutOfMemoryError in Eclipse | Java Virtual Machine (JVM)

OutOfMemoryError in Eclipse | Java Virtual Machine (JVM)

It might happen that while running a Java application within the Eclipse environment you get an OutOfMemoryError due to the maximum amount of memory dedicated to the heap. You can fix it by increasing the minimum (-Xms parameter) and maximum (-Xmx parameter) heap size. You can do it in two different ways:

  1. By editing your eclipse.ini file you find under your Eclipse installation directory. Within that file you should find two lines similar to the following ones:

-Xms40m ** -Xmx512m**

Read more...