Skip to content

Instantly share code, notes, and snippets.

@giuniu
giuniu / View.java
Created August 8, 2012 01:23 — forked from skRyo/View.java
教えてエライ人3
package com.example;
public class Control {
public static void main(String[] args) {
Model.Rectangle r1 = new Model.Rectangle(1, 2, 3, 4);
Model.Rectangle r2 = new Model.Rectangle(2, 3, 5, 5);
new Control().execute(r1, r2);
}
@giuniu
giuniu / gist:3208264
Created July 30, 2012 16:36 — forked from skRyo/gist:3196957
教えてエライ人2
interface Debugprintable {
enum ErrStatus {
NO_ERROR(0), FILE_ERROR(1), MEMORY_ERROR(2);
private final int statusCode;
private ErrStatus(int statusCode) {
this.statusCode = statusCode;
}
@Override
public String toString() {
return Integer.toString(statusCode);
@giuniu
giuniu / ExSeq.scala
Created February 28, 2012 03:26 — forked from gakuzzzz/ExSeq.scala
mapBetween関数 trait版
trait ExSeq[+A] {
self: Seq[A] =>
def mapBetween[B](f:(A,A)=>B): Iterator[B] = {
sliding(2).map(s=>f(s(0),s(1)))
}
}
object ExSeq {