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.io._ | |
class PrevaylerJr[T <: Serializable](initialState: T, pStorageFile: File) { | |
private val storageFile = new File(pStorageFile.getAbsolutePath + ".tmp") | |
private val system = { | |
val fileToRead = if (pStorageFile.exists) pStorageFile else storageFile | |
if (fileToRead.exists) { | |
val input = new ObjectInputStream(new FileInputStream(fileToRead)) |
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 nolan | |
import net.fwbrasil.activate.ActivateContext | |
import net.fwbrasil.activate.migration.Migration | |
import net.fwbrasil.activate.storage.mongo.MongoStorage | |
object MongoContext extends ActivateContext { | |
def contextName = "mongoContext" | |
val storage = new MongoStorage { | |
override val authentication = Option(("activate_test", "activate_test")) |
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
trait Person extends Entity { | |
var name: String | |
def nameAsUpperCase = | |
name.toUpperCase | |
} | |
object Person { | |
def personsWhereNameStartsWith(string: String) = | |
select[Person] where (_.name like string + "%") | |
} | |
class NaturalPerson(var name: String, var motherName: String) extends Person { |
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 com.example.foo | |
import activateExampleContext._ | |
class Person( | |
var name: String) | |
extends Vertex | |
class Knows( | |
val from: Person, |
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 net.fwbrasil.sReflection | |
object CascadeImplicits { | |
implicit def toYourself[T](value: T): Yourself[T] = new Yourself(value) | |
implicit def toCascade[T](value: T): Cascade[T] = new Cascade(value) | |
class Yourself[T](value: T) { | |
def yourself = value | |
} |
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
scala> import net.fwbrasil.smirror._ | |
import net.fwbrasil.smirror._ | |
scala> implicit val mirror = runtimeMirror(getClass.getClassLoader) | |
mirror: reflect.runtime.universe.Mirror = JavaMirror with scala.tools.nsc.interprete... | |
scala> case class Shop(store: String, item: String, cost: Int) { | |
| def this() = this(null, null, 0) | |
| } | |
defined class Shop |
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 net.fwbrasil.smirror._ | |
trait Foo { | |
@deprecated("foo is a terrible name! what were you thinking?", "0.1") | |
def foo(i: Int) = i | |
} | |
class Bar extends Foo { | |
} |
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 hu.finesolution.sepia.test.core.controller | |
import org.junit.runner.RunWith | |
import org.scalatest.junit.JUnitRunner | |
import org.scalatest.mock.MockitoSugar | |
import org.scalatest.{FunSuite, BeforeAndAfter} | |
import org.scalatra.test.scalatest.ScalatraSuite | |
import org.scalatra.ScalatraServlet |
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
ubuntu@ip-10-152-186-104:~/FrameworkBenchmarks$ toolset/run-tests.py -u ubuntu --test play-activate-mysql -i ~/.ssh/id_rsa.pub --max-threads 20 | |
===================================================== | |
Preparing Server, Database, and Client ... | |
===================================================== | |
bash: cpu0/cpufreq/scaling_governor: No such file or directory | |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ | |
@ WARNING: UNPROTECTED PRIVATE KEY FILE! @ | |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ |
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
ubuntu@ip-10-152-186-104:~/FrameworkBenchmarks$ toolset/run-tests.py -u ubuntu --test play-activate-mysql -i ~/.ssh/id_rsa --max-threads 5 --max-concurrency 16 | |
===================================================== | |
Preparing Server, Database, and Client ... | |
===================================================== | |
bash: cpu0/cpufreq/scaling_governor: No such file or directory | |
Welcome to Ubuntu 12.04.2 LTS (GNU/Linux 3.2.0-40-virtual x86_64) | |
* Documentation: https://help.ubuntu.com/ |
OlderNewer