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
object Person { | |
def apply(firstName: String, lastName: String, age:int): Person = new Person(firstName, lastName, age) | |
def apply(name: String, age:int): Person = { | |
val parts = name.split(" ").toList | |
new Person(parts(0), parts.tail.mkString(" "), age) | |
} | |
} | |
class Person(var firstName: String, var lastName: String, var age: int) { | |
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
public class Fagtest { | |
String fagkode; | |
int uketimer; | |
int aarstimer; | |
String eksamensform; | |
String faglaerer; | |
String elever[]; | |
public static void main (String [] args) { |
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
import java.util.ArrayList; | |
import java.io.*; | |
public class Fagtest { | |
String fagkode; | |
int uketimer; | |
int aarstimer; | |
String eksamensform; | |
String faglaerer; |
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
import java.util.Calendar | |
import scala.io._ | |
import scala.collection.mutable.HashMap | |
abstract case class OrderLine(name: String, _price:Int, weight: Int){ | |
var ammount = 1 | |
def ++ { | |
ammount += 1 | |
} | |
def price = _price |
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
import _root_.java.net.{URLConnection, URL} | |
import scala.xml._ | |
class PlanetScala { | |
def feed():Elem = { | |
val url = new URL("http://www.drmaciver.com/planetscala/atom.xml") | |
val conn = url.openConnection | |
val atom = XML.load(conn.getInputStream) |
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
~/dev/scala/auctionNet> mvn jetty:run | |
[INFO] Scanning for projects... | |
[INFO] Searching repository for plugin with prefix: 'jetty'. | |
[INFO] org.apache.maven.plugins: checking for updates from scala-tools.org | |
[INFO] org.codehaus.mojo: checking for updates from scala-tools.org | |
[INFO] artifact org.scala-tools:maven-scala-plugin: checking for updates from scala-tools.org | |
[INFO] artifact org.mortbay.jetty:maven-jetty-plugin: checking for updates from scala-tools.org | |
[INFO] artifact net.sf.alchim:yuicompressor-maven-plugin: checking for updates from scala-tools.org | |
[INFO] artifact org.apache.maven.plugins:maven-eclipse-plugin: checking for updates from scala-tools.org | |
[INFO] ------------------------------------------------------------------------ |
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
ssh-dss | |
AAAAB3NzaC1kc3MAAACBAOAcr60BAr9VoCjGqAdhpaxgVCkdjiy8Z2j+48lIJCe8YwSsxYEJV03w9t0xye2zUDW+FVYz5i1Rr+YXZ5crMWaBdXJ53S0xYG++vGz80XnnpyrHUnp5IhEqU7wgtRJuyMXkkQWxVVzZKrQVOX9C/JW7RDPdoOtxABn2nfu3ThgpAAAAFQD1Pk88f5HEOBy6w/Dp5Wc1iFsQnwAAAIAjoVL58ceyBR2guwXZDH62hWnINbvlXJ8oF0QCF1bLxT0gyzyH782QZ2PsSerL9MIH5Piq2Azudjhq3AZODvCzetmNTsDrEEYBQgRQP7PcWU3cFhU5OqvG5wKfJMjf5+SyrL6dfqvocUx0a7jbHiZdJV9u7rpwI0YRgZLXguu5SQAAAIAOvKuSoGXv7CyAdt+A+Isgi0BvB6c85RdbMdGKhgR3mXh2FONgbccjij1wNb6RT4JTxwiSatiMiVVIzIJftRCJko9+BTXRdLwySvIAfqR06eXplg7moSolA1Ev8x5lkWrSwKYxlT6yMdQThVliSwdGaQ6e7quGeYA9XPY9MXYuZg== | |
bjartek@pumba.gomobile.no |
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
<html> | |
<body> | |
<a href="rat">rat</a> | |
<a href="donkey">doneky</a> | |
<script type="text/javascript"> | |
var anchors = document.getElementsByTagName("a"); |
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
Set() ++ ( for{ | |
header <- headers firstHeader "Allow" | |
key <- header.direction.keySet | |
} yield { | |
Set(key, Method.valueOf(key)) | |
}) |
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
Set() ++ ( for{ | |
header <- headers firstHeader "Allow" | |
key <- header.direction.keySet | |
value <- Method.valueOf(key) | |
} yield { | |
Set(value) | |
}) |
OlderNewer