Skip to content

Instantly share code, notes, and snippets.

View pragmatrix's full-sized avatar

Armin pragmatrix

View GitHub Profile
@mrange
mrange / pipeline_performance.md
Last active May 10, 2021 13:34
Performance comparison of different data pipelines in .NET

Performance comparison of different data pipelines in .NET

Full source code can be found here

Changelog

  1. 2016-12-20
  2. New performance test - Paul Westcott (@manofstick) made me aware that SeqComposer has a more performant API. SeqComposer2 uses this API.
  3. 2016-12-23
/* GitHub stylesheet for MarkdownPad (http://markdownpad.com) */
/* Author: Nicolas Hery - http://nicolashery.com */
/* Version: b13fe65ca28d2e568c6ed5d7f06581183df8f2ff */
/* Source: https://github.com/nicolahery/markdownpad-github */
/* RESET
=============================================================================*/
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video {
margin: 0;
@martinnormark
martinnormark / DynamicHelper.cs
Created May 2, 2012 08:11
C# Dynamic extension methods for serializing to XML
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Xml;
using System.Xml.Linq;
/// <summary>
/// Extension methods for the dynamic object.
/// </summary>
@hickford
hickford / group-adjacent-by.cs
Created April 1, 2012 16:58
GroupAdjacentBy method for .NET in C#
public static class LINQExtensions
{
public static IEnumerable<IGrouping<TKey, TElement>> GroupAdjacentBy<TElement, TKey>(this IEnumerable<TElement> source, Func<TElement, TKey> keySelector, IEqualityComparer<TKey> comparer=null)
{
comparer = comparer ?? EqualityComparer<TKey>.Default;
List<TElement> elements = null;
TKey key = default(TKey);
TKey lastKey = default(TKey);
foreach (var x in source)
{
@gre
gre / easing.js
Last active June 27, 2024 15:37
Simple Easing Functions in Javascript - see https://github.com/gre/bezier-easing
/*
* This work is free. You can redistribute it and/or modify it under the
* terms of the Do What The Fuck You Want To Public License, Version 2,
* as published by Sam Hocevar. See the COPYING file for more details.
*/
/*
* Easing Functions - inspired from http://gizma.com/easing/
* only considering the t value for the range [0, 1] => [0, 1]
*/
EasingFunctions = {
@jamesantrobus
jamesantrobus / PDFTransformToImage.cs
Created January 9, 2011 15:38
Rough demo to transform a CGPDFPage to a UIImage with a given width
private UIImage TransformToImage(CGPDFPage page, Single width)
{
RectangleF pageRect = page.GetBoxRect(CGPDFBox.Media);;
Single pdfScale = width / pageRect.Size.Width;
pageRect.Size = new SizeF(pageRect.Size.Width*pdfScale, pageRect.Size.Height*pdfScale);
//pageRect.Origin = CGPointZero;
UIGraphics.BeginImageContext(pageRect.Size);
CGContext context = UIGraphics.GetCurrentContext();