Skip to content

Instantly share code, notes, and snippets.

View gotoark's full-sized avatar
🎯
Focusing

RAJESH KUMAR ARUMUGAM gotoark

🎯
Focusing
View GitHub Profile
@gotoark
gotoark / Pop-Up Menu With Icon
Created February 27, 2017 05:49
Show Pop-Up Menu With Icon in Android
public void showPopupMenuWithIcon(View view) {
PopupMenu popup = new PopupMenu(SavingDatainSQLDB.this, view);
try {
Field[] fields = popup.getClass().getDeclaredFields();
for (Field field : fields) {
if ("mPopup".equals(field.getName())) {
field.setAccessible(true);
Object menuPopupHelper = field.get(popup);
Class<?> classPopupHelper = Class.forName(menuPopupHelper.getClass().getName());
Method setForceIcons = classPopupHelper.getMethod("setForceShowIcon",boolean.class);
@gotoark
gotoark / FindTheDuplicatesWithoutInnerLoop.java
Created May 14, 2019 01:45
Find the no of Occurrences in a List without using a Inner Loop
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 / CheatSheet_jQUERY.md
Last active April 5, 2019 07:14
Collection of Code snippets for jQuery

jQUERY CHEAT SHEET

Selectors

$("*") - All Elements
$("#") - Element id
$(".") - All element with Class Name
@gotoark
gotoark / AjaxFormat.js
Created April 4, 2019 07:26
Simple Ajax Request Format
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 "
@gotoark
gotoark / SPRING_E&S.md
Last active February 20, 2019 10:59
A Collection of Errors and Solutions faced in Spring Development ( Java EE )

😈 SPRING ERRORS and SOLUTIONS 😇

Error 😬

org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.modelmapper.MappingException: ModelMapper mapping errors:
@gotoark
gotoark / CheatSheet_MySQL.md
Last active January 24, 2019 06:34
List of My Sql Commands

🏁 MY SQL CHEATS 🚀

To Support Multi Language 📍

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

@gotoark
gotoark / ThreadSafeSingleton.java
Last active September 26, 2018 02:00
Singleton Example
package singleton;
public class ThreadSafeSingleton {
//1.private Constructor
private ThreadSafeSingleton() {
}
//2.Only Instance of the Class
private static ThreadSafeSingleton instance = new ThreadSafeSingleton();
@gotoark
gotoark / LazyInitialization.java
Last active September 26, 2018 01:56
Singleton Example
package singleton;
public class LazyInitialization {
//1.private Constructor
private LazyInitialization() {
}
//2.Only Instance of the Class
private static LazyInitialization instance = null;
@gotoark
gotoark / EagerInitialization.java
Last active September 4, 2018 02:25
Singleton Example
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 / StaticBlockInitialization.java
Created September 4, 2018 02:02
Singleton Example
package singleton;
public class StaticBlockInitialization {
private StaticBlockInitialization(){}
//1.private Constructor
static{
try{