<div id="regAUTH">
<a href="/reg.php">
<div>Регистрация</div>
</a>
<a href="/auth.php">
<div>Войти</div>
</a>
</div>
if (!isUserAuthenticated) {
<nonAuthHeader />
}
var windows = new Windows10();
var ie = windows.OpenProgrammByName("Internet Explorer 11");
var allPictures = ie.SearchInTheInternet("*", "image").Top(100).Skip(0);
var db = new DiscordBot("<token>"); // сюда надо свой токен вставить
db.OnCommand("test", (botContext)=>{
botContext.sendToAll("", "images", allPictures);
});
const arr = [
{ val: 1, from: 0, to: 4 },
{ val: 2, from: 0, to: 6 },
{ val: 3, from: 3, to: 8 },
{ val: 4, from: 3, to: 10 },
{ val: 5, from: 6, to: 15 }];
const result = arr.reduce((acc,v)=>{
if(!acc.dict[v.from]){
acc.dict[v.from] = {idx:acc.cur, to:v.to};
acc.arr[acc.cur] = v.val;
acc.cur += 1;
}else{
const info = acc.dict[v.from];
if(v.to>info.to){
acc.arr[info.idx] = v.val;
}
}
return acc;
}, {
dict:{},
arr:[],
cur: 0,
}).arr;
axios.interceptors.response.use((response) => {
return response;
}, function (error) {
// Do something with response error
if (error.response.status === 401) {
console.log('unauthorized, logging out ...');
auth.logout();
router.replace('/auth/login');
}
return Promise.reject(error.response);
});