Skip to content

Instantly share code, notes, and snippets.

View bpostlethwaite's full-sized avatar

Ben Postlethwaite bpostlethwaite

View GitHub Profile
@bpostlethwaite
bpostlethwaite / closure.js
Created December 18, 2012 21:06
Run this with a simple node.js http server + simple fileserver (just put the index.html in the public directory and fire it up --- should be similar to how we have it set up in hand-carved html... delete the requests for "filed" and "url" and delete the homespun routing logic.
/*
* To start I would make sure the JQuery func print outs the height
*/
var result = document.getElementById('result');
$("#a").click(function () {
var msg = $(this).height()
result.appendChild( document.createTextNode(msg) )
})
@bpostlethwaite
bpostlethwaite / VectvsLoop.m
Created October 25, 2012 19:52
Vectorized Forward Operator Test
% Test between loop based and vectorized
% Forward Operators.
% Note that dimensions are in G(z,x,y) form as
% per UBC inversion group spec.
% Set up dimensions
N = 6:2:30;
% Outer Test loop
for tt = 1:length(N)