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)
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 16h ago by pycoder‭  ·  last activity 12h ago by hkotsubo‭

python regex markdown python-3
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)...

0 answers  ·  posted 4d ago by alx‭  ·  edited 4d ago by alx‭

c gcc c-preprocessor
66%
+2 −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 5d ago by Matthew‭

sitemap
66%
+2 −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 ...

0 answers  ·  posted 10d ago by pycoder‭  ·  edited 10d ago by pycoder‭

python charts python-3 graphviz mermaid
72%
+6 −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 3mo ago by Ooker‭  ·  last activity 14d ago by Michael‭

git github pull-request
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 22d ago by Michael‭  ·  last activity 21d 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 28d ago by pycoder‭  ·  last activity 27d ago by jimbobmcgee‭

python python-3 pyqt6 pyqt
71%
+3 −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 2mo ago by MariaAllen‭  ·  last activity 29d 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 1mo ago by Mr. Beedell, Roke Julian Lockhart (RJLB)‭  ·  last activity 1mo 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 2mo ago by joel‭  ·  last activity 1mo 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 1mo ago by VLAZ‭

javascript operators
42%
+1 −2
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 1mo ago by AdriZ‭  ·  closed 1mo ago by Lundin‭

rust compiled-language zig embedded vlang
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 1mo 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 1mo ago by plain_toast‭  ·  last activity 1mo 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 2mo ago by watchmaker‭  ·  edited 1mo ago by Lundin‭

Eclipse
71%
+3 −0
Java: ignore warnings from generated code

Again, I'm playing around with javaCC, and get those annoying warnings about "unused" and "dead code". Is there a decent way to put a @SuppressWarnings annotation on a whole package but not on the...

0 answers  ·  posted 1mo ago by watchmaker‭

java code-generation javacc
60%
+1 −0
How can I run Flux2 inference on 2 GPUs?

I try to run Flux2 inference on 2 GPUs as follows: import torch from diffusers import Flux2Pipeline from accelerate import PartialState import argparse from pathlib import Path def main(): ...

0 answers  ·  posted 1mo ago by Franck Dernoncourt‭

python gpu huggingface-transformers
50%
+0 −0
eclipse: change toString to prettyPrint

The task looks ridiculously simple, but I could not find a way of doing it but manually. I have a class with a @Override ... toString() method. I want to diversify this to a more specialized meth...

0 answers  ·  posted 2mo ago by watchmaker‭

Eclipse
80%
+6 −0
How to add a percent_jitter strategy to backoff Python package and pass extra args in the decorator?

I'm trying to add a percent-based jitter function to the backoff package and use that modified package in my project instead of the PyPI release. Current jitter algorithm I want to implement (from...

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

python
77%
+5 −0
java.time.ZonedDateTime missing seconds in output

When printing a java.time.ZonedDateTime, it's missing the seconds in output, is it a bug or a feature? See my code: package tryNcry; import java.time.Instant; import java.time.ZoneId; import...

2 answers  ·  posted 2mo ago by watchmaker‭  ·  edited 2mo ago by watchmaker‭

java datetime
57%
+2 −1
What happens if I activate a python venv inside another venv?

What happens if I do python3 -m venv venv1 python3 -m venv venv2 source venv1/bin/activate source venv2/bin/activate Which venv(s) am I now in?

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

python python-venv
80%
+6 −0
GitHub action triggered by somebody else's repository

Consider the following situation: I have a GitHub repository for a LaTeX package: https://github.com/samcarter/beamertheme-spectrum This LaTeX package depends on a class, for which somebo...

2 answers  ·  posted 3mo ago by samcarter‭  ·  last activity 2mo ago by Michael‭

github
71%
+3 −0
Python re.sub() how to include and slice the match in the substitution?

I recently started learning regular expressions and I'm trying to use Python's re module, specifically the re.sub() function, to convert a subset of Markdown syntax to HTML whenever it appears in a...

2 answers  ·  posted 2mo ago by pycoder‭  ·  last activity 2mo ago by Alexei‭

python regex python-3
66%
+2 −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...

0 answers  ·  posted 2mo ago by mr Tsjolder‭

computer-science gpu cuda hardware
50%
+0 −0
How do I fix LNK1104: cannot open file 'ncrypt_provider.lib'?

How do I fix the following linker error when building a C++ project on Windows? LINK : fatal error LNK1104: cannot open file 'ncrypt_provider.lib'

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

c++ windows
66%
+2 −0
Method not found when emitting a custom signal, but the game seems to work when played.

In Godot 4.1.1 I moved some scenes and started getting parenting errors. I think I got that fixed, but I'm mentioning it in case it is important. I have an Area2d called House. house.gd has two c...

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

godot gdscript
71%
+3 −0
How to pipe grep(1) and use compatible exit codes?

I need to wrap grep(1) in a script, and I'd like the script to have an exit code compatible with that of grep(1) --that is, it should return 0 if it found something, 1 if it didn't, and 2 on error-...

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

bash grep error-handling
40%
+0 −1
[How] can I escape all markup characters in CommonMark source?

My Rationale At github.com/mysociety/alaveteli/issues/8958, I needed to post the rendered text of an .eml into a form that utilised GitHub's "GitHub-Flavoured Markdown" superset of CommonMark. Co...

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

html escaping software-recommendation
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 4y ago by sbirl‭  ·  last activity 2mo ago by Alexei‭

node.js puppeteer timeout
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 1y ago by Iizuki‭  ·  last activity 2mo ago by Alexei‭

kubernetes helm
66%
+2 −0
How to use Python/pytest to organize unit and system tests?

I have a big system which I want to test using Python scripts: using pytest or any other infrastructure. Some of my tests are of the "pass/fail" type; pytest has great support for these, like coll...

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

python unit-testing pytest
60%
+1 −0
How can I export a full Scryfall search to a CSV compatible with Moxfield collections?

I’m trying to export cards from a Scryfall search so I can import them into a Moxfield collection. I’ve tried a simple script that dumps card names: Query Scryfall + dump card names for Moxfield ...

2 answers  ·  posted 3mo ago by ShadowsRanger‭  ·  last activity 3mo ago by Alexei‭

python
42%
+1 −2
Python script using gitignore_parser doesn't respect .gitignore rules [closed]

I'm using a Python script to merge code files: python codemerge.py --filters "*.py" --output merged_code.txt . The script uses gitignore_parser to skip files in .gitignore. My .gitignore exclud...

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

python gitignore
71%
+3 −0
Java generics, how to work around type erasure?

This code doesn't compile: package tryNcry; public class ExampleClass<S extends SomeClass> { S[] createArray(int n) { return new S[n]; // obvious compile time ERROR here: ...

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

java generics
50%
+0 −0
How to automatically get the release date of the latest Magic: The Gathering Standard set?

I’m building a tool to check Magic: The Gathering deck legality in custom formats and want to update my formats with the same frequency as the Penny Dreadful format. Penny Dreadful updates when a n...

1 answer  ·  posted 3mo ago by ShadowsRanger‭  ·  edited 3mo ago by ShadowsRanger‭

python
33%
+0 −2
How can I serve OpenGVLab/InternVL3-1B with vLLM? Getting "ValueError: Failed to apply InternVLProcessor" error upon initialization [closed]

How can I serve OpenGVLab/InternVL3-1B with vLLM? I tried running: conda create -y -n vllm312 python=3.12 conda activate vllm312 pip install vllm vllm serve OpenGVLab/InternVL3-1B --trust_remo...

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

python vllm
90%
+18 −0
Does the location of an import statement affect performance in Python?

When writing Python-based apps (e.g. Django, Flask, etc.), it's often the case that import statements can be found all over the place, often more than once for the same module. For example, you can...

2 answers  ·  posted 5y ago by ghost-in-the-zsh‭  ·  last activity 3mo ago by Karl Knechtel‭

python python-internals
84%
+9 −0
Open file in script's own folder

I have a Python script that needs to access some data (or configuration) file in its very own folder. For example, say script.py does something like this: with open('data.txt') as file: data ...

2 answers  ·  posted 4y ago by J-hen‭  ·  last activity 3mo ago by Karl Knechtel‭

python file-handling
66%
+2 −0
Python BeautifulSoup how to correctly parse quote symbols in link titles (broken html)?

I'm learning some basic web scraping so I can download part of a static website for offline viewing. In the process, I'm running into link tags that look something like this: <a href='https://e...

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

python python-3 beautifulsoup
71%
+3 −0
How to get the community of a post from Lemmy API?

I'm building a script for Lemmy that, given a user returns a list of communities sorted by engagement based on total votes and upvote percentage per community, to have an idea of other communities ...

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

python lemmy
60%
+1 −0
How can I run the inference on the HunyuanImage-3.0 model?

I follow the instructions on https://github.com/Tencent-Hunyuan/HunyuanImage-3.0: conda create -y -n hunyuan312 python=3.12 conda activate hunyuan312 # 1. First install PyTorch (CUDA 12.8 Vers...

0 answers  ·  posted 3mo ago by Franck Dernoncourt‭  ·  edited 3mo ago by Franck Dernoncourt‭

python image-generation
50%
+1 −1
How can I update the capacity of a finetuned GPT model on Azure using Python?

I want to update the capacity of a finetuned GPT model on Azure. How can I do so in Python? The following code used to work a few months ago (it used to take a few seconds to update the capacity) ...

1 answer  ·  posted 3mo ago by Franck Dernoncourt‭  ·  last activity 3mo ago by Franck Dernoncourt‭

python azure azure-cognitive-services gpt
50%
+0 −0
Trouble understanding java lambdas and generics

Of course, everyone thinks to understand lambdas and generics. I was one of those until recently. Look at my code: package debug; import java.util.function.Function; public class Understand...

1 answer  ·  posted 3mo ago by watchmaker‭  ·  last activity 3mo ago by r~~‭

java
66%
+2 −0
How to morph a table into a list when its content wraps?

Currently, I have short key-value structures rendered as <table>s: This isn't ideal when the content wraps, because it wastes space, as the “Experience” section of the undermentioned, crin...

2 answers  ·  posted 3mo ago by Mr. Beedell, Roke Julian Lockhart (RJLB)‭  ·  last activity 3mo ago by ArtOfCode‭

html
50%
+0 −0
How do you fix 'Failed to load the dll hostfxr.dll' when starting an x86 .NET process in a test run via dotnet test?

How do you fix the error 'Failed to load the DLL hostfxr.dll' when running a .NET test executed via dotnet test and starting an x86 .NET application in the test? I'm using .NET 8. Failed to load ...

2 answers  ·  posted 1y ago by riQQ‭  ·  last activity 3mo ago by Michael‭

.net
77%
+5 −0
Using an existing web server vs writing your own

When writing a dynamic web service, you broadly speaking have two paths: Use an existing web server (e.g. Apache, Nginx or Lighttpd) to handle the "raw" web requests and implement your own cod...

4 answers  ·  posted 2y ago by Iizuki‭  ·  last activity 3mo ago by matthewsnyder‭

architecture webserver fastcgi
42%
+1 −2
How can I use web search with GPT on Azure using Python?

I want to use web search when calling GPT on Azure using Python. I can call GPT on Azure using Python as follows: import os from openai import AzureOpenAI endpoint = "https://somewhere.openai...

1 answer  ·  posted 3mo ago by Franck Dernoncourt‭  ·  last activity 3mo ago by Franck Dernoncourt‭

python azure azure-cognitive-services gpt web-search
77%
+5 −0
F-bounded polymorphism, interface operators, and type inference in C#

C# language version 8.0 introduces limited support for static methods, operators, etc. in interfaces. However, there are still limitations. I was hoping to use the new language features to try a ge...

0 answers  ·  posted 5y ago by Peter Taylor‭  ·  last activity 3mo ago by Alexei‭

c# polymorphism type-system operator-overloading
80%
+6 −0
How do you implement polymorphism in C?

The topic of how to implement polymorphism in C tends to pop up now and then. Many programmers are used to OO design from higher level languages and supposedly OO is a "language-agnostic" way of pr...

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

c polymorphism oop inheritance
86%
+11 −0
Why is SQL usually written in CAPS?

Why are keywords in SQL usually written in capital letters? For example: SELECT * FROM person WHERE mood = 'happy'; My understanding is that SQL is case insensitive, so the case doesn't actuall...

4 answers  ·  posted 9mo ago by Iizuki‭  ·  last activity 3mo ago by Alexei‭

sql