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
This behaviour is documented here: "... an ambiguous timestamp that could fall on either side of a jump-back transition is assigned the UTC offset that prevailed just after the transition." S...
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...
Using Optional as a value in a Map will lead you to unnecessary complexity and confusion — as you can see. The primary intention of Optional is to serve as a return type, indicating that a value m...
I have a Map with Optional values. I want to filter it to remove empty values. Map<K, Optional<T>> input; Map<K, T> result = input. // here is some code I'm looking for ...
In older C and C++ standards, the auto keyword simply meant automatic storage duration. As in the compiler automatically handles where the variable is stored, typically on the stack or in a registe...
The answer is "it depends". It depends on the language, how much buffering you're willing to allow, how much you're willing to accept some approximate/incorrect syntax highlighting, and whether you...
Instead of sh, use shell or console. So this: ```shell # echo hi ``` ```console # echo hi ``` Is rendered as: # echo hi # echo hi While this: ```bash # echo hi ``` ```sh #...
C23 introduces the digit separator ' which can be placed anywhere inside an integer constant for the purpose of clarity and self-documenting code. These are otherwise ignored by the compiler when d...
Since this is all new, there might still be time to establish a consensus before this style feature too ends up "all over the place" (like upper/lower case hex, upper/lower case integer constant su...
NIST Special Publication 800-63 says that "strong" password requirements are not only useless but counterproductive. They recommend only a minimum length requirement and a small blacklist of common...
What are the differences between git apply and git am commands? Both seem to be used for applying patches to repositories. When should one be used over the other?
Each of them has an analog to another Git command. But instead of objects in the repository, these take text file(s) created either by you or someone else. git apply Think of this as Applying a g...
I read posts (e.g., 1, 2, 3) that recommend triggering a CI build process by pushing an empty git commit. I don't understand how this is a good idea as the commit history will be peppered with mea...
Say I've made a bunch of changes to a file and would like to split those changes into two or more commits. Normal git add however stages the whole file in one go. So how to add only some of the ch...
The other answer already provides the more straighforward solution (push with --delete option). But there's an older syntax that also works: git push <remote-name> :<branch-name> N...
Terminology "Mutable default argument" means exactly what the individual words would suggest: it's an argument which is supplied as the default value for that parameter, which also is mutable. To ...
How to move the main branch back to an earlier commit in git?
With git reset, but first, you may want to save the current state in another branch: $ git switch main $ git branch backup-of-main Now the (perhaps messed up) state is safely stored in branch ...
Arrays in Java are created with a fixed length, which cannot be changed in its lifetime. The only way to really change the length of the array is to create a new array with the intended length and ...
Hi and welcome to the site. :) I think the idea of a canonical like the one you linked is great. A lot of newbies have too little understanding of their topic to identify common patterns. So they ...
You want git worktree: https://git-scm.com/docs/git-worktree. The idea is that you can have multiple branches of the same repository checked out to different directories, but they're still the "sa...
How do I add functionality to the back button in Android without reimplementing the back button entirely? Prior to last year, I would just call onBackPressed() and then simply override it: overri...
There is basically only one reason not to use static functions in C, as opposed to functions with global scope. That's if you want to access the function from outside the module. Otherwise, if th...
How to verify if a year is leap? Given a numeric value (such as 2023) or some object that represents a date (such as Date, Calendar, LocalDate, etc), how can I do it?
I agree with Dirk Herrmann's answer about this: What if a question is beginner level? I would say: Someone should answer it. Some of the beginner level questions on stackoverflow have rece...