This file contains 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
[MemoryDiagnoser] | |
public class LastBenchmarks | |
{ | |
string[] segments = "abc/xyz".Split('/'); | |
[Benchmark] | |
public string LastitemUsingLINQ() | |
{ | |
return segments.Last(); | |
} |
This file contains 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
// Opera 63 in OSX | |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.100 Safari/537.36 OPR/63.0.3368.35 | |
Chrome in OSX | |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.132 Safari/537.36 | |
Safari in OSX |
This file contains 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.Collections.Generic; | |
using BenchmarkDotNet.Attributes; | |
using BenchmarkDotNet.Running; | |
using Microsoft.Extensions.Configuration; | |
using Microsoft.Extensions.Configuration.Memory; | |
namespace Microsoft.Extensions.Primitives.Performance | |
{ | |
public class ConfigurationBenchmark | |
{ |
This file contains 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
/ Token: 0x06000001 RID: 1 RVA: 0x00002048 File Offset: 0x00000248 | |
.method private hidebysig static | |
void Main ( | |
string[] args | |
) cil managed | |
{ | |
// Header Size: 12 bytes | |
// Code Size: 25 (0x19) bytes | |
// LocalVarSig Token: 0x11000001 RID: 1 | |
.maxstack 2 |
This file contains 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
Safari | |
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_2) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.0.2 Safari/605.1.15" = $15 |
This file contains 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
//What is the alternative of getting rid of the nested callback hell ? | |
//Load the data for the 3 dropdowns | |
$http.get('Products/AllProducts/').success(function (data) { | |
$scope.products = data; | |
$http.get('Colors/AllColors/').success(function (colordata) { | |
$scope.colors = colordata; | |
$http.get('Products/AllSizes/').success(function (sizedata) { |
This file contains 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 Microsoft.Practices.Unity; | |
public class Program | |
{ | |
public interface ILoader<IPoco> | |
{ | |
string Name {get;} | |
} |
This file contains 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.Threading.Tasks; | |
public class Program | |
{ | |
public static void Main() | |
{ |
This file contains 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 KPIDataProcessor<T> : IDataProcessor<T> | |
{ | |
public IEnumerable<T> Dtos { set; get; } | |
public void ProcessData() | |
{ | |
Console.WriteLine("Processing KPI data"); | |
} | |
} | |
public interface IDataProcessor<T> | |
{ |