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> | |
/// Pause for a short period of time | |
/// </summary> | |
/// <param name="delay">Seconds, Minutes, Hours as <see cref="TimeSpan"/></param> | |
public void Pause(ref TimeSpan delay) | |
{ | |
int milliseconds; | |
// DateTime dMark = DateTime.Add(TimeInterval, TimeLength, DateTime.Now); | |
var dMark = DateTime.Now.Add(delay); |
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
private static TEnum? ParseEnum<TEnum>(string value) | |
where TEnum : struct | |
{ | |
// var resultInputType = default(TEnum); | |
if (Enum.TryParse(value, true, out TEnum resultInputType)) | |
return resultInputType; | |
return null; | |
} |
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.Text.RegularExpressions; | |
namespace ConsoleApp1 | |
{ | |
public class AlphaNumericComparer : IComparer<string> | |
{ | |
public int Compare(string first, string second) | |
{ |
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
function formatPhoneNumber(phoneNumberString) { | |
var cleaned = ('' + phoneNumberString).replace(/\D/g, ''); | |
var match = cleaned.match(/^(\d{3})(\d{3})(\d{4})$/); | |
if (match) { | |
return '(' + match[1] + ') ' + match[2] + '-' + match[3]; | |
} | |
return null; | |
} |
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
var locationGrid; | |
$(document).ready(function () { | |
$('#btnLocationSave').disable(true); | |
$('#LocCapacity').ForceNumericOnly(); | |
// PagedGrid pager code below | |
locationGrid = new Grid({ |
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
Update to latest version | |
https://chocolatey.org/packages/docfx#upgrade | |
command prompt on project folder | |
Setup: | |
docfx init -q | |
Build: |
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
/* | |
Show/hide for breakpoint and down: | |
hidden-xs-down (hidden-xs) = d-none d-sm-block | |
hidden-sm-down (hidden-sm hidden-xs) = d-none d-md-block | |
hidden-md-down (hidden-md hidden-sm hidden-xs) = d-none d-lg-block | |
hidden-lg-down = d-none d-xl-block | |
hidden-xl-down (n/a 3.x) = d-none (same as hidden) | |
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
function formatNumericForDisplay(num, places, fixed) { | |
try { | |
var factor = Math.pow(10, places); | |
var newNum = Math.round(num * factor) / factor; | |
if (fixed) { | |
newNum = newNum.toFixed(places); | |
} | |
return newNum.toLocaleString('en'); | |
} catch (err) { | |
console.error(err); |
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 WMS.Ui.Models.Validation | |
{ | |
public enum Comparison | |
{ | |
IsEqualTo, | |
IsNotEqualTo | |
} | |
} |
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; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Linq; | |
namespace Formatters | |
{ | |
public class ObjectToCsv | |
{ |
NewerOlder