This file contains hidden or 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
sealed trait NonEmptyList[+A] { | |
val head: A | |
val tail: List[A] | |
import Scalaz._ | |
def <::[B >: A](b: B): NonEmptyList[B] = nel(b, head :: tail) | |
import collection.mutable.ListBuffer |
This file contains hidden or 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
Compiled from "Account.scala" | |
public class com.evolutionnext.cdiscala.account.Account extends java.lang.Object implements scala.ScalaObject,scala.Product,java.io.Serializable{ | |
public static final java.lang.String apply$default$2(); | |
public static final java.lang.String apply$default$1(); | |
public static final java.lang.String init$default$2(); | |
public static final java.lang.String init$default$1(); | |
public static final scala.Function1 tupled(); | |
public static final scala.Function1 curry(); | |
public static final scala.Function1 curried(); | |
public scala.collection.Iterator productIterator(); |
This file contains hidden or 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
Compiled from "Account.scala" | |
public class com.evolutionnext.cdiscala.account.Account extends java.lang.Object implements scala.ScalaObject{ | |
public java.lang.String firstName(); | |
public void firstName_$eq(java.lang.String); | |
public void setFirstName(java.lang.String); | |
public java.lang.String lastName(); | |
public void lastName_$eq(java.lang.String); | |
public void setLastName(java.lang.String); | |
public com.evolutionnext.cdiscala.account.Account(); | |
public java.lang.String getLastName(); |
This file contains hidden or 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
@RequestScoped | |
@Named | |
class Account(@BeanProperty var firstName: String, | |
@BeanProperty var lastName: String) { | |
def this() = this ("Howie", "Long") | |
} |
This file contains hidden or 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 actors.Actor._ | |
val guessNumber = actor { | |
loop { | |
react { | |
case (i: Int, caller: Actor) if (i > 64) => caller ! "Too High" | |
case (i: Int, caller: Actor) if (i < 64) => caller ! "Too Low" | |
case (i: Int, caller: Actor) if (i == 64) => { | |
caller ! "Ding" | |
exit('Successful) | |
} |
This file contains hidden or 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 ColorTest extends Fiscus { | |
override val contents = new Red :: Nil | |
override def run() { | |
val favoriteColor = get(classOf[FavoriteColor]) | |
favoriteColor.getClass.getSimpleName should be("FavoriteColor") | |
favoriteColor.color.getClass.getSimpleName should be("Red") | |
} | |
} |
This file contains hidden or 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 interface Foo { | |
public void setBar(Bar bar); | |
} | |
public class FooFactory { | |
private List<Foo> foos; | |
public void setFoos(List<Foo> foos) { | |
this.foos = foos; |
This file contains hidden or 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
@Scope(Non-Singleton) | |
class A { | |
@Inject() | |
public void setB(B b) {...} | |
} | |
@Scope(Non-Singleton) | |
class B { | |
@Inject public void setC(C c) {...} | |
} |
This file contains hidden or 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.oreilly.testingscala | |
import org.specs2.Specification | |
import org.specs2.execute.{NoDetails, Failure, Result, Details} | |
class RunningAllTestsSpecification extends Specification { | |
def is = | |
"Using the same shared instance of Barry White add some albums" ^ runItems |
This file contains hidden or 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
danno@danno-76:~/java/jboss-as-7.1.0.CR1b/bin$ ./standalone.sh | |
========================================================================= | |
JBoss Bootstrap Environment | |
JBOSS_HOME: /home/danno/java/jboss-as-7.1.0.CR1b | |
JAVA: /home/danno/java/jdk1.6.0_20/bin/java | |
JAVA_OPTS: -server -Xms64m -Xmx512m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true |
OlderNewer