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
Winui 3 Combobox in datagrid not displaying data

I am migrating a WPF app to WinUI3. Things went well until I needed to put a combo box in the datagrid. That MS had removed the datagrid from the standard tools was overcome with Community Toolkit ...

0 answers  ·  posted 6mo ago by FrankLuke‭

66%
+2 −0
Is there a correct way to fetch data with a SwiftUI ViewModel?

Background + Example Code Let's say I have a SwiftUI ViewModel like so: class ViewModel: ObservableObject { @Published var strs: [String] = [] func fetchStrs() async { // T...

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

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‭

71%
+3 −0
How to declaratively enable RabbitMQ feature flags in Kubernetes

We use Kubernetes on a cloud (GKE, to be precise). We use RabbitMQ for messaging and we need to upgrade it from 3.10 to 3.12 . FWIW RabbitMQ has been added to our system using a chart from Bitnami...

0 answers  ·  posted 6mo ago by FractionalRadix‭

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‭

33%
+0 −2
Axios error bad request [closed]

I'm trying to use this code with Axios: import "./feed.css"; import Post from "../post/Post"; import Share from "../share/Share"; import { useState, useEffect } from "react"; import axios from...

0 answers  ·  posted 6mo ago by AyeshSoul‭  ·  closed 6mo ago by Alexei‭

66%
+2 −0
Escape both reserved characters and curly braces in a URI in Spring Boot

I need to pass URI's that contain special characters, using Spring Boot. The characters include spaces, curly braces ({ and }), square brackets ([ and ]), and hash signs (#). The problem is that ...

1 answer  ·  posted 6mo ago by FractionalRadix‭  ·  last activity 6mo ago by FractionalRadix‭

60%
+1 −0
Command to format code from repo into single markdown file

I'm trying to flatten a repository of Python code into a Markdown file where each file is formatted like: relative/path/to/file1.py # contents of file1.py I'm using this command: find . -name...

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

71%
+3 −0
How to use docker hub with podman?

Unlike docker, Podman won't (understandably) use docker hub by default. You can use it explicitly like this: (just using a random example here, it's an OpenAPI linter) podman pull docker.io/dshanl...

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

71%
+3 −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 6mo ago by Iizuki‭  ·  last activity 6mo ago by Basile Starynkevitch‭

66%
+2 −0
Get list of all variables from Jinja template

Suppose you have a jinja template like this: I am going to {{ foo }} to get some {{ bar }}. I hope I can find: {% for i in baz %} - {{i}} {% endfor %} This template will require you to pass ...

0 answers  ·  posted 6mo ago by matthewsnyder‭  ·  edited 6mo ago by Karl Knechtel‭

50%
+1 −1
Running a bash command with a Key Combination in Gnome [closed]

Is there a way in Ubuntu to run a given bash command for a given Key combination in Gnome (42.9)? I run an Ubuntu in Hyper-V and after a while the normal Keyboard layout change doesn't work (maybe...

0 answers  ·  posted 6mo ago by Arpad Horvath‭  ·  closed 6mo ago by Alexei‭

81%
+7 −0
Git add/stage only part of a file's changes

Say I've made a bunch of changes to a file and would like to split those changes into two or more commits. Normal git add however stages the whole file in one go. So how to add only some of the ch...

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

git
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‭

60%
+1 −0
How do I register the Chart.js Zoom plugin?

I am attempting to use the chartjs-zoom-plugin v2.0.1 with Chart.js v4.4.0. I have the plugin as the file chartjs-plugin-zoom-2.0.1.min.js, and I have imported it into my page using <script ty...

1 answer  ·  posted 7mo ago by CavanWright‭  ·  last activity 6mo ago by surajrao‭

50%
+0 −0
How do I get the min/max axis values in Chart.js?

I'd like to get the minimum and maximum values of the axes on a Chart.js 4.4.0 plot. When the plot is created, these values must be calculated somewhere. However, reading through the Chart.js doc...

1 answer  ·  posted 7mo ago by CavanWright‭  ·  last activity 7mo ago by Ullallulloo‭

75%
+4 −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...

1 answer  ·  posted 7mo ago by Matthias Braun‭  ·  edited 7mo ago by Matthias Braun‭

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

0 answers  ·  posted 7mo ago by Sigma‭

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 7mo ago by toraritte‭

60%
+1 −0
How to validate Ansible role dictionary argument's "additionalProperties"

In JSON Schema one can use the additionalProperties key to validate properties whose names are not know. You can still impose restrictions on their type. How to do this in an Ansible role argument...

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

60%
+1 −0
How to use Ansible extract filter in map with an external dictionary

Ansible's extract filter is supposedly made for use in map, but at the time of writing the documentation doesn't actually show how to use it together with the map filter. The following outputs VAR...

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

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‭

25%
+0 −4
Configure port in Gbee.ai [closed]

How do one configure a port in GBee.ai framework.

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

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
71%
+3 −0
Can you run Python code on text in VS Code?

In VS Code, is it possible to run Python code on the text being edited? I realize that I can save my text, create a .py file, switch to a terminal (including VS Code's own terminal) and run the .p...

0 answers  ·  posted 7mo ago by matthewsnyder‭

66%
+2 −0
Advanced Regex extension for VS Code

VS Code supports regex search, but the search/replace is UI is just a tiny dialog box. It's okay if you know regex well and the expression is not complex, but when trying to apply complicated expre...

0 answers  ·  posted 7mo ago by matthewsnyder‭

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‭

71%
+3 −0
How to open VS code with a particular path expanded?

When you do: cd /some/path code . VS Code opens with that location shown in the "Explorer" sidebar. However, the state of the file tree and the currently open files will be the same as what wa...

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

60%
+1 −0
How do I install Chart.js as a file?

I'm trying to replace Flot.js with Chart.js. In my application, Flot.js is included as a normal JavaScript file, like so: <script language="javascript" type="text/javascript" src="jquery.flot-...

1 answer  ·  posted 7mo ago by CavanWright‭  ·  last activity 7mo ago by Ullallulloo‭

71%
+3 −0
How to provide meaningful names for emails in Maildir?

I am writing some scripts that operate on emails in Maildir format. A lot of things are easy in this format, but the filenames are absolutely incomprehensible. For example, one script moves mails ...

1 answer  ·  posted 7mo ago by matthewsnyder‭  ·  edited 7mo ago by Alexei‭

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‭

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‭

60%
+1 −0
Shortcut for inserting today's date in VS Code

Is there a way to easily insert today's date when editing a file in VS Code?

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

60%
+1 −0
How does scoping work in R?

If I run ls() in R, it shows the variables (including functions) in my workspace. But there are other variables visible too, e.g. functions from packages like ls itself. And if I write a function...

1 answer  ·  posted 7mo ago by djm‭  ·  edited 7mo ago by Alexei‭

66%
+2 −0
VS Code: How to open a file and folder in a new window?

I've figured out that code --new-window /foo/bar/baz.txt will open baz.txt in a new window. But when I do this, it says "no folder opened" in the file explorer pane. That makes it hard to work with...

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

50%
+1 −1
How do I properly render a quad in OpenGL using a GL_TRIANGLE_STRIP primitive?

I am currently working with LWJGL and the obstacle I face right now on my project is rendering textures to a cube, e.x a set of 8 vertices with position, color, and UV information. For now, I am st...

1 answer  ·  posted 7mo ago by cuzzo‭  ·  last activity 7mo ago by djm‭

75%
+4 −0
Is it possible to re-export types similar to JS?

I'm writing a library "MyLibrary". In there, I group code into sections that make sense. Let's say I have a folder "Reports" and a folder "Helpers". I would like to have my code separated while ...

1 answer  ·  posted 7mo ago by raphaelschmitz‭  ·  last activity 6mo ago by raphaelschmitz‭

c#
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‭

75%
+4 −0
How to pass command line arguments when using cargo run?

When developing a rust program you build and run using cargo run. However you cannot just append arguments to that as they will be caught (and likely rejected) by cargo itself. So how to pass argum...

1 answer  ·  posted 7mo ago by Iizuki‭  ·  edited 2mo ago by Alexei‭

60%
+1 −0
How to delete a local branch in git?

How to delete a local git branch which hasn't been pushed to anywhere, and only exists locally?

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

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‭

62%
+3 −1
How do I remove an element from a Java array?

One way to remove element from array is to replace element with zero. Below is a rough snippet I am sharing: int N = sc.nextInt(); int pos = sc.nextInt(); int A[] = new int[N]; if(pos == i) { ...

1 answer  ·  posted 7mo ago by abhinavxyz‭  ·  edited 7mo ago by E_net4‭

71%
+3 −0
How do I pass field names containing dashes in dbt source yml file?

Working with dbt version 2 I'm trying to set up source checks but I'm running into an issue where the column names I'm setting tests for have dashes (e.g. my_table.some-field-with-dash). I current...

1 answer  ·  posted 7mo ago by Sigma‭  ·  last activity 7mo ago by Sigma‭

84%
+9 −0
Understanding mutable default arguments in Python

Consider this code example: def example(param=[]): param.append('value') print(param) When example is repeatedly called with an existing list, it repeatedly appends to the list, as ...

4 answers  ·  posted 7mo ago by Karl Knechtel‭  ·  last activity 5mo ago by matthewsnyder‭

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‭

50%
+1 −1
Is there a text version of pickle?

Is there a Python serialization format that has capabilities similar to Pickle, but is text based? The problem I always have with pickle is that it's binary, so I can't manually view or edit the d...

0 answers  ·  posted 7mo ago by matthewsnyder‭

33%
+0 −2
Help with android studio gradle [closed]

I need help figuring out if my dependencies need upgrading or conflict with each other. I tried using the command prompt to solve problems but it didn't help. Here is my code. Android Studio Iguan...

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

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‭

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‭

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‭