Friday, September 26, 2014

Why the password filed data need to be stored in the char array

It is a recommended practice to “empty” the read password string once its use is over. This is a secure programming practice to avoid malicious reads of program data to discover password strings.With a char array, as soon as the password is validated, it is possible to empty it and remove the trace of the password text from memory; with a String object, which is garbage collected, it is not as easy as
with a char array.

Monday, September 22, 2014

Javascript Custom Utility Method to check a variable is undefined

var obj=[];
if(Object.prototype.toString.call(obj)=="[object Array]")
{
console.log("as");
}

console.log(obj.toString());

Sunday, September 21, 2014

How to access “Applications” menu in Ubuntu Unity Desktop

open terminal
    or

type  ctrl+ alt+T

and type the following commands

sudo apt-add-repository ppa:diesch/testing
sudo apt-get update
sudo apt-get install classicmenu-indicator

Saturday, September 20, 2014

Think before running these linux commands

wget http://example.com/something -O – | sh


this has two commands in series to execute 

1 . download something from the http://example.com/something  using wget 
2. just pass this downloaded to sh command where sh is just execute the shell script if the downloaded content is shell script 

do be aware when you are running such type of command above .