Code blocks:
<div>
hello!
</div>| import scala.io.Source | |
| object Triangles extends App { | |
| val filename = "input.txt" | |
| val parser = "\\s*(\\d+)\\s*(\\d+)\\s*(\\d+)".r | |
| def isValid(a: String, b: String, c: String): Boolean = { | |
| val sorted = Vector(a, b, c).map(_.toInt).sorted | |
| sorted(2) < (sorted(1) + sorted(0)) | |
| } |
| BEARER='authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhdWlkIjoiQlUxMTEwMTAwMDAxMTAwODc0MSIsIm1haWQiOiJNQTExMTAxMDAwMDExMDA4NzM3Iiwic3ViZCI6InRlc3Rmb3JjZSIsInVzZXJfaWQiOiJhdXRoMHxCVTExMTAxMDAwMDExMDA4NzQxIiwiZW1haWwiOiJ0ZXN0Zm9yY2VAYml6b2RvLmNvbSIsIm5hbWUiOiJGb3JjZSBBd2FrZW5zIiwiaXNzIjoiaHR0cHM6Ly9zZWFtbGVzc2RvY3NkZXYuYXV0aDAuY29tLyIsInN1YiI6ImF1dGgwfEJVMTExMDEwMDAwMTEwMDg3NDEiLCJhdWQiOiJHRk54dWhSa0sweDRwbkVocmJSbzkzUDBCNDBBdlFmMyIsImV4cCI6MTQ4OTAyMzQ0MiwiaWF0IjoxNDg4OTg3NDQyfQ.DbcKYHvjp3GPM0hIO2vsScqJ7eXB26GWmkUUPMRVgVw' | |
| USER_AGENT='user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36' | |
| # curl 'http://localhost:9000/selectors/forms/replace.json' -H 'origin: https://localhost:3000' -H 'accept-encoding: gzip, deflate, br' -H 'x-requested-with: XMLHttpRequest' -H 'accept-language: en-US,en;q=0.8' -H "$BEARER" -H 'content-type: application/json' -H 'accept: */*' -H 'referer: https://localhost:3000/ng/lobby' -H 'author |
| import scala.io.Source | |
| object Obscurity extends App { | |
| type ParsedLine = (String, Integer, String) | |
| val filename = "input.txt" | |
| // parsing "aaaaa-bbb-z-y-x-123[abxyz]", where the first part has an | |
| // arbitrary number of hyphenated sections | |
| val parser = "([\\w-]+)-(\\d+)\\[(\\w{5})\\]".r |
| object Hacking extends App { | |
| val input = "ojvtpuvg" | |
| val messageDigest = java.security.MessageDigest.getInstance("md5") | |
| val emptyPassword: Seq[Option[Char]] = Seq(None, None, None, None, None, None, None, None) | |
| def fiveZeroesIterator(id: String): Iterator[String] = { | |
| Iterator.from(0) | |
| .map {id + _} |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>Hangman Starter</title> | |
| </head> | |
| <body> | |
| <div id="container"> | |
| <p id="message"></p> | |
| <img id="hangman" src="https://github.com/ScriptEdcurriculum/solutions2016/blob/master/year1/unit13/project2/images/Hangman-0.png?raw=true"/> |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title> Hangman Solution</title> | |
| </head> | |
| <body> | |
| <div id="container"> | |
| <p id="message"></p> | |
| <img id="hangman" src="https://github.com/ScriptEdcurriculum/solutions2016/blob/master/year1/unit13/project2/images/Hangman-0.png?raw=true"/> | |
| <div id="word"></div> |