- 静的リンクしたい場合は
-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 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 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 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 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) |
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
// dotnet add package Microsoft.Extensions.Hosting; | |
// dotnet add package System.Reactive; | |
using Microsoft.Extensions.Options; | |
using Microsoft.Extensions.Configuration; | |
using System.Reactive.Concurrency; | |
using System.Reactive.Subjects; | |
using System.Reactive.Linq; | |
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.CommandLine; | |
using System.CommandLine.Binding; | |
var opt1 = new Option<string>(new string[]{ "--opt1", "-o1" }, "this is option1"); | |
var opt2 = new Option<int>(new string[]{ "--opt2", "-o2" }, "this is option2"); | |
var rootcmd = new RootCommand("this is root"); | |
rootcmd.Add(opt1); | |
rootcmd.Add(opt2); | |
rootcmd.AddCommand(CreateCommand1()); |
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
// this works with linux | |
use std::fs; | |
use pelite::pe64::Pe; | |
use pelite::pe32::Pe as Pe32; | |
use pelite::Error as PeErrors; | |
use memmap2::Mmap; | |
fn output_ver_info(p: &std::path::Path) -> Result<(), anyhow::Error> { | |
{ | |
// let f = std::fs::File::open(p)?; |