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
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...
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...
Some additional advantages of interpreted languages: Interpreted programs are basically scripts run by the interpreter. The interpreter can be embedded into other applications that want to provid...
Your code adds all three elements to the list. You can see this if you add a line inside the while loop: echo "$line" However, if you give the command echo $my_array, it will only show you the...
My assumption is that, internally, log4net loads its XML file into some data structure (maybe not a dict, but some equivalent of cfg_dict above) and then passes that structure to whatever code ma...
I work with CentOS operating system and my only shell is Bash. I want to create a script which prompts a user with a question like "What is your web application root?" The user should answer dire...
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...
It seems like autocompleting usernames does not work. I wanted to answer a comment and started typing @ followed by the first letter in the username, but no suggestion appeared. I tried pressing ta...
echo "Enter Latitude\n"; $handle = fopen("php://stdin", "r"); $lat = deg2rad(trim(fgets($handle))); fclose($handle); echo "Enter Longitude\n"; $handle = fopen("php://stdin", "r"); $long = deg2rad(...
I'm writing a function that counts the number of assignments for a fscanf format string. I studied the documentation in C standard 7.21.6.2 It looks like it works. It passes all test cases I have w...
On the old sites, if you wanted to tag something with [sql] and [mysql] that required two tags. However, because we have hierarchal tags where [mysql] is a child of [sql] you only need to tag it wi...
I have added Swagger UI for an ASP.NET Core 3.1 application and I have realized that all endpoints requiring Windows Authentication fail. This issue is created by the fact that generated HTTP reque...
(Elsewhere...) You look over a post on Code Reviews, and you don't find any problems. Should you post an ‘it's fine’ answer, stay silent, or do something else? Seems to me there's some value in hav...
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...