[HttpGet("{id}")]
public async Task<FileStreamResult> Download(int id)
{
var filename = "file"+id.ToString()+".txt";
var path = "Путь к файлу";
var stream = File.OpenRead(path);
return new FileStreamResult(stream, "application/octet-stream")
{
FileDownloadName = fileName
};
}
function mul(start, end) {
let result = 1;
for (let i = start; i <= end; i++) {
result *= i;
}
return result;
}
function choose(n, k) {
return n > k
? Math.round(mul(n - k + 1, n) / mul(2, k))
: +(n === k);
}
background: url(ссылка на фон) repeat-y -150px 100% / 300px,
url(ссылка на фон) repeat-y calc(100% + 150px) -50% / 300px;
In software engineering, a software design pattern is a general, reusable solution to a commonly occurring problem within a given context in software design. It is not a finished design that can be transformed directly into source or machine code. It is a description or template for how to solve a problem that can be used in many different situations. Design patterns are formalized best practices that the programmer can use to solve common problems when designing an application or system.
isMapAdded
:)var isMapAdded = false;
$(window).scroll(function () {
var el = $('.map');
if ($(this).scrollTop() > el.offset().top - 800) {
if(isMapAdded) return;
isMapAdded = true;
var script = document.createElement('script');
script.src = "https://api-maps.yandex.ru/services/constructor/1....";
el.append(script);
};
});