Win

grip: render Markdown as PDF

Written by  on May 6, 2021

.. and other things, where you assumed it should be quite easy. ..

Wrote a short guide how to verify some information in Markdown. Local rendering works (most of the time via PyCharm or online at Github).
Now: how export it as PDF, because I realized that the receiver might not be able to display it properly.

* printing from PyCharm: failed
* VisualStudio-Plugin: no VS, no plugin
* any of the *nix-ways: not possible at that moment
* using a web-renderer: not allowed, because confidental data

UFF!

Python to the rescue!

Grip prepares a local flask server, where you receive a localhost:<randomport> url and just open it with the browser of your choice and then print as PDF.

žžžžžž

Written by  on April 29, 2021

Two family members names sport a nice z with Caron: ž.
Win 10: ALT+0158 (number pad with numlock on)
Linux (unicode): CTRL+SHIFT+U+017E

Windows (10) doesn’t allow the same resource twice

Written by  on February 4, 2021

So, the NAS* I use for years is separated into different partitions. Some for general access and things and one for music, which has a special user, which owns just read-only privileges.

Linux: no problem: mount as many shares with Gigolo and you are done.

Windows: use that 90s-style network-mount of the ‘explorer’ and add share by resource and credentials.
“\\ds213\musik” .. Works, but is awkward and not comfortable.
then you want to mount the second share with different credentials and you get “Can’t mount the same share** with different credentials”.

Workaround:
mount once by resource-name and once by ip: “\\192.168.178.178\musik”

Another approach via the hosts-file.

* DS213 from Synology: 2 bay; now running 24/7 for 5 (?) years; upgraded inbetween from 2 TByte drives to 4 TB with complete replication
** is actually “different shares at the same host”, but who am I with my limited knowledge?

Dell Precision 3351: performance spikes on GPU0 for dwm.exe/csrss.exe (win10)

Written by  on October 15, 2020

Starting point: so, I have a brand-new laptop with a fresh Win10 and the apps lag while I move windows around the desktop. Great!

The first recommendations were already checked: Win is up to date; graphics driver for the integrated Intel GPU and for the Nvidia one as well. No, I won’t roll back the system and no, a “clean start” won’t fix this either.
Of course, I was also suspicious if the virusscanner or the dockingstation-three-monitor-setup is the issue. But come one: that are just 6 mio pixel and the hardware is top notch.

Mitigation:
0. open the “Dell Power Manager” and set the “Temperaturverwaltung” to “Optimiert” (before “Ruhig”)
1. configure via the Nvidia that their GPU shall be the preferred one for apps: “Grundprofil” = “Hochleistungs-GPU”; check as well if any app has preset the integrated GPU (change this!)
2. disable automatic scaling of applications: System > Display. Under the scaling drop-down, select the Advanced scaling settings link. Disable “fix blurry ..”
3. change the display settings to Performance: run “sysdm.cpl” and then “Advanced (Erweitert)” > “Performance (Leistung)” and then put everything to performance (radio button) and just enable “smooth font rendering”
4. change the graphic settings to “High Performance” for all “classic” and “universal” apps:
Problem is, that the dwm.exe and the csrss.exe use GPU0 no matter what you configure.

Note:
The idea to disable the integrated Intel GPU via UEFI/BIOS is not possible, because the Nvidia GPU is not a full replacement card, but relies on the iGPU ..

Windows: time measurement

Written by  on August 7, 2020

StackOverflow has a ton of solutions with PowerShell and other external tools, but _I_ could no install something additional on that system. Nor had PS.

Works around the issue that the time is evaluated at start for each item, as well:
λ cmd /v:on /c "echo !time! & YOURCOMMAND & echo !time!"

Hint: also run cmake with just one core
λ cmd /v:on /c "echo !time! & cmake --build build\CMake\Debug\build -j1 --target all & echo !time!"

tutorial: include-what-you-use for a cmake/mingw-build on win

Written by  on August 5, 2020

tl;dr:
0. Get the latest prebuilt version for Win: version 0.8 (3 years old :/)
1. Put this somewhere into you CMakeLists.txt
set(CMAKE_CXX_INCLUDE_WHAT_YOU_USE "C:\\include-what-you-use\\bin\\include-what-you-use.exe")
2. Enjoy the overflowing build-output for your legacy-project.

Read more…

Win 10: uptime with Powershell

Written by  on March 18, 2020

(I don’t care about output from the taskmanager or whatever logs. I need a processable duration without much tinkering.)

Localisations

Written by  on January 24, 2020

The Qt framework offers a quite nice and convenient way to localize your application.
Not only how to mark inside the code translateable strings (tr(..)), but also that the translation-mappings are human-readable xml-format files (*.ts), but also their own tool to do the translation (Linguist). Linguist is quite helpful for translator who sometimes also have to have a look at the “what would you get with that translation of different size inside the widget”-result (more or less: WYSIWYG).

Noticed today some flaws in the localisation of MTuner (nice memory profiler) and offered some help.
This is what I love about OSS: you don’t just take, but can also lend a helping hand and improve the quality 🙂

QtCreator: add online-help if the SDK is not coming from an official package

Written by  on January 1, 2020

challenge:

having some Qt-SDK without help files. Using help inside a browser is possible, but cumbersome. and local help would be nice for quick parameter-checks.

solution (edited):

Found also the official docu at: http://download.qt-project.org/online/qtsdkrepository/windows_x86/desktop/qt5_5121_src_doc_examples/qt.qt5.5121.doc/ as 7z-archive.

Then add it via QtCreator > Tools > Options > Help > Documentation > “add the QCH files”.

Three ways to find the location of a certain DLL at Windows

Written by  on November 11, 2019

Common problem: just using the current working directory is not sufficient, because especially for unit-tests started from the Visual Studio-testrunner the opriginal, relative path is not fitting anymore. Fallback would be check an environment variable , which is set during installation or using the WinAPI (ugh).

versioned code can be found at: github/cppcCollection