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)
28%
+0 −3
How would I go about chunk loading around player in a 3 dimensional cartesian coordinate space [closed]

So I am in the process of creating a voxel sandbox survival game (minecraft clone) in javaFX. I am at a point where I need to come up with a way to load the chunks in my surrounding given a render ...

1 answer  ·  posted 1y ago by cuzzo‭  ·  closed 1y ago by cuzzo‭

66%
+4 −1
How can I build a string from smaller pieces?

Suppose I have some variables like: >>> count = 8 >>> status = 'off' I want to combine them with some hard-coded text, to get a single string like 'I have 8 cans of Spam®; b...

2 answers  ·  posted 9mo ago by Karl Knechtel‭  ·  last activity 9mo ago by Karl Knechtel‭

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‭

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 8mo ago by Karl Knechtel‭  ·  last activity 5mo ago by matthewsnyder‭

66%
+2 −0
Log4j2 not looking for log4j.properties even with the system property set

I am migrating an application from Log4j1 to Log4j2 using the API bridge jar. All references to the log4j1.jar have already been removed. I set the system property in Websphere as a JVM argument -...

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

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 10mo ago by andre‭  ·  edited 10mo ago by andre‭

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‭

66%
+2 −0
How to automatically add package reference into project file after installing .NET package?

Just getting into F#, finally figured out how to add .NET packages to projects, but the way I managed to get it to work doesn't make sense. Once the package is installed (either with nuget or paket...

2 answers  ·  posted 6mo ago by toraritte‭  ·  last activity 6mo ago by toraritte‭

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‭

60%
+1 −0
How to solve the "ReferenceError: service is not defined"?

Temporary notice: this is part of an ongoing project of transferring and splitting my canonical from Stack Overflow on common errors in Google Apps Script. As soon as the Q&As are finalized, ...

1 answer  ·  posted 9mo ago by Oleg Valter‭  ·  last activity 9mo ago by Oleg Valter‭

42%
+1 −2
How to generate random objects at different locations on x, y, z axis

I have been trying to generate a random object on all three axis in different locations. However, Vector3 doesn't accept that many overloads e.g: Vector3 spawnPos = new Vector3(Random.Range(spawnL...

1 answer  ·  posted 1y ago by simonJN‭  ·  last activity 1y ago by deleted user

75%
+4 −0
How to use self referential N-M relationship to make 2 users friends using RedBean PHP ORM?

I am working with PHP and RedBean PHP ORM. I have a table user like so: id | username ---|--------- 1 | Alice 2 | Bob I want Alice and Bob to become friends. So I want to create M-M juncti...

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

66%
+2 −0
"Move symbol" refactor for Python in Visual Studio Codium

Is there a way to add support for "move symbol" in Python code for VS Codium? PyCharm can do this, but I am looking for a VSC solution. PyLance can do this, but PyLance itself is closed source, a...

0 answers  ·  posted 10mo ago by matthewsnyder‭  ·  edited 9mo ago by matthewsnyder‭

33%
+0 −2
How to distinguish between single and multiple file media?

In a media manager I have database tables for files, media and collections. When a user is browsing a collection I want there to be links to see the metadata for single file media like books, movi...

2 answers  ·  posted 1y ago by filosoful‭  ·  last activity 1y ago by r~~‭

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‭

80%
+6 −0
Why is git merge from rather than to?

Why does git merge take the source branch rather than the destination branch as a parameter? The most common merge case by far for me is "Okay, this branch looks good, let's merge it into branch X...

4 answers  ·  posted 9mo ago by matthewsnyder‭  ·  last activity 9mo ago by hkotsubo‭

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 6mo ago by TecBrat‭  ·  last activity 5mo ago by TecBrat‭

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 9mo ago by Ivan Nepomnyashchikh‭  ·  last activity 9mo ago by mr Tsjolder‭

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

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#
57%
+2 −1
What should I read if I knew C++ twenty years ago? [closed]

For someone who was familiar with C++ in the past and is coming back to it after a long break, what are some useful books that won't waste time with basics but will cover the new features of the mo...

0 answers  ·  posted 1y ago by Fred Wamsley‭  ·  edited 1y ago by Alexei‭

c++
71%
+3 −0
Why is boolean value f (false) defined as a parsing-word while t (true) is not in Factor?

I noticed when attempting to generate random booleans that t and f are not treated in the same way: t random ! Error f random ! returns a value In the factor 0.98 and 0.99 documentation, t is ...

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

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‭

77%
+5 −0
Keep local branch changes to resolve all remaining conflicts in a merge

On branch-x, I do git merge branch-y Now there are some conflicts, and git status shows Changes to be committed: new file: a new file: b Unmerged paths: (use "git a...

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

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‭

60%
+1 −0
Datagrid in MVVM saves edits but not inserts

I am writing a todolist application in WPF with MVVM. I display the goals in a datagrid and the editing works fine. Changes made in the grid are saved to the DB when I click save. However, adding a...

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

66%
+2 −0
Reaching to a directory in git-bash

I have created a directory named Temporary_add_to_version_control on Desktop. Now I am trying to reach that directory by typing the following in git-bash: cd ~/Desktop/Temporary_add_to_version_con...

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

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

77%
+5 −0
Can GitHub rewrite authorship of commits?

GitHub has a setting wherein they offer to "anonymize" your user email from, say, somebody@example.com to somebody@users.noreply.github.com. I presume this is to prevent you from getting spam from ...

1 answer  ·  posted 5mo ago by Michael‭  ·  edited 5mo ago by matthewsnyder‭

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‭

75%
+7 −1
How can I provide additional information when raising an exception?

Suppose I have some code like: filename = "bad_dir" print(f"File not found: {filename}.") raise(FileNotFoundError) When the exception isn't caught, the stack trace is printed at the end of ...

2 answers  ·  posted 1y ago by mcp‭  ·  edited 3mo ago by Karl Knechtel‭

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

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

80%
+6 −0
How to use function composition for applying a function to first elements of a list?

Can anyone explain to me why my Haskell function gives rise to a type-definition error? Originally, I wrote the following function to subtract one from the first n elements in a list: dec_first :...

2 answers  ·  posted 10mo ago by mr Tsjolder‭  ·  last activity 10mo ago by mauke‭

22%
+0 −5
Solution E-Commerce de Paiement [closed]

Salut, quelle solution de paiement e-commerce avec 0% de commission me proposerez vous ?

0 answers  ·  posted 1y ago by Bicano‭  ·  closed 1y ago by Monica Cellio‭

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 trigger an error/warning immediately upon compile/run if an item on my class-path is missing

I have a very simple source file -- HelloWorld.java public class HelloWorld { public static void main(String[] args) { System.out.println("hello world"); } } I have th...

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

66%
+2 −0
Resolving "fatal: Unable to find remote helper for 'https'" and a warning about templates

On a live boot of Ubuntu 20.04, I was trying to clone into a private GitHub repository. I went through the hassle of installing git, and then gh, and making sure I was signed in through the termina...

0 answers  ·  posted 9mo ago by Mithical‭

git
60%
+1 −0
org.apache.http.NoHttpResponseException: nginx.apps.cloud.cloud.local:443 failed to respond

Getting the following error only when I call a post API through Nginx [0m[31m12:48:35,903 ERROR [io.acurio.hub.api.rest.impl.DesignsResource] (default task-16) Failed to invoke workflow: com.masha...

0 answers  ·  posted 1y ago by SmartestVEGA‭

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‭

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‭

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‭

85%
+10 −0
What is C23 and why should I care?

The C language has gone through many iterations and the latest one not yet released is informally called "C23", supposedly because they hoped to release it in 2023. The latest draft version N3096 i...

1 answer  ·  posted 9mo ago by Lundin‭  ·  last activity 9mo ago by Lundin‭

c c23
75%
+4 −0
Can Matlab packages have subdirectories?

I'd like to organize my Matlab packages into folders. However, if I try to lay out my code like this +MyPackage |---foo.m |---SubDir |---bar.m then I'm unable to reach bar. F...

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

77%
+5 −0
How can I properly type-hint methods in different files that would lead to circular imports?

I am writing a Python package where I have two classes in different files that (indirectly) depend on each other. If I wouldn't care about type-hints, there would be no problem, but unfortunately,...

2 answers  ·  posted 9mo ago by mr Tsjolder‭  ·  edited 8mo ago by Alexei‭

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 7mo ago by Iizuki‭  ·  last activity 6mo ago by Basile Starynkevitch‭

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

66%
+2 −0
Why is IntelliJ not finding these modules?

So to preface I started a new JavaFX project in IntelliJ and all of this is from what was auto-generated out of the box. The modules I'm having trouble with are Edit to make this post more query...

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