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
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...
Your grep invocation will first search for files which contain foo and print a list of the lines from each which contain the word foo; the second grep invocation will take this list and filter it d...
Never Too Late Due to, shall we say, recent AI-related hallucinations, pretty much everything that was possible PR-wise in 2019 is possible for this site again. People are leaving Stack Overflow a...
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...
See this comment: https://forum.qt.io/topic/60546/qpushbutton-default-windows-style-sheet#3 Stylesheets are a totally different beasts. The default native drawing doesn't use stylesheets. They ...
fn x [] = [] means that if the second argument to fn is an empty list, return an empty list. fn x (True:ys) = x : fn x ys means that if the second argument to fn starts with True, return a list th...
I was chatting with somebody who's involved with a proposal on SE for a site about language design and who is interested in other options too. Some sample questions: What are the tradeoffs b...
Python documentation suggests that you can simply add other parameters when raising the Exception and retrieve them using args: Code try: raise Exception('spam', 'eggs') except Exception as in...
In a Qt application I have nothing more than a window with a button as its direct child. I set its background color and all is fine: Window::Window(QWidget *parent) : QWidget(parent) { but...
What is the purpose of grouping the tests in a tests module like this #[cfg(test)] mod tests { use super::*; #[test] fn test_function_1() { // test code for function 1 g...
For me the following reasons might lead to downvoting: Posts that are not related to a specific programming issue, but are rather meant to start a discussion. Example Asking for software ...
tl;dr According to the documentation, innerHTML property "gets or sets the HTML or XML markup contained within the element". Basically, "that's all", but let's see it in more detail. It makes...
I'm working on an integration with a proprietary (black box) system. There is some TCP communication that occurs between two microservices. I've managed to sniff the traffic and it's being sent in...
I have console scripts in my virtual environment in \env\Scripts, installed with packages (e.g. black, pytest, coverage). If I try to execute these in Git Bash, the output is not returned to the te...
PS: for small arrays and/or if the function is fast and doesn't cause performance bottlenecks, none of the below is really necessary (see the analysis in the end). That said, let's see how to sol...
I'm using git for LaTeX projects and am in a little dilemma about how to best ignore files. if I add *.pdf to my .gitignore file, I keep forgetting to force add included graphics if I don...
A significant fraction of software developers also needs to make some UI/UX-related decisions. I am wondering if we should such questions in the Software Development community. Based on feedback...
In your situation, the most obvious thing to do is use a for loop over the Iterable or the Iterable.forEach extension method depending on your preference, and directly put floats into the FloatBuff...
How can we use git-send-email(1) to sign patches (emails) with the gpg(1) keyring? I've heard it can be done, but couldn't find anything in the git-send-email(1) documentation nor in a web search.
Because method constness is part of the type signature for the method, and const/non-const methods are completely separate as far as the language is concerned. When you override a method in a deriv...
Your function returns a pointer to a local non-static variable. Such a variable exists only during execution of the function and is removed on return. This means you are left with a so-called dangl...