curl 'http://dhl.com/' \
-H 'Connection: keep-alive' \
-H 'Upgrade-Insecure-Requests: 1' \
-H 'User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36' \
-H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9' \
-H 'Accept-Language: ru-RU,ru;q=0.9,en-US;q=0.8,en;q=0.7' \
--compressed \
--insecure -I
TP/1.0 301 Moved Permanently
Location: http://www.dhl.com/
Server: BigIP
Connection: Keep-Alive
Content-Length: 0
if (question === 1||3)
if (question === 1|| question === 3)
if ([1,3].indexOf(question) > -1)
const headerHex = data.substring(0, 2) // получаем фрагмент, в котором содержится заголовок
const header = parseInt(headerHex, 16) // переводим в десятичную систему
[...`${num}`].map(Number)
num.toString().split('').map(n => +n)
Array.from(String(num), parseFloat)
('' + num).match(/./g).map(n => parseInt(n))
Object.values(num.toFixed()).map(n => ~~n)
[].map.call(/.+/.exec(num)[0], n => n * 1)
eval('['.concat(num, ']').replace(/\d/g, '$&,'))
Object.assign([], JSON.stringify(num)).map(JSON.parse)
Array(1 + (Math.log10(num) | 0)).fill().map((n, i) => (num / 10 ** i | 0) % 10).reverse()
((f = (x, a) => (a.unshift(x % 10), x = x / 10 | 0, x ? f(x, a) : a)) => f(num, []))()
const a = {
method_1: function(a) {
console.log("1", this)
const func = function() {
console.log("2", this)
}
func()
},
somevar: "TEST"
}
a.method_1();
function replaceText(text, textToReplace) {
function replace(nodes) {
nodes.forEach(node => {
if (node instanceof HTMLScriptElement) {
return;
}
if (node instanceof HTMLStyleElement) {
return;
}
if (node instanceof Text) {
if (node.nodeValue.match(text)) {
node.nodeValue = node.nodeValue.replace(text, textToReplace)
}
}
else {
replace(Array.from(node.childNodes));
}
});
}
replace(Array.from(document.body.childNodes));
}
replaceText("{DATETIME}", "___WwW___");
overlay.addEventListener('click', function(e) {
if ([ '#close-menu', 'li > a' ].some(n => e.target.matches(n))) {
overlay.classList.remove('show-menu');
}
});
Где-то в середине лета(2018) скомпоновал свой галп-файл
Вот так выглядит мой package.json
говорит "task function must be specified"
Помогите, пожалуйста)
gulp.task('default', ['del'], function() {
// default task code here
});
gulp.task('default', gulp.series('del', function() {
// default task code here
}));
function arrayToList(arr) {
var i; // На самом деле именно здесь определяются все переменные
var nextRest; // данной функции объявленные
var list; // через ключевое слово "var"
for (i = arr.length - 1; i >= 0; --i) {
nextRest = list || null;
list = {};
list["value"] = arr[i];
list["rest"] = nextRest;
}
return list;
}