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)
A Q on Stack Exchange from a very long time ago included: I have first names in one column and second names in another, I want to create a third column that contains the first character from the...
On a Linux server, if you leave the .git folder unprotected in the public_html folder, its possible that someone could download the folder and then gain access to your files. There are two ways I h...
I'm trying to log error messages from Requests exceptions. Example: try: make_web_request() except RequestException as ex: logging.error(ex) Example output: ERROR : ('Connection abo...
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...
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...
We have a bunch of dead branches in our git repository, and I'd like to clean them up. Ones that were merged (but not deleted at the time) are easy; we can see those in the branch list on Bitbucke...
In the past I have read about the fact that some programmers use a variable to hold two or more variables (instead holding a mere value or an array). There might also be cases when programmers use...
On 25th October 2020 in Europe/Berlin clocks where set back from 03:00 AM to 02:00 AM to change from summer time (CEDT) to winter time (CET). Which means there is a 1 hour separation between 02:30...
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...
Answers to Excel - Get only values from column that are not Zero “0” asked by @CiscoNewb includes ones applying AGGREGATE: =IFERROR(INDEX(A:A,AGGREGATE(15,6,ROW(A$2:A$12)/(A$2:A$12>0),ROW(A1)))...
Say I want to implement a very basic group chat application. I use the H2 database, a user class, a controller, and a text file in the Resources folder that stores the chat texts. All texts would b...
I do a lot of rebasing and amending of my topic branches. I don't think it's especially useful for me or my colleagues to see in the logs what date it was when I first started working on the partic...
I'm experimenting with different operators and have a hard time understanding the outcome of certain expressions. I try to combine the ++ operators with other operators such as assignment in the sa...
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 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 wrote a program for calculating EMA, but my values differ from the values calculated on this site. My program: double[] x = Numbers();//array numbers int N = 5; double k = 2.0 / (N + 1...
I have a number of MySQL stored procedures that use a cursor to go through a select and then pass the results to other stored procedures one row at a time. This can take a while to run, what is hap...
Many web login and contact form features could be set as standard HTML builtins without the need to develop and backend and/or (non HTML) frontend for them, for example: Select field Input Date...
I am slowly modernizing an older ASP.NET Core Web API and one of the steps involved migrating from database first to code first. Now, all schema changes and seeding is covered by migrations which ...
I have a query that returns the owner of jobs on an SQL instance, select s.name as JobName , s.owner_sid , ISNULL(L.name,'AccessViaGroup') as LoginName --Trying to figure out how to turn that ...
#include<stdio.h> struct Book { char title[20]; char author[20]; int pages; }; void init_Book_types(struct Book* aTitle,struct Book* aAuthor,struct Book* aPages){ aTitle->ti...
My project has the following set up for the production and preproduction ("clone") environment. Production is not accessible at all for the development team, only the preproduction database. Pr...
I work for an IoT company. We recently got secure boot to work for a customer-visible product. For secure boot to work, the images we generate must be signed. Obviously, we want customer-visible sy...
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...
I have read that several programming languages, listed below are considered "typeless": Forth Brainfuck B MUMPS BLISS Lucid BCPL I have shared this data with a programmer who clued that...
I am struggling to do a save button in C# Windows Form Application where I have a GridView and I want to save all modifications I do in GridView Table(I connected it to SQL). This is the data sourc...
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...
Consider an object for which a method is invoked. Beyond certain point the method no longer accesses this at all. No read/writes of non-static members. No invocation of non-static methods. Is it ...
When discussing best or safest C programming practices with various C gurus on the Internet, the "MISRA-C guidelines for the use of C language in critical systems" often pops up as a source. This ...
I made carousel image slider by following tutorials. To slide images , I made the below function. const moveToSlide = (track, currentSlide, targetSlide) => { track.style.transform = 'translat...
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...
I have noticed some time ago that Entity Framework assumes a CASCADE behaviour (implicit value, if not specified) for referential constraints (FKs) when deleting items. This means that by default, ...
I have a simple HTML-PHP-CSS contact form (no JavaScript) with an input type="url" field. Currently in 30/03/2021, the default behavior of input type="url" (by W3C design I guess) is to obligate t...
One part of an as yet unanswered Q on Super User asks whether conditional formatting in OpenOffice Calc can be used to highlight an entire row based on whether a checkmark in the row has been selec...
Some while ago a user of Web Applications asked after a function to avoid "an if/else just to handle negative numbers properly". Clarification provided was: Presently it round based on absolute...
I have developed an Atom package which calls SyncTeX (a utility for reverse lookup for LaTeX), and then opens in Atom the file specified in the SyncTeX response. I'm developing on Linux, but now a ...
Context Our product owner has realized that some entities are duplicated from time to time and that a merge is required. This should clean up existing duplicates and also allow special users to me...
In this Q a user asked for a simple way to represent this data: - PERSON 1 | PERSON 2 | YES - PERSON 1 | PERSON 3 | YES - PERSON 2 | PERSON 1 | YES - PERSON 2 | PERSON 3 | YES - PERSON 3 | PER...
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 ...
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...
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 have used Drupal since 2010 to create websites and I recall a few years back reading that it can be used to create smartphone applications (or something similar). Is this only the "web-integrate...
If one finds where the past number of months equals the past number of days like this, select distinct DATE_SUB(now(), INTERVAL 92 DAY),DATE_SUB(now(), INTERVAL 3 MONTH) The numbers that are curre...
I have an HTML-PHP-CSS contact form with a date field: <input type="date" name="date" id="cf_input_date"></input> The default value in this field is the W3C built-in default: dd/m...
To protect against dictionary and rainbow table attacks it is well known that passwords should be salted before hashing. The salt (unique to each password) gets stored with the hash, often in the s...
In the C program below, I make a mistake and call the function with (ld, ld) instead of (d, ld). #include <stdio.h> #include <limits.h> void print_int_long(int n, long l){ pri...
The Problem I have a path optimization problem that in some ways reminds me of the Traveling Salesman Problem, but differs in some key respects. I have a group of items that need to be used by a m...
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...
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...
I was fooling around with the following C code on my trusty old x86 PC: #include <stdint.h> #include <stdio.h> int main (void) { uint32_t u32 = 0xAABBCCDD; uint8_t* ptr = (u...