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
from django.shortcuts import render | |
from django.http import HttpResponse | |
from apps.phone.models import Customer, Number | |
from apps.phone.forms import CustomerForm, NumberForm, CreateNumberForm | |
from django.template.loader import render_to_string | |
from django.http import JsonResponse | |
from django.shortcuts import get_object_or_404 | |
# Create your views here. | |
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
from django.db import models | |
from django.db.models.signals import pre_save, post_delete | |
from django.dispatch import receiver | |
from django.core.exceptions import ValidationError | |
COLLECTIVE_NUMBER = ['84959830402', '84959830535'] | |
class Customer(models.Model): |
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> | |
<meta charset="UTF-8"> | |
<title>Урок2</title> | |
</head> | |
<body> | |
<p>текст до выполнения скрипта</p> | |
<script> | |
alert("Раз"); |
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
alert("Раз") |
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
// Напишите функцию formatDate(date), которая возвращает дату в формате dd.mm.yy. | |
// | |
// Ее первый аргумент должен содержать дату в одном из видов: | |
// | |
// Как объект Date. | |
// Как строку, например yyyy-mm-dd или другую в стандартном формате даты. | |
// Как число секунд с 01.01.1970. | |
// Как массив [гггг, мм, дд], месяц начинается с нуля | |
// Для этого вам понадобится определить тип данных аргумента и, при необходимости, преобразовать входные данные в нужный формат. | |
// |
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
//от родителя Животное, которе имеет свойство имя и скорость, и метод который задает скорость. | |
// Унаследовать все свойства и методы Слону и расширить метод скорость добавив ему фору | |
function Animal(name) { | |
this.name = name; | |
this.speed = 0; | |
} | |
Animal.prototype.run = function (speed) { | |
this.speed += speed; |
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
rus@coder:~/Docker/cardplatform$ cat docker-compose.yml | |
version: '2' | |
services: | |
asterisk15-lua: | |
image: motionrus/card-platform:part1 | |
network_mode: host | |
volumes: | |
- "/etc/localtime:/etc/localtime:ro" | |
- "./store/etc/asterisk/:/etc/asterisk/" | |
- "./store/var/log/asterisk:/var/log/asterisk" |
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
# Простой пример: у вас родился ребенок, и вы начали инвестировать по 1500 рублей в месяц под 9% годовых. | |
# К восемнадцатилетию на его счету будет 817 000 рублей. | |
# А если класть эти деньги не на депозит, а вкладывать в более | |
# доходные инструменты, процентов под 15 годовых, то к совершеннолетию ваш | |
# ребенок получит 1 676 000. А начиналось все с 1500 рублей в месяц! | |
# Отлично подходит для накопления ребенку на будущее накопительное | |
def calculate_every_day(pay_in_month, count_years, percent_year): |
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
## TeamCity build agent configuration file | |
###################################### | |
# Required Agent Properties # | |
###################################### | |
## The address of the TeamCity server. The same as is used to open TeamCity web interface in the browser. | |
## Example: serverUrl=https://buildserver.mydomain.com:8111 | |
serverUrl=http://localhost:8111/ |
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
class App extends Component { | |
state = { | |
selected: null | |
} | |
handleChange = (selected) => this.setState({selected}) | |
getUserState = (state) => { | |
console.log('---', state) | |
} |
OlderNewer