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
FROM confluentinc/cp-kafka-connect-base:6.1.1 | |
RUN confluent-hub install --no-prompt hpgrahsl/kafka-connect-mongodb:1.1.0 \ | |
&& confluent-hub install --no-prompt microsoft/kafka-connect-iothub:0.6 \ | |
&& confluent-hub install --no-prompt wepay/kafka-connect-bigquery:1.1.0 \ | |
&& confluent-hub install --no-prompt confluentinc/kafka-connect-jdbc:latest \ | |
&& confluent-hub install --no-prompt confluentinc/kafka-connect-datagen:0.1.0 \ | |
&& confluent-hub install --no-prompt debezium/debezium-connector-postgresql:latest | |
# ----------- |
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
package com.sujit; | |
import java.util.List; | |
import java.util.concurrent.CompletableFuture; | |
import java.util.concurrent.ExecutionException; | |
record Person(int id, String name, List<Score> scores, Address address, Account account) { | |
} |
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
apiVersion: networking.istio.io/v1alpha3 | |
kind: VirtualService | |
metadata: | |
name: moviesservice | |
spec: | |
hosts: | |
- "*" | |
gateways: | |
- istio-gateway | |
http: |
This file has been truncated, but you can view the full file.
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
[{"productKey":149039373,"productName":"homely-seat-scribble","buyingPrice":10,"currentPrice":32,"recommendedPrice":65,"compName":"loose-seed-warn","compPrice":14,"region":"EAST"},{"productKey":149039373,"productName":"homely-seat-scribble","buyingPrice":10,"currentPrice":32,"recommendedPrice":65,"compName":"loose-seed-warn","compPrice":14,"region":"WEST"},{"productKey":149039373,"productName":"homely-seat-scribble","buyingPrice":10,"currentPrice":32,"recommendedPrice":65,"compName":"loose-seed-warn","compPrice":14,"region":"NORTH"},{"productKey":149039373,"productName":"homely-seat-scribble","buyingPrice":10,"currentPrice":32,"recommendedPrice":65,"compName":"loose-seed-warn","compPrice":14,"region":"SOUTH"},{"productKey":709644620,"productName":"mellow-lawyer-inventory","buyingPrice":25,"currentPrice":67,"recommendedPrice":44,"compName":"awake-marble-wind","compPrice":53,"region":"EAST"},{"productKey":709644620,"productName":"mellow-lawyer-inventory","buyingPrice":25,"currentPrice":67,"recommendedPrice":44, |
This file has been truncated, but you can view the full file.
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
[{"productKey":374,"productName":"childlike-studio-miss","buyingPrice":4,"currentPrice":83,"recommendedPrice":20,"compName":"messy-toys-soothsay","compPrice":45,"children":[{"productKey":374,"productName":"childlike-studio-miss","buyingPrice":4,"currentPrice":83,"recommendedPrice":20,"compName":"messy-toys-soothsay","compPrice":45,"region":"EAST"},{"productKey":374,"productName":"childlike-studio-miss","buyingPrice":4,"currentPrice":83,"recommendedPrice":20,"compName":"messy-toys-soothsay","compPrice":45,"region":"WEST"},{"productKey":374,"productName":"childlike-studio-miss","buyingPrice":4,"currentPrice":83,"recommendedPrice":20,"compName":"messy-toys-soothsay","compPrice":45,"region":"NORTH"},{"productKey":374,"productName":"childlike-studio-miss","buyingPrice":4,"currentPrice":83,"recommendedPrice":20,"compName":"messy-toys-soothsay","compPrice":45,"region":"SOUTH"}]},{"productKey":880,"productName":"flowery-cobweb-target","buyingPrice":22,"currentPrice":3,"recommendedPrice":21,"compName":"noiseless-desk- |
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
trait TupleQuery { | |
this: io.getquill.context.Context[_, _] => | |
def liftTuples[T1: Encoder, T2: Encoder](l: List[(T1, T2)]): Quoted[Query[(T1, T2)]] = | |
liftTuples(l, (t: (T1, T2)) => infix"(${lift(t._1)}, ${lift(t._2)})", null) | |
private def liftTuples[T, U](l: List[T], f: T => Quoted[Any], acc: Quoted[Query[U]]): Quoted[Query[U]] = { | |
l match { | |
case Nil => infix"".as[Query[U]] | |
case head :: Nil => infix"${f(head)}, $acc".as[Query[U]] |
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
//Scala | |
assert(books.filter{_.numberOfPages > 100}.take(2) == List(new Book("Refactoring", "Martin", 300), new Book("Extreme Programming", "Bob", 200))) | |
//Java 8 | |
assertThat(books.stream() | |
.filter(book -> book.getNumberOfPages() > 100) | |
.limit(2) | |
.collect(Collectors.toList()) | |
, is(Arrays.asList(new Book("Refactoring", "Martin", 300), new Book("Extreme Programming", "Bob", 200)))); |
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
//Scala | |
assert(books.find(_.name == "TDD") == Option(new Book("TDD", "Kent", 250))) | |
//Java 8 | |
assertThat(books.stream() | |
.filter(book -> book.getName().equals("TDD")) | |
.findFirst(), | |
is(Optional.of(new Book("TDD", "Kent", 250)))); | |
//Groovy |
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
//Scala | |
assert(books.filter((book: Book) => book.author == "Bob") == List(new Book("Clean Code", "Bob", 100), new Book("Extreme Programming", "Bob", 200))) | |
//Or | |
assert(books.filter(book => book.author == "Bob") == List(new Book("Clean Code", "Bob", 100), new Book("Extreme Programming", "Bob", 200))) | |
//Or | |
assert(books.filter(_.author == "Bob") == List(new Book("Clean Code", "Bob", 100), new Book("Extreme Programming", "Bob", 200))) | |
//Java | |
assertThat( |
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
List<Book> books = new ArrayList<Book>() { | |
{ | |
add(new Book("Clean Code", "Bob", 100)); | |
add(new Book("Refactoring", "Martin", 300)); | |
add(new Book("Extreme Programming", "Bob", 200)); | |
add(new Book("TDD", "Kent", 250)); | |
} | |
}; |
NewerOlder