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)
I've started rewriting some of my old C-code projects such that they comply with the MISRA C standards. I've noticed that literally all of them break rule 10.3 from the C:2012 guideline document: ...
I just realized that I started writing code for what was going to become a second independent feature on the branch I was already working on. --A--B--C main \ `Q--R--S--X--Y-...
I am trying to solve a problem with Vaadin 24.9.10 Spring Boot 3.5.11 application deployed as war file for tomcat 10 on my server. There are a lot of error log messages with varying request paths ...
Context: I have a varchar column in a segment event table that contains version numbers. Most of these are formatted nicely as X.Y.Z (major.minor.patch) where X, Y, and Z are integers. However, the...
I'm working on writing drivers for the peripherals in my ATmega2560 microcontroller. One of these is a USART which has the option of being double speed or normal speed. If this was C for the PC I w...
I'm used to programming in C and C++, mainly for embedded and sometimes for computer apps. I would like to explore a new and more modern language. Rust, V lang and Zig seem to be good candidates. ...
I am trying to print "hello, world" on screen in in C using this code: #include <stdio.h> int main() { printf("hello, world\n"); return 0; } I typed this down in a text file na...
I'm debugging some "clever" macros (similar to, but not exactly the same as, X macros https://software.codidact.com/posts/293492 ). Is there a way to get a compiler or a preprocessor (such as gc...
I’m working on a Python project that’s starting to grow, and the code is becoming harder to manage as different responsibilities are mixed together. Are there any recommended ways to organize modul...
I'm currently learning dotnet MAUI, particularly using Shell navigation, and am wondering what the best way to go about it is when using query parameters. For example, take this from the documentat...
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...
I had a PR that was accepted. Now I make another one, but it also push my past commits. I have created a new branch but it doesn't solve the problem. Why does this happen and how to prevent this?
Often I hear people saying that some language is either compiled or interpreted. Examples: "Java is compiled" or "JavaScript is interpreted" and so on. What are the criteria to define languages as...
What is the best way to convert Dos paths to Posix paths in Powershell? eg given: C:\Program Files\PowerShell\Modules\ I want something like: /Program\ Files/PowerShell/Modules/ Is the only so...
My code accesses a SQL Server database using DevExpress XPO. It contains the following query: var relevantAccount = accounts .Where(acc => String.Compare(acc.Description, "Some Account Nam...
Amazon product URLs are often very long, but on experimentation it is revealed that the following pattern is sufficient: https://www.amazon.com/{dp|gp}/$ID ID is a 10-char string, which I'm gue...
I am at a complete dead end with Rails sessions. I have an old Rails project. It started with Rails 3 or 4, and it is now running on Rails 6.1.7.10, the code has been updated carefully. I use sess...
I'm trying to extract all thread links from a specific board on a XenForo forum (similar to this one: Creative Writing, specifically this one: NSFW Creative Writing), but a simple script I tried st...
I've gained responsibility for some services at work that run on Node.js. I am wondering if anyone could recommend a book on Node. The website documentation is pretty good but I like the structure ...
The following list comprehension worked when I tried it: [num for num in hand if num != 11] But this doesn't work: [num for num in hand if num != 11 else 22] It gives a SyntaxError, highlig...
I hope this somewhat open-ended question is allowed, I have used SO a lot and I would not post it there, but I have seen open-ended questions on this site I have a situation where custom linting-...
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...
I'm running Python 3.14 in Linux. I have script with a breakpoint() in it, so when I run $ python my_script.py, it will take me into the (Pdb) prompt. Then, if I want to exit, I type q or do CTRL+D...
<?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> <svg version="1.1" id="Capa_1" x="0px...
I'm trying to set up automated unit tests in Gitlab CI and I encountered the problem that connections to LDAPS, which work fine both in development and production, fail inside the Docker container ...
How can I turn uniform samples of unsigned n-bit (n=16/32/64) integers (over the whole range of integers) into uniform samples of n-bit IEEE floats in [0, 1]? By uniform, I mean the continuous unif...
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...
Do Scala's match types support full spectrum dependent types, and if not, what capabilities do they lack?
Master lists like 82 food subreddits and 128 tech subreddits don't indicate each's subscribers. if it's private. Sometimes moderators can make the sub private for several days, to clean i...
Has anyone written a constant-time BigInteger modular multiplication function in Java? I need to use modular multiplication for a cryptographic protocol, and I don't want to try to write it myself ...
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/t...
I'm new to D and am planning to use it for golfing. I want to make a ROT13 converter and I want to determine the length of an inputted string. Is there a function for this? If not, what ways can I...
My goal I'm looking for a way to programatically generate a visual representation of interlinked sections in a text file (preferably in svg format), with particular aesthetic considerations. The ...
I'm trying to compile the program texstudio with git clone [email protected]:texstudio-org/texstudio.git cd texstudio mkdir build cd build cmake .. cmake --build . Since the update to xcode 2...
I am trying to use Django's default select widget to render an HTML dropdown. I have this code: in models.py: class VehicleYear(TimeStampedModel): oem_year = models.IntegerField( un...
I have the following scenario (in MySQL 8): CREATE TABLE `steps` ( `id` int NOT NULL AUTO_INCREMENT, `number` varchar(30) DEFAULT NULL, `parent_number` varchar(30) DEFAULT NULL, `timestamp` ti...
In Vim command-line mode, I can run :set invnumber to toggle line numbers on/off. Is there a way to run this command using the $ vim --remote-expr {expr} shell command? I know I can do this using $...
I'd like to implement a macro strnul(): #define strnul(s) (s + strlen(s)) But that expands and evaluates s twice. I'd like to avoid that. I could do (using GNU extensions) #define strnul(s)...
My goal is to programatically convert Markdown tables to their HTML equivalents using regular expressions. I haven't been able to find any Python-compatible regexes for Markdown tables online, so I...
Suppose you have a largish git repository with many files of different types (both text and images) distributed among a number of nested directories. Parallel development has occurred on two branc...
Are there any standards for creating machine readable sitemaps with a hierarchical structure similar to the outline on the left sidebar on sites like https://just-the-docs.com/? The Sitemaps XML f...
Is there a way to link to specific code lines for a Markdown file[1] in Bitbucket? I have found a UI toggle for each of GitHub, GitLab, and Forgejo that adds a query string to disable the pretty ou...
I'm currently using a static site generator (SSG) to convert a large collection of Markdown notes to a personal HTML/CSS wiki, but I decided to replace it with a Python script so I can fully custom...
I am using the Python SDK to access Azure OpenAI (GPT-4o / GPT-4o-mini). My usage logs show that I'm well below the Tokens-per-Minute and Requests-per-Minute limits for my instance. Even so, I so...
My Rationale I want to diagnose github.com/AchetaGames/Epic-Asset-Manager/issues/318#issuecomment-3641224648 — a failure to access a (likely non-existent) API endpoint. [1] On AOSP, I would invok...
I have a pyproject.toml [build-system] requires = ["setuptools>=61.0"] build-backend = "setuptools.build_meta" [project] name = "foo" version = "0.1.0" How do I get the project name f...
While learning JavaScript, I started to see =, == and === operators. What's the difference between them?
I try to set an icon (*.png) with javaFX, but it does not show in the task bar, instead I see the default icon (white cogwheel on light gray background). Here is my code: package application; ...
I am on a Debian Bookworm Docker image. My Rails6 project needs to convert HTML files to PDF. I used to do this with wkhtmltopdf, but wkhtmltopdf has not been supported for a long time now, and I w...
In eclipse (java) Window->Preferences->Java->New new templates can be created. In the field "Pattern" I entered System.out.println("DEBUG ${label}"); ${cursor} I like old-style debug...
