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)
77%
+5 −0
Lemmy API: how to get list of followed/subscribed communities.

Context Using the lemmy API, I'm trying to get a list of sublemmies (lemmy communities) that a user is following. Reading the documentation, I using the /site endpoint, I should be able to get a ...

1 answer  ·  posted 10mo ago by elvis_depresley‭  ·  last activity 10mo ago by tgxn‭

77%
+5 −0
Programmatically import, edit and export DBC files

I am looking for a way to programmatically edit and save .dbc files that are meant for J1939 CAN communication. I have a few large files that need to be compared/edited. Being able to import, edit...

1 answer  ·  posted 10mo ago by HinkyDinky‭  ·  last activity 9mo ago by HinkyDinky‭

77%
+5 −0
How to move a tag in git?

I have created a tag in my project, using git tag v2023 However, I forgot to commit a few changes. Now I would like to move this tag to the current point (after having committed the changes I had...

1 answer  ·  posted 9mo ago by mr Tsjolder‭  ·  edited 8mo ago by meta user‭

77%
+5 −0
Child div doesn't inherit parent's div background-color

I have a parent div with two child divs. I want the parent div and the child divs to have a blue background color when it's hovered. But the child divs doesn't inherit the background color. It is o...

1 answer  ·  posted 1y ago by Bennshinpoes‭  ·  last activity 1y ago by r~~‭

77%
+5 −0
Any testimonials for any C++ units of measure library?

The question is about libraries that extend the data type system to ensure physically realistic computations. Think std::chrono but for distance and mass and other things as well as for time. Inste...

1 answer  ·  posted 1y ago by Fred Wamsley‭  ·  last activity 1y ago by Ben‭

77%
+5 −0
What is the Python Global Interpreter Lock?

What exactly is the Python Global Interpreter Lock (GIL)? As someone who is relatively new to Python, is this something I need to be aware of, or is this just some implementation detail of the inte...

1 answer  ·  posted 1y ago by Moshi‭  ·  last activity 1y ago by Derek Elkins‭

77%
+5 −0
Keep local branch changes to resolve all remaining conflicts in a merge

On branch-x, I do git merge branch-y Now there are some conflicts, and git status shows Changes to be committed: new file: a new file: b Unmerged paths: (use "git a...

1 answer  ·  posted 1y ago by Quasímodo‭  ·  last activity 1y ago by Quasímodo‭

77%
+5 −0
Mapping generic handler to generic query in MediatR

I am using MediatR in an ASP.NET Core 3.1 application and I want use a generic query and a generic request that deals with getting lists of some standard items I am using in drop-downs and similar:...

0 answers  ·  posted 3y ago by Alexei‭  ·  edited 2y ago by Alexei‭

77%
+5 −0
How does Caveat work?

One of the fonts available (to me) on Google Docs is Caveat. The following is in 18-point Caveat on Google Docs: I found that Caveat is available at https://github.com/googlefonts/caveat/tree/ma...

0 answers  ·  posted 3y ago by msh210‭  ·  edited 3y ago by Alexei‭

77%
+5 −0
Is it unsecure to use a password on the command line to run a MySQL script on Windows?

Its possible to execute a MySQL file from the command line like so, mysql -u USER -pPASSWORD < FILENAME which triggers a warning, mysql: [Warning] Using a password on the command line int...

2 answers  ·  posted 3y ago by Charlie Brumbaugh‭  ·  edited 3y ago by ghost-in-the-zsh‭

77%
+12 −2
What gets allocated on the stack and the heap?

I was told by my professor/book that computer programs use two kinds of memory and that all variables get allocated either on the stack or on the heap. Is this true? How can I tell where a variable...

2 answers  ·  posted 3y ago by Lundin‭  ·  edited 3y ago by Alexei‭

77%
+5 −0
Search tree supporting efficient bulk sequential insert

For holding ordered sets of keys, there are well-known data structures (the red-black tree, for example) that support O(log(n)) lookup and insertion algorithms. Of course this means that there triv...

0 answers  ·  posted 3y ago by r~~‭  ·  edited 3y ago by r~~‭

77%
+5 −0
Handling JSON files in Rust without manually creating mapping classes

I have JSON that looks something like this: {"id":"n-fsdf-6b6", "name":"JohnSmith", "revisionDate":1591072274000} The JSON data is named CharacterInfo. It comes from a static external URL. The str...

1 answer  ·  posted 3y ago by dustytrash‭  ·  last activity 3y ago by r~~‭

77%
+5 −0
What would the pros and cons of storing the compiled CSS output of SASS in version control?

If one is using SASS to build a websites CSS and using version control one can either, Keep both the SASS and the resulting CSS files in version control. Only storing the SASS files in version con...

4 answers  ·  posted 3y ago by Charlie Brumbaugh‭  ·  last activity 3y ago by ben‭

77%
+5 −0
Is an ORDER BY required when looping through MySQL records with LIMIT?

Let's say I have a table with 10,000 rows and instead of selecting all of the rows at once I select 1,000 at a time like LIMIT 0,1000 LIMIT 1000,1000 etc. Without an ORDER BY statement the or...

1 answer  ·  posted 3y ago by Charlie Brumbaugh‭  ·  edited 2y ago by Alexei‭

77%
+5 −0
How should one match a specialized version of a variant?

Let's say I have a variant that can hold a bunch of different types of values (say I got them from parsing a JSON or similar). using Value = std::variant<std::monostate, int, double, std::strin...

1 answer  ·  posted 2y ago by Moshi‭  ·  last activity 11mo ago by Baum mit Augen‭

77%
+5 −0
Why can't a derived class add a const qualifier to a method?

Say we have an abstract class Foo declared as so: class Foo { public: virtual void test() = 0; }; Let's say that we make a derived concrete class FooDerived, and decide to mark it's ve...

2 answers  ·  posted 2y ago by Moshi‭  ·  last activity 2y ago by Dirk Herrmann‭

77%
+5 −0
How to open a file and edit its content in groovy script

I have a Makefile in my Jenkins job's workspace, that I want to edit out certain parts from and then save it, before running next part of the script that uses this Makefile. The part that I want t...

2 answers  ·  posted 2y ago by Megan‭  ·  last activity 2y ago by Alexei‭

77%
+5 −0
noreturn function with non-void return type

Is it legal ISO C to declare a function as noreturn with a non-void return type (but of course not actually returning)? As far as I can read from the standard, it seems legal. Example: noreturn ...

1 answer  ·  posted 2y ago by alx‭  ·  edited 2y ago by alx‭

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

77%
+5 −0
What is the purpose of having underscored names and then defining a non-underscored alias to it?

In a C implementation in <stdio.h> on Linux I saw something like: extern FILE *__stdinp; extern FILE *__stdoutp; extern FILE *__stderrp; And then: #define stdin __stdinp #define stdou...

1 answer  ·  posted 5mo ago by 90 98‭  ·  last activity 5mo ago by aghast‭

77%
+5 −0
Can GitHub rewrite authorship of commits?

GitHub has a setting wherein they offer to "anonymize" your user email from, say, somebody@example.com to somebody@users.noreply.github.com. I presume this is to prevent you from getting spam from ...

1 answer  ·  posted 5mo ago by Michael‭  ·  edited 5mo ago by matthewsnyder‭

77%
+5 −0
Best practices for company internal Swagger Docs in production

The current project I am working on consists of a bunch of microservices (Web APIs) accessible only internally using Entra ID (formerly Azure ID). To simplify the development, all services expose ...

1 answer  ·  posted 4mo ago by Alexei‭  ·  edited 3mo ago by Alexei‭

77%
+5 −0
Modern CSS for splitting form sections into columns

I have a mobile-only HTML contact form divided in source code into three sections; each section should contain fields by a different context. <!DOCTYPE html> <html> <head> ...

1 answer  ·  posted 3y ago by deleted user  ·  edited 3y ago by Alexei‭

77%
+5 −0
Is *nix a formal term?

How can one differentiate what is or is not a *nix operating system even if that operating system (or its core/shell/common-utilities) allegedly behaves like any "other" *nix operating system? Is ...

1 answer  ·  posted 3y ago by deleted user  ·  last activity 3y ago by r~~‭

77%
+5 −0
How to break infinite loop in CTE

I have a parent-child relation in my table, with possibly circular cases. Is it possible to break the infinite recursion in CTE checking values of all previous rows? I would need something like thi...

3 answers  ·  posted 3y ago by artaxerxe‭  ·  edited 18d ago by Michael‭

77%
+5 −0
Warn of implicit cast in a function's arguments with GCC?

In the C program below, I make a mistake and call the function with (ld, ld) instead of (d, ld). #include <stdio.h> #include <limits.h> void print_int_long(int n, long l){ pri...

2 answers  ·  posted 3y ago by Quasímodo‭  ·  last activity 3y ago by Lundin‭

77%
+5 −0
How to match standard email addresses with regex?

I want to match standard email syntax (lowercased English, numbers and perhaps also some hyphens and underscores) with regex for a sed operation that matches and changes a single email address insi...

1 answer  ·  posted 3y ago by deleted user  ·  last activity 3y ago by hkotsubo‭

77%
+5 −0
Is it worth using the Java Platform Module System in application code?

Is it worth using the Java Platform Module System introduced in Java 9 to structure application code? Given that the Java Platform Module System introduced in Java 9 doesn't manage dependency vers...

1 answer  ·  posted 3y ago by meriton‭  ·  edited 11mo ago by __blackjack__‭

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

0 answers  ·  posted 3y ago by Estela‭  ·  edited 3y ago by Estela‭

77%
+5 −0
C Language Standard Linking Specifications

What (if anything) does the C standard have to say about linking objects? My guess is that, because C only defines language->behavior rules, it completely ignores any potential intermediate form...

1 answer  ·  posted 2y ago by Josh Hyatt‭  ·  edited 2y ago by Josh Hyatt‭

77%
+5 −0
Kotlin FloatArray from Iterable<Float>

Suppose I am using a Java API from Kotlin and I want to call a function that takes a FloatArray (represented as float[] in Java), and I have an Iterable<Float> as my input data type. To be mo...

1 answer  ·  posted 2y ago by Josh Hyatt‭  ·  edited 2y ago by Alexei‭

77%
+5 −0
How to deeply clone an array in Angular / TypeScript?

I have an array that I need to clone in Angular / Typescript. That is, any change done on an element from the cloned array should not affect the content of the initial array. How can I achieve thi...

2 answers  ·  posted 2y ago by Alexei‭  ·  last activity 2y ago by hkotsubo‭

77%
+5 −0
Handling high frequency requests with cancellations in an ASP.NET Core application

Issue I have recently discussed with a friend a performance issue he and his colleagues have encountered in an ASP.NET Core 5 application (a checkout app, microservices architecture). The problem...

1 answer  ·  posted 2y ago by Alexei‭  ·  last activity 2y ago by Derek Elkins‭

77%
+5 −0
Using nested paths vs. flat ones for API resources

This is based on a code review discussion that I had with a colleague about the way I have designed the resources paths for an ASP.NET Core controller that is currently consumed only internally (by...

1 answer  ·  posted 2y ago by Alexei‭  ·  last activity 2y ago by meriton‭

77%
+5 −0
How to manage CPU capabilities of Jenkins nodes?

We use Jenkins Pipeline to build and test some C++ software. The pipeline script runs the tests on 10 different nodes in a parallel way in order to save time. All of these nodes are real (not virtu...

1 answer  ·  posted 2y ago by anatolyg‭  ·  last activity 2y ago by bta‭

77%
+5 −0
How to dynamically change panel of ItemsControl?

Let's say I have some collection of data. My goal is to provide different kind of view of ItemsControl depending on user`s preference. For simplicity, we can assume that user can select only betwe...

1 answer  ·  posted 2y ago by FoggyFinder‭  ·  edited 2y ago by FoggyFinder‭

77%
+5 −0
bootstrap : how to align text with a button inside a grid

I have this bootstrap code (grid) <div class="container p-3 center"> <div class="row"> <div class="bg-light border-bottom border-secondary border-top col-6 te...

0 answers  ·  posted 2y ago by meneguzzo68‭  ·  edited 2y ago by Alexei‭

77%
+5 −0
Dealing with GETs with long query strings in ASP.NET Core

One of the recent business requirements is to be able to search through a list of entities using a bunch of filters. Most of these filters allow multiple values and the user might theoretically pro...

1 answer  ·  posted 2y ago by Alexei‭  ·  last activity 2y ago by Derek Elkins‭

77%
+5 −0
Common string handling pitfalls in C programming

Preface: This is a self-answered Q&A meant as a C string handling FAQ. It will ask several question at once which isn't ideal, but they are all closely related and I'd rather not fragment the p...

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

77%
+5 −0
How to prevent token from being refreshed

I have an Angular application. The frontend has a mechanism that periodically fetches some information like this: ngOnInit(): void { setInterval( () => { this.http.get(... ).sub...

1 answer  ·  posted 2y ago by klutt‭  ·  last activity 2y ago by meriton‭

77%
+5 −0
Why does calloc accept 2 arguments, and with what arguments should one call it?

According to the standard (C17 draft, 7.22.3.2) The function calloc void *calloc(size_t nmemb, size_t size); "allocates space for an array of nmemb objects, each of whose size is size [and] i...

1 answer  ·  posted 8mo ago by Lover of Structure‭  ·  last activity 8mo ago by Lundin‭

77%
+5 −0
What are the benefits of starting a Git repo with an empty commit?

Found an article about starting a repo with an empty commit. Read the post a couple of times, but still don't understand the reasoning: 1. git log and other commands blow up with terrifying ...

2 answers  ·  posted 6mo ago by toraritte‭  ·  last activity 6mo ago by Michael‭

git
77%
+5 −0
How can I properly type-hint methods in different files that would lead to circular imports?

I am writing a Python package where I have two classes in different files that (indirectly) depend on each other. If I wouldn't care about type-hints, there would be no problem, but unfortunately,...

2 answers  ·  posted 8mo ago by mr Tsjolder‭  ·  edited 8mo ago by Alexei‭

77%
+5 −0
How can I schedule a later task in Python?

I want my CLI Python program to schedule a task, and then exit. After some times has passed (say 10 minutes) the task should execute. The task can be a Python method or a shell command, whatever i...

3 answers  ·  posted 8mo ago by matthewsnyder‭  ·  last activity 8mo ago by H_H‭

77%
+5 −0
How to trigger an error/warning immediately upon compile/run if an item on my class-path is missing

I have a very simple source file -- HelloWorld.java public class HelloWorld { public static void main(String[] args) { System.out.println("hello world"); } } I have th...

0 answers  ·  posted 8mo ago by davidalayachew‭  ·  edited 8mo ago by davidalayachew‭

77%
+5 −0
How to create and manipulate (read/write) Excel (XLSX) documents with complex rules using general programming languages?

Our organization (blindness non-profit in California) is obligated to submit reports to grant organizations (e.g., Department of Rehabilitation) on a regular basis. Most of the time, this means exp...

1 answer  ·  posted 6mo ago by toraritte‭  ·  last activity 5mo ago by toraritte‭

77%
+5 −0
When should I parenthesize macro arguments in C?

I've seen macros use parentheses to enclose its arguments. Most of these make sense, as in #define sum(a, b) ((a) + (b)) The outer prevents the following: #define sum_bad(a, b) (a) + (b) ...

2 answers  ·  posted 5mo ago by alx‭  ·  last activity 5mo ago by Lundin‭