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(){ | |
| "use strict"; | |
| var result = {}; // your javascript module | |
| if(typeof define !== undefined && typeof define.amd !== undefined ){ | |
| define(function(){ | |
| return result; | |
| }); | |
| } else if(typeof module !== undefined && typeof module.exports !== undefined ){ | |
| module.exports = result; | |
| } else { |
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
| var | |
| fs = require("fs"), | |
| __ = require("underscore"), | |
| url = require('url'), | |
| less = require('less'), | |
| path = require('path'), | |
| regex = /\.less$/, | |
| cache = {}, | |
| defaultOptions = { | |
| src : "", |
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 Lazy<IDocumentSession> LazyDocumentSession = RavenHelper.CreateLazySession(); | |
| public IDocumentSession DocumentSession { get { return LazyDocumentSession.Value; } } | |
| protected override void Dispose(bool disposing) | |
| { | |
| if (LazyDocumentSession.IsValueCreated) | |
| LazyDocumentSession.Value.Dispose(); | |
| base.Dispose(disposing); | |
| } |
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.Runtime.Caching; | |
| using System.Linq; | |
| namespace Caching | |
| { | |
| public class CacheContainer | |
| { |
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.Text; | |
| using System.Reflection; | |
| using System.Reflection.Emit; | |
| using System.ServiceModel; | |
| using System.Threading; | |
| using System.ServiceModel.Description; | |
| using System.Diagnostics; |
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.Linq.Expressions; | |
| using System.Web; | |
| namespace ThinkingSites.Entity | |
| { | |
| public interface I_Repository<T> | |
| { |
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
| var utils = { | |
| isValid: function (toValidate, deep, show) { | |
| if (deep === undefined) { | |
| deep = true; | |
| } | |
| var deepValid = true; | |
| if (deep) { | |
| var validateThis = ko.utils.unwrapObservable(toValidate); |
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
| // overrwrite the built in text binding handler to allow for formatting | |
| var origTextHandler = ko.bindingHandlers.text; | |
| var newTextHandler = { | |
| init: origTextHandler.init, | |
| update: function (element, valueAccessor, allBindings, viewModel, bindingContext) { | |
| var bindings = allBindings(); | |
| if (bindings.format) { |
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 static IOrderedQueryable<T> OrderBy<T>(this IQueryable<T> source, string property) | |
| { | |
| return ApplyOrder<T>(source, property, "OrderBy"); | |
| } | |
| public static IOrderedQueryable<T> OrderByDescending<T>(this IQueryable<T> source, string property) | |
| { | |
| return ApplyOrder<T>(source, property, "OrderByDescending"); | |
| } | |
| public static IOrderedQueryable<T> ThenBy<T>(this IOrderedQueryable<T> source, string property) | |
| { |
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 formatAddress(obj, context) { | |
| // this allows you to pass in a context and keys instead of values | |
| if (arguments.length >= 2) { | |
| if (context) { | |
| obj = { | |
| address: _.map(obj.address, function (item) { | |
| return context[item]; | |
| }), | |
| city: context[obj.city], |
OlderNewer