Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

RAJESH KUMAR ARUMUGAM gotoark

🎯
Focusing
Block or report user

Report or block gotoark

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@gotoark
gotoark / FindTheDuplicatesWithoutInnerLoop.java
Created May 14, 2019
Find the no of Occurrences in a List without using a Inner Loop
View FindTheDuplicatesWithoutInnerLoop.java
package interviewprograms;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
public class FindTheDuplicates {
@gotoark
gotoark / AjaxFormat.js
Created Apr 4, 2019
Simple Ajax Request Format
View AjaxFormat.js
var formData = new FormData();
$.ajax({
url : "${url}",
type : "POST",
contentType : false,
/* enctype: "multipart/form-data", */
processData : false,
data : function() {
var inputs = $('#formObject').serializeArray();
console.log("-----------------Sending "
View ThreadSafeSingleton.java
package singleton;
public class ThreadSafeSingleton {
//1.private Constructor
private ThreadSafeSingleton() {
}
//2.Only Instance of the Class
private static ThreadSafeSingleton instance = new ThreadSafeSingleton();
View LazyInitialization.java
package singleton;
public class LazyInitialization {
//1.private Constructor
private LazyInitialization() {
}
//2.Only Instance of the Class
private static LazyInitialization instance = null;
View StaticBlockInitialization.java
package singleton;
public class StaticBlockInitialization {
private StaticBlockInitialization(){}
//1.private Constructor
static{
try{
View EagerInitialization.java
package singleton;
public class EagerInitialization {
//1.private Constructor
private EagerInitialization() {
}
//2.Only Instance of the Class
private static final EagerInitialization instance = new EagerInitialization();
@gotoark
gotoark / CheatSheet_MySQL.md
Last active Jan 24, 2019
List of My Sql Commands
View CheatSheet_MySQL.md

🏁 MY SQL CHEATS 🚀

To Support Multi Language 📍

jdbc:mysql://localhost:3306/databasename??useUnicode=true&characterEncoding=utf-8

View RandomString.Java
static final String AB = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
static SecureRandom rnd = new SecureRandom();
public static String randomString( int len ){
StringBuilder sb = new StringBuilder( len );
for( int i = 0; i < len; i++ )
sb.append( AB.charAt( rnd.nextInt(AB.length()) ) );
return sb.toString();
}
@gotoark
gotoark / CheatSheet_jQUERY.md
Last active Apr 5, 2019
Collection of Code snippets for jQuery
View CheatSheet_jQUERY.md

jQUERY CHEAT SHEET

Selectors

$("*") - All Elements
$("#") - Element id
$(".") - All element with Class Name
@gotoark
gotoark / JSONStringToArrayList.java
Created Feb 2, 2018
JSON String To ArrayList Converter
View JSONStringToArrayList.java
ObjectMapper mapper = new ObjectMapper();
List<MaterialRequestSubFO> materialLst = mapper
.readValue(data, TypeFactory.defaultInstance()
.constructCollectionType(List.class, MaterialRequestSubFO.class));
System.out.println("Lst Size---->"+materialLst.size());
You can’t perform that action at this time.