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 some.pack; | |
public class AlreadyMarkedException extends Exception { | |
public AlreadyMarkedException(){ | |
} | |
public AlreadyMarkedException(String msg) { | |
super(msg); | |
} |
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 some.pack; | |
public class Person { | |
private String name; | |
private Integer age; | |
public Person(String name, String age) { | |
this.name = name; | |
this.age = age; |
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.scalatest.FunSuite | |
class BasicFunSuiteTest extends FunSuite { | |
test("testing hello world") { println("everything is working :D") } | |
} |
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.scalatest.{FunSuite, BeforeAndAfterEach} | |
import some.pack.{TicTacToe, Mark, InvalidSquareException, AlreadyMarkedException} | |
import some.pack.Mark._ | |
class FirstTicTacToeFunSuiteTest extends FunSuite with BeforeAndAfterEach { | |
private var ttt: TicTacToe = _ | |
override def beforeEach() { ttt = new TicTacToe } | |
test("the game should not start finished") { |
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.scalatest.{FunSuite, BeforeAndAfterEach} | |
import org.scalatest.matchers.ShouldMatchers | |
import some.pack.{TicTacToe, Mark, InvalidSquareException, AlreadyMarkedException} | |
import some.pack.Mark._ | |
class SecondTicTacToeFunSuiteTest extends FunSuite with BeforeAndAfterEach with ShouldMatchers { | |
private var ttt: TicTacToe = _ | |
override def beforeEach() { ttt = new TicTacToe } |
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
test("players cannot mark a already marked square") { | |
ttt.mark(0,0) | |
evaluating { ttt.mark(0,0) } should produce [AlreadyMarkedException] | |
} |
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 timer = require('timers') | |
var http = require('http'); | |
var urlMatcher = /https?:\/\/([-\w\.]+)+:?(\d+)?(\/([-\w\/_\.]*(\?\S+)?)?)?/ | |
var updateInterval = 10000; | |
var updateWithNoUseMax = 50; | |
var cache = {} | |
function CacheEntry() { |
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
root@li75-187:/usr/bin# npm install node-proxy | |
> node-proxy@0.5.1 install /usr/bin/node_modules/node-proxy | |
> make | |
BUILDING: C++ Component | |
/bin/sh: node-waf: not found | |
cp: cannot stat `src/build/default/node-proxy.node': No such file or directory | |
make: *** [all] Error 1 | |
npm ERR! error installing node-proxy@0.5.1 Error: node-proxy@0.5.1 install: `make` |
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.scalatra._ | |
import java.net.URL | |
import scalate.ScalateSupport | |
class MyScalatraFilter extends ScalatraFilter with ScalateSupport { | |
get("/") { | |
<html> | |
<body> | |
<h1>Hello, world!</h1> |
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
HTTP Status 500 - | |
type Exception report | |
message | |
description The server encountered an internal error () that prevented it from fulfilling this request. | |
exception |
OlderNewer