Skip to content

Instantly share code, notes, and snippets.

#include <iomanip>
#include <stdlib.h>
#include <iostream>
#include <stdio.h>
#include <conio.h>
using namespace std;
// ширина консоли
const int MAXLEN = 80;
#include "stdafx.h"
#include "lab1_216.h"
#include <iostream>
#include <fstream>
#include <string>
#define max(a,b,c) ((a > b) ? ((a > c)? a : c) : (b > c) ? b : c)
using namespace std;
const int VAR = 16;
#include "stdafx.h"
using namespace std;
int iMasMultiply(const int *mass, const int n)
{
int m = 1;
for (int i = 0; i < n; i++) m *= *(mass + i);
return m;
}
# coding=utf8
import logging
__ch = logging.StreamHandler()
__ch.setLevel(logging.DEBUG)
__formatter = logging.Formatter('%(asctime)s.%(msecs)d [%(levelname)s] %(message)s', r'%d.%m.%y %H:%M:%S')
__ch.setFormatter(__formatter)
logger = logging.getLogger(__name__)
logger.setLevel(logging.DEBUG)
logger.addHandler(__ch)
@ernado
ernado / shared.cpp
Last active December 15, 2015 07:09
// шаблон для ввода с последующим выводом
template <class t> void promt (std::string var_name, t &val)
{
std::cout << "Введите " << var_name << ": "; std::cin >> val;
std::cout << "Введено " << var_name << " = " << val << std::endl;
}
// шаблон для вывода значения переменной с пояснением
// eq от слова equals
template <class t> void eq (std::string var_name, t val, char delim = '=')
import os
import sys
import datetime
import shutil
template_name = 'LABN_216'
template_path = os.path.join('template', template_name)
def path(filename):
// заголовочный файл
// ИУ5-22 Разумов Александр
// 28.03.2013 18:51
#include <string>
#include <iostream>
/**
* шаблон для вывода значения переменной с пояснением.
* формат: var_name delimiter val \n
@ernado
ernado / draw.py
Created April 6, 2013 20:46
draw.py
import ImageDraw
import Image
def draw_circle(draw, x, y, r, color=(0, 0, 0), bg=(255, 255, 255), d=2):
draw.ellipse((x - r, y - r, x + r, y + r), fill=color)
r -= d
draw.ellipse((x - r, y - r, x + r, y + r), fill=bg)
http://maps.yandex.ru/print/?text=%D0%A0%D0%BE%D1%81%D1%81%D0%B8%D1%8F%2C%20%D0%9C%D0%BE%D1%81%D0%BA%D0%B2%D0%B0%2C%20%D0%A7%D0%B0%D1%81%D0%BE%D0%B2%D0%B0%D1%8F%20%D1%83%D0%BB%D0%B8%D1%86%D0%B0%2C%2020%D1%811&sll=37.529519%2C55.810501&ll=37.528554%2C55.804503&spn=0.040340%2C0.018926&z=15&l=map
@ernado
ernado / read.cpp
Last active December 16, 2015 05:09
#include <iostream>
#include <string>
const int BUFF = 256;
using namespace std;
string read(const string& message) {
string s;
cout << message;