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)
77%
+5 −0
Terms for types of functions with respect to side effects

Mathematically, the purpose of a function is to return an output. However, in a programming context functions often have side effects. It is even common to call functions for the side effects alone...

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

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‭

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‭

71%
+3 −0
Adding elements to wrapper after calling wrap doesn't work

I'm trying to do some DOM manipulation in jQuery, but am having issues with creating wrapper elements. For some reason, prepending to the wrapper doesn't work after I call wrap. Code <html>...

1 answer  ·  posted 1y ago by Moshi‭  ·  last activity 1y ago by Mithical‭

50%
+2 −2
How to group a flat list of attributes into a nested lists?

I have a flat list where each item is the key and value for an attribute. I want to transform this into a nested list where each attribute is a sublist. Example input: [ "attr1 apple 1", "a...

2 answers  ·  posted 2mo ago by aditya98‭  ·  last activity 1mo ago by matthewsnyder‭

71%
+3 −0
How do I get something similar to dictionary views, but for sequences?

The dictionary methods .keys(), .values(), and .items() all return view objects. Said objects reflect any changes to the underlying dictionary. This is often useful. Is there a way to get such a v...

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

77%
+5 −0
When should I parenthesize macro arguments in C?

I've seen macros use parentheses to enclose its arguments. Most of these make sense, as in #define sum(a, b) ((a) + (b)) The outer prevents the following: #define sum_bad(a, b) (a) + (b) ...

2 answers  ·  posted 6mo ago by alx‭  ·  last activity 6mo ago by Lundin‭

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‭

37%
+1 −3
We app is terminated automatically at Windows server

I've my go app the is running a web API and working smoothly at my laptop. I read this and completed the IIS setup using a config file: <configuration> <system.webServer> ...

0 answers  ·  posted 1y ago by hyousef‭

60%
+1 −0
Ignore NPM Modules Digital Ocean App Platform

There may be a better way to manage website's with JavaScript deployments. I added jest to my repo simply to execute tests when I make PRs as part of a GitHub action. This requires a package-lock.j...

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

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‭

77%
+5 −0
Programmatically import, edit and export DBC files

I am looking for a way to programmatically edit and save .dbc files that are meant for J1939 CAN communication. I have a few large files that need to be compared/edited. Being able to import, edit...

1 answer  ·  posted 10mo ago by HinkyDinky‭  ·  last activity 9mo ago by HinkyDinky‭

50%
+0 −0
How to change the color of a cell to a user defined value while keeping its existing style using NPOI from F#?

The answer provided in the How to set the cell color to a user defined value using NPOI from F#? thread solves the problem of how to set the right properties using F#, but it uses a new ICellStyle ...

1 answer  ·  posted 4mo ago by toraritte‭  ·  last activity 4mo ago by toraritte‭

84%
+9 −0
What is the point of pipx?

Background Many Python programs now recommend installing with pipx, and there is a sense that you shouldn't install with pip anymore, you should use tools like pipx. Main Question However, what ...

3 answers  ·  posted 8mo ago by matthewsnyder‭  ·  last activity 7mo ago by tripleee‭

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

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‭

41%
+3 −5
Building a language model completely from scratch

What I would like to do I would like to try to build a language model 100% from scratch if possible, for a learning experience. That means no external libraries and no pre-curated datasets. It ...

1 answer  ·  posted 3mo ago by Julius H.‭  ·  last activity 2mo ago by matthewsnyder‭

60%
+1 −0
How to call static methods in ColdFusion?

How to use static functions in ColdFusion? How to import component? How to call a static function using both tag and script syntaxes? Adobe added support for static functions in ColdFusion...

0 answers  ·  posted 9mo ago by Vanity Slug ❤️‭

60%
+1 −0
What is the difference between `static let` and `static member` in F#?

Taking the example from this Stackoverflow question: type Vector2D(dx : float, dy : float) = static let zero = Vector2D(0.0, 0.0) static let onex = Vector2D(1.0, 0.0) static let ...

1 answer  ·  posted 4mo ago by toraritte‭  ·  last activity 4mo ago by toraritte‭

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

75%
+4 −0
Replace leaf arrays with joined strings in a nested structure in jq

Consider the following arbitrarily-nested JSON as input to a jq filter: echo '[{"foo": [1, 2]}, {"bar": [{"baz": ["foo", "baz"]}]}]' | jq '.' My goal is to join leaf arrays into strings: [{"fo...

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

66%
+2 −0
Is it okay to use python operators for tensorflow tensors?

TL;DR Is (a and b) equivalent to tf.logical_and(a, b) in terms of optimization and performance? (a and b are tensorflow tensors) Details I use Python with Tensorflow. My priorities are Make t...

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

77%
+5 −0
How to move a tag in git?

I have created a tag in my project, using git tag v2023 However, I forgot to commit a few changes. Now I would like to move this tag to the current point (after having committed the changes I had...

1 answer  ·  posted 9mo ago by mr Tsjolder‭  ·  edited 8mo ago by meta user‭

66%
+2 −0
Can I package a database other than SQLite with a Flutter app?

Flutter supports packaging a SQLite instance with a Flutter app using the Sqflite plugin. I do not like the speed of SQLite or the fact that it does not enforce column datatypes and want to use som...

0 answers  ·  posted 10mo ago by tarhalda‭  ·  edited 10mo ago by tarhalda‭

75%
+4 −0
How to prevent Visual Studio Code from opening an extra blank window?

When I run code . in a directory, Visual Studio Code opens two windows. The first is empty, the second shows directory I was in as expected. I checked ~/.config/VSCode/Workspaces and there is only...

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

60%
+1 −0
How to find the existing default action for a UI gadget in factor

For a UI gadget like a $link in Factor, a click automatically opens the page that it points to. I want to know where this default behaviour is defined. In the factor documentation, there are many ...

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

75%
+4 −0
Why does `Zip` require `Semialign`

The Zip class from Data.Zip requires an implementation of Semialign: class Semialign f => Zip f In my mind: Zip takes the intersection of two shapes. Semialign takes the union of two sha...

1 answer  ·  posted 2mo ago by WheatWizard‭  ·  last activity 2mo ago by r~~‭

33%
+0 −2
Deep linking from another app isn't working for Amazon prime and disney+hotstar

It's not possible to send data to amazon prime and disney+hotstar. I was trying to send user to amazon prime when they click a (video) link (e.g. https://www.amazon.com/gp/video/detail/B01MSPI8JN/r...

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

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‭

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‭

75%
+4 −0
How to make Husky run git hook?

How to make Husky run git hook? I have a working git hook, prepare-commit-message, but the moment Husky was installed, the hook stopped working. Not finding much luck, I then tried to make it a "H...

1 answer  ·  posted 10mo ago by LAFK‭  ·  edited 10mo ago by Alexei‭

50%
+1 −1
How to migrate after SQLalchemy schema changes?

When I set up my object mappings with SQLalchemy, everything works well enough. It even creates the tables for me if they don't exist. However, if I decide to add/remove columns (aka fields) from ...

0 answers  ·  posted 11mo ago by matthewsnyder‭  ·  edited 11mo ago by Alexei‭

50%
+0 −0
How to define Polly policies when working with Refit library in ASP.NET Core?

Note: this is based on my question on SO and subsequent activity there I am trying to add resilience using Polly to HTTP calls that are performed using Refit library. I am using the Refit factory...

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

42%
+1 −2
Listen for key events in a CLI app

I have a Python program like this: done = False while u and not done: i = u.pop() print(f"Processing {i}") do_big_task(i) finish_up() Since this takes a long time, the user m...

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

71%
+3 −0
OpenGL: Pass a double vector from vertex shader to fragment shader

TL;DR: How to pass a interpolated double vector, such as a dvec2, from the vertex shader to the fragment shader? I have a vertex shader. In this the output variable out vec2 uv; is set. And i have...

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

33%
+0 −2
module not found error, I need this speech directory for this project to work. [closed]

--- Here is the error message. Traceback (most recent call last): File "c:\Users\19185\Documents\GitHub\Chatty\Chatty\one_.py", line 3, in import azure.cognitiveservices.speech as speechsdk Mo...

0 answers  ·  posted 4mo ago by KunningFox‭  ·  closed 4mo ago by Alexei‭

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

71%
+3 −0
How do I serialize a const generic length array with Serde?

I have the following code: use serde::{Deserialize, Serialize}; #[derive(Sereialize, Deserialize)] struct Container<const SIZE: usize> { contents: [String; SIZE] } But I'm getti...

0 answers  ·  posted 9mo ago by mousetail‭

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‭

83%
+8 −0
Is partial allocation of an object Undefined Behavior?

Is it valid to partly allocate an object, as long as you only use the allocated part of it? #include <stdio.h> #include <stdlib.h> struct s { int i[100]; }; int main(void) {...

1 answer  ·  posted 1y ago by alx‭  ·  last activity 1y ago by Lundin‭

71%
+3 −0
How can a Python program send itself to the background?

Is it possible for a Python program to send itself in the background? For example, on Linux you can do nohup some_cmd & and any program will run in the background. Some programs also support s...

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

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‭

66%
+2 −0
Using Lua's `os.rename` to rename a file from a hard drive to a new location on a USB flash drive

I'm using the os.rename function in a lua script. It works perfectly fine for renaming files on my hard drive, e.g. os.rename("test.txt","/Users/username/Desktop/test2.txt") will rename the fil...

1 answer  ·  posted 1y ago by samcarter‭  ·  last activity 1y ago by Peter Taylor‭

77%
+5 −0
Can freed pointers undergo lvalue conversion?

char *p, *q; p = malloc(1); free(p); q = p; // lvalue conversion Is the last lvalue conversion (= p;) Undefined Behavior or not? We didn't take the address of the local p. C11::6.3.2.1...

2 answers  ·  posted 1y ago by alx‭  ·  last activity 1y ago by Dirk Herrmann‭

66%
+2 −0
TeamCity build variables

I want to pass a variable to TeamCity (on prem) to choose between deployment environments (there are 14 of 'em - don't ask) when running a TC deployment configuration build which uses a PowerShell ...

1 answer  ·  posted 1y ago by mcalex‭  ·  edited 1y ago by Alexei‭

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 4mo 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 6mo ago by Michael‭

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