Lenovo windows “recovery” media and other animals
TL;DR: Lenovo recovery media is NOT like regular Windows recovery drive. It can only factory-reset your system. No command line, no recovery from image, nothing else. Hulk smash. Don’t count […]
TL;DR: Lenovo recovery media is NOT like regular Windows recovery drive. It can only factory-reset your system. No command line, no recovery from image, nothing else. Hulk smash. Don’t count […]
In TypeScript (and JavaScript), both substr and substring are methods used to extract parts of a string, but they behave differently. This probably does not beat standard C++ class mt19937, […]
TypeScript allows passing class methods to functions that expect a lambda, but it won’t work at runtime. Consider this code: Suppose we have class Calculator like this: We can then […]
This is a follow up on this post. Default parameters are not the only way to do complex calculations in Python lambdas. Another idea is to use tuples and the […]
TL;DR On the client side, use trailing slash when requesting the “default” resource from a Flask app. Server: Client: Why it matters In Production If you make a request without […]
Summary WSGIApplicationGroup is a name of the Python sub-interpreter. You don’t need sub-interpreters if you run mod_wsgi in daemon mode (i.e. with dedicated processes). Always set WSGIApplicationGroup to %{GLOBAL}. If […]
TL;DR Under certain circumstances you won’t be able to access an HTTPS site with invalid certificate from Chrome, unless you type a magic cheat code “thisisunsave“. I was debugging a […]
I took interest in C++ random number generation because of the concept of regular_invocable. To my understanding, regular_invocable is C++’s notion of a “pure function”, or something really close to […]
It’s pretty old stuff, but still… Here’s how you typically generate a random number in C++: Let’s dissect it a little. On the one hand, “random_device” is a rather nebulous […]
Summary Unlike many other languages, Python allows abstract static methods (see the reference). A class directly or indirectly deriving from abc.ABC cannot be instantiated, unless all its abstract methods are […]