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.

Activity for Moshi‭

Type On... Excerpt Status Date
Edit Post #291217 Initial revision 19 days ago
Answer A: Why does RFC 3986 (URI generic syntax) declare the "host" component to be case-insensitive when the syntax rules show it to be case-sensitive?
This question probably stems from misunderstanding what case sensitivity is. Being case insensitive does not mean only allowing one case - in fact, it implies the opposite! If one case was treated differently from the other, that would be the definition of case sensitivity. What case insensitivity...
(more)
19 days ago
Comment Post #291034 You need at least three backticks for more than one line of code. ``` lines of code ``` Single backticks are used for `inline` code sections.
(more)
about 1 month ago
Comment Post #290317 I assume you're talking about the "Keep my email addresses private" setting. I was under the impression that it only affects "web based Git operations"; i.e. anything you do on GitHub itself. It will just block you from pushing commits with your private email (if you check that option), it won't rewr...
(more)
5 months ago
Comment Post #289896 Are you running it as a module?
(more)
7 months ago
Edit Post #289860 Initial revision 7 months ago
Answer A: VS Code: How to open a file and folder in a new window?
Use `--add`/`-a` to add a folder ```shell code -n -a ```
(more)
7 months ago
Comment Post #289694 I don't really see how it "leaves out the software part entirely". It's a problem that can arise during software development, and has practical and generally implementable solutions. Sure, it doesn't mention a particular language, but we've had [[language-agnostic]](https://software.codidact.com/cate...
(more)
7 months ago
Edit Post #289631 Initial revision 7 months ago
Answer A: Name for host + path (parts of a URL)
RFC 3986 defines a suffix reference as follows (emphasis my own): >### 4.5. Suffix Reference >The URI syntax is designed for unambiguous reference to resources and extensibility via the URI scheme. However, as URI identification and usage have become commonplace, traditional media (television, ...
(more)
7 months ago
Edit Post #287586 Post edited:
9 months ago
Edit Post #289234 Post edited:
9 months ago
Comment Post #289231 Small correction: declarations aren't statements in C. (Source: https://en.cppreference.com/w/c/language/statements)
(more)
9 months ago
Edit Post #289234 Initial revision 9 months ago
Answer A: What are statements and expressions?
Statements and expressions are two syntactic categories that are used by many programming languages. Since they are syntactic, they depend on the programming language's syntax. In a real sense, a statement is "anything that can be used as a statement" and an expression is "anything that can be used a...
(more)
9 months ago
Comment Post #289172 There's actually been quite a bit of work put into getting LLMs to "synthesize laterally related information" and also work with data that wasn't in its training data; for instance "autonomous LLMs" that, given a prompt, can generate further prompts and can look up information via the web in a feedba...
(more)
9 months ago
Edit Post #289168 Initial revision 9 months ago
Question VS Code can't find node installation due to dynamically setting the PATH
I installed Node.js using NVS to manage my node installations. This works great, except that I haven't been able to figure out how to debug using VS Code. When trying to launch, I receive this error: Can't find Node.js binary "node": path does not exist. This makes sense, since NVS functions...
(more)
9 months ago
Edit Post #289151 Initial revision 9 months ago
Answer A: How to resolve the mypy error "Returning Any from function declared to return 'Dict[str, Any]'" in Python?
You can cast the result of the expression to the desired type ```py def loadjsondata(filepath: str) -> Dict[str, Any]: with open(filepath) as jsondata: return cast(Dict[str, Any], json.load(jsondata)) ``` You can also just ignore the error ```py def loadjsondata(filepath: st...
(more)
9 months ago
Comment Post #289104 There's a widget in the sidebar that says "Join us in chat" - that's a discord invite. We eventually want to have on-site chat, but it is currently not a priority.
(more)
9 months ago
Comment Post #288859 There are a few different formatter extensions for Java. Whichever you use probably lets you configure it in the extensions settings, or documents configuration somewhere. For instance, the recommended Extension Pack for Java formatter can be modified through `Java: Open Java Formatter Settings wi...
(more)
10 months ago
Comment Post #288567 See https://meta.codidact.com/posts/278607
(more)
10 months ago
Comment Post #288142 Any particular reason you're writing your own IO trait? Rust provides the `Write` trait which `Stdout` implements, so [you can just pass that in](https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=d5c663d2062269fbc0d261a5ba27b453)
(more)
11 months ago
Comment Post #287994 I thought that it wouldn't really matter since EF core would handle it for me (I was reading https://learn.microsoft.com/en-us/ef/core/saving/disconnected-entities which is similar to my use case)
(more)
about 1 year ago
Edit Post #287994 Initial revision about 1 year ago
Question Updating the database reverses previous changes
The Code ```cs using Microsoft.EntityFrameworkCore; public class BloggingContext : DbContext { public DbSet Blogs { get; set; } public DbSet Posts { get; set; } public string DbPath { get; } public BloggingContext() { DbPath = "blogging.db"; } ...
(more)
about 1 year ago
Edit Post #287856 Post edited:
Copied from a previous test version so the text didn't match, oops
about 1 year ago
Edit Post #287856 Initial revision about 1 year ago
Question Adding elements to wrapper after calling wrap doesn't work
I'm trying to do some DOM manipulation in jQuery, but am having issues with creating wrapper elements. For some reason, prepending to the wrapper doesn't work after I call `wrap`. Code ```html Text ``` ```js const wrapper = $(''); const newText = $('New Text'); $('p').wrap(w...
(more)
about 1 year ago
Edit Post #287852 Initial revision about 1 year ago
Answer A: How to define an object with different subclasses in an if-statement?
What's going on is that the compiler is deciding on what function to call at compile time rather than runtime. Since the type of `vh` is `Vehicle `, it is essentially creating this call: ```cpp vh->Vehicle::print(); ``` There are a couple of different solutions to this, but the simplest is pr...
(more)
about 1 year ago
Comment Post #287851 You should either just allocate the stuff on the stack, use a smart pointer, or delete your objects (in order of preference).
(more)
about 1 year ago
Comment Post #287682 Try setting a `console.log` and seeing what the value of `secondHand` is Also, `getSeconds` etc. is a function.
(more)
over 1 year ago
Edit Post #287659 Initial revision over 1 year ago
Question EF-core Find method doesn't include other entities
(Full code available for cloning here) I've run into some odd behavior of EF-core's `Find` method. It seems like the returned entity doesn't include the rest of the data. MWE Models ```cs using Microsoft.EntityFrameworkCore; public class BloggingContext : DbContext { public Db...
(more)
over 1 year ago
Comment Post #287632 Fair enough. In most cases however, it doesn't *really* matter what scope something is in since it's rather rare (and questionable to do) that you want two identically named variables in the same function in the first place. Is it bad? Depends on one's sensibilities. I just wanted to make the case...
(more)
over 1 year ago
Comment Post #287632 I wouldn't go so far as to say that Python's scoping rules are broken. For instance, let's take a simple "Find a value" example: ```py for value in my_list: if some_check(value): result = value # Use result here ``` In other languages, you would declare `result` outside the l...
(more)
over 1 year ago
Edit Post #287631 Post edited:
Python's initialization-is-declaration philosophy makes this wording a bit confusing
over 1 year ago
Edit Post #287631 Initial revision over 1 year ago
Answer A: What's causing mypy to give an `[assignment]` error in this nested for loop?
The problem is that you are using `row` twice with different types. ```py for row in self.diagram: # row is str here ``` ```py for row in self.seeddiagram: # row is list[str] here ``` Renaming one or the other makes the error go away. Why does this happen? Python has some somewhat cou...
(more)
over 1 year ago
Edit Post #287605 Initial revision over 1 year ago
Question interface and interface-type tags
My most recent question was tagged with interface-type. I had seen the interface tag when I was creating the question, but the usage information says > Please avoid using this tag, as it is too general (e.g. software interfaces like the ones in Java, .NET and C++, components entry points, hardw...
(more)
over 1 year ago
Edit Post #287602 Post edited:
Autocorrect "fixed" `IList`
over 1 year ago
Edit Post #287602 Initial revision over 1 year ago
Question When would one not want to return an interface?
Consider the following method as an example: ```cs List Foo() { // ... } ``` Are there any disadvantages of returning an interface instead of a concrete implementation in C#? ```cs IList Foo() { // ... } ``` From the caller's perspective, it doesn't really matter what the ...
(more)
over 1 year ago
Edit Post #287586 Initial revision over 1 year ago
Answer A: What is the purpose of grouping the tests in a `tests` module and is it possible to split them?
Grouping related items into modules is of course generally good practice, but it serves a practical purpose as well. The important part here is the [`#[cfg(test)]` annotation](https://doc.rust-lang.org/book/ch11-03-test-organization.html#the-tests-module-and-cfgtest). > The `#[cfg(test)]` annotati...
(more)
over 1 year ago
Comment Post #287136 Does this work? ```zig .{ .{ Inner{.a = '1', .b = true} } ** D2 } ** D1 ``` Seems to work fine, but bear in mind that I don't use zig By the way, I got some compilation errors where I'm not sure what I'm doing wrong: `const Inner = struct { .a: u32, .b: bool };` (`error: expected test, com...
(more)
over 1 year ago
Edit Post #286983 Initial revision over 1 year ago