Skip to content

Instantly share code, notes, and snippets.

View gccore's full-sized avatar

Ghasem Ramezani gccore

View GitHub Profile
@gccore
gccore / Main.C
Last active July 19, 2022 14:50
Binary representation
#include <iostream>
#include <cstring>
#include <cstdint>
template <typename Type>
void PrintBinary(Type const& value)
{
unsigned char bytes[sizeof(Type)] = {0};
std::memcpy(bytes, reinterpret_cast<unsigned char const*>(&value),
sizeof(Type));
@gccore
gccore / VisualStudioDark.xml
Last active July 16, 2022 09:34
QtCreator VisualStudioDark
<?xml version="1.0" encoding="UTF-8"?>
<style-scheme version="1.0" name="Dark+">
<style name="Text" foreground="#d4d4d4" background="#1e1e1e"/>
<style name="Link" foreground="#d6c540"/>
<style name="Selection" background="#264f78"/>
<style name="LineNumber" foreground="#8a8a8a"/>
<style name="SearchResult" background="#613214"/>
<style name="SearchResultAlt1" foreground="#000033" background="#b6ccff"/>
<style name="SearchResultAlt2" foreground="#330000" background="#ffb6cc"/>
<style name="SearchResultContainingFunction" foreground="#000000" background="#ffffff"/>
@gccore
gccore / CMakeLists.txt
Created July 8, 2022 14:44
Qt Creator Plain C++ CMake Project Template
cmake_minimum_required(VERSION 3.10 FATAL_ERROR)
set(PROJECT_MAJOR_VERSION 1)
set(PROJECT_MINOR_VERSION 0)
set(PROJECT_PATCH_VERSION 0)
cmake_policy(SET CMP0100 NEW) # For *.hh, MOC
project(%{ProjectName}
LANGUAGES CXX