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)
I have this bootstrap code (grid) <div class="container p-3 center"> <div class="row"> <div class="bg-light border-bottom border-secondary border-top col-6 te...
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...
I have noticed that lots of projects (both in real-world and within online courses) use Automapper to map domain models to view models, API models. The main advantage seems to be convenience by re...
I am trying to create an app with two toolbars on top and a specific collapsing/expanding behaviour on scrolling. See the mockup to get a deeper understanding of what I'm trying to achieve: I fo...
A person I used to work with several years ago was hired to rewrite a product using a .NET-based modern tech stack. One of the aspects that stroke me was that he believes that the product should mo...
I have not used a database trigger in years in the projects of the teams I have worked in, but I have seen them being used by other teams. Back in 2009, it seemed like a heated debate, but I am wo...
Agner Fog has this C++ Vector Class Library, which is ... useful for improving code performance where speed is critical and where the compiler is unable to vectorize the code automatically in an...
Suppose I am using a Java API from Kotlin and I want to call a function that takes a FloatArray (represented as float[] in Java), and I have an Iterable<Float> as my input data type. To be mo...
I understand that in object-oriented programming, an object is an instance of a class. If it's an instance, I misunderstand why does it need the term object at all (we could just say "instance"). ...
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...
I am trying to listen to the event in which the keyboard key containing the Hebrew final-letter ך is pressed. This key stands for both the English letter L and the Hebrew final letter ך. If my op...
I've seen some regular expressions (regex) using \s when they want to match a space, but I noticed that it also matches line breaks. Example: the regex [a-z]\s[0-9] (lowercase ASCII letter, follow...
What (if anything) does the C standard have to say about linking objects? My guess is that, because C only defines language->behavior rules, it completely ignores any potential intermediate form...
Can anyone help me, I'm currently learning pointers, this is the code I wrote to try and insert a node at the beginning of the list. However at the part where I included the comment of "error at th...
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...
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...
We use Jenkins Pipeline to build and test some C++ software. The pipeline script runs the tests on 10 different nodes in a parallel way in order to save time. All of these nodes are real (not virtu...
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...
I recently told a friend that malloc(n) allocates and returns a pointer to a block of at least N bytes of memory, as opposed to exactly N; that it is allowed to allocate 'extra' memory to meet e.g....
One of the legacy applications our team manages contained the following pattern (in the controller): // initialization private readonly IServiceScopeFactory _serviceScopeFactory; public FooCon...
A few of my services rely on LazyCache and they use it by injecting IAppCache. For unit testing, I would like to mock this. I have found MockCachingService, but it does not do any caching (as spec...
In git I branched feature-A from master. To reduce eventual merge conflicts later, I branched feature-B, which heavily overlaps and depends on A, from feature-A. A build of the feature-B branch s...
I have an ASP.NET Core 5 web application that provides functionality that involves file upload + rather large processing (memory consumption mainly). After each processing (with success or not) the...
I have an array that I need to clone in Angular / Typescript. That is, any change done on an element from the cloned array should not affect the content of the initial array. How can I achieve thi...
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...
I'm trying to connect to a db file in my project but having some troubles. I'm using JDK 14 with ojdbc11 however I am still getting this when trying to connect: java.lang.UnsupportedClassVersionEr...
I'm using git for LaTeX projects and am in a little dilemma about how to best ignore files. if I add *.pdf to my .gitignore file, I keep forgetting to force add included graphics if I don...
I have a website with a search box. Running search queries in that search box creates frontend/dynamic search result webpages in which search results based on a search query can appear. Let's ass...
Let's say I have some collection of data. My goal is to provide different kind of view of ItemsControl depending on user`s preference. For simplicity, we can assume that user can select only betwe...
Our team is currently transferring all functionality (+ some changes) from small and very old project A (almost code freeze) to project B (actively developed). As part of the data migration, there ...
Consider the following code: #include <stdio.h> int main() { int a = 5; int b; ++*(&b + 1); printf("%d\n", a); return 0; } The output is as expected: 6 ...
I get the concept of the heap sort algorithm and its like first you have a heap(ordered binary tree) then we have the Max heap which has the highest element value in the array at the top of the tre...
I have an iframe tag to which I didn't set height so it has a default height which is 150px (at least in Google Chrome). As a consequence, the iframe appears partially in such a way that constant ...
Could someone explain this part of the coding for data structures & linked list? I actually got this code from a textbook but no matter how I read the textbook, I still don't get the concept &a...
I use the following backend (PHP) pattern to send email. I consider to start sending email by Ajax but I would still need to store my email address in some backend file (say, a PHP file) so it won...
I am trying to submit a form with Ajax from a well-configured shared hosting environment. Emails don't arrive to my email client although I have already sent emails without Ajax from this environm...
Issue I have recently discussed with a friend a performance issue he and his colleagues have encountered in an ASP.NET Core 5 application (a checkout app, microservices architecture). The problem...
I am trying to re-build an unpacked apk, because it was unpacked the required libraries are already included, deleting the prepacked libraries would be feasible if it weren't for the fact that some...
I would like to delete a book from the collection by a particular title from my library if the user enters 2 as input for my switch statement. How can I do that with my current code? #include<...
One of the recent business requirements is to be able to search through a list of entities using a bunch of filters. Most of these filters allow multiple values and the user might theoretically pro...
I need to apply backend behavior (PHP directives in my case) to an HTML <form>. The backend behavior I wish to apply to the form is in this pattern (behavior.php): <?php $name = $_POST...
Is there any way where I can modify the original server code so that it accepts any port number instead of the predefined one (i.e., port number 8989)? Port number will be entered in the command li...
Question: There is a list of integers in an array (3,2,1,5,6,4), sort this list in both ASCENDING & DESCENDING order. Create a sort function. #include<stdio.h> #include<stdlib.h> ...
Hey, regarding a question on returning pointers as functions, why does my code produce this error & won't print out the sum = 6? #include<stdio.h> #include<stdlib.h> int *A...
I try to exactly match a login page in a website, for a user script manager (USM) script, which I run with Tampermonkey. This pattern didn't work: // @match https://example.com/#/login ...
Summary I'm building an internal system (hardware simulator, using Rust) to help test some Python-based services that talk to hardware. (The services talk to hardware via TTYs.) To trick the Pytho...
I have added some input to an input field element this way: const inputFiled = document.querySelector("#example"); inputField.value = "X"; I want to fire a change event for that field right af...
In a website I didn't build, I want to put a value in an HTML input field element with JavaScript and to also use it as-putted. I can put it with the browser console this way: document.querySelec...