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

63 posts
75%
+4 −0
Q&A Is concatenation a logical AND?

tl;dr: No. From an engineering perspective, you might be asking if a concatenation operator can be used in place of a logical ‘and’ operator. This is obviously specific to a particular language, bu...

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

Answer
75%
+4 −0
Q&A How to iterate over numpy array axes in array slicing?

slice(None) will give you a value that's equivalent to a bare : in slice syntax. So you can write, for example, for i in range(4): print(new_array[tuple(slice(None) if i == j else n for j, n ...

posted 7mo 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 1y 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 1y 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 1y 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 2y ago by r~~‭  ·  edited 2y 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 2y ago by r~~‭  ·  edited 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 3y ago by r~~‭  ·  edited 3y 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 3y ago by r~~‭

Answer
75%
+4 −0
Meta Code Reviews: ‘it's fine’

(Elsewhere...) You look over a post on Code Reviews, and you don't find any problems. Should you post an ‘it's fine’ answer, stay silent, or do something else? Seems to me there's some value in hav...

1 answer  ·  posted 4y ago by r~~‭  ·  last activity 4y ago by Moshi‭

75%
+4 −0
Q&A Handling JSON files in Rust without manually creating mapping classes

The hard part is figuring out exactly how your code needs to adapt to changes in the JSON structure. In your example, presumably the rest of your program needs to depend on the names and types in p...

posted 4y ago by r~~‭

Answer
71%
+3 −0
Q&A Warn of implicit cast in a function's arguments with GCC?

From the page you linked: -Wconversion Warn for implicit conversions that may alter a value. This includes conversions between real and integer, like abs (x) when x is double; conversions betwe...

posted 3y 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 2y ago by r~~‭

Answer
71%
+3 −0
Q&A How can software track [1] how many subscribers to subreddits, [2] if subreddit is private, [3] if submissions are restricted?

It's entirely possible that there's some no-code product being developed out there that supports connecting to Reddit's API, so that you could collect the information you want without writing an ac...

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

Answer
71%
+3 −0
Meta Add syntax highlighting for Cypher

There have now been two questions about Cypher, the Neo4j query language. Highlight.js doesn't support Cypher syntax highlighting out of the box, but they do offer a drop-in highlightjs-cypher modu...

0 answers  ·  posted 4y ago by r~~‭  ·  edited 3y ago by sau226‭

71%
+3 −0
Q&A Union of queries depending on variable in list

Yes, you can achieve this using UNWIND and CALL, in the following pattern: UNWIND ['Canada', 'Europe'] AS region CALL { WITH region query } RETURN * You can replace RETURN * with any o...

posted 4y ago by r~~‭

Answer
71%
+3 −0
Q&A Search paths where all nodes are in a relationship with same node

Something like this query should work for you: MATCH (a:Person)-[:IS_SON]->()-[:WAS_BORN]->(b:Country) WITH a, count(DISTINCT b) AS birthplaces WHERE birthplaces = 1 RETURN a Note that...

posted 4y 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 1y ago by r~~‭  ·  edited 1y 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 1y ago by r~~‭

Answer
71%
+3 −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 9mo 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 10mo 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 9mo ago by r~~‭  ·  edited 9mo ago by r~~‭

Answer
66%
+2 −0
Q&A Can regex be used to check if input conforms to a very strict subset of HTML?

Okay, I'll be the contrarian. For this case, yes, I think a regex-based approach can be used to validate these properties. This approach will not guarantee that the provided input is valid HTML; in...

posted 4y ago by r~~‭

Answer
66%
+2 −0
Q&A Why is the `Data.Int` type not a `Semigroup` in PureScript but `String` is?

Is this for purely technical reasons as there would have to be at least 2 Semigroup instances (for addition and multiplication), but type classes cannot be implemented multiple times for the same...

posted 7mo ago by r~~‭

Answer