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.
Posts by Moshi
I was trying to initialize a simple two dimensional array as follows: const arrays = Array(3).fill([]); However, when I tried to push an entry into one of the arrays, it seems like it gets push...
You can use the pathlib standard module with __file__ to make things simple. from pathlib import Path scriptFolder = Path(__file__).parent with open(scriptFolder / 'data.txt') as file: dat...
The part after the hashtag is called a URI fragment. Unfortunately, Tampermonkey does not allow you to match hashtags. This is arguably for good reason. The hashtag can easily change (and for sing...
You can use the dispatchEvent method. const inputField = document.querySelector("#example"); inputField.value = "X"; inputField.dispatchEvent(new Event('change')); jsfiddle
It's not a matter of order; Python simply does not directly allow else clauses as part of list comprehensions (docs). When we use [num if num != 11 else 22 for num in hand] We are actually usin...
Without knowing your use case, the simplest modification would just be to target everything: document.querySelectorAll("*").forEach((e) => { e.style.fontFamily = "arial"; }); (As an as...
I'm rather new to using git, so I'm not sure about the best practices regarding it. I have a feature branch branched off, and periodically when the feature needs to be updated I will add some commi...
According to the docs, you could use the --more flag If you just want to look at some commits past the common ancestor, then you can add the --more flag to it. From the git-scm docs for git-show-...
Each header is checked independently Having multiple Content Security Policy headers can only make it more restrictive I assume that each Content-Security-Policy: line you have is a separate CSP ...
Assignment = = is the assignment operator. There's nothing much to say here. Abstract Equality == == is abstract equality - it will attempt to perform a type conversion before evaluating equalit...
Here I used asterisk after Node. Actually, why asterisk used for? What if I don't put any asterisk after Node (Both Node are structure). It's a pointer. A pointer, like its name implies, poin...
You cannot set text-align on a column element (Well, you can, but it won't have any effect) There are only a couple of properties that have an effect, namely border, background, width, and visibi...
Method 1: <span> (or other HTML tag) It appears that Markdown isn't detected within HTML tags, so you can wrap the URL-like in a span or other tag and it won't turn into a link. <span>...
An answer on a related Meta suggestion, Remove parent tags from a post where a child tag is present, provides a case where you might want to tag both. For example, if mammal is a parent of deer,...
Disclaimer: I don't know Go. This is all just me reading the specification. In the Go specification under Packages, it defines PackageName. PackageName = identifier Under Identifiers identi...
I've come to realize that tags began changing pretty rapidly recently. In the past 3 days alone, these happened: [urlrewrite] was changed to a more generic [url-rewriting] tag and the tag wiki for...
Put it in a comment if it's just "It's fine, no problems here". As with most answers that aren't substantial enough to warrant their own answer post, I'd say to just leave a comment. As you said, k...
Now of course this will directly work only within my network. But if I upload this project to Heroku or something similar, would it still work as intended? I'll assume that you actually have the ...
I don't know any SQL at all, so credits go to the top answer of Mysql - How to quit/exit from stored procedure on StackOverflow. You can simply wrap the code in a label and LEAVE the label, ex. CR...
This is a current limitation of the software. Right now, there is simply no way to add detailed feedback to the close reason. There is a list of pre-written close reasons (which can be set per site...
I've noticed that a lot of sites have something like this going on: <div class="has-margin-0 has-padding-4"> <div>...</div> <div>...</div> ... </div>...
What are my options here? Do I need to switch the module I'm using to access the db? Do I need to write C code? Or is there a really clever technique to directly solve this problem, using only nod...
(The user who created the tag) The tag was to make it clear that (somewhat) opinion-based questions are allowed on site, with the [software-practices] marking which questions are about "best practi...
Why parenthesis don't work as you expect You seem to have a rough idea how the this keyword is resolved, so I'll skip explaining that and go straight to your question. I was surprised to find that...
I was inspired by the contests on Outdoors and Writing, and thought that having some challenges over here would be fun as well. What do you all think about adding a new category where people can po...
- ← Previous
- 1
- 2
- 3
- Next →