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)

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)

Add self-define template into eclipse

Templates are little pieces of code with defined placeholders. Each template has a name, which serves as a shortcut to the template itself. You type the name and press Alt + / and it will be expanded.
like sysout:
System.out.println(${word_selection}${});${cursor}
To define your own template go to windows>Preferences>Java>Editor>Templates.



Change the content assistant key to ALT+/:
1. Go to Preferences>>General>>Keys or by typing keys in the filter box.
2. find Content Assist, change the binding to Alt+/.
3. Get rid of the association of these two keys with "word completion".

Add self-define template into eclipse

Templates are little pieces of code with defined placeholders. Each template has a name, which serves as a shortcut to the template itself. You type the name and press Alt + / and it will be expanded.
like sysout:
System.out.println(${word_selection}${});${cursor}
To define your own template go to windows>Preferences>Java>Editor>Templates.



Change the content assistant key to ALT+/:
1. Go to Preferences>>General>>Keys or by typing keys in the filter box.
2. find Content Assist, change the binding to Alt+/.
3. Get rid of the association of these two keys with "word completion".

Amazon Customer Service Phone Number

Nowadays, you may not be able to find the Amazon.com customer phone number from Amazon.com when you need it. It is handy to have Amazon.com customer service phone number in hand.
Here it is: 866-216-1072.

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...