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 Main { | |
def main(args: Array[String]): Unit = { | |
new SetMethods() | |
} | |
} | |
class SetMethods { | |
private val digits = Set(1,3,5,7) |
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 Main { | |
def main(args: Array[String]): Unit = { | |
new IteratorMethods() | |
} | |
} | |
class IteratorMethods(){ | |
private val iterable = Iterable(1,2,3,4,5) | |
val methods = List(method) |
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 Main { | |
def main(args: Array[String]): Unit = { | |
new SeqMethods() | |
} | |
} | |
class SeqMethods { | |
private val digits = Seq(1,3,5,7) | |
private val chars = Seq("a", "b", "c", "d", "a", "c", "b") |
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.collection.mutable.ArrayBuffer | |
import scala.collection.mutable.LinkedList | |
import scala.collection.mutable.BitSet | |
import java.util.LinkedHashSet | |
object Main { | |
def main(args: Array[String]): Unit = { | |
new FunctionMapping() | |
} | |
} |
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 Main { | |
def main(args: Array[String]): Unit = { | |
new StreamMethods() | |
} | |
} | |
class StreamMethods{ | |
val methods = List(streamTest) | |
def numsFrom(n : BigInt): Stream[BigInt] = n #:: numsFrom(n + 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
object Main { | |
def main(args: Array[String]): Unit = { | |
new PatternMatching() | |
} | |
} | |
class PatternMatching{ | |
val methods = List(_match, _match2, guard, patternVar, patternGuardVar, typePattern, arrMatch, lstMatch, pairMatch, caseClass, optionMatch, partialFunction) | |
def _match(): Unit = { |
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 re, urllib, httplib, time | |
class Mining(object): | |
r = re.compile(ur'class="score_reple">\s*<p>(.*?)</p>') | |
def __init__(self, code): | |
positive = [] | |
negative = [] | |
for page in range(1,2): | |
[positive.append(data) for data in self.get_data(code, 'highest', page)] | |
time.sleep(2) |
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 akka.actor.{Props, ActorSystem, Actor} | |
/* | |
* Copyright © 2013 Yuk SeungChan, All rights reserved. | |
*/ | |
object Main { | |
def main(args: Array[String]): Unit = { | |
println("*" * 20 + " Actor Registry " + "*" * 20) | |
new LogGenerator().run(100) |
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 | |
object Main { | |
def main(args: Array[String]): Unit = { | |
val pong = new Pong | |
val ping = new Ping(100000, pong) | |
ping.start | |
pong.start | |
} |
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
/* | |
* Copyright © 2013 Yuk SeungChan, All rights reserved. | |
*/ | |
package main.scala | |
import scala.actors.{Channel, OutputChannel, Actor} | |
object Main { | |
def main(args: Array[String]): Unit = { |