Skip to content

Instantly share code, notes, and snippets.

View sergions80's full-sized avatar

Sérgio Neves Sacenti sergions80

View GitHub Profile
@sergions80
sergions80 / date.js
Created March 9, 2016 16:23
Complete Example Module Template
/** Utility methods for handling dates
@class Dates
@static
*/
var Dates = (function($) {
"use strict";
/** Lets you know if a supplied date is a Monday
@sergions80
sergions80 / dates.js
Created March 9, 2016 16:22
Simple Module Template
var Dates = (function($) {
"use strict";
return {
@sergions80
sergions80 / gist:2d31f674e5d3b1948657
Last active August 29, 2015 14:16
Batch Insert In Java – JDBC
/*
* This is a simplest solution. Consider a batch size like 1000
* and insert queries in the batches of 1000 queries at a time.
*/
String sql = "insert into employee (name, city, phone) values (?, ?, ?)";
Connection connection = new getConnection();
PreparedStatement ps = connection.prepareStatement(sql);
final int batchSize = 1000;