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 #282753 Initial revision over 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)
over 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)
over 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)
over 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)
over 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)
over 3 years ago
Edit Post #282673 Initial revision over 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)
over 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)
over 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)
over 3 years ago
Edit Post #282544 Post edited:
Improved grammar, formatted code
over 3 years ago
Suggested Edit Post #282544 Suggested edit:
Improved grammar, formatted code
(more)
helpful over 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)
over 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)
over 3 years ago
Comment Post #282525 I've seen those being called "single page" and "multi page" forms. But I don't believe there's a formal standard for that
(more)
over 3 years ago
Edit Post #282486 Post edited:
Improved grammar, added tags
almost 4 years ago
Comment Post #282487 If we're meant to be pedantic/technically accurate, we'd never call it "string", but if you call it that way, people - at least anyone familiar with the language - will usually know that you actually mean "*a contiguous sequence of chars terminated by the null character (`\0`)*" (regardless of how it...
(more)
almost 4 years ago
Comment Post #282487 @Istiak‭ Actually, it's a little bit more complicated than that. A pointer to some type `T` is, let's say, "interchangeable" with an array of `T` (actually, the pointer points to the array's first element). In C, a string is actually an array of chars (terminated by `\0`), so a `char *` (a pointer to...
(more)
almost 4 years ago
Suggested Edit Post #282486 Suggested edit:
Improved grammar, added tags
(more)
helpful almost 4 years ago
Edit Post #282354 Post edited:
almost 4 years ago
Edit Post #282354 Initial revision almost 4 years ago
Answer A: Accessibility standard/s for multilined <input type="text"> fields
The standard for multi-line text input is to use a `textarea`. Don't use `input type="text"`, it won't work. I'm not sure why you don't want to use a `textarea`, but after reading this answer, I hope you'll understand why an `input` is not the correct solution. Definitions MDN defines `input ...
(more)
almost 4 years ago
Comment Post #282344 `input type="text"` is single line by definition. If you want multiline input, use a `textarea` - unless there's a good reason to not use it (and I don't see - and can't imagine - any reason for that)
(more)
almost 4 years ago
Comment Post #282283 @elgonzo There's still the challenge of code-golfing the code (make it as small as possible). But as I said, I'm not the best one to suggest anything about that, so it's "left as an exercise to the reader (aka Derrick)" :-)
(more)
almost 4 years ago
Edit Post #282283 Post edited:
almost 4 years ago
Edit Post #282283 Post edited:
almost 4 years ago
Edit Post #282283 Post edited:
almost 4 years ago
Edit Post #282283 Initial revision almost 4 years ago
Answer A: Where did my proper divisor sum program went wrong?
When you do `x=y=z=[]`, you're making `x`, `y` and `z` point to the same list. Example: ```python x=y=z=[] add element to x x.append(1) add element to y y.append(2) but x, y and z all point to the same list print(z) # [1, 2] ``` So the first thing to fix is this, set a different list to...
(more)
almost 4 years ago
Edit Post #282233 Post edited:
almost 4 years ago
Edit Post #282233 Post edited:
almost 4 years ago
Comment Post #282233 @elgonzo AFAIK, lists in Python can't be preallocated. You can create one with N elements, and then use those already-created spaces. I've tested here, but that didn't make the code much faster.
(more)
almost 4 years ago
Comment Post #282233 And the `timeit` module already takes care of most "disturbances", and does the tests as clean as possible, running each test lots of times and doing some other stuff that I admit I don't fully know (but I've read some docs mentioning some things it does to eliminate any disturbances). Anyway, I incr...
(more)
almost 4 years ago
Comment Post #282233 @elgonzo The "unbalanced in the beginning" took `1.2465003237593919e-05` seconds - note the scientific notation, with "e-05" in the end, which actually means `0.0000124...` seconds.
(more)
almost 4 years ago
Edit Post #282233 Post edited:
almost 4 years ago
Edit Post #282233 Post edited:
almost 4 years ago
Edit Post #282233 Initial revision almost 4 years ago
Answer A: Detecting balanced parentheses in Python
Instead of replacing the brackets, you could do just one loop, and keep a stack with the opening brackets. Every time you find a closing bracket, check if it corresponds to the stack top: if it's not, the string is invalid, else, pop the opening bracket and proceed to the next character. Do it unt...
(more)
almost 4 years ago
Edit Post #282227 Post edited:
fixed typo and added tag
almost 4 years ago
Suggested Edit Post #282227 Suggested edit:
fixed typo and added tag
(more)
helpful almost 4 years ago
Edit Post #282229 Initial revision almost 4 years ago
Answer A: Counting Sundays without Python datetime module
First of all, I've added a `print` in your code to show the dates: if days % 7 == 0 and currentday == 1: print(f'{currentyear}-{currentmonth:>02}-{currentday:>02}') sundays += 1 And in the first lines I've noticed that you're actually counting the Tuesdays: ```none 190...
(more)
almost 4 years ago
Edit Post #282164 Initial revision almost 4 years ago
Answer A: How can I emulate regular expression's branch reset in Java?
Currently, Java 16 is the latest version, and there's no support to branch reset yet. But one - still far from ideal - alternative is to use lookarounds: ``` Pattern pattern = Pattern.compile("([aeiou]+(?=\\d+\\W+)|[123]+(?=[a-z]+\\W+))"); Matcher matcher = pattern.matcher("ae123. 111abc!!"); w...
(more)
almost 4 years ago
Edit Post #282066 Initial revision almost 4 years ago
Answer A: What does the "\s" shorthand match?
The complete set of characters matched by the `\s` shorthand varies according to the language/API/tool/engine you're using. In addition to that, there might be configurations that change this behaviour. In a general way, `\s` - at least in the engines that I've seen - always include the following...
(more)
almost 4 years ago
Edit Post #282065 Initial revision almost 4 years ago
Question What does the "\s" shorthand match?
I've seen some regular expressions (regex) using `\s` when they want to match a space, but I noticed that it also matches line breaks. Example: the regex `[a-z]\s[0-9]` (lowercase ASCII letter, followed by `\s`, followed by a digit) matches both `a 1` and ```none b 2 ``` Because `\s` matc...
(more)
almost 4 years ago
Edit Post #282006 Post edited:
almost 4 years ago
Edit Post #282006 Post edited:
almost 4 years ago