Skip to content

Instantly share code, notes, and snippets.

View dwivedi's full-sized avatar

Ashish Dwivedi dwivedi

View GitHub Profile
public String postMethod(String conUrl, JSONObject nvps) throws Exception {
String result = null;
InputStream is = null;
HttpClient httpclient = new DefaultHttpClient();
URI u = new URI(conUrl);
HttpPost httppost = new HttpPost(u);
HttpParams httpParameters = new BasicHttpParams();
int timeoutConnection = 24000;
@dwivedi
dwivedi / RemoveDuplicacy.java
Created January 21, 2013 07:40
This is the minimized code to remove the duplicacy from Generic Type Data Class
package com;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashSet;
public class Foo {
public static void main(String args[]) {
ArrayList<User> usersList = new ArrayList<User>();