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
license: mit | |
height: 1000 |
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
license: mit |
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
license: mit |
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
<script> | |
let password = '' | |
const hash = s => | |
s.split('').reduce((a, b) => { | |
a = (a << 5) - a + b.charCodeAt(0) | |
return a & a | |
}, 0) | |
$: console.log(password, hash(password)) |
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
/** | |
* D3 js has a stack function: https://github.com/d3/d3-shape#stack | |
* But this function builds a stack of several properties (using the keys function) per row in the array. | |
* Often you may want to create a single stack for a full array based on 1 of its properties. | |
* That's what this function does. | |
* It will subdivide the available space (height) which you can set proportionally based on the values of the key that you provide. | |
* You can also set the padding which will be the spacing between. | |
* | |
* So, here's an example of how to call it: | |
* import { singlePropertyStack } from './singlePropertyStack.js'; |
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
<h1>This is the layout</h1> | |
<slot /> | |
<footer>This is the footer</footer> |
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
<h1>This is the layout</h1> | |
<slot /> | |
<footer>This is the footer</footer> |