The CMake test frontend CTest can easily select subsets of tests.
While there are more advanced
CTest test selection options,
two of the most common and easy to use test subset selection methods are by
regex
selection of names, labels and/or fixtures exclusion.
Assuming the project has a meaningful test naming scheme, one may trivially select tests by either or both of the ctest -R and ctest -E flags.
For this article, assume the tests are named:
The colon has no special meaning, and CTest names may use special characters if desired.
When figuring out how to use CTest test selection, it’s very helpful to also add the ctest -N option, so that test names are printed without running the tests.
For all examples, we assume the user working directory is
PROJECT_BINARY_DIR
or is using ctest --test-dir.
One may select all the “egg” tests by:
ctest -R egg
Suppose one wishes to exclude the test named “beta:egg”:
ctest -R egg -E beta
To run all tests except those with “beta” in the name:
ctest -E beta
A more sophisticated test selection scheme requires setting
test labels
in the respective CMakeLists.txt like:
Git
stash
is often used to hold temporary work that wasn’t yet ready for a commit, perhaps during a rebase.
The stash history is per repo.
Over time, one may accumulate numerous stash entries that are no longer relevant and may desire to cleanup this clutter.
View Git stash entries by:
git stash list
View the contents of a particular stash entry by:
git stash show -p "stash@{0}"
where the number in braces corresponds to the git stash list index.
To remove a stash entry, sliding up all the entries older than it:
git stash drop "stash@{N}"
where “N” is the entry index to remove.
If one wishes to recover a dropped Git stash entry, it may be
possible:
TeXLive is a well maintained and often updated LaTeX distribution that works for any OS.
Download
TeXLive net Installer
and run.
Click Advanced and use the “basic” scheme, which is well under one GB to start.
When building a document and it seems to be missing a package, note the error messages.
Find and install needed packages via tlmgr using commands like:
find package by filename: tlmgr search --global --file fullpage.sty
When a new major version of TeXLive is released, simply repeat the procedure above and point any programs like TeXstudio to the new TeXLive install directory.
Windows Terminal is a useful and welcome
open source
addition to any developer working on Windows.
It has no prerequisites and works well with multiple WSL distros.
Python can extract .zst Zstd files using the
zstandard
package.
Zstd is widely supported and available across operating systems.
Make a Python function
extract_zstd
to extract all files and directories inside the .zst file.
Matlab
websave
or
ftp
might not work in cases where a plain “curl” or “wget” command works.
A symptom of this issue is HTML is downloaded instead of the intended binary file.
Websites such as
Dropbox
recognize the HTTP User Agent of curl and Wget and mutate the web server response to be automation-friendly.
Since Matlab is much less commonly used than Python, curl, Wget, etc. this user agent-dependent behavior results.
We recommend understanding why Matlab websave doesn’t work, or use the low-level Matlab
HTTP Interface.
To use curl from Matlab, recognize this may require unique setup for each system, despite that curl is included (preinstalled) in modern operating systems including Windows.
The extra quotes around “url” allow for arbitrary characters to be used in the URL that can confuse shells like zsh.
The “-L” option to curl allows redirects.
Linux systems with multiple curl versions installed may need to set an environment variable to prioritize.
Set the filename as appropriate for computer (ensure the file exists).
CMake
configure_file
can serve to generate source code files including Fortran.
For templates beyond a few lines of code, it may be useful to read the template from a file.
This requires setting CMake directory property
CMAKE_CONFIGURE_DEPENDS
to have CMake regenerate the file if the template file changes as in the example below.
file(READmy_template.in.f90template_code)configure_file(example.in.f90example.f90@ONLY)set_property(DIRECTORYPROPERTYCMAKE_CONFIGURE_DEPENDSmy_template.in.f90)#example use
add_executable(main ${CMAKE_CURRENT_BINARY_DIR}/example.f90)
iftop
is a handy utility on macOS, Linux and other Unices for a live Terminal graph of network data flow to particular addresses.
On computers with many network interfaces, including virtual interfaces such as on macOS, it is handy to set a default interface in a config file.
iftop uses the file ~/.iftoprc.
For example, on macOS you may be interested in interface “en1”.
To help determine the desired interface, use ifconfig or ip a to find the interface with the public IP address.
Then create ~/.iftoprc containing like:
interface: en1
where “en1” is your desired interface determined as per above.
The Uniden PC 78 model family evolved from the Uniden PC 76 XL of the 1990s.
The Uniden PC 78 XL added Dynamic Squelch Control
DSC.
In 1999 the Uniden PC 78 LTW brought full-time WX alert and backlit controls.
In 2003 the Uniden PC 78 Elite added WX alert even if power knob off and backlit panel indicators.
Uniden DSC didn’t work so well because it did not have an adjustable threshold, and like virtually all noise-based auto-squelches can drop out undesirably on overmodulated signals.
The PC 78 LTX came out in 2018, and dropped DSC.
The Uniden PC 78 LTX also brought a new circuit board using surface-mount components instead of the through-hole construction common to older CB radio designs from the pre-2010 era.
Today’s CB radio buyer should steer toward radios having digital noise reduction / DSP, which is a much more effective way to reduce noise and improve audio quality than the old noise-based auto-squelches.