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
2 1 | |
3 2 | |
4 4 | |
5 6 | |
6 8 | |
7 14 | |
8 18 | |
9 27 | |
10 36 | |
11 52 |
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: requires minimist (npm i minimist) | |
'use strict'; | |
const {accessSync, mkdirSync, unlinkSync, readFileSync, writeFileSync, F_OK} = require('fs'), | |
name = 'hpm', | |
{join} = require('path'), | |
homeDir = require('os').homedir(), | |
dir = join(homeDir, '.' + name), | |
path = join(homeDir, '.hyper.js'), |
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
#!/usr/bin/python3 | |
import http.server | |
N=25001 | |
numbers = ["()" * i for i in range(N)] | |
def tryi(n, s): | |
if n < N and len(numbers[n]) > len(s): | |
numbers[n] = s |
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
Enter numeric array: [1,2,[],[3,4,5]] | |
Array | |
├1 | |
├2 | |
├Array | |
└Array | |
├3 | |
├4 | |
└5 |
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 encodeInput(encoding) { | |
var input = document.getElementById("input"); | |
return input ? "&input=" + encoding(input.value) : ""; | |
} |
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
a=[];i=1;handle=setInterval(_=>{$.get(`/search?q=xkcd.com&Room=240&page=${i++}&pagesize=100&sort=newest`,data=>data.match(/xkcd.com\/\d+/g).map(s=>a.push(+/\d+$/.exec(s)[0])));if(i===12){clearInterval(handle);b=[];for(j=1;j<1726;j++)if(!a.includes(j))b.push(j);}},3000) |
NewerOlder