nyuuzyou/wikis huggingface dataset:
ListCast

= Implementation =
list listCast(list mixedList, integer type) {
 list result = []; integer x = mixedList != [];
 if (type == TYPE_INTEGER) 
 while (x) 
 result = [(integer)llList2String(mixedList, --x)] + result;
 else if (type == TYPE_FLOAT) 
 while (x) {
 if (llGetListEntryType(mixedList, --x) == TYPE_FLOAT) result = [llList2Float(mixedList, x)] + result;
 else result = [(float)llList2String(mixedList, x)] + result;
 }
 else if (type == TYPE_VECTOR) 
 while (x) {
 if (llGetListEntryType(mixedList, --x) == TYPE_VECTOR) result = [llList2Vector(mixedList, x)] + result;
 else result = [(vector)llList2String(mixedList, x)] + result;
 }
 else if (type == TYPE_ROTATION) 
 while (x) {
 if (llGetListEntryType(mixedList, --x) == TYPE_ROTATION) result = [llList2Rot(mixedList, x)] + result;
 else result = [(rotation)llList2String(mixedList, x)] + result;
 }
 else if (type == TYPE_STRING) 
 while (x) 
 result = [llList2String(mixedList, --x)] + result;
 else if (type == TYPE_KEY) 
 while (x) 
 result = [llList2Key(mixedList, --x)] + result;
 else result = mixedList;
 return result;
}
ListCompare

= Implementation for LSO or MONO =
integer ListCompare(list a, list b) 
{
 if (a != b) return FALSE; // Note: This is comparing list lengths only
 // The next line is only needed if compiling with LSO
 if (a == []) return TRUE; // both lists are empty (as both lists are the same length)
 return !llListFindList(a, b); 
 // As both lists are the same length, llListFindList() can only return 0 or -1 
 // Which we return as TRUE or FALSE respectively 
}
ListItemReplace

__NOTOC__
Category:LSL_User-Defined Functions
== Function: list ListItemReplace(list , string ,string ); ==
Replaces a single occurrence of something in a list with something else that you specify. 
See also: Lists
list ListItemReplace(list mylist,string element_old, string element_new) {
 integer placeinlist = llListFindList(mylist, [element_old]);
 if ( placeinlist != -1 ) {
 return llListReplaceList(mylist, [element_new], placeinlist, placeinlist); 
 }
 llOwnerSay("ERROR: Element '" + element_old + "' not found in list [" + llList2CSV(mylist) + "]" );
 return mylist;
}
list myupdatedList = ListItemReplace(mylist,"Brown","Blue");
ListStridedReorder

list ListStridedReorderContents(list src, list order) {
 //change the order that the elements in the groups are arranged
 integer stride = llGetListLength(order);
 integer len = llGetListLength(src);
 integer strides = len / stride;
 list temp = [];
 list out = [];
 integer i = -stride;
 do{
 temp += llList2ListStrided(llList2List(src, llList2Integer(order, i), -1), 0, -1, stride);
 }while(++i);
 do{
 out += llList2ListStrided(llList2List(temp, i, -1), 0, -1, strides);
 }while(strides > ++i);
 return out;
}
list ListStridedReorderStrides(list src, list order) {
 //change the order that the groups are arranged
 integer strides = llGetListLength(order);
 integer len = llGetListLength(src);
 integer stride = len / strides;
 list temp = [];
 list out = [];
 integer i = 0;
 do
 temp += llList2ListStrided(llList2List(src, i, -1), 0, -1, stride);
 while(strides > ++i);
 i = -stride;
 do
 out += llList2ListStrided(llList2List(temp, llList2Integer(order, i), -1), 0, -1, strides);
 while(++i);
 return out;
}
list ListStridedReorderContentsAndStrides(list src, list element_order, list stride_order) {
 integer stride = llGetListLength(element_order);
 integer strides = llGetListLength(stride_order);
 list temp = [];
 list out = [];
 integer i = -strides;
 do
 temp += llList2ListStrided(llList2List(src, llList2Integer(element_order, i), -1), 0, -1, stride);
 while(++i);
 i = -stride;
 do
 out += llList2ListStrided(llList2List(temp, llList2Integer(stride_order, i), -1), 0, -1, strides);
 while(++i);
 return out;
}
default
{
 state_entry(){
 llOwnerSay(llList2CSV(ListStridedReorderContents([0,1,2, 0,1,2, 0,1,2], [1,2,0])));
 llOwnerSay(llList2CSV(ListStridedReorderStrides([0,1,2, 3,4,5, 6,7,8], [1,2,0])));
 llOwnerSay(llList2CSV(ListStridedReorderContentsAndStrides([0,1,2, 3,4,5, 6,7,8], [1,2,0], [1,2,0])));
 }
}
ListUnique

__NOTOC__
== Function: list ListUnique(list ; ==
Given a list of elements, strips out any duplicates in that list, and returns the de-duped list.
See also: Lists
list ListUnique( list lAll ) {
 integer i;
 list lFiltered = llList2List(lAll, 0, 0);
 integer iAll = llGetListLength( lAll );
 for (i = 1; i < iAll; ++i) {
 if ( llListFindList(lFiltered, llList2List(lAll, i, i) ) == -1 ) {
 lFiltered += llList2List(lAll, i, i);
 }
 }
 return lFiltered;
}
Example:
list mylist = ListUnique(["A", "A", "B", "C", "C", "B"])
would return the list:
["A", "B", "C"]
Originated in a November 2004 thread led by Chromal Brodsky in the SL Scripting Forum. http://forums-archive.secondlife.com/54/30/28137/1.html
A *possibly* faster replacement (at least in my experiments in removing duplicate Agent UUIDs from multiple scanners on a sim):
list nvStripDupes(list DupedList)
{
 integer pos;
 list Element;
 while (llGetListLength(DupedList) != 0)
 {
 Element = llList2List(DupedList, 0, 0);
 NoDupes += Element;
 pos = llListFindList(DupedList, Element);
 while ( pos != -1)
 {
 DupedList = llDeleteSubList(DupedList, pos, pos);
 pos = llListFindList(DupedList, Element);
 }
 }
 return NoDupes;
}
Category:LSL_User-Defined Functions
ListXandY

__NOTOC__
Category:LSL_User-Defined Functions
== Function: list ListXandY(list , list ); ==
This function examines two lists, and returns a new list composed of the elements that both lists have in common.
See also: Lists
list ListXandY(list lx, list ly) {// return a list of elements common to both lists
 list lz = []; integer x;
 for (x = 0; x < llGetListLength(ly); x++) {
 if (~llListFindList(lx,llList2List(ly,x,x))) {
 lz = lz + llList2List(ly,x,x);
 }
 else {
 ;
 }
 }
 return lz;
}
Example:
list l1 = ["a","b","c","d"];
list l2 = ["a","1","b","2","c","3"];
list ListXandY(list lx, list ly) {// return a list of elements common to both lists
 list lz = []; integer x;
 for (x = 0; x < llGetListLength(ly); x++) {
 if (~llListFindList(lx,llList2List(ly,x,x))) {
 lz = lz + llList2List(ly,x,x);
 }
 else {
 ;
 }
 }
 return lz;
}
default{
 state_entry() {
 llSay(0, "The two lists have the following items in common: " + llList2CSV(ListXandY(l1,l2)) );
 //will say: a, b, c
 }
}
Posted with the kind permission of Very Keynes, who originated this script June 2007 in the SL scripters forum http://forums-archive.secondlife.com/54/e4/194138/1.html
ListXequY

__NOTOC__
Category:LSL_User-Defined Functions
== Function: integer ListXequY(list , list ); ==
Answers the question: is list X identical to list Y?
Returns the number 1 if true, 0 if false
Note: requires also the function ListXnotY .
The opposite function is ListXneqY .
See also: Lists
integer ListXequY(list lx, list ly)
{
 if(lx == ly)
 return ListXnotY(lx,ly) == [];
 return FALSE;
}
Example:
list l1 = ["a","b","c", 1,2,3];
list l2 = ["a",1,"b",3,"c",3];
integer ListXequY(list lx, list ly)
{
 return ( (llGetListLength(lx) == llGetListLength(ly) ) & ( ListXnotY(lx, ly) == [] ) );
}
list ListXnotY(list lx, list ly) {// return elements in X list that are not in Y list
 list lz;
 integer i = llGetListLength(lx);
 while(i--)
	if ( !~llListFindList(ly,llList2List(lx,i,i)) )
 lz += llList2List(lx,i,i);
 return lz;
}
default{
 state_entry() {
 llSay(0, "Are we the same lists? " + (string)ListXequY(l1,l2));
 //will say in this example: 0 , meaning No
 }
}
Posted with the kind permission of Very Keynes, who originated this script June 2007 in the SL scripters forum http://forums-archive.secondlife.com/54/e4/194138/1.html
ListXneqY

__NOTOC__
Category:LSL_User-Defined Functions
== Function: integer ListXneqY(list , list ); ==
Answers the question: is list X different from list Y?
Returns the number 1 if true, 0 if false
Note: requires also the function ListXnotY .
The opposite function is ListXequY .
See also: Lists
integer ListXneqY(list lx, list ly)
{
 if(lx == ly)
 return !(ListXnotY(lx,ly) == []);
 return TRUE;
}
Example:
list l1 = ["a","b","c","d", 1,2];
list l2 = ["a",1,"b",2,"c",3,"d"];
 
integer ListXneqY(list lx, list ly)
{
 if(lx == ly)
 return !(ListXnotY(lx,ly) == []);
 return FALSE;
}
 
list ListXnotY(list lx, list ly)
{// return elements in X list that are not in Y list
 list lz;
 integer n = llGetListLength(lx);
 while(n--)
	if ( !~llListFindList(ly,llList2List(lx,n,n)) )
	 lz += llList2List(lx,n,n);
 return lz;
}
default{
 state_entry() {
 llSay(0, "Are we different lists? " + (string)ListXneqY(l1,l2));
 //will say in this example: 1 , meaning yes.
 }
}
Posted with the kind permission of Very Keynes, who originated this script June 2007 in the SL scripters forum http://forums-archive.secondlife.com/54/e4/194138/1.html
ListXnotY

__NOTOC__
Category:LSL_User-Defined Functions
== Function: list ListXnotY(list , list ); ==
Show what x list has that y list is missing.
See also: Lists
list ListXnotY(list lx, list ly) {// return elements in X list that are not in Y list
 list lz;
 integer i = llGetListLength(lx);
 while(i--)
	if ( !~llListFindList(ly,llList2List(lx,i,i)) ) // * see Note
 lz += llList2List(lx,i,i);
 return lz;
}
Note: If the if test is written as if (!~llListFindList ... , the result will be a list of elements in X that are missing from list Y. If it is written as if (~llListFindList ... , the result will be a list of elements in X that are present in list Y.
Example:
list l1 = ["a","b","c","d"];
list l2 = ["a","1","b","2","c","3"];
list ListXnotY(list lx, list ly) {// return elements in X list that are not in Y list
 list lz;
 integer i = llGetListLength(lx);
 while(i--)
	if ( !~llListFindList(ly,llList2List(lx,i,i)) )
 lz += llList2List(lx,i,i);
 return lz;
}
default{
 state_entry() {
 llSay(0, "X list has this in it, but Y list doesn't: " + llList2CSV(ListXnotY(l1,l2)) );
 //will say: d
 }
}
Posted with the kind permission of Very Keynes, who originated this script June 2007 in the SL scripters forum http://forums-archive.secondlife.com/54/e4/194138/1.html
ListXorY

__NOTOC__
Category:LSL_User-Defined Functions
== Function: list ListXorY(list , list ); ==
Join two lists to make one new combined list, while also eliminating any resulting duplicates in the new list.
See also: Lists
list ListXorY(list lx, list ly){ // add the lists eliminating duplicates
 list lz = []; integer x;
 for (x = 0; x < llGetListLength(ly); ++x){
 if (~llListFindList(lx,llList2List(ly,x,x))){
 ;
 }
 else {
 lz = lz + llList2List(ly,x,x);
 }
 }
 return lx + lz;
}
Example:
list l1 = ["a","b","c","d"];
list l2 = ["a","1","b","2","c","3"];
list ListXorY(list lx, list ly){ // add the lists eliminating duplicates
 list lz = []; integer x;
 for (x = 0; x < llGetListLength(ly); ++x){
 if (~llListFindList(lx,llList2List(ly,x,x))){
 ;
 }
 else {
 lz = lz + llList2List(ly,x,x);
 }
 }
 return lx + lz;
}
default{
 state_entry() {
 llSay(0, "The new combined list is: " + llList2CSV(ListXorY(l1,l2)) );
 //will say: a, b, c, d, 1, 2, 3
 }
}
Posted with the kind permission of Very Keynes, who originated this script June 2007 in the SL scripters forum http://forums-archive.secondlife.com/54/e4/194138/1.html
ListXxorY

__NOTOC__
Category:LSL_User-Defined Functions
== Function: list ListXnotY(list , list ); ==
Returns a new list, composed of elements that were in either original script, but not both. 
Note: This is not the same as getting rid duplicates by preserving just one of each duplicated item. It goes further, and removes both items.
See also: Lists
list ListXxorY(list lx, list ly) { // return elements that are in X or Y but not both
 return ListXnotY( lx, ly) + ListXnotY( ly, lx);
}
Example:
list l1 = ["a","b","c","d"];
list l2 = ["a","1","b","2","c","3"];
list ListXxorY(list lx, list ly) { // return elements that are in X or Y but not both
 return ListXnotY( lx, ly) + ListXnotY( ly, lx);
}
list ListXnotY(list lx, list ly) {// return elements in X list that are not in Y list
 list lz = [];
 integer i = 0;
 integer n = llGetListLength(lx);
 for (; i < n; i++)
 if (llListFindList(ly,llList2List(lx,i,i)) == -1)
 lz += llList2List(lx,i,i);
 return lz;
}
default{
 state_entry() {
 llSay(0, "Elements that are in x list or y list but not both: " + llList2CSV(ListXxorY(l1,l2)));
 //will say: d, 1, 2, 3
 }
}
Example 2 (Getting items added/removed from an inventory):
list ListXxorY(list lx, list ly) { // return elements that are in X or Y but not both
 return ListXnotY( lx, ly) + ListXnotY( ly, lx);
}
 
list ListXnotY(list lx, list ly) {// return elements in X list that are not in Y list
 list lz = [];
 integer i = 0;
 integer n = llGetListLength(lx);
 for (; i < n; i++)
 if (llListFindList(ly,llList2List(lx,i,i)) == -1)
 lz += llList2List(lx,i,i);
 return lz;
}
list getInventory() {//method for returning a list of all inventory items in a list.
 list InventoryList;
 integer count = llGetInventoryNumber(INVENTORY_ALL);
 string ItemName;
 while (count--)
 {
 ItemName = llGetInventoryName(INVENTORY_ALL, count);
 if (ItemName != llGetScriptName() ) 
 InventoryList += ItemName;
 }
 return InventoryList;
}
list saved_inventory_list;
default
{
 state_entry()
 {
 saved_inventory_list = getInventory(); //Grab the list at state_entry to compare in future changes.
 }
 changed(integer change)
 {
 if(change & CHANGED_INVENTORY)
 {
 list new_inventory_list = getInventory();
 list xory = ListXxorY(new_inventory_list,saved_inventory_list); //Comparing new inventory with old one.
 string item_changed = llList2String(xory, 0); //xory list will always be a size of 1 in changed event.
 
 //If the new inventory is greater than the saved inventory then it means an item hs been added, otherwise removed.
 if(llGetListLength(new_inventory_list) > llGetListLength(saved_inventory_list))
 {
 llOwnerSay("Item Added: " + item_changed);
 }else
 {
 llOwnerSay("Item Removed: " + item_changed);
 }
 
 saved_inventory_list = new_inventory_list; //Be sure to update the saved inventory list.
 }
 }
}
Posted with the kind permission of Very Keynes, who originated this script June 2007 in the SL scripters forum http://forums-archive.secondlife.com/54/e4/194138/1.html
List Of Railways

This page is made to offer links to all railway-themed articles.
== Multisim Railways ==
*Babbage Railway
*Bay City Railway & Trams
*Caledon Railway
*Calleta Monorail
*rapidER
*GSLR
*German Railway
*Lionheart Railway
*Losemind Railway
*New York Railway
*ONSR
*Paris Railway
*Premium Railway
*Tombstone Railway
*Second Life Railroad
*Second Norway Railway
*SJRR
*West Atoll Railroad
*WW II Railway
== Subsim Railways ==
*Small Railways - main page with listings
*Achemon Railway
== Railway Themed Articles ==
*Linden Vehicle Tutorial
*Second Life Railroad
*Second Life Railroad: Technical Data
*Second Life Railroad/SLRR standards
*Second Life Railroad/SLRR Switch
*SLGI Trains
*Virtual Railway Consortium
*Virtual Railway Consortium/SLRR History
== See Also ==
Second Life Geography
List cast

= Implementation =
//This function typecasts a list of strings, into the types they appear to be. 
//Extremely useful for feeding user data into llSetPrimitiveParams
//It takes a list as an input, and returns that list, with all elements correctly typecast, as output
//Written by Fractured Crystal, 27 Jan 2010, Commissioned by WarKirby Magojiro, this function is Public Domain
list list_cast(list in)
{
 list out;
 integer i = 0;
 integer l= llGetListLength(in);
 while(i < l)
 {
 string d= llStringTrim(llList2String(in,i),STRING_TRIM);
 if(d == "")out += "";
 else
 {
 if(llGetSubString(d,0,0) == "<")
 {
 if(llGetSubString(d,-1,-1) == ">")
 {
 list s = llParseString2List(d,[","],[]);
 integer sl= llGetListLength(s);
 if(sl == 3)
 {
 out += (vector)d;
 //jump end;
 }else if(sl == 4)
 {
 out += (rotation)d;
 //jump end;
 }
 }
 //either malformed,or identified
 jump end;
 }
 if(llSubStringIndex(d,".") != -1)
 {
 out += (float)d;
 }else
 {
 integer lold = (integer)d;
 if((string)lold == d)out += lold;
 else
 {
 key kold = (key)d;
 if(kold)out += [kold];
 else out += [d];
 }
 }
 }
 @end;
 i += 1;
 }
 
 return out;
}
Listener Script

== Listener Script ==
Put this in an object to listen to what people near the box are saying (like spying!) I am not responsible for people cheating on their partners, plots to kill people, etc.
default
{
 state_entry()
 {
 llListen(0, "", NULL_KEY, "");
 }
 listen(integer channel, string name, key id, string message)
 {
 llInstantMessage(llGetOwner(), name + " said: '" + message + "'");
 }
}
Little Cat Microcontinent

Little Cat is a Microcontinent that has also the temporary name A056. It has Coordinates 1195-1198/1393-1399, that places it inside Grid Sector J13, Northern Ocean. Its position is far from the large continents, near the beginning of Far North Ocean, with very low sim density.
== Structure ==
All sims share the common world Little Cat. There are 8 sims forming the microcontinent (an another one at some distance, with the same name). As seen on the map, it looks a bit like an animal.
== Geography ==
The isolated sim is interesting because land is at 20 cm below Water, so you wet your feet while walking through it.
Land is usually flat (but not always). Mountains are present in South, where they have the shapes of animals. There are a lot of roads that allow access through the area, but not only roads. Water is also present. What is notable here is the presence of electric lines, visible through many sims. Buildings are present and usually are in Japanese style.
== Land Status ==
There is a single estate.
Our team found no Land With Restricted Access. There is Unused Land, for rent or for sale. Protected Land also exists.
== See Also ==
Second Life Geography
List Of Microcontinents And Sim Clusters
Oceans
Living In Horizons

__TOC__
 back to the main Horizons page
==Community Regions==
The Horizons Community Regions are places for the Horizons community to meet, hold events, gather, and socialize. Each of them has a meeting hall, a lounge area, and a bar where you can dance, socialize and have a drink. 
The Community Regions have a continuous audio stream. If you are having trouble hearing it,
* be sure that you have streaming music enabled in Preferences > Sound & Media.
* click the Play button in the upper right corner of your viewer screen to start the stream.
* wait for the stream to download to your viewer. (This may take as much as a minute.)
* check the volume slider in your Master Sound Control panel.
Relax with a friend, hold your next club meeting, schedule a community musical event...
or just come to admire the ducks.
==Horizons Info Hubs==
Visit any one of the four InfoHub Regions in Horizons to find out more about buying and managing land, and to learn about the Horizons quests. Under the two domes in the central part of the Info Hub, you’ll find two resource areas:
===The Land Info Area===
Visit the Land Info area to get a folder of information about buying land and about using a parcel’s mailbox controls to choose and then customize a Horizons home. Watch a video that describes the benefits of buying a Horizons parcel, or access the Horizons wiki for more detailed information.
===The Horizons Experience Area===
Visit the Horizons Experience area to watch videos that introduce the quests at the heart of the Horizons subcontinent. Learn what’s behind the evil Dr. Talpa’s exploits in this part of the world, and find out how you can help [Magellan Linden] (the intrepid explorer) outsmart Dr. Talpa -- and earn some L$ or fabulous prizes. Enter a portal to launch your adventure.
=== Building Demo Areas ===
You may also come to the Info Hub to practice using the mailbox controls for a Horizons residential parcel. There are two Demo areas: one for learning how to rez and customize a Horizons home if a parcel is owned by one person, and the other for parcels that are owned by a group. You can rez each of the house models and experiment with the control panels to sample the color and trim options. A kiosk in each demo area offers more detailed information to help you manage a home on your own parcel. 
===Vehicle Rez Zones===
You may rez your aircraft or boat or dock it temporarily at either of the Vehicle Rez Zones on the north and south sides of the Info Hub as well as one on the east or west side of the Community regions. From there, you can navigate by water anywhere in the Horizons sea or its inland canal system.
Category:Horizons
LlAddCameraView

This function creates a new camera view inworld or outworld, depending on the function arguments.
Outworld - create a window in which you can look the other way, or keep an eye on your home.
Inworld - create a square object which will be alligned and attached to another object. This square works like a tv-set, but the image is controlled by the newly created camera. This way it's possible to implement mirrors and reflecting surfaces.
Please comment on this idea. I think it can be implemented fully client side, so performance is not influenced much.
:It would have huge performance impacts, to render just one arbitrary view would double cpu, gpu & network requirements; it does not scale. -- Strife Onizuka 04:18, 26 July 2007 (PDT)
::On that I agree. For the client side it could be an option to have it set from preferences (Use mirrors on/off). On the server side it can be optimised a lot. Not scalable? Maybe. (Nynia)
:::Even if it looks like with modern multitasking technologies it'd probably be doable, but not feasable. A feature like this is very "cool-toys" rather than being highly implicitly useful, as I result, I seriously doubt anyone'd spend any time implementing it. --Kanashio Resident (talk) 11:12, 12 July 2015 (PDT)
LlAsc & llChr

This article is a feature request
This is a simple script feature. Two added functions: llAsc and llChr. These two will convert between characters from a string and their ascii code. This might be especially useful when using font textures..
llAsc returns the integer value that represents the ascii value of the given character.
llChr does the opposite, returning the character with the given ascii value.
integer llAsc(string character);
string llChr(integer asciivalue);
----
See also: Feature requests
----
See the functions on UTF-8 -- Strife Onizuka 17:18, 4 May 2007 (PDT)
LlAtan2/Compass QA

default
{
	state_entry()
	{
		vector p = llGetPos();
		integer a = 0;
		integer b = 72;
		float c = -TWO_PI / b;
		float d = 360.0 / b;
		while(a <= b)
		{
			vector target = (<0,1,0> * llEuler2Rot(<0, 0, c * a>));
			llOwnerSay(llDumpList2String([((integer)(d * a))] + compass(p + target), " "));
			a++;
		}
	}
}
LlEmail/fr

=== Document conceptuel ===
(aucun)
=== Spécifs fonctionnelles ===
(aucunes)
=== Scripts de test ===
internal test
=== Discussion sur les évolutions===
(aucune)
=== Relations avec les autres fonctions===
 Listes des fonctions à tester si cette fonctionnalité évolue. 
IM to email - Contrôle des IM.
Postcards - les cartes postales (Postcards) utilisent-elles les mails ?
=== Guide utilisateur ===
llEmail sur LSLwiki.net