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 VarargTest { | |
abstract class OptionBase | |
case class Width(s: String) extends OptionBase | |
case object HasSearch extends OptionBase | |
case class Title(s: String) extends OptionBase | |
implicit def strToOption(s:String) : OptionBase = Title(s) | |
def func(options: OptionBase*) { | |
options.foreach(o => println("option = [%s]".format(o))) |
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 TraitsTest { | |
trait Base { | |
def func() = println("Base.func") | |
} | |
trait A extends Base { | |
override def func() = { super.func(); println("A.func") } | |
} |
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
build.sbt | |
========= | |
libraryDependencies ++= { | |
val liftVersion = "2.5" | |
Seq(... "mysql" % "mysql-connector-java" % "5.1.26" ...) | |
} | |
default.props |
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
@echo off | |
set SCRIPT_DIR=%~dp0 | |
start "sbt-%CD%" java -Dfile.encoding=UTF-8 -Xms256M -Xmx1536M -XX:+CMSClassUnloadingEnabled -XX:MaxPermSize=384M -Xss2M -Drebel.lift_plugin=true -javaagent:path-to-jrebel\jrebel.jar -jar "%SCRIPT_DIR%sbt-launch-0.12.4.jar" %* | |
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 Test extends LongKeyedMapper[Test] ... | |
{ | |
... | |
object data MappedString(this, 32) { | |
def validateFormat(s: String) = | |
if (s.matches("[a-z0-9_]+")) Nil | |
else List(FieldError(this, "Format is not valid!")) | |
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
/* | |
* Copyright 2007-2013 WorldWide Conferencing, LLC | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
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
<web-app> | |
<filter> | |
<filter-name>LiftFilter</filter-name> | |
<display-name>Lift Filter</display-name> | |
<description>The Filter that intercepts lift calls</description> | |
<filter-class>net.liftweb.http.LiftFilter</filter-class> | |
</filter> | |
<filter-mapping> |
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
// H | |
-Xms256m | |
-Xmx3096m | |
-XX:MaxPermSize=384m | |
-XX:ReservedCodeCacheSize=128m | |
-XX:+UseCodeCacheFlushing | |
-ea | |
-Dsun.io.useCanonCaches=false |
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
if (Props.devMode) autologinFunc = Full(autoLogin) | |
private def autoLogin() { | |
val u = User.findUserByUserName("[email protected]") | |
if (u.isDefined) logUserIn(u.get) | |
else debug("could not find dummy user for auto login. please create user [email protected]") | |
} |
OlderNewer