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)
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...
If I execute in browser console: document.write("Hello"); A new DOM document with the text Hello appears in the same browser window. From MDN documentation: Note: Because document.write() w...
By means of content management system architecture, Is the implementation of decoupling architecture (backend and frontend separation), headless architecture and Representational State Transfer (R...
docutils's rst2pseudoxml.py is reporting this error: Unknown interpreted text role "meth". even though the build command: sphinx-build -b html -d build/doctrees source build/html runs fine and pro...
I want to ensure I understand the following code; credit to user:m3g4p0p on Sitepoint, for this code: const walker = document.createTreeWalker( document.body, NodeFilter.SHOW_TEXT ) let...
Based on my last question comes new one. How to loop over 300 000 rows and edit each row string one by one? I have a list of 11-digit numbers stored in one single column in Excel, and I need to s...
I have a Looker table look displayed to users using SSO embedding in an iframe. When displayed to users, the users can access the column options menu via a cog-wheel dropdown. In Admin > Platfo...
I have a map and a new item to add to the map and a list of keys I want to attach the new item to: => m1 {:a 1 :b 2} => itm 3 => ks [:c :d :e] => m2 {:a 1 :b 2 :c 3 :d 3 :e 3} ...