[].forEach.call($$("*"),function(a){a.style.outline="1px solid #"+(~~(Math.random()*(1<<24))).toString(16)})
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
Build a data structure that implements the following 3 functions: | |
- set(key, value) → sets key and value in the data structure and returns nothing. | |
- get(key) → returns the value that was set for this key (null if doesn’t exist) | |
- set_all(value) → sets the value for all keys that are in the data structure. Returns nothing. | |
The catch is that each of the functions should run in constant time - O(1). | |
Can assume in-memory simple single thread process. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
for f in $(git diff --name-only); do | |
if [ ${f: -3} == '.js' ] || [ ${f: -4} == '.jsx' ]; then | |
$(npm bin)/prettier $f --print-width=120 --single-quote --write | |
$(npm bin)/eslint --fix $f | |
fi | |
if [ ${f: -5} == '.scss' ]; then | |
$(npm bin)/prettier $f --print-width=120 --single-quote --write | |
$(npm bin)/cssdeclsort $f | |
fi | |
done |
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
/* | |
Comments | |
======== | |
*---* [Jane Smith] Hey [Rob], what do you think about | |
| | switching the roll-out plan over to a faster schedule? | |
*---* | |
{{{ I guess my concern is that we won't learn fast | |
enough, and that will put the project... [See More] |
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
{"container":"joyn","props":{"flow":"x","label_id":"$"},"children":[{"container":"edge-left-1600","props":{"flow":"x"},"children":[{"container":"edge_submodule","props":{"flow":"z","label_id":"$.children[0]"},"children":[{"container":"base-container","props":{"flow":"y","align_y":"max","expand_y":false,"label_id":"$.children[0].children[0].children[0]"},"children":[{"container":"base-and-legs","props":{"flow":"z","align_z":"max","expand_z":false,"label_id":"$.children[0].children[0].children[0].children[0]"},"children":[{"container":"legs","props":{},"children":[{"container":"leg","props":{"align_x":"min","align_y":"min","pivot":"origin","x":6,"y":6,"rotation_z":-45,"sku":"551.159.00"},"children":[]},{"container":"leg","props":{"align_x":"min","align_y":"max","pivot":"origin","x":6,"y":0,"rotation_z":-135,"sku":"551.159.00"},"children":[]},{"container":"leg","props":{"align_x":"max","align_y":"min","pivot":"origin","x":0,"y":6,"rotation_z":45,"sku":"551.159.00"},"children":[]},{"container":"leg","props":{"ali |
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
{"container":"joyn","props":{"flow":"x","label_id":"$"},"children":[{"container":"module-800","props":{"flow":"z"},"children":[{"container":"base-container","props":{"flow":"y","align_y":"max"},"children":[{"container":"base","props":{"sku":"551.100.00","cover_sku":"551.310.11","align_y":"max"}}]},{"container":"sitting_elements","props":{"flow":"y","align_y":"max"},"children":[{"container":"cushions","props":{"flow":"z"},"children":[{"container":"cushion_normal","props":{"sku":"551.121.00","cover_sku":"551.310.11"}},{"container":"back_cushion","props":{"sku":"551.136.00","cover_sku":"551.310.11","align_y":"max"}}]},{"container":"backrest","props":{"sku":"551.111.00","cover_sku":"551.310.11"}}]}]},{"container":"module-800","props":{"flow":"z"},"children":[{"container":"base-container","props":{"flow":"y","label_id":"$.children[1].children[0]"},"children":[{"container":"base","props":{"sku":"551.100.00","cover_sku":"551.310.11","align_y":"max","label_id":"$.children[1]"}}]},{"container":"sitting_elements","prop |
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
{ | |
"container": "joyn", | |
"props": { | |
"flow": "x", | |
"label_id": "$" | |
}, | |
"children": [ | |
{ | |
"container": "adding-base-container", | |
"props": { |
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
importScripts('./cachepolyfill.js'); | |
var CACHE_VERSION = 1; | |
var CACHE = `cache-v${ CACHE_VERSION }`; | |
const assetsToCache = [ | |
// CDNs AND 3rd parties | |
'//cdnjs.cloudflare.com/ajax/libs/socket.io/1.7.2/socket.io.min.js', | |
'//cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min.js', | |
'//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.5/css/bootstrap.min.css', |
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
[ | |
{ "key": "cmd+o", "command": "editor.action.outdentLines", | |
"when": "editorTextFocus && !editorReadonly" }, | |
{ "key": "cmd+k", "command": "workbench.action.terminal.kill" }, | |
{ "key": "ctrl+t", "command": "workbench.action.terminal.toggleTerminal" } | |
] |
NewerOlder