Skip to content

Instantly share code, notes, and snippets.

Working from home

Mateusz Łoskot mloskot

Working from home
View GitHub Profile
mloskot / test_sqlserver_cast_bit_bug_report.cpp
Created Apr 15, 2020
Conversion with CAST(? AS BIT) only works for 0 or 1 when using ODBC API. 22003: [Microsoft][ODBC Driver 17 for SQL Server]Numeric value out of rang
View test_sqlserver_cast_bit_bug_report.cpp
// MWE for bug report submitted to SQL Server:
#include <cassert>
#include <cstdint>
#include <iostream>
#include <string>
#include <vector>
#define NOMINMAX
#include <windows.h>
#include <sql.h>
mloskot /
Last active Nov 26, 2019
IncrediBuild non-Benchmark

Running BuildConsole.exe of IncrediBuild 9.4 to build a large project using Visual Studio 2017:

  • Machine 1: Intel Xeon E-2670v3 with 24 physical cores
  • Machine 2: Intel Xeon Gold 6230 with 40 physical cores
  • RAM 64 GB on both
  • HDD: SSD on both

The source code tree git clean-ed, IncrediBuild history and cache cleaned and machine restarted before every build.

  1. Machine 1 with IB on 16 cores of 48 logical cores (Hyper-Threading enabled)
mloskot /
Created Oct 29, 2019
Boost.GIL changes between Boost 1.71 and 1.72
git log boost-1.71.0..master --pretty=format:"1. [%h]( t/%H) - %s" >
  1. e8a04f403 - Merge branch 'develop' for Boost 1.72 release.
  2. 62379dd5b - Implement Sobel and Scharr operators (#392)
  3. 20f511b7d - Flatten structure of test/extension/io/output/ folder (#400)
  4. 29208c730 - Fix void istream_device::read function returning a value (#399)
  5. 100762760 - Add GIL_ENABLE_EXT_DYNAMIC_IMAGE to CMakeSettings.json example [ci skip]
  6. 146d81bb7 - Update exte
mloskot /
Last active Oct 23, 2019
Generate VS solution with CMake 3.14 for Boost.GIL using staged Boost

Changes in SOCI 4.0.0 since 3.2.3 using git log 3.2.3..master --pretty=format:"1. [%h]( - %s"

  1. f8f97fb - Disable use of std::ptr_fun when compiling as C++17 (#751)
  2. 04e1870 - Fix crash in Windows by correctly initializing session member in copy constructor (#739)
  3. 9d0caa1 - Use 64-bit integer for next sequence and last insert ID values (#720)
  4. 349ce86 - Refine try-catch scopes in failover for PostgreSQL (#733)
  5. a47fd69 - Add pg reconnection loop (#731)
  6. 64e917c - Add finished call in pg failo
mloskot /
Last active May 25, 2019
Building GEOS with CMake and Visual Studio on Windows

Building GEOS with CMake and Visual Studio 2019 on Windows

Learn about CMake drivers

  • cmake to configure and build
mloskot /
Last active May 30, 2019
Count Git LFS objects and their sizes, total and per file type
#!/usr/bin/env python
# Counts Git LFS objects and per file type, and calculates total sizes.
import os
import sys
import tempfile
print('Collecting sizes of Git LFS objects')
tmp_file = os.path.join(os.getcwd(), 'tmp_sizes.tx')
os.system('git lfs ls-files --long --size > {0}'.format(tmp_file))
mloskot / Add-CMakeToolbar.ps1
Last active Apr 11, 2018
PowerShell script to add toolbar with CMake commands to Visual Studio 2017
View Add-CMakeToolbar.ps1
Adds toolbar with CMake commands to Visual Studio 2017.
Workaround for "No toolbar or shortcuts for CMake integration", see
Visual Studio 2017 comes with integration for CMake,
with commands available from the dedicated top-level CMake menu.
mloskot /
Last active Sep 26, 2018
BashOnWindows for C/C++ development
mloskot / theraband_flexbar_tyler_twist.markdown
Last active May 31, 2019
TheraBand FlexBar "Tyler Twist" for Tennis/Golfer's Elbow
View theraband_flexbar_tyler_twist.markdown