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
use std::iter::{Iterator, iterate}; | |
use std::num::Int; | |
struct Fib<T, I> where T: Int, I: Iterator<Item=T> { | |
it : I | |
} | |
impl <T, I> Iterator for Fib<T, I> where | |
T: Int, | |
I: Iterator<Item=T>, |
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
use std::iter::Iterator; | |
use std::num::Int; | |
struct Doubler<'a, T, I> where T: Int, I: Iterator<Item=&'a T> { | |
it : I | |
} | |
impl <'a, T, I> Iterator for Doubler<'a, T, I> where | |
T: 'a + Int, | |
I: Iterator<Item=&'a T>, |
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 casper = require('casper').create(); | |
casper.start('http://nlftp.mlit.go.jp/cgi-bin/isj/dls/_choose_method.cgi', function() { | |
this.echo(this.getCurrentUrl()); | |
this.click('input[type="submit"][value=" 都道府県単位 "]'); | |
}); | |
casper.then(function () { | |
this.echo(this.getCurrentUrl()); | |
this.click('input[id="allac"]'); |
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
<!doctype html> | |
<html lang="ja"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Todo</title> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css"> | |
</head> | |
<body ng-app="App"> | |
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> | |
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/js/bootstrap.min.js"></script> |
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
# .byobu/.tmux.conf | |
set -g default-shell /usr/bin/fish | |
set -g default-command /usr/bin/fish |
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.math.BigInteger | |
import kotlin.math.plus | |
fun main(args: Array<String>) { | |
fibo().take(10).forEach { println(it.first) } | |
} | |
private fun fibo() = | |
stream(BigInteger.ZERO to BigInteger.ONE, {(e) -> | |
e.second to (e.first plus e.second) |
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.math.BigInteger | |
import kotlin.math.plus | |
fun main(args: Array<String>) { | |
fibo().take(10).forEach { println(it.cur) } | |
} | |
data class FiboEntry(val cur : BigInteger, val next : BigInteger) | |
private fun fibo() = | |
stream(FiboEntry(BigInteger.ZERO, BigInteger.ONE), {(e) -> |
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.math.BigInteger | |
import kotlin.math.plus | |
fun main(args: Array<String>) { | |
fibo().take(10).forEach { println(it.cur) } | |
} | |
data class FiboEntry(val cur : BigInteger, val next : BigInteger) | |
private fun fibo() : Stream<FiboEntry> { | |
return stream(FiboEntry(BigInteger.ZERO, BigInteger.ONE), {(e) -> |
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.math.BigInteger | |
import kotlin.math.plus | |
fun main(args: Array<String>) { | |
fibo().take(10).forEach { println(it) } | |
} | |
data class FiboEntry(val cur : BigInteger, val next : BigInteger) | |
private fun fibo() : FunctionStream<BigInteger> { | |
var tmp = FiboEntry(BigInteger.ZERO, BigInteger.ONE) |
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.math.BigInteger | |
import kotlin.math.plus | |
fun main(args: Array<String>) { | |
fibo().take(10).forEach { println(it) } | |
} | |
private fun fibo() : FunctionStream<BigInteger> { | |
var cur = BigInteger.ZERO | |
var next = BigInteger.ONE |