Welcome to Software Development on Codidact!
Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.
Search
In addition to all the examples I gave in my answer to the linked post, all scenarios where p is a pointer to incomplete type fails. Not just the void* scenario, but also when p is a pointer to an ...
It seems to me that you are hobbling yourself by making design constraints more absolute than they need to be. For instance: You don't want to change the code under test, not even a tiny little ...
Performance-wise, I'd benchmark this vs if(memchr(src,'\0',n)==src+n) memcpy(dst, src, n); because it isn't obvious at least to me if that's faster or slower than your custom function. Regarding...
To investigate such problems, open the developer tools of your browser, and use the inspect this element feature to inspect the bounding boxes of the various elements. in Chrome: press F12 to o...
I have a code block like this: try { ... x.foo(); // This is the line that forces us to have the try block ... } catch (ArrayIndexOutOfBoundsException e) { logger.error(e.getM...
Here is an animation of a cube with faces subdivided into two rectangles, morphing into a rhombic dodecahedron, with the Platonic dodecahedron as an intermediate state. This demonstrates that the e...
Some relevant history for consideration (not an answer about specific scope boundaries): When we started to discuss a programming or software community, we were concerned about premature fragmenta...
Many programming languages either have keywords like or and and used for logic, or equivalent operators such as || or && - which are referred to as "logical or" and "logical and" respective...
I have seen others allude to include_directories as disfavored: Having trouble adding include directories Summaries from CMake's documentation: target_include_directories include_directori...
I've installed Android Studio Jellyfish (snap) on an Ubuntu Fossa VM and was finally able to generate an apk for my project after struggling with Gradle, Java, plugins, etc. The device is detected...
I had understood that Python is supposed to come "batteries included", and that the "batteries" specifically include: the tkinter standard library, a simple GUI framework a simple IDE cal...
It seems that year over year, computers constantly get easier to use, and it becomes easier for people to start learning to program who have never touched it before. This comes with the consequence...
One of my applications has a dependency on a stb-library. Now I am publishing this application to Github. Should I: Include the header that was used during development with the code? Have an in...
For example, how to sort the output below by the values in "Column" in the psql shell itself? my_db=> \d auth_user Table "public.auth_user" Column ...
There are RSS feeds for tags already, linked at the bottom of the tag page. (Yeah, I missed it too; I'll see if we can make that more obvious.) For example, here's the RSS feed for the feature-re...
It's been a while, but the answer is "yes and no," I believe. No: The describe-schema command doesn't (last I heard) allow any modification. Yes: The describe-schema command also doesn't do any...
How can i get a per-tag RSS feed? I only see the general feed at the main pages and i don't want to subscribe to tags via email.
slice(None) will give you a value that's equivalent to a bare : in slice syntax. So you can write, for example, for i in range(4): print(new_array[tuple(slice(None) if i == j else n for j, n ...
I'm using the following syntax match to conceal 2 spaces at the end of a line with a special character. syntax match Normal '\s\{2}$' conceal cchar=⏎ A line with two spaces at the end of it wou...
You can use the functions in the bisect module with a list slicing operator. For example bisect_left finds the index of the insertion point in a sorted list, and if the values are equal, it will fi...
The term long predates Pytest and is not at all specific to Python. The idea is described on Wikipedia: In the context of software a test fixture (also called "test context") is used to set up s...
In the current version of OpenJDK's JEP 401: Value Classes and Objects (Preview), it is said that value classes can leak data stored in their fields, and that this is potentially a security concern...
It's a type modifier that means that the field is non-nullable. That is, when uploading these types you must provide values for these fields, and in turn the server promises to always populate the...
This is something that could go really wrong. I remember using this, and it was fine initially, until the enum in question evolved, and the ordinals changed, so the values didn't correspond anymore...
The short, broad strokes answer is that (modern) cabal-install uses a nix-style approach where there's a shared global cache, but you can have multiple versions of a package installed or even the s...