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
import flash.external.ExternalInterface; | |
import flash.text.TextField; | |
class External { | |
static var tf : TextField; | |
static var count = 0; | |
static function main() { | |
tf = new TextField(); | |
tf.text = Std.string(count); | |
flash.Lib.current.addChild(tf); | |
ExternalInterface.addCallback("increment", increment); |
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
import flash.media.Sound; | |
import flash.media.SoundChannel; | |
import flash.media.SoundTransform; | |
import flash.net.URLRequest; | |
import flash.text.TextField; | |
class SoundPlayer { | |
static function main() { | |
var text = "Hello"; | |
var url = "http://translate.google.com/translate_tts?tl=en&q=" + StringTools.urlEncode(text); | |
var snd = new Sound(new URLRequest(url)); |
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
import flash.media.Sound; | |
import flash.media.SoundChannel; | |
import flash.media.SoundTransform; | |
import flash.net.URLRequest; | |
import flash.text.TextField; | |
import flash.events.Event; | |
import flash.events.MouseEvent; | |
class Speak { | |
static var channel : SoundChannel; | |
static var status : Bool = false; //再生中はtrue。再生が終わるとfalseになる。 |
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 print(str) main(){printf(str);} | |
print("hello\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
#include <stdio.h> | |
struct Hoge { | |
int num; | |
}; | |
struct Aaaaa { | |
struct Hoge hoge; | |
int 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
(use srfi-1) | |
(use util.match) | |
(define (split-patterns l) | |
(let* ((rest (car l)) (pats (cadr l)) (pos (list-index (pa$ eq? '->) rest))) | |
(if (not (eq? pos #f)) | |
(split-patterns (cons (drop rest (+ pos 2)) | |
(list (append pats (list (take rest (+ pos 2))))))) | |
pats))) |
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
<html> | |
<head> | |
<title>認証ページ</title> | |
<style> | |
input { | |
top: 10px; left: 10px; position: absolute; | |
width: 50px; height: 30px; | |
} | |
</style> | |
</head> |
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
require 'pstore' | |
db = PStore.new("#{ENV['HOME']}/.mikutter/p_class_values.db") | |
db.transaction do | |
db.delete("Plugin::GUI::size") | |
end |
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
require 'curses' | |
$mode = ARGV[0] == "-s" | |
class Orz | |
def initialize(x, y) | |
@x = x | |
@y = y | |
end | |
attr_accessor :x, :y | |
end |
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
require 'curses' | |
to_o_pos = [[3, 2], [4, 2], [5, 2], [2, 3], [6, 3], [2, 4], [6, 4], [2, 5], [6, 5], [3, 6], [4, 6], [5, 6]] | |
to_r_pos = [[9, 2], [12, 2], [13, 2], [9, 3], [11, 3], [9, 4], [10, 4], [9, 5], [9, 6]] | |
to_z_pos = [[16, 2], [17, 2], [18, 2], [19, 2], [20, 2], [19, 3], [18, 4], [17, 5], [16, 6], [17, 6], [18, 6], [19, 6], [20, 6]] | |
def make_rand_pos_arr(count) | |
arr = [] | |
count.times { | |
arr << [rand(21), rand(9)] |
OlderNewer