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
[Unit] | |
Description=Jamulus Server %i | |
Documentation=http://jamulus.drealm.info/jamulus | |
Documentation=https://github.com/corrados/jamulus/wiki/Server-Troubleshooting | |
After=network-online.target | |
Wants=network-online.target | |
[Install] | |
WantedBy=multi-user.target |
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 java.net._ | |
import java.io._ | |
import scala.io._ | |
object BattleshipsClient extends App { | |
val s = new Socket(InetAddress.getByName("localhost"), 8000) | |
lazy val in = new BufferedSource(s.getInputStream()).getLines() | |
val out = new PrintStream(s.getOutputStream()) |
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
package adventure | |
import scala.collection.mutable.{ Map => MMap } | |
trait Direction | |
case object North extends Direction | |
case object South extends Direction | |
case object East extends Direction | |
case object West extends Direction | |
case object Wrong extends Direction |
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
package wlhn | |
/** | |
* West London Hack Night 2014-08-13 | |
* Finding the minimum distance | |
* between any two words in a Shakespeare | |
* play | |
* http://en.wikipedia.org/wiki/Girvan%E2%80%93Newman_algorithm | |
* http://rosettacode.org/wiki/Dijkstra%27s_algorithm#Scala (with amendments) | |
*/ |
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 java.net._ | |
import scala.io.BufferedSource | |
import java.io._ | |
object HackJune extends App { | |
val addr = "10.112.145.210" | |
val socket = new Socket(InetAddress.getByName(addr), 8000) | |
lazy val source = new BufferedSource(socket.getInputStream()).getLines() | |
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 Data.List (minimumBy) | |
import Debug.Trace (trace) | |
data Node = Node {x::Int, y::Int} deriving (Show, Eq) | |
data Terrain = Terrain {startNode::Node, endNode::Node, obstacleNodes::[Node]} deriving (Show) | |
isBlocked :: Node -> Terrain -> Bool | |
isBlocked dest t = elem dest (obstacleNodes t) |
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
package wlhacknight | |
import scala.io.Source | |
import java.io.File | |
import java.util.Arrays | |
import scala.collection.mutable.ArrayBuffer | |
import scala.collection.immutable.HashMap | |
import scala.util.Random | |
/** |