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
Overview de Morgan's laws are rules of logic that allow you to transform one conditional expression into another, equivalent expression. Because (in Boolean logic) two negations cancel each other ...
While trying to understand logical 'or'/'and', I encountered another problem (I'm writing Python code here, but my question is about the logic, not about any given programming language). I have som...
Unless I am mistaken, myList.Select(a => a).ToList() initializes the resulting list to the capacity of myList.Count. Does myList.Where(a => true).ToList() do so or does it build up from the i...
First of all please note that polymorphism in C is clunky. It won't be pretty. We don't have this pointers, we don't have RAII, we don't have automatic constructors/destructors. Just accept that it...
A root.components field need not exist, so I'm not sure what you're hoping for. Also, I don't know if it's an issue with your description or your code, but the code will only return mutable referen...
As of version 2.2, installing pyspark will also install spark, so you can run pip install pyspark or equivalent and use it in your normal python environment. The pyspark getting started docs also ...
I have a hard time deciding if How to get conditional running cumulative sum based on current row and previous rows? should be closed or not. As mentioned in the comments, it was already flagged t...
I'm working on a background service/daemon for an embedded device, in Rust. The daemon manages several hardware components and these are structured using the Composite design pattern. The composite...
In Python 3.12, I noticed that some libraries seem to be missing or "deprecated": >>> import asynchat Traceback (most recent call last): File "<stdin>", line 1, in <module>...
When printing Markdown text to the terminal, how can I get a bit more formatting so it looks nicer? I realize that this is a bit of a contradiction, since terminals generally use only one font. Bu...
This is not exactly what you're asking for, but you could use bat, which has source code syntax highlighting and just use the raw Markdown.
Say I have two functions: FILE* get_input(const char fname[static 1]); FILE* get_output(const char fname[static 1]); And I wish to declare a function pointer and assign it the result of some p...
You can query for P580 (start time) qualifiers on P4033 (Mastodon address) statements like this: p:P4033 ?mastoStatement. ?mastoStatement pq:P580 ?joinedfediverse. Note the use of p: instead o...
Yes, tools used by developers are on topic here From the top of the front page (emphasis mine): General Q&A about programming, scripting, software design & architecture, process, tools,...
Is it possible to somehow prohibit anonymously subclassing of a specific class? For instance, with a plain public parent class: public class Parent { } Extending this class should not be pos...
I am trying to join some video files and have an issue. I have boiled down the problem to the following minimal working example. I create a 2-second mp4 with a silent audio stream: $ ffmpeg -f l...
In Nginx specifically, you can’t actually override the reason phrase for arbitrary status codes like 200 Could Be Worse via config. The return 200 "message" directive isn’t changing the reason phra...
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...
I'm writing a function which reads specified sections in a text file formatted a particular way, but I'm having a hard time figuring out how to locate the last line number. Here's an example of the...
Cite good Q&A elsewhere For example: I was saddened to realize that, as of me writing this, a question and/or answer from Software Development has never been submitted on Hacker News. The doma...
There are at least two reasons I can see that would motivate this decision (and similar decisions generally), but first it pays to read what the documentation says. Quoting the pages you reference...
If reading the standard strictly by the letter then you are correct. And therefore both CERT and MISRA are picky with these kind of conversions because they strive to cover all poorly-defined behav...
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...