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
Simply put: parenthesis are used whenever we suspect that there may be operator precedence issues. Either because the user passed an expression containing several operands and operators to the...
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...
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...
Why The most important ideas behind virtual environments are: Since there is a separate site-packages, you can isolate the dependencies of your project. This is especially important for testi...
I am trying to capture the content outside square brackets in groups, using this regex: (.*)\[.*?\](.*) And it works perfectly for a simple string like this: testing_[_is_]_done This is the...
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...
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...
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...
Reminder: never use sudo to run Pip. This can never properly fix a problem and only introduces serious security risks. Installing third-party packages from PyPI can run arbitrary code at install ...
My (non-Windows) operating system came with Python, but that Python didn't include Pip. I followed instructions to install Pip for the included Python, using my system's package manager. But now w...
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...
Note: This is a general question about Markdown formatting for any Markdown renderer (e.g., Gitlab, Github, Codidact). So this is not just a question about Codidact's renderer. When displaying she...
If you don't mind the extra memory, you can do it with an extra array: struct basket { char *item_memory; char **items; int itemcount; }; /* I omitted any error handling */ voi...
In vscode, when I hit a breakpoint it automatically opens "Run and Debug" window. I don't want that because I am using a small screen (and that sidebar takes up space) and I don't always need to us...
The atoi family of functions should never be used for any purpose - they are broken by design. The reason why can be found in the C standard C23 7.24.1: The functions atof, atoi, atol, and atol...
Quite obviously, these are the same. The name of the two is literally the same except for a hyphen. They only have one question each. Looking at the questions, they are indeed used for the same pur...
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...
I found two tags: back-end and backend. Should we merge them?