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.Diagnostics; | |
using System.Text; | |
namespace Kebab | |
{ | |
internal class Program | |
{ | |
static void Main(string[] args) | |
{ | |
var test1 = FromKebabToCamel("kebab-case-two"); |
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 Microsoft.AspNetCore.Mvc; | |
using System.Data; | |
using System.Text.Json; | |
namespace DynamicQueryToJson.Controllers | |
{ | |
public class JsonFromDatatableResult : ActionResult | |
{ | |
private readonly DataTable dataTable; |
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 Lucene.Net.Analysis; | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using System.IO; | |
using Lucene.Net.Analysis.Util; | |
using Lucene.Net.Util; | |
using Lucene.Net.Analysis.Standard; |
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.Drawing; | |
namespace ConsoleApp1 | |
{ | |
public class ThreeColorSet | |
{ | |
public Color FirstColor { get; set; } |
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 Microsoft.Identity.Client; | |
using System; | |
using System.IO; | |
using System.Net.Http; | |
using System.Net.Http.Headers; | |
using System.Security.Cryptography.X509Certificates; | |
using System.Threading.Tasks; | |
namespace SharePoint.RestApi | |
{ |
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 bool DeepEquals(object a, object b) | |
{ | |
if (a == null) | |
{ | |
if (b == null) return true; | |
else return false; | |
} | |
else if (b == null) return false; | |
if (object.ReferenceEquals(a, b)) return true; |
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 { Injectable } from '@angular/core'; | |
import { Router, CanActivate, CanActivateChild, ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router'; | |
import { AdalService } from 'adal-angular4'; | |
@Injectable() | |
export class AuthenticationGuard implements CanActivate, CanActivateChild { | |
constructor( | |
private router: Router, | |
private adal: AdalService | |
) { } |
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 MessagePack; | |
using System; | |
using System.Diagnostics; | |
using System.Runtime.CompilerServices; | |
using System.Runtime.InteropServices; | |
using System.Threading; | |
namespace ConsoleApp | |
{ | |
public interface IS |
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 Index<TItem, TKey> | |
{ | |
private readonly SortedSet<KeyValuePair<TKey, List<TItem>>> sortedSet; | |
public Index(IEnumerable<TItem> items, Func<TItem, TKey> keySelector, Comparer<TKey> keyComparer = null) | |
{ | |
if (keyComparer == null) keyComparer = Comparer<TKey>.Default; | |
var keyPairComparer = Comparer<KeyValuePair<TKey, List<TItem>>>.Create((x, y) => keyComparer.Compare(x.Key, y.Key)); | |
var keyPairs = items.GroupBy(keySelector).Select(x => new KeyValuePair<TKey, List<TItem>>(x.Key, x.ToList())); | |
sortedSet = new SortedSet<KeyValuePair<TKey, List<TItem>>>(keyPairs, keyPairComparer); |
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
<?xml version="1.0" encoding="utf-8" ?> | |
<rows> | |
<row Id="4" | |
PostTypeId="1" | |
Body="This is the body of question 4" | |
Title="When setting a form's opacity should I use a decimal or double" | |
AnswerCount="5" | |
/> | |
<row Id="6" |
NewerOlder