You can check if an Array contains a subset of an object as follows:
const state = [
{ type: 'START', data: 'foo' },
{ type: 'START', data: 'baz' },
{ type: 'END', data: 'foo' },
];
var timezoneAbbreviation = function(timezoneString) { | |
var timezoneAbbreviations = { | |
"Afghanistan Time": "AFT", | |
"Alaska Daylight Time": "AKDT", | |
"Alaska Standard Time": "AKST", | |
"Amazon Summer Time": "AMST", | |
"Amazon Time": "AMT", | |
"Arabia Standard Time": "AST", | |
"Argentina Time": "ART", | |
"Armenia Summer Time": "AMST", |
from __future__ import print_function | |
import sys | |
import io | |
import pip | |
import httplib2 | |
import os | |
from mimetypes import MimeTypes | |
$ curl --help | |
Usage: curl [options...] <url> | |
--abstract-unix-socket <path> Connect via abstract Unix domain socket | |
--alt-svc <file name> Enable alt-svc with this cache file | |
--anyauth Pick any authentication method | |
-a, --append Append to target file when uploading | |
--basic Use HTTP Basic Authentication | |
--cacert <file> CA certificate to verify peer against | |
--capath <dir> CA directory to verify peer against | |
-E, --cert <certificate[:password]> Client certificate file and password |
--- | |
- hosts: | |
- all | |
become: true | |
tasks: | |
- name: Update apt cache | |
apt: update_cache=yes | |
- name: Upgrade packages | |
apt: upgrade=dist |
Previous versions used homebrew to install the various versions. As suggested in the comments, it's better to use pyenv
instead. If you are looking for the previous version of this document, see the revision history.
$ brew update
$ brew install pyenv
$ pyenv install 3.5.0
$ pyenv install 3.4.3
$ pyenv install 3.3.6
$ pyenv install 3.2.6
$ pyenv install 2.7.10
$ pyenv install 2.6.9
This goes with the Traversy Media Scrapy tutorial on YouTube
pip install scrapy
WebKit desktop browsers add little up down arrows to number inputs called spinners.
These spinners have their value changed inadvertently when the scroll wheel is active on the number field. To prevent this from happen, you may choose to prevent this functionality, even though it ignores accessibility considerations.
Here are further discussions regarding this:
var jsonData = pm.response.json(); | |
var tweets = ''; | |
var all_links = []; | |
// list out all our links. | |
tweets = "<h2>Bookmarks</h2>"; | |
tweets = tweets + '<ul>'; | |
var tweet_results = jsonData.globalObjects.tweets; |
httpClient.DefaultRequestHeaders.Authorization = | |
new AuthenticationHeaderValue( | |
"Basic", | |
Convert.ToBase64String( | |
System.Text.ASCIIEncoding.ASCII.GetBytes( | |
string.Format("{0}:{1}", username, password)))); |