View PermutationsExtension.cs
namespace Extensions
{
public static class PermutationsExtension
{
public static IEnumerable<string> GetPermutations(this string str)
{
return GetPermutations<string, char>(str, array => new string(array));
}
public static IEnumerable<TCollection> GetPermutations<TCollection, TElement>(this TCollection elements,
View FileUploadOperation.cs
using Swashbuckle.Swagger;
using System;
using System.Web.Http.Description;
namespace UploadingFileFromSwagger.Models
{
/* How to use:
GlobalConfiguration.Configuration
.EnableSwagger(c =>
{
View run.csx
// https://rvhuang.github.io/livedemo/coinsflipping.html
#r "..\Shared\AlgorithmForce.HeuristicSuite.Portable.dll"
using System;
using System.Collections.Generic;
using System.Net;
using System.Web.Http;
using AlgorithmForce.HeuristicSuite;
public static IEnumerable<bool[]> Run(Request req, TraceWriter log)
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
View ColumnWrapper.cs
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
namespace GitHub.Gist
{
public class ColumnWrapper<T> : IList<T>, IReadOnlyList<T>
{
private readonly T[][] array;
View RedisCollectionEnumerator.cs
using StackExchange.Redis;
using System;
using System.Collections;
using System.Collections.Generic;
namespace ModelWorkshop.Scheduling.Redis
{
internal class RedisCollectionEnumerator<TItem> : IEnumerator<TItem>
{
#region Fields
View ValuesController.cs
using Newtonsoft.Json;
using System;
using System.IO;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;
namespace WebApplication1.Controllers
{
View Extensions.cs
using System;
using System.Collections.Generic;
namespace AlgorithmForce.Searching
{
/*
* Full implementation:
* https://github.com/rvhuang/kmp-algorithm/blob/master/src/AlgorithmForce.Searching/Extensions.cs
*/
public static class Extensions