Submitting multiple files to ASP.NET controller accepting an ICollection<IFormFile>

In my ASP.NET Core backend, I have a controller function that looks like this: ``` [HttpPost] [Route("documents/upload")] public async Task<IActionResult> UploadFile(ICollection<IFormFile> files) { ...

Authentication: JWT usage vs session

What is the advantage of using JWTs over sessions in situations like authentication? Is it used as a standalone approach or is it used in the session?

3 Dec at 18:32

jenkins pipeline: multiline shell commands with pipe

I am trying to create a Jenkins pipeline where I need to execute multiple shell commands and use the result of one command in the next command or so. I found that wrapping the commands in a pair of th...

17 Apr at 13:19

Unexpected Error Occurred ServiceStack Redis Client

Am getting an error while manipulating Hashes with Servicestack pooled redisClientsManager. here is how i have registered the IOC ``` private static IRedisClientsManager redisClientsManager; redisCl...

Setting up Swagger (ASP.NET Core) using the Authorization headers (Bearer)

I have a Web API (ASP.NET Core) and I am trying to adjust the swagger to make the calls from it. The calls must contains the Authorization header and I am using Bearer authentication. The calls from t...

17 Apr at 08:11

false-positive: Fix this implementation of IDisposable to conform to the dispose pattern

My class implements `IDisposable` and follows the pattern where ``` public void Dispose() { Dispose(true); GC.SuppressFinalize(this); } ``` But sonar is still telling me I need to implemen...

17 Apr at 11:16

How to scroll to an element?

I have a chat widget that pulls up an array of messages every time I scroll up. The problem I am facing now is the slider stays fixed at the top when messages load. I want it to focus on the last inde...

17 May at 05:14

Angular 2 Cannot find control with unspecified name attribute on formArrays

I am trying to iterate over a formArray in my component but I get the following error `Error: Cannot find control with unspecified name attribute` Here is what the logic looks like on my class file...

12 Nov at 11:38

PDO::__construct(): Server sent charset (255) unknown to the client. Please, report to the developers

I'm trying to connect to a MySQL database from Symfony 3 application. But when trying to create MySQL schema from a Symfony console command I get this error: `PDO::__construct(): Server sent charset (...

2 Mar at 19:8

Use RabbitMQ to replace service layer

I am developing an application using C#/.NET having 2 parts: a WPF client and a Windows service. Each of these parts are currently working independently, but I now want to connect them together as a ...

How to execute a MDX query of SQL Analysis Server in C#

I want to execute a SQL Analysis Query in C#. I have successfully connected to Analysis database using the below code: Server DM_Server = new Server(); Database AS_Database = new Database(); DM_...

6 May at 07:22

Is it safe to publish Domain Event before persisting the Aggregate?

In many different projects I have seen 2 different approaches of raising Domain Events. 1. Raise Domain Event directly from aggregate. For example imagine you have Customer aggregate and here is a ...

16 Apr at 11:5

Using bound interface in F#

I am trying to use C# library in F# so it would be very much specific case. I using [Servicestack](http://servicestack.net) with F#. Now, I am trying to wire up class with interface using method ```...

17 Apr at 22:18

Stuck at ".android/repositories.cfg could not be loaded."

``` brew cask install android-sdk ``` > ==> Caveats We will install android-sdk-tools, platform-tools, and build-tools for you. You can control android sdk packages via the sdkmanager command. You...

16 Apr at 03:57

Async/Await Class Constructor

At the moment, I'm attempting to use `async/await` within a class constructor function. This is so that I can get a custom `e-mail` tag for an Electron project I'm working on. ``` customElements.def...

15 Apr at 21:41

C# TCP/IP simple chat with multiple-clients

I'm learning c# socket programming. So, I decided to make a TCP chat, the basic idea is that A client send data to the server, then the server broadcast it for all the clients online (in this case all...

4 Jan at 17:35

React native ERROR Packager can't listen on port 8081

When I run command `react-native start`, it shows `Packager can't listen on port 8081`. I know the issue is about software using my port 8081 . I use Resource Monitor to see the port, but I can't f...

30 Oct at 18:9

Display rows with one or more NaN values in pandas dataframe

I have a dataframe in which some rows contain missing values. ``` In [31]: df.head() Out[31]: alpha1 alpha2 gamma1 gamma2 chi2min filename ...

7 May at 09:50

How to unit test with ILogger in ASP.NET Core

This is my controller: ``` public class BlogController : Controller { private IDAO<Blog> _blogDAO; private readonly ILogger<BlogController> _logger; public BlogController(ILogger<BlogCon...

Should I call ConfigureAwait(false) on every awaited operation

I read this article [https://blog.stephencleary.com/2012/07/dont-block-on-async-code.html](https://blog.stephencleary.com/2012/07/dont-block-on-async-code.html) - however I'm seeing a contradiction: ...

16 Apr at 05:42

How to use HttpClient to send content in body of GET request?

Currently to send a parameterized GET request to an API interface I am writing the following code: ``` api/master/city/filter?cityid=1&citycode='ny' ``` But I see that there is a limit on the URL l...

5 Aug at 16:30

how to install tensorflow on anaconda python 3.6

I installed the new version python 3.6 with the anaconda package. However i am not able to install tensorflow. Always receive the error that tensorflow_gpu-1.0.0rc2-cp35-cp35m-win_amd64.whl is not a...

Polly timeout policy clarification

I am trying to get the timeout policy to work correctly. I have the following requirements while integrating an api. 1. Create an http request to invoke endpoint1 and pass the transactionID and captu...

29 Jul at 19:19

csproj copy files depending on operating system

I am using .NET Core to build a cross platform class library. Depending on the operating system that the C# .NET Core project is built for using a .csproj file, I need to copy a native library to the ...

14 Apr at 13:5

How to install package from github repo in Yarn

When I use `npm install fancyapps/fancybox#v2.6.1 --save`, so fancybox package at v2.6.1 tag will be installed. This behavior is described in [docs](https://docs.npmjs.com/cli/install) I want to ask, ...

17 Aug at 13:42