Only assets that are in the public directory at build time will be served by Next.js. Files added at runtime won't be available. We recommend using a third party service like AWS S3 for persistent file storage.
return docs.map((doc) => {
doc.countViews = doc.views.length;
return doc;
});
function incrementX(obj) {
obj.x += 1
return obj
}
var a = {x: 0}
var b = incrementX(a)
console.log(b) // {x: 1}
console.log(a) // {x: 1} -- Магия
chrome.tabs.onCreated.addListener(function(tab) {
chrome.tabs.update(tab.id, {
autoDiscardable: false
});
});
chrome.tabs.onReplaced.addListener(function(tabId) {
chrome.tabs.update(tabId, {
autoDiscardable: false
});
});
chrome.runtime.onInstalled.addListener(function(details) {
chrome.tabs.query({}, function(tabs) {
tabs.forEach(function(tab) {
chrome.tabs.update(tab.id, {
autoDiscardable: false
});
});
});
});
...
"permissions" : [ "tabs" ],
"background" : { "persistent": true, "scripts": [ "background.js" ] },
...
<video id="antifreeze" style="position: fixed; right: 30px; bottom: 30px; z-index: 99999; height: 55px; width: 300px;" controls loop name="media">
<source src="https://qna.habr.com/silence.mp3" type="audio/mpeg">
</video>
const copyOfArray = JSON.parse(JSON.stringify(sourceArray))
const f = (arr = []) => {
arr.push(1)
arr.push(2)
return arr
}
const basicArr = f([]) // [1,2]
f(basicArr)
console.log(basicArr) // [1, 2, 1, 2]
// …
click.promise.then(()=>{
continuation(stuff);
})
// …
function continuation(stuff) {
}
async function () {
// …
let current = await ({"…"});
let checkOpen = current.querySelector('.multiselect__content-wrapper');
let allRow = checkOpen.querySelectorAll('ul .multiselect__element')
if(checkOpen.style.display != ''){
return;
}
let targetRow = new toElement('1-й Сет', allRow);
if (!targetRow.result) {
return;
}
let coords = new responseCoords(targetRow.result);
let cursor_move = new cursorMove(coords.result);
await cursor_move.func();
let click = new cursorClick();
click.func();
await click.promise;
// здесь можно запросить, что хотели
}
function sorts(p_arr, p_symb){
let res_arr = [];
//...
}
UNION SELECT 0, 0 FROM article WHERE autor = :autor
UNION SELECT 0, 0 FROM users WHERE login = :autor