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. Read more... (95 words, 1 image, estimated 23 secs reading time)
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. Read more... (376 words, estimated 1:30 mins reading time)
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. Read more... (91 words, estimated 22 secs reading time)
June 17th, 2009 in
Visual C++ | tags:
OpenMP |
2 Comments
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. Read more... (165 words, estimated 40 secs reading time)
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. Read more... (409 words, estimated 1:38 mins reading time)
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. Read more... (438 words, 2 images, estimated 1:45 mins reading time)
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. Read more... (346 words, 1 image, estimated 1:23 mins reading time)
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 Read more... (399 words, 1 image, estimated 1:36 mins reading time)