TelenkovDmitry před 2 týdny
rodič
revize
d04a45e998

+ 35 - 21
.obsidian/workspace.json

@@ -27,12 +27,26 @@
             "state": {
               "type": "markdown",
               "state": {
-                "file": "English/Text 7.md",
+                "file": "hardcore web development/11. SQL/Задание.md",
                 "mode": "source",
                 "source": false
               },
               "icon": "lucide-file",
-              "title": "Text 7"
+              "title": "Задание"
+            }
+          },
+          {
+            "id": "4b9fbcb0df661fd6",
+            "type": "leaf",
+            "state": {
+              "type": "markdown",
+              "state": {
+                "file": "Дата и время.md",
+                "mode": "source",
+                "source": false
+              },
+              "icon": "lucide-file",
+              "title": "Дата и время"
             }
           },
           {
@@ -50,7 +64,7 @@
             }
           }
         ],
-        "currentTab": 1
+        "currentTab": 2
       }
     ],
     "direction": "vertical"
@@ -73,7 +87,7 @@
                 "autoReveal": false
               },
               "icon": "lucide-folder-closed",
-              "title": "Files"
+              "title": "Файловый менеджер"
             }
           },
           {
@@ -173,25 +187,32 @@
   },
   "left-ribbon": {
     "hiddenItems": {
-      "switcher:Open quick switcher": false,
-      "graph:Open graph view": false,
-      "canvas:Create new canvas": false,
-      "command-palette:Open command palette": false,
-      "markdown-importer:Open format converter": false
+      "switcher:Меню быстрого перехода": false,
+      "graph:Граф": false,
+      "canvas:Создать новый холст": false,
+      "command-palette:Открыть палитру команд": false,
+      "markdown-importer:Импорт Markdown-файлов": false
     }
   },
-  "active": "51931cca7cde6660",
+  "active": "4b9fbcb0df661fd6",
   "lastOpenFiles": [
-    "English/Homework 3.md",
-    "ROTEK/universal IO/universal IO.md",
+    "hardcore web development/11. SQL/Задание.md",
+    "Дата и время.md",
+    "hardcore web development/11. SQL/Создание таблиц.md",
     "hardcore web development/11. SQL/Типы данных.md",
     "hardcore web development/11. SQL/SQL настройка.md",
+    "English/homework 2.md",
+    "English/Homework.md",
+    "English/Homework 3.md",
+    "English/Text 7.md",
+    "todo/Разное.md",
+    "todo/Счета.md",
+    "todo/Задачи по направлениям.md",
+    "ROTEK/universal IO/universal IO.md",
     "hardcore web development/11. SQL/NULL, coalecse.md",
     "hardcore web development/11. SQL/Сортировка данных.md",
-    "English/Text 7.md",
     "English/words.md",
     "Python/telegram bot/aiogram.md",
-    "English/homework 2.md",
     "img/flat/1-1.jpg",
     "img/flat/photo_2025-03-12_10-00-03.jpg",
     "img/flat/photo_2025-03-12_09-52-12.jpg",
@@ -203,23 +224,16 @@
     "img/flat/photo_2025-03-12_09-51-41 (4).jpg",
     "img/flat/photo_2025-03-12_09-51-41 (3).jpg",
     "img/flat",
-    "todo/Счета.md",
-    "todo/Разное.md",
-    "todo/Задачи по направлениям.md",
     "Кодинг.md",
-    "hardcore web development/11. SQL/Задание.md",
     "Python/venv.md",
     "Python/telegram bot",
     "proGit.md",
     "Комментарии.md",
-    "hardcore web development/11. SQL/Создание таблиц.md",
     "ROTEK/BT_6714.md",
     "todo/Тренировки и занятия.md",
     "English/Text 6.md",
     "link.md",
-    "English/Homework.md",
     "Python/function основное.md",
-    "Python/jinja.md",
     "English/img/13-5.JPEG.~tmp",
     "English/img/13-4.JPEG.~tmp",
     "docs/sniffers_texto.pdf",

+ 6 - 6
English/Homework 3.md

@@ -1,14 +1,14 @@
 ~={green}76 Translate into English=~
 1. Что вы делаете? - Мы готовимся к концерту. What are you doing? - We are getting ready for the concert.
 2. Куда ты идешь? - Я иду в библиотеку. Where are you going? - I am going to the library.
-3. Где Николай? - Он в читальном зале. Он там выполняет домашние задания. Николай часто выполняет домашние задания в читальном зале. Where is Nikolay? - He is in the reading room. He does his homework. Nikolay often does his homework in the reading room.
+3. Где Николай? - Он в читальном зале. Он там выполняет домашние задания. Николай часто выполняет домашние задания в читальном зале. Where is Nikolay? - He is in the reading room. He is doing his homework. Nikolay often does his homework in the reading room.
 4. Что сейчас делает Виктор? - Он ремонтирует свой радиоприемник. What is Victor doing now? He is reparing hid radio.
-5. Елена дома? - Нет, ее нет дома. У нее сейчас урок музыки. У нее всегда уроки музыки после обеда. Is Elena at home? - No she isn't at home. She is having a music lesson now. She always has music lessons after lunch.
-6. Кто сейчас в спортзале? - Там тренируются ученики нашего класса. Они тренируются дважды в неделю. Who is in the gym now? - Pupils of our class are training there. They train twice a week.
+5. Елена дома? - Нет, ее нет дома. У нее сейчас урок музыки. У нее всегда уроки музыки после обеда. Is Helen at home? - No she isn't at home. She is having a music lesson now. She always has music lessons after lunch.
+6. Кто сейчас в спортзале? - Там тренируются ученики нашего класса. Они тренируются дважды в неделю. Who is in the gym now? - The pupils of our class are training there. They train twice a week.
 7. Не шумите. Папа говорит по телефону. Don't make noise. Father is talking on the phone.
-8. Не заходите в ту комнату. Там ученики нашего класса сдают экзамен по математике. Don't enter that room. Pupils of our class are taking a math exam there.
-9. Ученики сдают экзамены один раз в год. Pupils take exams once a year.
-10. Дождь идет? - Нет, дождя нет, но дует сильный ветер. Is it raining? No, it isn't raining, but there is a strong wind.
+8. Не заходите в ту комнату. Там ученики нашего класса сдают экзамен по математике. Don't enter that room. The pupils of our class are taking a math exam there.
+9. Ученики сдают экзамены один раз в год. The pupils take exams once a year.
+10. Дождь идет? - Нет, дождя нет, но дует сильный ветер. Is it raining? No, it isn't, but a strong wind is blowing.
 11. Мы выезжаем завтра утром. We are leaving tomorrow morning.
 12. Его сын собирается стать агрономом. His son is going to become an agronomist.
 13. Что вы собираетесь делать? What are you going to do?

+ 1 - 1
English/Text 7.md

@@ -1,6 +1,6 @@
 			Is it acceptable to delete friends from facebook?
 This qustion is something that my friends often talk about. Most of my own friends think that there is nothing wrong with it, but others - including my mother - think deleting Facebook friends should be a capital offence.
 I think the first real issue is whether or not our Facebook friends are our friends in real life too. I never accept strangers onto my Facebook profile - or any other social network. At the same time, though, I would not call many of my Facebook 'friends' actual friends. I have many friends from school and university on Facebook, but I speak to very few of them. Many are people I have met only once, or are old colleagues. While I do know everybody, I really cannot claim that they are all my friends.
-Every time I delete somebody form Facebook I think about how I would feel being deleted. I don't have to imagine - I have been deleted by plenty of people. Before, whenever I realised that somebody had deleted me, I desperately searched to find out who it was. I've stopped doing that - I have learned that if I cannot work out who deleted me, they probably weren't that important to me. I remember when Facebook was still a new social network. Taking about deleting people was always done in whisper - it could not be spoken about openly, in case somebody overhead and was offended. Now deleting 'friends' is much more common, and often spoken about among friends (real-life ones, that is). People nowadays even announce on Facebook that they are about to delete a number of people. This is, I think, to make you feel lucky if you are 'saved', but it often has the opposite effect.
+Every time I delete somebody form Facebook I think about how I would feel being deleted. I don't have to imagine - I have been deleted by plenty of people. Before, whenever I realised that somebody had deleted me, I desperately searched to find out who it was. I've stopped doing that - I have learned that if I cannot work out who deleted me, they probably weren't that important to me. I remember when Facebook was still a new social network. Talking about deleting people was always done in whisper - it could not be spoken about openly, in case somebody overhead and was offended. Now deleting 'friends' is much more common, and often spoken about among friends (real-life ones, that is). People nowadays even announce on Facebook that they are about to delete a number of people. This is, I think, to make you feel lucky if you are 'saved', but it often has the opposite effect.
 I think the answer to the question of deleting friends is quite simple. Friedships are not permanent. Very few relationships really are. Why, then, should Facebook 'friendships' be permanent? I think we have to delete friends in order to reflect the realities of real-life relationships.
 Deleting a few friends is acceptable, I think. There is one thing I do know, though: deleting your mother is not acceptable. I learnt that one the hard way.

+ 8 - 0
hardcore web development/11. SQL/Задание.md

@@ -1,5 +1,11 @@
+Создание таблицы с ограничениями
+
+```sql
+create table color (name text check (length(name) between 4 and 20));
+```
 
 Запрос выводит округленные значения до второго знака
+
 ```sql
 create temp table numbers(num numeric(10,5));
 table numbers;
@@ -8,6 +14,7 @@ select round(num, 2) as num from numbers;
 ```
 
 Создание простой таблицы и обновление значений
+
 ```sql
 create table smth (a int);
 insert into smth(a) values (1), (2), (3);
@@ -16,6 +23,7 @@ update smth set a = a * 2;
 ```
 
 Хитрое создание таблицы без указания ее столбцов
+
 ```sql
 create table crows as select * from species where genus_id=(
     select genus_id from genus where genus_name='Ворон'

+ 40 - 1
hardcore web development/11. SQL/Типы данных.md

@@ -70,4 +70,43 @@ SELECT pg_column_size(333::numeric(3)); -- 8
 
 То есть, храня эти данные правильно, мы экономим на диске 32 с хвостиком гигабайта. Если эта колонка будет еще в индексе где-то участвовать, то ещё больше места мы сэкономим, потому что информация в индексе дублирует информацию в основной таблице для ускорения поиска.
 
-Ну и помимо оптимизации хранения мы также получаем оптимизацию производительности, потому что меньше данных нам надо считывать с диска и так далее. Считать 260 мегабайт значительно быстрее, чем 33 гигабайта.
+Ну и помимо оптимизации хранения мы также получаем оптимизацию производительности, потому что меньше данных нам надо считывать с диска и так далее. Считать 260 мегабайт значительно быстрее, чем 33 гигабайта.
+
+~={yellow}Перечисления=~
+```sql
+create type day_of_week as enum (
+	'понедельник',
+	'вторник',
+	...
+)
+
+-- Создаем таблицу с полем типа day_of_week
+create table advertiser_support_work_time (
+    day_of_week day_of_week primary key,
+    start_time time not null,
+    end_time time not null
+);
+
+-- Вставляем данные
+insert into advertiser_support_work_time (day_of_week, start_time, end_time) values
+    ('понедельник', '09:00:00', '19:00:00'),
+    ('вторник', '09:00:00', '19:00:00'),
+    ('среда', '09:00:00', '19:00:00'),
+    ('четверг', '09:00:00', '19:00:00'),
+    ('пятница', '09:00:00', '19:00:00'),
+    ('суббота', '10:00:00', '19:00:00'),
+    ('воскресенье', '10:00:00', '19:00:00');
+
+select * from advertiser_support_work_time;
+```
+
+``` sql
+-- Создание таблицы с помощью проверки check
+create table color (
+	name varchar(22) primary key check(name in (
+		'адовый красный',
+		'ядрёный зелёный',
+		'подозрительная мурена'
+	))
+);
+```

+ 0 - 0
Дата и время.md