Questions

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

EntityFramework Core database first approach pluralizing table names

We have existing database with pluralized table names. For Example `Documents`. I am trying to use new `EF Core` and `Asp.Net Core` with database first approach based on this article [here](https://do...

ERROR 1698 (28000): Access denied for user 'root'@'localhost'

I'm setting up a new server and keep running into this problem. When I try to log into the MySQL database with the root user, I get the error: > ERROR 1698 (28000): Access denied for user 'root'@'loca...

21 Sep at 14:48

Using Sql Spatial Data (C#) to find the "visual" center of irregular polygons

I'm drawing regions (using `SqlGeometry`/`SqlGeography` and translating them to the WPF `LocationCollection` equivalent) on the Bing Maps WPF Control and needed to label them. I got the labels drawn ...

13 Sep at 09:21

How Does This List Assignment Work?

I have seen this code example and it looks like it assigns an array initializer to a List. I thought it would not work but somehow it compiles. Is {} not an array initializer? Children is of type ILis...

1 Sep at 15:29

How do I create a custom SynchronizationContext so that all continuations can be processed by my own single-threaded event loop?

Say you're writing a custom single threaded GUI library (or anything with an event loop). From my understanding, if I use `async/await`, or just regular TPL continuations, they will all be scheduled o...

"Unable to cast object of type 'System.Net.Http.Formatting.JsonContractResolver' to type 'Newtonsoft.Json.Serialization.DefaultContractResolver'."

We have a WEB API project that recently was moved to a new server. I'm running my project after making some additions to its' payload, but it suddenly throws the following error: > Unable to cast obj...

11 Jan at 10:19

Render a View inside a View in Asp.Net mvc

How do I render a full fledged view (not partial view) inside another view? Scenario, I have different controller and want the exactly same view to render which is already there under other controlle...

1 Sep at 10:19

What is the difference between "yield return 0" and "yield return null" in Coroutine?

I'm new and a bit confused about "`yield`". But finally I understand how it worked using `WaitForSeconds` but I can't see the difference between of "`yield return 0`" and "`yield return null`". are...

Moment js get first and last day of current month

How do I get the first and last day and time of the current month in the following format in moment.js: > 2016-09-01 00:00 I can get the current date and time like this: `moment().format('YYYY-MM-DD...

23 May at 12:3

"CSV file does not exist" for a filename with embedded quotes

I am currently learning Pandas for data analysis and having some issues reading a csv file in Atom editor. When I am running the following code: ``` import pandas as pd df = pd.read_csv("FBI-CRIM...

1 Jan at 11:5

How to strip out header from base 64 image in C#?

I have following base 64 image: ```csharp var image='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAA0gA...'; ``` I am using `Convert.FromBase64String()`to convert this to bytes: ```csharp ...

1 May at 09:27

What is the difference between URL parameters and query strings?

I don't see much of a difference between the parameters and the query strings, in the URL. So what is the difference and when should one be used over the other?

22 Nov at 22:3

Error: Unexpected value 'undefined' imported by the module

I'm getting this error after migrating to NgModule, the error doesn't help too much, any advice please? ``` Error: Error: Unexpected value 'undefined' imported by the module 'AppModule' at ne...

1 Sep at 07:54

ServiceStack xml nil

Starting to play with ServiceStack and I'm looking for a way to exclude null properties on the Response DTO when exporting as xml. This is the sort of thing I want to omit... ``` <SectorCode i:nil="t...

1 Sep at 07:25