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
| ko.bindingHandlers.progressCircle = { | |
| update: function (element, valueAccessor, allBindings, viewModel, bindingContext) { | |
| var $element = $(element), | |
| opt = ko.unwrap(valueAccessor()); | |
| var options = $.extend( {}, { | |
| showText:true, | |
| size:48, | |
| thickness:3, | |
| value:100 |
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
| Latency Comparison Numbers | |
| -------------------------- | |
| L1 cache reference 0.5 ns | |
| Branch mispredict 5 ns | |
| L2 cache reference 7 ns 14x L1 cache | |
| Mutex lock/unlock 25 ns | |
| Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
| Compress 1K bytes with Zippy 3,000 ns | |
| Send 1K bytes over 1 Gbps network 10,000 ns 0.01 ms | |
| Read 4K randomly from SSD* 150,000 ns 0.15 ms |
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(['durandal/system', './transitionHelper'], function(system, helper) { | |
| var settings = { | |
| inAnimation: 'fadeInLeftBig', | |
| outAnimation: 'fadeOutRight' | |
| }, | |
| fadeIn = function(context) { | |
| system.extend(context, settings); | |
| return helper.create(context); | |
| }; |
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
| [ | |
| { "keys": ["ctrl+k","ctrl+d"], "command": "reindent" , "args": { "single_line": false } }, | |
| { "keys": ["ctrl+alt+e"], "command": "open_dir", "args": {"dir": "$file_path", "file": "$file_name"} }, | |
| { "keys": ["ctrl+k","ctrl+c"], "command": "toggle_comment" , "args": { "block": false } }, | |
| { "keys": ["ctrl+k","ctrl+u"], "command": "toggle_comment" , "args": { "block": false } }, | |
| { | |
| "keys": ["f10"], | |
| "command": "open_project_folder" |
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
| void Main() | |
| { | |
| Console.WriteLine ("Add: "+Execute(add,3,4)); | |
| Console.WriteLine ("Subtract: "+Execute(subtract,3,4)); | |
| Console.WriteLine ("Multiply: "+Execute(multiply,3,4)); | |
| } | |
| Func<int,int,int> add = (a,b) => a+b; | |
| Func<int,int,int> subtract = (a,b) => a-b; | |
| Func<int,int,int> multiply = (a,b) => a*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
| // knockout 2.2.1 | |
| ko.utils.arrayFilter = function (array, predicate) { /* .. */ } | |
| ko.utils.arrayFirst = function (array, predicate, predicateOwner) { /* .. */ } | |
| ko.utils.arrayForEach = function (array, action) { /* .. */ } | |
| ko.utils.arrayGetDistinctValues = function (array) { /* .. */ } |
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 class WebApiConfig | |
| { | |
| public static void Register(HttpConfiguration config) | |
| { | |
| // Web API configuration and services | |
| // Configure Web API to use only bearer token authentication. | |
| config.SuppressDefaultHostAuthentication(); | |
| config.Filters.Add(new HostAuthenticationFilter(OAuthDefaults.AuthenticationType)); | |
| config.Services.Replace(typeof(IAssembliesResolver),new DynamicAssemblyResolver()); | |
| // Web API routes |
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
| # | |
| # Assumptions | |
| # | |
| # 1. If you have a Octopus release deployed, say 1.0.0.73, there is a git | |
| # tag set for that commit in GitHub that is "v1.0.0.73". | |
| # | |
| # 2. You have TeamCity label each successful build in GitHub with the format | |
| # "v{build number}. Sidenote: it appears that TeamCity only labels the | |
| # default branch, but not feature branches. | |
| # |
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
| { | |
| "variables": { | |
| "client_id": "", | |
| "client_secret": "", | |
| "subscription_id": "", | |
| "tenant_id": "", | |
| "object_id": "", | |
| "resource_group": "", | |
| "storage_account": "", |