See original gist for discussion and links.
Performance Comparison: http://jsperf.com/url-parsing/5
Test Ops/sec
Regex
<div class="header-wrapper"> | |
<header class="group"> | |
<h1>Style Tile<br>Template</h1> | |
<hgroup class="project-title"> | |
<h2>Project name</h2> | |
<h3>Style tile</h3> | |
<h4>Version 1</h4> | |
</hgroup> | |
</header> | |
</div> |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
namespace Ofir.Tools.Reflection | |
{ | |
public static class AttributeExtensions | |
{ | |
public static IEnumerable<T> GetCustomAttributes<T>(this MemberInfo memberInfo, bool inherit = false) where T : Attribute | |
{ |
<canvas id='c'></canvas> |
See original gist for discussion and links.
Performance Comparison: http://jsperf.com/url-parsing/5
Test Ops/sec
Regex
// edit for whichever you care about | |
$vendors: 'webkit', 'moz', 'ms'; // 'webkit', 'moz', 'ms', 'o', 'khtml'; | |
/// @summary Repeat for multiple vendor prefixes, like prefix-free processor | |
/// @param $property the property to repeat | |
/// @param $noplain set 'true' to disable prefixless option | |
/// @param $vendors override the global vendor list | |
/// @param $prefix optional additional prefix; supposed to allow keyframe specification with `@` | |
/// | |
/// @see http://css-tricks.com/redesigning-with-sass/ for references | |
@mixin vendorize($property, $value, $noplain: false, $vendors: $vendors, $prefix:'') { |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text.RegularExpressions; | |
namespace Playground.Tests { | |
public class OrderSubsetTests { | |
#region -------------- classes ---------------- |
public class LinqSubsetTests { | |
/// example class | |
public class Foo { | |
public long ID { get; set; } | |
public int Filterable { get; set; } | |
public string Name { get; set; } | |
public IEnumerable<Bar> Children { get; set; } |
using System; | |
using System.Collections.Generic; | |
using System.Dynamic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using AtifAzis.Extensions; | |
/// for http://haacked.com/archive/2009/01/14/named-formats-redux.aspx and https://gist.github.com/3763138 | |
namespace Tests.Haacked.StringLib { |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
/// via original discussion http://haacked.com/archive/2009/01/14/named-formats-redux.aspx | |
namespace Haacked.StringLib { | |
/// <summary> | |
/// Extension string methods for named token replacement |
using System.IO; | |
// modified from RestSharp unit tests https://github.com/restsharp/RestSharp/blob/master/RestSharp.IntegrationTests/Helpers/SimpleServer.cs | |
namespace UnitTesting | |
{ | |
using System; | |
using System.Net; | |
using System.Security; | |
using System.Threading; |