You have an array. Its sort order doesn't matter. You want to remove an item from this array.
The obvious thing to do would be to use splice
:
function remove(array, item) {
const index = array.indexOf(item);
array.splice(index, 1);
}
You have an array. Its sort order doesn't matter. You want to remove an item from this array.
The obvious thing to do would be to use splice
:
function remove(array, item) {
const index = array.indexOf(item);
array.splice(index, 1);
}
Africa/Abidjan | |
Africa/Accra | |
Africa/Addis_Ababa | |
Africa/Algiers | |
Africa/Asmara | |
Africa/Asmera | |
Africa/Bamako | |
Africa/Bangui | |
Africa/Banjul | |
Africa/Bissau |
setTimeout(function() { | |
function getAllModules() { | |
return new Promise((resolve) => { | |
const id = _.uniqueId("fakeModule_"); | |
window["webpackJsonp"]( | |
[], | |
{ | |
[id]: function(module, exports, __webpack_require__) { | |
resolve(__webpack_require__.c); | |
} |
@pacreate | |
Feature: PA Create Latest Images Page - Latest Images Page | |
Scenario: Verify Latest Images page has infinite scroll | |
Given I navigate to the images tab at url "/create/images" | |
And the images view displays 30 images | |
And I scroll down | |
And the images view displays 44 images | |
Scenario: Verify images are displayed correctly |
// this allows to send arbitrary messages. The chat conversation you want to send messages to has to be open. | |
// just run this in the JS console | |
// http://stackoverflow.com/a/39165137/1249001 | |
function findChatComponent(dom) { | |
var result = null | |
for (var key in dom) { | |
if (key.startsWith("__reactInternalInstance$")) { | |
try { | |
result = dom[key].child.child.memoizedProps.children._owner.stateNode.props.chat |
-- | |
-- Read only | |
-- | |
-- Create a group | |
CREATE ROLE postgres_ro_group; | |
-- Grant access to existing tables | |
GRANT USAGE ON SCHEMA public TO postgres_ro_group; | |
GRANT SELECT ON ALL TABLES IN SCHEMA public TO postgres_ro_group; |
Whether you're developing a web application with native-ish UI, or just a simple modal popup overlay that covers the viewport, when it comes to making things work on iDevices in Mobile Safari, you're in for a decent amount of pain and suffering. Making something "100% height" is not as easy as it seems.
This post is a collection of Mobile Safari's gotchas and quirks on that topic, some with solutions and fixes, some without, in good parts pulled from various sources across the internets, to have it all in one place. Things discussed here apply to iOS8, iOS9 and iOS10.
Screen real estate on smartphones is limited, so Mobile Safari collapses the browser chrome (address bar and optional tab bar at the top, and tool bar at the bottom) when the user scrolls down. When you want to make something span exactly the height of the viewport, or pin something to the bottom of the screen, this can get tricky because the viewport changes size (or
.flexIt(@type:flex) { | |
display: ~"-webkit-@{type}"; | |
display: @type; | |
} | |
.flexDirection(@direction:row) { |