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
/// <summary> | |
/// Retry helpers for common retry scenario | |
/// </summary> | |
public static class Retry | |
{ | |
/// <summary> | |
/// The default retry count | |
/// </summary> | |
public const int RetryCount = 5; |
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
<script src="~/_framework/blazor.server.js" autostart="false" asp-append-version="true"></script> | |
<script> | |
Blazor.start({ | |
configureSignalR: function (builder) { | |
builder.withUrl('_blazor', { | |
skipNegotiation: true, | |
transport: 1 | |
}); | |
builder.configureLogging(1); | |
} |
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.Collections.Generic; | |
using System.Linq; | |
using FluentAssertions; | |
using Xunit; | |
namespace DeltaCompare.Tests | |
{ | |
public class DeltaCompareTests | |
{ |
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
$outFile = ".\output.m4a" | |
$mergeText = ".\merge.txt" | |
$metadataText = ".\metadata.txt" | |
# cleanup working files | |
If (Test-Path $outFile){ | |
Remove-Item $outFile | |
} | |
If (Test-Path $mergeText){ | |
Remove-Item $mergeText |
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
<template> | |
<require from="book-form"></require> | |
<book-form></book-form> | |
<div class="notification" show.bind="notification.length > 0"> | |
${notification} | |
</div> | |
</template> |
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
ChangeTracker.Default.Configure(c => c | |
.Entity<User>(e => | |
{ | |
e.AutoMap(); | |
e.Property(p => p.FirstName).Equality((original, current) => string.Equal(original, current, IgnoreCase)); | |
e.Property(p => p.Updated).Ignore(); | |
e.Descriptor(e => $"{e.FirstName} {e.LastName}"); |
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
static formatPhone(phone: string): string { | |
var regexPhone = /^\(?([0-9]{3})\)?[-. ]?([0-9]{3})[-. ]?([0-9]{4})$/; | |
var regexExtension = /^\(?([0-9]{3})\)?[-. ]?([0-9]{3})[-. ]?([0-9]{4})[-. ]?[A-Za-z:. ]*([0-9]+)$/; | |
if (regexExtension.test(phone)) { | |
return phone.replace(regexExtension, "($1) $2-$3 x$4"); | |
} else if (regexPhone.test(phone)) { | |
return phone.replace(regexPhone, "($1) $2-$3"); | |
} else { | |
return phone; |
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
public class TestCase | |
{ | |
public void Configure() | |
{ | |
DataGenerator.Configue(c => c | |
.Entity<User>(m => | |
.AutoMap() | |
.Map(e => { | |
e.Property(p => p.FirstName).DataSource<FirstNameSource>(); | |
e.Property(p => p.LastName).DataSource<LastNameSource>(); |
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
public void HttpClientPost(){ | |
// post data | |
var post = new Dictionary<string, string>() | |
{ | |
{ "grant_type", "refresh_token" }, | |
{ "client_id", consumerkey }, | |
{ "client_secret", consumerSecret }, | |
{ "refresh_token", refreshToken } | |
}; | |
var content = new FormUrlEncodedContent(post); |
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
@echo off | |
for /F "tokens=1* delims= " %%A in ('date /T') do set CDATE=%%B | |
for /F "tokens=1,2 eol=/ delims=/ " %%A in ('date /T') do set mm=%%B | |
for /F "tokens=1,2 delims=/ eol=/" %%A in ('echo %CDATE%') do set dd=%%B | |
for /F "tokens=2,3 delims=/ " %%A in ('echo %CDATE%') do set yyyy=%%B | |
set datePart=%yyyy%-%mm%-%dd% | |
set backPath=D:\Backup\Back-%datePart% |