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
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
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
57%
+2 −1
Q&A How can I modify the code above to accept string as user input and use strcmp to compare with the contents of the text file & then delete that line?

Assuming you're actually looking for a substring of a line in the file and not a word (which would require, as @elgonzo indicated, figuring out how to deal with spacing and word boundaries in gener...

posted 2y ago by r~~‭

Answer
62%
+3 −1
Q&A Problems with data structures and filestreams.

My advice to you is to break this down into smaller problems and try to solve them one at a time, making sure you have a program that can compile and run at each step. First: figure out how to suc...

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
50%
+1 −1
Q&A Data structure implementation with Linked lists.

struct listNode{ char data; struct listNode *nextPtr }; Computer, when I tell you that any region of memory is a struct called listNode, that means that the region of memory contains ...

posted 2y ago by r~~‭

Answer
60%
+1 −0
Q&A How to submit form data with Ajax?

See the first example in this section: const form = new FormData(document.getElementById('login-form')); fetch('/login', { method: 'POST', body: form }); To adapt this example to your c...

posted 2y ago by r~~‭  ·  edited 2y 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
60%
+1 −0
Q&A How to append HTML to the DOM with JavaScript?

Use fetch() to request the HTML file from the server. Call .text() on the Response object you get from the fetch in order to get the HTML contents as a string. You can then insert the string into a...

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

Answer
85%
+10 −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
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
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 3y ago by r~~‭  ·  edited 2y 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 3y 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 3y ago by r~~‭

Answer
62%
+3 −1
Q&A What would the pros and cons of storing the compiled CSS output of SASS in version control?

One thing to consider if you decide to store the CSS in version control is how to make sure that the CSS is always updated whenever the SASS is updated. (Of course this is true of the more general ...

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 3y ago by r~~‭  ·  last activity 3y ago by Moshi‭

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