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/env perl6 | |
use v6; | |
sub MAIN() { | |
my $sum = 0; | |
while $_ = prompt("> ") { | |
my @strs = $_.split(','); | |
$sum += @strs.pop; | |
} | |
say 'sum ', $sum; |
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
Definition plus (n : nat)(m : nat) : nat := n + m. | |
Definition id (A : Type)(x : A) : A := x. | |
Definition prop0 : forall (A : Prop), A -> A := fun A x => x. | |
Definition prop1 : forall (A B C : Prop), (B -> C) -> (A -> B) -> (A -> C) := fun A B C f g x => f (g x). | |
Definition q0 : forall (A B : Prop), A -> (A -> B) -> B := fun A B f g => g (f). |
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
public static void main(String[] args) { | |
System.out.println("start"); | |
for (int i=13;i<100;i++) { | |
for (int j=12;j<i;j++) { | |
for (int k=11;k<j;k++) { | |
for (int l=10;l<k;l++) { | |
int[] n = new int[]{i+j, i+k, i+l, j+k, j+l, k+l, k-l, j-l, j-k, i-l, i-k, i-j}; | |
Arrays.sort(n); |
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
Definition prop0 : forall (A : Prop), A -> A. | |
Proof. | |
intros. | |
apply H. | |
Qed. | |
Goal forall (P Q : Prop), (forall P : Prop, (P -> Q) -> Q) -> ((P -> Q) -> P) -> P. | |
Proof. | |
intro. | |
intro. |
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
class TwoDimensionsPoint { | |
private double x; | |
private double y; | |
public void setX(double x) { | |
this.x = x; | |
} | |
public double getX() { | |
return this.x; | |
} |
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/env perl6 | |
my $max = 0; | |
for (1..1000) -> $x { | |
for (1..1000) -> $y { | |
$max = 0; | |
for (1..1000) { | |
my @a; | |
my $n = (($x-1)*1000+($y-1))*1000+$_; |
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
generate :: Int -> [[Int]] | |
generate 0 = [[]] | |
generate n = iter [1..n] [] where | |
iter [] ys = return (reverse ys) | |
iter xs ys = do | |
x <- xs | |
iter (filter (/=x) xs) (x:ys) | |
queens :: Int -> [[Int]] | |
queens n = filter test $ generate n |
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
<?xml version="1.0"?> | |
<root> | |
<list> | |
<item> | |
<name>AquaSKK</name> | |
<appdef> | |
<appname>Terminal</appname> | |
<equal>com.googlecode.iterm2</equal> | |
<equal>com.apple.Terminal</equal> | |
</appdef> |
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
use strict; | |
use warnings; | |
use t::Utils; | |
use Test::More; | |
use List::MoreUtils qw/natatime/; | |
use List::Compare; | |
use Math::Random::MT; | |
use Time::Seconds; | |
use Time::HiRes qw/gettimeofday tv_interval/; |
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
/* | |
GitHub の API の rate limit まで何回リクエスト可能回数が残っているかを取得 | |
*/ | |
const request = require('request') | |
const token = '' | |
const options = { | |
url: 'https://api.github.com/rate_limit', | |
json: true, |
OlderNewer