🧘♂️
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <iomanip> | |
#include <stdlib.h> | |
using namespace std; | |
int main(int argc, char **argv) | |
{ | |
int arraysize; | |
int offset; | |
cin >> arraysize; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
///<remark> | |
/// Этот класс генерирует простые числа, не превышающие заданного | |
/// пользователем порога. В качестве алгоритма используется решето | |
/// Эратосфена. | |
/// Пусть дан массив целых чисел, начинающийся с 2: | |
/// Находим первое невычеркнутое число и вычеркиваем все его | |
/// кратные. Повторяем, пока в массиве не останется кратных. | |
///</remark> | |
using System; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export default class VectorOperations { | |
public static addition(vec1: number[], vec2: number[]) { | |
let res = []; | |
for (let i = 0; i < vec1.length; i++) { | |
res.push(vec1[i] + vec2[i]); | |
} | |
return res; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static compare2Objects(x, y) { | |
const leftChain = []; | |
const rightChain = []; | |
let p; | |
// remember that NaN === NaN returns false | |
// and isNaN(undefined) returns true | |
if (isNaN(x) && isNaN(y) && typeof x === 'number' && typeof y === 'number') { | |
return true; | |
} | |
// Compare primitives and functions. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static downloadcsv(data: any, exportFileName: string) { | |
const csvData = this.convertToCSV(data); | |
const blob = new Blob([csvData], { type: 'text/csv;charset=utf-8;' }); | |
if (navigator.msSaveBlob) { // IE 10+ | |
navigator.msSaveBlob(blob, this.createFileName(exportFileName)); | |
} else { | |
const link = document.createElement('a'); | |
if (link.download !== undefined) { // feature detection | |
// Browsers that support HTML5 download attribute |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
enum Items : byte | |
{ | |
DisabledFlag = 1 << 7; | |
One = 1; | |
Two = 2; | |
Three = 5; | |
} | |
//========= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find "$1" -maxdepth 1 -type f -iname "*$2*" #поиск файлов, в имени которых есть введенные символы | |
rm -f `find "$1" ! -name "*$2*" -type f -exec rm -f {} \;` #удаление файлов, которые не содержат введенные символы |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[DataMember] | |
private bool IsFeatureDisabled | |
{ | |
get { return (Feature & (byte)IntegratedProducts.DisabledFlag) > 0; } | |
set | |
{ | |
Feature = value | |
? (byte)(Feature | (byte) IntegratedProducts.DisabledFlag) | |
: (byte)(Feature & (byte.MaxValue ^ (byte) IntegratedProducts.DisabledFlag)); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Loading</title> | |
<link rel="stylesheet" href="style.css"> | |
</head> | |
<body> | |
<section class="loading"> | |
<section class="circle"></section> | |
<section class="circle"></section> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Write-Output "CONTAINERS LIST:" | |
docker container ls | |
Write-Output "`n`nSTOPPING:" | |
docker stop $(docker ps -a -q) | |
Write-Output "`n`nREMOVING:" | |
docker rm $(docker ps -a -q) | |
Write-Output "`n`nCONTAINERS LIST:" |
OlderNewer