Questions

C# Xamarin Java.Interop error?

Hello since the last `Xamarin update` we get this `error`. > CS0012 The type 'IJavaPeerable' is defined in an assembly that is not referenced. You must add a reference to assembly 'Java.Interop, Vers...

9 Jun at 14:59

how to sort pandas dataframe from one column

I have a data frame like this: ``` print(df) 0 1 2 0 354.7 April 4.0 1 55.4 August 8.0 2 176.5 December 12.0 3 95.5 February 2.0 4 85.6 Janu...

5 Feb at 14:21

Firebase (FCM) how to get token

It's my first time using FCM. I download a sample from [firebase/quickstart-android](https://github.com/firebase/quickstart-android) and I install the FCM Quickstart. But I can't get any token from th...

How to use the gecko executable with Selenium

I'm using Firefox 47.0 with Selenium 2.53. Recently they have been a bug between Selenium and Firefox which make code not working. One of the solution is to use the Marionnette driver. I followed th...

30 Mar at 12:4

How to get flexbox to include padding in calculations?

Below are two rows. - is two items at `flex 1` and one at `flex 2`.- is two items at `flex 1`. According to the spec But when is included in the calculation the sum is incorrect as you can see ...

13 Jun at 12:36

Disconnected from the target VM, address: '127.0.0.1:62535', transport: 'socket' on intellij idea CE. I can't debug my program. Any suggestions?

Connected to the target VM, address: '127.0.0.1:63073', transport: 'socket' Disconnected from the target VM, address: '127.0.0.1:63073', transport: 'socket'

13 Jun at 04:47

Elasticsearch search query to retrieve all records NEST

I have few documents in a folder and I want to check if all the documents in this folder are indexed or not. To do so, for each document name in the folder, I would like to run through a loop for the ...

23 May at 12:34

ASP - Core Migrate EF Core SQL DB on Startup

Is it possible to have my ASP Core Web API ensure the DB is migrated to the latest migration using EF Core? I know this can be done through the command line, but I want to do it programatically.

No data available for encoding 1252 - Xamarin

I am using Xamarin to develop an Android app, while trying to convert text to `byte[]` I get the following error: > no data is available for encoding 1252 My code: ``` byte[] mybyteA= Portable.Text...

12 Jun at 22:7

How to make Check Box List in ASP.Net MVC

I have a form with a list of checkboxes. A user can select all values, no values, or any in between. Example: ![screenshot of Goal](https://i.stack.imgur.com/8qQiW.png) I would like to write the res...

22 Mar at 20:5

required_if Laravel 5 validation

I have form that a user can fill-out for selling their home. And for one of the in puts, a user must select weather it will be "For Sale" or "For Rent". If it is For Sale, two price input fields will ...

12 Jun at 18:13

Pycharm/Python OpenCV and CV2 install error

I've been trying to install both OpenCV and cv2 from both Pycharm and from the terminal as suggested using: ``` pip install --user opencv pip install --user cv2 ``` but I'm getting the following er...

12 Jun at 15:54

Remove "api" prefix from Web API url

I've got an API controller ``` public class MyController : ApiController { ... } ``` By default it is mapped to URL `mysite/api/My/Method`, and I'd like it to have URL without "api" prefix: `mysite...

Unable to self-update Composer

I am trying to update Composer without any luck! What I have tried: ``` $ composer self-update ``` > [InvalidArgumentException] Command "self-update" is not defined. ``` $ sudo -H composer self-updat...

21 Apr at 15:21

Chaining Observables in RxJS

I'm learning RxJS and Angular 2. Let's say I have a promise chain with multiple async function calls which depend on the previous one's result which looks like: ``` var promiseChain = new Promise((r...

How to check if String ends with something from a list. C#

I want to take a user's input, and check if the end of what they put in ends with something. But it's more than one string. I have it in a list. And I could check if the input ends with a string from ...

22 Sep at 16:10

How to implement sleep function in TypeScript?

I'm developing a website in Angular 2 using TypeScript and I was wondering if there was a way to implement `thread.sleep(ms)` functionality. My use case is to redirect the users after submitting a for...

13 Jan at 12:47

Split string at first space and get 2 sub strings in c#

I have a string like this ``` INIXA4 Agartala INAGX4 Agatti Island ``` I want to split such a way that it will be like `INAGX4` & `Agatti Island` If I am using `var commands = line.Split(' ');` ...

11 Jun at 10:46

Set default host and port for ng serve in config file

I want to know if i can set a host and a port in a config file so I don't have to type ``` ng serve --host foo.bar --port 80 ``` instead of just ``` ng serve ```

13 Jun at 13:6

How do I select and store columns greater than a number in pandas?

I have a pandas DataFrame with a column of integers. I want the rows containing numbers greater than 10. I am able to evaluate True or False but not the actual value, by doing: ``` df['ints'] = df['i...

11 Jun at 08:17

How to initialize an array in angular2 and typescript

Why does this happen in Angular2 and Typescript? ``` export class Environment { constructor( id: string, name: string ) { } } environments = new Environment('a','b'); app/en...

11 Jun at 08:40

How to get the indices list of all NaN value in numpy array?

Say now I have a numpy array which is defined as, ``` [[1,2,3,4], [2,3,NaN,5], [NaN,5,2,3]] ``` Now I want to have a list that contains all the indices of the missing values, which is `[(1,2),(2,0)...

10 Jun at 18:26

How to vertically center text in a <span>?

How can I vertically center text that is wrapped in a `<span>`? The `<span>` must have `min-height` of `45px`. Here is what I am envisioning: ``` -------- ------- text ...

9 Jun at 13:46

How can I embed SVG into HTML in an email, so that it's visible in most/all email browsers?

I want to generate graphs in SVG, and email an HTML page with those graphs embedded in it (not stored on a server and shown with linked images). I've tried directly embedding the SVG, using the Obje...

10 Jun at 17:19

Instagram new logo css background

Recently, Instagram logo has changed as you all know. I need vector logo but it is not possible, I mean gradients. Is there any css code for new logo?

10 Jun at 14:57