Implement ProgCode identity and real shared reading UI kit
Build and deploy / deploy (push) Successful in 2m39s
No files matched your search
@@ -0,0 +1,89 @@
|
||||
<!doctype html><html lang="ru"><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="data:,"><title>ProgCode — от вызова к механизму / концепция V3</title><script>try{const t=localStorage.getItem("progcode-concept-v3-theme")||"system";document.documentElement.dataset.theme=t==="dark"||(t==="system"&&matchMedia("(prefers-color-scheme:dark)").matches)?"dark":"light"}catch{}</script><style>
|
||||
:root{--bg:#f5f7fa;--surface:#fff;--ink:#142035;--muted:#526179;--line:#c1cad8;--accent:#1648c6;--signal:#e6ff57;--code:#101e36;--oncode:#e8eefb;--soft:#e7edf9;color-scheme:light}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font-family:Arial,Helvetica,sans-serif}html[data-theme=dark]{--bg:#111b2c;--surface:#18253a;--ink:#edf2fd;--muted:#b3c0d7;--line:#596b87;--accent:#9dbaff;--soft:#22334e;color-scheme:dark}button,input,textarea{font:inherit}a{color:inherit;text-decoration-thickness:1px;text-underline-offset:4px}button,a,input,textarea,summary{outline-offset:5px}*:focus-visible{outline:3px solid var(--accent)}button{cursor:pointer}header{max-width:1328px;margin:auto;padding:28px 32px 18px;display:flex;align-items:center;gap:32px;border-bottom:2px solid var(--ink)}.brand{display:flex;align-items:center;gap:11px;text-decoration:none;font-size:29px;font-weight:800;letter-spacing:-1.6px}.brand svg{width:42px;height:42px;color:var(--accent)}nav{display:flex;gap:24px;margin-left:auto}nav a{padding:12px 0;text-decoration:none;font-size:15px;font-weight:700}nav a[aria-current=page]{box-shadow:0 3px var(--accent)}.theme{border:1px solid var(--line);background:var(--surface);color:var(--ink);padding:12px}.notice{max-width:1264px;margin:12px auto 0;font:11px/1.6 monospace;color:var(--muted);letter-spacing:.05em}main{max-width:1328px;margin:auto;padding:40px 32px 80px}section[hidden],.entry[hidden]{display:none}.eyebrow,small,.mono{font:12px/1.6 monospace}.eyebrow{text-transform:uppercase;letter-spacing:.12em;color:var(--accent)}h1,h2,h3,p{margin-top:0}h1{font-size:clamp(38px,5.9vw,86px);line-height:1.01;letter-spacing:-.055em;margin-bottom:26px;max-width:1020px;font-weight:800}h2{font-size:32px;line-height:1.12;letter-spacing:-.03em}h3{font-size:25px;line-height:1.2;letter-spacing:-.025em;margin:7px 0 12px}.deck{font-size:21px;line-height:1.55;max-width:650px}.hero{display:grid;grid-template-columns:1.7fr 1fr;gap:56px;padding:14px 0 48px}.mechanism{background:#1648c6;color:white;padding:28px;align-self:start;position:relative;min-height:336px}.mechanism svg{width:100%;height:210px;display:block}.mechanism p{font:13px/1.6 monospace;margin:0;max-width:26ch}.section-head{border-top:2px solid var(--ink);display:flex;align-items:baseline;justify-content:space-between;padding:18px 0}.lead{display:grid;grid-template-columns:120px 1fr 260px;gap:32px;background:var(--soft);padding:32px 28px;border-left:6px solid var(--accent);margin-bottom:42px}.lead .num{font-size:70px;line-height:1;color:var(--accent);font-weight:bold;letter-spacing:-.06em}.lead h2{font-size:38px}.lead p{line-height:1.6}.lead aside{border-left:1px solid var(--line);padding-left:24px}.entry{display:grid;grid-template-columns:64px minmax(0,1fr) 30px;gap:20px;padding:25px 0;border-top:1px solid var(--line);text-decoration:none}.entry:hover h3{text-decoration:underline;color:var(--accent)}.entry h3,.entry p{overflow-wrap:anywhere}.entry-number{font:16px/2 monospace;color:var(--accent)}.entry small{color:var(--muted)}.entry p{color:var(--muted);line-height:1.6;margin-bottom:0;max-width:76ch}.arrow{font-size:20px;color:var(--accent)}.index-layout{display:grid;grid-template-columns:240px 1fr;gap:48px}.index-rail{border-top:2px solid var(--ink);padding-top:18px}.index-rail p{font-size:14px;line-height:1.6;color:var(--muted)}.topics{display:flex;gap:8px;flex-wrap:wrap;margin:18px 0}.topics button{background:var(--surface);color:var(--ink);border:1px solid var(--line);padding:10px 12px}.topics button[aria-pressed=true]{background:var(--accent);color:var(--bg);border-color:var(--accent)}label{display:block;font-size:14px;font-weight:bold;margin-bottom:10px}.searchrow{display:flex;gap:8px;max-width:600px}.searchrow input{width:100%;min-width:0;padding:14px;border:1px solid var(--muted);background:var(--surface);color:var(--ink)}.action{background:var(--accent);color:var(--bg);padding:13px 18px;border:1px solid var(--accent);font-weight:700}.secondary{background:var(--surface);color:var(--ink);border-color:var(--muted)}.result-count{padding:14px 0;color:var(--muted);font:13px/1.6 monospace}.reading-top{max-width:1000px;margin:0 0 42px 228px}.reading-top h1{font-size:clamp(35px,4.4vw,63px);line-height:1.08}.reading-layout{display:grid;grid-template-columns:180px minmax(0,720px);gap:48px}.toc{align-self:start;position:sticky;top:24px;font:13px/1.6 monospace;border-top:3px solid var(--accent);padding-top:16px}.toc a{display:block;padding:10px 0;color:var(--muted)}.prose{font-size:19px;line-height:1.7;min-width:0}.prose p{margin-bottom:1.15em}.prose h2{margin-top:48px;font-size:31px;line-height:1.2;scroll-margin-top:30px}.prose h3{margin-top:32px;font-size:24px}.prose a{color:var(--accent)}.prose pre,.spec pre{max-width:100%;overflow:auto;background:var(--code);color:var(--oncode);padding:24px;font:14px/1.7 monospace;border-left:4px solid #e6ff57}.prose code{font-family:monospace;font-size:.88em}.prose img{max-width:100%;height:auto;backgroundLine truncated
|
||||
</style><a class="skip" href="#main">К содержанию</a><header><a class="brand" href="#home"><svg viewBox="0 0 48 48" aria-hidden="true"><path d="M8 40V8h18l12 12-12 12H8M26 8v24M26 20h12" fill="none" stroke="currentColor" stroke-width="5" stroke-linejoin="miter"/><path d="M33 40h11" stroke="var(--signal)" stroke-width="5"/></svg>progcode<span style="color:var(--accent)">.</span></a><nav aria-label="Разделы"><a href="#home">Журнал</a><a href="#catalog">Все материалы</a><a href="#kit">Инструменты</a></nav><select class="theme" id="theme" aria-label="Цветовая тема"><option value="system">Системная</option><option value="light">Светлая</option><option value="dark">Тёмная</option></select></header><div class="notice">КОНЦЕПЦИЯ V3 · ОТДЕЛЬНЫЙ МАКЕТ · ИСТОРИЧЕСКИЕ МАТЕРИАЛЫ 2017–2019</div><main id="main"><section id="home"><div class="hero"><div><p class="eyebrow">Инженерный журнал / 14 материалов</p><h1>От вызова<br>к механизму.</h1><p class="deck">Механизмы D, прикладной Bitrix и диагностика окружения. Код, источники и ограничения версий в архиве 2017–2019.</p><p class="mono" style="color:var(--muted)">Архив 2017–2019 · версии и контекст — внутри материалов</p></div><div class="mechanism"><svg viewBox="0 0 350 210" aria-label="Схематический путь от вызова к исполнению" role="img"><g fill="none" stroke="white" stroke-width="2"><path d="M30 40h100v65h90V40h100M130 105v65h190"/><rect x="20" y="30" width="20" height="20" fill="#e6ff57" stroke="none"/><circle cx="130" cy="105" r="8" fill="#1648c6"/><rect x="310" y="30" width="20" height="20"/><rect x="310" y="160" width="20" height="20"/></g><g fill="white" font-family="monospace" font-size="13"><text x="20" y="80">ВЫЗОВ</text><text x="153" y="97">РАЗБОР</text><text x="240" y="198">ИСПОЛНЕНИЕ</text></g></svg><p>У кода есть поверхность.<br>У поведения — устройство.</p></div></div><div class="section-head"><h2>Разобрать механизм</h2><span class="mono">01 / В ФОКУСЕ</span></div><div class="lead"><span class="num">01</span><div><p class="eyebrow">D / Память · 24.06.2017</p><h2><a href="#article" data-open="7">DConf-2017. Под капотом мусорщика D</a></h2><p>Доклад Дмитрия Ольшанского: страницы памяти, малые объекты и выбор архитектуры сборщика.</p></div><aside><span class="mono">ВНУТРИ РАЗБОРА</span><p>От выделения блока до поиска ссылок. Полный перевод с поясняющими схемами.</p><a href="#article" data-open="7">Открыть материал →</a></aside></div><div class="section-head"><h2>Продолжить разбор</h2><span class="mono">D / СРЕДА / ПРАКТИКА</span></div><a class="entry" href="#article" data-open="9"><span class="entry-number">10</span><div><small>D · 26.05.2017</small><h3>Dlang. Новый движок CTFE</h3><p>Почему выполнение CTFE через AST могло расходовать много памяти и как NewCTFE предлагал отделить программу в компактный байт-код.</p></div><span class="arrow">↗</span></a><a class="entry" href="#article" data-open="10"><span class="entry-number">11</span><div><small>D · 23.05.2017</small><h3>Особенности Vibe.d</h3><p>Подробный обзор архитектуры vibe.d: волокна и события, сетевые API, рабочие потоки, метапрограммирование D и шаблоны Diet.</p></div><span class="arrow">↗</span></a><a class="entry" href="#article" data-open="2"><span class="entry-number">03</span><div><small>D · 25.08.2017</small><h3>О Tilix и D: интервью с Геральдом Нанном</h3><p>Разговор 2017 года с создателем Tilix: интерфейс GNOME, GtkD, управление памятью, инструменты разработки и сопровождение открытого проекта.</p></div><span class="arrow">↗</span></a><div class="section-head" style="margin-top:40px"><h2>Найти конкретный ответ</h2><a href="#catalog">Все 14 материалов →</a></div><a class="entry" href="#article" data-open="0"><span class="entry-number">01</span><div><small>JavaScript · 12.01.2019</small><h3>JavaScript. Использование jQuery в Webpack</h3><p>Как подключить jQuery через импорт, ProvidePlugin или внешнюю зависимость Webpack и не перепуLine truncated
|
||||
# либо
|
||||
yarn add jquery</code></pre><p class="mono">Код прокручивается внутри блока. Tab → стрелки.</p></div><div class="spec"><h2>Таблица / CTFE / 26.05.2017</h2><p><a href="#article" data-open="9">Dlang. Новый движок CTFE</a></p><div class="prose scroll" tabindex="0" aria-label="Таблица CTFE"><table><thead><tr><th>Вопрос</th><th>Выполнение AST</th><th>Отдельный байт-код</th></tr></thead><tbody><tr><td>Представление программы</td><td>Структуры синтаксического дерева компилятора</td><td>Инструкции для специализированной виртуальной машины</td></tr><tr><td>Цена подготовки</td><td>Можно использовать существующее дерево</td><td>Нужен дополнительный этап генерации инструкций</td></tr><tr><td>Временные значения</td><td>Зависят от устройства узлов и интерпретатора</td><td>Можно спроектировать отдельное компактное хранение</td></tr><tr><td>Главная сложность</td><td>Не сделать обход и создание узлов слишком дорогими</td><td>Сохранить семантику всех поддерживаемых конструкций</td></tr></tbody></table></div></div><div class="spec"><h2>Схема / GC / 24.06.2017</h2><p><a href="#article" data-open="7">DConf-2017. Под капотом мусорщика D (Дмитрий Ольшанский)</a></p><div class="prose"><figure><img src="visuals/v2/d-gc-pools.svg" alt="Малый пул использует страницы с классами размеров; крупный объект занимает последовательность страниц" width="640" height="1250" loading="lazy" decoding="async" /><figcaption>Модель пулов из разбора 2017 года: округление малого объекта и размещение большого объекта по страницам.</figcaption></figure></div></div><div class="spec"><h2>Полный D-модуль / 17.06.2017</h2><p><a href="#article" data-open="8">Пишем аналог функции PHP preg_match_all на языке программирования D</a></p><p>«Пишем аналог функции PHP preg_match_all на языке программирования D»</p><details><summary>Открыть полный исходник и unittest</summary><pre tabindex="0" aria-label="Пример кода, прокрутка клавишами со стрелками"><code>module preg;
|
||||
|
||||
import std.regex : matchAll, regex, ctRegex;
|
||||
|
||||
struct Capture {
|
||||
string text;
|
||||
long position; // byte offset, -1 when an optional group did not participate
|
||||
}
|
||||
|
||||
class PReg {
|
||||
static string[][] matchAllPatternOrder(R)(string subject, R re, out size_t count) {
|
||||
string[][] result;
|
||||
count = 0;
|
||||
foreach (hit; matchAll(subject, re)) {
|
||||
if (result.length == 0) result.length = hit.length;
|
||||
foreach (i; 0 .. hit.length) result[i] ~= hit[i];
|
||||
++count;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
static string[][] matchAllSetOrder(R)(string subject, R re, out size_t count) {
|
||||
string[][] result;
|
||||
count = 0;
|
||||
foreach (hit; matchAll(subject, re)) {
|
||||
string[] row;
|
||||
foreach (i; 0 .. hit.length) row ~= hit[i];
|
||||
result ~= row;
|
||||
++count;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
static Capture[][] matchAllOffsetCapture(R)(string subject, R re, out size_t count) {
|
||||
Capture[][] result;
|
||||
count = 0;
|
||||
foreach (hit; matchAll(subject, re)) {
|
||||
if (result.length == 0) result.length = hit.length;
|
||||
foreach (i; 0 .. hit.length) {
|
||||
auto part = hit[i];
|
||||
long position = part.ptr is null
|
||||
? -1
|
||||
: cast(long)(part.ptr - subject.ptr);
|
||||
result[i] ~= Capture(part, position);
|
||||
}
|
||||
++count;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
unittest {
|
||||
size_t count;
|
||||
auto pattern = regex(`(\w)(\w)\w+`);
|
||||
|
||||
auto byGroup = PReg.matchAllPatternOrder("one two", pattern, count);
|
||||
assert(count == 2);
|
||||
assert(byGroup == [["one", "two"], ["o", "t"], ["n", "w"]]);
|
||||
|
||||
auto byMatch = PReg.matchAllSetOrder("one two", pattern, count);
|
||||
assert(count == 2);
|
||||
assert(byMatch == [["one", "o", "n"], ["two", "t", "w"]]);
|
||||
|
||||
auto offsets = PReg.matchAllOffsetCapture("one two", ctRegex!(`(\w)(\w)\w+`), count);
|
||||
assert(count == 2);
|
||||
assert(offsets[0][0] == Capture("one", 0));
|
||||
assert(offsets[0][1] == Capture("two", 4));
|
||||
assert(offsets[1][1] == Capture("t", 4));
|
||||
assert(offsets[2][1] == Capture("w", 5));
|
||||
|
||||
assert(PReg.matchAllPatternOrder("---", pattern, count).length == 0);
|
||||
assert(count == 0);
|
||||
assert(PReg.matchAllSetOrder("", pattern, count).length == 0);
|
||||
assert(count == 0);
|
||||
assert(PReg.matchAllOffsetCapture("---", pattern, count).length == 0);
|
||||
assert(count == 0);
|
||||
|
||||
auto moreGroups = PReg.matchAllPatternOrder("abc def", regex(`(\w)(\w)(\w)`), count);
|
||||
assert(moreGroups == [["abc", "def"], ["a", "d"], ["b", "e"], ["c", "f"]]);
|
||||
|
||||
auto unicodeOffsets = PReg.matchAllOffsetCapture("я x", regex(`x`), count);
|
||||
assert(count == 1);
|
||||
assert(unicodeOffsets[0][0].position == 3); // UTF-8 bytes, not character index
|
||||
}</code></pre></details></div><div class="spec"><h2>Bitrix FileInput / 19.10.2018</h2><p><a href="#article" data-open="1">Bitrix API. Вставка на страницу встроенного редактора картинок</a></p><div class="prose"><figure><img src="visuals/v2/bitrix-file-preview.jpg" alt="Поле изображения Bitrix с превью, кнопками выбора файла и редактирования" width="435" height="280" loading="lazy" decoding="async" /><figcaption>Элемент выбора изображения в форме Bitrix: превью и кнопки управления.</figcaption></figure></div></div><div class="spec"><h2>Знак и сигналы</h2><div class="identityspec"><svg viewBox="0 0 48 48" aria-hidden="true"><path d="M8 40V8h18l12 12-12 12H8M26 8v24M26 20h12" fill="none" stroke="currentColor" stroke-width="5" stroke-linejoin="miter"/><path d="M33 40h11" stroke="var(--signal)" stroke-width="5"/></svg><span style="font-size:25px;font-weight:800">progcode.</span></div><p class="mono">Новый векторный эскиз / не текущий favicon</p><div class="swatches"><span style="background:#142035"></span><span style="background:#1648c6"></span><span style="background:#e6ff57"></span><span style="background:#f5f7fa"></span></div><div class="state success">JSON корректен. Можно скопировать результат.</div><div class="state error">Не удалось разобрать JSON. Проверьте кавычки и запятые.</div><p><a href="#article" data-open="13">Короткая статья: «Привет, мой читатель!»</a></p></div></div></section></main><footer><a href="#catalog">Указатель материалов</a><a href="#kit">Мастерская</a><span>ProgCode / архив 2017–2019</span><p>Концепция оформления. Политика конфиденциальности, источники и сведения о доступности остаются обязательными страницами действующего сайта.</p></footer><script>const articles=[{"slug": "использование-jquery-в-webpack", "title": "JavaScript. Использование jQuery в Webpack", "date": "2019-01-12T21:54:18+00:00", "excerpt": "Как подключить jQuery через импорт, ProvidePlugin или внешнюю зависимость Webpack и не перепутать модульную область с window.", "author": "DarkRiDDeR", "categories": ["JavaScript"], "cover": "", "contentHtml": "<p>Заметка появилась в 2019 году, когда проектам нередко приходилось совмещать модули Webpack с jQuery-плагинами, ожидающими глобальную переменную. Здесь важно различать три задачи: импортировать библиотеку в модуль, автоматически подставлять импорт в исходники и открыть jQuery внешнему скрипту на странице.</p><h2 id=\"section-1\">Установка и обычный импорт</h2><p>Установите зависимость одним из менеджеров пакетов:</p><pre tabindex=\"0\" aria-label=\"Пример кода, прокрутка клавишами со стрелками\"><code>npm install jquery\n# либо\nyarn add jquery</code></pre><p>Если вы управляете исходным модулем, явный импорт проще скрытой зависимости:</p><pre tabindex=\"0\" aria-label=\"Пример кода, прокрутка клавишами со стрелками\"><code>import $ from 'jquery';\n\n$('.notice').text('Готово');</code></pre><h2 id=\"section-2\">ProvidePlugin: идентификаторы внутри сборки</h2><p>ProvidePlugin обнаруживает свободные идентификаторы в обрабатываемых Webpack модулях и подставляет загрузку зависимости. Такая настройка сама по себе не обещает, что произвольный внешний скрипт увидит <code>window.jQuery</code>. Конфигурация CommonJS:</p><pre tabindex=\"0\" aria-label=\"Пример кода, прокрутка клавишами со стрелками\"><code>const webpack = require('webpack');\n\nmodule.exports = {\n plugins: [\n new webpack.ProvidePlugin({\n $: 'jquery',\n jQuery: 'jquery',\n }),\n ],\n};</code></pre><p>Область действия и специальное сопоставление <code>window.jQuery</code> описаны в <a href=\"https://webpack.js.org/plugins/provide-plugin/\" rel=\"noopener noreferrer\">документации ProvidePlugin</a>. ВыбLine truncated
|
||||
let selected=7,topic='';const qs=s=>document.querySelector(s);function article(i){selected=i;const a=articles[i];qs('#article-title').textContent=a.title;qs('#article-meta').textContent=a.categories.join(' / ')+' · '+a.date.slice(0,10).split('-').reverse().join('.');qs('#article-excerpt').textContent=a.excerpt;qs('#author').textContent='Публикация: '+a.author+' · Историческая публикация';qs('#body').innerHTML=a.contentHtml.replaceAll('/assets/','/web/public/assets/');qs('#body').querySelectorAll('pre').forEach(p=>{p.tabIndex=0;p.setAttribute('aria-label','Код с горизонтальной прокруткой')});qs('#toc-links').innerHTML=[...qs('#body').querySelectorAll('h2')].map(h=>'<a href="#'+h.id+'" data-anchor="'+h.id+'">'+h.textContent+'</a>').join('');}function route(){let hash=location.hash.slice(1)||'home';if(!['home','catalog','article','kit'].includes(hash))return;document.querySelectorAll('main>section').forEach(s=>s.hidden=s.id!==hash);document.querySelectorAll('nav a').forEach(a=>{if(a.hash==='#'+hash)a.setAttribute('aria-current','page');else a.removeAttribute('aria-current')});window.scrollTo(0,0)}document.addEventListener('click',e=>{const open=e.target.closest('[data-open]');if(open){article(+open.dataset.open);if(location.hash==='#article')window.scrollTo(0,0)}const anchor=e.target.closest('[data-anchor]');if(anchor){e.preventDefault();document.getElementById(anchor.dataset.anchor).scrollIntoView();}});window.addEventListener('hashchange',route);const media=matchMedia('(prefers-color-scheme:dark)');function applyTheme(){const t=qs('#theme').value;document.documentElement.dataset.theme=t==='dark'||(t==='system'&&media.matches)?'dark':'light'}try{qs('#theme').value=localStorage.getItem('progcode-concept-v3-theme')||'system'}catch{}qs('#theme').onchange=()=>{try{localStorage.setItem('progcode-concept-v3-theme',qs('#theme').value)}catch{}applyTheme()};media.addEventListener('change',applyTheme);applyTheme();function filter(){let q=qs('#query').value.toLowerCase();let rows=[...qs('#results').children];let n=0;rows.forEach((r,i)=>{let match=(!q||(articles[i].title+' '+articles[i].excerpt).toLowerCase().includes(q))&&(!topic||articles[i].categories.includes(topic));r.hidden=!match;if(match)n++});qs('#count').textContent='Найдено: '+n+(!n?' · Попробуйте другой запрос или сбросьте фильтры.':'')}qs('#query').oninput=filter;qs('#reset').onclick=()=>{topic='';qs('#query').value='';document.querySelectorAll('[data-topic]').forEach(b=>b.setAttribute('aria-pressed',!b.dataset.topic));filter();qs('#query').focus()};document.querySelectorAll('[data-topic]').forEach(b=>b.onclick=()=>{topic=b.dataset.topic;document.querySelectorAll('[data-topic]').forEach(c=>c.setAttribute('aria-pressed',c===b));filter()});qs('#format').onclick=()=>{try{qs('#json').value=JSON.stringify(JSON.parse(qs('#json').value),null,2);qs('#jsonstate').className='state success';qs('#jsonstate').textContent='JSON корректен. Отформатировано.'}catch(e){qs('#jsonstate').className='state error';qs('#jsonstate').textContent='Не удалось разобрать JSON: '+e.message}};article(7);route();</script></html>
|
||||
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="640" height="1100" viewBox="0 0 640 1100" role="img" aria-labelledby="title desc"><title id="title">Схема работы FileInput</title><desc id="desc">Выбранное изображение доступно для редактирования при edit=true. Контрол выводит и передаёт значение поля picture, а серверный обработчик отдельно проверяет и сохраняет файл. Это схема, а не снимок интерфейса.</desc><defs><marker id="arrow" markerWidth="9" markerHeight="9" refX="7" refY="4" orient="auto"><path d="M0 0 8 4 0 8" fill="none" stroke="#b64d26" stroke-width="1.6"/></marker><pattern id="hatch" width="9" height="9" patternUnits="userSpaceOnUse"><path d="M-2 2 2-2 M0 9 9 0 M7 11 11 7" stroke="#d8d0c0" stroke-width="2"/></pattern></defs><rect width="640" height="1100" rx="4" fill="#fbf8f1"/><g font-family="Arial,Helvetica,sans-serif" fill="#242824"><text x="32" y="44" font-size="20" font-weight="bold" fill="#b64d26" text-anchor="start" font-family="monospace">08 / BITRIX</text><text x="32" y="87" font-size="33" font-weight="bold" fill="#242824" text-anchor="start">Схема работы FileInput</text><text x="32" y="122" font-size="24" font-weight="normal" fill="#676961" text-anchor="start">Показать контрол ≠ сохранить файл.</text><path d="M32 148 H608" fill="none" stroke="#d8d0c0" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/><rect x="32" y="176" width="576" height="184" rx="10" fill="white" stroke="#d8d0c0" stroke-width="2"/><text x="54" y="214" font-size="27" font-weight="bold" fill="#242824" text-anchor="start">1. Выбрать изображение</text><path d="M62 238 H140 L166 264 V334 H62 Z" fill="#efe9dd" stroke="#242824" stroke-width="2"/><path d="M140 238 V264 H166" fill="none" stroke="#d8d0c0" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/><circle cx="87" cy="278" r="8" fill="#b64d26" stroke="#b64d26" stroke-width="2"/><path d="M70 323 l29-27 17 15 18-17 25 29" fill="none" stroke="#242824" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/><text x="202" y="263" font-size="25" font-weight="normal" fill="#327057" text-anchor="start" font-family="monospace">allowUpload => 'I'</text><text x="202" y="300" font-size="25" font-weight="normal" fill="#327057" text-anchor="start" font-family="monospace">upload => true</text><text x="202" y="337" font-size="25" font-weight="normal" fill="#327057" text-anchor="start" font-family="monospace">maxCount => 1</text><path d="M320 362 V403" fill="none" stroke="#b64d26" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" marker-end="url(#arrow)"/><rect x="32" y="425" width="576" height="199" rx="10" fill="#efe9dd" stroke="#242824" stroke-width="2"/><text x="54" y="464" font-size="27" font-weight="bold" fill="#242824" text-anchor="start">2. Редактировать изображение</text><text x="54" y="504" font-size="27" font-weight="normal" fill="#327057" text-anchor="start" font-family="monospace">edit => true</text><path d="M75 532 V575 H122 M65 544 H109 V585" fill="none" stroke="#242824" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/><text x="145" y="566" font-size="24" font-weight="normal" fill="#242824" text-anchor="start">кадрирование</text><path d="M418 570 a24 24 0 1 1 37-23" fill="none" stroke="#242824" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/><path d="M455 531 V547 H439" fill="none" stroke="#242824" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/><text x="477" y="566" font-size="24" font-weight="normal" fill="#242824" text-anchor="start">поворот</text><text x="54" y="608" font-size="23" font-weight="normal" fill="#676961" text-anchor="start">Набор инструментов зависит от версии.</text><path d="M320 626 V666" fill="none" stroke="#b64d26" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" marker-end="url(#arrow)"/><rect x="32" y="688" width="576" height="109" rx="10" fill="white" stroke="#d8d0c0" stroke-width="2"/><text x="54" y="728" font-size="27" font-weight="bold" fill="#242824" text-anchor="start">3. Значение поля формы</text><text x="54" y="770" font-size="27" font-weight="normal" fill="#327057" text-anchor="start" font-family="monospace">name => 'picture'</text><path d="M320 799 V854" fill="none" stroke="#b64d26" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" marker-end="url(#arrow)"/><text x="347" y="837" font-size="23" font-weight="normal" fill="#676961" text-anchor="start">отправка формы</text><rect x="32" y="879" width="576" height="130" rx="10" fill="#242824" stroke="#242824" stroke-width="2"/><text x="54" y="919" font-size="27" font-weight="bold" fill="#fbf8f1" text-ancLine truncated
|
||||
|
After Width: | Height: | Size: 5.4 KiB |
|
After Width: | Height: | Size: 21 KiB |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="640" height="1090" viewBox="0 0 640 1090" role="img" aria-labelledby="title desc"><title id="title">Товар, предложение и цена в Bitrix</title><desc id="desc">Одна родительская карточка товара связана с несколькими предложениями через SKU-свойство. Товарные параметры и цена варианта относятся к offerId, а не productId.</desc><defs><marker id="arrow" markerWidth="9" markerHeight="9" refX="7" refY="4" orient="auto"><path d="M0 0 8 4 0 8" fill="none" stroke="#b64d26" stroke-width="1.6"/></marker><pattern id="hatch" width="9" height="9" patternUnits="userSpaceOnUse"><path d="M-2 2 2-2 M0 9 9 0 M7 11 11 7" stroke="#d8d0c0" stroke-width="2"/></pattern></defs><rect width="640" height="1090" rx="4" fill="#fbf8f1"/><g font-family="Arial,Helvetica,sans-serif" fill="#242824"><text x="32" y="44" font-size="20" font-weight="bold" fill="#b64d26" text-anchor="start" font-family="monospace">03 / BITRIX</text><text x="32" y="87" font-size="33" font-weight="bold" fill="#242824" text-anchor="start">Товар ≠ предложение</text><text x="32" y="122" font-size="24" font-weight="normal" fill="#676961" text-anchor="start">У карточки и варианта разные идентификаторы.</text><path d="M32 148 H608" fill="none" stroke="#d8d0c0" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/><rect x="32" y="178" width="576" height="197" rx="10" fill="white" stroke="#d8d0c0" stroke-width="2"/><text x="54" y="215" font-size="22" font-weight="bold" fill="#b64d26" text-anchor="start">ИНФОБЛОК ТОВАРОВ</text><path d="M81 244 l39-17 25 17 26-9 25 44-29 17-12-16 v70 H86 v-70 l-12 16-29-17 25-44 Z" fill="#efe9dd" stroke="#242824" stroke-width="2"/><text x="230" y="263" font-size="30" font-weight="bold" fill="#242824" text-anchor="start">Футболка</text><text x="230" y="302" font-size="27" font-weight="normal" fill="#327057" text-anchor="start" font-family="monospace">productId = 120</text><text x="230" y="340" font-size="25" font-weight="normal" fill="#676961" text-anchor="start">Общее описание</text><path d="M320 376 V414 H170 V455" fill="none" stroke="#b64d26" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" marker-end="url(#arrow)"/><path d="M320 414 H470 V455" fill="none" stroke="#b64d26" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" marker-end="url(#arrow)"/><text x="343" y="404" font-size="24" font-weight="bold" fill="#b64d26" text-anchor="start">1</text><text x="193" y="457" font-size="25" font-weight="bold" fill="#b64d26" text-anchor="start">*</text><text x="493" y="457" font-size="25" font-weight="bold" fill="#b64d26" text-anchor="start">*</text><rect x="32" y="477" width="276" height="187" rx="10" fill="white" stroke="#d8d0c0" stroke-width="2"/><text x="52" y="513" font-size="21" font-weight="bold" fill="#b64d26" text-anchor="start">ПРЕДЛОЖЕНИЕ</text><text x="52" y="554" font-size="28" font-weight="bold" fill="#242824" text-anchor="start">Размер M</text><text x="52" y="593" font-size="25" font-weight="normal" fill="#327057" text-anchor="start" font-family="monospace">offerId = 121</text><text x="52" y="631" font-size="23" font-weight="normal" fill="#242824" text-anchor="start">SKU-свойство: 120</text><rect x="332" y="477" width="276" height="187" rx="10" fill="white" stroke="#d8d0c0" stroke-width="2"/><text x="352" y="513" font-size="21" font-weight="bold" fill="#b64d26" text-anchor="start">ПРЕДЛОЖЕНИЕ</text><text x="352" y="554" font-size="28" font-weight="bold" fill="#242824" text-anchor="start">Размер L</text><text x="352" y="593" font-size="25" font-weight="normal" fill="#327057" text-anchor="start" font-family="monospace">offerId = 122</text><text x="352" y="631" font-size="23" font-weight="normal" fill="#242824" text-anchor="start">SKU-свойство: 120</text><text x="32" y="946" font-size="24" font-weight="normal" fill="#676961" text-anchor="start">SKU_PROPERTY_ID указывает свойство,</text><text x="32" y="983" font-size="24" font-weight="normal" fill="#676961" text-anchor="start">значение свойства — productId товара.</text><path d="M170 666 V714" fill="none" stroke="#b64d26" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" marker-end="url(#arrow)"/><path d="M470 666 V714" fill="none" stroke="#b64d26" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" marker-end="url(#arrow)"/><rect x="32" y="736" width="276" height="155" rx="10" fill="#efe9dd" stroke="#242824" stroke-width="2"/><text x="50" y="775" font-size="25" font-weight="bold" fill="#242824" text-anchor="start">catalog: ID=121</text><text x="50" y="815" font-size="26" font-weight="normal" fill="#327057" text-anchor="start" font-family="monospace">цена:</Line truncated
|
||||
|
After Width: | Height: | Size: 5.7 KiB |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="640" height="880" viewBox="0 0 640 880" role="img" aria-labelledby="title desc"><title id="title">CTFE и выполнение программы</title><desc id="desc">Одна функция square используется компилятором для вычисления enum, а с данными пользователя выполняется после запуска программы.</desc><defs><marker id="arrow" markerWidth="9" markerHeight="9" refX="7" refY="4" orient="auto"><path d="M0 0 8 4 0 8" fill="none" stroke="#b64d26" stroke-width="1.6"/></marker><pattern id="hatch" width="9" height="9" patternUnits="userSpaceOnUse"><path d="M-2 2 2-2 M0 9 9 0 M7 11 11 7" stroke="#d8d0c0" stroke-width="2"/></pattern></defs><rect width="640" height="880" rx="4" fill="#fbf8f1"/><g font-family="Arial,Helvetica,sans-serif" fill="#242824"><text x="32" y="44" font-size="20" font-weight="bold" fill="#b64d26" text-anchor="start" font-family="monospace">01 / D</text><text x="32" y="87" font-size="33" font-weight="bold" fill="#242824" text-anchor="start">Когда выполняется функция</text><text x="32" y="122" font-size="24" font-weight="normal" fill="#676961" text-anchor="start">Решает контекст вызова, а не имя функции.</text><path d="M32 148 H608" fill="none" stroke="#d8d0c0" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/><rect x="32" y="176" width="576" height="95" rx="10" fill="white" stroke="#d8d0c0" stroke-width="2"/><text x="54" y="210" font-size="23" font-weight="normal" fill="#676961" text-anchor="start">Одна функция</text><text x="54" y="247" font-size="28" font-weight="normal" fill="#327057" text-anchor="start" font-family="monospace">int square(int x) => x * x;</text><path d="M320 272 V310 H170 V338" fill="none" stroke="#b64d26" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" marker-end="url(#arrow)"/><path d="M320 310 H470 V338" fill="none" stroke="#b64d26" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" marker-end="url(#arrow)"/><text x="170" y="380" font-size="22" font-weight="bold" fill="#b64d26" text-anchor="middle">КОМПИЛЯЦИЯ</text><text x="470" y="380" font-size="22" font-weight="bold" fill="#b64d26" text-anchor="middle">ЗАПУСК</text><rect x="32" y="405" width="276" height="120" rx="10" fill="white" stroke="#d8d0c0" stroke-width="2"/><text x="52" y="442" font-size="27" font-weight="normal" fill="#327057" text-anchor="start" font-family="monospace">enum n =</text><text x="52" y="481" font-size="27" font-weight="normal" fill="#327057" text-anchor="start" font-family="monospace">square(3);</text><rect x="332" y="405" width="276" height="120" rx="10" fill="white" stroke="#d8d0c0" stroke-width="2"/><text x="352" y="442" font-size="25" font-weight="normal" fill="#242824" text-anchor="start">Ввод пользователя</text><text x="352" y="481" font-size="25" font-weight="normal" fill="#327057" text-anchor="start" font-family="monospace">square(input)</text><path d="M170 526 V573" fill="none" stroke="#b64d26" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" marker-end="url(#arrow)"/><path d="M470 526 V573" fill="none" stroke="#b64d26" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" marker-end="url(#arrow)"/><path d="M62 595 H277 L302 650 277 705 H62 L37 650 Z" fill="#efe9dd" stroke="#242824" stroke-width="2"/><text x="170" y="642" font-size="31" font-weight="bold" fill="#242824" text-anchor="middle">CTFE</text><text x="170" y="676" font-size="23" font-weight="normal" fill="#676961" text-anchor="middle">в компиляторе</text><rect x="336" y="596" width="268" height="109" rx="10" fill="#242824" stroke="#242824" stroke-width="2"/><text x="470" y="641" font-size="25" font-weight="normal" fill="#fbf8f1" text-anchor="middle">Машинный код</text><text x="470" y="676" font-size="23" font-weight="normal" fill="#d8d0c0" text-anchor="middle">в процессе</text><path d="M170 706 V751" fill="none" stroke="#b64d26" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" marker-end="url(#arrow)"/><path d="M470 706 V751" fill="none" stroke="#b64d26" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" marker-end="url(#arrow)"/><text x="170" y="792" font-size="31" font-weight="bold" fill="#242824" text-anchor="middle" font-family="monospace">n = 9</text><text x="470" y="792" font-size="25" font-weight="bold" fill="#242824" text-anchor="middle">Результат ввода</text><text x="32" y="844" font-size="24" font-weight="normal" fill="#676961" text-anchor="start">CTFE: значение нужно ещё до запуска программы.</text></g></svg>
|
||||
|
After Width: | Height: | Size: 4.7 KiB |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="720" height="260" viewBox="0 0 720 260" role="img" aria-labelledby="title desc"><title id="title">CTFE: вызов превращается в константу</title><desc id="desc">Компилятор выполняет square(3), когда значение требуется для enum, и получает константу n, равную 9.</desc><defs><marker id="arrow" markerWidth="9" markerHeight="9" refX="7" refY="4" orient="auto"><path d="M0 0 8 4 0 8" fill="none" stroke="#b64d26" stroke-width="1.6"/></marker></defs><rect width="720" height="260" fill="#fbf8f1"/><g font-family="Arial,Helvetica,sans-serif" fill="#242824"><text x="24" y="44" font-size="20" font-weight="bold" fill="#b64d26" text-anchor="start">ВЫЗОВ</text><text x="360" y="44" font-size="20" font-weight="bold" fill="#b64d26" text-anchor="middle">КОМПИЛЯТОР</text><text x="520" y="44" font-size="20" font-weight="bold" fill="#b64d26" text-anchor="start">КОНСТАНТА</text><text x="24" y="133" font-size="32" font-weight="normal" fill="#327057" text-anchor="start" font-family="monospace">square(3)</text><path d="M217 123 H270" fill="none" stroke="#b64d26" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" marker-end="url(#arrow)"/><rect x="292" y="73" width="136" height="104" rx="6" fill="#242824" stroke="#242824" stroke-width="2"/><path d="M309 61 V73 M309 177 V189" fill="none" stroke="#242824" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/><path d="M340 61 V73 M340 177 V189" fill="none" stroke="#242824" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/><path d="M371 61 V73 M371 177 V189" fill="none" stroke="#242824" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/><path d="M402 61 V73 M402 177 V189" fill="none" stroke="#242824" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/><path d="M280 89 H292 M428 89 H440" fill="none" stroke="#242824" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/><path d="M280 113 H292 M428 113 H440" fill="none" stroke="#242824" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/><path d="M280 137 H292 M428 137 H440" fill="none" stroke="#242824" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/><path d="M280 161 H292 M428 161 H440" fill="none" stroke="#242824" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/><text x="360" y="118" font-size="30" font-weight="bold" fill="#fbf8f1" text-anchor="middle">CTFE</text><text x="360" y="152" font-size="25" font-weight="normal" fill="#e7c9a9" text-anchor="middle">3 × 3</text><path d="M453 123 H502" fill="none" stroke="#b64d26" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" marker-end="url(#arrow)"/><text x="520" y="112" font-size="27" font-weight="normal" fill="#327057" text-anchor="start" font-family="monospace">enum</text><text x="520" y="152" font-size="35" font-weight="normal" fill="#327057" text-anchor="start" font-family="monospace">n = 9;</text><path d="M24 214 H696" fill="none" stroke="#d8d0c0" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/><text x="360" y="245" font-size="23" font-weight="normal" fill="#676961" text-anchor="middle">Значение известно до запуска программы</text></g></svg>
|
||||
|
After Width: | Height: | Size: 3.3 KiB |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="640" height="1250" viewBox="0 0 640 1250" role="img" aria-labelledby="title desc"><title id="title">Малые и большие пулы GC D</title><desc id="desc">В описании GC 2017 года малые объекты округляются до класса размера и размещаются блоками на странице. Большой объект занимает ряд страниц; таблица хранит страницу его начала.</desc><defs><marker id="arrow" markerWidth="9" markerHeight="9" refX="7" refY="4" orient="auto"><path d="M0 0 8 4 0 8" fill="none" stroke="#b64d26" stroke-width="1.6"/></marker><pattern id="hatch" width="9" height="9" patternUnits="userSpaceOnUse"><path d="M-2 2 2-2 M0 9 9 0 M7 11 11 7" stroke="#d8d0c0" stroke-width="2"/></pattern></defs><rect width="640" height="1250" rx="4" fill="#fbf8f1"/><g font-family="Arial,Helvetica,sans-serif" fill="#242824"><text x="32" y="44" font-size="20" font-weight="bold" fill="#b64d26" text-anchor="start" font-family="monospace">07 / D GC</text><text x="32" y="87" font-size="33" font-weight="bold" fill="#242824" text-anchor="start">Как пул раскладывает объекты</text><text x="32" y="122" font-size="24" font-weight="normal" fill="#676961" text-anchor="start">Две структуры из разбора реализации 2017 года.</text><path d="M32 148 H608" fill="none" stroke="#d8d0c0" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/><text x="32" y="198" font-size="22" font-weight="bold" fill="#b64d26" text-anchor="start">МАЛЫЕ ОБЪЕКТЫ: ДО 2048 БАЙТ</text><text x="32" y="240" font-size="27" font-weight="bold" fill="#242824" text-anchor="start">Запрос 40 байт → класс 64 байта</text><text x="32" y="277" font-size="25" font-weight="normal" fill="#676961" text-anchor="start">Классы: 16, 32, 64, …, 2048</text><rect x="32" y="306" width="576" height="209" rx="10" fill="#efe9dd" stroke="#242824" stroke-width="2"/><text x="54" y="342" font-size="21" font-weight="bold" fill="#b64d26" text-anchor="start">ФРАГМЕНТ СТРАНИЦЫ</text><rect x="54" y="365" width="59" height="66" rx="3" fill="#fbf8f1" stroke="#b64d26" stroke-width="2"/><text x="83" y="405" font-size="22" font-weight="normal" fill="#242824" text-anchor="middle">40</text><path d="M92 368 V429" fill="none" stroke="#d8d0c0" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/><rect x="121" y="365" width="59" height="66" rx="3" fill="url(#hatch)" stroke="#d8d0c0" stroke-width="2"/><rect x="188" y="365" width="59" height="66" rx="3" fill="#fbf8f1" stroke="#d8d0c0" stroke-width="2"/><rect x="255" y="365" width="59" height="66" rx="3" fill="url(#hatch)" stroke="#d8d0c0" stroke-width="2"/><rect x="322" y="365" width="59" height="66" rx="3" fill="url(#hatch)" stroke="#d8d0c0" stroke-width="2"/><rect x="389" y="365" width="59" height="66" rx="3" fill="#fbf8f1" stroke="#d8d0c0" stroke-width="2"/><rect x="456" y="365" width="59" height="66" rx="3" fill="url(#hatch)" stroke="#d8d0c0" stroke-width="2"/><rect x="523" y="365" width="59" height="66" rx="3" fill="url(#hatch)" stroke="#d8d0c0" stroke-width="2"/><text x="54" y="473" font-size="23" font-weight="normal" fill="#242824" text-anchor="start">64 байта / блок · штриховка — свободно</text><text x="54" y="505" font-size="23" font-weight="normal" fill="#676961" text-anchor="start">В первом занято 40; остаток — резерв.</text><path d="M320 517 V554" fill="none" stroke="#b64d26" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" marker-end="url(#arrow)"/><rect x="32" y="577" width="576" height="101" rx="10" fill="white" stroke="#d8d0c0" stroke-width="2"/><text x="54" y="615" font-size="26" font-weight="bold" fill="#242824" text-anchor="start">Таблица страниц → класс размера</text><text x="54" y="653" font-size="23" font-weight="normal" fill="#676961" text-anchor="start">Битовые карты: отметки / свободные блоки</text><path d="M32 711 H608" fill="none" stroke="#d8d0c0" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/><text x="32" y="756" font-size="21" font-weight="bold" fill="#b64d26" text-anchor="start">БОЛЬШИЕ ОБЪЕКТЫ: СВЫШЕ 2048 БАЙТ</text><text x="32" y="799" font-size="27" font-weight="bold" fill="#242824" text-anchor="start">Запрос 9000 байт → 3 страницы</text><text x="32" y="837" font-size="25" font-weight="normal" fill="#676961" text-anchor="start">Шаг выделения — страница 4 КиБ</text><rect x="32" y="866" width="576" height="169" rx="10" fill="#efe9dd" stroke="#242824" stroke-width="2"/><text x="102" y="902" font-size="22" font-weight="normal" fill="#676961" text-anchor="middle">0</text><rect x="54" y="920" width="98" height="78" rx="Line truncated
|
||||
|
After Width: | Height: | Size: 6.7 KiB |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="640" height="1040" viewBox="0 0 640 1040" role="img" aria-labelledby="title desc"><title id="title">Пулы памяти и mark-sweep</title><desc id="desc">Корневые ссылки ведут к объектам в пулах. При маркировке обходятся достижимые объекты. Недостижимый объект становится кандидатом на освобождение; освобождённый блок снова доступен выделителю.</desc><defs><marker id="arrow" markerWidth="9" markerHeight="9" refX="7" refY="4" orient="auto"><path d="M0 0 8 4 0 8" fill="none" stroke="#b64d26" stroke-width="1.6"/></marker><pattern id="hatch" width="9" height="9" patternUnits="userSpaceOnUse"><path d="M-2 2 2-2 M0 9 9 0 M7 11 11 7" stroke="#d8d0c0" stroke-width="2"/></pattern></defs><rect width="640" height="1040" rx="4" fill="#fbf8f1"/><g font-family="Arial,Helvetica,sans-serif" fill="#242824"><text x="32" y="44" font-size="20" font-weight="bold" fill="#b64d26" text-anchor="start" font-family="monospace">04 / D GC</text><text x="32" y="87" font-size="33" font-weight="bold" fill="#242824" text-anchor="start">От ссылок — к свободным блокам</text><text x="32" y="122" font-size="24" font-weight="normal" fill="#676961" text-anchor="start">Упрощённая модель mark–sweep.</text><path d="M32 148 H608" fill="none" stroke="#d8d0c0" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/><rect x="32" y="179" width="576" height="80" rx="10" fill="#242824" stroke="#242824" stroke-width="2"/><text x="320" y="230" font-size="27" font-weight="normal" fill="#fbf8f1" text-anchor="middle">Корни: стек, регистры, данные</text><path d="M200 260 V344" fill="none" stroke="#b64d26" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" marker-end="url(#arrow)"/><path d="M440 260 V344" fill="none" stroke="#b64d26" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" marker-end="url(#arrow)"/><rect x="32" y="368" width="576" height="267" rx="10" fill="#efe9dd" stroke="#242824" stroke-width="2"/><text x="54" y="408" font-size="22" font-weight="bold" fill="#b64d26" text-anchor="start">ПУЛ ПАМЯТИ</text><circle cx="155" cy="486" r="47" fill="#fbf8f1" stroke="#242824" stroke-width="2"/><text x="155" y="497" font-size="35" font-weight="bold" fill="#242824" text-anchor="middle">A</text><circle cx="189" cy="452" r="12" fill="#b64d26" stroke="#b64d26" stroke-width="2"/><circle cx="454" cy="486" r="47" fill="#fbf8f1" stroke="#242824" stroke-width="2"/><text x="454" y="497" font-size="35" font-weight="bold" fill="#242824" text-anchor="middle">B</text><circle cx="488" cy="452" r="12" fill="#b64d26" stroke="#b64d26" stroke-width="2"/><path d="M203 486 H395" fill="none" stroke="#b64d26" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" marker-end="url(#arrow)"/><text x="300" y="468" font-size="22" font-weight="normal" fill="#676961" text-anchor="middle">ссылка</text><rect x="68" y="563" width="213" height="43" rx="10" fill="url(#hatch)" stroke="#d8d0c0" stroke-width="2"/><text x="174" y="592" font-size="23" font-weight="normal" fill="#676961" text-anchor="middle">свободно</text><circle cx="454" cy="575" r="32" fill="#fbf8f1" stroke="#d8d0c0" stroke-width="2"/><text x="454" y="585" font-size="27" font-weight="normal" fill="#676961" text-anchor="middle">C</text><path d="M491 551 l24 24 M515 551 l-24 24" fill="none" stroke="#b64d26" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/><text x="32" y="683" font-size="24" font-weight="bold" fill="#b64d26" text-anchor="start" font-family="monospace">01 MARK</text><text x="32" y="719" font-size="26" font-weight="normal" fill="#242824" text-anchor="start">От корней отмечаем A и B.</text><text x="32" y="756" font-size="25" font-weight="normal" fill="#676961" text-anchor="start">До C нет пути по найденным ссылкам.</text><path d="M320 781 V822" fill="none" stroke="#b64d26" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" marker-end="url(#arrow)"/><rect x="32" y="845" width="576" height="111" rx="10" fill="#efe9dd" stroke="#242824" stroke-width="2"/><text x="54" y="882" font-size="24" font-weight="bold" fill="#b64d26" text-anchor="start" font-family="monospace">02 SWEEP</text><text x="54" y="922" font-size="25" font-weight="normal" fill="#242824" text-anchor="start">Блок C возвращается в свободные.</text><text x="32" y="1004" font-size="23" font-weight="normal" fill="#676961" text-anchor="start">Финализаторы и ложные ссылки усложняют сборку.</text></g></svg>
|
||||
|
After Width: | Height: | Size: 4.7 KiB |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="720" height="480" viewBox="0 0 720 480" role="img" aria-labelledby="title desc"><title id="title">Сессии и панели Tilix</title><desc id="desc">Схема: в боковой панели две сессии. Активная сессия содержит три терминальные панели: слева одна высокая, справа две, расположенные друг над другом. Верхнюю панель окна с кнопками рисует приложение — CSD.</desc><rect width="720" height="480" fill="#fbf8f1"/><g font-family="Arial,Helvetica,sans-serif" fill="#242824"><rect x="18" y="20" width="684" height="408" rx="10" fill="#fbf8f1" stroke="#242824" stroke-width="2"/><path d="M28 20 H692 Q702 20 702 30 V82 H18 V30 Q18 20 28 20Z" fill="#efe9dd"/><path d="M18 82 H702" fill="none" stroke="#242824" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/><text x="39" y="61" font-size="27" font-weight="bold" fill="#242824" text-anchor="start">Tilix: схема организации</text><text x="513" y="59" font-size="22" font-weight="normal" fill="#676961" text-anchor="start" font-family="monospace">CSD</text><circle cx="612" cy="51" r="10" fill="#fbf8f1" stroke="#242824" stroke-width="2"/><circle cx="646" cy="51" r="10" fill="#fbf8f1" stroke="#242824" stroke-width="2"/><circle cx="680" cy="51" r="10" fill="#fbf8f1" stroke="#242824" stroke-width="2"/><rect x="30" y="96" width="151" height="318" rx="6" fill="#efe9dd" stroke="#d8d0c0" stroke-width="2"/><text x="44" y="132" font-size="22" font-weight="bold" fill="#b64d26" text-anchor="start">СЕССИИ</text><rect x="41" y="151" width="129" height="103" rx="6" fill="#f1d3c1" stroke="#b64d26" stroke-width="2"/><text x="58" y="190" font-size="24" font-weight="bold" fill="#242824" text-anchor="start">Сессия</text><text x="58" y="229" font-size="29" font-weight="bold" fill="#b64d26" text-anchor="start">1</text><rect x="41" y="274" width="129" height="103" rx="6" fill="#fbf8f1" stroke="#d8d0c0" stroke-width="2"/><text x="58" y="313" font-size="24" font-weight="normal" fill="#242824" text-anchor="start">Сессия</text><text x="58" y="352" font-size="29" font-weight="normal" fill="#676961" text-anchor="start">2</text><text x="205" y="124" font-size="22" font-weight="bold" fill="#b64d26" text-anchor="start">АКТИВНАЯ СЕССИЯ</text><rect x="202" y="144" width="224" height="270" rx="3" fill="#242824" stroke="#242824" stroke-width="2"/><rect x="442" y="144" width="242" height="127" rx="3" fill="#242824" stroke="#242824" stroke-width="2"/><rect x="442" y="287" width="242" height="127" rx="3" fill="#242824" stroke="#242824" stroke-width="2"/><text x="220" y="182" font-size="25" font-weight="normal" fill="#fbf8f1" text-anchor="start">Панель A</text><text x="220" y="225" font-size="25" font-weight="normal" fill="#83b196" text-anchor="start" font-family="monospace">$ _</text><text x="460" y="182" font-size="25" font-weight="normal" fill="#fbf8f1" text-anchor="start">Панель B</text><text x="460" y="225" font-size="25" font-weight="normal" fill="#83b196" text-anchor="start" font-family="monospace">$ _</text><text x="460" y="325" font-size="25" font-weight="normal" fill="#fbf8f1" text-anchor="start">Панель C</text><text x="460" y="368" font-size="25" font-weight="normal" fill="#83b196" text-anchor="start" font-family="monospace">$ _</text><text x="360" y="466" font-size="24" font-weight="normal" fill="#676961" text-anchor="middle">Сессия объединяет несколько терминальных панелей.</text></g></svg>
|
||||
|
After Width: | Height: | Size: 3.6 KiB |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="640" height="1040" viewBox="0 0 640 1040" role="img" aria-labelledby="title desc"><title id="title">Цепочка доверия TLS</title><desc id="desc">Сервер отправляет сертификат сайта и промежуточный сертификат. Клиент проверяет подписи до локально доверенного корневого центра, имя сайта и срок действия.</desc><defs><marker id="arrow" markerWidth="9" markerHeight="9" refX="7" refY="4" orient="auto"><path d="M0 0 8 4 0 8" fill="none" stroke="#b64d26" stroke-width="1.6"/></marker><pattern id="hatch" width="9" height="9" patternUnits="userSpaceOnUse"><path d="M-2 2 2-2 M0 9 9 0 M7 11 11 7" stroke="#d8d0c0" stroke-width="2"/></pattern></defs><rect width="640" height="1040" rx="4" fill="#fbf8f1"/><g font-family="Arial,Helvetica,sans-serif" fill="#242824"><text x="32" y="44" font-size="20" font-weight="bold" fill="#b64d26" text-anchor="start" font-family="monospace">02 / TLS</text><text x="32" y="87" font-size="33" font-weight="bold" fill="#242824" text-anchor="start">От сервера — до доверия</text><text x="32" y="122" font-size="24" font-weight="normal" fill="#676961" text-anchor="start">Сертификат сайта и CA bundle — разные вещи.</text><path d="M32 148 H608" fill="none" stroke="#d8d0c0" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/><text x="32" y="188" font-size="22" font-weight="bold" fill="#b64d26" text-anchor="start">СЕРВЕР ОТПРАВЛЯЕТ</text><path d="M84 210 H476 L508 242 V334 H84 Z" fill="white" stroke="#242824" stroke-width="2"/><path d="M476 210 V242 H508" fill="none" stroke="#d8d0c0" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/><text x="106" y="249" font-size="27" font-weight="bold" fill="#242824" text-anchor="start">Сертификат сайта</text><text x="106" y="286" font-size="24" font-weight="normal" fill="#676961" text-anchor="start">Имя: example.com</text><text x="106" y="318" font-size="22" font-weight="normal" fill="#327057" text-anchor="start" font-family="monospace">leaf / конечный</text><circle cx="551" cy="279" r="25" fill="#efe9dd" stroke="#b64d26" stroke-width="2"/><path d="M540 279 l8 8 15-18" fill="none" stroke="#b64d26" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/><path d="M294 337 V378" fill="none" stroke="#b64d26" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" marker-end="url(#arrow)"/><text x="324" y="366" font-size="22" font-weight="normal" fill="#676961" text-anchor="start">проверка подписи</text><path d="M84 397 H476 L508 429 V521 H84 Z" fill="white" stroke="#242824" stroke-width="2"/><path d="M476 397 V429 H508" fill="none" stroke="#d8d0c0" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/><text x="106" y="436" font-size="27" font-weight="bold" fill="#242824" text-anchor="start">Промежуточный CA</text><text x="106" y="473" font-size="24" font-weight="normal" fill="#676961" text-anchor="start">Выдал сертификат сайта</text><text x="106" y="505" font-size="22" font-weight="normal" fill="#327057" text-anchor="start" font-family="monospace">intermediate</text><circle cx="551" cy="466" r="25" fill="#efe9dd" stroke="#b64d26" stroke-width="2"/><path d="M540 466 l8 8 15-18" fill="none" stroke="#b64d26" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/><path d="M294 523 V572" fill="none" stroke="#b64d26" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" marker-end="url(#arrow)"/><text x="324" y="554" font-size="22" font-weight="normal" fill="#676961" text-anchor="start">проверка подписи</text><path d="M32 587 H608" fill="none" stroke="#d8d0c0" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" stroke-dasharray="6 7"/><text x="32" y="627" font-size="22" font-weight="bold" fill="#b64d26" text-anchor="start">ХРАНИЛИЩЕ КЛИЕНТА</text><rect x="58" y="655" width="524" height="142" rx="10" fill="#efe9dd" stroke="#242824" stroke-width="2"/><path d="M80 655 V641 H225 L247 655" fill="#efe9dd" stroke="#242824" stroke-width="2"/><text x="84" y="695" font-size="27" font-weight="bold" fill="#242824" text-anchor="start">Доверенный корневой CA</text><text x="84" y="734" font-size="25" font-weight="normal" fill="#242824" text-anchor="start">Системное хранилище</text><text x="84" y="769" font-size="25" font-weight="normal" fill="#242824" text-anchor="start">или настроенный CA bundle</text><path d="M294 798 V839" fill="none" stroke="#b64d26" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" marker-end="url(#arrow)"/><text x="32" y="883" font-size="26" font-weight="bold" fill="#242824" text-anchor="start">Подписи + имя сайта + срок действия</text><tLine truncated
|
||||
|
After Width: | Height: | Size: 5.4 KiB |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="640" height="1100" viewBox="0 0 640 1100" role="img" aria-labelledby="title desc"><title id="title">Как fiber ждёт ввод-вывод в vibe.d</title><desc id="desc">На одном потоке fiber A уступает управление при ожидании read. Цикл событий запускает fiber B, а после готовности ввода-вывода возвращает управление fiber A.</desc><defs><marker id="arrow" markerWidth="9" markerHeight="9" refX="7" refY="4" orient="auto"><path d="M0 0 8 4 0 8" fill="none" stroke="#b64d26" stroke-width="1.6"/></marker><pattern id="hatch" width="9" height="9" patternUnits="userSpaceOnUse"><path d="M-2 2 2-2 M0 9 9 0 M7 11 11 7" stroke="#d8d0c0" stroke-width="2"/></pattern></defs><rect width="640" height="1100" rx="4" fill="#fbf8f1"/><g font-family="Arial,Helvetica,sans-serif" fill="#242824"><text x="32" y="44" font-size="20" font-weight="bold" fill="#b64d26" text-anchor="start" font-family="monospace">05 / VIBE.D</text><text x="32" y="87" font-size="33" font-weight="bold" fill="#242824" text-anchor="start">Ожидание без простоя потока</text><text x="32" y="122" font-size="24" font-weight="normal" fill="#676961" text-anchor="start">Один поток, несколько кооперативных задач.</text><path d="M32 148 H608" fill="none" stroke="#d8d0c0" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/><text x="48" y="192" font-size="23" font-weight="bold" fill="#b64d26" text-anchor="start">FIBER A</text><text x="366" y="192" font-size="23" font-weight="bold" fill="#b64d26" text-anchor="start">FIBER B</text><path d="M160 235 V678" fill="none" stroke="#d8d0c0" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/><path d="M478 235 V678" fill="none" stroke="#d8d0c0" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/><rect x="32" y="224" width="256" height="94" rx="10" fill="white" stroke="#d8d0c0" stroke-width="2"/><text x="52" y="260" font-size="25" font-weight="bold" fill="#242824" text-anchor="start">Читаем запрос</text><text x="52" y="297" font-size="25" font-weight="normal" fill="#327057" text-anchor="start" font-family="monospace">read()</text><path d="M160 319 V363" fill="none" stroke="#b64d26" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" marker-end="url(#arrow)"/><rect x="32" y="387" width="256" height="105" rx="10" fill="#efe9dd" stroke="#d8d0c0" stroke-width="2"/><text x="52" y="426" font-size="25" font-weight="bold" fill="#242824" text-anchor="start">Ожидание I/O</text><text x="52" y="465" font-size="24" font-weight="normal" fill="#676961" text-anchor="start">уступить поток</text><path d="M289 440 H457 V492" fill="none" stroke="#b64d26" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" marker-end="url(#arrow)"/><text x="371" y="420" font-size="21" font-weight="normal" fill="#676961" text-anchor="middle">переключение</text><rect x="350" y="516" width="258" height="103" rx="10" fill="#242824" stroke="#242824" stroke-width="2"/><text x="370" y="554" font-size="25" font-weight="bold" fill="#fbf8f1" text-anchor="start">Другая задача</text><text x="370" y="591" font-size="24" font-weight="normal" fill="#d8d0c0" text-anchor="start">выполняет код</text><path d="M478 620 V668 H310 V725" fill="none" stroke="#b64d26" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" marker-end="url(#arrow)"/><rect x="32" y="748" width="576" height="101" rx="10" fill="#efe9dd" stroke="#242824" stroke-width="2"/><circle cx="77" cy="797" r="20" fill="#fbf8f1" stroke="#b64d26" stroke-width="2"/><path d="M69 797 l6 6 12-15" fill="none" stroke="#b64d26" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/><text x="114" y="790" font-size="25" font-weight="bold" fill="#242824" text-anchor="start">Цикл событий: I/O готово</text><text x="114" y="827" font-size="24" font-weight="normal" fill="#676961" text-anchor="start">Fiber A можно возобновить</text><path d="M160 850 V893" fill="none" stroke="#b64d26" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" marker-end="url(#arrow)"/><rect x="32" y="916" width="576" height="83" rx="10" fill="white" stroke="#d8d0c0" stroke-width="2"/><text x="52" y="950" font-size="26" font-weight="bold" fill="#242824" text-anchor="start">Fiber A продолжает после read()</text><text x="52" y="984" font-size="24" font-weight="normal" fill="#676961" text-anchor="start">с сохранённым стеком и состоянием</text><text x="32" y="1055" font-size="22" font-weight="normal" fill="#b64d26" text-anchor="start">Долгий CPU-цикл без уступки задержит другие fibers.</text></g></svg>
|
||||
|
After Width: | Height: | Size: 4.8 KiB |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="640" height="1170" viewBox="0 0 640 1170" role="img" aria-labelledby="title desc"><title id="title">Диагностика самозапуска браузера</title><desc id="desc">Задание планировщика связывает триггер и действие запуска. Нужно изучить путь программы и аргументы, сохранить описание, отключить только подтверждённо подозрительное задание и выполнить проверку защиты.</desc><defs><marker id="arrow" markerWidth="9" markerHeight="9" refX="7" refY="4" orient="auto"><path d="M0 0 8 4 0 8" fill="none" stroke="#b64d26" stroke-width="1.6"/></marker><pattern id="hatch" width="9" height="9" patternUnits="userSpaceOnUse"><path d="M-2 2 2-2 M0 9 9 0 M7 11 11 7" stroke="#d8d0c0" stroke-width="2"/></pattern></defs><rect width="640" height="1170" rx="4" fill="#fbf8f1"/><g font-family="Arial,Helvetica,sans-serif" fill="#242824"><text x="32" y="44" font-size="20" font-weight="bold" fill="#b64d26" text-anchor="start" font-family="monospace">06 / WINDOWS</text><text x="32" y="87" font-size="33" font-weight="bold" fill="#242824" text-anchor="start">Почему открывается браузер</text><text x="32" y="122" font-size="24" font-weight="normal" fill="#676961" text-anchor="start">Задание связывает событие с действием.</text><path d="M32 148 H608" fill="none" stroke="#d8d0c0" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/><rect x="32" y="180" width="576" height="154" rx="10" fill="white" stroke="#d8d0c0" stroke-width="2"/><text x="54" y="219" font-size="28" font-weight="bold" fill="#242824" text-anchor="start">Задание планировщика</text><circle cx="78" cy="276" r="27" fill="#fbf8f1" stroke="#242824" stroke-width="2"/><path d="M78 255 V276 L92 285" fill="none" stroke="#242824" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/><text x="122" y="271" font-size="25" font-weight="bold" fill="#242824" text-anchor="start">Триггер</text><text x="122" y="307" font-size="23" font-weight="normal" fill="#676961" text-anchor="start">время / событие</text><path d="M319 278 H369" fill="none" stroke="#b64d26" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" marker-end="url(#arrow)"/><text x="402" y="272" font-size="25" font-weight="bold" fill="#242824" text-anchor="start">Действие</text><text x="402" y="308" font-size="23" font-weight="normal" fill="#676961" text-anchor="start">запуск</text><path d="M320 335 V378" fill="none" stroke="#b64d26" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" marker-end="url(#arrow)"/><path d="M320 399 L593 487 320 575 47 487 Z" fill="#efe9dd" stroke="#242824" stroke-width="2"/><text x="320" y="469" font-size="28" font-weight="bold" fill="#242824" text-anchor="middle">Что запускается?</text><text x="320" y="508" font-size="24" font-weight="normal" fill="#676961" text-anchor="middle">Путь + аргументы + URL</text><path d="M320 576 V617" fill="none" stroke="#b64d26" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" marker-end="url(#arrow)"/><rect x="32" y="640" width="576" height="112" rx="10" fill="white" stroke="#d8d0c0" stroke-width="2"/><text x="54" y="679" font-size="27" font-weight="bold" fill="#242824" text-anchor="start">Сохранить сведения о задании</text><text x="54" y="720" font-size="24" font-weight="normal" fill="#676961" text-anchor="start">Имя, триггеры, действия или XML</text><path d="M320 753 V794" fill="none" stroke="#b64d26" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" marker-end="url(#arrow)"/><rect x="32" y="816" width="576" height="122" rx="10" fill="#242824" stroke="#242824" stroke-width="2"/><text x="54" y="855" font-size="26" font-weight="bold" fill="#fbf8f1" text-anchor="start">Отключить подозрительное задание</text><text x="54" y="894" font-size="24" font-weight="normal" fill="#d8d0c0" text-anchor="start">Только после проверки назначения.</text><text x="54" y="925" font-size="23" font-weight="normal" fill="#d8d0c0" text-anchor="start">Системные задания не отключать наугад.</text><path d="M320 939 V980" fill="none" stroke="#b64d26" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" marker-end="url(#arrow)"/><rect x="32" y="1002" width="576" height="88" rx="10" fill="white" stroke="#d8d0c0" stroke-width="2"/><text x="54" y="1039" font-size="26" font-weight="bold" fill="#242824" text-anchor="start">Проверить устройство защитным ПО</text><text x="54" y="1075" font-size="24" font-weight="normal" fill="#676961" text-anchor="start">и повторно провеLine truncated
|
||||
|
After Width: | Height: | Size: 5.1 KiB |