Questions

ASP.NET Core - Download .exe returns 404 error

I have a ASP.NET core MVC application and in the wwwroot folder, I've added another folder called "Shaun" and in that folder I've dropped an exe to try and download: [](https://i.stack.imgur.com/MSj0...

No provider for Router?

Im getting this error: > EXCEPTION: Error in ./AppComponent class AppComponent - inline template:0:0 caused by: No provider for Router! This is my app component: ``` import {Component} from '@angular...

18 Aug at 10:1

Visual Studio 2017 fails to install offline with "Unable to download installation files"

So I've created an offline installed of VS 2017 Community on my laptop using this command: > --layout "D:\Downloads\VS Community 2017" --lang en-US --add Microsoft.VisualStudio.Component.CoreEditor ...

How Request and Response will got process in service stack?

I am using service stack to build the create RESTful services, not have depth knowledge of it. This works as sending request and getting response back. I have scenario and my question is depends on it...

Unable to determine composite primary key ordering for type

> {"Unable to determine composite primary key ordering for type 'Conference_Project.Models.Login'. Use the ColumnAttribute (see [http://go.microsoft.com/fwlink/?LinkId=386388](http://go.microsoft....

16 Mar at 03:33

Will System.Random always generate predictable numbers for a given seed across platforms?

I know that `Object.GetHashCode` can return different values for the same object (an identical string, for example) depending on the platform. I thus can't rely on this for a cross-platform simple has...

6 May at 10:38

Fix all 'Naming rule violation' shown in VS2017 for all opened files at once

Is there any tool witch allows to apply fix for all VS2017 messages like ""? In VS2017 it has to be done manually one by one, it shouldn't be hard to add such feature in IDE since all elements are li...

ServiceStack NativeTypesFeature AddResponseStatus

I'm writing a backend using ServiceStack. our main front end client is an Angular 2 application using TypeScript. To that end, we are using the DTOs that are generated by the services when hitting /...

15 Mar at 20:48

ServiceStack HttpUtils + Proxy Server

I am using ServiceStack HttpUtils to connect to a third-party REST API. How do I pass in Proxy Server and Proxy Port when making requests? Thanks rudrvij

15 Mar at 19:11

How to make two plots side-by-side

I found the following example on matplotlib: ``` import numpy as np import matplotlib.pyplot as plt x1 = np.linspace(0.0, 5.0) x2 = np.linspace(0.0, 2.0) y1 = np.cos(2 * np.pi * x1) * np.exp(-x1) ...

18 Aug at 03:38

Swagger API not refreshing the documentation

I am using the Swagger API for documenting my REST services. Earlier my controller method didn't have the informative comments, so Swagger API was not showing up the description, but now even after up...

Waiting for Target Device to Come Online

I recently updated to Android Studio 2.3, and now when I try to run the application, the emulator does not come online. It times out after 300 seconds. Additionally, The app has been experiencing a F...

15 Mar at 16:56

In ASP.NET Core, how do I use a service that is setup in ConfigureServices() in Configure()?

I have a service I wrote that helps with configuration. The service is set up in the Startup class's ConfigureServices method as: ``` public void ConfigureServices(IServiceCollection services) { ...

18 Nov at 06:34

Filter custom message from Visual Studio 2015 output window

At some point in the last couple of months, a lot of message along the lines of ``` Event 7 was called with 5 argument(s) , but it is defined with 6 paramenter(s). Event 10 was called with 5 argumen...

23 May at 10:31

Pattern matching equal null vs is null

From Microsoft new-features-in-c-7-0: ``` public void PrintStars(object o) { if (o is null) return; // constant pattern "null" if (!(o is int i)) return; // type pattern "int i" Write...

15 Mar at 15:34

javascript - check if object is empty

I am trying to create to javascript/jquery test to check if my object is empty and cannot figure it out. Here is the object when it has something in it: ``` {"mergedSellerArray":{"key1114":"1120"}} ...

15 Mar at 15:19

React.createElement: type is invalid -- expected a string

Trying to get react-router (v4.0.0) and react-hot-loader (3.0.0-beta.6) to play nicely, but getting the following error in the browser console: ``` Warning: React.createElement: type is invalid -- exp...

Automapper in WebAPI Controller

I have a Car WebAPI controller method as below - note _carService.GetCarData returns a collection of CarDataDTO objects ``` [HttpGet] [Route("api/Car/Retrieve/{carManufacturerID}/{year}")] public IEn...

25 Sep at 14:57

Why doesn't plt.imshow() display the image?

I have this code, copied from a tutorial: ``` import numpy as np np.random.seed(123) from keras.models import Sequential from keras.layers import Dense, Dropout, Activation, Flatten from keras.layers ...

10 Jan at 02:19

Will Parallel.ForEach process in order with MaxDegreeOfParallelism=1?

Is `Parallel.ForEach()` with `MaxDegreeOfParallelism==1` guaranteed to process the input enumerable in-order? If the answer is "no", is there a way to enforce this behavior?

16 Feb at 19:31

Compare two objects for properties with different values

I need to create a generic method, which will take two objects (of same type), and return list of properties which have different values. As my requirement is bit different I don't think this as dupli...

CORS: credentials mode is 'include'

Yes, I know what you are thinking - yet another CORS question, but this time I'm stumped. So to start off, the actual error message: > XMLHttpRequest cannot load http://localhost/Foo.API/token. The va...

Visual Studio 2017: Display method references

How can I display the references on top of a method declaration? I looked for it in the Visual Studio properties, but could not find it.

10 Aug at 11:24

Switch focus between editor and integrated terminal

Does anyone know the keyboard shortcut (Mac and Linux) to switch the focus between editor and integrated terminal in Visual Studio Code?

19 Mar at 15:52

Get week number in year from date

I am looking for a query which will return the week number from given date. What I've already tried is this: ``` select datepart(wk, '2017-02-01') ``` but this returns 5 instead of 6. (february 1s...

14 Mar at 19:9