Skip to content

Instantly share code, notes, and snippets.

View Kumazuma's full-sized avatar

Kumazuma Kumazuma

  • Republic of Korea Seoul
View GitHub Profile
#include <iostream>
#include <WinSock2.h>
#include <MSWSock.h>
#include <http.h>
#include <Windows.h>
#pragma comment(lib, "Httpapi.lib")
int main()
{
@Kumazuma
Kumazuma / RIOServer_sm9.cpp
Created March 10, 2023 11:39 — forked from ujentus/RIOServer_sm9.cpp
Windows Registered I/O (RIO) Sample Code (Echo Server)
/*********************************************************************************************************
* Windows Registered I/O (RIO) Sample Code (Echo Server)
* Minimum requirement: Windows 8 or Windows Server 2012
* Author: @sm9kr
*
* Notice
* 몇몇 코드 조각들은 (http://www.serverframework.com/asynchronousevents/rio/)에서 가져옴.
* 그런데 여기도 제대로 완성된 코드가 있었던 것은 아니라서 상당 부분 기능을 추가하여 동작하도록 함.
* RIO의 사용법을 보여주기 위한 코드라 최대한 간단하게 필요한 부분만 넣었음.
* 그래서, 버그가 있을 수 있음...
@Kumazuma
Kumazuma / SimpleThreadPool.cpp
Created June 15, 2022 13:32
SimpleThreadPool but not test
// 2022-06-15 by Kumazuma
#include <thread>
#include <synchapi.h>
#include <windows.h>
#include <atomic>
#include <optional>
#include <vector>
struct QueueNode {
QueueNode(): next{nullptr} {}
@Kumazuma
Kumazuma / wav2flac_using_ffmpeg.cs
Created February 2, 2022 15:06
wav2flac_using_ffmpeg.cs
using System.Diagnostics;
var files = new List<string>();
foreach (var arg in args)
{
files.AddRange(Directory.EnumerateFiles(arg, "*.wav", SearchOption.AllDirectories));
}
Parallel.ForEach(files, (string filePathString) =>
{
@Kumazuma
Kumazuma / HelloTriangle.cpp
Created February 26, 2021 10:51
wxWidget + Direct 3D12 HelloTriangle.cpp
#include"wx/wxprec.h"
#include<wx/wx.h>
#include<wx/weakref.h>
#undef GetHwnd
#include<d3d12.h>
#include<dxgi1_5.h>
#include<wrl.h>
#include<d3dcompiler.h>
#include<DirectXMath.h>
#pragma comment(lib, "dxgi.lib")
#include"wx/wxprec.h"
#include<wx/wx.h>
#include<wx/weakref.h>
#undef GetHwnd
#include<d3d12.h>
#include<dxgi1_5.h>
#include<wrl.h>
#pragma comment(lib, "dxgi.lib")
#pragma comment(lib, "d3d12.lib")
using namespace Microsoft::WRL;