Archive for the ‘Technical’ Category

Its really very fast…..I am posting now using Advanced Browser…..
Similar to IE….Have all features of Mozilla Firefox…Very Light…..
Download size is approximately 1.5MB….

Advanced Browser



Read Full Post »

The two-tier application programming model was developed to enhance the file server application programming model. As compared with the file server application programming model, the two-tier application programming model provides you with improved usability, scalability, and flexibility of applications.

In Two-Tier model, you will have two seperate layers namely Client & Server.


The applications developed using the two-tier application
programming model have a user-friendly interface.
These applications can support only a few users and
allow data to be shared within a homogeneous environment.

Example of the Model

The various tiers in a two-tier architecture are separated from each other by physical boundaries.
These physical boundaries can be machine boundaries, process boundaries, or corporate boundaries.


Read Full Post »

DB2 Q & A

1) How would you find out the total number of rows in a DB2 table?

Use SELECT COUNT(*) … in db2 query

2) How do you eliminate duplicate values in DB2 SELECT ?

Use SELECT DISTINCT … in db2 query

3) How do you select a row using indexes in DB2?

Specify the indexed columns in the WHERE clause of db2 query.

4) How do you find the maximum value in a column in db2?

Use SELECT MAX(…) .. in db2 query

5) How do you retrieve the first 5 characters of FIRSTNAME column of DB2 table EMP ?



Read Full Post »

Highlights of J2SE 5.0

  • Metadata: Additional data or annotations can be associated with classes, interfaces, methods and fields. This can be read by annotation tools or at runtime through Java Reflection API. This can be used for generating additional source code or for providing additional debugging information.

@debug(devbuild=production,counter=1) public void testMethod()

  • Generic Types:  Earlier version’s Collection API stored the values as the instances of ‘OBJECT’ and so required type casting while fetching the objects. The mismatch of data types therefore could not be discovered until runtime. This is now replaced with a possibility to declare the Collection with <> notation that will detect the mismatch of data types at compile time.  

ArrayList<Integer> list =  new ArrayList<Integer>();
list.add(0, new Integer(42));
int total = list.get(0).intValue();

  • Auto-boxing and auto-unboxing of primitive type variables: The conversion between primitive type variables and their object based counterparts is left to the compiler now and will not require extra coding effort.

ArrayList<Integer> list = new ArrayList<Integer>();
list.add(0, 42);
int total = list.get(0);

  • Enhanced for Loop: The enhanced for loop will now replace the traditional iteration code used to traverse a collection. There is no need of looping code and type casting as the collection objects will be converted to generic types.

ArrayList<Integer> list = new ArrayList<Integer>();  
for (Integer i : list) { … }

  • Enumerated types: Enumerated type is introduced as an alternative to static final constants.

public enum StopLight { red, amber, green };

  • Static import: The static import feature enables to refer to static constants from a class without needing to inherit it.

import static java.awt.BorderLayout.*;
getContentPane().add(new JPanel(), CENTER);

  • Formatted Output:  The traditional C specific ‘printf’ functionality can be used for formatted output.

System.out.printf(“name count%n”);
System.out.printf(“%s %5d%n”, user,total);

  • Formatted Input:   In contrast to the heavy code used to get input from standard input in earlier versions, the scanner API provides basic input functionality for reading data from standard input or other data stream.

Scanner s= new Scanner(System.in);
String param= s.next();
int value=s.nextInt();

  • Varargs:  It allows to pass flexible number of arguments to a method.

void argtest(Object … args){}

  • Concurrency utilities:  The new version comes with more powerful concurrency control techniques like semaphores. It can be used to restrict access to a block of code, allows a defined number of concurrent thread accesses, and allows testing a lock before acquiring it.

final  private Semaphore s= new Semaphore(1, true);
s.acquireUninterruptibly(); //for non-blocking version use s.acquire()
try {    
      balance=balance+10; //protected value
} finally {
     s.release(); //return semaphore token

  • RMI compiler-rmic: There is no need to pre-generate stubs using rmic tool as the new version comes with the support of dynamic generation of stubs at runtime.
  • Class-data sharing:  This feature of class-data sharing enables the sharing of read-only data between multiple running JVMs and also improves startup time as core JVM classes are pre-packed.

  • Monitoring:   The JVM Monitoring and Management API enables monitoring and managing the Java virtual machine and the underlying operating system.  The API enables applications to monitor themselves and enables JMX-compliant tools to monitor and manage a virtual machine locally and remotely including low memory detector.
  • JVM Profiling API (JVMTI):  It includes byte code instrumentation. The advantage of this technique is that it allows more focused analysis and limits the interference of the profiling tools on the running JVM. The instrumentation can even be dynamically generated at runtime, as well as at class loading time, and pre-processed as class files.
  • Improved diagnostic capability:  New APIs are introduced to provide complete stack trace in case of any failure. The HotSpot JVM includes a fatal error handler that can run a user-supplied script or program if the JVM aborts.
  • Desktop Client:  New look and feel like introduction of a new theme for swing toolkit called ‘Ocean’.
  • Core XML support:  Several revisions to core XML support including XML 1.1, SAX 2.02, DOM level 3 support and XSLT with a fast XLSTC compiler.
  • Supplementary character support:  32-bit supplementary character support has been added. Supplementary characters are encoded as a special pair of UTF16 values to generate a different character A surrogate pair is a combination of a high UTF16 value and a following low UTF16 value. In general, when using a String or sequence of characters, the core API libraries will transparently handle the new supplementary characters for you.

String u=”\uD840\uDC08″;

  • JDBC rowsets:  There are five new rowset objects added in the new version.
    Two of the most valuable are:

    • Cached rowset: It contains an in-memory collection of rows retrieved from the database that can, if needed, be synchronized at a later point in time.
    • Web rowset: It can write and read the RowSet in XML format.

Read Full Post »

CSS Frames

One of the arguments for using frames has always been that they allow you to keep parts of the layout on-screen at all times. This can be emulated with CSS, as described here

read more | digg story

Read Full Post »

This is a collection of HTML elements I’ve found to be very under-represented in markup on the web today.

read more | digg story

Read Full Post »

   1. What is the servlet?

      Servlets are modules that extend request/response-oriented servers, such as Java-enabled web servers. For example, a servlet may be responsible for taking data in an HTML order-entry form and applying the business logic used to update a company’s order database.

   2. What’s the difference between servlets and applets?

      Servlets are to servers; applets are to browsers. Unlike applets, however, servlets have no graphical user interface.

   3. What’s the advantages using servlets than using CGI?

      Servlets provide a way to generate dynamic documents that is both easier to write and faster to run. It is efficient, convenient, powerful, portable, secure and inexpensive. Servlets also address the problem of doing server-side programming with platform-specific APIs: they are developed with Java Servlet API, a standard Java extension.

   4. What are the uses of Servlets?

      A servlet can handle multiple requests concurrently, and can synchronize requests. This allows servlets to support systems such as on-line conferencing. Servlets can forward requests to other servers and servlets. Thus servlets can be used to balance load among several servers that mirror the same content, and to partition a single logical service over several servers, according to task type or organizational boundaries.

   5. What’s the Servlet Interface?

      The central abstraction in the Servlet API is the Servlet interface. All servlets implement this interface, either directly or, more commonly, by extending a class that implements it such as HttpServlet. Servlets–>Generic Servlet–>HttpServlet–>MyServlet. The Servlet interface declares, but does not implement, methods that manage the servlet and its communications with clients. Servlet writers provide some or all of these methods when developing a servlet.

   6. When a servlet accepts a call from a client, it receives two objects. What are they?

      ServeltRequest: which encapsulates the communication from the client to the server.
      ServletResponse: which encapsulates the communication from the servlet back to the client.
      ServletRequest and ServletResponse are interfaces defined by the javax.servlet package.

Read Full Post »

« Newer Posts - Older Posts »