Bitcoin Forum
July 20, 2024, 10:34:52 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: I am selling this litte javascript object for btc in pastecoin. (ordered list)  (Read 575 times)
Kaexar (OP)
Newbie
*
Offline Offline

Activity: 1
Merit: 0


View Profile
December 12, 2014, 06:49:05 PM
 #1

Javascript — Automatically ordered array list.

The link:

http://www.pastecoin.com/0jE


Please check it out, and if you find it useful, it's not too expensive. Just 0.002 BTC Cheesy

It may be the first true useful code published in pastecoin! Not a hack-the-blockchain nor instant-lots-of-btc fake code! Wink

If you don't code, but you know someone who does, this can be a good christmas gift. Grin


This is its description:


This script can be used to generate an ordered keys object that contains:

- An array storing keys in an alphabetic order (for text type keys) or ascending numerical order (for int and float type keys).

- Methods to add, find and remove keys in the list, keeping them in the right order.

- An array storing variables or objects associated one-by-one with the ordered keys array elements.

- Methods to store and retrieve data associated with each key.

Methods:

.add(keyval);            // Adds 'keyval' as a new key and returns in what place on the list it is added.
.find(keyval);            // Searches for 'keyval' and returns in which place on the list it is now.
.delete(keyval);        // Removes the 'keyval' key from the keys lists (and its associated data), returning form which place it was removed.
.klen();                      // Returns the total number of keys. (The keys list array length)

.get(keyval);                  // Searches for 'keyval' at the keys list and returns the data stored under that key.
.set(keyval,data);          // Associates the data parameter to the 'keyval' at the keys list, as an element of the data list.
.addnset(keyval,data);  // Adds 'keyval' as a new key and associates the data parameter to it. Returns the key place in the keys list.
.dlen();                           // Returns the total number of data array elements. Must be the same as the number of total keys.

.getKeysList();         // Returns the reference to the Keys List array in the object.
.getDataList();         // Returns the reference to the Data List array in the object.

.getType();             // Returns the keys type. 'int', 'float' or 'text'.


Thank you!
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!