Xamarin essentials geolocation is not working, GetLocationAsync breaks out of try

So I want to get the users location and reverse geocode it to get the address plus street number. Therefore I installed the package Xamarin.Essentials which is in pre-release. I wanted to use the geo...

What is the purpose of : public static DateTime ToDateTime(DateTime value) in the .NET Framework?

I am maintaining an existing project, and I found this line of code: ``` Datetime someDate = ....; var anotherDateTime = Convert.ToDateTime(someDate); ``` At first, I expected that `someDate` is co...

17 Oct at 12:31

Download .xls file using Angular: Unexpected token P in JSON at position 0 at JSON.parse (<anonymous>)

I have the following server method for returning an `byte[]` for an `xls` document stored in `Azure Blob Storage`. ``` [FunctionName("ReadBatchFile")] public async static Task<HttpResponseMes...

17 Oct at 08:31

.NET Web API: Set a different Refresh Token Expiration time for different users

I'm using Identity Server 3 to authenticate and generate Access/Refresh tokens for my angular Client. I'm currently setting the Refresh Token to expire in 48 hours for my Angular Client. Some users ...

17 Oct at 00:56

Self Hosted Maximum URL length

While self hosting an application derived from AppSelfHostBase, I'm running into an issue where I get an invalid url error if the parameter list gets too long. Is there a config setting that is causi...

16 Oct at 21:32

SecurityTokenInvalidAudienceException: IDX10214: Audience validation failed

I'm developing an ASP.NET Core 2 app using Identity and Sustainsys.Saml2 (for SAML auth). I've made the necessary configurations in the Startup.cs file. Now when I run the project and try to login usi...

16 Oct at 20:51

Parameter 0 of constructor in required a bean of type 'java.lang.String' that could not be found

I am working on spring batch with spring boot 2.X application, actually its existing code i am checked out from git. While running the application it fails due to below error only for me and same code...

Using string interpolation, how to pad with a given character?

I know I'm in danger here, but couldn't find in SO/Google: Using string interpolation, how do I pad with a given character? for instance: ``` foreach (var p in people) { Console.WriteLine($"{p.Nam...

1 Apr at 20:19

Why does casting from byte to sbyte give a wrong value for optimized code?

The problem can be reproduced with the following code sample, having NUnit 3 installed. ``` [TestFixture] public class SByteFixture { [Test] public void Test() { var data = new by...

17 Oct at 02:24

IFormFile always return null in asp.net core 2.1

Here's how I upload file my Api action : ``` [HttpPost] public async Task<BaseListResponse<MediaStorageModel>> MediaBrand(IFormFile file, int brandId) { var files = new List<IFormFile>(); fil...

How to generate UUID in Angular

## How do I generate a UUID in Angular? I tried the packages [https://www.npmjs.com/package/uuid-generator-ts](https://www.npmjs.com/package/uuid-generator-ts) and [https://www.npmjs.com/package/@t...

14 Dec at 16:56

Your project does not reference ".NETFramework,Version=v4.6.2" framework. Add a reference to ".NETFramework,Version=v4.6.2" in the "TargetFrameworks"

I can't run my unit tests. I have the next error: > Your project does not reference ".NETFramework,Version=v4.6.2" framework. Add a reference to ".NETFramework,Version=v4.6.2" in the "TargetFram...

VSTS Build Pipeline: Test fails connecting to Azure Key Vault

I am trying to use VSTS (now Azure DevOps) to do a CI/CD pipeline. For my build pipeline, I have a very basic setup involving doing a restore, build, test, and publish steps. For my test step, I hav...

git push --force-with-lease vs. --force

I am trying to understand the difference between ``` git push --force ``` and ``` git push --force-with-lease ``` My guess is that the latter only pushes to the remote ?

7 Dec at 19:15

Cannot apply indexing with [] to an expression of type IConfiguration

I have been trying to fix this problem, but nothing comes to mind anymore... Web application to use Tokens, but something keeps me back. ``` var key = new SymmetricSecurityKey(Encoding.UTF8.GetBytes(...

15 Oct at 19:8

Why would one ever use the "in" parameter modifier in C#?

So, I (think I) understand what the `in` parameter modifier does. But what it does appears to be quite redundant. Usually, I'd think that the only reason to use a `ref` would be to modify the calling...

15 Oct at 16:17

Bogus.Faker: How to pick a random enum value

I'm using c# to create random test data for my unit tests. I want to know how to easily pick a ? Any suggestions?

15 Oct at 15:0

Python pip raising NewConnectionError while installing libraries

I've Python 3 running in a linux server. I need to install some libraries (obviously) so I'm trying : ``` pip3 install numpy ``` Which, is resulting in the following error: ``` Collecting numpy ...

15 Oct at 11:47

Service Stack (4.5.0) Swagger UI

I have added the swagger feature plugin to an existing service stack API, which enables swagger UI and renders the end points for the developers to try out. I need to modify the swagger UI and for th...

15 Oct at 08:47

Return Dictionary with Object Value in OrmLite

Is it possible in ServiceStack OrmLite to return a key-value dictionary with a value that's an object (class or anonymous type)? For example: ``` var q = db.From<Customers>() .Select(c => ...

15 Oct at 06:34

Visual Studio Code debugger doesn't stop at breakpoints

[https://github.com/discord-bot-tutorial/Community-Discord-BOT](https://github.com/discord-bot-tutorial/Community-Discord-BOT) The c# debugger for vscode doesn't stop at breakpoints with this specifi...

How do I use Visual Studio Code to develop Unity3D projects in Ubuntu

I have KDE neon (based on Ubuntu 18.04). I have installed the latest Linux version of Unity3D [from this link](https://forum.unity.com/threads/unity-on-linux-release-notes-and-known-issues.350256/page...

15 Oct at 05:12

Why don't non-capturing expression trees that are initialized using lambda expressions get cached?

Consider the following class: ``` class Program { static void Test() { TestDelegate<string, int>(s => s.Length); TestExpressionTree<string, int>(s => s.Length); } st...

IntelliJ: Error: java: release version 10 not supported

In IntelliJ, I'm getting this strange error message when I try to build from the build menu > Error: java: release version 10 not supported I don't understand this, since in , I have these settings se...

C# FormattableString concatenation for multiline interpolation

In C#7, I'm trying to use a multiline interpolated string for use with [FormttableString.Invariant](https://learn.microsoft.com/en-us/dotnet/api/system.formattablestring.invariant?view=netframework-4....