Month: January 2021

Java Linked List

The Internet is full of code examples on how you can create your own LinkedList class. Java provides and very easy to use class LinkedList. Following is an example on…

How to encrypt a string in PHP

The following code encrypts a string. crypt() function encrypts the string. The last line prints the encrypted string. There is no such function called decrypt(). This is because crypt uses…

Perl $_ vs. $_[]

For a beginner, Perl can be a frightening language. This is largely due the numerous special variables used in perl. Once a programmer understands the special variables, he/she begins to…

for loop in bash

For loops in bash a similar to commonly used languages such as Perl and C. bash loops do not use curly brackets for body demarcation. Example 1 Loop start from…

Linux: Copy all files with exception

Sometime we need to copy entire directory with the except of a few files or a specific directory. This could easily be accomplished with a regular expression as follows: Note:…

PHP Unit Testing with SimpleTest

What is Unit Testing Most developers agree that testing is important but few test their code. Even fever do it methodically. Many developers do not realize that there is a…