Skip to content

Instantly share code, notes, and snippets.

View jacksongabbard's full-sized avatar
🐺
Some people think it's freakish, but they can't deny the harvest.

Jackson Gabbard jacksongabbard

🐺
Some people think it's freakish, but they can't deny the harvest.
View GitHub Profile
.magic {
background: linear-gradient(0deg, #888 0%, #444 100%);
border-radius: 100%;
height: 300px;
left: 0;
margin: 25px;
position: absolute;
top: 0;
transition: width 0.25s, height 0.25s, top 0.25s, left 0.25s;
width: 300px;
function findLargestRectangle(hist) {
var h, pos;
var tempH, tempPos;
var hStack = [];
var posStack = [];
var maxSize = -Infinity;
var tempSize = 0;
function popThatShit() {
tempH = hStack.pop();
function findBestFittingSubrange(
original, replacement) {
var ii;
var jj;
var distance;
var distanceSum;
var smallestDistanceSum = Infinity;
var smallestDistanceSumIndex;
import itertools
def findDinnerParty(friends, tableSize):
groups = combineFriends(friends, tableSize)
print "%d groups" % len(groups)
print groups
recursions = 0;
def combineFriends(friends, tableSize, groups=[], group=[], pos=0):
global recursions
<?php
$calendar = array(
array(1, 2, 'a'),
// These two conflict
array(2, 4, 'b'),
array(3, 5, 'c'),
array(6, 8, 'd'),
#include <iostream>
#include <vector>
using namespace std;
void print(const vector<int>& vec) {
vector<int>::const_iterator it = vec.begin();
while(it < (vec.end() - 1)) {
cout << *it << ',';
advance(it, 1);
}