Image

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
Are memccpy(3) or strncpy(3) bad for copying and catenating strings with truncation?

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

2 answers  ·  posted 12d ago by alx‭  ·  last activity 6h ago by alx‭

c string.h
80%
+6 −0
How to parse a date with more than 3 decimal digits in the fractions of second?

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

1 answer  ·  posted 5y ago by hkotsubo‭  ·  last activity 1d ago by henrylog‭

java date simpledateformat date-parsing
66%
+2 −0
Extern keyword in C and proper way to use extern variables in embedded systems

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

1 answer  ·  posted 5d ago by Carl‭  ·  last activity 2d ago by alx‭

c embedded extern
90%
+17 −0
What compiler options are recommended for beginners learning C?

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

1 answer  ·  posted 5y ago by Lundin‭  ·  last activity 5d ago by Carl‭

c compiler compiler-errors compiler-warnings compiler-options
71%
+3 −0
How to apply a unit constraint in SymPy

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

3 answers  ·  posted 14d ago by Trevor‭  ·  last activity 10d ago by wjandrea‭

sympy
84%
+9 −0
Can you ever assume that casting pointers is safe?

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

1 answer  ·  posted 14d ago by Lundin‭  ·  last activity 14d ago by Lundin‭

c pointers implicit-conversion conversions
66%
+2 −0
How to link an existing Odysee web wallet to the local lbrynet daemon for automated video publishing?

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

0 answers  ·  posted 15d ago by ShadowsRanger‭

automation odysee lbry api cli
28%
+0 −3
Why is the ground of my Dino game(in PDF) not moving and instead shrinking ?

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

0 answers  ·  posted 24d ago by Ted‭  ·  edited 24d ago by Karl Knechtel‭

javascript pdf
60%
+1 −0
Download a PDF file in Playwright instead of opening it in a new tab when clicking on its link

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

2 answers  ·  posted 26d ago by Elefy‭  ·  last activity 25d ago by Elefy‭

javascript web-scraping automation playwright pdf
66%
+2 −0
How do I add tags to a PieFed post via the API?

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

0 answers  ·  posted 1mo ago by ShadowsRanger‭

automation lemmy piefed webapi tags
60%
+1 −0
Playwright script to generate PDF of a page that requires scrolling (Khan Academy)

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

1 answer  ·  posted 1mo ago by Elefy‭  ·  last activity 1mo ago by ggorlen‭

javascript web-scraping automation playwright html-to-pdf
66%
+2 −0
eclipse templates -- creating and setting a permanent variable

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

1 answer  ·  posted 8mo ago by watchmaker‭  ·  last activity 1mo ago by skye‭

Eclipse
66%
+2 −0
How do authors of custom URI schemas prevent conflict with those registered with IANA in the future?

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

1 answer  ·  posted 2mo ago by Mr. Beedell, Roke Julian Lockhart (RJLB)‭  ·  edited 2mo ago by Karl Knechtel‭

standard uri
83%
+8 −0
Compile-time rounding with the pre-processor

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

3 answers  ·  posted 2mo ago by Lundin‭  ·  last activity 2mo ago by John C‭

c rounding floating-point c-preprocessor
75%
+4 −0
How do websites built by website builders defend security threats or follow secure coding?

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

1 answer  ·  posted 2mo ago by Ooker‭  ·  last activity 2mo ago by John C‭

security hosting website-builder website
50%
+1 −1
Are metaframework and server-side framework the same?

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

0 answers  ·  posted 2mo ago by Ooker‭

javascript metaframework server-side-framework
77%
+5 −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 2y ago by Karl Knechtel‭  ·  last activity 2mo ago by wjandrea‭

python installation runtime-environment
71%
+3 −0
Integrating a standalone database 'engine' into an OLAP database

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

0 answers  ·  posted 2y ago by erjcan‭  ·  last activity 2mo ago by Alexei‭

database olap
77%
+5 −0
Configure Git branch to push to different remote than it pulls from

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

1 answer  ·  posted 2mo ago by Michael‭  ·  last activity 2mo ago by r~~‭

git
81%
+7 −0
Why does a lack of object encapsulation constitute a security breach?

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

2 answers  ·  posted 2y ago by Andreas‭  ·  last activity 2mo ago by roberto almdnde‭

java security encapsulation
81%
+7 −0
How to verify if a year is leap in Java?

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?

1 answer  ·  posted 3y ago by hkotsubo‭  ·  last activity 2mo ago by roberto almdnde‭

java date
75%
+4 −0
Rails 6.1, unbelievable assets-precompile time for a smallish project

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

1 answer  ·  posted 2mo ago by plain_toast‭  ·  last activity 2mo ago by plain_toast‭

ruby-on-rails
50%
+1 −1
JOptionPane doesn't show; application combines Swing and console.

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

1 answer  ·  posted 2mo ago by programAngel‭  ·  edited 2mo ago by FractionalRadix‭

java swing Eclipse
60%
+1 −0
Recommended Books on Node.js

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

2 answers  ·  posted 5mo ago by fausty‭  ·  last activity 3mo ago by tsvt‭

javascript node.js
66%
+2 −0
Prevent Azure Synapse Serverless views from returning invalid data after source file schema change

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

1 answer  ·  posted 3mo ago by daviewales‭  ·  last activity 3mo ago by daviewales‭

azure-synapse
66%
+2 −0
How should I structure a growing Python project?

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

3 answers  ·  posted 6mo ago by deleted user  ·  last activity 3mo ago by deleted user

python
83%
+8 −0
What's the difference between =, == and === operators in JavaScript?

While learning JavaScript, I started to see =, == and === operators. What's the difference between them?

4 answers  ·  posted 5y ago by Kevin M. Mansour‭  ·  last activity 3mo ago by deleted user

javascript operators
71%
+3 −0
Unset background colour in shell script

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

1 answer  ·  posted 3mo ago by samcarter‭  ·  last activity 3mo ago by Alexei‭

shell zsh
60%
+1 −0
How can I create a Typst document that adheres to the OS font?

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

0 answers  ·  posted 3mo ago by Mr. Beedell, Roke Julian Lockhart (RJLB)‭  ·  edited 3mo ago by Mr. Beedell, Roke Julian Lockhart (RJLB)‭

markup
89%
+15 −0
What is the general process for merging two git branches, reviewing edits on each branch?

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

3 answers  ·  posted 2y ago by SystemExplorer‭  ·  last activity 3mo ago by Karl Knechtel‭

git
44%
+2 −3
i just want to print the data in postgresql database into a dictionary. [closed]

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

0 answers  ·  posted 3mo ago by prem‭  ·  closed 3mo ago by Karl Knechtel‭

python postgresql dictionary
77%
+5 −0
Why does my regex "match" at the beginning of the string, but not at the end?

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

2 answers  ·  posted 1y ago by peterh‭  ·  last activity 3mo ago by Karl Knechtel‭

regex python-3
40%
+0 −1
I need a full grid refresh, but setRowData is not a function [closed]

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

1 answer  ·  posted 3mo ago by peterh‭  ·  closed 3mo ago by Karl Knechtel‭

ag-grid
90%
+17 −0
Why are list comprehensions written differently if you use else?

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

2 answers  ·  posted 4y ago by true_blue‭  ·  last activity 3mo ago by roberto almdnde‭

python syntax list-comprehension
81%
+7 −0
Making code MISRA C compliant makes code less readable.

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

1 answer  ·  posted 4mo ago by Carl‭  ·  last activity 3mo ago by wizzwizz4‭

c misra-c
57%
+2 −1
Constant-time modular multiplication library in Java?

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

1 answer  ·  posted 6mo ago by skye‭  ·  last activity 3mo ago by Alexei‭

java
85%
+10 −0
How do I split a feature branch into two?

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

3 answers  ·  posted 4mo ago by Michael‭  ·  last activity 3mo ago by Karl Knechtel‭

git
71%
+3 −0
How to compute the peak performance of GPU tensor cores?

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

1 answer  ·  posted 9mo ago by mr Tsjolder‭  ·  last activity 4mo ago by mr Tsjolder‭

computer-science gpu cuda hardware
75%
+4 −0
How to partially pre-process a file, without expanding #include or #embed ?

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

1 answer  ·  posted 4mo ago by DavidCary‭  ·  last activity 4mo ago by LolPopGames‭

c c-preprocessor
16%
+0 −8
Asking advice from Experts [closed]

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 ^_^

0 answers  ·  posted 4mo ago by Zee‭  ·  closed 4mo ago by Karl Knechtel‭

c
75%
+4 −0
How to disable ErrorPageFilter in Vaadin Spring boot application when deployed as war?

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

1 answer  ·  posted 4mo ago by MarekChr‭  ·  last activity 4mo ago by MarekChr‭

java spring-boot vaadin
75%
+4 −0
Redshift int casting from varchar - how to force early evaluation order?

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

1 answer  ·  posted 3y ago by Sigma‭  ·  last activity 4mo ago by Laurenz Albe‭

sql compiler-errors redshift
83%
+8 −0
Alternative to boolean type for embedded C (ATmega2560)

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

2 answers  ·  posted 4mo ago by Carl‭  ·  last activity 4mo ago by Olin Lathrop‭

c boolean stdbool.h
44%
+2 −3
Alternative embedded language: Rust, V, Zig [closed]

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

0 answers  ·  posted 8mo ago by AdriZ‭  ·  edited 4mo ago by Lundin‭

rust compiled-language zig vlang
81%
+7 −0
Detailed explanation of "hello, world" in C?

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

2 answers  ·  posted 4mo ago by Lundin‭  ·  last activity 4mo ago by Lundin‭

c c-preprocessor printf
75%
+4 −0
Improving robustness when using MAUI Shell navigation

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

1 answer  ·  posted 4mo ago by Moshi‭  ·  last activity 4mo ago by JakenVeina‭

c# .net .net-maui .net-maui-shell
40%
+2 −4
How to write a bash function to sanitize filenames for Linux and Windows

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

1 answer  ·  posted 2y ago by ShadowsRanger‭  ·  last activity 5mo ago by ArtOfCode‭

bash
76%
+8 −1
How to avoid pushing past commits when making a pull request?

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?

1 answer  ·  posted 9mo ago by Ooker‭  ·  last activity 5mo ago by ArtOfCode‭

git github pull-request
80%
+6 −0
What are the criteria to define if a programming language is compiled or interpreted?

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

2 answers  ·  posted 5mo ago by hkotsubo‭  ·  last activity 5mo ago by programAngel‭

terminology interpreted-language compiled-language
75%
+4 −0
How to convert Dos paths to Posix paths in Powershell

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

2 answers  ·  posted 3y ago by kjw‭  ·  last activity 5mo ago by jackyflint‭

powershell