Questions

Overloading in local methods and lambda

``` static void Main() { void TestLocal() => TestLocal("arg"); TestLocal("arg"); } static void TestLocal(string argument) { } ``` In this example, local function has the same name as another met...

6 Feb at 08:51

How Decompress Gzipped Http Get Response in c#

Want to Decompress a Response which is GZipped Getting from an API.Tried the Below Code ,It Always return Like:- ``` \u001f�\b\0\0\0\0\0\0\0�Y]o........ ``` My code is: ``` private string GetRespo...

2 Feb at 09:28

How to combine first name, middle name and last name in SQL server

you can refer the below queries to get the same- # 1 ``` select FirstName +' '+ MiddleName +' ' + Lastname as Name from TableName. ``` # 2 ``` select CONCAT(FirstName , ' ' , MiddleName , ' ' ,...

20 Jun at 09:12

Unable to convert List<List<int>> to return type IList<IList<int>>

For level order traversal why does this exception occur? Following exception occurs: > Cannot implicitly convert type '`System.Collections.Generic.List<System.Collections.Generic.List<int>>`' to '`Sy...

While debugging I get this when using Watch: Internal error in the C# compiler

I've been working along very happily in an app in VS2017. Debugging just fine. Then, all of a sudden... When I am debugging and try to hover over a variable, I don't get the normal popup with detail...

SimpleI Injector - Register multiple database connections

I'm working with an existing Web Api that uses Simple Injector to register a single database connection. I need to make an endpoint to get info from a different db but I don't know how to register a n...

How to get Class name that is calling my method?

I want to write my own logger. This is my logger manager: ``` public static class LoggerManager { public static void Error(string name) { } } ``` I am calling `Error(string name);` me...

1 Feb at 21:51

Codable class does not conform to protocol Decodable

Why am I getting a "Type 'Bookmark' does not conform to protocol 'Decodable'" error message? ``` class Bookmark: Codable { weak var publication: Publication? var indexPath: [Int] var locatio...

1 Feb at 17:28

docker.sock permission denied

When I try to run simple docker commands like: ``` $ docker ps -a ``` I get an error message: > Got permission denied ... /var/run/docker.sock: connect: permission denied When I check permissions...

1 Feb at 17:7

Select from multiple tables in one call

In my code I have a page that includes information from 3 different tables. To show this information I make 3 SQL select calls and unite them in one list to pass as Model to my view. Can I do it with ...

Unit testing an AuthorizeAttribute on an ASP.NET Core MVC API controller

I have a ASP.NET Core MVC API with controllers that need to be unit tested. ``` using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; using System.Threading.Tasks; namespace T...

Lock duration significance on azure service bus topic subscriptions

I have been looking at lockdurations and renewlock mechanisms for service bus queue and topics. However it is not clear about what exactly does lock duration mean for topic subscriptions. For example...

Microsoft.Extensions.Caching.Redis select different database than db0

a question on understanding which redis database is used and how it can be configured. i have a default and a default configured local (containing 15 databases) [](https://i.stack.imgur.com/43x3n....

1 Feb at 05:50

PCF and servicestack

Our company is using Pivotal Cloud Foundry and currently we are using WebApi for our endpoints. I have used serviceStack in the past (although it has been a few years ago) and wanted to know if anyon...

5 Feb at 09:11

How can I execute a python script from an html button?

I have a number of python scripts that I have saved on my computer, out of curiosity I have created a html file that just has one button. Instead on going into the terminal and running `python <path t...

21 Feb at 17:7

Failed linking file resources

``` package com.example.daksh.timetable; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.View; import android.widget.Button; import android.widget.Ima...

API is returning error when using RESTSHARP

When use RestSharp to call an API I get this error: > The underlying connection was closed: An unexpected error occurred on a send. I've verified that my client ID, secret, username, and password ...

31 Jan at 18:47

OrmLite LocalDate to DateTime Converter Not Being Applied On Where Clause For SqlLite In-Memory Db

[Referenced Code](https://gist.github.com/WardenUnleashed/ca25d2ae44d9c8c3c33731e5c8ae5cad) Make `ValuationsCommanderTests.SetTransactionAndRelatedEmbeddedDerivativevaluationsToBad_ValidInput_Corre...

ServiceStack client send OPTION instead of Get or post

I am trying to configure servicestack CorsPlugin with typescript JsonServiceClient. Client side code looks like: ``` const client = new JsonServiceClient( 'http://localhost:5000' ); client.pa...

31 Jan at 17:26

What is linux equivalent of "host.docker.internal"

On Mac and Windows it is possible to use `host.docker.internal` (Docker 18.03+) inside container. Is there one for Linux that will work out of the box without passing env variables or extracting it us...

How to add Document with Custom ID to firestore

Is there any chance to add a document to firestore collection with custom generated id, not the id generated by firestore engine?

How to use Swagger Codegen with .net core

I am able to integrate the Swagge UI in my web api using Swashbuckle. I also want to explore the swagger codegen feature. Can somebody help in - how I can integrate swagger codegen into my web api pro...

1 Feb at 05:25

Authentication using ServiceStack 4.5.14

I'm working off of the SocialBootstrap API example (using ServiceStack 4.5.14) and trying to get authentication to work. Registration works fine, the user account get's created in the DB without any p...

30 Jan at 23:42

ServiceStack logging and SSE in a single interface?

So, our project has recently started using Server Sent Events in ServiceStack. Our projects also log with log4net, using the log4net provider. Now that I've gotten through a couple of components usi...

30 Jan at 19:27

IHttpHandler versus HttpTaskAsyncHandler performance

We have a webapp that routes many requests through a .NET IHttpHandler (called proxy.ashx) for CORS and security purposes. Some resources load fast, others load slow based on the large amount of compu...