Skip to content

Instantly share code, notes, and snippets.

View THM-T's full-sized avatar
🎯
Focusing

THM THM-T

🎯
Focusing
View GitHub Profile
@THM-T
THM-T / RandomDoubleBounded.cpp
Created February 21, 2023 11:42
Generate Random double that bounded in Qt (QRandomGenerator64)
#include <QRandomGenerator64>
template <std::size_t P = 10'000>
static double randomGenrate(double begin, double end) {
static auto randomGenrator = QRandomGenerator64::global();
auto rand = randomGenrator->bounded(static_cast<int>(begin * P),
static_cast<int>(end * P));
return static_cast<double>(rand) / P;
}
@THM-T
THM-T / private_fork.md
Created January 27, 2023 12:01 — forked from 0xjac/private_fork.md
Create a private fork of a public repository

The repository for the assignment is public and Github does not allow the creation of private forks for public repositories.

The correct way of creating a private frok by duplicating the repo is documented here.

For this assignment the commands are:

  1. Create a bare clone of the repository. (This is temporary and will be removed so just do it wherever.)

git clone --bare [email protected]:usi-systems/easytrace.git

@THM-T
THM-T / SQLite Cmake script for win32
Created December 21, 2022 12:06 — forked from sixman9/SQLite Cmake script for win32
SQLite Cmake script for win32 - starting point for iPhone version?
#cmakelists.txt
cmake_minimum_required ( VERSION 2.6 FATAL_ERROR )
project ( sqlite3 C )
SET( CMAKE_INSTALL_PREFIX "f:/doof" )
set ( SOURCES sqlite3.c )
set ( HEADERS sqlite3.h )
@THM-T
THM-T / Test coliru
Created December 16, 2022 10:15
Test coliru
http://coliru.stacked-crooked.com/a/ff67e1aaf2ea4287
@THM-T
THM-T / Result:
Created December 6, 2022 08:58
Test padding (review)
x 24
s1 1
s2 4
s3 4
s4 8
align 8
total 17
sub 0