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
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 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 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 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 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 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 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 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 React, { useState, useEffect, createContext } from "react"; | |
import Loader from './Loader'; | |
interface Props { | |
children: JSX.Element; | |
file?: string; | |
} | |
interface IConfiguration{ |
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
resources: | |
containers: | |
- container: sqlserver | |
image: mcr.microsoft.com/mssql/server:2019-latest | |
ports: | |
- 1433:1433 | |
env: | |
ACCEPT_EULA: 'Y' | |
SA_PASSWORD: $(SqlPassword) |
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 DictionaryExtensions | |
{ | |
/// <summary> | |
/// Adds a key/value pair to the Dictionary if the key does not already exist. | |
/// </summary> | |
/// <typeparam name="TKey">The type of the keys in the dictionary.</typeparam> | |
/// <typeparam name="TValue">The type of the values in the dictionary.</typeparam> | |
/// <param name="dictionary"></param> | |
/// <param name="key">The key of the element to add.</param> | |
/// <param name="valueFactory">The function used to generate a value for the key.</param> |