Вывод версии Docker:
docker --version
Запуск специального тестового контейнера:
docker run hello-world
# Add apt.llvm.org repository and install clang | |
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add - | |
sudo apt-add-repository "deb http://apt.llvm.org/stretch/ llvm-toolchain-stretch main" | |
sudo apt-get update | |
sudo apt-get install -y clang clang-format clang-tidy lldb libc++-8-dev libc++abi-8-dev | |
# Check version | |
clang --version | |
clang++ --version |
@echo off | |
:: formats file 1.pas, puts output to 2.pas | |
ptop.exe -l 255 -c "%~dp0\ptop.cfg" "%~dp0\1.pas" "%~dp0\2.pas" |
Вывод версии Docker:
docker --version
Запуск специального тестового контейнера:
docker run hello-world
MeshDataP3N3 utils::tesselateTeapot(const Material &material, unsigned latitudeDivisions, unsigned longitudeDivisions) | |
{ | |
const size_t pointCount = std::size(kTeapotPatches) * (latitudeDivisions + 1) * (longitudeDivisions + 1); | |
const size_t vertexCount = 6 * std::size(kTeapotPatches) * latitudeDivisions * longitudeDivisions; | |
// TODO: (cg14.3) замените тип элемента в массиве на VertexP3N3. | |
std::vector<VertexP3N3> points(pointCount); | |
// Veticies | |
for (size_t p = 0; p < std::size(kTeapotPatches); p++) |
sudo apt update && sudo apt upgrade
sudo update-manager -d
lsb_release -a
to see Ubuntu versionimport math | |
def sieve_size_bytes(number_bits): | |
max_index = 2**number_bits | |
max_prime = max_index * math.log(max_index) | |
number_bytes = (number_bits) + 7) / 8 | |
sieve_size = long(math.sqrt(max_prime) * number_bytes / 3) | |
return sieve_size | |
print("size for 32-bit index: " + str(sieve_size_bytes(32))) |
#include "SimpleScene.h" | |
#include "RandomColorGenerator.h" | |
#include <algorithm> | |
#include <glm/gtc/matrix_transform.hpp> | |
#include <glm/gtc/type_ptr.hpp> | |
#include <glm/vec2.hpp> | |
namespace | |
{ |
#include <cmath> | |
// Сравнение с допустимой абсолютной погрешностью | |
bool areCloseAbsolute(float a, float b, float tolerance = 0.001f) | |
{ | |
return std::abs(a - b) < tolerance; | |
} | |
// Сравнение с допустимой относительной погрешностью | |
bool areCloseRelative(float a, float b, float tolerance = 0.001f) |
--- | |
Language: Cpp | |
# BasedOnStyle: WebKit | |
AccessModifierOffset: -4 | |
AlignAfterOpenBracket: DontAlign | |
AlignConsecutiveAssignments: false | |
AlignConsecutiveDeclarations: false | |
AlignEscapedNewlinesLeft: false | |
AlignOperands: false | |
AlignTrailingComments: false |
#!/usr/bin/env python2 | |
from __future__ import print_function | |
import subprocess | |
import os | |
import shutil | |
SCRIPT_DIR = os.path.dirname(os.path.realpath(__file__)) | |
def prepare_dir(dir, prepare_git): |