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)
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?
How to delete a branch from a remote in git? E.g. maybe you had this branch locally too, but you deleted it already according to this question. Now you want to get rid of the corresponding remote ...
When documenting a struct with attributes, where does the docstring go? Before or after the attribute(s)? Option 1: /// Does it go here? #[derive(Deserialize, Debug)] pub struct Metadata { ...
I'm completing the rustlings exercises as part of self-teaching Rust. While working on the third iterators exercise, I solved the exercise but don't quite understand why my solution works. Specifi...
C offers two different styles when it comes to structs (and union/enum too). Either declare them using a struct tag only ("struct tag style"): struct my_type { ... }; struct my_type x; Or ...
I wish to add a property with the date of the current Git commit to the assembly info. From my .csproj: <Exec Command="git -C "$(ProjectDir)." log -1 --pretty=format:%ad" ...
The Zip class from Data.Zip requires an implementation of Semialign: class Semialign f => Zip f In my mind: Zip takes the intersection of two shapes. Semialign takes the union of two sha...
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...
I tried to check info bash but only got a copy of the man page. This is when I learned that I could apt install bash-doc to get the "full" Bash manual. After checking both the info pages and the m...
According to this article: Since encryption is two-way, the data can be decrypted so it is readable again. Hashing, on the other hand, is one-way, meaning the plaintext is scrambled into a uniqu...
I want to clear my view of my file explorer sidebar in VS Code, and just see a few files I want to focus on. Is there an easy way to do this, using the mouse, and not file hiding using pattern mat...
I want to add the ability to "Sign in with Google" into a Ruby on Rails web application, that is using Devise to handle authentication. How do I do that?
What I would like to do I would like to try to build a language model 100% from scratch if possible, for a learning experience. That means no external libraries and no pre-curated datasets. It ...
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 ...
So I googled some on how to make a case insensitive criteria query but could not find the solution very easily. So I basically have code that looks like this: ... query.criteria("fieldName").con...
The last few years, PHP has basically exploded with lots of modern language constructs that makes the life easier. But local constants are still missing, and I find that very strange. I have found...
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...