It is no longer fashionable to write your own custom to send or receive Ajax requests what with so many great frameworks providing all the functionality. However, knowing the basics of a technology should never hurt anyone. So here we present the code pattern that is used in almost all the ajax code.
Find the duplicates in an array in O(n) time There is actually no algorithm to give perfect O(n) time for processing. However, there is a way to find the solution in worst case scenario of O(2n) i.e O(n). ke’s comment about the complexity being O(n2) is indeed correct. You can read more about it at… Continue reading Interesting Algorithm Questions for interview
It is important that before we do any type of JVM tuning, we should throughly profile our system. Memory leaks caused by our application code cannot be fixed by jvm tuning. Java memory is divided into two main parts: 1. Heap size = (Young Gen, Tenured Gen,Permanent Gen) 2. Stack Size allocated to each thread.… Continue reading JVM Tuning
Why is JVM tuning important? For simple uni-processor based Java applications the JVM default tuning parameters are sufficient as the heap size and processes are limited. However, for large systems running on multi-processor systems this may not hold true. With large number of objects and huge heap sizes, the garbage collector may run too slow… Continue reading JVM Tuning Concepts
There are six main memory areas in a JVM: Program Counter Register JVM Stack JVM Heap Method Area Runtime Constant Pool Native Method Stacks
I got this very interesting information regarding memory usage and OutOfMemoryException in servlets and JSP in my mail. The information comes from a very old mail thread archive hosted at mail-archive.com. It is really amazing that this ancient mail thread is still relevant after so many years.