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.
Search
You can do that by letting the required attribute evaluate true only when the form's main submit button is invoked. First bind the submit button component to an unique variable in page's EL scope ...
Apparently, my form was inside an iframe. In order for me to redirect I had to change location of parent document, like so: <script type="text/javascript"> if (window.self != window.top...
GitHub has a setting wherein they offer to "anonymize" your user email from, say, [email protected] to [email protected]. I presume this is to prevent you from getting spam from ...
How to do it Yes, Python has an equivalent operator. However, it's spelled with keywords rather than punctuation, and it uses a different order of operands. It looks like: condition_value if some...
The current project I am working on consists of a bunch of microservices (Web APIs) accessible only internally using Entra ID (formerly Azure ID). To simplify the development, all services expose ...
The assumption of 1k attempts/s is wishful thinking, as is the idea that a hacker will go on mail.google.com and try to guess your login (they would get a captcha after like 5 failed attempts). Pa...
In a C implementation in <stdio.h> on Linux I saw something like: extern FILE *__stdinp; extern FILE *__stdoutp; extern FILE *__stderrp; And then: #define stdin __stdinp #define stdou...
The default port is 3306. MariaDB is a fork of MySQL, and this is the default port for MySQL as well. Source.
The main issue with your approach is that, in some cases, you execute a lot of queries to fetch the data. When working with SQL (regardless of relational flavor), you must aim from a set-based appr...
I have a SPARQL query to Wikidata that returns the names and handles and parties of politicians for whom a Mastodon address is stored at Wikidata. Filtered by nationality and with an output of the ...
By default Gitlab CI jobs run on any commit. I would like to restrict some of them to run only on commits to specific branches. How to do this in .gitlab-ci.yml?
Well it was easier than I thought: git diff stash A note about the direction: This will show things which are present in the working directory but not present in the stash as added +. And vice ...
3rd Option: You put a web server like Nginx, etc in front of your application server which can also handle 'raw' network traffic. Even in the PHP scenario this is common. There are a few reason I ...
Found an article about starting a repo with an empty commit. Read the post a couple of times, but still don't understand the reasoning: 1. git log and other commands blow up with terrifying ...
Our organization (blindness non-profit in California) is obligated to submit reports to grant organizations (e.g., Department of Rehabilitation) on a regular basis. Most of the time, this means exp...
All of these projects use Microsoft's OpenXML SDK for Office behind the scenes: 1. .NET (F#, C#) The F# Guide recommends NPOI, which also seems to be the most popular and most up-to-date, but the...
I've seen macros use parentheses to enclose its arguments. Most of these make sense, as in #define sum(a, b) ((a) + (b)) The outer prevents the following: #define sum_bad(a, b) (a) + (b) ...
TL;DR: Use wslpath and hope for the best. You can use it like this in Powershell: wsl wslpath -u 'C:\\some\\path\\to\\folder\\or\\file.txt' Long answer Converting them is hard. There is windows...
According to the standard (C17 draft, 7.22.3.2) The function calloc void *calloc(size_t nmemb, size_t size); "allocates space for an array of nmemb objects, each of whose size is size [and] i...
I want my CLI Python program to schedule a task, and then exit. After some times has passed (say 10 minutes) the task should execute. The task can be a Python method or a shell command, whatever i...
I am writing a Python package where I have two classes in different files that (indirectly) depend on each other. If I wouldn't care about type-hints, there would be no problem, but unfortunately,...
I have a very simple source file -- HelloWorld.java public class HelloWorld { public static void main(String[] args) { System.out.println("hello world"); } } I have th...
So far, existing Meta discussion seems to have at least hinted at the possibility of using separate categories here: To shuffle closed questions out of the way (globally for Codidact) (also) Fo...
Use at to schedule the command, using subprocess from Python to invoke at. It doesn't even require shell=True. For example: import shlex, subprocess subprocess.run( # `at` command to run n...
It's not clear where this stack trace comes from (either from an exception or the current thread), but it doesn't matter, the way to do it is the same. Both Exception's and Thread's have the getSt...