Skip to content

Instantly share code, notes, and snippets.

@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を用いた自作乱数クラス
1アルゴリズム当たりのテスト回数を指定してください:268435456
<<[C言語標準rand関数]による乱数精度チェック>>
100% 完了 ( 268435456 / 268435456)
出現分布表
0 ・・・ 16777216回 [ 6.2500%]
1 ・・・ 16777216回 [ 6.2500%]
2 ・・・ 16777216回 [ 6.2500%]
3 ・・・ 16777216回 [ 6.2500%]
1アルゴリズム当たりのテスト回数を指定してください:262144
<<[C言語標準rand関数]による乱数精度チェック>>
100% 完了 ( 262144 / 262144)
出現分布表
0 ・・・ 16455回 [ 6.2771%]
1 ・・・ 16710回 [ 6.3744%]
2 ・・・ 16449回 [ 6.2748%]
3 ・・・ 16242回 [ 6.1958%]
1アルゴリズム当たりのテスト回数を指定してください:8192
<<[C言語標準rand関数]による乱数精度チェック>>
100% 完了 ( 8192 / 8192)
出現分布表
0 ・・・ 522回 [ 6.3721%]
1 ・・・ 493回 [ 6.0181%]
2 ・・・ 535回 [ 6.5308%]
3 ・・・ 482回 [ 5.8838%]
1アルゴリズム当たりのテスト回数を指定してください:268435456
<<[C言語標準rand関数]による乱数精度チェック>>
100% 完了 ( 268435456 / 268435456)
出現分布表
0 ・・・ 16777216回 [ 6.2500%]
1 ・・・ 16777216回 [ 6.2500%]
2 ・・・ 16777216回 [ 6.2500%]
3 ・・・ 16777216回 [ 6.2500%]