This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| 1: AQ | |
| 62: Pg | |
| 100: Z | |
| 1000: 6AM | |
| 10000: ECc | |
| 100000: oIYB | |
| 1000000: QEIP | |
| 10000000: gJaY | |
| 1000000000: AMqaOw |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Cache method result on a thread level | |
| define whatmethod => { | |
| return givenblock->methodname | |
| } | |
| define whattype => { | |
| return givenblock->self->type | |
| } | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| local(data) = bytes('Hello') | |
| my_ds->sql(" | |
| DROP TABLE IF EXISTS bytes_example; | |
| CREATE TABLE bytes_example ( | |
| `data` binary(16) NOT NULL | |
| ); | |
| INSERT INTO bytes_example(data) VALUES (X'" +#data->encodehex + "'); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?lasso | |
| define pop => type { | |
| data | |
| public pop_net = null, | |
| public pop_mode = '', | |
| public pop_timeout = 15, | |
| public pop_token = '', | |
| public pop_index = 0, | |
| public pop_err = array, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?lasso | |
| define oauth_consumer_key => 'key' | |
| define oauth_consumer_secret => 'secret' | |
| define oauth_request_token => 'requestkey' | |
| define oauth_request_secret => 'requestsecret' | |
| define oauth_access_token => 'accesskey' | |
| define oauth_access_secret => 'accesssecret' | |
| define oauth_realm => 'http://term.ie/' | |
| define oauth_request_endpoint => {return 'http://term.ie/oauth/example/request_token.php'} | |
| define oauth_access_endpoint => 'http://term.ie/oauth/example/access_token.php' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* Local results | |
| Random access | |
| array((micros = 4593.000000), (micros_average = 459.300000)) - map | |
| array((micros = 3266.000000), (micros_average = 326.600000)) - hashtable | |
| array((micros = 17445.000000), (micros_average = 1744.500000)) - match | |
| "First item" D90CC508-C8B9-46CA-A527-85DE0E4CF387 | |
| array((micros = 4785.000000), (micros_average = 4.785000)) - map | |
| array((micros = 3977.000000), (micros_average = 3.977000)) - hashtable |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var router = (function() { | |
| var self = {} | |
| var usehistory = window && window.history.pushState ? 1 : 0; | |
| self.routes = {} | |
| self.go = function(url,title,state){ | |
| self.push(url,title,state) | |
| self.execute(url) | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Base on https://en.wikipedia.org/wiki/List_of_file_signatures | |
| define file_signature(filedata::bytes) => { | |
| local(hex) = #filedata->sub(1, 32)->encodehex | |
| match(true) => { | |
| case(#hex->substring(1, 2) == "00") return (: "PIC","PIF","SEA","YTR") | |
| case(#hex->substring(12, 16) == "0000000000000000") return (: "PDB") | |
| case(#hex->substring(12, 16) == "0000000000000000") return (: "PDB") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Thread objects to store data | |
| ! ::global_store_00->istype ? define global_store_00 => thread {parent map public oncreate => ..oncreate} | |
| ! ::global_store_01->istype ? define global_store_01 => thread {parent map public oncreate => ..oncreate} | |
| ! ::global_store_02->istype ? define global_store_02 => thread {parent map public oncreate => ..oncreate} | |
| ! ::global_store_03->istype ? define global_store_03 => thread {parent map public oncreate => ..oncreate} | |
| ! ::global_store_04->istype ? define global_store_04 => thread {parent map public oncreate => ..oncreate} | |
| // Establish store to use | |
| define global_store(name::string) => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ///////////////////////////////////////////////////////////////////////// | |
| // | |
| // App type loader | |
| // | |
| ///////////////////////////////////////////////////////////////////////// | |
| ! ::init_thread->istype | |
| ? define init_thread => thread { | |
| public lassoapps => { | |
| stdoutnl('init: lassoapps') |