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
// Fourier Transform Module used by DFT, FFT, RFFT | |
function FourierTransform(bufferSize, sampleRate) { | |
this.bufferSize = bufferSize; | |
this.sampleRate = sampleRate; | |
this.bandwidth = 2 / bufferSize * sampleRate / 2; | |
this.spectrum = new Float64Array(bufferSize/2); | |
this.real = new Float64Array(bufferSize); | |
this.imag = new Float64Array(bufferSize); |
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
===== transform size=2048 ===== | |
fft.js x 18,146 ops/sec ±0.91% (88 runs sampled) | |
jensnockert x 3,728 ops/sec ±1.48% (87 runs sampled) | |
dsp.js x 27,406 ops/sec ±0.91% (89 runs sampled) | |
drom x 11,199 ops/sec ±0.88% (89 runs sampled) | |
Fastest is dsp.js | |
===== transform size=4096 ===== | |
fft.js x 9,057 ops/sec ±0.97% (85 runs sampled) | |
jensnockert x 2,937 ops/sec ±1.03% (89 runs sampled) | |
dsp.js x 12,709 ops/sec ±0.89% (89 runs sampled) |
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
//@flow | |
export default class ObjectPool { | |
size: number | |
head: number | |
items: Array<any> | |
renewCallback: ?Function | |
releaseCallback: ?Function |
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
// 1.3.7 | |
mat2.rotate = function (mat, angle, dest) { | |
if (!dest) { dest = mat; } | |
var a11 = mat[0], | |
a12 = mat[1], | |
a21 = mat[2], | |
a22 = mat[3], | |
s = Math.sin(angle), | |
c = Math.cos(angle); | |
dest[0] = a11 * c + a12 * s; |
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
{ | |
"entityMap": { | |
"0": { | |
"type": "TOKEN", | |
"mutability": "IMMUTABLE", | |
"data": { | |
"asset": { | |
"type": "video", | |
"content_hints": [], | |
"source": { |
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 resolveData = (resolves) => (WrappedComponent) => { | |
return (props) => { | |
const ready = Object.keys(resolves).every((key) => { | |
const resolver = resolves[key] | |
const value = props[key] | |
if (typeof resolver === 'function') { | |
return resolver(value) | |
} else if (resolver === true) { | |
return !isNil(value) |
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
Strip from root post: | |
- body | |
- oembed | |
- media | |
- children (on list endpoint) | |
Strip from child post: | |
- context | |
- tags | |
- collection_id |
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
/** | |
* | |
* Draft-js: convertToHtml | |
* author: [email protected] | |
* | |
*/ | |
var blockNodes = { | |
'header-one': { type: 'h1' }, | |
'header-two': { type: 'h2' }, |
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
## INSERTING CUSTOM BLOCKS | |
A) When at the editor top: | |
1 | | |
to: | |
1 | |
2 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
/ | |
/login | |
/logout | |
/reset_password | |
/change_password | |
/locked | |
/unlock | |
/eloqua | |
/sso/ |