Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@stuartd
stuartd / vonage_test.json
Last active January 28, 2022 12:21
Gist description
[
{
"action": "stream",
"streamUrl": [
"https://telephonebanking.azurewebsites.net/calllogs/Stuart_22_01_28_12_15_07_96/call_audio.wav"
]
}
]
[MemoryDiagnoser]
public class JsonSerializeBenchmark {
private const string json = "{\"Name\":\"insert name here\",\"Addresses\":[{\"Line1\":\"Address line 1\",\"Line2\":\"Address line 2\"},{\"Line1\":\"Address line 1\",\"Line2\":\"Address line 2\"}]}";
[Benchmark]
public string Deserialize() => DeserializeJson();
[Benchmark]
public string Parse() => ParseJson();
Item Answer
AmbiguousItem.PrivatePension A private pension is a plan that people may pay into from their earnings, which then will pay back to them when they retire. This is an alternative to the State Pension.
AmbiguousItem.ChildSupport Child support is sometimes known as child maintenance. This is a regular payment made by a parent for the financial benefit of a child following the end of a significant relationship.
AmbiguousItem.Rent If you are living in a property you don’t own, you usually pay a regular payment to the owner of that property. This is your rent. {nl} If you own a property and you are renting it out, this applies to the payment you receive from any tenants living in your property.
Housing.Mortgage A mortgage is a type of loan that a bank or building society lends to you to help you buy a property. It is secured against your home, which means that you may lose your home if you can’t keep up with the repayments.
Housing.SecuredLoan A secured loan is a loan, other than you
var name = "directory name";
var path = @"c:\temp\dirtest";
for (int i = 0; i < 12; i++)
{
CreateDirectory(name, path);
}
void CreateDirectory(string directoryName, string filePath)
{
using System;
using System.Data.SQLite;
using System.Diagnostics;
using System.IO;
using System.Linq;
namespace ClipboardDiff {
class Program {
static void Main(string[] args) {
string text1 = null;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using iTunesLib;
namespace ConsoleApp1
{
class Program
{
public enum DistanceType {
Miles = 1,
Kilometers,
Feet,
Meter
}
public static class DistanceCalculator {
private const double radianCalculator = Math.PI / 180;
private TimeSpan ConvertDriveTimeStringToTime() {
if (string.IsNullOrEmpty(driveTime)) {
return TimeSpan.Zero;
}
// "1 day 4 hours", "4 hours 12 mins", "1 min"
var bits = driveTime.Split();
int value = 0;
TimeSpan result = TimeSpan.Zero;

Lost from https://blogs.msdn.microsoft.com/ericgu/2004/01/12/minus-100-points/

When I switched over the C# compiler team, I had hoped that I would be able to give some insight into how the design team works, what decisions we make, etc. Language design is a very esoteric field, and there's not a lot written about it (though “Design and evolution of C++“ is a pretty good read). I had hoped that I would be able to do this with concrete examples, as that makes it much easier.

I've been watching for candidate topics to write about, but haven't yet come up with any good ones. One of the problems is that features have a tendency to morph in design (and in whether they'll make it into Whidbey) as time goes by, and it would be bad for me to say, “we're talking about doing“ and then have us decide it wasn't a good idea. Or, for us to decide that doesn't fit into our schedule, or it would break existing code, or any of the other reasons that might cause us to pull a feature. We're generally not comfortable re

Command:
C:\Program Files\SourceGear\Common\DiffMerge\sgdm.exe
Compare:
/title1=%6 /title2=%7 %1 %2
Merge: