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
; リプ爆用関数 | |
(defn little-region | |
"槍を持つたくさんの人形達が,標的に向かって突進して行く | |
(複数のアカウントから特定のツイート・ユーザーに対して | |
同じリプライを送る) | |
例1:(little-region @twitters 'marisa' 'hello') | |
全てのアカウントから@marisaに向けてhelloと呟く | |
例2:(little-region (-> @twitters (dissoc :syanhai1)) |
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> | |
#include<stdlib.h> | |
typedef struct cell { | |
int car; | |
struct cell *cdr; | |
} _cell; | |
struct cell *cons(int car, struct cell *cdr) { |
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 QUEUESIZE 3000 | |
struct Queue { | |
int buffer[QUEUESIZE]; | |
int length; | |
}; | |
int enqueue(struct Queue *queue, int data) { |
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 STACKSIZE 3000 | |
struct Stack { | |
int buffer[STACKSIZE]; | |
int length; | |
}; | |
int push(struct Stack *stack, int data) { |
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
enchant(); | |
/* global vars */ | |
const WIDTH = 320; | |
const HEIGHT = 480; | |
/* initial function */ | |
window.onload = function () { | |
var game = new Game(WIDTH, HEIGHT); |
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
(do | |
(import '(javafx.scene.media AudioClip)) | |
(let [yo (AudioClip. "http://archbox.dip.jp/res/Yo.mp3")] | |
(reify Plugin | |
(get-name [this] "Yo") | |
(on-status [this status] | |
(if (re-find #"yo|Yo|YO" (. status getText)) | |
(. yo play))) | |
(on-reply [this status] nil) |
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
n=1; | |
a=["", ""]; | |
$_.chomp.chars{|c|n.abs==1&&(n*=c.to_i+1)||(s=n<=>0)&&a[1<=>s]<<c&&(n-=s)&&n!=s||(n*=-1)&&n>0&&(p(a[1].to_f/a[0].to_f);a=["",""])} |
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
(defn update-name | |
[status] | |
(let [n (.indexOf @tweets status) | |
new-name (-> (re-seq #"(.*)\(@If_I_were_boxp\)" (. status getText)) | |
first | |
second)] | |
(if new-name | |
(do | |
(update-profile :tw twitter :new-name new-name) | |
(reply n (str new-name "に改名しました")))) |
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
(reify Plugin | |
(get-name [this] "hello") | |
(on-status [this status] | |
(if (= (.. status getUser getScreenName) "delihiros") | |
(println "hello, hello!"))) | |
(on-rt [this status]) | |
(on-unrt [this status]) | |
(on-fav [this source target status]) | |
(on-unfav [this source target status]) | |
(on-del [this status]) |
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
object fibonacci { | |
def main(args: Array[String]) { | |
var fibonacci = List(1,1) | |
while(fibonacci.length < args(0).toInt) { | |
fibonacci = fibonacci :+ fibonacci.takeRight(2).sum | |
} | |
println(fibonacci.apply(args(0).toInt - 1)) |
OlderNewer