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
class Banana | |
object Monkey { | |
def eat(bananas: Seq[Banana]) = println("lots of banana") | |
def eat(banana: Banana) = println("one banana") | |
} | |
object Person { | |
def pickBanana = new Banana | |
def pickBananas = List(new Banana, new Banana) |
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 org.specs.runner.JUnit4 | |
import org.specs.SpecificationWithJUnit | |
class ClassCastSpec extends JUnit4(ClassCastSpec) | |
object ClassCastSpec extends SpecificationWithJUnit { | |
"test String must_== with self" in { | |
val data: String = "TEST_CONTENT_($*@:KFDSLU#&*@!943298742" | |
"TEST_CONTENT_($*@:KFDSLU#&*@!943298742" must_== data | |
} |
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
object TestNone { | |
def main(args: Array[String]) { | |
//first none | |
val none1 = None | |
//create by reflection | |
val constructor = classOf[None$].getDeclaredConstructor(); | |
constructor.setAccessible(true); | |
val none2 = constructor.newInstance() |
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
<div class="blue outer"> | |
<div class="yellow">fff</div> | |
<div class="purple margin10">FFF</div> | |
<div class="yellow padding10">fff</div> | |
</div> | |
<div class="outer purple">yyy</div> |
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
<div class="main blue">hello world!</div> | |
<div class="container">yeah</div> |
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
.fa | |
.fb | |
.fc | |
.fd | |
.fe | |
.clear | |
.fa.with3 | |
.fb.with3 |
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
.aa | |
.a | |
.a.b | |
.a.b.c | |
.a.b.c.d | |
.a.b.c.d.e | |
.clear | |
.label "thin boader div" | |
.label "fat boader div" | |
.label "div with 3 boaders" |
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
base_dir=`dirname $0` | |
alias ..='cd ..' | |
alias ...='.. && ..' | |
alias vi=vim | |
alias ga='git add' | |
alias gdf='git diff' | |
alias gs='git status' |
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
//// | |
// By default, there is only http 500 error for unrecognized properties against request object, | |
// without any information, it's really annoying. | |
//// | |
import javax.ws.rs.core.Response; | |
import javax.ws.rs.ext.ExceptionMapper; | |
import javax.ws.rs.ext.Provider; | |
import com.fasterxml.jackson.databind.JsonMappingException; |
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
#/bin/sh | |
# dir structure | |
# |- go-agent-16.3.0_00 | |
# |- go-agent-16.3.0_01 | |
# |- go-agent-16.3.0_02 | |
# |- go-agent-16.3.0_03 | |
# |- go-agent-16.3.0_04 | |
# |- go-agent-16.3.0_05 | |
# |- restart_all.sh |
OlderNewer