Adding Integer arrays

Q: You have two integer arrays. Treat these arrays as if they were big numbers, with one digit in each slot. Perform addition on these two arrays and store the results in a… Continue reading

Perl one-liner to check if number is prime

The following Perl one-liner is to show the abilities and power of Perl: in one single line we can tell from a number whether it is a prime or not. How it works?… Continue reading

Some Bitwise Operations in C

Some Bitwise Operations in C just for practise. 1. Even or Odd? 2. Isolate the rightmost 0 bit. 3. Isolate the rightmost 1 bit. 4. Test if the n-th bit is set. 5.… Continue reading

IT Questions #01

Q:¬†“Last year my team had to remove all the phone numbers from 50,000 Amazon web page templates, since many of the numbers were no longer in service, and we also wanted to route… Continue reading

Mail::RFC822::Address: Regexp-based address validation

Mail::RFC822::Address is a Perl module to validate email addresses according to the RFC 822 grammar. The exact RFC (0822, Standard for the format of ARPA internet text messages) can be found here.

Watch out for reserved words!

Q: What is the mistake in this MySQL snippet? A: In MySQL key is a reserved word, so you’ll always have to escape it:

Some vim tricks you may use

I’ve collected some vim tricks together which may help your work if you use this powerful text editor.