created() {
accessAPI().then(result => this.api = result);
},<imgMap :api="api"></imgMap><imgMap v-if="api" :api="api"></imgMap>не могу напрямую вызывать асинхронные методы из обьекта они недоступны. Сейчас я решил проблему так:
props: { api : Object }, data() { return { apiLocal : null } } async mounted() { this.apiLocal = await this. api; await this.apiLocal.methods1(); }
function handleClickOnPhoto($photo){
$('.photo').removeClass('active-element');
$photo.addClass('active-element');
$('.point li').removeClass('active-point').
filter((index, item) => $photo.data('id') == $(item).data('id')).addClass('active-point');
$('.about-text p').text($photo.data('text'));
$('.about-site p').text($photo.data('info'));
$('.about-site a').text($photo.data('website')).attr("href", "#");
}
$('.photo').click(function(){
handleClickOnPhoto($(this));
});
$('.point li').click(function(){
$('.point li').removeClass('active-point');
$(this).addClass('active-point');
handleClickOnPhoto($(this));
});
7. Месяц 1 > 02 - почему?Потому что в js месяцы считаются от ноля - единица в конструкторе обозначает февраль.
9. Час 10 > 07 - почему?Потому что часовой пояс UTC.
3. Месяц 1 > 01 - вопросов нет.Потому что 0 часов 0 минут первого февраля в вашем часовом поясе - это ещё 31-е января по UTC.
4. День 1 > 31 - почему?
const plainToNested = (source, target = {}) =>
Object.entries(source).reduce((acc, [ path, val ]) => {
const keys = path.split('.');
const key = keys.pop();
keys.reduce((p, c) => p[c] = p[c] || {}, acc)[key] = val;
return acc;
}, target); console.log('%c ', 'font-size: 200px; background: url(https://vignette.wikia.nocookie.net/nyancat/images/f/ff/Mexinyan.gif/revision/latest?cb=20150409011153) no-repeat;');function toMixCase(str) {
return str
.split('')
.map(char => Math.random() > 0.5 ? char.toLowerCase() : char.toUpperCase())
.join('');
}
class deferred {
constructor() {
this.promise = new Promise(resolve => this.resolve = resolve);
}
then(f) {
this.promise = this.promise.then(f);
}
}class deferred {
constructor() {
this.callbacks = [];
}
then(f) {
this.callbacks.push(f);
}
resolve(val) {
this.callbacks.reduce((res, f) => f(res), val);
}
} SSH will fail to start if there are syntax errors in the /etc/ssh/sshd configuration file. The command following command will tell you if any directives are incorrect:/usr/sbin/sshd -T
If the configuration test does not return any errors, I would suggest starting sshd in debugging mode, this will provide you with a detailed startup of the service:/usr/sbin/sshd -ddd