ServiceStack and Fody Costura

I'm pretty new to ServiceStack, so apologies in advance if the nomenclature is not 100%. I create a test self-hosted application and the ServiceStack Service was in the same assembly as the mainlin...

18 Sep at 04:0

How can I use IConfiguration from my integration tests?

I have an API, and I'm trying to make some integration tests for it with XUnit. Here's my API controller constructor: ``` public class MyController : Controller { readonly IMyRepository _myReposi...

Is there something similar to C# regions in JavaScript? Visual Studio 2017

I am doing work for somebody who would like their JavaScript library organized into categories: CRUD functions, Form functions, etc. They really like the utility of regions in C# and are asking for th...

Unable to merge dex

I have Android Studio Beta. I created a new project with compile my old modules but when I tried launching the app it did not launch with the message: ``` Error:Execution failed for task ':app:transf...

13 Nov at 22:36

Could not reliably determine the server's fully qualified domain name ... How to solve it in Docker?

I am just starting in Docker and I was following that [tutorial](https://www.youtube.com/watch?v=YFl2mCHdv24) that shows basically these steps: 1. Create a Dockerfile like this: From php:7.0-apache c...

9 Mar at 17:59

Visual Studio Code: How to configure includePath for better IntelliSense results

I am a complete beginner to using Visual Studio Code and I have no clue what I am doing. I've searched around (maybe not enough), but I can't find just a simple explanation for someone like me on how...

12 May at 23:40

MSBUILD throws error: The SDK 'Microsoft.NET.Sdk' specified could not be found

I'm trying to build a solution using msbuild command line and I keep getting this error: `error MSB4236: The SDK 'Microsoft.NET.Sdk' specified could not be found.` The version of msbuild is the late...

16 Sep at 19:5

Fall through in pattern matching

currently in c#7 (version 15.3.4) following code is valid to compile but both variables are legitimately unusable. ``` switch(fruit) { case Apple apple: case Orange orange: // impossible ...

How to upload a large file through an Azure function?

I am exploring Azure Functions. The scenarios I have tested so far work great. I am at a point where I am trying to figure out a way to upload files (20MB+) through an Azure Function. The idea is t...

Jest - how to test if a component does not exist?

How do I check if a component is not present, i.e. that a specific component has not been rendered?

17 Sep at 10:13

Change arrow colors in Bootstraps carousel

I'm obviously missing something stupidly simple here. I have images with a white background so I want to be able to edit the arrows on the Bootstraps Carousel so they are visible. So many changing the...

Entity Framework Core 2 (Code First) updating value not working

I've been struggling with changing values in a database for a week and can't find out what I'm doing wrong. I managed to create tables, to add and delete entities but I can't change a value inside an ...

What is this invisible, performance eating cell in a recycling ListView?

So I've had performance issues in my Xamarin.Forms app (on Android) using a `ListView`. The reason is, because I'm using a very complex custom control in the ListView's `ItemTemplate`. To improve per...

opencv.imshow will cause jupyter notebook crash

I check other question on google or stackoverflow, they are talking about run cv2.imshow in script, but my code run in jupyter notebook. Here is my configuration: 1. ubuntu 16.4x64 2. python 3.5 3....

18 Jul at 15:31

How to add an item to an ArrayList in Kotlin?

How to add an item to an `ArrayList` in Kotlin?

17 Jun at 11:33

kubectl unable to connect to server: x509: certificate signed by unknown authority

i'm getting an error when running kubectl one one machine (windows) the k8s cluster is running on CentOs 7 kubernetes cluster 1.7 master, worker Here's my .kube\config ``` apiVersion: v1 clusters: ...

15 Sep at 07:42

accessing appsetting.json values in startup.cs

I understand how to Configure services for appsettings.json and inject them into a controller. However, I need to use the values in the ConfigureServices when I configure Auth. How would I do this? ...

15 Sep at 01:59

how to impersonate a user via odata

We have been succesful in using the odata v8.1 endpoint in 2016 to [impersonate a user.](https://msdn.microsoft.com/en-us/library/gg334744.aspx) Please note that the intended request flow is: Exam...

How to set up the DbContext in xUnit test project properly?

I have the following code to set up DBContext in the .Net core 2.0 console program and it's injected to the constructor of the main application class. ``` IConfigurationRoot configuration = GetConfig...

JSON.stringify (Javascript) and json.dumps (Python) not equivalent on a list?

In javascript: ``` var myarray = [2, 3]; var json_myarray = JSON.stringify(myarray) // '[2,3]' ``` But in Python: ``` import json mylist = [2, 3] json_mylist = json.dumps(mylist) # '[2, 3]' <-- Note...

18 Nov at 12:32

Custom IUserAuthRepository with Servicestack

I'm in the process of trying to set up a server for a personal project. I'm using ServiceStack.Core with a Neo4j graph database as my persistence layer. I would like to set up user authentication usi...

14 Sep at 17:2

ASP.NET Core 2 AuthenticationSchemes

There are several authentication schemes but I can't find any documentation on them. How do they differ? ```csharp options.DefaultScheme options.DefaultChallengeScheme options.DefaultForbidSchem...

C# HttpClient An existing connection was forcibly closed by the remote host

I'm working on an integration with Alternative Payments using their [hosted page integration](http://www.alternativepayments.com/developers/API/?shell#create-transaction). Their C# SDK does not have t...

1 Aug at 14:47

ASP.NET Core 2 Seed Database

I've seen some of the similar examples on SO regarding this but I don't know enough about the language just yet to see what I'm doing wrong. I've cobbled together a demo to learn more but I'm having t...

20 Jun at 09:12

What is the point of having async Main?

As we know, C#7 allows to make Main() function asynchronous. What advantages it gives? For what purpose may you use async Main instead of a normal one?

14 Sep at 12:26