I hereby claim:
- I am vdebergue on github.
- I am atezsouai (https://keybase.io/atezsouai) on keybase.
- I have a public key ASCa3Dqevo_nYUKDHI1HPYFniiJe0XVS9_CBwGlVx43qtAo
To claim this, I am signing this object:
use async_graphql::{InputType, InputValueError}; | |
use serde::{de::DeserializeOwned, Deserialize, Serialize, Serializer}; | |
#[derive(Debug, Eq, PartialEq, Clone)] | |
pub enum MaybeUpdateOrDelete<T> { | |
Update(T), | |
Delete, | |
Empty, | |
} |
object Combs extends App { | |
/* | |
findAndPrint(7, 2) | |
findAndPrint(14, 3) | |
findAndPrint(11, 2) | |
findAndPrint(41, 8) | |
findAndPrint(41, 8) | |
*/ | |
// 1 |
#! /bin/bash | |
set -x | |
set -e | |
FOLDER="$1" | |
MAX_BITRATE=3000000 | |
if [ ! -d "$FOLDER" ]; then | |
echo "Please input a folder" | |
exit 1 |
I hereby claim:
To claim this, I am signing this object:
Restaurante O Trigueirinho
https://goo.gl/maps/YDdBkcXTnZQ2
Bon petit resto pas très cher, ambiance familiale
Sacramento do Chiado
https://goo.gl/maps/PDTQ7GZnRny
Resto classe, très bon poulpe et porc confit
package core.controllers.utils | |
import akka.stream.Materializer | |
import akka.util.ByteString | |
import play.api.libs.streams.Accumulator | |
import play.api.mvc._ | |
import scala.concurrent.Future | |
/** | |
* NAction are a replacement to play.api.mvc.Action. |
Alors déjà premier point: c'est très cher l'Islande, prévoir un x2 sur les prix par rapport à la France pour tout ce qui est restaurant, hôtel ou en rapport avec le tourisme
sealed trait RedisOverflowStrategy | |
object RedisOverflowStrategy { | |
case object DropHead extends RedisOverflowStrategy | |
case object DropBuffer extends RedisOverflowStrategy | |
case object DropNew extends RedisOverflowStrategy | |
case object Fail extends RedisOverflowStrategy | |
} | |
class RedisSourceStage(sedisPool: org.sedis.Pool, channel: String, bufferSize: Int, overflowStrategy: RedisOverflowStrategy) extends GraphStage[SourceShape[String]] { | |
val out: Outlet[String] = Outlet("Redis.out") |
def withTransaction[A](block: Connection => Future[A]): Future[A] = { | |
val connection = db.getConnection(autocommit = false) | |
try { | |
val fut = block(connection) | |
fut.onComplete { | |
case Success(res) => | |
connection.commit() | |
connection.close() | |
case Failure(exe) => | |
connection.rollback() |
package play.api.mvc | |
// needed to access protected method ActionRefiner#refine | |
import scala.concurrent.Future | |
import scala.language.higherKinds | |
trait ActionPartial[R[_], P[_]] extends ActionRefiner[R, P] { self => | |
def partial[A]: PartialFunction[R[A], Future[Either[Result, P[A]]]] | |
def refine[A](request: R[A]): Future[Either[Result, P[A]]] = partial(request) |