4/29/2009

atoi function

The atoi (ASCII to integer) function in the C programming language is used to convert a string into a numerical representation.

int atoi(const char *str)


atoi is a function that get the first few number in a string until it sees a no numerical sign

1234--->1234
123*4--->123
1.234--->1
@1234--->0

4/28/2009

rsync

Local Backup
sudo rsync -azvv /home/path/folder1/ /home/path/folder2
Remote Backup
sudo rsync --delete -azvv -e ssh /home remoteuser@remotehost.remotedomain:

/backupdirectory
-z compresses the data --delete deletes files that don't exist on the system being backed up. Maybe you want this, maybe not. -a preserves the date and times of the files (same as -t), descends recursively into all directories (same as -r), copies symlinks as symlinks (same as -l), preserves file permissions (same as -p), preserves groups (same as -g), preserves file ownership (same as -o), and preserves devices as devices (same as -D). -vv increases the verbosity of the reporting process

for my case:

gyuan@frankie:~$ sudo rsync -azvv /home/gyuan/Desktop/ADST_backup/ /data2/ADST_backup/


gyuan@frankie:~$ sudo rsync --delete -azvv -e ssh gyuan@zen.phys.lsu.edu:/home/gyuan/Desktop/ADST_backup /home/gyuan/Desktop/ADST_backup/



gyuan@shanghai:~$ sudo rsync --delete -azvv -e ssh gyuan@frankie.phys.lsu.edu:/home/gyuan/Desktop/ADST_backup/ /home/gyuan/Desktop/ADST_backup

gyuan@frankie:~$ sudo rsync --delete -azvv -e ssh /home/gyuan/Desktop/ADST_backup/ gyuan@paris.phys.lsu.edu:/home/gyuan/Desktop/ADST_backup



show progress
gyuan@frankie:~$rsync -avz QGSjetII_Iron_v2r5p5_SRB gyuan@zen.phys.lsu.edu:/nfs/data/sim/ --progress -h

exclude files
rsync -avz gyuan@ccali.in2p3.fr:/sps/pauger/Simulations/libraries/augermgr.ccin2p3/QGSjetII_Proton_v2r5p5_SRB/en19.500/th0.65/011000/20081114 test  --progress -h --exclude '*Offline.root' --exclude '*.tar' --exclude '*.out'

gyuan@hyde: rsync -avz --delete  gyuan@zen.phys.lsu.edu:/data/Sim_ADST/ /nfs/data/Sim_ADST/ --progress -h

4/27/2009

Install ADST (.profile example)

export ROOTSYS=/home/gyuan/downloads/root
export KGROOT=${HOME}/ADST
export PATH=$ROOTSYS/bin:${KGROOT}/bin:$PATH
export LD_LIBRARY_PATH=$ROOTSYS/lib:${KGROOT}/lib:$LD_LIBRARY_PATH

4/23/2009

一些天文学名词

constellation 星座,星群

Centaurus 人马座

Centaurus A 人马A星系
Centaurus A
(also known as NGC 5128) is a lenticular galaxy about 14 million light-years away in the constellation Centaurus. It is one of the closest radio galaxies to Earth, so its active galactic nucleus has been extensively studied by professional astronomers.[3] The galaxy is also the fifth brightest in the sky,[3] making it an ideal amateur astronomy target,[4] although the galaxy is only visible from low northern latitudes and the southern hemisphere.

http://en.wikipedia.org/wiki/NGC_5128

4/14/2009

g++: not found

sudo aptitude install build-essential
That installs g++, gcc, make, etc.

4/07/2009

Install Adobe Reader after installation of Ubuntu

All you’ll need to do in order to install Adobe Reader is add the Medibuntu repository. This can be done via:

sudo wget http://www.medibuntu.org/sources.list.d/hardy.list -O /etc/apt/sources.list.d/medibuntu.list

Once that is done you’ll likely want to add the Medibuntu GPG key as well:

sudo apt-get update && sudo apt-get install medibuntu-keyring && sudo apt-get update

..and finally install Adobe Reader v8.1.2 (at the time of this writing) by using:

sudo apt-get install acroread

If you want to install Adobe Reader as well as the plug-in for Firefox, then use this line instead:

sudo apt-get install acroread mozilla-acroread acroread-plugins


ADST software

You can find all the information at:

software:

http://augerobserver.fzk.de/index.php?id=27

data files:
http://augerobserver.fzk.de/index.php?id=15

and you can register to the mailing list:
https://www.auger.unam.mx/mailman/listinfo/adst-user

and submit bugs at:
www.auger.unam.mx/bugzilla (Package: ADST)

4/06/2009