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 Microsoft.Practices.EnterpriseLibrary.Common.Instrumentation; | |
using Microsoft.Practices.EnterpriseLibrary.Logging; | |
using Microsoft.Practices.EnterpriseLibrary.Logging.Instrumentation; | |
using System.Diagnostics; | |
using System.Management.Instrumentation; | |
namespace Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners | |
{ | |
/// <summary> |
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.Diagnostics; | |
using System.Linq; | |
using System.Text; | |
using System.Text.RegularExpressions; | |
using NUnit.Framework; | |
namespace StringReplace | |
{ | |
public static class Program |
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
define [..., 'mustache', 'text!dashboard-template.html'], (..., Mustache, dashboardTemplate) -> | |
class Router extends Backbone.Router | |
... | |
routes: | |
'': 'dashboard' | |
'about': 'about' | |
dashboard: -> | |
$.get 'dashboard', (data) => @render(Mustache.render(dashboardTemplate, data)) | |
... |
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 DownloadDataModel | |
{ | |
public string Data { get; set; } | |
public string Filename { get; set; } | |
public string MimeType { get; set; } | |
} | |
public class DownloadDataBehavior : BasicBehavior | |
{ | |
private readonly IFubuRequest _request; |
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
(function() { | |
var plugin = function($) { | |
$.fn.validate = function (selectors, predicate, message) { | |
if (!$.isArray(selectors)) selectors = [selectors]; | |
var controlGroups = []; | |
var values = []; | |
for (index in selectors) { | |
var input = this.find(selectors[index]); | |
if (input.length == 0) throw 'Selector invalid: ' + selectors[index]; | |
input = $(input[0]); |
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
(function() { | |
var plugin = function(Backbone) { | |
LazyCollection = Backbone.Collection.extend(); | |
LazyCollection.prototype.indexQuerystring = 'index'; | |
LazyCollection.prototype.index = 0; | |
LazyCollection.prototype.lastLength = -1; | |
LazyCollection.prototype.fetch = function(options) { |
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
(function() { | |
var plugin = function($) { | |
$.dialog = function (option) { | |
var content = '<div class="modal hide ' + option.css + '">'; | |
content += '<div class="modal-header">'; | |
content += '<a class="close" data-dismiss="modal">×</a><h3>' + option.title + '</h3>'; | |
content += '</div>'; | |
content += '<div class="modal-body">' + option.body + '</div>'; | |
content += '<div class="modal-footer">'; | |
content += '<a class="btn btn-primary ok">' + option.button + '</a>'; |
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
<html> | |
<title><use content="title" /></title> | |
<head> | |
<!-- | |
These url's are all relative to the master layout but will | |
not be valid for views that exist in different folders. | |
I'm hoping to keep the url's relative but I'm not sure if | |
there is a way to accomplish that in a master layout. |
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
window.error = (message) -> | |
console.log message | |
phantom.exit 1 | |
#window.onerror = (message) -> | |
# console.log message | |
# phantom.exit 1 | |
Date.prototype.elapsed = -> (new Date() - @) / 1000; |