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 | |
object MyController extends Controller { | |
def add() = Action { implicit request => | |
Form( tuple ( "user" -> number ) ).bindFromRequest.fold( | |
errors => BadRequest, | |
t => { | |
Ok("Add id: " + t) | |
} |
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.actors.Actor._ | |
import scala.actors.remote._ | |
import scala.actors.remote.RemoteActor._ | |
object Remote { | |
val listening = actor { | |
alive(6001) | |
register('AwesomeRemoteServer, self) | |
println("I'm alive!") |
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
// Create an image | |
val image = new BufferedImage(100, 100, BufferedImage.TYPE_3BYTE_BGR) | |
// Retrieve graphics | |
val graphics = image.getGraphics.asInstanceOf[Graphics2D] | |
// Convert to siigna graphics (much nicer API) | |
val siignaGraphics = new com.siigna.app.view.Graphics(graphics.asInstanceOf[Graphics2D]) |
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> | |
<body> | |
<!-- See this link for explanation: http://docs.oracle.com/javase/1.5.0/docs/guide/plugin/developer_guide/using_tags.html --> | |
<object classid="clsid:CAFEEFAC-0015-0000-0000-ABCDEFFEDCBA"> | |
<param name="code" value="AppletTest.class"> | |
<comment> | |
<embed code="AppletTest.class" | |
type="application/x-java-applet;jpi-version=1.7.0"> | |
<noembed> | |
No Java Support. |
NewerOlder