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
function stockPicker(market) { | |
let lowest_index = 0; | |
const lowest_previous_index = market.map((x, i) => { | |
if (x < market[lowest_index]) { | |
lowest_index = i; | |
} | |
return lowest_index; | |
}); | |
let best = { |
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
const DemoData = { | |
resources: [{ | |
id: 'r1', | |
name: 'Interventions' | |
}], | |
events: [{ | |
"id": 15, | |
"start": "2018-07-05T07:00:00Z", | |
"end": "2018-07-05T08:00:00.000Z", | |
"resourceId": "r1", |
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
/* | |
* Easing Functions - inspired from http://gizma.com/easing/ | |
* only considering the t value for the range [0, 1] => [0, 1] | |
*/ | |
EasingFunctions = { | |
// no easing, no acceleration | |
linear: function (t) { return t }, | |
// accelerating from zero velocity | |
easeInQuad: function (t) { return t*t }, | |
// decelerating to zero velocity |
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
contract; | |
abi ProxyAbi { | |
#[storage(read)] | |
fn read_val() -> u64; | |
#[storage(write)] | |
fn write_target(target: ContractId); | |
} | |
#[namespace(proxy_47892374)] |
OlderNewer