Skip to content

Instantly share code, notes, and snippets.

View MadisonTBlake's full-sized avatar

MadisonTBlake

View GitHub Profile
@MadisonTBlake
MadisonTBlake / javascriptTypeChecker.js
Created March 16, 2016 20:17
Code to create a database that can be used to check that received JS objects match an expected type.
/**
* An object to contain a database of expected types and their signature.
* This database can be used to check received data checking that it is of the type expected.
*/
class Types {
/**
* constructor - Set arrays to be empty
*/
@MadisonTBlake
MadisonTBlake / carProblem.cc
Last active February 5, 2016 22:35
This code is dirty and quick.
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <string.h>
#include <assert.h>
//#include <math.h>
#include <cmath>
#include <memory>
#include <functional>
@MadisonTBlake
MadisonTBlake / AverageFrame.m
Created April 8, 2014 23:58
Computes the average of each pixel in a video file.
filepath = 'C:\\bf4 2013-12-07 02-22-08-62.avi';
clc;
try
v_handle = VideoReader(filepath);
% video_frames = read(v_handle);
catch err
error('prog:input', 'Invalid filepath! Enter as ''C:\\filelocation\\file.avi'' ');
end
numFrames = v_handle.NumberOfFrames;