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

Type On... Excerpt Status Date
Edit Post #292956 Initial revision about 1 month ago
Answer A: Do Where and OfType preserve List capacity?
I did a quick test using LINQPad and it looks as though `.Select()` does not necessarily preserve capacity. For `.Where()` and `.OfType()` the capacity depends on the count, though it doesn't necessarily match it. In my case `.Select()` reduced the capacity to match the count. `.Where()` and `.OfType...
(more)
about 1 month ago
Edit Post #292953 Initial revision about 1 month ago
Question Ignore directory changes
I have a generated file that I want Tilt to ignore for re-building. However, when that file changes, Tilt also detects that the parent directory has changed based on its contents changing. I can fix that by ignoring the parent directory, but am I losing anything by ignoring directory changes? It s...
(more)
about 1 month ago
Edit Post #292014 Initial revision 5 months ago
Answer A: Test Extension Method Received Call with NSubstitute
Extension methods can't be tested for received calls as they are not directly on the substituted class, plus they are `static`. However, extension methods are ultimately calling into a real method on the class that is substituted. You can still test that method is called. This takes extra diggi...
(more)
5 months ago
Edit Post #292009 Initial revision 5 months ago
Question Test Extension Method Received Call with NSubstitute
How can I verify that an extension method was called when using NSubstitute for unit testing? For a normal method I'd do something like: substitutedClass.Recieved().CheckedMethod(...) But extension methods are not actually substituted so I can't use them with `Received()` in this way. For e...
(more)
5 months ago
Comment Post #291493 Came across this guy. Haven't investigated if it matches my needs, but noting for now: https://github.com/VahidN/EFCoreSecondLevelCacheInterceptor
(more)
7 months ago
Comment Post #291493 Attempting to add caching right above EntityFramework I'm beginning to see why there isn't a standard solution. 1. Linq makes it a pain to catch requests to the DB. You can make a wrapper class to catch calls to Set, but your caching needs to happen after the Linq queries are applied to that. 2. You ...
(more)
7 months ago
Edit Post #291537 Initial revision 7 months ago
Answer A: Syntax match any 2 spaces at end of line
A Fix An existing pattern needs to be cleared to allow the new rule to match on any 2 trailing spaces: ```vim syntax clear markdownLineBreak syntax match markdownLineBreak '\s\{2}$' conceal cchar=⏎ ``` Why it's not working The syntax pattern only matches on exactly 2 trailing spaces becaus...
(more)
7 months ago
Comment Post #291533 Found it: `syn match markdownLineBreak " \{2,\}$"`. I found it using a mapping I made for `synIDattr()` to get the syntax ID. Looks like `syntax clear markdownLineBreak` gets what I want. Funny that there's a standard match that is going unused.
(more)
7 months ago
Comment Post #291533 It works after doing that. I wasn't expecting that as I'd previously opened my file with `vim --clean`. I'd assume it's a standard markdown syntax file that's conflicting. Time to start looking.
(more)
7 months ago
Edit Post #291533 Initial revision 7 months ago
Question Syntax match any 2 spaces at end of line
I'm using the following syntax match to conceal 2 spaces at the end of a line with a special character. ```vim syntax match Normal '\s\{2}$' conceal cchar=⏎ ``` A line with two spaces at the end of it would display like this: ```none some line with two trailing spaces⏎ ``` However, if...
(more)
7 months ago
Comment Post #282870 This is pretty unintuitive. I would expect that if I'm on the meta category page my search is automatically limited to meta posts. Also the category filter isn't very discoverable. "Q&A" and "Meta" aren't labeled as categories. "category" isn't listed in the quick help in the search drop down. Not...
(more)
7 months ago
Edit Post #291493 Initial revision 7 months ago
Question Add an IDistributedCache to EntityFramework
Is there a standard way to add an `IDistributedCached` in front of a database using EntityFramework? Something that handles checking the cache for reads, updating the cache on writes, and uses distributed locks to prevent race conditions with multiple processes or nodes updating the cache simultaneou...
(more)
7 months ago