Bool value of Tensor with more than one value is ambiguous in Pytorch
I want to create a model in pytorch, but I can't compute the loss. It's always return Actually, I run example code, it work. ``` loss = CrossEntropyLoss() input = torch.randn(8, 5) input target = ...
How to get HttpRequest body in .net core?
I want to get Http Request body in .net core , I used this code: ``` using (var reader = new StreamReader(req.Body, Encoding.UTF8)) { bodyStr = reader.ReadToEnd(); } req.Body.Position = 0 ```...
- Modified
- 23 Oct at 10:37
How to execute .Net Core 2.0 Console App using Windows Task Scheduler?
I have one Console App which is created using `asp.net Core 2.0` in `VS2017`. Now I want to run this application on particular time period repeatedly (like service). So I have tried this using `Window...
- Modified
- 23 Oct at 10:7
Why are 1000 threads faster than a few?
I have a simple program that searches linearly in an array of 2D points. I do 1000 searches into an array of 1 000 000 points. The curious thing is that if I spawn 1000 threads, the program works as...
- Modified
- 25 Oct at 16:5
CSS `height: calc(100vh);` Vs `height: 100vh;`
I'm working on a project where the former developer used: ``` .main-sidebar { height: calc(100vh); } ``` I have no way to contact him/her anymore, and I would like to understand what is the dif...
- Modified
- 23 Oct at 04:46
The SSL connection could not be established
I am using a third party library ([Splunk c# SDK](http://dev.splunk.com/csharp) ) in my ASP.NET core application. I am trying to connect to my localhost Splunk service via this SDK, but I get an exce...
- Modified
- 24 Aug at 11:55
Why CancellationToken is a struct?
Does it make any sense to use a struct instead of a reference type in case of CancellationToken? I see one possible disadvantage, it will be copied all the way down in methods chain as I pass it as a...
- Modified
- 22 Oct at 20:50
ServiceStack IdentityServer4 - IdentityServerAuthFeature
I want to use IdentityServer with my ServiceStack API, however, when I add this in my Startup.cs in this method: ``` Plugins.Add(new IdentityServerAuthFeature { AuthProviderType = Iden...
- Modified
- 23 Oct at 14:31
How to make partial method async
I have a generated code with partial method ``` { ... partial void InterceptOperationCall(IOperationContext context); ... async Task SomeMethod() { InterceptOperationCal...
- Modified
- 25 Oct at 08:23
Unable to resolve ILogger from Microsoft.Extensions.Logging
I've configured my console application's `Main` like so ``` var services = new ServiceCollection() .AddLogging(logging => logging.AddConsole()) .BuildServiceProvider(); ``` And then I try to ...
- Modified
- 6 Jan at 16:48
IHttpClientFactory in .NET Core 2.1 Console App references System.Net.Http
- - I'm attempting to create a console app using the dotnet core framework. The console app needs to make API requests. I've read about the new `IHttpClientFactory` released as part of d...
- Modified
- 21 Oct at 17:27
Quotes not around values in CSV
I'm using `ToCsv()` on a collection to convert it to CSV text. None of the values have quotes around them - even when there are spaces in them. How do I switch quotes on?
- Modified
- 21 Oct at 17:26
How to change the border color of MUI TextField
I can't seem to figure out how to change the outline color of an outlined variant `TextField` I looked around GitHub issues and people seem to be pointing towards using the `TextField` "InputProps" Pr...
- Modified
- 3 Nov at 06:33
Need help on monogame screen resolution and intersection
Currently in my game i want trying to move my object towards both x axis and y axis.As I also wanted to put it into center ,I have put a camera.Here is my Camera code- ``` public class Camera { p...
Bound property not updating upon change
In my Blazor app, I have the following input field in a view: ``` <input bind="@amount.Display" type="text" /> ``` This is bound to a property defined with the following accessors: ``` get { r...
React+ASP.NET.Core : No 'Access-Control-Allow-Origin' header is present on the requested resource
Actually this is not a post,I know a part of the title asked many times in [stackoverflow](http://stackoverflow.com) community, I read all posts, and answers, but I think my problem and technologies ...
- Modified
- 7 Jun at 06:35
How can I bind complex Lists in ASP.NET Core RazorPages
I'm new to ASP.NET Core Razor Pages. I try to retrieve a List<> from a Page via POST. If I bind primitive Data types, I didn't face any problems. However, If I want to pass data from my Page to the Se...
- Modified
- 19 Sep at 14:55
Remove http client logging handler in ASP.NET Core
When using the `HttpClientFactory` of .NET Core, is it possible to somehow remove the default `LoggingHttpMessageHandler`? I expect something like the below but it doesn't seem to exists ``` servic...
- Modified
- 12 Mar at 13:58
Correct way to start a BackgroundService in ASP.NET Core
I have implemented a BackgroundService in an ASP.NET Core 2.1 application: ``` public class MyBackgroundService : BackgroundService { protected override Task ExecuteAsync(CancellationToken stoppi...
- Modified
- 19 Oct at 09:43
Complex Linq Grouping
I'm new to Stack Overflow, but tried to put as much information I have following class structure ``` public class ItemEntity { public int ItemId { get; set; } public int GroupId { get; set; ...
How can I hide response code 200 with Swashbuckle.AspNetCore?
Ciao, I'm working on a asp.net web api core (target framework .NET Core 2.1). I'm documenting my API using Swagger specifications. I chose to use Swashbuckle.AspNetCore library. I have one simple cr...
- Modified
- 19 Oct at 09:14
Refit and authorization header
Currently, I am adding an authorization header to my request like this: File: SomeFile.cs ``` public interface ITestApi { [Get("/api/test/{id}")] Task<string> GetTest([Header("Authorization"...
- Modified
- 11 May at 09:1
How to force Serilog to log only my custom log messages
I configured Serilog in `appsettings.json` to log entries into via tcp in my `asp net core web api` app the following way: ``` { "Serilog": { "Using": [ "Serilog.Sinks.Network" ], "Minimum...
- Modified
- 20 Oct at 18:58
C# Predefined type 'System.Object' is not defined or imported
In project, I changed the all projects name than after reloading all project that time many errors were showing approx . And mainly all errors are related to system namespace like - `System.Object`...
- Modified
- 19 Oct at 07:41