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
/* This Source Code Form is subject to the terms of the Mozilla Public | |
* License, v. 2.0. If a copy of the MPL was not distributed with this | |
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ | |
// Originally Copy pasted from https://github.com/firefox-devtools/profiler | |
// And adapted in TypeScript | |
/** | |
* jsdom leaves the history in place after every test, so the history will |
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
interface User { | |
firstName:string; | |
lastName:string; | |
age:number; | |
} | |
const user1= {firstName:"Georges",lastName:"Abitbol", age:43} | |
const user2 = { firstName: "Joel", lastName: "Hammond", age: 25 } | |
const arr: Array<User> = [user1, user2] |
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
/* | |
pour lancer : | |
node geoJsonMinifier.js <cheminDuFichierGeoJson> > <cheminDuFichierDeSorti> | |
*/ | |
var fs = require('fs'); | |
var _ = require('lodash'); | |
var geoJsonPath = process.argv[2]; |
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
Math.tanh = Math.tanh || function(x) { | |
if(x === Infinity) { | |
return 1; | |
} else if(x === -Infinity) { | |
return -1; | |
} else { | |
return (Math.exp(x) - Math.exp(-x)) / (Math.exp(x) + Math.exp(-x)); | |
} | |
}; |