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
param( | |
[string]$ProjectName | |
) | |
if (-not $ProjectName) { | |
Write-Host "Usage: .\gen_cpp_project.ps1 <ProjectName>" | |
exit | |
} | |
# 1) 現在の年を取得 |
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
#pragma once | |
#include <condition_variable> | |
#include <functional> | |
#include <mutex> | |
#include <queue> | |
#include <thread> | |
#include <vector> | |
// Job: 任意のタスクを表すクラス | |
class Job { |
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
# pip install pillow | |
import sys | |
import os | |
from PIL import Image | |
def crop_images(directory, x, y, width, height): | |
# サブディレクトリを作成 | |
output_dir = os.path.join(directory, "cropped") |
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 <vector> | |
#include <iostream> | |
#include <functional> | |
#include <unordered_map> | |
using namespace std; | |
struct Base{ virtual void print() = 0; }; | |
struct A : public Base{ void print() override { cout << "A" << endl; } }; | |
struct B : public Base{ void print() override { cout << "B" << endl; } }; |
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
set(VULKAN_LIB $ENV{VULKAN_SDK}/Lib) | |
set(VULKAN_INCLUDE $ENV{VULKAN_SDK}/Include) | |
target_link_libraries(${PROJECT_NAME} PUBLIC | |
optimized ${VULKAN_LIB}/spirv-cross-core.lib | |
optimized ${VULKAN_LIB}/spirv-cross-cpp.lib | |
optimized ${VULKAN_LIB}/spirv-cross-glsl.lib | |
optimized ${VULKAN_LIB}/OGLCompiler.lib | |
optimized ${VULKAN_LIB}/OSDependent.lib |
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 <chrono> | |
#include <vector> | |
#include <random> | |
#include <optional> | |
#include <iostream> | |
#include <execution> | |
#include <functional> | |
void calcTime(const std::function<void(void)>& func) | |
{ |
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
ImGui::StyleColorsDark(); | |
ImVec4 red80 = ImVec4(0.8f, 0.0f, 0.0f, 1.0f); | |
ImVec4 red60 = ImVec4(0.6f, 0.0f, 0.0f, 1.0f); | |
ImVec4 red40 = ImVec4(0.4f, 0.0f, 0.0f, 1.0f); | |
ImVec4 black100 = ImVec4(0.0f, 0.0f, 0.0f, 1.0f); | |
ImVec4 black90 = ImVec4(0.1f, 0.1f, 0.1f, 1.0f); | |
ImVec4 black80 = ImVec4(0.2f, 0.2f, 0.2f, 1.0f); | |
ImVec4 black60 = ImVec4(0.4f, 0.4f, 0.4f, 1.0f); |
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 <vector> | |
#include <iostream> | |
#include <functional> | |
struct Obj | |
{ | |
float speed = 10.0; | |
float velocity = 1.0; | |
std::function<void(void)> Update = [](){ }; | |
}; |
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
import math | |
import random | |
import matplotlib.pyplot as plt | |
class UniformDistribution: | |
def __init__(self, a: float, b: float) -> None: | |
self.a = a | |
self.b = b |
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
import math | |
import random | |
import matplotlib.pyplot as plt | |
class UniformDistribution: | |
def __init__(self, a: float, b: float) -> None: | |
self.a = a | |
self.b = b |
NewerOlder