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 #292687 | Initial revision | — | about 2 months ago |
Answer | — |
A: Question/Answer views on Codidact This is currently not implemented, but there is an active feature request on Meta. (more) |
— | about 2 months ago |
Comment | Post #286291 |
Ah good catch, I must've meant `test<string, string[]>`. I've corrected it. (more) |
— | 6 months ago |
Edit | Post #286291 |
Post edited: |
— | 6 months ago |
Edit | Post #291217 | Initial revision | — | 8 months 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) |
— | 8 months 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) |
— | 8 months 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) |
— | 12 months ago |
Comment | Post #289896 |
Are you running it as a module? (more) |
— | about 1 year ago |
Edit | Post #289860 | Initial revision | — | about 1 year 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) |
— | about 1 year 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) |
— | about 1 year ago |
Edit | Post #289631 | Initial revision | — | about 1 year 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) |
— | about 1 year ago |
Edit | Post #287586 |
Post edited: |
— | over 1 year ago |
Edit | Post #289234 |
Post edited: |
— | over 1 year ago |
Comment | Post #289231 |
Small correction: declarations aren't statements in C. (Source: https://en.cppreference.com/w/c/language/statements) (more) |
— | over 1 year ago |
Edit | Post #289234 | Initial revision | — | over 1 year 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) |
— | over 1 year 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) |
— | over 1 year ago |
Edit | Post #289168 | Initial revision | — | over 1 year 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) |
— | over 1 year ago |
Edit | Post #289151 | Initial revision | — | over 1 year 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) |
— | over 1 year 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) |
— | over 1 year 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) |
— | over 1 year ago |
Comment | Post #288567 |
See https://meta.codidact.com/posts/278607 (more) |
— | over 1 year 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) |
— | over 1 year 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) |
— | over 1 year ago |
Edit | Post #287994 | Initial revision | — | over 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) |
— | over 1 year ago |
Edit | Post #287856 |
Post edited: Copied from a previous test version so the text didn't match, oops |
— | almost 2 years ago |
Edit | Post #287856 | Initial revision | — | almost 2 years 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) |
— | almost 2 years ago |
Edit | Post #287852 | Initial revision | — | almost 2 years 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) |
— | almost 2 years 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) |
— | almost 2 years ago |
Comment | Post #287682 |
Try setting a `console.log` and seeing what the value of `secondHand` is
Also, `getSeconds` etc. is a function. (more) |
— | almost 2 years ago |
Edit | Post #287659 | Initial revision | — | almost 2 years 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) |
— | almost 2 years 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) |
— | almost 2 years 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) |
— | almost 2 years ago |
Edit | Post #287631 |
Post edited: Python's initialization-is-declaration philosophy makes this wording a bit confusing |
— | almost 2 years ago |
Edit | Post #287631 | Initial revision | — | almost 2 years 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) |
— | almost 2 years ago |
Edit | Post #287605 | Initial revision | — | almost 2 years 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) |
— | almost 2 years ago |
Edit | Post #287602 |
Post edited: Autocorrect "fixed" `IList` |
— | almost 2 years ago |
Edit | Post #287602 | Initial revision | — | almost 2 years 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) |
— | almost 2 years ago |