Convert anonymous type to new C# 7 tuple type

The new version of C# is there, with the useful new feature Tuple Types: ``` public IQueryable<T> Query<T>(); public (int id, string name) GetSomeInfo() { var obj = Query<SomeType>() .Se...

Add a package with a local package file in 'dotnet'

Using the `dotnet` command line tool, how can I add a reference to an existing local package that is downloaded with NuGet? I have tried adding a local package to a project `bar` with `dotnet`: ``` d...

27 Jul at 19:37

ServiceStack OrmLite SqlList<object>

I have a request that takes a stored procedure name with a list of parameters. It could be any SP so the result could be a list of anything and that is why I use `SqlList<object>`. When I use ``` r...

14 Apr at 04:9

Json.net deserialization is returning an empty object

I'm using the code below for serialization. ``` var json = JsonConvert.SerializeObject(new { summary = summary }); ``` `summary` is a custom object of type `SplunkDataModel`: ``` public class Splu...

14 Apr at 02:23

Command line connection string for EF core database update

Using ASP.NET Core and EF Core, I am trying to apply migrations to the database. However, the login in the connection string in `appsettings.json` that the app will use has only CRUD access, because o...

Accessing session outside of Service creates duplicate

In my request filter I'm setting some properties in a custom session which I later access from the service. This works as expected. Request Filter: ``` public sealed class CustomAttribute:RequestFi...

13 Apr at 16:58

Pass Array into ASP.NET Core Route Query String

I want to do [this](https://stackoverflow.com/questions/6941967/how-do-i-route-a-url-with-a-querystring-in-asp-net-mvc), but I want to also be able to pass in arrays into the query string. I've tried ...

9 Feb at 19:58

What does the "ng-reflect-*" attribute do in Angular2/4?

Here I have a complex data structure in an Angular4 application. It is a directed multigraph parametrized with dictionaries both on nodes and on links. My angular components are working on this compl...

25 Apr at 12:56

How do I fix a "Vue packages version mismatch" error on Laravel Spark v4.0.9?

When I run `npm run dev` on a Laravel Spark v4.0.9 app, I get the following error: ``` Module build failed: Error: Vue packages version mismatch: - vue@2.0.8 - vue-template-compiler@2.2.6 This may...

13 Apr at 16:47

DbUpdateException: Which field is causing "String or binary data would be truncated"

I am getting a `DbUpdateException` with message > String or binary data would be truncated I understand that one of the fields in the entity won't fit the length of the column in the database. And ...

Angular 2: How to access an HTTP response body?

I wrote the following code in Angular 2: ``` this.http.request('http://thecatapi.com/api/images/get?format=html&results_per_page=10'). subscribe((res: Response) => { console.log(res); ...

How can I use Microsoft.Net.Compilers at solution level?

I want to start using [Microsoft.Net.Compilers](https://www.nuget.org/packages/Microsoft.Net.Compilers/) to simplify work with our build server. However, I could only get it to work at a [per-project ...

23 May at 12:34

if else function in pandas dataframe

I'm trying to apply an if condition over a dataframe, but I'm missing something (error: The truth value of a Series is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all().) ``` raw_data = ...

13 Apr at 11:52

Sourcetree change password of existing account

I use Sourcetree to pull and push to a server over ssh. Sourcetree has remembered the password but the password has changed. I cannot find how to inform Sourcetree of the new password. Based on Google...

27 Jul at 01:40

Return null value in ServiceStack json

In case when object is null, service stack returns ``` {} ``` But I want to return null value, how I can achieve this? My serialization code: ``` public override Task WriteToStreamAsync(Type typ...

13 Apr at 10:18

Check postgres replication status

Can someone suggest the steps to check pgsql replication status and how to identify if the replication is not happening properly? We use streaming replication with pgsql9.0 and pgsql9.4

17 Oct at 13:45

Bootstrap change navbar color

In Bootstrap 4, how do I go about changing the background color of a navbar? The code from twbscolor doesn't work. I want to make the background color a different color and the font color white. ``` <...

30 Mar at 13:35

Version for package `Microsoft.EntityFrameworkCore.Tools.DotNet` could not be resolved

I am deploying a new .NET Core application to my server. I'm trying to run the EntityFramework migration, as the project was created using the "code-first" method. The command to be run is > dotnet ...

29 Feb at 07:11

ExpressionChangedAfterItHasBeenCheckedError Explained

Please explain to me why I keep getting this error: `ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked.` Obviously, I only get it in dev mode, it doesn't happen...

bootstrap 4 row height

I try to have something like this with bootstrap 4[](https://i.stack.imgur.com/sF9pd.jpg) with equal size in the height of green rows and red row ``` <link href="https://cdnjs.cloudflare.com/ajax/li...

20 Dec at 14:50

Xamarin.Forms.Maps 2.3.4 custom MapRenderer disables everything

My problem occurs after I updated Xamarin.Forms and Xamarin.Forms.Maps to the new version (2.3.4). After that I also updated all google play services in Android project (and a lot of libraries that I...

12 Apr at 16:28

Assembly Binding redirect: How and Why?

This is not a problem question but a general understanding question on assembly binding redirect's working. 1. Why binding redirect shows only major version and not minor, build and revision numbe...

12 Apr at 09:41

'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