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
#include <iostream> | |
using std::cout; | |
using std::endl; | |
//#define DEBUG 1 | |
#include <stdlib.h> | |
#include <time.h> | |
void _qsort(int *, int); |
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
This was getting too big... Moved to here: https://github.com/grodtron/LinkedList |
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
Debug/* | |
*.vcxproj* | |
*.o | |
*.swp | |
test |
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
#include <string> | |
#include <iostream> | |
#include <algorithm> | |
using namespace std; | |
/* | |
* | |
* Small program to reverse the order of words in a sentence | |
* |
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
(let [s "(let [s %s] (apply + (map int (format s (pr-str s)))))"] (apply + (map int (format s (pr-str s))))) |
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
clear; | |
clc; | |
% This is a test | |
% This x[n] is a simple square pulse centered at the origin | |
% it can be replaced with any finite-duration signal, as long as | |
% n is updated to match | |
x = [ zeros(1,8) ones(1,5) zeros(1,8) ]; | |
n = -10:10; |
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
#!/bin/bash | |
# A small script to change the color of mono-colored transparent .pngs | |
# | |
# Uses ImageMagick to read the most common 100% alpha color and then computes | |
# scale factors to multiply the whole image by. | |
# | |
# Improvements to be made: | |
# -deal with images containing pure black. | |
# -make portable between new and old ImageMagick versions |
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
(fn [] (let [s "(fn [] (let [s %s] (format s (pr-str s))))"] (format s (pr-str s)))) |
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
/* | |
* This file contains an implementation of the | |
* 64-bit Fowler-Noll-Vo (FNV) hash function. | |
* | |
* More information can be found here; | |
* http://en.wikipedia.org/wiki/Fowler%E2%80%93Noll%E2%80%93Vo_hash_function | |
* | |
* Gordon Bailey - Feb 28, 2012 | |
* | |
*/ |
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/python | |
import optparse | |
def add(opcode,memory=None): | |
dest = ((opcode >> 9) & int( "111",2)) | |
src = ((opcode >> 0) & int( "111",2)) | |
mode = ((opcode >> 3) & int("111111",2)) | |
destType = 'd' if mode == int("001000",2) else 'a' |