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)
Is there a standard way to add an IDistributedCached in front of a database using EntityFramework? Something that handles checking the cache for reads, updating the cache on writes, and uses distri...
I am fairly certain this isn't a duplicate so please bear with me. I check for boolean true||false using if() as a matter of course in my programming. I've programmed extensively in PHP, some in C...
I'm trying to write a Node module that extends the functionality of another module (a peer dependency which I do not control) using a register function exposed by the other module. This adds additi...
Recently I had to push a new Docker image to our GitLab registry. I have the Maintainer role on that project. I had created a new token and used it to log in to Docker. However, when trying ...
First: What is an opaque pointer in C? Now when it comes to testing such a type, I know of 3 ways: Include the source file (the one containing the definition of the type and the functions tha...
For example, how to sort the output below by the values in "Column" in the psql shell itself? my_db=> \d auth_user Table "public.auth_user" Column ...
How do I concatenate two animated gifs together? The gifs are identical in dimensions and I would like to stitch them together so they play one after the other.
My use case is a collection of CSV files, each with header row. What I want to know is what subset(s) of them are "union compatible", although I also want matching column names before stacking thes...
How do you fix the error 'Failed to load the DLL hostfxr.dll' when running a .NET test executed via dotnet test and starting an x86 .NET application in the test? I'm using .NET 8. Failed to load ...
#ifdef sections can, of course, be used to include or exclude chunks of code based on some criteria known at compile time. One big problem is that when the condition is evaluated to false, the chun...
The javadoc for ServletContext.getContextPath() says that It is possible that a servlet container may match a context by more than one context path. I was trying to find any explanation how t...
With Azure Data Factory I tried migrating from Azure Cosmos DB NoSQL to Azure Cosmos DB MongoDB. The export went fine from the NoSQL but the import to the MongoDB did not work. I got no reasonable ...
I am using a W25Q64 flash ic to store some stuff for an ESP-32 project. I used this library from Github as it seems intended for ESP. It seemed weird that the read function uses two 16-bit paramet...
Sometimes when I try to install a third-party library for Python, I get an error saying that either distutils, or some part of it like distutils.core or distutils.util, could not be found. It's sho...
Context Our team is developing a solution mainly composed of several microservices relying on ASP.NET Core. We have decided that the simplest and most cost-effective solution would be for service...
Suppose I have some code in a file myscript.py like: def my_function(): print("Test") What steps do I need to take in order to make my_function run? That is to say: how do I get Python to ...
I am working on a toy project where I have a container for which I would like to write an iterator that iterates over the values in the container. Because the values are stored in a (c-style) arra...
I have to modify a legacy Django web application where there are 2 tables to store the same information using the same database structure, and the only difference is the names of the tables (and th...
As far as I can tell, it is in part determined by the HTML spec's History API1, specifically the value of history.scrollRestoration. Quoting the HTML spec's scroll restoration mode paragraph: ...
I have a project I normally build with nix and cabal, however I also want to publish my documentation onto gitlab pages. It's impractical to run my nix on the gitlab CI, so I've just been using cab...
Suppose I have an Azure Synapse Serverless SQL database. I can run the following to get the sid of added groups: select name, type_desc, authentication_type_desc, sid from sys.database_principal...
When you try to do a privileged systemd operation without the privilege, you get an escalation prompt: $ systemctl stop docker ==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units ==== ...
I browse deviantArt from time to time and I wanted to make images display bigger, because there is so much useless whitespace on that site. On first glance that would be simple - remove the set di...
In Eclipse, is it possible to setup custom errors or markers in the editor, for annotation processing? For example, the standard squiggly lines with descriptions. This question is not important. ...
I'm trying to build a proper understanding of what an OLAP[1] datastore vs an OLAP data engine is. I tend to put too much value on keywords like "engine" vs "data store." If it has "engine," I thin...
Since Matrix messenger offers only a protocol,[1] as a software engineer I can choose to: Write my own client or use an existing client Write my own server with my own server logic or join an e...
I'm getting an error when trying to open a shell to a pod. This used to work. $ kubectl exec --tty --stdin --namespace my-ns my-pod -- sh Error from server (BadRequest): Upgrade request required ...
I'm trying to write a bash function that can sanitize filenames to make them compatible with both Linux and Windows file systems. The function should perform the following operations: Replace in...
Some web sites are able to detect that Developer Tools is open as output a message in a the console. How does JavaScript know that the Chrome DevTools are open? Could this be spoofed?
When I open VS Code inside a project dir, it reopens all the tabs that were open last time, and re-expands all the folders that were unfolded last time. I find this annoying. Usually, when I close...
Sometimes there are empty files named .gitkeep sprinkled around a repository. What are these files?
C prohibits accessing an array out of bounds even if measures were taken to ensure that what should lie outside those bounds were known: struct MyStruct { int x[2]; int y, z; }; static...
Asked How to implement map using the fish (>=>, Kleisli composition) operator in F#? a couple of hours ago, and r~~'s answer blew my mind: let map f = id >=> switch f It is perfect ...
I'm learning monadic composition through Scott Wlaschin's Railway-oriented Programming post. Oncebind, switch, and >=> functions are defined, he introduces map to show how to "turn a one-trac...
First, a reminder to future self (the figure RFC 3986, Section 3. Syntax Components complemented with Section 3.2. Authority): The following are two example URIs and their component parts: ...
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...
Many languages discourage global variables. Why is this?
Having some trouble with giraffe-template on Mac M1, so decided to set up a Giraffe project manually. Started following the Doing it manually section of the Giraffe README, but got stuck right away...
In PHP why is using global like in the example below considered bad? $a = 1; class foo { public function bar() { global $a; // <-- Why is this considered bad? } } ...
Personal Project: I am new to Maven and have spent a few weeks troubleshooting pom errors with chatGPT. Tutorials are hard to come by online, because annotation-processing in Java is more complica...
Suppose someone has the requisite knowledge and skillset to contribute to a FOSS project, they have the free time to do so and they are aware of the project. Yet, they decide not to contribute. Thi...
A lot of people who maintain FOSS projects would like to get more contributions. What can the maintainer do to ensure that potential contributors are converted into actual contributors? There are...
Many older projects (i.e., older than 5 years) provide instructions to the Paket .NET dependency manager (e.g., Suave), so I started digging into it, got confused, then gave up for while because er...
This question is inspired by If I have a char array containing strings with a null byte (\0) terminating each string, how would I add another string onto the end? on Stack Overflow. Suppose I have...
What would be the simplest (and most lightweight) way of getting email notifications of failures in kubernetes clusters. Mostly interested in failing pods, so notifying on certain kubernetes event ...
ChromeOS Linux: Debian, how do I install Android SDK manager via command line? I wanted to try this repo https://github.com/JetBrains/compose-multiplatform/tree/master/examples/imageviewer and I g...
I have a flat list where each item is the key and value for an attribute. I want to transform this into a nested list where each attribute is a sublist. Example input: [ "attr1 apple 1", "a...
When I do this in a shell: $ /bin/sh -c 'echo hello world' hello world it's my understanding that I'm running a process with argv = {"/bin/sh", "-c", "echo hello world"}. That is, the quotes c...
SAML service provider (and other types as well) metadata XMLs are full of prefixes like md: and ds:. What do these mean? To illustrate my point, here's a sample metadata file from Wikipedia (CC-BY...
How to log first n lines of a stack trace in Java?