Use different name for serializing and deserializing with Json.Net

I am receiving JSON data from a web API that looks like this: I deserialize this data to objects of the following type: Later in my application I would like to serialize the ErrorDetails object again ...

6 May at 06:12

servicestack ormlite always returning anonymous object, even if not found

I have created a query that joins multiple tables with a where at the end, eventually the tables are mapped to a custom datamodel as recommended in the ormlite readme. ``` using (var db = _connectio...

What is a 'workspace' in Visual Studio Code?

For example, Visual Studio Code talks about [applying settings at the user level vs the workspace level](https://code.visualstudio.com/docs/getstarted/settings). On the one hand, - - The page referen...

22 Oct at 20:10

In C#, I am calling a public API, which has a API limit of 10 calls per second

In C#, I am calling a public API, which has an API limit of 10 calls per second. API has multiple methods, different users can call different methods at a time, hence there are chances that "Rate Lim...

ServiceStack - extending AutoQuery Metadata with

Using the SwaggerFeature plugin in ServiceStack, I can annotate the properties of a DTO using the ApiMember attribute. Example: ``` [Route("/swagger/{Name}", "POST"] public class MyRequestDto { ...

19 Jun at 10:49

How to find count of Null and Nan values for each column in a PySpark dataframe efficiently?

``` import numpy as np data = [ (1, 1, None), (1, 2, float(5)), (1, 3, np.nan), (1, 4, None), (1, 5, float(10)), (1, 6, float("nan")), (1, 6, float("nan")), ] df = s...

ServiceStack - extending AutoQuery Metadata Viewer

ServiceStack's [AutoQuery Viewer Plugin](https://github.com/ServiceStack/Admin) allows you to decorate the AutoQueries using AutoQuery metadata attributes. I use the existing Metadata service in AutoQ...

19 Jun at 09:42

using IdentityServer4 with custom Configration DBContext

I created a customized `IConfigurationDbContext` in order to using IDS4 with Oracle. ``` public class IdentityConfigurationDbContext : DbContext, IConfigurationDbContext { private readonly ...

How Do You Reference a .NET Standard Library from a .NET Framework 4.5 Console Application in Visual Studio 2017?

I have finally installed Visual Studio 2017.2 and am trying to get my first project working, but am running into some trouble that I hope to address here. I have a very simple .NET Standard Library d...

Is it possible to use .NET Native without UWP?

Can a C#/.NET application be compiled to native binaries using .NET Native without being a UWP application? For example, a 4.5 console app? I've watched over 2 hours of video on .NET Native and also r...

18 Jun at 17:49

Passing headers with axios POST request

I have written an Axios POST request as recommended from the npm package documentation like: ``` var data = { 'key1': 'val1', 'key2': 'val2' } axios.post(Helper.getUserAPI(), data) .the...

11 Aug at 11:14

Vue Js - Loop via v-for X times (in a range)

How can I repeat a loop via `v-for` X (e.g. 10) times? ``` <!-- want to repeat this (e.g.) 10 times --> <ul> <li v-for="item in shoppingItems"> {{ item.name }} - {{ item.price }} </li> </ul> ...

24 Oct at 10:1

How Force browser to reload cached static file with versioning?

After deploying a new version of a website the browser loads everything from its cache from the old webpage until a hard, force refresh is done. In `ASP.NET MVC` if the file becomes in Bundle, it han...

Regex to return the word before the match

I've been trying to extract the word before the match. For example, I have the following sentence: "" I want to extract the word before "Bartow". I've tried the following regex to extract that wor...

18 Jun at 04:50

How to fix Cannot find module 'typescript' in Angular 4?

I generated Angular 4 app 3 weeks ago using the @angular/cli. After 2 weeks, I tried to run it with the command line `ng serve` but I am prompted an error below: ``` Cannot find module 'typescript' Er...

4 Feb at 14:33

MVC Web API, Error: Can't bind multiple parameters

I get error when passing the parameters, > "Can't bind multiple parameters" ``` [HttpPost] public IHttpActionResult GenerateToken([FromBody]string userName, [FromBody]string password) { //......

How to test "ApplyTo.Post" RuleSet in ServiceStack

I want to test my validator for post behavior described below. ``` public interface ITestValidator { bool IsExists(string testName); } public class TestValidator : ITestValidator { public b...

16 Jun at 21:33

Conda command is not recognized on Windows 10

I installed Anaconda 4.4.0 (Python 3.6 version) on Windows 10 by following the instructions here: [https://www.continuum.io/downloads](https://www.continuum.io/downloads). However, when I open the Com...

ASP.NET Core giving me Code 500 on Forbid()

I tried to solve this for hours now and I can not find anything. Basicly I have a simple controller which roughly looks like this: ``` [Route("v1/lists")] public class ListController : Controller { ...

Smart cast to 'Type' is impossible, because 'variable' is a mutable property that could have been changed by this time

And the Kotlin newbie asks, "why won't the following code compile?": ``` var left: Node? = null fun show() { if (left != null) { queue.add(left) // ERROR HERE } } ``` > Smart cas...

23 Jul at 21:1

How to upload Video to youtube using Google.Apis.YouTube.v3 and C#?

I have created `console` application using `C#`. Which will `upload` `Video` from local drive to `youtube`. I have created new app in google api using [this link](https://developers.google.com/youtub...

How to set default value using data annotation

I am learning ASP.Net MVC 5 and I want to set default value using data annotation for boolean property. Also I don't want to use the constructor to set the default value. Is it possible? ``` public c...

16 Jun at 14:22

How to convert JSON string into List of Java object?

This is my JSON Array :- ``` [ { "firstName" : "abc", "lastName" : "xyz" }, { "firstName" : "pqr", "lastName" : "str" } ] ``` I have this in my ...

16 Jun at 13:12

Android: how to write a file to internal storage

I am developing a simple android application and I need to write a text file in internal storage device. I know there are a lot of questions (and answers) about this matter but I really cannot underst...

16 Jun at 11:10

How to get current user identity in Azure Function with Azure Authentication?

I have created a new Function App, enabled App Service Authentication / Authorization for it ("") and disabled non-authenticated requests. Everything seems to be working correctly so far. If I try to...