cd \mongodbdir\
mkdir db1
mkdir db2
mkdir db3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var session | |
if (window.ApplePaySession) { | |
var merchantIdentifier = 'merchant.com.canine-clothing' | |
ApplePaySession.canMakePaymentsWithActiveCard(merchantIdentifier) | |
.then(function (canMakePayments) { | |
if (canMakePayments) { | |
showApplePayButtons() | |
} | |
}); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Promise from 'bluebird' | |
import MongoDB from 'mongodb' | |
Promise.promisifyAll(MongoDB) | |
async function findEveryone(db) { | |
const people = db.collection('people') | |
const everyone = await people.find().toArrayAsync() | |
return everyone.map( x => x.name ) | |
} |
提供与客户端通讯的机制。支持WindVane SDK v2.2 以上版本。
windvane 在客户端中,会将原始UA后面跟上 WindVane/WindVaneSDK的版本号,你可以通过判断UA的方式来检查环境 其中,淘宝主客户端1212版本(IOS 3.4.5 ANDROID 3.9.5)后格式为
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env php | |
<?php | |
function fetch_page($url, $timeout = 5) { | |
$ch = curl_init(); | |
curl_setopt($ch, CURLOPT_URL, $url); | |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); | |
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout); | |
$data = curl_exec($ch); | |
curl_close($ch); |