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
export function createOneDocument() { | |
const data = { | |
"url": "https://firebasestorage.googleapis.com/v0/b/louvcap-eea66.appspot.com/o/public%2FpdfTemplates%2FpdfBackoffice%2Fneo_bulletin-souscription.pdf?alt=media&token=9e026601-95cf-442c-9533-5e7a4eba8ff1", | |
"fields": [ | |
{ | |
"text": "true", | |
"type": "CheckBox", | |
"pages": "1", | |
"fieldname": "Check Box27." | |
}, |
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 React from "react" | |
import { createUseStyles, useTheme } from "react-jss" | |
import { Integer } from "../../model/commonTypes" | |
import { Theme } from "../../theme" | |
import { injectStyles, StylableComponent } from "./utils" | |
const useStyles = createUseStyles((t: Theme) => { | |
return { | |
lab: { |
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
<button class="gf_add-to-cart product-form-product-template button btn gf_button-stretch" id="" name="add" onclick="" type="submit"> | |
<span class="AddToCartText">ADD TO CART</span> | |
<div class="bk-social-proof-embed"> | |
<!--v-if--> | |
</div> | |
<div class="bk-stock-countdown"> | |
<div class="stock-countdown-message"> | |
<div class="message"> | |
<span style="font-family:Arial,Helvetica,sans-serif;font-size:18px;color:#4f5154;text-align:left;">Only 7020 items left in stock!</span> | |
<!--v-html--> |
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
/* for ammonite users | |
interp.load.ivy("com.typesafe.akka" %% "akka-stream-kafka" % "0.22") | |
interp.load.ivy("com.typesafe.play" %% "play-json" % "2.6.7") | |
@ | |
*/ | |
import scala.concurrent.{ ExecutionContext, Future } | |
import scala.concurrent.ExecutionContext.Implicits.global | |
import scala.util.{ Failure, Success } |
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
#! /bin/sh | |
if [ $# -lt 2 ]; then | |
echo "$0 container topic" | |
exit 1 | |
fi | |
# listener | |
CONTAINER="$1" | |
TOPIC="$2" |
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
/* for ammonite users | |
interp.load.ivy("org.typelevel" %% "cats-core" % "1.0.1") | |
interp.configureCompiler(_.settings.YpartialUnification.value = true) | |
@ | |
*/ | |
import cats.instances.list._ | |
import cats.instances.either._ | |
import cats.syntax.traverse._ |
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 scala.io.Source | |
def fileToString(fileName: String, folder: String): String = | |
Source.fromURL(getClass.getClassLoader.getResource(folder + fileName)).mkString |
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
0x7adf277b6d4e4034fd1d230b9972824418a73566 |
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
trait Functor[F[_]] { | |
def map[A,B](fa: F[A])(f: A => B): F[B] | |
def distribute[A,B](fab: F[(A, B)]): (F[A], F[B]) = | |
(map(fab)(_._1), map(fab)(_._2)) | |
def codistribute[A,B](e: Either[F[A], F[B]]): F[Either[A, B]] = e match { | |
case Left(fa) => map(fa)(Left(_)) | |
case Right(fb) => map(fb)(Right(_)) | |
} |
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
// This new data type will employ Scala’s type system to gain two static guarantees. We want our code to not compile if it violates these invariants: | |
// - If we hold a reference to a mutable object, then nothing can observe us mutat- ing it. | |
// - A mutable object can never be observed outside of the scope in which it was created. | |
/** | |
* For state thread, state transi- tion, state token, or state tag | |
* A local-effects monad. | |
* | |
* A: type of the mutable value. | |
* S: represents the ability to mutate state |
NewerOlder