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.

A simple parallel program using OpenMp in Microsoft Visual C++

Here is the code of a program that creates 10 parallel threads and computes the square root of 10 integers of ‘number’ array and places in ‘root’ array.

omp_set_num_threads(p) sets the number of threads to be created to p.

Difference between Response.Redirect() and Server.Transfer() in ASP.Net

Response.Redirect() and Server.Transfer() both bring the contents from new location (specified as parameter) in web server to the client (browser). However, there are some key differences between these two commands. The main difference is that, Redirect() forces the browser to redirect to new location whereas Transfer() makes server to transfer to new location. The point here is, who does the work, it is either client or server. I am going to deal the difference in terms of the HTTP Request generated and HTTP Response received.

Difference between refreshing a webpage and just hitting Enter in address bar

Let’s say that, you have loaded a webpage in Internet Explorer and some images are not loaded. Now, you may either refresh the webpage by pressing F5 (or clicking Refresh) or you may hit Enter in address bar to reload the page. Are these actions similar? No. But, for a novice user, it may seem similar. In fact they are same if the last action was sending HTTP request using GET method. But if, last action was using POST method, then they behave differently, although results may be same. I am going to analyze the difference in these actions in this post.

Selective Iterator demo for Iterator Pattern in Java

 Selective Iterator Demo 

In my earlier post, I have shown demo of External Complete Reverse Iterator for Iterator Pattern.In this post, I am going to show demo of External and Internal Selective Iterator done in Java. Selective Iterator iterates through the collection but leaves the elements which do not meet criteria specified in predicate logic.

Reverse Iterator Demo using Iterator Pattern

In this post, I have tried to show a customized Iterator that can be used in Iterator Pattern in Java using JFrame. It is an External Complete Iterator Pattern. This Iterator (IteratorReverse) implements java built-in Iterator and overwrites next(), hasNext() and remove() method. I do not concern much about remove() method so, I have left it blank. However, I have modified next() method to return element from the back of the collection that it is iterating. Also, hasNext() checks if final element has reached or not. The complete description goes below. Full source code is available here. Download