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 () { | |
$('span.field-validation-valid, span.field-validation-error').each(function () { | |
$(this).addClass('help-inline'); | |
}); | |
$('.validation-summary-errors').each(function () { | |
$(this).addClass('alert'); | |
$(this).addClass('alert-error'); | |
$(this).addClass('alert-block'); | |
}); |
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
namespace Radar.Common.WebServer.Api.Controllers | |
{ | |
using System; | |
using System.Collections.Concurrent; | |
using System.Collections.Generic; | |
using System.Collections.ObjectModel; | |
using System.Net.Http; | |
using System.Threading.Tasks; | |
using System.Web.Http.Controllers; | |
using System.Web.Http.Filters; |
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 class AutoLocalizingRoute : Route | |
{ | |
public AutoLocalizingRoute(string url, object defaults, object constraints) | |
: base(url, new RouteValueDictionary(defaults), new RouteValueDictionary(constraints), new MvcRouteHandler()) { } | |
public override VirtualPathData GetVirtualPath(RequestContext requestContext, RouteValueDictionary values) | |
{ | |
// only set the culture if it's not present in the values dictionary yet | |
// this check ensures that we can link to a specific language when we need to (fe: when picking your language) | |
if (!values.ContainsKey("language")) |
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 abstract class CircuitBreakerState | |
{ | |
protected readonly CircuitBreaker circuitBreaker; | |
protected CircuitBreakerState(CircuitBreaker circuitBreaker) | |
{ | |
this.circuitBreaker = circuitBreaker; | |
} | |
public virtual void ProtectedCodeIsAboutToBeCalled() { } |
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 struct Id<T> | |
{ | |
public readonly int Value; | |
public Id(int value) | |
{ | |
this.value = value; | |
} | |
public static implicit operator Id<T>(int value) |
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
// Source: https://groups.google.com/forum/#!topic/angular/hVrkvaHGOfc | |
// jsFiddle: http://jsfiddle.net/pkozlowski_opensource/PxdSP/14/ | |
// author: Pawel Kozlowski | |
var myApp = angular.module('myApp', []); | |
//service style, probably the simplest one | |
myApp.service('helloWorldFromService', function() { | |
this.sayHello = function() { | |
return "Hello, World!" |
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.IO; | |
using System.Reflection; | |
using System.Web; | |
using System.Web.Mvc; | |
using Castle.MicroKernel.Registration; | |
using Castle.Windsor; | |
using Castle.Windsor.Installer; | |
using WednesdayFootball.Factory; |
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 class WebApiConfig | |
{ | |
public static void Register(HttpConfiguration config) | |
{ | |
// Register an Action selector that can include template parameters in the name | |
config.Services.Replace(typeof(IHttpActionSelector), new ODataActionSelector()); | |
var model = GetEdmModel(); | |
var odataFormatter = new ODataMediaTypeFormatter(model); | |
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
List<string> times = new List<string>(); | |
Enumerable.Range(0, 24).ToList() | |
.ForEach(hour => Enumerable.Range(0, 2).ToList() | |
.Select(x => string.Format("{0}:{1:00}", hour, x * 30)) | |
.ToList() | |
.ForEach(timeslot=>times.Add(timeslot))); |
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
@ECHO OFF | |
SETLOCAL | |
SET VERSION=%1 | |
SET NUGET=buildsupport\nuget.exe | |
FOR %%G IN (packaging\nuget\*.nuspec) DO ( | |
%NUGET% pack %%G -Version %VERSION% -Symbols -o artifacts | |
) |