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 au.id.jazzy.scalaflect | |
import org.specs2.mutable.Specification | |
object ScalaFlectSpec extends Specification { | |
"ScalaFlect" should { | |
"be able to look up simple case class properties" in { | |
val exampleCaseClass = new ScalaFlect(classOf[ExampleCaseClass]) | |
val member = exampleCaseClass.reflect(_.property) | |
member.toString mustEqual "property" |
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.gwtplatform.mvp.client.proxy; | |
import com.google.gwt.event.logical.shared.ValueChangeEvent; | |
import com.google.gwt.user.client.Window; | |
import com.google.inject.Inject; | |
import com.google.inject.Singleton; | |
import com.google.web.bindery.event.shared.EventBus; | |
@Singleton | |
public class Html5PushStatePlaceManager extends PlaceManagerImpl { |
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
final case class Schrödinger[+A, +B](a: A, b: B) extends Either[A, B] { | |
private var isleft = true | |
private var isright = true | |
lazy val actual : Either[A, B] = { | |
if (new Random().nextBoolean()) { | |
isright = false | |
Left(a) | |
} else { | |
isleft = false | |
Right(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 util.logging; | |
import ch.qos.logback.classic.spi.ILoggingEvent; | |
import ch.qos.logback.core.UnsynchronizedAppenderBase; | |
import play.libs.F; | |
import java.util.Collections; | |
import java.util.Set; | |
import java.util.concurrent.ConcurrentHashMap; | |
import java.util.concurrent.atomic.AtomicInteger; |
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
running(fakeApplication(), new Runnable() { | |
@Override | |
public void run() { | |
FakeRequest req = fakeRequest(); | |
for (int i = 0; i < 5; i++) { | |
req = req.withSession("key" + i, "value" + i); | |
} | |
for (int i = 0; i < 5; i++) { | |
if (!req.getWrappedRequest().session().get("key" + i).isDefined()) { | |
// Whether we reach this point or not depends on HashMap ordering |
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
// ==UserScript== | |
// @name Play 2 Lighthouse Linker | |
// @description Links Play 2 Lighthouse ticket references to lighthouse | |
// @namespace http://playframework.org | |
// @version 1.0 | |
// @author James Roper <[email protected]> | |
// @include https://github.com/playframework/Play20/* | |
// @require http://code.jquery.com/jquery-1.8.2.min.js | |
// @run-at document-end | |
// ==/UserScript== |
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
2012-10-06 14:18:46 | |
Full thread dump Java HotSpot(TM) 64-Bit Server VM (20.10-b01-428 mixed mode): | |
"DestroyJavaVM" prio=5 tid=7f8444003000 nid=0x10472b000 waiting on condition [00000000] | |
java.lang.Thread.State: RUNNABLE | |
"com.google.common.base.internal.Finalizer" daemon prio=5 tid=7f844bdd7000 nid=0x10e4ab000 in Object.wait() [10e4aa000] | |
java.lang.Thread.State: WAITING (on object monitor) | |
at java.lang.Object.wait(Native Method) | |
- waiting on <7f40c3a90> (a java.lang.ref.ReferenceQueue$Lock) |
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.avaje.ebeaninternal.server.lib; | |
import java.lang.reflect.Field; | |
import java.util.Iterator; | |
import java.util.logging.Level; | |
import java.util.logging.Logger; | |
/** | |
* Exists to work around this issue: | |
* |
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 controllers | |
import play.api.mvc.{Cookie, Action, Controller} | |
import play.api.libs.json._ | |
import org.apache.commons.codec.binary.Base64 | |
import play.api.libs.json.JsString | |
import play.api.data.validation.ValidationError | |
/** | |
* Used for testing stuff. |
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 utils | |
import scala.xml.Elem | |
import scala.concurrent.Future | |
import java.util.{TimeZone, Date} | |
import java.text.SimpleDateFormat | |
import java.net.URLEncoder | |
import javax.crypto.spec.SecretKeySpec | |
import javax.crypto.Mac | |
import org.apache.commons.codec.binary.Base64 |
OlderNewer