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
While there might be some JavaScript "magic-like" solution I don't know of, my own solution was making the HTML a tiny bit more complex and adjusting the CSS to the change. I have inserted my labe...
I'm trying to write an interface to define the set of operations I expect my repositories' Unit of Work implementations to have, and I want this interface to be fulfilled by EF Core's DbContext cla...
There are many things we label as bad when programming, for various reasons. Repeating code is slightly bad. But writing function like-macros is extremely bad. You should not try to replace someth...
The short answer is that it can't be done. C# doesn't support type functions. https://github.com/dotnet/csharplang/issues/339 is probably the issue to follow if you want to track their progress. W...
Adding to Peter Taylor's reply: The OP requested something "more LINQ". I guess it can't get any "more linq" than... MoreLINQ! That library also has a ForEach(). If you only need that, maybe it...
I am interested in a guideline to understand how dependencies are considered when building the healthcheck functionality for an API. Like any functionality, the implementation of this feature sho...
I want to add the ability to "Sign in with Google" into a Ruby on Rails web application, that is using Devise to handle authentication. How do I do that?
The Zip class from Data.Zip requires an implementation of Semialign: class Semialign f => Zip f In my mind: Zip takes the intersection of two shapes. Semialign takes the union of two sha...
The other answers are correct, but over complicate things. Suppose you have a database with 1,000,000 email addresses and password hashes, 20% of whom are idiots and have used "password123" as the...
You can separate the curly brackets with spaces, and instruct jinja to remove them afterwards: { {{- jinja_expression -}} }. That way the outer curly brackets are left untouched. The minus signs s...
What would be the simplest (and most lightweight) way of getting email notifications of failures in kubernetes clusters. Mostly interested in failing pods, so notifying on certain kubernetes event ...
When I do this in a shell: $ /bin/sh -c 'echo hello world' hello world it's my understanding that I'm running a process with argv = {"/bin/sh", "-c", "echo hello world"}. That is, the quotes c...
Because execl's first argument isn't argv[0]. execl("/bin/sh", "-c", ...) runs the executable /bin/sh, but sets its argv[0] to "-c", as if one had created a link called -c pointing at it and run t...
Code review part: Design (important!) Global variables/external linkage are to be avoided (Why is global evil?). You don't actually have private encapsulation in this code since the inte...
Many languages discourage global variables. Why is this?
I am working on a toy project where I have a container for which I would like to write an iterator that iterates over the values in the container. Because the values are stored in a (c-style) arra...
When I open VS Code inside a project dir, it reopens all the tabs that were open last time, and re-expands all the folders that were unfolded last time. I find this annoying. Usually, when I close...
They are not a part of git the way .gitignore files are. It's just a convention to add empty directories to git repositories. Normally git ignores empty directories altogether. Adding an empty fil...
Workarounds Avoiding mutation Because problems are only caused by actually mutating the default argument, the simplest way to avoid problems is to... not do that. Pythonic code obeys command-quer...
I'm trying to set the transform attribute of a group within an SVG. Specifically, I'd like to set translate's value to 0 0. I tried using the set element for this but that didn't have an observab...
When developing a rust program you build and run using cargo run. However you cannot just append arguments to that as they will be caught (and likely rejected) by cargo itself. So how to pass argum...
The ideal way is to separate the upstreamable and non-upstreamable changes. For example you could maintain two branches: public and private. All upstreamable changes are cherry picked to public an...
Specify your arguments after --: cargo run --offline -- --my-argument 42 --offline is just an example of cargo's own argument. They are passed before --. --my-argument and 42 will be passed to...
I'm writing a library "MyLibrary". In there, I group code into sections that make sense. Let's say I have a folder "Reports" and a folder "Helpers". I would like to have my code separated while ...
In VS Code, is it possible to run Python code on the text being edited? I realize that I can save my text, create a .py file, switch to a terminal (including VS Code's own terminal) and run the .p...