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
17:52:35,952 INFO [org.jboss.as.logging] Restored bootstrap log handlers | |
17:52:35,958 INFO [com.arjuna.ats.jbossatx] ARJUNA32018: Destroying TransactionManagerService | |
17:52:35,960 INFO [com.arjuna.ats.jbossatx] ARJUNA32014: Stopping transaction recovery manager | |
17:52:35,963 INFO [org.jboss.as] JBoss AS 7.0.0.Final "Lightning" stopped in 85ms | |
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
#apps/orkut:D/pages/login.rb | |
class LoginPage < Page | |
@username_field = ... | |
@password_field = ... | |
@submit_button = ... | |
end | |
#apps/orkut:D/flows/home.rb | |
class LoginPage < Flow | |
def login user, pwd |
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
case class Inter[A](f: Int => A) { | |
def map[B](g: A => B): Inter[B] = | |
Inter(n => g(f(n))) | |
def flatMap[B](g: A => Inter[B]): Inter[B] = | |
Inter(n => g(f(n)).f(n)) | |
} | |
object Unitals { | |
def unitalOption[A](a: A): Option[A] = |
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
case class Hello { | |
def hello = "hello" | |
} | |
case class Hi { | |
def hi = "hi" | |
} | |
trait Greeting[C] { | |
def greet(c: C): String |
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
global | |
maxconn 4096 # Total Max Connections. This is dependent on ulimit | |
nbproc 1 | |
defaults | |
mode http | |
frontend all 0.0.0.0:80 | |
timeout client 86400000 | |
default_backend play_server |
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.libs.iteratee._ | |
object Application extends Controller { | |
def echo = WebSocket.using[String] { request => | |
val out = Enumerator.imperative[String]() | |
val in = Iteratee.foreach[String](out.push(_)).mapDone(_ => println("Disconnected")) | |
(in, out) |
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> println(f(522, List(100, 5, 5, 2, 6, 8)).map(f => f.toString + " = " + f.r).mkString("\n")) | |
(((100.0 - 5.0) - 8.0) * 6.0) = 522.0 | |
(((100.0 + 6.0) * 5.0) - 8.0) = 522.0 | |
(((100.0 - 8.0) - 5.0) * 6.0) = 522.0 | |
(((6.0 + 100.0) * 5.0) - 8.0) = 522.0 | |
(((((5.0 - 8.0) * 5.0) + 100.0) + 2.0) * 6.0) = 522.0 | |
(((((5.0 - 8.0) * 5.0) + 2.0) + 100.0) * 6.0) = 522.0 | |
(((((2.0 / 5.0) * 8.0) + 100.0) * 5.0) + 6.0) = 522.0 | |
(((((2.0 * 8.0) / 5.0) + 100.0) * 5.0) + 6.0) = 522.0 | |
(((((2.0 * 8.0) + 6.0) / 5.0) + 100.0) * 5.0) = 522.0 |
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
var moveCounter = 0; | |
var moveFwd = true; | |
function Robot(robot) {} | |
Robot.prototype.onIdle = function(ev) { | |
var robot = ev.robot; | |
if (moveFwd) robot.move(1) | |
else robot.back(1); | |
robot.rotateCannon(1); | |
moveCounter++; |
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
var moveCounter = 0; | |
var moveFwd = true; | |
function Robot(robot) { | |
robot.clone(); | |
} | |
Robot.prototype.onIdle = function(ev) { | |
var robot = ev.robot; | |
if (moveFwd) robot.move(1) | |
else robot.back(1); |
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 spark._ | |
import com.thoughtworks.dod._ | |
class NumberOfCommitsAnalyzer extends Analyzer { | |
def apply(data: RepoData, sc: SparkContext) = | |
Result(Seq("checkins"), Seq(Seq(data.commits.count))) | |
} |