This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.File; | |
import java.io.FileInputStream; | |
import java.util.ArrayList; | |
import java.util.List; | |
import java.util.PriorityQueue; | |
import java.util.Scanner; | |
public class BfsShortestDijkstra { | |
public static class Node implements Comparable<Node>{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Arrays; | |
public class NQueensBacktracking { | |
public static void main(String[] args) { | |
greedyRunner(8); | |
greedyRunner(10); | |
greedyRunner(15); | |
greedyRunner(20); | |
greedyRunner(22); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package hackerrank; | |
public class StackWithMinVal { | |
public class Node<T extends Comparable<T>> { | |
public T value; | |
public Node<T> prev; | |
@Override | |
public String toString() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package derp; | |
import java.util.Arrays; | |
import java.util.HashMap; | |
import java.util.List; | |
import java.util.Map; | |
import java.util.Stack; | |
public class BalanceDelimiters { | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import time | |
import math | |
import urllib2 | |
import json | |
import traceback | |
ser = None | |
MARKIT_PAUSE = 3 | |
#MOUNT = "/dev/ttyACM0" #raspi | |
MOUNT = "COM3" #windows |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu:14.04 | |
RUN apt-get update | |
RUN apt-get install -y git git-core nodejs npm memcached mongodb | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Call some method that may throw an exception! | |
private void derp() throws Exception { | |
somethingDangerous(); | |
} | |
private void derpCaller() { | |
try { | |
derp(); | |
} catch (Exception e) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// http://answers.squarespace.com/questions/17107/how-can-i-have-the-image-change-with-the-variant-on-my-product-pages | |
jQuery(document).ready(function(){ | |
var variantList = []; | |
// secret data stored in variants | |
jQuery('.product-variants').hide(); | |
jQuery.each($('.product-variants'), function(i){ | |
var variant = this; | |
console.log("Variant:"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# This is a simple deploy script to create a .zip file of your theme | |
# The first argument passed becomes the .zip filename. | |
echo "Building site for packaging..." | |
grunt build | |
echo "Begin zipping..." | |
FILE="roots-deploy-theme.zip" | |
if [ ! -z "$1" ] | |
then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div> | |
<a href=''> | |
<img class="image-swap-hover" | |
data-hover="http://i.imgur.com/EHQCuwT.png" | |
src="http://i.imgur.com/6xd21Qy.png" | |
width="500" | |
alt="Pikachu" /> | |
</a> | |
</div> | |
<script> |