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 () { | |
App.Views.ModalView = Backbone.View.extend({ | |
tagName: "div", | |
template: modalTemplate, | |
initialize: function (options) { | |
_.bindAll(this, "render", "show", "hide", "toggle", "setContent"); |
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 () { | |
App.Views.PopoverView = Backbone.View.extend({ | |
initialize: function (options) { | |
_.bindAll(this, "render", "setContent", "show", "hide", "toggle", "destroy", "remove"); | |
this.offsetTop = 30; | |
this.offsetLeft = 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
public override void OnStop() | |
{ | |
Trace.TraceInformation("OnStop called from WebRole"); | |
var rcCounter = new PerformanceCounter("ASP.NET", "Requests Current", ""); | |
while (rcCounter.NextValue() > 0) | |
{ | |
Trace.TraceInformation("ASP.NET Requests Current = " + rcCounter.NextValue().ToString()); | |
System.Threading.Thread.Sleep(1000); | |
} |
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 ($) { | |
$.validator.unobtrusive.parseDynamic = function (selector) { | |
//use the normal unobstrusive.parse method | |
$.validator.unobtrusive.parse(selector); | |
//get the relevant form | |
var form = $(selector).first().closest('form'); | |
if (!form.length) { | |
form = $(selector).first().find('form'); |
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
validate: function () { | |
var form = this.$el.is("form") ? this.$el : this.$el.closest("form"); | |
if (!form.is("form")) { | |
form = this.$el.find("form"); | |
} | |
return form.data().unobtrusiveValidation.validate(); | |
} |
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.Generic; | |
using System.ComponentModel.DataAnnotations; | |
using System.Text.RegularExpressions; | |
using System.Web.Mvc; | |
namespace MyApp.Web.PresentationLogic.Validation | |
{ | |
[AttributeUsage(AttributeTargets.Property, AllowMultiple = false)] | |
public sealed class EmailAddressAttribute : DataTypeAttribute, IClientValidatable |
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 UrlHelperExtensions | |
{ | |
private static int _revisionNumber; | |
public static string ContentVersioned(this UrlHelper urlHelper, string contentPath) | |
{ | |
string url = urlHelper.Content(contentPath); | |
int revisionNumber = GetRevisionNumber(); | |
return String.Format("{0}?v={1}", url, revisionNumber); |
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
tr.countersink.top td { | |
-webkit-box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.125); | |
-moz-box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.125); | |
box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.125); | |
} | |
tr.countersink td { | |
background-color: #F7F7F7; | |
-webkit-box-shadow: inset 0 0px 5px rgba(0, 0, 0, 0.125); | |
-moz-box-shadow: inset 0 0px 5px rgba(0, 0, 0, 0.125); |
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.Net; | |
using System.Web.Mvc; | |
namespace MyApp.Web.PresentationLogic.ActionFilters | |
{ | |
public class HandleAjaxErrorAttribute : HandleErrorAttribute | |
{ | |
public override void OnException(ExceptionContext filterContext) | |
{ | |
if (!filterContext.RequestContext.HttpContext.Request.IsAjaxRequest()) |
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
2013-01-27 10:11:26.113 iOS-logging-experiments[24010:c07] -[BPViewController logContextButtonPressed:]:31 someObject=( | |
) | |
2013-01-27 10:11:26.115 iOS-logging-experiments[24010:c07] -[BPViewController logContextButtonPressed:]:34 someObject=( | |
foo | |
) | |
2013-01-27 10:11:26.116 iOS-logging-experiments[24010:c07] -[BPViewController logContextButtonPressed:]:36 someObject=( | |
foo | |
) | |
2013-01-27 10:11:26.138 iOS-logging-experiments[24010:c07] ( | |
0 iOS-logging-experiments 0x000021ee -[BPViewController logContextButtonPressed:] + 302 |