Questions

Eclipse No tests found using JUnit 5 caused by NoClassDefFoundError for LauncherFactory

## The problem Whenever I run my projects JUnit test (using JUnit 5 with Java 9 and Eclipse Oxygen 1.a) I encounter the problem that eclipse can't find any tests. ## The description Under the...

26 Mar at 13:41

Correct async function export in node.js

I had my custom module with following code: ``` module.exports.PrintNearestStore = async function PrintNearestStore(session, lat, lon) { ... } ``` It worked fine if call the function outside my mod...

12 Oct at 17:21

ServiceStack and FluentValidation not firing separate rule sets

I'm working in ServiceStack and using FluentValidation to handle incoming DTOs on requests. I've broken these out as follows, but my unit tests don't seem to be able to target specific rule sets. My...

12 Oct at 17:17

Duplicate info messages in console of Web API after upgrading to ASP.NET Core 2.0

I upgraded a Web API project from ASP.NET Core 1.x to ASP.NET Core 2.0 with very minimal code changes. When running the WebAPI the command prompt opens up like normal. However, every single info mes...

12 Oct at 14:28

Disable transitive project reference in .NET Standard 2

I'm writing an MVC website using ASP.NET Core 2.0. In the ASP.NET Core project (let's call it `Web`), I reference a .NET Standard 2 project in the same solution (let's call it `Service`). The `Servic...

Is it possible in ASP.NET to derive the browser MajorVersion from the HTTP request's user agent string alone?

We have an application which uses `Request.Browser.MajorVersion` as part of a cache key. We have a challenge to determine which cache key was used for a set of historic requests. To do this we're anal...

30 Oct at 15:59

Detect if an object is a ValueTuple

I have a use case where I need to check if a value is a C# 7 ValueTuple, and if so, loop through each of the items. I tried checking with `obj is ValueTuple` and `obj is (object, object)` but both of...

12 Oct at 11:8

Use LinqKit PredicateBuilder for related model (EF Core)

I want to use LinqKit's PredicateBuilder and pass the predicate into `.Any` method for related model. So I want to build a predicate: ``` var castCondition = PredicateBuilder.New<CastInfo>(true); i...

Fix checksum in Artifactory when uploading file through REST API

I'm using the code below to upload a file through Artifactory's REST API. My problem is that when I view the file through the GUI I get this message: > Client did not publish a checksum value. If yo...

12 Oct at 11:24

Application icon is blank when started from Process.Start

``` FileInfo fi = new FileInfo(fileToExcecute); Directory.SetCurrentDirectory(fi.DirectoryName); ProcessStartInfo pInfo = new ProcessStartInfo(); pInfo.FileName = fileToExcecute; pInfo.RedirectStanda...

11 Nov at 23:32

add google authentication to **Existing** .net core 2 web api project

TL;DR - how to add authentication to an existing default core 2 web api project that was started without auth. Details - I've got an existing .net core 2 web api project configured and I'm using e...

Missing ProviderName when debugging AzureFunction as well as deploying azure function

I have an issue getting a `DbContext` to correctly pull my connection string from my `local.settings.json` Context: - - `System.Data.Entity.Internal.AppConfig`- `local.settings.json` Error message:...

ASP.NET Core - Custom model validation

In MVC when we post a model to an action we do the following in order to validate the model against the data annotation of that model: ``` if (ModelState.IsValid) ``` If we mark a property as [Requ...

11 Oct at 18:1

ORMLite / ServiceStack soft deletes

Okay, I've posted a couple of times regarding this, and still have yet to come to a working solution here. I've seen other examples / suggestions and followed them, and am having no success. I'm at ...

11 Oct at 21:48

ServiceStack Angular4 Selfhosted

Is there an easy way to create a project like the ServiceStack Angular4 from the VS Template but for a Self Hosted Service? Would be really nice to have the instructions on what to change and what to...

11 Oct at 13:33

Convert np.array of type float64 to type uint8 scaling values

I have a particular np.array which represents a particular grayscale image. I need to use SimpleBlobDetector() that unfortunately only accepts 8bit images, so I need to convert this image, obviously ...

How to show the status code with custom message in c#?

In MVC5, I have used the below code to return the status code with a custom message. It shows the provided message in my output. ``` return new HttpStatusCodeResult(403, "Not allowed"); ``` In .net...

11 Oct at 19:10

Is it possible to stream partial results through ServiceStack on a long running request?

I have a long running database copy request on my ServiceStack API. Upon completion it returns a log of the database copy procedure. I'd like the response to return each line as it is added to the L...

Could not load file or assembly 'Microsoft.Owin, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'

My code works just fine locally but after I published to server I keep getting this error: Could not load file or assembly 'Microsoft.Owin, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad...

11 Oct at 13:15

react-router (v4) how to go back?

Trying to figure out how can I go back to the previous page. I am using `[react-router-v4][1]` This is the code I have configured in my first landing page: ``` <Router> <div> <Link to="/"><div...

11 Oct at 06:56

Remote Debugging in Visual Studio 2017

I am trying to do Remote debugging using Visual Studio 2017 I downloaded the [Remote Tools for Visual Studio 2017](https://www.visualstudio.com/downloads/#remote-tools-for-visual-studio-2017) and ins...

11 Oct at 06:5

Migration: No DbContext was found in assembly

Using VS Community 2017. I have tried to create initial migration with error message saying: > Both Entity Framework Core and Entity Framework 6 are installed. The Entity Framework Core tools are ru...

SQL Lite on Azure App Service - Inserts Slow and Timeout

We have a process that needs to create a sql lite database with a couple tables with about 750k records/100mb. It gets uploaded somewhere else (Azure Storage Blob). I know Azure App's have very slow...

The difference between "require(x)" and "import x"

I've just started working on a small node project that will interface with a MongoDB. However, I cannot seem to get the relevant node modules to import correctly, even though I have installed them cor...

14 Feb at 05:11

Error CS1061 'IdentityBuilder' does not contain a definition for 'AddEntityFrameworkStores'

I'm trying to change the primary key in ASPNET Core 2.0 to `Guid` or `long`. I've tried the following examples in both these links [Link1][1] and [Link2][2] However, in the Startup class I get...

2 May at 13:0