This file contains 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
[ | |
{ | |
"url": "blob:https://dev.realtimeboard.com/d9f095e9-5df2-4b4b-93cb-45ad9b6e4238", | |
"title": "TestBoard, Online Whiteboard for Visual Collaboration", | |
"img": "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/4gIoSUNDX1BST0ZJTEUAAQEAAAIYAAAAAAQwAABtbnRyUkdCIFhZWiAAAAAAAAAAAAAAAABhY3NwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAA9tYAAQAAAADTLQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAlkZXNjAAAA8AAAAHRyWFlaAAABZAAAABRnWFlaAAABeAAAABRiWFlaAAABjAAAABRyVFJDAAABoAAAAChnVFJDAAABoAAAAChiVFJDAAABoAAAACh3dHB0AAAByAAAABRjcHJ0AAAB3AAAADxtbHVjAAAAAAAAAAEAAAAMZW5VUwAAAFgAAAAcAHMAUgBHAEIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFhZWiAAAAAAAABvogAAOPUAAAOQWFlaIAAAAAAAAGKZAAC3hQAAGNpYWVogAAAAAAAAJKAAAA+EAAC2z3BhcmEAAAAAAAQAAAACZmYAAPKnAAANWQAAE9AAAApbAAAAAAAAAABYWVogAAAAAAAA9tYAAQAAAADTLW1sdWMAAAAAAAAAAQAAAAxlblVTAAAAIAAAABwARwBvAG8AZwBsAGUAIABJAG4AYwAuACAAMgAwADEANv/bAEMAAwICAgICAwICAgMDAwMEBgQEBAQECAYGBQYJCAoKCQgJCQoMDwwKCw4 |
This file contains 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
FORMAT: 1A | |
HOST: https://api.orkestro.io/ | |
# Orkestro API | |
Orkestro's public API enables customers to programatically integrate Orkestro's marketplace capabilities into their own platform. | |
API consumers are able to submit orders, get their statuses, cancel them and get constant status updates for them through webhooks. | |
## Glossary | |
- **Order** - Represents a logical unit of work to get a parcel from location A to B using Orkestro's Platform. |
This file contains 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 _log = require("../../utils/logger") | |
/** | |
* @typedef {{ | |
* query: any, | |
* includeInitial?: boolean, | |
* onChange(oldVal: any, newVal: any, ctx?: Ork.Context): any, | |
* onState?: (state: string, ctx?: Ork.Context) => any, | |
* dataTimeoutInterval?: number, | |
* stateTimeoutInterval?: number, |
This file contains 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 { query } = require("../connection") | |
/** | |
* @template T | |
* @param {Pg.QueryConfig | string} queryConfig | |
* @param {Ork.Context} ctx | |
* @returns {Sql.LazyQuery<T>} | |
*/ | |
function lazyQuery(queryConfig, ctx = {}) { | |
let { name = "", text, values = [] } = |
This file contains 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
void main() { | |
final order1 = Order( | |
address: Address( | |
street: "Daguan", | |
city: "Taipei", | |
postcode: "231", | |
country: "Taiwan" | |
), | |
person: Person( | |
firstName: "Chloe", |
This file contains 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
void main() { | |
final map = { | |
Product(price: 1): 2, | |
Product(price: 2): 3, | |
}; | |
final total = map.entries.fold( | |
0, | |
(total, entry) => total + (entry.key.price * entry.value) | |
); |
This file contains 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
// Binary bit slice from the right to the left | |
// msb: n-th more significant bit from the right (inclusive) | |
// lsb: n-th less signnificant bit from the right (inclusive) | |
// | |
// bitSlice(x, 2, 0) - last 3 bits of a number | |
// bitSlice(x, 3, 2) - 4th and 3rd least significant bits | |
function bitSlice(n, msb, lsb) { | |
return (n & ((1 << (msb + 1)) - 1)) >> lsb | |
} |
This file contains 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
main() async { | |
List<String> testList = ['sfs','sdfsdf', 'sfdsf']; | |
for(final value in testList) { | |
await Future.delayed(Duration(seconds: 1)); | |
print('Writing another word $value'); | |
}; | |
} |
This file contains 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
void main() { | |
Map firstMap = { "id": 1, "value": [{"key": "A"}, {"key": "B"}]}; | |
List valueList = firstMap["value"]; | |
List<Map> newList = valueList.map((valueItem) => { | |
"id": firstMap["id"], | |
"value": [valueItem] | |
}).toList(); | |
This file contains 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
import 'dart:math'; | |
String randomString(int length) { | |
final rand = Random.secure(); | |
final codeUnits = List.generate(length, (index) { | |
return rand.nextInt(33) + 89; | |
}); | |
return String.fromCharCodes(codeUnits); | |
} |
NewerOlder