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)
71%
+3 −0
How to disable jobs in GitLab CI after they are successfully executed

I'm working with GitLab CI. The pipelines I'm designing contain several jobs that, once executed successfully, there shouldn't be any reason to retry/rerun them. This is an example: default: # ...

1 answer  ·  posted 6d ago by ɯıpɐʌ‭  ·  edited 2h ago by ɯıpɐʌ‭

60%
+1 −0
Why is a for loop getting stuck when using a uint64_t counter, whereas a while loop isn't?

I asked this question a while ago over SE. When I use a for loop with a uint64_t as a counter, it gets stuck forever, even though the condition seems to be well defined. Offending MCVE #includ...

3 answers  ·  posted 4d ago by aura-lsprog-86‭  ·  last activity 1d ago by Lundin‭

66%
+2 −0
Iterating over pixels in QImage (Qt): which method adapts better for any image size?

I asked this in SE years ago. I'm aware of two methods in order to access all the pixels in a QImage called img. Method 1 for (int y = 0; y < img.height(); y++) { QRgb *line = (QRgb *)...

0 answers  ·  posted 1d ago by aura-lsprog-86‭  ·  edited 1d ago by aura-lsprog-86‭

50%
+0 −0
How to correctly model the delay timer for a CHIP8 emulator written in C?

I asked this question in SE a while back. TL;DR I need to emulate a timer in C that allows concurrent writes and reads, whilst preserving constant decrements at 60 Hz (not exactly, but approxima...

1 answer  ·  posted 1d ago by aura-lsprog-86‭  ·  last activity 1d ago by aura-lsprog-86‭

80%
+6 −0
Are email addresses case-sensitive?

Does the case of an email address make a difference? I.e. would sending emails to these addresses all lead to the same inbox? account@example.org, ACCOUNT@EXAMPLE.ORG, ACCOUNT@example.org, Account...

1 answer  ·  posted 3d ago by Iizuki‭  ·  last activity 3d ago by Olin Lathrop‭

66%
+2 −0
Line-drawing algorithm prints nonsensical intermediate Y values. Where is the problem?

This question was originally asked in SE. I have a program that draws lines using line drawing algorithms. I use gcc 5.2.1 on Xubuntu 15.10 to compile it. Executing it throws a "Segment violati...

1 answer  ·  posted 4d ago by aura-lsprog-86‭  ·  last activity 4d ago by aura-lsprog-86‭

71%
+3 −0
Get global gitconfig path

Is there a command I can run to get the path of global gitconfig for a user? Like git config --global --edit, but I want the path, not an editor window. I want the right path whether or not this f...

2 answers  ·  posted 7d ago by Michael‭  ·  last activity 4d ago by InfiniteDissent‭

git
60%
+1 −0
Scanner fails when executing Java with admin rights (sudo) in Eclipse in Linux

(Brought over from SE.) The problem I have followed this procedure in order to run Java applications as root when needed from Eclipse (as I use Xubuntu, for instance, when using jnetpcap to cap...

1 answer  ·  posted 5d ago by aura-lsprog-86‭  ·  edited 5d ago by aura-lsprog-86‭

60%
+1 −0
Android CameraPreview not rendering for MLKit barcode analyis on MAUI custom control

I have a QR code which needs to read through Google's ML kit for Android since Zxing.MAUI doesnt read it. I followed the code in ml-kit/vision/barcode-scanning/android and VinayByte/mlkit-qr-code-s...

1 answer  ·  posted 6d ago by carpeltunnel‭  ·  last activity 5d ago by carpeltunnel‭

60%
+1 −0
How can I set a private class instance variable to the File object used by an unmarshaller?

(Brought over from SE) The problem I'm coding a Java Swing application dealing with XML files, so I'm using JAXB in order to marshal classes into documents and unmarshal the other way around. ...

1 answer  ·  posted 6d ago by aura-lsprog-86‭  ·  last activity 6d ago by aura-lsprog-86‭

60%
+1 −0
Keep failed CronJob Pods around in Kubernetes

It seems like pods created by a Kubernetes CronJob (or rather Job) are deleted as soon as they fail. This makes it difficult to figure out what went wrong (unless you have Prometheus or some other ...

1 answer  ·  posted 20d ago by Iizuki‭  ·  edited 14d ago by Alexei‭

60%
+1 −0
How to do function composition in Spring Cloud Stream when using classes

I'm working on a proof of concept for a Spring Cloud Stream application. I want to define my processing logic using classes that implement Function, Consumer, or Supplier. I understand that Spring...

0 answers  ·  posted 2mo ago by ɯıpɐʌ‭  ·  last activity 14d ago by Monica Cellio‭

66%
+2 −0
How to Proxy 3x-UI Panel to a Specific Path on Nginx Web Server with Asset Path Rewriting?

I have two vps: First one is used for vpn/proxy. It runs 3x-ui that, simply saying, allows to create and manage vpn/proxy with UI. VPS' ip is connected to https://new-york.vpn.utils.example.co...

0 answers  ·  posted 19d ago by Botopodobniy‭

30%
+1 −5
How this recursive treewalker works?

Credit for User:Meriton for developing the following code (first published here). function replaceIn(e) { if (e.nodeType == Node.TEXT_NODE) { e.nodeValue = e.nodeValue.replaceAll("a", "");...

3 answers  ·  posted 3y ago by deleted user  ·  last activity 19d ago by hkotsubo‭

75%
+7 −1
how do I get markdown to render # as a shell prompt and not a comment?

Note: This is a general question about Markdown formatting for any Markdown renderer (e.g., Gitlab, Github, Codidact). So this is not just a question about Codidact's renderer. When displaying she...

2 answers  ·  posted 3mo ago by Trevor‭  ·  last activity 22d ago by bignose‭

66%
+2 −0
Dynamically do something after a useState variable has been set?

Since setState is asynchronously executed, how to dynamically do something after a useState variable has been set? Consider import { useState } from "react"; const [myVar, setMyVar] = useState("...

2 answers  ·  posted 1mo ago by propatience‭  ·  last activity 22d ago by bignose‭

66%
+2 −0
Labels and annotations not merging for specific resources in overlays

I'm trying to implement bases and overlays for some Kubernetes configurations that I have, but I'm running into an issue where labels and annotations are not being applied correctly to some specifi...

0 answers  ·  posted 22d ago by ɯıpɐʌ‭

83%
+8 −0
After git fetch, how to fast forward my branch?

I did git fetch to quickly get latest commits. I did this instead of git pull so I could deal with merge conflicts offline. But my repository is still stuck on the old commit, and now git pull fail...

2 answers  ·  posted 7mo ago by matthewsnyder‭  ·  last activity 22d ago by hkotsubo‭

git
77%
+5 −0
Why utilize an FQDN in the stead of a domain (and/or TLD), relative to the root domain?

Until recently, I'd yet to come across a situation in which I'd had any reason to qualify a DNS namespace further than its TLD. Then, I authored softwareengineering.stackexchange.com/revisions/456...

0 answers  ·  posted 25d ago by RokeJulianLockhart ‭

dns
71%
+3 −0
How to disable debug windows automatically opening up when I hit a breakpoint in vscode?

In vscode, when I hit a breakpoint it automatically opens "Run and Debug" window. I don't want that because I am using a small screen (and that sidebar takes up space) and I don't always need to us...

1 answer  ·  posted 27d ago by Vanity Slug ❤️‭  ·  last activity 27d ago by Vanity Slug ❤️‭

80%
+6 −0
2D-array pointer as a struct member

I have an array of struct: static struct basket baskets[MAX_ITEMLEN + 1]; struct basket { char *items; // malloc(itemlen * itemcount) int itemcount; }; char *items does all I nee...

2 answers  ·  posted 1mo ago by wasIzy‭  ·  last activity 1mo ago by Alexei‭

66%
+2 −0
Helm delete old release revisions

Helm keeps track of releases and their revisions by creating a kubernetes Secret each time a chart is installed, upgraded etc. These are of course useful in case you want to rollback, but they do p...

1 answer  ·  posted 1mo ago by Iizuki‭  ·  edited 1mo ago by Iizuki‭

77%
+5 −0
How does the strict aliasing rule enable or prevent compiler optimizations?

Inspired by https://meta.stackoverflow.com/questions/432242, and the relevant main-space questions. I have heard that C and C++ something called the "strict aliasing rule", which means for exa...

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

66%
+2 −0
List charts in a helm repository

How to list all available helm charts in a helm repository, preferrably using the native helm CLI tool? This command lists the repos themselves, but I've yet to discover how to list their contents...

1 answer  ·  posted 1mo ago by Iizuki‭  ·  last activity 1mo ago by Iizuki‭

66%
+2 −0
How do I get a hexadecimal string representation of a GdkRGBA struct in C?

I have a program that reads a hexadecimal string representation from a configuration file, turns it into a GdkRGBA struct from Gdk, uses gtk_color_dialog_button_set_rgba () to set it as the default...

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

c
71%
+3 −0
Why is spacy word vectors showing unexpected similar words?

Why is spacy word vectors showing unexpected similar words? Here is the code I am using: import spacy import numpy as np nlp=spacy.load('en_core_web_md') with open ('data/us.txt') as f: ...

0 answers  ·  posted 2mo ago by Asia‭  ·  edited 2mo ago by celtschk‭

66%
+2 −0
Unable to configure enhanced route discovery in Apache Camel

I'm currently working with Apache Camel in a Quarkus application. I would like to configure the application to not discover any routes by default, and only include those defined in specific package...

0 answers  ·  posted 2mo ago by ɯıpɐʌ‭  ·  edited 2mo ago by Alexei‭

70%
+5 −1
Is it a bad idea to block proxies/vpns for interacting with my app?

I run a small website and Im considering blocking proxies and vpns with ipquery to cut back on spam. I keep having bots autofill the contact us even though im using recaptcha. Does anyone have any ...

2 answers  ·  posted 2mo ago by jefforce‭  ·  last activity 2mo ago by matthewsnyder‭

77%
+5 −0
How to keep git blame ignored commits up to date?

When I make a separate commit for code cleanup / style changes, I can suppress that commit from git blame so that I can follow a file's history easily without getting distracted by pure style chang...

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

git
60%
+1 −0
Tackling net::ERR_NAME_NOT_RESOLVED and timeout error on browser object creation when using Puppeteer

Used to work with PhantomJS. Want to upgrade to Puppeteer. Started with some code: "use strict"; const puppeteer = require("puppeteer"); const capture = async () => { let browser; try {...

1 answer  ·  posted 3y ago by sbirl‭  ·  last activity 2mo ago by Alexei‭

72%
+6 −1
Why is atoi dangerous and what should be used instead?

According to Which functions in the C standard library must always be avoided?, the atoi family of functions is dangerous and should never be used for any purpose. The rationale given in the answer...

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

77%
+5 −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 6mo ago by Andreas demands justice for humanity‭  ·  last activity 2mo ago by LAFK‭

60%
+1 −0
how to save the line number of a double-clicked line in tmux

In tmux I have the following command in my .tmux.conf, which will save a double-clicked line to the file /tmp/tmux_line.txt: bind-key -n DoubleClick1Pane select-pane \; copy-mode -M \; send-keys -...

0 answers  ·  posted 2mo ago by Trevor‭

75%
+4 −0
Understanding "logical OR" and "logical AND" in programming languages

Many programming languages either have keywords like or and and used for logic, or equivalent operators such as || or && - which are referred to as "logical or" and "logical and" respective...

3 answers  ·  posted 3mo ago by Karl Knechtel‭  ·  edited 3mo ago by Andreas demands justice for humanity‭

84%
+14 −1
What is the difference between operator precedence and order of evaluation?

When doing something simple such as this int a=1; int b=2; int c=3; printf("%d\n", a + b * c); then I was told that operator precedence guarantees that the code is equivalent to a + (b * c)...

2 answers  ·  posted 4y ago by Lundin‭  ·  last activity 3mo ago by Alexis Wilke‭

71%
+3 −0
Regex to get text outside brackets

I am trying to capture the content outside square brackets in groups, using this regex: (.*)\[.*?\](.*) And it works perfectly for a simple string like this: testing_[_is_]_done This is the...

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

66%
+2 −0
typeof_unqual behaves differently in gcc and clang

C23 6.7.3.6 contains this (informative) example demonstrating the use of typeof_unqual: const char* const animals[] = { "aardvark", "bluejay", "catte", }; typeof_unqual(animals) anima...

1 answer  ·  posted 3mo ago by Lundin‭  ·  edited 3mo ago by hkotsubo‭

66%
+2 −0
Unable to log in with Flask-WTF and Flask-Login

I'm building a Flask application with user login functionality using Flask-WTF for form handling and Flask-Login for user authentication. However, I am unable to log in successfully. The page does ...

0 answers  ·  posted 3mo ago by misbahskuy‭  ·  edited 3mo ago by Andreas demands justice for humanity‭

42%
+1 −2
How to invoke dialog modal from module instead of directly using the showModal() method

I need to have 2 different models to create projects and to-do lists. I've figured out, that for HTML there is only one dialog menu that can be invoked with window.dialog.showModal(); directly. So ...

0 answers  ·  posted 4mo ago by Sevenfold‭  ·  edited 3mo ago by Andreas demands justice for humanity‭

60%
+1 −0
Ignore directory changes

I have a generated file that I want Tilt to ignore for re-building. However, when that file changes, Tilt also detects that the parent directory has changed based on its contents changing. I can fi...

0 answers  ·  posted 3mo ago by rcmosher‭  ·  edited 3mo ago by Andreas demands justice for humanity‭

50%
+0 −0
What can cause an HTML form submission result in a new pop-up window?

These are the methods I know of: Set the form's target attribute to _blank. Add submit event listeners (e.g., this SO thread). In the proprietary web app that I have to work with, every form...

0 answers  ·  posted 3mo ago by toraritte‭  ·  edited 3mo ago by toraritte‭

50%
+1 −1
How can I properly implement Hexagonal Architecture and Domain Driven Design in the same application?

I'm trying to use the "hexagonal architecture" and "domain-driven design" paradigms together, in a Java application using Spring. I understand that my application should have a structure with 3 la...

1 answer  ·  posted 4mo ago by rudahee‭  ·  edited 3mo ago by Karl Knechtel‭

85%
+10 −0
Why not call nullptr NULL?

In C++11 the nullptr keyword was added as a more type safe null pointer constant, since the previous common definition of NULL as 0 has some problems. Why did the standards committee choose not to...

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

60%
+1 −0
Best Practices for Precalculating Expensive Variables in Functions

A class might calculate static variables during instantiation, which are then used by various functions. A common technique to optimize function performance is to precalculate expensive variables u...

2 answers  ·  posted 3mo ago by wagimek‭  ·  last activity 3mo ago by wagimek‭

60%
+1 −0
empty line in table cell in reStructuredText (rst)

I would like to have an empty line in the cell of a table in reStructuredText. Consider the following example: .. list-table:: :header-rows: 1 * - aaa - bbb * - ccc - ddd ...

0 answers  ·  posted 3mo ago by Trevor‭  ·  edited 3mo ago by Trevor‭

66%
+2 −0
Simultaneous comparison in Python

I want to make multiple comparisons at once, of the same type, in a Python program. For example, to check whether all of a certain group of strings are in a longer test string; or whether a specifi...

1 answer  ·  posted 3mo ago by Karl Knechtel‭  ·  last activity 3mo ago by Karl Knechtel‭

71%
+3 −0
Understanding "de Morgan's laws"

While trying to understand logical 'or'/'and', I encountered another problem (I'm writing Python code here, but my question is about the logic, not about any given programming language). I have som...

1 answer  ·  posted 3mo ago by Karl Knechtel‭  ·  last activity 3mo ago by Karl Knechtel‭

81%
+7 −0
Common string handling pitfalls in C programming

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

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

50%
+1 −1
How to Suppress System Sound for Keyboard Shortcuts in C++ Desktop Application [closed]

In my desktop application developed in C++, I am encountering an issue where pressing the Ctrl + X, Ctrl + Shift + X, and Ctrl + D shortcut keys triggers a system sound. I would like to suppress o...

0 answers  ·  posted 3mo ago by Junior_Dev‭  ·  edited 3mo ago by Alexei‭

60%
+1 −0
Generating combinations of elements, which are themselves sequences of the same length, where the elements have no value in common at any position

This question is adapted from a question I just helped fix up on Stack Overflow. I'm giving a different motivating example which I think will make it clearer what the requirements are and why a n...

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