This file contains 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() | |
{ | |
PropertyInfo[] colorProperties = typeof(Color).GetProperties(BindingFlags.Static | BindingFlags.Public); | |
List<Color> colors = colorProperties.Select(prop => (Color)prop.GetValue(null, null)).ToList(); | |
Color rp = Color.FromName("RebeccaPurple"); | |
colors.Add(rp); | |
foreach (Color c in colors.OrderBy(co => co.Name)) | |
{ |
This file contains 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
(function ($) { | |
/** | |
* Multiple parallel getScript with caching. | |
* | |
* @param {Array|String} url (one or more URLs) | |
* @param callback fn (oncomplete, optional) | |
* @returns {function} | |
*/ | |
$.getCachedScript = function (url, callback) { |
This file contains 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
// License: CPOL at http://www.codeproject.com/info/cpol10.aspx | |
using System.Collections.Generic; | |
using System.Net; | |
using System.Threading; | |
using System.Threading.Tasks; | |
namespace System.IO | |
{ | |
public static class AsyncIoExtensions | |
{ |
This file contains 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
getVendorPropertyName = function (prop) { | |
/// <summary>Gets the correct vendor property name for the current browser.</summary> | |
/// <param name="prop" type="String">The property to return the name for.</param> | |
/// <returns type="String">The correct vendor property name.</returns> | |
var el = document.createElement("div"); | |
if (prop in el.style) { | |
return prop; | |
} |
This file contains 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
/* | |
* 1: Arbitrary width. | |
*/ | |
.parent { | |
position: relative; | |
height: 250px; | |
max-width: 400px; /* 1 */ | |
overflow: hidden; | |
} |
This file contains 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 static Color<T> operator +(Color<T> left, Color<T> right) | |
{ | |
if (typeof(T) == typeof(byte)) | |
{ | |
return (Color<T>)(object)new Color<byte>( | |
(byte)((byte)(object)left.R + (byte)(object)right.R), | |
(byte)((byte)(object)left.G + (byte)(object)right.G), | |
(byte)((byte)(object)left.B + (byte)(object)right.B), | |
(byte)((byte)(object)left.A + (byte)(object)right.A)); | |
} |
This file contains 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
#master-header .contact-number, #master-header .cta-links a, #mobile-nav .mobile-tools .contact-number, #mobile-nav .second-level a, #mobile-nav .top-level a, #primary-nav ul.top-level .primary-link, #quote-panel .btn-change, #quote-panel .btn-join-now, #quote-panel .value, .a-feature p, .accordion-content .header p, .btn-form-next, .btn-form-prev, .btn-get-quote, .btn-get-quote-white, .btn-join, .btn-large-primary, .btn-large-secondary, .btn-med-primary, .btn-med-secondary, .btn-members-services, .compare-cover-tile h1, .comparison-table .category-title p, .contact-us .tab-btns-row a, .contact-us h1, .contact-us h2, .contact-us h3, .extras-cover-table .key span, .extras-select .title, .form-section h1, .general-content h1, .general-content h2, .hero-image h1, .left-nav a, .legend h1, .live-quote-tool .bootstrap-select .dropdown-toggle .filter-option, .live-quote-tool .lqt-compare-table .column .group .group-label, .live-quote-tool .lqt-compare-table .column .product-label, .live-quote-tool .lqt-compare-table |
This file contains 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
<div class="intro-copy"> | |
<h2>"I am supposed to be a quote but I have the wrong markup."</h2> | |
<p class="user-desc">Cassie <span>Science Teacher</span></p> | |
</div> |
This file contains 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
// -------------------------------------------------------------------------------------------------------------------- | |
// <copyright file="ImageCropperPropertyConverter.cs" company="Deepend"> | |
// Copyright (c) Deepend | |
// </copyright> | |
// <summary> | |
// The image cropper property converter. This allows Ditto to map the image cropper using the built in Umbraco | |
// methods. | |
// </summary> | |
// -------------------------------------------------------------------------------------------------------------------- |
This file contains 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
/// <summary> | |
/// Throttles duplicate requests. | |
/// Based loosely on <see href="http://stackoverflow.com/a/21011273/427899"/> | |
/// </summary> | |
public sealed class AsyncDuplicateLock | |
{ | |
/// <summary> | |
/// The collection of semaphore slims. | |
/// </summary> | |
private static readonly ConcurrentDictionary<object, SemaphoreSlim> SemaphoreSlims |