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.iteratrlearning.collections.examples._1_what_are_collections; | |
import java.util.AbstractCollection; | |
import java.util.Collection; | |
import java.util.Iterator; | |
public class CollectionExamples { | |
public static void main(String[] args) { |
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.iteratrlearning.collections.examples._4_sets; | |
import com.iteratrlearning.collections.examples.ProductFixtures; | |
import org.junit.Test; | |
import static com.iteratrlearning.collections.examples.ProductFixtures.*; | |
import static org.hamcrest.Matchers.containsInAnyOrder; | |
import static org.junit.Assert.assertThat; | |
public class ProductCatalogueTest { |
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 restaurant; | |
public class HeadChef { | |
private final Chef pastryChef; | |
private final Waiter waiter; | |
public HeadChef(Chef pastryChef, Waiter waiter) { | |
this.pastryChef = pastryChef; | |
this.waiter = waiter; | |
} |
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 abc | |
class LineEncoder: | |
def __init__(self, algorithm): | |
self.algorithm = algorithm | |
def encode(self, text): | |
words = text.split(" ") |
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 org.junit.Test; | |
import java.util.regex.Matcher; | |
import java.util.regex.Pattern; | |
import static org.hamcrest.CoreMatchers.containsString; | |
import static org.hamcrest.CoreMatchers.is; | |
import static org.hamcrest.MatcherAssert.assertThat; | |
import static org.junit.Assert.assertTrue; | |
import static org.junit.Assert.fail; |
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
on: [ push ] | |
env: | |
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }} | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 |
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
books = [ | |
{ | |
'id': 1, | |
'title': 'To Kill a Mockingbird', | |
'author': 'Harper Lee', | |
'publication_year': 1960, | |
'genre': 'Southern Gothic' | |
}, | |
{ | |
'id': 2, |
OlderNewer