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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Diagnostics; | |
namespace System.Collections.Concurrent | |
{ | |
/// <summary>Provides a thread-safe priority queue data structure.</summary> | |
/// <typeparam name="TKey">Specifies the type of keys used to prioritize values.</typeparam> |
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 static class EnumerableExtensions | |
{ | |
/// <summary> | |
/// Enumerates over two sequences simulateneously and performs the action on both | |
/// </summary> | |
/// <typeparam name="T1"></typeparam> | |
/// <typeparam name="T2"></typeparam> | |
/// <param name="source1"></param> | |
/// <param name="source2"></param> | |
/// <param name="eacher">The action which takes a value from each sequence</param> |
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
namespace System.Linq { | |
public static class EnumerableExtensions { | |
public static int IndexOf<T1>(this IEnumerable source, Func<T1, bool> predicate) { | |
var enumerator = source.GetEnumerator(); | |
bool lastEval = false; | |
int index = -1; | |
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
/// <summary> | |
/// Creates an observable that will attach the latest value from a second source observable for each value. | |
/// </summary> | |
/// <typeparam name="TSource1">The source observable</typeparam> | |
/// <typeparam name="TSource2">The attached observable</typeparam> | |
/// <typeparam name="TResult">The result type</typeparam> | |
/// <param name="source1">The type of the incoming observable</param> | |
/// <param name="source2">The type of the attached observable</param> | |
/// <param name="resultSelector"></param> | |
/// <returns>An observable that is the result of applying <paramref name="resultSelector"/> on the two observables</returns> |
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
var key = "ZzLlQqUuAa1RrBb2YyCc3XxDd4WwEe5VvFf6TtGg7SsHh8PpIi9JOoj0KkMmNn"; | |
var cardtype = document.studio_form.CARD_TYPE.value; | |
var cardnumber = document.studio_form.CARD_NUMBER.value; | |
var carddate = document.studio_form.CARD_DATE.value; | |
var cardname = document.studio_form.CARD_NAME.value; | |
var cardaddress = document.studio_form.CARD_ADDRESS.value | |
+ ", " + document.studio_form.CARD_CITY.value | |
+ ", " + document.studio_form.CARD_STATE.value | |
+ ", " + document.studio_form.CARD_ZIP.value | |
+ " " + document.studio_form.CARD_COUNTRY.value; |
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
<a href="your_link_goes_here" style="float: right;"> | |
<img src="img_src"/> | |
</a> |
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 sangria.federation | |
import play.api.libs.json.{JsError, JsObject, JsSuccess, Reads} | |
import sangria.schema.{LeafAction, ObjectLikeType, Value} | |
trait EntityResolver[Ctx] { | |
def typename: String | |
def resolve(obj: JsObject): LeafAction[Ctx, Option[Any]] | |
} |
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 zio._ | |
class Components(context: ApplicationLoader.Context) | |
extends BuiltInComponentsFromContext(context) { | |
// Initialize the layer | |
val appLayer = ZEnv.live ++ Users.live ++ Products.live | |
// Create a new runtime backed by the application layer |
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
object Example extends GenericSchema[Clock] { | |
implicit val extractorStrategy: ExtractorStrategy = ExtractorStrategy.hyphen | |
case class User(id: String) | |
case class Team(id: String) | |
case class NodeArg(id: String) | |
val userSchema = gen[User] | |
val teamSchema: Schema[Clock, Team] = gen[Team] |
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 compat | |
import izumi.functional.mono.SyncSafe | |
import izumi.fundamentals.platform.language.CodePositionMaterializer | |
import izumi.logstage.api.Log | |
import izumi.logstage.api.Log.{CustomContext, Entry, Level, LogArg, Message} | |
import izumi.logstage.api.logger.AbstractLogger | |
import izumi.logstage.api.rendering.AnyEncoded | |
import izumi.logstage.macros.LogIOMacroMethods._ | |
import logstage.UnsafeLogIO.UnsafeLogIOSyncSafeInstance |