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 recently contributed to a Clean Code project and had a discussion about how to implement unit tests. The project author argues for using an in-memory database (which easily replaces the rea...
I have line-based data on the form x1=y2; a3=b4; c5=d6; ... Matching this with a extended regular expression is fairly straightforward; for example, one can do something not entirely dissimilar...
I am currently making a userscript to interpret the APL programming language in a Stackexchange chat window. This is the code I have come up with: // ==UserScript== // @name APL chat // @ver...
For my purposes, it is secure enough to use passwords to execute MySQL commands on the command line, what I would like to do is disable the warning that says, mysql: [Warning] Using a password on ...
So,I'm having a doubt when I call std:async() on a member function of a class. The book I'm reading says (emphasis mine) You can also pass a pointer to a member function to async(). In that case...
Consider this code: while(arr[index] != 0) index++; vs while(arr[index] != 0) { index++; } Personally, I prefer the first. The fact that the braces are not needed makes them -- u...
I am cleaning up java code in vscode to make it more readable. When I format my document there are instances when vscode inserts new line character when I don't want it. Here I show 2 examples of w...
I have been using open-source software, and the open-source Community is great at maintaining such projects. But I have observed something in smaller open-source projects. Whenever I demand some f...
When looking for Perl modules to handle JSON strings and/or documents, I found JSON::PP and JSON::XS. The documentation of JSON::PP says it is compatible with JSON::XS. What do these suffixes me...
I'm facing rsync full syncs every once upon a time, I think it's because DST, notice an hour of difference: $ ls -l tier2/VIDEO-2020-06-17-15-10-27.mp4 /Volumes/KINSTON2/dat/laptop_kinstones/tier2...
Are there practical reasons for designing/implementing a method(s)-only class/object? Follow-up background notes: This question is for languages that are not exclusively Object-Oriented, for exam...
When I review JavaScript files in various text editors (Visual Studio Code, Greasemonkey/Tampermonkey) I sometimes get notified about syntax errors. I never encountered this behavior with PHP file...
I host my website on a CentOS-Bash, PHP and MySQL environment; my local email client is engined by Roundcube. I don't know almost anything about PHP nuances. While my web domain registration is do...
I have several classes (C_1...C_n) and their instances (I_1....I_m). I have a "Registry" R of these. There are several pieces of data (d_1...d_k) spread across various instances. This much is set ...
I'm writing some functions in C that parses a part of a XML file (using libxml), but instead of extracting the content of the XML node that has a specific name, it outputs a string that's not in UT...
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: "/":...
What is Backus–Naur form as applied in computer programming? From Wikipedia In computer science, Backus–Naur form (/ˌbækəs ˈnaʊər/) or Backus normal form (BNF) is a metasyntax notation for cont...
I have little to no idea what happens after a client obtains the server's certificate. It has to make sure that it (somehow) valid, but how?
I believe when you sign in with Google, the web application running in your browser calls a command to request the Google Sign In page, and includes a “callback URL” as a parameter in that HTTP req...
I would define a hook as: A piece of code which changes the response to a certain event, without changing the original code that caused the event How is that different than "code injection", if a...
Someone told me that I shouldn't write "NULL pointer" with capital letters, because a null pointer and NULL are different terms. And that NULL is a "null pointer constant". What's the meaning of th...
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'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...
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 have two tables: Table1: Name Description Amount 123 Description123 123 456 Description456 456 789 Description789 666 101 Description777 101 133 De...
One way to remove element from array is to replace element with zero. Below is a rough snippet I am sharing: int N = sc.nextInt(); int pos = sc.nextInt(); int A[] = new int[N]; if(pos == i) { ...
Suppose I have two variables that are called animal and age, and print them as a string in the console like so: animal = "giraffe" age = 25 print("A %s can live up to %d years" %(animal,age)) ...
Temporary notice: this is part of an ongoing project of transferring and splitting my canonical from Stack Overflow on common errors in Google Apps Script. As soon as the Q&As are finalized, ...
I am currently using this code to display a GUI counter: USING: accessors arrays fonts kernel math math.parser ui ui.gadgets ui.gadgets.buttons ui.gadgets.editors ui.gadgets.labels ui.gadgets.pa...
I use git submodule foreach git pull to update my submodules. There's quite a few and it appears that foreach is updating them one by one, instead of in parallel. How can I do it in parallel?
How to use static functions in ColdFusion? How to import component? How to call a static function using both tag and script syntaxes? Adobe added support for static functions in ColdFusion...
For a UI gadget like a $link in Factor, a click automatically opens the page that it points to. I want to know where this default behaviour is defined. In the factor documentation, there are many ...
I wanna make a form in React native. A field in this form in (non-native) React would be like this: <div> <label htmlFor="lastName">Last Name:</label> <input type="text...
For example: I have noticed that this does not work for any vocabulary's tests. What is the alternate way to USE: these test vocabularies? EDIT: The test word appears to run all tests alongside...
I am working on a React Native app using Realm, Atlas Flexible Sync, and MongoDB, and I'm super confused about how subscriptions work. I'm coming from a .NET SQL background, so I'm completely new t...
What does lifting state up in Flutter mean, and how does it work?
There may be a better way to manage website's with JavaScript deployments. I added jest to my repo simply to execute tests when I make PRs as part of a GitHub action. This requires a package-lock.j...
Ansible's extract filter is supposedly made for use in map, but at the time of writing the documentation doesn't actually show how to use it together with the map filter. The following outputs VAR...
I loaded a binary into Ghidra for analysis. The decompiler says undefined8 main(void) { basic_ostream *pbVar1; char *pcVar2; [--snip--] pbVar1 = std::operator<<(pbVar1,"PXZ ");...
I'm currently writing an input and output handling library for the D language, and I'm not getting any kind of input language change messages when the language is being toggled with hotkeys, and on...
I'm trying to flatten a repository of Python code into a Markdown file where each file is formatted like: relative/path/to/file1.py # contents of file1.py I'm using this command: find . -name...
I am attempting to use the chartjs-zoom-plugin v2.0.1 with Chart.js v4.4.0. I have the plugin as the file chartjs-plugin-zoom-2.0.1.min.js, and I have imported it into my page using <script ty...
I need to do a lot of calculations involving sets. There are relatively few values in the "universe" of candidates that could appear in any of the sets, but potentially very many such sets (they mi...
I have an application that works with a JTable, and in this JTable, I want each cell to have both an ImageIcon and some text. I see at this link, JTable supports ImageIcon OR text, but seemingly n...
In JSON Schema one can use the additionalProperties key to validate properties whose names are not know. You can still impose restrictions on their type. How to do this in an Ansible role argument...
Is there a way to easily insert today's date when editing a file in VS Code?
I would like to use tf.timestamp() when it is available (eager mode and graph mode without XLA), and use 0. (or a better fallback if there is one) when it is not available (with XLA; @tf.function(j...
How to delete a local git branch which hasn't been pushed to anywhere, and only exists locally?
Looping in Ansible usually produces a neat output of one line per iteration (per host): ... ok: [Arch] => (item=something) ok: [Arch] => (item=something_else) ok: [Arch] => (item=yet_a...
I'm trying to replace Flot.js with Chart.js. In my application, Flot.js is included as a normal JavaScript file, like so: <script language="javascript" type="text/javascript" src="jquery.flot-...