How to mock Automapper (IMapper) in controller
I am trying to write a unit test for my existing MVC Web Aplication. In that I am facing some problem in automapper (`IMapper`) Whenever am using map function it returns `null` value. My Controller C...
- Modified
- 6 May at 08:21
How to get the width of a react element
Im trying to create a range input that displays a tooltip right above the slider thumb. I went through some vanilla JS examples online and it seems that I need to have the width of the element to aco...
- Modified
- 21 Nov at 09:41
Python + BeautifulSoup: How to get ‘href’ attribute of ‘a’ element?
I have the following: ``` html = '''<div class=“file-one”> <a href=“/file-one/additional” class=“file-link"> <h3 class=“file-name”>File One</h3> </a> <div class=“location”> ...
- Modified
- 5 May at 22:45
ServiceStack ServerEvents: send event from another process
I have a need to send server-side events from another process which is performed at the time and I have no idea how to do it )) I would be grateful for any help! Thank you in advance! ``` public ov...
- Modified
- 5 May at 21:11
*ngIf else if in template
How would I have multiple cases in an `*ngIf` statement? I'm used to Vue or Angular 1 with having an `if`, `else if`, and `else`, but it seems like Angular 4 only has a `true` (`if`) and `false` (`els...
- Modified
- 20 May at 13:2
ServiceStack Service which has a Stream in its request breaks metadata page
When I create a simple ServiceStack service with a Stream in the request, I find that I am unable to access the metadata page for the service method. The service itself appears to work (I can send a ...
- Modified
- 5 May at 14:38
C# Download big file from Server with less memory consumption
I have a big file of memory size 42 mb. I want to download the file with less memory consumption. Controller Code ``` public ActionResult Download() { var filePath = "file path in server"; Fi...
- Modified
- 11 May at 05:46
How to set combobox default value?
In , It has a , Which have data binded by the DataSource. When going to set the text property for a ComboBox. > Selected ComboBox -> Property -> Text : "--Select--". Design page shows the given t...
Why does negating a value change the result when XORing it with 1?
I know the working of XOR, ``` Console.WriteLine(1^1); // returns 0 ``` results to ``` 00000001 00000001 -------- 00000000 ``` but how does this return 2? ``` Console.WriteLine(-(-1^1)); // ...
- Modified
- 5 May at 10:15
Linker Command failed with exit code 1 (use -v to see invocation), Xcode 8, Swift 3
I can't get rid of this error! [](https://i.stack.imgur.com/JwtrU.png) I have tried all sorts of things like clearing Derived Data(Preferences->Locations->click gray arrow to open Derived Data folde...
- Modified
- 6 Feb at 17:37
Not implemented/supported/invalid operation async method
What is the correct way to mark async method as not implemented/not supported or invalid operation. For the simplicity I would use only `NotImplementedException` in examples, but the question applies ...
- Modified
- 4 May at 21:47
Using decimal values in DataRowAttribute
I've got a c# assembly for Tests to run in Visual Studio 2017 using MSTest.TestAdaptor 1.1.17. I want to use a DataTestMethod to run a test with several datasets. My Problem is, I want to use decimal ...
- Modified
- 5 May at 08:27
What is the idiomatic naming convention for local functions in C# 7
Normal class methods, whether instance or static, have an idiomatic naming convention with regards to their casing. It's not clear that there is a convention for [local functions](https://learn.micros...
- Modified
- 22 Apr at 18:6
Return empty array instead of null
I created `Settings` class which I use to edit my application by `.ini` file. My `Settings.ini` file looks like this: ``` [ACCOUNT] login=xyz password=xyz locations=1,2,5,8 ``` Now I am getting the...
- Modified
- 4 May at 11:40
System.Uri and encoded colon (:)
Before .Net 4.5, it seems that System.Uri would unencode encoded slashes, but this has since been fixed. Reference: [https://stackoverflow.com/a/20733619/188740](https://stackoverflow.com/a/20733619/1...
How to force Flutter to rebuild / redraw all widgets?
Is there a way to force Flutter to redraw all widgets (e.g. after locale change)?
Azure Storage 403 Forbidden exception a 32-bit issue?
We've spent quite some time to locate the reason for the following exception: ``` The remote server returned an error: (403) Forbidden. ``` Stacktrace: ``` at Microsoft.WindowsAzure.Storage.Core.E...
- Modified
- 4 May at 09:27
How to print a specific row of a pandas DataFrame?
I have a massive DataFrame, and I'm getting the error: ``` TypeError: ("Empty 'DataFrame': no numeric data to plot", 'occurred at index 159220') ``` I've already dropped nulls, and checked dtypes for...
- Modified
- 23 Jan at 06:6
adding rows programmatically to grid in WPF window
I have a window with a button and a Grid in this window with rows and columns setup. I'm trying to create a button that when clicked will add another row to the Grid and then assign a user control to ...
How to set php executable path php.validate.executablePath in vscode when php is set inside docker container?
I have a development environment based in docker. Everytime that I open VSCode I get this message: > Cannot validate since no PHP executable is set. Use the setting 'php.validate.executablePath' t...
- Modified
- 21 Sep at 18:18
Entity Framework Core Using multiple DbContexts
I'm having a problem that when I try to access a field in my PartsDbContext I get the following error: > System.Data.SqlClient.SqlException: 'Invalid object name 'fieldName'' It seems that this is ...
- Modified
- 4 May at 08:27
Global Request Filter Async Order of Operations
Where do async global request filters fit in the order of operations as described [here](http://docs.servicestack.net/order-of-operations)? We recently added a global async filter and a request filte...
- Modified
- 3 May at 18:12
Handle null in LINQ sum expression
I am using a LINQ query to find sum of a column and there is a slight chance that the value might be null in few cases The query I am using now is ``` int score = dbContext.domainmaps.Where(p => p...
- Modified
- 5 May at 05:21
c# join string comma delimited, but double quote all values inside
I have a string list ``` new List<string> { "One", "Two", "Three", "Four", "Five", "Six" } ``` And I want to have a string with exact this content (including double quotes) ``` "One", "Two", "Thre...
- Modified
- 3 May at 16:56
Selenium RemoteWebDriver c# - System.InvalidOperationException
I have a sample UI test project using v3.4.0 of Selenium.WebDriver. Everything works fine when I run the tests against a local driver but I want to get things working using Selenium Grid 2. As soon ...
- Modified
- 4 May at 08:42