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 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...
In Git documentation, there are lots of references to the term "HEAD". But what exactly is it? Some places refer to it as "a pointer to the current branch". So it's a branch? What is it used for?
Despite the fact that I have programmed against SQL Server for quite a while I did not pay much attention to the tempdb database. This is especially true if application logic is mostly written usin...
I have recently stumbled across the Maybe (or Optional) modal usage in .NET Code: example code or this one example article Based on everything I read, there are multiple advantages on relyi...
Angular 12; .NET Core 3.1 Following a code-maze tutorial, I have a working authentication (registration/login) service using .NET Core Identity. After login, I would like to add 'username' data ...
There is an external program I'm calling from within my C/C++ program, by using fork() and execl(), and redirecting the stdio with dup2() to be able to read the output from the external program. I...
I often work bidirectional text in content management systems and often that text has parenthesis (()) or other textual wrappers flipping after an English text which is preceded in itself by some R...
Now I build a Python script to execute automaticaly a dynamic analysis on apk and I block because I use this library and call objection. When I run my script, the objection command creates an inst...
I understand that innerHTML does all the following actions: It makes the element we work on (or even the entire DOM tree that we work on if that element is <body>) to be copy-pasted into a...
I had found a better way to plot in Java. int n = Integer.parseInt(args[0]); // the function y = sin(4x) + sin(20x), sampled at n+1 points // between x = 0 and x = pi ...
I was trying to plot using following lines in C++. #include "koolplot.h" int main() { plotdata x(-6.0, 6.0); plotdata y = sin(x) + x/5; plot(x, y); return 0; } When I was...
if (type=="dialer") { String timestamp = list.get(position).get(Constants.DATE); holder.txtTimestamp.setVisibility(View.VISIBLE); holder.imgDelete.s...
<?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> <svg version="1.1" id="Capa_1" x="0px...
I define a software event as any state of a program to which we can probably respond. In JavaScript, how does event delegation differs from more simple and probably more common event handling patt...
What is pathData? I was thinking to convert SVG to XML. I found it. In the code, I had seen that android:pathData="M 64 2 C 98.2416544895 2 126 29.7583455105 126 64 C 126 98.2416544895 98.2416544...
I was installing Java yesterday. I had faced lot of problem. I had fixed most of them. But I had changed Hash that's what I think. I don't remember which command I had executed since I had executed...
MarkFuncs has really gotten huge progress, at least in my eyes, and now, I want to make math possible in the language. Background MarkFuncs is a programming language that I have been working on f...
If I have a one-dimensional array, I can get the length of it quite easily: var x = moves.Length(). However, if the array is multi-dimensional, .Length() returns the total number of elements. If ...
I was trying to install Netbeans in Xubuntu. I had installed Netbeans using Snapd. sudo snap install netbeans --classic I was trying to start Netbeans then I got an error which was looking like...
Could not find com.github.Kunzisoft:Android-SwitchDateTimePicker:1.9. Required by: project :app Search in build.gradle files I was trying to use the library. I had searched for 2.1, 2.0 a...
query = "CREATE TABLE "+TABLE+" ("+COLUMN1+" INTEGER PRIMARY KEY NOT NULL AUTO_INCREMENT, "+COLUMN2+" VARCHAR(255), " + COLUMN3+" VARCHAR(255), "+COLUMN4+" TEXT, "+ COLUMN5+" VARCHAR(255)...
What's the better way to store base64 in SQLite Database? I was thinking to put base64 as TEXT since base64 has lots of chars. CREATE TABLE name (id INTEGER PRIMARY KEY AUTO_INCREMENT, image TEXT)...
In the code below, the value of order variable should change according to i's value: String order; switch (i){ case 0: order = CallLog.Calls.DATE + " DESC "; contactViewAda...
In my browser's JavaScript console I can add to the <body> element one file (index.html) with the following AJAX code: const whereToLoad = document.querySelector("body"); const ajax = new X...
I have a .html file containing only the following data, and I keep that file on top of my website's directory. <link rel="stylesheet" href="./css/mobile_general_structure.css"></link> ...
This is the worst bug I have ever seen.. I was fetching CallLogs following way. ArrayList<HashMap<String, String>> callLog= new ArrayList<>(); HashMap<String, Strin...
managedQuery is recently deprecated. ManagedQuery was used for using Cursor. What should I use since managedQuery was deprecated? Without it, I can't work with Cursor. So there must be alternative ...