Enables the parsing of basic templates.
Also check out slt2, which is about a million times better!
Template.Parse ( template, data )
| --[[GenerateHashFunc | |
| Generates a function that maps an amount of integers to a single array index. | |
| Also generates a function that performs the inverse of the hash function. | |
| Input: The first two arguments indicate the base of the input and the output, | |
| respectively. If not given, they default to 0 for the input, and 1 for the | |
| output. | |
| Each argument afterwards represents one argument to be passed to the generated |
| --[[ | |
| CachedGet ( url, file, bin, exp ) | |
| Sends an HTTP GET request, caching the results for subsequent calls. | |
| `url`: The URL to request. | |
| `file`: The name of the cache file. | |
| `bin`: Whether content is binary. Defaults to false. | |
| `exp`: Cache expiration time, in seconds. Defaults to 1 day. |
| --[[ | |
| function FetchAPI ( force, sources ) | |
| Retrieves Roblox API data from one or more specified sources. | |
| Returns two values: The unparsed API dump string, and a table of class | |
| names and their corresponding explorer image indexes. | |
| - `force`: If a source fails, use the next source to retrieve the data. |
| * Overview | |
| + We're providing new Data Persistence API, which lets you store some data | |
| between server runs for ROBLOX places | |
| + Significant improvement over previous API, including: | |
| - Arbitrary global data, not just per-place data | |
| * Allows to subscribe to updates made by other instances! | |
| - Guaranteed saves - as soon as call returns, data will not be lost | |
| - In future, will allow sharing this data between different places | |
| - Saves arbitrary lua tables | |
| --[[ | |
| VSFixedFileInfo( exePath ) | |
| returns: | |
| - High-order word of dwFileVersionMS | |
| - Low-order word of dwFileVersionMS | |
| - High-order word of dwFileVersionLS | |
| - Low-order word of dwFileVersionLS |
| --[[ ArrayDiff | |
| Receives two arrays, and gets the difference between them. Returns a list of | |
| steps that will turn the first array into the second. | |
| - Elements in each array should be unique | |
| - Order of elements matters | |
| Ops: | |
| insert: {1, index, value} |
| // Thanks: | |
| // http://stackoverflow.com/questions/12396665/c-library-to-read-exe-version-from-linux#answer-12486703 | |
| package main | |
| import ( | |
| "encoding/binary" | |
| "errors" | |
| "os" | |
| ) |
Enables the parsing of basic templates.
Also check out slt2, which is about a million times better!
Template.Parse ( template, data )| -- LOVE2D 0.9.0 | |
| -- main.lua | |
| -- Left-click somewhere to add point | |
| -- Left-click and drag green point to move it | |
| -- Right-click green point to remove it | |
| -- Left-click and drag red point to modify starting angle | |
| -- Backspace to remove all points | |
| local Vector2;Vector2 = { |
| function fast(f) | |
| local function run() | |
| if f() ~= false then | |
| Spawn(run) | |
| end | |
| end | |
| Spawn(run) | |
| end | |
| local time = 1 |