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
| <script> | |
| // tupper formula's k value, in binary | |
| var kbin = "0011001010100010000101010101111100001001001010000000000000000000000000000000100000000000000010100000000000001000100000000000000000000000111111111111111111000000000000000010000011110000000000000000100000000000001110000000000000000010000000000000111000000000000000000000000000000001100000000000000100100000000000001001000000000000001100000000000000000000000000000000110000000000000010010000000000000100100000000000001111110000000000000000000000000001111111000000011100000001110011000000000000011000000000000000001111111111111111010000000000000000101111101000000000000000010101100000110010100100000100011101000110001000000000000000011111111111111110000000000000000000000001100100000000000010100100000000000100101000000000001000100010000000000000000100000000000000000000000000000001111100000000000000000000000000000110010000000000000011100000000000000000000000000111111110000000001000000000000000010010100000000000000010000000000001001010000000000010000000000000000111 |
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 is a do-you-know-the-way sentence generator | |
| var words = [ | |
| ["do"], | |
| ["you", "u"], | |
| ["know", "no", "kno"], | |
| ["da", "de", "the"], | |
| ["way", "wey", "wei", "wae"]], | |
| combinations = [], | |
| combinationNb = words.reduce((acc, v) => acc * v.length, 1); |
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
| import sys | |
| import time | |
| import datetime | |
| from enum import Enum | |
| class TimerType(Enum): | |
| POMODORO = (30, ) | |
| PAUSE = (5, ) |
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
| // 177 | |
| c.width=1920;e=S(t)*200;a=b=>750+b*90+e;x.font="bold 80px Times" | |
| x.fillText("BLACK",750+e,380) | |
| x.fillText("FLAG",880+e,680) | |
| for(i=0;i<4;)x.fillRect(a(i++),i%2==0?385:400,80,220) | |
| // 174 | |
| c.width=1920 | |
| x.font="bold 80px Times" | |
| a=(u,v,w)=>x.fillText(u,v,w) |
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
| import java.io.BufferedWriter; | |
| import java.io.FileWriter; | |
| import java.io.IOException; | |
| public class BrainfuckCompiler { | |
| public static void main(String[] args) { | |
| StringBuilder sb = new StringBuilder(); | |
| sb.append("import java.util.Scanner;\n"); | |
| sb.append("public class BrainfuckProgram {\n"); |
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 ouis = ["oui", "ouip", "ouaip", "yup", "yep", "yes", "ouai", "oua", "ouain"]; | |
| function LinearOuiHashTable(size, prime) { | |
| this.content = []; | |
| this._prime = prime; | |
| for (var i = 0; i < size; i++) | |
| this.content.push([]); | |
| this.insert = (oui) => { |
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
| // Fizz if i % 3 == 0, Buzz if i % 5 == 0, FizzBuzz if both | |
| for(i=1;i++<=100;)i%3==0||i%5==0?console.log(i%3==0?'Fizz':''+i%5==0?'Buzz':''):0 // 82 | |
| for(i=1;i++<=100;)[i%3,i%5].some(x=>x==0)?console.log(i%3==0?'Fizz':''+i%5==0?'Buzz':''):0; // 91 | |
| for(i=1;i++<=100;)i%3==0||i%5==0?console.log(i%3==0?'Fizz':''+i%5==0?'Buzz':$):$ // 80 | |
| for(i=1;i++<=100;)[j,k]=[i%3==0,i%5==0],j||k?console.log(j?'Fizz':''+k?'Buzz':$):$ // 82 | |
| for(i=1;i++<=100;[j,k]=[i%3==0,i%5==0])j||k?console.log(j?'Fizz':''+k?'Buzz':''):0 // 82 | |
| for(i=1;i++<=100;[j,k]=[i%3==0,i%5==0])j||k?console.log(j?'Fizz':''+k?'Buzz':$):0 // 81 | |
| for(i=1;i++<101;[j,k]=[i%3==0,i%5==0])j||k?console.log(j?'Fizz':''+k?'Buzz':$):0 // 80 | |
| for(i=1;i++<101;)i%3==0||i%5==0?console.log(i%3==0?'Fizz':''+i%5==0?'Buzz':$):0 // 79 |
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
| let shuffle = function (playlist) { | |
| let shuffledPlaylist = [], | |
| song; | |
| while (playlist.length !== 0) { | |
| song = Math.floor(Math.random() * playlist.length); | |
| shuffledPlaylist.push(playlist[song]); | |
| playlist.splice(song, 1); | |
| } | |
| return shuffledPlaylist; |
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
| let selectionSort = (t) => { | |
| for (let i = 0; i < t.length; i++) { | |
| let min = i; | |
| for (let j = i + 1; j < t.length; j++) { | |
| if(t[j] < t[min]) | |
| min = j; | |
| } | |
| [t[min], t[i]] = [t[i], t[min]]; | |
| } |
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
| function Node (name) { | |
| this.name = name; | |
| this.children = []; | |
| } | |
| function Tree (node) { | |
| this.node = node; | |
| this.visit = function(fn) { | |
| return fn(this.node); |