Skip to content

Instantly share code, notes, and snippets.

View frowrik's full-sized avatar

Vladimir Shatrov frowrik

View GitHub Profile
@rprichard
rprichard / NamedPipeTest.cc
Last active July 31, 2022 08:34
Windows Named Pipe Test (Connection and Disconnection)
// Dedicated to the public domain as per the Creative Commons CC0
// (https://creativecommons.org/about/cc0/).
// Compile with C++11 (i.e. -std=c++11)
// Tests the behavior of Windows named pipes regarding the lifecycle of
// connections.
//
// This test demonstrates various ways that Wine (as of 1.9.12) differs from
// Windows:
@JSandusky
JSandusky / imgui_bitfield.cpp
Created March 26, 2018 05:56
ImGui Bitfield Checkbox Matrix
bool BitField(const char* label, unsigned* bits, unsigned* hoverIndex)
{
unsigned val = *bits;
ImGuiWindow* window = GetCurrentWindow();
if (window->SkipItems)
return false;
unsigned oldFlags = window->Flags;
ImGuiContext* g = ImGui::GetCurrentContext();