Adding backward compatibility support for an older JSON structure
I have developed an app for android which stores a serialized domain model in a JSON file to the local storage. Now the thing is, sometimes I make changes to the domain model (new features) and want t...
How to test a className with the Jest and React testing library
I am totally new to JavaScript testing and am working in a new codebase. I would like to write a test that is checking for a className on the element. I am working with Jest and [React Testing Library...
- Modified
- 29 Jan at 14:21
Getting apt-get on an alpine container
I have to install a few dependencies on my docker container, I want to use python:3.6-alpine version to have it as light as possible, but apk package manager which comes with alpine is giving me troub...
- Modified
- 20 Nov at 09:19
Relation between List<> and IEnumerable<> open type
Is there any relationship between the open types `List<>` and `IEnumerable<>`? Example: ``` var type1 = typeof(List<>); var type2 = typeof(IEnumerable<>); //return false type2.IsAssignableFrom(type...
How to return a Json from a .Net Core Web API?
This is a basic question. I am new to ASP.Net Core so I created a .Net Core Web API project using the template in Visual Studio and I would like to know how to return a Json string from the Get() func...
- Modified
- 6 May at 20:37
Running python script on C# and getting output continuously
I'm trying to run a python script from C# and I want to get the output line by line and not at the end. I feel like I'm missing something important, but don't know what. This is what I have so far: An...
- Modified
- 7 May at 07:11
CORS error when adding Azure AD authentication
Trying to add Azure AD authentication to an Angular 7 webapp with a .net core 2.1 backend. However, I get the CORS error during the request. "Access to XMLHttpRequest at '[https://login.microsoftonl...
- Modified
- 22 Sep at 14:28
Why is the Java 11 base Docker image so large? (openjdk:11-jre-slim)
Java 11 is announced to be the most recent LTS version. So, we're trying to start new services based on this Java version. However, the base Docker image for Java 11 is much larger than the equivalen...
- Modified
- 18 Jan at 13:15
Puppeteer Sharp: avoid downloading Chromium (bundle Chromium locally)
I'm using `Puppeteer Sharp` in my .NET application to do some webpage automation tasks. However, I have to deploy my app in an environment that only has intranet access, which means Puppeteer's `Brows...
- Modified
- 10 Feb at 13:51
ServiceStack.SSE: How do I get an instance o IServerEvents?
I have the SSE plugin running in ServiceStack, and it works to access for example `/event-stream` etc. Now, let's assume there are subscribers, but otherwise no action from outside. Suddenly, the ser...
- Modified
- 30 Apr at 01:27
Where to store files for Azure function?
I have files that I reference from inside by C# code such as: How do I reference this file from within an Azure Function? Perhaps I can simply embed this resource in the project?
- Modified
- 16 May at 18:34
Could not start Windows Service, Error 1064
I wrote a Windows Service to run on Win10, and it worked perfectly fine until I decided to change it a bit. I rewrote some logic, tested it in both Debug and Release configurations, and everything was...
- Modified
- 5 Mar at 17:26
Access ASP.NET Core 2.1 web app hosted on localhost from mobile device
I create an out of the box asp.net core 2.1 web app with react. When I run it, it hosts on localhost:(some port). I want to access that on my mobile device. I tried accessing it from localhost by addi...
- Modified
- 26 May at 05:34
The specified framework 'Microsoft.NETCore.App', version '2.1' was not found
I am developing an Angular 6 application in dotNet Core 2.1. Everything is working flawlessly, until I got to setting up EFCore. All my models are defined and context created. Running `dotnet ef migra...
- Modified
- 18 Nov at 10:33
Incorrect syntax near 'OFFSET'. Invalid usage of the option NEXT in the FETCH statement "in Entity Framework core"
Here's my code: ``` var result = dbContext.Specialty.OrderByDescending(u => u.IdS) .Skip(20) .Take(10) .AsEnumerable(); ``` : >
- Modified
- 17 Nov at 11:19
Python3 Determine if two dictionaries are equal
This seems trivial, but I cannot find a built-in or simple way to determine if two dictionaries are equal. What I want is: ``` a = {'foo': 1, 'bar': 2} b = {'foo': 1, 'bar': 2} c = {'bar': 2, 'foo':...
- Modified
- 17 Mar at 12:20
How can I run a foreach loop in the immediate window of visual studio?
I am trying to write values to a file using the `Immediate Window` in Visual Studio 2017. I've got a variable called `_myItems` which is of type `Dictionary<int, Dictionary<int, List<int>>>`. I did ...
- Modified
- 21 Nov at 08:51
Does ServiceStack Cache Internal Requests?
If I use the .ToOptimizedResult (documented [here](https://docs.servicestack.net/caching)) from a "bare" request like so: ``` var svc = new MyService(); var svcResul = svc.Any(new requestDTO() {..});...
- Modified
- 16 Nov at 11:35
ServiceStack trying to bind private fields classes generated via service reference instead of public properties
There is a remote service which I'm trying to get to send me messages via http POST requests using SOAP. I generated the service DTOs using the integrated in visual studio option "Add service referenc...
- Modified
- 16 Nov at 10:44
.NET Core X509Certificate2 usage (under Windows/IIS, Docker, Linux)
I am really trying a long time to use certificates in .NET Core API. Basically where I need to use them is in a .NET Core web api running on IIS and docker. Certificates I need to use are for: [Mic...
- Modified
- 30 Nov at 07:7
React Hook Warnings for async function in useEffect: useEffect function must return a cleanup function or nothing
I was trying the `useEffect` example something like below: ``` useEffect(async () => { try { const response = await fetch(`https://www.reddit.com/r/${subreddit}.json`); const json ...
- Modified
- 30 Sep at 23:5
Blazor, ASP.NET Core Hosted vs Server Side in ASP.NET Core
I am trying my hands on blazor.Net which is an experimental framework. I already developed a small project in this Framework and its awesome. But after recent update in Blazor Language Service on 14 N...
- Modified
- 23 Feb at 05:41
This version of Android Studio cannot open this project, please retry with Android Studio 3.4 or newer
This version of Android Studio cannot open this project, please retry with Android Studio 3.4 or newer. but my android studio version is 3.2.1 and there is no new update from Google
- Modified
- 16 Nov at 04:28
ValueTuple naming conventions
When naming a ValueTuple element, should they be capitalized or not? ``` (string Name, int Index) rec; ``` or ``` (string name, int index) rec; ``` It seems the convention is PascalCase See: [htt...
- Modified
- 5 Feb at 22:38
.NET Core 2.2 Can't be Selected In Visual Studio Build Framework
Previously, I was able to select the .NET Core 2.2 Framework in the properties section of the .NET Core project, but after the latest visual studio updates I haven't been able to. [](https://i.stack...
- Modified
- 15 Nov at 23:27