This file contains hidden or 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
// Nice way to traverse a linked list, | |
// makes it easier to implement methods like deleteIthNode(i), | |
// as was done in assignment 2 and Lab 3 of CSCI 255. | |
// I never thought a "pointer to a pointer" would have ever | |
// made my code simpler to read and reason about but here we are. | |
struct node { | |
int info = 0; | |
node* next = nullptr; | |
node(int el=0, node* n = nullptr) : |
This file contains hidden or 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
#! /usr/bin/env python | |
class MinHeap(object): | |
"""A min heap with a zero based index | |
""" | |
def __init__(self, arr=[]): | |
self.arr = arr | |
self.size = 0 | |
self.build_min_heap() |
This file contains hidden or 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
<!DOCTYPE html> | |
<html> | |
<head> | |
</head> | |
<body> | |
<title> | |
Hosted Checkout: Sample PHP Payment Form | |
</title> | |
<style type="text/css"> | |
label { |
This file contains hidden or 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
class MoveAttributesToRegistrantModel < ActiveRecord::Migration | |
def up | |
Payment.find_each do |payment| | |
registrant = Registrant.create! email: payment.email, | |
first_name: payment.first_name, | |
last_name: payment.last_name | |
payment.registrant_id = registrant.id | |
payment.save! | |
end |
This file contains hidden or 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
<!-- javascript and CSS for dropdown at the top --> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script> | |
<script> | |
var $j = jQuery.noConflict(); | |
$j(document).ready(function() { | |
$j("#flip").click(function() { | |
$j("#panel").slideDown("slow"); | |
}); | |
}); |