kevinob

1

votes
1

answer
2.2k

views

How to get rid of “Call requires API level 26 (current min is 24)”?

How can I tell Android Studio (3.0.1) not to display API 26 functions in the IntelliSense? It's quite misleading. Why does it propose those functions if I cannot use them? Example: if I use the java.util.Date, it tells me: 'Date(int, int, int)' is deprecated as of API 16: Android 4.1 (Jelly Bean) A...
kevinob
1

votes
1

answer
25

views

Can't get Gridlayout top and bottom margins to be displayed

I try to display gridlayouts (as rows) in a linearlayout (table) row.xml ... sep.xml In the emulator and in my phone: When I add a row, a sep(arator), a row etc. I have 2 problems: the separator rows are not displayed (even if I increase the layout_height) the top and bottom margins of the rows (gri...
kevinob
1

votes
3

answer
166

views

moment.duration(10000).asMinutes() returns NaN

I'm using momentjs (2.19.2) in my nodejs/typescript program. I import the lib using (tried both): var moment = require('moment'); or import * as moment from 'moment'; When I write: moment().format('DD-MM-YYYY'), it returns 18-04-2018 which is correct. Whereas: moment.duration(10000).asMinutes() ret...
kevinob
1

votes
0

answer
68

views

Don't repeat yourself or be more clear by repeating yourself?

I have this base class below: abstract class RequiredString { protected readonly string _text; public RequiredString(string name, string text) { if (string.IsNullOrWhiteSpace(text)) throw new TextEmptyException($'The '{name}' field is required'); _text = text; } public RequiredString(string name, st...
kevinob
1

votes
1

answer
300

views

How to store number with more than 15 digits in Sharepoint?

I'm trying to store the value 9234567891234567 in a Number Type SPListItem field. The underlying C# type for a Sharepoint Number Field is Double. When I assign 9234567891234567 to a double C# var, then it holds 9234567891234568. SPListItem items = list.GetItemById(siteID); var value = Convert.ToDoub...
kevinob
5

votes
1

answer
1.8k

views

Toast is not rendered (react-toastify component)

I'm using react-toastify and I can't get a simple toast to be rendered... import React from 'react'; import { toast } from 'react-toastify'; class MyView extends React.Component { constructor() { super(); this.state = { }; } componentDidMount() { toast('Hello', { autoClose: false }); } notify = () =...
kevinob