Skip to content

Instantly share code, notes, and snippets.

### Keybase proof
I hereby claim:
* I am pedrodsa on github.
* I am pedro_s_talkdesk (https://keybase.io/pedro_s_talkdesk) on keybase.
* I have a public key ASDVXwS_OetJOsTf-OKFEYjMH0NJR9USi1da7thAJC_-5wo
To claim this, I am signing this object:
### Keybase proof
I hereby claim:
* I am pedrodsa on github.
* I am pedro_s_talkdesk (https://keybase.io/pedro_s_talkdesk) on keybase.
* I have a public key ASDVXwS_OetJOsTf-OKFEYjMH0NJR9USi1da7thAJC_-5wo
To claim this, I am signing this object:
@pedrodsa
pedrodsa / SqlScriptRunner.java
Last active August 26, 2016 22:20 — forked from hussachai/SqlScriptRunner.java
SQL Script Runner
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.sql.Connection;
import java.sql.SQLException;
import java.sql.Statement;
// Create new object to cache iframe offsets
$.ui.ddmanager.frameOffsets = {};
// Override the native `prepareOffsets` method. This is almost
// identical to the un-edited method, except for the last part!
$.ui.ddmanager.prepareOffsets = function (t, event) {
var i, j,
m = $.ui.ddmanager.droppables[t.options.scope] || [],
type = event ? event.type : null, // workaround for #2317
list = (t.currentItem || t.element).find(":data(ui-droppable)").addBack(),
// Create new object to cache iframe offsets
$.ui.ddmanager.frameOffsets = {};
// Override the native `prepareOffsets` method. This is almost
// identical to the un-edited method, except for the last part!
$.ui.ddmanager.prepareOffsets = function (t, event) {
var i, j,
m = $.ui.ddmanager.droppables[t.options.scope] || [],
type = event ? event.type : null, // workaround for #2317
list = (t.currentItem || t.element).find(":data(ui-droppable)").addBack(),