DelayQueueExample Example

July 09, 2015 by Sandeep Bhardwaj | Tags:

DelayQueueExample.java import java.util.concurrent.BlockingQueue; import java.util.concurrent.DelayQueue; import java.util.concurrent.Delayed; import java.util.concurrent.TimeUnit; public class DelayQueueExample { public static void main(String[] args) { BlockingQueue<DelayedElement>...

Read more

How to delete skype android history ?

March 31, 2014 by Sandeep Bhardwaj | Tags:

Easy steps to delete skype chat history off your mobiles. Sign out of skype from your mobile. Sign into skype on your computer. Go to tools-options- privacy settings. Click on clear history. Sign out of skype from your computer. On your mobile go to settings-applications manager-sky...

Read more

Convert java.util.Collection to java.util.List

April 19, 2013 by Sandeep Bhardwaj | Tags:

List list; if (collection instanceof List) { list = (List)collection; } else { list = new ArrayList(collection); } Generic way (java 1.5<=) public <E> List<E> collectionToList(Collection<E> collection) { List<E> list; if (collection i...

Read more

How to convert java.util.List to java.util.Set

May 11, 2012 by Sandeep Bhardwaj | Tags:

Removing duplicate items from a list is pretty simple in java just convert the list to java.util.Set it will automatically remove the duplicate items and create a set for you. Syntax Set<E> alphaSet = new HashSet<E>(<your List>); Example import java.util.ArrayList; imp...

Read more

Include liferay jsp file on custom portlet

April 27, 2012 by Sandeep Bhardwaj | Tags:

If you wants to include a custom jsp contains a common functionality to all your portlets then follow the below steps. Create a Liferay hook » Custom Jsps and create a jsp under /htm/common/.jsp Now simply use the below code for include the jsp on portlet pages. <%@ taglib uri="http:/...

Read more