Skip to content

Instantly share code, notes, and snippets.

View nehiljain's full-sized avatar

Nehil Jain nehiljain

View GitHub Profile
@nehiljain
nehiljain / comments.tex
Created June 15, 2014 17:16 — forked from priyankt68/comments.tex
Put comments in latex.
\newcount\Comments % 0 suppresses notes to selves in text
\Comments=1 % TODO: set to 0 for final version
% for comments
\usepackage{color}
\definecolor{darkgreen}{rgb}{0,0.5,0}
\definecolor{purple}{rgb}{1,0,1}
% \kibitz{color}{comment} inserts a colored comment in the text
\newcommand{\kibitz}[2]{\ifnum\Comments=1\textcolor{#1}{#2}\fi}
% add yourself here:
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="[add your bin description]" />
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
<script id="jsbin-javascript">
@nehiljain
nehiljain / wqufpc.js
Last active August 29, 2015 14:09
Weigthed Union-Find Dynamic Connectivity with Path Compression (JS implementation) Source http://jsbin.com/ceqeso.
/**
* This is a JS implementation of Weighted Union Find Algorithm with Path Compression
* The way to create private members was derived from http://www.nczonline.net/blog/2014/01/21/private-instance-members-with-weakmaps-in-javascript/
* the Java implementation of the same is found at http://algs4.cs.princeton.edu/15uf/WeightedQuickUnionPathCompressionUF.java.html
* the TopCoder tutorial about Disjoint sets which is an overlapping concept used in the this algorithm is http://community.topcoder.com/tc?module=Static&d1=tutorials&d2=disjointDataStructure
**/
var WeightedUFPathCompression = (function () {
var _privateData = {};
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
<script id="jsbin-javascript">
function BinaryHeap(scoreFunciton) {
@nehiljain
nehiljain / _.md
Last active August 29, 2015 14:13
modified working genechip
@nehiljain
nehiljain / _.md
Created January 14, 2015 23:00
zoomable genechip
@nehiljain
nehiljain / _.md
Last active August 29, 2015 14:13
modified working genechip
@nehiljain
nehiljain / _.md
Last active August 29, 2015 14:18
nehil
@nehiljain
nehiljain / _.md
Created April 7, 2015 04:22
Reusable Bar Char
@nehiljain
nehiljain / _.md
Created April 7, 2015 04:22
Reusable Bar Char