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.Collections.ObjectModel; | |
using System.Globalization; | |
using System.Linq; | |
using System.Xml.Linq; | |
using Microsoft.AspNetCore.DataProtection.KeyManagement; | |
using Microsoft.AspNetCore.DataProtection.Repositories; | |
using Microsoft.Extensions.DependencyInjection; | |
using Microsoft.Extensions.Options; |
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) Georgios Diamantopoulos. All rights reserved. | |
// Licensed under the MIT license. See LICENSE in this gist for full license information. | |
// The Throttle class is the RateGate class published here http://www.jackleitch.com/2010/10/better-rate-limiting-with-dot-net/, renamed and copied for convenience. | |
public static class BlockingCollectionExtensions | |
{ | |
// TODO: devise a way to avoid problems if collection gets too big (produced faster than consumed) | |
public static IObservable<T> AsRateLimitedObservable<T>(this BlockingCollection<T> sequence, int items, TimeSpan timePeriod, CancellationToken producerToken) | |
{ | |
Subject<T> subject = new Subject<T>(); |
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
(function(){ | |
'use strict'; | |
/* | |
* A module for adding new a routing system Angular 1. | |
*/ | |
angular.module('ngComponentRouter', []) | |
.directive('ngOutlet', ngOutletDirective) | |
.directive('ngOutlet', ngOutletFillContentDirective) | |
.directive('ngLink', ngLinkDirective); |
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 PorterAnalyzer : Analyzer | |
{ | |
/// <summary>An unmodifiable set containing some common English words that are usually not | |
/// useful for searching. | |
/// </summary> | |
public static readonly ISet<string> StopWordsSet = StopAnalyzer.ENGLISH_STOP_WORDS_SET; | |
/// <summary>Default maximum allowed token length </summary> | |
public const int DefaultMaxTokenLength = 255; |