Skip to content

Instantly share code, notes, and snippets.

View Main.java
// plain old Java
import rx.Observable;
import rx.util.functions.Action1;
public class Main {
public static void main(String[] args) {
String[] names = new String[] {
"foo", "bar", "baz"
};
@jmhofer
jmhofer / Main.scala
Created Oct 25, 2012
Union Bug in Slick
View Main.scala
import scala.slick.driver.ExtendedProfile
import scala.slick.driver.H2Driver.simple._
import Database.threadLocalSession
abstract class Drinks(tableName: String) extends Table[(Long, Long)](tableName) {
def pk = column[Long]("pk")
def pkCup = column[Long]("pkCup")
def * = pk ~ pkCup
}
@jmhofer
jmhofer / SharpyTheFirst_1.fs
Created Aug 4, 2012
Robocode with F#: Very First Steps
View SharpyTheFirst_1.fs
#light
namespace johofer
open Robocode
type SharpyTheFirst() =
inherit Robot()
@jmhofer
jmhofer / build.sbt
Created Apr 6, 2012
sbt build file with sample jacoco4sbt configuration
View build.sbt
import de.johoop.jacoco4sbt._
import JacocoPlugin._
organization := "my.organization"
name := "my-project"
scalaVersion := "2.9.1"
seq(jacoco.settings : _*)
View Build.scala
// copy all jars from Scalatron's distribution (bin directory) into lib/
lazy val botDirectory = settingKey[File]("bot-directory")
lazy val play = taskKey[Int]("Plays a game of Scalatron, returns the exit code upon completion.")
lazy val Versions = new {
lazy val Specs2 = "3.8.6"
}
lazy val root = (project in file(".")).settings(
You can’t perform that action at this time.