Questions

Call an action from within another action

I have the following setup for my actions: ``` get1: ({commit}) => { //things this.get2(); //this is my question! }, get2: ({commit}) => { //things }, ``` I want to be able to call one action f...

5 Oct at 11:53

Newtonsoft.Json.JsonSerializationException (Error getting value from 'Value' on 'System.Data.SqlTypes.SqlDouble) serializing SqlGeography

I tried to serialize a `DataTable` object to Json using Newtonsoft.Json version 'Newtonsoft.Json.10.0.3' in a database SQL server 2012. The table has a column with type 'geography', which contains ...

How to delete all columns in DataFrame except certain ones?

Let's say I have a DataFrame that looks like this: ``` a b c d e f g 1 2 3 4 5 6 7 4 3 7 1 6 9 4 8 9 0 2 4 2 1 ``` How would I go about deleting every column besides `a` a...

23 Aug at 17:40

Usage of Var Pattern in C# 7

I've seen this example of var pattern in the new C# 7 ``` if (o is var x) Console.WriteLine($"it's a var pattern with the type {x?.GetType()?.Name}"); ``` What is the different of just use: ``` va...

23 Aug at 16:4

Meaning of "The server returned an invalid or unrecognized response" in HttpClient

When awaiting an `HttpClient.PostAsync` response, I sometimes see an error stating : ``` System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.Http.WinHtt...

23 Aug at 15:22

ServiceStack + .NET Core + Kestrel = Swagger (OpenAPI) not working

I am trying to create a ServiceStack REST API project. So far I have everything working except Swagger (OpenAPI). When I load the Swagger UI it shows no APIs and I can see from the /openapi endpoint...

23 Aug at 15:59

Custom IExceptionHandler

I'm trying to get a custom `IExceptionHandler` to work with my Azure Function (C# class library). The idea is to have my own exception handler for unexpected exceptions that will contain my own in-mem...

IDbCommand missing ExecuteReaderAsync

I'm using .NET Core 2.0. I've got the following function that calls `IDbCommand.ExecuteReader` ``` public async Task<IEnumerable<Widget>> ReadAllAsync( System.Data.IDbConnection databaseConnectio...

Display a readonly field in ASP.NET Core

I am new in ASP.NET Core and would like to ask about displaying a field in w a view. I have a ``` class Person { public string Name {get; set;} public string Nickname {get; set;} } ``` ...

How to check for the previous path searched on a maze C#

I am trying to code an algorithm that solves a maze problem but I am facing some difficulty to apply it correctly. The algorithm runs over the walls instead of changing the direction after finding t...

25 Aug at 07:54

Can't inherit from IdentityUser and IdentityRole in ASP.NET Core 2.0

I'm trying to finish updating to .NET Core 2.0 but a couple of errors pop up: I have two classes, ApplicationRole and ApplicationUser which inherit some properties from IdentityRole and IdentityUse...

23 Aug at 04:46

How to redirect to a asp.net core razor page (no routes)

Here I have a razor cs page: ``` public IActionResult OnPost(){ if (!ModelState.IsValid) { return Page(); } return RedirectToPage('Pages/index.cshtml'); } ``` And a cshtml page: ``` ...

17 Oct at 22:15

Can Dapper create a model class from DB tables?

I'm looking over some alternatives to EF, and Dapper seems like a pretty good option. But I do have one question. I understand that Dapper, being a Micro ORM doesn't rely on or use a class of models, ...

6 May at 20:44

How to add a filter to a page in serenity?

I'm trying to make a filter for a page in serenity. I have a page called Companies, and one button to open another page, CompanyUsers, users from this company. [](https://i.stack.imgur.com/ZquUS.png) ...

20 Jun at 09:12

asp.net-core2.0 user auto logoff after 20-30 min

Few days ago I have decided to upgrade my web app from asp.net core 1.1 to core 2.0. Everything seems to work fine after minor changes, except authentication does not persist longer than 20-30 minutes...

Remove APK from library in Google Play Developer Console

Is there a way to remove an APK from the library in the Google Play Developer Console? To make sure: I don't mean to revert to an earlier version or unpublish an app, but to remove it from the list t...

How to listen to the window scroll event in a VueJS component?

I want to listen to the window scroll event in my Vue component. Here is what I tried so far: ``` <my-component v-on:scroll="scrollFunction"> ... </my-component> ``` With the `scrollFunction(ev...

22 Aug at 21:17

ASP.NET Core 2.0 HttpSys Windows Authentication fails with Authorize attribute (InvalidOperationException: No authenticationScheme was specified)

I am trying to migrate an ASP.NET Core 1.1 application to ASP.NET Core 2.0. The application is fairly simple and involves the following: - - `options.Authentication.Schemes = AuthenticationSchemes...

7 Sep at 14:12

Add class to an element in Angular 4

I was trying to create an image gallery with Angular 4.The logic behind this is to add a Cascading Style Sheet (CSS) class to the selected image that will show a red border on the selected (clicked) i...

24 Aug at 20:32

Difference between the created and mounted events in Vue.js

Vue.js documentation describes the `created` and `mounted` events as follows: ``` created ``` > Called synchronously after the instance is created. At this stage, the instance has finished proces...

22 Aug at 11:25

C# inline checked statement does not work

I have two test methods. The first one works fine. The second one does not throw an exception, but it should. Why doesn't the second one throw a exception? ``` [TestMethod] [ExpectedException(typeof(...

22 Aug at 13:31

Cannot consume scoped service IMongoDbContext from singleton IActiveUsersService after upgrade to ASP.NET Core 2.0

I updated a project to ASP.NET Core 2 today and I get the following error: > Cannot consume scoped service IMongoDbContext from singleton IActiveUsersService I have the following registration: ``` ...

22 Aug at 17:34

Working with return url in asp.net core

We are trying to redirect the user(using return URL) to the login page if the user is not authenticated/authorized while accessing the particular URL. However, we are not able to add the custom parame...

ASP.NET Core 2.0 JWT Validation fails with `Authorization failed for user: (null)` error

I'm using ASP.NET Core 2.0 application (Web API) as a JWT issuer to generate a token consumable by a mobile app. Unfortunately, this token couldn't be validated by one controller while can be validate...

Change Controller Route in ASP.NET Core

So I have a `HomeController`, to access it along with `Actions` I have to type . Would it be possible to change this to something else like ?