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
| CREATE TABLE [dbo].[Audit] | |
| ( | |
| [Id] INT NOT NULL IDENTITY, | |
| [User] NVARCHAR( 100 ) NOT NULL, | |
| [Trail] NVARCHAR( MAX ) NOT NULL, | |
| [Created] DATETIME NOT NULL | |
| ) | |
| ALTER TABLE [dbo].[Audit] | |
| ADD CONSTRAINT [PK_Audit_Id] |
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.Drawing; | |
| using System.Runtime.InteropServices; | |
| using System.Windows.Forms; | |
| public class ScreenShot | |
| { | |
| [ComImport] | |
| [InterfaceType( ComInterfaceType.InterfaceIsIUnknown )] | |
| [Guid( "0000010d-0000-0000-C000-000000000046" )] |
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
| protected void Application_Error( object sender, EventArgs e ) | |
| { | |
| var exception = Server.GetLastError(); | |
| Response.Clear(); | |
| var httpException = exception as HttpException; | |
| var routeData = new RouteData(); | |
| routeData.Values.Add( "controller", "Error" ); |
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
| private static readonly object GeneratorLock = new object(); | |
| ///<summary> | |
| /// Create the next id (numeric) | |
| ///</summary> | |
| private int NextAccountNumber() | |
| { | |
| lock (GeneratorLock) | |
| { | |
| using (new TransactionScope(TransactionScopeOption.Suppress)) |
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.Linq; | |
| using System.Web.Mvc; | |
| using Umbraco.Cms.Web.Model.BackOffice.Editors; | |
| using Umbraco.Framework; | |
| using Umbraco.Framework.Context; | |
| using Umbraco.Framework.Persistence.Model; | |
| using Umbraco.Framework.Persistence.Model.Attribution.MetaData; | |
| using Umbraco.Framework.Persistence.Model.Constants; |
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
| @echo off | |
| rem Warning: this batch file deletes ALL Raven DB data and databases, leaving you with a totally empty (but ready to use) Raven DB instance. | |
| net stop RavenDB | |
| rd /S /Q C:\RavenDB\Server\Data | |
| rd /S /Q C:\RavenDB\Server\Tenants | |
| net start RavenDB |
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 ServiceResolverAdapter : IDependencyResolver | |
| { | |
| private readonly System.Web.Mvc.IDependencyResolver dependencyResolver; | |
| public ServiceResolverAdapter(System.Web.Mvc.IDependencyResolver dependencyResolver) | |
| { | |
| if (dependencyResolver == null) throw new ArgumentNullException("dependencyResolver"); | |
| this.dependencyResolver = dependencyResolver; | |
| } |
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.Collections.Generic; | |
| using System.Linq; | |
| using System.Text.RegularExpressions; | |
| namespace CommandLineUtils | |
| { | |
| /// <summary> | |
| /// Arguments class. | |
| /// </summary> | |
| /// <seealso cref="http://www.codeproject.com/Articles/3111/C-NET-Command-Line-Arguments-Parser"/> |
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
| [AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = true)] | |
| public class LinkWithinAreaAttribute : Attribute | |
| { | |
| public string AreaName { get; private set; } | |
| public string OrSwitchTo { get; set; } | |
| public LinkWithinAreaAttribute(string areaName) | |
| { | |
| AreaName = areaName; | |
| } |