Skip to content

Instantly share code, notes, and snippets.

@mizzao
mizzao / jquery.draggable.js
Last active August 29, 2015 13:58 — forked from keriati/jquery.draggable.js
That code was a pile of shit, and couldn't handle a lot of things - among others, the handle not being a direct child of the draggable, and binding a billion event handlers, etc
(function($) {
$.fn.drags = function(opt) {
opt = $.extend({handle:"",cursor:"move"}, opt);
if(opt.handle === "") {
var $el = this;
} else {
var $parent = this;
var $el = this.find(opt.handle);
import cplex
import numpy as np
if __name__ == "__main__":
#The histogram data, 250 histograms with 3 bins
prob = cplex.Cplex()
hists = 250
bins = 3
pairs = bins*(bins-1)/2