I hereby claim:
- I am conundrumer on github.
- I am delu (https://keybase.io/delu) on keybase.
- I have a public key whose fingerprint is 48AA B300 E48D 75A1 49AE 5805 00B6 5AB6 8C2E CFC2
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
// i suppose i should put this somewhere before accidentally losing it | |
// need to update lr-core to have file import/export so this can work depending only on that and lodash and yargs | |
'use strict' | |
let path = require('path') | |
let fs = require('fs') | |
let _ = require('lodash') | |
let argv = require('yargs') | |
.usage('usage: node combiner.js output.track.json') | |
.option(0, { |
[ | |
{ | |
"title": "Magaz Stinged", | |
"artist": "Funckarma", | |
"station": "Klik Me Radio" | |
}, | |
{ | |
"title": "Rare & Pelentiful", | |
"artist": "Tipper", | |
"station": "Klik Me Radio" |
fn fib(n: u64) -> u64 { | |
match n { | |
0 => 1, | |
1 => 1, | |
_ => fib(n - 1) + fib(n - 2) | |
} | |
} | |
fn fib_fast(n: u64) -> u64 { | |
let mut seen = vec![None; 1 + n as usize]; |
#![feature(conservative_impl_trait)] | |
// without impl trait or box | |
use std::iter::{ FlatMap, Map, Enumerate, Iterator }; | |
use std::str::Chars; | |
type GetIterFnType = Fn((usize, char)) -> Option<char>; | |
type IdentityType = Fn(Option<char>) -> Option<char>; | |
type GetIterType<'a> = FlatMap<Map<Enumerate<Chars<'a>>, &'static GetIterFnType>, Option<char>, &'static IdentityType>; | |
const GET_ITER_FN: &'static GetIterFnType = &|(i, x)| if i % 2 == 0 { Some(x) } else { None }; |
import track from 'lr/track' | |
import ui from 'lr/ui' | |
import tools from 'lr/tools' | |
import React from 'react' | |
module.info = { | |
name: 'Fill Tool', | |
version: '0.1.0', | |
author: 'David Lu' | |
} |
let decompress = require('lz-string').decompressFromBase64 | |
const linesArrayAttr = ['type', 'id', 'x1', 'y1', 'x2', 'y2', 'extended', 'flipped', 'leftLine', 'rightLine'] | |
function validateJson ({version, startPosition, lines}) { | |
if (!(version === '6.2' || version === '6.1')) { | |
throw new Error(`This track does not have a valid version: ${version}`) | |
} | |
if (!( | |
startPosition instanceof Object && |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<style type="text/css"> | |
html, body { | |
width: 100%; | |
height: 100%; | |
} | |
</style> |
/* | |
* float.js | |
* fromHex: takes a 64-bit number encoded as a hex string (eg 34F5CA0157FF00FF) | |
* and returns a float whose binary representation is this number | |
* toHex: takes a number and returns the binary encoding as a hex string | |
*/ | |
/*eslint-env node */ | |
'use strict'; |