11 So I currently find myself needing to make something like this. My first thought was to use clip-path, but the rounded corners would be hard to pull off, and it would be hard to maintain the 22.5 degrees when the button changes width because of its contents. So I ended up making each button […]
9 From the C17 draft (6.3.2.3 ¶3): An integer constant expression with the value 0, or such an expression cast to type void *, is called a null pointer constant.67) If a null pointer constant is converted to a pointer type, the resulting pointer, called a null pointer, is guaranteed to compare unequal to a […]
28 Consider the following brief numpy session showcasing uint64 data type import numpy as np a = np.zeros(1,np.uint64) a # array([0], dtype=uint64) a[0] -= 1 a # array([18446744073709551615], dtype=uint64) # this is 0xffff ffff ffff ffff, as expected a[0] -= 1 a # array([0], dtype=uint64) # what the heck? I’m utterly confused by this last […]
17 Today morning suddenly I started getting this popup whenever I ran Vagrant up in my Mac. VirtualBox version 7.0.4 r154605 (Qt5.15.2). macOS v12 (Monterey), MacBook Pro (Retina, 15-inch, Mid 2015) Ubuntu LTS Settler Version Homestead Version Branch Status 20.04 11.x 12.x main Development/Unstable 20.04 11.x 12.x release Stable What’s wrong here? laravel laravel-5 laravel-8 homebrew […]
7 1.0 2.0 3.0 loud complaint problems pain stress confused dull pain stress this is my data set and I would like to reorganize the rows so that if there is a word that appears in each column it is transferred to a corresponding row. For example 1.0 2.0 3.0 loud NA NA pain pain […]
6 I noticed that on my machine, the following reaches the max of depth recursion for n = 2960: m = {0:0, 1:1} def f(n): if n not in m: m[n] = f(n – 1) + f(n – 2) return m[n] while this version reaches it for n = 988: m = {0:0, 1:1} def […]
291 This post relates to a rapidly changing event. Just sometime ago I started getting this warning when pushing to GitHub. WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY! Someone could be eavesdropping on you right now (man-in-the-middle attack)! It is also possible that a host key has […]
7 I am doing something very simple and straightforward, and I cannot help but suspect / wish that it could be made a bit shorter. For the sake of the example, let us suppose that I have an IEnumerable<int?> and all I want is an IEnumerable<int> yielding only the non-null values. Here is some code […]
8 Let me describe a scenario, first we have a function which returns us some sort of data which we can’t be sure about the validity of, i.e. auto random_predicate() -> bool { int v = uniform_dist(e1); // uniform distribution 1 to 100 return (v % 5); } where uniform_dist() is an appropriately seeded uniform […]
6 When a post is accessed, I need, in addition to returning the information of this posts, to return the previous one if it exists and the next one. I would like to know if there is a way to select MAX(id) and MIN(id) in a single query/select, passing a condition for each one of […]