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 cbfx2 { | |
trait X[K, L] | |
trait A[T] { | |
def foo[L](i: L)(implicit a: X[T, L]) = null | |
} | |
class B[T] extends A[T] | |
object B { |
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
package ... | |
import _root_.net.liftweb.mapper._ | |
import _root_.net.liftweb.util._ | |
import _root_.net.liftweb.common._ | |
import _root_.net.liftweb.http._ | |
import _root_.scala.xml.{NodeSeq, Text, Node} | |
import S._ | |
import _root_.java.text.{DateFormat, SimpleDateFormat} |
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
class Dupa(val a: Int, val b: Int) { | |
override def toString = "Dupa" + a + ": " + b | |
} | |
case object Dupa { | |
def apply(a: Int, b: Int) = new Dupa(a, b) | |
def unapply(s: String) = s.split(":") match { | |
case Array(a, b) => Some(Dupa(a.toInt, b.toInt)) |
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 fibx { | |
def main(args: Array[String]) { | |
def fs: Stream[Int] = { | |
println("fs") | |
0 #:: 1 #:: fs.zip(fs.tail).map{case (a,b) => println("a: " + a + " b: " + b);a + b} | |
} | |
var f = fs | |
1 to 10 foreach { e => | |
f = f drop 1 |
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 aop { | |
trait A { | |
def foo | |
} | |
class B extends A { | |
def foo = println("foo") | |
} | |
trait Around extends 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
import _root_.net.liftweb.mapper._ | |
import _root_.net.liftweb.http._ | |
import _root_.net.liftweb.common.{Full, Box} | |
import _root_.scala.xml.{NodeSeq, Elem} | |
trait ErrorMessageSupport extends BaseMappedField { | |
self: MappedField[_,_] => | |
abstract override def _toForm:Box[Elem] = toForm(super._toForm.open_!) |
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 ord { | |
abstract trait Converter[Dupa, T] { | |
def apply(a: String): T | |
} | |
class Dupa(s: String) { | |
def or[T](a: T)(implicit conv: Converter[Dupa, T]): T = conv(s) | |
} | |
object Dupa { |
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
class Upload extends LongKeyedMapper[Upload] with IdPK { | |
override def getSingleton = Upload | |
object fileName extends CustomMappedString(this, 256) with ValRequired with ResourceDisplay { | |
override def size = 80 | |
override def asHtml = <div>{image} {link}</div> | |
def link = <a href={"download/" + id.is} title={fileName.is}>{is.trimToLength(30)}</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
Glasgow Haskell Compiler, Version 6.12.3, for Haskell 98, stage 2 booted by GHC version 6.12.1 | |
Using binary package database: /opt/sfw/lib/ghc-6.12.3/package.conf.d/package.cache | |
hiding package base-3.0.3.2 to avoid conflict with later version base-4.2.0.2 | |
wired-in package ghc-prim mapped to ghc-prim-0.2.0.0-9df3bd825ad17ca739e158c880a25b11 | |
wired-in package integer-gmp mapped to integer-gmp-0.2.0.1-72436e28c79d056c87cc0d2d2f9f3773 | |
wired-in package base mapped to base-4.2.0.2-dbc3ac4e3b3bd8eabac98b5dcd05c291 | |
wired-in package rts mapped to builtin_rts | |
wired-in package haskell98 mapped to haskell98-1.0.1.1-4d2891ad99eae334ff8234bcfbddce06 | |
wired-in package template-haskell mapped to template-haskell-2.4.0.1-8e41b32ac6fa34ae9b1c3469af5ed958 | |
wired-in package dph-seq mapped to dph-seq-0.4.0-1df951f78b4efbc84e2534bab253505d |
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 org.jibble.pircbot.PircBot | |
object Scalabot extends PircBot { | |
def main(args: Array[String]) { | |
setName("scalabotpl") | |
setVerbose(true) | |
setEncoding("UTF-8") | |
connect("irc.freenode.net") | |
// identify("******") | |
joinChannel("#scala.pl") |
OlderNewer