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; | |
| namespace JsEnginePerformanceComparison | |
| { | |
| class Program | |
| { | |
| static void Main() | |
| { | |
| var done = 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
| using AutoMapper; | |
| using Microsoft.CodeAnalysis; | |
| using Microsoft.CodeAnalysis.CSharp; | |
| using System; | |
| using System.IO; | |
| using System.Text; | |
| namespace PclBreakage | |
| { | |
| 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
| function Stopwatch() | |
| { | |
| var sw = this; | |
| var start = null; | |
| var stop = null; | |
| var isRunning = false; | |
| sw.__defineGetter__("ElapsedMilliseconds", function() | |
| { | |
| return (isRunning ? new Date() : stop) - start; |
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
| class Program | |
| { | |
| static void Main(string[] args) | |
| { | |
| const string mom = "mom"; | |
| const string mother = "mother"; | |
| const int iterations = 10000; | |
| var sw = new Stopwatch(); | |
| sw.Start(); |
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 async Task StartAzureStorageEmulator() | |
| { | |
| if (!Settings.Default.StartAzureStorageEmulator) | |
| return; | |
| try | |
| { | |
| var storageAccount = CloudStorageAccount.Parse(Settings.Default.AzureStorageConnectionString); | |
| var blobClient = storageAccount.CreateCloudBlobClient(); | |
| var container = blobClient.GetContainerReference("test"); |
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
| switch(policy.LanguageType) | |
| { | |
| case LanguageTypes.CSharp: | |
| // process c# rules | |
| break; | |
| case LanguageTypes.Python: | |
| //process python rules | |
| break; | |
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
| //do this once and cache it | |
| var ruleEngineTypes = new Dictionary<LanguageTypes, Type>(); | |
| ruleEngineTypes.Add(LanguageTypes.CSharp, typeof(CSharpRuleEngine)); | |
| ruleEngineTypes.Add(LanguageTypes.Python, typeof(PythonRuleEngine)); | |
| ruleEngineTypes.Add(LanguageTypes.JavaScript, typeof(JavaScriptRuleEngine)); | |
| //switch turns into this... | |
| var ruleEngineType = ruleEngineTypes[policy.LanguageType]; | |
| var engine = (IRuleEngine)Activator.CreateInstance(ruleEngineType); | |
| engine.Execute(plan); |
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 ExecuteRules(data) | |
| { | |
| (function Rule004596ed979540878bc366521663501d(data) | |
| { | |
| var sw004596ed979540878bc366521663501d = new Stopwatch(); | |
| sw004596ed979540878bc366521663501d.Start(); | |
| var result004596ed979540878bc366521663501d = new Result(); | |
| result004596ed979540878bc366521663501d.RuleId = Guid.Parse("004596ed-9795-4087-8bc3-66521663501d"); |
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
| ## Macro title: HTML5 Video | |
| ## Macro has a body: N | |
| ## | |
| ## Output: HTML | |
| ## | |
| ## Developed by: David Simpson <[email protected]> | |
| ## Date created: dd/mm/yyyy | |
| ## Installed by: My Name | |
| ## | |
| ## @param width:title=Width|type=string|required=false|desc=Video width |
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
| ## Macro title: HTML5 Video | |
| ## Macro has a body: N | |
| ## | |
| ## Output: HTML | |
| ## | |
| ## Developed by: David Simpson <[email protected]> | |
| ## Date created: dd/mm/yyyy | |
| ## Installed by: My Name | |
| ## | |
| ## @param width:title=Width|type=string|required=false|desc=Video width |