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
| tr:not(:first-child) { | |
| color: red; | |
| } |
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
| namespace Tests.Core.Builder | |
| { | |
| using System; | |
| public class TestDataBuilder<T, U> where T : TestDataBuilder<T, U>, new() where U : new() | |
| { | |
| private readonly U entity = new U(); | |
| protected TestDataBuilder() | |
| { |
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
| #load "ApiControllerWithHub.csx" | |
| using System; | |
| using System.Collections; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Reflection; | |
| using System.IO; | |
| using System.Net; | |
| using System.Net.Http; |
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 abstract class ApiControllerWithHub<THub> : ApiController where THub : IHub | |
| { | |
| Lazy<IHubContext> hub = new Lazy<IHubContext>( | |
| () => GlobalHost.ConnectionManager.GetHubContext<THub>() | |
| ); | |
| protected IHubContext Hub | |
| { | |
| get { return hub.Value; } | |
| } |
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 s = "Replace {foo}"; | |
| var o = { foo: "this"}; | |
| var result = s.interpolate(o); | |
| console.log(result); | |
| // Replace this | |
| */ | |
| String.prototype.interpolate = function (o) { | |
| return this.replace(/{([^{}]*)}/g, function (a, b) { | |
| var r = o[b]; |
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
| Number.prototype.formatMoney = function (c, d, t) { | |
| var n = this, | |
| s = n < 0 ? "-" : "", | |
| j = (j = i.length) > 3 ? j % 3 : 0; | |
| c = isNaN(c = Math.abs(c)) ? 2 : c, | |
| d = d === undefined ? "," : d, | |
| t = t === undefined ? "." : t, | |
| var i = parseInt(n = Math.abs(+n || 0).toFixed(c), 10) + ""; |
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
| Date.prototype.formatDDMMYYYY = function () { | |
| return ('0' + this.getDate()).slice(-2) + | |
| '/' + ('0' + (this.getMonth() + 1)).slice(-2) + | |
| '/' + this.getFullYear(); | |
| }; | |
| Date.prototype.formatDDMMYYYYWithHMS = function () { | |
| return ('0' + this.getDate()).slice(-2) + | |
| '/' + ('0' + (this.getMonth() + 1)).slice(-2) + | |
| '/' + this.getFullYear() + |
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 App = { namespace: 'foo' }; | |
| (function (factory) { | |
| 'use strict'; | |
| if (typeof define === 'function' && define.amd) { | |
| // Register as an anonymous AMD module: | |
| define([ | |
| 'jquery' | |
| , 'jqueryui' | |
| , App |
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 App = App || {}; | |
| (function (factory) { | |
| 'use strict'; | |
| if (typeof define === 'function' && define.amd) { | |
| // Register as an anonymous AMD module: | |
| define([ | |
| App | |
| ], factory); | |
| } 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 App = App || { }; | |
| (function (factory) { | |
| 'use strict'; | |
| if (typeof define === 'function' && define.amd) { | |
| // Register as an anonymous AMD module: | |
| define([ | |
| 'jquery', | |
| 'App' | |
| ], factory); |
OlderNewer