Azure Function Http Trigger validating body data

Is there a way currently to validate objects in Azure functions using something similar to Data Annotations and Model State in the MVC framework? Or what is the standard approach to data validation an...

Formatting ToShortDateString to dd/MM/yyyy

I have Calendar like this one: ``` <td> <asp:Calendar ID="Calendar1" runat="server" OnSelectionChanged="DateChange"> </asp:Calendar> <asp:TextBox ID="TextBox2" runat="server">...

25 Feb at 14:46

pip install -r requirements.txt [Errno 2] No such file or directory: 'requirements.txt'

I am setting up the base for a django project, I have cloned a repo and I have just created a virtual environment for the project in the same directory. But when I try to run the command `pip install ...

3 Dec at 21:27

Error referencing Net Standard from Net 4.6.1 / 4.7

I have a web app initially targeting 4.6.1. This web app references a class library; in turn, this references a Net Standard 1.6 class library. Adding the reference to the Net Standard library was t...

20 Oct at 15:5

How to generate components in a specific folder with Angular CLI?

I am using Angular 4 with Angular CLI and I am able to create a new component with the following command. ``` E:\HiddenWords>ng generate component plainsight ``` But I need to generate a child compon...

18 Dec at 00:35

Merge two array of objects based on a key

I have two arrays: Array 1: ``` [ { id: "abdc4051", date: "2017-01-24" }, { id: "abdc4052", date: "2017-01-22" } ] ``` and array 2: ``` [ { id: "abdc4051", name: "ab" }, { id: "abdc4052...

5 Oct at 15:35

Handling bad CSV records in CsvHelper

I would like to be able to iterate through all records in a CSV file and add all the good records to one collection and handle all the "bad" ones separately. I don't seem to be able to do this and I t...

20 Oct at 12:7

Headless Firefox in Selenium C#

I want to run firefox headless. Not hide the browser window or open it in a virtual desktop, Firefox supports headless mode by using "-headless" flag. Problem is I know how to do it in chrome but no...

How to run a .NET Core console application on Linux

I am using Visual Studio 2015 and created a .NET Core console application. After compiling, I have my project DLL file in the folder. And if I want to run it on another computer, I have to install .N...

26 Feb at 18:38

How to SetBasePath in ConfigurationBuilder in Core 2.0

How can I set the base path in ConfigurationBuilder in Core 2.0. I have googled and found [this](https://stackoverflow.com/questions/33169589/specify-the-application-base-path-in-configurationbuilde...

Unable to determine the relationship represented by navigation property ASP.NET core 2.0 Entity Framework

I am currently developing an ASP.NET app that uses EntityFramework, for the given code ``` public partial class EnumMeta : Meta { public EnumMeta() { this.Messages = new HashSet<Messa...

The property 'x' is not a navigation property of entity type 'y'

I'm using EF Core with ASP Core 2.0. Using latest Identity framework. I get this exception on page All. > InvalidOperationException: The property 'User' is not a navigation property of entity type 'G...

disable case sensitive in visual studio solution explorer

In the visual studio solution explorer, when a word is written in lower case then the solution explorer filters the word as not case-sensitive but if one letter is written in upper case then it wil...

Where are Entity Framework Core conventions?

using EF 6.1+ there were times where we need to add or remove existing conentions. The code looks more or less like: ``` public class MyContext : DbContext { protected override void O...

19 Oct at 19:37

ServiceStack resolving\throwing 404 depending on the order of the methods in my IService?

``` public class UgGroupEditorService : IService { public object Get(GroupsRequest request){} public object Post(GroupsRequest request){} public object Get(GroupsHelloRequest request) { ...

19 Oct at 18:29

How Mock JsonReader unit testing a custom JsonConverter

Wrote a Custom JsonConverter to handle different Json formats that are returned by different versions of the same api. One app makes a request to several other apps, and we dont know which format will...

19 Oct at 17:11

ThreadPool SetMinThreads - the impact of setting it

I am trying to understand the impact of setting `ThreadPool.SetMinthreads`. I have multiple virtual applications running in one Azure App Service. My understanding is that all these virtual applicatio...

Automatic Binding Redirects

Running VS 2017, latest update. The [documentation](https://learn.microsoft.com/en-us/dotnet/framework/configure-apps/how-to-enable-and-disable-automatic-binding-redirection) states that to enable au...

19 Oct at 15:14

Get safe area inset top and bottom heights

What would be the most proper way to get both top and bottom height for the unsafe areas? [](https://i.stack.imgur.com/hQXf7.png)

how to open Jupyter notebook in chrome on windows

On my Windows PC, i have anaconda installed and when I open a jupyter notebook, it opens up in internet explorer, but I would like to use Chrome instead. Does anyone know how to achieve this?

PyTorch: How to get the shape of a Tensor as a list of int

In numpy, `V.shape` gives a tuple of ints of dimensions of V. In tensorflow `V.get_shape().as_list()` gives a list of integers of the dimensions of V. In pytorch, `V.size()` gives a size object, but...

19 Oct at 08:59

How can I use a generic type with entity framework core?

If I have a domain model that looks something like this: ``` public class Foo<T> { public Guid Id { get; set; } public string Statement { get; set; } public T Value { get; set; } } ``` ...

19 Oct at 08:57

Event vs EventHandler

I read a lot of materials but I still did not understand, can someone explain me, please? What do I know: Declare an event: ``` public event MyEvent myEvent; ``` Vs. declare EventHandler: ```...

19 Oct at 07:21

SignInAsync vs AuthenticateAsync

I finally got my login-method with JWT Token Authentication working. Here I'm calling ``` await HttpContext.SignInAsync( CookieAuthenticationDefaults.AuthenticationScheme, ClaimsPrincipalFa...

Why does Visual Studio mark my added .cs files as "ignored"?

I cloned an existing but almost empty project on my local machine through GitHub for Windows. Then I opened it in VS 2017 and added a few classes after what they all became marked up as "ignored" with...

31 Dec at 15:11