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
Let's say we have an object, we store it in a union (into some other narrower type, but with memcpy(3), so it's allowed --I guess--), and then read it from the union via it's original type (so no a...
The proposed library would sit alongside cross-platform libraries in Xamarin apps for iOS and Android. However, it would include files with names like MyLibraryFile.android.cs MyLibraryFile.ios...
We have recently received a search engine optimization (SEO) question. Our scope currently does not explicitly include or exclude such questions, so I thought we should clarify this. Possible opt...
The expectation for all posts is, that a post is always understood as the own work of the poster, who has the copyright and responsibility for it and offers it to the site according to the site's c...
char *p, *q; p = malloc(1); free(p); q = p; // lvalue conversion Is the last lvalue conversion (= p;) Undefined Behavior or not? We didn't take the address of the local p. C11::6.3.2.1...
A single element tuple has a trailing comma Note that the example in the question does not form a tuple, as there is a special syntax for single element tuples. A single element tuple has a traili...
What exactly is the Python Global Interpreter Lock (GIL)? As someone who is relatively new to Python, is this something I need to be aware of, or is this just some implementation detail of the inte...
Software Development Codidact is currently set to "New Site Mode". When we first launch a community, we've been launching with adjusted settings that make it easier to earn certain Abilities. On...
On branch-x, I do git merge branch-y Now there are some conflicts, and git status shows Changes to be committed: new file: a new file: b Unmerged paths: (use "git a...
I wouldn't use grep. As the other answers already said, it's not the right tool for this job. Considering your specific case (fields separated by /), basename is the most straighforward way, as st...
The question is about libraries that extend the data type system to ensure physically realistic computations. Think std::chrono but for distance and mass and other things as well as for time. Inste...
It depends. This boils down to whether or not the expression cast to void contains any side effects, such as accessing a volatile-qualified object or modifying any object. C17 6.3.2.2: If an ex...
The way your code handles the variable i within the for loop seems to indicate a wrong understanding of the meaning of for i in range(1,n+2): range(1,n+2) will provide an object of type range. ...
I have a parent div with two child divs. I want the parent div and the child divs to have a blue background color when it's hovered. But the child divs doesn't inherit the background color. It is o...
I think I found a solution myself. Instead of using the between() function, you can use the gte() (greater than or equal to) function. So the command above would be: ffmpeg -i video.mp4 -vf "yadif...
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 ...