You can provide multiple Sitemap files, but each Sitemap file that you provide must have no more than 50,000 URLs and must be no larger than 50MB (52,428,800 bytes). If you would like, you may compress your Sitemap files using gzip to reduce your bandwidth requirement; however the sitemap file once uncompressed must be no larger than 50MB. If you want to list more than 50,000 URLs, you must create multiple Sitemap files.
function findPair(input) {
let minDiff = Infinity;
let index = 0;
for (let i = 0; i < input.length - 1; i++) {
const cur = input[i];
const next = input[i + 1];
const diff = Math.abs(cur - next);
if (diff < minDiff) {
minDiff = diff;
index = i;
}
}
return input.slice(index, index + 2);
}
console.log(findPair([-22, -20, -4, -4.6, -1, 0, 0.3, 19.9, 20, 21]));
const R = require('ramda');
const input = [{
enabled: true,
categories: [{
enabled: false,
}, {
enabled: false,
}, {
enabled: true,
}],
}];
const setEnabled = entry => {
if (entry.enabled) {
return entry;
}
return Object.assign({}, entry, { enabled: true });
};
const walkCategory = entry => {
return Object.assign({}, entry, {
categories: R.map(setEnabled, entry.categories),
});
};
const result = R.map(walkCategory, input);
console.log(JSON.stringify(result, null, 2));
[
{
"enabled": true,
"categories": [
{
"enabled": true
},
{
"enabled": true
},
{
"enabled": true
}
]
}
]
<?php
var_dump(PHP_VERSION);
var_dump(LIBXML_VERSION);
$string = <<<XML
<a>
<b>
<c>текст</c>
<c>штучка</c>
</b>
<d>
<c>код</c>
</d>
</a>
XML;
$xml = new SimpleXMLElement($string);
var_dump($xml->asXML());
string(5) "7.2.0"
int(20907)
string(181) "<?xml version="1.0"?>
<a>
<b>
<c>текст</c>
<c>штучка</c>
</b>
<d>
<c>код</c>
</d>
</a>
"