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.Net; | |
using System.Threading.Tasks; | |
using System.Net.NetworkInformation; | |
using System.Net.Sockets; | |
using System.Runtime.Intrinsics; | |
using System.Threading; | |
using BenchmarkDotNet.Attributes; | |
using BenchmarkDotNet.Running; | |
using System.Collections.Concurrent; |
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
#include <Windows.h> | |
#include <stdio.h> | |
int main() { | |
SetConsoleCP(CP_UTF8); | |
SetConsoleOutputCP(CP_UTF8); | |
printf("GetConsoleCP: %u\n", GetConsoleCP()); | |
printf("GetConsoleOutputCP: %u\n", GetConsoleOutputCP()); |
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<typename T, typename Deleter> | |
class unique_resource { | |
public: | |
explicit unique_resource(T handle = T{}) noexcept : m_handle{ handle } | |
{ | |
} | |
unique_resource(unique_resource&& resource) noexcept : m_handle{ resource.m_handle } | |
{ | |
resource.m_handle = T{}; |