Skip to content

Instantly share code, notes, and snippets.

View anand-singh's full-sized avatar
🎯
I may be slow to respond.

Anand Singh anand-singh

🎯
I may be slow to respond.
View GitHub Profile
@anand-singh
anand-singh / Tree.scala
Created March 30, 2018 12:11 — forked from dholbrook/Tree.scala
Scala binary tree
/**
* D Holbrook
*
* Code Club: PO1
*
* (*) Define a binary tree data structure and related fundamental operations.
*
* Use whichever language features are the best fit (this will depend on the language you have selected). The following operations should be supported:
*
* Constructors
@anand-singh
anand-singh / ParentChild.scala
Created January 29, 2016 10:25 — forked from archie/ParentChild.scala
Examples of testing Akka actor parent-child relationships, mostly based on findings from https://www.assembla.com/spaces/akka/tickets/3043#/activity/ticket:
package pc
import akka.actor.Actor
import akka.actor.Props
import akka.actor.ActorRef
import akka.actor.ActorRefFactory
class Parent extends Actor {
val child = context.actorOf(Props[Child], "child")
var ponged = false
@anand-singh
anand-singh / unzip.scala
Created January 29, 2016 10:21 — forked from Swind/unzip.scala
[Scala][Zip] unzip in scala
import java.util.zip.ZipFile
import java.io.FileInputStream
import java.io.FileOutputStream
import scala.collection.JavaConversions._
import java.util.zip.ZipEntry
import java.io.InputStream
import java.io.OutputStream
import java.io.File
class ZipArchive {
import org.specs2._
import execute._
import specification._
import core._
class TestSuite(tests: Fragment*) extends Specification {
def is = br ^ Fragments.foreach(tests)(f => Fragments(f, br))
}
object TestSuite {