Skip to content

Instantly share code, notes, and snippets.

require=(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
/*
Copyright (c) 2011, Chris Umbel
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@Kiougar
Kiougar / DBModel.java
Last active May 1, 2024 11:31
An abstract class for java Objects that are to be used as database models.
import java.lang.reflect.Field;
import java.lang.reflect.Modifier;
import java.sql.BatchUpdateException;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.ArrayList;
/**
@madan712
madan712 / WindowsProcessKiller.java
Created October 31, 2013 08:44
Java program to kill a runnning windows process
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class WindowsProcessKiller {
// command used to get list of running task
private static final String TASKLIST = "tasklist";
// command used to kill a task
private static final String KILL = "taskkill /IM ";
@nostream
nostream / gist:1834417
Created February 15, 2012 08:25
install jdk6
1 wget http://download.oracle.com/otn-pub/java/jdk/6u25-b06/jdk-6u25-linux-i586.bin
2 chmod +x jdk-6u25-linux-i586.bin
3 ./jdk-6u25-linux-i586.bin
4 mv jdk1.6.0_25/ /usr/local/jdk1.6.0_25
5 vi /etc/profile
export JAVA_HOME=/usr/local/jdk1.6.0_25
export PATH=$JAVA_HOME/bin:$JAVA_HOME/jre/bin:$PATH
export CLASSPATH=.:$JAVA_HOME/lib:$JAVA_HOME/jre/lib:$CLASSPATH
6 source /etc/profile
7 java -version