Filter custom message from Visual Studio 2015 output window
At some point in the last couple of months, a lot of message along the lines of ``` Event 7 was called with 5 argument(s) , but it is defined with 6 paramenter(s). Event 10 was called with 5 argumen...
- Modified
- 23 May at 10:31
Pattern matching equal null vs is null
From Microsoft new-features-in-c-7-0: ``` public void PrintStars(object o) { if (o is null) return; // constant pattern "null" if (!(o is int i)) return; // type pattern "int i" Write...
javascript - check if object is empty
I am trying to create to javascript/jquery test to check if my object is empty and cannot figure it out. Here is the object when it has something in it: ``` {"mergedSellerArray":{"key1114":"1120"}} ...
- Modified
- 15 Mar at 15:19
React.createElement: type is invalid -- expected a string
Trying to get react-router (v4.0.0) and react-hot-loader (3.0.0-beta.6) to play nicely, but getting the following error in the browser console: ``` Warning: React.createElement: type is invalid -- exp...
- Modified
- 18 Jan at 08:0
Automapper in WebAPI Controller
I have a Car WebAPI controller method as below - note _carService.GetCarData returns a collection of CarDataDTO objects ``` [HttpGet] [Route("api/Car/Retrieve/{carManufacturerID}/{year}")] public IEn...
- Modified
- 25 Sep at 14:57
Why doesn't plt.imshow() display the image?
I have this code, copied from a tutorial: ``` import numpy as np np.random.seed(123) from keras.models import Sequential from keras.layers import Dense, Dropout, Activation, Flatten from keras.layers ...
- Modified
- 10 Jan at 02:19
Will Parallel.ForEach process in order with MaxDegreeOfParallelism=1?
Is `Parallel.ForEach()` with `MaxDegreeOfParallelism==1` guaranteed to process the input enumerable in-order? If the answer is "no", is there a way to enforce this behavior?
- Modified
- 16 Feb at 19:31
Compare two objects for properties with different values
I need to create a generic method, which will take two objects (of same type), and return list of properties which have different values. As my requirement is bit different I don't think this as dupli...
- Modified
- 19 Nov at 02:10
CORS: credentials mode is 'include'
Yes, I know what you are thinking - yet another CORS question, but this time I'm stumped. So to start off, the actual error message: > XMLHttpRequest cannot load http://localhost/Foo.API/token. The va...
- Modified
- 7 Jan at 11:38
Visual Studio 2017: Display method references
How can I display the references on top of a method declaration? I looked for it in the Visual Studio properties, but could not find it.
- Modified
- 10 Aug at 11:24
Switch focus between editor and integrated terminal
Does anyone know the keyboard shortcut (Mac and Linux) to switch the focus between editor and integrated terminal in Visual Studio Code?
- Modified
- 19 Mar at 15:52
Get week number in year from date
I am looking for a query which will return the week number from given date. What I've already tried is this: ``` select datepart(wk, '2017-02-01') ``` but this returns 5 instead of 6. (february 1s...
- Modified
- 14 Mar at 19:9
Exec commands on kubernetes pods with root access
I have one pod running with name 'jenkins-app-2843651954-4zqdp'. I want to install few softwares temporarily on this pod. How can I do this? I am trying this- `kubectl exec -it jenkins-app-2843651954...
- Modified
- 14 Mar at 18:3
How to load image (and other assets) in Angular an project?
I'm pretty new to Angular so I'm not sure the best practice to do this. I used angular-cli and `ng new some-project` to generate a new app. In it created an "images" folder in the "assets" folder,...
- Modified
- 15 Jul at 07:50
Request content decompression in ASP.Net Core
I sometimes need to post larger JSON request payloads to my ASP.Net Core Controllers. The size of the payload warrants (at least in my opinion) compressing it. Because ASP.Net Core Controllers do not ...
- Modified
- 14 Mar at 16:58
Owin claims - Add multiple ClaimTypes.Role
I have an application in which users can be assigned the following roles: - - - One user may have assigned two or more roles, eg. both SuperAdmin and User. My application uses claims, and therefor...
- Modified
- 14 Mar at 16:27
Add Servicestack Reference with swiftref
I need to generate dtos with but my API doesn´t has the path like to [http://techstacks.io/types/swift](http://techstacks.io/types/swift). I added the swift server configuration [http://docs.service...
- Modified
- 14 Mar at 16:12
Testing for exceptions in async methods
I'm a bit stuck with this code (this is a sample): ``` public async Task Fail() { await Task.Run(() => { throw new Exception(); }); } [Test] public async Task TestFail() { Action a = async (...
- Modified
- 14 Mar at 15:33
ASP.NET Core Middleware Passing Parameters to Controllers
I am using `ASP.NET Core Web API`, where I have Multiple independent web api projects. Before executing any of the controllers' actions, I have to check if the the logged in user is already impersonat...
- Modified
- 30 Nov at 07:18
How to create a valid, self-signed X509Certificate2 programmatically, not loading from file in .NET Core
What I currently do is that I use OpenSSL to generate PFX file. This is causing an unwanted dependency, especially for Windows users. So I found some examples on how to create your own certificate usi...
- Modified
- 23 Jan at 04:6
Client is unauthorized to retrieve access tokens using this method Gmail API C#
I am getting the following error when i tried to authorize gmail api using service account > "Client is unauthorized to retrieve access tokens using this method" ``` static async Task MainAsync() ...
- Modified
- 22 Apr at 08:38
Docker ERROR: Error processing tar file(exit status 1): unexpected EOF
I needed space and executed: `docker rmi $(docker images -f "dangling=true" -q)` Since then I can't with docker-compose: `docker-compose build`, I get the error: `ERROR: Error processing tar file(exi...
- Modified
- 14 Mar at 11:11
ASP.NET Core custom validation attribute localization
I'm trying to implement localization in a custom validation attribute in asp.net core 1.0. This is my simplified viewmodel: ``` public class EditPasswordViewModel { [Required(ErrorMessage = "OldP...
- Modified
- 8 Jun at 07:20
Azure B2C. Edit custom attribute using Azure Portal
I have created Azure B2C application in Azure Portal. I need to use only sign-in policy for this application(no sign-up). I need to create two kinds of users - `Simple User` and `Admin`. For this purp...
- Modified
- 7 Dec at 16:48
there is no project.json, global.json ... etc on .NET Core Solution with Visual Studio 2017
I make a project by ``` File -> New -> Project -> Visual C# -> Web -> ASP.NET Core Web Application (.NET Core) -> Empty -> OK ``` But there is no solution and src directory and also no project...
- Modified
- 23 Mar at 07:42