Posts

Showing posts from February, 2018

Sticky Notes for Ubuntu

Hey Friends!!! Many users who switches from Windows machine to Ubuntu machine misses a very common windows utility tool "Sticky Notes". But, Hey!! don't feel sad, Ubuntu too have a similar application like "Windows Sticky Notes" termed as "Inidicator sticky notes". Here is the steps to install it via terminal: $ sudo add-apt-repository ppa:umang/indicator-stickynotes $ sudo apt-get update $ sudo apt-get install indicator-stickynotes To get more information about indicaot stikynotes, visit https://launchpad.net/indicator-stickynotes Have Fun!!!

Iterating a HashMap

We know that, Java HashMap class implements the map interface by using a hashtable. It inherits AbstractMap class and implements Map interface. The important points about Java HashMap class are: A HashMap contains values based on the key. It contains only unique elements. It may have one null key and multiple null values. It maintains no order. Many times we have to iterate hash map for key or value or both key&value. Here is code block to iterate for the same... If you're only interested in the keys, you can iterate through the keySet() of the map:   Map < String , Object > map = ...; for ( String key : map . keySet ()) { // ... } If you only need the values, use values() : for ( Object value : map . values ()) { // ... } Finally, if you want both the key and value, use entrySet() : for ( Map . Entry < String , Object > entry : map . entrySet ()) { String key = entry . getKey (); Object value ...

How to Disable auto-opening nautilus window after auto-mount in Ubuntu

Hi Friends, As a new user on Ubuntu Machine, many users might have faced the same problem of opening a new window when we add a new usb device, whether it be a usb-stick, portable hdd or mobile phones. This might seem very irritating if you are a developer. For a normal user, its just helping then to directly work on the recently connect usb device but while developing there are times when we connect/reconnect our testing device very frequently. To turn it OFF/ON we have to just write a simple command on Ubuntu terminal. To turn it OFF gsettings set org.gnome.desktop.media-handling automount-open false TO turn it ON gsettings set org.gnome.desktop.media-handling automount-open true To know more about gsetting: $man gsettings To get help about any gsettings commands $gsetting help <COMMAND> ex. $gsetting help Monitor Have Fun!!!