Quantcast
Channel: User Simon_Weaver - Stack Overflow
Browsing all 116 articles
Browse latest View live
↧

Comment by Simon_Weaver on Calculate the number of business days between two...

Non programmers have no clue that something like this question even exists.

View Article


Comment by Simon_Weaver on How to use C# pattern matching with tuples

Specifically this answer stackoverflow.com/a/62509047/16940 from the question Mike referenced.

View Article


Comment by Simon_Weaver on iisexpress.exe started crashing with Access...

Just got it now.

View Article

Split a collection into `n` parts with LINQ? [duplicate]

Is there a nice way to split a collection into n parts with LINQ?Not necessarily evenly of course.That is, I want to divide the collection into sub-collections, which each contains a subset of the...

View Article

Image may be NSFW.
Clik here to view.

Answer by Simon_Weaver for iisexpress.exe started crashing with Access...

StackOverflow, bad enum value, self referencing properties. All great possible triggers for this error but how to find WHERE!First of all forget IISExpress - that's just the 'messenger'.I disabled...

View Article


Comment by Simon_Weaver on .AsExpandable in Linq to Entity

If you are relying on your expression (perhaps a reusable one) to reduce the number of columns coming back then you definitely still need AsExpandable(). I thought I had a nice clever expression that...

View Article

Comment by Simon_Weaver on How can I toggle word wrap in Visual Studio?

I feel so advanced.

View Article

Comment by Simon_Weaver on WCF Service returning "requested service '...'...

More RAM is probably not the issue anymore. The default threshold for throwing an error is 5% of RAM, which was great when we had 4GB but now my laptop has 96GB meaning that even with 4GB free RAM I...

View Article


Comment by Simon_Weaver on Entity Framework query slow, but same SQL in...

PS. I have a Wifi 7 card in my laptop but an old router which otherwise is working just fine.

View Article


Comment by Simon_Weaver on Getdate() function to get date for my timezone

Note: For Azure SQL this returns UTC

View Article

Comment by Simon_Weaver on Getdate() function to get date for my timezone

And yes you do have to use the full name, not abbreviations such as CST or CEST. Presumably this is because they could quickly get ambiguous across continents! Use select * from sys.time_zone_info to...

View Article

Image may be NSFW.
Clik here to view.

Answer by Simon_Weaver for Which is faster/best? SELECT * or SELECT column1,...

What's going on if SELECT * is FASTER than SELECT <column subset> ?(and everyone is telling you that's not possible!)So I ended up with a simple SELECT statement for a table with only a few dozen...

View Article

Comment by Simon_Weaver on What does the DBContext.Entry do?

Disclaimer: I'm actually using EF Core, which has this same method. I'm not able to verify EF 6 has this behavior.

View Article


Answer by Simon_Weaver for angular ngFor trackBy does not work as I expected

Edit: None of this answer has been updated since the new @for syntax came out. So some of the following may not still be relevant or be confusing if you're not familiar with the 'old way'. But in...

View Article

Comment by Simon_Weaver on Using SignalR Core on .NET 4.6.1

Only 50% true. You can use the SignalR Core client in .NET Framework to communicate with a .NET Core SignalR server. For instance I'm using a WPF application and it needs to communicate with both an...

View Article


Comment by Simon_Weaver on Angular Material - set button active

You can also use mat-primary to give it the same color as color="primary" would do

View Article

Image may be NSFW.
Clik here to view.

Answer by Simon_Weaver for Disable re-queueing of failed Hangfire BackgroundJob

Important if using DI container with an interface, you must put the attribute on the interface definition or it won't be recognized.public interface IDataUpdater{ [Hangfire.AutomaticRetry(Attempts = 0,...

View Article


Answer by Simon_Weaver for Losing Session State with ASP.NET/SQL Server

Another thing that can trip up session state is having the wrong domain set for httpCookies, so make sure you have the correct domain / subdomain.<system.web><httpCookies domain=".example.com"...

View Article

Answer by Simon_Weaver for How to display messages as list in gmail api?

For a newly created OAuth token - try waiting!I had a weird experience just now.I modified the example that shows labels to search messages but was getting an error:var messages = await...

View Article

Answer by Simon_Weaver for Set null as empty string value for input field

Note: This does work for number fields with a caveatCurrently the NumberValueAccessor (source) sets the value to null when the field is empty.However, be cautious of this issue...

View Article
Browsing all 116 articles
Browse latest View live