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 models | |
import play.api.mvc.PathBindable | |
object Account extends Enumeration { | |
val Company, Sales = Value // create enumerated values | |
// url path binding (routes) | |
implicit def bindableAccount = new PathBindable[Account.Value] { |
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 models | |
object Account extends BindableEnum { | |
val Company, Sales = Value // create enumerated values | |
} |
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
/** | |
* PLEASE AVOID THIS IMPLEMENTATION BECAUSE OF... | |
* - a cache should be garbage collectable (on low memory) | |
* (see Soft Reference, Weak Reference etc.) | |
* - a cache should be thread safe (this is not) | |
*/ | |
class CachedLdapPermissionResolver extends LdapPermissionResolver { | |
private static final long MAX_TIME = 1000 * 60 * 10; // = 10 min. |
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 net.danieldietrich.scala.treehugger | |
sealed abstract class Tree | |
case class Node(id: Symbol)(children: Tree*) extends Tree | |
case class Leaf(id: Symbol)(value: String) extends Tree | |
object Example { |
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
/* JAVA */ | |
public class SampleExtensions { | |
public static String sort(String s) { | |
final char[] arr = s.toCharArray(); | |
java.util.Arrays.sort(arr); | |
return String.valueOf(arr); | |
} |
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 net.danieldietrich; | |
import java.io.File; | |
import java.net.URI; | |
import java.net.URL; | |
import java.util.Collections; | |
import java.util.regex.Pattern; | |
import java.util.zip.ZipEntry; | |
import java.util.zip.ZipFile; |
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 SimpleTest extends App { | |
import StringContextImplicits._ | |
val list = List("Foo", "Bar", "Baz").mkString("\n") | |
/*----------- | |
# | |
test --> |
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
#!/bin/sh | |
# | |
# Compiling eclipse kepler with java 8 support (https://bugs.eclipse.org/bugs/show_bug.cgi?id=380190) | |
# | |
export MAVEN_OPTS=-Xmx2048m | |
BRANCH="R4_3_maintenance" | |
BRANCH_JAVA8="BETA_JAVA8" |
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 sbt._ | |
import Keys._ | |
object ScalaBuild extends Build { | |
val buildOrganization = "my.group.id" | |
val buildName = "project-template" | |
val buildVersion = "1.0-SNAPSHOT" | |
val buildScalaVersion = "2.10.3" |
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
[INFO] Scanning for projects... | |
[INFO] | |
[INFO] ------------------------------------------------------------------------ | |
[INFO] Building Javaslang 1.0.1-SNAPSHOT | |
[INFO] ------------------------------------------------------------------------ | |
[INFO] | |
[INFO] --- maven-release-plugin:2.4.2:perform (default-cli) @ javaslang --- | |
[INFO] Checking out the project to perform the release ... | |
[INFO] Executing: /bin/sh -c cd /Users/daniel/git/rocketscience-projects/javaslang/target && git clone --branch javaslang-1.0.0 [email protected]:rocketscience-projects/javaslang.git /Users/daniel/git/rocketscience-projects/javaslang/target/checkout | |
[INFO] Working directory: /Users/daniel/git/rocketscience-projects/javaslang/target |
OlderNewer