Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

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)
66%
+2 −0
When to use custom iterators versus pointers

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...

0 answers  ·  posted 2d ago by mr Tsjolder‭

50%
+0 −0
How to merge Django model query results?

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...

1 answer  ·  posted 7d ago by toraritte‭  ·  last activity 7d ago by toraritte‭

75%
+4 −0
What determines where the focus goes back to when clicking on a browser's back button?

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: ...

0 answers  ·  posted 7d ago by toraritte‭  ·  edited 4d ago by toraritte‭

60%
+1 −0
Adding dependency with cabal in gitlab-ci

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...

0 answers  ·  posted 8d ago by WheatWizard‭

60%
+1 −0
Convert Synapse SQL Server hex `sid` to Azure Entra group object ID.

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...

0 answers  ·  posted 8d ago by daviewales‭

71%
+3 −0
Privilege escalation from Python like from systemd

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 ==== ...

1 answer  ·  posted 10d ago by matthewsnyder‭  ·  last activity 10d ago by Karl Knechtel‭

66%
+2 −0
Images won't fit flex container on chrome

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...

1 answer  ·  posted 11d ago by martixy‭  ·  last activity 10d ago by martixy‭

50%
+0 −0
Eclipse Custom Errors for Annotation Processing

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. ...

0 answers  ·  posted 11d ago by tylerbakeman‭

66%
+2 −0
Integrating a standalone database 'engine' into an OLAP database

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...

0 answers  ·  posted 12d ago by erjcan‭  ·  edited 12d ago by Michael‭

66%
+2 −0
Understanding the Matrix protocol vs Matrix server and what can be implemented from scratch

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...

1 answer  ·  posted 12d ago by erjcan‭  ·  last activity 12d ago by Michael‭

50%
+0 −0
Kubectl exec: "Error from server (BadRequest): Upgrade request required"

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 ...

1 answer  ·  posted 12d ago by Iizuki‭  ·  last activity 12d ago by Iizuki‭

57%
+2 −1
How to write a bash function to sanitize filenames for Linux and Windows

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...

0 answers  ·  posted 13d ago by ShadowsRanger‭

50%
+0 −0
How to test if chrome dev tools are open in JavaScript?

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?

0 answers  ·  posted 13d ago by kreijstal‭  ·  edited 13d ago by Alexei‭

66%
+2 −0
VS code - stop reopening old tabs

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...

0 answers  ·  posted 14d ago by matthewsnyder‭

71%
+3 −0
What is a .gitkeep file?

Sometimes there are empty files named .gitkeep sprinkled around a repository. What are these files?

1 answer  ·  posted 17d ago by Iizuki‭  ·  edited 17d ago by Iizuki‭

git
80%
+6 −0
Can I access an array element from a pointer to an object contiguous with but outside the array?

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...

1 answer  ·  posted 18d ago by CPlus‭  ·  last activity 15d ago by Lundin‭

50%
+0 −0
Why does `let map f = id >=> switch f` work in F#?

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 ...

1 answer  ·  posted 18d ago by toraritte‭  ·  edited 10d ago by Alexei‭

50%
+0 −0
How to implement `map` using the fish (>=>, Kleisli composition) operator in F#?

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...

1 answer  ·  posted 18d ago by toraritte‭  ·  last activity 16d ago by r~~‭

71%
+3 −0
Why does RFC 3986 (URI generic syntax) declare the "host" component to be case-insensitive when the syntax rules show it to be case-sensitive?

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: ...

1 answer  ·  posted 21d ago by toraritte‭  ·  edited 18d ago by toraritte‭

66%
+2 −0
Filter stashes by pathspec

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...

0 answers  ·  posted 22d ago by Michael‭  ·  edited 21d ago by Alexei‭

75%
+4 −0
Why is global evil?

Many languages discourage global variables. Why is this?

3 answers  ·  posted 24d ago by matthewsnyder‭  ·  last activity 22d ago by mavavilj‭

60%
+1 −0
How to start creating a Giraffe web project and how to serve it?

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...

1 answer  ·  posted 24d ago by toraritte‭  ·  last activity 24d ago by toraritte‭

66%
+2 −0
PHP - Why using "global" considered bad?

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? } } ...

1 answer  ·  posted 24d ago by Vanity Slug ❤️‭  ·  last activity 24d ago by matthewsnyder‭

60%
+1 −0
Maven JPA integration: processor not found

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...

2 answers  ·  posted 25d ago by tylerbakeman‭  ·  last activity 24d ago by Zer0‭

36%
+2 −5
What makes people able but unwilling to contribute to FOSS projects? [closed]

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...

0 answers  ·  posted 28d ago by matthewsnyder‭  ·  closed 27d ago by Alexei‭

71%
+3 −0
What is a reasonable minimum for making a FOSS project inviting to contributors?

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...

2 answers  ·  posted 28d ago by matthewsnyder‭  ·  last activity 26d ago by Michael‭

66%
+2 −0
.NET dependency management: `dotnet add package` vs. Paket?

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...

1 answer  ·  posted 28d ago by toraritte‭  ·  last activity 25d ago by toraritte‭

66%
+2 −0
How can I manage multiple consecutive strings in a buffer (and add more later)?

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...

2 answers  ·  posted 30d ago by Karl Knechtel‭  ·  last activity 29d ago by Lundin‭

75%
+4 −0
Simplest way of getting failure notification emails from kubernetes

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 ...

1 answer  ·  posted 1mo ago by Iizuki‭  ·  last activity 17d ago by Iizuki‭

50%
+0 −0
ChromeOS Linux: Debian, how do I install Android SDK manager via command line?

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...

1 answer  ·  posted 1mo ago by propatience‭  ·  last activity 1mo ago by propatience‭

50%
+2 −2
How to group a flat list of attributes into a nested lists?

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...

2 answers  ·  posted 1mo ago by aditya98‭  ·  last activity 1mo ago by matthewsnyder‭

75%
+4 −0
Why does bash seem to parse `sh -c` commands differently when called via `execl`?

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...

1 answer  ·  posted 1mo ago by Emily‭  ·  last activity 1mo ago by Emily‭

66%
+2 −0
What are the prefixes like "md:" and "ds:" in SAML metadata?

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...

1 answer  ·  posted 2mo ago by Iizuki‭  ·  last activity 2mo ago by Michael‭

60%
+1 −0
How to log first n lines of a stack trace in Java?

How to log first n lines of a stack trace in Java?

2 answers  ·  posted 2mo ago by propatience‭  ·  last activity 2mo ago by hkotsubo‭

77%
+5 −0
How to delete a remote branch in git?

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 ...

2 answers  ·  posted 2mo ago by Iizuki‭  ·  last activity 2mo ago by hkotsubo‭

git
57%
+2 −1
Proper location of docstring on struct with attributes

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 { ...

1 answer  ·  posted 2mo ago by qohelet‭  ·  last activity 2mo ago by qohelet‭

77%
+5 −0
Why does this work? .collect() automatic conversion to function return type

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...

1 answer  ·  posted 2mo ago by qohelet‭  ·  last activity 2mo ago by Iizuki‭

77%
+5 −0
Are there technical reasons to pick one struct coding style over the other?

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 ...

1 answer  ·  posted 2mo ago by Lundin‭  ·  last activity 2mo ago by Lundin‭

66%
+2 −0
Git command formatting characters in msbuild are interpreted incorrectly

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 &quot;$(ProjectDir).&quot; log -1 --pretty=format:%ad" ...

1 answer  ·  posted 2mo ago by LyndonGingerich‭  ·  edited 2mo ago by Michael‭

75%
+4 −0
Why does `Zip` require `Semialign`

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...

1 answer  ·  posted 2mo ago by WheatWizard‭  ·  last activity 2mo ago by r~~‭

62%
+3 −1
What happens when you “Sign in with Google”?

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...

0 answers  ·  posted 2mo ago by Julius H.‭  ·  edited 2mo ago by Julius H.‭

71%
+3 −0
What guarantees does Bash make about order of :- Parameter Expansion when it is not in POSIX mode?

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...

1 answer  ·  posted 2mo ago by aghast‭  ·  last activity 1mo ago by Quasímodo‭

57%
+2 −1
What is the difference between hashing and encryption?

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...

3 answers  ·  posted 2mo ago by Julius H.‭  ·  last activity 2mo ago by matthewsnyder‭

50%
+0 −0
How to hide files from the VS Code sidebar without pattern matching?

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...

1 answer  ·  posted 2mo ago by Julius H.‭  ·  edited 2mo ago by matthewsnyder‭

75%
+4 −0
How do you add "Sign In with Google" to a Ruby on Rails web application that is using the Devise authentication framework?

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?

1 answer  ·  posted 2mo ago by Julius H.‭  ·  last activity 2mo ago by Julius H.‭

41%
+3 −5
Building a language model completely from scratch

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 ...

1 answer  ·  posted 2mo ago by Julius H.‭  ·  last activity 2mo ago by matthewsnyder‭

60%
+1 −0
Can Swashbuckle.AspNetCore generate exclusiveMinimum validation?

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 ...

1 answer  ·  posted 2mo ago by Kevin Krumwiede‭  ·  last activity 2mo ago by Kevin Krumwiede‭

60%
+1 −0
MongoDB Java Morphia case insensitive criteria query?

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...

1 answer  ·  posted 2mo ago by propatience‭  ·  edited 2mo ago by propatience‭

75%
+4 −0
Is there any rationale for the lack of local constants in PHP?

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...

0 answers  ·  posted 3mo ago by klutt‭

php
66%
+2 −0
How to surround jinja expression with curly brackets?

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...

1 answer  ·  posted 3mo ago by Iizuki‭  ·  last activity 29d ago by Alexei‭