| { | |
| // Place your snippets for go here. Each snippet is defined under a snippet name and has a prefix, body and | |
| // description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are: | |
| // $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the | |
| // same ids are connected. | |
| // Example: | |
| // "Print to console": { | |
| // "prefix": "log", | |
| // "body": [ | |
| // "console.log('$1');", |
| using System; | |
| using System.Collections.Concurrent; | |
| using System.Collections.Generic; | |
| using System.Text.Json; | |
| using System.Text.Json.Serialization; | |
| using System.Threading; | |
| using System.Threading.Tasks; | |
| using UnityEngine; | |
| using NATS.Client.Core; |
| #include <pthread.h> | |
| #include <signal.h> | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <string.h> | |
| #include <unistd.h> | |
| /* サンプルコードの目的: マルチスレッド環境でのシグナルの扱いを理解する | |
| * | |
| * ## シグナルを扱うための関数の説明 |
| #define _POSIX_C_SOURCE 200809L | |
| #include <signal.h> | |
| #include <stdio.h> | |
| /* | |
| * sigset_basic.c | |
| * -------------- | |
| * 目的: sigset_t の操作だけを目で追えるようにするシンプルなデモ。 | |
| * シグナルハンドラや sigprocmask は使わず、集合操作の結果を表示する。 |
| #include <limits.h> | |
| #include <stdbool.h> | |
| #include <stdlib.h> | |
| #include <stdint.h> | |
| #include <stdio.h> | |
| #ifndef DEVICE_NAME_LENGTH | |
| #define DEVICE_NAME_LENGTH 32 | |
| #endif |
| #include <stdio.h> | |
| #include <pthread.h> | |
| #include <unistd.h> | |
| #include <string.h> | |
| struct net_device { | |
| unsigned int index; | |
| char name[16]; | |
| }; |
| """アプリケーション共通のロギング設定.""" | |
| from __future__ import annotations | |
| import logging | |
| import os | |
| from typing import Final | |
| LOGGER_NAME: Final[str] = "app.logging_config" |
| name: CI | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths-ignore: | |
| - "**.md" | |
| - ".gitignore" | |
| pull_request: |
| // ref: https://docs.rs/num_cpus/latest/num_cpus/fn.get.html | |
| fn main() { | |
| let logical_cpus = num_cpus::get(); | |
| let physical_cpus = num_cpus::get_physical(); | |
| println!("Logical CPUs: {}", logical_cpus); | |
| println!("Physical CPUs: {}", physical_cpus); | |
| /* | |
| if logical_cpus > physical_cpus { |