How do I stretch an image to fit the whole background (100% height x 100% width) in Flutter?

I have an image that doesn't match the aspect ratio of my device's screen. I want to stretch the image so that it fully fills the screen, and I don't want to crop any part of the image. CSS has the c...

23 Jul at 15:48

Detecting .net core 2.0

In a dotnet core 2.0 console application, the output of: ``` Console.WriteLine("Hello World from "+ System.Runtime.InteropServices.RuntimeInformation.FrameworkDescription); ``` Is a rather unexpect...

17 Aug at 21:20

How to have the semicolon character in a password for a SQL connection string?

My connection string: ``` con = new SqlConnection("Server=localhost;Database=mainDB;User Id=sqluser;Password=Y;9r.5JQ6cwy@)V_"); ``` That semicolon in the password causes an exception. How do I wri...

17 Aug at 18:5

Could not load type 'Microsoft.Build.Framework.SdkReference' on project open in VS 2017 U1 (15.3)

After doing an (apparently successful) upgrade from VS 2017 15.1 to 15.3, I can no longer load any C# project (can't open existing, can't create new). All fail with this error: > Could not load type '...

5 May at 15:51

How do I customize Visual Studio's private field generation shortcut for constructors?

VS 2017 (and maybe olders versions) gives me this handy little constructor shortcut to generate a `private readonly` field and assign it. Screenshot: [](https://i.stack.imgur.com/L3Ec9.png) This en...

17 Aug at 13:36

Local user account store for Web API in ASP.NET Core 2.0

I'm using ASP.Net Core 2.0, I want to build a Web API project with Individual User Accounts Authorization type, but the only option is `Connect to an existing user store in the cloud`. [](https://i.st...

The current .NET SDK does not support targeting .NET Standard 2.0 error in Visual Studio 2017 update 15.3

I want to create a class library project with Target Framework .NET Standard 2.0. I've updated my `Visual Studio 2017` to Version `15.3` and also in Visual Studio installer checked `.NET Framework 4...

How to download a file in ASP.NET Core?

In MVC, we have used the following code to download a file. In ASP.NET core, how to achieve this? ``` HttpResponse response = HttpContext.Current.Response; System.Net.WebClient ne...

25 May at 21:46

.net core why can i get the IFormCollection by key the alone

lets say i have an ``` <form method="post" action"/user/create"> <input type="text" name="FirstName" placeholder="FirstName" /> <button type="submit">Submit</button> </form> ``` I want to a...

17 Aug at 03:2

Flutter BoxDecoration’s background color overrides the Container's background color, why?

I have a Flutter Container widget and I defined a color for it (pink), but for some reason, the color in BoxDecoration overrides it (green). Why? ``` new Container( color: Colors.pink, decoration...

What is a "span" and when should I use one?

Recently I've gotten suggestions to use `span<T>`'s in my code, or have seen some answers here on the site which use `span`'s - supposedly some kind of container. But - I can't find anything like that...

What's the point of passing ExceptionDispatchInfo around instead of just the Exception?

I understand the value of `ExceptionDispatchInfo.Capture(e).Throw()` (preserves the original stack trace), but what's the advantage of using `Capture` early and passing the `ExceptionDispatchInfo` aro...

26 Nov at 19:41

ServiceStack confusion between metadata, OpenAPI, and Swagger

I'm working on documentation for an API server implemented using ServiceStack. I have a few questions. If it makes more sense, I can move these to separate posts. 1. IgnoreDataMember is mentioned ...

17 Aug at 18:10

Cannot convert type 'Newtonsoft.Json.Linq.JObject' to Complex Type

I have json as follows, ``` { "H": "Macellum", "M": "Receive", "A": [ { "CustomerId": "172600", "OrderId": "69931", "OrderStatus": "E0", "Buy": "A" } ] } ``` ...

16 Aug at 14:23

Download file with WebClient or HttpClient?

I am trying to download file from a URL and I have to choose between WebClient and HttpClient. I have referenced [this](https://stackoverflow.com/questions/20530152/deciding-between-httpclient-and-web...

16 Aug at 10:44

How to stop a command in the Visual Studio Code terminal

I've been stopping commands with the trash can for too long. Command period doesn't work on Mac. I can't find anywhere how to stop the terminal via a command. What is it?

14 Aug at 07:58

Adding external login with Identity Server 4 and ASP.NET Identity

After adding Authentication functionality using Identity Server 4 with ASP.NET Identity, I'm planning to add the Google Provider so users can also login with their google+ account. I'm using Angular a...

Claims transformation support missing in ASP.NET Core 2.0

I am using JWT Bearer auth in my new asp.net core 2.0 api app and want to add some extra claims to the current identity. This extra info is located in another api which need to be queried. My understa...

How to sync MSSQL to Elasticsearch?

Every time I Google this, I find the "river" approach which is deprecated. I'm using Dapper if this is somehow a helpful information. So what's the solution for this these days?

Entity framework EF.Functions.Like vs string.Contains

I was reading the announcement of entity framework core 2.0 [https://blogs.msdn.microsoft.com/dotnet/2017/08/14/announcing-entity-framework-core-2-0/](https://blogs.msdn.microsoft.com/dotnet/2017/08/1...

.net-core middleware return blank result

Im making a website with an API, the API needs validation so the user only gets his own data. I have written the following middleware to validate the login. ``` public class ApiAuthenticationMiddle...

23 Sep at 09:43

.NET Core, failed to spawn dotnet --info

When I type `dotnet --info` in cmd the entire screen is covered in `Failed to leave breadcrumb` What can cause such behavior? Searched on google but it seems like I'm the only person that has that pr...

fetch() unexpected end of input

I am using fetch() to grab data from api server. My error looks like this: ``` Uncaught (in promise) SyntaxError: Unexpected end of input at fetch.then.blob. ``` Can you please tell me what am I...

15 Aug at 16:21

Search input with an icon Bootstrap

No clue how I can do this, since BS 4 doesn't support glyphicons. Do I set it up as a background or do I apply different positioning to a font-awesome icon? This is my code so far: ``` <link rel="s...

yield return vs. return IEnumerable<T>

I've noticed something curious about reading from an `IDataReader` within a using statement that I can't comprehend. Though I'm sure the answer is simple. Why is it that whilst inside the `using (Sql...