Unable to cast object of type 'Newtonsoft.Json.Linq.JObject' to type <MyClass>

This code: ``` var commandMessage = new CommandMessage { CorrelationId = Guid.NewGuid() }; var json = JsonConvert.SerializeObject(commandMessage); var myCommandMessage = (CommandMessage)JsonConvert.D...

28 Jul at 15:58

IdentityServer3 with ServiceStack and MVC Client

I'm new to IdentityServer3 and am just starting to get it set up. It seems to be going quite well and I've been working on the Hybrid flow for an MVC app similar to that shown in Kevin Dockx's Plurals...

Running async methods in parallel

I've got an async method, `GetExpensiveThing()`, which performs some expensive I/O work. This is how I am using it: ``` // Serial execution public async Task<List<Thing>> GetThings() { var first ...

28 Jul at 10:57

Disable compiler optimisation for a specific function or block of code (C#)

The compiler does a great job of optimising for RELEASE builds, but occasionally it can be useful to ensure that optimisation is turned off for a local function (but not the entire project by untickin...

ASP.NET Core Web API exception handling

I am using ASP.NET Core for my new REST API project after using regular ASP.NET Web API for many years. I don't see any good way to handle exceptions in ASP.NET Core Web API. I tried to implement an e...

9 Mar at 18:28

ASP.NET Core 1.0 on IIS error 502.5 - Error Code 0x80004005

I just updated my server (Windows 2012R2) to .NET Core 1.0 RTM Windows Hosting pack from the previous .NET Core 1.0 RC2. My app works on without any issues but the server keeps showing: ``` HTTP Erro...

Broken tab navigation in popup with WPF user control hosted inside Winforms in default AppDomain

I have a WPF user control that uses a Popup. This control is a plugin and can be loaded in the main AppDomain or in a separate AppDomain, and it is hosted in a Winforms form using ElementHost. When th...

17 Apr at 20:57

VSCode -- how to set working directory for debugging a Python program

How do I run a Python program under debug and set the working directory for the run?

9 Jun at 15:16

How can I prevent event bubbling in nested React components on click?

Here's a basic component. Both the `<ul>` and `<li>` have onClick functions. I want only the onClick on the `<li>` to fire, not the `<ul>`. How can I achieve this? I've played around with e.preventDe...

11 Mar at 17:43

Automapper performance

I'm using Automapper to map my business model to a ViewModel. It works, but it's very slow. I have a collection with 6893 objects with 23 properties (test environment, production should have much mo...

28 Jul at 15:14

iterate through all rows in specific column openpyxl

I cannot figure out how to iterate through all rows in a specified column with openpyxl. I want to print all of the cell values for all rows in column "C" Right now I have: ``` from openpyxl import...

27 Jul at 17:30

error: RPC failed; curl transfer closed with outstanding read data remaining

I'm facing this error when I try to clone a repository from GitLab (GitLab 6.6.2 4ef8369): ``` remote: Counting objects: 66352, done. remote: Compressing objects: 100% (10417/10417), done. error: RPC ...

10 Nov at 08:27

ASP.NET Core ILoggerProvider for database

I am in the middle of studying the ASP.NET Core, and I have implemented logging with a file system successfully, but how about implementing logging feature with a database solution. How to pass EF con...

5 Aug at 21:22

Button border thickness from code behind

I am very new to wpf, and right now I am working with buttons, and so I want to change buttons border thickness, but from code behind not in XAML, and what I did was next:

5 May at 17:47

HttpRequestException -- Is this a client or server issue?

Awhile ago I implemented some code to consume a REST Api using the `HttpClient` class. ``` using (var client = new HttpClient() { BaseAddress = new Uri(@"https://thirdparty.com") }) { client.Defa...

23 May at 12:22

how to delete installed library form react native project

I have installed a third party library in my project but it is not working , so I want to delete that library from my project , How can I do that ?

27 Jul at 13:3

How to upgrade pip3?

I want to use python3.5 for development, but many times when I install the module for python 3.5, it always fails. The terminal tells me that a higher version is available, but it doesn't work when I ...

24 Feb at 22:30

How to merge two arrays of objects by ID using lodash?

I have two array with one common field . how can I merge theme easily? ``` var arr1 = [{ "member" : ObjectId("57989cbe54cf5d2ce83ff9d6"), "bank" : ObjectId("575b052ca6f66a5732749ecc"), "count...

1 Jul at 23:24

Where are all the static members stored?

I'm trying to learn how C# manages memory. I am stuck on static elements, I read numerous blogs and articles on this subject, but I cannot find a quite satisfactory answer. Let's define a code block ...

Using Hangfire with ServiceStack

Is there a way of starting Hangfire background jobs from ServiceStack services? I've already been able to start jobs from within MVC where I can resolve ServiceStack services but I wanted to be able t...

27 Jul at 08:57

.Net Core how to implement SQLAdapter ./ DataTable function

I have a simple .Net Framework routine which runs a query and returns a DataTable object. I need to port this to .Net Core, however I infer that SQLAdapter and DataTable are not supported ``` SqlCon...

11 Jul at 11:28

OpenIdConnectAuthenticationHandler: message.State is null or empty

I am using UseOpenIdConnectAuthentication middleware for ASP.Net Core application to authenticate against Dells Cloud access manager token provider (setup to provide OpenId/OAuth2 authentication). Fol...

Index must be called with a collection of some kind: assign column name to dataframe

I have `reweightTarget` as follows and I want to convert it to a pandas Dataframe. However, I got following error: > TypeError: Index(...) must be called with a collection of some kind, 't' was pas...

26 Jul at 23:10

We aren't able to process your payment using your PayPal account at this time

I'm getting this error on a sandbox account: > We aren't able to process your payment using your PayPal account at this time. Please go back to the merchant and try using a different payment method. ...

26 Jul at 20:40

xUnit Assert.All() async

I have this example test using [xUnit](https://www.nuget.org/packages/xunit/2.2.0-beta2-build3300): ``` [Fact] public void SomeTest() { Assert.All(itemList, async item=> ...

26 Jul at 17:32