This file contains hidden or 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
extern crate rand; | |
use rand::Rng; | |
const DATANO: usize = 20; | |
const POOLSIZE: usize = 30; | |
const LASTG: usize = 200; | |
const MRATE: f32 = 0.01; | |
const YES: i32 = 1; | |
const NO: i32 = 0; |
This file contains hidden or 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
#[macro_use] | |
extern crate text_io; | |
extern crate rand; | |
use rand::Rng; | |
const INPUTNO: usize = 2; | |
const HIDDENNO: usize = 2; | |
const ALPHA: f64 = 20.0; | |
const MAXINPUTNO: usize = 100; |
This file contains hidden or 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
/** | |
* Created by tamamu on 5/24/16. | |
*/ | |
object Test { | |
private def fib(n: Int): Int = { | |
def f(k: Int): Int = k match { | |
case 0 => 0 | |
case 1|2 => 1 | |
case _ => f(k - 2) + f(k - 1) |
This file contains hidden or 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::ops::Shl; | |
struct Rsout; | |
struct Endl; | |
impl<'a> Shl<&'a str> for Rsout { | |
type Output = Rsout; | |
fn shl(self, _rhs: &'a str) -> Rsout { | |
print!("{}", _rhs); |
This file contains hidden or 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
type Matrix = Vec<Vec<f64>>; | |
type Vecf = Vec<f64>; | |
fn outer(x: &Vecf, y: &Vecf) -> Matrix { | |
let xlen = x.len(); | |
let ylen = y.len(); | |
let mut z: Matrix = Vec::with_capacity(xlen); | |
for i in 0..xlen { | |
z.push(Vec::with_capacity(ylen)); | |
// let mut t: Vec<f64> = Vec::new(); |
This file contains hidden or 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 ddf.minim.*; | |
int TS = 12; | |
int fw = 80; | |
int fh = 80; | |
int cx = 0; | |
int cy = 0; |
This file contains hidden or 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 <unistd.h> | |
#include <sys/types.h> | |
/* align multiple of 4 bytes */ | |
#define align4(x) (((((x)-1)>>2)<<2)+4) | |
#define BLOCK_SIZE 12 | |
typedef struct s_block *t_block; |
This file contains hidden or 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
float[] data = new float[800]; | |
float bw = 0; | |
float bh = 0; | |
boolean flag = false; | |
void setup(){ | |
frameRate(60); | |
size(800, 600); | |
strokeWeight(0); | |
fill(255,255,255); |
This file contains hidden or 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 'asdf) | |
(require 'cffi) | |
(require 'cl-opengl) | |
(require 'cl-glu) | |
(require 'cl-glut) | |
(defvar +vs-source+ | |
"#version 130 | |
in vec3 in_Position; |
This file contains hidden or 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 'asdf) | |
(require 'cffi) | |
(require 'cl-opengl) | |
(require 'cl-glu) | |
(require 'cl-glut) | |
(defvar +vs-source+ "#version 130 | |
precision mediump float; |