View chunkBySizeExample.fs
//chunk records by 100
let longSeq = [1..10000]
let size = 100
let foo (x:IEnumerable<int>) = x |> Seq.iter (fun x -> printf "%i" x)
longSeq |> Seq.chunkBySize size |> Seq.iter (fun seq -> foo seq)
View ProjectChooser.cs
static class ProjectChooser
{
private static Project _webProject;
public static void FixOutputPath(this Project project) {
var webProject = project.DTE.Solution.FindWebProject();
SetOutputPathTo(project, webProject);
}
public static void AddMvcReference(this Project project) {
View Microsoft.Powershell_profile.ps1
function Get-Batchfile ($file) {
$cmd = "`"$file`" & set"
cmd /c $cmd | Foreach-Object {
$p, $v = $_.split('=')
Set-Item -path env:$p -value $v
}
}
function VsVars32($version = "14.0")
{
<# $key = "HKLM:SOFTWARE\Microsoft\VisualStudio\" + $version
View DataTableExcelExporter.cs
using System;
using System.Collections.Generic;
using System.Data;
using OfficeOpenXml;
namespace ExcelExport
{
internal class DataTableExcelExporter
{
private readonly IEnumerable<string> _columnsToHide;
View GenericEqualityComparer
namespace EqualityComparer
{
using System.Collections;
using System.Collections.Generic;
public class GenericEqualityComparer<T> : IEqualityComparer<T>
{
public static GenericEqualityComparer<T> Create()
{