Parameter: name
, name_de
, name_int
, name_en
Reihenfolge | Bedingung | Logik |
---|---|---|
1 | Nur name |
Transliteriere |
2 | name + name_en (kein de, int) |
Latin: name > sauberes name_en > name |
{ | |
"version": 8, | |
"name": "versatiles-colorful", | |
"metadata": { | |
"maputnik:renderer": "mbgljs", | |
"license": "https://creativecommons.org/publicdomain/zero/1.0/" | |
}, | |
"sources": { | |
"versatiles-shortbread": { | |
"tilejson": "3.0.0", |
const httpclient = require('ringo/httpclient'); | |
const files = require('ringo/utils/files'); | |
const fs = require('fs'); | |
const {command} = require('ringo/subprocess'); | |
const {toot} = require('mastodon-api'); | |
// wien | |
/* | |
const left=16.18; | |
const bottom=48.11; |
const reversedCopy = (array) => { | |
array = Array.from(array); | |
array.reverse(); | |
return array; | |
} | |
const multiply = (array) => array.reduce((prev, curr) => prev * curr); | |
const flatten = (arr) => { | |
return arr.reduce(function (flat, toFlatten) { |
// reduce function returning all directories bigger than 100K | |
const reduceToBiggerThan = (list, directory) => { | |
if (directory.size <= 100 * 1000) { | |
list.push(directory); | |
} | |
directory.children.reduce(reduceToBiggerThan, list); | |
return list; | |
} | |
// reduce to the smallest directory that is bigger than the neededSpace |
const findSignal = (count, inputString) => { | |
const inputChars = inputString.split('') | |
const markerStartIdx = inputChars.findIndex((_, idx) => { | |
const chars = inputChars.slice(idx, idx + count); | |
const set = new Set(chars); | |
if (set.size === count) { | |
return true; | |
} | |
}) | |
return markerStartIdx + count; |
const parse = (inputString) => { | |
const lines = inputString.split('\n'); | |
return lines.map(line => { | |
const parts = line.split(','); | |
const partsA = parts[0].split('-').map(i => parseInt(i)); | |
const partsB = parts[1].split('-').map(i => parseInt(i)); | |
return { | |
a: { | |
from: partsA[0], | |
to: partsA[1] |
const parse = (inputString) => { | |
const lines = inputString.split('\n'); | |
const crateLines = lines.slice(0,8); | |
const moveLines = lines.slice(10); | |
const crates = []; | |
crateLines.forEach(crateLine => { | |
let columnIdx = 0; | |
for (let i=1;i<crateLine.length-1;i+=4) { | |
let crateChar = crateLine.slice(i, i+1); | |
crates[columnIdx] = crates[columnIdx] || []; |
const sum = (array) => array.reduce((prev, curr) => prev + curr); | |
const intersect = (setA, setB) => new Set(Array.from(setA).filter(i => setB.has(i))); | |
const charsToSet = (chars) => new Set(chars.split('')); | |
// Array.flat | |
const flatten = (array, ret) => { | |
ret = ret || []; | |
return array.reduce((ret, entry) => { |
const ROCK = 0; | |
const PAPER = 1; | |
const SCISSORS = 2; | |
const LOOSE = 0; | |
const DRAW = 1; | |
const WIN = 2; | |
const sum = (array) => array.reduce((prev, curr) => prev + curr); |