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)
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 1mo ago by daviewales‭

75%
+4 −0
Testing an opaque type's internals

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

2 answers  ·  posted 5d ago by Melkor-1‭  ·  last activity 4d ago by John C‭

60%
+1 −0
Docker push fails with message "denied: requested access to the resource is denied"

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

1 answer  ·  posted 4d ago by FractionalRadix‭  ·  last activity 4d ago by FractionalRadix‭

71%
+3 −0
How to sort the output of meta / slash commands in `psql`?

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

1 answer  ·  posted 6d ago by toraritte‭  ·  edited 14h ago by MER‭

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 2mo ago by Emily‭  ·  last activity 2mo ago by Emily‭

75%
+4 −0
Why is global evil?

Many languages discourage global variables. Why is this?

3 answers  ·  posted 2mo ago by matthewsnyder‭  ·  last activity 2mo ago by mavavilj‭

60%
+1 −0
In javascript is there really a good reason to never check for boolean true || false such as if(var){}else{}?

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

3 answers  ·  posted 2d ago by MER‭  ·  last activity 1d ago by hkotsubo‭

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 2mo ago by Michael‭  ·  edited 2mo ago by Alexei‭

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 1mo ago by matthewsnyder‭  ·  last activity 1mo ago by Karl Knechtel‭

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 2mo ago by toraritte‭  ·  last activity 2mo ago by toraritte‭

66%
+4 −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 3mo ago by Julius H.‭  ·  edited 3mo ago by Julius H.‭

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 4mo ago by Iizuki‭  ·  last activity 2mo ago by Alexei‭

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 2mo ago by Vanity Slug ❤️‭  ·  last activity 2mo ago by matthewsnyder‭

66%
+2 −0
Do the elements of 'required' array need to be defined in 'properties' dictionary in JSON schema?

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

1 answer  ·  posted 4mo ago by Iizuki‭  ·  last activity 4mo ago by Iizuki‭

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 3mo ago by Kevin Krumwiede‭  ·  last activity 3mo ago by Kevin Krumwiede‭

80%
+6 −0
Git apply vs git am

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?

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

git
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 1mo 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 2mo ago by tylerbakeman‭  ·  last activity 2mo ago by Zer0‭

75%
+4 −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 2mo ago by matthewsnyder‭  ·  last activity 2mo 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 1mo ago by erjcan‭  ·  last activity 1mo ago by Michael‭

60%
+1 −0
TypeScript won't recognize cross-module type extensions

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

0 answers  ·  posted 4d ago by Andrew Ray‭

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 2mo ago by toraritte‭  ·  edited 2mo ago by toraritte‭

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 1mo ago by kreijstal‭  ·  edited 1mo ago by Alexei‭

50%
+0 −0
What is a "sealed" type in F# and why doesn't the type test pattern operator (:?) work on it out of the `box`?

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

0 answers  ·  posted 4mo ago by toraritte‭  ·  edited 4mo ago by toraritte‭

f#
66%
+2 −0
Can I conditionally include class members without using #ifdef?

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

1 answer  ·  posted 11d ago by Hyperlynx‭  ·  last activity 9d ago by Angew‭

c++
60%
+1 −0
ServletContext matched by more than 1 path

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

0 answers  ·  posted 18d ago by morgwai‭

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‭

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 1mo ago by erjcan‭  ·  edited 1mo ago by Michael‭

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 2mo ago by Iizuki‭  ·  edited 2mo ago by Iizuki‭

git
77%
+5 −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: ...

1 answer  ·  posted 1mo ago by toraritte‭  ·  last activity 27d ago by toraritte‭

75%
+4 −0
What does "namespace" mean?

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

2 answers  ·  posted 6mo ago by Karl Knechtel‭  ·  last activity 6mo ago by Olin Lathrop‭

66%
+2 −0
Is there a correct way to fetch data with a SwiftUI ViewModel?

Background + Example Code Let's say I have a SwiftUI ViewModel like so: class ViewModel: ObservableObject { @Published var strs: [String] = [] func fetchStrs() async { // T...

0 answers  ·  posted 7mo ago by MrDevel0per‭  ·  edited 6mo ago by MrDevel0per‭

66%
+2 −0
Best practices for business versioning within Web APIs

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

0 answers  ·  posted 26d ago by Alexei‭  ·  edited 26d ago by Alexei‭

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 3mo ago by propatience‭  ·  last activity 3mo ago by hkotsubo‭

66%
+4 −1
How to overwrite lines of STDOUT in Python?

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

2 answers  ·  posted 8mo ago by matthewsnyder‭  ·  last activity 7mo ago by hkotsubo‭

50%
+0 −0
Does Socket.AcceptAsync throw SocketException for any transient reason?

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

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

60%
+1 −0
Ghidra decompiler: c_str() used in phantom string?

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 ");...

1 answer  ·  posted 6mo ago by nteodosio‭  ·  edited 6mo ago by Alexei‭

25%
+0 −4
Having problems with my php script [closed]

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

0 answers  ·  posted 5mo ago by zick853‭  ·  closed 5mo ago by Mithical‭

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 2mo ago by CPlus‭  ·  last activity 1mo ago by Lundin‭

40%
+0 −1
Addressing W25Q64 flash IC [closed]

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

0 answers  ·  posted 24d ago by HinkyDinky‭  ·  closed 23d ago by Lundin‭

66%
+2 −0
How can I get a value as a node:stream from the Nest.js cache-manager?

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

0 answers  ·  posted 7mo ago by gdfelt‭  ·  edited 7mo ago by MrDevel0per‭

50%
+1 −1
How do I properly render a quad in OpenGL using a GL_TRIANGLE_STRIP primitive?

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

1 answer  ·  posted 8mo ago by cuzzo‭  ·  last activity 8mo ago by djm‭

75%
+4 −0
Replace leaf arrays with joined strings in a nested structure in jq

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

1 answer  ·  posted 9mo ago by ggorlen‭  ·  edited 8mo ago by ggorlen‭

75%
+4 −0
Set transform of SVG element

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

1 answer  ·  posted 7mo ago by Matthias Braun‭  ·  edited 7mo ago by Matthias Braun‭

svg
60%
+1 −0
What is the difference between `static let` and `static member` in F#?

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

1 answer  ·  posted 4mo ago by toraritte‭  ·  last activity 4mo ago by toraritte‭

f#
42%
+1 −2
How would I display the first line of all files matching a glob? [closed]

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

1 answer  ·  posted 9d ago by lori‭  ·  edited 9d ago by Alexei‭

80%
+6 −0
What is the meaning of "short circuit" operators?

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

2 answers  ·  posted 8mo ago by Lundin‭  ·  last activity 8mo ago by matthewsnyder‭

33%
+0 −2
How do I concatenate two animated gifs together? [closed]

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.

1 answer  ·  posted 9d ago by congusbongus‭  ·  closed 8d ago by Alexei‭

gif
50%
+1 −1
Is there a text version of pickle?

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

0 answers  ·  posted 8mo ago by matthewsnyder‭

60%
+1 −0
Why does `distutils` seem to be missing or broken? Isn't it part of the standard library?

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

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