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
//Y value is quadratic checker | |
//Checks if given y values are quadratic | |
//Y values | |
var numbers = [] | |
var arr2 = [] | |
var arr3 = [] | |
numbers.forEach((number, i) => { |
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
//run this in the console of guessthiscode.com | |
setInterval(() => { | |
var btnlist = document.getElementsByTagName("button"); | |
var thebtn; | |
for(var i = 0; i < btnlist.length; i++){ | |
if(btnlist[i].innerHTML == rightLanguage){ | |
thebtn = btnlist[i]; | |
break; | |
} |
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
//copy below code and paste in developer console | |
//known bugs | |
//you need to keep focus and unfocusing the text box for the words to register and move forwars | |
//it will glitch and slow down on commas, but it will move on eventually | |
//at the end, it will start doing character by character | |
//how to change speed: | |
//go to the last line where you see }, 500) | |
//make the lower for higher speed, make it higher for lower speed | |
function getWord() { |
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
Array.from(Array(26)).map((e, i) => i + 65).map((x) => String.fromCharCode(x)); |
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
# Node.js Gitignore | |
# Coder Gautam YT | |
<<<<<<< HEAD | |
node_modules/ | |
.env | |
# Compiled source # | |
################### | |
*.com | |
*.class |
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 viewport() | |
{ | |
var e = window | |
, a = 'inner'; | |
if ( !( 'innerWidth' in window ) ) | |
{ | |
a = 'client'; | |
e = document.documentElement || document.body; | |
} | |
return { width : e[ a+'Width' ] , height : e[ a+'Height' ] } |
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
const getRandomInt = (min, max) => min + Math.floor(Math.random() * (max - min + 1)); |
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
//note: degrees only | |
const lerp = (start,end,amt) => start+(end-start)*amt | |
const clamp = (num, min, max) => Math.min(Math.max(num, min), max); | |
const repeat = (t, m) => clamp(t - Math.floor(t / m) * m, 0, m); | |
function lerpTheta(a, b, t) { | |
const dt = repeat(b - a, 360); | |
return lerp(a, a + (dt > 180 ? dt - 360 : dt), t); | |
} |
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
/* | |
num = val | |
newNum = ? | |
convert(2, 10, 4) //20 | |
convert(5, 10, 50) //100 | |
*/ | |
const convert = (num, val, newNum) => (newNum * val) / num |
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
const clamp = (num, min, max) => Math.min(Math.max(num, min), max); |
OlderNewer