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 songInfos = [{ | |
url: "https://fuckingdj.blob.core.windows.net/test/Swedish%20House%20Mafia%20-%20Save%20The%20World%20(Zedd%20Remix).mp3", | |
}, { | |
url: "https://fuckingdj.blob.core.windows.net/test/Jewelz%20%26%20Scott%20Sparks%20feat.%20Quilla%20%E2%80%93%20Unless%20We%20Forget%20(Original%20Mix).mp3", | |
}]; | |
var song1toSong2TransitionData = { | |
startTime: 72.556, | |
skipBeginning: 45.824, | |
}; | |
var context = new AudioContext(); |
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
// Rather than use [<DefaultValue>], define a default record. | |
type MyRecord = { | |
field1 : int | |
field2 : int | |
} | |
let defaultRecord1 = { field1 = 0; field2 = 0 } | |
let defaultRecord2 = { field1 = 1; field2 = 25 } | |
// Use the with keyword to populate only a few chosen fields |
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
printfn "%A" { new System.Object() with member x.ToString() = "F########" } |
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> | |
<style> | |
[fu] { | |
position:relative; | |
} | |
[fu]::before,[fu]::after { | |
visibility: hidden; |
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
/** | |
* @param {Function} kvpFn - The function used to create the mapping. Return either the value to be used as key and the entire item will be set as the value, or return a key/value pair in the format [key, value] to specify both explicitely. | |
* @returns {Map} | |
*/ | |
Array.prototype.toMap = function (kvpFn){ | |
const input = this.map(kvpFn); | |
if(!input.every(p => Array.isArray(p) && p.length === 2) { | |
throw new TypeError('kvpFn must return a two element array tuple'); | |
} | |
return new Map(input); |
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
/** | |
* This will be an instance member, Observable#publish. | |
* @memberof Map.prototype | |
* @param {Object} [target] - The object that the properties derived from the map's key/value pairs will be created on. | |
* @returns {Object} | |
*/ | |
Map.prototype.toObject = function(target = Object.create(null)) { | |
let props = [...this].map(kvp => { | |
let [key, value] = kvp; |
NewerOlder