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)
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...
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...
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 ...
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 ...
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...
Many languages discourage global variables. Why is this?
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...
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...
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 ==== ...
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...
I believe when you sign in with Google, the web application running in your browser calls a command to request the Google Sign In page, and includes a “callback URL” as a parameter in that HTTP req...
A jinja template expression starts and ends with double curly brackets, which the templating engine consumes. But what if you need a single pair of curly brackets left in the output? Something lik...
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? } } ...
In a JSON schema, do the required properties need to be a subset of properties? E.g. is this a valid schema, even though cookies isn't mentioned in properties? { "type": "object", "properti...
Is there a way to make Swashbuckle.AspNetCore generate a Swagger exclusiveMinimum range validation for a model property? There doesn't seem to be any way to do this with the attributes recognized ...
What are the differences between git apply and git am commands? Both seem to be used for applying patches to repositories. When should one be used over the other?
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...
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...
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...
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 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...
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: ...
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?
The F# language guide (see Signatures article) has a very sparse definition of what a "sealed" type is: Attribute Description [<Sealed>] For a type that has no abstract me...
#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...
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...
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...
Sometimes there are empty files named .gitkeep sprinkled around a repository. What are these files?
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: ...
A well-known easter egg in Python displays some ideas about writing good Python code, credited to Tim Peters (one of the core developers). This question is about the last: Namespaces are one hon...
Background + Example Code Let's say I have a SwiftUI ViewModel like so: class ViewModel: ObservableObject { @Published var strs: [String] = [] func fetchStrs() async { // T...
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...
How to log first n lines of a stack trace in Java?
print() normally adds text to STDOUT, it does not erase existing text. https://linux.codidact.com/posts/289869 describes various ways of doing the overwrite in shell scripts. How can you do this ...
I'm writing exception handling around a call to Socket.AcceptAsync in a loop. One of the exceptions it's documented to throw is SocketException, but the documentation is vague: An error occurred...
I loaded a binary into Ghidra for analysis. The decompiler says undefined8 main(void) { basic_ostream *pbVar1; char *pcVar2; [--snip--] pbVar1 = std::operator<<(pbVar1,"PXZ ");...
The exam checking for the backend is working perfectly well but the front end keeps saying an error occurred. Am like ok then tried the demo version replaced the javascript and everything i can rep...
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...
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...
Question How can I read data from a NestJS Redis Cache as a stream? I'm using Nest.js and its @nestjs/cache-manager (using the Redis implementation), I need to read data I have stored in the cach...
I am currently working with LWJGL and the obstacle I face right now on my project is rendering textures to a cube, e.x a set of 8 vertices with position, color, and UV information. For now, I am st...
Consider the following arbitrarily-nested JSON as input to a jq filter: echo '[{"foo": [1, 2]}, {"bar": [{"baz": ["foo", "baz"]}]}]' | jq '.' My goal is to join leaf arrays into strings: [{"fo...
I'm trying to set the transform attribute of a group within an SVG. Specifically, I'd like to set translate's value to 0 0. I tried using the set element for this but that didn't have an observab...
Taking the example from this Stackoverflow question: type Vector2D(dx : float, dy : float) = static let zero = Vector2D(0.0, 0.0) static let onex = Vector2D(1.0, 0.0) static let ...
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...
When reading about various operators used by programming languages, the term "short circuit behavior" is often used. For example in this C code: int a = 0; a && b++ Someone explained t...
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.
Is there a Python serialization format that has capabilities similar to Pickle, but is text based? The problem I always have with pickle is that it's binary, so I can't manually view or edit the d...
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...