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
No. Closing is an integral part of maintaining this knowledge repository. If a question isn't up to our standards, it doesn't belong here, and closing is the first step in ensuring that. If a quest...
There's no point. It just causes unnecessary clutter and confusion. The correct way is to configure a manual way for triggering the CI/CD pipeline. In most systems there should be an API endpoint ...
There are two major sections to this answer: the Git part and the conflict resolution part. It wasn't clear at first which one was intended by the question, but both are important for a full answer...
It's a long story. Once upon a time, there were three ways to express a null pointer constant: NULL 0 ((char *) 0) This was true at least as far back as Unix V7 (1979). Maybe even further...
Using Optional as a value in a Map will lead you to unnecessary complexity and confusion — as you can see. The primary intention of Optional is to serve as a return type, indicating that a value m...
This can depend on both your flavor of SQL and your personal preference - I've seen a number of schemes in use. For MySQL, the most common scheme I've seen used (and the scheme that my editor uses ...
As we start on building a new community here together, we're bound to find some sticking points. Those might be bugs, new features you need, things you need support with... whatever they are, the C...
When I want to print a number or a string, I can use f-strings (Python >= 3.6) or str.format, and I can use just the variable between braces, or use format specifiers. Ex: num, text = 10, 'abc' ...
I think these kinds of questions are fine, but I am just one person. open source product I have been using appears to be poorly-documented is an extremely common problem. I have actually seen the p...
SIGSEGV is defined in the C header signal.h. To generate the signal, it should be sufficient to just do raise(SIGSEGV);. As far as I know, this is well-defined behavior.
To whether the tag is useful: no. It's useful for tagging people ("this person does frontend and backend") but not questions. I don't see the point of adding "do not use": just delete the tag, whi...
It is possible to create a new formatter class by subclassing string.Formatter class and then to use it like myformatter.format("{foo:customformat}", foo=foo). It's not super-convenient though, and...
Your code is correct. You have declared your variable as an array, and you are successfully appending to it. To display all of the elements of your variable, try echo "${my_array[@]}". (Another an...
First of all, let's understand why your regex didn't work. The first part is \w+\.\s, which is "one or more alpha-numeric characters" (\w+), followed by a dot and a space (\.\s). If the regex was ...
In Bash, IFS is an internal variable and it stands for "Internal Field Separator" <- according to this link, it "determines how Bash recognizes fields, or word boundaries, when it interprets cha...
Speaking personally (not as a Codidact admin): One low-key way to promote this community there is to cite it in answers. If you see a question there that you want to answer, see if it's here too....
Alternating between the two patterns seems to work! \(abc.*\)\@<!bird\|bird\(.*xyz\)\@! As a bonus, you can enable the very magic mode with \v to avoid backslashes! The resulting expression is ...
For writing pseudocode? No. BNF is a notation—in practice, a family of similar notations, like how Markdown is a family of similar markup languages—for defining grammars. In software development a...
Should we cast the result of malloc? The cast to the intended type is not necessary in C, since during assignment, the void* returned by malloc can be implicitly converted to any other object poin...
My personal opinion (I am not speaking for Codidact) is that we named the community "Software Development", not "Programming". Testing, both unit testing done by the developer and functional/perfo...
I manage a wsgi application that accepts JSON data via POST from potentially untrusted sources. Normally it is treated as a text blob and never parsed, but there is a value in the expected input th...
Short answer: No, it's not dangerous. Short of bugs in the implementation or monkey-patching, there's no reason it would or should allow executing of anything other than the JSON parsing code. Thi...
If you remove the align="left" then it works fine. My best guess is that you put those in because you didn't want the image in the text flow, affecting the vertical positioning on the text. The ea...
I have a Python script that needs to access some data (or configuration) file in its very own folder. For example, say script.py does something like this: with open('data.txt') as file: data ...
Consider the following code: #include <stdio.h> int main() { int a = 5; int b; ++*(&b + 1); printf("%d\n", a); return 0; } The output is as expected: 6 ...