Re-namespacing scala tutorial, tracking work on sbt guide
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
import java.util.{Date, Locale}
|
||||
import java.text.DateFormat
|
||||
import java.text.DateFormat._
|
||||
|
||||
object FrenchDate {
|
||||
def main(args: Array[String]) {
|
||||
val now = new Date
|
||||
val df = getDateInstance(LONG, Locale.FRANCE)
|
||||
println(df format now)
|
||||
}
|
||||
}
|
||||
|
||||
// vim: set ts=4 sw=4 et:
|
||||
@@ -0,0 +1,7 @@
|
||||
object HelloWorld {
|
||||
def main(args: Array[String]) {
|
||||
println("Hello, World!")
|
||||
}
|
||||
}
|
||||
|
||||
// vim: set ts=4 sw=4 et:
|
||||
@@ -0,0 +1 @@
|
||||
Working through http://www.scala-lang.org/docu/files/ScalaTutorial.pdf
|
||||
@@ -0,0 +1,15 @@
|
||||
object Timer {
|
||||
def oncePerSecond(callback: () => Unit) {
|
||||
while (true) { callback(); Thread sleep 1000 }
|
||||
}
|
||||
|
||||
def timeFlies() {
|
||||
println("time flies like an arrow...")
|
||||
}
|
||||
|
||||
def main(args: Array[String]) {
|
||||
oncePerSecond(timeFlies)
|
||||
}
|
||||
}
|
||||
|
||||
// vim: set ts=4 sw=4 et:
|
||||
@@ -0,0 +1 @@
|
||||
/bin/
|
||||
Executable
+10
@@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
mkdir -p ./bin
|
||||
pushd ./bin
|
||||
curl -O 'https://raw.github.com/paulp/sbt-extras/master/sbt'
|
||||
chmod +x sbt
|
||||
popd
|
||||
./bin/sbt -sbt-create about
|
||||
Reference in New Issue
Block a user