Is the man half-machine or is the machine half-man?
Stuff I've done:
- In-world color sprite editor, inspired by ChromalBrodsky
- Sim performance stats (developed independently of ChromalBrodsky; now dormant)
- Example Ruby code for the XMLRPCImplementations page
- Wrote some functions:
integer gsDayOfWeek(integer year, integer month, integer day): Returns day of week for given year/month/day. 0 = Sunday, 1 = Monday, 2 = Tuesday, etc. From a formula from Claus T?ndering's Calendar FAQ.
integer gsDayOfWeek(integer year, integer month, integer day) {
integer a = (14-month)/12;
integer y = year - a;
integer m = month + (12 * a) - 2;
return (day + y + (y/4) - (y/100) + (y/400) + ((31*m)/12)) % 7;
}
string gsNormalizeString(string str): 'Normalizes' str (i.e., lowercases it and removes characters that may be illegal for whatever reason). Obviously, you can change the badchars to match whatever characters might be 'bad' for your particular application.
string gsNormalizeString(string str) {
string badchars = "!@#$%^&*()[]{}<>,;':/\\\" =|?"; // " // The LSL editor's syntax highlighting was fixed, but the wiki's was not!
string replace = "_";
integer x;
integer y;
str = llToLower(str);
for (x = 0; x < llStringLength(badchars); x++) {
do {
y = llSubStringIndex(str,llGetSubString(badchars,x,x));
if (y != -1) {
str = llDeleteSubString(str,y,y);
str = llInsertString(str,y,replace);
}
} while (y != -1);
}
return str;
}
string gsSubstituteString(string source, string pattern, string replacement): Replaces all occurrences of pattern in source with replacement.