This file contains hidden or 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 CommonMark; | |
| using System; | |
| using System.IO; | |
| using System.Linq; | |
| namespace PipeDown | |
| { | |
| class Program | |
| { | |
| static void Main(string[] args) |
This file contains hidden or 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 MvcHtmlString SortedEnumDropDownListFor<TModel, TEnum>( | |
| this HtmlHelper<TModel> htmlHelper, | |
| Expression<Func<TModel, TEnum>> expression, | |
| bool descending = false) | |
| { | |
| var propertyInfo = (expression.Body as MemberExpression).Member as PropertyInfo; | |
| var options = Enum.GetValues(typeof(TEnum)).Cast<TEnum>().Select(code => new SelectListItem() | |
| { | |
| Selected = code.Equals((TEnum)propertyInfo.GetValue(htmlHelper.ViewData.Model)), | |
| Text = code.ToString(), |
This file contains hidden or 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
| open System | |
| module Decimal = | |
| let Zero = 0M | |
| let One = 1M | |
| let ceil (d: decimal): decimal = System.Math.Ceiling(d) | |
| let floor (d: decimal): decimal = System.Math.Floor(d) |
This file contains hidden or 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.Linq; | |
| namespace ChoiceMaker | |
| { | |
| class Program | |
| { | |
| static void Main(string[] args) | |
| { | |
| if (!args.Any()) |
This file contains hidden or 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.Generic; | |
| using System.IO; | |
| using System.Linq; | |
| using System.Text; | |
| using System.Text.RegularExpressions; | |
| using System.Threading.Tasks; | |
| namespace _01_Episodes | |
| { |
NewerOlder