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 example | |
| import akka.Done | |
| import akka.actor.typed.scaladsl.{ActorContext, Behaviors, StashBuffer, TimerScheduler} | |
| import akka.actor.typed.{ActorRef, Behavior, SupervisorStrategy} | |
| import akka.pattern.StatusReply | |
| import org.scalablytyped.runtime.StringDictionary | |
| import typings.cheerio.cheerioMod.Cheerio | |
| import typings.cheerio.mod.Node | |
| import typings.devtoolsProtocol.mod.Protocol.Network.ResourceType |
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 example | |
| import akka.actor.typed.scaladsl.{ActorContext, Behaviors, StashBuffer} | |
| import akka.actor.typed.{ActorRef, Behavior, SupervisorStrategy} | |
| import akka.pattern.StatusReply | |
| import akka.util.Timeout | |
| import typings.node.bufferMod.global.Buffer | |
| import typings.puppeteer.mod.Browser | |
| import java.util.UUID.randomUUID |
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
| addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.7.1") | |
| addSbtPlugin("org.scalablytyped.converter" % "sbt-converter" % "1.0.0-beta36") |
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
| lazy val root = (project in file(".")) | |
| .enablePlugins(ScalablyTypedConverterPlugin) | |
| .configure(baseSettings, bundlerSettings, nodeProject) | |
| .settings( | |
| useYarn := true, | |
| name := "squid-game", | |
| scalaJSUseMainModuleInitializer := true, | |
| libraryDependencies += ("org.akka-js" %%% "akkajsactortyped" % "2.2.6.14").cross(CrossVersion.for3Use2_13), | |
| libraryDependencies += ("org.akka-js" %%% "akkajstypedtestkit" % "2.2.6.14" % "test").cross(CrossVersion.for3Use2_13), | |
| libraryDependencies += ("org.akka-js" %%% "akkajsactorstreamtyped" % "2.2.6.14").cross(CrossVersion.for3Use2_13), |
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 PropTypes from 'prop-types'; | |
| import React, {useCallback, useEffect, useState} from "react"; | |
| import { | |
| Badge, | |
| Box, Button, | |
| Checkbox, | |
| Container, | |
| Divider, | |
| Grid, | |
| InputAdornment, |
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 PropTypes from 'prop-types'; | |
| import React, {useCallback, useEffect, useState} from "react"; | |
| import { | |
| Badge, | |
| Box, Button, | |
| Checkbox, | |
| Container, | |
| Divider, | |
| Grid, | |
| IconButton, |
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 akka.actor.typed.scaladsl.Behaviors | |
| import akka.actor.typed.{ActorRef, Behavior} | |
| import scala.collection.immutable | |
| import scala.concurrent.duration.{DurationLong, FiniteDuration} | |
| import scala.reflect.ClassTag | |
| trait MessageCollector[Aggregate <: Timestamp] { | |
| type Message <: Timestamp |
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
| .... | |
| val days = 3 | |
| val lastTimestamp = OffsetDateTime | |
| .ofInstant( | |
| Instant | |
| .ofEpochSecond(timestamp), | |
| ZoneId.systemDefault() | |
| ) | |
| .truncatedTo(ChronoUnit.DAYS) | |
| val nextScheduleTimestamp = lastTimestamp.plusSeconds(days * 24 * 60 * 60) |
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 models | |
| import java.time.temporal.ChronoUnit | |
| import java.time.{Instant, OffsetDateTime, ZoneId} | |
| import akka.actor.typed.scaladsl.{ | |
| ActorContext, | |
| Behaviors, | |
| StashBuffer, | |
| TimerScheduler |
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 akka.actor.typed.scaladsl.{ | |
| ActorContext, | |
| Behaviors, | |
| StashBuffer, | |
| TimerScheduler | |
| } | |
| import akka.actor.typed.{ActorRef, Behavior, SupervisorStrategy} | |
| import akka.pattern.StatusReply | |
| import models.{Business, BusinessUser, UserProfile} | |
| import play.api.Configuration |