Archive by Author

How to subtract two array lists in Java

How to subtract two array lists in Java

list1.removeAll(list2); will do the job, but it cost you N1*N2 operations . If you work with big arrays you can improve performance like this: public <T> List<T> subtract(List<T> list1, List<T> list2) { List<T> result = new ArrayList<T>(); Set<T> set2 =...
Filed in: Java
0
How to get MAC address using Java

How to get MAC address using Java

Previously for obtaining a MAC address we need to use a native code as a solution. In JDK 1.6 a new method is added in the java.net.NetworkInterface class, this method isgetHardwareAddress(). import java.net.InetAddress; import java.net.NetworkInterface; import java.net.SocketException; import java.net.UnknownHostException; public...
Filed in: Java
6
How to get real path in JSF

How to get real path in JSF

To get the real path we first need the servlet context ServletContext ctx = (ServletContext) FacesContext.getCurrentInstance() .getExternalContext().getContext(); After getting the servlet  context now we are able to get the real path String deploymentDirectoryPath = ctx.getRealPath("/");
Filed in: JSF, Java
1
Quartz Job Scheduler

Quartz Job Scheduler

Quartz Overview Quartz is a full-featured, open source job scheduling service that can be integrated with, or used along side virtually any Java EE or Java SE application – from the smallest stand-alone application to the largest e-commerce system. Quartz can be used to create simple or complex...
Filed in: Java
3
MySQL errno 150 – Foreign Key Constraints

MySQL errno 150 – Foreign Key Constraints

Just quick note for anyone getting this error. It took me a little while to figure out. There can a be a various reasons for MySQL errno 150. Following are the ways to verify your structure in order to fix your problem 1) type of foreign key source and reference fields must be identical check: both set...
Filed in: Database
10
Killing Oracle Sessions

Killing Oracle Sessions

Identify the Session to be Killed Killing sessions can be very destructive if you kill the wrong session, so be very careful when identifying the session to be killed. If you kill a session belonging to a background process you will cause an instance crash. Identify the offending session using the V$SESSION...
Filed in: Database
0
Tomcat POST Size Limit

Tomcat POST Size Limit

Apache Tomcat has a limit on the size of request that can be made using the POST HTTP method. Some time we need to submit data more than the limit. This article describes how this limit can be removed, enabling very large amount of data to be sent on server. Remove POST size limit If we send large amount...
Filed in: Java
0
An Introduction to Android

An Introduction to Android

swfobject.embedSWF("http://www.youtube.com/v/x1ZZ-R3p_w8&rel=0&fs=1&showsearch=0&showinfo=0", "vvq-132-youtube-1", "425", "344", "10", vvqexpressinstall, vvqflashvars, vvqparams, vvqattributes);
Filed in: Android
0
JSF AJAX Framework Matrix

JSF AJAX Framework Matrix

Sometime it becomes quite difficult to choose between the JSF AJAX frameworks but based on the following parameters we can choose the best appropriate framework Components Documentation AJAX Integration Browser support Community Tool support (Eclipse, NetBeans) It’s not possible for us to go through...
Filed in: JSF
1
How to fix internet explorer cannot open the internet site operation aborted error

How to fix internet explorer cannot open the internet site operation aborted error

This error shows up when the page loads (or tries to load). There are many scenarios that can cause this error which occurs in IE. Microsoft has even issued a patch for solving it. This error is being caused by calling a piece of Javascript within a page (after the tag). Adding the defer=”defer”...
Filed in: HTML, Javascript
0
© 2010 Developer Articles. All rights reserved.
Powered by: Aaban Technologies