Use EditPad Pro to check your Regular Expressions

If you are into PHP or other programming languages, you may need to write regular expressions very often. It may be tedious to run the whole program to check whether the regular expression you wrote is correct or not. So, if you have some sample string where you can find your desired regular expression match, EditPad Pro can be a very handy tool to check your regular expressions. Only you need to write or pase your search string ( where to find regex match) and your regular expression and search for Regular Expression match if any in given search string. You can also click on “Highlight” button and see if regular expression that you are writing matches any substring in search string at real time.

Memoized version of Fibonacci number calculation using only one variable in Java

Fibonacci number can be calculated using different techniques. Most common recursive technique is brute force where we calculate Fibonacci number by repeatedly calling the method of numbers less by one and less by two. In this technique, we do not care the fact the previous Fibonacci number may have been calculated. However, in Memoized technique, we store the results in some array or variable and calculate new values from old calculated values. Source codes for brute force technique, memorized with array and memoized with one variable are given below.

Algorithm to calculate height of a binary tree

Binary tree is a data structure of tree shape in which each node can have either 2 or 0 children(s). Height of a tree is the maximum depth of nodes of the tree. Here is the algorithm to that returns the height of the tree. It should be called by passing position of root node of tree as argument.

Error while restoring SQL Server 2000 database backup onto 2008 database.

Normally, you cannot restore SQL Server 2000 database backup onto SQL Server 2008 database. This may be due to different collation technique or some other properties. If you try to restore 2000 database backup to 2008 database, you usually get the following error.

Publish your emails to a blog automatically

If your emails are not so confidential and you donot want to waste time logging into email account and read email by clicking next button, here is a tweak. You can create a new blog from blogger.com, set a unique email posting address at blog’s setting and forward your email to that address. The steps involved are described below.

Configure Eclipse to show Content help (intellisense) in Java

If you are running Eclipse for first time for Java, you may not get content assitant help while pressing Ctrl+Space saying “No Default Proposals”. To get Content Assist Help (like Intellisense in Microsoft Visual Studio), you have to configure it at first.

In Eclipse IDE, go to Windows -> Preferences. A new window opens.

Parallel Rank sort using Java Thread

In this post, I have included code that uses Java Threads to calculate ranks of numbers in list[] array and put then in respective position (determined by rank) in finallist[] array. It is a relaxed algorithm as none of the threads created interact with each other.

How to setup visual studio to run parallel programs using openmp in visual C++?

If you write a program to be run in parallel in multiple cores of a computer or multi-computer, then you should setup a configuration in visual studio before it actually runs in multiple cores (or computer).

Here are the steps.

1. Go to Project ->”Project Name” Properties.

←Older