Questions

Not supported by Swagger 2.0: Multiple operations with path

I have integrated swagger in WebApi 2 application. It works fine when application has single controller. When I added second controller in the application. I got following error : > An error has oc...

How can I get my dapper result to be a List?

Why I can't add a `.ToList()` on this? The only thing Intellisense is allowing is `.ToString()`. ``` //.. string sqlQuery = "SELECT sum(SellingPrice) as SellingPrice, sum(MarkupPercent) as MarkupPerc...

20 Sep at 18:58

How to properly link libraries with cmake?

I can't get the additional libraries I am working with to link into my project properly. I am using CLion, which uses cmake to build it's projects. I am trying to use several libraries in conjunction...

5 Jan at 15:34

How do I set environment variables during the build in docker

I'm trying to set environment variables in docker container during the build but without success. Setting them when using run command works but I need to set them during the build. #### Dockerfile ...

27 Jan at 03:0

Building SqlExpression throws InvalidOperationException when not using anonymous type in Select() clause

This is my database POCO : ``` public class MyPoco1 { public int Id { get; set; } public string Name { get; set; } } ``` I want to select and map results into a custom POCO with different p...

20 Sep at 15:25

Android app did not receive data from SignalR hub

I already read these topics: [how to use SignalR in Android](https://stackoverflow.com/questions/32573823/how-to-use-signalr-in-android/32574829#32574829) [Android Client doesn't get data but .net cli...

23 May at 12:0

Using Linq to sum up to a number (and skip the rest)

If we have a class that contains a number like this: ``` class Person { public string Name {get; set;} public int Amount {get; set;} } ``` and then a collection of people: ``` IList<Person> p...

20 Sep at 12:27

How can I use more than 2100 values in an IN clause using Dapper?

I have a List containing ids that I want to insert into a temp table using Dapper in order to avoid the SQL limit on parameters in the 'IN' clause. So currently my code looks like this: ``` public I...

21 Sep at 07:0

How to access dbcontext & session in Custom Policy-Based Authorization

Is it possible that we can access dbcontext to get my table data and session in custom Policy-Based Authorization? Anyone can help how to achieve it? ``` services.AddAuthorization(options => ...

19 Sep at 23:26

Ignore the Tasks throwing Exceptions at Task.WhenAll and get only the completed results

I am working on a Task parallel problem that I have many Tasks that may or may not throw Exception. I want to process all the tasks that finishes properly and log the rest. The `Task.WhenAll` propage...

How to get params from AuthorizationHandler .NET Core

I am using an authorization handler to put custom authorization in my controller in .net core. How can I get the parameters from the controller and use it to the authorization handler? In the old ....

15 Jun at 14:29

Getting ServiceStack licensing error when .NET Trust level is not "Full"

We were required to lower .NET trust level for our WEB application using ServiceStack. However when .NET trust level is set to anything lower than "Full", ServiceStack fails to recognize the license....

20 Sep at 08:30

How to keep user login in to system and logout only after user clicks on logout button?

I am using custom implementation of microsoft asp.net identity because i have custom tables that is why i have given custom implementation of all my methods . > Problem is when user logins then after...

Netstandard1.x Nuget packages cannot be installed for netstandard1.x projects

After doing a fresh Windows 10 installation along with latest Visual Studio 2015, netcore, and nuget tooling - I can no longer install Nuget packages to any .netstandard projects. Here's some example ...

Debug/run standard java in Visual Studio Code IDE and OS X?

Love the light-weight Visual Studio Code in OS X. Have always wanted the ability to write, debug and run standard java (NOT javascript) from VSC in OS X. Found the following extension which allows you...

19 Sep at 21:34

pandas: find percentile stats of a given column

I have a pandas data frame my_df, where I can find the mean(), median(), mode() of a given column: ``` my_df['field_A'].mean() my_df['field_A'].median() my_df['field_A'].mode() ``` I am wondering is ...

28 Jun at 01:26

Use settings from config files for `UseUrl(...)`?

I have an Asp.net core application with the following code. ``` public class Program { public static void Main(string[] args) { var host = new WebHostBuilder() .UseKestr...

19 Sep at 19:1

Add claims when creating a new user

I am creating a new User using ASP.NET Core Identity as follows: ``` new User { Email = "john@company.com", Name = "John" } await userManager.CreateAsync(user, "password"); ``` I need to add a...

OnPlatform tags not working in Xamarin Forms

I'm using Xamarin Studio 6.1, recently upgraded it to work with a Xamarin Forms project. I can't seem to get the OnPlatform tags working. I'm trying something like this ``` <Grid Padding="12"> <...

19 Sep at 16:17

How to move a file on Azure File Storage from one sub folder to another sub folder using the Azure Storage SDK?

I'm trying to figure out how to move a file in Azure File Storage from one location to another location, in the same share. E.g. ``` source -> \\Share1\someFile.txt destination -> \\Share1\Foo\Bar\s...

Cannot apply indexing with [] to an expression of type 'method group' SinglePageApp1. Get["/"] Nancy

I try to make a class with NancyModules and GET string on URL but method 'Get' tells that: > "Error CS0021 Cannot apply indexing with [] to an expression of type 'method group' ...." My Code:...

21 Sep at 15:45

.NET Core console application, how to configure appSettings per environment?

I have a .NET Core 1.0.0 console application and two environments. I need to be able to use `appSettings.dev.json` and `appSettings.test.json` based on environment variables I set at run time. This se...

19 Sep at 12:46

What does DateTimeStyles.RoundtripKind enumeration mean?

I was reading this answer [here](https://stackoverflow.com/questions/39508178/xml-delete-node-according-to-timestamp-c-sharp) where I came across this enumeration value `DateTimeStyles.RoundtripKind`....

15 May at 22:35

xUnit theory test using generics

In xUnit I can have a `Theory` test that uses generics in this form: ``` [Theory] [MemberData(SomeScenario)] public void TestMethod<T>(T myType) { Assert.Equal(typeof(double), typeof(T)); } publ...

23 May at 10:31

How to uninstall/upgrade Angular CLI?

When I try to create a new project with , with: ``` ng n app ``` I get this error: > fs.js:640 return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode); ^...

3 Nov at 09:37