Node.js - SyntaxError: Unexpected token import
I don't understand what is wrong. Node v5.6.0 NPM v3.10.6 The code: ``` function (exports, require, module, __filename, __dirname) { import express from 'express' }; ``` The error: ``` Synta...
- Modified
- 15 Nov at 16:9
NewtonSoft json converter " unterminated String, expected delimiter : "; "
I am trying to parse a json response that I get when calling a rest API. The problem I am facing is that the deserializing doesn't work every time, even though I am making the same request. I don't kn...
ReactJS: How to determine if the application is being viewed on mobile or desktop browser
In ReactJS, is there a way to determine if the website is being viewed on mobile or desktop? Because, depending on which device I would like to render different things. Thank you
- Modified
- 11 Sep at 11:2
Adding Access-Control-Allow-Origin header response in Laravel 5.3 Passport
I'm new to Laravel and am doing some Laravel 5.3 Passport project with OAuth2.0 password grant. When I curl the API with the params it responds with token. However, in browser it needs an additional s...
- Modified
- 2 Feb at 09:44
CUSTOM_ELEMENTS_SCHEMA added to NgModule.schemas still showing Error
I just upgraded from Angular 2 rc4 to rc6 and having troubles doing so. I see the following error on my console: ``` Unhandled Promise rejection: Template parse errors: 'cl-header' is not a known ...
- Modified
- 13 Oct at 16:14
How does nameof work?
I was just wondering how come nameof from C# 6, can access non static property just like if it was static. Here is an example ``` public class TestClass { public string Name { get; set; } } pu...
Akka.net VS Azure Service Fabric
I am learning about Akka.net and have heard about service fabric from Azure. As far as I know, they both are used for building microservices. Apart from the difference in the scaling model, what els...
How can I change the user on Git Bash?
[](https://i.stack.imgur.com/QE5nn.png) I want to sign out an actual user so I can sign in with another user. What I see in Git bash is: ``` MINGW64 ~/Documents/NetBeansProjects/ConstructorJava (m...
- Modified
- 13 Sep at 05:9
sending Null to a List of Objects in a web service
I have a web service as per the below ; ``` [Route("/MyService", Verbs = "POST")] public class MyData { public string GUID { get; set; } public BankDetails BankDetail { get; set; } p...
- Modified
- 9 Sep at 22:31
What is mapDispatchToProps?
I was reading the documentation for the Redux library and it has this example: > In addition to reading the state, container components can dispatch actions. In a similar fashion, you can define a fun...
- Modified
- 29 Jul at 07:1
What is it.isAny and what is it.is in Unit mock testing
There are many questions that have been already asked on this but I think I need something more basic that could clear this concept as I am beginner in TDD. I can't go forward till then. Could you pl...
- Modified
- 13 Sep at 09:26
Manually set operationId to allow multiple operations with the same verb in Swashbuckle
I need to know if it's possible to set up custom operationid, or a naming convention, I mean I know that operation filter can be overwritten the way how operationId is generated [https://azure.micros...
- Modified
- 1 Nov at 14:17
OWIN OpenIdConnect Middleware IDX10311 nonce cannot be validated
I have an application using the OWIN middleware for OpenIdConnect. The startup.cs file uses the standard implementation of app.UseOpenIdConnectAuthentication. The cookie is set to the browser, but i...
- Modified
- 9 Sep at 13:22
What is difference between System.Threading.Tasks.Dataflow and Microsoft.Tpl.Dataflow
There are 2 different official TPL Dataflow nuget package. I am confused to choose which one i should to use. As far as i understand System.Threading.Tasks.Dataflow version is tiny bit newer than ot...
- Modified
- 9 Sep at 13:21
Why the increment of an integer on C# is executed after a function return its value?
Why this two functions return different values? When I call this function passing 0 as parameter it returns 1 ``` public static int IncrementByOne(int number) { return (number + 1); } ``` How...
- Modified
- 11 Sep at 13:21
How to see logs from npm installation?
I am unable to install ionic through npm. Are there any logs that I can check to see what's wrong and if yes, where are they located? What I see is the waiting stick dancing forever. I've waited for ...
- Modified
- 9 Sep at 13:13
Clipping to a Path in WPF
I am attempting to create a user control in WPF that allows the user to select specific regions of a shoe (heel, edge, sole etc) The idea is that you have an image (drawing) of a shoe which you can c...
ADAL .Net Core nuget package does not support UserPasswordCredential
In ADAL.Net 3.x UserPasswordCredential is introduced on top of UserCredential from 2.x. But the same UserPasswordCredential is not exposed in the .Net Core under the same nuget package? UserCredentia...
- Modified
- 9 Sep at 16:19
Add Attachment base64 image in MailMessage and read it in html body
Currently I have to send emails with `MailMessage` and `SmtpClient` but I need to send a picture that is currently in `base64` `string` within the `MailAddress` body. I have understood that it is ne...
- Modified
- 9 Sep at 09:49
How to save plots from multiple python scripts using an interactive C# process command?
I've been trying to save plots(multiple) from different scripts using an interactive C# process command. My aim is to save plots by executing multiple scripts in a single interactive python shell an...
- Modified
- 17 Sep at 10:19
Post files from ASP.NET Core web api to another ASP.NET Core web api
We are building a web application that consist of an Angular2 frontend, a ASP.NET Core web api public backend, and a ASP.NET Core web api private backend. Uploading files from Angular2 to the public ...
- Modified
- 8 Sep at 17:49
Saving a base64 string as an image into a folder on server using C# and Web Api
I am posting a Base64 string via Ajax to my Web Api controller. Code below Code for converting string to Image ``` public static Image Base64ToImage(string base64String) { // Convert base 64 str...
- Modified
- 8 Sep at 15:1
Generic enum as method parameter
Given a constructor ``` public MyObject(int id){ ID = id; } ``` And two enums: ``` public enum MyEnum1{ Something = 1, Anotherthing = 2 } public enum MyEnum2{ Dodo = 1, Mousta...