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 MeasuredInput | |
{ | |
public string Identifier { get; set; } | |
public int MeasuredValue { get; set; } | |
public double Confidence { get; set; } | |
} | |
public class Measurement | |
{ | |
public Measurement(string primaryId, string secondaryId, int value, double adjustedMeasurement) |
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 static class Program | |
{ | |
public static void Main(string[] args) | |
{ | |
dynamic a = 1; | |
MethodWithDynamic(a).Extension(); | |
} | |
public static int MethodWithDynamic(dynamic a) | |
{ |
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
namespace Lib | |
{ | |
public interface Counter { int Count(string s); } | |
public abstract class AbstractClass : AbstractParent | |
{ | |
public abstract int Foo(int x); | |
public virtual int Foo(string s) { return Foo(Counter.Count(s)); } | |
} |
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 Autofac; | |
using Xunit; | |
namespace ClassLibrary1 | |
{ | |
public class Stackoverflow24762539 | |
{ | |
[Fact] | |
public void Repro() |
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.Diagnostics; | |
using System.Linq; | |
namespace PerformanceProblem | |
{ | |
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
using System; | |
using System.Collections.Generic; | |
using System.Diagnostics; | |
using System.Linq; | |
namespace PerformanceProblem | |
{ | |
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
Empty: 34 items | |
Identity: 25 items | |
Always true: 9 items |
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.Net.Http; | |
using System.Threading.Tasks; | |
namespace HttpClientMemoryLeak | |
{ | |
class Program | |
{ | |
public static async Task TestMethod() | |
{ |
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.Net; | |
using System.Net.Http; | |
using System.Text; | |
using System.Threading; | |
using System.Threading.Tasks; | |
namespace HttpClientMemoryLeak | |
{ | |
class Program |
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
import scala.collection.mutable.LinkedHashMap | |
val catFile = Seq("1\0012\0013\0014", "5\0016\0017\0018") | |
var categoryMap = LinkedHashMap[ Int, Tuple2[ String, Int ] ]() | |
catFile.foreach(line => { | |
val strs = line.split("\001") | |
categoryMap += (strs(0).toInt ->(strs(2), strs(3).toInt)) | |
}) | |
categoryMap |
OlderNewer