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)
60%
+1 −0
Relayout call does not work on button click in Factor

I am currently using this code to display a GUI counter: USING: accessors arrays fonts kernel math math.parser ui ui.gadgets ui.gadgets.buttons ui.gadgets.editors ui.gadgets.labels ui.gadgets.pa...

0 answers  ·  posted 1y ago by Razetime‭  ·  edited 1y ago by Razetime‭

75%
+4 −0
How would I fix my IntelliJ IDE? It cannot open and re-installing does not work.

So I was looking around for some async solutions and I found one on github, https://github.com/electronicarts/ea-async I follow the setup instructions for maven. Only to realize it didn't work (I ...

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

22%
+0 −5
What factors should be considered when choosing web security measures for a site? [closed]

What factors should be considered when choosing web security measures for a site?

0 answers  ·  posted 1y ago by Andrew‭  ·  closed 1y ago by Mithical‭

75%
+4 −0
How do I share a type between a client and server, but make a specific field optional for one and required for the other?

Let's say I have a client/server application with a data structure on the server side: type User = { name: string; superSecretGovernmentIdNumber: string; }; These fields are both non-nul...

1 answer  ·  posted 6mo ago by Emily‭  ·  edited 6mo ago by Emily‭

77%
+5 −0
Best practices for company internal Swagger Docs in production

The current project I am working on consists of a bunch of microservices (Web APIs) accessible only internally using Entra ID (formerly Azure ID). To simplify the development, all services expose ...

1 answer  ·  posted 4mo ago by Alexei‭  ·  edited 3mo ago by Alexei‭

40%
+0 −1
Determine which script is slowing the page down in Firefox [closed]

A page is very slow and laggy in Firefox. I am certain it's one of the many Javascripts slowing it down. Out of curiosity, I'd like to figure out which script is creating the heaviest load. Note t...

0 answers  ·  posted 7mo ago by matthewsnyder‭  ·  closed 7mo ago by Alexei‭

71%
+3 −0
Is it possible to get the current function in a trace function?

I'm trying to subclass pdb to have a debugger that, in case of a call to a decorated function, can "step in" the decorated function directly and skip the decorator content altogether. A well-behave...

1 answer  ·  posted 12mo ago by luser‭  ·  last activity 12mo ago by r~~‭

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 1y ago by hkotsubo‭  ·  last activity 1y ago by hkotsubo‭

60%
+1 −0
Can't use tf.timestamp() from within @tf.function with XLA / jit_compile=True

I would like to use tf.timestamp() when it is available (eager mode and graph mode without XLA), and use 0. (or a better fallback if there is one) when it is not available (with XLA; @tf.function(j...

0 answers  ·  posted 8mo ago by daniel_s‭

50%
+1 −1
Why does my code show an error at deriving (eq)? (SOLVED) NEW ERROR: At SimpleEnigma & SteckeredEnigma constructors which I need help on :")

Hi, I'm trying to code an Enigma machine in Haskell which were used by the German in WWII to transmit coded messages. An Enigma Machine consists of 3 rotors which are substitution ciphers and a re...

1 answer  ·  posted 1y ago by Anonymous‭  ·  last activity 1y ago by Alexei‭

50%
+1 −1
Angular Testing fails with Service.method is not a function

I'm trying to write a spec test for a (correctly working) Angular component, but it errors when calling a service method with: TypeError: _this.myService.getSomeData is not a function The service...

0 answers  ·  posted 6mo ago by mcalex‭

81%
+7 −0
Qt Button changes drastically when setting its `border-radius`.

In a Qt application I have nothing more than a window with a button as its direct child. I set its background color and all is fine: Window::Window(QWidget *parent) : QWidget(parent) { but...

1 answer  ·  posted 1y ago by Quasímodo‭  ·  last activity 1y ago by r~~‭

66%
+2 −0
How can I get a value as a node:stream from the Nest.js cache-manager?

Question How can I read data from a NestJS Redis Cache as a stream? I'm using Nest.js and its @nestjs/cache-manager (using the Redis implementation), I need to read data I have stored in the cach...

0 answers  ·  posted 6mo ago by gdfelt‭  ·  edited 6mo ago by MrDevel0per‭

50%
+2 −2
Slicing a dictionary using a string variable

I am working on adding uncertainty to some of my dynamics within a larger Monte Carlo simulation. As a way to perform multiple operations on each value, I decided to make and use a new function to ...

1 answer  ·  posted 9mo ago by megalomaniac‭  ·  edited 9mo ago by megalomaniac‭

66%
+2 −0
Pipeline for zipping multiple file chanel into a single output channel

I am in need of downloading some files (from dynamic list of URLs) and archive them into a single zip file. Since these files can be arbitrarily sized (totaling hundreds of MB), I want to avoid dow...

1 answer  ·  posted 8mo ago by tmpod‭  ·  last activity 8mo ago by tmpod‭

80%
+6 −0
What is the meaning of "short circuit" operators?

When reading about various operators used by programming languages, the term "short circuit behavior" is often used. For example in this C code: int a = 0; a && b++ Someone explained t...

2 answers  ·  posted 7mo ago by Lundin‭  ·  last activity 7mo ago by matthewsnyder‭

85%
+10 −0
How to manage user-specific application data on Linux?

I am developing an application that targets Linux-based OS, and I need to store the user's configuration, metadata and other things in a persistent way (i.e. on the file system). I know that one c...

3 answers  ·  posted 1y ago by Björn‭  ·  last activity 1y ago by celtschk‭

42%
+1 −2
Program freezing in `post_comments_to_lemmy` function due to potential infinite loop

I'm experiencing an issue where my program appears to freeze when executing the post_comments_to_lemmy function. This function fetches comments from the GitHub API and posts them to a Lemmy instanc...

1 answer  ·  posted 10mo ago by ShadowsRanger‭  ·  last activity 10mo ago by __blackjack__‭

66%
+4 −1
How to overwrite lines of STDOUT in Python?

print() normally adds text to STDOUT, it does not erase existing text. https://linux.codidact.com/posts/289869 describes various ways of doing the overwrite in shell scripts. How can you do this ...

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

50%
+1 −1
Rest service doesn't find @GET Method (Jersey Rest service in Gradle).

I have to implement a JSON based REST web service for querying literature. Ordinary users should be able to query data and process it in their clients. The "main user" can adapt database entries vi...

0 answers  ·  posted 1y ago by Gagamelius‭  ·  edited 1y ago by Alexei‭

60%
+1 −0
Tidy Ansible assert module loop output

Looping in Ansible usually produces a neat output of one line per iteration (per host): ... ok: [Arch] => (item=something) ok: [Arch] => (item=something_else) ok: [Arch] => (item=yet_a...

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

60%
+1 −0
What is lifting state up in Flutter?

What does lifting state up in Flutter mean, and how does it work?

1 answer  ·  posted 10mo ago by tarhalda‭  ·  last activity 10mo ago by tarhalda‭

50%
+1 −1
What software architecture are available for developing an application with multiple business domains that only share some common aspects?

NOTE The meaning of the word "program" below is (PROGRAM) A federal or state initiative that offers grants for non-profits so that they can provide service at low cost or free of charge. a...

2 answers  ·  posted 7mo ago by toraritte‭  ·  edited 6mo ago by toraritte‭

81%
+7 −0
How to revert main branch to an earlier commit in git?

How to move the main branch back to an earlier commit in git?

2 answers  ·  posted 7mo ago by Iizuki‭  ·  last activity 5mo ago by Michael‭

git
25%
+0 −4
Create self-referencing many-to-many relation

I've turned the tables movies and scenes into media and now I don't know what to do with the movies_scenes relation. CREATE TABLE IF NOT EXISTS "movies_scenes" ( `movie_id` integer, `sce...

1 answer  ·  posted 1y ago by filosoful‭  ·  last activity 1y ago by jimbobmcgee‭

71%
+3 −0
How to resolve the mypy error "Returning Any from function declared to return 'Dict[str, Any]'" in Python?

I have a function that loads JSON data and is declared to return a dictionary with string keys and values of any type (Dict[str, Any]). However, mypy is raising an error stating that I am returning...

1 answer  ·  posted 9mo ago by ShadowsRanger‭  ·  last activity 9mo ago by Moshi‭

50%
+0 −0
Best practices to write functions for both execution modes in Tensorflow, eager and graph mode

I regularly run into the problem that I have a Python function that I want to use in both, eager and graph execution mode. I therefore have to adjust the code so that it can handle both situations....

1 answer  ·  posted 8mo ago by daniel_s‭  ·  edited 8mo ago by daniel_s‭

66%
+2 −0
Clone .git repo into current dir, without touching files

I have git repo where the .git is deleted. I didn't realize it until after I made some changes to the code. I want to re-create the .git by cloning. However I don't want it to touch the files that...

1 answer  ·  posted 8mo ago by matthewsnyder‭  ·  last activity 8mo ago by matthewsnyder‭

71%
+3 −0
How should open source forks, with a mix of upstreamable and non-upstreamable commits, be maintained?

I have a few different projects that rely on open source technology that I wish to make modifications to (say, to add key features for business or personal use) that will vary between upstreamable ...

1 answer  ·  posted 7mo ago by eoin.oneill‭  ·  last activity 7mo ago by matthewsnyder‭

50%
+0 −0
Adding two products into cart with help of a checkbox.

I've created a code snippet in "functions.php" that should add another product to your cart if you mark the checkbox, but somehow, only the original product is add (like the single product from the...

0 answers  ·  posted 7mo ago by gft‭  ·  edited 7mo ago by gft‭

55%
+3 −2
How to proportionally convert a number in the range of -1 and 1 to a number in the range of 0 and 319

I have float noise values, between -1 and 1, for every x,y coordinate in a 2D area and I am trying to convert that to a whole number between 0 and 319 which represents a vertical z coordinate to re...

3 answers  ·  posted 1y ago by cuzzo‭  ·  last activity 1y ago by Dirk Herrmann‭

86%
+11 −0
Alternatives to `EXPLAIN ANALYZE` for queries that won't complete

I have a large and complex PostgreSQL SELECT query that I would like to make faster. EXPLAIN suggests it should run quickly, with the worst parts being scans of a few thousand rows. When run, it do...

2 answers  ·  posted 7mo ago by Emily‭  ·  last activity 7mo ago by matthewsnyder‭

71%
+3 −0
How to add vertical lines for visual separation in pandas plot

MWE import pandas as pd import numpy as np import matplotlib.pyplot as plt df = pd.DataFrame(np.random.rand(9, 4), columns=['a', 'b', 'c', 'd']) df.plot.bar() plt.show() Question Ho...

2 answers  ·  posted 2y ago by mcp‭  ·  last activity 2y ago by samcarter‭

28%
+0 −3
Need help in migrating a Python2 custom middleware to current Python3 version

class ExtendUserSession(MiddlewareMixin): """ Extend authenticated user's sessions so they don't have to log back in following 15 minutes (set by Django's default `SESSION_COOKIE_A...

0 answers  ·  posted 2y ago by roronoa_zoroDR‭  ·  last activity 2y ago by Monica Cellio‭

60%
+1 −0
How to put text next to my ImageIcon on a cell in a JTable

I have an application that works with a JTable, and in this JTable, I want each cell to have both an ImageIcon and some text. I see at this link, JTable supports ImageIcon OR text, but seemingly n...

1 answer  ·  posted 8mo ago by davidalayachew‭  ·  edited 8mo ago by Alexei‭

75%
+7 −1
Automatically install all packages needed

When running various Python scripts, I often need to do this annoying dance: $ python script.py ... ModuleNotFoundError: No module named 'foo' $ pip install foo $ python script.py ... Module...

3 answers  ·  posted 10mo ago by matthewsnyder‭  ·  last activity 8mo ago by meta user‭

50%
+3 −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...

1 answer  ·  posted 7mo ago by matthewsnyder‭  ·  last activity 7mo ago by mr Tsjolder‭

71%
+3 −0
How to inject environment configuration values when deploying an Angular application in Kubernetes or similar infrastructure?

Context I am currently migrating a Web application from on-prem infrastructure to K8s. The legacy infrastructure relies on defining some tokens in the configuration files and these are replaced d...

2 answers  ·  posted 1y ago by Alexei‭  ·  last activity 1y ago by Derek Elkins‭

50%
+0 −0
What is a Crossfilter group?

From reading about the Crossfilter data manipulation library for JavaScript, I take it that "groups" are an important concept in its operation. However, the Crossfilter documentation does not ever...

0 answers  ·  posted 8mo ago by CavanWright‭

30%
+1 −5
Haskell revision question. [closed]

The answer for this question is that there is something wrong with the expression of the first guard of this function below: congratulations :: [(String, Int)] -> [String] congratulations [] =...

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

75%
+4 −0
Dealing with code maintenance when saving a large and complex entity in a single business transaction

Context I am currently working on migrating a legacy application to an ASP.NET Core + Angular application. The Web API's main project is based on Jason Taylor's template (clean architecture) and a...

1 answer  ·  posted 1y ago by Alexei‭  ·  last activity 1y ago by r~~‭

66%
+2 −0
Android Studio "not showing null elements" in unit tests.

My Android app needs to process lists that contain nullable elements. I am using JUnit 4.13.2 for unit testing. I am using Android Studio Flamingo | 2022.2.1 Patch 2 . I have a failing test,...

1 answer  ·  posted 8mo ago by FractionalRadix‭  ·  edited 8mo ago by FractionalRadix‭

66%
+4 −1
How to implement a relationship between 2 tables where the type of participation is mandatory and RESTRICT rule for both?

Found the example below in a book teaching logical database design, but I'm stuck on how one would implement this in PostreSQL: The diagram reflects the following business rule: An instructor...

1 answer  ·  posted 7mo ago by toraritte‭  ·  last activity 7mo ago by Derek Elkins‭

60%
+1 −0
What can be used in react-native instead of an html label tag to achieve the same result?

I wanna make a form in React native. A field in this form in (non-native) React would be like this: <div> <label htmlFor="lastName">Last Name:</label> <input type="text...

0 answers  ·  posted 9mo ago by andre‭  ·  edited 9mo ago by andre‭

60%
+1 −0
Optimized representation for sets?

I need to do a lot of calculations involving sets. There are relatively few values in the "universe" of candidates that could appear in any of the sets, but potentially very many such sets (they mi...

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

75%
+4 −0
How to programmatically get current wallpaper file path?

I have written a screensaver program that, in part, uses the current wallpaper for some visual effects. However, finding the current wallpaper in different operating systems and environments is les...

1 answer  ·  posted 1y ago by ghost-in-the-zsh‭  ·  last activity 1y ago by ghost-in-the-zsh‭

66%
+2 −0
How can I return XML from BeforeSendRequest and AfterReceiveReply to the calling method in a thread-safe way?

We have a console application using the Azure WebJob SDK. The WebJob relies on a WCF service using SOAP, which it accesses through a DLL we wrote that wraps the auto-generated WCF types in somethin...

1 answer  ·  posted 11mo ago by Celarix‭  ·  edited 10mo ago by Alexei‭

84%
+9 −0
grep AND search for multiple words in files

I have text (xml actually) files. Some files contain 'foo', some contain 'bar', some contain neither and some contain both. It's the both I'm interested in. How do I do an AND search on words in...

5 answers  ·  posted 11mo ago by mcalex‭  ·  last activity 10mo ago by tripleee‭

77%
+5 −0
Using DBUS and GTK in one perl program

Perl is by far the language I have the most experience with, and I have (big) parts of the functionality I want in the new program in existing programs. So I'm looking for a way to do this in perl,...

1 answer  ·  posted 10mo ago by Grove‭  ·  last activity 10mo ago by deleted user

50%
+1 −1
How to resolve a "ValueError: dimension 't' already exists as a scalar variable" arising when I am using xarray.Dataset.assign_coords()?

I have the following xarray Dataset: d: <xarray.Dataset> Dimensions: (x: 79, y: 63, t: 1) Coordinates: * x (x) float64 0.9412 1.882 2.824 3.765 ... 71.53 72.47 73.41 74.35 * ...

1 answer  ·  posted 8mo ago by Ivan Nepomnyashchikh‭  ·  last activity 8mo ago by mr Tsjolder‭