Covariance and contravariance on Tasks
Given the followin snippet, i quite dont understand what im going to achieve is not possible: Interface: ``` public interface IEntityRepository<out T> : IRepository<IEntity> { void RequeryData...
- Modified
- 1 Jul at 07:52
asp.net core 1.0 web api use camelcase
On `RC2` the same code returns json format with camel case. After netcore 1.0 release i started new project and the same code is returning json in lowercase. [](https://i.stack.imgur.com/vjPkQ.png) ...
- Modified
- 5 Dec at 08:50
bypass invalid SSL certificate in .net core
I am working on a project that needs to connect to an https site. Every time I connect, my code throws exception because the certificate of that site comes from untrusted site. Is there a way to bypa...
- Modified
- 10 Aug at 04:19
AddTransient, AddScoped and AddSingleton Services Differences
I want to implement [dependency injection](https://en.wikipedia.org/wiki/Dependency_injection) (DI) in ASP.NET Core. So after adding this code to `ConfigureServices` method, both ways work. What is th...
- Modified
- 8 Jun at 00:10
How to use multiple WITH statements in one PostgreSQL query?
I would like to "declare" what are effectively multiple TEMP tables using the WITH statement. The query I am trying to execute is along the lines of: ``` WITH table_1 AS ( SELECT GENERATE_SERIES('20...
- Modified
- 1 Jul at 04:7
Set the IHostingEnvironment in unit test
I am currently upgrading a project from .NET Core RC1 to the new RTM 1.0 version. In RC1, there was a `IApplicationEnvironment` which was replaced with `IHostingEnvironment` in version 1.0 In RC1 I c...
- Modified
- 17 Jul at 16:15
Visual Studio 2015 Update 3 Offline Installer (ISO)
After digging around for Visual Studio IDE 2015 update 3 offline installer, aka ISO file, I found it and I am sharing the url. And, I know this may be posted elsewhere. But I also do know that many p...
- Modified
- 15 Mar at 11:29
How to resolve AttributeError: 'DataFrame' object has no attribute
I know that this kind of question was asked before and I've checked all the answers and I have tried several times to find a solution but in vain. In fact I call a Dataframe using Pandas. I've upload...
ImportError: No module named 'encodings'
I recently reinstalled ubuntu and did upgrade to 16.04 and cannot use python: ``` $ python manage.py runserver Could not find platform independent libraries <prefix> Could not find platform dependent ...
- Modified
- 14 Apr at 09:0
Angular 2 router.navigate
I'm trying to navigate to a route in Angular 2 with a mix of route and query parameters. Here is an example route where the route is the last part of the path: ``` { path: ':foo/:bar/:baz/page', co...
- Modified
- 24 Nov at 15:4
ServiceStack AutoQuery and [Authenticate] Attribute
I'd like to enforce authentication on some auto querys. ``` [Authenticate] public class BusinessEntitiesService : QueryDb<DataModel.dbo.BusinessEntity> { } ``` Here's my issue. The above class is i...
- Modified
- 30 Jun at 18:17
EF Migration object already exists error
I am working on an ASP.NET MVC project with Entity Framework with code first from database. I get the models for each table in the database. I made some changes in the models, enabled migrations and w...
- Modified
- 30 Jun at 17:1
Empty setter vs no setter in properties
What is the difference between this two property implementations? ``` public override string A { get { return "s"; } set { } } public override string A { get { return "s"; } } ```
- Modified
- 1 Jul at 00:1
What is the story of Performance Counters for .NET Core?
Under Windows, one is able to read .NET performance counters using the following: - - `PerformanceCounter`- Considering the recent release of .NET Core and the fact that such app can also run in Li...
Does C# store arrays larger than 512 longs (4096 bytes) differently?
I did some benchmarks with collection types implemented in the .NET Framework. From the Reference Source I know that `List<T>` uses an array to store contents. To avoid resizing the array with every ...
- Modified
- 1 Jul at 08:23
Some Excel Files not moving from Shared Path to SQL Server
We have an application where the data in Excel file (present in shared path) moves to Database. In case of any error, the files moves to error folder by writing the error in a log file.It uses a windo...
- Modified
- 25 Mar at 21:13
How can we destroy child objects in edit mode(Unity3d)?
It is kind of strange things, but if you'll try to destroy child objects with `DestroyImmediate` function, then you will have unpredictabe result. In my case Unity did not destroyed all childs, but di...
- Modified
- 5 May at 14:16
How to make nullable list of int
I have this string: ``` string alertsId = "1,2,3,4"; ``` Then I convert the string to list of ints: ``` List<int> list = alertsId.Split(',').Select(n => Convert.ToInt32(n)).ToList(); ``` How ca...
TokenValidationParameters no longer working after upgrade to 5.0.0
I have the following code which was working when I was using ``` private static void ConfigureAzureAD(IAppBuilder appBuilder) { appBuilder.UseWindowsAzureActiveDirectoryBearerAuthentication( ...
- Modified
- 30 Jun at 10:2
send bold & italic text on telegram bot with html
I've created a bot in telegram I want to send bold and italic text with HTML page to bot My HTML code is: ``` <html> <head><title>Telegram</title></head> <body> <form method="GET" action="https...
- Modified
- 21 Oct at 14:18
async/await throws NullReferenceException how can we diagnose where we messed it up?
we have started using async/await in asp.net application, now we are getting the famous exception in our production > An unhandled exception occurred and the process was terminated.Application ID: /L...
- Modified
- 30 Jun at 09:31
What is the original type of interpolated string?
MSDN [docs](https://msdn.microsoft.com/en-us/library/dn961160.aspx) contain the section about implicit conversions: ``` var s = $"hello, {name}"; System.IFormattable s = $"Hello, {name}"; System.Form...
- Modified
- 23 Jul at 23:37
Can’t delete docker image with dependent child images
I am trying ``` docker rmi c565603bc87f ``` Error: > Error response from daemon: conflict: unable to delete c565603bc87f (cannot be forced) - image has dependent child images So i can't delete ...
- Modified
- 6 Mar at 20:48
Why System.Array class implements IList but does not provide Add()
This code: ``` int[] myArr = { 1, 2 }; myArr.Add(3); ``` throws the following error on Build: > error CS1061: 'System.Array' does not contain a definition for 'Add' and no extension method 'Add' acce...
- Modified
- 27 Jul at 17:49
What is the best way to return different types of ResponseEntity in Spring-Boot (Error Handling for REST with Spring)
I have written simple REST application in `Spring Boot` (`Spring` Framework). It returns `ResponseEntity<Success>` as response in the controller level. But I want to return a completely different re...
- Modified
- 28 Dec at 04:41