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
//RichClassへの暗黙変換定義 | |
scala> implicit def toRichClass[T](c:Class[T]) = new tools.nsc.interpreter.RichClass(c) | |
toRichClass: [T](c: Class[T])scala.tools.nsc.interpreter.RichClass[T] | |
// サンプルのために、とりあえずNilのClassオブジェクトを取得 | |
scala> val nilClass = Nil.getClass | |
nilClass: java.lang.Class[_] = class scala.collection.immutable.Nil$ | |
// java.lang.ClassからManifestを取得 | |
scala> nilClass.toManifest |
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 scala.ScalaObject; | |
public final class A$ | |
implements ScalaObject | |
{ | |
private int b() | |
{ | |
return b; | |
} |
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 sbt._ | |
object MyBuild extends Build{ | |
import Keys._ | |
lazy val project = Project("root",file(".")) | |
override lazy val settings = super.settings ++ Seq( | |
scalaVersion := "2.9.0-1", | |
libraryDependencies ++= Seq( |
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 com.mongodb.casbah.Imports._ | |
import com.mongodb.casbah.dynamic._ | |
import java.util.Date | |
import scala.util.matching.Regex | |
import java.util.regex.Pattern | |
import org.scala_tools.time.Imports._ | |
object DynamicMongo{ | |
implicit def dynamicConverter(obj:DBObject) |
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
def getWrapperClass(clazz:Class[_]):Class[_] = Map[Class[_],Class[_]]( | |
classOf[Boolean]-> classOf[java.lang.Boolean] | |
,classOf[Byte] -> classOf[java.lang.Byte] | |
,classOf[Short] -> classOf[java.lang.Short] | |
,classOf[Int] -> classOf[java.lang.Integer] | |
,classOf[Char] -> classOf[java.lang.Character] | |
,classOf[Float] -> classOf[java.lang.Float] | |
,classOf[Double] -> classOf[java.lang.Double] | |
,classOf[Long] -> classOf[java.lang.Long] |
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
Welcome to Scala version 2.9.0.1 (Java HotSpot(TM) 64-Bit Server VM, Java 1.6.0_26). | |
Type in expressions to have them evaluated. | |
Type :help for more information. | |
scala> import scala.tools.scalap.scalax.rules.scalasig._ | |
import scala.tools.scalap.scalax.rules.scalasig._ | |
scala> ByteCode.forClass(classOf[List[_]]) | |
res0: scala.tools.scalap.scalax.rules.scalasig.ByteCode = 82729 bytes |
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
https://github.com/mpeltonen/sbt-idea/tree/sbt-0.10 | |
https://github.com/orfjackal/idea-sbt-plugin | |
https://github.com/remeniuk/sbt-netbeans-plugin | |
https://github.com/typesafehub/sbteclipse | |
https://github.com/siasia/xsbt-web-plugin | |
https://github.com/ritschwumm/xsbt-webstart | |
https://github.com/eed3si9n/sbt-appengine | |
https://github.com/thunderklaus/sbt-gwt-plugin | |
https://github.com/ijuma/junit_xml_listener/tree/sbt-0.10 | |
https://github.com/softprops/sbt-growl-plugin |
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
#!/usr/bin/env xsbtscript | |
!# | |
/*** | |
scalaVersion := "2.9.0-1" | |
libraryDependencies ++= Seq( | |
"com.mongodb.casbah" %% "casbah-core" % "2.1.5-1" | |
) |
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
#!/usr/bin/env xsbtscript | |
!# | |
/*** | |
scalaVersion := "2.8.1" | |
resolvers += "twiiter repo" at "http://maven.twttr.com" | |
libraryDependencies ++= Seq( |
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
> appengine: | |
appcfg-name appcfg-path appengine-api-jar-name | |
appengine-api-jar-path appengine-api-labs-jar-name appengine-bin-path | |
appengine-classpath appengine-jsr107-cache-jar-name appengine-lib-impl-path | |
appengine-lib-path appengine-lib-user-path appengine-sdk-path | |
configuration cron-info deploy | |
deploy-cron deploy-dos deploy-indexes | |
deploy-queues empty-map jsr107-cache-jar-name | |
prepare-webapp request-logs rollback | |
sdk-version streams temporary-war-path |