Skip to main content

Posts

currency conversion ( yen to INR )

1 yen = 0.40 rupee Currency Conversion Results Symbol Indian Rupee Exchange Rate Japanese Yen Bid Ask INRJPY=X 1 Sep 5 2.3716 2.3716 2.3716 2.3724 Symbol Japanese Yen Exchange Rate Indian Rupee Bid Ask JPYINR=X 1 Sep 5 0.4205 0.4205 0.4205 0.4206

How to set a crontab

How to Use the Cron and Crontab commands The 'Cron' Command The cron command starts a process that executes commands at specified dates and times. Regularly scheduled commands can be specified according to instructions found in the crontab files in the directory /var/spool/cron/crontabs. Users can submit their own crontab files via the crontab command. The 'Crontab' Command Crontab copies the specified file or standard input if no file is specified, into a directory that holds all users' crontab s. SYNOPSIS : crontab [file] crontab -e [-u username] crontab -r [-u username] crontab -l [-u username] The -e option edits a copy of the current users' crontab file or creates an empty file to edit if crontab does not exist. The -r option removes a user's crontab from the crontab directory. The -l options lists the crontab file for the invoking user. Setting up a Crontab job A crontab file consists of lines of six fields each.The fields are separated by

Dia, a Drawing Tool.

Dia is a GTK+ based diagram creation program for Linux, Unix and Windows released under the GPL license. Dia is inspired by the commercial Windows program 'Visio', though more geared towards informal diagrams for casual use. It is an editor for diagrams, graphs, charts etc. There is support for UML static structure diagrams (class diagrams), Entity-Relationship diagrams, network diagrams and much more. Diagrams can be exported to postscript and many other formats. To install DIA try >sudo apt-get install dia. for more information on Dia follow the links below : Link 1: https://help.ubuntu.com/community/Dia Link 2: http://live.gnome.org/Dia Link 3: http://www.gnome.org/projects/dia/ Dia for windows : Link 4: http://dia-installer.de/index_en.html Tutorials and documentation Dia Tutorial Dia tutorial written by Harry George Dia documentation A chapter about Dia from the book "The GNU/Linux Desktop" by Kayon Toga Dia/UML Tutorial A nic

Some useful commands

How to change the engine type of a table : >alter table reportsTransfer engine= innodb ; How to add foreign key to a table : >ALTER TABLE tbl_name ADD [CONSTRAINT symbol ] FOREIGN KEY [ index_name ] ( index_col_name , ...) REFERENCES tbl_name ( index_col_name , ...) [ON DELETE {RESTRICT | CASCADE | SET NULL | NO ACTION}] [ON UPDATE {RESTRICT | CASCADE | SET NULL | NO ACTION}] e.g >alter table reportsTransfer add foreign key reportsId (reportsInsertedId ) references reportsInserted (id) Note > Before adding a foreign key to table make sure both the tables ( Reference table and table having foreign key ) engine type = InnoDb . >InnoDB does not check foreign key constraints on those foreign key or referenced key values that contain a NULL column. >Currently, triggers are not activated by cascaded foreign key actions. Explain doesn't works with Delete and Update statement.

Database Issues

1. root user can grant privileges to other user so you need to login as mysql -u , before granting privileges ... GRANT ALL PRIVILEGES ON database.* to cruncher@localhost identified by "password" 2. create database IF NOT EXISTS indiagATpincampaignsDOTcom ; ERROR 1044 (42000): Access denied for user 'cruncher'@'localhost' to database 'indiagDOTcom' Reason : I did ... " grant all privileges on *.* to cruncher identified by "password" ; " instead of grant all privileges on *.* to cruncher@localhost identified by "password" ;

Unzip on Perl

Problem: A uncompression module ( IO::Uncompress::AnyUncompress ) started giving problem in my new machine. which was working fine on old server. Solution: Installed IO::Uncompress::Unzip qw(unzip $UnzipError) from cpan and used, use IO::Uncompress::Unzip qw(unzip $UnzipError) ; unzip $infileName => $outfileName or die "unzip failed: $UnzipError\n"; which worked fine. Original machine (Server ): Linux dev 2.6.20-16-server #2 SMP Tue Feb 12 05:48:21 UTC 2008 i686 GNU/Linux ( uname -a) New machine (Server): Linux datacruncher 2.6.24-16-server #1 SMP Thu Apr 10 13:58:00 UTC 2008 i686 GNU/Linux