How to fill a dictionary with all request headers
Im able to get request headers one by one when I have the header key name with this method ``` private string GetHeader(string Name) { IEnumerable<string> headerValues; if (Request.Headers.Tr...
- Modified
- 16 Sep at 07:17
Visual Studio Code: How to show line endings
How can I display lineendings (CR,LF) in Visual Studio Code (not in Visual Studio)? At the moment there is only the little statusbar menu which display/change the line ending if the actual file. But s...
- Modified
- 29 Oct at 14:58
Change the speed of animation at runtime in unity c#
The default speed of animation in unity is . I set the default speed value of animation to . And during runtime of program, I want the speed of animation to . ``` using UnityEngine; using System.Co...
Xcode error: Code signing is required for product type 'Application' in SDK 'iOS 10.0'
I have Xcode 8 installed on OS X El Capitan. I get this error: > Signing for "target" requires a development team. Select a development team in the project editor.Code signing is required for product ...
- Modified
- 20 Jun at 09:12
How to get the current CPU/RAM/Disk usage in a C# web application using .NET CORE?
I am currently looking for a way to get the current CPU/RAM/Disk usage in a C# web application using .NET CORE. For CPU and ram usage, I use PerformanceCounter Class from `System.Diagnostics`. This is...
- Modified
- 27 Dec at 03:36
Why are web apps going crazy with await / async nowadays?
I come from a back end / thick client background, so maybe I'm missing something... but I recently looked at the source for an open source JWT token server and the authors went crazy with await / asyn...
- Modified
- 16 Sep at 00:18
NSPhotoLibraryUsageDescription key must be present in Info.plist to use camera roll
Recently I started to get this error: > NSPhotoLibraryUsageDescription key must be present in Info.plist to use camera roll. I am using React Native to build my app (I am not familiar with ios na...
- Modified
- 18 Nov at 10:42
Make XmlHttpRequest POST using JSON
How can I make an AJAX POST request sending JSON data using vanilla JS. I understand the content-type is url form encoded and it doesn't support nested JSONs. Is there any way I can make such a POST...
- Modified
- 15 Sep at 20:7
userManager.AddToRoleAsync() - Error: role does not exist
I'm creating a user registration system using .NET Core, Identity Core, and MVC Core. I'm able to create users and create roles in the database. Here's the form on the view that lets me select a user...
- Modified
- 21 Sep at 20:19
Using async / await inside .Select lambda
I am using Asp.Net Core Identity and trying to simplify some code that projects a list of users to a ViewModel. This code works, but in trying to simplify it I have gone into a crazy spiral of error...
- Modified
- 23 May at 11:47
Facebook SDK for .NET Core
Up until now I've been using Facebook SDK for .NET by [https://hackerapp.com/](https://hackerapp.com/) I want to upgrade my project to ASP.NET Core, but I see that their library doesn't have support ...
- Modified
- 16 Mar at 09:38
OData Error: The query specified in the URI is not valid. The property cannot be used in the query option
I'm trying to get an OData endpoint up and working and I'm having this error that even Google doesn't have much to say about. I have created an Entity Framework EDMX context (database first), had the...
- Modified
- 20 Sep at 11:44
How to take input as String with spaces in java using scanner
I need to read spaces (present before string and after String) given as input using Scanner Note : if there is no spaces given in input it should not add space in output Please find the below code:...
- Modified
- 17 Sep at 22:42
Bulk create keys in Redis - ServiceStack C#
Is there any way to bulk-create keys (`SETS`) in ""? Of course, without putting `for` loop. There is one command in Redis which does this: [MSET](http://redis.io/commands/mset) but, I couldn't fin...
- Modified
- 16 Sep at 07:6
Get current date in Swift 3?
How can I set label.text current date in Swift 3? I want to print just today to the screen. I did not find how to do that. In c# is very simple: ``` var date = DateTime.Now ``` I need to write 1...
Deploying entity framework code first with production database
I've developed a pretty simple web app using entity framework code first. I realized after hours of frustration that even though localdb is SQL Server Express it is actually not meant to be used with ...
- Modified
- 15 Sep at 14:6
Is there any difference between the Ok() method new ObjectResult()?
Scenario: implementing a standard REST API / GET method on a .net core controller. The [documentation](https://learn.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.mvc.okobjectresult) states that...
- Modified
- 21 Apr at 08:32
Exposing .NET events to COM?
I've been trying to expose and fire an event to a VBA client. So far on the VBA client side, the event is exposed and I see the method event handling method added to my module class however the VBA ev...
Visual Studio 2015 "Find All References" only searches opened files
Recently I have Visual Studio 2015 installed (Microsoft Visual Studio Community 2015 Version 14.0.25425.01 Update 3), opened a simple website with it, and found that the "Find All References" only sea...
- Modified
- 15 Sep at 13:45
Resolving from ServiceStack's IoC container which depends on another registered element
I have a class which should have an instance of a `Service` (to access the database and other services): ``` public class MyFoo : IFoo { public Service Service { get; set; } public MyFoo (Se...
- Modified
- 15 Sep at 10:11
Is the "when" keyword in a try catch block the same as an if statement?
In C# 6.0 the "when" keyword was introduced, now you're able to filter an exception in a catch block. But isn't this the same as a if statement inside a catch block? if so, isn't it just syntactic sug...
ServiceStack MQ (version > 4.0.54) GlobalMessageResponseFilters are not invoked
Problem: GlobalMessageResponseFilters are not invoked for MQ server. ServiceStack version > v4.0.54. According to [documentation](https://github.com/ServiceStack/ServiceStack/wiki/Request-and-res...
- Modified
- 14 Sep at 21:33
Dynamically changing schema in Entity Framework Core
[here](https://stackoverflow.com/a/50529432/3272018) is the way I solved the problem. Although it's likely to be not the best one, it worked for me. --- I have an issue with working with EF Core...
- Modified
- 14 Jun at 09:19
How can I read headers sent from my API with angular?
I have something similar to the following code on `domain.com`: ``` $http.post("http://api.domain.com/Controller/Method", JSON.stringify(data), { headers: { 'Content-Type'...
- Modified
- 14 Sep at 19:55