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
public interface IHello { | |
public String say(); | |
} | |
public class JapaneseHello implements IHello { | |
public String say() { | |
reutrn "こんにちは"; | |
} | |
} |
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
using System; | |
using System.IO; | |
using System.Linq; | |
using System.Xml.Serialization; | |
using System.Reflection; | |
namespace Rabitarochan.Serializer | |
{ | |
/// <summary> | |
/// オブジェクトをXMLファイルにシリアライズ/デシリアライズするクラス |
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
object Test { | |
implicit def int2String(x: Int): String = x.toString | |
} | |
// defined module Test | |
import Test._ | |
val num = 123 |
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 com.rabitarochan.mongodb; | |
import org.bson.types.Code; | |
import com.mongodb.BasicDBObject; | |
import com.mongodb.DB; | |
import com.mongodb.DBCollection; | |
import com.mongodb.DBObject; | |
import com.mongodb.Mongo; |
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
pane: ActionPane { | |
prefHeight = 400.0 | |
prefWidth = 600.0 | |
children { | |
hbox: HBox { | |
alignment = "CENTER" | |
prefHeight = 50.0 | |
prefWidth = 572.0 | |
spacing = 20.0 | |
children { |
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
#main { | |
width: 690px; | |
} | |
.date { | |
width: 660px; | |
position: static; | |
border-bottom-width: 1px; | |
border-bottom-style: solid; | |
border-bottom-color: #DDD; |
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
@echo off | |
if exist build.sbt ( | |
echo [error] Project already exists. | |
exit /b 1 | |
) | |
if not "%1" == "" ( | |
set project_name=%1 |
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
// コンストラクタをプライベートにし、コンパニオンオブジェクト経由でのみ生成させる。 | |
class ClassName[A] private (val clazz: Class[A]) { | |
// toString で、引数に指定されたクラスの名称を返す。 | |
override def toString(): String = { | |
clazz.getName | |
} | |
} | |
object ClassName { |
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
!SLIDE | |
# gist-slide を試してみよう! | |
!SLIDE | |
これで合ってるの?? |
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.util.parsing.combinator.RegexParsers | |
case class Indent(i: Int) | |
case class Text(s: String) | |
case class Line(i: Indent, t: Text) | |
object Parser extends RegexParsers { | |
def indent: Parser[Indent] = """^\s*""".r ^^ {in => Indent(in.length)} | |
def text: Parser[Text] = """[^\n\r]*""".r ^^ {s => Text(s)} |
OlderNewer