Why is the scheme required for AuthenticationHeaderValue?
I am setting the authorization header of an `HttpClient` in the following manner: ``` httpClient .DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue(null, "abc"); ``` ...but am...
- Modified
- 4 Jan at 22:5
How to loop an object in React?
New to React and trying to loop Object attributes but React complains about Objects not being valid React children, can someone please give me some advice on how to resolve this problem? I've added cr...
- Modified
- 10 Oct at 20:7
Is using Single as an Assert a bad practice?
I'm testing a method that manipulates a collection. Given a set of parameters it should contain exactly one element that matches a condition. I'm using [Single](https://msdn.microsoft.com/en-us/libr...
- Modified
- 10 Oct at 17:52
React: Passing props to function components
I have a seemingly trivial question about props and function components. Basically, I have a container component which renders a Modal component upon state change which is triggered by user click on a...
- Modified
- 21 Dec at 04:55
What is the purpose of the ContainsPrefix method of the Web API IValueProvider interface?
I've created some implementations of `IValueProvider` for my Web API project and I'm confused about the purpose of the `ContainsPrefix` method on the interface. The `ContainsPrefix` method has this s...
- Modified
- 10 Oct at 19:52
.Net Framework and .Net Core in same solution
I have an application targeting .NET Framework, and now I need to develop a library in .NET Core. I plan to put both projects in the same solution and add the .NET Core library as a reference in the ....
- Modified
- 1 Aug at 03:29
How does the Shouldly assertion library know the expression the assertion was applied to?
The [Shouldly assertion library for .NET](http://shouldly.readthedocs.io/en/latest/) somehow knows what expression the assertion method was called on so it is able to display it into the message. I tr...
Epplus find column using column name
I have excel sheet created dynamically, i would like to format some columns as date however i don't know the index of these columns in advance i only know the header title. 1- I load the excel from D...
ServiceStack TypeSerializer.DeserializeFromString bug with C# nullable types
It seems that there is a bug in the ServiceStack method TypeSerializer.DeserializeFromString regarding nullable types Is this a known issue? Is there a fix or a workaround? Consider the following co...
- Modified
- 10 Oct at 14:6
Gracefully handling corrupted state exceptions
Related to [this question](https://stackoverflow.com/q/39954552/1488067), I would like to force CLR to let my .NET 4.5.2 app catch Corrupted State Exceptions, for the sole purpose of logging them and ...
- Modified
- 23 May at 12:33
Why IsAssignableFrom return false when comparing a nullable against an interface?
The following call in C# returns false : ``` typeof(IComparable).IsAssignableFrom(typeof(DateTime?)) ``` However, the following line is perfectly valid : ``` IComparable comparable = (DateTime?)D...
FluentValidation message for nested properties
I have a class with a complex property: ``` public class A { public B Prop { get; set; } } public class B { public int Id { get; set; } } ``` I've added a validator: ``` public class AVal...
- Modified
- 20 May at 04:1
C# x509 certificate decoder
I'm looking for a C# code how to decode x509 certificate from string like in this page: https://www.sslshopper.com/certificate-decoder.html I have a certificate string, that starts with MII... and end...
- Modified
- 7 May at 07:19
How to completely uninstall Android Studio from windows(v10)?
I have already seen [this](https://stackoverflow.com/questions/17625622/how-to-completely-uninstall-android-studio?noredirect=1&lq=1) question. But that's for Mac OS. I am using windows. Every time I ...
- Modified
- 23 May at 12:10
How to upload an image file in Retrofit 2
I have an image of postman like below. How can I do the same thing in Retrofit 2? [](https://i.stack.imgur.com/QWLb0.png) I've declared the interface like this: ``` @Multipart @POST("/api/Pharmarcy/Up...
Get video dimension in python-opencv
I can get size of image, like this: ``` import cv2 img = cv2.imread('my_image.jpg',0) height, width = img.shape[:2] ``` How about video?
User Authentication in ServiceStack
I did not get the Authentication and Authorization concept in servicestack. I have been watching pluralsight tutorial but still i am not getting the point about how we can authenticate the username an...
- Modified
- 10 Oct at 04:19
More ServiceStack request DTO advice
This is a follow up regarding: [ServiceStack Request DTO design](https://stackoverflow.com/questions/15927475/servicestack-request-dto-design) In the above question the design was strictly regarding...
- Modified
- 23 May at 11:48
How to convert string to ByteString when using protobuf?
I want to convert a string object to ByteString.I have tried to use ByteString.CopyFrom() function to convert,but the return value is always "{Google.ProtocolBuffers.ByteString}".Why? How can I do? ...
- Modified
- 9 Oct at 13:41
C++ error: terminate called after throwing an instance of 'std::bad_alloc'
I wrote the code pasted below to perform the following tasks in the order in which they are stated: 1. Read an input file and count the number of entries in it 2. Create an array of appropriate siz...
- Modified
- 8 Oct at 19:56
ASP.NET Core Identity Add custom user roles on application startup
In an ASP.NET Core application, I want to create certain roles as a basis to manage different user-permissions. Sadly, the documentation inform detailled how to use custom roles e.g. in controllers/ac...
- Modified
- 24 Oct at 11:38
using ServiceStack.Text: determine JSON is Array, Object or String?
using JSON.net I could do this as answered in this [link](https://stackoverflow.com/questions/20620381/determine-if-json-results-is-object-or-array) ``` string content = File.ReadAllText(path); var t...
- Modified
- 23 May at 10:34
No Network Security Config specified, using platform default - Android Log
I am trying to make a database via 000webhost.com. I keep getting this message showing in the event log whenever I run the app from android studio. Does anyone knows how to solve this problem? Much ap...
- Modified
- 19 Aug at 06:13
Should I use virtual, override, or both keywords?
In the last weeks something is bugging my brain about `virtual` and `override`. I've learned that when you do inheritance with virtual function you have to add `virtual` to let the compiler know to se...
Sending Email to SpecifiedPickupDirectory with MailKit
I was using SmtpClient till now with ASP.NET MVC 5. For testing email send functionality on local system, I was using `client.DeliveryMethod = SmtpDeliveryMethod.SpecifiedPickupDirectory;` Now, I wan...
- Modified
- 8 Oct at 07:58