| groupId | artifactId | published for | version |
|---|---|---|---|
| ru.pavkin | scala-js-momentjs | scala-js-momentjs_sjs1_2.12 | 0.10.3 |
| ru.pavkin | scala-js-momentjs | scala-js-momentjs_sjs1_2.13 | 0.10.3 |
| com.github.mpilquist | simulacrum | - | - |
| org.typelevel | cats-core | cats-core_sjs1_2.12 | 2.2.0-M1 |
| org.typelevel | cats-core | cats-core_sjs1_2.13 | 2.2.0-M1 |
| org.typelevel | alleycats-core | alleycats-core_sjs1_2.12 | 2.2.0-M1 |
| org.typelevel | alleycats-core | alleycats-core_sjs1_2.13 | 2.2.0-M1 |
| org.typelevel | cats-mtl-core | [cats-mtl-core_sjs1_2.1 |
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
| services... | |
| cassandra-seed: | |
| container_name: cassandra-seed-node | |
| image: cassandra:3.11.0 | |
| ports: | |
| - "9042:9042" # Native transport | |
| - "7199:7199" # JMX | |
| - "9160:9160" # Thrift clients |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
| mport org.scalacheck.Properties | |
| import org.scalatest.FunSuiteLike | |
| import org.scalatest.prop.Checkers | |
| trait Discipline extends Checkers { self: FunSuiteLike => | |
| def checkAll(name: String, ruleSet: Laws#RuleSet): Unit = { | |
| for ((id, prop) ← ruleSet.all.properties) | |
| test(name + "." + id) { |
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.awt.Robot | |
| import java.awt.event.{InputEvent, KeyEvent} | |
| import scala.util._ | |
| object KeyPresser extends App { | |
| import KeyEvent._ | |
| val robot = new Robot() |
Miles Sabin recently opened a pull request fixing the infamous SI-2712. First off, this is remarkable and, if merged, will make everyone's life enormously easier. This is a bug that a lot of people hit often without even realizing it, and they just assume that either they did something wrong or the compiler is broken in some weird way. It is especially common for users of scalaz or cats.
But that's not what I wanted to write about. What I want to write about is the exact semantics of Miles's fix, because it does impose some very specific assumptions about the way that type constructors work, and understanding those assumptions is the key to getting the most of it his fix.
For starters, here is the sort of thing that SI-2712 affects:
def foo[F[_], A](fa: F[A]): String = fa.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
| /** | |
| * Type class that extracts information about all fields into Map[String, String]. | |
| * It's uses `PlainStringRecordValue` instances for particular type of the field to obtain string representation. | |
| * @tparam T | |
| */ | |
| @typeclass trait PlainStringRecord[T] { | |
| def plainStringRecord(t: T): Map[String, 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 shapeless.{:+:, ::, CNil, Coproduct, Generic, HList, HNil, Inl, Inr} | |
| import simulacrum.typeclass | |
| import language.implicitConversions | |
| case class UserId(value: UUID) extends AnyVal | |
| /** | |
| * Type class for extracting field with UserId type from case class. | |
| * | |
| * @tparam T |
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
| #include <string.h> | |
| #include <stdio.h> | |
| void func(char *arg1) { | |
| int authenticated = 0; | |
| char buffer[4]; | |
| strcpy(buffer, arg1); | |
| if (authenticated) { | |
| printf("Authenticated via buffer overflow"); | |
| } |
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.scalatest._ | |
| import org.scalatest.events._ | |
| import org.slf4j.Logger | |
| trait SuiteRetries extends SuiteMixin { | |
| this: Suite => | |
| def logger: Logger | |
| private def runWithCustomReporter(testName: Option[String], args: Args) = { |
NewerOlder