display: flex; flex-direction: column;
margin-top: auto;
display: flex
, то все карточки в рамках одной строки будут всегда одной высоты, и в рамках одной строки все кнопки будут на одном уровне. При этом в каждой карточке может быть любое количество текста. На диске С: в Windows 10 есть файлы, жёстко привязанные к секторам, которые нельзя перемещать?Нет.
Понятно, что все копируется, но вот заработает ли этот бэкап после восстановления?Все люди деляться на три типа
HTMLElement.prototype.waitFor = function(event_name) {
if (event_name) {
return new Promise((res, rej) => {
const listener = function() {
res()
this.removeEventListener(event_name, listener)
};
this.addEventListener(event_name, listener);
})
} else {
throw 'No event passed to waitFor method!';
}
}
async function foo() {
const start = new Date();
await document.querySelector('body').waitFor('click');
console.log('uspeshno dojdalis clicka, jdali celih ' + ((new Date().getTime() - start.getTime())/1000) + ' sekund');
}
foo();
MainWindowBackground = #80fff200
EscToExit = false
ReuseInstance = false
UseSysColors = false
RestoreSession = true
TabWidth = 300
FixedPageUI [
TextColor = #000000
BackgroundColor = #ffffff
SelectionColor = #f5fc0c
WindowMargin = 2 4 2 4
PageSpacing = 4 4
]
EbookUI [
FontName = Arial
FontSize = 12.5
TextColor = #5f4b32
BackgroundColor = #fbf0d9
UseFixedPageUI = false
]
ComicBookUI [
WindowMargin = 0 0 0 0
PageSpacing = 4 4
CbxMangaMode = false
]
ChmUI [
UseFixedPageUI = false
]
ExternalViewers [
]
ShowMenubar = true
ReloadModifiedDocuments = true
FullPathInTitle = false
ZoomLevels = 8.33 12.5 18 25 33.33 50 66.67 75 100 125 150 200 300 400 600 800 1000 1200 1600 2000 2400 3200 4800 6400
ZoomIncrement = 0
PrinterDefaults [
PrintScale = shrink
]
ForwardSearch [
HighlightOffset = 0
HighlightWidth = 15
HighlightColor = #6581ff
HighlightPermanent = false
]
CustomScreenDPI = 0
RememberStatePerDocument = true
UiLanguage = en
ShowToolbar = false
ShowFavorites = false
AssociateSilently = false
CheckForUpdates = true
RememberOpenedFiles = true
EnableTeXEnhancements = false
DefaultDisplayMode = single page
DefaultZoom = fit page
WindowState = 1
WindowPos = 743 0 1074 1390
ShowToc = true
SidebarDx = 0
TocDy = 0
ShowStartPage = false
UseTabs = true
FileStates [
]
SessionData [
]
TimeOfLastUpdateCheck = 0 0
OpenCountWeek = 519
allСlicks.find(k => k.Y == Y && k.X == X)?.player;
const obj = Object.fromEntries(arr.map(n => [ n.name, n.number ]));
// или
const obj = arr.reduce((acc, n) => (acc[n.name] = n.number, acc), {});
// или
const obj = Object.assign({}, ...arr.map(n => ({ [n.name]: n.number })));
function toObj(data, key, val = n => n) {
const getKey = key instanceof Function ? key : n => n[key];
const getVal = val instanceof Function ? val : n => n[val];
const obj = {};
for (const n of data) {
obj[getKey(n)] = getVal(n);
}
return obj;
}
const obj = toObj(arr, 'name', 'number');
// {Kolya: '5', Olga: '10'}
const charCodes = toObj('abc', n => n.charCodeAt());
// {97: 'a', 98: 'b', 99: 'c'}
<input name="xxx" value="69">
<input name="yyy" value="187">
<input name="zzz" value="666">
const inputValues = toObj(document.querySelectorAll('input'), 'name', 'value');
// {xxx: '69', yyy: '187', zzz: '666'}