This file contains 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
// ReSharper disable all | |
using System; | |
namespace Quantum | |
{ | |
public partial struct AbilityTargetData | |
{ | |
public static AbilityTargetData newCharacter(EntityRefCharacter _character) | |
{ | |
var data = default(AbilityTargetData); |
This file contains 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 | |
import shapeless.ops.hlist.{ConstMapper, Mapper, ZipWith} | |
import shapeless.{::, HList, HNil, Poly2} | |
case class Params() | |
sealed trait EvaluatableGeneratorFilter[+Result] { | |
def eval(p: Params): Result | |
} |
This file contains 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
public abstract class Kind { | |
public class Global : Kind {} | |
public class World : Kind { | |
public readonly int world; | |
public World(int world) { | |
this.world = world; | |
} | |
} |
This file contains 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 (final kv in accounts.entries) { | |
kv.value.details.owner.iswitch( | |
me: () {}, | |
otherUser: (userId) { | |
otherUsers | |
.getE(userId) | |
.fold((err) => errors.add(StateUpdateError.withoutEvent(err)), | |
(events) { | |
final accountId = kv.key; | |
if (!events.share.rules.isShared(accountId)) { |
This file contains 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
// Pre copy-paste | |
getAccount(accountId) | |
.filterMap((account) => | |
account.details.owner != modifier | |
? Some( | |
"Can't modify a transaction $eventToModifyRef in account $accountId that you don't own: " | |
"owner=${account.details.owner}, modifier=$modifier" | |
) | |
: const Option.none() | |
) |
This file contains 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 FileProps { | |
def size: Long | |
} | |
val vfs: FileSystem = ??? | |
def readFlux(path: Path): Future[(FileProps, SFlux[Buffer])] = | |
vfs.propsFuture(path.toString).map { vertxFileProps => | |
val props = new FileProps { | |
override def size = vertxFileProps.size() |
This file contains 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 'dart:io'; | |
import 'package:functional_data/functional_data.dart'; | |
import 'package:meta/meta.dart'; | |
import 'package:zowo_lib/lib.dart'; | |
part 'Config.g.dart'; | |
@immutable | |
@FunctionalData() |
This file contains 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 java.io.{FileReader, Reader} | |
import java.nio.file.Path | |
import java.security.cert.Certificate | |
import java.security.{KeyStore, Security} | |
import javax.net.ssl.{KeyManagerFactory, SSLContext, TrustManagerFactory} | |
import org.bouncycastle.asn1.pkcs.PrivateKeyInfo | |
import org.bouncycastle.cert.X509CertificateHolder |
This file contains 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 java.io.{File, FileOutputStream, RandomAccessFile} | |
import cats.effect.{ConcurrentEffect, IO} | |
import com.typesafe.scalalogging.Logger | |
import fs2._ | |
import fs2.concurrent.Queue | |
import net.sf.sevenzipjbinding._ | |
import net.sf.sevenzipjbinding.impl.RandomAccessFileInStream |
This file contains 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
class MyDBContext( | |
dataSource: DataSource with Closeable, | |
ec: ExecutionContextWithExecutor | |
) extends PostgresJdbcContext(SnakeCase, dataSource) | |
with Queries with Quotes with JsonB with Codecs |