Comment by Lekensteyn on How can I enable parallelism via pytest -nauto if...
The options property is not publically documented, is it okay to rely on it?
View ArticleComment by Lekensteyn on __FILE__ macro shows full path
Option -ffile-prefix-map indeed implies both -fdebug-prefix-map and -fmacro-prefix-map options. See also the references at reproducible-builds.org/docs/build-path The GCC bug that tracks...
View ArticleComment by Lekensteyn on LeakSanitizer not working under gdb in Ubuntu 18.04?
Fixed the typo. Usually I have more colon-separated options such as: ASAN_OPTIONS=abort_on_error=1:report_objects=1:sleep_before_dying=1.
View ArticleComment by Lekensteyn on Javascript string replace with regex to strip off...
@Phoenix The regular expression is correct, but depending on the language you might have to remove the backslash or escape it another time. By the way, if this is Javascript, you are doing a literal...
View ArticleComment by Lekensteyn on Submit Event Listener for a form
@raphael75 Try javascript:evtSubmit(event) as suggested above the code
View ArticleComment by Lekensteyn on Counting machine instructions using gdb
That might be true for x86, but if you run bare metal ARM with a single core, they will be the same. That was exactly the case I needed a solution for.
View ArticleComment by Lekensteyn on In gdb, I can call some class functions, but others...
set overload-resolution off"Disable overload resolution for C++ expression evaluation. For overloaded functions that are not class member functions, GDB chooses the first function of the specified name...
View ArticleComment by Lekensteyn on Process raw HTTP request
@MichalS. 499 is not a standardized code. Based on en.wikipedia.org/wiki/List_of_HTTP_status_codes, one possible explanation is 499 Client Closed Request which is sent by nginx when "the client has...
View ArticleComment by Lekensteyn on Disable AVX-optimized functions in glibc...
@PeterCordes I updated the post with a non-greedy version just in case there is an adjacent cpuid (I don't expect that to be honest). I also added a Perl one-liner for convenience.
View ArticleComment by Lekensteyn on How to unzip a file in Powershell?
Warning: Expand-Archive is much slower than 7zip. See github.com/PowerShell/Microsoft.PowerShell.Archive/issues/32
View ArticleComment by Lekensteyn on Ansible handlers - exclusive restart or reload
changed_when: true is critical. Without that option, the Reload foo service handler will never be triggered unless some other task triggered it.
View ArticleComment by Lekensteyn on How do I load a javascript file dynamically?
@DeepanksheeJain if you have a large file, it may take a while before the download is completed.
View ArticleComment by Lekensteyn on How to apply a special methods 'Mixin' to a...
Documentation references for Dataclasses: docs.python.org/3/library/dataclasses.htmlpython.org/dev/peps/pep-0557
View ArticleComment by Lekensteyn on How can I break on UBSan reports in gdb and continue?
@Kaz The abort_on_error=1 option turns a normal _exit() into an abort(), useful for debuggers. ASAN violations are usually quite severe, so these immediately exit/abort the program. Likewise for UBSAN...
View ArticleUse the device_filter.xml resource file to filter USB enumeration results
Following the instructions in the Android USB Host documentation, I managed to detect new USB devices via a USB_DEVICE_ATTACHED intent. To restrict notifications to certain devices, a resource file can...
View ArticleGet Unix timestamp (in seconds) for a hg commit
Given a commit with the date Mon Aug 18 21:05:38 2014 +0200, how can I get the Unix timestamp of it in seconds?The following command produces a number that discards the number (presumably because the...
View ArticleAnswer by Lekensteyn for Where can I get a list of all errors & warnings?
Al list of all warnings for VS2015 and VS2017 can be found at sections such asC++ Core Guidelines Checker Reference,Code Analysis for C/C++ Warnings,and other related sections linked from the...
View ArticleAnswer by Lekensteyn for create MSVC import library with MinGW tools
To produce an import library that is similar to the one generated by Microsoft's link.exe, you can use llvm-dlltool (part of the LLVM compiler project):llvm-dlltool -m i386:x86-64 -d foo.def -l...
View ArticleAnswer by Lekensteyn for How to generate an import library (LIB-file) from a...
For those who are on Linux and would like to create an appropriate import library (.lib) for a .dll produced by MinGW, there are again two steps involved:Create .def file from .dllCreate .lib file from...
View ArticleHow can I enable parallelism via pytest -nauto if pytest-xdist is installed?
To enable parallel tests, one has to install pytest-xdist and use pass the -nauto option to pytest to use all available CPUs. I would like to enable -nauto by default, but still make pytest-xdist...
View Article
More Pages to Explore .....