Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »

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‭

51 posts
71%
+3 −0
Q&A Why does pushing to one array affect all the arrays in my two-dimensional array?

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...

1 answer  ·  posted 2y ago by Moshi‭  ·  last activity 2y ago by Moshi‭

Question javascript array
85%
+10 −0
Q&A Open file in script's own folder

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...

posted 2y ago by Moshi‭

Answer
75%
+4 −0
Q&A Hash sign as a path component in a user script's @match command prevents the script from running

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...

posted 2y ago by Moshi‭

Answer
66%
+2 −0
Q&A How to fire the change event for an input field?

You can use the dispatchEvent method. const inputField = document.querySelector("#example"); inputField.value = "X"; inputField.dispatchEvent(new Event('change')); jsfiddle

posted 2y ago by Moshi‭

Answer
90%
+18 −0
Q&A Why are list comprehensions written differently if you use `else`?

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...

posted 2y ago by Moshi‭

Answer
66%
+2 −0
Q&A Change font-family with JavaScript

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...

posted 2y ago by Moshi‭

Answer
81%
+7 −0
Q&A Is it a good idea to have a permanent branch for a feature?

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...

3 answers  ·  posted 2y ago by Moshi‭  ·  last activity 2y ago by Hyperlynx‭

50%
+1 −1
Q&A How do I ask git-show-branch to display a commit range?

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-...

posted 2y ago by Moshi‭  ·  edited 2y ago by Moshi‭

Answer
80%
+6 −0
Q&A Why does Firefox block based on a restrictive default-src directive, when more specific, more permissive *-src exist?

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 ...

posted 3y ago by Moshi‭  ·  edited 3y ago by Moshi‭

Answer
81%
+7 −0
Q&A What's the difference between =, == and === operators in JavaScript?

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...

posted 3y ago by Moshi‭  ·  edited 3y ago by Moshi‭

Answer
86%
+11 −0
Q&A Why use an asterisk after a type?

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...

posted 3y ago by Moshi‭

Answer
85%
+10 −0
Q&A How to set text-align for whole column of HTML table?

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...

posted 3y ago by Moshi‭

Answer
83%
+8 −0
Meta How to inhibit auto link generation?

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&gt...

posted 3y ago by Moshi‭  ·  edited 3y ago by Moshi‭

Answer
60%
+1 −0
Meta What is the point of tagging a question with both a parent and a child tag?

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,...

posted 3y ago by Moshi‭

Answer
60%
+1 −0
Q&A Are hyphens and/or underscores valid in golang package names?

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...

posted 3y ago by Moshi‭  ·  edited 3y ago by Moshi‭

Answer
77%
+5 −0
Meta What is our policy on tags?

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...

3 answers  ·  posted 3y ago by Moshi‭  ·  last activity 3y ago by Alexei‭

71%
+3 −0
Meta Code Reviews: ‘it's fine’

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...

posted 3y ago by Moshi‭

Answer
66%
+2 −0
Q&A Will my implementation of a Spring Boot app work after being deployed on the Internet?

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 ...

posted 3y ago by Moshi‭

Answer
71%
+3 −0
Q&A Is there an equivalent way of returning early in a MySQL stored procedure?

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...

posted 3y ago by Moshi‭

Answer
75%
+4 −0
Meta Give actionable feedback when closing questions

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...

posted 3y ago by Moshi‭

Answer
76%
+8 −1
Q&A Styling with classes vs styling with CSS

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>...

1 answer  ·  posted 3y ago by Moshi‭  ·  last activity 3y ago by luap42‭

66%
+2 −0
Q&A Nodejs wrap async function in synchronous function

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...

posted 3y ago by Moshi‭

Answer
71%
+3 −0
Meta Meaning of the tag software practices?

(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...

posted 3y ago by Moshi‭

Answer
75%
+4 −0
Q&A Function call; `this` gets bound to unexpected value

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...

posted 3y ago by Moshi‭

Answer
80%
+6 −0
Meta Code Challenges Category (Code Golfing & others)

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...

1 answer  ·  posted 4y ago by Moshi‭  ·  last activity 2y ago by Trilarion‭