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
C++ exit code -1073740940 [closed]

What means the exit code -1073740940 in C++?

2 answers  ·  posted 2y ago by always_improve‭  ·  closed 2y ago by Alexei‭

71%
+3 −0
Conditions which always matches returns no result with CTE

I have the following scenario (in MySQL 8): CREATE TABLE `steps` ( `id` int NOT NULL AUTO_INCREMENT, `number` varchar(30) DEFAULT NULL, `parent_number` varchar(30) DEFAULT NULL, `timestamp` ti...

1 answer  ·  posted 2y ago by artaxerxe‭  ·  edited 2y ago by Alexei‭

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‭

28%
+0 −3
What is [{options}] in JavaScript?

I am trying to understand this code: const iframes = iFrameResize( [{options}], [css selector] || [iframe] ); The code can be found in this documentation. Is [{options}] an array of objects an...

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

60%
+4 −2
Watertight Mesh Representation

A watertight mesh is one which does not have holes, and for which each face has a designated inside and outside. Such a mesh can be "tetrahedralized", has a defined volume, and can be an operand in...

0 answers  ·  posted 2y ago by Josh Hyatt‭  ·  edited 2y ago by Josh Hyatt‭

77%
+5 −0
noreturn function with non-void return type

Is it legal ISO C to declare a function as noreturn with a non-void return type (but of course not actually returning)? As far as I can read from the standard, it seems legal. Example: noreturn ...

1 answer  ·  posted 2y ago by alx‭  ·  edited 2y ago by alx‭

71%
+3 −0
How to compress columns of dataframe by function

Problem How can I compress each column of a dataframe to the output of a function (i.e., mean), preserving columns? MWE import pandas as pd data = {"A": [1, 2, 3, 4], "B": [5, 6, 7, 8]} ...

2 answers  ·  posted 1y ago by mcp‭  ·  last activity 9mo ago by mr Tsjolder‭

66%
+2 −0
Why is my last input box not centering (class: powerwall-battery-input)?

I found a form I wanted to duplicate on a roof construction website. All my input boxes are centered except the last one that's a bit off and I cannot figure out why. Here is my code: HTML <...

1 answer  ·  posted 2y ago by WannaBeAWebDev‭  ·  last activity 2y ago by meriton‭

42%
+1 −2
How to create an object, call one of it's methods and pass it as an argument as a oneliner?

Assume I have this class Foo class Foo { private int x; void setX(int x) { this.x = x; } } And I have a Junit test like this: Bar bar; @BeforeEach void setu...

3 answers  ·  posted 2y ago by klutt‭  ·  last activity 2y ago by Alexei‭

75%
+4 −0
How to configure .gitignore to ignore all files except a certain directory

MWE In the terminal run: mkdir mwe cd mwe mkdir dir touch f1.txt f2.pdf dir/f1.txt dir/f2.pdf git init . Create a .gitignore with: * # ignore all !dir/ # except this directory ...

1 answer  ·  posted 2y ago by mcp‭  ·  last activity 2y ago by Moshi‭

81%
+7 −0
PGP sign emails sent with git-send-email(1)

How can we use git-send-email(1) to sign patches (emails) with the gpg(1) keyring? I've heard it can be done, but couldn't find anything in the git-send-email(1) documentation nor in a web search.

3 answers  ·  posted 2y ago by alx‭  ·  last activity 7d ago by alx‭

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‭

62%
+3 −1
How do I strip file extensions from URLs with H2O?

I'm trying to use H2O to serve a multi-file PHP website without routing—just having a separate PHP file for every page. The relevant part of my H2O config currently looks like this: paths: "/":...

1 answer  ·  posted 2y ago by Ullallulloo‭  ·  last activity 2y ago by jminer‭

77%
+5 −0
What is the Python Global Interpreter Lock?

What exactly is the Python Global Interpreter Lock (GIL)? As someone who is relatively new to Python, is this something I need to be aware of, or is this just some implementation detail of the inte...

1 answer  ·  posted 1y ago by Moshi‭  ·  last activity 1y ago by Derek Elkins‭

85%
+10 −0
How to properly use malloc?

I have seen this construct quite a lot: int *p = (int*) malloc(n * sizeof(int)); Is this how it should be? What is the proper way to use malloc? I have also seen this: int *p = malloc(n * size...

3 answers  ·  posted 2y ago by klutt‭  ·  last activity 9mo ago by Lundin‭

71%
+3 −0
Detecting if a user has stopped interacting with a web view for a certain time

I am interested in finding out all the aspects I need to cover in order to correctly assess if a user has stopped interacting with a web page. So far, I found the following: Idle Detection API -...

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

40%
+2 −4
Child process works only once after the parent's two calls to scanf

This program creates a child process and shares two integers (base and height) through the shared memory. The parent process asks four times to insert two integers and wait for the child process t...

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

50%
+0 −0
Migrating HTML strings to a more secure alternative

Our team will have to migrate an old application to use a new tech stack. One of the features involves the usage of HTML editors which serialized the content as HTML and I am able to see valid HTML...

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

28%
+0 −3
How to implement "Loss leader" marketing pattern in ecommerce websites? [closed]

Loss leader is a marketing pattern implemented in stores: A customer enters a store and while heading to some most desired expensive products far from entrance, that customer picks some products s...

0 answers  ·  posted 2y ago by deleted user  ·  closed 2y ago by Alexei‭

77%
+5 −0
How to open a file and edit its content in groovy script

I have a Makefile in my Jenkins job's workspace, that I want to edit out certain parts from and then save it, before running next part of the script that uses this Makefile. The part that I want t...

2 answers  ·  posted 2y ago by Megan‭  ·  last activity 2y ago by Alexei‭

25%
+0 −4
how do i fix this code [closed]

this is my build.gradle.app file: plugins { id 'com.android.application' } android { compileNdk flutter.compileNdkVersion compileOptions{ sourceCompatibility Ja...

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

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‭

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
How to set FontFamily for an entire WPF application in a theme?

I have a project Anonymised.Theme which contains XAML resource dictionaries for a theme. This is used by about a dozen applications which simply include it by merging <ResourceDictionary Source...

2 answers  ·  posted 2y ago by Peter Taylor‭  ·  last activity 2y ago by aresavatar‭

50%
+2 −2
Manipulate a web browser to hide a certain HTML element in a certain website by a single action

Before I publish a new webpage in my website (in the content management system itself), I zoom in from say 100% zooming to 500% zooming and then re-read it, as a nice way to check for typos. The p...

2 answers  ·  posted 2y ago by deleted user  ·  last activity 2y ago by bta‭

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
How do I get an animation from another source playing through hovering?

I was tasked with an assignment where I should get a box to move to the 4 corners of the viewport by hovering on a button. Most of the code is already finished except for figuring out how to get th...

0 answers  ·  posted 2y ago by General Sebast1an‭  ·  edited 2y ago by General Sebast1an‭

37%
+1 −3
Java cannot find class within same package

I've written a class object, QueueObject, but when I try to construct it inside of my main class, it says it cannot find the symbol on compilation. I've read lots of pages saying how misspellings o...

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

50%
+0 −0
MediaWiki JavaScript way to view the history of a page

I wish to view the revision-history-webpage of a webpage in MediaWiki without the conventional button to do so (I've disabled that button for aesthetic reasons). Please disable the MediaWiki View ...

1 answer  ·  posted 2y ago by deleted user  ·  last activity 2y ago by deleted user

60%
+1 −0
How to generate lots of hyperlinks rather fast using ClosedXML library?

I am using ClosedXML library to generate an Excel containing thousands of hyperlinks using cell's Hyperlink property: cell.SetValue(text).Hyperlink = new XLHyperlink(url); Such a call takes abo...

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

66%
+2 −0
Rationale of using database-level transactions inside a store procedure when application layer already manages a transaction

One of the legacy applications my team has to maintain has almost always this pattern for dealing with data modification: try { // get the connection // begin transaction // optional...

0 answers  ·  posted 2y ago by Alexei‭  ·  edited 2y ago by Canina‭

77%
+5 −0
Child div doesn't inherit parent's div background-color

I have a parent div with two child divs. I want the parent div and the child divs to have a blue background color when it's hovered. But the child divs doesn't inherit the background color. It is o...

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

50%
+0 −0
How to get rid of HTML tags and convert entities in SQL Server?

I have to migrate a bunch of text from an old application into a new one. Some of these texts contain HTML tags and entities (HTML editor was used) and now they do not want to support this in the n...

2 answers  ·  posted 2y ago by Alexei‭  ·  last activity 2y ago by gbjbaanb‭

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

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‭

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‭

80%
+6 −0
TypeScript is unable to infer the correct type for a mapped tuple

I was playing around with mapped tuples and came across an interesting case where TypeScript cannot infer the types used: interface Foo<A, B> { (a: A, b: B): any } function test<...

0 answers  ·  posted 2y ago by Moshi‭  ·  edited 2y ago by Moshi‭

57%
+2 −1
How can the Caesar cipher be implemented in Java?

The Caesar cipher is a substitution cipher in which the letters of an ordered alphabet are cyclically shifted by a given number. A detailed description can be found e.g. here. Let u be the index o...

2 answers  ·  posted 2y ago by Holden‭  ·  last activity 2y ago by hkotsubo‭

42%
+1 −2
How to solve missing JAR files error from Ant

I keep getting this error: Cause: the class org.apache.tools.ant.taskdefs.optional.ssh.SSHExec was not found. This looks like one of Ant's optional components. Action: Check that the ap...

1 answer  ·  posted 2y ago by Megan‭  ·  last activity 2y ago by Megan‭

75%
+4 −0
Is it possible to write protocols for enumerations in Python?

Having recently learned about protocols in Python, I now wonder if you can write a protocol for enumerations. That is, a protocol that says that you are supposed to pass an enum that has certain it...

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

22%
+0 −5
Replit particles push instead of being background [closed]

I am working on a replit https://AppropriateMessyRoutes.ozabramo.repl.co and I am trying to implement https://github.com/VincentGarreau/particles.js as a background but I keeps on pushing every...

1 answer  ·  posted 1y ago by ObviousPlays‭  ·  closed 1y ago by Alexei‭

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‭

75%
+4 −0
Appropriate HTTP status code for "user confirmation required"

I'm working on a system where the frontend will make a call to the backend to perform an action. Sometimes this action can cause other unintended consequences (like charging the customer), in thes...

2 answers  ·  posted 2y ago by Welz‭  ·  last activity 2y ago by Alexei‭

62%
+3 −1
cannot initialize a variable of type 'CFDictionaryRef'

Background story: I'm on mac OS 11.6 and would like to access an identifier for the current space/desktop from the command line. I found a helpful article at https://ianyh.com/blog/identifying-spac...

1 answer  ·  posted 2y ago by foobar‭  ·  edited 2y ago by Alexei‭

60%
+1 −0
Where is the "Just My Code" debug option in Visual Studio Mac?

Title says it all. I found "Step into external code" but not sure if it's the same feature.

0 answers  ·  posted 1y ago by user34567‭

77%
+5 −0
Using nested paths vs. flat ones for API resources

This is based on a code review discussion that I had with a colleague about the way I have designed the resources paths for an ASP.NET Core controller that is currently consumed only internally (by...

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

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
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
How would I avoid textures being blurred when mapped to a TriangleMesh?

I am making a game using JavaFX and the Fxyz library. I have chunks which are made of Point3D's, these points are then passed to a ScatterMesh and that is used to generate a TriangleMesh so I can m...

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

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‭