Monday, May 27, 2013

Reduce memory usage in Chrome by suspending tabs

Google Chrome seems to use lots of memory especially when there are lots of tabs open at once. It quite often slows down my machine significantly to the point that I have to restart the browser (with all tabs still open after the restart) and then it gradually slows down again. I'm glad I came across The Great Suspender. This extension allows me to suspend any tab manually, or let it suspend idle tabs for me automatically.


Friday, May 24, 2013

Convert an object array to a string array in Java

  • System.arraycopy(Object src, int srcPos, Object dest, int destPos, int length);
  • Arrays.asList(Object_Array).toArray(new String[Object_Array.length]);  
  • Java 1.6
        String[] stringArray = Arrays.copyOf(objectArray, objectArray.length, String[].class);


Friday, May 10, 2013

Find which process is using a file on Mac

Use this command
lsof | grep <filename>
lsof <filepath>
To ignore case, use
lsof | grep -i <filename>
Run it as root if the process is owned by root,
sudo lsof | grep -i <filename>

Getting the error "oasis-text.icns is in use" when installing LibreOffice on Mac

The full error message is

The operation can't be completed because the item "oasis-text.icns" is in use.

To fix it, just quit the SystemUIServer process in the Activity Monitor.

Wednesday, May 8, 2013

Install IDE on Eclipse 4.2 (Juno)

Cannot complete the install because one or more required items could not be found.
  Software being installed: IDE (
  Missing requirement: IDE ( requires 'org.eclipse.update.ui 0.0.0' but it could not be found