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
module.exports = function (eleventyConfig) { | |
eleventyConfig.addPassthroughCopy("images"); | |
eleventyConfig.addPassthroughCopy("admin"); | |
eleventyConfig.addPassthroughCopy("CSS"); | |
eleventyConfig.addPassthroughCopy("Javascript"); | |
eleventyConfig.addWatchTarget("images"); | |
eleventyConfig.addWatchTarget("admin"); | |
eleventyConfig.addWatchTarget("CSS"); | |
eleventyConfig.addWatchTarget("Javascript"); |
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.util.continuations._ | |
// might need to be compiled and run separately due to a bug in App | |
object ContinuationsExample extends App { | |
def prompt(display: String): Boolean = { | |
print(display + " (Y/N) ") | |
Console.readLine.trim.headOption match { | |
case Some('Y') | Some('y') => true | |
case Some('N') | Some('n') => false |
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
func() = { | |
def rec(i: Int, acc: List[Array[Byte]]) { | |
if (i == 0) | |
acc | |
else | |
channel.basicGet(queueName, true) match { | |
case x: GetResponse => rec(i - 1, x.getBody +: acc) | |
case _ => acc | |
} | |
} |
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
func() = { | |
Stream.range(0, noItems) map { | |
_ => channel.basicGet(queueName, true) match { | |
case x: GetResponse => Some(x.getBody) | |
case _ => None | |
} | |
} takeWhile (_.isDefined) toList | |
} |