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
| abstract sealed class Beat | |
| case object Rest extends Beat | |
| case object Note extends Beat | |
| case class Note(pitch: Int, duration: Int) extends Beat | |
| case class Pattern(beats: Seq[Beat]) | |
| def formatBeat(b: Beat): String = b match { | |
| case Rest => " _ " | |
| case Note => " X " |
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
| class LCDDigit(val firstRow: String, val secondRow: String, val thirdRow: String) |
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
| case class LCDDigit(val firstRow: String, val secondRow: String, val thirdRow: String) { | |
| def formatDigit(): Unit = { | |
| productIterator.foreach(i => println(i)) | |
| } | |
| } |
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 lsug | |
| /** | |
| * Created by rich on 17/09/15. | |
| */ | |
| class LCDDigit(val firstRow: String, val secondRow: String, val thirdRow: String) {} | |
| object zero extends LCDDigit( | |
| firstRow = "._.", | |
| secondRow = "|.|", |
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 lsug | |
| import org.scalatest.FunSuite | |
| /** | |
| * Created by rich on 17/09/15. | |
| */ | |
| class LCDFormatterTest extends FunSuite { | |
| val formatter = new LCDFormatter |
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 lsug | |
| class LCDFormatter(){ | |
| val digitMapping = Map( | |
| 0 -> zero, | |
| 1 -> one, | |
| 2 -> two, | |
| 3 -> three, | |
| 4 -> four, | |
| 5 -> five, |
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
| pandoc --to=docx -o document.docx wiki.md |
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
| $ tmux new -s dev |
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
| if ( 'text-image' == $format ) | |
| $link_item .= '<p> <a href="' . get_bloginfo($rss_type) . '" title="' . esc_attr( $subscribe_to ) . '"><br/>' . esc_html__('RSS - ' . $type_text, 'jetpack'). '</a></p>'; |
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 com.richashworth.testingutils.mocking; | |
| import org.junit.Test; | |
| import java.util.HashMap; | |
| import java.util.Map; | |
| import static junit.framework.Assert.assertEquals; | |
| public class FootballerTest2 { |