IHttpHandler versus HttpTaskAsyncHandler performance
We have a webapp that routes many requests through a .NET IHttpHandler (called proxy.ashx) for CORS and security purposes. Some resources load fast, others load slow based on the large amount of compu...
- Modified
- 30 Jan at 20:43
Visual Studio Code Intellisense stopped to work on C# files
I realized that I can't use `ctrl + .` shortcut to import other `C#` classes. This shortcut works just fine for other file types like typescript. I have uninstalled and installed back again. I also i...
- Modified
- 17 May at 05:47
How to fix Could not load file or assembly 'nunit.engine, Version=3.7.0.0
I have a webappliction with a separate test-project using NUnit to run unittests. When my test-project is trying to discover tests I run into the following exception: ``` An exception occurred while ...
- Modified
- 30 Jan at 16:31
How to export swagger.json (or yaml)
How can I export a Swagger definition file? It should be a JSON or YAML file, e.g. swagger.json or swagger.yaml. Let's say I have an endpoint looking like `http://example.com//swagger/ui/index#!`: [](...
- Modified
- 2 Dec at 14:58
Getting No provider for NgControl Error after adding ReactiveFormsModule to my angular 4 app
I am getting this error - "Template parse errors: No provider for NgControl" ``` The error comes from this line of code --> <select (ngModel)="currencies" (ngModelChange)="showPurchase($event)" cla...
- Modified
- 30 Jan at 15:40
Should the package-lock.json file be added to .gitignore?
To lock the versions of dependencies that are installed over a project, the command `npm install` creates a file called `package-lock.json`. This was made since [Node.js v8.0.0](https://nodejs.org/en/...
- Modified
- 30 Jan at 14:58
Docker error: invalid reference format: repository name must be lowercase
Ran into this Docker error with one of my projects: `invalid reference format: repository name must be lowercase` What are the various causes for this generic message? I already figured it out afte...
- Modified
- 30 Jan at 13:29
Could not load file or assembly 'System.Runtime.InteropServices.RuntimeInformation
I am getting this error whenever I try and run a webjob project with application insight and entity framework. > System.IO.FileLoadException: 'Could not load file or assembly 'System.Runtime.Intero...
- Modified
- 30 Jan at 11:22
How do I select just few columns with ORMLite and c#?
I have a query involving several tables, and I need to select only few columns of the result. I've looked everywhere with no luck, the few things I tried did not work. Can someone point me to the ri...
- Modified
- 30 Jan at 10:21
Retrieving alias of a property from a Model with ORMLite and C#
I have the following class: ``` [Schema("dbo")] [Alias("accesses")] public class Acces{ [Alias("id")] public int Id { get; set; } [Alias("device_id")] public string DeviceId { get; s...
- Modified
- 30 Jan at 18:13
Server Events Client - Getting rid of the automatically appended string at the end of the URI
I am new to the Service Stack library and trying to use the Server Events Client. The server I'm working with has two URIs. One for receiving a connection token and one for listening for search reques...
- Modified
- 30 Jan at 08:45
How to implement two forms with separate BindProperties in Razor Pages?
I am using ASP.NET Core 2 with Razor Pages and I am trying to have . ``` @page @model mfa.Web.Pages.TwoFormsModel @{ Layout = null; } <form method="post"> <input asp-for="ProductName" /> ...
- Modified
- 19 Aug at 06:6
Data type conversion error: ValueError: Cannot convert non-finite values (NA or inf) to integer
I've the following dataframe ``` df1 = df[['tripduration','starttime','stoptime','start station name','end station name','bikeid','usertype','birth year','gender']] print(df1.head(2)) ``` which pri...
AppSelfHostBase in Xamarin
i would like to create a self hosted host in my Xamarin.Forms application. I'm working on a library that targets .NETStandard2, but when I try to create my host i cannot figure out how to get the righ...
- Modified
- 29 Jan at 22:5
Passing C# parameters which can "fit" an interface, but do not actually implement it
Suppose I have the following class, which was defined in another assembly so I can't change it. ``` class Person { public string Greet() => "Hello!"; } ``` I now define an interface, and a me...
- Modified
- 29 Jan at 18:46
Simple Conditional Routing in Reactjs
How to implement conditional routing i.e. if and only if some conditions satisfies, then routing should occur. For example, if and only if the user enters the correct credentials, login should be succ...
- Modified
- 14 Dec at 05:40
ReactJS: Maximum update depth exceeded error
I am trying to toggle the state of a component in ReactJS but I get an error stating: > Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillU...
- Modified
- 19 Jul at 09:12
WebAPI Core routing issues
So, I am playing around with Web API (ASP.NET Core 2) and having routing issues. I have several controllers such as: SchoolController TeacherController. Both have Gets: `Get(int id)` Problem is th...
- Modified
- 17 Jul at 16:10
Can Nullable be used as a functor in C#?
Consider the following code in C#. ``` public int Foo(int a) { // ... } // in some other method int? x = 0; x = Foo(x); ``` The last line will return a compilation error `cannot convert from...
- Modified
- 28 Jan at 20:16
Location permission for Android above 6.0 with Xamarin.Forms.Maps
I'm trying to implement a Xamarin.Forms application using Xamarin.Forms.Maps, however I always fall into the exception: Java.Lang.SecurityException: my location requires permission ACCESS_FINE_LOCATI...
- Modified
- 28 Jan at 18:0
How to Set/Update State of StatefulWidget from other StatefulWidget in Flutter?
1. For Example in the below code plus button works and able to update the text but the minus button does not. 2. But if we press FloatingActionButton then the State is refreshed . 3. The minus button...
Not able to pip install pickle in python 3.6
I am trying to run the following code: ``` import bs4 as bs import pickle import requests import lxml def save_sp500_tickers(): resp = requests.get("https://en.wikipedia.org/wiki/List_of_S%26P_50...
- Modified
- 22 Jan at 05:49
Bootstrap responsive sidebar menu to top navbar
So I've been searching and searching for guidance in this with no avail. Basically, I just want to have a sidebar, but when the screen gets small, aka smartphones screen size, it transforms into a na...
- Modified
- 10 Aug at 11:15