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
#lang racket/base | |
(require racket/format) | |
(require racket/list) | |
; grid.rkt | |
(define x-split 4) | |
(define y-split 4) | |
(define margin 50) |
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
#lang racket/base | |
(require racket/format) | |
(require racket/list) | |
(require racket/vector) | |
; | |
; command line helpers | |
; |
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
/* | |
* 円周率を正確に求めるプログラム | |
* | |
* - 半径が10^nの円の第一象限を縦横に10^n分割してその面積の下限と上限を求めます | |
*/ | |
#include <cstdint> | |
#include <cmath> | |
#include <iostream> |
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> | |
int main() { | |
char *s; | |
for (s = "新しい日本を見つけよう\n"; *s != '\0'; ++s) putchar(*s); | |
goto travel; | |
printf("--- STAY HOME ---\n"); | |
travel: | |
printf("*** Go To トラベル ***\n"); | |
return 0; |
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 <iostream> | |
#include <vector> | |
template<class T> class vector; | |
template<class T> std::ostream& operator<<(std::ostream&, const vector<T>&); | |
template<class T> class vector : virtual public std::vector<T> { | |
public: | |
friend std::ostream& operator<< <T> (std::ostream &out, const vector<T> &v); | |
}; |
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 <iostream> | |
class Printable; | |
class Expression; | |
class Integer; | |
class Addition; | |
class Multiplication; | |
class Printable | |
{ |
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
-- 2次方程式の解を求めるプログラム | |
import Control.Monad | |
data Equation = | |
Equation { a :: Double, b :: Double, c :: Double } deriving Show | |
data Solution = ZeroSols | OneSol Double | TwoSols Double Double deriving Show | |
discriminant :: Equation -> Double | |
discriminant Equation { a = a, b = b, c = c } = b * b - 4.0 * a * c |
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
#lang racket | |
(define *blood* | |
'(abraham issac jacob judah perez hezron ram ammin\'adab | |
nahshon salmon bo\'az obed jesse david-the-king | |
solomon rehobo\'am abi\'jah asa jehosh\'aphat | |
joram uzzi\'ah jotham ahaz hezeki\'ah manas\'seh | |
amos josi\'ah jechoni\'ah she-al\'ti-el | |
zerub\'babel abi\'ud eli\'akim azor zadok achim | |
eli\'ud elea\'zar matthan jacob joseph jesus)) |
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
#lang racket | |
; | |
; original code -> | |
; http://www.shido.info/lisp/scheme_cc.html | |
; | |
(require data/queue) | |
; coroutine | |
(define process-queue (make-queue)) |
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 "draw.h" | |
// DirectX 11 is preinstalled on Windows 7 or later. | |
#pragma comment(lib, "d3d11.lib") | |
#pragma comment(lib, "dxgi.lib") | |
#include <d3d11.h> | |
#include "png_decoder.h" | |
#include "jpg_decoder.h" |
NewerOlder