$/
docs/
src/
tests/
samples/
artifacts/
packages/
build/
lib/
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
| /** | |
| * Perform a deeply recursive reduce on a set of JSON, or a JSON-encodable Object hierarchy. | |
| * | |
| * @param {Array|Object} collection | |
| * @param {Function} fn | |
| * @param {*} memo | |
| * @return {*} | |
| */ | |
| function deepReduce(collection, fn, memo) { |
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 ConsoleRequestLogger : DelegatingHandler | |
| { | |
| protected async override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) | |
| { | |
| Console.ForegroundColor = ConsoleColor.Cyan; | |
| Console.WriteLine("> {0} {1}",request.Method,request.RequestUri.GetComponents(UriComponents.PathAndQuery, UriFormat.SafeUnescaped)); | |
| ProcessHeader(request.Headers, (name, value) => Console.WriteLine("> {0}: {1}", name, value)); | |
| if (request.Content != null) | |
| { |
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.Data; | |
| using System.Data.SqlClient; | |
| using System.Net; | |
| using System.Net.Http; | |
| using System.Net.Http.Formatting; | |
| using System.Threading; | |
| using System.Threading.Tasks; | |
| using System.Web.Http; | |
| using Newtonsoft.Json.Linq; |
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
| <system.webServer> | |
| <httpProtocol> | |
| <customHeaders> | |
| <add name="X-UA-Compatible" value="IE=Edge" /> | |
| </customHeaders> | |
| </httpProtocol> | |
| <system.webServer> |
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
| app.config(function($stateProvider, BaseSettingsService, PrintSettingsService) { | |
| $stateProvider | |
| // All app states loaded in index.html | |
| .state('app', { | |
| abstract: true, | |
| templateUrl: 'views/app.html', | |
| controller: 'AppCtrl', | |
| resolve: { | |
| baseSettings: settings: function(BaseSettingsService) { |
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 PdfFilter : Stream | |
| { | |
| private readonly Stream _oldFilter; | |
| private readonly string _baseUrl; | |
| private readonly MemoryStream _memStream; | |
| public override bool CanSeek | |
| { | |
| get { return false; } | |
| } |
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
| @if (Model == null) { | |
| <text>@ViewData.ModelMetadata.NullDisplayText</text> | |
| } else if (ViewData.TemplateInfo.TemplateDepth > 1) { | |
| <text>@ViewData.ModelMetadata.SimpleDisplayText</text> | |
| } else { | |
| foreach (var prop in ViewData.ModelMetadata.Properties.Where(pm => pm.ShowForDisplay && !ViewData.TemplateInfo.Visited(pm))) { | |
| if (prop.HideSurroundingHtml) { | |
| <text>@Html.Editor(prop.PropertyName)</text> | |
| } else { | |
| <p> |
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
| angular.module('app.core') | |
| .factory('templateModifierInterceptor', [ | |
| '$q', | |
| '$templateCache', | |
| function($q) { | |
| var modifiedTemplates = {}; | |
| var HAS_FLAGS_REGEX = /data-dom-(remove|keep)/; | |
| var HTML_PAGE_REGEX = /\.html$|\.html\?/i; | |
| return { |
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
| angular.module('myMdl', []).config(['$httpProvider', function($httpProvider) { | |
| $httpProvider.responseInterceptors.push([ | |
| '$q', '$templateCache', 'activeProfile', | |
| function($q, $templateCache, activeProfile) { | |
| // Keep track which HTML templates have already been modified. | |
| var modifiedTemplates = {}; | |
| // Tests if there are any keep/omit attributes. | |
| var HAS_FLAGS_EXP = /data-(keep|omit)/; |