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 org.bowlerframework.view.squery.component.ValidationFeedbackPanel._ | |
import org.bowlerframework.view.squery.Component | |
import org.bowlerframework.RequestScope | |
class NewWidgetForm extends Component{ | |
val request = RequestScope.request | |
$("#errorPanel").contents = showErrorMessages | |
request.getSession.getValidatedModel match{ |
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.mojolly.backchat | |
package web | |
import org.scalatra.ScalatraServlet | |
import akka.actor.{Scheduler, Actor} | |
import javax.servlet.http.{HttpServletResponse, HttpServletRequest} | |
import org.atmosphere.cpr.BroadcastFilter.BroadcastAction | |
import org.atmosphere.cpr._ | |
import org.atmosphere.util.XSSHtmlFilter | |
import collection.JavaConversions._ |
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.text.SimpleDateFormat | |
import java.util.Date | |
class RichHumanDate(d:Long) { | |
def toHumanString() = { | |
val sdf = new SimpleDateFormat("MM/dd/yyyy HH:mm:ss.SSS"); | |
val dt = new Date(d); | |
sdf.format(dt); | |
} | |
} |
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.mojolly.backchat | |
package web | |
class MySocketIOClient extends Client { | |
def receive = { | |
case Connected => { | |
} | |
case Message(msg) => { | |
//handlePlainTextMessage |
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
$(':input','form.edit_form') | |
.not(':button, :submit, :reset, :hidden') | |
.val('') | |
.removeAttr('checked') | |
.removeAttr('selected'); |
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 scala.util.Random | |
class RandomTraversableOnce[A](seq:TraversableOnce[A]){ | |
def choice = seq.toList (new Random nextInt seq.size) | |
} | |
implicit def toRandomTraversableOnce[A](seq:TraversableOnce[A]) = new RandomTraversableOnce(seq) |
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
From b95985f9f86be7a60c9963ed146b5c4563a8aef7 Mon Sep 17 00:00:00 2001 | |
From: Ikenna Okpala <ikennaokpala@googlemail.com> | |
Date: Fri, 22 Apr 2011 00:01:20 +0100 | |
Subject: [PATCH] Added string utils helper object.. | |
--- | |
assets/js/fanPageGallery.js | 28 +++++++++++++++------------- | |
1 files changed, 15 insertions(+), 13 deletions(-) | |
diff --git a/assets/js/fanPageGallery.js b/assets/js/fanPageGallery.js |
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
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> | |
<title>Fan Page Gallery</title> | |
<script type="text/javascript" src="http://www.google.com/jsapi"></script> | |
<script type="text/javascript" > google.load("jquery", "1.5.1", {uncompressed:true}); </script> |
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 sbt._ | |
class IntegrationTestsProject(info: ProjectInfo) extends DefaultWebProject(info) { | |
val snapshots = ScalaToolsSnapshots | |
val dispatch = "net.databinder" %% "dispatch" % "0.7.8" | |
//val junitDep = "junit" % "junit" % "4.5" % "test" | |
//val jwebunit = "net.sourceforge.jwebunit" % "jwebunit-core" % "2.5" % "test" | |
//val jwebunit_htmlunit_plugin = "net.sourceforge.jwebunit" % "jwebunit-htmlunit-plugin" % "2.5" % "test" | |
// val htmlunit = "net.sourceforge.htmlunit" % "htmlunit" % "2.8" % "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
class ApplicationController < ActionController::Base | |
protect_from_forgery | |
layout :layout_by_resource | |
private | |
def after_sign_in_path_for(resource) # helper method from Devise | |
"/admin" # <- Path to redirect the user to. | |
end |