Skip to content

Instantly share code, notes, and snippets.

@hirosof
hirosof / WinAppSingleTemplate_202402.cpp
Created February 1, 2024 16:13
[Win32API] Windowsアプリケーションのテンプレート
/*----------------------------------------------------------------------------
プログラム名:Template
バージョン:1.0.1.0
プログラム概要:
--------------------------------------------------------------------------------
*/
/*-----------------------インクルード部------------------------*/
#include <windows.h>
#include <cstdio>
/*------------------------------------------------------------*/
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace hirosof.Application.Process {
using CommandLineNamedParameterList = List<CommandLineNamedParameterItem>;
#pragma once
#include <limits>
#include <stdexcept>
template <typename T> class GeneralCounter {
private:
const bool m_is_signed_type = std::numeric_limits<T>::is_signed;
T m_start;
@hirosof
hirosof / C++のstd::bitsetを用いた各種計算・処理を手動で実装するサンプル [unsigned].md
Last active November 22, 2023 14:16
C++のstd::bitset<N>を用いた各種計算・処理を手動で実装するサンプル [unsigned]

C++のstd::bitset<N>を用いた各種計算・処理を手動で実装するサンプル [unsigned]

定義

このページ上のコードのライセンスについて

このページ上に記載されている各コードのライセンスはパブリックドメインとする

演算方向について

@hirosof
hirosof / CCommandLineParser.hpp
Last active December 31, 2021 20:23
簡易コマンドラインパーサー
#pragma once
#include <vector>
#include <string>
#include <unordered_map>
#include <sstream>
template <typename char_type> class CCommandLineParserType {
public:
using String = std::basic_string<char_type>;
#include <stdio.h>
#include <Windows.h>
#include <vector>
#pragma comment(lib,"winmm.lib")
#define LOOPS 1000000
void NormalValueTest ( void );
#include <stdio.h>
#include <Windows.h>
#include <locale.h>
#include <Shlobj.h>
#include <Shobjidl.h>
#include <KnownFolders.h>
void HSOpenFileDialog ( void );
int main ( void ) {
@hirosof
hirosof / Template_Win32API_Program.cpp
Created February 2, 2017 10:05
Template_Win32API_Program.cpp
/*----------------------------------------------------------------------------
プログラム名:Template
バージョン:1.0.1.0
プログラム概要:
開発言語:Microsoft Visual C++ 2015
統合開発環境:Microsoft Visual Studio 2015 Community Edition
開発開始日:
最終更新日:
-------------------------------------------------------------------------------
更新日一覧
作成する画像の幅を入力してください
48
作成する画像の高さを入力してください
48
<<グレイスケール系の画像作成開始>>
[単色画像作成開始]
SaveImages\TextureMaker_Generate[48x48]\GrayScale\Single\mono_000[48x48].pngを作成しています。
SaveImages\TextureMaker_Generate[48x48]\GrayScale\Single\mono_016[48x48].pngを作成しています。
SaveImages\TextureMaker_Generate[48x48]\GrayScale\Single\mono_032[48x48].pngを作成しています。
SaveImages\TextureMaker_Generate[48x48]\GrayScale\Single\mono_048[48x48].pngを作成しています。
/*
乱数精度テスト
*/
// インクルード部
#include <iostream>
#include <cstdio>
#include <random>
#include <cstdlib>
#include <ctime>
#include "CHSRandom.hpp" //乱数アルゴリズムxorshiftを用いた自作乱数クラス