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
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 9mo ago by pycoder‭  ·  last activity 9mo 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 10mo ago by MariaAllen‭  ·  last activity 9mo 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 9mo ago by Mr. Beedell, Roke Julian Lockhart (RJLB)‭  ·  last activity 9mo 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 10mo ago by deleted user  ·  last activity 9mo ago by Riven Skaye‭

python
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 10mo 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 10mo ago by plain_toast‭  ·  last activity 10mo ago by Alexei‭

*nix
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 10mo 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 10mo 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 10mo 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 11mo ago by ShadowsRanger‭  ·  last activity 10mo 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 10mo ago by watchmaker‭  ·  edited 10mo ago by watchmaker‭

java datetime
62%
+3 −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 10mo ago by deleted user  ·  last activity 10mo 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 11mo ago by samcarter‭  ·  last activity 10mo 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 11mo ago by pycoder‭  ·  last activity 11mo ago by Alexei‭

python regex python-3
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 11mo ago by riQQ‭  ·  last activity 11mo 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 3y ago by TecBrat‭  ·  last activity 11mo 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 11mo ago by alx‭  ·  last activity 11mo 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 11mo 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 11mo 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 11mo 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 11mo ago by anatolyg‭  ·  last activity 11mo 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 11mo ago by ShadowsRanger‭  ·  last activity 11mo 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 11mo ago by ShadowsRanger‭  ·  closed 11mo ago by Karl Knechtel‭

python gitignore
75%
+4 −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 11mo ago by watchmaker‭  ·  edited 11mo 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 11mo ago by ShadowsRanger‭  ·  edited 11mo 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 11mo ago by Franck Dernoncourt‭  ·  closed 11mo 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 6y ago by ghost-in-the-zsh‭  ·  last activity 11mo 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 5y ago by J-hen‭  ·  last activity 11mo 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 11mo ago by pycoder‭  ·  last activity 11mo 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 11mo ago by ShadowsRanger‭  ·  edited 11mo 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 11mo ago by Franck Dernoncourt‭  ·  edited 11mo 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 12mo ago by Franck Dernoncourt‭  ·  last activity 11mo 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 11mo ago by watchmaker‭  ·  last activity 11mo 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 11mo ago by Mr. Beedell, Roke Julian Lockhart (RJLB)‭  ·  last activity 11mo 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 2y ago by riQQ‭  ·  last activity 12mo 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 3y ago by Iizuki‭  ·  last activity 12mo 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 12mo ago by Franck Dernoncourt‭  ·  last activity 12mo 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 12mo 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 2y ago by Lundin‭  ·  last activity 12mo 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 1y ago by Iizuki‭  ·  last activity 12mo ago by Alexei‭

sql
71%
+3 −0
What are the drawbacks of using data snapshot testing?

Our team is finally focusing on writing more automatic testing and one of my ex-colleagues recommended to try out the Verify library. The tool does the following: runs the test and compares the...

1 answer  ·  posted 4y ago by Alexei‭  ·  last activity 12mo ago by Alexei‭

c# snapshot-testing verify-tests
60%
+1 −0
Test Extension Method Received Call with NSubstitute

How can I verify that an extension method was called when using NSubstitute for unit testing? For a normal method I'd do something like: substitutedClass.Recieved().CheckedMethod(...) But exten...

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

c# nsubstitute
60%
+1 −0
I can't install the Spacy library using the terminal in VSCode on Windows 10

I am trying to install the Spacy library in VSCode in a folder with a virtual environment. The output appearing in the terminal is excessively long; I will share it with a pastebin later. My versio...

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

python visual-studio installation terminal spacy
66%
+2 −0
When I write and run a prompt in Cursor IDE, what's passed in the context to the model (GPT/Claude/etc.)?

When I write and execute a prompt in Cursor IDE, what specific information is included in the context that gets sent to the underlying language model (such as GPT or Claude)? E.g., does it include ...

1 answer  ·  posted 1y ago by Franck Dernoncourt‭  ·  last activity 12mo ago by Alexei‭

cursor-ai
80%
+6 −0
Does a machine-parsable alternative to lsusb -v exist?

github.com/kellyjonbrazil/jc/discussions/666#discussioncomment-14470622, and its immediate context, explain that lsusb does not appear to provide machine-parsable output, and that the available inf...

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

linux usb
70%
+5 −1
How to control how HTML is copied into the clipboard in plain text form?

Premise The text/plain representation of my HTML5 markup is inequivalent to its CSS3 markup, even in manners which /plain is able to represent, like the amount of line breaks and depth (or even pr...

2 answers  ·  posted 1y ago by Mr. Beedell, Roke Julian Lockhart (RJLB)‭  ·  edited 1y ago by Mr. Beedell, Roke Julian Lockhart (RJLB)‭

javascript html web css
50%
+1 −1
How do I run Python scripts on Android devices? [closed]

How do I run Python scripts on Android devices? There seem to be a bunch of different approaches; what are the advantages and disadvantages? In no particular order (and likely missing some usefu...

0 answers  ·  posted 1y ago by DavidCary‭  ·  closed 1y ago by Alexei‭

python android cross-platform
77%
+5 −0
Cargo can't find installed Gtk libraries

I'm trying to build a Rust program that uses Gtk4, specifically riff, but I think any Rust program that depends on Gtk4 will reproduce this error. However, Cargo keeps complaining that various Gtk-...

1 answer  ·  posted 1y ago by Sylvester‭  ·  last activity 1y ago by Sylvester‭

rust gtk rust-cargo
57%
+2 −1
Count the number of occurrences in a text string

If I have some text in a cell, how can I find the number of times another piece of text appears in it? For example, suppose A1 contains Peter Piper picked a peck of pickled peppers.. pick occurs 2...

3 answers  ·  posted 6y ago by pnuts‭  ·  last activity 1y ago by Alexei‭

excel string libreoffice-calc google-sheets openoffice-calc
66%
+2 −0
Protobuf C++ Arena - Memory Clean Slow

I have a fairly large C++ application that is reading Protobuf messages from the network using the Google Cloud CPP BigQuery API. If the data is too much, the application starts to use up a lot of...

0 answers  ·  posted 1y ago by Abbas Gadhia‭  ·  edited 1y ago by FractionalRadix‭

c++ protobuf gperftools