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 r~~‭

59 posts
66%
+2 −0
Q&A Why does `let map f = id >=> switch f` work in F#?

when I look at the type signatures, it is not supposed to work. The types work because they're parameterized. The types of the combinators involved are (renaming all parameters to be unique fo...

posted 16d ago by r~~‭

Answer
66%
+2 −0
Q&A How to implement `map` using the fish (>=>, Kleisli composition) operator in F#?

Is there a "cleaner" implementation similar to map's? Yes: let map f = id >=> switch f This follows from two of your other equations: map f = bind (switch f) g >=> h = g >...

posted 16d ago by r~~‭  ·  edited 15d ago by r~~‭

Answer
66%
+2 −0
Q&A Why does `Zip` require `Semialign`

There's good reason to believe this is simply historical accident. The Semialign class came first, and used to include zip and zipWith directly. When those members were separated out into their own...

posted 2mo ago by r~~‭

Answer
75%
+4 −0
Q&A What does "namespace" mean?

A namespace is a category to which a name can belong. Think of family names for people: I may be friends with several Jims, and if only one of them is present I can just call him Jim. But if multip...

posted 5mo ago by r~~‭

Answer
71%
+3 −0
Q&A Set transform of SVG element

<set> does seem to be a bit finicky for this case, doesn't it? You can use <animateTransform> if you set the values attribute on it instead of the to attribute, like this: <animate...

posted 6mo ago by r~~‭

Answer
80%
+6 −0
Q&A Is it okay to use python operators for tensorflow tensors?

No, you can't use and for this. In Python, a and b always, always, always means b if a else a. It cannot be overridden and cannot mean anything else. Likewise not, and any other boolean keywords, ...

posted 8mo ago by r~~‭

Answer
71%
+3 −0
Q&A Replace leaf arrays with joined strings in a nested structure in jq

As the walk documentation describes: When an array is encountered, f is first applied to its elements and then to the array itself In other words, walk is bottom-up. So when you apply your fi...

posted 8mo ago by r~~‭  ·  edited 7mo ago by r~~‭

Answer
60%
+1 −0
Q&A How can I schedule a later task in Python?

If systemd-run works for you, that is probably the simplest thing you can do here. Otherwise, you can use os.fork() from within Python to spawn a child that stays alive after the parent exits. If...

posted 8mo ago by r~~‭

Answer
75%
+4 −0
Q&A How can a Python program send itself to the background?

Use os.fork(). Example: import os import time pid = os.fork() if pid == 0: os.setsid() # Prevents the child from being killed if the parent dies time.sleep(10) os.system('some...

posted 8mo ago by r~~‭

Answer
75%
+4 −0
Q&A Is it possible to get the current function in a trace function?

CPython only very recently started keeping a reference on frames to function objects internally, and that reference isn't exposed from inside Python. There's an old PEP that would have defined a _...

posted 12mo ago by r~~‭

Answer
75%
+4 −0
Q&A How do I get something similar to dictionary views, but for sequences?

It isn't writable (but then again, neither are the dictionary views), but you might be interested in more_itertools.SequenceView.

posted 1y ago by r~~‭

Answer
75%
+4 −0
Q&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 <p> elements in your page, $('p').wrap(wrapper) would put wrapper divs around each of them. So ....

posted 1y ago by r~~‭  ·  edited 1y ago by r~~‭

Answer
66%
+2 −0
Q&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 sam...

posted 1y ago by r~~‭

Answer
75%
+4 −0
Q&A When would one not want to return an interface?

IList<T> 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 t...

posted 1y ago by r~~‭  ·  edited 1y ago by r~~‭

Answer
77%
+5 −0
Q&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. CREATE VIEW IF NOT EXISTS "media_rea...

posted 1y ago by r~~‭

Answer
50%
+6 −6
Meta 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 media...

posted 1y ago by r~~‭

Answer
81%
+7 −0
Q&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 ...

posted 1y ago by r~~‭

Answer
81%
+7 −0
Q&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 th...

posted 1y ago by r~~‭

Answer
71%
+3 −0
Q&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 SimpleEnigma = SimpleEnigma rotor1 rotor...

posted 1y ago by r~~‭

Answer
84%
+9 −0
Q&A Child div doesn't inherit parent's div background-color

It's because of this rule: *{ 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 o...

posted 1y ago by r~~‭

Answer
60%
+1 −0
Q&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: ax = df.plot.bar() vlines = [2.5, 5.5] # x...

posted 1y ago by r~~‭  ·  edited 1y ago by r~~‭

Answer
77%
+5 −0
Q&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 wr...

posted 2y ago by r~~‭

Answer
84%
+9 −0
Q&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 a...

posted 2y ago by r~~‭

Answer
75%
+4 −0
Q&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 e...

posted 2y ago by r~~‭  ·  edited 2y ago by Alexei‭

Answer
75%
+4 −0
Q&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 conve...

posted 2y ago by r~~‭

Answer