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

57 posts
85%
+10 −0
Q&A Is *nix a formal term?

The term is cultural, not technical. From Wikipedia: There is no standard for defining the term, and some difference of opinion is possible as to the degree to which a given operating system or ...

posted 3y ago by r~~‭

Answer
84%
+9 −0
Q&A How to override default string formatter?

Python doesn't support extending the mechanics of how f-strings are parsed; the reference doesn't give the specific mechanism, but it doesn't say that there's any connection between the parsing of ...

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

Answer
84%
+9 −0
Q&A How to read lines into an array in Bash

Your code is correct. You have declared your variable as an array, and you are successfully appending to it. To display all of the elements of your variable, try echo "${my_array[@]}". (Another an...

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

Answer
84%
+9 −0
Q&A What is a typeless programming language?

‘This language doesn't have types’ and ‘This language only has one type’ are English sentences that communicate the same underlying concept: a typeless language doesn't have a way to distinguish ca...

posted 3y ago by r~~‭  ·  edited 3y 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
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
83%
+8 −0
Q&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...

posted 2y 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
Meta Community feedback: What type of questions can I ask here?

I propose adding, at the top of the list: On-topic questions about writing software, where software is understood to include any means of specifying to a computer actions to be performed later. (...

posted 3y ago by r~~‭  ·  edited 3y 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
81%
+7 −0
Q&A How do I find the order that yields the shortest path?

This looks like it's a slightly restricted version of the circular dilation minimization problem in the theory of graph drawing. See, for example, https://doi.org/10.1080/00207168808803629. Specif...

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

Answer
81%
+7 −0
Q&A How can I find git branches where all branch-local commits are from specific people?

From the command line, the following command will give you a list of all authors who have made local-only commits to a branch some-branch: git log some-branch --not --remotes --format="%an" And...

posted 3y ago by r~~‭

Answer
81%
+7 −0
Q&A How long in days is a MONTH in MySQL?

There is no fixed number of days in a MONTH interval. DATE_SUB is mostly just decrementing the number in the months position of the date provided. So DATE_SUB('2020-09-14', INTERVAL 3 MONTH) is '20...

posted 3y ago by r~~‭

Answer
80%
+6 −0
Q&A Are there any downsides related to using Maybe or Optional monads instead of nulls?

In my opinion, all of the downsides boil down to two objections: It isn't idiomatic (in C# and VB.⁠NET) It's slightly less performant The fact that it isn't idiomatic means that, as you note...

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

Answer
80%
+6 −0
Q&A How can I define a method on [&mut T] where T: MyTrait?

This error doesn't do a good job at all of highlighting the important thing! You can't define an inherent impl on a type parameter. You have to make it the impl of some trait. Here's an example: Tr...

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

Answer
78%
+9 −1
Meta How are we supposed to give feedback for poor questions if such comments are deleted?

I remember reading @meriton's comments on that question and thinking they were good feedback; if I hadn't seen them there, I would have written something similar. This is also an argument against ...

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

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

posted 2y ago by r~~‭

Answer
77%
+5 −0
Q&A How to clear the contents of a file?

Simply opening a file for writing (using fopen) will clear it (‘truncate to zero length’, per the standard). Only opening a file in read or append mode will preserve its contents. See section 7.21...

posted 2y 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
77%
+5 −0
Meta Community feedback: What type of questions can I ask here?

Off-topic questions about which tools, frameworks, or technologies to use, unless they are directly related to development (e.g. code, schema changes documentation tools) I propose removing thi...

posted 3y ago by r~~‭

Answer
77%
+5 −0
Q&A Search tree supporting efficient bulk sequential insert

For holding ordered sets of keys, there are well-known data structures (the red-black tree, for example) that support O(log(n)) lookup and insertion algorithms. Of course this means that there triv...

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

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
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
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 12mo ago by r~~‭

Answer