ImportError: 'No module named plotly.plotly' in LinuxMint17.3

Whenever I am trying to compile the following code to get a line graph shows some errors. But I don't know how to fix it. Here is my [code](https://plot.ly/python/line-charts/) : ``` import plotly.pl...

21 Dec at 21:32

How to stop self-referencing loop in .Net Core Web API?

I'm having some issues which I'm guessing are related to self-referencing using .NET Core Web API and Entity Framework Core. My Web API starting choking when I added .Includes for some navigation pro...

29 Nov at 07:48

How to escape curly-brackets in f-strings?

I have a string in which I would like curly-brackets, but also take advantage of the f-strings feature. Is there some syntax that works for this? Here are two ways it does not work. I would like to in...

No non-OData HTTP route registered

I followed [this](https://learn.microsoft.com/en-US/azure/app-service-web/web-sites-dotnet-rest-service-aspnet-api-sql-database) tutorial to create a WebAPI REST service. After that, I could load the...

28 Feb at 22:16

Force locale with Asp.Net Core

I'm having some odd issues with a web application written using Asp.Net Core 1.1, using the full .Net Framework v4.6.2. I want to force the application to use a swedish locale (sv-SE). This is workin...

How to configure AutoMapper with generic types

I am trying to implement propertywise version tracking in my entities. Using the schema of `TrackedProperty` for my trackable properties; ``` public class PropertyVersion<TValue, TVersion> { publ...

28 Feb at 19:57

FileProvider - IllegalArgumentException: Failed to find configured root

I'm trying to take a picture with camera, but I'm getting the following error: ``` FATAL EXCEPTION: main Process: com.example.marek.myapplication, PID: 6747 java.lang.IllegalArgumentException: Failed...

23 Oct at 09:39

Pass a List to a params parameter

Is there was a way to pass a `List` as an argument to a `params` parameter? Suppose I have a method like this: ``` void Foo(params int[] numbers) { // ... } ``` This way I can call it by passin...

28 Feb at 17:59

How to set time with date in momentjs

Does provide any option to set time with particular time ? ``` var date = "2017-03-13"; var time = "18:00"; var timeAndDate = moment(date).startOf(time); console.log(timeAndDate); ``` ``` <script ...

How to use APNs Auth Key (.p8 file) in C#?

I'm trying to send push notifications to iOS devices, using token-based authentication. As required, I generated an APNs Auth Key in Apple's Dev Portal, and downloaded it (it's a file with p8 extensi...

28 Feb at 16:44

Error CS0234 when building solution using TFS 2017 BuildAgent

I ran into the following probem, when trying to build using a TFS build definition. When executing a Build the agent logs following errors: > Error CS0234: The type or namespace name 'VisualStudio' do...

20 Jun at 09:12

ServiceStack AutoQuery Send Filter's Manually

We are trying to use the JsonServiceClient to manually construct autoquery requests. The code is pretty simple for most operations but I don't see how filters are applied: ``` var client = new JsonS...

Run Asynchronous tasks in Batch

I am running one stored procedure asynchronously (I need to run the same SP around 150 times) like this:- Which one is better in terms of performance? This is just an example for demonstration purpose...

Is it possible to extend the 'using' block in C#?

Is there a way to extend the `using` block in C# in such a way that takes a delegate as a second parameter alongside an IDisposable object and executes every time when an exception is thrown inside th...

28 Feb at 18:29

AutoMapper 5.2 how to configure

What is the correct way to configure AutoMapper for global use. I want to set it once and then used though out the app. i have a strong feeling this is wrong. in fact i know this is wrong as this ca...

28 Feb at 12:30

Update specific field in mongodb document

I using C# driver to use MongoDb in small projects, and now I stuck with updating documents. trying to figure out how to update the field (int) here is my code: ``` IMongoCollection<Student> studen...

28 Feb at 11:32

How to return custom message if Authorize fails in WebAPI

In my WebAPI project, I have number of apis which are decorated with `[Authorize]` attribute. ``` [Authorize] public HttpResponseMessage GetCustomers() { //my api } ``` In case user doesn't hav...

servicestack .netcore cannot resolve package

I am trying to open a .net core solution with servicestack dependencies, and for every servicestack dependency I am getting the message "The dependency ServiceStack.Core>=1.0.* could not be resolved"....

28 Feb at 09:17

ServiceStack Javascript/Typescript client and CORS

According to the documentation, I believe this is the only line required to enable CORS: `Plugins.Add(new CorsFeature());` Then from a different website: ``` var client = new JsonServiceClient('htt...

28 Feb at 02:43

How to debug Angular with VSCode?

How do I get configure Angular and VSCode so that my breakpoints work?

Migrate html helpers to ASP.NET Core

I'm converting a project to ASP.NET Core. I need to migrate lots of reusable html helpers, but html helpers do not exist in Core. Some are complex, some simple. Here's a extremely simple example: ``...

standard_init_linux.go:178: exec user process caused "exec format error"

docker started throwing this error: > standard_init_linux.go:178: exec user process caused "exec format error" whenever I run a specific docker container with CMD or ENTRYPOINT, with no regard to an...

27 Feb at 20:8

How do I use string interpolation with string literals?

I'm trying to do something like ``` string heading = $"Weight in {imperial?"lbs":"kg"}" ``` Is this doable somehow?

27 Feb at 18:46

Show Only Summary Section of BenchmarkDotNet

I'm benchmarking some .net framework stuffs, I'm using .net framework, C# and [BenchmarkDotNet](https://github.com/dotnet/BenchmarkDotNet) What I want to do is; I'm writing a lot of benchmark tests a...

27 Feb at 18:1

Set Hangfire succeeded job expiry attribute not working

I am using Hangfire to do jobs, and I'd like to change the behaviour that succeeded jobs are deleted from the database after a day - I'd like them to be stored for a year. Following the instructions i...

23 May at 12:29