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)
50%
+0 −0
How to perform a zuluCrypt "Create Encrypted Container in Hard Drive" but as a Linux command line?

I have long been in the process of converting my manual steps to create a new backup disks into an automated script. The only part I have left is the initial "creation" of the disk, meaning whateve...

0 answers  ·  posted 15h ago by jmari.hendry@floodouts.com‭  ·  edited 15h ago by jmari.hendry@floodouts.com‭

75%
+4 −0
Where to place digit separators in C23?

C23 introduces the digit separator ' which can be placed anywhere inside an integer constant for the purpose of clarity and self-documenting code. These are otherwise ignored by the compiler when d...

2 answers  ·  posted 2d ago by Lundin‭  ·  last activity 1d ago by John C‭

60%
+1 −0
What's the difference between include_directories and target_include_directories?

I have seen others allude to include_directories as disfavored: Having trouble adding include directories Summaries from CMake's documentation: target_include_directories include_directori...

0 answers  ·  posted 3d ago by nogjam‭

71%
+3 −0
Android Studio IDE refuses to find my device

I've installed Android Studio Jellyfish (snap) on an Ubuntu Fossa VM and was finally able to generate an apk for my project after struggling with Gradle, Java, plugins, etc. The device is detected...

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

77%
+5 −0
How is this code "dividing" by a string?

I found a strange expression in some Python code: from library import HOME_DIRECTORY file = HOME_DIRECTORY / "file.json" It seems to be dividing a string by another string in order to do som...

3 answers  ·  posted 8d ago by Andrew Ray‭  ·  edited 6d ago by hkotsubo‭

60%
+1 −0
Installing packages for, and using them with, a specific Python installation

I have multiple installations of Python on my machine. I already know how to choose one to use to run for my code - and therefore, I could also solve the problem for third-party application code. ...

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

60%
+1 −0
What's the difference between colorMode and uiMode?

In setting android:configChanges in AndroidManifest.xml, what is the difference between colorMode and uiMode? I hear uiMode is for changes between light/dark modes, which sounds exactly what colorM...

0 answers  ·  posted 7d ago by Ullallulloo‭

75%
+4 −0
Reinstall old Python libraries after update

Recently, Python updated from 3.11 to 3.12 and now all my libraries are gone. Actually they're in the old 3.11 site-packages, but now that python points to 3.12 those are not active. Every time I r...

2 answers  ·  posted 13d ago by matthewsnyder‭  ·  last activity 10d ago by mudskipper‭

66%
+2 −0
How do I trim a sorted list in Python?

How do I trim a sorted list in Python, so that I only keep the elements greater than a certain value? For example, if I have this list: l = [1, 3, 5, 6, 7, 8] How can I efficiently get a list of...

3 answers  ·  posted 13d ago by congusbongus‭  ·  last activity 10d ago by mellen‭

66%
+2 −0
What does "parameterised type in the positive / negative position" mean in the context of invariant functors?

From PureScript's Data.Functor.Invariant documentation (emphasis mine): A type of functor that can be used to adapt the type of a wrapped function where the parameterised type occurs in both the...

1 answer  ·  posted 11d ago by toraritte‭  ·  last activity 10d ago by Derek Elkins‭

71%
+3 −0
Where does the name of the `pure` function in the `Applicative` type class come from?

At this point in my learning journey, I simply accepted that this function is called pure (both in Haskell and in PureScript), but it would have helped a lot if I had known the reasoning behind thi...

1 answer  ·  posted 12d ago by toraritte‭  ·  last activity 11d ago by Derek Elkins‭

66%
+4 −1
Subfolders for package-less module imports

Is there some sane way to allow Python to import from subfolders in projects that don't have a package? I have many Python programs that I implemented as Python files inside a directory, without a...

1 answer  ·  posted 13d ago by matthewsnyder‭  ·  last activity 11d ago by matthewsnyder‭

71%
+3 −0
Choosing between multiple Python installations (environments) on the same computer

I have multiple installations of Python on my machine. When I run Python, what determines which installation is used? How can I control this?

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

66%
+2 −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 ...

2 answers  ·  posted 30d ago by FractionalRadix‭  ·  last activity 13d ago by Alexei‭

77%
+5 −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 1mo ago by Melkor-1‭  ·  last activity 13d ago by Alexei‭

50%
+0 −0
UID of nonroot user in distroless container images

Distroless images use a user called nonroot by convention. What's the UID (User ID) of this user? This is relevant in multi-stage image builds: FROM bash:latest as builder RUN adduser adduser ...

2 answers  ·  posted 14d ago by Iizuki‭  ·  last activity 14d ago by Iizuki‭

42%
+1 −2
can't install apks

An Android 10 Alcatel 3T tablet (armeabi-v7a) i have laying around for testing suddenly stopped being able to install apks by clicking on them. I can install apps just fine via f-droid and adb inst...

1 answer  ·  posted 16d ago by JohnRando‭  ·  last activity 16d ago by JohnRando‭

40%
+0 −1
Migrating from Az Co DB MongoDB to Az Co DB MongoDB, error? [closed]

With Azure Data Factory I tried migrating from Azure Cosmos DB MongoDB to Azure Cosmos DB MongoDB. I got some errors with wasted/non-imported documents with MongoDB Compass. How to solve it?

1 answer  ·  posted 17d ago by propatience‭  ·  closed 16d ago by Alexei‭

60%
+1 −0
Why is the `Data.Int` type not a `Semigroup` in PureScript but `String` is?

> "lo" <> "fa" "lofa" > 1 <> 2 Error found: in module $PSCI at :1:1 - 1:7 (line 1, column 1 - line 1, column 7) No type class instance was found for ...

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

40%
+0 −1
Migrating from Az Co DB NoSQL to Az Co DB MongoDB, error?

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

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

89%
+15 −0
What does the static keyword do in C?

What exactly does the static keyword do in C? I have seen it used in several diverse contexts: 1) As a variable outside a function: #include <stdio.h> static int x = 5; int main (void) ...

2 answers  ·  posted 2y ago by Lundin‭  ·  last activity 19d ago by aghast‭

75%
+4 −0
Syntax match any 2 spaces at end of line

I'm using the following syntax match to conceal 2 spaces at the end of a line with a special character. syntax match Normal '\s\{2}$' conceal cchar=⏎ A line with two spaces at the end of it wou...

2 answers  ·  posted 22d ago by rcmosher‭  ·  last activity 20d ago by Michael‭

vim
71%
+3 −0
How to iterate over numpy array axes in array slicing?

In short, I want to access a multidimensional array, starting with an entry, say a 4D array called "new_array". new_array[0,1,2,3] and getting as an output the sliced arrays new_array[:,1,2,3],n...

1 answer  ·  posted 24d ago by purplenanite‭  ·  last activity 23d ago by r~~‭

77%
+5 −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 3mo ago by matthewsnyder‭  ·  last activity 24d ago by Michael‭

50%
+0 −0
Check if a file exists in Node.js

How to check in Node.js if a file exists?

2 answers  ·  posted 25d ago by philipp.classen‭  ·  last activity 25d ago by ɯıpɐʌ‭

75%
+4 −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 1mo ago by toraritte‭  ·  edited 26d ago by MER‭

60%
+1 −0
Add an IDistributedCache to EntityFramework

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

0 answers  ·  posted 27d ago by rcmosher‭

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 27d ago by MER‭  ·  last activity 27d ago by hkotsubo‭

80%
+6 −0
TypeScript is unable to infer the correct type for a mapped tuple

I was playing around with mapped tuples and came across an interesting case where TypeScript cannot infer the types used: interface Foo<A, B> { (a: A, b: B): any } function test<...

0 answers  ·  posted 2y ago by Moshi‭  ·  edited 30d ago by Moshi‭

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 30d ago by Andrew Ray‭

75%
+4 −0
Can you run Python code on text in VS Code?

In VS Code, is it possible to run Python code on the text being edited? I realize that I can save my text, create a .py file, switch to a terminal (including VS Code's own terminal) and run the .p...

1 answer  ·  posted 8mo ago by matthewsnyder‭  ·  last activity 1mo ago by Alexei‭

88%
+14 −0
Are "strong passwords" at all meaningful?

Whenever registering to diverse sites on the net, you are often forced to enter a so called "strong password", which would ideally contain both upper case letters, lower case letters, digits, and s...

4 answers  ·  posted 5mo ago by Lundin‭  ·  last activity 1mo ago by Michael‭

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 1mo ago by congusbongus‭  ·  closed 1mo ago by Alexei‭

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

71%
+3 −0
PEP20 on namespaces: What exactly is it saying to do?

PEP20 aka the Zen of Python has a statement: Namespaces are one honking great idea -- let's do more of those! What exactly are we supposed to "do" according to this? Is it saying we should h...

1 answer  ·  posted 6mo ago by matthewsnyder‭  ·  last activity 1mo ago by BlckKnght‭

60%
+1 −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...

2 answers  ·  posted 4mo ago by Julius H.‭  ·  last activity 1mo ago by Monica Cellio‭

77%
+5 −0
How and where does Python code start running? How can I control that?

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

2 answers  ·  posted 2mo ago by Karl Knechtel‭  ·  last activity 1mo ago by Monica Cellio‭

80%
+6 −0
How do I share a type between a client and server, but make a specific field optional for one and required for the other?

Let's say I have a client/server application with a data structure on the server side: type User = { name: string; superSecretGovernmentIdNumber: string; }; These fields are both non-nul...

2 answers  ·  posted 8mo ago by Emily‭  ·  last activity 1mo ago by Jacob Raihle‭

62%
+3 −1
How do I choose the correct Perl module from these variations?

When looking for Perl modules to handle JSON strings and/or documents, I found JSON::PP and JSON::XS. The documentation of JSON::PP says it is compatible with JSON::XS. What do these suffixes me...

2 answers  ·  posted 3y ago by ghost-in-the-zsh‭  ·  last activity 1mo ago by ivan‭

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 1mo ago by Hyperlynx‭  ·  last activity 1mo ago by Angew‭

c++
50%
+0 −0
How do you fix 'Failed to load the dll hostfxr.dll' when starting an x86 .NET process in a test run via dotnet test?

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

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

83%
+8 −0
Tools for debugging coredumps

For debugging running programs I often use whatever is integrated with the IDE I am using. QtDeveloper right now, but also used Eclipse, Netbeans and others. Most of them just use gdb under the hoo...

1 answer  ·  posted 3y ago by Estela‭  ·  last activity 1mo ago by Invisible Mender‭

66%
+2 −0
Maven exec:exec fails to see executables

I am stumped at Maven exec plugin. Running mvn exec:exec -Dexec.executable="curl" (or "echo") works. But when running mvn exec:exec or mvn exec:exec@b (or @a) it fails saying The parameter 'exe...

1 answer  ·  posted 11mo ago by LAFK‭  ·  last activity 1mo ago by mirabilos‭

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

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

75%
+4 −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...

1 answer  ·  posted 2mo ago by mr Tsjolder‭  ·  last activity 1mo ago by Angew‭

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 2mo ago by HinkyDinky‭  ·  closed 2mo ago by Lundin‭

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

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

81%
+7 −0
PGP sign emails sent with git-send-email(1)

How can we use git-send-email(1) to sign patches (emails) with the gpg(1) keyring? I've heard it can be done, but couldn't find anything in the git-send-email(1) documentation nor in a web search.

3 answers  ·  posted 2y ago by alx‭  ·  last activity 2mo ago by alx‭