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 std; | |
fn main() { | |
int::range(0, 10) {|i| | |
task::spawn {|| | |
std::io::println(#fmt("child: %d", i)); | |
}; | |
std::io::println(#fmt("spawned: %d", i)); | |
} | |
} |
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 std; | |
fn p(i: int) { std::io::println(#fmt("%d", i)) } | |
impl times for int { | |
fn times(f: fn(i: int)) { int::range(0, self, f) } | |
} | |
fn main() { | |
10.times {|i| p(i) } | |
} |
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 std; | |
import std::io::println; | |
fn main() { | |
// shared box | |
let i = @mutable 10; | |
println(int::str(*i)); // => 10 | |
let j = i; | |
*j = 20; | |
println(int::str(*i)); // => 20 | |
// unique box |
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/bash | |
VOICE_PATH=$HOME/works/MMDAgent_Example-1.1/Voice | |
if [ "x$VOICE" = "x" ] || ! [ -d "$VOICE" ] ; then | |
#VOICE=$HOME/works/hts_voice_nitech_jp_atr503_m001-1.04 | |
VOICE="$VOICE_PATH"/mei_normal | |
fi | |
VOICES=( \ | |
"$VOICE_PATH"/mei_normal \ | |
"$VOICE_PATH"/mei_angry \ | |
"$VOICE_PATH"/mei_bashful \ |
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
にっこり ☺ 顔文字 | |
さんた 🎅 顔文字 | |
いるか 🐬 顔文字 | |
ねずみ 🐭 顔文字 | |
うし 🐮 顔文字 | |
とら 🐯 顔文字 | |
うさぎ 🐰 顔文字 | |
ねこ 🐱 顔文字 | |
たつ 🐲 顔文字 | |
りゅう 🐲 顔文字 |
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 seripara (clk, si, res, ena, q); | |
input si, res, ena, clk; | |
output [3:0] q; | |
reg [3:0] q; | |
reg [1:0] state; | |
always@(negedge res or posedge clk) | |
begin |
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 <yago.hxx> | |
int main() | |
{ | |
constexpr float sample_rate = 44100.0f; | |
constexpr double delta_t = 1.0 / sample_rate; | |
constexpr std::size_t buffer_size = 1024; | |
float buffer[buffer_size]; | |
yago::Oscillator<decltype(buffer)> osc(440); |
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
// -*- coding: utf-8 -*- | |
// 参考: 床井研究室 - (4) シェーダの追加 | |
// http://marina.sys.wakayama-u.ac.jp/~tokoi/?date=20120909 | |
package main | |
import ( | |
gl "github.com/chsc/gogl/gl33" | |
"github.com/jteeuwen/glfw" | |
"log" | |
"unsafe" |
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 main | |
import ( | |
"flag" | |
"github.com/mandel59/gofont/otf" | |
"os" | |
) | |
var in *string = flag.String("in", "", "input file name") |
OlderNewer