Win: run script after executing the VisualStudio-environment-command
Written by marcelpetrick on July 11, 2019
Problem: our CMakeLists.txt contained one specific variable which is just set via the VisualStudio-command-prompt. But I did not want to start that cmd, then execute our “start IDE”-script from there. Naa, too much clicks 😉
Copy this as bat-file to the directory where the qtcreator.bat would be.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
@echo off rem inspiration from https://www.codeproject.com/Questions/541856/Batchplusfile-3aplusOpenpluscmd-2cplusrunplusVSplu set workingDir=C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\Common7\Tools\ set vs=VsDevCmd.bat rem execute the VS build enviroment cd %workingDir% call %vs% rem go back to current directory cd /d %~dp0 qtcreator.bat |
python: maximum size of certain containers
Written by marcelpetrick on July 9, 2019
Getting the 64 bit version is quite important. Still don’t get it why for Win the 32 bit one was preferred ..
1 2 |
import sys print(sys.maxsize) |
32 bit: 2147483647 (elements)
64 bit: 9223372036854775807 (elements)
20190711 edit: even if the container could keep that much elements – remember that [Boolean] is 24 Byte (intead of one Bit) in vanilla Python. Means: if you run out of real memory, then MemoryError :/