Posts

HTML 5

What is DOM When your browser renders a web page, it constructs a Document Object Model (DOM) , a collection of objects that represent the HTML elements on the page. Every element — every , every , every — is represented in the DOM by a different object. (There are also global objects, like window and document, that aren’t tied to specific elements.) HTML5 defines over a dozen new input types that you can use in your forms. < input type="search" > for search boxes :  < input type="number" > for spinboxes < input type="range" > for sliders < input type="color" > for color pickers < input type="tel" > for telephone numbers < input type="url" > for web addresses < input type="email "> for email addresses < input type="date" > for calendar date pickers < input type="month" > for months < input type="week" > fo...

Tools to use

Process mapping tool : which is online version of Visio :-   http://www.gliffy.com My Eclipse (Juno) is not showing Maven option while creating new Project. Resolution : go to Eclipse -; Help - Market place and serch there for "Maven Integration for Eclipse WTP" and Next -next-FInish. Which Online Decompiler is best to use ? Resolution : How to Create project from existing ant file with project ? look at : http://www.ahristov.com/tutorial/java-compiler/eclipse.html How to create maven based project ? Please refer this link: http://emrpms.blogspot.in/2012/11/spring-security-hello-world-example.html How to Stop JBoss in Window OS: jboss/bin/ RUN THIS CMMAND  jboss-cli --connect command=:shutdown What are the difference between different names of Eclipse and what does they mean ? = Release Date Platform version Projects Kepler 26 June 2013 4.3 Kepler Projects Juno 27 June 2012 4.2...

Oracle Database

What is Object in Oracle? = This concept is almost analogue to Java Object. Oracle object types are user-defined types that make it possible to model real-world entities such as customers and purchase orders as objects in the database.When you create a variable of an object type, you create an instance of the type and the result is an object. An object has the attributes and methods defined for its type. Because an object instance is a concrete thing, you can assign values to its attributes and call its methods. Defining an object type does not allocate any storage. Let us see example to learn how to create and use Object in Oracle. First, define an Object Type, i.e data type: Example: CREATE TYPE person_typ AS OBJECT ( idno NUMBER, first_name VARCHAR2(20), last_name VARCHAR2(25), email VARCHAR2(25), phone VARCHAR2(20), MAP MEMBER FUNCTION get_idno RETURN NUMBER, CREATE TYPE BODY person_typ AS MAP MEMBER FUNCTION get_id...

Java Performance

How to check the Memory used by Java class CheckMemory{ public static void main(String[] a) { Runtime rt = Runtime.getRuntime(); System.out.println(" Free memory: " + rt.freeMemory()); System.out.println("Total memory: " + rt.totalMemory()); while (true); } } To cehck its usage at Client and Serverside run them like:- Client Side - JVM Usage:- C:\>\progra~1\java\jdk1.6.0_02\bin\java LongWhile Free memory: 4997088 Total memory: 5177344 ServerSide JVM usage:- C:\>\progra~1\java\jdk1.6.0_02\bin\java -server LongWhile Free memory: 4997088 Total memory: 5177344

Exceptions encountered during Development

Miscellaneous Exceptions :-  You might encounter various exceptions while developing a Project with Spring and Hibernate. I have depicted few of them here and their solutions:- 1. SEVERE: Context initialization failed org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/spring-servlet.xml]: Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: org/apache/commons/collections/map/LRUMap Solution:-      Use commons-collections.jar 2. SEVERE: Servlet.service() for servlet spring threw exception org.springframework.beans.factory.BeanNotOfRequiredTypeException: Bean named 'org.springframework.transaction.interceptor.TransactionInterceptor#0' must be of type [org.aopalliance.aop.Advice], but was actually of type [org.springframework.transaction.interceptor.TransactionInterceptor] Solution:-  It might be due to  ...

MOBILE

Check satellite signal status To check how many satellites your device has found, and whether your device is receiving satellite signals, select Menu > Applications > Location and GPS data > Options > Satellite status. If your device has found satellites, a bar for each satellite is shown in the satellite info view. The longer the bar, the stronger the satellite signal. When your device has received enough data from the satellite signal to calculate your location, the bar colour changes. To view the positions of found satellites, select Chg. view. Initially your device must receive signals from at least four satellites to be able to calculate your location. When the initial calculation has been made, it may be possible to continue calculating your location with three satellites. However, the accuracy is generally better when more satellites are found.

Singleton - Double locking mechanism

Let us see the Singleton code which we use generally to create a singleton instance: public static synchronized Singleton getInstance() { if (instance == null) //1 instance = new Singleton(); //2 return instance; //3 } The code in Listing 2 works fine for multithreaded access to the getInstance() method. However, when you analyze it you realize that synchronization is required only for the first invocation of the method. Subsequent invocations do not require synchronization because the first invocation is the only invocation that executes the code at //2, which is the only line that requires synchronization. All other invocations determine that instance is non-null and return it. Multiple threads can safely execute concurrently on all invocations except the first. However, because the method is synchronized, you pay the cost of synchronization for every invocation of the method, even though it is only required on the first invocation. In an effort to mak...