This file contains hidden or 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> | |
using namespace std; | |
int main() | |
{ | |
int a, b, k; | |
cout << "Enter a,b,k" << endl; |
This file contains hidden or 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
/* | |
Общая логика взаимодействия бэкенда и модели | |
1. Бэкенд хранит внутри себя актуальную структуру данных: | |
- Список базисов отгрузки (см. struct Basis) | |
- Список транспортных компаний (см. struct TransportCompany) | |
- Список ТС (см. struct Vehicle) | |
- Список клиентов |
This file contains hidden or 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 <stdio.h> | |
#include <stdlib.h> | |
#include <time.h> | |
#include <sys/time.h> | |
#include <tarantool/tarantool.h> | |
#include <tarantool/tnt_net.h> | |
#include <tarantool/tnt_opt.h> | |
#include <pthread.h> | |
#include <errno.h> | |
#include <string.h> |
This file contains hidden or 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
// sudo yum install gcc-c++ | |
// gcc -std=gnu++0x -DNDEBUG -O3 just_stl.cpp -lstdc++ -o just_stl | |
// time ./just_stl | |
#include <unordered_map> | |
int main() | |
{ | |
std::unordered_map<int, int> m; | |
for (int i = 0;i < 10000000;++i) | |
m[i*i] = i; |
This file contains hidden or 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
// Tarantool quick test | |
// Copyright, Dennis Anikin 2016 | |
// | |
// Quick disclaimer: | |
// | |
// This test shows 500K-1000K transactions per second on one CPU core | |
// and 600K-1600K queries per second on one CPU core. | |
// | |
// Based on the $6.57 per-month-price for the AWS t2.micro instance we can afford the tremendous number of 630bln queries for just $1 | |
// |
This file contains hidden or 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 <stdio.h> | |
#include <stdlib.h> | |
#include <time.h> | |
#include <sys/time.h> | |
#include <tarantool/tarantool.h> | |
#include <tarantool/tnt_net.h> | |
#include <tarantool/tnt_opt.h> | |
#include <pthread.h> | |
#include <errno.h> | |
#include <string.h> |