Performance of struct tuples

The following F# program defines a function that returns the smaller of two pairs of ints represented as struct tuples and it takes 1.4s to run: ``` let [<EntryPoint>] main _ = let min a b : int = ...

Dependency Injection circular dependency .NET Core 2.0

I want my `ApplicationContext` constructor to have the `UserManager` as a parameter, but I am having trouble with dependency injection. Code: ``` public class ApplicationContext : IdentityDbContext<...

How do I automatically set all projects in my solution to the same version?

I have a Visual Studio solution with 5 C# projects. I want the assembly versions to match in each project. But it looks like I have to go into each project's properties and click assembly version for ...

Filtering out soft deletes with AutoQuery

I'm using ServiceStack with OrmLite, and having great success with it so far. I'm looking for a way to filter out 'soft deleted' records when using AutoQuery. I've seen [this suggestion](https://sta...

How to conditionally INSERT OR REPLACE a row in SQLite?

I would like to insert or replace_on_condition. If the condition is not satisfied, do not insert or replace. Is this possible? For my project, I currently have two data collection processes. One is ...

27 Nov at 10:38

JetBrains Rider run with watch

When I press run button in Rider (net core) it run the following command: ``` /usr/local/share/dotnet/dotnet /pathtomyproject/myproject.dll ``` But I need to run the project with the argument "watc...

21 Sep at 21:56

How to make axios synchronous

I'm using axios to check if an alias has not already been used by another in the database. : The ajax call doesn't wait for the server response to execute the remaining code. The code looks like : ...

4 Apr at 15:14

C# : Extending Generic class

My generic repository implements a common set of methods for `TEntity` like which I can access like Many repositories does the same set of operation, so it is beneficial but now I want to extend `R...

6 May at 20:43

How can I convert a char to int in Java?

(I'm new at Java programming) I have for example: ``` char x = '9'; ``` and I need to get the number in the apostrophes, the digit 9 itself. I tried to do the following, ``` char x = 9; int y = (...

22 Oct at 07:20

Asp.net mvc dropdown list using ViewBag

My table in db have fields : `Id`,`Organisation`,`Info`. I want make dropdowm list like that: ``` <select> <option value='Id there'>'Organisation there'</option>... ``` I'm try to do it, using V...

21 Sep at 10:25

ServiceStack custom response on failed authentication

I've created a custom authentication for servicestack, which works well. The only problem is, that I get empty responses for every route, that requires authentication, when I am not logged in. How can...

serviceStack and protobuff

This is a type I define ``` public class NewPropVideoResponse { [DataMember(Order = 1)] public int VideoId { get; set; } } ``` This is the type I want to return ``` NewPropVideoResponse[] ...

21 Sep at 08:57

How can I change order the operations are listed in a group in Swashbuckle?

I'm using Swashbuckle to generate Swagger UI. It has options for choosing a grouping key (controller by default) and the ordering of the groups, but I would like to choose an order for the operations ...

21 Sep at 08:38

Xcode 9 Swift Language Version (SWIFT_VERSION)

I've recently updated xcode to version 9. Before that in Xcode 8.x whenever I use to do `pod update` it shows me an update code to convert the code to Swift 3 and doing that solve the errors. But now ...

6 Dec at 14:35

How to allow CORS in react.js?

I'm using Reactjs and using API through AJAX in javascript. How can we resolve this issue? Previously I used CORS tools, but now I need to enable CORS.

8 Sep at 16:2

C# .Net How to Encode URL space with %20 instead of +

How to encode query string space with `%20` instead of `+` ? Because `System.Web HttpUtility.UrlEncode()` gives the space with `+`.

21 Sep at 08:13

Configure ASP.NET Core 2.0 Kestrel for HTTPS

TL;DR What is today the correct way to setup HTTPS with ASP.NET Core 2.0? I would like to configure my project to use https and a certificate like they have shown at [BUILD 2017](https://www.youtube....

ServiceStack: How to unit test a service that serves files

I have a web service that service an Excel file ``` public class ReportService : Service { public IReportRepository Repository {get; set;} public object Get(GetInvoiceReport request) { ...

Anaconda Navigator won't launch (windows 10)

Anaconda navigator won't launch, I tried reinstalling it, that did not work either. anancondas' command prompt shows an error message. I've tried googling the answer, I guess I'm bad at it. [this is w...

18 Dec at 17:28

Using ServiceStack REST to receive data without a POCO on the server

We're trying to write a ServiceStack Rest method to received data from the NLOG WebService Target. [https://github.com/NLog/NLog/wiki/WebService-target](https://github.com/NLog/NLog/wiki/WebService-...

21 Sep at 00:27

How to get the Angular version?

I installed the `@angular/cli` package via npm using: ``` npm install -g @angular/cli ``` The version 1.4.2 of `@angular/cli` has been successfully installed. That is not the Angular version, but the...

9 Jun at 17:33

Why should I inject IHttpContextAccessor as a Singleton

In all examples that i've seen of `IHttpContextAccessor` injection, it is set as a Singleton. Examples: [How to add IHttpContextAccessor in the Startup class in the DI in ASP.NET Core 1.0?](https:/...

20 Sep at 19:9

Why use Page Factory?

I am a new test engineer and have been reading about Page Object Model and implementing them and keep coming across Page Factory. I understand that Page Factory is a POM that provides additional featu...

6 May at 02:32

Azure Search: price range - min & max value calculation

Currently, I am trying out Azure Search SDK. Having a strong background working with [lucene](https://lucenenet.apache.org/) and [bobobrowse](https://github.com/NightOwl888/BoboBrowse.Net), the Azure ...

Decimal and mathematical operations

I have a simple conversion of a `decimal` in C#. It looks like this: ``` private decimal BaseValue { get; set; } public decimal ConvertedValue { get { return BaseValue * (365 / ...

20 Sep at 14:15