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 E { | |
class O { | |
val listeners = new ArrayBuffer[E.H] | |
} | |
trait RO { | |
implicit val __ERO__ = new O | |
} | |
type H = PartialFunction[Any,Any] | |
} | |
abstract class E { |
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
def using[A <: { def close() }](closeable: => A)(f: A => Unit) { | |
var c: Option[A] = None | |
try { | |
c = Option(closeable) | |
c foreach f | |
} finally { | |
c foreach(_.close) | |
} | |
} |
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.hanhuy.android.irc | |
import android.app.Activity | |
import android.app.ActionBar | |
import android.content.Intent | |
import android.content.Context | |
import android.content.BroadcastReceiver | |
import android.content.res.Configuration | |
import android.os.AsyncTask | |
import android.os.Build |
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.hanhuy.android.irc | |
import model.BusEvent | |
import AndroidConversions._ | |
import android.os.{Handler, Looper} | |
import android.util.Log | |
import scala.collection.mutable.{ArrayBuffer,SynchronizedBuffer} | |
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 sbt._ | |
import sbt.Keys._ | |
import AndroidKeys._ | |
/* | |
* this represents a multi-project structure like: | |
* - root-project (wrapper/meta project) | |
* `- lite (android project) | |
* `- common (android library-project) |
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 AndroidKeys._ | |
libraryDependencies ++= Seq( | |
"com.pivotallabs" % "robolectric" % "1.1" % "test", | |
"junit" % "junit" % "4.8.2" % "test", | |
"xpp3" % "xpp3" % "1.1.4c" % "test", | |
"org.scalatest" %% "scalatest" % "1.7.1" % "test" | |
) | |
seq(androidBuildSettings: _*) |
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 org.scalatest.Suite | |
import org.scalatest.Reporter | |
import org.scalatest.Stopper | |
import org.scalatest.Filter | |
import org.scalatest.Tracker | |
import org.scalatest.Distributor | |
import com.xtremelabs.robolectric.Robolectric | |
import com.xtremelabs.robolectric.ApplicationResolver | |
import com.xtremelabs.robolectric.RobolectricConfig |
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 | |
setlocal | |
adb kill-server | |
adb start-server | |
for /f "delims=" %%i in ('adb jdwp') do set pid=%%i | |
adb -d forward tcp:29882 jdwp:%pid% | |
jdb -J-Duser.home=. -connect com.sun.jdi.SocketAttach:hostname=localhost,port=29882 -sourcepath %* |
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
#!/usr/bin/python | |
import random | |
def simulate(): | |
start = 1200 | |
elo = start | |
elo40 = elo | |
elo100 = elo | |
elo500 = elo | |
k = 80 |
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 sbt._ | |
import sbt.Keys._ | |
import AndroidKeys._ | |
object ComplexBuild extends Build { | |
lazy val rootSettings = Seq( | |
packageT in Compile <<= packageT in Android in app, | |
packageRelease <<= packageRelease in Android in app, | |
packageDebug <<= packageDebug in Android in app, |
OlderNewer