Should we use “workstation” garbage collection or “server” garbage collection?

It’s not explained very well, but as far as I can tell, the server mode is synchronous per core, while the workstation mode is asynchronous. In other words, the workstation mode is intended for a small number of long running applications that need consistent performance. The garbage collection tries to “stay out of the way” … Read more

Linq – What is the quickest way to find out deferred execution or not?

Generally methods that return a sequence use deferred execution: IEnumerable<X> —> Select —> IEnumerable<Y> and methods that return a single object doesn’t: IEnumerable<X> —> First —> Y So, methods like Where, Select, Take, Skip, GroupBy and OrderBy use deferred execution because they can, while methods like First, Single, ToList and ToArray don’t because they can’t. … Read more

Error: TypeError: ‘process.env’ only accepts a configurable whileinstall windows-build-tools

I had the exact same problem. First I tried to do npm install –global –production [email protected] but didn’t work then npm config set msvs_version 2022 but still didn’t work. Finally I tried to download node version 17.9.1 and retried the command and it worked!! So here are the steps: Step 1: uninstall Node version 18.12 … Read more

How to produce “human readable” strings to represent a TimeSpan

To get rid of the complex if and switch constructs you can use a Dictionary lookup for the correct format string based on TotalSeconds and a CustomFormatter to format the supplied Timespan accordingly. public string GetReadableTimespan(TimeSpan ts) { // formats and its cutoffs based on totalseconds var cutoff = new SortedList<long, string> { {59, “{3:S}” … Read more

.net Core Quartz Dependency Injection

You can use the Quartz.Spi.IJobFactory interface and implement it. The Quartz documentations states: When a trigger fires, the Job it is associated to is instantiated via the JobFactory configured on the Scheduler. The default JobFactory simply activates a new instance of the job class. You may want to create your own implementation of JobFactory to … Read more

ThreadPool max threads

Firstly, your “knowledge” of the defaults is incorrect. The limit of 25 threads per processor was back from .NET 1.1. It was increased in .NET 2, and now: Beginning with the .NET Framework version 4, the default size of the thread pool for a process depends on several factors, such as the size of the … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)