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.
General Q&A about programming, scripting, software design & architecture, process, tools, testing, and more.
Filters (None)
The topic of how to implement polymorphism in C tends to pop up now and then. Many programmers are used to OO design from higher level languages and supposedly OO is a "language-agnostic" way of pr...
Haskell tooling can be confusing. Both Stack and Cabal appear to be build tools with similar goals. How do they differ? Why should you pick one over the other?
I am trying to install the Spacy library in VSCode in a folder with a virtual environment. The output appearing in the terminal is excessively long; I will share it with a pastebin later. My versio...
While compiling my scala project I'm getting following error. org.scala-lang.modules:scala-parser-combinators_2.13:2.4.0 requires scala version: 2.13.13 org.scalatest:scalatest_2.13:3.2.19 requ...
I'm having trouble with an ffmpeg script that's supposed to convert videos to a specific resolution and frame rate, but the output video has unexpected dimensions and frame rate. Here's my script a...
What is the portability of malloc(0);? Which platforms return NULL without setting errno? Which platforms return a non-null pointer? Do any platforms have some other behavior?
Hello! Currently, I am trying to implement these two architectures together with Java and Spring (although technology shouldn't matter I think). But I'm encountering problems getting them to work...
I am learning how to write makefile to compile a c program. I have a directory structure like this: . ├── include │ └── library.h ├── lib │ └── library.c ├── makefile └── obj My makef...
In C++11 the nullptr keyword was added as a more type safe null pointer constant, since the previous common definition of NULL as 0 has some problems. Why did the standards committee choose not to...
I used to have some testing code for mocking a simple directory structure when working with pathlib. I recently tried to run these tests to learn that some of the internals in pathlib have changed ...
I'm trying to write a Elastic Search query using the C# NEST client, but right now I'm stuck on an issue with a conditional query. The query takes in two optional values, meaning they are both all...
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...
I've got errors Uncaught TypeError: setting getter-only property "todo" and Uncaught TypeError: lib is undefined. I assume that those errors appeared when I created a new module for local sto...
Instead of classes, I want to use factory functions. Original code with classes: export class MyProject { constructor(title, description, dueDate, priority) { this.title = title; ...
JetBrains Rider suggests that I change this (for example): public class Foo { public int OnePlusOne { get; } = 1 + 1; } to this: public class Foo { public int OnePlusOne => 1 + 1...
Types are often followed by exclamation marks in GraphQL schemas. What do they mean? type User { id: Int! email: String! name: String! updatedAt: String! createdAt: String...
I have some methods in my codebase that utilize the #if DEBUG preprocessor directive to provide specialized behavior that differs between the debugging environment and the production environment. I...
I need to filter/find and list tables using the sqlline !tables command. For example, these are the type of queries i wish to fire Find out all the tables in a particular schema s1 All tables ...
I want to run a program, e.g. Firefox, from terminal, but whenever I close the terminal, program closes too. How to detach my terminal window from a program ran from it?
I have a DTO that contains an enum field: @Getter @Setter static class Foo { Bar bar; } enum Bar { X, Y } When I deserialize a JSON, it allows int as values: var objectMapper ...
I'm currently working on a Java application using Jakarta Persistence with EclipseLink and PostgreSQL. While setting up the application to test the database layer, the persistence configuration is ...
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...
The documentation for git stash list says list [<log-options>] List the stash entries that you currently have. Each stash entry is listed with its name (e.g. stash@{0} is the latest entry...
I'm trying to work with a Go project that I'm taking over from another developer. The go.mod file says I need at least version 1.13, and I have 1.22.3 installed according to go version. However, wh...
I have a Map with Optional values. I want to filter it to remove empty values. Map<K, Optional<T>> input; Map<K, T> result = input. // here is some code I'm looking for ...
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...
I'm trying to containerize a SvelteKit application that uses the @sveltejs/adapter-node. The Build and Deploy section from the documentation recommends to build the application, and then run the a...
One of "my" Android apps is showing a heavy frequency of "slow exit" application-not-responding (ANR) problems. The Play Console has the "insight": Slow exit Problem The main thread has finish...
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...
In older C and C++ standards, the auto keyword simply meant automatic storage duration. As in the compiler automatically handles where the variable is stored, typically on the stack or in a registe...
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 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...
Pytest uses fixtures. Their docs explain what fixtures do: https://docs.pytest.org/en/stable/explanation/fixtures.html But what actually is a fixture? Is there a definition for it? Is this a term ...
I have a simple Spring Boot 3.x reactive application that exposes a RESTful API. The application uses Jdbi in the persistence layer, and the configuration for Jdbi is straightforward: @EnableTrans...
After switching to a different branch, git checkout - can move me back to the branch I came from. This is handy for times when I wonder "wait, what was that last branch again?" But this does not w...
I heard git pull is dangerous. Is it really dangerous? If so, why or how is it dangerous? Are there any flags that mitigate or remove the danger? What are the alternatives if it...
I'm trying to update a ListBox widget after dropping some files on it. This is the relevant part of my current code: fn on_file_drop(target: &DropTarget, value: &Value, ...
In an STM32CubeIDE USB HID project for an STM32F103C8 board I can send data from the device to the host using the USBD_HID_SendReport() function, like so: USBD_HID_SendReport(&hUsbDeviceFS, (u...
I'm trying to implement pytest for one of my Python Flask projects. The application is instanciated like this in appname.py def create_app(): app = Flask(__name__) app.config.from_pyfil...
I have a site hosted through GitHub and I'm using footers for special links and it also serves as my main navigation bar for now. I find it a little frustrating to manually copy-paste the footer's ...
callPackage is a complex function (reasons include the Nix language being lazy, usage of fixed-point evaluation, overrides, etc.), and this complexity steals the spotlight from what this function a...
I have an "tensorflow.python.framework.ops.Graph" object loaded from a .pb file. def load_pb(path_to_pb): with tf.compat.v1.gfile.GFile(path_to_pb, "rb") as f: graph_def = tf.compat....
In the current version of OpenJDK's JEP 401: Value Classes and Objects (Preview), it is said that value classes can leak data stored in their fields, and that this is potentially a security concern...
Should I use the data-* attributes for this or is there a more idiomatic way? For context, I'm trying to convert annotated legal PDF documents to HTML. Certain parts of these documents are cross...
Usually a random IV is used for encryption with AES in CBC mode, so that key/IV pairs are not reused, which would be a vulnerability. During decryption, the IV of the encryption is required. If de...
How can I have a mutable object (for example a vector) that is created inside a loop iteration and needs to be updated in later iterations of said loop? As a concrete example, consider parsing som...
At this time I am trying to manually install doxygen into msys64 but the computer I am using does not have access to the internet. When I try to start doxywizard.exe, I am receiving this error. ...
I did git fetch to quickly get latest commits. I did this instead of git pull so I could deal with merge conflicts offline. But my repository is still stuck on the old commit, and now git pull fail...
I'm working on a Svelte web application. The issue I'm having is when I'm trying to integrate the Carbon Web Components module. I installed the module using npm install --save @carbon/web-component...
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...