<p>{this?.props?.post?.title}</p>
When you run git config --global core.editor emacs -nw, your shell splits the command line into words before invoking git. Git thus sees "emacs -nw" as two separate arguments. It only needs one to put into the config file, so the other is ignored. (Actually, that's a lie but you can check the man page for details.) You can put quotes around a series of words to tell your shell not to break them up: git config --global core.editor "emacs -nw" will give "emacs -nw" to git as a single argument which will do what you want.
$('.item').on('mouseover', '.dot', function({ delegateTarget: t }) {
$('.thumb-target', t).attr('src', $(this).data('img'));
$('.dot', t).removeClass('select').filter(this).addClass('select');
});
document.querySelectorAll('.item').forEach(n => {
n.addEventListener('mouseover', onMouseOver);
});
function onMouseOver({ target: t, currentTarget: ct }) {
const dot = t.closest('.dot');
if (dot) {
ct.querySelector('.thumb-target').src = dot.dataset.img;
ct.querySelectorAll('.dot').forEach(n => {
n.classList.toggle('select', n === dot);
});
}
}
const sum = (...arr) => arr
.flatMap(Object.entries)
.reduce((acc, [ k, v ]) => (
acc[k] = (acc[k] ?? 0) + v,
acc
), {});
function sum() {
const result = {};
for (const n of arguments) {
for (const k in n) {
if (n.hasOwnProperty(k)) {
if (!result.hasOwnProperty(k)) {
result[k] = 0;
}
result[k] += n[k];
}
}
}
return result;
}
const obj = sum(obj1, obj2);
. function sort(arr) {
const obj = Object.fromEntries(arr.map(n => [ n.parent, n ]));
const sorted = [];
for (let item = obj['null']; item; item = obj[item.id]) {
sorted.push(item);
}
return sorted;
}
function sort(arr, parent = null) {
const item = arr.find(n => n.parent === parent);
return item
? [ item, ...sort(arr, item.id) ]
: [];
}
file.get()
читает один символ, возвращает его и переходит к следующему символу ввода. Поэтому код:while (file.get() != ']')
{
temp += file.get();
}
while ( (с = file.get()) != ']')
{
temp += с;
}
const columns = [ '#', ...new Set(persons.flatMap(Object.keys)) ];
document.body.insertAdjacentHTML('beforeend', `
<table>
<thead>
<tr>${columns.map(col => `
<th>${col}</th>`).join('')}
</tr>
</thead>
<tbody>${persons.map((person, i) => `
<tr>${columns.map((col, j) => `
<td>${j ? person[col] ?? '-' : i}</td>`).join('')}
</tr>`).join('')}
</tbody>
</table>
`);
const table = document.createElement('table');
table.createTHead().insertRow().append(...columns.reduce((acc, col) => (
(acc[acc.length] = document.createElement('th')).textContent = col,
acc
), []));
persons.forEach(function(person, i) {
const tr = this.insertRow();
columns.forEach((col, j) => tr.insertCell().textContent = j ? person[col] ?? '-' : i);
}, table.createTBody());
document.body.append(table);
`${valutes.map(element => {
return `<div value="USD">${element}</div>`
})}`
function sorted(id) {
for (var c = document.getElementById(id), b = c.options, a = 0; a < b.length - 1;) {
let l = parseFloat(b[a].value),
r = parseFloat(b[a + 1].value);
if (!isNaN(l) && !isNaN(r) && b[a + 1] && (l > r && l > 0 && r > 0) || (l < r && l < 0 && r < 0) || (l < 0 && r >= 0)) {
c.insertBefore(b[a + 1], b[a]);
a = a >= 1 ? a - 1 : a + 1
} else a++;
b[0].selected = true
}
};
sorted("26-disk");