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)
Its possible to execute a MySQL file from the command line like so, mysql -u USER -pPASSWORD < FILENAME which triggers a warning, mysql: [Warning] Using a password on the command line int...
If I have some text in a cell, how can I find the number of times another piece of text appears in it? For example, suppose A1 contains Peter Piper picked a peck of pickled peppers.. pick occurs 2...
I transfer emails from my Right To Left (RTL) contact form → to my local email box (powered by Roundcube). Emails reach my email box (inbox) just fine but I have a problem were PHP variables aren'...
Given ColumnA contains a Text header (A1), an allowed maximum number (A2), fifty tickboxes (A3:A62) and a formula in A63 of: =countif(A3:A62,TRUE) how can I block application of more than the a...
I'm using SimpleDateFormat to parse a string containing a date/time, but the result has a different date, hour, minute, second and millisecond: SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM...
Trying to make a nannou app from the template but with a customizable model() function. The template has this main(): fn main() { nannou::app(model).update(update).run(); } The model t...
For debugging running programs I often use whatever is integrated with the IDE I am using. QtDeveloper right now, but also used Eclipse, Netbeans and others. Most of them just use gdb under the hoo...
I have heard that it is undefined behaviour to make a pointer point outside boundaries of an array even without dereferencing it. Can that really be true? Consider this code: int main(void) { ...
I have a PHP script that uses CURL to return a JSON result that looks //Curl set up code $result = curl_exec($ch); //Error checking code $json = json_decode($result, true); //Code to process r...
I am working at a proof-of-concept for porting an ASP.NET MVC application to an ASP.NET Core API + Angular SPA. One of the features of the existing application is the ability of an admin (typically...
I am using MediatR in an ASP.NET Core 3.1 application and I want use a generic query and a generic request that deals with getting lists of some standard items I am using in drop-downs and similar:...
In an as yet unanswered Q from early this year a user of Stack Overflow asked: how to fill all non-empty cells of a column by 1 and the empty cells by 0. It's an xlsx file open with LibreOffice ...
I have decide to try out Julia. Is anyone aware of some good resources to get started with the language?
I have a very large table that I need to iterate through with a PHP script and I can't do all of the results at once so I do it in sections with a LIMIT like for ($x = 0; $x < 10000000; $x += 1...
What does ems in xml do? I saw that I was using following line in EditText. But, I never thought what it does. I was trying to check what actually it does by removing the line. I couldn't see any d...
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 am looking to take a partial derivative of a sympy polynomial with respect to a symbol in the polynomial. In the sympy documentation for poly.diff(...) it gives sample code like this: from sympy ...
tl;dr I'd like to learn a compact, cross-compiler way of selectively suppressing compiler warnings. Consider the case where you really mean to make an exact floating-point comparison using ==, o...
When creating a code-first solution in dot net core using Visual Studio, you manipulate the database by changing model classes and migrating the changes. I can set the schema for tables that I cre...
I'm using an object-oriented design for my C project and trying to implement classes with private encapsulation. How do I do this? Some things I've tried that are problematic: Using a struct f...
For holding ordered sets of keys, there are well-known data structures (the red-black tree, for example) that support O(log(n)) lookup and insertion algorithms. Of course this means that there triv...
I can't get a response from IPv4 dig on my server but I can get one from IPv6 dig. See the below output: $ dig +short myip.opendns.com a @resolver1.opendns.com # Doesn't return anything, this used ...
This is a rather vague question, but I'm trying to solve a specific problem and I'm inexperienced in most of the potential solutions, so please forgive the inherent ambiguity. I have access to a d...
I seek help in finding a term common in game development, particularly 3D First Person Shooter games (not at all in 2.5D games such as Doom). I understand that 3D first person shooter games can be...
I find myself often writing code like this. try { // code } catch( FailedReadException const & ex) { file.close(); std::cerr << "Read failure " << ex.readFailure() <&...
I'm writing a JSON schema to validate asset files for a program. The JSON I need to parse is structured so: { "jobs": { "software-developer": { "job-description": "sw-dev.md:0", "pay": 800...
Tldr; I don't need to parse HTML, but I need to check if user submitted input conforms to a very strict subset of HTML. Can regex be a suitable tool for this? Details I have a frontend sanitiser th...
I have a database with quite a few VARCHAR fields. When the database was first built the lengths of the columns were set a bit larger than absolutely necessary. Now after, having used the DB for a ...
Due to a series of unfortunate events I have some tables where the auto_increment value got behind what it should be. If the auto_increment value is 9 and there are 20 rows in the table the next 1...
A user of Web Applications asked "How should I fix the formula?" with reference to: =IF($K4<2,$K4) applied as a Conditional Formatting [CF] formula to J4:J8, where the desired (green fill) f...
Consider the following code: public class OnlineShoppingService { @Transactional public void cancelOrder(String id) { if (shipmentRepository.findShipmentForOrder(id) != null) { ...
In programming instead of arrowcode where one has many layers of indented if statements, you can return a result as soon as possible. So instead of, if if end if end if It looks like if ret...
I want to write a text file from multiple threads. The file structure is line-oriented. This means writing of lines should be atomic. I am using Qt 5.15.2. Is it enough to protect a shared QTextSt...
I've been doing a lot of reading on implementing the repository pattern in C# projects and found controversy, or shall I say some strong criticism, made by seemingly very smart people with previous...
I am considering either removing some columns or changing the datatypes if I could significantly reduce the amount of storage that is currently used by those columns. Some of the columns are ints a...
When doing something simple such as this int a=1; int b=2; int c=3; printf("%d\n", a + b * c); then I was told that operator precedence guarantees that the code is equivalent to a + (b * c)...
In some situations, could it be problematic to migrate a website's database (MySQL) from one website hosting provider to another without the information schema or with the information schema? In m...
I consider to make my website's contact form totally javascriptless (only HTML-PHP-CSS --- no JavaScript at all). No modals or alerts No prevent default No AJAX/AJAX/XHR/JHR No form disappear...
I've recently been involved with creating text documentation of steps for workflows in graphical windows systems (and web-pages). These are often somewhat wordy, for example: "Click on the 'Exit' ...
Every URL is a URI but not every URI is a URL is a saying I know from long ago, but what is an example for a URI which is not a URL (whatever the user agent would be - a web browser, a *nix utility...
I have a function that which does some calculations. I would like to assign the result of the function to the global environment from within the function, how do I proceed? A minimal example: meanF...
I have a small new Python 3.8 Flask project with some relative import quirks. For the DB I use SQLAlchemy with Flask-Migrate. My project has the following general structure: controllers/ static/ te...
Master lists like 82 food subreddits and 128 tech subreddits don't indicate each's subscribers. if it's private. Sometimes moderators can make the sub private for several days, to clean i...
Almost every table in my DB has triggers that fire on INSERT, UPDATE, DELETE and write the changes to a separate read only DB. This makes it possible to track changes and undo things well after the...
On a CentOS Apache-MySQL-PHP environment I have a website with a simple HTML-PHP-CSS contact form; the contact form itself is working. This is how I backendly redirect a user from the contact form...
I need to add one column with the same name to all of the tables in my database, how can I find which tables don't currently have a column with that name?
I am interested in performing a LEFT JOIN using LINQ-2-SQL when working with method call notation. This answer suggests a way that relies on GroupJoin but it is more verbose than expected: var le...
C# language version 8.0 introduces limited support for static methods, operators, etc. in interfaces. However, there are still limitations. I was hoping to use the new language features to try a ge...
I am building an Android app to perform a DICOM C-Echo. (DICOM is a standard for storing and transferring medical images; the specification is at dicom.nema.org). My purpose is to learn more about ...
I have a mobile-only HTML contact form divided in source code into three sections; each section should contain fields by a different context. <!DOCTYPE html> <html> <head> ...