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 ircscalabot; | |
| import java.io.BufferedReader; | |
| import java.io.InputStreamReader; | |
| import java.net.Socket; | |
| /** | |
| * Created by Anthony on 12/21/2015. | |
| */ | |
| public class Bot { |
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
| <?php | |
| namespace Dog\Clock; | |
| class Clock | |
| { | |
| function tick() | |
| { | |
| while (true) | |
| { |
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 scala | |
| /** | |
| * Created by Anthony on 12/20/2015. | |
| */ | |
| object Learning { | |
| implicit class toList(x:String) { | |
| def capitalizeAll() = { | |
| val strList = x.splitAt(1).productIterator.toList.map(_.toString()) |
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 ircscalabot | |
| import java.io._ | |
| import java.net.Socket | |
| object Bot extends App { | |
| val scalabot = new Bot("scalaevalbot", "", "irc.freenode.net", 6667, List("#botwars"), '$') | |
| scalabot.connect() | |
| } |
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 ircscalabot | |
| import java.io._ | |
| import java.net.Socket | |
| /** | |
| * Created by Anthony on 12/19/2015. | |
| */ |
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 scala.concurrent._ | |
| import ExecutionContext.Implicits.global | |
| import scala.concurrent.duration._ | |
| object Dog extends App { | |
| def go() = { | |
| val futures = List( |
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 CommandList { | |
| def hello(): String = { | |
| return "Hello" | |
| } | |
| } | |
| val command = "hello" | |
| // somehow call the method "hello" using the variable command |
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 scala.concurrent.ExecutionContext.Implicits.global | |
| import scala.actors.Future | |
| import scala.concurrent.Future | |
| import scala.util.{Failure, Success, Random} | |
| // Yes I know not every import is used | |
| object LearningFuture extends App { | |
| val f = Future { | |
| for (i <- 1 to 10) { | |
| println("Hello") |
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.util.*; | |
| import java.util.stream.Collectors; | |
| /** | |
| * Created by Anthony on 12/18/2015. | |
| */ | |
| public class Solution { | |
| public static void main(String[] args) { | |
| List<String> numbers = new ArrayList<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
| import java.util.*; | |
| import java.util.stream.Collectors; | |
| /** | |
| * Created by Anthony on 12/18/2015. | |
| */ | |
| public class Solution { | |
| public static void main(String[] args) { | |
| List<String> numbers = new ArrayList<String>(); |