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
You can't - but there are some workarounds. Based on two answers from the VS forums (1 (2020), 2 (2023)), this behaviour is by design, and it doesn't appear to be configurable. Aside MSVC, GCC wo...
I've recently discovered that it's not actually an error to have control reach the end of a non-void function without returning anything, it's merely undefined behaviour. I want to promote the rele...
Let's say I have a table with SQL statements in a column. I want to execute them all. create table sql_command( sql_text text ) I know how to execute one SQL statement using EXEC, but I wa...
Adapters are implemented in different layers based on their function. Input adapters (like REST controllers) are at the application's edge to handle incoming requests, while output adapters (like d...
I have a C/++ codebase that compiles in Windows x86_64 targeting x86 using the mingw32 32-bit shell of the MSYS64 project. (It also compiles fine on linux x86/x86_64 and android's 4 archs.) Howev...
I have a git history that basically looks like this: * commit: XXX (HEAD -> main) | | * commit: YYY | | * commit: ZZZ (origin/main) | | ... Now I would like to turn everything after...
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>...
For completeness, I'll add some more obscure ways: If your goal is to simply move some changes from one branch to another, you can also use git rebase and git cherry-pick. These give you more cont...
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...
One thing I'd like to add to Lundin and r.zwitserloot answers, which is something that I think is rather important: The "or" in programming is inclusive. The "or" in most languages (all those I k...
Using and and or correctly The left-hand side and right-hand side of these operators should both be valid operands, which should each come from a comparison. Thus, we should repeat the comparison ...
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...