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
(tests) 22:22 0 pers@persx240:~/cvs/cheat.sh/tests$ bash run-tests.sh | |
run-tests.sh: строка 13: realpath: команда не найдена | |
Using PYTHON 3: /home/pers/cvs/cheat.sh/tests/bin/python3 | |
Using cht.sh client at ./share/cht.sh.txt | |
Running 1: python/:list | |
/home/pers/cvs/cheat.sh/tests/bin/python3 ../lib/standalone.py python/:list | |
<frozen importlib._bootstrap>:219: RuntimeWarning: greenlet.greenlet size changed, may indicate binary incompatibility. Expected 144 from C header, got 152 from PyObject | |
<frozen importlib._bootstrap>:219: RuntimeWarning: greenlet.greenlet size changed, may indicate binary incompatibility. Expected 144 from C header, got 152 from PyObject | |
<frozen importlib._bootstrap>:219: RuntimeWarning: greenlet.greenlet size changed, may indicate binary incompatibility. Expected 144 from C header, got 152 from PyObject | |
<frozen importlib._bootstrap>:219: RuntimeWarning: greenlet.greenlet size changed, may indicate binary incompatibility. Expected 144 from C header, got 152 from PyObject |
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> | |
class Number { | |
public: | |
virtual void print(std::ostream& os) const = 0; | |
virtual Number* sum(const Number& other) const = 0; | |
}; | |
std::ostream& operator <<(std::ostream& os, const Number& n) { n.print(os); return os; } | |
class NaturalNumber : public Number |
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 <sys/types.h> | |
#include <sys/socket.h> | |
#include <sys/un.h> | |
#include <netinet/in.h> | |
#include <arpa/inet.h> | |
#include <err.h> | |
#include <errno.h> | |
#include <netdb.h> | |
#include <string.h> |
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 "stdafx.h" | |
#include <array> | |
#include <exception> | |
#include <iostream> | |
#include <cstdint> | |
#include <string.h> | |
// AUTORESIZE как... | |
// 1. Параметр шаблона | |
// 2. Изменение поведения при наследовании |
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 <array> | |
#include <exception> | |
#include <iostream> | |
class BaseNumber { | |
public: | |
virtual void print(std::ostream& os) const = 0; | |
}; | |
template<typename T> |
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> | |
template<typename T> | |
class MyArray { | |
T* p; | |
size_t sz; | |
public: | |
MyArray(size_t sz = 0) : p(new T[sz]) { } | |
// 1. Освобождение памяти | |
// 2. Сложение массивов |
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 "stdafx.h" | |
#include <array> | |
#include <exception> | |
#include <iostream> | |
#include <climits> | |
#include <cstdint> | |
#include <string.h> | |
// AUTORESIZE как... | |
// 1. Параметр шаблона |
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
// https://gist.github.com/grayed | |
// Application Programming Interface (API) | |
#include <iostream> | |
#include <exception> | |
template<typename T> | |
class MyArray { | |
struct MyArrayData { | |
MyArrayData(size_t sz_) : p(new T[sz_]), sz(sz_), allocated(sz_), refcnt(1) { } | |
MyArrayData(T* p_, size_t sz_) : p(p_), sz(sz_), allocated(sz_), refcnt(1) {} |
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 <vector> | |
/* | |
* Написать программу, описывающую базу данных владельцев автомобилей. | |
* Класс автомобиля должен содержать ссылки/указатели на всех владельцев, | |
* а класс владельца должен содержать ссылки/указатели на все имеющиеся в наличии автомобили. | |
* Для каждого автомобиля должно быть реализовано свойство, показывающее количество владельцев. | |
*/ | |
class Auto { |
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 "stdafx.h" | |
#include <iostream> | |
#include <string> | |
#include <set> | |
class person; | |
class car | |
{ | |
private: |
OlderNewer