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)
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 ...
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 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....
I want to enter a string to compare with the text file, and if that word matches, then I want to delete that line containing that string. How can I modify the code below, since the code below take...
I have a Python script that needs to access some data (or configuration) file in its very own folder. For example, say script.py does something like this: with open('data.txt') as file: data ...
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 ...
I have two tables: Table1: Name Description Amount 123 Description123 123 456 Description456 456 789 Description789 666 101 Description777 101 133 De...
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 ...
So I just started learning how to use file-streams in C & decided to attempt a question which is to do with library management in C, however I am currently encountering some problems and feel l...
I have two strings and want to remove every occurrence of the second string inside the first one starting from the beginning of the first string and as if each occurrence was removed immediately. ...
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...
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<...
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...
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...
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...
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...
I'm attempting a question to do with data structures, file streams & linked lists. The code isn't complete yet as I am still halfway working on it. I am required to use data structures in the d...
#include<stdio.h> #include<stdlib.h> int main (void){ FILE *cfPtr; char name[15]; int ID; if ((cfPtr = fopen("draft.txt","w")) == NULL){ printf("File could n...
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...
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> ...
What does ptr() mean in this code? #include<stdio.h> #include<stdlib.h> void PrintHello() { printf("Hello\n"); } int Add(int a, int b) { return a+b; } int main...
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 ...
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...
What exactly does the static keyword do in C? I have seen it used in several diverse contexts: 1) As a variable outside a function: #include <stdio.h> static int x = 5; int main (void) ...
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...
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...
This revolves around images. I'm trying to write an HTML page of COVID-19 safety procedures, and here's what I've written so far: <!DOCTYPE html> <html> <head> <title&...
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...
The following list comprehension worked when I tried it: [num for num in hand if num != 11] But this doesn't work: [num for num in hand if num != 11 else 22] It gives a SyntaxError, highlightin...
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} ...
Preface: This is a self-answered Q&A meant as a C string handling FAQ. It will ask several question at once which isn't ideal, but they are all closely related and I'd rather not fragment the p...
I want to change the font-family of all elements in a document with JavaScript. I have tried this: document.querySelectorAll("body").forEach( (e)=>{ e.style.fontFamily = "arial"; }); ...
In PHPMyAdmin 5.1.1 I have created a user account and a database with the same name and granted all privileges to the user on that database. I have exported the database to a backup file, deleted ...
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 have a "Our menu" webpage automatically created with Drupal 9 Views module which presents a miniature version of each menu dish webpage in that "Our menu" webpage (illustration image below). My ...
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 list of 11-digit numbers stored in one single column in Excel, and I need to separate the digits according to this pattern: 2-2-1-3-3. Example: 00002451018 becomes 00 00 2 451 018. How c...
I am building an MVC cart system. I have the MERCHANTS table and the PRODUCTS table. A merchant (store) can have one or more products, everything works fine but what I want is to display products b...
I spend a lot of time writing CLI tools in Python, and I would like to support tab-completion in a style similar to Git. For example, subcommands should be tab-completable, options should expand ba...
I often see the construct if __name__ == '__main__' in Python code. For example, the queens.py demo in the Python repository ends with these two lines: if __name__ == "__main__": main() Ho...
I manage a wsgi application that accepts JSON data via POST from potentially untrusted sources. Normally it is treated as a text blob and never parsed, but there is a value in the expected input th...
The context A reports related process is directly reading the production operational database once about two hours. This involves reading all the data from some 70 tables which takes a couple minu...