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 #286372 You need copious amounts of coffee, me thinks... The result of `-1 + 0 * 42` is definitely -1. (Fun quizz and trick question: What's the result of `-1 + 0 * ∞`?)
(more)
over 2 years ago
Comment Post #286358 The analogy could help, if you would _just_ think about how you used the term "pseudo". Both cars and motobikes are road vehicles, being subject to the very same road traffic rules/laws. Both are wheeled vehicles with the same principle of locomotion (ICE or electric engine acting upon the wheel(s...
(more)
over 2 years ago
Comment Post #286358 Depends. Is a passenger car a "pseudo motobike" to you (or vice versa, is a motobike a "pseudo car")? If you see a car as a "pseudo motobike" (or vice versa), then you probably also see this recursive function as some "pseudo TreeWalker". If however you dont' see a car as a "pseudo motobike" (or v...
(more)
over 2 years ago
Comment Post #286333 Ah, alrighty then... If you wish, you can go ahead and self-answer...
(more)
over 2 years ago
Comment Post #286333 > what is TEXT_NODE here I already linked the documentation that explains what it is. Once more in case it got missed: https://developer.mozilla.org/en-US/docs/Web/API/Node/nodeType
(more)
over 2 years ago
Comment Post #286333 Oh, my bad. Apologies (sincerly!). It's unfortunately quite easy to read your question that way, like "_What does `a == b` do?_" instead of the "_What is that `a` thing there in the `a==b` expression?_" as you intended. As the name of the "nodeType" property suggests, it contains a value that repr...
(more)
over 2 years ago
Comment Post #286335 Additionally to what @hkotsubo wrote, `=` (assignment) would not be entirely correct here. (It would have been possible to design the language to allow `=`, but it would make this operator essentially somewhat ambiguous in its use.) `for (const e of {some enumeration} )` is iterating over an enume...
(more)
over 2 years ago
Comment Post #286333 A branch is a sub-tree in a tree, a node is just an element that can have child and/or parent relationships with other nodes (elements) in the tree. Such an element/node itself is not a branch. The relationship between nodes/elements is what is forming a tree/branch. Specifically a branch of/for/asso...
(more)
over 2 years ago
Comment Post #286335 Your code snippet features only two variables, both are named. One is named "e", the other is named "child". Variables by definition always have a name (more specifically: an identifier). There are no unnamed variables (unless one would consider an indexed storage location/position in a collection or...
(more)
over 2 years ago
Comment Post #286307 > To sum it all up, from my personal experience, you are wrong I'll take your word for it. I still disagree and still don't think your approach to learning JS is productive, but i also understand that my advice is unwelcome. It is not my intention to get in your way. My apologies. I will not do it...
(more)
over 2 years ago
Comment Post #286307 (Good) Tutorials, courses and text books are not only teaching you the fundamentals, but are doing so in a structured manner, with later sections/chapters/topics building on what has been thought in earlier sections/topics. Asking on Q&A as an attempt of learning a language instead of using tutorials...
(more)
over 2 years ago
Comment Post #286307 I believe you need to spend time with a tutorial, course or text book covering the Javascript language fundamentals. Asking around for bits and pieces about a language and how do this or how do that is not really productive, imo, when you are lacking the knowledge of basic Javascript fundamentals. Be...
(more)
over 2 years ago
Comment Post #286307 > I don't miss the point of my own question but I made a mistake in phrasing it ! I know, i was being a facetious smartass... ;-P In my personal and worthless opinion, both would be okay; either deleting, or adding an update to the question (but not change the existing question body in a substa...
(more)
over 2 years ago
Comment Post #286307 @#56529 > I used it on a very specific element unique by CSS ID and there on a very specific text. > For me, when applied in the specific way, it's a good code, short and very easy to understand. Good to hear, but... You seem to miss the point of your own question :-) Your question ask...
(more)
over 2 years ago
Comment Post #286307 This solution will not ensure that the "_webpage won't change at all_" and that "_it will stay almost the same but just without that character_" (your words), unless you **strictly restrict** it to not replace/remove characters that are part of HTML tag names, attribute names, attribute values, part ...
(more)
over 2 years ago
Comment Post #286304 Yes, one solution, and also a good way to potentially destroy HTML element and attribute names present in the inner html and mangle attribute values, if the character to be replaced is part of an element name or attribute name or value. Sure it addresses what has been asked in the question. And th...
(more)
over 2 years ago
Comment Post #286302 > [...] but if a Unix compiler doesn't, that would be a problem for me. Well, you already linked the POSIX standard for c99. Does it feature an -isystem option? And if c99 is not required by the POSIX standard to have an -isystem option, would it be a problem for you if some POSIX-compliant c99 on...
(more)
over 2 years ago
Comment Post #286304 Or, you know, you can do it like it often happens in business. You just bullshit your client, even if you can't write proper production code if your life depended on it. Being a (very) good salesman can compensate for such shortcomings more than enough. I.e., the time-tested "if you can't dazzle them...
(more)
over 2 years ago
Comment Post #286304 > [...] how would you prefer to do so if asked by a client? That's not how this would happen in the real world. But anyway, i would do it in a way where i have (A) confidence that i will end up with a working and robust solution and (B) where have a good understanding of how much effort it will ta...
(more)
over 2 years ago
Comment Post #286304 Tree traversal is a general concept of visiting the nodes in a tree data structure -- it is not specific to JavaScript nor otherwise strongly associated with JavaScript. Tree data structures and tree traversal are very often used in a multitude of different software written in a multitude of diff...
(more)
over 2 years ago
Comment Post #286302 > I couldn't find the POSIX specification for cc(1). No surprise, because cc is not part of the POSIX-defined utilities. c99 is. (with respect to the latest POSIX 1003.1-2017 standard) Aside from that, without specifying which C/C++ (i assume) compiler(s) and which compiler versions your Q is a...
(more)
over 2 years ago
Comment Post #286279 Come to think of it, i start suspecting that, depending on how exactly you disabled the "View History" button, you did not just disable that button but the entire history view feature. For testing my suspicion, enable the "View History" button again, and then test your script again. Does the scri...
(more)
over 2 years ago
Comment Post #286279 Alright. Where exactly do you see this "אין פעולה כזו" error message? In your browser console, or is this part of an error page sent by the MediaWiki server?
(more)
over 2 years ago
Comment Post #286279 Probably the displayed title in the \<H1\> element differs from the actual title slug you need to give in the query part of the URL. Since WikiMedia is for example used by Wikipedia, i suggest to visit Wikipedia and observe what title slugs it uses in the URLs to the history page with respect to d...
(more)
over 2 years ago
Comment Post #286265 What is the match pattern you are using in your userscript manager to load your script? Note that the match pattern has to match whatever URL `${protocol}//${domain}/index.php?title=${h1.innerText}&action=edit` evaluates to. Otherwise, when your browser navigates to this URL (which is effectively ...
(more)
over 2 years ago
Comment Post #286191 (3/3) > explain exactly how memmove_s checks it's parameters against null, What's the point of asking _how_ exactly a `memmove_s` implementation achieves checking for null? Why would that matter? What matters is that to conform with the behavior described in C11 K 3.7.1.2, `memmove_s` has to so...
(more)
over 2 years ago
Comment Post #286191 (2/3) > [...] On the contrary, they do just as I advocate in my answer, cover null checks with documentation. See for example C11 K 3.7.1.2 "The memmove_s function" ... "Neither s1 nor s2 shall be a null pointer." This means that the responsibility is on the caller side through documentation. I...
(more)
over 2 years ago
Comment Post #286191 > It's not "whatever" [...] The "whatever" was in response to not wanting to focus on bounds-checking, but trying to stick to the topic of the Q and A about null checks. But i have to take the blame for it because i wrote my first comment exactly like that. Of course if the function receives poin...
(more)
over 2 years ago
Comment Post #286191 Whatever. Even the C standard defines functions that check for null pointers. To lean on your mention of `memmove`, how about `memmove_s` (since C11, i believe), for example. It's actually quite funny how your absolutist recommendation of "_We should **never** add checks against null [...]_" is...
(more)
over 2 years ago
Comment Post #286191 Since bounds checking should be done anyway (depending on the purpose of the function, as well as whether it is just "locally"/"privately" used vs. it being some "public" function of some degree) when passing pointers to an array (or some memory buffer) to avoid buffer-overflow bugs, why not also che...
(more)
over 2 years ago
Comment Post #286186 Do you mean, you saw the **literal ASCII text chars/bytes/string** "_ID[I]=123, USER[S]=8080, PASS[S]=0000,_" in the TCP packet payload?
(more)
over 2 years ago
Comment Post #286183 `~` should have worked, assuming you structure your HTML document accordingly. But if you are sure that `+` is the right combinator and it's not working, then something else is amiss (aside from what i already pointed at in my comments above), something that i cannot deduce based on the limited kn...
(more)
over 2 years ago
Comment Post #286183 As the documentation says, when using the `~` combinator, the _div_ element (to be found by the `.ani-square` selector) has to come **after** the _button_ element (to be found by the `.detect:hover` selector) in the HTML document. And the div element has to be a **sibling** (which is **NOT** a child/...
(more)
over 2 years ago
Comment Post #286183 > Doesn't do anything though. :/ You are on the right track, but yes, that does not do anything. Read the documentation about `~` carefully. `~` can only select sibling elements that come _after_ the element found by the left-hand selector (i.e., the div element has to come _after_ the button in t...
(more)
over 2 years ago
Comment Post #286183 Since this looks like a learning exercise to me, i am just giving a hint that will hopefully get you rolling: Using CSS combinators, you could specify CSS selectors which select an element (the "square" div) in relationship to the hovered button (assuming you structure your HTML document according...
(more)
over 2 years ago
Comment Post #286176 Follow the link(s) given in this documentation wrt to 'Specifying directories to scan' and pay utmost attention to what is written there both inside and outside the notes blocks...
(more)
over 2 years ago
Comment Post #286176 Wrt to your question, pay attention to the code-scanning workflow documentation: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#avoiding-unnecessary-scans-of-pull-requests Quote: "_on:pull_request:pat...
(more)
over 2 years ago
Comment Post #286176 While the following link is not directly addressing the content of your question, it ...well... still adresses the ...uh... content of your question: https://software.codidact.com/posts/284871/284872 ;-)
(more)
over 2 years ago
Edit Post #286169 Post edited:
over 2 years ago
Edit Post #286169 Post edited:
over 2 years ago
Edit Post #286169 Post edited:
over 2 years ago
Edit Post #286169 Post edited:
over 2 years ago
Edit Post #286169 Post edited:
over 2 years ago
Edit Post #286169 Post edited:
over 2 years ago
Edit Post #286169 Post edited:
over 2 years ago
Edit Post #286169 Post edited:
over 2 years ago
Edit Post #286169 Post edited:
over 2 years ago
Edit Post #286169 Post edited:
over 2 years ago
Edit Post #286169 Post edited:
over 2 years ago
Edit Post #286169 Post edited:
over 2 years ago