Change Screen Resolution for Ubuntu in VirtualBox

Re: VirtualBox - How can I Increase Screen Resolution??
There's a great new simple solution to the screen size problem since the release of VirtualBox version 1.6.2.
Here is a solution for changing the screen resolution of Ubuntu running in VirtualBox:

It's a new VBoxManage command, explained in the Help Contents/ User Manual at section 9.12 under the heading "Configuring the maximum resolution of guests when using the graphical frontend".

As the default screen resolution option was unsatisfactory for me, I found by trial and error that the perfect resolution for a Guest on my Host's desktop (with a 19 inch LCD) is 1272 x 920. So in my HOST system, I shut down VirtualBox, then opened a terminal and typed:

VBoxManage setextradata global GUI/MaxGuestResolution 1272,920

This worked perfectly. Now when I run any guest machine in Virtualbox, the guest immediately opens to my desired screen size (1272x920) and it works consistently time after time. You can set any screen size you want this way. Absolutely no adjustments are required inside the guest machine's settings.

Credit to:Ubeaut at "http://ubuntuforums.org/showthread.php?p=5145028#post5145028"

Change Screen Resolution for Ubuntu in VirtualBox

Re: VirtualBox - How can I Increase Screen Resolution??
There's a great new simple solution to the screen size problem since the release of VirtualBox version 1.6.2.
Here is a solution for changing the screen resolution of Ubuntu running in VirtualBox:

It's a new VBoxManage command, explained in the Help Contents/ User Manual at section 9.12 under the heading "Configuring the maximum resolution of guests when using the graphical frontend".

As the default screen resolution option was unsatisfactory for me, I found by trial and error that the perfect resolution for a Guest on my Host's desktop (with a 19 inch LCD) is 1272 x 920. So in my HOST system, I shut down VirtualBox, then opened a terminal and typed:

VBoxManage setextradata global GUI/MaxGuestResolution 1272,920

This worked perfectly. Now when I run any guest machine in Virtualbox, the guest immediately opens to my desired screen size (1272x920) and it works consistently time after time. You can set any screen size you want this way. Absolutely no adjustments are required inside the guest machine's settings.

Credit to:Ubeaut at "http://ubuntuforums.org/showthread.php?p=5145028#post5145028"

Login MySQL from terminal in MacOS

Sometime you may encounter this problem while you are trying to log into your MySQL database from terminal:
"Can not query to other database"

Use the correct command to login:
$ mysql -uroot
or
$mysql -u root -p


Good installation instructions of MySQL on MacOS
http://blog.mclaughlinsoftware.com/2011/02/10/mac-os-x-mysql-install/

Login MySQL from terminal in MacOS

Sometime you may encounter this problem while you are trying to log into your MySQL database from terminal:
"Can not query to other database"

Use the correct command to login:
$ mysql -uroot
or
$mysql -u root -p


Good installation instructions of MySQL on MacOS
http://blog.mclaughlinsoftware.com/2011/02/10/mac-os-x-mysql-install/

Two Ways to Iterate HashMap

Method I:
Map map = new HashMap();
for (Iterator iter = map.entrySet().iterator(); iter.hasNext();) {
    Map.Entry entry = (Map.Entry) iter.next();
    Object key = entry.getKey();
    Object val = entry.getValue();
}
Method II:

Map map = new HashMap();
for (Iterator iter = map.keySet().iterator(); iter.hasNext();) {
    Object key = iter.next();
    Object val = map.get(key);
}

Two Ways to Iterate HashMap

Method I:
Map map = new HashMap();
for (Iterator iter = map.entrySet().iterator(); iter.hasNext();) {
    Map.Entry entry = (Map.Entry) iter.next();
    Object key = entry.getKey();
    Object val = entry.getValue();
}
Method II:

Map map = new HashMap();
for (Iterator iter = map.keySet().iterator(); iter.hasNext();) {
    Object key = iter.next();
    Object val = map.get(key);
}

Installing Tomato Firmware on an ASUS WL520GU wireless router

Most of the websites teach you the old way of installing the Tomato firmware on an ASUS WL520GU wireless router, among them a guide list here is one of the best . Be sure to get the new password if you follow this guide after you installed the DD-WRT firmware.
If you want to install Tomato without installing the DD-WRT firmware first you can follow this guide.

Installing from original OEM firmware
  1. Check the version of the firmware by  typing http://192.168.1.1 in your web browser.Default user/password is admin/admin. If the device has OEM firmware version 3.x or later, then you need to revert it to a pre-3.x version.
  2. Download a pre-3.x version firmware from support.asus.com.tw, like version 2.0.0.7.
  3. Go to http://192.168.1.1 find System Setup/Firmware Upgrade to upload the downloaded firmware.
  4. Downloading and unpack any version of kernel 2.4 Tomato firmware, rename the file to "WL520gu_2.0.0.9_EN.trx". If you want to try the Kernel 2.6 version of the Tomato firmware, make sure you choose “Lite”.
  5. Repeat step 3, to upload the Tomato firmware.

(Credit to original author, link)

Datatable static image not found on the server

When you use ```datatables.min.css``` and ```datatables.min.js``` locally, instead of datatables CDN, you may have encountered that ```sort...