参考 How to show math equations in general github's markdown(not github's blog)
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
{ | |
ArrayList.qn | |
tcpp が 2013年10月28日 に作成. | |
} | |
interface IFormatter`T | |
func Format(v:T): string | |
end interface | |
class ArrayList`T |
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
func AddTwo(a: int): func<(int): int> | |
class C | |
var a: int | |
func Eval(b: int): int | |
return a + b | |
end func | |
end class | |
var c:: #C | |
c.a :: a | |
return c.Eval |
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
func Times(n: int, f: func<(int)>) | |
for i(1, n) | |
f(i) | |
end for | |
end func | |
func Sum(f: func<(int):int>, n: int): int | |
var v:: 0 | |
Times(n, func(i: int) |
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
{ } | |
{ 不動点コンビネータだよ〜 } | |
{ https://ja.wikipedia.org/wiki/不動点コンビネータ } | |
{ } | |
func Times(n: int, f: func<(int)>) | |
for i(1, n) | |
f(i) | |
end for | |
end func |
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
#include <stdio.h> | |
#define DIGIT(a) ((a)=='1'?1:0) | |
void rec(){ | |
int c = getchar(); | |
int c2 = getchar(), c3 = getchar(), c4 = getchar(); | |
if(c < 0) return; | |
rec(); | |
putchar("0123456789abcdef"[((DIGIT(c4)*2+DIGIT(c3))*2+DIGIT(c2))*2+DIGIT(c)]); | |
} | |
void main(){ |
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
# | |
# x86_64 赤黒木 (System V 呼び出し規約) | |
# (C) 2013 @YVT, all rights reserved. | |
# | |
.global _RedBlack_AllocNode | |
# .global _RedBlack_FreeNode | |
# struct TreeDescriptor { |
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
#!/bin/sh | |
# 出力ファイル | |
OUT=/tmp/ping-test-out.csv | |
# ホスト名 (適宜変えてね) | |
HOST=www.google.com | |
echo "ping-test to ${HOST}" > "$OUT" |
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
#include <stdio.h> | |
//http://stackoverflow.com/questions/281725/template-specialization-based-on-inherit-class | |
template<typename D, typename B> | |
class IsDerivedFrom | |
{ | |
class No { }; | |
class Yes { No no[3]; }; | |
static Yes Test( B* ); // not defined |
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
#include <cstdio> | |
#include <vector> | |
#include <iostream> | |
#include <array> | |
#include <cstdlib> | |
#include <cstdint> | |
#include <memory> | |
#include <valarray> | |
#include <cassert> |
OlderNewer