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
// ----------------------------------------------------------------------- | |
// Copyright (C) 2017 Adam Hancock | |
// | |
// Viewer.cs can not be copied and/or distributed without the express | |
// permission of Adam Hancock | |
// ----------------------------------------------------------------------- | |
namespace Controls | |
{ | |
using System; |
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 Interpolation | |
{ | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Windows; | |
/// <summary> | |
/// Douglas Peucker Reduction algorithm. | |
/// </summary> |
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 class MonotoneCubicSpline | |
{ | |
private readonly double[] _x; | |
private readonly double[] _y; | |
private readonly int _n; | |
private readonly double[] _m; | |
public MonotoneCubicSpline(IList<Point> points) | |
{ | |
_x = points.OrderBy(p => p.X).Select(p => p.X).ToArray(); |
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 Disposable : IDisposable | |
{ | |
private bool _disposed; | |
public void Dispose() | |
{ | |
if (_disposed) | |
{ | |
return; |
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 class FluentValidator : ComponentBase | |
{ | |
private readonly IDictionary<Type, IValidator> _validators = | |
new Dictionary<Type, IValidator>(); | |
[CascadingParameter] | |
public EditContext EditContext { get; set; } | |
[Inject] |
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 interface ISocket : IDisposable | |
{ | |
event Action<Exception> OnError; | |
event Action<dynamic> OnData; | |
event Action OnDisconnected; | |
event Action OnConnected; |
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 DisposableInstance | |
{ | |
using System; | |
using System.Threading; | |
// Usage | |
internal class Program | |
{ | |
private static void TestDisposeInstance() | |
{ |
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; | |
using System.Collections.Generic; | |
using System.Linq; | |
public interface ISeries | |
{ | |
void Attach(ISeries series); |
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 class ClassifierSettings | |
{ | |
public int WindowSize { get; set; } = 250; | |
public int Estimators { get; set; } = 25; | |
public int MaxDepth { get; set; } = 15; | |
public int Features { get; set; } = 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
using System; | |
using System.Collections.Concurrent; | |
using System.Reactive; | |
using System.Reactive.Concurrency; | |
using System.Reactive.Linq; | |
using System.Threading; | |
using System.Threading.Tasks; | |
public class RateLimiter | |
{ |
OlderNewer