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
<canvas id="screen"></canvas> | |
<div class="overlay">PAINT #1</div> |
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
[ | |
{ | |
"hex": "00", | |
"evenWord": "aardvark", | |
"oddWord": "adroitness" | |
}, | |
{ | |
"hex": "01", | |
"evenWord": "absurd", | |
"oddWord": "adviser" |
Inspired by this answer: https://stackoverflow.com/a/41196499
This implementation improves upon the above answer by only running the PascalTriangle functions once during initialization and using the compiled results in all subsequent calls to the function.
// (nthOrder should be a positive integer, not a float.)
// values higher than 15 show some strange behavior.
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Hello World!</title> | |
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; img-src https://*; child-src 'none';"> | |
</head> | |
<body> | |
<h1>Hello World!</h1> | |
</body> |
- Add an instance of the
Double Content
widget to an area. - Add an
Image
to one of the newly instantiated areas. (should work fine) - Edit the
Double Content
widget, saving changes (no actual editing options should be shown) - Repeat step 2. (should now tell you
You were unable to take control of the document
) - Cry softly.
- Refresh page and attempt to add another
Image
as in Step 2 (should work again, till you try to editDouble Content
again.)
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 { ipcRenderer } = require('electron') | |
ipcRenderer.on('postal-error',(event, errorPayload)=>{ | |
const { | |
error, | |
sender, | |
destination, | |
payload | |
} = errorPayload | |
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 shortId from "shortid" | |
export const HashToArray = (hash) => Object.keys(hash).map((key)=>hash[key]) | |
export const ArrayToHash = (array) => array.reduce((acc, item)=>{ | |
const {id} = item | |
acc[id] = item | |
return acc | |
},{}) | |
export const Add = (hash, itemObject) => { |
OlderNewer