Skip to content

Instantly share code, notes, and snippets.

View fullrequesthandler.scala
object FullRequestHandler {
implicit val executionContext =
type Payload = ByteBuffer
val handler = new FullRequestHandler[ByteBuffer, String, String, Option[String]] {
val clients = mutable.HashSet.empty[NotifiableClient[String, Option[String]]]
val events = mutable.ArrayBuffer.empty[String]
override val initialState = Future.successful(None)
View error_akka.scala
package myceliumHandler
import scarango_catalogs.{CInputs, CItemInputs, CItemRecipe, CQueryArticulo, CRecipe, CTableScarango, database}
import scarango_catalogs.{CArticulo, CItemsMyCelium}
import scarango_catalogs.ActionStock._
import create_pdf_files.CreatePdf
import types_scarango.TypeDocument
import types_scarango.{Articulo, ArticuloStock, Inputs, ItemInput, ItemRecipe, ItemRequisition, Recipe, Requisition, User}
import types_scarango.ItemTypeTC
import scarango_catalogs.{CArticuloStock, CItemRecipeMyCelium, CStock2, CTypeDocument, CUsers}
View akka-actor.scala
ws_taak [ERROR] [11/03/2022 15:45:08.174] [] [] Websocket handler failed with class scala.collection.immutable.$colon$colon cannot be cast to class java.lang.String (scala.collection.immutable.$colon$colon is in unnamed module of loader 'app'; java.lang.String is in module java.base of loader 'bootstrap'
ws_taak java.lang.ClassCastException: class scala.collection.immutable.$colon$colon cannot be cast to class java.lang.String (scala.collection.immutable.$colon$colon is in unnamed module of loader 'app'; java.lang.String is in module java.base of loader 'bootstrap')
ws_taak at boopickle.BasicPicklers$StringPickler$.pickle(Pickler.scala:136)
ws_taak at boopickle.PickleState.pickle(Pickler.scala:421)
ws_taak at RESTServer$Pickler$macro$1$1$Pickler$macro$9$1$.pickle(RESTServer.scala:82)
ws_taak at RESTServer$Pickler$macro$1$1$Pickler$macro$9$1$.pickle(RESTServer.scala:82)
ws_taak at boopickle.CompositePickler.pickle(CompositePicklers.
View errores.scala
[info] Resolved dependencies
[warn] Note: Unresolved dependencies path:
[error] sbt.librarymanagement.ResolveException: Error downloading com.github.cornerman.colibri:colibri-monix_sjs1_2.13:9add104
[error] Not found
[error] Not found
[error] not found: /home/elyphas/.ivy2/localcom.github.cornerman.colibri/colibri-monix_sjs1_2.13/9add104/ivys/ivy.xml
[error] not found:
[error] not found:
[error] Error downloading com.github.cornerman.colibri:colibri_sjs1_2.13:0b2299d
View migration.scala
case class BatchAndExpiration(batch: String, expiration: Long)
case class ItemInputScarango (
entidad: String,
batchAndExpiration: Option[BatchAndExpiration],
_id: Id[ItemInputScarango] =
) extends Document[ItemInputScarango]
object ItemInputScarango extends DocumentModel[ItemInputScarango] {
override implicit val rw: ReaderWriter[ItemInputScarango] = ccRW
View repository.scala
class ComparativeRepository {
val hdlProcessingSideEffects = Handler.create[String]("").unsafeRunSync()
def processingSideEffects = {
case "" => None
case msg => Some(div( clear.both, cls:="processingSideEffects", msg))
val storeComparative = new StoreComparative()
View map over observable.scala
val eventDocument = PublishSubject[(Inputs, EventsDoobieWillDo)]()
//Old, New
val onEventDocument: Observable[Either[String, (Inputs, Inputs, EventsDoobieResult)]] =
eventDocument.dump("onEventDocument:").mapEval { case (oldItem, event) =>
Task.suspend {
Task.fromFuture {
val payload = Pickle.intoBytes[(Inputs, EventsDoobieWillDo)]((oldItem, event))
View queryArango.scala
val qryOutputs = aqlu"""
FOR item IN tblrecipe_details
LET item_por_pieza = (
FOR i IN tbl_claves_por_pieza FILTER i.cve_articulo == item.key_item RETURN i
FOR itemPre IN ( LENGTH(item_por_pieza) > 0 ? item_por_pieza: [ { /* no match exists*/ } ] )
LET recipesFechas = (
View arango.scala
class ConnectionScarango {
implicit val ec: scala.concurrent.ExecutionContext =
Profig.initConfiguration().map { in => println(in) }
lazy val db = new ArangoDB(credentials = Some(Credentials("root", "jctaurys")))
lazy val dbExample = db.api.db("example")
//lazy val collection = dbExample.collection("proveedores")
View arangodb.scala
/* ArangoDB
"_key" : "2021-88888",
"_id" : "tblrecipe/2021-88888",
"_rev" : "_cRMJ_Yi---",
"fiscal_period" : 2021,
"folio" : "88888",
"date" : 1620049658325,
"id_area" : "3",