-
Install the Scala plugin for Eclipse from Scala IDE. I use this update-site for scala 2.11 : http://download.scala-ide.org/sdk/lithium/e44/scala211/stable/site
-
Install this eclipse plugin for maven / m2e : http://alchim31.free.fr/m2e-scala/update-site
-
You can then import easily a Maven project from the provided pom.xml file
-
Right-click on the project, Configure > Add Scala Nature
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
FROM tomcat:7 | |
RUN curl -SL https://github.com/Activiti/Activiti/releases/download/activiti-5.17.0/activiti-5.17.0.zip -o activiti.zip \ | |
&& unzip activiti.zip \ | |
&& rm activiti.zip \ | |
&& cp activiti-5.17.0/wars/activiti-explorer.war webapps \ | |
&& rm -rf activiti-5.17.0 | |
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 Maps { | |
implicit class MergableMap[K](map: Map[K, _]) { | |
/** | |
* Override values from this with values from that. | |
*/ | |
def deepMerge(that: Map[K, _]): Map[K, _] = | |
(for (k <- map.keys ++ that.keys) yield { | |
val newValue = | |
(map.get(k), that.get(k)) match { |
Allows to change the default program Windows uses for filew with unknown file extension.
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
MatchStart(HeroChosen(Gul'dan,Warlock,false,1)) | |
HeroPowerDeclared(CS2_056,1) | |
CardEvent(,6,ADDED_TO_DECK,1) | |
CardEvent(,7,ADDED_TO_DECK,1) | |
CardEvent(,8,ADDED_TO_DECK,1) | |
CardEvent(,9,ADDED_TO_DECK,1) | |
CardEvent(,10,ADDED_TO_DECK,1) | |
CardEvent(,11,ADDED_TO_DECK,1) | |
CardEvent(,12,ADDED_TO_DECK,1) | |
CardEvent(,13,ADDED_TO_DECK,1) |
Open with scala-js-fiddle for a demo
Implementation of Hearthstone mulligans with scala-js-fiddle.
Examples
- There are 2 important cards in a deck, but you don't keep them in the mulligan phase (let's say 2 Doomguards in zoo). What is the probability to have at least one in hand at a given turn, if the player did not start the game ?
- You think an opponent plays one Sylvanas. You started the game. What is the probability he has drawn it, assuming he does not keep it in the mulligans ?
- You play 4 acceleration (Innervate, Wild Growth) cards. By mulliganing everything except those, what is the probability to have exactly one in starting hand ?
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 breeze.linalg._ | |
import scala.collection.mutable.Map | |
object FrequencyTable extends App { | |
val lines = io.Source.fromFile("t:/frequency.csv").getLines.take(10000000).toList ++ | |
(List("washington", "taxes", "treasury") map { w => s"test,$w,1" }) | |
val docs = Map.empty[String, Int] | |
val words = Map.empty[String, Int] | |
var docCount = -1 | |
var wordCount = -1 |
Open with scalafiddle for a live demo
Implementation of Langton's ant with scala-js-fiddle
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
# Gitter / Travis integration | |
In the [.travis.yml][1] file : | |
webhooks: | |
urls: | |
- https://webhooks.gitter.im/e/3069b7e759e1d02548c1 | |
on_success: always # options: [always|never|change] default: always | |
on_failure: always # options: [always|never|change] default: always | |
on_start: false # default: false |