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
unTracking<T>(source: T): T { | |
const target = {} as T; | |
Object.keys(source).forEach(key => { | |
Object.defineProperty(target, key, { configurable: false, value: (source as any)[key] } ); | |
}); | |
return target; | |
} |
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
<?xml version="1.0" encoding="utf-8" ?> | |
<prism:PrismApplication xmlns="http://xamarin.com/schemas/2014/forms" | |
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" | |
xmlns:prism="clr-namespace:Prism.Unity;assembly=Prism.Unity.Forms" | |
x:Class="Smallgeek.App"> | |
<Application.Resources> | |
<ResourceDictionary> | |
<ControlTemplate x:Key="NavigationMenuPageTemplate"> | |
<Grid RowSpacing="0"> | |
<Grid.RowDefinitions> |
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 Reactive.Bindings.Notifiers; | |
using System; | |
using System.Threading.Tasks; | |
using System.Windows.Input; | |
namespace Reactive.Bindings | |
{ | |
public class BusyNotifierCommand : BusyNotifierCommand<object> | |
{ | |
public BusyNotifierCommand(Func<Task> execute) |
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
open System | |
open System.Reactive | |
open System.Reactive.Subjects | |
open System.Reactive.Linq | |
open Microsoft.FSharp.Control | |
open FSharp.Control.Reactive | |
open FSharp.Control.Reactive.Builders | |
open FSharp.Data | |
type BehaviorSubject<'a> with |
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 Tuple<IList<T>, IList<T>> Partition<T>(this IList<T> source, Func<T, bool> predicate) | |
{ | |
if (source == null) throw new ArgumentNullException(nameof(source)); | |
if (predicate == null) throw new ArgumentNullException(nameof(predicate)); | |
var list = source.ToList(); | |
return new Tuple<IList<T>, IList<T>>( | |
list.Where(x => predicate(x)).ToList(), | |
list.Where(x => predicate(x) == false).ToList()); | |
} |
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
アプリケーション:devenv.exe | |
フレームワークのバージョン:v4.0.30319 | |
説明: ハンドルされない例外のため、プロセスが中止されました。 | |
例外情報:System.IndexOutOfRangeException | |
場所 Microsoft.CodeAnalysis.SymbolId+Parser.GetNthTypeParameter(Microsoft.CodeAnalysis.INamedTypeSymbol, Int32) | |
場所 Microsoft.CodeAnalysis.SymbolId+Parser.ParseTypeParameterSymbol(System.Collections.Generic.List`1<Microsoft.CodeAnalysis.ISymbol>) | |
場所 Microsoft.CodeAnalysis.SymbolId+Parser.ParseSymbolId(System.Collections.Generic.List`1<Microsoft.CodeAnalysis.ISymbol>) | |
場所 Microsoft.CodeAnalysis.SymbolId+Parser.ParseTypeSymbol() | |
場所 Microsoft.CodeAnalysis.SymbolId+Parser.ParseTypeArguments(System.Collections.Generic.List`1<Microsoft.CodeAnalysis.ISymbol>) | |
場所 Microsoft.CodeAnalysis.SymbolId+Parser.GetMatchingTypes(Microsoft.CodeAnalysis.INamespaceOrTypeSymbol, System.String, System.Collections.Generic.List`1<Microsoft.CodeAnalysis.ISymbol>) |
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
let xs1 = Set[Set[1;2;3]; Set[4;5;6]; Set[7;8;9]] | |
let xs2 = Set[Set[4;5;6]; Set[7;8;9]; Set[10;11;12]] | |
let union = | |
[xs1; xs2] | |
|> Set.unionMany | |
let intersect = | |
[xs1; xs2] | |
|> Set.intersectMany |
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 IEnumerable<IReadOnlyList<T>> ChunkBySumIf<T>(this IEnumerable<T> source, Func<T, double> selector, Func<double, bool> predicate) | |
{ | |
if (source == null) throw new ArgumentNullException(nameof(source)); | |
if (selector == null) throw new ArgumentNullException(nameof(selector)); | |
if (predicate == null) throw new ArgumentNullException(nameof(predicate)); | |
using (var enumerator = source.GetEnumerator()) | |
{ | |
var values = new List<T>(); | |
var acc = 0.0; |
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
<Extension> | |
Public Iterator Function ChunkBySumIf(Of T)(source As IEnumerable(Of T), selector As System.Func(Of T, Double), predicate As System.Func(Of Double, Boolean)) As IEnumerable(Of IEnumerable(Of T)) | |
If source Is Nothing Then Throw New ArgumentNullException(NameOf(source)) | |
If selector Is Nothing Then Throw New ArgumentNullException(NameOf(selector)) | |
If predicate Is Nothing Then Throw New ArgumentNullException(NameOf(predicate)) | |
Using enumerator = source.GetEnumerator() | |
Dim values As List(Of T) = Nothing |
NewerOlder