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
| import { useState } from "react"; | |
| const initGlobal = new Map(); | |
| export const getGlobal = mapKey => { | |
| if (mapKey) { | |
| return initGlobal.get(mapKey); | |
| } else { | |
| return initGlobal; | |
| } |
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
| { | |
| "title": "Ctrl to Caplock", | |
| "rules": [ | |
| { | |
| "description": "Post caps_lock if left_control is tapped alone!", | |
| "manipulators": [ | |
| { | |
| "type": "basic", | |
| "from": { | |
| "key_code": "left_control", |
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
| { | |
| "title": "Ctrl to Caplock", | |
| "rules": [ | |
| { | |
| "description": "Post caps_lock if left_control is tapped alone!", | |
| "manipulators": [ | |
| { | |
| "type": "basic", | |
| "from": { | |
| "key_code": "left_control", |
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 peoples = [ | |
| { | |
| name: 'A', friends: [ | |
| { name: 'B' }, | |
| { name: 'X' }, | |
| { name: 'C' }, | |
| ] | |
| }, | |
| { | |
| name: 'D', friends: [ |
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
| LAlt::LCtrl | |
| LCtrl::LAlt | |
| CapsLock & p::Up | |
| CapsLock & n::Down | |
| CapsLock & b::Left | |
| CapsLock & v::^Left | |
| CapsLock & f::Right | |
| CapsLock & g::^Right | |
| CapsLock & e::End |
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 quickSort = function (arr) { | |
| if (arr.length <= 1) { return arr; } | |
| var pivot = arr.pop() | |
| console.log('pivot', pivot) | |
| var left = []; | |
| var right = []; |
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 initMonth = 1; | |
| const initRubbits = 2; | |
| const totalMonths = 10; | |
| const pregnancyMonths = 2; | |
| const kidsRubbits = 2; | |
| const parentRubbits = 2; | |
| function rubbits(month) { | |
| if (month == initMonth) | |
| return initRubbits; |
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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <style> | |
| .triangle { | |
| border-width: 15px; | |
| border-style: solid; | |
| border-color: #3cba54 #f4c20d #db3236 #4885ed; | |
| padding: 5px; | |
| } |
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
| let arr = [8, 7, 5, 1, 0, 2, 6, 9]; | |
| let tree = {}; | |
| function build(num, tree) { | |
| if (!tree.self) { | |
| tree.self = num; | |
| } else { | |
| if (num > tree.self) { | |
| tree.right = tree.right || {}; |
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
| let arr = [85, 24, 63, 45, 17, 31, 96, 50]; | |
| function split(arr) { | |
| if (arr.length <= 1) | |
| return arr; | |
| else { | |
| let pivot = arr[0]; | |
| let less = []; | |
| let larger = []; |
NewerOlder