let obj = {
x: 10,
y: 'hello',
[Symbol('new')]: 'world'
};
const s = Symbol('new');
let obj = {
x: 10,
y: 'hello',
[s]: 'world'
};
console.log(obj[s]);
.block {
width: 120px;
height: 40px;
background: red;
position: relative;
}
.block:before {
content: '';
background: blue;
width: 100%;
height: 100%;
position: absolute;
top: 50%;
z-index: -1;
}
Не удалось загрузить сценарий модуля: ожидался сценарий модуля JavaScript, но сервер ответил типом MIME «text / html». Для скриптов модуля в соответствии со спецификацией HTML применяется строгая проверка типов MIME.
const Figure = ({ type, ...props }) => <div className={type} {...props}></div>;
class App extends React.Component {
state = {
types: [ 'circle', 'square', 'triangle' ],
figures: [],
}
add(type) {
this.setState(({ figures }) => ({
figures: [ ...figures, type ],
}));
}
render() {
const { types, figures } = this.state;
return (
<div>
<div>
{types.map(n => <Figure type={n} onClick={() => this.add(n)} />)}
</div>
<div>
{figures.map(n => <Figure type={n} />)}
</div>
</div>
);
}
}
.NET
.NET Core
ASP NET Core
ASP NET Core 5
ASP NET Core 5 MVC
Что к чему? Что самое свежее/актуальное сейчас?
const concat = (...arrs) =>
arrs.reduce((acc, arr) => (
arr.forEach((n, i) => (acc[i] ??= []).push(...n)),
acc
), []);
const arr = concat(arr1, arr2);
using ManagedNativeWifi;
var connections = NativeWifi.EnumerateInterfaceConnections();
var firstConnection = connections.First();
Console.WriteLine(firstConnection.ProfileName);
fetch('https://gorest.co.in/public/v1/posts')
.then(r => r.json())
.then(r => {
document.body.insertAdjacentHTML('beforeend', `
<ul>${r.data.map(n => `
<li>
<a>${n.title}</a>
</li>`).join('')}
</ul>
`);
});
class Program
{
static void Main(string[] args)
{
double N;
double M;
Console.WriteLine("Введите N: ");
N=Convert.ToInt64(Console.ReadLine());
int i = -1;
while (i < N)
{
i = i+1;
M = i; //Выводим значение из цикла while
Console.WriteLine(i);
}
Console.WriteLine(M); // Мне нужно, чтобы здесь выводилось значение из цикла while
}
}
Есть папка, которая хранит в себе sql файлы для создания бд, таблиц в этой бд, импорт данных в эти таблицы.
Как автоматизировать запуск этих sql скриптов?
new[] { lEntry.Message, lEntry.Sender, lEntry.Level }
.Any(x => x.Contains(searchText, StringComparsion.OrdinalIgnoreCase)
public static bool IsSubstringOfAny(this string search, params string[] samples) =>
samples.Any(x=>x.Contains(search, StringComparsion.OrdinalIgnoreCase));