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
#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
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
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
// -------------------------------------------------------------------------------------------------------------------- | |
// <copyright file="ImageProcessorPreProcessor.cs" company="James Jackson-South"> | |
// Copyright (c) James Jackson-South. | |
// Licensed under the Apache License, Version 2.0. | |
// </copyright> | |
// <summary> | |
// Attaches ImageProcessor to the Media.Saving event to ensure that uploaded files do not exceed | |
// a maximum size. | |
// </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 |
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
if (window.jQuery) { | |
(function ($, w, d) { | |
var $d = $(d); | |
$d.ready(function () { | |
$d.on("click", "a[data-smooth-scroll]", function (event) { | |
var $this = $(this), | |
href = $this.attr("href"); | |
if (href.indexOf("#") === 0) { |
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
using System; | |
using System.Collections; | |
using System.Collections.Concurrent; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Linq.Expressions; | |
using System.Reflection; | |
using System.Runtime.CompilerServices; | |
/// <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
internal static IEnumerable<IPublishedContent> EnumerateDescendants(this IPublishedContent content, bool orSelf) | |
{ | |
if (orSelf) yield return content; | |
Stack<IPublishedContent> nodes = new Stack<IPublishedContent>(new[] { content }); | |
while (nodes.Any()) | |
{ | |
IPublishedContent node = nodes.Pop(); | |
yield return node; |