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
| extension [A](inline value: A) { | |
| /** | |
| * Echoes the value of the given expression. | |
| * | |
| * Example: | |
| * {{{ | |
| * val foo = "Hi" | |
| * foo.echo // "foo=Hi" | |
| * }}} | |
| */ |
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 app.utils | |
| import cats.parse.{Parser as P, Parser0 as P0} | |
| import cats.syntax.show.* | |
| import scala.util.control.NonFatal | |
| /** | |
| * A parser that turns a string into a list of command line arguments, similar to how a shell would do it. | |
| * |
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 app.data | |
| import cats.effect.kernel.Resource | |
| import cats.effect.std.Semaphore | |
| import cats.effect.{Concurrent, IO, Ref, Sync, SyncIO} | |
| import cats.implicits.{toFlatMapOps, toFunctorOps} | |
| import cats.{Applicative, Functor, Monad, ~>} | |
| /** | |
| * [[Ref]] of [[A]] which relies on locking instead of compare-and-swap to provide concurrent access data safety. |
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
| use std::{pin::Pin, future::Future, task::{Context, Poll}}; | |
| use async_trait::async_trait; | |
| use pin_project::pin_project; | |
| use std::sync::Arc; | |
| #[async_trait] | |
| pub trait MyAsyncTrait: Send + Sync + Clone { | |
| async fn my_async_fn(&self); | |
| } |
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
| scala.MatchError: ContextualMethodType(List(x$3), List(TypeRef(TermRef(ThisType(TypeRef(NoPrefix,module class app)),object data),LogCorrelationId)), AppliedType(TypeRef(ThisType(TypeRef(NoPrefix,module class util)),class Either),List(TypeRef(TermRef(TermRef(ThisType(TypeRef(NoPrefix,module class <root>)),object scala),Predef),String), AppliedType(TypeRef(TermRef(ThisType(TypeRef(NoPrefix,module class <root>)),object scala),Option),List(TypeRef(TermRef(ThisType(TypeRef(NoPrefix,module class data)),object steam),SteamClientId)))))) (of class dotty.tools.dotc.core.Types$CachedMethodType) | |
| at dotty.tools.dotc.core.tasty.TreePickler.pickleNewType(TreePickler.scala:294) | |
| at dotty.tools.dotc.core.tasty.TreePickler.pickleType(TreePickler.scala:162) | |
| at dotty.tools.dotc.core.tasty.TreePickler.pickleTree(TreePickler.scala:625) | |
| at dotty.tools.dotc.core.tasty.TreePickler.pickleTpt(TreePickler.scala:319) | |
| at dotty.tools.dotc.core.tasty.TreePickler.pickleDef(TreePickler.scala:338) | |
| at dotty.tools.dotc.core.tasty.TreePickl |
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
| diff --git a/quill-sql/src/main/scala/io/getquill/util/Format.scala b/quill-sql/src/main/scala/io/getquill/util/Format.scala | |
| index 31e8e7e1..040690ad 100644 | |
| --- a/quill-sql/src/main/scala/io/getquill/util/Format.scala | |
| +++ b/quill-sql/src/main/scala/io/getquill/util/Format.scala | |
| @@ -120,7 +120,9 @@ object Format { | |
| linesTrimmedLast.mkString("\n") | |
| val formatted = | |
| - Try { | |
| + // We can't use `Try` here because it won't catch linking errors as those are considered |
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
| ### Unity 2020.3.40f1 | |
| ### -unityBuildTarget "GameCoreXboxOne" | |
| [build|2/9/2023 8:42:11 AM|00:07:45.1588570] Compiling shader "Hidden/ALINE/Surface" pass "Pass 2" (fp) | |
| [build|2/9/2023 8:42:11 AM|00:07:45.1591019] 1 / 1 variants left after stripping, processed in 0.00 seconds | |
| [build|2/9/2023 8:42:11 AM|00:07:45.1593342] starting compilation... | |
| [build|2/9/2023 8:42:11 AM|00:07:45.1596597] finished in 0.02 seconds. Local cache hits 0 (0.00s CPU time), remote cache hits 0 (0.00s CPU time), compiled 1 variants (0.02s CPU time), skipped 0 variants | |
| [build|2/9/2023 8:42:11 AM|00:07:45.1599886] Serialized binary data for shader Hidden/ALINE/Surface in 0.00s | |
| [build|2/9/2023 8:42:11 AM|00:07:45.1603637] gamecore_xboxone (total internal programs: 0, unique: 0) | |
| [build|2/9/2023 8:42:11 AM|00:07:45.1607149] Shader error in 'Hidden/ALINE/Surface': unknown type name 'sampler2D'; did you mean 'sampler'? at 11(1) (on gamecore_xboxone) |
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
| using System; | |
| using System.Diagnostics; | |
| using System.Runtime.InteropServices; | |
| using System.Text; | |
| using UnityEngine; | |
| using Debug = UnityEngine.Debug; | |
| public unsafe class TestInVsPointer : MonoBehaviour | |
| { | |
| // 8 * 8 = 64 bytes |
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
| using System; | |
| using FPCSharpUnity.core.dispose; | |
| using Quantum.Game.extensions; | |
| namespace Quantum; | |
| /// <summary> | |
| /// <para>Read-only interface for <see cref="CallbackDispatcher"/>.</para> | |
| /// | |
| /// <para> |
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 src = """ | |
| Card Transaction | |
| CRV*UAB ABUNDO, Vilnius, LT CD 0108 2022/01/12, 18:26 - €1.5 | |
| """ | |
| import java.time.LocalDateTime | |
| val Re = """^(.*?)(\d{4})/(\d\d)/(\d\d),\s*(\d\d):(\d\d)\s*(-)?\s*€([\d\\.]+)$""".r | |
| val amounts = src.linesIterator.sliding(2).withPadding("").flatMap { case Seq(prevLine, line) => | |
| if ( | |
| line.contains("Card Deposit") |