- 静的リンクしたい場合は
-DCMAKE_DEFAULT_CMP0091=NEW "-DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded$<$<CONFIG:Debug>:Debug>"
とする- cmake-3.15以降
- ビルド出力先の指定は
-B
、ソース指定は-S
- VSの場合、ターゲットアーキテクチャを
-A
オプションで指定する(x64,Win32) - VSの場合、リリースビルドしたいときは
--config Release
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.Text; | |
// space(U+0020),tab(U+0009),fullwidth space(U+3000),linefeed(U+000a) | |
var str = "a b\tc d\n"; | |
foreach(var x in str.Split(' ')) | |
{ | |
Console.WriteLine($"a: '{x}'"); | |
} | |
foreach(var x in str.Split(null)) | |
{ |
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; | |
public class RedBlackNode<T> where T : IComparable<T> | |
{ | |
public T Data { get; set; } | |
public RedBlackNode<T> Left { get; set; } | |
public RedBlackNode<T> Right { get; set; } | |
public bool IsRed { get; set; } | |
} |
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] | |
name = "tokiotest" | |
version = "0.1.0" | |
authors = ["itn3000"] | |
edition = "2018" | |
[dependencies] | |
tokio = { version = "1.21",features = [ | |
"rt", | |
"rt-multi-thread", |
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
// This benchmark use one record and TryGetValue returns true. | |
// Results will be affected by record num and whether match any record or not. | |
using System.Collections.Concurrent; | |
using BenchmarkDotNet.Attributes; | |
using BenchmarkDotNet.Running; | |
BenchmarkRunner.Run<ConcurrentDictionaryBench>(); | |
record C1(string a, int b, string c); |
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 FASTER.core; | |
// ensure log directory is empty. | |
if (Directory.Exists("abc")) | |
{ | |
Directory.Delete("abc", true); | |
} | |
using var fl = new FasterLog(new FasterLogSettings("abc") | |
{ |
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
# This is a basic workflow to help you get started with Actions | |
name: CI | |
# Controls when the workflow will run | |
on: | |
# Triggers the workflow on push or pull request events but only for the master branch | |
release: | |
types: | |
- published |
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
// dotnet add package NuGet.Versioning --version 6.1.0 | |
using System; | |
using System.Reflection; | |
using NuGet.Versioning; | |
namespace nugetclienttest | |
{ | |
class Program | |
{ | |
static void OutputVersion(NuGetVersion v) |