Making a tree navigation menu in PHP

Below is the code with sufficient comments on making a tree navigation menu (hierarchical menu) in PHP. A single page holding different links. The navigation links are present at the left sidebar of the page. I have not used any dynamic approach over here. Have not used any loop. It’s just a static and straight-forward … Read more

MySQL: Backup/Export and Restore/Import Database & Table

This article shows how to backup/export and restore/import single & multiple databases and tables in MySQL. Backup/Export 1) Backup/Export single database mysqldump -h hostname -u username -p database_name > /path/backup.sql 2) Backup/Export multiple databases mysqldump -h hostname -u username -p –databases db1 db2 db3 > /path/threedb.sql Here: db1, db2, db3 are three different database name. … Read more

Fun with Regular Expression

Fun with perl regular expression A) $st = “The programming republic of perl”; $1 = ?, $2 = ? and $3 = ? 1) if($st =~/(.*)(e|r)(.*)$/) 2) if($st =~/(m{1,2})(.*)$/) 3) if($st =~/(.*)(m{1,2})(.*)$/) 4) if($st =~/(.?)(m{1,2})(.*)$/) 5) if($st =~/(.+?)(e|r)(.*)$/) 6) if($st =~/(m{1,2}?)(.*?)$/) 7) if($st =~/(m{1,2}?)(.*?)/) 8 ) if($st =~/(.*})(.*)$/) Answer: 1) $1 = The programming republic … Read more

Cryptography: Public-key Encryption & Digital Signature

History Public-key encryption makes key-management much easier. It was invented in 1976 by two Stanford mathematicians, Whitfield Diffie and Martin Hellman. Their discovery can be phrased simply: enciphering schemes should be asymmetric. For thousands of years all ciphers were symmetric—the key for encrypting a message was identical to the key for decrypting it, but used, … Read more

Free .np domain registration

NP domain registration service is provided by Mercantile Communications completely free of charge to people and company in Nepal. This article shows step-by-step procedure to register and host a free .np domain/website. Here is the step-by-step guide: 1) Go to domain registration website: http://register.mos.com.np 2) Check Domain Availability Note that, you should choose domain with … Read more