ValueError: could not broadcast input array from shape (224,224,3) into shape (224,224)

I have a list say, temp_list with following properties : ``` len(temp_list) = 9260 temp_list[0].shape = (224,224,3) ``` Now, when I am converting into numpy array, ``` x = np.array(temp_list...

15 May at 10:43

Why is `this` not available in C# 6.0 Auto-Property Initialization?

I have the following code class: ``` public class Foo { public Nested Bar { get; } = new Nested(this); public class Nested { public Nested(Foo foo) { foo.DoSo...

ASP.NET Core: JSON Configuration GetSection returns null

I have a file `appsettings.json` that looks like this: ``` { "MyConfig": { "ConfigA": "value", "ConfigB": "value" } } ``` In my `Startup.cs` I'm building my `IConfiguration`...

15 May at 07:1

File naming conventions in reactJS?

Recently, I have started learning ReactJS. The only thing that confuses me is naming and in the React app directory. - To name component files, some people follow `TitleCase.js` and some follow `cam...

11 Jan at 10:31

Cannot find AddMvc() in IServiceCollection in Visual Studio 2017

I have created a brand new asp.net core application. I have added the mvc Nuget package yet I am getting the below error. Microsoft.AspNetCore.Mvc.Core 1.1.3 > 'IServiceCollection' does not contain a ...

14 Aug at 17:19

Service Stack API - System.InvalidOperationException - ServiceStack.ServiceStackHost.OnEndRequest(IRequest request)

We are using Service Stack Web API for our web application. On prod server all the functionalities will work but for every request an error is generated as below when we make a request to server. ``...

ASP .NET CORE could not find file or assembly with custom assembly

I've ran into a weird problem. I basically have my own web-stack for .NET-core which I've built into a few .dlls, and I want to reference these from another ASP CORE-solution. VS seems to find the a...

Google API: Not a valid origin for the client: url has not been whitelisted for client ID "ID"

I need help. I don't found an answer to my question. I tried googling and I tried asking on other sides but I never found an answer. I'm working with the google API (Youtube data API) and I use the ex...

Environment.MachineName equivalent for .NET Standard 1.4

I am creating a class library that will be used in a WPF project and a .NET Core project. I am trying to get the name of the machine using my application. In both .NET Core and the WPF application I ...

23 May at 11:47

ASP.NET Core 2.0 Preview 1: How to set up Cookie Authentication with custom login path

In ASP.NET Core 2.0 the .UseAuthentication() middleware has a breaking change that no longer allows the [old syntax mentioned here](https://learn.microsoft.com/en-us/aspnet/core/security/authenticatio...

Unit Tests failing when I Run All Tests but pass when I Debug

I'm using NUnit3 in Visual Studio 2017 and doing TDD. Something really strange is happening since I updated my code to make my latest test pass. Now, 3 of my other tests are failing when I click Run ...

How to adapt IObjectContextAdapter from EF 6 to EF Core

I am trying to port this class to EF core: [https://github.com/mehdime/DbContextScope/blob/master/Mehdime.Entity/Implementations/DbContextScope.cs](https://github.com/mehdime/DbContextScope/blob/mast...

Convert float64 column to int64 in Pandas

I tried to convert a column from data type `float64` to `int64` using: ``` df['column name'].astype(int64) ``` but got an error: > NameError: name 'int64' is not defined The column has number of ...

13 May at 18:23

React-router and nginx

I am transitioning my react app from webpack-dev-server to nginx. When I go to the root url "localhost:8080/login" I simply get a 404 and in my nginx log I see that it is trying to get: ``` my-nginx...

13 May at 10:14

What is analog for HttpListener in .NET Core

I'm porting application from .NET 4 to .NET Core and can't find analog for HttpListener class ``` Error CS0246 The type or namespace name 'HttpListener' could not be found (are you missing a using...

How to ignore null values for all source members during mapping in Automapper 6?

I've been looking everywhere: stackoverflow, automapper documentation, internets and just couldn't find any info on this one, even tho this seems to be a very common problem. My mapping: ``` CreateM...

23 May at 10:31

.NET 4.7 returning Tuples and nullable values

Ok lets say I have this simple program in .NET 4.6: ``` using System; using System.Threading.Tasks; namespace ConsoleApp1 { class Program { static async void Main() { ...

12 May at 21:55

Scroll to element on click in Angular 4

I want to be able to scroll to a target when a button is pressed. I was thinking something like this. ``` <button (click)="scroll(#target)">Button</button> ``` And in my `component.ts` a method like....

25 Jun at 22:33

Serialize JSON using DataAnnotation to apply decimal formatting rules

We have several complex classes with a variety of decimal (and other) properties. Of the dozens of decimal properties, they all fall under 3 specific formatting rules: 1. Leading zero, one decimal p...

Get YAML for deployed Kubernetes services?

I am trying to deploy my app to running in . The app can be found at: [https://github.com/Industrial/docker-znc](https://github.com/Industrial/docker-znc). The is built into an image on . I have ...

C# Display text on the taskbar | Windows 10

I want to display a text in the taskbar like the NetSpeedMonitor program . I thought about how Windows did that with der Date and Time display, but I couldn't find any answer. I want to do this with C...

12 May at 15:55

Servicestack Multi Tenancy

Does the [Servicestack](http://docs.servicestack.net/) support the Single Deployment with Single Database multi-tenancy method? [The documentation says only about multiple databases](http://docs.servi...

12 May at 15:43

Using R.NET.Community in .NET Core 2.0 Preview 1

For a while, I've been hoping to use [R.NET.Community](https://www.nuget.org/packages/R.NET.Community/) in a .NET Core app. Obviously though with the NuGet package not having been ported to .NET Core,...

12 May at 13:51

Collision detection not working unity

First, I know that this question has been asked a lot, but I cant find a solution, so mi problem is, Im making an educational game, and I have a vein and the blood flow (with many box colliders) and a...

12 May at 18:34

If '<selector>' is an Angular component, then verify that it is part of this module

I am new in Angular2. I have tried to create a component but showing an error. This is the `app.component.ts` file. ``` import { Component } from '@angular/core'; import { MyComponentComponent } fro...

12 May at 12:12