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.Collections.Concurrent; | |
| using Microsoft.EntityFrameworkCore.Storage.ValueConversion; | |
| public sealed class StronglyTypedIdValueConverterSelector : ValueConverterSelector | |
| { | |
| // The dictionary in the base type is private, so we need our own one here. | |
| private readonly ConcurrentDictionary<(Type ModelClrType, Type ProviderClrType), ValueConverterInfo> _converters = new(); | |
| public StronglyTypedIdValueConverterSelector(ValueConverterSelectorDependencies dependencies) : base(dependencies) | |
| { } |
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
| -- From: https://github.com/philanc/plc/blob/9efed4113a1a5dcb12a1f526cd65561756e6d648/plc/base64.lua | |
| -- | |
| -- Modified by Klotzi to work with Lua 5.2: | |
| -- replaced all bit operations with bit32 functions | |
| -- Copyright (c) 2015 Phil Leblanc -- see LICENSE file | |
| ------------------------------------------------------------------------ | |
| -- base64 encode / decode |
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
| -- From: https://gist.github.com/Egor-Skriptunoff/44a88f64f9a497919db4ad8c28259a8f | |
| -- Modified by Klotzi to: | |
| -- - take codepage as a parameter on each call | |
| -- - cache decompressed mappings | |
| -- - don't clutter global namespace | |
| --------------------------------------------------------------------- | |
| -- Converter between win-125x and UTF-8 strings | |
| --------------------------------------------------------------------- | |
| -- Written in pure Lua, compatible with Lua 5.1-5.4 |
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 concurrent | |
| from concurrent.futures import Future | |
| from typing import Any | |
| class CombinedFuture(Future[Future | None]): | |
| """ | |
| This class provides "waiting" mechanisms similar to concurrent.futures.wait(...) except that there is no blocking wait. | |
| This class extends concurrent.futures.Future and thus it can be used like any other Future. | |
| You can use the .result() and .done() (and other) methods and also use this class with the aforementioned concurrent.futures.wait function. | |