Skip to content

Instantly share code, notes, and snippets.

@sascha10000
sascha10000 / Project Euler-Solver
Created July 18, 2018 13:04
A simple class to test your results for project Euler with a simple function. Just call Solver(1, 233168) to check if 233168 is the solution for Problem Nr 1.
# Solution-Checker
def Solver(problemNr, yourResult):
solutions = """1. 233168
2. 4613732
3. 6857
4. 906609
5. 232792560
6. 25164150
7. 104743
8. 23514624000
import io.vertx.core.Handler
import io.vertx.scala.ext.web.RoutingContext
class RCHandler(op:(RoutingContext) => Unit) extends Handler[RoutingContext] {
override def handle(event: RoutingContext): Unit = {
op(event)
}
}
object handler {
import io.vertx.lang.scala.ScalaVerticle
import io.vertx.scala.core.Vertx
import io.vertx.scala.ext.web.{Router, RoutingContext}
class VerticleTest extends ScalaVerticle {
override def start(): Unit = {
val server = vertx.createHttpServer()
val router = Router.router(vertx)
/* Simple route, works like a charme. */