Convert Promise to Observable

I am trying to wrap my head around observables. I love the way observables solve development and readability issues. As I read, benefits are immense. Observables on HTTP and collections seem to be s...

How to implement a method of a base class for every possible combination of its derived types

I have the following Shape interface which is implemented by multiple other classes such as Rectangle, Circle, Triangle ... ``` interface IShape{ bool IsColliding(IShape other); } ``` The metho...

4 Sep at 14:20

How to use the increment operator in React

Why when I am doing `this.setState({count:this.state.count*2})` it is working, but when I am doing: `this.setState({count:this.state.count++})` it is not working? Why, and how to fix it? Full code:...

10 Aug at 02:49

T4 alternative in .NET Core?

> a T4 text template is a mixture of text blocks and control logic that can generate a text file. T4 templating is not natively supported in .Net Core. Can anyone suggest to me T4 alternative in .NET ...

18 Sep at 14:2

How do I correctly filter my DataSet by GUID using OData?

`DataSet` I'm exposing an OData endpoint, and trying to navigate to the URL: > `http://localhost:5001/mystuf/api/v2/AccountSet?$filter=AccountId%20eq%20guid%2703a0a47b-e3a2-e311-9402-00155d104c22%27...

Visual Studio 2015 diagnostic tools no longer working

I have Visual Studio 2015 Community Edition Update 3 running on Windows 7 SP1 64 bit, which I use to develop C# applications. I love the diagnostic tools during debugging to spot performance problems...

23 May at 12:26

C# ssl/tls with socket tcp

I am new in C# development. I am trying to use ssl/tls over tcp but in my code, system.net.sockets.socket (bare socket) is used not tcpclient or tcplistner. I have searched over net atleast 200 links ...

3 Sep at 23:4

How to save new record with hashed password in my custom table instead of aspnet user?

I am using asp.net identity to create new user but getting error: > Cannot insert the value NULL into column 'Id', table 'Mydb.dbo.AspNetUsers'; column does not allow nulls. INSERT fails.\r\nThe ...

Dynamic reference in a .net core app targeting net standard 1.6?

I'm trying to use a `dynamic` variable in a C# .net core app that's targeting .net standard 1.6. (platform? library? framework? meta-framework?) I first encountered this problem in a real application...

27 Sep at 16:23

How to set iOS status bar background color in React Native?

Is there a single place in the react native iOS native code that I could modify to set iOS statusbar backgroundColor? RCTRootView.m ? The [react native StatusBar component](https://facebook.github.io...

2 Sep at 21:9

In which case does TaskCompletionSource.SetResult() run the continuation synchronously?

Initially I thought that all continuations are executed on the threadpool (given a default synchronization context). This however doesn't seem to be the case when I use a `TaskCompletionSource`. My c...

How to check if an environment variable exists and get its value?

I am writing a shell script. In this shell script, I am have a variable that either takes a default value, or the value of an environment variable. However, the environment variable doesn't have to be...

11 Jul at 20:30

Curious slowness of EF vs SQL

In a heavily multi-threaded scenario, I have problems with a particular EF query. It's generally cheap and fast: ``` Context.MyEntity .Any(se => se.SameEntity.Field == someValue && se....

C# VisualStudio project rebuild giving /platform:anycpu32bitpreferred can only be used with /t:exe, /t:winexe and /t:appcontainerexe

I have a windows application and using cheetah for config transformations i.e app.config.debug, app.config.test, etc., When the project is built in debug mode , it works fine but when teamcity change...

2 Sep at 15:30

angular 2 how to return data from subscribe

This is What I Want To Do. ``` @Component({ selector: "data", template: "<h1>{{ getData() }}</h1>" }) export class DataComponent{ this.http.get(path).subscribe({ res => return res; ...

How to remove or hide Toolbar item in specific page error: System.IndexOutOfRangeException: Index was outside the bounds of the array

I am trying to `Remove()` or `Clear()` `ToolbarItems`. Here is my code where I am creating `ToolbarItem` in MainPage.cs ``` public partial class MainPage : MasterDetailPage { public ToolbarItem c...

npm ERR! Error: EPERM: operation not permitted, rename

When I execute `npm install` I get this error > npm ERR! Error: EPERM: operation not permitted, rename C:\projects******\node_modules\react-async-script' -> 'C:\projects*******\node_modules.react-as...

11 Mar at 10:5

Keep-Alive appears in HTTP header on Debian/Mono - not on Windows

I've been tasked with setting up a based C# application on . The application is compiled with and I've installed (using mono's Debian repository). The application starts up fine (under it's own u...

How to concatenate multiple column values into a single column in Pandas dataframe

This question is same to [this posted](https://stackoverflow.com/questions/11858472/pandas-combine-string-and-int-columns) earlier. I want to concatenate three columns instead of concatenating two col...

8 Jul at 07:44

Elasticsearch : Root mapping definition has unsupported parameters index : not_analyzed

Hi all I am trying to create schema Test. ``` PUT /test { "mappings": { "field1": { "type": "integer" }, "field2": { "type": "integer" }...

20 Jul at 23:7

Detect previous path in react router?

I am using react router. I want to detect the previous page (within the same app) from where I am coming from. I have the router in my context. But, I don't see any properties like "previous path" or ...

2 Sep at 09:25

Enable raw SQL logging in Entity Framework Core

How do I enable the logging of DbCommand raw SQL queries? I have added the following code to my Startup.cs file, but do not see any log entries from the Entity Framework Core. ``` void ConfigureServ...

2 Sep at 01:9

Object.hasOwnProperty() yields the ESLint 'no-prototype-builtins' error: how to fix?

I am using the following logic to get the i18n string of the given key. ``` export function i18n(key) { if (entries.hasOwnProperty(key)) { return entries[key]; } else if (typeof (Canadarm) !=...

28 Mar at 01:58

Class Not Found: Empty Test Suite in IntelliJ

I'm just starting the computer science program at my college, and I'm having some issues with IntelliJ. When I try to run unit tests, I get the message ``` Process finished with exit code 1 Class not...

21 Sep at 14:28

How can I alias a default import in JavaScript?

Using ES6 modules, I know I can alias a named import: ``` import { foo as bar } from 'my-module'; ``` And I know I can import a default import: ``` import defaultMember from 'my-module'; ``` I'd lik...

3 Oct at 18:16