react-testing-library why is toBeInTheDocument() not a function
Here is my code for a tooltip that toggles the CSS property `display: block` on MouseOver and on Mouse Out `display: none`. ``` it('should show and hide the message using onMouseOver and onMouseOut ev...
- Modified
- 20 Sep at 21:14
Add custom headers to ViewEngine response pages in ServiceStack
I am using [ServiceStack](https://www.servicestack.com) with [SharpPages](https://sharpscript.net/) to render dynamic content. For "reasons", I need to set the CORS headers `Access-Control-Allow-Orig...
- Modified
- 11 Jun at 16:31
The term 'Connect-AzureAD' is not recognized as the name of a cmdlet
Running powershell script from C# application in Azure AD. Added below DLL reference - - - --- ``` Runspace runspace = RunspaceFactory.CreateRunspace(); runspace.Open(); ...
- Modified
- 11 Jun at 12:27
Schema validation failed with the following errors: Data path ".builders['app-shell']" should have required property 'class'
``` Schema validation failed with the following errors: Data path ".builders['app-shell']" should have required property 'class'. Schema validation failed with the following errors: Data path ".b...
- Modified
- 17 Jun at 20:57
Is it possible to opt-out of dark mode on iOS 13?
A large part of my app consists of web views to provide functionality not yet available through native implementations. The web team has no plans to implement a dark theme for the website. As such, my...
- Modified
- 24 Apr at 15:24
How to fix `Your project does not reference ".NETFramework,Version=v4.6.1" framework...`
I got this error `Your project does not reference ".NETFramework,Version=v4.6.1" framework. Add a reference to ".NETFramework,Version=v4.6.1" in the "TargetFrameworks" property of your project file a...
- Modified
- 26 May at 07:13
Using Servicestack, how do you cache result sets when using AutoQuery with a ServiceSource?
I am trying to use ServiceStack's AutoQuery with a service source, but am either unable to get caching working correctly, or have misunderstood how it is supposed to work. What I am trying to achieve...
- Modified
- 11 Jun at 10:20
Deserialise JSON to C# array, where index is in the property name
Could anyone provide their approach for deserializing the following JSON ``` { "i": 5 "b0": "ABC", "b1": "DEF", "b2": "GHI", "s0": "SABC", "s1": "SDEF", "s2": "SGHI", } ``` into a cla...
- Modified
- 10 Jun at 12:19
How to bypass authentication middleware when not needed in ASP.NET Core
I have the following authentication handler: ``` public class CustomAuthenticationHandler : AuthenticationHandler<CustomAuthenticationSchemeOptions> { public CustomAuthenticationHandler ( ...
- Modified
- 16 Jun at 11:15
How to use C#8 IAsyncEnumerable<T> to async-enumerate tasks run in parallel
If possible I want to create an async-enumerator for tasks launched in parallel. So first to complete is first element of the enumeration, second to finish is second element of the enumeration, etc. I...
- Modified
- 5 May at 12:47
Find all available images for Image(systemName:) in SwiftUI
Where can I find all the system images that are available in the initializer `Image(systemName:)`? I've only been using `"chevron"` and `"star.fill"` so far, as discovered in Apple's SwiftUI tutorial ...
- Modified
- 20 May at 19:15
How to use Bootstrap Carousel in Blazor
newbie in Blazor. Need to try out how to use BS carousel in Blazor. I used below code in the Default Blazor app. But it does not work. What I need to do? Thanks 1. I added this line in the Index....
Unable to find docker image locally
I was following [this post](https://medium.com/@shakyShane/lets-talk-about-docker-artifacts-27454560384f) - the reference code is on [GitHub](https://github.com/shakyShane/cra-docker). I have cloned t...
- Modified
- 9 Jun at 12:54
Creating charts in Blazor
So basically I want to create charts with server-side blazor, I was searching around for some packages which would allow me to create charts. The problem being that they are all pretty expensive: 1....
- Modified
- 8 Jun at 08:25
Web server failed to start. Port 8080 was already in use. Spring Boot microservice
I am trying to call webAPI from gradle project. My build.gradle is as following. ``` plugins { id 'org.springframework.boot' version '2.1.4.RELEASE' id 'java' } apply plugin: 'io.spring.depen...
- Modified
- 12 Oct at 04:9
Activity indicator in SwiftUI
Trying to add a full screen activity indicator in SwiftUI. I can use `.overlay(overlay: )` function in `View` Protocol. With this, I can make any view overlay, but I can't find the iOS default styl...
- Modified
- 14 Sep at 06:24
ASP.NET core it's possible to configure an action in controller only in development mode?
In my ASP.NET core web application, I want to have an action that runs only in development mode. In production mode, maybe a 404 error will be good enough. Is it possible to do that?
- Modified
- 7 Jun at 13:54
Override AutoQuery MaxLimit on specifc endpoint
If a max limit is set for autoquery in startup: ``` Plugins.Add(new AutoQueryFeature { MaxLimit = 100 }); ``` Is there anyway to override this on a specific service endpoint where I override autoqu...
- Modified
- 7 Jun at 10:31
Make a VStack fill the width of the screen in SwiftUI
Given this code: ``` import SwiftUI struct ContentView: View { var body: some View { VStack(alignment: .leading) { Text("Title") .font(.title) Text("Content") .line...
c# shorthand for if not null then assign value
Is there any shorthand in c# now that will cutdown the following code: ``` var testVar1 = checkObject(); if (testVar1 != null) { testVar2 = testVar1; } ``` In this situation only want to assi...
- Modified
- 6 Jun at 22:13
How do I avoid 'Function components cannot be given refs' when using react-router-dom?
I have the following (using Material UI).... ``` import React from "react"; import { NavLink } from "react-router-dom"; import Tabs from "@material-ui/core/Tabs"; import Tab from "@material-ui/core/T...
- Modified
- 6 Jun at 20:28
Access blocked by CORS policy: Response to preflight request doesn't pass access control check
I'm trying to create a user administration API for my web app. When I send an API call from my frontend to my backend, a cors error occurs. How can the cors problem be solved? I've read a lot of threa...
- Modified
- 20 Jun at 09:39
How to fix 'The current thread is not associated with the renderer's synchronization context'?
I am trying to change a string, being used for a title, in my blazor-server-side application. But I am having trouble getting the UI to update. I tried using StateHasChanged(), but that didn't work so...
- Modified
- 27 Sep at 15:45
Windows Service with Service Stack returns "Bad Request" Error
I am trying to create a windows service with service stack. The service runs without problems. But as soon as I send a request I get a bad request error. I tried client.get, client.post and client.s...
- Modified
- 6 Jun at 11:55
Start extremely long running processes through a REST request
I'm working at an automation firm so we create processes for industrial automation. Previously this automation was done on the machine side of things, but we're slowly transitioning to controlling the...
- Modified
- 6 Jun at 08:19