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
There are several ways to turn a recursive algorithm into an iterative one or at least avoid to do the recursive calls in your own code. In the specific example of yours, where your traverse a tre...
Editing one's profile on codidact is problematic. Evidently it needs to be 30 characters or more, but there's no error message, there's just a red box around the profile post and then the save but...
While writing the question I did find one hacky solution which works, and which I will use unless someone has an alternative. Create a codebehind file for the theme: using System; using System.W...
You can use MutationObserver Quick example, disconnect logic is not mandatory and could be improved: const container = document.querySelector('.CategoryTreeResult'); let disconnectTimeout; ...
I was tasked with an assignment where I should get a box to move to the 4 corners of the viewport by hovering on a button. Most of the code is already finished except for figuring out how to get th...
Edit: I think you've already rejected this solution, but I am guessing that you only set the property for type Window, which won't have much of an effect. Window controls don't display text except...
One problem of your code is the one that @celtschk already has reported: You start one child process, and that one child process does the area calculation exactly once. Thus, one step towards the ...
@InfiniteDissent gives an excellent explanation why such a feature would be problematic from a programming language design perspective. As a consequence, C++ is defined such that the code you wan...
I am working with VS 2022 and trying to make a WPF MVVM application. The application updates the items displayed in the datagrid, persisting the changes to the database upon save. However, adding a...
It can't be done with git-send-email(1), but there's a tool that integrates with it, and is very simple to use: patatt(1). Install the tool: $ sudo apt-get install patatt And then for each rep...
I am using linq/EF core to retrieve data via an API call. How do I sort the collection of related data for each retrieved entity? Assume the following structure: an Order is made on a certain da...
When I implemented this for a code golf challenge, the state had to encode not only the vertex you were at but the edge by which you had entered (or, equivalently, the direction in which you were f...
Caesar Cipher originally deals only with letters (ASCII "A" to "Z", without diacritics/accents), so I'm not sure why you included ۤ$%& in your answer. And using indexOf (as you did) is not ver...
It may be hard to find in the docs, but you can use mruby in H2O to rewrite URLs: https://h2o.examp1e.net/configure/mruby.html Unlike Apache, you can use an actual programming language to do the ...
Benchmarking is hard and there are a lot of potential issues with your code. I agree with Olin Lathrop that you want at least a few seconds worth of run time, not just due to the potential for a lo...
I found a form I wanted to duplicate on a roof construction website. All my input boxes are centered except the last one that's a bit off and I cannot figure out why. Here is my code: HTML <...
I have some code connecting to an active directory via ldap. Something like this: public Response add(User user) { try { LDAPConnectionPool ldapPool = ldapConnectionPool.getPool();...
I am trying to create an application that takes a date as user input which is then passed as a parameter to an API call. The local date format is dd/MM/yyyy. I want the user to be able to enter t...
Calling an undefined function will have that behavior at link time: landmine.c: #ifndef CONSTANT #define CONSTANT 0 #endif #define assert_not_in_binary_if(e) do \ { \ if (e) \ undefi...
Think of what your for loop is doing, specifically at iterations 11 and 12. for i in range(1,n+2): while not g(i): i+=1;continue a.append(i) In pseudo instructions: for-loop iterati...
: at-default ( default key assoc -- value/default ) at* [ nip ] [ drop ] if ; inline 100 1 H{ { 1 2 } } at-default . 2 100 10 H{ { 1 2 } } at-default . 100 You can also just do this...
I'm trying to make a UWP app in Visual studio, but the NuGet package files have been huge. They just don't fit on my SSD, but I do have an HDD I could theoretically use. After a bunch of tinkering...
When you curry or fry a word into a quotation, the word is first placed into a wrapper object. This way, when the quotation is called, it places the word literal back on the stack instead of callin...
I am trying to define a syntax word as follows: USING: kernel syntax parser fry prettyprint ; IN: syn-try SYNTAX: syn scan-word '[ _ ] . ; Given a word, I want to create a quotation conta...
All three obvious current possibilities are problematic, but for different reasons. Ignoring the matter of how to format the tag name for a moment... GNU/Linux focuses on one (admittedly very...