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)
When I run code . in a directory, Visual Studio Code opens two windows. The first is empty, the second shows directory I was in as expected. I checked ~/.config/VSCode/Workspaces and there is only...
Consider the following method as an example: List<int> Foo() { // ... } Are there any disadvantages of returning an interface instead of a concrete implementation in C#? IList<i...
According to the psql (version 14) man page, it's possible to set variables using the -v command-line parameter, then use the variable in a query, automatically quoted correctly, with :'variable_na...
When I set up my object mappings with SQLalchemy, everything works well enough. It even creates the tables for me if they don't exist. However, if I decide to add/remove columns (aka fields) from ...
(Full code available for cloning here) I've run into some odd behavior of EF-core's Find method. It seems like the returned entity doesn't include the rest of the data. MWE Models using Micro...
Is it worth using the Java Platform Module System introduced in Java 9 to structure application code? Given that the Java Platform Module System introduced in Java 9 doesn't manage dependency vers...
Let's say I have a variant that can hold a bunch of different types of values (say I got them from parsing a JSON or similar). using Value = std::variant<std::monostate, int, double, std::strin...
Let's say we have an object, we store it in a union (into some other narrower type, but with memcpy(3), so it's allowed --I guess--), and then read it from the union via it's original type (so no a...
A friend is involved in rewriting a distributed software application and while discussing the architecture, we noticed that in many cases the messages had duplication between headers and payload. ...
The proposed library would sit alongside cross-platform libraries in Xamarin apps for iOS and Android. However, it would include files with names like MyLibraryFile.android.cs MyLibraryFile.ios...
Hi, I'm trying to use the JSON Generator to create data with nested repeating values. I want to create 100 objects with an ID, Name, and Code. The Id is incremented from 0 to 99, but the Code (pr...
I am creating a button that once clicked will change from off to on with react and i am also creating a responsive clock through useEffect. Yet the code still return that useEffect is undefined th...
I have a query summarizing some transaction data that I'd like to summarize by day of week. For my use case, I need to return weekdays formatted according to ISO 8601, so Monday must be the first d...
I'm trying to subclass pdb to have a debugger that, in case of a call to a decorated function, can "step in" the decorated function directly and skip the decorator content altogether. A well-behave...
I'd like to write a TCP client in Rust that can receive the entire message sent by a server, but I have no information about the length of a message. I'm aware that TCP doesn't preserve message bo...
I'd like to organize my Matlab packages into folders. However, if I try to lay out my code like this +MyPackage |---foo.m |---SubDir |---bar.m then I'm unable to reach bar. F...
The Code using Microsoft.EntityFrameworkCore; public class BloggingContext : DbContext { public DbSet<Blog> Blogs { get; set; } public DbSet<Post> Posts { get; set; } ...
Can someone explain why this PHP code is not excluding the watched videos? The email_id parameter is used to specify the location of the watched videos array. The code should remove the watched_vi...
Using parentheses in Javascript is always needed when you want to create functions, if/else statements and for/while loops. But in Python it has a function that is called tuples. When using an if s...
There may be a better way to manage website's with JavaScript deployments. I added jest to my repo simply to execute tests when I make PRs as part of a GitHub action. This requires a package-lock.j...
char *p, *q; p = malloc(1); free(p); q = p; // lvalue conversion Is the last lvalue conversion (= p;) Undefined Behavior or not? We didn't take the address of the local p. C11::6.3.2.1...
The dictionary methods .keys(), .values(), and .items() all return view objects. Said objects reflect any changes to the underlying dictionary. This is often useful. Is there a way to get such a v...
I am developing a web app that is tied to a database. My codebase is stored on a private GitLab instance. I would like to set up a workflow that would look something like this: I have a developm...
I'm trying to do some DOM manipulation in jQuery, but am having issues with creating wrapper elements. For some reason, prepending to the wrapper doesn't work after I call wrap. Code <html>...
We have done a reverse proxy to forward blog.example.com to example.com/blog. As I think it gives great help in getting the “link juice” to the root domain. However, I am concerned about any possi...
I am working on a React Native app using Realm, Atlas Flexible Sync, and MongoDB, and I'm super confused about how subscriptions work. I'm coming from a .NET SQL background, so I'm completely new t...
What does it mean that we can use memcmp(3) on invalid values? ISO C allows comparing an invalid value through memcmp(3), because it doesn't read the value, but rather its representation, and "rea...
How to verify if a year is leap? Given a numeric value (such as 2023) or some object that represents a date (such as Date, Calendar, LocalDate, etc), how can I do it?
For example: I have noticed that this does not work for any vocabulary's tests. What is the alternate way to USE: these test vocabularies? EDIT: The test word appears to run all tests alongside...
Note: I asked this question on TopAnswers a couple weeks ago, but didn't get any response, so I figured I'd ask it here. I am currently learning C++. I have a parent class (Vehicle) and two subc...
I want to pass a variable to TeamCity (on prem) to choose between deployment environments (there are 14 of 'em - don't ask) when running a TC deployment configuration build which uses a PowerShell ...
Hello everyone, I am seeking help with understanding why multithreading does not work correctly in this example: import time import matplotlib.pyplot as plt import concurrent.futures voltage...
What factors should be considered when choosing web security measures for a site?
I have written a screensaver program that, in part, uses the current wallpaper for some visual effects. However, finding the current wallpaper in different operating systems and environments is les...
Salut, quelle solution de paiement e-commerce avec 0% de commission me proposerez vous ?
I am currently using this code to display a GUI counter: USING: accessors arrays fonts kernel math math.parser ui ui.gadgets ui.gadgets.buttons ui.gadgets.editors ui.gadgets.labels ui.gadgets.pa...
For a UI gadget like a $link in Factor, a click automatically opens the page that it points to. I want to know where this default behaviour is defined. In the factor documentation, there are many ...
I've my go app the is running a web API and working smoothly at my laptop. I read this and completed the IIS setup using a config file: <configuration> <system.webServer> ...
Is it valid to partly allocate an object, as long as you only use the allocated part of it? #include <stdio.h> #include <stdlib.h> struct s { int i[100]; }; int main(void) {...
Let's analyze this code, assuming an architecture where the alignment of int64_t is the same as that of double: void bar(double *f, int64_t *j) { *(int64_t *)f = *j; } void foo(void) ...
I have to implement a JSON based REST web service for querying literature. Ordinary users should be able to query data and process it in their clients. The "main user" can adapt database entries vi...
I tried using query selector but it does not work heres my HTML code: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>JS + CSS Clock<...
I started adding types to my (working) solution to Exercism's "Kindergarten Garden" exercise, to learn how typing with python and Mypy (strict) works. While doing so, I ran into a Mypy error that I...
Context I am currently migrating a Web application from on-prem infrastructure to K8s. The legacy infrastructure relies on defining some tokens in the configuration files and these are replaced d...
Context I am currently working on migrating a legacy application to an ASP.NET Core + Angular application. The Web API's main project is based on Jason Taylor's template (clean architecture) and a...
I've turned the tables movies and scenes into media and now I don't know what to do with the movies_scenes relation. CREATE TABLE IF NOT EXISTS "movies_scenes" ( `movie_id` integer, `sce...
Title says it all. I found "Step into external code" but not sure if it's the same feature.
I have float noise values, between -1 and 1, for every x,y coordinate in a 2D area and I am trying to convert that to a whole number between 0 and 319 which represents a vertical z coordinate to re...
In a media manager I have database tables for files, media and collections. When a user is browsing a collection I want there to be links to see the metadata for single file media like books, movi...
In a Qt application I have nothing more than a window with a button as its direct child. I set its background color and all is fine: Window::Window(QWidget *parent) : QWidget(parent) { but...