Open main menu

CDOT Wiki β

Changes

User:Dhhodgin

1,098 bytes added, 08:10, 30 September 2010
About Me
== About Me ==
I'm a 5th 7th Semester BSD student taking DPS909DPS901. Working part time on an ASP.NET c# application.
==Technical Qualifications==
=== Releases ===
0.4 - [http://dhodgin.wordpress.com/2010/01/25/0-4-and-triage-for-processing-js/ Full Details] Triage and peer-review of outstanding 0.2 and 0.3 code<br/>
0.5 - [http://dhodgin.wordpress.com/2010/02/06/0-5-processing-js-release-contribution/ Full Details] Review of binary() and sort(), rewrote hex(), trim(), some code efficiency cleanup<br />0.6 - wip<br /> 
=== Contributions ===
tbd
=== Week 1 Weekly stuff ===
* Update Wiki
* Prepare for 0.4 release
* schedule demos for Dave in weeks 3, 7, and 10 for 0.4, 0.6, and 0.8 releases.
* Demo 1 - Feb 4 (completed)
== Code Blocks ==
Here is a list of code blocks I have written for the processing.js project<br />
=== trim() ===
Trim leading and trailing whitespace from strings as well as tab characters, newlines, and nbsp characters<br/>
Commit [http://github.com/dhodgin/processing-js/commit/e7f258eec8f566a0da39c23f964280637e8e2a4b trim() commit]<br />
Test available [http://matrix.senecac.on.ca/~dhhodgin/dps911/examples/seneca/trim/trimtest.htm here]<br />
p.trim = function( str ) {
var newstr;
if (typeof str === "object") {
// if str is an array recursivly loop through each element
// and drill down into multiple arrays trimming whitespace
newstr = new Array(0);
for (var i = 0; i < str.length; i++) {
newstr[i] = p.trim(str[i]);
}
} else {
// if str is not an array then remove all whitespace, tabs, and returns
newstr = str.replace(/^\s*/,'').replace(/\s*$/,'').replace(/\r*$/,'');
}
return newstr;
};
=== decimalToHex() ===
A helper function used with hex to convert a number passed in to hex and add any specified padding
=== hex() ===
hex(x, y) function for processing. x is a byte, char, int, or color. y is the length of the string to return.<br />commit Commit [http://github.com/dhodgin/processing-js/commit/d51adccc9acfeb4fa286366c98e06a33ad296524 hex() commit]<br />test Test available [http://matrix.senecac.on.ca/~dhhodgin/dps911/hextest.htm here]<br /><br />
// note: since we cannot keep track of byte, char, and int types by default the returned string is 8 chars long
// if no 2nd argument is passed. closest compromise we can use to match java implementation Feb 5 2010
1
edit