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 isFactorial(number) { | |
let total = counter = 1 | |
while (total < number) | |
total *= counter++ | |
return total === number | |
} |
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 shuffle (array) { | |
let remaining = array.length | |
// While there remain elements to shuffle. | |
while (remaining) { | |
// Pick a remaining index. | |
let index = Math.floor(Math.random() * remaining--) | |
// And swap it with the current element. | |
let item = array[remaining] |
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 (win, doc, s, js, fjs, inc, ga) | |
{ | |
'use strict'; | |
fjs = doc.getElementsByTagName(s)[0]; | |
inc = function (src) | |
{ | |
js = doc.createElement(s); | |
js.src = src; |
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
$elementsCount: 12; | |
$angle: 360deg / $elementsCount; | |
@for $i from 0 through $elementsCount - 1 { | |
.rotation-#{$i} { | |
transform: rotate($i * $angle + 90deg); | |
} | |
} |
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.prototype.forEach.call(document.querySelectorAll('td:last-child>input[type="radio"]'), function (input) { | |
input.setAttribute('checked'); | |
}); |