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 heard strncpy(3) is bad, and also heard that C23 added memccpy(3) to replace it. However, I also heard memccpy(3) is even more terrible than strncpy(3). Are these functions really bad? How so?...
I'm using SimpleDateFormat to parse a string containing a date/time, but the result has a different date, hour, minute, second and millisecond: SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM...
I have an 8-bit microcontroller with 100 pins. Each pin belongs to a port with a unique address and each pin has a number from 0 to 7. I want to create a scheme where in the code each pin is a stru...
When reading questions about C programming from beginners, I very often see them describing peculiar run-time errors and crashes, segmentation faults and similar. They have spent a lot of time chas...
The solution to this is probably easy, but I haven't been able to find it. Using SymPy, I am trying to solve this equation: $$ {x_1}^2 + {x_2}^2 + {x_3}^2 + 3 = a $$ with this constraint: $$ ...
This was inspired by the SO question Can you ever assume typecasting pointers is safe? I started to write an answer there, but I realized I'd rather post it here instead, so here's a self-answered ...
I'm building an automated content pipeline that publishes daily video briefings from a headless Arch Linux server. The pipeline already works for other platforms (Bluesky, Mastodon, PieFed, Telegra...
I'm creating a Chrome Dino-style game inside a PDF using JavaScript form fields . The ground is implemented using two adjacent button widgets that should continuously scroll left to create an infin...
My organisation uses Moodle as their online e-learning system on which teachers share resources, and oftentimes numerous documents that we need to view/download are posted there. The default way of...
I'm automating posts to PieFed and I can't get tags/labels to actually show up on the created post. What I'm doing I'm POSTing to create a post with a body that includes hash-style tags, somethin...
Currently I am using One Click Page to PDF to get the job done, although the lack of working open-source tools fit for this task has led me to creating my own; the web page "that won't print" is th...
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...
en.wikipedia.org/w/index.php?title=List_of_URI_schemes states that: Many URI schemes are registered with the IANA; however, there exist many unofficial URI schemes as well. Everyone knows how...
When searching the Internet, I came across this SO post Rounding in C Preprocessor but immediately noted that none of the answers are showing a way to perform actual rounding - rather, they are doi...
There are SaaS providers for building and hosting websites made with WYSIWYG and LLM-prompt website builders, such as WordPress.com, Webflow, etc. I guess these services should be secure-by-default...
I occasionally hear the split between framework and metaframework, and then the split between client-side framework and server-side framework. Are they just the same? Sources use "metaframework": ...
I have multiple installations of Python on my machine. When I run Python, what determines which installation is used? How can I control this?
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...
As a loose follow-up to Why force designation of a remote main branch?, is there a Git-native way to configure a branch for GitHub's so-called "triangular" workflow? The triangular workflow is mea...
In the current version of OpenJDK's JEP 401: Value Classes and Objects (Preview), it is said that value classes can leak data stored in their fields, and that this is potentially a security concern...
How to verify if a year is leap? Given a numeric value (such as 2023) or some object that represents a date (such as Date, Calendar, LocalDate, etc), how can I do it?
I have an old Ruby on Rails project currently running on Rails 6.1. It isn't very large. I have got the old asset pipeline, 2.7 MB of Javascript in a node_modules folder and 3.7 MB of files in the ...
What is wrong in the following code: package oren; import java.util.Scanner; import javax.swing.JOptionPane; public class Main { public static void main(String[] args) { double x,y,z...
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 ...
I'm using Azure Synapse Serverless SQL to create views over Parquet files in a data lake. I have encountered an issue where views return invalid results if the source table schema changes. For exa...
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...
While learning JavaScript, I started to see =, == and === operators. What's the difference between them?
Inspired by the screenshots in this otherwise unrelated article https://itsfoss.com/tennis-csv-tool/ I'd like to highlight some lines in the terminal output of one of my zsh shell scripts. Here a ...
I provide documents that must be accessible to the dyslexic and [my/hyper]opic. With CSS3, I am able to specify system-ui, where required. However, all browser stylesheets default to that, regardl...
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...
I'm new to python. I just want to print the data in postgresql database into a dictionary. The database consist of 3 column (name, department, overall_percentage) and I have 3 tables of class A, B...
My impression is that the regexps behave a little bit odd: >>> import re >>> r=re.compile("test") >>> r.match("test") <re.Match object; span=(0, 4), match='test'&g...
My sources say, after major data changes, particularly if the self-generated row Id (my own getRowId) change, I need to rebuild the grid (gridOptions.rowData), and then use gridOptions.api.setRowDa...
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'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: ...
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 ...
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-...
Not sure if this is the right place to ask, but I am trying to understand the reported theoretical performance of tensor cores on NVIDIA GPUs. Taking the H100 SXM5 as example, the reported peak pe...
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...
For a beginner How study C Lang. What is the most Required field that require learning c and fast for making money i glad to here from you , Experts ^_^
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 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...
