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
Several times now, I've seen advice in tutorials, setup/install instructions for Python-based projects, etc. to use a virtual environment to keep things organized and make it simpler to manage the ...
I have multiple installations of Python on my machine. When I run Python, what determines which installation is used? How can I control this?
General This question and answer are adapted from my original write-up on Stack Overflow, which you may consult for more details. This version is crafted as to be a clear overview, without referri...
Contrary to popular belief, Pip is not part of the Python standard library - although it comes as part of a standard distribution of Python. Pip is developed and maintained by the arms-length Pytho...
I have already learned how to tell the Python interpreter to run my code, but the standard approach feels a little unsatisfactory. I want the user experience to be that my program starts with the a...
This answer assumes only installations of the reference "CPython" implementation, as provided by the official website at https://www.python.org. Other installations - such as those provided by th...
A direct answer to your question of where the name comes from is the paper that introduced Applicative functors, Applicative programming with effects (PDF). Quoting from there: The idea is that ...
In setting android:configChanges in AndroidManifest.xml, what is the difference between colorMode and uiMode? I hear uiMode is for changes between light/dark modes, which sounds exactly what colorM...
"Invariant" isn't really the right word to search, though that's clearly not obvious. The idea is that we have covariant functors where if we have a -> b we can make f a -> f b, and contravar...
A Fix An existing pattern needs to be cleared to allow the new rule to match on any 2 trailing spaces: syntax clear markdownLineBreak syntax match markdownLineBreak '\s\{2}$' conceal cchar=⏎ ...
I think the problem is in the language of the status. "Closed" is not final, but it does sound like it, and as a new user who is seeking an answer, it can be received as affronting. Can we introdu...
In short, I want to access a multidimensional array, starting with an entry, say a 4D array called "new_array". new_array[0,1,2,3] and getting as an output the sliced arrays new_array[:,1,2,3],n...
You can use existsSync: import { existsSync } from 'node:fs'; if (existsSync('/path/to/file')) { console.log('Found'); } else { console.log('Not found'); } If you want to avoid block...
How do I trim a sorted list in Python, so that I only keep the elements greater than a certain value? For example, if I have this list: l = [1, 3, 5, 6, 7, 8] How can I efficiently get a list of...
"Black box testing" makes sense when dealing with opaque types so that's the first thing you should be doing and probably the most meaningful test too, so that's where you should put most of yo...
To start with, it's worth noting that the Zen of Python is more about development of Python, rather than development with Python. That may mean that some bits of its wisdom are more applicable to q...
At this point in my learning journey, I simply accepted that this function is called pure (both in Haskell and in PureScript), but it would have helped a lot if I had known the reasoning behind thi...
It seems like pods created by a Kubernetes CronJob (or rather Job) are deleted as soon as they fail. This makes it difficult to figure out what went wrong (unless you have Prometheus or some other ...
Is there a command I can run to get the path of global gitconfig for a user? Like git config --global --edit, but I want the path, not an editor window. I want the right path whether or not this f...
Design/API Consider hiding all details of the String internals to the caller by implementing opaque type - How to do private encapsulation in C? (As it happens, that post contains a example take...
I would support this, but only if it doesn't noticeably distract from implementing other important features. I imagine that MathJax would have a real, but niche use on Software for more theoretical...
Given that you don't need the flexibility provided by a char** but rather need efficiency, plus a fairly large amount of items, it does sound like you need a true 2D array allocated on the heap. T...
I asked this in SE years ago. I'm aware of two methods in order to access all the pixels in a QImage called img. Method 1 for (int y = 0; y < img.height(); y++) { QRgb *line = (QRgb *)...
Why is spacy word vectors showing unexpected similar words? Here is the code I am using: import spacy import numpy as np nlp=spacy.load('en_core_web_md') with open ('data/us.txt') as f: ...
As far as I can see, the GitHub documentation does not refer to a "primary" branch but it does refer to a "default" branch. This may seem like verbal nit-picking but I think it's an important disti...