Perspectives of development of interfaces реферат

Обновлено: 07.07.2024

SQL
SQL (Structured Query Language) — декларативный язык
программирования, применяемый для создания,
модификации и управления данными в реляционной
базе данных, управляемой соответствующей системой
управления базами данных (СУБД).
5

SQL
Говорим, что делать, а не как делать
(декларативный язык)
Find all the data about the customer whose name is Ivan.
Select * from customer where first_nm = 'ИВАН';
Работает с реляционной моделью –
представление данных посредством таблиц
Независимость от конкретной СУБД
Наличие стандартов SQL
6

7. Запросы

8. Data Definition Language

CREATE - Создает объекты базы данных
ALTER - Изменяет структуру и объекты базы данных
DROP - Удаляет объекты базы данных
TRUNCATE - Удаляет все записи из таблицы
8

9. Data Manipulation Language

SELECT - Возвращает данные из базы данных
Основа для аналитики
INSERT - Вставляет данные в таблицу
UPDATE - Обновляет существующие данные в таблице
DELETE - Удаляет записи в таблице
9

10. Привилегии пользователей

db_owner
db_datawriter
db_ddladmin
db_datareader
Всегда надо разграничивать роли, кому
можно выполнять определенные действия.
10

11. Типы данных

Числовые типы
Name
Size
Description
Example
bigint
integer
smallint
numeric (decimal) [ (p, s) ]
8 bytes
4 bytes
2 bytes
variable
large range integer
usual choice for integer
small range integer
user-specified precision, exact
922337203​6854775807
2147483647
32767
12,3450 (p = 6, s = 4)
Дата и время
Name
Size
Description
Example
date
time [ (p) ]
timestamp [ (p) ]
4 bytes
8 bytes
8 bytes
calendar date (year, month, day)
time of day only
both date and time
2020-02-25
00:05:14[.120070] (p = 6)
2020-02-25 19:30:23 (p = 14)
* P – точность, S – масштаб
11

12. Типы данных

Строковые
Name
Size
Description
Example
character [ (n) ]
character varying [ (n) ]
text
1 byte + n
1 byte + string size
1 byte + string size
fixed-length, blank padded
variable-length with limit
variable unlimited length
string1
string2
string3
Логический тип - boolean
12

Преобразование типов
Явное преобразование ТД
CAST('2020-02-01' as date)
'2020-02-01'::date
Неявное преобразование ТД
Строка автоматически преобразуется в число в
выражениях, требующих числа
'25' - 5
20
Число автоматически преобразуется к строке в выражениях,
требующих строки
'Баланс = ' || 50
'Баланс = 50'
13

Состояние в любом поле, означающее, что значение неизвестно
Может встретиться в любом поле с любым типом данных
Любая арифметическая операция с NULL возвращает NULL
(money_produce*2.5)
15

16. MONEY_MAKER

CREATE TABLE money_maker
(
id INTEGER,
country CHARACTER VARYING(30),
city CHARACTER VARYING(30),
issue_date DATE,
money_produce NUMERIC(24, 7),
currency CHARACTER VARYING(3),
actuality_start timestamp without time zone,
actuality_end timestamp without time zone
);
16

17. Блоки запроса

SELECT .
FROM .
WHERE .
GROUP BY .
HAVING .
ORDER BY .
Важна последовательность блоков
Не все блоки обязательные
17

18. SELECT

SELECT - оператор запроса в языке SQL, возвращающий набор
данных (таблицу).
SELECT .
FROM .
WHERE .
GROUP BY .
HAVING .
ORDER BY .
18

19. В блоке SELECT указываем набор полей выходной таблицы и способ их получения:

SELECT
В блоке SELECT указываем набор полей выходной
таблицы и способ их получения:
SELECT ‘Hello world!’;
SELECT id, money_produce
FROM money_maker;
SELECT *
FROM money_maker;
19

20. В качестве аргументов в SELECT можно задавать поля, выражения и функции с этими полями, константы и операторы

SELECT
В качестве аргументов в SELECT можно задавать поля,
выражения и функции с этими полями, константы и
операторы
SELECT
country ||' ' || city||'.',
'Производительность',
money_produce * 12
FROM money_maker;
20

21. Алиасы

Можно добавлять алиасы для выбираемых полей
SELECT
country||' '||city ||'.' as address,
'Производительность' produce,
mm.money_produce * 12 as “desirable produce”
FROM money_maker as mm;
21

22. Алиасы

В некоторых случаях алиасы можно использовать
дальше в запросе
Алиасы можно давать не только выбираемым
полям, но и таблицам
SELECT
mm.country as lc, count(*) as cnt
FROM money_maker as mm
GROUP BY lc
ORDER BY cnt;
22

23. DISTINCT

Отбрасывает дубликаты, возвращает только
уникальные значения
SELECT
id,
country,
city
FROM money_maker;
SELECT distinct
id,
country,
city
FROM money_maker;
23

24. Блоки запроса

25. Конвейер FROM

FROM требует таблицу
SELECT возвращает таблицу
SELECT * FROM (SELECT . );
Может быть много уровней вложенности
25

26. Сколько уникальных стран (country)?

Конвейер FROM
Сколько уникальных стран (country)?
select count(*)
FROM (
select distinct country
from money_maker) as c;
В GreenPlum при использовании
подзапросов необходимо давать им алиас
26

27. Блоки запроса

28. Фильтрует записи, пришедшие из FROM

WHERE
Фильтрует записи, пришедшие из FROM
Должно содержать условие
• Условие - это логическое выражение любой
сложности
SELECT * FROM money_maker
WHERE (логическое_выражение);
28

29. Примеры логических выражений

Равенство
country = ‘США’
Неравенство
country <> ‘США’
Сравнение
money_produce > 10000
Принадлежность интервалу
id between 50 and 60
Сравнение строки с маской
city LIKE(‘%МОС%’)
Сравнение со значениями из списка
id in (18,19,20)
SELECT * FROM money_maker
WHERE
country = ‘США’
29

30. WHERE

Условия можно комбинировать при помощи операторов
and, or, not
Порядок применения логических операций в выражении
1. NOT
2. AND
3. OR
Если логических операторов несколько, лучше
использовать скобки
NOT (money_produce >1000 AND
money_produce = date(‘1990-01-01’)
and issue_date Как записать компактнее?
SELECT *
FROM money_maker
WHERE id in (3, 5);
34

И снова NULL
SELECT *
FROM money_maker
WHERE id in (3, NULL);
VS
SELECT *
FROM money_maker
WHERE id not in (3, NULL);
35

Решение
SELECT *
FROM money_maker
WHERE /> or /> TRUE(FALSE)
or NULL
VS
SELECT *
FROM money_maker
WHERE id <> 3
and id <> NULL;
TRUE(FALSE)
and NULL
36

37. NOT IN

Эти два запроса эквивалентны.
SELECT *
FROM money_maker
WHERE id not in (3, 4);
SELECT *
FROM money_maker
WHERE not id in (3, 4);
37

38. Задача

Выбрать уникальные станки (id), у которых
когда-нибудь была производительность более
1 000 000
SELECT distinct id
FROM money_maker
WHERE money_produce > 1000000;
38

39. Вывести всю информацию о тех станках, которые в данный момент печатают рубли.

Задача
Вывести всю информацию о тех станках,
которые в данный момент печатают рубли.
SELECT *
FROM money_maker
WHERE currency = ‘RUB’
and actuality_end = ‘5999-01-01’;
39

40. LIKE

LIKE возвращает TRUE, если строка похожа на
шаблон
Подстановочное
выражение
%
_ (подчеркивание)
Описание
Ноль и более символов
Ровно один символ
SELECT * FROM money_maker
WHERE city like 'САН-%'
40

CASE
Возвращает тот или иной результат в зависимости
от условия
SELECT id,
(
CASE
WHEN money_produce is NULL THEN ‘Неизвестно‘
WHEN money_produce 2;
59

60. Аналогичный результат с использованием HAVING

HAVING
Аналогичный результат с использованием HAVING
SELECT
country,count(*) as cnt
FROM money_maker
GROUP BY country
HAVING count(*) > 2;
60

61. HAVING

В условии HAVING может быть любая функция агрегации.
Даже функция, которая не встречается в SELECT
Также можно включать логические выражения и поля
группировки
SELECT
extract('year' from issue_date) as year,
sum(money_produce) as income_sum
FROM money_maker
GROUP BY year
HAVING count(*) > 1 and
extract('year' from issue_date) in (1980,
1981);
61

62. Блоки запроса

63. Позволяет упорядочить строки результата по значению

ORDER BY
Позволяет упорядочить строки результата по значению
SELECT * FROM money_maker ORDER BY id;
Можно упорядочивать сразу по нескольким столбцам,
порядок столбцов важен
63

64. ORDER BY

SELECT * FROM money_maker
ORDER BY id, actuality_start
SELECT * FROM money_maker
ORDER BY actuality_start, id
!=
64

65. ASC - от меньшего к большему (по умолчанию)

ORDER BY
ASC - от меньшего к большему (по умолчанию)
DESC - от большего к меньшему
SELECT * FROM money_maker
ORDER BY id ASC, actuality_start DESC
SELECT * FROM money_maker
ORDER BY id DESC, actuality_start
65

66. ORDER BY

ORDER BY влияет только на порядок сортировки при
выводе команды SELECT, например на экран
Если результат команды SELECT с ORDER BY занести в
таблицу, то упорядоченность строк пропадет, т. к. таблица
- это неупорядоченное множество
Можно, но бессмысленно:
CREATE table new_table AS
SELECT * from money_maker
ORDER BY id;
66

67. Последовательность выполнения запроса

5
SELECT
1
FROM
2
3
WHERE
GROUP
BY
4
HAVING
6
ORDER
BY
1. Взять все строки входной таблицы
2. Оставить только строки, где логическое выражение в
WHERE равно TRUE
3. Сгруппировать
a. Разбить дошедшие строки на группы
b. Каждую группу схлопнуть (cагрегировать) до одной
строки
4. Оставить только те строки, где логическое выражение
HAVING равно TRUE
5. Определить столбцы результирующего набора
6. Отсортировать результат
67

68. Домашнее задание

Необходимо подключиться к Greenplum и
самостоятельно написать 3 запроса. Проверить
их работоспособность запуском в БД.
Результат работы на портале – прикрепленные
запросы.
Дедлайн выполнения ДЗ – 0:00 с 2 на 3 марта
68

Перспективы развития интерфейсов управления. Нейрокомпьютерный интерфейс - тема научной статьи по биологии из журнала В мире научных открытий

In the World of Scientific Discoveries, 4.2(64), 2015

перспективы развития интерфейсов управления, нейрокомпьютерный интерфейс

Дубов М.С., Новожилов А.Е., Кандзюба Н.К., Мазинов П.С., Сидоренков Д.А.

Нижегородский государственный технический университет имени Р.Е. Алексеева, Нижний Новгород, Россия

С развитием функциональных возможностей, а также уменьшением габаритов, требуются новые эффективные интерфейсы. Прямые интерфейсы управления, такие как голосовой интерфейс, нейрокомпьютерный интерфейс являются наиболее перспективными для применения в устройствах. Немаловажную роль играет и интерактивность самого интерфейса.

Ключевые слова: Интерфейс; технология; взаимодействие; интерактивность; биоритм; устройство; нейрон.

perspectives for the development of management interfaces, neurocomputer interface

Dubov M.S., Novozhilov A.E., Kandzyuba N.K., Mazinov US., Sidorenkov D.A.

Nizhny Novgorod State Technical University n.a. R.E. Alekseev, Nizhny Novgorod, Russia

With the development offunctionalpossibilities anddecrease of sizes demand of new effective interfaces. Direct interfaces of management such as

В мире научных открытий, № 4.2(64), 2015

voice interface, neurocomputerinterface are the most promising for using devices. Interactivity of the interface plays the important role.

Keywords: Interface; technology; interaction; interactivity; biorhythm;de-vice; neuron.

С увеличением степени интеграции и одновременным уменьшением габаритов устройствам стали требоваться более эффективные интерфейсы управления. На данный момент интерфейс взаимодействия с устройствами практически полностью перешел на сенсорную технологию. Она оказалась намного эффективнее, чем предшествующие ей кнопочные интерфейсы - когда количество и размер управляющих кнопок фиксированы, а функциональное назначение может быть изменено.

Сам интерфейс представляет собой сенсорное стекло, расположенное над обычным экраном. При касании этого стекла передаются координаты касания, которые в свою очередь связаны с координатами самого экрана. Основным преимуществом сенсорного интерфейса является возможность настройки интерфейса под нужды пользователя в текущий момент времени. Если требуется сделать быстрый выбор, то можно отобразить две больших кнопки - в таком случае сложно ошибиться. Если требуется множественный выбор, то есть возможность отобразить множество кнопок. Однако такой интерфейс обладает и недостатками - плохо работает в условиях стопроцентной влажности, низких температур, требует экран для вывода информации.

На сегодняшний день прослеживается тенденция к увеличению функционала и одновременному уменьшению габаритных размеров устройств. Наиболее перспективным направлением является разработка устройств носимых на голове.Существует два подхода к разработке этих устройств. В первом случае изображение накладывается на прозрачное стекло, создавая иллюзорное изображение. Во втором - изображение полностью поступает с дисплея. К данным устройствам сенсорный интерфейс оказывается неприменим.

1п Ше World of Scientific Discoveries, 4.2(64), 2015

С развитием технологий обработки речи станет возможным эффективно управлять устройствами голосом, однаков некоторых случаях этот интерфейс нельзя будет использовать из-за высокого уровня шума вокруг микрофона.

Наиболее перспективным интерфейсом, который позволит управлять устройствами без помощи рук, является нейрокомпьютерный интерфейс. Данный интерфейс представляет собой набор датчиков, которые размещаются на голове и улавливают слабые электронные сигналы, идущие от головного мозга. Дополнительно датчики размещаются над мышцами лица и считывают их состояние.Таким образом, достигается эффективное управление устройством без помощи рук. Так как при получении информации при помощи датчиков активности мозга датчик расположен относительно далеко от источника сигнала и захватывает область значительно шире источника, при этом источников сигнала несколько, то полученные данные необходимо обработать. Наиболее простым методом обработки таких сигналов является искусственная нейронная сеть с автоматической подстройкой коэффициентов.

Однако приоритетные датчики управления - это датчики считывающие активность лицевых мышц. При помощи напряжения и расслабления определенных мышц устройство будет взаимодействовать с пользователем.

При увеличении функционала и уменьшении габаритов устройства-люди находят новые возможности для взаимодействия с устройствами. Сенсорные интерфейсы в скором времени потеряют область применения из-за эволюции проекционного оборудования. Необходимо сконцентрировать усилия на разработке качественно нового интерфейса, не привязанного к необходимости использования рук. Голосовые интерфейсы не предназначены для использования на зашумленных территориях. Предлагается использовать интерфейсы, которые эффективно будут работать в таких условиях. Примером такого интерфейса, работающего в таких условиях, может служить нейрокомпьютерный интерфейс.

Для дальнейшего прочтения статьи необходимо приобрести полный текст. Статьи высылаются в формате PDF на указанную при оплате почту. Время доставки составляет менее 10 минут. Стоимость одной статьи — 150 рублей.

ДУБОВ М.С., КАНДЗЮБА Н.К., МАЗИНОВ П.С., НОВОЖИЛОВ А.Е., СИДОРЕНКОВ Д.А. — 2015 г.

ДУБОВ М.С., КАНДЗЮБА Н.К., МАЗИНОВ П.С., СИДОРЕНКОВ Д.А. — 2015 г.

ДУБОВ М.С., КАНДЗЮБА Н.К., МАЗИНОВ П.С., СИДОРЕНКОВ Д.А. — 2015 г.

ДУБОВ М.С., КАНДЗЮБА Н.К., МАЗИНОВ П.С., ПАПАЗЯН А.М., СИДОРЕНКОВ Д.А. — 2014 г.

The next generation of apps will require developers to think more of the human as the user interface. It will become more about the need to know how an app works while a person stands up or with their arms in the air more so than if they’re sitting down and pressing keys with their fingers.

Tables, counters and whiteboards will eventually become displays. Meeting rooms will have touch panels, and chalk boards will be replaced by large systems that have digital images and documents on a display that teachers can mark up with a stylus.

Microsoft General Manager Jeff Han gave developers at the Build Conference last week some advice for ways to think about building apps for this next generation of devices and displays. I am including his perspectives as well as four others who have spent time researching and developing products that fit with these future trends.

Hantalked about the need to think how people will interact with apps on a smartphone or a large display. That’s a pretty common requirement now, but the complexity will change entirely as we start seeing a far wider selection of devices in different sizes. He said, for instance, developers need to think how people stand next to a large display, how high they have to reach and the way they use a stylus to write. The new devices we use will soon all have full multi-touch capabilities so a person can use all fingers and both hands to manipulate objects and create content. Here’s the full talk he gave at Build, which includes a discussion about the types of devices we can expect from Microsoft going forward.

Jim Spadaccini of Ideum, which makes large interactive displays, said in an email the primary consideration that his team thinks about is how multiple individuals interact together around a table. Does the application encourage collaboration? Is the application designed in such a way that multiple people can interact?

He said that in looking at these questions, issues such as the orientation of information and overall structure of the application become really critical:

We look to design applications that have elements that are omni-directional or symmetric. These allow individuals to approach a table from any direction (or the two “long” sides) to interact together. The interaction is as much social engagement — visitors interacting with each other — as it is about interaction with the program.

Cyborg Anthropologist Andrew Warnersaid to me in an email that there’s a tendency in computing to think that we are becoming increasingly disembodied. In some senses this is true. In other senses, though, this is becoming less true. Every generation of computing becomes more tactile. The first interfaces were awkward keyboards and terminal, then came the mouse (which required the whole arm to move), then the touchpad (which we lovingly stroke with our fingertips), and then the touchscreen (which integrated display and touch).

The next generation of technology will bring new ways for people to get similar tactile experiences that we get when we touch objects or materials. Developers need to remember that people are sensual beings, and our bodies are the best interfaces we have. Even though we have ways to transmit thoughts directly to music, people still use embodied interfaces because we have been fine-tuning our nervous systems throughout our entire lives as we learn to interact with our environment. Additionally, we are “wired” to receive a basic pleasure from physical activity (exercise gives us serotonin and dopamine feedback). Developers need to harness this and make computers sensual again.

Amber Case is the co-founder of Geoloqi, the mobile, location-based company acquired by Esri. Known for her expertise in the field of cyborg anthropology, she is also the founder of Cyborg Camp, which took place in Portland this weekend. She mentioned on Twitter the concept of computer aided synesthesia. For instance, this correlates to the concept of using senses to simulate what another sense is unable to do.

From Artificial Vision:

However, a main drive for investigating artificial synesthesia (and cross-modal neuromodulation) is formed by the options it may provide for people with sensory disabilities like deafness and blindness, where a neural joining of senses can help in replacing one sense by the other, e.g. in seeing with your ears when using a device that maps images into sounds, or in hearing with your eyes when using a device that maps sounds into images.

Matt Mayis an accessibility evangelist who works for Adobe. He said to me that the most important thing right now is for developers to realize they can’t control which interface (or which combination of interfaces) people are going to prefer.

We’re going to have to test our apps with the boring old keyboard and mouse, as well as touch, voice, different display sizes and resolutions, and assistive technologies to make sure we’re actually still reaching everyone. It’s a very exciting time, and that usually leads to some really bad decisions. It’s important to choose what we use and how we use it wisely so that each user can participate as fully as possible.

People with little interest in computers have come to love their iPhones. They are easy to use because of their touch capabilities. This means we will see far more people using computers because they fit with their lives. Displays will be everywhere. The challenge will be in the UI and how we adapt it to the way we move about in our personal lives and in our work.

The use of interfaces allows for a programming style called programming to the interface. The idea behind this approach is to base programming logic on the interfaces of the objects used, rather than on internal implementation details. Programming to the interface reduces dependency on implementation specifics and makes code more reusable.

Pushing this idea to the extreme, inversion of control leaves the context to inject the code with the specific implementations of the interface that will be used to perform the work.

The next generation of apps will require developers to think more of the human as the user interface. It will become more about the need to know how an app works while a person stands up or with their arms in the air more so than if they’re sitting down and pressing keys with their fingers. Tables, counters and whiteboards will eventually become displays. Meeting rooms will have touch panels, and chalk boards will be replaced by large systems that have digital images and documents on a display that teachers can mark up with a stylus.

Microsoft General Manager Jeff Han gave developers at the Build Conference last week some advice for ways to think about building apps for this next generation of devices and displays. I am including his perspectives as well as four others who have spent time researching and developing products that fit with these future trends.

Han talked about the need to think how people will interact with apps on a smartphone or a large display. That’s a pretty common requirement now, but the complexity will change entirely as we start seeing a far wider selection of devices in different sizes. He said, for instance, developers need to think how people stand next to a large display, how high they have to reach and the way they use a stylus to write. The new devices we use will soon all have full multi-touch capabilities so a person can use all fingers and both hands to manipulate objects and create content. Here’s the full talk he gave at Build, which includes a discussion about the types of devices we can expect from Microsoft going forward.

Jim Spadaccini of Ideum, which makes large interactive displays, said in an email the primary consideration that his team thinks about is how multiple individuals interact together around a table. Does the application encourage collaboration? Is the application designed in such a way that multiple people can interact?

He said that in looking at these questions, issues such as the orientation of information and overall structure of the application become really critical:

We look to design applications that have elements that are omni-directional or symmetric. These allow individuals to approach a table from any direction (or the two “long” sides) to interact together. The interaction is as much social engagement — visitors interacting with each other — as it is about interaction with the program.

Cyborg Anthropologist Andrew Warner said to me in an email that there’s a tendency in computing to think that we are becoming increasingly disembodied. In some senses this is true. In other senses, though, this is becoming less true. Every generation of computing becomes more tactile. The first interfaces were awkward keyboards and terminal, then came the mouse (which required the whole arm to move), then the touchpad (which we lovingly stroke with our fingertips), and then the touchscreen (which integrated display and touch).

The next generation of technology will bring new ways for people to get similar tactile experiences that we get when we touch objects or materials. Developers need to remember that people are sensual beings, and our bodies are the best interfaces we have. Even though we have ways to transmit thoughts directly to music, people still use embodied interfaces because we have been fine-tuning our nervous systems throughout our entire lives as we learn to interact with our environment. Additionally, we are “wired” to receive a basic pleasure from physical activity (exercise gives us serotonin and dopamine feedback). Developers need to harness this and make computers sensual again.

People with little interest in computers have come to love their iPhones. They are easy to use because of their touch capabilities. This means we will see far more people using computers because they fit with their lives. Displays will be everywhere. The challenge will be in the UI and how we adapt it to the way we move about in our personal lives and in our work.

The original and abiding technical focus of HCI was and is the concept of usability.

In computing, an interface is a shared boundary across which two or more separate components of a computer system exchange information. The exchange can be between software, computer hardware, peripheral devices, humans and combinations of these. Some computer hardware devices, such as a touchscreen, can both send and receive data through the interface, while others such as a mouse or microphone may only provide an interface to send data to a given system. People with little interest in computers have come to love their iPhones. They are easy to use because of their touch capabilities. This means we will see far more people using computers because they fit with their lives. Displays will be everywhere. The challenge will be in the UI and how we adapt it to the way we move about in our personal lives and in our work.

Оригинальная и неизменная техническая направленность HCI была и является понятием юзабилити. В вычислительной технике интерфейс представляет собой общую границу, через которую два или более отдельных компонента компьютерной системы обмениваются информацией. Обмен может быть между программным обеспечением, компьютерным оборудованием, периферийными устройствами, людьми и комбинациями из них. Некоторые аппаратные устройства компьютера, такие как сенсорный экран, могут отправлять и получать данные через интерфейс, в то время как другие, такие как мышь или микрофон, могут предоставлять только интерфейс для отправки данных в данную систему. Люди с небольшим интересом к компьютерам пришли полюбить их iPhones. Они просты в использовании из-за их сенсорных возможностей. Это означает, что мы увидим гораздо больше людей, использующих компьютеры, потому что они соответствуют их жизни. Дисплеи будут везде. Задача будет в ПОЛЬЗОВАТЕЛЬСКОМ ИНТЕРФЕЙСе и как мы адаптируем его к тому, как мы двигаемся в нашей личной жизни и в нашей работе

Читайте также: