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 r~~
Type | On... | Excerpt | Status | Date |
---|---|---|---|---|
Answer | — |
A: Adding elements to wrapper after calling wrap doesn't work Remember that jQuery selectors in general can match more than one element. If you had multiple `` elements in your page, `$('p').wrap(wrapper)` would put wrapper divs around each of them. So `.wrap` uses its argument as a template to clone new wrappers for each match. Other jQuery DOM manipulation... (more) |
— | almost 2 years ago |
Edit | Post #287604 |
Post edited: |
— | almost 2 years ago |
Edit | Post #287615 | Initial revision | — | almost 2 years ago |
Answer | — |
A: Dealing with code maintenance when saving a large and complex entity in a single business transaction Chain of Responsibility doesn't strike me as appropriate for this problem, at least as I understand it. You want to use CoR if you have multiple different requirements for the processing of the same data—authentication, logging, A-B testing—things we generally call concerns. What it sounds like you'r... (more) |
— | almost 2 years ago |
Comment | Post #287607 |
The number 2 is also an important concept used in many software applications but it'd be madness to suggest a tag for it, because who searches for ‘questions related to 2-ness’?
I don't know if SO is doing the right thing and I'm asking under what circumstances would a user (here or there) say, wh... (more) |
— | almost 2 years ago |
Comment | Post #287607 |
Are any of these tags worth it? Who's searching for questions related to interface-the-abstract-concept or interfaces-as-occurring-in-c#, in our community of 589 posts? (more) |
— | almost 2 years ago |
Edit | Post #287604 | Initial revision | — | about 2 years ago |
Answer | — |
A: When would one not want to return an interface? `IList` is not necessarily representative of the general case; it's an interface that is (A) widely implemented by a variety of classes from a variety of sources, which themselves (B) tend to add additional functionality or constraints not captured by the signature of `IList`. There is, in my opinion... (more) |
— | about 2 years ago |
Comment | Post #287561 |
As a rule of thumb, I'd propose mentally replacing the string ‘ChatGPT’ with ‘this guy I go drinking with’ and doing what seems appropriate in that situation. (more) |
— | about 2 years ago |
Edit | Post #287572 | Initial revision | — | about 2 years ago |
Answer | — |
A: How to distinguish between single and multiple file media? You could trivially create a view that wraps the `media` table and includes a column that indicates if the media entry has more than one file associated with it. ```sql CREATE VIEW IF NOT EXISTS "mediaread" AS SELECT "media"., count("file"."uuid") > 1 AS "ismultifile" FROM "media" LEFT J... (more) |
— | about 2 years ago |
Edit | Post #287571 | Initial revision | — | about 2 years ago |
Answer | — |
A: Should we allow answers generated by ChatGPT? Good question, but solid ‘meh’ on the issue. I don't think a preemptive ban is warranted. It's not as if we're being flooded, and it's also not as if that one ChatGPT answer is worse than the median human answer here. I'd say let's upvote and downvote answers per usual without any particular restrict... (more) |
— | about 2 years ago |
Edit | Post #287534 | Initial revision | — | about 2 years ago |
Answer | — |
A: Qt Button changes drastically when setting its `border-radius`. See this comment: https://forum.qt.io/topic/60546/qpushbutton-default-windows-style-sheet#3 > Stylesheets are a totally different beasts. The default native drawing doesn't use stylesheets. They are a way to override native style dependent painting with HTML-like drawing. Usually if you change ... (more) |
— | about 2 years ago |
Edit | Post #287445 | Initial revision | — | about 2 years ago |
Answer | — |
A: What does this function definition mean in Haskell? `fn x [] = []` means that if the second argument to `fn` is an empty list, return an empty list. `fn x (True:ys) = x : fn x ys` means that if the second argument to `fn` starts with `True`, return a list that starts with the first argument to `fn` and continues with `fn x` applied to the remainder... (more) |
— | about 2 years ago |
Comment | Post #287357 |
Re-read my answer; the information you need to resolve your latest error is right there. (more) |
— | about 2 years ago |
Edit | Post #287357 | Initial revision | — | about 2 years ago |
Answer | — |
A: Why does my code show an error at deriving (eq)? (SOLVED) NEW ERROR: At SimpleEnigma & SteckeredEnigma constructors which I need help on :") `Eq` is a type class, and type class names are capitalized (like types and constructors). Changing `eq` to `Eq` should get you past that error. Conversely, in ```hs SimpleEnigma = SimpleEnigma rotor1 rotor2 rotor3 reflectorB offsets SteckeredEnigma = SteckeredEnigma rotor1 rotor2 rotor3 r... (more) |
— | about 2 years ago |
Edit | Post #287069 |
Post edited: |
— | about 2 years ago |
Edit | Post #287076 | Initial revision | — | about 2 years ago |
Answer | — |
A: Child div doesn't inherit parent's div background-color It's because of this rule: ```css { background: rgb(3, 28, 87); } ``` That applies the darker blue background to every element individually, and that isn't overridden when you change the background of a parent element. Consider applying your default background color to the `body` eleme... (more) |
— | about 2 years ago |
Suggested Edit | Post #287069 |
Suggested edit: (more) |
helpful | about 2 years ago |
Edit | Post #286780 |
Post edited: |
— | over 2 years ago |
Edit | Post #286780 |
Post edited: |
— | over 2 years ago |
Edit | Post #286780 | Initial revision | — | over 2 years ago |
Answer | — |
A: How to add vertical lines for visual separation in pandas plot I don't think this is possible using just the Pandas plotting API. You can use the lower-level Matplotlib API to do just about anything you can imagine: ```py ax = df.plot.bar() vlines = [2.5, 5.5] # x-positions of the group separators ax.vlines(vlines, 0, 1, transform=ax.getxaxistrans... (more) |
— | over 2 years ago |
Comment | Post #285116 |
If the developers care—and I'd hope they do, although all my browsers block such things for myself—SSO widgets can be isolated on their own page and thus only track the people who want to use them, at the cost of one additional click for those people. (more) |
— | over 2 years ago |
Comment | Post #286491 |
This is a command that'll need to be supported by the OS of the base Docker image you're using, which you haven't told us. This is more of an OS question than a Docker question. Might be more on topic at Linux Systems. (more) |
— | over 2 years ago |
Edit | Post #286430 | Initial revision | — | over 2 years ago |
Answer | — |
A: Is it possible to write protocols for enumerations in Python? There's one big difficulty with the proposed pattern. Enum instances are singleton instances of their particular class, and in general two enums from different classes are not equal even if they wrap the same int value. So an expression like `foobar == EnumProtocol.FOO` is never going to be true if `... (more) |
— | over 2 years ago |
Comment | Post #286412 |
Comments aren't for extended conversation. If you have more questions about JavaScript that aren't duplicates of your previous questions, and you can make the effort to make them good questions (i.e., you've researched them elsewhere, you've experimented on your own, you've read any relevant error me... (more) |
— | over 2 years ago |
Comment | Post #286412 |
The clues that tell me that the mentioned line is not actual JavaScript are the following:
* `css selector`—there is no JavaScript syntax that allows two words, outside of a string literal, to appear next to each other with no punctuation between them, unless one of the words is a keyword (which... (more) |
— | over 2 years ago |
Comment | Post #286412 |
Looks like a nice set of notes. When you have learned JavaScript, you will be able to do more than enumerate things that you have gotten to work; you will also be able to explain why something doesn't work.
There is nothing invalid or pseudocode-ish about `const iframes = iFrameResize()`. That cou... (more) |
— | over 2 years ago |
Comment | Post #286412 |
Frankly, yes, it is evident that you are still learning JavaScript. There's nothing wrong with that—we're here on this site to learn and to help others learn! And you're right that you will eventually master the language by making mistakes and remembering what you learn from them. But don't be over-c... (more) |
— | over 2 years ago |
Comment | Post #286412 |
I didn't see the comments that were deleted in that thread, but in my opinion elgonzo's initial comment is absolutely correct, both with respect to the facts of the matter and with respect to the advice that ought to be given to a junior JavaScript developer who posted the code you did.
With respe... (more) |
— | over 2 years ago |
Edit | Post #286412 | Initial revision | — | over 2 years ago |
Answer | — |
A: What is Backus–Naur form as applied in computer programming? For writing pseudocode? No. BNF is a notation—in practice, a family of similar notations, like how Markdown is a family of similar markup languages—for defining grammars. In software development and computer science, a grammar is a set of rules for determining whether a sequence of symbols (charac... (more) |
— | over 2 years ago |
Edit | Post #286045 |
Post edited: |
— | almost 3 years ago |
Edit | Post #286045 |
Post edited: |
— | almost 3 years ago |
Edit | Post #286045 | Initial revision | — | almost 3 years ago |
Answer | — |
A: Algorithmically generating the grid formed by the vertices of a dodecahedron (Hunt The Wumpus) Here is an animation of a cube with faces subdivided into two rectangles, morphing into a rhombic dodecahedron, with the Platonic dodecahedron as an intermediate state. This demonstrates that the edge graph of the Platonic dodecahedron is the same as the edge graph of the subdivided cube. There ar... (more) |
— | almost 3 years ago |
Edit | Post #285966 | Initial revision | — | almost 3 years ago |
Answer | — |
A: Is it OK to use scanf with a void pointer? From section 7.21.6.2 of this draft: > [T]he result of the conversion is placed in the object pointed to by the first argument following the `format` argument that has not already received a conversion result. If this object does not have an appropriate type, or if the result of the conversion ... (more) |
— | almost 3 years ago |
Edit | Post #285827 | Initial revision | — | almost 3 years ago |
Answer | — |
A: Migrating HTML strings to a more secure alternative Switching from HTML to Markdown to minimize risk of HTML injection doesn't make a lot of sense to me, since most Markdown implementations support a subset of HTML inline anyway. The better ones control what subset of HTML to allow by using a sanitizing library, such as (to take just one random exampl... (more) |
— | almost 3 years ago |
Edit | Post #285752 | Initial revision | — | almost 3 years ago |
Answer | — |
A: When stored procedures are preferred over application layer code? There are a few reasons for wanting to move computation closer to data. One is performance, which you've mentioned. Another is security. Databases enforce their own security boundary, and data that don't leave the database are data that can't be exfiltrated if your application layer is exploited some... (more) |
— | almost 3 years ago |
Comment | Post #285541 |
I start my unit tests, point at my cache, and say, ‘Ha ha, you're so lazy!’
(Sorry.) (more) |
— | almost 3 years ago |