С ростом количества CSS на клиенте, разработчики озаботились его минимизацией: сначала простыми заменами, а потом и структурной оптимизацией. Первым иструментом, где появилась такая оптимизация, был CSSO и он оставался лучшим, пока не был заброшен. Не так давно он снова вернулся к жизни. Принципы работы CSSO, новые идеи оптимизаций и изменения в последних релизах от нового мейнтейнера проекта.
1. GET и POST формы
2. Общий сценарий обработки
3. Перенаправления в HTTP
4. Описание форм в Django
5. Типы полей в формах Django
6. Валидация данных
7. Использование форм в контроллерах и шаблонах
8. CSRF
01 - Web-технологии. Архитектура Web приложенийRoman Brovko
1. Понятие URL и документа
2. Виды документов: HTML, CSS, JS, JSON.
3. Абсолютные и относительные URL
4. Правила разрешения URL-ов
5. Гиперссылки
6. Клиент-серверная архитектура
С ростом количества CSS на клиенте, разработчики озаботились его минимизацией: сначала простыми заменами, а потом и структурной оптимизацией. Первым иструментом, где появилась такая оптимизация, был CSSO и он оставался лучшим, пока не был заброшен. Не так давно он снова вернулся к жизни. Принципы работы CSSO, новые идеи оптимизаций и изменения в последних релизах от нового мейнтейнера проекта.
1. GET и POST формы
2. Общий сценарий обработки
3. Перенаправления в HTTP
4. Описание форм в Django
5. Типы полей в формах Django
6. Валидация данных
7. Использование форм в контроллерах и шаблонах
8. CSRF
01 - Web-технологии. Архитектура Web приложенийRoman Brovko
1. Понятие URL и документа
2. Виды документов: HTML, CSS, JS, JSON.
3. Абсолютные и относительные URL
4. Правила разрешения URL-ов
5. Гиперссылки
6. Клиент-серверная архитектура
Большинство считает CSS чем-то простым и не заслуживающим внимания. Но за мнимой простотой кроется большая сложность и огромный пласт проблем, не имеющих пока решения. Современный CSS с его объёмами, новыми фичами, разной поддержкой и багами браузеров, уже почти не поддается анализу человеком. Для этого появляются программы, которые разбирают CSS на атомы, анализируют и помогают сделать его лучше. Как к этому прийти, где мы сейчас и что ещё предстоит сделать.
Bootstrap 3. Адаптивная верстка для WordPressIgor Sazonov
Основы и примеры для понимания зачем нужен CSS-фреймворк Bootstrap. Доклад читался в рамках WordPress Meetup #3 в Санкт-Петербурге. Объясняется в чем суть верстки на Bootstrap, зачем он нужен для WordPress, подробно разбирается основы grid (сетки) на Bootstrap чтобы верстать адаптивный дизайн.
Что такое CSS?
Что такое каскадность?
Как подключаются стили?
Блочная модель.
Правила и селекторы.
Наследование правил CSS.
Как вычисляется вес правил?
Кроссбраузерность.
The document provides instructions for extending a UDP server to handle additional commands for reading the state of GPIO pins connected to LEDs on a board. The UDP server extension should accept "read gpio<PORT> <PIN>" commands to check the status of LEDs connected to pins 13, 12, 14, and 15, and reply with the pin and state like "GPIOD.15=1". The ncat utility can be used as a UDP client to send commands to control the LEDs or get their status by communicating with ports 5678 and 1234 of the UDP server, respectively.
This document provides an agenda and overview of topics related to the transport layer and networking essentials. The agenda includes discussions of the transport layer, UDP overview, TCP communication process, the socket API, and tools and utilities. Specific topics that will be covered include the role and functions of the transport layer, UDP features and headers, TCP reliability mechanisms like connection establishment and termination, sequence numbers and acknowledgments, window sliding, and data loss/retransmission. The document also provides brief overviews and usage examples for common networking tools like ifconfig, nmcli, route, ping, traceroute, netstat, dig, ncat, nmap, tcpdump, and wireshark.
This document provides an overview of connecting the STM32F407x microcontroller on the GlobalLogic Embedded Starter Kit to Ethernet. It discusses the STM32F407x Ethernet interface, HAL Ethernet driver, Lightweight TCP/IP stack, and examples of implementing TCP client/server and an HTTP server. The KSZ8081RND PHY chip is used along with the RMII interface. The document also outlines configuring LwIP and developing a UDP server to control LEDs on the board via commands from a UDP client.
The document provides an agenda and overview of key topics related to networking essentials including the network layer, IPv4 and IPv6 packets and addresses, and network address translation (NAT). Specifically, it discusses network layer characteristics such as addressing, encapsulation, routing and de-encapsulation. It also examines IPv4 packet headers, fragmentation, and maximum transmission units. IPv6 is introduced as improving on IPv4 by providing increased address space and simplified packet handling. Network address translation is defined as a method for mapping an IP address space to overcome IPv4 address depletion.
This document provides an overview of networking concepts including network types, medium access control protocols, TCP/IP protocol suite, addressing, Ethernet frames, ARP, and standards organizations. It begins with an agenda that lists these topics and includes diagrams to illustrate CSMA/CD, the OSI model, TCP/IP encapsulation, and Ethernet encapsulation. Examples are provided for different network devices, addressing formats and protocols.
This document is a training presentation on I2C interface. It discusses understanding I2C, the internal structure of I2C modules, the I2C interface in an embedded starter kit schematic, using an I2C PWM LED controller, and using I2C in blocking mode. The individual task is to control LED brightness using I2C PWM outputs by modifying the duty cycle, frequency, and number of outputs.
The document describes a workshop for the GlobalLogic Embedded Starter Kit (GL ESK). It includes instructions for a "Hello World" project using the kit to blink an LED. It also provides guidance on additional exercises including controlling more LEDs with buttons, using interrupts to check buttons, and debugging techniques. The document recommends downloading documentation and sources from GitHub and provides information on the STM32F407 microcontroller and Discovery board used with the kit.
This document is a training module on using UART interfaces. It discusses UART fundamentals, the UART interface on an embedded starter kit, the internal structure of UART modules, and how to use UART in both polling and interrupt modes. Learners are assigned the tasks of modifying an existing UART code to control additional LEDs and print sensor values to a terminal using UART communication.
Bare metal training_04_adc_temp_sensorRoman Brovko
This document outlines the goals, theory, and practice of a training on using analog to digital converters (ADCs) in polling and interrupt modes. The training covers the internal structure of ADCs, using an on-board temperature sensor, reading voltage values from an external potentiometer, and reading multiple ADC channels. Trainees are assigned individual tasks like controlling LED brightness based on temperature sensor readings.
This document provides an overview of a training on timers and PWM for bare metal embedded systems. The goals are to learn clock control, generate 1Hz signals using delays and timers, and create PWM signals at predefined duty cycles. It explains clock control diagrams and settings, and provides code examples to generate a 1Hz signal using delays, use Timer4 to toggle a pin in an interrupt handler, and set up PWM on Timer4 Channel 3. Finally, it lists an individual task to control 4 LEDs with PWM using different channels and buttons to fade the LEDs in/out.
Bare metal training_02_le_ds_and_buttonsRoman Brovko
This document provides an overview of training materials for an embedded starter kit focused on bare metal programming of LEDs and buttons. The goals are to create firmware to control LEDs and read button presses, learn about the hardware operation of LEDs and buttons, and learn GPIO input/output and interrupt basics. It introduces GPIO configuration as digital I/O with pull-up/down resistors or analog, covers GPIO pin functionality, and discusses using interrupts to address the delay issues of polling button states in a main loop. The practice section has the learner set up a project to control an LED based on a button press via polling initially, then refactors to use interrupts to eliminate delays.
This document outlines a training for creating a "Hello World" firmware project for an embedded starter kit using the Keil IDE. The goals are to create an LED blinking firmware, learn the hardware basics of the starter kit, and learn how to create, build, flash and debug firmware projects. Trainees will go through adding LEDs to the project, implementing a custom blinking sequence, and stepping through the code using the debugger.
This document provides instructions for installing software prerequisites for a bare metal embedded training using a GlobalLogic starter kit. The instructions include downloading and installing: 1) An ST-Link driver to interface with the board; 2) Keil uVision IDE for embedded development; and 3) STM32 CubeMx for configuration. Completing these steps prepares the hardware and software for the trainings by setting up the development environment and debugger connection to the board.
The document discusses several topics related to advanced C language programming including:
1. Decomposing a program into multiple files by creating libraries and header files.
2. The structure of a software component including public header files, private header files, and library object files.
3. Techniques for building a program such as compilation, linking, and conditional compilation.
2. Как задать оформление страницы ?
HTML, в отличие от XML, обладает семантикой, т.е. браузер знает
как отображать тот или иной HTML тэг. В HTML есть тэги для
управления внешним видом ( color , font , big , ...), но их
возможности явно недостаточны.
Решение - описывать внешний вид отдельно от структуры
документа c помощью языка Cascading Style Sheets.
2
4. Где могут быть заданы стили?
• Встроенные в браузер стили
• Во внешнем файле
<link rel="stylesheet" href="style.css">
• В коде HTML документа
<style>...</style>
• Стили могут быть привязаны к конкретному тэгу
<img style="margin: 3px" src="...">
4
5. Какие бывают стили ?
• width , height ― размеры элемента
• margin , padding ― границы и отступы
• display , visibility ― режим отображения
• top , left , right , bottom ― расположение
• background ― фон элемента
• font ― управление шрифтом
• text-align ― выравнивание текста
5
7. Классы и идентификаторы
<div id="userpic"><img src="..."></div>
<button class="btn btn-main">Одобрить</div>
<button class="btn">Написать комментарий</div>
• id - идентификатор элемента, должен быть уникален на странице
• class - список классов элемента, классы могут повторяться
7
8. Базовые селекторы
• Универсальный селектор
* { margin: 0px; padding: 0px; border: 0px; }
• Имена тэгов
p { margin-top: 10px; }
• Имена классов (с точки)
.btn { border: solid 1px gray; }
• id тэгов (с решетки)
#userpic { padding: 10px }
8
10. Псевдоклассы
• a:visited ― посещенная ссылка
• a:link ― непосещенная ссылка
• div:hover ― элемент при наведении мыши
• input:focus ― элемент при получении фокуса
• li:first-child ― выбирает первого потомка среди множества
элементов
10
11. Псевдоэлементы
• #el:after ― виртуальный элемент сразу после #el
• #el:before ― виртуальный элемент непосредственно перед #el
.jack-sparrow:before {
content: "Captain ";
display: inline;
}
11
13. Наследование стилей
<head>
<style>
body { color: darkgray; font-family: Arial; }
p { font-size: 110% }
</style>
</head>
<body>
<p> Привет, <a href=”/”>Мир</a> </p>
</body>
Не все стили наследуются.
13
14. Приоритеты стилей
В случае, если два разных стиля конфликтуют между собой,
применяется тот, что обладает большей специфичностью. Если
специфичность двух стилей совпадает, применяется тот, что
расположен ниже в HTML/CSS коде.
Указание в значение стиля флага !important позволяет
перекрыть проверку специфичности.
14
15. Правила расчета специфичности
• id – 100
• классы и псевдоклассы – 10
• тэги и псевдоэлементы – 1
Так, например, селектор ul.info ol + li обладает
специфичностью 13, а селектор li.red.level специфичностью
21 балл
15
17. Режимы отображения элементов
• display: none ― элемент невидим, не занимает места
• display: block ― элемент занимает максимальную ширину,
начинается с новой строки, учитывает width, height
• display: inline ― элемент занимает минимальную ширину, и
не прерывает строку, игнорирует width, height
• display: inline-block ― блочный элемент, но не разрывает
строку, примерно как img
17
18. <div class="t">ONE</div>
<div class="t">2</div>
<span class="t">ONE</span>
<span class="t">2</span>
<style>
.t {
width: 150px; height: 100px;
background: red; color: white;
margin: 30px; padding: 4px;
}
</style>
ONE
2
ONE 2
DIV vs. SPAN
18
19. float & clear
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Proin tempor iaculis massa. Fusce sollicitudin purus
viverra erat sollicitudin placerat sit amet ut diam.
Vivamus malesuada tristique elit. Proin nec eros tempor.
float: left - всплывание влево, float: right - всплывание
вправо, clear: both - отменяет всплывание, «проводит черту»
19
21. Позиционирование
• position: static ― обычное расположение
• position: relative ― смещение относительно начального
местоположения на странице
• position: absolute ― если родитель relative, absolute или fixed
– относительно родителя, иначе - относительно начала документа
• position: fixed ― относительно окна браузера
• top/right/bottom/left - отступы, могут быть отрицательными
21
25. Что такое Bootstrap?
Bootstrap - это готовая библиотека стилей (CSS-фреймворк) от
Twitter. Bootstrap позволяет быстро разработать приемлемый
дизайн даже при базовых знаниях CSS.
25
26. Что включает в себя Bootstrap?
• Шаблон страниц
• Сетка
• Современные «стили по умолчанию»
• Верстка: таблицы, формы, списки, кнопки, …
• Компоненты: навигация, меню, пагинатор, …
• JavaScript плагины
26