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
module Main where | |
type People = Int -- 人間 | |
type Grave = (Int, Int) -- 墓穴 | |
呪う :: (People, People, Grave) -> (People, People, Grave) | |
呪う (0, 0, n) = (0, 0, n) -- 人間がいない | |
呪う (0, 1, (i, j)) = (0, 0, (i + 1, j + 1)) -- 死んでいくのみ |
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
@namespace url(http://www.w3.org/1999/xhtml); | |
@-moz-document domain("vimperator.kurinton.net") { | |
* { | |
margin: 0 !important; | |
padding: 0 !important; | |
} | |
h1 { |
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
// Checkers | |
// bult with Processing | |
// Jan 27 2009 | |
// by VoQn | |
color[] colors = new color[ 4]; | |
Checker checker; | |
void setup(){ | |
size(400,800); |
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 Calculator { | |
/** | |
* | |
* @param numbers | |
* @return A Object has value calculated by simple sum function from arguments.<br> | |
* If arguments is null, return null; | |
*/ | |
public static Number sum(Number... numbers) { | |
double value = 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
// -*- mode: java; coding: utf-8; -*- | |
public class RangeArray { | |
public static int[] range(int n) { | |
return range(0, n, 1); | |
} | |
public static int[] range(int k, int n) { | |
return range(k, n, 1); |
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
package jp.ne.voqn.labs; | |
import java.util.Iterator; | |
/** | |
* <div> | |
* <p> | |
* like function of Python "range()".<br/> | |
* <code>>>> range(10)</code> <br/> | |
* returns <code>[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]</code> <br/> |
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
#! /opt/local/bin/gosh -i | |
;; -*- mode: scheme; coding: utf-8 -*- | |
;;; SICP ex2.45 | |
;;; define "split" procedure | |
(define right-split (split beside below)) | |
(define up-split (split below beside)) | |
(define (split first-modify second-modify) | |
(lambda (painter) |
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
""" | |
FizzBuzz Program Visualization | |
Author by VoQn mail: voqn.tyrantist(AT)gmail.com | |
Inspirated by "Don't Overthink FizzBuzz" | |
http://weblog.raganwald.com/2007/01/dont-overthink-fizzbuzz.html | |
>>> fizzbuzz(1) | |
1 | |
>>> fizzbuzz(3) |
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
;; -*- mode: emacs-lisp; coding: utf-8 -*- | |
;; set applescript to open and run Spde sketch | |
(defvar apple-script-file | |
"~/.emacs.d/etc/openAndRunSketch.applescript") | |
;; set application name of Spde | |
(defvar application-name "Spde") | |
;; run applescript |
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
(* | |
Open & Run Generative Programming IDE | |
Author: VoQn | |
Usase: | |
ex Processing | |
$osascript openAndRunSketch.applescript Processing ~/Documents/Processing/sketch/sketch.pde | |
ex NodeBox | |
$osascript openAndRunSketch.applescript NodeBox ~/Documents/NodeBox/sketch.py |
OlderNewer