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
When configuring load balancer access logs, what permission does the S3 bucket need?

When enabling access logging for an AWS load balancer, I get the following error: Access Denied for bucket: test-bucket-access-logs. Please check S3bucket permission test-bucket-access-logs is ...

1 answer  ·  posted 10mo ago by philipp.classen‭  ·  edited 10mo ago by Alexei‭

aws-s3 aws-elb
71%
+3 −0
Are these two function pointer declarations equivalent?

Say I have two functions: FILE* get_input(const char fname[static 1]); FILE* get_output(const char fname[static 1]); And I wish to declare a function pointer and assign it the result of some p...

1 answer  ·  posted 10mo ago by Melkor-1‭  ·  edited 10mo ago by Melkor-1‭

c c23 typeof
71%
+3 −0
How can I start my Python code, from the code itself?

I have already learned how to tell the Python interpreter to run my code, but the standard approach feels a little unsatisfactory. I want the user experience to be that my program starts with the a...

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

python startup
50%
+0 −0
ArgumentError: could not find a temporary directory

Hello, I am trying to build a docker image for contributing to the devdocs repository, however I am failing to get past the thor docs:download --all command. It fails with the below error: . is w...

1 answer  ·  posted 10mo ago by zmzaps‭  ·  last activity 10mo ago by zmzaps‭

ruby docker dev-container
72%
+6 −1
What's the fastest way to copy, preserving file attributes, on each platform?

I am looking copy files platform-dependently on Linux, Oracle Solaris, MacOS, BSDs, and Windows. I have found some system calls for each platform, namely sendfile(), copy_file_range(), fcopyfile()...

0 answers  ·  posted 10mo ago by Melkor-1‭  ·  last activity 10mo ago by Melkor-1‭

c linux unix solaris freebsd
71%
+3 −0
ffmpeg - concatenating identical audio-only files results in "non-montonic DTS" warning

I am trying to join some video files and have an issue. I have boiled down the problem to the following minimal working example. I create a 2-second mp4 with a silent audio stream: $ ffmpeg -f l...

0 answers  ·  posted 10mo ago by Trevor‭  ·  edited 10mo ago by Trevor‭

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

1 answer  ·  posted 10mo ago by nogjam‭  ·  last activity 10mo ago by congusbongus‭

cmake
50%
+0 −0
Why can't I run freshly-installed Python from the command line on Windows?

I tried installing Python on an old computer running Windows 8[1]. I know for a fact that there was never any previous installation of Python on the machine. The installation appeared to be success...

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

python windows installation command-line-interface
71%
+3 −0
What happened, or is happening, to other parts of the standard library? Why are they going missing?

In Python 3.12, I noticed that some libraries seem to be missing or "deprecated": >>> import asynchat Traceback (most recent call last): File "<stdin>", line 1, in <module&gt...

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

python standard-library
50%
+0 −0
Why won't Matplotlib show me a plot?

I installed Matplotlib and tried a simple demo, but I got a warning message and no plot showed up: >>> import matplotlib.pyplot as plt >>> plt.plot([1,2,3],[4,5,6]) [<matplo...

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

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

I understand the benefits of virtual environments in general, and specifically I want to use a virtual environment so that I'll have access to Pip without exposing the system Python (i.e., included...

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

python installation python-venv
66%
+2 −0
Why does `pip` seem to be missing or broken? Isn't it part of the standard library?

I already know that the pip command might not correspond to the same Python that python runs. But in my case, it seems not to exist at all. I can't even run it as a Python module: $ python -m pip ...

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

python installation pip
80%
+6 −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 12mo ago by Karl Knechtel‭  ·  last activity 10mo ago by Michael‭

python startup entry-point
66%
+2 −0
Why can't I use a library I just installed with Pip?

I tried installing package-installation-test[1] using Pip, and it appeared to be successful. But I can't use it as advertised, either by itself or by importing it from my code: Failed attempts ...

1 answer  ·  posted 10mo ago by Karl Knechtel‭  ·  edited 10mo ago by Karl Knechtel‭

python installation runtime-environment pip
77%
+5 −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...

3 answers  ·  posted 11mo ago by matthewsnyder‭  ·  last activity 10mo ago by Karl Knechtel‭

python-3
66%
+2 −0
How can I access and use command-line arguments in Python?

In many other programming languages, the execution of code starts in a specifically named function (such as main) which is expected to have a specific signature, which allows that function to recei...

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

python startup command-line-interface
66%
+2 −0
Understanding the `if __name__ == '__main__':` idiom

I've seen many examples of Python scripts that include a line that says: if __name__ == '__main__': Sometimes the following block contains a bunch of code, but other times it just makes a singl...

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

python startup entry-point
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 10mo ago by Karl Knechtel‭  ·  last activity 10mo ago by Karl Knechtel‭

python pip
71%
+3 −0
Understanding Virtual Environments for Python

Several times now, I've seen advice in tutorials, setup/install instructions for Python-based projects, etc. to use a virtual environment to keep things organized and make it simpler to manage the ...

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

python runtime-environment python-venv
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 11mo ago by Karl Knechtel‭  ·  edited 10mo ago by Karl Knechtel‭

python installation runtime-environment
50%
+0 −0
How can I make a standalone executable from Python code?

I know that I can make Python code run starting from the script, but this still requires the user to have Python installed (and will still rely on configuring the system so that it can find Python ...

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

python build
81%
+7 −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 10mo ago by Lundin‭  ·  last activity 10mo ago by John C‭

c code-style c23 digit-separators
75%
+4 −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 10mo ago by JohnRando‭  ·  last activity 10mo ago by FractionalRadix‭

android ubuntu usb
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 11mo ago by Andrew Ray‭  ·  edited 10mo ago by hkotsubo‭

python operator-overloading operators python-3
71%
+3 −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 11mo ago by congusbongus‭  ·  last activity 11mo ago by mellen‭

python array search
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 11mo ago by toraritte‭  ·  last activity 11mo ago by Derek Elkins‭

functional-programming purescript purely-functional
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 11mo ago by toraritte‭  ·  last activity 11mo ago by Derek Elkins‭

functional-programming haskell purescript etymology
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 11mo ago by matthewsnyder‭  ·  last activity 11mo ago by matthewsnyder‭

python-3
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 11mo ago by FractionalRadix‭  ·  last activity 11mo ago by Alexei‭

docker gitlab
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 11mo ago by Melkor-1‭  ·  last activity 11mo ago by Alexei‭

c unit-testing testing
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 11mo ago by Iizuki‭  ·  last activity 11mo ago by Iizuki‭

container distroless
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 11mo ago by JohnRando‭  ·  last activity 11mo ago by JohnRando‭

android android-10
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 11mo ago by toraritte‭  ·  last activity 11mo ago by r~~‭

purescript abstract-algebra
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 12mo ago by propatience‭  ·  last activity 11mo ago by propatience‭

mongodb azure-data-factory azure-cosmosdb
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 3y ago by Lundin‭  ·  last activity 11mo ago by aghast‭

c static storage-duration scope linkage
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 11mo ago by rcmosher‭  ·  last activity 11mo 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 11mo ago by purplenanite‭  ·  last activity 11mo ago by r~~‭

python numpy
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 1y ago by matthewsnyder‭  ·  last activity 11mo ago by Michael‭

documentation open-source
50%
+0 −0
Check if a file exists in Node.js

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

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

javascript node.js
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 11mo ago by toraritte‭  ·  edited 11mo ago by MER‭

database postgresql psql
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 11mo ago by rcmosher‭

c# entity-framework-core caching database
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 11mo ago by MER‭  ·  last activity 11mo ago by hkotsubo‭

javascript boolean typeof
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 3y ago by Moshi‭  ·  edited 11mo ago by Moshi‭

typescript mapped-types type-inference
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 11mo ago by Andrew Ray‭

typescript node.js npm
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 1y ago by matthewsnyder‭  ·  last activity 11mo ago by Alexei‭

python software-recommendation vs-code
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 11mo ago by congusbongus‭  ·  closed 11mo 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 11mo ago by lori‭  ·  edited 11mo ago by Alexei‭

bash
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 1y ago by matthewsnyder‭  ·  last activity 11mo ago by BlckKnght‭

python namespaces software-practices code-style
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 1y ago by Julius H.‭  ·  last activity 11mo ago by Monica Cellio‭

vs-code
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 1y ago by Emily‭  ·  last activity 11mo ago by Jacob Raihle‭

typescript