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.

Activity for hkotsubo‭

Type On... Excerpt Status Date
Edit Post #283597 Post edited:
over 2 years ago
Comment Post #283596 I've updated my answer, now that I confirmed that `example` is the `ul`'s class
(more)
over 2 years ago
Edit Post #283597 Post edited:
over 2 years ago
Edit Post #283597 Initial revision over 2 years ago
Answer A: Function.prototype.call()
TL;DR To count the number of `li` items, just do: ```javascript console.log(document.querySelectorAll('ul.example > li').length); ``` That's all, no need to complicate with `filter.call` (but I'll explain that too, hang on). Adapt that to your HTML Of course you could change the se...
(more)
over 2 years ago
Comment Post #283596 You don't need to add everything, just the first 4 or 5 lines or so. I just want to confirm if `example` is the `ul`'s class
(more)
over 2 years ago
Comment Post #283596 Also, if you're testing the code in browser's console, that explains the `undefined`, because calling `console.log(whatever)` in browser's console prints the `whatever` value and also prints the return of `console.log` function (which is `undefined`). Anyway, please confirm where/how you're testing t...
(more)
over 2 years ago
Comment Post #283596 Can you provide an example of the HTML? I'm assuming that `.example` refers to the `ul` element, but it'd be nice if you could confirm that
(more)
over 2 years ago
Edit Post #282855 Post edited:
over 2 years ago
Edit Post #282855 Post edited:
over 2 years ago
Suggested Edit Post #283196 Suggested edit:
Fixed code block and rephrased a little
(more)
helpful over 2 years ago
Comment Post #283058 @#53305 Thanks! Regarding "celebrate excellent answers", perhaps something similar to bounties? I don't know, there are some discussions about not having rep at all, so maybe we'll need another way to do it...
(more)
over 2 years ago
Edit Post #283058 Post edited:
over 2 years ago
Edit Post #283058 Post edited:
over 2 years ago
Edit Post #283059 Post edited:
over 2 years ago
Edit Post #283059 Initial revision over 2 years ago
Question Enable syntax highlighting for D language
According to this answer, Codidact uses highlight.js for syntax highlight, and "support whatever languages are enabled by default in that package". And according to this table (in highlight.js GitHub), D language is enabled by default (no need for additional packages), but it also says that "our d...
(more)
over 2 years ago
Edit Post #283058 Post edited:
use D syntax highlight in code blocks
over 2 years ago
Edit Post #283058 Post edited:
over 2 years ago
Edit Post #283058 Initial revision over 2 years ago
Answer A: How to get string length in D?
> what ways can I get a string's length in D? There are many different ways, and that will depend on the content of the strings, their types, and how you define the terms "character" and "length". If you're dealing only with ASCII characters, using `length` - as pointed by the other answers - w...
(more)
over 2 years ago
Edit Post #282908 Post edited:
almost 3 years ago
Edit Post #282908 Initial revision almost 3 years ago
Answer A: What's the difference between =, == and === operators in JavaScript?
Assignment (`=`) `=` is the assignment operator: it assigns a value to "something". One important detail is that an assignment expression not only assigns a value, but it also returns it. This allows chaining, such as: ```javascript x = y = z = 1; // all variables will be assigned the value...
(more)
almost 3 years ago
Edit Post #282855 Post edited:
almost 3 years ago
Edit Post #282855 Post edited:
almost 3 years ago
Edit Post #282855 Initial revision almost 3 years ago
Answer A: What's the difference between Inheritance and Polymorphism?
> What you're asking is a very broad topic, and it'd require entire books to cover everything. For the sake of simplicify, I'll just stick to the basics. Inheritance Inheritance can be explained as an "is a" relation, or a specialization of a especific type. Borrowing (and extending) the e...
(more)
almost 3 years ago
Edit Post #282832 Post edited:
I've tried to rephrase the question, making it more clear and focused (also, removed tag with typo and replaced by one with correct spelling)
almost 3 years ago
Suggested Edit Post #282832 Suggested edit:
I've tried to rephrase the question, making it more clear and focused (also, removed tag with typo and replaced by one with correct spelling)
(more)
helpful almost 3 years ago
Edit Post #282753 Post edited:
almost 3 years ago
Comment Post #282752 Yes, in this case, if you merge only branch A, it won't include B. Another alternative is to apply specific commits, using `cherry-pick`: https://git-scm.com/docs/git-cherry-pick
(more)
almost 3 years ago
Edit Post #282753 Post edited:
almost 3 years ago
Edit Post #282753 Post edited:
almost 3 years ago
Edit Post #282753 Post edited:
almost 3 years ago
Comment Post #282752 I've answered the first part (merge both A and B). Regarding the second part ("*backport feature-A without bringing along feature-B in the future*"), I didn't understand what you want to do...
(more)
almost 3 years ago
Edit Post #282753 Initial revision almost 3 years ago
Answer A: What's the correct way to merge a branch and its dependent branch back to master?
> I think a branch is a set of commits Well, technically no, it's not. But first things first. DAG (Directed Acyclic Graph) Personally, Git became much more easier to understand after I've read things like this. The "whoa" moment was when it compares Git to a DAG (Directed Acyclic Grap...
(more)
almost 3 years ago
Comment Post #282752 I'm guessing that `feature/null-rows-VER-74021-VER-75002` is branch A and `feature/ct-comparisons-VER-75425` is branch B, and you want to merge both to master, right?
(more)
almost 3 years ago
Comment Post #282752 If I understood correctly, just merging B is enough, as B was branched from A (thus, B "contains" all A commits, as there were no further commits in A). Can you add the output of `git log --graph --format="%ad %h [%p] %d"`, just to confirm how your repo history is?
(more)
almost 3 years ago
Comment Post #282732 With HTML, you can't. You could use another script language, but I don't know of any that is supported by all browsers (at least not widely supported like JavaScript is)
(more)
almost 3 years ago
Comment Post #282673 @#8046 I saw that the post is working now, but the OP user is not deleted. Was the user restored? I'm just curious to know what happened. Anyway, thanks for fixing it!
(more)
almost 3 years ago
Edit Post #282673 Initial revision almost 3 years ago
Question Error 500 in one specific post (the rest of the site is fine)
I've got a HTTP Error 500 when trying to access this post. Here's the quote error ID's: `ef4f6ec1-8d0f-4be3-9553-36e01b5f01c4` and `bbeb9bf9-2c58-43b1-be05-c9e914bb80bf`. I've browsed to another posts and pages and all of them are working fine. It seems that only that specific post causes the...
(more)
almost 3 years ago
Comment Post #282670 `while (min < max)` - this is an infinite loop, because both `min` and `max` never change their values anywhere in the loop. Thus, `i` ends up accessing some position out of the array's bounds, which usually causes a segfault - I didn't test the code to see if there are more problems, but at a first ...
(more)
almost 3 years ago
Comment Post #282532 If I understood correctly, **maybe** what you actually need is a Static Site Generator: https://snipcart.com/blog/choose-best-static-site-generator (I use Jekyll for my personal blog, BTW). Not sure if that's what you're looking for, but take a look at the concept in general, maybe it's a different a...
(more)
almost 3 years ago
Edit Post #282544 Post edited:
Improved grammar, formatted code
almost 3 years ago
Suggested Edit Post #282544 Suggested edit:
Improved grammar, formatted code
(more)
helpful almost 3 years ago
Comment Post #282532 Perhaps you should edit and clarify the question. At least for me, I'm failing to see what the actual problem is. Why can't you use PHP (as you confirmed you're already using) as some `include`'s will do the job, and why limiting the number of lines is such a serious issue/requirement (so "serious" t...
(more)
almost 3 years ago
Comment Post #282532 I'm afraid you're focusing on the wrong issues. 80 lines is not large, and nesting is good to make things easy and convenient for the dev team: it makes the code clearer and easier to understand and maintain (on the other hand, keeping everything in one non-nested line just for the sake of having few...
(more)
almost 3 years ago