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 BenchmarkDotNet.Attributes; | |
using BenchmarkDotNet.Running; | |
namespace ForBenchmark | |
{ | |
[MemoryDiagnoser(false)] | |
public class Program | |
{ | |
[Params(10, 1000)] |
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
<#PSScriptInfo | |
.VERSION 1.0 | |
.GUID d1e5442a-c2cf-403d-a4f9-e4a54b4886bd | |
.AUTHOR Tomas Kouba | |
.COMPANYNAME Axians CZ | |
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
<#PSScriptInfo | |
.VERSION 1.1 | |
.GUID 872d1af1-6a2c-4c71-be96-4b230a8e4a5f | |
.AUTHOR Tomas Kouba | |
.COMPANYNAME | |
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
namespace TestGetBusinessDays | |
{ | |
public class UnitTestCalcBusinessDays | |
{ | |
int GetBusinessDays(DateTime startD, DateTime endD) | |
{ | |
double calcBusinessDays = | |
1 + ((endD - startD).TotalDays * 5 - | |
(startD.DayOfWeek - endD.DayOfWeek) * 2) / 7; |
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
/** | |
* USB HID Keyboard scan codes as per USB spec 1.11 | |
* plus some additional codes | |
* | |
* Created by MightyPork, 2016 | |
* Public domain | |
* | |
* Adapted from: | |
* https://source.android.com/devices/input/keyboard-devices.html | |
*/ |
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> | |
/// Compare two JSON and create diff object | |
/// </summary> | |
/// <param name="leftJson">Left JSON to compare</param> | |
/// <param name="rightJson">Right JSON to compare</param> | |
/// <returns>Diff object with the result.</returns> | |
/// <remarks> | |
/// Original version https://stackoverflow.com/a/65222961/1498252 by Rohith Daruri | |
/// based on https://stackoverflow.com/a/53654737/1498252 by Dzmitry Paliakou | |
/// </remarks> |
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.Diagnostics; | |
using System.ServiceProcess; | |
class DelayedStartService : ServiceBase | |
{ | |
private int _delay; | |
private string[] _services; |
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
$options = New-ScheduledJobOption -WakeToRun -StartIfIdle -MultipleInstancePolicy IgnoreNew -RunElevated | |
$trigger = New-JobTrigger -Once -At (Get-Date) -RepetitionInterval (New-TimeSpan -Minutes 5) -RepeatIndefinitely | |
Unregister-ScheduledJob -Name "Stop-ClusterServices" -ErrorAction SilentlyContinue | |
Register-ScheduledJob -Name "Stop-ClusterServices" -ScriptBlock { | |
(Get-ClusterGroup | Where-Object {$_.OwnerNode -ne $env:COMPUTERNAME} | Get-ClusterResource) | Where-Object {$_.ResourceType -eq 'Generic Service'} | Get-Service | Where-Object {$_.Status -eq 'Running'} | Stop-Service -Verbose | |
} -Trigger $trigger -ScheduledJobOption $options | |
(Get-ScheduledJob -Name "Stop-ClusterServices").StartJob() |
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
# Selects cluster groups which are not owned by current node | |
# then select resources with type 'Generic Service' | |
# then select 'Running' services | |
# and stop them | |
(Get-ClusterGroup | Where-Object {$_.OwnerNode -ne $env:COMPUTERNAME} | Get-ClusterResource) | Where-Object {$_.ResourceType -eq 'Generic Service'} | Get-Service | Where-Object {$_.Status -eq 'Running'} | Stop-Service -Verbose |
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
## Ignore Visual Studio temporary files, build results, and | |
## files generated by popular Visual Studio add-ons. | |
*.apk | |
# User-specific files | |
*.suo | |
*.user | |
*.userosscache | |
*.sln.docstates |
NewerOlder