'dotnet build' specify main method

I am using `dotnet` to build a .NET Core C# project from the command line. The project has multiple classes with a `main` method. Thus I get the error: ``` $ dotnet build Microsoft (R) Build Engine v...

15 Jun at 23:59

Spark difference between reduceByKey vs. groupByKey vs. aggregateByKey vs. combineByKey

Can anyone explain the difference between `reducebykey`, `groupbykey`, `aggregatebykey` and `combinebykey`? I have read the documents regarding this, but couldn't understand the exact differences. An ...

20 Sep at 11:15

JSON.NET is throwing 'additional text found in JSON string after finishing deserializing object."

I have a Javascript control that returns JSON string as an AJAX to the server. But when I try to save, Newtonsoft is throwing the exception > Additional text found in JSON string after finishing dese...

12 Apr at 08:16

Uncaught (in promise) SyntaxError: Unexpected end of JSON input

I am trying to send a new push subscription to my server but am encountering an error "Uncaught (in promise) SyntaxError: Unexpected end of JSON input" and the console says it's in my index page at li...

12 Apr at 07:38

Visual Studio Code open tab in new window

I am trying to open a tab in a new window in Visual Studio Code so I can move it to another screen. If I drag the tab the other screen, a file is created. Is there a shortcut to open a tab in a new Vi...

22 Mar at 07:27

How to push JSON object in to array using javascript

I am trying to fetch the JSON data from an url.It is in the form of object i have to push the object data into array. ``` var my_json; $.getJSON("https://api.thingspeak.com/channels/"+did+"/feeds.jso...

12 Apr at 06:26

How can I throw an exception in an ASP.NET Core WebAPI controller that returns an object?

In Framework WebAPI 2, I have a controller that looks like this: ``` [Route("create-license/{licenseKey}")] public async Task<LicenseDetails> CreateLicenseAsync(string licenseKey, CreateLicenseReques...

12 Apr at 23:50

How do I send a specific json to this service stack request

How do I implement the method call to generate this request in `ServiceStack`? ``` [Route("/publishmanifest", "POST")] public class PublishManifest: List<string>, IReturn<bool> {} To accept requests ...

12 Apr at 05:12

cordova Android requirements failed: "Could not find an installed version of Gradle"

I'm trying to build a Cordova Android project using the most recent tools. I followed the instructions [here](https://cordova.apache.org/docs/en/latest/guide/cli/): ``` $ cordova create myApp com.myC...

8 Jun at 20:1

Create Local SQL Server database

I've used SQL Server Management Studio before, but only when the server is already up and running. I need to start from the beginning and create my own instance on the local computer. The instructio...

11 Apr at 21:0

How to structure data validation in .net Core web API?

I have a asp.net Core web API with the following structure: ``` View Layer: API endpoints | V Controller Layer: Controller classes implementing endpoints | V Business Logic Layer: Ser...

11 Apr at 20:44

How to switch Python versions in Terminal?

My Mac came with Python 2.7 installed by default, but I'd like to use Python 3.6.1 instead. How can I change the Python version used in Terminal (on Mac OS)? Please explain clearly and .

11 Apr at 19:11

How to dynamically load assemblies in dotnet core

I'm building a web application, where I would like separate concerns, i.e. having abstractions and implementations in different projects. To achieve this, I've tried to implement a composition root c...

23 May at 11:54

React router changes url but not view

I am having trouble changing the view in react with routing. I only want to show a list of users, and clicking on each user should navigate to a details page. Here is the router: ``` import React fro...

12 Jun at 18:21

Activating Anaconda Environment in VsCode

I have Anaconda working on my system and VsCode working, but how do I get VsCode to activate a specific environment when running my python script?

11 Apr at 16:33

How to call a function after delay in Kotlin?

As the title, is there any way to call a function after delay (1 second for example) in `Kotlin`?

11 Apr at 14:33

What is the difference between Subject and BehaviorSubject?

I'm not clear on the difference between a `Subject` and a `BehaviorSubject`. Is it just that a `BehaviorSubject` has the `getValue()` function?

Reflection: How do I find and invoke a local functon in C# 7.0?

I have a private static generic method I want to call using reflection, but really I want to 'bundle' it inside of another method. C# 7.0 supports local functions so this is definitely possible. You ...

Reading response headers with Fetch API

I'm in a Google Chrome extension with permissions for `"*://*/*"` and I'm trying to make the switch from XMLHttpRequest to the [Fetch API](https://developers.google.com/web/updates/2015/03/introductio...

11 Apr at 11:37

Passthrough Authentication in ServiceStack

I have two ServiceStack servers X and Y. Server X has functionality to register and authenticate users. It has RegistrationFeature,CredentialsAuthProvider, MemoryCacheClient and MongoDbAuthRepository ...

11 Apr at 11:19

Binding image source dynamically on xamarin forms

my question is, could I Binding string image to image source ? I have multiple image and the image will change on if condition. So: Xaml on Xamarin forms: ``` <Image Source="{Binding someImage}" As...

how to iterate over tuple items

How to iterate over items in a Tuple, when I dont know at compile-time what are the types the tuple is composed of? I just need an IEnumerable of objects (for serialization). ``` private static IEnum...

11 Apr at 08:56

Linq extending Expressions

I'm trying to write a generic wildcard Search for the ServiceStack.OrmLite.SqlExpressionVisitor that has the following signature: ``` public static SqlExpressionVisitor<T> WhereWildcardSearch<T> (thi...

Why does AD3AD08 represent a valid date in the .NET framework?

``` DateTime.Parse("AD3AD08") [2017-08-03 12:00:00 AM] ``` Why does that string (which looks like just a normal hex string to me) get parsed successfully as a date? I can see the 3 and the 8 get pa...

11 Apr at 07:51

Typescript : Property does not exist on type 'object'

I have the follow setup and when I loop through using `for...of` and get an error of : > Property "country" doesn't exist on type "object". Is this a correct way to loop through each object in array a...

11 Nov at 08:0