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

2 answers  ·  posted 2d ago by Carl‭  ·  last activity 4h ago by Lundin‭

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

2 answers  ·  posted 14d ago by Michael‭  ·  last activity 11d ago by Michael‭

git
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 17d ago by MarekChr‭  ·  last activity 12d 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 2y ago by Sigma‭  ·  last activity 14d 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 19d ago by Carl‭  ·  last activity 17d 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 4mo ago by AdriZ‭  ·  edited 18d 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 19d ago by Lundin‭  ·  last activity 18d ago by Lundin‭

c c-preprocessor printf
66%
+2 −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...

0 answers  ·  posted 19d ago by DavidCary‭

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

2 answers  ·  posted 2mo ago by deleted user  ·  last activity 19d ago by Karl Knechtel‭

python
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 21d ago by Moshi‭  ·  last activity 21d 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 24d 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 6mo ago by Ooker‭  ·  last activity 24d 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 24d ago by hkotsubo‭  ·  last activity 24d 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 2y ago by kjw‭  ·  last activity 25d ago by jackyflint‭

powershell
75%
+4 −0
LinQ expression not supported in the Where clause

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

1 answer  ·  posted 26d ago by FractionalRadix‭  ·  last activity 26d ago by FractionalRadix‭

linq-to-sql devexpres
54%
+4 −3
Regex for simplifying Amazon product URLs

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

2 answers  ·  posted 2y ago by matthewsnyder‭  ·  last activity 27d ago by hkotsubo‭

regex url
80%
+6 −0
Rails 6.1, trouble with session management, sessions behave weirdly

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

0 answers  ·  posted 1mo ago by plain_toast‭  ·  edited 28d ago by Michael‭

ruby-on-rails
42%
+1 −2
How to scrape all thread links from a XenForo forum board? [closed]

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

0 answers  ·  posted 30d ago by ShadowsRanger‭  ·  closed 30d ago by Karl Knechtel‭

javascript web-scraping
50%
+0 −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 ...

0 answers  ·  posted 1mo ago by fausty‭

javascript node.js
89%
+15 −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‭  ·  edited 1mo ago by wjandrea‭

python syntax list-comprehension
77%
+5 −0
Framework for writing custom linting-rules in python?

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

0 answers  ·  posted 1mo ago by julaine‭  ·  edited 1mo ago by trichoplax‭

python static-code-analysis
80%
+6 −0
Replace leaf arrays with joined strings in a nested structure in jq

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

2 answers  ·  posted 2y ago by ggorlen‭  ·  last activity 1mo ago by pmf‭

json jq
83%
+8 −0
how to disable Python pdb's Quitting pdb will kill the process. Quit anyway [y/n]? prompt

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

1 answer  ·  posted 2mo ago by Trevor‭  ·  last activity 1mo ago by wizzwizz4‭

python debugging
36%
+2 −5
Why margin isn't working in SVG for path?

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

2 answers  ·  posted 4y ago by Anonymous‭  ·  last activity 1mo ago by reinventrmc‭

svg margin
77%
+5 −0
How to provide CA certificates to python-ldap inside a Docker container?

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

0 answers  ·  posted 1mo ago by GeraldS‭  ·  edited 1mo ago by GeraldS‭

python docker tls python-ldap
60%
+4 −2
Uniform floating point from unsigned integer

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

1 answer  ·  posted 2mo ago by deleted user  ·  last activity 2mo ago by Monica Cellio‭

integer floating-point sampling
77%
+5 −0
Set transform of SVG element

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

2 answers  ·  posted 2y ago by Matthias Braun‭  ·  last activity 2mo ago by Robert Longson‭

svg
66%
+2 −0
Do Scala's match types implement full dependent types?

Do Scala's match types support full spectrum dependent types, and if not, what capabilities do they lack?

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

scala dependent-types
25%
+1 −7
How can software track [1] how many subscribers to subreddits, [2] if subreddit is private, [3] if submissions are restricted? [closed]

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

1 answer  ·  posted 5y ago by TextKit‭  ·  last activity 2mo ago by Karl Knechtel‭

reddit
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 2mo ago by skye‭  ·  last activity 2mo ago by Derek Elkins‭

java
80%
+6 −0
How does character/glyph replacements in fonts like "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/t...

1 answer  ·  posted 5y ago by msh210‭  ·  last activity 2mo ago by Alexei‭

google-fonts fonts
66%
+4 −1
How to get string length in D?

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

3 answers  ·  posted 4y ago by General Sebast1an‭  ·  last activity 2mo ago by hkotsubo‭

string function d
75%
+4 −0
Generating a better looking family tree-style graph in Python

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

1 answer  ·  posted 3mo ago by pycoder‭  ·  last activity 2mo ago by bowl0stu‭

python charts python-3 graphviz mermaid
77%
+5 −0
cmake looking for files from a previous SDK

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

2 answers  ·  posted 6mo ago by samcarter‭  ·  last activity 2mo ago by samcarter‭

macos
57%
+2 −1
Why won't Django render its select widget with this code? [closed]

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

0 answers  ·  posted 2mo ago by redlinecodes‭  ·  closed 2mo ago by Karl Knechtel‭

python django django-widget
71%
+3 −0
Conditions which always matches returns no result with CTE

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

2 answers  ·  posted 4y ago by artaxerxe‭  ·  last activity 2mo ago by marcothesane‭

mysql common-table-expression
77%
+5 −0
how to run Vim's :set command using vim --remote-expr

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

1 answer  ·  posted 2mo ago by Trevor‭  ·  last activity 2mo ago by Derek Elkins‭

vim
66%
+2 −0
Macro to verify that an expression has no side effects at compile time

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

1 answer  ·  posted 3mo ago by alx‭  ·  last activity 2mo ago by Lundin‭

c gcc c-preprocessor
66%
+2 −0
Python-compatible regex for Markdown tables

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

2 answers  ·  posted 3mo ago by pycoder‭  ·  last activity 2mo ago by hkotsubo‭

python regex markdown python-3
88%
+14 −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 1y ago by SystemExplorer‭  ·  last activity 3mo ago by Michael‭

git
75%
+4 −0
Standard for hierarchical sitemaps

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

0 answers  ·  posted 3mo ago by Matthew‭

sitemap
71%
+3 −0
Link to Markdown line on Bitbucket

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

1 answer  ·  posted 3mo ago by Michael‭  ·  last activity 3mo ago by John C‭

bitbucket
71%
+3 −0
Python http.server how can I programatically refresh the browser page?

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

2 answers  ·  posted 3mo ago by pycoder‭  ·  last activity 3mo ago by jimbobmcgee‭

python python-3 pyqt6 pyqt
75%
+4 −0
Why Does My Azure OpenAI Deployment Occasionally Return a '429 Too Many Requests' Error Even When I Am Under the Documented Rate Limits, How to solve?

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

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

azure
77%
+5 −0
How to capture packets bound from/to solely one application?

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

1 answer  ·  posted 4mo ago by Mr. Beedell, Roke Julian Lockhart (RJLB)‭  ·  last activity 4mo ago by Mo_‭

linux port
80%
+6 −0
Project's name from command line

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

4 answers  ·  posted 5mo ago by deleted user  ·  last activity 4mo ago by Riven Skaye‭

python
80%
+6 −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?

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

javascript operators
60%
+1 −0
Setting icon with javaFX does not show in task list

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

0 answers  ·  posted 4mo ago by watchmaker‭

java linux javafx
66%
+2 −0
Creating PDF from HTML on Debian Bookworm; tools?

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

2 answers  ·  posted 4mo ago by plain_toast‭  ·  last activity 4mo ago by Alexei‭

*nix
60%
+1 −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...

0 answers  ·  posted 4mo ago by watchmaker‭  ·  edited 4mo ago by Lundin‭

Eclipse