Skip to content

Instantly share code, notes, and snippets.

#include <iostream>
#include <vector>
#include <algorithm>
#include <limits>
#include <utility>
#include <string>
#include <unordered_map>
#include <unordered_set>
using namespace std;
@svenoaks
svenoaks / postorder.cpp
Created November 22, 2014 17:15
non recursive post order traversal of a binary tree
// Created by Steve Myers on 11/22/14.
#include <iostream>
#include <stack>
#include <stdexcept>
#include <array>
#include "binarySearchTree.h"
using namespace std;
@svenoaks
svenoaks / preorder.cpp
Last active August 29, 2015 14:10
preorder traversal using custom function
//
// main.cpp
// preorder
//
// Created by Steve Myers on 11/20/14.
#include <iostream>
#include <array>
#include "binarySearchTree.h"
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- google's material design colours from
http://www.google.com/design/spec/style/color.html#color-ui-color-palette -->
<!--reds-->
<color name="md_red_50">#fde0dc</color>
<color name="md_red_100">#f9bdbb</color>
<color name="md_red_200">#f69988</color>
/* Javascript to emulate media queries with events and HTML class toggling
* to avoid duplication, conflict & waste when implemented via
* native CSS implementation + JS feature dependency.
*
* Depends on jQuery and Cowboy's throttle / debounce plugin:
* https://github.com/cowboy/jquery-throttle-debounce
*/
(function(){
var options = {
Module Module1
Dim GlobalWord As String
Class PersonType
Public Sub New()
SecretName = "hushhush"
End Sub
Public Property FirstName As String
//
// main.cpp
// intui
//
// Created by Steve Myers on 6/28/14.
// Copyright (c) 2014 ___SMP_PRODUCTIONS___. All rights reserved.
//
#include <iostream>
#include <list>
package com.smp.soundtouchandroid;
import android.os.AsyncTask;
import android.util.Log;
import com.smp.soundtouchandroid.*;
import java.io.FileOutputStream;
import java.io.IOException;
public class SoundTouchRecorder
@svenoaks
svenoaks / gist:9432055
Created March 8, 2014 15:14
JavaScript invoking "super" functions
// define the Person Class
function Person(name) {
this.name = name;
this.hasSaidHello = false;
}
Person.prototype.walk = function(){
alert ('I am walking!');
};
Person.prototype.sayHello = function(){
@svenoaks
svenoaks / gist:9148060
Last active August 29, 2015 13:56
A very primitive Java web server
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.net.ServerSocket;
import java.net.Socket;
import java.nio.CharBuffer;