This file contains 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
/** | |
* Lists the (at least enumerable) properties of an object. | |
* | |
* @param Object the object to list | |
* @param Number the level to print at (num tabs) | |
* @param Boolean whether or not to print function code | |
* @author Schell Scivally | |
* @since Wed Feb 24 11:10:24 PST 2010 | |
*/ | |
this.dump = function(obj, lvl, pf) { |
This file contains 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
var object = function() { | |
var _privateVariable = 0; | |
function _privateFunction() { | |
alert('i am in a closure'); | |
} | |
function _privateFunctionTwo() { | |
alert('nothing outside the object created by this function can reach me.'); | |
_privateFunction(); |
This file contains 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
/** | |
* Pretty prints xml | |
* | |
* @param String ugly xml | |
* @return String prettier xml | |
* @author Schell Scivally | |
* @since Sun Mar 14 16:16:50 PDT 2010 | |
*/ | |
var formatXml = this.formatXml = function (xml) { | |
var reg = /(>)(<)(\/*)/g; |
This file contains 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
/** | |
* Creates and populates a server with listeners. | |
* | |
* @param request http.ServerRequest | |
* @param response http.ServerResponse | |
* @author Schell Scivally | |
* @since Sat Mar 6 18:20:46 PST 2010 | |
*/ | |
var server = http.createServer(function (request, response) { | |
// put the response in an envelope |
This file contains 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
(defun filter (a b) | |
"Filters out all items in a from b" | |
(if (= 0 (length a)) b | |
(filter (remove (first a) a) (remove (first a) b)))) |
This file contains 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
#!BPY | |
""" | |
Name: 'isom object' | |
Blender: 250 | |
Group: 'Export' | |
Tooltip: 'Exports currently selected object as js file for use with WebGL' | |
Author: Schell Scivally (efnx.com) | |
""" |
This file contains 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
//The following code is by Randolph Franklin, it returns 1 for interior points and 0 for exterior points. | |
int pnpoly(int npol, float *xp, float *yp, float x, float y) | |
{ | |
int i, j, c = 0; | |
for (i = 0, j = npol-1; i < npol; j = i++) { | |
if ((((yp[i] <= y) && (y < yp[j])) || | |
((yp[j] <= y) && (y < yp[i]))) && | |
(x < (xp[j] - xp[i]) * (y - yp[i]) / (yp[j] - yp[i]) + xp[i])) | |
c = !c; |
This file contains 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
svn status | grep ! | cut -c 9- | xargs svn rm |
This file contains 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
function PrivateThing() { | |
var privateVar1 = 0; | |
var privateVar2 = 0; | |
function privateFunction() { | |
alert('i am in a closure private var one ='+privateVar1.toString()); | |
privateVar1++; | |
} | |
function privateFunctionTwo() { | |
alert('nothing outside the object created by this function can reach me. private var two ='+privateVar2.toString()); |
OlderNewer