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
The problem with undefined behavior due to array out of bounds happens whenever we use pointer arithmetic, which is only defined to work within the bounds of an array. Where plain variables, "scala...
As far as I can tell, it is in part determined by the HTML spec's History API1, specifically the value of history.scrollRestoration. Quoting the HTML spec's scroll restoration mode paragraph: ...
This question probably stems from misunderstanding what case sensitivity is. Being case insensitive does not mean only allowing one case - in fact, it implies the opposite! If one case was treated ...
Some development tools provide an error message when a user tries to import two things (classes, packages) with the same name. Some programming languages offer a syntax to import one of those thing...
I'm completing the rustlings exercises as part of self-teaching Rust. While working on the third iterators exercise, I solved the exercise but don't quite understand why my solution works. Specifi...
Arguments in favour of "struct tag style": Less namespace clutter. C has a peculiar name space system where all identifiers belong to one of: labels, tags, members, ordinary. Struct tag style...
C offers two different styles when it comes to structs (and union/enum too). Either declare them using a struct tag only ("struct tag style"): struct my_type { ... }; struct my_type x; Or ...
The last few years, PHP has basically exploded with lots of modern language constructs that makes the life easier. But local constants are still missing, and I find that very strange. I have found...
The safe way: [1] git branch --delete <branch-name> It will fail if the branch isn't merged. If this is ok then you can delete it anyway like this: [2] git branch --delete --force <br...
This is pretty much exactly what formail is good at. Specifically useful for this case, formail lets you extract headers, given an email message on RFC 822-esque format. In bash, if you have the ...
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...
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 ...
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 ...
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 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...
GitHub has a setting wherein they offer to "anonymize" your user email from, say, somebody@example.com to somebody@users.noreply.github.com. I presume this is to prevent you from getting spam from ...
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...
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...
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...