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
import cats._ | |
import cats.data._ | |
import cats.effect._ | |
import cats.syntax.all._ | |
import doobie._ | |
import doobie.syntax.stream._ | |
import fs2._ | |
object Streaming { | |
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
import cats._ | |
import doobie._ | |
import doobie.implicits._ | |
import liquibase.Liquibase | |
import liquibase.database.DatabaseFactory | |
import liquibase.database.jvm.JdbcConnection | |
import liquibase.resource.ClassLoaderResourceAccessor | |
object LiquibaseMigration { | |
def run[F[_]: Monad](xa: Transactor[F]): F[Unit] = |
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
<?xml version='1.0' encoding='UTF-8'?> | |
<?p2f version='1.0.0'?> | |
<p2f version='1.0.0'> | |
<ius size='11'> | |
<iu id='org.aspectj.feature.group' name='AspectJ Compiler' version='1.9.0.201803261956'> | |
<repositories size='1'> | |
<repository location='http://download.eclipse.org/tools/ajdt/47_aj9/dev/update'/> | |
</repositories> | |
</iu> | |
<iu id='org.eclipse.ajdt.feature.group' name='AspectJ Development Tools' version='2.2.4.201803261956'> |
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
java.lang.InternalError: Malformed class name | |
at java.lang.Class.getSimpleName(Class.java:1330) | |
at java.lang.Class.getCanonicalName(Class.java:1399) | |
at sbt.internal.inc.ClassToAPI$.classCanonicalName(ClassToAPI.scala:71) | |
at sbt.internal.inc.ClassToAPI$.reference(ClassToAPI.scala:324) | |
at sbt.internal.inc.ClassToAPI$.reference(ClassToAPI.scala:350) | |
at sbt.internal.inc.ClassToAPI$.$anonfun$referenceP$1(ClassToAPI.scala:340) | |
at sbt.internal.inc.ClassToAPI$.arrayMap(ClassToAPI.scala:43) | |
at sbt.internal.inc.ClassToAPI$.referenceP(ClassToAPI.scala:340) | |
at sbt.internal.inc.ClassToAPI$.reference(ClassToAPI.scala:348) |
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 pl.caltha.commons; | |
import java.util.Collections; | |
import java.util.Iterator; | |
import java.util.LinkedList; | |
import java.util.List; | |
import java.util.NoSuchElementException; | |
import java.util.Optional; | |
import java.util.function.BiFunction; | |
import java.util.function.BinaryOperator; |
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
import akka.stream._ | |
import akka.stream.stage._ | |
/** | |
* Fan-out the stream of `scala.util.Either[L, R]` elements to `L` and `R` streams. | |
* | |
* '''Emits when''' emits when an element is available from the input and the chosen output has demand | |
* | |
* '''Backpressures when''' the currently chosen output back-pressures | |
* |
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
import akka.stream._ | |
import akka.stream.stage._ | |
/** | |
* A simple fan-out stage that will split incoming stream according to the results of a decider function. | |
* Outgoing streams may carry elements of different types. | |
* | |
* '''Emits when''' emits when an element is available from the input and both downstreams have demand | |
* | |
* '''Backpressures when''' any of the downstreams back-pressures |
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
object Euler11 { | |
def collect(grid: Array[Array[Int]], x: Int, y: Int, dx: Int, dy: Int, l: Int, acc: Seq[Int]): Seq[Int] = | |
if (l <= 0 || x < 0 || y < 0 || y >= grid.length || x >= grid(y).length) acc | |
else collect(grid, x + dx, y + dy, dx, dy, l - 1, grid(y)(x) +: acc) | |
def chains(grid: Array[Array[Int]], l: Int): Seq[Seq[Int]] = | |
for { | |
(dx, dy) <- Seq((1, 0), (0, 1), (1, 1), (-1, 1)) | |
y0 <- 0 until grid.length |
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
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDVI9M0049ELjww8YRTX4oUBTJfZb/2JBb3FfCWcLu8dCuazlTY+HD0z/gNVaT4AJtT/vau3ghJQaDEoP8a6azq5ssC4x0MTdGrCMYH6hZRPnQDN7Udy5A/9xS9mCI/eOjhZHya6YfwnXqEnzdP1v3dgeCpQT2+ABYvxEM/4wlj/Uv+P0xvvFLPwknCDO9ypamvY2mLd+nMts5ajDRx6F1qegzcfZ/hQ6wFcbw7LynA98t39U2Yffb+Duk79MiZ3OgYCzOlgfK0FQzEgPptTZmjR1AQ41BC22KfkSO4eietspXBPwUNSifFgSxfof7HmorERQfW/Ox46pA0ENW53QWJ rafal@arnica |
NewerOlder