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
| public class GroupedDictionary<TKey, TValue> : Dictionary<TKey, ICollection<TValue>> | |
| { | |
| private readonly Func<TValue, TKey> _groupingKeyExtractor; | |
| public GroupedDictionary(IEnumerable<TValue> values, Expression<Func<TValue, TKey>> groupingKey) | |
| { | |
| _groupingKeyExtractor = groupingKey.Compile(); | |
| PopulateDictionary(values); | |
| } |
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 Autofac; | |
| using Autofac.Features.Variance; | |
| using MediatR; | |
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Reflection; | |
| namespace Mediatr.Extras.Autofac | |
| { |
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 Autofac; | |
| using Autofac.Features.Variance; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Reflection; | |
| using System.Threading.Tasks; | |
| using Xunit; | |
| using System; | |
| namespace MediatR.Decorator.Example |
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
| void Main() | |
| { | |
| var items = new []{ "first", "second", "third" }; | |
| foreach(var (item, index) in Enumerate(items)) | |
| { | |
| Console.WriteLine($"{item} is index {index}."); | |
| } | |
| } |
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
| export PS1="(#\#) @ \d \t : \w \r\n->" |
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
| namespace TestingApplication | |
| { | |
| using CommandLine; | |
| using CommandLine.Text; | |
| public class Options | |
| { | |
| [VerbOption("testverbone", HelpText = "Test Verb One.")] | |
| public RssSubOptions RssVerb { get; set; } |
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 bash... | |
| hg grep -r rev1:rev2 --all . | cut -d : -f 1 | sort -u | sed 's/^/-I /' | xargs echo hg archive |
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 random | |
| import numpy | |
| class Cell(object): | |
| x = None | |
| y = None | |
| is_alive = None | |
| _neighbors = None |
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 curses | |
| import random | |
| class Life(object): | |
| max_x = 200 | |
| max_y = 60 | |
| _grid = {} |
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; | |
| using System.IO; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Text; | |
| using Ionic.Zlib; | |
| namespace TestZlib | |
| { | |
| class Program |