8/21/2009

untar a file

tar -xvf myfile.tar

In the above example command the system would uncompress (untar) the myfile.tar file in the current directory.

tar -xvzf myfile.tar.gz

In the above example command the system would uncompress (untar) the myfile.tar.gz file in the current directory.

Note: There is no "untar" linux / unix command.

8/20/2009

教训

Do not update the ubuntu computer, You should remember that!

8/17/2009

install .deb file

To install package called package.deb type the following command:
Go to directory where package.deb is kept. For example if it is in /tmp directory:
$ cd /tmp
Type the following command:
$ sudo dpkg -i package.deb

8/16/2009

Default Nokia Unlock Code

Please Note:
The default security code for ALL Nokia handsets is 12345
This is sometimes called the phone lock code.

8/13/2009

output scientific numbers in c++

put scientific before Energy
and put fixed before Xmax

so the first one (Energy) will output with scientific notation and
the second one (Xmax) will come back to normal notation.


skipws      // skip whitespace on input
left
// pad after the value
right
// pad before the value
internal
// pad between sign and value
boolalpha
// use the symbolic representation of true and false
dec
// integer base
hex
// hexadecimal base
oct
// octal base
scientific
// floating point notation d.ddddEdd
fixed
// d.dd
showbase
// show the base prefix such as 0 or 0x
showpoint
// print trailing zeros
showpos
// show + for positive values
uppercase
// E, X instead of e, x
adjustfield
// flags related to field adjustment
basefield
// flags related to integer base
floatfield
// flags related to floating-point output
unitbuf
// flush output after every operation