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 hkotsubo‭

81 posts
66%
+2 −0
Q&A How can I write an egrep (grep -E) regexp that matches lines containing two stanzas in arbitrary order?

Can that even be done without having to repeat either or resorting to more advanced processing than pure regular expressions I don't think it can. If you don't want to repeat x1=y2 and c5=d6, you...

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

Answer
60%
+1 −0
Q&A What input functions can I use in TIO's PHP?

You could use fgets to read from STDIN. And to print the message, just use the short tag (<?= whatever, which is a shorthand to <?php echo whatever; ?>): <?='Hello, '.fgets(STDIN).'!'...

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

Answer
60%
+1 −0
Q&A Are there practical reasons for designing a method-only class/object?

It depends. Regarding "grouping functions/methods": as a general rule, you should group things that make sense to be together. Yes, it's a very broad and generic rule, and somewhat subjective. How...

posted 2y ago by hkotsubo‭

Answer
60%
+1 −0
Q&A How to uncollapse the first and second tiers of a link tree in JavaScript?

According to the documentation, the hasAttribute method expects only one argument (the attribute's name), and it tells only if that attribute is present, regardless of its value. Hence, the return ...

posted 2y ago by hkotsubo‭

Answer
60%
+1 −0
Q&A How to group a flat list of attributes into a nested lists?

You could create a dictionary to map each attribute to its respective list of items. Then you get the dictionary values to create the final list. Something like this: import re pattern = re.comp...

posted 2mo ago by hkotsubo‭  ·  edited 2mo ago by hkotsubo‭

Answer
50%
+0 −0
Q&A Mocking methods with arguments

Based on your answer, I guess you just wanted to have a list of unique arguments that were passed to B::add. In that case, you could use a Set instead of a List: // "Type" is whatever type B:add r...

posted 2y ago by hkotsubo‭

Answer