Difference between revisions of "User:Niaht Nakamichi"
(Added three datatype tests) |
m (→Datatype Tests) |
||
Line 30: | Line 30: | ||
Here are some quick and dirty datatype tests.. so far they work for me. They have not been optimized. | Here are some quick and dirty datatype tests.. so far they work for me. They have not been optimized. | ||
===isInteger=== | |||
<lsl> | <lsl> | ||
integer isInteger(string s) { | integer isInteger(string s) { | ||
Line 42: | Line 43: | ||
return TRUE; | return TRUE; | ||
} | } | ||
</lsl> | |||
===isFloat=== | |||
<lsl> | |||
integer isFloat(string s) { | integer isFloat(string s) { | ||
if (s != "") { | if (s != "") { | ||
Line 58: | Line 62: | ||
return FALSE; | return FALSE; | ||
} | } | ||
</lsl> | |||
===isVector=== | |||
'''Note:''' Uses 'isFloat' above . . . | |||
<lsl> | |||
integer isVector(string s) { | integer isVector(string s) { | ||
list f; | list f; | ||
Line 64: | Line 72: | ||
if ((rotation)s) return FALSE; // don't accept rotations | if ((rotation)s) return FALSE; // don't accept rotations | ||
if ((vector)s) return TRUE; // accept any positive valid | if ((vector)s) return TRUE; // accept any positive valid | ||
// Everything past here is | // Everything past here is mostly for testing for a proper ZERO vector, so possibly excessive. | ||
if (llSubStringIndex(s, "<") == 0) | if (llSubStringIndex(s, "<") == 0) | ||
if (llSubStringIndex(s, ">") == (llStringLength(s) - 1)) | if (llSubStringIndex(s, ">") == (llStringLength(s) - 1)) | ||
Line 76: | Line 84: | ||
} | } | ||
</lsl> | </lsl> | ||
==Client Library Changes== | ==Client Library Changes== |
Revision as of 20:42, 23 April 2008
About Me
I am a generalist. I was once a systems engineer and the head of an IT department.
Boredom comes easily to me.
Every now and again I build a website for someone; I do not have my own.
I like SecondLife.
XXTEA Cipher
This is something I decided to do for no good reason. It probably isn't optimal, and it probably needs work, but it works. At some point it might want to be integrated into the XTEA page, or get its own page. Feel free to comment on my Talk Page
Code references used:
Note: I can not take any real credit for this work. I just made the pre-existing code function in LSL.
<lsl>
// Code coming later...
</lsl>
Datatype Tests
Here are some quick and dirty datatype tests.. so far they work for me. They have not been optimized.
isInteger
<lsl> integer isInteger(string s) {
if (s != "") { integer i; integer l = llStringLength(s); do { if(! ~llListFindList(["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"], (list)llGetSubString(s, i, i))) return FALSE; ++i; } while (i < l); } return TRUE;
} </lsl>
isFloat
<lsl> integer isFloat(string s) {
if (s != "") { integer i; integer d; string c; integer l = llStringLength(s); do { c = llGetSubString(s, i, i); if (! ~llListFindList([".", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9"], (list)c)) return FALSE; if (c == ".") ++d; if (d > 1) return FALSE; ++i; } while (i < l); return TRUE; } return FALSE;
} </lsl>
isVector
Note: Uses 'isFloat' above . . . <lsl> integer isVector(string s) {
list f; integer i = 0; if ((rotation)s) return FALSE; // don't accept rotations if ((vector)s) return TRUE; // accept any positive valid // Everything past here is mostly for testing for a proper ZERO vector, so possibly excessive. if (llSubStringIndex(s, "<") == 0) if (llSubStringIndex(s, ">") == (llStringLength(s) - 1)) if (llGetListLength(f = llParseString2List(s, ["<",">", " "], [","])) == 5) if (isFloat(llList2String(f, 0))) if (llList2String(f, 1) == ",") if (isFloat(llList2String(f, 0))) if (llList2String(f, 3) == ",") if (isFloat(llList2String(f, 4))) return TRUE; return FALSE;
} </lsl>
Client Library Changes
These are the changes to the SL client libraries since 1.13.1.12. I don't expect this to be perfect, nor presented in the best possible way. This is mostly intended for me so that I don't loose this data. If this helps you in some way, and you have suggestions on how to make it better, please feel free to do so on my Talk Page
The emerging patterns are already becoming clear, and I can see that I will be able to reduce the changes down to named library changes instead of listing any files.
From | To | Changes |
1.13.2.13 | 1.13.2.15 | None |
1.13.2.15 | 1.13.3.2 | None |
1.13.3.2 | 1.14.0.0 |
Files Removed
Files Changed
New Files
|
1.14.0.0 | 1.14.0.1 | None |
1.14.0.1 | 1.15.0.2 |
Files Changed
New Files
|
1.15.0.2 | 1.15.1.3 |
Files Changed
|
1.15.1.3 | 1.16.0.5 |
Files Changed
|
1.16.0.5 | 1.17.0.12 |
Files Changed
Files Removed
New Files
|
1.17.0.12 | 1.17.1.0 |
Files Changed
New Files
|
1.17.1.0 | 1.17.2.0 | None |
1.17.2.0 | 1.17.3.0 | None |
1.17.3.0 | 1.18.0.6 |
Files Changed
|
1.18.0.6 | 1.18.1.2 | |
1.18.1.2 | 1.18.2.0 | |
1.18.2.0 | 1.18.2.1 | |
1.18.2.1 | RC-1.18.3.2 | |
RC-1.18.3.2 | RC-1.18.3.3 | |
RC-1.18.3.3 | RC-1.18.3.4 | None |
RC-1.18.3.4 | RC-1.18.3.5 | |
RC-1.18.3.5 | RC-1.18.4.0 | |
RC-1.18.4.0 | RC-1.18.4.1 | None |
RC-1.18.4.1 | RC-1.18.4.2 | None |
RC-1.18.4.2 | 1.18.4.3 | None |
1.18.4.3 | RC-1.18.5.0 | |
RC-1.18.5.0 | RC-1.18.5.1 | |
RC-1.18.5.1 | RC-1.18.5.2 | |
RC-1.18.5.2 | 1.18.5.3 | None |
RC-1.18.5.3 | RC-1.18.6.0 | |
RC-1.18.6.0 | RC-1.18.6.1 | |
RC-1.18.6.1 | RC-1.18.6.2 | |
RC-1.18.6.2 | RC-1.18.6.4 | None |
RC-1.18.6.4 | Branch_1-19.0-Viewer-r79209 | |
Branch_1-19.0-Viewer-r79209 | Branch-1-19.0-Viewer-r79825 | None |
Branch-1-19.0-Viewer-r79825 | Branch-1-19.0-Viewer-r80554 | None |
Branch-1-19.0-Viewer-r80554 | Branch-1-19.0-Viewer-r80803 | None |
Branch-1-19.0-Viewer-r80803 | Branch-1-19.0-Viewer-r81066 | None |
Branch-1-19.0-Viewer-r81066 | Branch-1-19.1-Viewer-r81993 |