ServiceStack - how to make file upload mandatory in POST method

My service has POST method for uploading image file. I am using multipart/form-data request and access to file from Request.Files of Service class as it is recommended in documentation. ``` public cl...

puppeteer: how to wait until an element is visible?

I would like to know if I can tell puppeteer to wait until an element is displayed. ``` const inputValidate = await page.$('input[value=validate]'); await inputValidate.click() // I want to d...

Exception CallbackOnCollectedDelegate when creating tensorflow graph

I try to build a little tensorflow application with TensorFlowSharp and sometimes I recieve this exception: > Managed Debugging Assistant 'CallbackOnCollectedDelegate' For the function I tried to...

Angular 4 Form Validators - minLength & maxLength does not work on field type number

I am trying to develop a contact form, I want user to enter phone number values between length 10-12. Notably same validation is working on field, Its only field which is giving me trouble. [I fou...

SerializationException: Could not find type 'System.Collections.Generic.List`1 in c# unity3d

I am trying to serialize and deserialize an object in c# unity3d. For that I am using the below code. But I am getting an error mentioned below. > SerializationException: Could not find type 'Syst...

Expandable table rows in angular 4 with angular material

How would you make rows expandable in angular material tables? One requirement is that I need to be using the [angular material table](https://material.angular.io/components/table/overview). I would a...

26 Apr at 17:36

Restart container within pod

I have a pod `test-1495806908-xn5jn` with 2 containers. I'd like to restart one of them called `container-test`. Is it possible to restart a single container within a pod and how? If not, how do I res...

5 Aug at 15:54

Display/Print one column from a DataFrame of Series in Pandas

I created the following Series and DataFrame: ``` import pandas as pd Series_1 = pd.Series({'Name': 'Adam','Item': 'Sweet','Cost': 1}) Series_2 = pd.Series({'Name': 'Bob','Item': 'Candy','Cost': 2})...

8 Feb at 21:21

Travis-CI build failure "The type or namespace name 'Extensions' does not exist in the namespace"

Still new to Travis-CI and wanted to see if it's something I'm doing or not. I'm getting a build error in Travis-CI, but not locally. Sample .NET Core 2.0 app. Going through the build I receive the f...

8 Sep at 19:46

JSON Date and DateTime serialisation in c# & newtonsoft

We are sending JSON to an API defined by swagger that some properties are DateTime in the format yyyy-MM-ddThh:mm:ss.000Z (the milliseconds must be 3 digits or it fails validation at the endpoint) and...

8 Sep at 21:21

RequireNonce is true (default) but validationContext.Nonce is null

I have an app running in azure using Azure active directory. Some of the users have just reported getting this error trying to access the app. I can access it ok, so can many other users, its only c...

8 Sep at 14:16

Ignore duplicates when pushing nuget package to nuget.org from VSTS

I got a build in VSTS that are triggered on every commit in the repository. Everything works great with one exception. We do not release a new version of the nuget package on every commit. So our nug...

Execute SQL command in Entity Framework Core 2.0 to delete all data in a table

I want to execute an SQL command from Entity Framework Core 2.0, but I can't figure out how to do so. 1.- The reason why I need to, is that I want to delete all data from a database table, and using ...

ModuleNotFoundError: No module named 'sklearn'

I want to import sklearn but there is no module apparently: ``` ModuleNotFoundError: No module named 'sklearn' ``` I am using Anaconda and `Python 3.6.1`; I have checked everywhere but still can't ...

ASP.NET Core 2, jQuery POST data null

I use `jQuery` and send data with the `POST` method. But in the server method the values are not coming. What could be the error? ``` $.ajax({ type: "POST", contentType: "application/json; ...

8 Sep at 10:21

Split the string and join all first elements then second element and so on in c#

I have a string like this - ``` var roleDetails = "09A880C2-8732-408C-BA09-4AD6F0A65CE9^Z:WB:SELECT_DOWNLOAD:0000^Product Delivery - Download^1,24B11B23-1669-403F-A24D-74CE72DFD42A^Z:WB:TRAINING_SUB...

8 Sep at 12:5

Token has expired

``` Token has expired at ServiceStack.Auth.JwtAuthProviderReader.AssertJwtPayloadIsValid(JsonObject jwtPayload) at ServiceStack.Auth.JwtAuthProviderReader.CreateSessionFromPayload(IRequest req, Js...

8 Sep at 08:37

asp.net core 2 razor pages route with id

There are two page one is and the other is which is combined data of some entities In edit page : after edit done and I posted the data to API as below ``` public async Task<IActionResult> OnPostAsy...

7 Dec at 14:18

Use .net core DLL in Framework 4.6 project

I have built a DLL in .net core 2.0 and I now want to use it in a WinForms-project using the .net 4.6.1-framework. I can reference the dll but I get a "System.IO.FileLoadException" which says that "S...

8 Sep at 06:14

C# double.TryParse with InvariantCulture returns unexpected result

I'm trying to unit test a getprice method using NUnit. I am stuck with parsing the rawprice into double. My cultureinfo is `en-US` but I set it to `de-DE` for this test. Double parsing with numberstyl...

14 Sep at 09:5

Delay function in C#

I need to understand how can I create delays between a set of commands. My background is with C (DOS) and now reviving the concepts using C# in Visual Studio 2015. This is the code I am struggling wit...

6 May at 20:43

ServiceStack.Redis Sentinel simple setup, "No Redis Sentinels were available"

There are other questions similar to this but I wanted to boil this down to the bare bones. I am running a `.NET` application (`C#`) and am trying to connect to and monitor a group of `redis` servers...

7 Sep at 22:56

ASP.Net Core 2.0: Creating UrlHelper without request

I'm working on creating a UrlHelper for a background worker to create callback urls, which means it's not part of a normal request where I could just ask for it through DI. In ASP.Net 5 I could just ...

what is the best way to do versioning in service stack microservices

I am using service stack with .net core, the service stack docs [here](http://docs.servicestack.net/versioning) say to implement IHasVersion but how we can route request coming for two different versi...

ServiceStack OrmLite with Ms Access Database First Approach

I am relatively new to servicestack. I have searched enough but couldn't find any answer. I have worked with sql database first approach with t4 templates which worked fine. But my scenario has been c...