<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.secondlife.com/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Pete+Olihenge</id>
	<title>Second Life Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.secondlife.com/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Pete+Olihenge"/>
	<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/wiki/Special:Contributions/Pete_Olihenge"/>
	<updated>2026-07-25T23:18:39Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.42.1</generator>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=Category_talk:LSL_Integer&amp;diff=1156398</id>
		<title>Category talk:LSL Integer</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=Category_talk:LSL_Integer&amp;diff=1156398"/>
		<updated>2011-11-01T15:30:35Z</updated>

		<summary type="html">&lt;p&gt;Pete Olihenge: /* check if a string contains valid integers */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Are these numbers correct? &amp;quot;values between −2,147,483,648 and +2,147,483,647&amp;quot; . And if they are why the difference between the figures? -- &#039;&#039;&#039;[[User:EddyFragment Robonaught|Eddy]]&#039;&#039;&#039;  &amp;lt;sup&amp;gt;&amp;lt;small&amp;gt;([[User talk:EddyFragment_Robonaught|talk]]|[[Special:Contributions/EddyFragment_Robonaught|contribs]])&amp;lt;/small&amp;gt;&amp;lt;/sup&amp;gt; 17:30, 27 June 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
:Aye correct as saved.&lt;br /&gt;
&lt;br /&gt;
:This truth makes more visual sense in hex. A 32-bit two&#039;s complement integer is 0x0, or +0x1 thru +0x7FFFffff, or -1 thru -0x7FFFffff, or -0x80000000.  In decimal, that is 0, or 1 thru 2147483647, or -1 thru -2147483647, or -2147483648.  The assymetry comes from the zero: both positive integers and zero have the uppermost most bit of the 32 bits zeroed, so the list of positive values loses one element to make room for zero.&lt;br /&gt;
&lt;br /&gt;
:A correspondingly counterintuitive result here is that negating -2147483648 has no effect (-2147483648 == ( 0 - -2147483648 ) == ( 2147483647 + 1 ) ). Ugly as all this is, it&#039;s less ugly than the known alternatives, such as the one&#039;s complement encoding that can have two zeroes: a positive zero and a negative zero.  All that I&#039;m saying here is the convention I remember learning years ago, I imagine LSL behaves this way at these limits, but I haven&#039;t tried to see yet ...  -- [[User:Ppaatt Lynagh|Ppaatt Lynagh]] 18:10, 27 June 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
::Thanx Ppaatt. I thought it might be a zero issue but didn&#039;t get as far as thinking that (of course) there would have to be (as you say) two zeros for the reach (both pos and neg) to be equal. &amp;quot;Positive Zero&amp;quot;. Sounds like a good title for a science fiction novel. Cheers Ppaatt. -- &#039;&#039;&#039;[[User:EddyFragment Robonaught|Eddy]]&#039;&#039;&#039;  &amp;lt;sup&amp;gt;&amp;lt;small&amp;gt;([[User talk:EddyFragment_Robonaught|talk]]|[[Special:Contributions/EddyFragment_Robonaught|contribs]])&amp;lt;/small&amp;gt;&amp;lt;/sup&amp;gt; 18:16, 27 June 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
::In addition to (--2147483648 == -2147483648) so does (-1 * -2147483648). Everyone knows that 1/0 causes a fatal error in integer math but what few people know is that (-2147483648 / -1) does as well on x86 processors (modulo is equally affected). I have yet to find any mention of this on the internet (except where I have posted it), I found it by accident while exploring edge cases (it crashed the sim). In LSL we papered over the exception, any time you divide by -1 we just apply the &amp;quot;-&amp;quot; operator, and for modulo -1 we just return 0. -- &#039;&#039;&#039;[[User:Strife_Onizuka|Strife]]&#039;&#039;&#039; &amp;lt;sup&amp;gt;&amp;lt;small&amp;gt;([[User talk:Strife_Onizuka|talk]]|[[Special:Contributions/Strife_Onizuka|contribs]])&amp;lt;/small&amp;gt;&amp;lt;/sup&amp;gt; 09:27, 29 June 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
::: *insert foot in mouth* http://www.codeguru.com/cpp/sample_chapter/article.php/c11111__3/ -- &#039;&#039;&#039;[[User:Strife_Onizuka|Strife]]&#039;&#039;&#039; &amp;lt;sup&amp;gt;&amp;lt;small&amp;gt;([[User talk:Strife_Onizuka|talk]]|[[Special:Contributions/Strife_Onizuka|contribs]])&amp;lt;/small&amp;gt;&amp;lt;/sup&amp;gt; 10:00, 29 June 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
lolz (although not at the fact that you can do &amp;quot;Integer math&amp;quot;. Now I have to relearn stuff *slumps*). -- &#039;&#039;&#039;[[User:EddyFragment Robonaught|Eddy]]&#039;&#039;&#039;  &amp;lt;sup&amp;gt;&amp;lt;small&amp;gt;([[User talk:EddyFragment_Robonaught|talk]]|[[Special:Contributions/EddyFragment_Robonaught|contribs]])&amp;lt;/small&amp;gt;&amp;lt;/sup&amp;gt; 10:03, 29 June 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Sub-classification Constants/Functions ==&lt;br /&gt;
&lt;br /&gt;
I thought I&#039;d take a quick peek at possible Integer-related Functions.&lt;br /&gt;
A sea of Constants greeted me. Is a Sub classification perhaps useful? --[[User:Vernes Veranes|Vernes]] 00:43, 8 January 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
: [[LSL_101/LSL_in_Focus:_Integers|LSL in Focus: Integers]] classifies how integers are used in LSL, and might be what you are looking for.  The uses are: signed integers, truth values, enumerations and bit vectors.  I think every LSL integer constant clearly falls in exactly one of these four categories.--[[User:Omei Turnbull|Omei Turnbull]] 03:28, 8 January 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Editing this wiki ==&lt;br /&gt;
&lt;br /&gt;
The first sentence on this page reads &amp;quot;An integer data types are signed 32 bit values [...]&amp;quot;; I think this should read &amp;quot;The integer data type is a signed 32 bit value [...]&amp;quot;. Is it ok for me to make relatively minor gramatical corrections to errors like this without consultation, or should I flag my suggestion here first? [[User:Pete Olihenge|Pete Olihenge]] 12:19, 26 January 2010 (UTC)&lt;br /&gt;
: Hi Pete, it is always OK to make the wiki better! We are all editors. It is good to have a thick hide here, stand your ground and have your facts on file if you are challenged ;) --[[User:Cerise Sorbet|Cerise Sorbet]] 13:49, 26 January 2010 (UTC)&lt;br /&gt;
::Thanks Cerise. It is done, and I have my tin foil hat at the ready :) [[User:Pete Olihenge|Pete Olihenge]] 13:57, 26 January 2010 (UTC)&lt;br /&gt;
:::Looks better already. Don&#039;t worry about making mistakes, we all make them, and we will all help fix them. As it turns out, since I&#039;ve been a major contributer of content, a good portion of the mistakes you will be fixing were mine. Sure I take pride in my work, but I take more pride in ensuring that the wiki is the best it can be; whether my contributions stand or fall is of no matter as long as things improve. Contributions can take on several forms, especially after editing: It can be what is written on the page, the ideas on the page but not there form, the form but not the ideas, the layout, the interconnections, the corrections, the usability. None of us control the destiny of the content we contribute, we control not the final form.&lt;br /&gt;
&lt;br /&gt;
:::We operate on the same ideals as Wikipedia and similar guidelines. So without further ado I&#039;ll point you to a Wikipedia article that answers your question better than I can. [http://en.wikipedia.org/wiki/Wikipedia:BB Wikipedia:Be bold] -- &#039;&#039;&#039;[[User:Strife_Onizuka|Strife]]&#039;&#039;&#039; &amp;lt;sup&amp;gt;&amp;lt;small&amp;gt;([[User talk:Strife_Onizuka|talk]]|[[Special:Contributions/Strife_Onizuka|contribs]])&amp;lt;/small&amp;gt;&amp;lt;/sup&amp;gt; 14:50, 26 January 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== check if a string contains valid integers ==&lt;br /&gt;
&lt;br /&gt;
The category tab shows a function to determine whether a string of characters consists only of integers.&lt;br /&gt;
The following would also check that, but I&#039;ve never yet added anything to this wiki, so added this here for comments&lt;br /&gt;
&lt;br /&gt;
   if ((string)((integer)(input)) == input)&lt;br /&gt;
   {&lt;br /&gt;
      llSay(0, &amp;quot;The input contains only valid integers&amp;quot;);&lt;br /&gt;
   }&lt;br /&gt;
[[User:Avi Savira|Avi Savira]] 17:06, 30 October 2011 (PDT)&lt;br /&gt;
&lt;br /&gt;
:Both methods fail on a signed positive integer (&amp;quot;+1234&amp;quot;), but this seems to be way more efficient. If you do put it into the main page, it&#039;d probably be best to do so as a function. [[User:Pete Olihenge|Pete Olihenge]] 08:30, 1 November 2011 (PDT)&lt;/div&gt;</summary>
		<author><name>Pete Olihenge</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=Talk:LlGetObjectDetails&amp;diff=1155719</id>
		<title>Talk:LlGetObjectDetails</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=Talk:LlGetObjectDetails&amp;diff=1155719"/>
		<updated>2011-10-12T22:48:53Z</updated>

		<summary type="html">&lt;p&gt;Pete Olihenge: /* Script time: seconds per what? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Caveats state - &amp;quot;An empty list is also returned if the key given was an item in inventory (object or agent).&amp;quot; How exactly can you have an agent in inventory? -- [[File:Eddy_CUBE_jpg.jpg|45px|link=User:EddyFragment Robonaught]]&#039;&#039;&#039;[[User:EddyFragment Robonaught|Eddy]]&#039;&#039;&#039;  &amp;lt;sup&amp;gt;&amp;lt;small&amp;gt;([[User talk:EddyFragment_Robonaught|talk]]|[[Special:Contributions/EddyFragment_Robonaught|contribs]])&amp;lt;/small&amp;gt;&amp;lt;/sup&amp;gt; 05:46, 20 August 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
Never mind. Just slightly confusing grammar (fixed). -- [[File:Eddy_CUBE_jpg.jpg|45px|link=User:EddyFragment Robonaught]]&#039;&#039;&#039;[[User:EddyFragment Robonaught|Eddy]]&#039;&#039;&#039;  &amp;lt;sup&amp;gt;&amp;lt;small&amp;gt;([[User talk:EddyFragment_Robonaught|talk]]|[[Special:Contributions/EddyFragment_Robonaught|contribs]])&amp;lt;/small&amp;gt;&amp;lt;/sup&amp;gt; 05:50, 20 August 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Script time: seconds per what? ==&lt;br /&gt;
&lt;br /&gt;
What, exactly, is the value returned by OBJECT_SCRIPT_TIME? &amp;quot;The total amount of average script CPU time used by the object or agent, in seconds&amp;quot;; but over what period of time is that measured? Per frame? Per second? Surely not the entire lifetime of the script? {{Unsigned|Pete Olihenge|06:38, 9 October 2011}}&lt;br /&gt;
&lt;br /&gt;
:I think it is likely time used in the last minute but I could be wrong. It may be the same value as &amp;quot;the average script time per frame for the last 30 minutes for all scripts on the object&amp;quot; [[Viewerhelp:Top_Colliders_and_Top_Scripts]] -- &#039;&#039;&#039;[[User:Strife_Onizuka|Strife]]&#039;&#039;&#039; &amp;lt;sup&amp;gt;&amp;lt;small&amp;gt;([[User talk:Strife_Onizuka|talk]]|[[Special:Contributions/Strife_Onizuka|contribs]])&amp;lt;/small&amp;gt;&amp;lt;/sup&amp;gt; 11:03, 11 October 2011 (PDT)&lt;br /&gt;
&lt;br /&gt;
::It would be nice to pin this down to something specific, but I guess it can only be used as a comparator for now. Thanks. [[User:Pete Olihenge|Pete Olihenge]] 11:41, 11 October 2011 (PDT)&lt;br /&gt;
&lt;br /&gt;
::: Wot? Maestro put it all right on the [[OBJECT_SCRIPT_TIME]] page. It works just like top scripts. Half hour per-frame avg, or per-frame avg since region entry, whichever&#039;s shorter. --[[User:Incoherendt Randt|Incoherendt Randt]] 13:29, 12 October 2011 (PDT)&lt;br /&gt;
&lt;br /&gt;
:::Oops! Yeah, I never looked at that. I guess that&#039;s as specific as it gets. Thanks, Incoherendt. :) [[User:Pete Olihenge|Pete Olihenge]] 15:47, 12 October 2011 (PDT)&lt;/div&gt;</summary>
		<author><name>Pete Olihenge</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=Talk:LlGetObjectDetails&amp;diff=1155718</id>
		<title>Talk:LlGetObjectDetails</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=Talk:LlGetObjectDetails&amp;diff=1155718"/>
		<updated>2011-10-12T22:47:14Z</updated>

		<summary type="html">&lt;p&gt;Pete Olihenge: /* Script time: seconds per what? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Caveats state - &amp;quot;An empty list is also returned if the key given was an item in inventory (object or agent).&amp;quot; How exactly can you have an agent in inventory? -- [[File:Eddy_CUBE_jpg.jpg|45px|link=User:EddyFragment Robonaught]]&#039;&#039;&#039;[[User:EddyFragment Robonaught|Eddy]]&#039;&#039;&#039;  &amp;lt;sup&amp;gt;&amp;lt;small&amp;gt;([[User talk:EddyFragment_Robonaught|talk]]|[[Special:Contributions/EddyFragment_Robonaught|contribs]])&amp;lt;/small&amp;gt;&amp;lt;/sup&amp;gt; 05:46, 20 August 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
Never mind. Just slightly confusing grammar (fixed). -- [[File:Eddy_CUBE_jpg.jpg|45px|link=User:EddyFragment Robonaught]]&#039;&#039;&#039;[[User:EddyFragment Robonaught|Eddy]]&#039;&#039;&#039;  &amp;lt;sup&amp;gt;&amp;lt;small&amp;gt;([[User talk:EddyFragment_Robonaught|talk]]|[[Special:Contributions/EddyFragment_Robonaught|contribs]])&amp;lt;/small&amp;gt;&amp;lt;/sup&amp;gt; 05:50, 20 August 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Script time: seconds per what? ==&lt;br /&gt;
&lt;br /&gt;
What, exactly, is the value returned by OBJECT_SCRIPT_TIME? &amp;quot;The total amount of average script CPU time used by the object or agent, in seconds&amp;quot;; but over what period of time is that measured? Per frame? Per second? Surely not the entire lifetime of the script? {{Unsigned|Pete Olihenge|06:38, 9 October 2011}}&lt;br /&gt;
&lt;br /&gt;
:I think it is likely time used in the last minute but I could be wrong. It may be the same value as &amp;quot;the average script time per frame for the last 30 minutes for all scripts on the object&amp;quot; [[Viewerhelp:Top_Colliders_and_Top_Scripts]] -- &#039;&#039;&#039;[[User:Strife_Onizuka|Strife]]&#039;&#039;&#039; &amp;lt;sup&amp;gt;&amp;lt;small&amp;gt;([[User talk:Strife_Onizuka|talk]]|[[Special:Contributions/Strife_Onizuka|contribs]])&amp;lt;/small&amp;gt;&amp;lt;/sup&amp;gt; 11:03, 11 October 2011 (PDT)&lt;br /&gt;
&lt;br /&gt;
::It would be nice to pin this down to something specific, but I guess it can only be used as a comparator for now. Thanks. [[User:Pete Olihenge|Pete Olihenge]] 11:41, 11 October 2011 (PDT)&lt;br /&gt;
&lt;br /&gt;
::: Wot? Maestro put it all right on the [[OBJECT_SCRIPT_TIME]] page. It works just like top scripts. Half hour per-frame avg, or per-frame avg since region entry, whichever&#039;s shorter. --[[User:Incoherendt Randt|Incoherendt Randt]] 13:29, 12 October 2011 (PDT)&lt;br /&gt;
&lt;br /&gt;
:::Oops! Yeah, I never looked at that. I guess that&#039;s as specific as it gets. Thanks, Incoherent. :) [[User:Pete Olihenge|Pete Olihenge]] 15:47, 12 October 2011 (PDT)&lt;/div&gt;</summary>
		<author><name>Pete Olihenge</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=Talk:LlGetObjectDetails&amp;diff=1155649</id>
		<title>Talk:LlGetObjectDetails</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=Talk:LlGetObjectDetails&amp;diff=1155649"/>
		<updated>2011-10-11T18:41:35Z</updated>

		<summary type="html">&lt;p&gt;Pete Olihenge: /* Script time: seconds per what? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Caveats state - &amp;quot;An empty list is also returned if the key given was an item in inventory (object or agent).&amp;quot; How exactly can you have an agent in inventory? -- [[File:Eddy_CUBE_jpg.jpg|45px|link=User:EddyFragment Robonaught]]&#039;&#039;&#039;[[User:EddyFragment Robonaught|Eddy]]&#039;&#039;&#039;  &amp;lt;sup&amp;gt;&amp;lt;small&amp;gt;([[User talk:EddyFragment_Robonaught|talk]]|[[Special:Contributions/EddyFragment_Robonaught|contribs]])&amp;lt;/small&amp;gt;&amp;lt;/sup&amp;gt; 05:46, 20 August 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
Never mind. Just slightly confusing grammar (fixed). -- [[File:Eddy_CUBE_jpg.jpg|45px|link=User:EddyFragment Robonaught]]&#039;&#039;&#039;[[User:EddyFragment Robonaught|Eddy]]&#039;&#039;&#039;  &amp;lt;sup&amp;gt;&amp;lt;small&amp;gt;([[User talk:EddyFragment_Robonaught|talk]]|[[Special:Contributions/EddyFragment_Robonaught|contribs]])&amp;lt;/small&amp;gt;&amp;lt;/sup&amp;gt; 05:50, 20 August 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Script time: seconds per what? ==&lt;br /&gt;
&lt;br /&gt;
What, exactly, is the value returned by OBJECT_SCRIPT_TIME? &amp;quot;The total amount of average script CPU time used by the object or agent, in seconds&amp;quot;; but over what period of time is that measured? Per frame? Per second? Surely not the entire lifetime of the script? {{Unsigned|Pete Olihenge|06:38, 9 October 2011}}&lt;br /&gt;
&lt;br /&gt;
:I think it is likely time used in the last minute but I could be wrong. It may be the same value as &amp;quot;the average script time per frame for the last 30 minutes for all scripts on the object&amp;quot; [[Viewerhelp:Top_Colliders_and_Top_Scripts]] -- &#039;&#039;&#039;[[User:Strife_Onizuka|Strife]]&#039;&#039;&#039; &amp;lt;sup&amp;gt;&amp;lt;small&amp;gt;([[User talk:Strife_Onizuka|talk]]|[[Special:Contributions/Strife_Onizuka|contribs]])&amp;lt;/small&amp;gt;&amp;lt;/sup&amp;gt; 11:03, 11 October 2011 (PDT)&lt;br /&gt;
&lt;br /&gt;
::It would be nice to pin this down to something specific, but I guess it can only be used as a comparator for now. Thanks. [[User:Pete Olihenge|Pete Olihenge]] 11:41, 11 October 2011 (PDT)&lt;/div&gt;</summary>
		<author><name>Pete Olihenge</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=Talk:LlGetObjectDetails&amp;diff=1155577</id>
		<title>Talk:LlGetObjectDetails</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=Talk:LlGetObjectDetails&amp;diff=1155577"/>
		<updated>2011-10-09T11:38:37Z</updated>

		<summary type="html">&lt;p&gt;Pete Olihenge: /* Script time: seconds per what? */ new section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Caveats state - &amp;quot;An empty list is also returned if the key given was an item in inventory (object or agent).&amp;quot; How exactly can you have an agent in inventory? -- [[File:Eddy_CUBE_jpg.jpg|45px|link=User:EddyFragment Robonaught]]&#039;&#039;&#039;[[User:EddyFragment Robonaught|Eddy]]&#039;&#039;&#039;  &amp;lt;sup&amp;gt;&amp;lt;small&amp;gt;([[User talk:EddyFragment_Robonaught|talk]]|[[Special:Contributions/EddyFragment_Robonaught|contribs]])&amp;lt;/small&amp;gt;&amp;lt;/sup&amp;gt; 05:46, 20 August 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
Never mind. Just slightly confusing grammar (fixed). -- [[File:Eddy_CUBE_jpg.jpg|45px|link=User:EddyFragment Robonaught]]&#039;&#039;&#039;[[User:EddyFragment Robonaught|Eddy]]&#039;&#039;&#039;  &amp;lt;sup&amp;gt;&amp;lt;small&amp;gt;([[User talk:EddyFragment_Robonaught|talk]]|[[Special:Contributions/EddyFragment_Robonaught|contribs]])&amp;lt;/small&amp;gt;&amp;lt;/sup&amp;gt; 05:50, 20 August 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Script time: seconds per what? ==&lt;br /&gt;
&lt;br /&gt;
What, exactly, is the value returned by OBJECT_SCRIPT_TIME? &amp;quot;The total amount of average script CPU time used by the object or agent, in seconds&amp;quot;; but over what period of time is that measured? Per frame? Per second? Surely not the entire lifetime of the script?&lt;/div&gt;</summary>
		<author><name>Pete Olihenge</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=Category_talk:LSL_Pie_Menu&amp;diff=1036422</id>
		<title>Category talk:LSL Pie Menu</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=Category_talk:LSL_Pie_Menu&amp;diff=1036422"/>
		<updated>2010-09-15T18:38:23Z</updated>

		<summary type="html">&lt;p&gt;Pete Olihenge: Pie menu is now &amp;quot;context&amp;quot; or &amp;quot;right-click&amp;quot; menu in Viewer 2&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Pie menu is now &amp;quot;context&amp;quot; or &amp;quot;right-click&amp;quot; menu in Viewer 2 ==&lt;br /&gt;
&lt;br /&gt;
Discuss. [[User:Pete Olihenge|Pete Olihenge]] 18:38, 15 September 2010 (UTC)&lt;/div&gt;</summary>
		<author><name>Pete Olihenge</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=LlSetTouchText&amp;diff=1036412</id>
		<title>LlSetTouchText</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=LlSetTouchText&amp;diff=1036412"/>
		<updated>2010-09-15T18:36:31Z</updated>

		<summary type="html">&lt;p&gt;Pete Olihenge: changed &amp;quot;pie&amp;quot; to &amp;quot;right-click&amp;quot; in the description, wrt to Viewer 2&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Issues/SVC-4870}}{{LSL_Function&lt;br /&gt;
|func=llSetTouchText&lt;br /&gt;
|sort=SetTouchText&lt;br /&gt;
|func_id=241|func_sleep=0.0|func_energy=10.0&lt;br /&gt;
|p1_type=string|p1_name=text&lt;br /&gt;
|func_footnote=This is very similar to [[LlSetSitText]].&amp;lt;br/&amp;gt;&lt;br /&gt;
To restore the default value, use an empty string for &#039;&#039;&#039;text&#039;&#039;&#039;.&amp;lt;br/&amp;gt;&lt;br /&gt;
To make it appear as if there is no text, use some combination of whitespace characters for &#039;&#039;&#039;text&#039;&#039;&#039;.&lt;br /&gt;
|func_desc=Displays &#039;&#039;&#039;text&#039;&#039;&#039; rather than the default &amp;quot;Touch&amp;quot; in the right-click menu&lt;br /&gt;
|return_text&lt;br /&gt;
|spec&lt;br /&gt;
|caveats=*&#039;&#039;&#039;text&#039;&#039;&#039; will only be displayed if set by a script calling this function in the root. If &#039;&#039;&#039;text&#039;&#039;&#039; is set by a script in a child the &#039;&#039;&#039;text&#039;&#039;&#039; will only be displayed after unlinking it or relinking it as the root. If either a child or the root is selected as an individual prim and right clicked, the &#039;&#039;&#039;text&#039;&#039;&#039; displayed will be the default even if a script in the root has set &#039;&#039;&#039;text&#039;&#039;&#039;. More simply - The &#039;&#039;&#039;text&#039;&#039;&#039; property displayed on right click will always be that of the root unless, right clicking a prim under individual edit when it will always be the LL default.&lt;br /&gt;
*Note that like particles, and the other set text functions, all &#039;&#039;&#039;text&#039;&#039;&#039; set via llSetTouchText becomes a property of a  prim, not a script. For that reason, the &#039;&#039;&#039;text&#039;&#039;&#039; will remain if the script that set it is deactivated or even removed.&lt;br /&gt;
*You have no control over the face, size or colour of the displayed &#039;&#039;&#039;text&#039;&#039;&#039;.&lt;br /&gt;
*&#039;&#039;&#039;text&#039;&#039;&#039; is limited to 9 characters.&lt;br /&gt;
|examples=&lt;br /&gt;
&amp;lt;lsl&amp;gt;default&lt;br /&gt;
{&lt;br /&gt;
    state_entry()&lt;br /&gt;
    {&lt;br /&gt;
        llSetTouchText(&amp;quot;Touch me!&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
    touch_start(integer detected)&lt;br /&gt;
    {&lt;br /&gt;
        llSay(0, &amp;quot;you touched me!&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
|constants&lt;br /&gt;
|helpers&lt;br /&gt;
|also_functions={{LSL DefineRow||[[llSetSitText]]}}&lt;br /&gt;
|also_events&lt;br /&gt;
|also_tests&lt;br /&gt;
|also_articles={{LSL DefineRow||{{LSLGC|Touch}}}}&lt;br /&gt;
|notes&lt;br /&gt;
|permission&lt;br /&gt;
|negative_index&lt;br /&gt;
|sort=SetTouchText&lt;br /&gt;
|cat1=Pie Menu&lt;br /&gt;
|cat2=Touch&lt;br /&gt;
|cat3=Text&lt;br /&gt;
|cat4=Prim&lt;br /&gt;
|cat5=Effects&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Pete Olihenge</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=LlGetOwner&amp;diff=1009052</id>
		<title>LlGetOwner</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=LlGetOwner&amp;diff=1009052"/>
		<updated>2010-08-17T17:34:23Z</updated>

		<summary type="html">&lt;p&gt;Pete Olihenge: Added caveat re group deeded object&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{LSL_Function&lt;br /&gt;
|func_id=117|func_sleep=0.0|func_energy=10.0&lt;br /&gt;
|func=llGetOwner|sort=GetOwner&lt;br /&gt;
|return_type=key&lt;br /&gt;
|func_footnote&lt;br /&gt;
|func_desc&lt;br /&gt;
|return_text=that is the object owner&#039;s [[UUID]].&lt;br /&gt;
|spec&lt;br /&gt;
|caveats=*When the owner of an object changes, code that depends on this function&#039;s return value will not automatically update for the new owner or be automatically re-evaluated.&lt;br /&gt;
**This requires the reregistration of [[llListen|listens]] and  [[llRequestPermissions|requesting of permissions]] from the new owner as needed.&lt;br /&gt;
***This is not limited to listens and permissions but anything that caches the return value, it is up to the programmer to work around this limitation.&lt;br /&gt;
**Detection of owner change can be achieved with the [[changed]] event in conjunction with the [[CHANGED_OWNER]] flag (see the second example) or by storing the old value and periodically (e.g. in [[on_rez]]) checking if it has changed. Both techniques are valid though the latter will not detect the sale of the object if it is sold with &amp;quot;sell original&amp;quot; in-world and not picked up.&lt;br /&gt;
*When the object is deeded to a group, the UUID returned is that of the group.&lt;br /&gt;
|constants&lt;br /&gt;
|examples=&lt;br /&gt;
&amp;lt;lsl&amp;gt;llOwnerSay( (string)llGetOwner()); // speaks in chat the &amp;quot;key&amp;quot; (UUID code) of the avatar.&lt;br /&gt;
llOwnerSay( llKey2Name(llGetOwner())); // speaks in chat the name of the owner if in the sim.&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;default&lt;br /&gt;
{&lt;br /&gt;
    state_entry()&lt;br /&gt;
    {&lt;br /&gt;
        llInstantMessage(llGetOwner(), &amp;quot;Only you can hear me. Isn&#039;t that eerie.&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    changed(integer change)&lt;br /&gt;
    {&lt;br /&gt;
        if (change &amp;amp; CHANGED_OWNER)&lt;br /&gt;
            llResetScript();&lt;br /&gt;
    }&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
|helpers&lt;br /&gt;
|also_functions=&lt;br /&gt;
{{LSL DefineRow||[[llGetCreator]]|}}&lt;br /&gt;
{{LSL DefineRow||[[llGetOwnerKey]]|}}&lt;br /&gt;
{{LSL DefineRow||[[llDetectedOwner]]|}}&lt;br /&gt;
|also_tests&lt;br /&gt;
|also_events&lt;br /&gt;
|also_articles&lt;br /&gt;
|notes=&lt;br /&gt;
To retrieve the owners name while the owner is in the region use [[llKey2Name]], [[llRequestAgentData]] should be used when the owner is not in the region.&lt;br /&gt;
&lt;br /&gt;
The one problem many coders come up against is that previously-activated events referring to the owner don&#039;t automatically change when the owner changes.  The most often-seen result is a listen registered to owner will continue to listen to the PREVIOUS owner rather than the CURRENT owner.  It is often confused as a bug in [[llGetOwner]] or [[llListen]] it is not in fact a bug but part of the design.  There are several ways of working around this problem.  The easy solution is to reset the script when owner changes or it is rezzed. The easy solution is not always the right solution.&lt;br /&gt;
&lt;br /&gt;
There are two ways to detect if the owner has changed, the most reliable is to use the [[changed]] event.&lt;br /&gt;
&amp;lt;lsl&amp;gt;changed(integer change)&lt;br /&gt;
{&lt;br /&gt;
    if (change &amp;amp; CHANGED_OWNER)//if owner changes, reset the script.&lt;br /&gt;
        llResetScript();&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In many applications resetting the script when the object is rezzed is an adequate and easy solution.&lt;br /&gt;
&amp;lt;lsl&amp;gt;on_rez(integer start_param)&lt;br /&gt;
{ //when the object is rezzed, reset the script.&lt;br /&gt;
    llResetScript();&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Resetting the script is not appropriate if the script needs to keep it&#039;s data when it&#039;s ownership is transfered or if script startup is slow, in these situations listens will need to be re-keyed to the new owner along with any other owner specific code, like who the script is supposed to be animating.&lt;br /&gt;
&lt;br /&gt;
The [[on_rez]] and [[changed]] events can be harnessed to reinitialize owner specific code every time the object is rezzed or changes owner.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lsl&amp;gt;integer listen_handle;&lt;br /&gt;
&lt;br /&gt;
init()&lt;br /&gt;
{&lt;br /&gt;
    key owner = llGetOwner();&lt;br /&gt;
    llListenRemove(listen_handle);&lt;br /&gt;
    listen_handle = llListen(0, &amp;quot;&amp;quot;, owner, &amp;quot;&amp;quot;);&lt;br /&gt;
    llRequestPermissions(owner, PERMISSION_TRIGGER_ANIMATION);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
    state_entry()&lt;br /&gt;
    {&lt;br /&gt;
        init();&lt;br /&gt;
        //insert additional startup code here that doesn&#039;t need to run each rez/owner change&lt;br /&gt;
        //for example, reading settings from a notecard&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    on_rez(integer start)&lt;br /&gt;
    {&lt;br /&gt;
        init();&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    changed(integer change)&lt;br /&gt;
    {&lt;br /&gt;
        if (change &amp;amp; CHANGED_OWNER)&lt;br /&gt;
            init();&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    run_time_permissions(integer perm)&lt;br /&gt;
    {//always use the run_time_permissions event with llRequestPermissions, never assume&lt;br /&gt;
        if(perm &amp;amp; PERMISSION_TRIGGER_ANIMATION)&lt;br /&gt;
        {&lt;br /&gt;
            //setup your animation code here, start your timers, etc.&lt;br /&gt;
            llOwnerSay(&amp;quot;I have animation permissions&amp;quot;);&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
|cat1=Owner&lt;br /&gt;
|cat2=Object&lt;br /&gt;
|cat3=Key&lt;br /&gt;
|cat4&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Pete Olihenge</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=Talk:LlPreloadSound&amp;diff=992672</id>
		<title>Talk:LlPreloadSound</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=Talk:LlPreloadSound&amp;diff=992672"/>
		<updated>2010-08-01T09:20:11Z</updated>

		<summary type="html">&lt;p&gt;Pete Olihenge: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Has anyone done any testing with this, how effective it is, bandwidth pains, etc? [[User:Rob Kubrick|Rob Kubrick]] 09:49, 18 May 2007 (PDT)&lt;/div&gt;</summary>
		<author><name>Pete Olihenge</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=Talk:LlPreloadSound&amp;diff=992662</id>
		<title>Talk:LlPreloadSound</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=Talk:LlPreloadSound&amp;diff=992662"/>
		<updated>2010-08-01T09:14:38Z</updated>

		<summary type="html">&lt;p&gt;Pete Olihenge: /* JIRA VWR-770 */ new section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Has anyone done any testing with this, how effective it is, bandwidth pains, etc? [[User:Rob Kubrick|Rob Kubrick]] 09:49, 18 May 2007 (PDT)&lt;br /&gt;
&lt;br /&gt;
== JIRA VWR-770 ==&lt;br /&gt;
&lt;br /&gt;
Does anybody watching this page know how to add [http://jira.secondlife.com/browse/VWR-770 JIRA VWR-770] to the Known Issues? 17 May 2007, Viewer 1.16, but still alive and kicking 1 August 2010, Viewer 2.0!&lt;/div&gt;</summary>
		<author><name>Pete Olihenge</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=User_talk:Void_Singer&amp;diff=992022</id>
		<title>User talk:Void Singer</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=User_talk:Void_Singer&amp;diff=992022"/>
		<updated>2010-07-31T02:27:36Z</updated>

		<summary type="html">&lt;p&gt;Pete Olihenge: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Comments: ==&lt;br /&gt;
{{message}} Comment Format&lt;br /&gt;
&amp;lt;pre&amp;gt;=== Topic === &amp;lt;-- this line is optional&lt;br /&gt;
{{message}} this is my comment&lt;br /&gt;
~~~~ &amp;lt;-- will be replaced by User Name + Time Stamp automatically&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{message}} welcome all to my User Talk page. Feel Free to leave a message below, and thanks for stopping by! --[[User:Void Singer|Void Singer]] 05:54, 20 November 2007 (PST)&lt;br /&gt;
&lt;br /&gt;
=== Re: Formatting [topic added by Void due to page reordering] ===&lt;br /&gt;
{{message}}It looks well thought out. I&#039;m pretty laid back about style as long as it&#039;s consistent. The only thing I put my foot down on is tabs being 4 spaces. All a matter of preference thou. I find prefixing variables with anything other then a letter to indicate type is overkill. I write my LSL as ESL (which is LSL passed through a C precompiler) and I reserve all uppercase lettered names for ESL macro&#039;s and defines. -- [[User:Strife Onizuka|Strife Onizuka]] 03:09, 3 November 2007 (PDT)&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;{{message}}Amazing. I&#039;ve been programming for 25 years and have developed a style that chooses the opposite of most of Void&#039;s rules. Why is it that these questions lead to such equally satisfactory results in competent programming organizations that are so different. I suppose that it&#039;s similar to the reason that Spanish isn&#039;t the same as French.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;I&#039;ll go Strife one further, though, and put my particular foot down about the insane (to me) verbosity of prefixing variables, function names, etc. with garbage characters that serve no useful purpose I can see, and is constantly bonking the reader who has to read through several largely irrelevant or self-evident characters to get to the important part - what the variable is. It&#039;s like getting tapped on the side of the head with a pencil every time I trip over one of the darn things. Is this another sad legacy of Microsoft? I&#039;d never seen such a thing before I had to start writing Windows code. And I&#039;ll note, I work in RL in an environment where we have several hundred thousand lines of legacy code I have to refer to regularly, (and a couple of legacy programmers) that use &amp;quot;Hungarian&amp;quot; notation like this, and after 10 years of reading it I STILL get tapped every time I see one.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;I do have one possibly pertinent point, though. I had been ambivalent about where the brace at the opening of a block goes for a couple years, having programmed in environments for most of my time where they were to be on a (wasteful) line of their own. After spending some time in Java, where the convention tends to be &#039;on the same line&#039; I was still uncertain I had an opinion, except that I really don&#039;t like the effect that mixing the styles has. (That happens with templates, copy/paste, etc.) However, a few weeks ago when working on some poor code (mine) that was too long and nested too deeply I spent quite a while tracking down a missing opening brace. I realized that had it been on its own line I&#039;d have seen it almost immediately. Given modern monitor resolutions and sizes, I don&#039;t think the vertical height saved is worth the obviousness that it exists.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;So there, finally the definitive answer to the &amp;quot;same line or different line&amp;quot; question.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Ah, the style wars, long shall they rage.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt; In the end, as both you and Strife observe, it is all personal preference as modified by the need to be consistent with those you work with. Thanks, much, for taking the time to write it down. I should do it too if I care so much I guess. --[[User:RJ Thibaud|RJ Thibaud]] 12:25, 23 December 2007 (PST)&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== RE: style etc ===&lt;br /&gt;
{{message}} heh, thanks for reading it at least, I&#039;m not fanatical about it, each person develops their own style, and to be honest I only adapted the style I normally use for lsl, from my other coding projects, so it&#039;s prone to updates (a few of which I&#039;ve yet to add in). The particular style I use is geared towards maximum understanding of the code for those new to scripting/programming so they can more easily find their way through code. But as noted, for an experienced coder it can be a bit like &#039;duh I know that&#039;. Coming from an enviroment with lots of new coders though, I tend to keep it up for their benefit more than my own. The opening brace debate is long running with me, and I do realize the pro&#039;s and cons, but have gotten myself in the habit of expecting open braces on the same line, and visually reading the statement (if, do, etc) and the indent as opening the statement and even briefly played with inlining the closing statement (but found it interfered with the visual nesting effect sometimes).&lt;br /&gt;
&lt;br /&gt;
I mostly provided the example style as something to explain, rather than recommend, because I was bored enough to write it one day, and had been asked a few times about it. I have found that prefixing of some kind tends to avoid collisions with developing languages like lsl, as I noticed happened once or twice when people named constants or variables that later became LSL constants, and I&#039;ve discouraged a few people from using llFunctionName for that and other reasons (like people that see the call and try to use it elsewhere). I&#039;ts all good though, whatever gets the job done and works as expected. [[User:Void Singer|Void Singer]] 13:35, 25 December 2007 (PST)&lt;br /&gt;
&lt;br /&gt;
== 0x80000000 X_X ==&lt;br /&gt;
&lt;br /&gt;
Yep I forgot about 0x80000000. The limit however accepts 2038 and then overflows. So I wrote a version that detects overflows and accepts the entire integer range. It should be noted that if you get clever on it, and give it a year before 1970 but have the final date fall in or after 1970 it will have a fit. Likewise for years after 1969 but the final dates fall before 1970. Could turn off the overflow detection for centrally located years but that&#039;s more work. But it will parse [2100,12,13,23,59, -2147483648] and [1845, 1, 1, 0, 0, 2147483647] properly... i think. =^_^= -- &#039;&#039;&#039;[[User:Strife_Onizuka|Strife]]&#039;&#039;&#039; &amp;lt;sup&amp;gt;&amp;lt;small&amp;gt;([[User talk:Strife_Onizuka|talk]]|[[Special:Contributions/Strife_Onizuka|contribs]])&amp;lt;/small&amp;gt;&amp;lt;/sup&amp;gt; 06:28, 20 January 2010 (UTC)&lt;br /&gt;
:{{message}} I&#039;ll take a look in a bit, and I do like the integer division and bit shift solution in the unix2stamp, much cleaner... in the other, subtracting out 68 less to make the entire range positive... I like that part, shouldve done it from the start (it was converted from a quickie 1970+ version that I think argent did) although I had capped the dates to provide symmetry with the opposite function (since it&#039;s much easier to cap that one on a particular day, and 19 days on the edge seemed a small loss, vs detecting up to the last available second)... haven&#039;t checked the leap day / month detection in the loop replacement but I&#039;ll assume it&#039;s good until I double check. ps, I appreciate the fixes (always something to be learned) but can we separate out revisions that are more than corrections or order changes... it makes it harder to compare versions side by side (as the wiki only gives changed lines)... not complaining, I appreciate the feedback... PPS bad cabbit you didn&#039;t test to be sure? =)&amp;lt;br/&amp;gt;-- &#039;&#039;&#039;[[User:Void_Singer|Void]]&#039;&#039;&#039; &amp;lt;sup&amp;gt;&amp;lt;small&amp;gt;([[User_talk:Void_Singer|talk]]|[[Special:Contributions/Void_Singer|contribs]])&amp;lt;/small&amp;gt;&amp;lt;/sup&amp;gt; 23:37, 20 January 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
:: As I was reading the code, I was like &amp;quot;this code is so evil I think it is something I must have done in a past life&amp;quot;. I really enjoy niggling away at code like this, reducing it to it&#039;s bare essentials. With that loop, once I saw that the sister function shared it, it made sense why you used it, symmetry. Yeah I agree with you about the comparisons being easier but it all sort of rolled out all at once; it didn&#039;t help that I pushed allot of the adjustment math through multiplications and divides. P.S. This version I posted I did check (in LSLEditor, with only minor mods, casting the bools to ints), I wanted to make sure I didn&#039;t screw up the math somewhere. P.S.S. I was considering replacing the (i * 30) with (i &amp;lt;&amp;lt; 5) - (i &amp;lt;&amp;lt; 1) cause it would be theoretically faster to execute but I didn&#039;t because it would probably take longer to setup the registers. P.S.S.S. I really enjoyed the coding (It&#039;s a great piece of code) but I forgot about everything else I was supposed to be doing yesterday; the secretary of my Physical Therapist was nonplussed that I hadn&#039;t called to cancel. *sigh* P.S^4 I was thinking I would work on the sister function, see if the loop can be eliminated altogether. Could do it with a list. A tree of if&#039;s would be better but more expensive. I think instead I&#039;ll trick out [[Float2Hex]] to use my super evil [[User:Strife_Onizuka/int2hex|Int-Base64-Hex converter]]. -- &#039;&#039;&#039;[[User:Strife_Onizuka|Strife]]&#039;&#039;&#039; &amp;lt;sup&amp;gt;&amp;lt;small&amp;gt;([[User talk:Strife_Onizuka|talk]]|[[Special:Contributions/Strife_Onizuka|contribs]])&amp;lt;/small&amp;gt;&amp;lt;/sup&amp;gt; 03:47, 21 January 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
:{{message}}well I&#039;m glad I could give you something fun to play with, though I am sorry it interfered with your RL schedule (such is the nature of our passions eh?) still haven&#039;t had a chance to poke at it... I&#039;m barely fitting forum posts in between RL concerns =/ stupid RL, always demanding I do things like work and eat and sleep... meh &amp;lt;br/&amp;gt;-- &#039;&#039;&#039;[[User:Void_Singer|Void]]&#039;&#039;&#039; &amp;lt;sup&amp;gt;&amp;lt;small&amp;gt;([[User_talk:Void_Singer|talk]]|[[Special:Contributions/Void_Singer|contribs]])&amp;lt;/small&amp;gt;&amp;lt;/sup&amp;gt; 16:47, 21 January 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
:{{message}}&#039;&#039;&#039;Update:&#039;&#039;&#039; looking at it, the month calc doesn&#039;t look right, as it would include the current month and looks to be off by a day for some months... after fiddling with it, I came up with this... &amp;lt;lsl&amp;gt;//rtn = &lt;br /&gt;
86400 *&lt;br /&gt;
(//y -= 1902&lt;br /&gt;
 (int)(y*365.25 + 0.25) - 24837 + // (y&amp;gt;&amp;gt;2)*1461 + (int)((y&amp;amp;3)*365.375) - 24837 +&lt;br /&gt;
 //m -= 1&lt;br /&gt;
 m*30 +(m-(m&amp;lt;7)&amp;gt;&amp;gt;1) + (m&amp;lt;2) - ((y&amp;amp;3)&amp;gt;0)*(m&amp;gt;1) +&lt;br /&gt;
 //d -= 1&lt;br /&gt;
 d) +&lt;br /&gt;
h +&lt;br /&gt;
m +&lt;br /&gt;
s&amp;lt;/lsl&amp;gt; check me on that but I think that&#039;s right for the symmetry capped version. shouldn&#039;t flow unless it&#039;s fed bad m/d/h/n/s, which I could force cap with llAbs(x%#) to prevent, so that even purposely malformed dates would fall in the +/-2145916800 range.&lt;br /&gt;
&lt;br /&gt;
::Interesting solution. Hadn&#039;t thought to use a typecast. That is a great simplification. The problem was probably caused by the right shift, as -1 &amp;gt;&amp;gt; 1 == -1, not the same as -1 / 2 == 0. -- &#039;&#039;&#039;[[User:Strife_Onizuka|Strife]]&#039;&#039;&#039; &amp;lt;sup&amp;gt;&amp;lt;small&amp;gt;([[User talk:Strife_Onizuka|talk]]|[[Special:Contributions/Strife_Onizuka|contribs]])&amp;lt;/small&amp;gt;&amp;lt;/sup&amp;gt; 20:17, 24 January 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
:{{message}} I did finally figure out that the extra months says were being subtracted out of the year calc, but had to abandon that for protection of missing months. I did note  &amp;quot;&amp;amp;&amp;amp; ((vIntYear - 100) % 200)&amp;quot; was overkill, since those dates would fall outside the full valid range anyhow.&lt;br /&gt;
:&amp;quot;1+(d-(5+(y==4))/30&amp;quot; is as far as I got on loop replacement for the sister function, too hard to calculate a variable cutoff for a variable number based on that number... I may test whether an if structure will be smaller or faster.. or maybe a string or list with cutoff dates.. not as elegent as I&#039;d have liked but ::shrug:: whatever works.&amp;lt;br/&amp;gt;-- &#039;&#039;&#039;[[User:Void_Singer|Void]]&#039;&#039;&#039; &amp;lt;sup&amp;gt;&amp;lt;small&amp;gt;([[User_talk:Void_Singer|talk]]|[[Special:Contributions/Void_Singer|contribs]])&amp;lt;/small&amp;gt;&amp;lt;/sup&amp;gt; 00:01, 25 January 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== References to forum threads ==&lt;br /&gt;
{{message}}The references to these threads: http://forums.secondlife.com/showthread.php?t=108960 and http://forums.secondlife.com/showthread.php?t=109571 in the caveat on throttling on the [[llHTTPRequest]] page are now broken. Did your archive project manage to catch any of theses? If so is it possible to distill the relevant info from them and add it to the page? [[User:Pete Olihenge|Pete Olihenge]] 10:18, 16 February 2010 (UTC) PS: I mean if you can give me access to the text of those threads, I can have a go at making a précis.&lt;br /&gt;
&lt;br /&gt;
{{message}}I&#039;ll take a look today, I didn&#039;t archive them by their thread ID&#039;s but rather by their page titles (or part thereof), but the links should still be in the page in print view, so I&#039;ll run text search and see if anything turns up... Gromlocks case probably won&#039;t be helped by self throttling, but I did think about that when he posted.&amp;lt;br/&amp;gt;-- &#039;&#039;&#039;[[User:Void_Singer|Void]]&#039;&#039;&#039; &amp;lt;sup&amp;gt;&amp;lt;small&amp;gt;([[User_talk:Void_Singer|talk]]|[[Special:Contributions/Void_Singer|contribs]])&amp;lt;/small&amp;gt;&amp;lt;/sup&amp;gt; 15:56, 16 February 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
:oh gods, you didn&#039;t just spider the forums? -- &#039;&#039;&#039;[[User:Strife_Onizuka|Strife]]&#039;&#039;&#039; &amp;lt;sup&amp;gt;&amp;lt;small&amp;gt;([[User talk:Strife_Onizuka|talk]]|[[Special:Contributions/Strife_Onizuka|contribs]])&amp;lt;/small&amp;gt;&amp;lt;/sup&amp;gt; 17:08, 16 February 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
::@Strife: I know, but with the load it was experiencing (probably from unthrottled spider requests =P), the fact that I didn&#039;t have anything on hand to do it with, and I wanted relevant description on the file names it was faster to just do a quick link rewrite to get the print view, and grab the pages manually.... it&#039;s only about 23*40 pages or so.... I just went after the most valuable stuff to cut down on chatter, so library scripts, a few posts I had bookmarked, and stickies.... what can I say, I was really busy doing other stuff too, and the archiving was what I was doing in between.... unfortunately I&#039;m going to need to do a parser for the broken bbcode, because you&#039;rs won&#039;t work on print view pages, even after adding the local url and setting fileIsGreasable... c&#039;est la vie &lt;br /&gt;
&lt;br /&gt;
::PS. when you have a chance, can you show me what I might change in Template:void-box so that when clicking edit on the container in a page I get the content of the box to edit, instead of the template page? my wiki foo is weak. I love the layout / ease of use, but would like to make it more functional so I don&#039;t have to do full page edits for just a single box (plus then others can use it easier too)&amp;lt;br/&amp;gt;-- &#039;&#039;&#039;[[User:Void_Singer|Void]]&#039;&#039;&#039; &amp;lt;sup&amp;gt;&amp;lt;small&amp;gt;([[User_talk:Void_Singer|talk]]|[[Special:Contributions/Void_Singer|contribs]])&amp;lt;/small&amp;gt;&amp;lt;/sup&amp;gt; 23:07, 16 February 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
{{message}} sorry Pete, it&#039;s not in there, unfortunately the wiki pages don&#039;t have something similar (though it&#039;s the same setup as a notecard reader which there are examples of) &amp;lt;br/&amp;gt;-- &#039;&#039;&#039;[[User:Void_Singer|Void]]&#039;&#039;&#039; &amp;lt;sup&amp;gt;&amp;lt;small&amp;gt;([[User_talk:Void_Singer|talk]]|[[Special:Contributions/Void_Singer|contribs]])&amp;lt;/small&amp;gt;&amp;lt;/sup&amp;gt; 23:25, 16 February 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
:As to fixing the template... I haven&#039;t ever found a solution. It was the original reason LSL documents had section editing turned off (now the templates are so complex that edit links don&#039;t make sense). Shoot, I nearly forgot I need to make a template for Operators. -- &#039;&#039;&#039;[[User:Strife_Onizuka|Strife]]&#039;&#039;&#039; &amp;lt;sup&amp;gt;&amp;lt;small&amp;gt;([[User talk:Strife_Onizuka|talk]]|[[Special:Contributions/Strife_Onizuka|contribs]])&amp;lt;/small&amp;gt;&amp;lt;/sup&amp;gt; 06:16, 17 February 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
{{message}} Note to self: fix those links when the forum archives come online. Hmm, that page is a bit... forbidding? [[User:Pete Olihenge|Pete Olihenge]] 07:32, 17 February 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
=== RE: list format to Unix timestamp ===&lt;br /&gt;
{{message}} hello. I&#039;m using for over a year your u2StampUnixInt function and I have found a bug. If I submit at your function a time superior at 2010 2 28 with 0h00 (example [2010,3,14,0,0,0]) the day is additionned of 1 day.&lt;br /&gt;
[[User:Elenia Boucher|Elenia Boucher]] 19:58, 14 March 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
{{message}} Thanks for that Elenia I found the bug, and posted the corrected change (there was a bad transposed leap year calculation)... should work fine now, and again, thank you &amp;lt;br/&amp;gt;-- &#039;&#039;&#039;[[User:Void_Singer|Void]]&#039;&#039;&#039; &amp;lt;sup&amp;gt;&amp;lt;small&amp;gt;([[User_talk:Void_Singer|talk]]|[[Special:Contributions/Void_Singer|contribs]])&amp;lt;/small&amp;gt;&amp;lt;/sup&amp;gt; 06:39, 17 March 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== nPose wiki page ==&lt;br /&gt;
&lt;br /&gt;
Hi, Void.   I&#039;ve been trying to contact you via the blogorum messaging system, but it claims you don&#039;t exist! (I&#039;ve stared a jira about that about that http://jira.secondlife.com/browse/WEB-1622).  &lt;br /&gt;
&lt;br /&gt;
Anyway, Nandana Singh has asked me to help with the admin and distribution for nPose, and I&#039;d like to take up your suggestion of posting the code in the wiki as well as continuing to distribute it in world via the GridShout system.   I&#039;m going to need some help setting up the pages, though, and I&#039;m wondering if you could assist me with this some time over the next week or so.&lt;br /&gt;
&lt;br /&gt;
I&#039;ll watch this page, though maybe you&#039;ll have better luck with the messaging system than have I.   Or you could reach me via SLU.&lt;br /&gt;
&lt;br /&gt;
[[User:Innula Zenovka|Innula Zenovka]] 12:11, 28 April 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
:Hi Inunla, more than happy to help, I&#039;ve setup an easy to edit basis on a [[User:Nandana_Singh/nPose|sub page of Nandana&#039;s user page]], with a link to and from [[User:Nandana_Singh|her main user page]], and can add another link to the library once it&#039;s all in place. if you have any trouble getting it working right, just paste plain text of the information that needs to go the page below the existing content (PS use the edit tab at the top of the page to add content, the in-page edit links can&#039;t be made to work, and apparently can&#039;t be removed just for templates).&lt;br /&gt;
:as for the problem with messaging me on the blogorums, use a period instead of a space in my name and it should work, although I often miss them for days =X &amp;lt;br/&amp;gt;-- &#039;&#039;&#039;[[User:Void_Singer|Void]]&#039;&#039;&#039; &amp;lt;sup&amp;gt;&amp;lt;small&amp;gt;([[User_talk:Void_Singer|talk]]|[[Special:Contributions/Void_Singer|contribs]])&amp;lt;/small&amp;gt;&amp;lt;/sup&amp;gt; 09:11, 29 April 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Re: Weekday from ( Y, M, D ) format ==&lt;br /&gt;
{{message}} [http://mathforum.org/library/drmath/view/55837.html This item] may be of relevance and/or interest; the author claims the algorithm to be accurate for &#039;&#039;any&#039;&#039; date. I came across it via the [http://lslwiki.net/lslwiki/wakka.php?wakka=llGetTimestamp llGetTimestamp page in the old waka ]. [[User:Pete Olihenge|Pete Olihenge]] 02:27, 31 July 2010 (UTC)&lt;/div&gt;</summary>
		<author><name>Pete Olihenge</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=Talk:LlGetLinkPrimitiveParams&amp;diff=906003</id>
		<title>Talk:LlGetLinkPrimitiveParams</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=Talk:LlGetLinkPrimitiveParams&amp;diff=906003"/>
		<updated>2010-05-07T10:23:09Z</updated>

		<summary type="html">&lt;p&gt;Pete Olihenge: /* Is this supported in older viewers? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Caveat: the rotation value returned is the link&#039;s global rotation ==&lt;br /&gt;
&lt;br /&gt;
Seein&#039; as how this function is about child prims, I&#039;d suggest an additional caveat about the rotation value it returns being the child&#039;s global rotation - like the one about the position value - as this is slightly counter-intuitive. I am, as ever, kinda nervous about adding this unilaterally and would appreciate confirmation before doing so. [[User:Pete Olihenge|Pete Olihenge]] 00:22, 4 April 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
:Good point. I&#039;m surprised there isn&#039;t one already, i&#039;ll investigate (later, have to get ready for work). -- &#039;&#039;&#039;[[User:Strife_Onizuka|Strife]]&#039;&#039;&#039; &amp;lt;sup&amp;gt;&amp;lt;small&amp;gt;([[User talk:Strife_Onizuka|talk]]|[[Special:Contributions/Strife_Onizuka|contribs]])&amp;lt;/small&amp;gt;&amp;lt;/sup&amp;gt; 18:06, 6 April 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
::I&#039;d do it myself right now, but editing stuff buried in templates is less than straightforward, it seems. Any clues as to how it&#039;s done would be appreciated - either before or after the fact. Cheers, Strife. [[User:Pete Olihenge|Pete Olihenge]] 18:18, 6 April 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
:::I&#039;ve put a caveat on [[PRIM_ROTATION]]. Most flag specific information is on the individual flag pages; via transclusion it propagates to the {{LSLGC|PrimitiveParams}} articles. This way when you want to edit info about a flag you just go to that pages and edit. -- &#039;&#039;&#039;[[User:Strife_Onizuka|Strife]]&#039;&#039;&#039; &amp;lt;sup&amp;gt;&amp;lt;small&amp;gt;([[User talk:Strife_Onizuka|talk]]|[[Special:Contributions/Strife_Onizuka|contribs]])&amp;lt;/small&amp;gt;&amp;lt;/sup&amp;gt; 02:02, 8 April 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
::::Many thanks, Strife. I&#039;m just one of the many users of this wiki that owes you a huge debt of gratitude for all the work you&#039;ve put into making it the invaluable resource that it is. [[User:Pete Olihenge|Pete Olihenge]] 16:17, 8 April 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
::::: It was my pleasure. I&#039;m sorry that the design is so complex, I wish it were possible to make it more intuitive but due to wiki limitations, intuitive comes at a very high price: non-unified style and information desynchronization; which leads to user confusion and reduced readability. That said, I am working on the problem, I have plans for an editor that makes editing information easier. -- &#039;&#039;&#039;[[User:Strife_Onizuka|Strife]]&#039;&#039;&#039; &amp;lt;sup&amp;gt;&amp;lt;small&amp;gt;([[User talk:Strife_Onizuka|talk]]|[[Special:Contributions/Strife_Onizuka|contribs]])&amp;lt;/small&amp;gt;&amp;lt;/sup&amp;gt; 18:51, 8 April 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Is this supported in older viewers? ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Using Second Life 1.23.5 (136262) Oct 14 2009 12:08:26 (Second Life Release)&lt;br /&gt;
&lt;br /&gt;
It doesnt error and nothing is returned. [[User:Lana Straulino|Lana Straulino]] 09:40, 7 May 2010 (UTC)&lt;br /&gt;
:If you go to the Scripting forum at http://blogs.secondlife.com/community/forums/scripting and post the code you&#039;re using you&#039;ll probably get some useful feedback. It does sound more like a problem with your code rather than a bug in the function itself. [[User:Pete Olihenge|Pete Olihenge]] 10:23, 7 May 2010 (UTC)&lt;/div&gt;</summary>
		<author><name>Pete Olihenge</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=Talk:LlRotBetween&amp;diff=858702</id>
		<title>Talk:LlRotBetween</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=Talk:LlRotBetween&amp;diff=858702"/>
		<updated>2010-04-13T19:15:26Z</updated>

		<summary type="html">&lt;p&gt;Pete Olihenge: /* cat2 = Rotation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== cat2 = Rotation ==&lt;br /&gt;
Although this page appears to belong to the category &amp;quot;Rotation&amp;quot;, it doesn&#039;t show up on the Category:LSL Rotation page. How&#039;s it done? [[User:Pete Olihenge|Pete Olihenge]] 10:02, 13 April 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
:The wiki engine has issues with categories (as in the list of pages in them becomes corrupted). Just do a small edit to llRotBetween (move a couple parameters around or add a space to the end of a line) and it will trick it into refreshing. -- &#039;&#039;&#039;[[User:Strife_Onizuka|Strife]]&#039;&#039;&#039; &amp;lt;sup&amp;gt;&amp;lt;small&amp;gt;([[User talk:Strife_Onizuka|talk]]|[[Special:Contributions/Strife_Onizuka|contribs]])&amp;lt;/small&amp;gt;&amp;lt;/sup&amp;gt; 12:23, 13 April 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
::It worked! [[User:Pete Olihenge|Pete Olihenge]] 19:15, 13 April 2010 (UTC)&lt;/div&gt;</summary>
		<author><name>Pete Olihenge</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=LlRotBetween&amp;diff=858692</id>
		<title>LlRotBetween</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=LlRotBetween&amp;diff=858692"/>
		<updated>2010-04-13T19:13:45Z</updated>

		<summary type="html">&lt;p&gt;Pete Olihenge: added space at end of line in attempt to force refresh of LSL Rotations page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Issues/SVC-4415}}{{LSL_Function&lt;br /&gt;
|func_id=21|func_sleep=0.0|func_energy=10.0&lt;br /&gt;
|func=llRotBetween&lt;br /&gt;
|return_type=rotation|p1_type=vector|p1_name=start|p2_type=vector|p2_name=end&lt;br /&gt;
|func_footnote&lt;br /&gt;
|func_desc&lt;br /&gt;
|return_text=that is the shortest rotation between the direction &#039;&#039;&#039;start&#039;&#039;&#039; and the direction &#039;&#039;&#039;end&#039;&#039;&#039; &lt;br /&gt;
|spec=&#039;&#039;&#039;start&#039;&#039;&#039; and &#039;&#039;&#039;end&#039;&#039;&#039; are directions and are relative to the origin &amp;lt;0.0, 0.0, 0.0&amp;gt;. If you have coordinates relative to a different origin, subtract that origin from the input vectors.&lt;br /&gt;
|caveats=*&amp;lt;code&amp;gt;start * llRotBetween(start, end) == end&amp;lt;/code&amp;gt; is only true if &#039;&#039;&#039;start&#039;&#039;&#039; and &#039;&#039;&#039;end&#039;&#039;&#039; have the same magnitude and neither have a magnitude of zero (see [[#Useful Snippets]] for a workaround).&lt;br /&gt;
**This of course is ignoring floating point precision errors.&lt;br /&gt;
* Rotations are from -PI to +PI around each axis.&lt;br /&gt;
|constants&lt;br /&gt;
|examples=&lt;br /&gt;
&amp;lt;lsl&amp;gt;llRotBetween(&amp;lt;1.0, 0.0, 0.0&amp;gt;, &amp;lt;0.0, -1.0, 0.0&amp;gt;)&lt;br /&gt;
// will return &amp;lt;0.00000, 0.00000, -0.70711, 0.70711&amp;gt; (which represents -90 degrees on the z axis)&lt;br /&gt;
&lt;br /&gt;
llRotBetween(&amp;lt;0.0, 0.0, 0.0&amp;gt;, &amp;lt;0.0, -1.0, 0.0&amp;gt;)&lt;br /&gt;
// will return &amp;lt;0.00000, 0.00000, 0.00000, 1.00000&amp;gt; (which represents a zero angle on all axis)&lt;br /&gt;
// because &amp;lt;0.0, 0.0, 0.0&amp;gt; does not convey a direction.&amp;lt;/lsl&amp;gt;&lt;br /&gt;
|helpers&lt;br /&gt;
|also_functions={{LSL DefineRow||[[llAngleBetween]]}}&lt;br /&gt;
|also_tests&lt;br /&gt;
|also_events&lt;br /&gt;
|also_articles&lt;br /&gt;
|helpers=This function adjusts the magnitude of the quaternion so &amp;lt;code&amp;gt;start * llRotBetween(start, end) == end&amp;lt;/code&amp;gt; is true as long as neither have a magnitude of zero. They don&#039;t have to have the same magnitude. &lt;br /&gt;
&amp;lt;lsl&amp;gt;rotation RotBetween(vector start, vector end) //adjusts quaternion magnitude so (start * return == end) &lt;br /&gt;
{//Authors note: I have never had a use for this but it&#039;s good to know how to do it if I did.&lt;br /&gt;
    rotation rot = llRotBetween(start, end);&lt;br /&gt;
    if(start)&lt;br /&gt;
    {&lt;br /&gt;
        if(end)&lt;br /&gt;
        {&lt;br /&gt;
            float d = llSqrt(llVecMag(end) / llVecMag(start));&lt;br /&gt;
            return &amp;lt;rot.x * d, rot.y * d, rot.z * d, rot.s * d&amp;gt;;&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    return rot;&lt;br /&gt;
}//Strife Onizuka&amp;lt;/lsl&amp;gt;&lt;br /&gt;
|notes=&lt;br /&gt;
Vectors that are near opposite each other in direction may lead to erroneous results. &lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
// First Vector is due north second vector is ALMOST due south.&lt;br /&gt;
rotation lRotation = llRotBetween( &amp;lt;0., 1., 0.&amp;gt;, &amp;lt;-0.001, -.1, 0.&amp;gt; );&lt;br /&gt;
llSay(0, lRotation );&lt;br /&gt;
// Provides a result of &amp;lt;1.00000, 0.00000, 0.00000, 0.00000&amp;gt;.&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
|location={{SourceLink|indra/llmath/llquaternion.cpp|line=429}}&lt;br /&gt;
|deepnotes=&amp;lt;lsl&amp;gt;//Loosely based on SL source code&lt;br /&gt;
rotation llRotBetween(vector start, vector end) { &lt;br /&gt;
    vector v1 = llVecNorm(start);&lt;br /&gt;
    vector v2 = llVecNorm(end);&lt;br /&gt;
    float dot = v1 * v2;&lt;br /&gt;
    vector axis = v1 % v2;&lt;br /&gt;
    if (dot &amp;lt; -0.9999999) {&lt;br /&gt;
        // 180 degrees or there abouts&lt;br /&gt;
        vector ortho_axis = llVecNorm(&amp;lt;1.f, 0.f, 0.f&amp;gt; - (sn * (sn.x / (sn * sn))));&lt;br /&gt;
        if (ortho_axis)&lt;br /&gt;
            return &amp;lt; ortho_axis.x, ortho_axis.y, ortho_axis.z, 0.f&amp;gt;;&lt;br /&gt;
        return &amp;lt;0.0, 0.0, 1.0, 0.0&amp;gt;;&lt;br /&gt;
    }&lt;br /&gt;
    else if(dot &amp;gt; 0.9999999) {&lt;br /&gt;
        //parallel&lt;br /&gt;
        return ZERO_ROTATION;&lt;br /&gt;
    }&lt;br /&gt;
    dot = dot + 1.0;&lt;br /&gt;
    float m = 1 / llSqrt((axis * axis) + (dot * dot));&lt;br /&gt;
    return &amp;lt;axis.x * m, axis.y * m, axis.z * m, dot * m&amp;gt;;&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
|cat1=Math/3D&lt;br /&gt;
|cat2=Rotation&lt;br /&gt;
|cat3&lt;br /&gt;
|cat4&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Pete Olihenge</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=Category_talk:LSL_Rotation&amp;diff=858022</id>
		<title>Category talk:LSL Rotation</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=Category_talk:LSL_Rotation&amp;diff=858022"/>
		<updated>2010-04-13T10:04:53Z</updated>

		<summary type="html">&lt;p&gt;Pete Olihenge: /* llRotBetween */ new section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Why isn&#039;t llTargetOmega mentioned here?&lt;br /&gt;
&lt;br /&gt;
Oversight?&lt;br /&gt;
&lt;br /&gt;
Some code purist view that this is about &#039;&#039;real&#039;&#039; rotations not client-side effects?&lt;br /&gt;
&lt;br /&gt;
Pretty unhelpful for any script noob ending up here, though.&lt;br /&gt;
&lt;br /&gt;
== llRotBetween ==&lt;br /&gt;
&lt;br /&gt;
How would I go about adding llRotBetween to the pages listed here? llRotBetween does include &amp;quot;cat2 = Rotation&amp;quot;. [[User:Pete Olihenge|Pete Olihenge]] 10:04, 13 April 2010 (UTC)&lt;/div&gt;</summary>
		<author><name>Pete Olihenge</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=Talk:LlRotBetween&amp;diff=858012</id>
		<title>Talk:LlRotBetween</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=Talk:LlRotBetween&amp;diff=858012"/>
		<updated>2010-04-13T10:02:29Z</updated>

		<summary type="html">&lt;p&gt;Pete Olihenge: Created page with &amp;#039;== cat2 = Rotation == Although this page appears to belong to the category &amp;quot;Rotation&amp;quot;, it doesn&amp;#039;t show up on the Category:LSL Rotation page. How&amp;#039;s it done? ~~~~&amp;#039;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== cat2 = Rotation ==&lt;br /&gt;
Although this page appears to belong to the category &amp;quot;Rotation&amp;quot;, it doesn&#039;t show up on the Category:LSL Rotation page. How&#039;s it done? [[User:Pete Olihenge|Pete Olihenge]] 10:02, 13 April 2010 (UTC)&lt;/div&gt;</summary>
		<author><name>Pete Olihenge</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=Talk:LlHTTPRequest&amp;diff=846163</id>
		<title>Talk:LlHTTPRequest</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=Talk:LlHTTPRequest&amp;diff=846163"/>
		<updated>2010-04-09T09:33:54Z</updated>

		<summary type="html">&lt;p&gt;Pete Olihenge: /* References to forum threads are now broken */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;I have a Question ..&lt;br /&gt;
Does POST work ? &lt;br /&gt;
I couldnt get it working&lt;br /&gt;
Anylyn Hax 13:34, 28 July 2007 (PDT)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following headers will be present, usable by scripts running on the HTTP server if the scripting language allows you to access the headers.&lt;br /&gt;
&lt;br /&gt;
An PHP example on how to check to see if the call came from the main grid:&lt;br /&gt;
 &amp;lt;?php&lt;br /&gt;
     if ($_SERVER[&amp;quot;HTTP_X_SECONDLIFE_SHARD&amp;quot;] == &amp;quot;Production&amp;quot;) {&lt;br /&gt;
         echo &#039;You are using the main grid&#039;;&lt;br /&gt;
     } else {&lt;br /&gt;
         echo &#039;You are not using the main grid&#039;;&lt;br /&gt;
     }&lt;br /&gt;
 ?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Odd format for header names ==&lt;br /&gt;
&lt;br /&gt;
Why are the headers listed as HTTP_SOME_HEADER_NAME, when the sent headers are in the format Some-Header-Name? Is there some benefit to putting false values that match conventions used by CGI, but aren&#039;t actually correct?&lt;br /&gt;
* This is because you are looking at a global property with a lot more information than just headers. Some functions like listed below handle the stripping of the HTTP_ information, but you could also just use substr to remove the HTTP_ [[User:Wouter Hobble|Wouter Hobble]] - 4 July 2008&lt;br /&gt;
&lt;br /&gt;
I am aware that the example given above works, but (assuming that you&#039;re using mod_php) this would too, and reflects the real header names:&lt;br /&gt;
 &amp;lt;?php&lt;br /&gt;
 $headers = apache_request_headers();&lt;br /&gt;
 if($headers[&#039;X-SecondLife-Shard&#039;] == &#039;Production&#039;)&lt;br /&gt;
 {&lt;br /&gt;
     print &amp;quot;You are on the main grid.&amp;quot;;&lt;br /&gt;
 }&lt;br /&gt;
 else&lt;br /&gt;
 {&lt;br /&gt;
     print &amp;quot;You are on a preview grid.&amp;quot;;&lt;br /&gt;
 }&lt;br /&gt;
 ?&amp;gt;&lt;br /&gt;
Additionally, the current information does not show the capitalisation, thus further confusing the matter.&lt;br /&gt;
[[User:Katharine Berry|Katharine Berry]] 09:55, 21 June 2007 (PDT)&lt;br /&gt;
&lt;br /&gt;
== Root Certificates ==&lt;br /&gt;
Can someone add a list of root certificates to this article?&lt;br /&gt;
&lt;br /&gt;
I know that Verisign, Thawt, and RapidSSL are accepted, I know that CACert.org is not.&lt;br /&gt;
&lt;br /&gt;
== [[HTTP_VERIFY_CERT]] behavior clarification ==&lt;br /&gt;
&lt;br /&gt;
Even when HTTP_VERIFY_CERT is set to FALSE, if the certificate domain name does not match the URL domain you will get a HTTP 499 response.&lt;br /&gt;
{{Unsigned|Apotheus Silverman}}&lt;br /&gt;
&lt;br /&gt;
:That does not sound like a bug. That sounds like a feature. If I tried to access https://www.microsoft.com and the certificate was for hax0r.com I would be thinking there was a man-in-the-middle attack happening. On the flip side if you don&#039;t verify the signing authority you can pretend to be anyone you want. I don&#039;t know which is worse, the false sense of security or certificate impersonation. -- &#039;&#039;&#039;[[User:Strife_Onizuka|Strife]]&#039;&#039;&#039; &amp;lt;sup&amp;gt;&amp;lt;small&amp;gt;([[User talk:Strife_Onizuka|talk]]|[[Special:Contributions/Strife_Onizuka|contribs]])&amp;lt;/small&amp;gt;&amp;lt;/sup&amp;gt; 13:21, 15 October 2008 (PDT)&lt;br /&gt;
&lt;br /&gt;
== Region limit ==&lt;br /&gt;
&lt;br /&gt;
Besides the 25/sec/script limit there is some limit per time per REGION.&lt;br /&gt;
Error Message &amp;quot;This region currently has too many in progress HTTP requests.&amp;quot;&lt;br /&gt;
so what is it?&lt;br /&gt;
&lt;br /&gt;
== I am totally confused ==&lt;br /&gt;
&lt;br /&gt;
I gulp a stare. I hope it makes sense to me one day. -- &#039;&#039;&#039;[[User:EddyFragment Robonaught|Eddy]]&#039;&#039;&#039;  &amp;lt;sup&amp;gt;&amp;lt;small&amp;gt;([[User talk:EddyFragment_Robonaught|talk]]|[[Special:Contributions/EddyFragment_Robonaught|contribs]])&amp;lt;/small&amp;gt;&amp;lt;/sup&amp;gt; 15:55, 10 June 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
== POST? ==&lt;br /&gt;
&lt;br /&gt;
I Could Not Get Post To Work To A PHP page, It Was Picked Up By The Page As A Get.&lt;br /&gt;
 &lt;br /&gt;
llHTTPRequest(url, [HTTP_METHOD, &amp;quot;POST&amp;quot;], &amp;quot;&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
Post, Put, And Get All Came Across As Get On The Server. So Does HTTP_METHOD Not Work?[[User:Adicted Waco|Adi]] 19:48, 20 August 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
== References to forum threads are now broken ==&lt;br /&gt;
&lt;br /&gt;
The references to threads in the now closed old forums (re caveat on throttling) are now broken; LL have indicated that (at the time of writing) it will be four weeks until the archives are available. I&#039;ve added a comment to this effect on the page, but perhaps someone knows a better way to handle this. [[User:Pete Olihenge|Pete Olihenge]] 10:09, 16 February 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
The forum archives have come online. But it doesn&#039;t look like you can search them by thread number (which is used in the original URL) and as I have no idea what the original threads were called, I can&#039;t see any way of updating the broken links. [[User:Pete Olihenge|Pete Olihenge]]&lt;br /&gt;
&lt;br /&gt;
== HTTP 302 Redirects not being followed ==&lt;br /&gt;
&lt;br /&gt;
I POST form data to my server which in turn redirects me sending an HTTP 302 status code which does not seemed to be followed as it says in the Wiki.  Any comments? [[User:Epilort Byrne|Epilort Byrne]] 17:05, 1 March 2010 (UTC)&lt;/div&gt;</summary>
		<author><name>Pete Olihenge</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=Talk:LlGetLinkPrimitiveParams&amp;diff=845522</id>
		<title>Talk:LlGetLinkPrimitiveParams</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=Talk:LlGetLinkPrimitiveParams&amp;diff=845522"/>
		<updated>2010-04-08T16:17:37Z</updated>

		<summary type="html">&lt;p&gt;Pete Olihenge: /* Caveat: the rotation value returned is the link&amp;#039;s global rotation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Caveat: the rotation value returned is the link&#039;s global rotation ==&lt;br /&gt;
&lt;br /&gt;
Seein&#039; as how this function is about child prims, I&#039;d suggest an additional caveat about the rotation value it returns being the child&#039;s global rotation - like the one about the position value - as this is slightly counter-intuitive. I am, as ever, kinda nervous about adding this unilaterally and would appreciate confirmation before doing so. [[User:Pete Olihenge|Pete Olihenge]] 00:22, 4 April 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
:Good point. I&#039;m surprised there isn&#039;t one already, i&#039;ll investigate (later, have to get ready for work). -- &#039;&#039;&#039;[[User:Strife_Onizuka|Strife]]&#039;&#039;&#039; &amp;lt;sup&amp;gt;&amp;lt;small&amp;gt;([[User talk:Strife_Onizuka|talk]]|[[Special:Contributions/Strife_Onizuka|contribs]])&amp;lt;/small&amp;gt;&amp;lt;/sup&amp;gt; 18:06, 6 April 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
::I&#039;d do it myself right now, but editing stuff buried in templates is less than straightforward, it seems. Any clues as to how it&#039;s done would be appreciated - either before or after the fact. Cheers, Strife. [[User:Pete Olihenge|Pete Olihenge]] 18:18, 6 April 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
:::I&#039;ve put a caveat on [[PRIM_ROTATION]]. Most flag specific information is on the individual flag pages; via transclusion it propagates to the {{LSLGC|PrimitiveParams}} articles. This way when you want to edit info about a flag you just go to that pages and edit. -- &#039;&#039;&#039;[[User:Strife_Onizuka|Strife]]&#039;&#039;&#039; &amp;lt;sup&amp;gt;&amp;lt;small&amp;gt;([[User talk:Strife_Onizuka|talk]]|[[Special:Contributions/Strife_Onizuka|contribs]])&amp;lt;/small&amp;gt;&amp;lt;/sup&amp;gt; 02:02, 8 April 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
::::Many thanks, Strife. I&#039;m just one of the many users of this wiki that owes you a huge debt of gratitude for all the work you&#039;ve put into making it the invaluable resource that it is. [[User:Pete Olihenge|Pete Olihenge]] 16:17, 8 April 2010 (UTC)&lt;/div&gt;</summary>
		<author><name>Pete Olihenge</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=Talk:LlGetLinkPrimitiveParams&amp;diff=843303</id>
		<title>Talk:LlGetLinkPrimitiveParams</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=Talk:LlGetLinkPrimitiveParams&amp;diff=843303"/>
		<updated>2010-04-06T18:18:27Z</updated>

		<summary type="html">&lt;p&gt;Pete Olihenge: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Caveat: the rotation value returned is the link&#039;s global rotation ==&lt;br /&gt;
&lt;br /&gt;
Seein&#039; as how this function is about child prims, I&#039;d suggest an additional caveat about the rotation value it returns being the child&#039;s global rotation - like the one about the position value - as this is slightly counter-intuitive. I am, as ever, kinda nervous about adding this unilaterally and would appreciate confirmation before doing so. [[User:Pete Olihenge|Pete Olihenge]] 00:22, 4 April 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
:Good point. I&#039;m surprised there isn&#039;t one already, i&#039;ll investigate (later, have to get ready for work). -- &#039;&#039;&#039;[[User:Strife_Onizuka|Strife]]&#039;&#039;&#039; &amp;lt;sup&amp;gt;&amp;lt;small&amp;gt;([[User talk:Strife_Onizuka|talk]]|[[Special:Contributions/Strife_Onizuka|contribs]])&amp;lt;/small&amp;gt;&amp;lt;/sup&amp;gt; 18:06, 6 April 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
::I&#039;d do it myself right now, but editing stuff buried in templates is less than straightforward, it seems. Any clues as to how it&#039;s done would be appreciated - either before or after the fact. Cheers, Strife. [[User:Pete Olihenge|Pete Olihenge]] 18:18, 6 April 2010 (UTC)&lt;/div&gt;</summary>
		<author><name>Pete Olihenge</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=Talk:LlGetLinkPrimitiveParams&amp;diff=840563</id>
		<title>Talk:LlGetLinkPrimitiveParams</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=Talk:LlGetLinkPrimitiveParams&amp;diff=840563"/>
		<updated>2010-04-04T00:22:31Z</updated>

		<summary type="html">&lt;p&gt;Pete Olihenge: Caveat: the rotation value returned is the link&amp;#039;s global rotation&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Caveat: the rotation value returned is the link&#039;s global rotation ==&lt;br /&gt;
&lt;br /&gt;
Seein&#039; as how this function is about child prims, I&#039;d suggest an additional caveat about the rotation value it returns being the child&#039;s global rotation - like the one about the position value - as this is slightly counter-intuitive. I am, as ever, kinda nervous about adding this unilaterally and would appreciate confirmation before doing so. [[User:Pete Olihenge|Pete Olihenge]] 00:22, 4 April 2010 (UTC)&lt;/div&gt;</summary>
		<author><name>Pete Olihenge</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=User_talk:Pete_Olihenge&amp;diff=839192</id>
		<title>User talk:Pete Olihenge</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=User_talk:Pete_Olihenge&amp;diff=839192"/>
		<updated>2010-04-01T23:21:49Z</updated>

		<summary type="html">&lt;p&gt;Pete Olihenge: Blanked the page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Pete Olihenge</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=User:Pete_Olihenge&amp;diff=839182</id>
		<title>User:Pete Olihenge</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=User:Pete_Olihenge&amp;diff=839182"/>
		<updated>2010-04-01T23:21:29Z</updated>

		<summary type="html">&lt;p&gt;Pete Olihenge: Blanked the page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Pete Olihenge</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=Talk:LlGiveInventory&amp;diff=825722</id>
		<title>Talk:LlGiveInventory</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=Talk:LlGiveInventory&amp;diff=825722"/>
		<updated>2010-03-26T17:49:00Z</updated>

		<summary type="html">&lt;p&gt;Pete Olihenge: Copy confusion?&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Copy confusion? ==&lt;br /&gt;
&lt;br /&gt;
Regarding the not-so-recent caveat changes, does this mean that the third one, &amp;quot;If inventory cannot be copied then an error is shouted on DEBUG_CHANNEL.&amp;quot; is wrong, or does &amp;quot;cannot be copied&amp;quot; mean something different in this context? [[User:Pete Olihenge|Pete Olihenge]] 17:48, 26 March 2010 (UTC)&lt;/div&gt;</summary>
		<author><name>Pete Olihenge</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=User_talk:Void_Singer&amp;diff=729273</id>
		<title>User talk:Void Singer</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=User_talk:Void_Singer&amp;diff=729273"/>
		<updated>2010-02-17T07:32:41Z</updated>

		<summary type="html">&lt;p&gt;Pete Olihenge: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Comments: ==&lt;br /&gt;
{{message}} Comment Format&lt;br /&gt;
&amp;lt;pre&amp;gt;=== Topic === &amp;lt;-- this line is optional&lt;br /&gt;
{{message}} this is my comment&lt;br /&gt;
~~~~ &amp;lt;-- will be replaced by User Name + Time Stamp automatically&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{message}} welcome all to my User Talk page. Feel Free to leave a message below, and thanks for stopping by! --[[User:Void Singer|Void Singer]] 05:54, 20 November 2007 (PST)&lt;br /&gt;
&lt;br /&gt;
=== Re: Formatting [topic added by Void due to page reordering] ===&lt;br /&gt;
{{message}}It looks well thought out. I&#039;m pretty laid back about style as long as it&#039;s consistent. The only thing I put my foot down on is tabs being 4 spaces. All a matter of preference thou. I find prefixing variables with anything other then a letter to indicate type is overkill. I write my LSL as ESL (which is LSL passed through a C precompiler) and I reserve all uppercase lettered names for ESL macro&#039;s and defines. -- [[User:Strife Onizuka|Strife Onizuka]] 03:09, 3 November 2007 (PDT)&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;{{message}}Amazing. I&#039;ve been programming for 25 years and have developed a style that chooses the opposite of most of Void&#039;s rules. Why is it that these questions lead to such equally satisfactory results in competent programming organizations that are so different. I suppose that it&#039;s similar to the reason that Spanish isn&#039;t the same as French.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;I&#039;ll go Strife one further, though, and put my particular foot down about the insane (to me) verbosity of prefixing variables, function names, etc. with garbage characters that serve no useful purpose I can see, and is constantly bonking the reader who has to read through several largely irrelevant or self-evident characters to get to the important part - what the variable is. It&#039;s like getting tapped on the side of the head with a pencil every time I trip over one of the darn things. Is this another sad legacy of Microsoft? I&#039;d never seen such a thing before I had to start writing Windows code. And I&#039;ll note, I work in RL in an environment where we have several hundred thousand lines of legacy code I have to refer to regularly, (and a couple of legacy programmers) that use &amp;quot;Hungarian&amp;quot; notation like this, and after 10 years of reading it I STILL get tapped every time I see one.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;I do have one possibly pertinent point, though. I had been ambivalent about where the brace at the opening of a block goes for a couple years, having programmed in environments for most of my time where they were to be on a (wasteful) line of their own. After spending some time in Java, where the convention tends to be &#039;on the same line&#039; I was still uncertain I had an opinion, except that I really don&#039;t like the effect that mixing the styles has. (That happens with templates, copy/paste, etc.) However, a few weeks ago when working on some poor code (mine) that was too long and nested too deeply I spent quite a while tracking down a missing opening brace. I realized that had it been on its own line I&#039;d have seen it almost immediately. Given modern monitor resolutions and sizes, I don&#039;t think the vertical height saved is worth the obviousness that it exists.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;So there, finally the definitive answer to the &amp;quot;same line or different line&amp;quot; question.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Ah, the style wars, long shall they rage.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt; In the end, as both you and Strife observe, it is all personal preference as modified by the need to be consistent with those you work with. Thanks, much, for taking the time to write it down. I should do it too if I care so much I guess. --[[User:RJ Thibaud|RJ Thibaud]] 12:25, 23 December 2007 (PST)&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== RE: style etc ===&lt;br /&gt;
{{message}} heh, thanks for reading it at least, I&#039;m not fanatical about it, each person develops their own style, and to be honest I only adapted the style I normally use for lsl, from my other coding projects, so it&#039;s prone to updates (a few of which I&#039;ve yet to add in). The particular style I use is geared towards maximum understanding of the code for those new to scripting/programming so they can more easily find their way through code. But as noted, for an experienced coder it can be a bit like &#039;duh I know that&#039;. Coming from an enviroment with lots of new coders though, I tend to keep it up for their benefit more than my own. The opening brace debate is long running with me, and I do realize the pro&#039;s and cons, but have gotten myself in the habit of expecting open braces on the same line, and visually reading the statement (if, do, etc) and the indent as opening the statement and even briefly played with inlining the closing statement (but found it interfered with the visual nesting effect sometimes).&lt;br /&gt;
&lt;br /&gt;
I mostly provided the example style as something to explain, rather than recommend, because I was bored enough to write it one day, and had been asked a few times about it. I have found that prefixing of some kind tends to avoid collisions with developing languages like lsl, as I noticed happened once or twice when people named constants or variables that later became LSL constants, and I&#039;ve discouraged a few people from using llFunctionName for that and other reasons (like people that see the call and try to use it elsewhere). I&#039;ts all good though, whatever gets the job done and works as expected. [[User:Void Singer|Void Singer]] 13:35, 25 December 2007 (PST)&lt;br /&gt;
&lt;br /&gt;
== 0x80000000 X_X ==&lt;br /&gt;
&lt;br /&gt;
Yep I forgot about 0x80000000. The limit however accepts 2038 and then overflows. So I wrote a version that detects overflows and accepts the entire integer range. It should be noted that if you get clever on it, and give it a year before 1970 but have the final date fall in or after 1970 it will have a fit. Likewise for years after 1969 but the final dates fall before 1970. Could turn off the overflow detection for centrally located years but that&#039;s more work. But it will parse [2100,12,13,23,59, -2147483648] and [1845, 1, 1, 0, 0, 2147483647] properly... i think. =^_^= -- &#039;&#039;&#039;[[User:Strife_Onizuka|Strife]]&#039;&#039;&#039; &amp;lt;sup&amp;gt;&amp;lt;small&amp;gt;([[User talk:Strife_Onizuka|talk]]|[[Special:Contributions/Strife_Onizuka|contribs]])&amp;lt;/small&amp;gt;&amp;lt;/sup&amp;gt; 06:28, 20 January 2010 (UTC)&lt;br /&gt;
:{{message}} I&#039;ll take a look in a bit, and I do like the integer division and bit shift solution in the unix2stamp, much cleaner... in the other, subtracting out 68 less to make the entire range positive... I like that part, shouldve done it from the start (it was converted from a quickie 1970+ version that I think argent did) although I had capped the dates to provide symmetry with the opposite function (since it&#039;s much easier to cap that one on a particular day, and 19 days on the edge seemed a small loss, vs detecting up to the last available second)... haven&#039;t checked the leap day / month detection in the loop replacement but I&#039;ll assume it&#039;s good until I double check. ps, I appreciate the fixes (always something to be learned) but can we separate out revisions that are more than corrections or order changes... it makes it harder to compare versions side by side (as the wiki only gives changed lines)... not complaining, I appreciate the feedback... PPS bad cabbit you didn&#039;t test to be sure? =)&amp;lt;br/&amp;gt;-- &#039;&#039;&#039;[[User:Void_Singer|Void]]&#039;&#039;&#039; &amp;lt;sup&amp;gt;&amp;lt;small&amp;gt;([[User_talk:Void_Singer|talk]]|[[Special:Contributions/Void_Singer|contribs]])&amp;lt;/small&amp;gt;&amp;lt;/sup&amp;gt; 23:37, 20 January 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
:: As I was reading the code, I was like &amp;quot;this code is so evil I think it is something I must have done in a past life&amp;quot;. I really enjoy niggling away at code like this, reducing it to it&#039;s bare essentials. With that loop, once I saw that the sister function shared it, it made sense why you used it, symmetry. Yeah I agree with you about the comparisons being easier but it all sort of rolled out all at once; it didn&#039;t help that I pushed allot of the adjustment math through multiplications and divides. P.S. This version I posted I did check (in LSLEditor, with only minor mods, casting the bools to ints), I wanted to make sure I didn&#039;t screw up the math somewhere. P.S.S. I was considering replacing the (i * 30) with (i &amp;lt;&amp;lt; 5) - (i &amp;lt;&amp;lt; 1) cause it would be theoretically faster to execute but I didn&#039;t because it would probably take longer to setup the registers. P.S.S.S. I really enjoyed the coding (It&#039;s a great piece of code) but I forgot about everything else I was supposed to be doing yesterday; the secretary of my Physical Therapist was nonplussed that I hadn&#039;t called to cancel. *sigh* P.S^4 I was thinking I would work on the sister function, see if the loop can be eliminated altogether. Could do it with a list. A tree of if&#039;s would be better but more expensive. I think instead I&#039;ll trick out [[Float2Hex]] to use my super evil [[User:Strife_Onizuka/int2hex|Int-Base64-Hex converter]]. -- &#039;&#039;&#039;[[User:Strife_Onizuka|Strife]]&#039;&#039;&#039; &amp;lt;sup&amp;gt;&amp;lt;small&amp;gt;([[User talk:Strife_Onizuka|talk]]|[[Special:Contributions/Strife_Onizuka|contribs]])&amp;lt;/small&amp;gt;&amp;lt;/sup&amp;gt; 03:47, 21 January 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
:{{message}}well I&#039;m glad I could give you something fun to play with, though I am sorry it interfered with your RL schedule (such is the nature of our passions eh?) still haven&#039;t had a chance to poke at it... I&#039;m barely fitting forum posts in between RL concerns =/ stupid RL, always demanding I do things like work and eat and sleep... meh &amp;lt;br/&amp;gt;-- &#039;&#039;&#039;[[User:Void_Singer|Void]]&#039;&#039;&#039; &amp;lt;sup&amp;gt;&amp;lt;small&amp;gt;([[User_talk:Void_Singer|talk]]|[[Special:Contributions/Void_Singer|contribs]])&amp;lt;/small&amp;gt;&amp;lt;/sup&amp;gt; 16:47, 21 January 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
:{{message}}&#039;&#039;&#039;Update:&#039;&#039;&#039; looking at it, the month calc doesn&#039;t look right, as it would include the current month and looks to be off by a day for some months... after fiddling with it, I came up with this... &amp;lt;lsl&amp;gt;//rtn = &lt;br /&gt;
86400 *&lt;br /&gt;
(//y -= 1902&lt;br /&gt;
 (int)(y*365.25 + 0.25) - 24837 + // (y&amp;gt;&amp;gt;2)*1461 + (int)((y&amp;amp;3)*365.375) - 24837 +&lt;br /&gt;
 //m -= 1&lt;br /&gt;
 m*30 +(m-(m&amp;lt;7)&amp;gt;&amp;gt;1) + (m&amp;lt;2) - ((y&amp;amp;3)&amp;gt;0)*(m&amp;gt;1) +&lt;br /&gt;
 //d -= 1&lt;br /&gt;
 d) +&lt;br /&gt;
h +&lt;br /&gt;
m +&lt;br /&gt;
s&amp;lt;/lsl&amp;gt; check me on that but I think that&#039;s right for the symmetry capped version. shouldn&#039;t flow unless it&#039;s fed bad m/d/h/n/s, which I could force cap with llAbs(x%#) to prevent, so that even purposely malformed dates would fall in the +/-2145916800 range.&lt;br /&gt;
&lt;br /&gt;
::Interesting solution. Hadn&#039;t thought to use a typecast. That is a great simplification. The problem was probably caused by the right shift, as -1 &amp;gt;&amp;gt; 1 == -1, not the same as -1 / 2 == 0. -- &#039;&#039;&#039;[[User:Strife_Onizuka|Strife]]&#039;&#039;&#039; &amp;lt;sup&amp;gt;&amp;lt;small&amp;gt;([[User talk:Strife_Onizuka|talk]]|[[Special:Contributions/Strife_Onizuka|contribs]])&amp;lt;/small&amp;gt;&amp;lt;/sup&amp;gt; 20:17, 24 January 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
:{{message}} I did finally figure out that the extra months says were being subtracted out of the year calc, but had to abandon that for protection of missing months. I did note  &amp;quot;&amp;amp;&amp;amp; ((vIntYear - 100) % 200)&amp;quot; was overkill, since those dates would fall outside the full valid range anyhow.&lt;br /&gt;
:&amp;quot;1+(d-(5+(y==4))/30&amp;quot; is as far as I got on loop replacement for the sister function, too hard to calculate a variable cutoff for a variable number based on that number... I may test whether an if structure will be smaller or faster.. or maybe a string or list with cutoff dates.. not as elegent as I&#039;d have liked but ::shrug:: whatever works.&amp;lt;br/&amp;gt;-- &#039;&#039;&#039;[[User:Void_Singer|Void]]&#039;&#039;&#039; &amp;lt;sup&amp;gt;&amp;lt;small&amp;gt;([[User_talk:Void_Singer|talk]]|[[Special:Contributions/Void_Singer|contribs]])&amp;lt;/small&amp;gt;&amp;lt;/sup&amp;gt; 00:01, 25 January 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== References to forum threads ==&lt;br /&gt;
{{message}}The references to these threads: http://forums.secondlife.com/showthread.php?t=108960 and http://forums.secondlife.com/showthread.php?t=109571 in the caveat on throttling on the [[llHTTPRequest]] page are now broken. Did your archive project manage to catch any of theses? If so is it possible to distill the relevant info from them and add it to the page? [[User:Pete Olihenge|Pete Olihenge]] 10:18, 16 February 2010 (UTC) PS: I mean if you can give me access to the text of those threads, I can have a go at making a précis.&lt;br /&gt;
&lt;br /&gt;
{{message}}I&#039;ll take a look today, I didn&#039;t archive them by their thread ID&#039;s but rather by their page titles (or part thereof), but the links should still be in the page in print view, so I&#039;ll run text search and see if anything turns up... Gromlocks case probably won&#039;t be helped by self throttling, but I did think about that when he posted.&amp;lt;br/&amp;gt;-- &#039;&#039;&#039;[[User:Void_Singer|Void]]&#039;&#039;&#039; &amp;lt;sup&amp;gt;&amp;lt;small&amp;gt;([[User_talk:Void_Singer|talk]]|[[Special:Contributions/Void_Singer|contribs]])&amp;lt;/small&amp;gt;&amp;lt;/sup&amp;gt; 15:56, 16 February 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
:oh gods, you didn&#039;t just spider the forums? -- &#039;&#039;&#039;[[User:Strife_Onizuka|Strife]]&#039;&#039;&#039; &amp;lt;sup&amp;gt;&amp;lt;small&amp;gt;([[User talk:Strife_Onizuka|talk]]|[[Special:Contributions/Strife_Onizuka|contribs]])&amp;lt;/small&amp;gt;&amp;lt;/sup&amp;gt; 17:08, 16 February 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
::@Strife: I know, but with the load it was experiencing (probably from unthrottled spider requests =P), the fact that I didn&#039;t have anything on hand to do it with, and I wanted relevant description on the file names it was faster to just do a quick link rewrite to get the print view, and grab the pages manually.... it&#039;s only about 23*40 pages or so.... I just went after the most valuable stuff to cut down on chatter, so library scripts, a few posts I had bookmarked, and stickies.... what can I say, I was really busy doing other stuff too, and the archiving was what I was doing in between.... unfortunately I&#039;m going to need to do a parser for the broken bbcode, because you&#039;rs won&#039;t work on print view pages, even after adding the local url and setting fileIsGreasable... c&#039;est la vie &lt;br /&gt;
&lt;br /&gt;
::PS. when you have a chance, can you show me what I might change in Template:void-box so that when clicking edit on the container in a page I get the content of the box to edit, instead of the template page? my wiki foo is weak. I love the layout / ease of use, but would like to make it more functional so I don&#039;t have to do full page edits for just a single box (plus then others can use it easier too)&amp;lt;br/&amp;gt;-- &#039;&#039;&#039;[[User:Void_Singer|Void]]&#039;&#039;&#039; &amp;lt;sup&amp;gt;&amp;lt;small&amp;gt;([[User_talk:Void_Singer|talk]]|[[Special:Contributions/Void_Singer|contribs]])&amp;lt;/small&amp;gt;&amp;lt;/sup&amp;gt; 23:07, 16 February 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
{{message}} sorry Pete, it&#039;s not in there, unfortunately the wiki pages don&#039;t have something similar (though it&#039;s the same setup as a notecard reader which there are examples of) &amp;lt;br/&amp;gt;-- &#039;&#039;&#039;[[User:Void_Singer|Void]]&#039;&#039;&#039; &amp;lt;sup&amp;gt;&amp;lt;small&amp;gt;([[User_talk:Void_Singer|talk]]|[[Special:Contributions/Void_Singer|contribs]])&amp;lt;/small&amp;gt;&amp;lt;/sup&amp;gt; 23:25, 16 February 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
:As to fixing the template... I haven&#039;t ever found a solution. It was the original reason LSL documents had section editing turned off (now the templates are so complex that edit links don&#039;t make sense). Shoot, I nearly forgot I need to make a template for Operators. -- &#039;&#039;&#039;[[User:Strife_Onizuka|Strife]]&#039;&#039;&#039; &amp;lt;sup&amp;gt;&amp;lt;small&amp;gt;([[User talk:Strife_Onizuka|talk]]|[[Special:Contributions/Strife_Onizuka|contribs]])&amp;lt;/small&amp;gt;&amp;lt;/sup&amp;gt; 06:16, 17 February 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
{{message}} Note to self: fix those links when the forum archives come online. Hmm, that page is a bit... forbidding? [[User:Pete Olihenge|Pete Olihenge]] 07:32, 17 February 2010 (UTC)&lt;/div&gt;</summary>
		<author><name>Pete Olihenge</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=User_talk:Void_Singer&amp;diff=728633</id>
		<title>User talk:Void Singer</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=User_talk:Void_Singer&amp;diff=728633"/>
		<updated>2010-02-16T12:41:07Z</updated>

		<summary type="html">&lt;p&gt;Pete Olihenge: /* References to forum threads */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Comments: ==&lt;br /&gt;
{{message}} Comment Format&lt;br /&gt;
&amp;lt;pre&amp;gt;=== Topic === &amp;lt;-- this line is optional&lt;br /&gt;
{{message}} this is my comment&lt;br /&gt;
~~~~ &amp;lt;-- will be replaced by User Name + Time Stamp automatically&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{message}} welcome all to my User Talk page. Feel Free to leave a message below, and thanks for stopping by! --[[User:Void Singer|Void Singer]] 05:54, 20 November 2007 (PST)&lt;br /&gt;
&lt;br /&gt;
=== Re: Formatting [topic added by Void due to page reordering] ===&lt;br /&gt;
{{message}}It looks well thought out. I&#039;m pretty laid back about style as long as it&#039;s consistent. The only thing I put my foot down on is tabs being 4 spaces. All a matter of preference thou. I find prefixing variables with anything other then a letter to indicate type is overkill. I write my LSL as ESL (which is LSL passed through a C precompiler) and I reserve all uppercase lettered names for ESL macro&#039;s and defines. -- [[User:Strife Onizuka|Strife Onizuka]] 03:09, 3 November 2007 (PDT)&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;{{message}}Amazing. I&#039;ve been programming for 25 years and have developed a style that chooses the opposite of most of Void&#039;s rules. Why is it that these questions lead to such equally satisfactory results in competent programming organizations that are so different. I suppose that it&#039;s similar to the reason that Spanish isn&#039;t the same as French.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;I&#039;ll go Strife one further, though, and put my particular foot down about the insane (to me) verbosity of prefixing variables, function names, etc. with garbage characters that serve no useful purpose I can see, and is constantly bonking the reader who has to read through several largely irrelevant or self-evident characters to get to the important part - what the variable is. It&#039;s like getting tapped on the side of the head with a pencil every time I trip over one of the darn things. Is this another sad legacy of Microsoft? I&#039;d never seen such a thing before I had to start writing Windows code. And I&#039;ll note, I work in RL in an environment where we have several hundred thousand lines of legacy code I have to refer to regularly, (and a couple of legacy programmers) that use &amp;quot;Hungarian&amp;quot; notation like this, and after 10 years of reading it I STILL get tapped every time I see one.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;I do have one possibly pertinent point, though. I had been ambivalent about where the brace at the opening of a block goes for a couple years, having programmed in environments for most of my time where they were to be on a (wasteful) line of their own. After spending some time in Java, where the convention tends to be &#039;on the same line&#039; I was still uncertain I had an opinion, except that I really don&#039;t like the effect that mixing the styles has. (That happens with templates, copy/paste, etc.) However, a few weeks ago when working on some poor code (mine) that was too long and nested too deeply I spent quite a while tracking down a missing opening brace. I realized that had it been on its own line I&#039;d have seen it almost immediately. Given modern monitor resolutions and sizes, I don&#039;t think the vertical height saved is worth the obviousness that it exists.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;So there, finally the definitive answer to the &amp;quot;same line or different line&amp;quot; question.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Ah, the style wars, long shall they rage.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt; In the end, as both you and Strife observe, it is all personal preference as modified by the need to be consistent with those you work with. Thanks, much, for taking the time to write it down. I should do it too if I care so much I guess. --[[User:RJ Thibaud|RJ Thibaud]] 12:25, 23 December 2007 (PST)&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== RE: style etc ===&lt;br /&gt;
{{message}} heh, thanks for reading it at least, I&#039;m not fanatical about it, each person develops their own style, and to be honest I only adapted the style I normally use for lsl, from my other coding projects, so it&#039;s prone to updates (a few of which I&#039;ve yet to add in). The particular style I use is geared towards maximum understanding of the code for those new to scripting/programming so they can more easily find their way through code. But as noted, for an experienced coder it can be a bit like &#039;duh I know that&#039;. Coming from an enviroment with lots of new coders though, I tend to keep it up for their benefit more than my own. The opening brace debate is long running with me, and I do realize the pro&#039;s and cons, but have gotten myself in the habit of expecting open braces on the same line, and visually reading the statement (if, do, etc) and the indent as opening the statement and even briefly played with inlining the closing statement (but found it interfered with the visual nesting effect sometimes).&lt;br /&gt;
&lt;br /&gt;
I mostly provided the example style as something to explain, rather than recommend, because I was bored enough to write it one day, and had been asked a few times about it. I have found that prefixing of some kind tends to avoid collisions with developing languages like lsl, as I noticed happened once or twice when people named constants or variables that later became LSL constants, and I&#039;ve discouraged a few people from using llFunctionName for that and other reasons (like people that see the call and try to use it elsewhere). I&#039;ts all good though, whatever gets the job done and works as expected. [[User:Void Singer|Void Singer]] 13:35, 25 December 2007 (PST)&lt;br /&gt;
&lt;br /&gt;
== 0x80000000 X_X ==&lt;br /&gt;
&lt;br /&gt;
Yep I forgot about 0x80000000. The limit however accepts 2038 and then overflows. So I wrote a version that detects overflows and accepts the entire integer range. It should be noted that if you get clever on it, and give it a year before 1970 but have the final date fall in or after 1970 it will have a fit. Likewise for years after 1969 but the final dates fall before 1970. Could turn off the overflow detection for centrally located years but that&#039;s more work. But it will parse [2100,12,13,23,59, -2147483648] and [1845, 1, 1, 0, 0, 2147483647] properly... i think. =^_^= -- &#039;&#039;&#039;[[User:Strife_Onizuka|Strife]]&#039;&#039;&#039; &amp;lt;sup&amp;gt;&amp;lt;small&amp;gt;([[User talk:Strife_Onizuka|talk]]|[[Special:Contributions/Strife_Onizuka|contribs]])&amp;lt;/small&amp;gt;&amp;lt;/sup&amp;gt; 06:28, 20 January 2010 (UTC)&lt;br /&gt;
:{{message}} I&#039;ll take a look in a bit, and I do like the integer division and bit shift solution in the unix2stamp, much cleaner... in the other, subtracting out 68 less to make the entire range positive... I like that part, shouldve done it from the start (it was converted from a quickie 1970+ version that I think argent did) although I had capped the dates to provide symmetry with the opposite function (since it&#039;s much easier to cap that one on a particular day, and 19 days on the edge seemed a small loss, vs detecting up to the last available second)... haven&#039;t checked the leap day / month detection in the loop replacement but I&#039;ll assume it&#039;s good until I double check. ps, I appreciate the fixes (always something to be learned) but can we separate out revisions that are more than corrections or order changes... it makes it harder to compare versions side by side (as the wiki only gives changed lines)... not complaining, I appreciate the feedback... PPS bad cabbit you didn&#039;t test to be sure? =)&amp;lt;br/&amp;gt;-- &#039;&#039;&#039;[[User:Void_Singer|Void]]&#039;&#039;&#039; &amp;lt;sup&amp;gt;&amp;lt;small&amp;gt;([[User_talk:Void_Singer|talk]]|[[Special:Contributions/Void_Singer|contribs]])&amp;lt;/small&amp;gt;&amp;lt;/sup&amp;gt; 23:37, 20 January 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
:: As I was reading the code, I was like &amp;quot;this code is so evil I think it is something I must have done in a past life&amp;quot;. I really enjoy niggling away at code like this, reducing it to it&#039;s bare essentials. With that loop, once I saw that the sister function shared it, it made sense why you used it, symmetry. Yeah I agree with you about the comparisons being easier but it all sort of rolled out all at once; it didn&#039;t help that I pushed allot of the adjustment math through multiplications and divides. P.S. This version I posted I did check (in LSLEditor, with only minor mods, casting the bools to ints), I wanted to make sure I didn&#039;t screw up the math somewhere. P.S.S. I was considering replacing the (i * 30) with (i &amp;lt;&amp;lt; 5) - (i &amp;lt;&amp;lt; 1) cause it would be theoretically faster to execute but I didn&#039;t because it would probably take longer to setup the registers. P.S.S.S. I really enjoyed the coding (It&#039;s a great piece of code) but I forgot about everything else I was supposed to be doing yesterday; the secretary of my Physical Therapist was nonplussed that I hadn&#039;t called to cancel. *sigh* P.S^4 I was thinking I would work on the sister function, see if the loop can be eliminated altogether. Could do it with a list. A tree of if&#039;s would be better but more expensive. I think instead I&#039;ll trick out [[Float2Hex]] to use my super evil [[User:Strife_Onizuka/int2hex|Int-Base64-Hex converter]]. -- &#039;&#039;&#039;[[User:Strife_Onizuka|Strife]]&#039;&#039;&#039; &amp;lt;sup&amp;gt;&amp;lt;small&amp;gt;([[User talk:Strife_Onizuka|talk]]|[[Special:Contributions/Strife_Onizuka|contribs]])&amp;lt;/small&amp;gt;&amp;lt;/sup&amp;gt; 03:47, 21 January 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
:{{message}}well I&#039;m glad I could give you something fun to play with, though I am sorry it interfered with your RL schedule (such is the nature of our passions eh?) still haven&#039;t had a chance to poke at it... I&#039;m barely fitting forum posts in between RL concerns =/ stupid RL, always demanding I do things like work and eat and sleep... meh &amp;lt;br/&amp;gt;-- &#039;&#039;&#039;[[User:Void_Singer|Void]]&#039;&#039;&#039; &amp;lt;sup&amp;gt;&amp;lt;small&amp;gt;([[User_talk:Void_Singer|talk]]|[[Special:Contributions/Void_Singer|contribs]])&amp;lt;/small&amp;gt;&amp;lt;/sup&amp;gt; 16:47, 21 January 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
:{{message}}&#039;&#039;&#039;Update:&#039;&#039;&#039; looking at it, the month calc doesn&#039;t look right, as it would include the current month and looks to be off by a day for some months... after fiddling with it, I came up with this... &amp;lt;lsl&amp;gt;//rtn = &lt;br /&gt;
86400 *&lt;br /&gt;
(//y -= 1902&lt;br /&gt;
 (int)(y*365.25 + 0.25) - 24837 + // (y&amp;gt;&amp;gt;2)*1461 + (int)((y&amp;amp;3)*365.375) - 24837 +&lt;br /&gt;
 //m -= 1&lt;br /&gt;
 m*30 +(m-(m&amp;lt;7)&amp;gt;&amp;gt;1) + (m&amp;lt;2) - ((y&amp;amp;3)&amp;gt;0)*(m&amp;gt;1) +&lt;br /&gt;
 //d -= 1&lt;br /&gt;
 d) +&lt;br /&gt;
h +&lt;br /&gt;
m +&lt;br /&gt;
s&amp;lt;/lsl&amp;gt; check me on that but I think that&#039;s right for the symmetry capped version. shouldn&#039;t flow unless it&#039;s fed bad m/d/h/n/s, which I could force cap with llAbs(x%#) to prevent, so that even purposely malformed dates would fall in the +/-2145916800 range.&lt;br /&gt;
&lt;br /&gt;
::Interesting solution. Hadn&#039;t thought to use a typecast. That is a great simplification. The problem was probably caused by the right shift, as -1 &amp;gt;&amp;gt; 1 == -1, not the same as -1 / 2 == 0. -- &#039;&#039;&#039;[[User:Strife_Onizuka|Strife]]&#039;&#039;&#039; &amp;lt;sup&amp;gt;&amp;lt;small&amp;gt;([[User talk:Strife_Onizuka|talk]]|[[Special:Contributions/Strife_Onizuka|contribs]])&amp;lt;/small&amp;gt;&amp;lt;/sup&amp;gt; 20:17, 24 January 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
:{{message}} I did finally figure out that the extra months says were being subtracted out of the year calc, but had to abandon that for protection of missing months. I did note  &amp;quot;&amp;amp;&amp;amp; ((vIntYear - 100) % 200)&amp;quot; was overkill, since those dates would fall outside the full valid range anyhow.&lt;br /&gt;
:&amp;quot;1+(d-(5+(y==4))/30&amp;quot; is as far as I got on loop replacement for the sister function, too hard to calculate a variable cutoff for a variable number based on that number... I may test whether an if structure will be smaller or faster.. or maybe a string or list with cutoff dates.. not as elegent as I&#039;d have liked but ::shrug:: whatever works.&amp;lt;br/&amp;gt;-- &#039;&#039;&#039;[[User:Void_Singer|Void]]&#039;&#039;&#039; &amp;lt;sup&amp;gt;&amp;lt;small&amp;gt;([[User_talk:Void_Singer|talk]]|[[Special:Contributions/Void_Singer|contribs]])&amp;lt;/small&amp;gt;&amp;lt;/sup&amp;gt; 00:01, 25 January 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== References to forum threads ==&lt;br /&gt;
{{message}}The references to these threads: http://forums.secondlife.com/showthread.php?t=108960 and http://forums.secondlife.com/showthread.php?t=109571 in the caveat on throttling on the [[llHTTPRequest]] page are now broken. Did your archive project manage to catch any of theses? If so is it possible to distill the relevant info from them and add it to the page? [[User:Pete Olihenge|Pete Olihenge]] 10:18, 16 February 2010 (UTC) PS: I mean if you can give me access to the text of those threads, I can have a go at making a précis.&lt;/div&gt;</summary>
		<author><name>Pete Olihenge</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=User_talk:Void_Singer&amp;diff=728543</id>
		<title>User talk:Void Singer</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=User_talk:Void_Singer&amp;diff=728543"/>
		<updated>2010-02-16T10:19:00Z</updated>

		<summary type="html">&lt;p&gt;Pete Olihenge: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Comments: ==&lt;br /&gt;
{{message}} Comment Format&lt;br /&gt;
&amp;lt;pre&amp;gt;=== Topic === &amp;lt;-- this line is optional&lt;br /&gt;
{{message}} this is my comment&lt;br /&gt;
~~~~ &amp;lt;-- will be replaced by User Name + Time Stamp automatically&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{message}} welcome all to my User Talk page. Feel Free to leave a message below, and thanks for stopping by! --[[User:Void Singer|Void Singer]] 05:54, 20 November 2007 (PST)&lt;br /&gt;
&lt;br /&gt;
=== Re: Formatting [topic added by Void due to page reordering] ===&lt;br /&gt;
{{message}}It looks well thought out. I&#039;m pretty laid back about style as long as it&#039;s consistent. The only thing I put my foot down on is tabs being 4 spaces. All a matter of preference thou. I find prefixing variables with anything other then a letter to indicate type is overkill. I write my LSL as ESL (which is LSL passed through a C precompiler) and I reserve all uppercase lettered names for ESL macro&#039;s and defines. -- [[User:Strife Onizuka|Strife Onizuka]] 03:09, 3 November 2007 (PDT)&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;{{message}}Amazing. I&#039;ve been programming for 25 years and have developed a style that chooses the opposite of most of Void&#039;s rules. Why is it that these questions lead to such equally satisfactory results in competent programming organizations that are so different. I suppose that it&#039;s similar to the reason that Spanish isn&#039;t the same as French.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;I&#039;ll go Strife one further, though, and put my particular foot down about the insane (to me) verbosity of prefixing variables, function names, etc. with garbage characters that serve no useful purpose I can see, and is constantly bonking the reader who has to read through several largely irrelevant or self-evident characters to get to the important part - what the variable is. It&#039;s like getting tapped on the side of the head with a pencil every time I trip over one of the darn things. Is this another sad legacy of Microsoft? I&#039;d never seen such a thing before I had to start writing Windows code. And I&#039;ll note, I work in RL in an environment where we have several hundred thousand lines of legacy code I have to refer to regularly, (and a couple of legacy programmers) that use &amp;quot;Hungarian&amp;quot; notation like this, and after 10 years of reading it I STILL get tapped every time I see one.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;I do have one possibly pertinent point, though. I had been ambivalent about where the brace at the opening of a block goes for a couple years, having programmed in environments for most of my time where they were to be on a (wasteful) line of their own. After spending some time in Java, where the convention tends to be &#039;on the same line&#039; I was still uncertain I had an opinion, except that I really don&#039;t like the effect that mixing the styles has. (That happens with templates, copy/paste, etc.) However, a few weeks ago when working on some poor code (mine) that was too long and nested too deeply I spent quite a while tracking down a missing opening brace. I realized that had it been on its own line I&#039;d have seen it almost immediately. Given modern monitor resolutions and sizes, I don&#039;t think the vertical height saved is worth the obviousness that it exists.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;So there, finally the definitive answer to the &amp;quot;same line or different line&amp;quot; question.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Ah, the style wars, long shall they rage.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt; In the end, as both you and Strife observe, it is all personal preference as modified by the need to be consistent with those you work with. Thanks, much, for taking the time to write it down. I should do it too if I care so much I guess. --[[User:RJ Thibaud|RJ Thibaud]] 12:25, 23 December 2007 (PST)&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== RE: style etc ===&lt;br /&gt;
{{message}} heh, thanks for reading it at least, I&#039;m not fanatical about it, each person develops their own style, and to be honest I only adapted the style I normally use for lsl, from my other coding projects, so it&#039;s prone to updates (a few of which I&#039;ve yet to add in). The particular style I use is geared towards maximum understanding of the code for those new to scripting/programming so they can more easily find their way through code. But as noted, for an experienced coder it can be a bit like &#039;duh I know that&#039;. Coming from an enviroment with lots of new coders though, I tend to keep it up for their benefit more than my own. The opening brace debate is long running with me, and I do realize the pro&#039;s and cons, but have gotten myself in the habit of expecting open braces on the same line, and visually reading the statement (if, do, etc) and the indent as opening the statement and even briefly played with inlining the closing statement (but found it interfered with the visual nesting effect sometimes).&lt;br /&gt;
&lt;br /&gt;
I mostly provided the example style as something to explain, rather than recommend, because I was bored enough to write it one day, and had been asked a few times about it. I have found that prefixing of some kind tends to avoid collisions with developing languages like lsl, as I noticed happened once or twice when people named constants or variables that later became LSL constants, and I&#039;ve discouraged a few people from using llFunctionName for that and other reasons (like people that see the call and try to use it elsewhere). I&#039;ts all good though, whatever gets the job done and works as expected. [[User:Void Singer|Void Singer]] 13:35, 25 December 2007 (PST)&lt;br /&gt;
&lt;br /&gt;
== 0x80000000 X_X ==&lt;br /&gt;
&lt;br /&gt;
Yep I forgot about 0x80000000. The limit however accepts 2038 and then overflows. So I wrote a version that detects overflows and accepts the entire integer range. It should be noted that if you get clever on it, and give it a year before 1970 but have the final date fall in or after 1970 it will have a fit. Likewise for years after 1969 but the final dates fall before 1970. Could turn off the overflow detection for centrally located years but that&#039;s more work. But it will parse [2100,12,13,23,59, -2147483648] and [1845, 1, 1, 0, 0, 2147483647] properly... i think. =^_^= -- &#039;&#039;&#039;[[User:Strife_Onizuka|Strife]]&#039;&#039;&#039; &amp;lt;sup&amp;gt;&amp;lt;small&amp;gt;([[User talk:Strife_Onizuka|talk]]|[[Special:Contributions/Strife_Onizuka|contribs]])&amp;lt;/small&amp;gt;&amp;lt;/sup&amp;gt; 06:28, 20 January 2010 (UTC)&lt;br /&gt;
:{{message}} I&#039;ll take a look in a bit, and I do like the integer division and bit shift solution in the unix2stamp, much cleaner... in the other, subtracting out 68 less to make the entire range positive... I like that part, shouldve done it from the start (it was converted from a quickie 1970+ version that I think argent did) although I had capped the dates to provide symmetry with the opposite function (since it&#039;s much easier to cap that one on a particular day, and 19 days on the edge seemed a small loss, vs detecting up to the last available second)... haven&#039;t checked the leap day / month detection in the loop replacement but I&#039;ll assume it&#039;s good until I double check. ps, I appreciate the fixes (always something to be learned) but can we separate out revisions that are more than corrections or order changes... it makes it harder to compare versions side by side (as the wiki only gives changed lines)... not complaining, I appreciate the feedback... PPS bad cabbit you didn&#039;t test to be sure? =)&amp;lt;br/&amp;gt;-- &#039;&#039;&#039;[[User:Void_Singer|Void]]&#039;&#039;&#039; &amp;lt;sup&amp;gt;&amp;lt;small&amp;gt;([[User_talk:Void_Singer|talk]]|[[Special:Contributions/Void_Singer|contribs]])&amp;lt;/small&amp;gt;&amp;lt;/sup&amp;gt; 23:37, 20 January 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
:: As I was reading the code, I was like &amp;quot;this code is so evil I think it is something I must have done in a past life&amp;quot;. I really enjoy niggling away at code like this, reducing it to it&#039;s bare essentials. With that loop, once I saw that the sister function shared it, it made sense why you used it, symmetry. Yeah I agree with you about the comparisons being easier but it all sort of rolled out all at once; it didn&#039;t help that I pushed allot of the adjustment math through multiplications and divides. P.S. This version I posted I did check (in LSLEditor, with only minor mods, casting the bools to ints), I wanted to make sure I didn&#039;t screw up the math somewhere. P.S.S. I was considering replacing the (i * 30) with (i &amp;lt;&amp;lt; 5) - (i &amp;lt;&amp;lt; 1) cause it would be theoretically faster to execute but I didn&#039;t because it would probably take longer to setup the registers. P.S.S.S. I really enjoyed the coding (It&#039;s a great piece of code) but I forgot about everything else I was supposed to be doing yesterday; the secretary of my Physical Therapist was nonplussed that I hadn&#039;t called to cancel. *sigh* P.S^4 I was thinking I would work on the sister function, see if the loop can be eliminated altogether. Could do it with a list. A tree of if&#039;s would be better but more expensive. I think instead I&#039;ll trick out [[Float2Hex]] to use my super evil [[User:Strife_Onizuka/int2hex|Int-Base64-Hex converter]]. -- &#039;&#039;&#039;[[User:Strife_Onizuka|Strife]]&#039;&#039;&#039; &amp;lt;sup&amp;gt;&amp;lt;small&amp;gt;([[User talk:Strife_Onizuka|talk]]|[[Special:Contributions/Strife_Onizuka|contribs]])&amp;lt;/small&amp;gt;&amp;lt;/sup&amp;gt; 03:47, 21 January 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
:{{message}}well I&#039;m glad I could give you something fun to play with, though I am sorry it interfered with your RL schedule (such is the nature of our passions eh?) still haven&#039;t had a chance to poke at it... I&#039;m barely fitting forum posts in between RL concerns =/ stupid RL, always demanding I do things like work and eat and sleep... meh &amp;lt;br/&amp;gt;-- &#039;&#039;&#039;[[User:Void_Singer|Void]]&#039;&#039;&#039; &amp;lt;sup&amp;gt;&amp;lt;small&amp;gt;([[User_talk:Void_Singer|talk]]|[[Special:Contributions/Void_Singer|contribs]])&amp;lt;/small&amp;gt;&amp;lt;/sup&amp;gt; 16:47, 21 January 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
:{{message}}&#039;&#039;&#039;Update:&#039;&#039;&#039; looking at it, the month calc doesn&#039;t look right, as it would include the current month and looks to be off by a day for some months... after fiddling with it, I came up with this... &amp;lt;lsl&amp;gt;//rtn = &lt;br /&gt;
86400 *&lt;br /&gt;
(//y -= 1902&lt;br /&gt;
 (int)(y*365.25 + 0.25) - 24837 + // (y&amp;gt;&amp;gt;2)*1461 + (int)((y&amp;amp;3)*365.375) - 24837 +&lt;br /&gt;
 //m -= 1&lt;br /&gt;
 m*30 +(m-(m&amp;lt;7)&amp;gt;&amp;gt;1) + (m&amp;lt;2) - ((y&amp;amp;3)&amp;gt;0)*(m&amp;gt;1) +&lt;br /&gt;
 //d -= 1&lt;br /&gt;
 d) +&lt;br /&gt;
h +&lt;br /&gt;
m +&lt;br /&gt;
s&amp;lt;/lsl&amp;gt; check me on that but I think that&#039;s right for the symmetry capped version. shouldn&#039;t flow unless it&#039;s fed bad m/d/h/n/s, which I could force cap with llAbs(x%#) to prevent, so that even purposely malformed dates would fall in the +/-2145916800 range.&lt;br /&gt;
&lt;br /&gt;
::Interesting solution. Hadn&#039;t thought to use a typecast. That is a great simplification. The problem was probably caused by the right shift, as -1 &amp;gt;&amp;gt; 1 == -1, not the same as -1 / 2 == 0. -- &#039;&#039;&#039;[[User:Strife_Onizuka|Strife]]&#039;&#039;&#039; &amp;lt;sup&amp;gt;&amp;lt;small&amp;gt;([[User talk:Strife_Onizuka|talk]]|[[Special:Contributions/Strife_Onizuka|contribs]])&amp;lt;/small&amp;gt;&amp;lt;/sup&amp;gt; 20:17, 24 January 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
:{{message}} I did finally figure out that the extra months says were being subtracted out of the year calc, but had to abandon that for protection of missing months. I did note  &amp;quot;&amp;amp;&amp;amp; ((vIntYear - 100) % 200)&amp;quot; was overkill, since those dates would fall outside the full valid range anyhow.&lt;br /&gt;
:&amp;quot;1+(d-(5+(y==4))/30&amp;quot; is as far as I got on loop replacement for the sister function, too hard to calculate a variable cutoff for a variable number based on that number... I may test whether an if structure will be smaller or faster.. or maybe a string or list with cutoff dates.. not as elegent as I&#039;d have liked but ::shrug:: whatever works.&amp;lt;br/&amp;gt;-- &#039;&#039;&#039;[[User:Void_Singer|Void]]&#039;&#039;&#039; &amp;lt;sup&amp;gt;&amp;lt;small&amp;gt;([[User_talk:Void_Singer|talk]]|[[Special:Contributions/Void_Singer|contribs]])&amp;lt;/small&amp;gt;&amp;lt;/sup&amp;gt; 00:01, 25 January 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== References to forum threads ==&lt;br /&gt;
{{message}}The references to these threads: http://forums.secondlife.com/showthread.php?t=108960 and http://forums.secondlife.com/showthread.php?t=109571 in the caveat on throttling on the [[llHTTPRequest]] page are now broken. Did your archive project manage to catch any of theses? If so is it possible to distill the relevant info from them and add it to the page? [[User:Pete Olihenge|Pete Olihenge]] 10:18, 16 February 2010 (UTC)&lt;/div&gt;</summary>
		<author><name>Pete Olihenge</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=LlHTTPRequest&amp;diff=728533</id>
		<title>LlHTTPRequest</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=LlHTTPRequest&amp;diff=728533"/>
		<updated>2010-02-16T10:09:50Z</updated>

		<summary type="html">&lt;p&gt;Pete Olihenge: Forum references in caveat re throttling now broken&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{LSL_Function&lt;br /&gt;
|func=llHTTPRequest&lt;br /&gt;
|func_id=230&lt;br /&gt;
|func_energy=10.0&lt;br /&gt;
|func_sleep=0.0&lt;br /&gt;
|func_desc=Sends an HTTP request to the specified URL with the body of the request and parameters. &lt;br /&gt;
|sort=HTTPRequest&lt;br /&gt;
|func_footnote=&lt;br /&gt;
|return_type=key&lt;br /&gt;
|return_text= that is a handle identifying the HTTP request made.&lt;br /&gt;
|p1_type=string|p1_name=url|p1_desc=A valid HTTP/HTTPS URL.&lt;br /&gt;
|p2_type=list|p2_name=parameters|p2_desc=configuration parameters, specified as HTTP_* flag-value pairs&lt;br /&gt;
[ parameter1, value1, parameter2, value2, . . . parameterN, valueN]&lt;br /&gt;
|p3_type=string|p3_name=body|p3_desc=Contents of the request.&lt;br /&gt;
|constants={{LSL_Constants_HTTP}}&lt;br /&gt;
{{LSL_Constants/HTTP_Headers}}&lt;br /&gt;
|spec&lt;br /&gt;
|caveats=&lt;br /&gt;
*If there is a space in &#039;&#039;&#039;url&#039;&#039;&#039;, the [[http_response]] status code will be 499.&lt;br /&gt;
*The response body is limited to 2048 bytes; if it is longer it will be truncated.&lt;br /&gt;
*Requests are throttled on a per [[object]] basis (not per prim).&lt;br /&gt;
**Requests are throttled to a maximum of 25 requests per 20 seconds.  This is to support a sustained rate of 1 per second or a burst of up to 25.&lt;br /&gt;
***See [http://forums.secondlife.com/showthread.php?t=108960 this thread] and [http://forums.secondlife.com/showthread.php?t=109571 this thread] for more details. (These links are unavailable now that the forums to which they refer to have been closed. Linden Lab have indicated that it will be approximately four weeks from the time of this closure - 9th February, 2010 - before the archived versions are available.)&lt;br /&gt;
*Cannot be used to load textures or images from the internet, for more information see [[Web Textures]].&lt;br /&gt;
*If the accessed site is relying on the LSL script to report L$ transactions, then it &#039;&#039;&#039;must&#039;&#039;&#039; check the X-SecondLife-Shard header to see if the script is running on the beta grid.&lt;br /&gt;
* Some servers will return a 405 error if you send POST to a file that can&#039;t accept metadata, such as a text or HTML file. Make sure you use the GET method to ensure success in any environment.&lt;br /&gt;
* While the HTTP status code from the server is provided to the script, redirect codes such as 302 will result in the redirect being automatically and transparently followed, with the resulting response being returned.&lt;br /&gt;
* The following applies when making a request to a script using HTTP-In:&lt;br /&gt;
** When appending a query string to a cap URL there MUST be a trailing slash between the cap guid and the query string token &#039;?&#039;. IE https://sim123.agni.lindenlab.com/cap/f23b4b94-012d-44f2-bd0c-16c328321221?arg=gra will return an HTTP 500, but https://sim123.agni.lindenlab.com/cap/f23b4b94-012d-44f2-bd0c-16c328321221/?arg=gra will succeed.&lt;br /&gt;
|examples=&amp;lt;lsl&amp;gt;key http_request_id;&lt;br /&gt;
&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
    state_entry()&lt;br /&gt;
    {&lt;br /&gt;
        http_request_id = llHTTPRequest(&amp;quot;url&amp;quot;, [], &amp;quot;&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    http_response(key request_id, integer status, list metadata, string body)&lt;br /&gt;
    {&lt;br /&gt;
        if (request_id == http_request_id)&lt;br /&gt;
        {&lt;br /&gt;
            llSetText(body, &amp;lt;0,0,1&amp;gt;, 1);&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example PHP test script:&lt;br /&gt;
&amp;lt;php&amp;gt;&amp;lt;?php header(&amp;quot;content-type: text/plain; charset=utf-8&amp;quot;); ?&amp;gt;&lt;br /&gt;
Headers received:&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * @author Wouter Hobble&lt;br /&gt;
 * @copyright 2008&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
foreach ($_SERVER as $k =&amp;gt; $v)&lt;br /&gt;
{&lt;br /&gt;
	if( substr($k, 0, 5) == &#039;HTTP_&#039;)&lt;br /&gt;
	{&lt;br /&gt;
		print &amp;quot;\n&amp;quot;. $k. &amp;quot;\t&amp;quot;. $v;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
?&amp;gt;&amp;lt;/php&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example wrapper script Both capturing apache headers and global methodes&lt;br /&gt;
&amp;lt;php&amp;gt;&lt;br /&gt;
&amp;lt;?PHP&lt;br /&gt;
	// Author Waster Skronski.&lt;br /&gt;
	// General Public License (GPL).&lt;br /&gt;
	// Mind that some headers are not included because they&#039;re either useless or unreliable.&lt;br /&gt;
	$USE_APACHE_HEADERS = TRUE; // switch to false if you need cgi methods&lt;br /&gt;
	if ($USE_APACHE_HEADERS)&lt;br /&gt;
	{&lt;br /&gt;
		$headers 	= apache_request_headers();&lt;br /&gt;
		$objectgrid 	= $headers[&amp;quot;X-SecondLife-Shard&amp;quot;];&lt;br /&gt;
		$objectname 	= $headers[&amp;quot;X-SecondLife-Object-Name&amp;quot;];&lt;br /&gt;
		$objectkey     	= $headers[&amp;quot;X-SecondLife-Object-Key&amp;quot;];&lt;br /&gt;
		$objectpos 	= $headers[&amp;quot;X-SecondLife-Local-Position&amp;quot;];&lt;br /&gt;
		$ownerkey     	= $headers[&amp;quot;X-SecondLife-Owner-Key&amp;quot;];&lt;br /&gt;
		$ownername 	= $headers[&amp;quot;X-SecondLife-Owner-Name&amp;quot;];&lt;br /&gt;
		$regiondata     = $headers[&amp;quot;X-SecondLife-Region&amp;quot;];&lt;br /&gt;
		$regiontmp 	= explode (&amp;quot;(&amp;quot;,$regiondata); // cut cords off &lt;br /&gt;
		$regionpos 	= explode (&amp;quot;)&amp;quot;,$regiontmp[1]); //&lt;br /&gt;
		$regionname 	= substr($regiontmp[0],0,-1); // cut last space from simname&lt;br /&gt;
	} else {&lt;br /&gt;
		$db = $GLOBALS;&lt;br /&gt;
		$headers 		= $db[&#039;HTTP_ENV_VARS&#039;];&lt;br /&gt;
		$objectgrid 	= $headers[&amp;quot;HTTP_X_SECONDLIFE_SHARD&amp;quot;]; &lt;br /&gt;
		$objectname 	= $headers[&amp;quot;HTTP_X_SECONDLIFE_OBJECT_NAME&amp;quot;];&lt;br /&gt;
		$objectkey     	= $headers[&amp;quot;HTTP_X_SECONDLIFE_OBJECT_KEY&amp;quot;];&lt;br /&gt;
		$ownerkey     	= $headers[&amp;quot;HTTP_X_SECONDLIFE_OWNER_KEY&amp;quot;];&lt;br /&gt;
		$objectpos     	= $headers[&amp;quot;HTTP_X_SECONDLIFE_LOCAL_POSITION&amp;quot;];&lt;br /&gt;
		$ownername 	= $headers[&amp;quot;HTTP_X_SECONDLIFE_OWNER_NAME&amp;quot;];&lt;br /&gt;
		$regiondata     = $headers[&amp;quot;HTTP_X_SECONDLIFE_REGION&amp;quot;];&lt;br /&gt;
		$regiontmp 	= explode (&amp;quot;(&amp;quot;,$regiondata); &lt;br /&gt;
		$regionpos 	= explode (&amp;quot;)&amp;quot;,$regiontmp[1]);&lt;br /&gt;
		$regionname 	= substr($regiontmp[0],0,-1);&lt;br /&gt;
	}&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/php&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;display:none;&amp;quot;&amp;gt;&amp;lt;lsl&amp;gt;&amp;lt;/lsl&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
|helpers&lt;br /&gt;
|also_header&lt;br /&gt;
|also_events={{LSL DefineRow||[[http_response]]}}&lt;br /&gt;
|also_functions={{LSL DefineRow||[[llEscapeURL]]}}&lt;br /&gt;
{{LSL DefineRow||[[llUnescapeURL]]}}&lt;br /&gt;
|also_articles={{LSL DefineRow||[[Simulator IP Addresses]]}}&lt;br /&gt;
|also_footer&lt;br /&gt;
|notes=If for some reason while using llHTTPRequest/http_response you are unable to parse a known good RSS feed or some other form of web contents, you will need to work around it outside of SecondLife. This is unlikely to change in the near future since checking the headers requires more overhead at the simulator level.&lt;br /&gt;
&lt;br /&gt;
You may find that some web servers return either a null or a nonsensical result when llHTTPRequest is used, even though the same URL in a PC web browser returns the expected result. This may be due to the fact that the llHTTPRequest User Agent string is not recognised by some web servers as it does not contain &amp;quot;Mozilla&amp;quot;, which would identify it as a web browser instead of, for example, a Shoutcast or an RSS client. A workaround is to append &amp;quot; HTTP/1.0\nUser-Agent: LSL Script (Mozilla Compatible)\n\n&amp;quot; or similar to the URL string, which will kludge the HTTP request to look like it originates from a web browser.&lt;br /&gt;
&lt;br /&gt;
CGI environments may place the headers into variables by capitalizing the entire name, replacing dashes with underscores, and prefixing the name with &amp;quot;HTTP_&amp;quot;, e.g. &amp;quot;HTTP_X_SECONDLIFE_OBJECT_NAME&amp;quot;. PHP $_SERVER variables do this as well.&lt;br /&gt;
&lt;br /&gt;
Apache can include the headers in its logs, using the CustomLog and LogFormat directives.  See [http://httpd.apache.org/docs/2.0/mod/mod_log_config.html#formats the docs] for details on the syntax.&lt;br /&gt;
&lt;br /&gt;
|mode&lt;br /&gt;
|deprecated&lt;br /&gt;
|permission&lt;br /&gt;
|cat1=HTTP&lt;br /&gt;
|cat2=XML-RPC&lt;br /&gt;
|cat3=Communications&lt;br /&gt;
|cat4=HTTP/Client&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Pete Olihenge</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=Talk:LlHTTPRequest&amp;diff=728523</id>
		<title>Talk:LlHTTPRequest</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=Talk:LlHTTPRequest&amp;diff=728523"/>
		<updated>2010-02-16T10:09:49Z</updated>

		<summary type="html">&lt;p&gt;Pete Olihenge: /* References to forum threads are now broken */ new section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;I have a Question ..&lt;br /&gt;
Does POST work ? &lt;br /&gt;
I couldnt get it working&lt;br /&gt;
Anylyn Hax 13:34, 28 July 2007 (PDT)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following headers will be present, usable by scripts running on the HTTP server if the scripting language allows you to access the headers.&lt;br /&gt;
&lt;br /&gt;
An PHP example on how to check to see if the call came from the main grid:&lt;br /&gt;
 &amp;lt;?php&lt;br /&gt;
     if ($_SERVER[&amp;quot;HTTP_X_SECONDLIFE_SHARD&amp;quot;] == &amp;quot;Production&amp;quot;) {&lt;br /&gt;
         echo &#039;You are using the main grid&#039;;&lt;br /&gt;
     } else {&lt;br /&gt;
         echo &#039;You are not using the main grid&#039;;&lt;br /&gt;
     }&lt;br /&gt;
 ?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Odd format for header names ==&lt;br /&gt;
&lt;br /&gt;
Why are the headers listed as HTTP_SOME_HEADER_NAME, when the sent headers are in the format Some-Header-Name? Is there some benefit to putting false values that match conventions used by CGI, but aren&#039;t actually correct?&lt;br /&gt;
* This is because you are looking at a global property with a lot more information than just headers. Some functions like listed below handle the stripping of the HTTP_ information, but you could also just use substr to remove the HTTP_ [[User:Wouter Hobble|Wouter Hobble]] - 4 July 2008&lt;br /&gt;
&lt;br /&gt;
I am aware that the example given above works, but (assuming that you&#039;re using mod_php) this would too, and reflects the real header names:&lt;br /&gt;
 &amp;lt;?php&lt;br /&gt;
 $headers = apache_request_headers();&lt;br /&gt;
 if($headers[&#039;X-SecondLife-Shard&#039;] == &#039;Production&#039;)&lt;br /&gt;
 {&lt;br /&gt;
     print &amp;quot;You are on the main grid.&amp;quot;;&lt;br /&gt;
 }&lt;br /&gt;
 else&lt;br /&gt;
 {&lt;br /&gt;
     print &amp;quot;You are on a preview grid.&amp;quot;;&lt;br /&gt;
 }&lt;br /&gt;
 ?&amp;gt;&lt;br /&gt;
Additionally, the current information does not show the capitalisation, thus further confusing the matter.&lt;br /&gt;
[[User:Katharine Berry|Katharine Berry]] 09:55, 21 June 2007 (PDT)&lt;br /&gt;
&lt;br /&gt;
== Root Certificates ==&lt;br /&gt;
Can someone add a list of root certificates to this article?&lt;br /&gt;
&lt;br /&gt;
I know that Verisign, Thawt, and RapidSSL are accepted, I know that CACert.org is not.&lt;br /&gt;
&lt;br /&gt;
== [[HTTP_VERIFY_CERT]] behavior clarification ==&lt;br /&gt;
&lt;br /&gt;
Even when HTTP_VERIFY_CERT is set to FALSE, if the certificate domain name does not match the URL domain you will get a HTTP 499 response.&lt;br /&gt;
{{Unsigned|Apotheus Silverman}}&lt;br /&gt;
&lt;br /&gt;
:That does not sound like a bug. That sounds like a feature. If I tried to access https://www.microsoft.com and the certificate was for hax0r.com I would be thinking there was a man-in-the-middle attack happening. On the flip side if you don&#039;t verify the signing authority you can pretend to be anyone you want. I don&#039;t know which is worse, the false sense of security or certificate impersonation. -- &#039;&#039;&#039;[[User:Strife_Onizuka|Strife]]&#039;&#039;&#039; &amp;lt;sup&amp;gt;&amp;lt;small&amp;gt;([[User talk:Strife_Onizuka|talk]]|[[Special:Contributions/Strife_Onizuka|contribs]])&amp;lt;/small&amp;gt;&amp;lt;/sup&amp;gt; 13:21, 15 October 2008 (PDT)&lt;br /&gt;
&lt;br /&gt;
== Region limit ==&lt;br /&gt;
&lt;br /&gt;
Besides the 25/sec/script limit there is some limit per time per REGION.&lt;br /&gt;
Error Message &amp;quot;This region currently has too many in progress HTTP requests.&amp;quot;&lt;br /&gt;
so what is it?&lt;br /&gt;
&lt;br /&gt;
== I am totally confused ==&lt;br /&gt;
&lt;br /&gt;
I gulp a stare. I hope it makes sense to me one day. -- &#039;&#039;&#039;[[User:EddyFragment Robonaught|Eddy]]&#039;&#039;&#039;  &amp;lt;sup&amp;gt;&amp;lt;small&amp;gt;([[User talk:EddyFragment_Robonaught|talk]]|[[Special:Contributions/EddyFragment_Robonaught|contribs]])&amp;lt;/small&amp;gt;&amp;lt;/sup&amp;gt; 15:55, 10 June 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
== POST? ==&lt;br /&gt;
&lt;br /&gt;
I Could Not Get Post To Work To A PHP page, It Was Picked Up By The Page As A Get.&lt;br /&gt;
 &lt;br /&gt;
llHTTPRequest(url, [HTTP_METHOD, &amp;quot;POST&amp;quot;], &amp;quot;&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
Post, Put, And Get All Came Across As Get On The Server. So Does HTTP_METHOD Not Work?[[User:Adicted Waco|Adi]] 19:48, 20 August 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
== References to forum threads are now broken ==&lt;br /&gt;
&lt;br /&gt;
The references to threads in the now closed old forums (re caveat on throttling) are now broken; LL have indicated that (at the time of writing) it will be four weeks until the archives are available. I&#039;ve added a comment to this effect on the page, but perhaps someone knows a better way to handle this. [[User:Pete Olihenge|Pete Olihenge]] 10:09, 16 February 2010 (UTC)&lt;/div&gt;</summary>
		<author><name>Pete Olihenge</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=Talk:LlCloud&amp;diff=721393</id>
		<title>Talk:LlCloud</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=Talk:LlCloud&amp;diff=721393"/>
		<updated>2010-02-04T16:40:57Z</updated>

		<summary type="html">&lt;p&gt;Pete Olihenge: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Windlight? ==&lt;br /&gt;
&lt;br /&gt;
How will this be affected by windlight? --[[User:Lavender Arrow|Lavender Arrow]] 09:33, 19 February 2008 (PST)&lt;br /&gt;
&lt;br /&gt;
== either sync or don&#039;t bother ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;which is why different clients can see different cloud formations and de-synchronizes cloud view from the server over time.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
LL should either lock the sync of cloud formations across all users, or they should not bother trying to sync at all and just generate cloud formations local to the client only. A halfway implementation that doesn&#039;t keep in sync ultimately just wastes bandwidth vs just a randomized clientside cloud generator that needs no bandwidth. [[User:Scalar Tardis|Scalar Tardis]] 20:26, 28 May 2008 (PDT)&lt;br /&gt;
&lt;br /&gt;
:The clouds refered to are the particle like clouds and not the shader clouds (windlight). That aspect of the documentation hasn&#039;t been updated, most likely because nobody cares enough to ask LL how clouds currently work. It&#039;s totally moot considering the user can override the windlight settings. It&#039;s one of those little things that nobody really cares about. The stars fit into much the same category. -- [[User:Strife Onizuka|Strife Onizuka]] 00:18, 29 May 2008 (PDT)&lt;br /&gt;
&lt;br /&gt;
== Errors in notes? ==&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Values returned above 1.0 - 2.0 indicate rainfall, but the option for rain is not currently implemented so values are capped at 1.0.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Minor point really, seeing as how this function is virtually useless except perhaps as a generator of not-so-random numbers that kinda &amp;quot;flow&amp;quot;...&lt;br /&gt;
&lt;br /&gt;
It &#039;&#039;does&#039;&#039; return values greater than 1.0, and the phrase &amp;quot;above 1.0 - 2.0&amp;quot; is confusing; I think it&#039;s trying to say &amp;quot;in the range 1.0 - 2.0&amp;quot;. I&#039;m too ignorant of the inner workings of SL to be comfortable fixing this without moral support. [[User:Pete Olihenge|Pete Olihenge]] 21:56, 3 February 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
:Good catch. The bulk of the documentation was written... oh $#!7. It&#039;s almost identical to the LSL Wiki documentation. Looking at the revision logs and the revisions themselves the good news is that they were both (mostly) by the same person. Tracking down the source of the content and properly attributing it is a monumental task (as I have my doubts about the authorship of the original info). We can however rewrite the content and use the original sources cited for our own. Since Cid contributed much of the content to both pages, we only need to worry about the contributions that weren&#039;t his. -- &#039;&#039;&#039;[[User:Strife_Onizuka|Strife]]&#039;&#039;&#039; &amp;lt;sup&amp;gt;&amp;lt;small&amp;gt;([[User talk:Strife_Onizuka|talk]]|[[Special:Contributions/Strife_Onizuka|contribs]])&amp;lt;/small&amp;gt;&amp;lt;/sup&amp;gt; 01:10, 4 February 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
::Thanks, Strife. I&#039;ve changed it to what I think is correct. It&#039;s sad that this and llGetSunDirection don&#039;t work properly; I was toying with an idea for a sundial that didn&#039;t use a clock as its basis. There would be possibilities for some nice meteorolgical and astronomincal toys if the functions worked - I&#039;m sure I saw Orion the other day while watching a sunrise. And having just been sailing, the chaotic nature of the SL wind also means one has to rely on a third-party to provide something useable. [[User:Pete Olihenge|Pete Olihenge]] 01:37, 4 February 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
:::Yeah it is sad. I don&#039;t even have the heart to tell you worst of it. I hope it was a pretty sunrise. -- &#039;&#039;&#039;[[User:Strife_Onizuka|Strife]]&#039;&#039;&#039; &amp;lt;sup&amp;gt;&amp;lt;small&amp;gt;([[User talk:Strife_Onizuka|talk]]|[[Special:Contributions/Strife_Onizuka|contribs]])&amp;lt;/small&amp;gt;&amp;lt;/sup&amp;gt; 03:49, 4 February 2010 (UTC)&lt;br /&gt;
:::P.S. I couldn&#039;t help but laugh when I though of SL Astrology.&lt;br /&gt;
&lt;br /&gt;
::::Thanks for redoing the whole page - I was thinking about that myself. The sunrise was unspectacular; I was trying to reconcile the time of day, llGetSunDirection, the rendered sun direction and the rendered lighting effects. I think I&#039;ve given up on getting anywhere with that. It seems the only useful environmental metrics are time dilation and sim FPS. Go on, give it to me straight: the starfield is entirely random and Orion is a programmer&#039;s joke? (It did prompt me to scan the heavens more closely but I&#039;m no astronomer and I couldn&#039;t find either Cassiopea or Ursa Major.) [[User:Pete Olihenge|Pete Olihenge]] 11:35, 4 February 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
:::::You got half of it, the pattern of stars resembling Orion must have been a random occurrence. I&#039;m so sorry :-( I wish SL had a static star-field too. The myths and legends we are so denied by the lack. -- &#039;&#039;&#039;[[User:Strife_Onizuka|Strife]]&#039;&#039;&#039; &amp;lt;sup&amp;gt;&amp;lt;small&amp;gt;([[User talk:Strife_Onizuka|talk]]|[[Special:Contributions/Strife_Onizuka|contribs]])&amp;lt;/small&amp;gt;&amp;lt;/sup&amp;gt; 15:35, 4 February 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
:::::P.S. {{JIRA|VWR-16768}}&lt;br /&gt;
&lt;br /&gt;
::::::Voted; I was thinking along those lines too. (I so wish I&#039;d taken a photo of that Orion - the resemblance was uncanny. I can see myself staring at the sky for ages now...) &amp;quot;If I ever get a region of my own to play with...&amp;quot; Next... tides :) [[User:Pete Olihenge|Pete Olihenge]] 16:40, 4 February 2010 (UTC)&lt;/div&gt;</summary>
		<author><name>Pete Olihenge</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=Talk:LlCloud&amp;diff=721292</id>
		<title>Talk:LlCloud</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=Talk:LlCloud&amp;diff=721292"/>
		<updated>2010-02-04T11:35:58Z</updated>

		<summary type="html">&lt;p&gt;Pete Olihenge: /* Errors in notes? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Windlight? ==&lt;br /&gt;
&lt;br /&gt;
How will this be affected by windlight? --[[User:Lavender Arrow|Lavender Arrow]] 09:33, 19 February 2008 (PST)&lt;br /&gt;
&lt;br /&gt;
== either sync or don&#039;t bother ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;which is why different clients can see different cloud formations and de-synchronizes cloud view from the server over time.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
LL should either lock the sync of cloud formations across all users, or they should not bother trying to sync at all and just generate cloud formations local to the client only. A halfway implementation that doesn&#039;t keep in sync ultimately just wastes bandwidth vs just a randomized clientside cloud generator that needs no bandwidth. [[User:Scalar Tardis|Scalar Tardis]] 20:26, 28 May 2008 (PDT)&lt;br /&gt;
&lt;br /&gt;
:The clouds refered to are the particle like clouds and not the shader clouds (windlight). That aspect of the documentation hasn&#039;t been updated, most likely because nobody cares enough to ask LL how clouds currently work. It&#039;s totally moot considering the user can override the windlight settings. It&#039;s one of those little things that nobody really cares about. The stars fit into much the same category. -- [[User:Strife Onizuka|Strife Onizuka]] 00:18, 29 May 2008 (PDT)&lt;br /&gt;
&lt;br /&gt;
== Errors in notes? ==&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Values returned above 1.0 - 2.0 indicate rainfall, but the option for rain is not currently implemented so values are capped at 1.0.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Minor point really, seeing as how this function is virtually useless except perhaps as a generator of not-so-random numbers that kinda &amp;quot;flow&amp;quot;...&lt;br /&gt;
&lt;br /&gt;
It &#039;&#039;does&#039;&#039; return values greater than 1.0, and the phrase &amp;quot;above 1.0 - 2.0&amp;quot; is confusing; I think it&#039;s trying to say &amp;quot;in the range 1.0 - 2.0&amp;quot;. I&#039;m too ignorant of the inner workings of SL to be comfortable fixing this without moral support. [[User:Pete Olihenge|Pete Olihenge]] 21:56, 3 February 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
:Good catch. The bulk of the documentation was written... oh $#!7. It&#039;s almost identical to the LSL Wiki documentation. Looking at the revision logs and the revisions themselves the good news is that they were both (mostly) by the same person. Tracking down the source of the content and properly attributing it is a monumental task (as I have my doubts about the authorship of the original info). We can however rewrite the content and use the original sources cited for our own. Since Cid contributed much of the content to both pages, we only need to worry about the contributions that weren&#039;t his. -- &#039;&#039;&#039;[[User:Strife_Onizuka|Strife]]&#039;&#039;&#039; &amp;lt;sup&amp;gt;&amp;lt;small&amp;gt;([[User talk:Strife_Onizuka|talk]]|[[Special:Contributions/Strife_Onizuka|contribs]])&amp;lt;/small&amp;gt;&amp;lt;/sup&amp;gt; 01:10, 4 February 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
::Thanks, Strife. I&#039;ve changed it to what I think is correct. It&#039;s sad that this and llGetSunDirection don&#039;t work properly; I was toying with an idea for a sundial that didn&#039;t use a clock as its basis. There would be possibilities for some nice meteorolgical and astronomincal toys if the functions worked - I&#039;m sure I saw Orion the other day while watching a sunrise. And having just been sailing, the chaotic nature of the SL wind also means one has to rely on a third-party to provide something useable. [[User:Pete Olihenge|Pete Olihenge]] 01:37, 4 February 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
:::Yeah it is sad. I don&#039;t even have the heart to tell you worst of it. I hope it was a pretty sunrise. -- &#039;&#039;&#039;[[User:Strife_Onizuka|Strife]]&#039;&#039;&#039; &amp;lt;sup&amp;gt;&amp;lt;small&amp;gt;([[User talk:Strife_Onizuka|talk]]|[[Special:Contributions/Strife_Onizuka|contribs]])&amp;lt;/small&amp;gt;&amp;lt;/sup&amp;gt; 03:49, 4 February 2010 (UTC)&lt;br /&gt;
:::P.S. I couldn&#039;t help but laugh when I though of SL Astrology.&lt;br /&gt;
&lt;br /&gt;
::::Thanks for redoing the whole page - I was thinking about that myself. The sunrise was unspectacular; I was trying to reconcile the time of day, llGetSunDirection, the rendered sun direction and the rendered lighting effects. I think I&#039;ve given up on getting anywhere with that. It seems the only useful environmental metrics are time dilation and sim FPS. Go on, give it to me straight: the starfield is entirely random and Orion is a programmer&#039;s joke? (It did prompt me to scan the heavens more closely but I&#039;m no astronomer and I couldn&#039;t find either Cassiopea or Ursa Major.) [[User:Pete Olihenge|Pete Olihenge]] 11:35, 4 February 2010 (UTC)&lt;/div&gt;</summary>
		<author><name>Pete Olihenge</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=Talk:LlCloud&amp;diff=721072</id>
		<title>Talk:LlCloud</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=Talk:LlCloud&amp;diff=721072"/>
		<updated>2010-02-04T01:37:32Z</updated>

		<summary type="html">&lt;p&gt;Pete Olihenge: /* Errors in notes? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Windlight? ==&lt;br /&gt;
&lt;br /&gt;
How will this be affected by windlight? --[[User:Lavender Arrow|Lavender Arrow]] 09:33, 19 February 2008 (PST)&lt;br /&gt;
&lt;br /&gt;
== either sync or don&#039;t bother ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;which is why different clients can see different cloud formations and de-synchronizes cloud view from the server over time.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
LL should either lock the sync of cloud formations across all users, or they should not bother trying to sync at all and just generate cloud formations local to the client only. A halfway implementation that doesn&#039;t keep in sync ultimately just wastes bandwidth vs just a randomized clientside cloud generator that needs no bandwidth. [[User:Scalar Tardis|Scalar Tardis]] 20:26, 28 May 2008 (PDT)&lt;br /&gt;
&lt;br /&gt;
:The clouds refered to are the particle like clouds and not the shader clouds (windlight). That aspect of the documentation hasn&#039;t been updated, most likely because nobody cares enough to ask LL how clouds currently work. It&#039;s totally moot considering the user can override the windlight settings. It&#039;s one of those little things that nobody really cares about. The stars fit into much the same category. -- [[User:Strife Onizuka|Strife Onizuka]] 00:18, 29 May 2008 (PDT)&lt;br /&gt;
&lt;br /&gt;
== Errors in notes? ==&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Values returned above 1.0 - 2.0 indicate rainfall, but the option for rain is not currently implemented so values are capped at 1.0.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Minor point really, seeing as how this function is virtually useless except perhaps as a generator of not-so-random numbers that kinda &amp;quot;flow&amp;quot;...&lt;br /&gt;
&lt;br /&gt;
It &#039;&#039;does&#039;&#039; return values greater than 1.0, and the phrase &amp;quot;above 1.0 - 2.0&amp;quot; is confusing; I think it&#039;s trying to say &amp;quot;in the range 1.0 - 2.0&amp;quot;. I&#039;m too ignorant of the inner workings of SL to be comfortable fixing this without moral support. [[User:Pete Olihenge|Pete Olihenge]] 21:56, 3 February 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
:Good catch. The bulk of the documentation was written... oh $#!7. It&#039;s almost identical to the LSL Wiki documentation. Looking at the revision logs and the revisions themselves the good news is that they were both (mostly) by the same person. Tracking down the source of the content and properly attributing it is a monumental task (as I have my doubts about the authorship of the original info). We can however rewrite the content and use the original sources cited for our own. Since Cid contributed much of the content to both pages, we only need to worry about the contributions that weren&#039;t his. -- &#039;&#039;&#039;[[User:Strife_Onizuka|Strife]]&#039;&#039;&#039; &amp;lt;sup&amp;gt;&amp;lt;small&amp;gt;([[User talk:Strife_Onizuka|talk]]|[[Special:Contributions/Strife_Onizuka|contribs]])&amp;lt;/small&amp;gt;&amp;lt;/sup&amp;gt; 01:10, 4 February 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
::Thanks, Strife. I&#039;ve changed it to what I think is correct. It&#039;s sad that this and llGetSunDirection don&#039;t work properly; I was toying with an idea for a sundial that didn&#039;t use a clock as its basis. There would be possibilities for some nice meteorolgical and astronomincal toys if the functions worked - I&#039;m sure I saw Orion the other day while watching a sunrise. And having just been sailing, the chaotic nature of the SL wind also means one has to rely on a third-party to provide something useable. [[User:Pete Olihenge|Pete Olihenge]] 01:37, 4 February 2010 (UTC)&lt;/div&gt;</summary>
		<author><name>Pete Olihenge</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=LlCloud&amp;diff=721062</id>
		<title>LlCloud</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=LlCloud&amp;diff=721062"/>
		<updated>2010-02-04T01:22:21Z</updated>

		<summary type="html">&lt;p&gt;Pete Olihenge: Corrected reference in notes to range of values returned&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{LSL_Function|func_id=43|func_sleep=0.0|func_energy=10.0&lt;br /&gt;
|func=llCloud|sort=Cloud&lt;br /&gt;
|return_type=float|p1_type=vector|p1_name=offset&lt;br /&gt;
|func_footnote&lt;br /&gt;
|return_text=that is the cloud density at the object position + &#039;&#039;&#039;offset&#039;&#039;&#039;&lt;br /&gt;
|spec&lt;br /&gt;
|caveats&lt;br /&gt;
|examples=&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
    touch_start(integer num)&lt;br /&gt;
    {&lt;br /&gt;
        llSay(0,&amp;quot;Cloud density:&amp;quot; + (string)llCloud(ZERO_VECTOR));&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
|helpers&lt;br /&gt;
|also_functions=&lt;br /&gt;
{{LSL DefineRow||[[llWind]]}}&lt;br /&gt;
{{LSL DefineRow||[[llGetSunDirection]]}}&lt;br /&gt;
|notes= How clouds work:&lt;br /&gt;
&lt;br /&gt;
* SL features a cellular automata-based weather system.&lt;br /&gt;
* There are 16x16 square cloud &amp;quot;cells&amp;quot; per sim (which means each is 16x16m in size).&lt;br /&gt;
* The cloud density data is sent from the server to the client once every time the agent connects to a simulator via logging in or teleporting into a simulator.&lt;br /&gt;
* The client attempts to render clouds from the cloud algorithm results sent from the server, which is why different clients can see different cloud formations and de-synchronizes cloud view from the server over time.&lt;br /&gt;
* The Z value in the vector is irrelevant (clouds are always between about 180-200m absolute height).&lt;br /&gt;
* It returns a value between 0.0 and 2.0, with 0.0 being no clouds, and 1.0 very dense clouds. Values returned in the range 1.0 - 2.0 indicate rainfall, but the option for rain is not currently implemented.&lt;br /&gt;
* Clouds and wind are related. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The cloud seed/growth/dissipation algorithm uses a solenoidal vector field, which is a vector field with zero-divergence: {{noWrap|∇ · v {{=}} 0}}&lt;br /&gt;
&lt;br /&gt;
This condition is satisfied whenever v has a vector potential A, because if {{noWrap|v {{=}} ∇ ⨯ A}} then {{noWrap|∇ · v {{=}} ∇ · (∇ ⨯ A) {{=}} 0}}&lt;br /&gt;
|cat1=Region&lt;br /&gt;
|cat2=Weather&lt;br /&gt;
|cat3&lt;br /&gt;
|cat4&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Pete Olihenge</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=Talk:LlCloud&amp;diff=720942</id>
		<title>Talk:LlCloud</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=Talk:LlCloud&amp;diff=720942"/>
		<updated>2010-02-03T21:56:02Z</updated>

		<summary type="html">&lt;p&gt;Pete Olihenge: /* Errors in notes? */ new section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Windlight? ==&lt;br /&gt;
&lt;br /&gt;
How will this be affected by windlight? --[[User:Lavender Arrow|Lavender Arrow]] 09:33, 19 February 2008 (PST)&lt;br /&gt;
&lt;br /&gt;
== either sync or don&#039;t bother ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;which is why different clients can see different cloud formations and de-synchronizes cloud view from the server over time.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
LL should either lock the sync of cloud formations across all users, or they should not bother trying to sync at all and just generate cloud formations local to the client only. A halfway implementation that doesn&#039;t keep in sync ultimately just wastes bandwidth vs just a randomized clientside cloud generator that needs no bandwidth. [[User:Scalar Tardis|Scalar Tardis]] 20:26, 28 May 2008 (PDT)&lt;br /&gt;
&lt;br /&gt;
:The clouds refered to are the particle like clouds and not the shader clouds (windlight). That aspect of the documentation hasn&#039;t been updated, most likely because nobody cares enough to ask LL how clouds currently work. It&#039;s totally moot considering the user can override the windlight settings. It&#039;s one of those little things that nobody really cares about. The stars fit into much the same category. -- [[User:Strife Onizuka|Strife Onizuka]] 00:18, 29 May 2008 (PDT)&lt;br /&gt;
&lt;br /&gt;
== Errors in notes? ==&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Values returned above 1.0 - 2.0 indicate rainfall, but the option for rain is not currently implemented so values are capped at 1.0.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Minor point really, seeing as how this function is virtually useless except perhaps as a generator of not-so-random numbers that kinda &amp;quot;flow&amp;quot;...&lt;br /&gt;
&lt;br /&gt;
It *does* return values greater than 1.0, and the phrase &amp;quot;above 1.0 - 2.0&amp;quot; is confusing; I think it&#039;s trying to say &amp;quot;in the range 1.0 - 2.0&amp;quot;. I&#039;m too ignorant of the inner workings of SL to be comfortable fixing this without moral support. [[User:Pete Olihenge|Pete Olihenge]] 21:56, 3 February 2010 (UTC)&lt;/div&gt;</summary>
		<author><name>Pete Olihenge</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=LlPlaySound&amp;diff=714353</id>
		<title>LlPlaySound</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=LlPlaySound&amp;diff=714353"/>
		<updated>2010-01-30T16:43:49Z</updated>

		<summary type="html">&lt;p&gt;Pete Olihenge: Added llStopSound to helpers&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{LSL_Function/inventory|sound|uuid=true|type=sound|volume=volume}}{{LSL_Function&lt;br /&gt;
|func_id=86|func_sleep=0.0|func_energy=10.0&lt;br /&gt;
|func=llPlaySound|sort=PlaySound&lt;br /&gt;
|p1_type=string|p1_name=sound&lt;br /&gt;
|p2_type=float|p2_name=volume&lt;br /&gt;
|func_footnote&lt;br /&gt;
|func_desc=Plays {{HoverText|attached|The sound moves with the prim}} &#039;&#039;&#039;sound&#039;&#039;&#039; once at &#039;&#039;&#039;volume&#039;&#039;&#039;&lt;br /&gt;
|return_text&lt;br /&gt;
|spec&lt;br /&gt;
|caveats=*If the object playing the sound is a {{HoverLink|HUD|Heads Up Display}}, the sound is only heard by the user the HUD is attached to.&lt;br /&gt;
**To play a sound inworld from a HUD use [[llTriggerSound]].&lt;br /&gt;
*If multiple sound emitters play the same exact sound within range of the viewer an echo effect can be produced.&lt;br /&gt;
*It is impossible to play two (or more) sounds at the same time and have them start playing at exactly the same time ~ {{JIRA|VWR-15663}}&lt;br /&gt;
|constants&lt;br /&gt;
|examples=&amp;lt;lsl&amp;gt;&lt;br /&gt;
default&lt;br /&gt;
 {&lt;br /&gt;
     state_entry()&lt;br /&gt;
     {&lt;br /&gt;
          llPlaySound(&amp;quot;some_sound&amp;quot;,1.0);&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
|helpers&lt;br /&gt;
|also_functions={{LSL DefineRow||[[llTriggerSound]]|3=Plays a sound {{HoverText|unattached|The sound does not moves with the prim}}.}}&lt;br /&gt;
{{LSL DefineRow||[[llTriggerSoundLimited]]}}&lt;br /&gt;
{{LSL DefineRow||[[llLoopSound]]|3=Plays a sound {{HoverText|attached|The sound moves with the prim}}.}}&lt;br /&gt;
{{LSL DefineRow||[[llLoopSoundMaster]]}}&lt;br /&gt;
{{LSL DefineRow||[[llLoopSoundSlave]]}}&lt;br /&gt;
{{LSL DefineRow||[[llPlaySoundSlave]]}}&lt;br /&gt;
{{LSL DefineRow||[[llSetSoundQueueing]]}}&lt;br /&gt;
{{LSL DefineRow||[[llStopSound]]}}&lt;br /&gt;
|also_events&lt;br /&gt;
|also_tests&lt;br /&gt;
|also_articles&lt;br /&gt;
|notes&lt;br /&gt;
|cat1=Sound&lt;br /&gt;
|cat2&lt;br /&gt;
|cat3&lt;br /&gt;
|cat4&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Pete Olihenge</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=User:Pete_Olihenge&amp;diff=713902</id>
		<title>User:Pete Olihenge</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=User:Pete_Olihenge&amp;diff=713902"/>
		<updated>2010-01-28T18:38:20Z</updated>

		<summary type="html">&lt;p&gt;Pete Olihenge: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{LSL Header|ml=*}}&lt;br /&gt;
== LSL functions ==&lt;br /&gt;
No copyright, no attributions, no comebacks.&lt;br /&gt;
=== Random negative chat channel ===&lt;br /&gt;
This LSL function should, according to my calculations, return a random negative integer in the range -2,000,000,000 to -1,000,000, suitable for use as a dialog chat channel.&lt;br /&gt;
&amp;lt;lsl&amp;gt;integer GetDialogChannel ()&lt;br /&gt;
{&lt;br /&gt;
    return (integer) llFrand (-1999000001.0) - 1000000;&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
=== Ordinal suffix ===&lt;br /&gt;
This LSL function takes an integer and returns a string that is the integer with its ordinal suffix (&amp;quot;st&amp;quot;, &amp;quot;nd&amp;quot;, &amp;quot;rd&amp;quot; or &amp;quot;th&amp;quot;) appended.&lt;br /&gt;
&amp;lt;lsl&amp;gt;string OrdinalSuffix (integer number)&lt;br /&gt;
{&lt;br /&gt;
    string result = &amp;quot;th&amp;quot;; //for all except 1s, 2s and 3s, but including 11, 12 and 13&lt;br /&gt;
    integer value = number % 100; //just the 10s&lt;br /&gt;
    if (value &amp;lt; 4 || value &amp;gt; 20) //exclude the teens (and their neighbours)&lt;br /&gt;
    {&lt;br /&gt;
        value = value % 10; //just the units&lt;br /&gt;
        if (value == 1) result = &amp;quot;st&amp;quot;; //*1st&lt;br /&gt;
        else if (value == 2) result = &amp;quot;nd&amp;quot;; //*2nd&lt;br /&gt;
        else if (value == 3) result = &amp;quot;rd&amp;quot;; //*3rd&lt;br /&gt;
    }&lt;br /&gt;
    return (string) number + result;&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Format a metric measure to Imperial (or US) units, with fractional inches ===&lt;br /&gt;
This LSL function takes a float value representing a measure in metres and returns a string representing the equivalent Imperial (or US) measure in feet and inches, rounded to the nearest quarter inch, and expressed using the feet and inches symbols &#039; and &amp;quot;, and the fractional characters ¼, ½ and ¾.&lt;br /&gt;
&amp;lt;lsl&amp;gt;string FormatImperial (float metres)&lt;br /&gt;
{&lt;br /&gt;
    string result = &amp;quot;&amp;quot;;&lt;br /&gt;
    float inches = metres / 0.0254;&lt;br /&gt;
    integer whole_inches = (integer) (inches + 0.125);&lt;br /&gt;
    float part_inches = inches - (float) whole_inches;&lt;br /&gt;
    integer whole_feet = whole_inches / 12;&lt;br /&gt;
    whole_inches = whole_inches % 12;&lt;br /&gt;
    if (whole_feet) result += (string) whole_feet + &amp;quot;&#039; &amp;quot;;&lt;br /&gt;
    if (whole_inches) result += (string) whole_inches;&lt;br /&gt;
    else if (part_inches &amp;lt; 0.125) result += &amp;quot;0&amp;quot;;&lt;br /&gt;
    if (part_inches &amp;gt;= 0.625) result += &amp;quot;¾&amp;quot;;&lt;br /&gt;
    else if (part_inches &amp;gt;= 0.375) result += &amp;quot;½&amp;quot;;&lt;br /&gt;
    else if (part_inches &amp;gt;= 0.125) result += &amp;quot;¼&amp;quot;;&lt;br /&gt;
    return result + &amp;quot;\&amp;quot;&amp;quot;;&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
=== Pluralise ===&lt;br /&gt;
This LSL function takes an integer and a string and returns a string that is the input string with a lower-case &amp;quot;S&amp;quot; appended if the integer is not equal to 1.&lt;br /&gt;
&amp;lt;lsl&amp;gt;string Pluralise (integer number, string word)&lt;br /&gt;
{&lt;br /&gt;
    if (number == 1) return word;&lt;br /&gt;
    else return word + &amp;quot;s&amp;quot;;&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
=== Indefinite article ===&lt;br /&gt;
This LSL function takes a string and returns it prepended by &amp;quot;an &amp;quot; if it begins with a vowel or by &amp;quot;a &amp;quot; if not.&lt;br /&gt;
&amp;lt;lsl&amp;gt;string IndefiniteArticle (string word)&lt;br /&gt;
{&lt;br /&gt;
    if (llSubStringIndex (&amp;quot;aeiou&amp;quot;, llToLower (llGetSubString (word, 0, 0))) &amp;gt; -1) return &amp;quot;an &amp;quot; + word;&lt;br /&gt;
    else return &amp;quot;a &amp;quot; + word;&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Toggle text ===&lt;br /&gt;
This LSL function takes a Boolean integer and two strings and returns the first string if the integer represets TURE and the second if not. This is useful for including things like status information in the message parameter of [[llDialog]].&lt;br /&gt;
&amp;lt;lsl&amp;gt;string ToggleText (integer test, string if_true, string if_false)&lt;br /&gt;
{&lt;br /&gt;
    if (test) return if_true;&lt;br /&gt;
    else return if_false;&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;/div&gt;</summary>
		<author><name>Pete Olihenge</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=User:Pete_Olihenge&amp;diff=713462</id>
		<title>User:Pete Olihenge</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=User:Pete_Olihenge&amp;diff=713462"/>
		<updated>2010-01-26T15:44:18Z</updated>

		<summary type="html">&lt;p&gt;Pete Olihenge: /* Indefinite article */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== LSL functions ==&lt;br /&gt;
No copyright, no attributions, no comebacks.&lt;br /&gt;
=== Random negative chat channel ===&lt;br /&gt;
This LSL function should, according to my calculations, return a random negative integer in the range -2,000,000,000 to -1,000,000, suitable for use as a dialog chat channel.&lt;br /&gt;
&amp;lt;lsl&amp;gt;integer GetDialogChannel ()&lt;br /&gt;
{&lt;br /&gt;
    return (integer) llFrand (-1999000001.0) - 1000000;&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
=== Ordinal suffix ===&lt;br /&gt;
This LSL function takes an integer and returns a string that is the integer with its ordinal suffix (&amp;quot;st&amp;quot;, &amp;quot;nd&amp;quot;, &amp;quot;rd&amp;quot; or &amp;quot;th&amp;quot;) appended.&lt;br /&gt;
&amp;lt;lsl&amp;gt;string OrdinalSuffix (integer number)&lt;br /&gt;
{&lt;br /&gt;
    string result = &amp;quot;th&amp;quot;; //for all except 1s, 2s and 3s, but including 11, 12 and 13&lt;br /&gt;
    integer value = number % 100; //just the 10s&lt;br /&gt;
    if (value &amp;lt; 4 || value &amp;gt; 20) //exclude the teens (and their neighbours)&lt;br /&gt;
    {&lt;br /&gt;
        value = value % 10; //just the units&lt;br /&gt;
        if (value == 1) result = &amp;quot;st&amp;quot;; //*1st&lt;br /&gt;
        else if (value == 2) result = &amp;quot;nd&amp;quot;; //*2nd&lt;br /&gt;
        else if (value == 3) result = &amp;quot;rd&amp;quot;; //*3rd&lt;br /&gt;
    }&lt;br /&gt;
    return (string) number + result;&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Format a metric measure to Imperial (or US) units, with fractional inches ===&lt;br /&gt;
This LSL function takes a float value representing a measure in metres and returns a string representing the equivalent Imperial (or US) measure in feet and inches, rounded to the nearest quarter inch, and expressed using the feet and inches symbols &#039; and &amp;quot;, and the fractional characters ¼, ½ and ¾.&lt;br /&gt;
&amp;lt;lsl&amp;gt;string FormatImperial (float metres)&lt;br /&gt;
{&lt;br /&gt;
    string result = &amp;quot;&amp;quot;;&lt;br /&gt;
    float inches = metres / 0.0254;&lt;br /&gt;
    integer whole_inches = (integer) (inches + 0.125);&lt;br /&gt;
    float part_inches = inches - (float) whole_inches;&lt;br /&gt;
    integer whole_feet = whole_inches / 12;&lt;br /&gt;
    whole_inches = whole_inches % 12;&lt;br /&gt;
    if (whole_feet) result += (string) whole_feet + &amp;quot;&#039; &amp;quot;;&lt;br /&gt;
    if (whole_inches) result += (string) whole_inches;&lt;br /&gt;
    else if (part_inches &amp;lt; 0.125) result += &amp;quot;0&amp;quot;;&lt;br /&gt;
    if (part_inches &amp;gt;= 0.625) result += &amp;quot;¾&amp;quot;;&lt;br /&gt;
    else if (part_inches &amp;gt;= 0.375) result += &amp;quot;½&amp;quot;;&lt;br /&gt;
    else if (part_inches &amp;gt;= 0.125) result += &amp;quot;¼&amp;quot;;&lt;br /&gt;
    return result + &amp;quot;\&amp;quot;&amp;quot;;&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
=== Pluralise ===&lt;br /&gt;
This LSL function takes an integer and a string and returns a string that is the input string with a lower-case &amp;quot;S&amp;quot; appended if the integer is not equal to 1.&lt;br /&gt;
&amp;lt;lsl&amp;gt;string Pluralise (integer number, string word)&lt;br /&gt;
{&lt;br /&gt;
    if (number == 1) return word;&lt;br /&gt;
    else return word + &amp;quot;s&amp;quot;;&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
=== Indefinite article ===&lt;br /&gt;
This LSL function takes a string and returns it prepended by &amp;quot;an &amp;quot; if it begins with a vowel or by &amp;quot;a &amp;quot; if not.&lt;br /&gt;
&amp;lt;lsl&amp;gt;string IndefiniteArticle (string word)&lt;br /&gt;
{&lt;br /&gt;
    if (llSubStringIndex (&amp;quot;aeiou&amp;quot;, llToLower (llGetSubString (word, 0, 0))) &amp;gt; -1) return &amp;quot;an &amp;quot; + word;&lt;br /&gt;
    else return &amp;quot;a &amp;quot; + word;&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Toggle text ===&lt;br /&gt;
This LSL function takes a Boolean integer and two strings and returns the first string if the integer represets TURE and the second if not. This is useful for including things like status information in the message parameter of [[llDialog]].&lt;br /&gt;
&amp;lt;lsl&amp;gt;string ToggleText (integer test, string if_true, string if_false)&lt;br /&gt;
{&lt;br /&gt;
    if (test) return if_true;&lt;br /&gt;
    else return if_false;&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;/div&gt;</summary>
		<author><name>Pete Olihenge</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=User:Pete_Olihenge&amp;diff=713452</id>
		<title>User:Pete Olihenge</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=User:Pete_Olihenge&amp;diff=713452"/>
		<updated>2010-01-26T15:43:40Z</updated>

		<summary type="html">&lt;p&gt;Pete Olihenge: /* Indefinite article */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== LSL functions ==&lt;br /&gt;
No copyright, no attributions, no comebacks.&lt;br /&gt;
=== Random negative chat channel ===&lt;br /&gt;
This LSL function should, according to my calculations, return a random negative integer in the range -2,000,000,000 to -1,000,000, suitable for use as a dialog chat channel.&lt;br /&gt;
&amp;lt;lsl&amp;gt;integer GetDialogChannel ()&lt;br /&gt;
{&lt;br /&gt;
    return (integer) llFrand (-1999000001.0) - 1000000;&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
=== Ordinal suffix ===&lt;br /&gt;
This LSL function takes an integer and returns a string that is the integer with its ordinal suffix (&amp;quot;st&amp;quot;, &amp;quot;nd&amp;quot;, &amp;quot;rd&amp;quot; or &amp;quot;th&amp;quot;) appended.&lt;br /&gt;
&amp;lt;lsl&amp;gt;string OrdinalSuffix (integer number)&lt;br /&gt;
{&lt;br /&gt;
    string result = &amp;quot;th&amp;quot;; //for all except 1s, 2s and 3s, but including 11, 12 and 13&lt;br /&gt;
    integer value = number % 100; //just the 10s&lt;br /&gt;
    if (value &amp;lt; 4 || value &amp;gt; 20) //exclude the teens (and their neighbours)&lt;br /&gt;
    {&lt;br /&gt;
        value = value % 10; //just the units&lt;br /&gt;
        if (value == 1) result = &amp;quot;st&amp;quot;; //*1st&lt;br /&gt;
        else if (value == 2) result = &amp;quot;nd&amp;quot;; //*2nd&lt;br /&gt;
        else if (value == 3) result = &amp;quot;rd&amp;quot;; //*3rd&lt;br /&gt;
    }&lt;br /&gt;
    return (string) number + result;&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Format a metric measure to Imperial (or US) units, with fractional inches ===&lt;br /&gt;
This LSL function takes a float value representing a measure in metres and returns a string representing the equivalent Imperial (or US) measure in feet and inches, rounded to the nearest quarter inch, and expressed using the feet and inches symbols &#039; and &amp;quot;, and the fractional characters ¼, ½ and ¾.&lt;br /&gt;
&amp;lt;lsl&amp;gt;string FormatImperial (float metres)&lt;br /&gt;
{&lt;br /&gt;
    string result = &amp;quot;&amp;quot;;&lt;br /&gt;
    float inches = metres / 0.0254;&lt;br /&gt;
    integer whole_inches = (integer) (inches + 0.125);&lt;br /&gt;
    float part_inches = inches - (float) whole_inches;&lt;br /&gt;
    integer whole_feet = whole_inches / 12;&lt;br /&gt;
    whole_inches = whole_inches % 12;&lt;br /&gt;
    if (whole_feet) result += (string) whole_feet + &amp;quot;&#039; &amp;quot;;&lt;br /&gt;
    if (whole_inches) result += (string) whole_inches;&lt;br /&gt;
    else if (part_inches &amp;lt; 0.125) result += &amp;quot;0&amp;quot;;&lt;br /&gt;
    if (part_inches &amp;gt;= 0.625) result += &amp;quot;¾&amp;quot;;&lt;br /&gt;
    else if (part_inches &amp;gt;= 0.375) result += &amp;quot;½&amp;quot;;&lt;br /&gt;
    else if (part_inches &amp;gt;= 0.125) result += &amp;quot;¼&amp;quot;;&lt;br /&gt;
    return result + &amp;quot;\&amp;quot;&amp;quot;;&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
=== Pluralise ===&lt;br /&gt;
This LSL function takes an integer and a string and returns a string that is the input string with a lower-case &amp;quot;S&amp;quot; appended if the integer is not equal to 1.&lt;br /&gt;
&amp;lt;lsl&amp;gt;string Pluralise (integer number, string word)&lt;br /&gt;
{&lt;br /&gt;
    if (number == 1) return word;&lt;br /&gt;
    else return word + &amp;quot;s&amp;quot;;&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
=== Indefinite article ===&lt;br /&gt;
This LSL function takes a string and returns it prepended by &amp;quot;an &amp;quot; if the input string begins with a vowel or by &amp;quot;a &amp;quot; if not.&lt;br /&gt;
&amp;lt;lsl&amp;gt;string IndefiniteArticle (string word)&lt;br /&gt;
{&lt;br /&gt;
    if (llSubStringIndex (&amp;quot;aeiou&amp;quot;, llToLower (llGetSubString (word, 0, 0))) &amp;gt; -1) return &amp;quot;an &amp;quot; + word;&lt;br /&gt;
    else return &amp;quot;a &amp;quot; + word;&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Toggle text ===&lt;br /&gt;
This LSL function takes a Boolean integer and two strings and returns the first string if the integer represets TURE and the second if not. This is useful for including things like status information in the message parameter of [[llDialog]].&lt;br /&gt;
&amp;lt;lsl&amp;gt;string ToggleText (integer test, string if_true, string if_false)&lt;br /&gt;
{&lt;br /&gt;
    if (test) return if_true;&lt;br /&gt;
    else return if_false;&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;/div&gt;</summary>
		<author><name>Pete Olihenge</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=User:Pete_Olihenge&amp;diff=713442</id>
		<title>User:Pete Olihenge</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=User:Pete_Olihenge&amp;diff=713442"/>
		<updated>2010-01-26T15:25:08Z</updated>

		<summary type="html">&lt;p&gt;Pete Olihenge: /* LSL functions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== LSL functions ==&lt;br /&gt;
No copyright, no attributions, no comebacks.&lt;br /&gt;
=== Random negative chat channel ===&lt;br /&gt;
This LSL function should, according to my calculations, return a random negative integer in the range -2,000,000,000 to -1,000,000, suitable for use as a dialog chat channel.&lt;br /&gt;
&amp;lt;lsl&amp;gt;integer GetDialogChannel ()&lt;br /&gt;
{&lt;br /&gt;
    return (integer) llFrand (-1999000001.0) - 1000000;&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
=== Ordinal suffix ===&lt;br /&gt;
This LSL function takes an integer and returns a string that is the integer with its ordinal suffix (&amp;quot;st&amp;quot;, &amp;quot;nd&amp;quot;, &amp;quot;rd&amp;quot; or &amp;quot;th&amp;quot;) appended.&lt;br /&gt;
&amp;lt;lsl&amp;gt;string OrdinalSuffix (integer number)&lt;br /&gt;
{&lt;br /&gt;
    string result = &amp;quot;th&amp;quot;; //for all except 1s, 2s and 3s, but including 11, 12 and 13&lt;br /&gt;
    integer value = number % 100; //just the 10s&lt;br /&gt;
    if (value &amp;lt; 4 || value &amp;gt; 20) //exclude the teens (and their neighbours)&lt;br /&gt;
    {&lt;br /&gt;
        value = value % 10; //just the units&lt;br /&gt;
        if (value == 1) result = &amp;quot;st&amp;quot;; //*1st&lt;br /&gt;
        else if (value == 2) result = &amp;quot;nd&amp;quot;; //*2nd&lt;br /&gt;
        else if (value == 3) result = &amp;quot;rd&amp;quot;; //*3rd&lt;br /&gt;
    }&lt;br /&gt;
    return (string) number + result;&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Format a metric measure to Imperial (or US) units, with fractional inches ===&lt;br /&gt;
This LSL function takes a float value representing a measure in metres and returns a string representing the equivalent Imperial (or US) measure in feet and inches, rounded to the nearest quarter inch, and expressed using the feet and inches symbols &#039; and &amp;quot;, and the fractional characters ¼, ½ and ¾.&lt;br /&gt;
&amp;lt;lsl&amp;gt;string FormatImperial (float metres)&lt;br /&gt;
{&lt;br /&gt;
    string result = &amp;quot;&amp;quot;;&lt;br /&gt;
    float inches = metres / 0.0254;&lt;br /&gt;
    integer whole_inches = (integer) (inches + 0.125);&lt;br /&gt;
    float part_inches = inches - (float) whole_inches;&lt;br /&gt;
    integer whole_feet = whole_inches / 12;&lt;br /&gt;
    whole_inches = whole_inches % 12;&lt;br /&gt;
    if (whole_feet) result += (string) whole_feet + &amp;quot;&#039; &amp;quot;;&lt;br /&gt;
    if (whole_inches) result += (string) whole_inches;&lt;br /&gt;
    else if (part_inches &amp;lt; 0.125) result += &amp;quot;0&amp;quot;;&lt;br /&gt;
    if (part_inches &amp;gt;= 0.625) result += &amp;quot;¾&amp;quot;;&lt;br /&gt;
    else if (part_inches &amp;gt;= 0.375) result += &amp;quot;½&amp;quot;;&lt;br /&gt;
    else if (part_inches &amp;gt;= 0.125) result += &amp;quot;¼&amp;quot;;&lt;br /&gt;
    return result + &amp;quot;\&amp;quot;&amp;quot;;&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
=== Pluralise ===&lt;br /&gt;
This LSL function takes an integer and a string and returns a string that is the input string with a lower-case &amp;quot;S&amp;quot; appended if the integer is not equal to 1.&lt;br /&gt;
&amp;lt;lsl&amp;gt;string Pluralise (integer number, string word)&lt;br /&gt;
{&lt;br /&gt;
    if (number == 1) return word;&lt;br /&gt;
    else return word + &amp;quot;s&amp;quot;;&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
=== Indefinite article ===&lt;br /&gt;
This LSL function takes a string and returns a string prepended by &amp;quot;an &amp;quot; if the input string begins with a vowel or by &amp;quot;a &amp;quot; if not.&lt;br /&gt;
&amp;lt;lsl&amp;gt;string IndefiniteArticle (string word)&lt;br /&gt;
{&lt;br /&gt;
    if (llSubStringIndex (&amp;quot;aeiou&amp;quot;, llToLower (llGetSubString (word, 0, 0))) &amp;gt; -1) return &amp;quot;an &amp;quot; + word;&lt;br /&gt;
    else return &amp;quot;a &amp;quot; + word;&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
=== Toggle text ===&lt;br /&gt;
This LSL function takes a Boolean integer and two strings and returns the first string if the integer represets TURE and the second if not. This is useful for including things like status information in the message parameter of [[llDialog]].&lt;br /&gt;
&amp;lt;lsl&amp;gt;string ToggleText (integer test, string if_true, string if_false)&lt;br /&gt;
{&lt;br /&gt;
    if (test) return if_true;&lt;br /&gt;
    else return if_false;&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;/div&gt;</summary>
		<author><name>Pete Olihenge</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=User:Pete_Olihenge&amp;diff=713432</id>
		<title>User:Pete Olihenge</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=User:Pete_Olihenge&amp;diff=713432"/>
		<updated>2010-01-26T15:23:15Z</updated>

		<summary type="html">&lt;p&gt;Pete Olihenge: /* Toggle text */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== LSL functions ==&lt;br /&gt;
=== Random negative chat channel ===&lt;br /&gt;
This LSL function should, according to my calculations, return a random negative integer in the range -2,000,000,000 to -1,000,000, suitable for use as a dialog chat channel.&lt;br /&gt;
&amp;lt;lsl&amp;gt;integer GetDialogChannel ()&lt;br /&gt;
{&lt;br /&gt;
    return (integer) llFrand (-1999000001.0) - 1000000;&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
=== Ordinal suffix ===&lt;br /&gt;
This LSL function takes an integer and returns a string that is the integer with its ordinal suffix (&amp;quot;st&amp;quot;, &amp;quot;nd&amp;quot;, &amp;quot;rd&amp;quot; or &amp;quot;th&amp;quot;) appended.&lt;br /&gt;
&amp;lt;lsl&amp;gt;string OrdinalSuffix (integer number)&lt;br /&gt;
{&lt;br /&gt;
    string result = &amp;quot;th&amp;quot;; //for all except 1s, 2s and 3s, but including 11, 12 and 13&lt;br /&gt;
    integer value = number % 100; //just the 10s&lt;br /&gt;
    if (value &amp;lt; 4 || value &amp;gt; 20) //exclude the teens (and their neighbours)&lt;br /&gt;
    {&lt;br /&gt;
        value = value % 10; //just the units&lt;br /&gt;
        if (value == 1) result = &amp;quot;st&amp;quot;; //*1st&lt;br /&gt;
        else if (value == 2) result = &amp;quot;nd&amp;quot;; //*2nd&lt;br /&gt;
        else if (value == 3) result = &amp;quot;rd&amp;quot;; //*3rd&lt;br /&gt;
    }&lt;br /&gt;
    return (string) number + result;&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Format a metric measure to Imperial (or US) units, with fractional inches ===&lt;br /&gt;
This LSL function takes a float value representing a measure in metres and returns a string representing the equivalent Imperial (or US) measure in feet and inches, rounded to the nearest quarter inch, and expressed using the feet and inches symbols &#039; and &amp;quot;, and the fractional characters ¼, ½ and ¾.&lt;br /&gt;
&amp;lt;lsl&amp;gt;string FormatImperial (float metres)&lt;br /&gt;
{&lt;br /&gt;
    string result = &amp;quot;&amp;quot;;&lt;br /&gt;
    float inches = metres / 0.0254;&lt;br /&gt;
    integer whole_inches = (integer) (inches + 0.125);&lt;br /&gt;
    float part_inches = inches - (float) whole_inches;&lt;br /&gt;
    integer whole_feet = whole_inches / 12;&lt;br /&gt;
    whole_inches = whole_inches % 12;&lt;br /&gt;
    if (whole_feet) result += (string) whole_feet + &amp;quot;&#039; &amp;quot;;&lt;br /&gt;
    if (whole_inches) result += (string) whole_inches;&lt;br /&gt;
    else if (part_inches &amp;lt; 0.125) result += &amp;quot;0&amp;quot;;&lt;br /&gt;
    if (part_inches &amp;gt;= 0.625) result += &amp;quot;¾&amp;quot;;&lt;br /&gt;
    else if (part_inches &amp;gt;= 0.375) result += &amp;quot;½&amp;quot;;&lt;br /&gt;
    else if (part_inches &amp;gt;= 0.125) result += &amp;quot;¼&amp;quot;;&lt;br /&gt;
    return result + &amp;quot;\&amp;quot;&amp;quot;;&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
=== Pluralise ===&lt;br /&gt;
This LSL function takes an integer and a string and returns a string that is the input string with a lower-case &amp;quot;S&amp;quot; appended if the integer is not equal to 1.&lt;br /&gt;
&amp;lt;lsl&amp;gt;string Pluralise (integer number, string word)&lt;br /&gt;
{&lt;br /&gt;
    if (number == 1) return word;&lt;br /&gt;
    else return word + &amp;quot;s&amp;quot;;&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
=== Indefinite article ===&lt;br /&gt;
This LSL function takes a string and returns a string prepended by &amp;quot;an &amp;quot; if the input string begins with a vowel or by &amp;quot;a &amp;quot; if not.&lt;br /&gt;
&amp;lt;lsl&amp;gt;string IndefiniteArticle (string word)&lt;br /&gt;
{&lt;br /&gt;
    if (llSubStringIndex (&amp;quot;aeiou&amp;quot;, llToLower (llGetSubString (word, 0, 0))) &amp;gt; -1) return &amp;quot;an &amp;quot; + word;&lt;br /&gt;
    else return &amp;quot;a &amp;quot; + word;&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
=== Toggle text ===&lt;br /&gt;
This LSL function takes a Boolean integer and two strings and returns the first string if the integer represets TURE and the second if not. This is useful for including things like status information in the message parameter of [[llDialog]].&lt;br /&gt;
&amp;lt;lsl&amp;gt;string ToggleText (integer test, string if_true, string if_false)&lt;br /&gt;
{&lt;br /&gt;
    if (test) return if_true;&lt;br /&gt;
    else return if_false;&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;/div&gt;</summary>
		<author><name>Pete Olihenge</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=User:Pete_Olihenge&amp;diff=713422</id>
		<title>User:Pete Olihenge</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=User:Pete_Olihenge&amp;diff=713422"/>
		<updated>2010-01-26T15:19:52Z</updated>

		<summary type="html">&lt;p&gt;Pete Olihenge: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== LSL functions ==&lt;br /&gt;
=== Random negative chat channel ===&lt;br /&gt;
This LSL function should, according to my calculations, return a random negative integer in the range -2,000,000,000 to -1,000,000, suitable for use as a dialog chat channel.&lt;br /&gt;
&amp;lt;lsl&amp;gt;integer GetDialogChannel ()&lt;br /&gt;
{&lt;br /&gt;
    return (integer) llFrand (-1999000001.0) - 1000000;&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
=== Ordinal suffix ===&lt;br /&gt;
This LSL function takes an integer and returns a string that is the integer with its ordinal suffix (&amp;quot;st&amp;quot;, &amp;quot;nd&amp;quot;, &amp;quot;rd&amp;quot; or &amp;quot;th&amp;quot;) appended.&lt;br /&gt;
&amp;lt;lsl&amp;gt;string OrdinalSuffix (integer number)&lt;br /&gt;
{&lt;br /&gt;
    string result = &amp;quot;th&amp;quot;; //for all except 1s, 2s and 3s, but including 11, 12 and 13&lt;br /&gt;
    integer value = number % 100; //just the 10s&lt;br /&gt;
    if (value &amp;lt; 4 || value &amp;gt; 20) //exclude the teens (and their neighbours)&lt;br /&gt;
    {&lt;br /&gt;
        value = value % 10; //just the units&lt;br /&gt;
        if (value == 1) result = &amp;quot;st&amp;quot;; //*1st&lt;br /&gt;
        else if (value == 2) result = &amp;quot;nd&amp;quot;; //*2nd&lt;br /&gt;
        else if (value == 3) result = &amp;quot;rd&amp;quot;; //*3rd&lt;br /&gt;
    }&lt;br /&gt;
    return (string) number + result;&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Format a metric measure to Imperial (or US) units, with fractional inches ===&lt;br /&gt;
This LSL function takes a float value representing a measure in metres and returns a string representing the equivalent Imperial (or US) measure in feet and inches, rounded to the nearest quarter inch, and expressed using the feet and inches symbols &#039; and &amp;quot;, and the fractional characters ¼, ½ and ¾.&lt;br /&gt;
&amp;lt;lsl&amp;gt;string FormatImperial (float metres)&lt;br /&gt;
{&lt;br /&gt;
    string result = &amp;quot;&amp;quot;;&lt;br /&gt;
    float inches = metres / 0.0254;&lt;br /&gt;
    integer whole_inches = (integer) (inches + 0.125);&lt;br /&gt;
    float part_inches = inches - (float) whole_inches;&lt;br /&gt;
    integer whole_feet = whole_inches / 12;&lt;br /&gt;
    whole_inches = whole_inches % 12;&lt;br /&gt;
    if (whole_feet) result += (string) whole_feet + &amp;quot;&#039; &amp;quot;;&lt;br /&gt;
    if (whole_inches) result += (string) whole_inches;&lt;br /&gt;
    else if (part_inches &amp;lt; 0.125) result += &amp;quot;0&amp;quot;;&lt;br /&gt;
    if (part_inches &amp;gt;= 0.625) result += &amp;quot;¾&amp;quot;;&lt;br /&gt;
    else if (part_inches &amp;gt;= 0.375) result += &amp;quot;½&amp;quot;;&lt;br /&gt;
    else if (part_inches &amp;gt;= 0.125) result += &amp;quot;¼&amp;quot;;&lt;br /&gt;
    return result + &amp;quot;\&amp;quot;&amp;quot;;&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
=== Pluralise ===&lt;br /&gt;
This LSL function takes an integer and a string and returns a string that is the input string with a lower-case &amp;quot;S&amp;quot; appended if the integer is not equal to 1.&lt;br /&gt;
&amp;lt;lsl&amp;gt;string Pluralise (integer number, string word)&lt;br /&gt;
{&lt;br /&gt;
    if (number == 1) return word;&lt;br /&gt;
    else return word + &amp;quot;s&amp;quot;;&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
=== Indefinite article ===&lt;br /&gt;
This LSL function takes a string and returns a string prepended by &amp;quot;an &amp;quot; if the input string begins with a vowel or by &amp;quot;a &amp;quot; if not.&lt;br /&gt;
&amp;lt;lsl&amp;gt;string IndefiniteArticle (string word)&lt;br /&gt;
{&lt;br /&gt;
    if (llSubStringIndex (&amp;quot;aeiou&amp;quot;, llToLower (llGetSubString (word, 0, 0))) &amp;gt; -1) return &amp;quot;an &amp;quot; + word;&lt;br /&gt;
    else return &amp;quot;a &amp;quot; + word;&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
=== Toggle text ===&lt;br /&gt;
This LSL function takes a Boolean integer and two strings and returns the first string if the integer represets TURE and the second if not. This is useful for including things like status information in the text parameter of [[llDialog]].&lt;br /&gt;
&amp;lt;lsl&amp;gt;string ToggleText (integer test, string if_true, string if_false)&lt;br /&gt;
{&lt;br /&gt;
    if (test) return if_true;&lt;br /&gt;
    else return if_false;&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;/div&gt;</summary>
		<author><name>Pete Olihenge</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=User:Pete_Olihenge&amp;diff=713412</id>
		<title>User:Pete Olihenge</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=User:Pete_Olihenge&amp;diff=713412"/>
		<updated>2010-01-26T15:08:40Z</updated>

		<summary type="html">&lt;p&gt;Pete Olihenge: /* Ordinal suffix */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== LSL functions ==&lt;br /&gt;
=== Random negative chat channel ===&lt;br /&gt;
This LSL function should, according to my calculations, return a random negative integer in the range -2,000,000,000 to -1,000,000, suitable for use as a dialog chat channel.&lt;br /&gt;
&amp;lt;lsl&amp;gt;integer GetDialogChannel ()&lt;br /&gt;
{&lt;br /&gt;
    return (integer) llFrand (-1999000001.0) - 1000000;&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
=== Ordinal suffix ===&lt;br /&gt;
This LSL function takes an integer and returns a string that is the integer with its ordinal suffix (&amp;quot;st&amp;quot;, &amp;quot;nd&amp;quot;, &amp;quot;rd&amp;quot; or &amp;quot;th&amp;quot;) appended.&lt;br /&gt;
&amp;lt;lsl&amp;gt;string OrdinalSuffix (integer number)&lt;br /&gt;
{&lt;br /&gt;
    string result = &amp;quot;th&amp;quot;; //for all except 1s, 2s and 3s, but including 11, 12 and 13&lt;br /&gt;
    integer value = number % 100; //just the 10s&lt;br /&gt;
    if (value &amp;lt; 4 || value &amp;gt; 20) //exclude the teens (and their neighbours)&lt;br /&gt;
    {&lt;br /&gt;
        value = value % 10; //just the units&lt;br /&gt;
        if (value == 1) result = &amp;quot;st&amp;quot;; //*1st&lt;br /&gt;
        else if (value == 2) result = &amp;quot;nd&amp;quot;; //*2nd&lt;br /&gt;
        else if (value == 3) result = &amp;quot;rd&amp;quot;; //*3rd&lt;br /&gt;
    }&lt;br /&gt;
    return (string) number + result;&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Format a metric measure to Imperial (or US) units, with fractional inches ===&lt;br /&gt;
This LSL function takes a float value representing a measure in metres and returns a string representing the equivalent Imperial (or US) measure in feet and inches, rounded to the nearest quarter inch, and expressed using the feet and inches symbols &#039; and &amp;quot;, and the fractional characters ¼, ½ and ¾.&lt;br /&gt;
&amp;lt;lsl&amp;gt;string FormatImperial (float metres)&lt;br /&gt;
{&lt;br /&gt;
    string result = &amp;quot;&amp;quot;;&lt;br /&gt;
    float inches = metres / 0.0254;&lt;br /&gt;
    integer whole_inches = (integer) (inches + 0.125);&lt;br /&gt;
    float part_inches = inches - (float) whole_inches;&lt;br /&gt;
    integer whole_feet = whole_inches / 12;&lt;br /&gt;
    whole_inches = whole_inches % 12;&lt;br /&gt;
    if (whole_feet) result += (string) whole_feet + &amp;quot;&#039; &amp;quot;;&lt;br /&gt;
    if (whole_inches) result += (string) whole_inches;&lt;br /&gt;
    else if (part_inches &amp;lt; 0.125) result += &amp;quot;0&amp;quot;;&lt;br /&gt;
    if (part_inches &amp;gt;= 0.625) result += &amp;quot;¾&amp;quot;;&lt;br /&gt;
    else if (part_inches &amp;gt;= 0.375) result += &amp;quot;½&amp;quot;;&lt;br /&gt;
    else if (part_inches &amp;gt;= 0.125) result += &amp;quot;¼&amp;quot;;&lt;br /&gt;
    return result + &amp;quot;\&amp;quot;&amp;quot;;&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
=== Pluralise ===&lt;br /&gt;
This LSL function takes an integer and a string and returns a string that is the input string with a lower-case &amp;quot;S&amp;quot; appended if the integer is not equal to 1.&lt;br /&gt;
&amp;lt;lsl&amp;gt;string Pluralise (integer number, string word)&lt;br /&gt;
{&lt;br /&gt;
    if (number == 1) return word;&lt;br /&gt;
    else return word + &amp;quot;s&amp;quot;;&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
=== ToggleText ===&lt;br /&gt;
This LSL function takes a Boolean integer and two strings and returns the first string if the integer represets TURE and the second if not. This is useful for including things like status information in the text parameter of [[llDialog]].&lt;br /&gt;
&amp;lt;lsl&amp;gt;string ToggleText (integer test, string if_true, string if_false)&lt;br /&gt;
{&lt;br /&gt;
    if (test) return if_true;&lt;br /&gt;
    else return if_false;&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;/div&gt;</summary>
		<author><name>Pete Olihenge</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=User:Pete_Olihenge&amp;diff=713402</id>
		<title>User:Pete Olihenge</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=User:Pete_Olihenge&amp;diff=713402"/>
		<updated>2010-01-26T15:01:06Z</updated>

		<summary type="html">&lt;p&gt;Pete Olihenge: /* ToggleText */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== LSL functions ==&lt;br /&gt;
=== Random negative chat channel ===&lt;br /&gt;
This LSL function should, according to my calculations, return a random negative integer in the range -2,000,000,000 to -1,000,000, suitable for use as a dialog chat channel.&lt;br /&gt;
&amp;lt;lsl&amp;gt;integer GetDialogChannel ()&lt;br /&gt;
{&lt;br /&gt;
    return (integer) llFrand (-1999000001.0) - 1000000;&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
=== Ordinal suffix ===&lt;br /&gt;
This LSL function takes an integer and returns a string that is the integer with its ordinal suffix (&amp;quot;st&amp;quot;, &amp;quot;nd&amp;quot;, &amp;quot;rd&amp;quot; or &amp;quot;th&amp;quot;) appended.&lt;br /&gt;
&amp;lt;lsl&amp;gt;string OrdinalSuffix (integer number)&lt;br /&gt;
{&lt;br /&gt;
    string result = &amp;quot;th&amp;quot;; //for all except 1s, 2s and 3s, but including 11, 12 and 13&lt;br /&gt;
    number = number % 100; //just the 10s&lt;br /&gt;
    if (number &amp;lt; 4 || number &amp;gt; 20) //exclude the teens (and their neighbours)&lt;br /&gt;
    {&lt;br /&gt;
        number = number % 10; //just the units&lt;br /&gt;
        if (number == 1) result = &amp;quot;st&amp;quot;; //*1st&lt;br /&gt;
        else if (number == 2) result = &amp;quot;nd&amp;quot;; //*2nd&lt;br /&gt;
        else if (number == 3) result = &amp;quot;rd&amp;quot;; //*3rd&lt;br /&gt;
    }&lt;br /&gt;
    return (string) number + result;&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
=== Format a metric measure to Imperial (or US) units, with fractional inches ===&lt;br /&gt;
This LSL function takes a float value representing a measure in metres and returns a string representing the equivalent Imperial (or US) measure in feet and inches, rounded to the nearest quarter inch, and expressed using the feet and inches symbols &#039; and &amp;quot;, and the fractional characters ¼, ½ and ¾.&lt;br /&gt;
&amp;lt;lsl&amp;gt;string FormatImperial (float metres)&lt;br /&gt;
{&lt;br /&gt;
    string result = &amp;quot;&amp;quot;;&lt;br /&gt;
    float inches = metres / 0.0254;&lt;br /&gt;
    integer whole_inches = (integer) (inches + 0.125);&lt;br /&gt;
    float part_inches = inches - (float) whole_inches;&lt;br /&gt;
    integer whole_feet = whole_inches / 12;&lt;br /&gt;
    whole_inches = whole_inches % 12;&lt;br /&gt;
    if (whole_feet) result += (string) whole_feet + &amp;quot;&#039; &amp;quot;;&lt;br /&gt;
    if (whole_inches) result += (string) whole_inches;&lt;br /&gt;
    else if (part_inches &amp;lt; 0.125) result += &amp;quot;0&amp;quot;;&lt;br /&gt;
    if (part_inches &amp;gt;= 0.625) result += &amp;quot;¾&amp;quot;;&lt;br /&gt;
    else if (part_inches &amp;gt;= 0.375) result += &amp;quot;½&amp;quot;;&lt;br /&gt;
    else if (part_inches &amp;gt;= 0.125) result += &amp;quot;¼&amp;quot;;&lt;br /&gt;
    return result + &amp;quot;\&amp;quot;&amp;quot;;&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
=== Pluralise ===&lt;br /&gt;
This LSL function takes an integer and a string and returns a string that is the input string with a lower-case &amp;quot;S&amp;quot; appended if the integer is not equal to 1.&lt;br /&gt;
&amp;lt;lsl&amp;gt;string Pluralise (integer number, string word)&lt;br /&gt;
{&lt;br /&gt;
    if (number == 1) return word;&lt;br /&gt;
    else return word + &amp;quot;s&amp;quot;;&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
=== ToggleText ===&lt;br /&gt;
This LSL function takes a Boolean integer and two strings and returns the first string if the integer represets TURE and the second if not. This is useful for including things like status information in the text parameter of [[llDialog]].&lt;br /&gt;
&amp;lt;lsl&amp;gt;string ToggleText (integer test, string if_true, string if_false)&lt;br /&gt;
{&lt;br /&gt;
    if (test) return if_true;&lt;br /&gt;
    else return if_false;&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;/div&gt;</summary>
		<author><name>Pete Olihenge</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=User:Pete_Olihenge&amp;diff=713282</id>
		<title>User:Pete Olihenge</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=User:Pete_Olihenge&amp;diff=713282"/>
		<updated>2010-01-26T14:14:48Z</updated>

		<summary type="html">&lt;p&gt;Pete Olihenge: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== LSL functions ==&lt;br /&gt;
=== Random negative chat channel ===&lt;br /&gt;
This LSL function should, according to my calculations, return a random negative integer in the range -2,000,000,000 to -1,000,000, suitable for use as a dialog chat channel.&lt;br /&gt;
&amp;lt;lsl&amp;gt;integer GetDialogChannel ()&lt;br /&gt;
{&lt;br /&gt;
    return (integer) llFrand (-1999000001.0) - 1000000;&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
=== Ordinal suffix ===&lt;br /&gt;
This LSL function takes an integer and returns a string that is the integer with its ordinal suffix (&amp;quot;st&amp;quot;, &amp;quot;nd&amp;quot;, &amp;quot;rd&amp;quot; or &amp;quot;th&amp;quot;) appended.&lt;br /&gt;
&amp;lt;lsl&amp;gt;string OrdinalSuffix (integer number)&lt;br /&gt;
{&lt;br /&gt;
    string result = &amp;quot;th&amp;quot;; //for all except 1s, 2s and 3s, but including 11, 12 and 13&lt;br /&gt;
    number = number % 100; //just the 10s&lt;br /&gt;
    if (number &amp;lt; 4 || number &amp;gt; 20) //exclude the teens (and their neighbours)&lt;br /&gt;
    {&lt;br /&gt;
        number = number % 10; //just the units&lt;br /&gt;
        if (number == 1) result = &amp;quot;st&amp;quot;; //*1st&lt;br /&gt;
        else if (number == 2) result = &amp;quot;nd&amp;quot;; //*2nd&lt;br /&gt;
        else if (number == 3) result = &amp;quot;rd&amp;quot;; //*3rd&lt;br /&gt;
    }&lt;br /&gt;
    return (string) number + result;&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
=== Format a metric measure to Imperial (or US) units, with fractional inches ===&lt;br /&gt;
This LSL function takes a float value representing a measure in metres and returns a string representing the equivalent Imperial (or US) measure in feet and inches, rounded to the nearest quarter inch, and expressed using the feet and inches symbols &#039; and &amp;quot;, and the fractional characters ¼, ½ and ¾.&lt;br /&gt;
&amp;lt;lsl&amp;gt;string FormatImperial (float metres)&lt;br /&gt;
{&lt;br /&gt;
    string result = &amp;quot;&amp;quot;;&lt;br /&gt;
    float inches = metres / 0.0254;&lt;br /&gt;
    integer whole_inches = (integer) (inches + 0.125);&lt;br /&gt;
    float part_inches = inches - (float) whole_inches;&lt;br /&gt;
    integer whole_feet = whole_inches / 12;&lt;br /&gt;
    whole_inches = whole_inches % 12;&lt;br /&gt;
    if (whole_feet) result += (string) whole_feet + &amp;quot;&#039; &amp;quot;;&lt;br /&gt;
    if (whole_inches) result += (string) whole_inches;&lt;br /&gt;
    else if (part_inches &amp;lt; 0.125) result += &amp;quot;0&amp;quot;;&lt;br /&gt;
    if (part_inches &amp;gt;= 0.625) result += &amp;quot;¾&amp;quot;;&lt;br /&gt;
    else if (part_inches &amp;gt;= 0.375) result += &amp;quot;½&amp;quot;;&lt;br /&gt;
    else if (part_inches &amp;gt;= 0.125) result += &amp;quot;¼&amp;quot;;&lt;br /&gt;
    return result + &amp;quot;\&amp;quot;&amp;quot;;&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
=== Pluralise ===&lt;br /&gt;
This LSL function takes an integer and a string and returns a string that is the input string with a lower-case &amp;quot;S&amp;quot; appended if the integer is not equal to 1.&lt;br /&gt;
&amp;lt;lsl&amp;gt;string Pluralise (integer number, string word)&lt;br /&gt;
{&lt;br /&gt;
    if (number == 1) return word;&lt;br /&gt;
    else return word + &amp;quot;s&amp;quot;;&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
=== ToggleText ===&lt;br /&gt;
This LSL function takes a Boolean integer and two strings and returns the first string if the integer represets TURE and the second if not. This is useful for including things like status information in the text parameter of llDialog.&lt;br /&gt;
&amp;lt;lsl&amp;gt;string ToggleText (integer test, string if_true, string if_false)&lt;br /&gt;
{&lt;br /&gt;
    if (test) return if_true;&lt;br /&gt;
    else return if_false;&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;/div&gt;</summary>
		<author><name>Pete Olihenge</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=User:Pete_Olihenge&amp;diff=713262</id>
		<title>User:Pete Olihenge</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=User:Pete_Olihenge&amp;diff=713262"/>
		<updated>2010-01-26T14:03:23Z</updated>

		<summary type="html">&lt;p&gt;Pete Olihenge: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== LSL functions ==&lt;br /&gt;
=== Random negative chat channel ===&lt;br /&gt;
This LSL function should, according to my calculations, return a random negative integer in the range -2,000,000,000 to -1,000,000, suitable for use as a dialog chat channel.&lt;br /&gt;
&amp;lt;lsl&amp;gt;integer GetDialogChannel ()&lt;br /&gt;
{&lt;br /&gt;
    return (integer) llFrand (-1999000001.0) - 1000000;&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
=== Ordinal suffix ===&lt;br /&gt;
This LSL function takes an integer and returns a string that is the integer with its ordinal suffix (&amp;quot;st&amp;quot;, &amp;quot;nd&amp;quot;, &amp;quot;rd&amp;quot; or &amp;quot;th&amp;quot;) appended.&lt;br /&gt;
&amp;lt;lsl&amp;gt;string OrdinalSuffix (integer number)&lt;br /&gt;
{&lt;br /&gt;
    string result = &amp;quot;th&amp;quot;; //for all except 1s, 2s and 3s, but including 11, 12 and 13&lt;br /&gt;
    number = number % 100; //just the 10s&lt;br /&gt;
    if (number &amp;lt; 4 || number &amp;gt; 20) //exclude the teens (and their neighbours)&lt;br /&gt;
    {&lt;br /&gt;
        number = number % 10; //just the units&lt;br /&gt;
        if (number == 1) result = &amp;quot;st&amp;quot;; //*1st&lt;br /&gt;
        else if (number == 2) result = &amp;quot;nd&amp;quot;; //*2nd&lt;br /&gt;
        else if (number == 3) result = &amp;quot;rd&amp;quot;; //*3rd&lt;br /&gt;
    }&lt;br /&gt;
    return (string) number + result;&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
=== Format a metric measure to Imperial (or US) units, with fractional inches ===&lt;br /&gt;
This LSL function takes a float value representing a measure in metres and returns a string representing the equivalent Imperial (or US) measure in feet and inches, rounded to the nearest quarter inch, and expressed using the feet and inches symbols &#039; and &amp;quot;, and the fractional characters ¼, ½ and ¾.&lt;br /&gt;
&amp;lt;lsl&amp;gt;string FormatImperial (float metres)&lt;br /&gt;
{&lt;br /&gt;
    string result = &amp;quot;&amp;quot;;&lt;br /&gt;
    float inches = metres / 0.0254;&lt;br /&gt;
    integer whole_inches = (integer) (inches + 0.125);&lt;br /&gt;
    float part_inches = inches - (float) whole_inches;&lt;br /&gt;
    integer whole_feet = whole_inches / 12;&lt;br /&gt;
    whole_inches = whole_inches % 12;&lt;br /&gt;
    if (whole_feet) result += (string) whole_feet + &amp;quot;&#039; &amp;quot;;&lt;br /&gt;
    if (whole_inches) result += (string) whole_inches;&lt;br /&gt;
    else if (part_inches &amp;lt; 0.125) result += &amp;quot;0&amp;quot;;&lt;br /&gt;
    if (part_inches &amp;gt;= 0.625) result += &amp;quot;¾&amp;quot;;&lt;br /&gt;
    else if (part_inches &amp;gt;= 0.375) result += &amp;quot;½&amp;quot;;&lt;br /&gt;
    else if (part_inches &amp;gt;= 0.125) result += &amp;quot;¼&amp;quot;;&lt;br /&gt;
    return result + &amp;quot;\&amp;quot;&amp;quot;;&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
=== Pluralise ===&lt;br /&gt;
This LSL function takes an integer and a string and returns a string that is the input string with a lower-case &amp;quot;S&amp;quot; appended if the integer is not equal to 1.&lt;br /&gt;
&amp;lt;lsl&amp;gt;string Pluralise (integer number, string word)&lt;br /&gt;
{&lt;br /&gt;
    if (number == 1) return word;&lt;br /&gt;
    else return word + &amp;quot;s&amp;quot;;&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;/div&gt;</summary>
		<author><name>Pete Olihenge</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=Category_talk:LSL_Integer&amp;diff=713252</id>
		<title>Category talk:LSL Integer</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=Category_talk:LSL_Integer&amp;diff=713252"/>
		<updated>2010-01-26T13:57:49Z</updated>

		<summary type="html">&lt;p&gt;Pete Olihenge: /* Editing this wiki */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Are these numbers correct? &amp;quot;values between −2,147,483,648 and +2,147,483,647&amp;quot; . And if they are why the difference between the figures? -- &#039;&#039;&#039;[[User:EddyFragment Robonaught|Eddy]]&#039;&#039;&#039;  &amp;lt;sup&amp;gt;&amp;lt;small&amp;gt;([[User talk:EddyFragment_Robonaught|talk]]|[[Special:Contributions/EddyFragment_Robonaught|contribs]])&amp;lt;/small&amp;gt;&amp;lt;/sup&amp;gt; 17:30, 27 June 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
:Aye correct as saved.&lt;br /&gt;
&lt;br /&gt;
:This truth makes more visual sense in hex. A 32-bit two&#039;s complement integer is 0x0, or +0x1 thru +0x7FFFffff, or -1 thru -0x7FFFffff, or -0x80000000.  In decimal, that is 0, or 1 thru 2147483647, or -1 thru -2147483647, or -2147483648.  The assymetry comes from the zero: both positive integers and zero have the uppermost most bit of the 32 bits zeroed, so the list of positive values loses one element to make room for zero.&lt;br /&gt;
&lt;br /&gt;
:A correspondingly counterintuitive result here is that negating -2147483648 has no effect (-2147483648 == ( 0 - -2147483648 ) == ( 2147483647 + 1 ) ). Ugly as all this is, it&#039;s less ugly than the known alternatives, such as the one&#039;s complement encoding that can have two zeroes: a positive zero and a negative zero.  All that I&#039;m saying here is the convention I remember learning years ago, I imagine LSL behaves this way at these limits, but I haven&#039;t tried to see yet ...  -- [[User:Ppaatt Lynagh|Ppaatt Lynagh]] 18:10, 27 June 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
::Thanx Ppaatt. I thought it might be a zero issue but didn&#039;t get as far as thinking that (of course) there would have to be (as you say) two zeros for the reach (both pos and neg) to be equal. &amp;quot;Positive Zero&amp;quot;. Sounds like a good title for a science fiction novel. Cheers Ppaatt. -- &#039;&#039;&#039;[[User:EddyFragment Robonaught|Eddy]]&#039;&#039;&#039;  &amp;lt;sup&amp;gt;&amp;lt;small&amp;gt;([[User talk:EddyFragment_Robonaught|talk]]|[[Special:Contributions/EddyFragment_Robonaught|contribs]])&amp;lt;/small&amp;gt;&amp;lt;/sup&amp;gt; 18:16, 27 June 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
::In addition to (--2147483648 == -2147483648) so does (-1 * -2147483648). Everyone knows that 1/0 causes a fatal error in integer math but what few people know is that (-2147483648 / -1) does as well on x86 processors (modulo is equally affected). I have yet to find any mention of this on the internet (except where I have posted it), I found it by accident while exploring edge cases (it crashed the sim). In LSL we papered over the exception, any time you divide by -1 we just apply the &amp;quot;-&amp;quot; operator, and for modulo -1 we just return 0. -- &#039;&#039;&#039;[[User:Strife_Onizuka|Strife]]&#039;&#039;&#039; &amp;lt;sup&amp;gt;&amp;lt;small&amp;gt;([[User talk:Strife_Onizuka|talk]]|[[Special:Contributions/Strife_Onizuka|contribs]])&amp;lt;/small&amp;gt;&amp;lt;/sup&amp;gt; 09:27, 29 June 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
::: *insert foot in mouth* http://www.codeguru.com/cpp/sample_chapter/article.php/c11111__3/ -- &#039;&#039;&#039;[[User:Strife_Onizuka|Strife]]&#039;&#039;&#039; &amp;lt;sup&amp;gt;&amp;lt;small&amp;gt;([[User talk:Strife_Onizuka|talk]]|[[Special:Contributions/Strife_Onizuka|contribs]])&amp;lt;/small&amp;gt;&amp;lt;/sup&amp;gt; 10:00, 29 June 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
lolz (although not at the fact that you can do &amp;quot;Integer math&amp;quot;. Now I have to relearn stuff *slumps*). -- &#039;&#039;&#039;[[User:EddyFragment Robonaught|Eddy]]&#039;&#039;&#039;  &amp;lt;sup&amp;gt;&amp;lt;small&amp;gt;([[User talk:EddyFragment_Robonaught|talk]]|[[Special:Contributions/EddyFragment_Robonaught|contribs]])&amp;lt;/small&amp;gt;&amp;lt;/sup&amp;gt; 10:03, 29 June 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Sub-classification Constants/Functions ==&lt;br /&gt;
&lt;br /&gt;
I thought I&#039;d take a quick peek at possible Integer-related Functions.&lt;br /&gt;
A sea of Constants greeted me. Is a Sub classification perhaps useful? --[[User:Vernes Veranes|Vernes]] 00:43, 8 January 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
: [[LSL_101/LSL_in_Focus:_Integers|LSL in Focus: Integers]] classifies how integers are used in LSL, and might be what you are looking for.  The uses are: signed integers, truth values, enumerations and bit vectors.  I think every LSL integer constant clearly falls in exactly one of these four categories.--[[User:Omei Turnbull|Omei Turnbull]] 03:28, 8 January 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Editing this wiki ==&lt;br /&gt;
&lt;br /&gt;
The first sentence on this page reads &amp;quot;An integer data types are signed 32 bit values [...]&amp;quot;; I think this should read &amp;quot;The integer data type is a signed 32 bit value [...]&amp;quot;. Is it ok for me to make relatively minor gramatical corrections to errors like this without consultation, or should I flag my suggestion here first? [[User:Pete Olihenge|Pete Olihenge]] 12:19, 26 January 2010 (UTC)&lt;br /&gt;
: Hi Pete, it is always OK to make the wiki better! We are all editors. It is good to have a thick hide here, stand your ground and have your facts on file if you are challenged ;) --[[User:Cerise Sorbet|Cerise Sorbet]] 13:49, 26 January 2010 (UTC)&lt;br /&gt;
::Thanks Cerise. It is done, and I have my tin foil hat at the ready :) [[User:Pete Olihenge|Pete Olihenge]] 13:57, 26 January 2010 (UTC)&lt;/div&gt;</summary>
		<author><name>Pete Olihenge</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=Category:LSL_Integer&amp;diff=713242</id>
		<title>Category:LSL Integer</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=Category:LSL_Integer&amp;diff=713242"/>
		<updated>2010-01-26T13:54:17Z</updated>

		<summary type="html">&lt;p&gt;Pete Olihenge: Grammatical correction&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{LSL Header|ml=*}}&lt;br /&gt;
{{LSLC|}}{{LSLC|Types}}&lt;br /&gt;
&lt;br /&gt;
=Integers=&lt;br /&gt;
The integer data type is a signed 32 bit value between −2,147,483,648 and +2,147,483,647 (that is 0x80000000 to 0x7FFFFFFF in hex). Integers are whole numbers. The fractional datatype is the [[float]].&lt;br /&gt;
&lt;br /&gt;
[[DEBUG_CHANNEL]] can be used as a constant for the maximum integer (for that is the value it is defined as).&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
All of the following are integers:&lt;br /&gt;
&amp;lt;lsl&amp;gt;integer firstInt = 5512623;&lt;br /&gt;
integer secondInt = ACTIVE;&lt;br /&gt;
integer thirdInt = 0x61EC1A;&lt;br /&gt;
integer fourthInt = -160693;&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following are NOT integers, use {{LSLG|float}} for them:&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
integer decimalValue = 125.2; // ERROR : Type mismatch -- Integer literals can&#039;t have a decimal.&lt;br /&gt;
integer bigValue = 3147483647; // An undocumented way to say -1,147,483,649 // Integer literals can&#039;t be larger than 2,147,483,647.&lt;br /&gt;
integer biggerValue = 10123456789; // An undocumented way to say -1 // Integer literals can&#039;t be larger than 2,147,483,647.&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Further Reading==&lt;br /&gt;
For a more extensive coverage of integers, including the different ways they are used in LSL, see [[LSL_101/LSL_in_Focus:_Integers|LSL in Focus: Integers]].&lt;/div&gt;</summary>
		<author><name>Pete Olihenge</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=User:Pete_Olihenge&amp;diff=713222</id>
		<title>User:Pete Olihenge</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=User:Pete_Olihenge&amp;diff=713222"/>
		<updated>2010-01-26T13:36:29Z</updated>

		<summary type="html">&lt;p&gt;Pete Olihenge: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== LSL functions ==&lt;br /&gt;
=== Random negative chat channel ===&lt;br /&gt;
This LSL function should, according to my calculations, return a random negative integer in the range -2,000,000,000 to -1,000,000, suitable for use as a dialog chat channel.&lt;br /&gt;
&amp;lt;lsl&amp;gt;integer GetDialogChannel ()&lt;br /&gt;
{&lt;br /&gt;
    return (integer) llFrand (-1999000001.0) - 1000000;&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
=== Ordinal suffix ===&lt;br /&gt;
This LSL function takes an integer and returns a string that is the integer with its ordinal suffix (&amp;quot;st&amp;quot;, &amp;quot;nd&amp;quot;, &amp;quot;rd&amp;quot; or &amp;quot;th&amp;quot;) appended.&lt;br /&gt;
&amp;lt;lsl&amp;gt;string OrdinalSuffix (integer number)&lt;br /&gt;
{&lt;br /&gt;
    string result = &amp;quot;th&amp;quot;; //for all except 1s, 2s and 3s, but including 11, 12 and 13&lt;br /&gt;
    number = number % 100; //just the 10s&lt;br /&gt;
    if (number &amp;lt; 4 || number &amp;gt; 20) //exclude the teens (and their neighbours)&lt;br /&gt;
    {&lt;br /&gt;
        number = number % 10; //just the units&lt;br /&gt;
        if (number == 1) result = &amp;quot;st&amp;quot;; //*1st&lt;br /&gt;
        else if (number == 2) result = &amp;quot;nd&amp;quot;; //*2nd&lt;br /&gt;
        else if (number == 3) result = &amp;quot;rd&amp;quot;; //*3rd&lt;br /&gt;
    }&lt;br /&gt;
    return (string) number + result;&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Format a metric measure to Imperial (or US) units, with fractional inches ===&lt;br /&gt;
This LSL function takes a float value representing a measure in metres and returns a string representing the equivalent Imperial (or US) measure in feet and inches, rounded to the nearest quarter inch, and expressed using the feet and inches symbols &#039; and &amp;quot;, and the fractional characters ¼, ½ and ¾.&lt;br /&gt;
&amp;lt;lsl&amp;gt;string FormatImperial (float metres)&lt;br /&gt;
{&lt;br /&gt;
    string result = &amp;quot;&amp;quot;;&lt;br /&gt;
    float inches = metres / 0.0254;&lt;br /&gt;
    integer whole_inches = (integer) (inches + 0.125);&lt;br /&gt;
    float part_inches = inches - (float) whole_inches;&lt;br /&gt;
    integer whole_feet = whole_inches / 12;&lt;br /&gt;
    whole_inches = whole_inches % 12;&lt;br /&gt;
    if (whole_feet) result += (string) whole_feet + &amp;quot;&#039; &amp;quot;;&lt;br /&gt;
    if (whole_inches) result += (string) whole_inches;&lt;br /&gt;
    else if (part_inches &amp;lt; 0.125) result += &amp;quot;0&amp;quot;;&lt;br /&gt;
    if (part_inches &amp;gt;= 0.625) result += &amp;quot;¾&amp;quot;;&lt;br /&gt;
    else if (part_inches &amp;gt;= 0.375) result += &amp;quot;½&amp;quot;;&lt;br /&gt;
    else if (part_inches &amp;gt;= 0.125) result += &amp;quot;¼&amp;quot;;&lt;br /&gt;
    return result + &amp;quot;\&amp;quot;&amp;quot;;&lt;br /&gt;
}&amp;lt;/lsl&amp;gt;&lt;/div&gt;</summary>
		<author><name>Pete Olihenge</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=User:Pete_Olihenge&amp;diff=713212</id>
		<title>User:Pete Olihenge</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=User:Pete_Olihenge&amp;diff=713212"/>
		<updated>2010-01-26T13:34:26Z</updated>

		<summary type="html">&lt;p&gt;Pete Olihenge: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== LSL functions ==&lt;br /&gt;
=== Random negative chat channel ===&lt;br /&gt;
This LSL function should, according to my calculations, return a random negative integer in the range -2,000,000,000 to -1,000,000, suitable for use as a dialog chat channel.&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
integer GetDialogChannel ()&lt;br /&gt;
{&lt;br /&gt;
    return (integer) llFrand (-1999000001.0) - 1000000;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
=== Ordinal suffix ===&lt;br /&gt;
This LSL function takes an integer and returns a string that is the integer with its ordinal suffix (&amp;quot;st&amp;quot;, &amp;quot;nd&amp;quot;, &amp;quot;rd&amp;quot; or &amp;quot;th&amp;quot;) appended.&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
string OrdinalSuffix (integer number)&lt;br /&gt;
{&lt;br /&gt;
    string result = &amp;quot;th&amp;quot;; //for all except 1s, 2s and 3s, but including 11, 12 and 13&lt;br /&gt;
    number = number % 100; //just the 10s&lt;br /&gt;
    if (number &amp;lt; 4 || number &amp;gt; 20) //exclude the teens (and their neighbours)&lt;br /&gt;
    {&lt;br /&gt;
        number = number % 10; //just the units&lt;br /&gt;
        if (number == 1) result = &amp;quot;st&amp;quot;; //*1st&lt;br /&gt;
        else if (number == 2) result = &amp;quot;nd&amp;quot;; //*2nd&lt;br /&gt;
        else if (number == 3) result = &amp;quot;rd&amp;quot;; //*3rd&lt;br /&gt;
    }&lt;br /&gt;
    return (string) number + result;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Format a metric measure to Imperial (or US) units, with fractional inches ===&lt;br /&gt;
This LSL function takes a float value representing a measure in metres and returns a string representing the equivalent Imperial (or US) measure in feet and inches, rounded to the nearest quarter inch, and expressed using the feet and inches symbols &#039; and &amp;quot;, and the fractional characters ¼, ½ and ¾.&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
string FormatImperial (float metres)&lt;br /&gt;
{&lt;br /&gt;
    string result = &amp;quot;&amp;quot;;&lt;br /&gt;
    float inches = metres / 0.0254;&lt;br /&gt;
    integer whole_inches = (integer) (inches + 0.125);&lt;br /&gt;
    float part_inches = inches - (float) whole_inches;&lt;br /&gt;
    integer whole_feet = whole_inches / 12;&lt;br /&gt;
    whole_inches = whole_inches % 12;&lt;br /&gt;
    if (whole_feet) result += (string) whole_feet + &amp;quot;&#039; &amp;quot;;&lt;br /&gt;
    if (whole_inches) result += (string) whole_inches;&lt;br /&gt;
    else if (part_inches &amp;lt; 0.125) result += &amp;quot;0&amp;quot;;&lt;br /&gt;
    if (part_inches &amp;gt;= 0.625) result += &amp;quot;¾&amp;quot;;&lt;br /&gt;
    else if (part_inches &amp;gt;= 0.375) result += &amp;quot;½&amp;quot;;&lt;br /&gt;
    else if (part_inches &amp;gt;= 0.125) result += &amp;quot;¼&amp;quot;;&lt;br /&gt;
    return result + &amp;quot;\&amp;quot;&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;/div&gt;</summary>
		<author><name>Pete Olihenge</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=User:Pete_Olihenge&amp;diff=713202</id>
		<title>User:Pete Olihenge</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=User:Pete_Olihenge&amp;diff=713202"/>
		<updated>2010-01-26T13:31:54Z</updated>

		<summary type="html">&lt;p&gt;Pete Olihenge: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Random negative chat channel ==&lt;br /&gt;
This LSL function should, according to my calculations, return a random negative integer in the range -2,000,000,000 to -1,000,000, suitable for use as a dialog chat channel.&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
integer GetDialogChannel ()&lt;br /&gt;
{&lt;br /&gt;
    return (integer) llFrand (-1999000001.0) - 1000000;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
== Ordinal suffix ==&lt;br /&gt;
This LSL function takes an integer and returns a string that is the integer with its ordinal suffix (&amp;quot;st&amp;quot;, &amp;quot;nd&amp;quot;, &amp;quot;rd&amp;quot; or &amp;quot;th&amp;quot;) appended.&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
string OrdinalSuffix (integer number)&lt;br /&gt;
{&lt;br /&gt;
    string result = &amp;quot;th&amp;quot;; //for all except 1s, 2s and 3s, but including 11, 12 and 13&lt;br /&gt;
    number = number % 100; //just the 10s&lt;br /&gt;
    if (number &amp;lt; 4 || number &amp;gt; 20) //exclude the teens (and their neighbours)&lt;br /&gt;
    {&lt;br /&gt;
        number = number % 10; //just the units&lt;br /&gt;
        if (number == 1) result = &amp;quot;st&amp;quot;; //*1st&lt;br /&gt;
        else if (number == 2) result = &amp;quot;nd&amp;quot;; //*2nd&lt;br /&gt;
        else if (number == 3) result = &amp;quot;rd&amp;quot;; //*3rd&lt;br /&gt;
    }&lt;br /&gt;
    return (string) number + result;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Format a metric measure to Imperial (or US) units, with fractional inches ==&lt;br /&gt;
This LSL function takes a float value representing a measure in metres and returns a string representing the equivalent Imperial (or US) measure in feet and inches, rounded to the nearest quarter inch, and expressed using the feet and inches symbols &#039; and &amp;quot;, and the fractional characters ¼, ½ and ¾.&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
string FormatImperial (float metres)&lt;br /&gt;
{&lt;br /&gt;
    string result = &amp;quot;&amp;quot;;&lt;br /&gt;
    float inches = metres / 0.0254;&lt;br /&gt;
    integer whole_inches = (integer) (inches + 0.125);&lt;br /&gt;
    float part_inches = inches - (float) whole_inches;&lt;br /&gt;
    integer whole_feet = whole_inches / 12;&lt;br /&gt;
    whole_inches = whole_inches % 12;&lt;br /&gt;
    if (whole_feet) result += (string) whole_feet + &amp;quot;&#039; &amp;quot;;&lt;br /&gt;
    if (whole_inches) result += (string) whole_inches;&lt;br /&gt;
    else if (part_inches &amp;lt; 0.125) result += &amp;quot;0&amp;quot;;&lt;br /&gt;
    if (part_inches &amp;gt;= 0.625) result += &amp;quot;¾&amp;quot;;&lt;br /&gt;
    else if (part_inches &amp;gt;= 0.375) result += &amp;quot;½&amp;quot;;&lt;br /&gt;
    else if (part_inches &amp;gt;= 0.125) result += &amp;quot;¼&amp;quot;;&lt;br /&gt;
    return result + &amp;quot;\&amp;quot;&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;/div&gt;</summary>
		<author><name>Pete Olihenge</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=User:Pete_Olihenge&amp;diff=713192</id>
		<title>User:Pete Olihenge</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=User:Pete_Olihenge&amp;diff=713192"/>
		<updated>2010-01-26T13:23:34Z</updated>

		<summary type="html">&lt;p&gt;Pete Olihenge: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Random negative chat channel ==&lt;br /&gt;
This LSL function should, according to my calculations, return a random negative integer in the range -2,000,000,000 to -1,000,000, suitable for use as a dialog chat channel.&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
integer GetDialogChannel ()&lt;br /&gt;
{&lt;br /&gt;
    return (integer) llFrand (-1999000001.0) - 1000000;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
== Ordinal suffix ==&lt;br /&gt;
This LSL function takes an integer and returns a string that is the integer with its ordinal suffix (&amp;quot;st&amp;quot;, &amp;quot;nd&amp;quot;, &amp;quot;rd&amp;quot; or &amp;quot;th&amp;quot;) appended.&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
string OrdinalSuffix (integer number)&lt;br /&gt;
{&lt;br /&gt;
    string result = &amp;quot;th&amp;quot;; //for all except 1s, 2s and 3s, but including 11, 12 and 13&lt;br /&gt;
    number = number % 100; //just the 10s&lt;br /&gt;
    if (number &amp;lt; 4 || number &amp;gt; 20) //exclude the teens (and their neighbours)&lt;br /&gt;
    {&lt;br /&gt;
        number = number % 10; //just the units&lt;br /&gt;
        if (number == 1) result = &amp;quot;st&amp;quot;; //*1st&lt;br /&gt;
        else if (number == 2) result = &amp;quot;nd&amp;quot;; //*2nd&lt;br /&gt;
        else if (number == 3) result = &amp;quot;rd&amp;quot;; //*3rd&lt;br /&gt;
    }&lt;br /&gt;
    return (string) number + result;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Format a metric measure to Imperial (or US) units, with fractional inches ==&lt;br /&gt;
This LSL function take a float value representing a measure in metres and returns a string representing the equivalent Imperial (or US) measure in feet and inches, rounded to the nearest quarter inch, and expressed using the fractional characters ¼, ½ and ¾.&lt;br /&gt;
&amp;lt;lsl&amp;gt;&lt;br /&gt;
string FormatImperial (float metres)&lt;br /&gt;
{&lt;br /&gt;
    string result = &amp;quot;&amp;quot;;&lt;br /&gt;
    float inches = metres / 0.0254;&lt;br /&gt;
    integer whole_inches = (integer) (inches + 0.125);&lt;br /&gt;
    float part_inches = inches - (float) whole_inches;&lt;br /&gt;
    integer whole_feet = whole_inches / 12;&lt;br /&gt;
    whole_inches = whole_inches % 12;&lt;br /&gt;
    if (whole_feet) result += (string) whole_feet + &amp;quot;&#039; &amp;quot;;&lt;br /&gt;
    if (whole_inches) result += (string) whole_inches;&lt;br /&gt;
    else if (part_inches &amp;lt; 0.125) result += &amp;quot;0&amp;quot;;&lt;br /&gt;
    if (part_inches &amp;gt;= 0.625) result += &amp;quot;¾&amp;quot;;&lt;br /&gt;
    else if (part_inches &amp;gt;= 0.375) result += &amp;quot;½&amp;quot;;&lt;br /&gt;
    else if (part_inches &amp;gt;= 0.125) result += &amp;quot;¼&amp;quot;;&lt;br /&gt;
    return result + &amp;quot;\&amp;quot;&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lsl&amp;gt;&lt;/div&gt;</summary>
		<author><name>Pete Olihenge</name></author>
	</entry>
</feed>