Questions

SyntaxError: import declarations may only appear at top level of a module

I am trying to use a plugin called "Simplebar" found on GitHub, [GitHub SimpleBar](https://github.com/Grsmto/simplebar) but after downloading the scripts and looking at the simple.js script, it looks ...

11 Dec at 15:5

Handling backpressure in Rx.NET without onBackpressureLatest

I need to implement the following algorithm in Rx.NET: 1. Take latest item from stream, or wait for a new item without blocking, if there are no new items. Only the latest item matters, others can b...

Injecting DI service on a extension method

I'm trying to get the `IStringLocalizer` service instance inside a extension method, is it possible? Any suggestions on how should I inject it? My goal here is to translate a type using its name as c...

HttpClient - This instance has already started

I'm getting this exception using http client in my api. > An unhandled exception has occurred while executing the request. System.InvalidOperationException: This instance has already started one or...

16 Feb at 14:11

.NET Core - Web API - How to do File Upload?

I am not able to figure out, how to write a .NET Core Web API to support File Upload. Please note I am not using ASP.NET Core MVC form for file upload but via a Servlet/JSP container. Here is how my ...

Unit testing internal methods in VS2017 .NET Standard library

I am currently playing around with the latest Visual Studio 2017 Release Candidate by creating a .NET Standard 1.6 library. I am using xUnit to unit test my code and was wondering if you can still tes...

Angular 2: Iterate over reactive form controls

I would like to `markAsDirty` all the controls inside of a `FormGroup`.

14 Feb at 20:1

Kotlin - Idiomatic way to check array contains value

What's an idiomatic way to check if an array of strings contains a value in Kotlin? Just like ruby's `#include?`. I thought about: ``` array.filter { it == "value" }.any() ``` Is there a better way? ...

6 Nov at 11:12

Class Diagrams in VS 2017

I have been using VS 2015 and like the Class Diagram item. I recently upgraded to 2017 and can't seem to find the Class Diagram item. Anyone know how I get to it?

25 Mar at 12:4

Getting a Cannot await void, on a method that I have want to await on

I'm on a team writing a WPF app. We have to make it so that when a user hides/shows different columns that it will reflect that in a ReportViewer control on one of the views. In testing we've found th...

5 May at 14:15

How can I rename a conda environment?

I have a conda environment named `old_name`, how can I change its name to `new_name` without breaking references?

29 Mar at 07:21

How to access Properties of a class from a Generic Method - C#

I have a three class which is having following properties ``` Class A { public int CustID { get; set; } public string Name{ get; set; } } Class B { public int CustID { get; set; } pu...

3 Apr at 13:12

Asyncio.gather vs asyncio.wait

[asyncio.gather](https://docs.python.org/3/library/asyncio-task.html#asyncio.gather) and [asyncio.wait](https://docs.python.org/3/library/asyncio-task.html#asyncio.wait) seem to have similar uses: I h...

Single Sign On using ASP.NET Identity between 2 ASP.NET MVC projects

I have 2 web applications that both share the same main level domain as mentioned below so I can share cookies. Web.conifg in both the projects have same machine key and validation key. Since, I want ...

How to Send SMS on Xamarin.Forms

I am developing project, iOS, Android and Windows Phone. My app ask the user to enter text Message and Phone number then on submit, I need to send SMS to the phone number. I prefer to have a single...

How to plot an array in python?

I follow this links [How to append many numpy files into one numpy file in python](https://stackoverflow.com/questions/42204368/how-to-append-many-numpy-files-into-one-numpy-file-in-python/42209244?no...

23 May at 11:46

Plt.Scatter: How to add title and xlabel and ylabel

Is there a way to add title (and xlabel and ylabel) to plt.scatter(x,y,...) or plt.plot(x,y,...) directly without writing additional lines? It is easy to add it when we use Series_name.plot in which...

14 Feb at 11:42

How to get an instance of IServiceProvider in .NET Core?

`IServiceProvider` is an interface with single method: ``` object GetService(Type serviceType); ``` It's used to create instances of types registered in .NET Core native DI container. An instance ...

Can I use Task.Delay as a timer?

I want to execute some code on each second. The code I am using now is: > Task.Run((Action)ExecuteSomething); And `ExecuteSomething()` is defined as below: ``` private void ExecuteSomething() ...

Installation failed with message Invalid File

> Installation failed with message Invalid File: K:\project\app\build\intermediates\split-apk\with_ImageProcessor\debug\slices\slice_0.apk. It is possible that this issue is resolved by uninstalli...

14 Feb at 06:59

Dockerfile CMD instruction will exit the container just after running it

I want to setup some configuration when my container starts, for this I am using shell scripts. But my container will exits as soon as my scripts ends, I have tried with -d flag / detached mode but It...

21 Jun at 07:59

Chrome violation : [Violation] Handler took 83ms of runtime

I'm trying to implement the Facebook's logout functionality in my project. Login works just fine. But I'm facing the getting the following message in JavaScript console with the logout code. > [Viola...

Tomcat: java.lang.IllegalArgumentException: Invalid character found in method name. HTTP method names must be tokens

I am getting below stack trace when I am deploying my application in a multi-server Apache Tomcat 8 environment. I am getting this error frequently, and it seems it is blocking the tomcat thread: ``` ...

14 Oct at 09:11

How do I add an existing Solution to GitHub from Visual Studio 2017?

I want to add my existing solution to Github and I've watched lots of youtube videos. But all of them only showed me about creating new projects. How can I add the existing project on Github? There is...

14 Feb at 04:24

Data binding in React

What I want to do is when I type some text in an input field, it should appear in another place realtime. Below is my input; ``` <div className="post_input"> <input className='post_data_input_ov...

18 Apr at 00:47