This file contains hidden or 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 spray.json._ | |
| import reactivemongo.bson._ | |
| import reactivemongo.bson.handlers.{ BSONReader, BSONWriter, RawBSONWriter } | |
| import scala.util.{ Try, Success, Failure } | |
| import org.apache.commons.codec.binary.Hex | |
| import org.joda.time.format.ISODateTimeFormat | |
| import org.joda.time.{ DateTime, DateTimeZone } | |
| import java.nio.ByteBuffer | |
| import org.jboss.netty.buffer.ChannelBuffers |
This file contains hidden or 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 scalaz_memo_example | |
| import scala.util.control.Exception.allCatch | |
| import scalaz._ | |
| import Scalaz._ | |
| object Main{ | |
| def timer[T](f : => T):T = { | |
| val start = System.currentTimeMillis |
This file contains hidden or 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
| // Please comment in case of typos or bugs | |
| import scala.slick.driver.H2Driver._ | |
| val db = Database.for...(...) | |
| case class Record( ... ) | |
| class Records(tag: Tag) extends Table[Record](tag,"RECORDS"){ | |
| ... | |
| def * = ... <> (Record.tupled,Record.unapply) | |
| // place additional methods here which return values of type Column |
This file contains hidden or 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 the magic libraries | |
| import scala.xml._ | |
| import scala.xml.transform._ | |
| // Source xml. In Scala, xml is literal. | |
| val xml = | |
| <user> | |
| <email>joe@example.com</email> |
NewerOlder