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
package kafkaStrongConfig | |
enum class Importance { Low, Medium, High } | |
@Target(AnnotationTarget.PROPERTY) | |
annotation class Config(val configName: String, val importance: Importance = Importance.Low) |
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
[MemoryDiagnoser] | |
public class EnumParserBenchNonFlagGenerated | |
{ | |
public enum DayOfWeek : byte | |
{ | |
None , | |
Monday, | |
Tuesday, | |
Wednesday, | |
Thursday, |
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
package corp; | |
import com.google.inject.*; | |
import java.util.Collections; | |
public class Main { | |
public static void main(String[] args) { | |
Injector injector = Guice.createInjector(new Module()); |
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
<# | |
.SYNOPSIS | |
Create WIP commit message | |
.EXAMPLE | |
.\PutCommitDrivenDevelopmentMessage.ps1 "Implement new important feature" | |
Example output | |
[feature/New-12345 b0d2215] New-12345 Implement new important feature | |
#> |
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; | |
namespace IntSwap | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
int i = 1, j = 2; | |
Swap1(ref i, ref j); |
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.Diagnostics.CodeAnalysis; | |
namespace Net6Demo | |
{ | |
public interface IParseable<TSelf> | |
where TSelf : IParseable<TSelf> | |
{ | |
static abstract TSelf Parse(string s, IFormatProvider? provider); | |
static abstract bool TryParse([NotNullWhen(true)] string? s, IFormatProvider? provider, out TSelf result); |
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; | |
using System.Collections.Generic; | |
using System.Globalization; | |
using System.Linq; | |
using NUnit.Framework; | |
namespace DynamicCoerce | |
{ |
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.Numerics; | |
using System.Security.Cryptography; | |
using NUnit.Framework; | |
using NUnit.Framework.Constraints; | |
namespace ProbablePrimeConstraintDemo | |
{ | |
[TestFixture] |
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.Linq; | |
using BenchmarkDotNet.Attributes; | |
using BenchmarkDotNet.Running; | |
// ReSharper disable InconsistentNaming | |
namespace StructBench | |
{ | |
class Program | |
{ |
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.Runtime.CompilerServices; | |
namespace SafeString | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
var arr = PlaySafe("Hello World!"); |