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
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...
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...
I have a variable that contains a string: $CCSR = "branches/features/arm_and_musl" I want to get only the part after the last /. In this case it's "arm_and_musl" but it can be anything. So som...
Indeed, the $HOME/.application-name is the old way. Doing that nowadays is frowned upon (this is an example of what happens if you try), mostly because, as you said, it clutters the home directory....
While I agree with Dirk Herrmann that basename is the right tool for the job, I think it is still worthwhile to know how to do it with grep, because you might one day encounter a sufficiently simil...
After spending my time on SO, I found that some of the FAQ style questions were VERY helpful, especially with things such as SQL injection in PHP/MySQL (for example How can I prevent SQL injection ...
Context We have recently received a suggestion to allow questions about recommending books directly connected to software development. The way I see this now (pros and cons) Pros: allow more ...
I've heard that in modern C++, smart pointers are preferred to raw pointers for ownership (the so-called RAII principle, as I understand it). This makes sense, and since then I've always used them...
This is a self-answered Q&A meant as a C string handling FAQ. It will ask several questions at once which isn't ideal, but they are all closely related and I'd rather not fragment the post in...
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 ...
The reader is assumed to understand how arrays and pointers work in C. You cannot understand pointers before you understand arrays, and you cannot understand strings before you understand pointer...
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...