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
function padmeHearts(num){ | |
let char = "" | |
for(let i=0; i < num; i++){ | |
char += "♥"; | |
console.log(char) | |
} | |
} |
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
(()=>{ | |
console.log("start"); | |
secondFunction().then(function(secondNumber){ | |
console.log("result first promise "+secondNumber); | |
}); | |
myFunction((newNumber)=>{ | |
var lNumber = 20 + newNumber; | |
console.log(lNumber); | |
}); | |
console.log("end"); |
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
package main | |
import ( | |
"bufio" | |
"fmt" | |
"os" | |
"strconv" | |
"strings" | |
) |
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
function detectBrowser(userAgent){ | |
var chrome = /.*(Chrome\/).*(Safari\/).*/g; | |
var firefox = /.*(Firefox\/).*/g; | |
var safari = /.*(Version\/).*(Safari\/).*/g; | |
var opera = /.*(Chrome\/).*(Safari\/).*(OPR\/).*/g; | |
var edge = /.*(Chrome\/).*(Safari\/).*(Edge\/).*/g; | |
var ie = /.*(Trident\/7).*(rv:).*/g; | |
if(opera.exec(userAgent)) | |
return "Opera"; |
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
function(){ | |
a; | |
b(); | |
var a = ()=>{ | |
console.log("Print #1"); | |
} | |
function b(){ | |
console.log("Print #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
function Product() { | |
this.type = ""; | |
this.color = ""; | |
this.getInfo = function() { | |
return this.color + ' ' + this.type; | |
}; | |
} | |
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- - | |
function Product() { | |
this.type = ""; |
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
function fibonacci (mValue){ | |
if(mValue <2) | |
return 1; | |
else{ | |
return fibonacci(mValue-2) + fibonacci(mValue -1); | |
} | |
} | |
var cache = []; | |
function fibonacciCache (mValue){ |
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
/* | |
Copyright Spotify AB 2012-2014. All rights reserved. | |
History.getInternetExplorerMajorVersion() | |
Get's the major version of Internet Explorer | |
@return {integer} | |
@license Public Domain | |
@author Benjamin Arthur Lupton <contact@balupton.com> | |
@author James Padolsey <https://gist.github.com/527683> |
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
Class Card { | |
constructor(simbol, value) { | |
this.simbol = simbol; | |
this.value = value; | |
} | |
get kind () { | |
//wtf? | |
return simbol.kind; | |
} |
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 csv, glob, os, sys | |
SAMPLES = 100 #100 samples = 1 second | |
DIRECTORY = raw_input("Enter the path of your files: ") | |
RANGE_DIRECTORY = DIRECTORY+'ranges/' | |
TALKER_HEADER = 'person' | |
PITCH_HEADER = 'F0_Hz' | |
RANGE_HEADER = 'range' | |
def calculateRange(window): |