| # | 50 | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 |
|---|---|---|---|---|---|---|---|---|---|---|
| cool-gray | #f8fafc |
#f1f5f9 |
#e2e8f0 |
#cfd8e3 |
#97a6ba |
#64748b |
#475569 |
#364152 |
#27303f |
#1a202e |
| gray |  => { | |
| // Iterate through `source` properties and if an `Object` set property to merge of `target` and `source` properties | |
| for (const key of Object.keys(source)) { | |
| if (source[key] instanceof Object) Object.assign(source[key], merge(target[key], source[key])) | |
| } |
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
| { | |
| "languages": ["c++", "c", "python","lisp", "scheme", "clojure", "clojurescript", "hylang","js","sass","scss"], | |
| "palettes": { | |
| "default": ["#3F9101","#0E4A8E","#BCBF01","#BC0BA2","#61AA0D","#3D017A","#D6A60A","#7710A3","#A502CE","#eb5a00"], | |
| "Dracula": ["#E8BA36","#54A857","#359FF4","#5060BB","#179387","#A5BE00","#005FA3","#DB7100","#FFC666","#38FF91"], | |
| "One Dark": ["#E8BA36","#54A857","#359FF4","#5060BB","#179387","#A5BE00","#005FA3","#DB7100","#FFC666","#38FF91"] | |
| }, |
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
| " vim-plug | |
| call plug#begin('~/.vim/plugged') | |
| " plugin section | |
| Plug 'pangloss/vim-javascript' | |
| Plug 'leafgarland/typescript-vim' | |
| Plug 'maxmellon/vim-jsx-pretty' | |
| Plug 'prettier/vim-prettier', { 'do': 'yarn install', 'for': ['javascript', 'typescript', 'css', 'less', 'scss', 'json', 'graphql', 'markdown', 'vue', 'yaml', 'html'] } | |
| let g:prettier#autoformat = 0 |
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 [MyArray, setMyArray] = useState([]); | |
| const [sortStatus, setSortStatus] = useState(true); | |
| const handleAccuracySort = () => { | |
| const data = MyArray; | |
| if (sortStatus) { | |
| let sorted = data.sort((a, b) => a[1] - b[1]); | |
| setConfScores(sorted); | |
| setSortStatus(!sortStatus); | |
| } else { |
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(data) { | |
| var canvas = document.getElementById("toplevelGraphCanvas"); | |
| var rect = canvas.getBoundingClientRect(); | |
| var ctx = canvas.getContext('2d'); | |
| var type = "mousemove"; | |
| canvas.dispatchEvent( | |
| new MouseEvent(type, { | |
| clientX: rect.left + data.x, |
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 canvas = document.querySelector("#toplevelGraphCanvas"); | |
| canvas.addEventListener("mousemove", function(evt){ | |
| var rect = canvas.getBoundingClientRect(); | |
| let x = evt.clientX - rect.left; | |
| let y = evt.clientY - rect.top; | |
| console.log(x,y) | |
| }); |
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 boom = { | |
| a: {x: 1200, y:230}, | |
| b: {x: 150, y: 250} | |
| }; | |
| (function (data) { | |
| var canvas = document.getElementById("toplevelGraphCanvas"); | |
| var rect = canvas.getBoundingClientRect(); | |
| var type = "mousedown"; |
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 (data) { | |
| var canvas = document.getElementById(data.id); | |
| var rect = canvas.getBoundingClientRect(); | |
| var type = 'mousedown'; | |
| canvas.dispatchEvent( | |
| new MouseEvent(type, { | |
| clientX: rect.left + data.x, | |
| clientY: rect.top + data.y, | |
| }) | |
| ); |
NewerOlder