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

Type On... Excerpt Status Date
Comment Post #282283 Great answer! Although, if i am picky (and a bit of an ar*ehole) i think you took the challenge away from Derrick, now he needs to find himself another one :-) I also think a mention of "[rubber duck debugging](https://www.thoughtfulcode.com/rubber-duck-debugging-psychology/)" would apply to the situ...
(more)
almost 3 years ago
Comment Post #282233 Yeah, my false perception of an outlier due to me not noticing the E notation led me to a misbelief that the test functions where only executed once. Guess i need some shut-eye...
(more)
almost 3 years ago
Comment Post #282233 @hkotsubo‭ oops, i have to admit i didn't notice the scientific notation. My bad, i am sorry... :-)
(more)
almost 3 years ago
Comment Post #282233 To ameliorate such effects of uncontrolled disturbing runtime effects and get "better" numbers without resorting to a full benchmark suite, run each individual test at least a couple hundred/thousand times and average the execution time. Also, prealloacte the stack to a size of len(s)/2 and performan...
(more)
almost 3 years ago
Comment Post #282233 Your numbers don't appear to be "clean". Look at the "Unbalanced in the beginning" test. How could "is_balanced(s)" take more than 1 sec? Of course, it did. But this is not the performance characteristic of the alogrithm but rather some "disturbance" in your runtime environment. In a clean runtime en...
(more)
almost 3 years ago
Edit Post #282232 Post edited:
almost 3 years ago
Edit Post #282232 Post edited:
almost 3 years ago
Edit Post #282232 Post undeleted almost 3 years ago
Edit Post #282232 Post deleted almost 3 years ago
Edit Post #282232 Post edited:
almost 3 years ago
Edit Post #282232 Post edited:
almost 3 years ago
Edit Post #282232 Post edited:
almost 3 years ago
Edit Post #282232 Post edited:
almost 3 years ago
Edit Post #282232 Post edited:
almost 3 years ago
Edit Post #282232 Post edited:
almost 3 years ago
Edit Post #282232 Post edited:
almost 3 years ago
Edit Post #282232 Initial revision almost 3 years ago
Answer A: Detecting balanced parentheses in Python
Use a stack while just scanning your string once from left to right. No need for multiple (performance-wise) expensive string replacements. If implemented right, the stack will only ever contain at maximum `len(s)/2` elements. The algorithm is rather straightforward: Check first whether the str...
(more)
almost 3 years ago
Comment Post #282203 This approach is not going to work (i am still curious about an alternative solution someone might come up with, though). From the doc about generated cols https://dev.mysql.com/doc/refman/8.0/en/create-table-generated-columns.html, first paragraph: "_Values of a generated column are computed from an...
(more)
almost 3 years ago
Edit Post #282155 Post edited:
Spelling
almost 3 years ago
Edit Post #281886 Post edited:
Spelling...
almost 3 years ago
Edit Post #282155 Post edited:
almost 3 years ago
Edit Post #282155 Post edited:
almost 3 years ago
Edit Post #282155 Post edited:
almost 3 years ago
Edit Post #282155 Post edited:
almost 3 years ago
Edit Post #282155 Post edited:
almost 3 years ago
Edit Post #282155 Post edited:
almost 3 years ago
Edit Post #282155 Post edited:
almost 3 years ago
Edit Post #282155 Post edited:
almost 3 years ago
Edit Post #282155 Post edited:
almost 3 years ago
Edit Post #282155 Post edited:
almost 3 years ago
Edit Post #282155 Initial revision almost 3 years ago
Answer A: Validate All Object Properties with JSON Schema
If the names of the properties in the jobs and people objects are variable, you can use the `patternProperties` keyword instead of the `properties` keyword in the respective schemas for jobs and people. As per specification for `patternProperties` (https://json-schema.org/draft/2020-12/json-schema...
(more)
almost 3 years ago
Comment Post #282143 I would prefer to have this verified first. Not that it turns out that my idea, while sounding good, is actually not being workable. Wouldn't be the first time... ;)
(more)
almost 3 years ago
Comment Post #282143 If your identifiers have to satisfy some specification wrt to format and/or allowed characters, you might construct the regex pattern(s) in way that they match the specification, and additionally employ the "additionalProperties" keyword that uses the "false" schema to fail validation if any properti...
(more)
almost 3 years ago
Comment Post #282143 Just a rough idea from the top of my head (untested, unverified, might be bogus). You could perhaps use the "patternProperties" keyword, with which you would specify a regex pattern against which property names are being matched. Since in your case the property names in "jobs" and "people" don't matt...
(more)
almost 3 years ago
Comment Post #282119 You have defined `dir="rtl"` in your `<form>` element. Note how the comboboxes in the background of your screenshot are mirrored compared to LTR. So, i would naturally expect the radiobuttions also adhere to this directive. Since radiobuttons are normally **in front** of a text label, for RTL this wo...
(more)
almost 3 years ago
Comment Post #282119 To clarify, if you would suffer from a left-to-right vs. right-to-left issue, you would have a problem with the direction of the text flow, where for example "אבחון קידום אתרים" (text direction being RTL/right-to-left) would be incorrectly displayed as "םירתא םודיק ןוחבא" (text direction being LTR/le...
(more)
almost 3 years ago
Comment Post #282119 Uh, the text in your screenshot is right-to-left, no? I don't know Hebrew, but "אבחון קידום אתרים" translates to "SEO Diagnosis", and "שיווק באמצעות תוכן" to "Content Marketing" or something similar (based on Google Translate and Wikipedia). It feels to me your actual concern/problem seems to be rath...
(more)
almost 3 years ago
Comment Post #282044 Side note: The `type` variable looks exceptionally fishy to me. Where is it set to a non-null value? What are conf_verify_key and parse_file _really_ doing with the `type` variable used as one of their function parameters, especially when its value is `null`? Since i don't know anything about those, ...
(more)
almost 3 years ago
Comment Post #282044 "Am I missing something?" Who knows. Use a step debugger and step through your code. This should make it easier to encircle the code line that causes the seg fault. Also watch any variable used in the function that you suspect is crashing (parse_group?), and see whether the vars have the expected val...
(more)
almost 3 years ago
Comment Post #282033 Side note: If you can't diagnose/solve the problem, i suggest seeking help in a mysql/Manjaro/Arch forum that's better suited for a back-and-forth discussion. Trying to troubleshoot system configuration problems based on a brief description in a Q&A format is rather limiting and cumbersome, as in man...
(more)
almost 3 years ago
Comment Post #282033 (2/2) Overview of using mysql with systemctl here: https://dev.mysql.com/doc/refman/8.0/en/using-systemd.html
(more)
almost 3 years ago
Comment Post #282033 It feels like the mysql server isn't running. Trying to use the `service` command will not succeed, because Manjaro is based on Arch, and Arch does not have the `service`, but rather the `systemctl` command (in other words, systemd). Thus, try (re)starting mysql by using the `systemctl` command. Be a...
(more)
almost 3 years ago
Edit Post #281886 Post edited:
almost 3 years ago
Edit Post #281886 Post edited:
almost 3 years ago
Comment Post #281886 @hkotsubo‭ good point!
(more)
almost 3 years ago
Edit Post #281886 Post edited:
almost 3 years ago
Edit Post #281886 Post edited:
almost 3 years ago
Edit Post #281886 Post edited:
almost 3 years ago