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
<?xml version="1.0" encoding="utf-8"?> | |
<xsl:stylesheet version="2.0" | |
xmlns:string="http://symphony-cms.com/functions" | |
xmlns:func="http://exslt.org/functions" | |
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" | |
extension-element-prefixes="func"> | |
<xsl:output method="text"/> | |
<xsl:variable name="accessDict"> |
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 class ImageDownloader | |
{ | |
public async Task<byte[]> Download(string url) | |
{ | |
var request = (HttpWebRequest) HttpWebRequest.Create(url); | |
var response = await Task<WebResponse>.Factory.FromAsync(request.BeginGetResponse, request.EndGetResponse, null); | |
using (var mStream = new MemoryStream()) | |
{ | |
response.GetResponseStream().CopyTo(mStream); | |
return mStream.ToArray(); |
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
#region license | |
// Copyright (c) 2005 - 2007 Ayende Rahien ([email protected]) | |
// All rights reserved. | |
// | |
// Redistribution and use in source and binary forms, with or without modification, | |
// are permitted provided that the following conditions are met: | |
// | |
// * Redistributions of source code must retain the above copyright notice, | |
// this list of conditions and the following disclaimer. |
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
select internalas0_.Id as Id30_, | |
internalas0_.InternalAssessmentConfigurationId as Internal2_30_, | |
internalas0_.InternalAssessorId as Internal3_30_, | |
internalas0_.ZipCode as ZipCode30_ | |
from dbo.InternalAssessmentMap internalas0_ | |
where replace(cast(internalas0_.ZipCode as nvarchar(50)), ' ' /* @p0 */, '' /* @p1 */) = '6123' /* @p2 */ |
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
class Surface | |
{ | |
public virtual void Draw(Shape shape) | |
{ | |
shape.Draw(this); | |
} | |
} | |
class EtchASketch : Surface | |
{ |
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; | |
namespace Core.Utils | |
{ | |
public static class SystemTime | |
{ | |
public static Func<DateTime> Engine { private get; set; } | |
static SystemTime() | |
{ |
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
builder.RegisterType<DenyAnonymousAccessPolicyViolationHandler>().As<IPolicyViolationHandler>(); | |
Container = builder.Build(); | |
var denyAnonymousAccessPolicyViolationHandler = DependencyResolver.Current.GetService<DenyAnonymousAccessPolicyViolationHandler>(); | |
var denyAnonymousAccessPolicyViolationHandleri = DependencyResolver.Current.GetService<IPolicyViolationHandler>(); |
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
$.validator.setDefaults({ | |
highlight: function (element) { | |
$(element).closest(".control-group").addClass("error"); | |
}, | |
unhighlight: function (element) { | |
$(element).closest(".control-group").removeClass("error"); | |
} | |
}); | |
$(function () { | |
$('span.field-validation-valid, span.field-validation-error').each(function () { |
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.Web.Mvc; | |
using Hoya.Administration.Web.UI.Controllers; | |
using Machine.Specifications; | |
namespace Hoya.Administration.Web.UI.Specs.SessionControllerSpecs | |
{ | |
[Subject(typeof(SessionController))] | |
public class SessionControllerSpec : BaseSpec | |
{ |
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 class base_spec | |
{ | |
protected static AutoMoqer mocker; | |
protected static Mock<IDependencyResolver> resolver; | |
private Establish context = () => | |
{ | |
mocker = new AutoMoqer(); | |
resolver = new Mock<IDependecyResolver> | |
DependencyResolver.SetResolver(resolver.Object); |