{"id":409837,"date":"2024-06-29T21:01:29","date_gmt":"2024-06-29T21:01:29","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=409837"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=409837","title":{"rendered":"<span>\u0421\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442 \u0434\u043b\u044f \u0414\u0436\u043e\u043d\u043d\u0438<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u042f \u0447\u0435\u043b\u043e\u0432\u0435\u043a \u0434\u0430\u043b\u0435\u043a\u0438\u0439 \u043e\u0442 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u0436\u0438\u0432\u0443 \u0437\u0430 \u043a\u043e\u043b\u044e\u0447\u043a\u043e\u0439 \u0438 \u043b\u044e\u0431\u043b\u044e \u0431\u0438\u0442\u044c \u0431\u0430\u043a\u043b\u0443\u0448\u0438. \u041d\u043e \u0441\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u043d\u0435\u043f\u0440\u0435\u0434\u0432\u0438\u0434\u0435\u043d\u043d\u043e\u0435, \u043c\u043e\u0435\u043c\u0443 \u0441\u0435\u0440\u0431\u0441\u043a\u043e\u043c\u0443 \u0434\u0440\u0443\u0433\u0443 \u0414\u0436\u043e\u043d\u043d\u0438, \u043f\u0440\u0438\u0435\u0445\u0430\u0432\u0448\u0435\u043c\u0443 \u0432 \u0433\u043e\u0441\u0442\u0438, \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u043b\u0441\u044f QR-\u043a\u043e\u0434. \u041f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0440\u0430\u0441\u0447\u0435\u0445\u043b\u0438\u0442\u044c \u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u0443.<\/p>\n<h2>\u041a\u0440\u0430\u0442\u043a\u043e\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u0435 \u043f\u0435\u0440\u0432\u043e\u0439 \u0441\u0435\u0440\u0438\u0438<\/h2>\n<p>\u041a\u043e \u043c\u043d\u0435 \u043f\u0440\u0438\u0435\u0445\u0430\u043b \u043c\u043e\u0439 \u0441\u0435\u0440\u0431\u0441\u043a\u0438\u0439 \u043f\u0440\u0438\u044f\u0442\u0435\u043b\u044c \u041d\u0438\u043a\u043e\u043b\u0430 \u041f\u0430\u0432\u043b\u043e\u0432\u0438\u0447, \u0432\u0430\u043a\u0446\u0438\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439<sup>2<\/sup> \u041f\u0444\u0430\u0439\u0437\u0435\u0440\u043e\u043c. \u0412 \u043d\u0430\u0448\u0435\u0439 \u0441\u0442\u0440\u0430\u043d\u0435 \u0435\u0433\u043e \u0432\u0441\u044e\u0434\u0443 \u043f\u0440\u043e\u0441\u0438\u043b\u0438 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c <em>QR-\u043a\u043e\u0434<\/em> \u0438\u043b\u0438 <em>\u0433\u0443\u043b\u044f\u0439 \u043c\u0438\u043c\u043e<\/em>.  \u0421\u0438\u0442\u0443\u0430\u0446\u0438\u044f \u0438\u0434\u0438\u043e\u0442\u0441\u043a\u0430\u044f. \u0427\u0435\u043b\u043e\u0432\u0435\u043a \u0434\u0432\u0430\u0436\u0434\u044b \u043f\u0440\u0438\u0432\u0438\u0442 \u041f\u0444\u0430\u0439\u0437\u0435\u0440\u043e\u043c, \u0430 \u0435\u0433\u043e \u043d\u0438\u043a\u0443\u0434\u0430 \u043d\u0435 \u043f\u0443\u0441\u043a\u0430\u044e\u0442. \u042f \u0431\u044b\u043b \u0432 \u0431\u0435\u0448\u0435\u043d\u0441\u0442\u0432\u0435. <\/p>\n<p>-\u0414\u0436\u043e\u043d\u043d\u0438, \u0441\u0433\u0435\u043d\u0435\u0440\u044e-\u043a\u0430 \u044f \u0442\u0435\u0431\u0435 <em>QR-\u043a\u043e\u0434<\/em>, &#8212; \u043f\u043e\u0434\u0443\u043c\u0430\u043b \u044f \u0438 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u043b.<\/p>\n<h2>\u041a\u0430\u043a \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442 QR-\u043a\u043e\u0434<\/h2>\n<p>\u0427\u0442\u043e\u0431\u044b \u043f\u043e\u043d\u044f\u0442\u044c \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0439 \u0432\u0435\u0440\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u043a\u043e\u0434\u0430, \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c\u0441\u044f \u0432 \u043c\u0435\u0441\u0442\u043d\u0443\u044e \u041f\u043b\u0430\u0437\u0443 (\u043f\u0440\u0438\u0432\u0435\u0442 \u0412\u0438\u043a\u0442\u043e\u0440\u0443 \u041b\u0435\u0432\u0430\u0448\u043e\u0432\u0443) \u0438 \u043f\u0440\u0435\u0434\u044a\u044f\u0432\u0438\u0442\u044c \u043e\u0445\u0440\u0430\u043d\u043d\u0438\u043a\u0443 \u0441\u0432\u043e\u0439 <em>QR-\u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442<\/em>. \u041e\u0442\u043a\u0443\u0434\u0430  \u0443 \u043c\u0435\u043d\u044f \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442? \u0410 \u044f \u0432\u0430\u043a\u0446\u0438\u043d\u0438\u0440\u043e\u0432\u0430\u043d <em>\u0421\u043f\u0443\u0442\u043d\u0438\u043a\u043e\u043c V<\/em>. \u0418 \u0432\u043e\u0442 \u0447\u0442\u043e \u044f \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u043b <\/p>\n<ul>\n<li>\n<p>\u043e\u0445\u0440\u0430\u043d\u043d\u0438\u043a \u0432\u043a\u043b\u044e\u0447\u0438\u043b \u0442\u0435\u043b\u0435\u0444\u043e\u043d<\/p>\n<\/li>\n<li>\n<p>\u043e\u0445\u0440\u0430\u043d\u043d\u0438\u043a \u0432\u043a\u043b\u044e\u0447\u0438\u043b \u043a\u0430\u043c\u0435\u0440\u0443 \u043d\u0430 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0435<\/p>\n<\/li>\n<li>\n<p>\u043d\u0430\u0432\u0435\u043b \u043a\u0430\u043c\u0435\u0440\u0443 \u043d\u0430 \u043c\u043e\u0439 <em>QR-\u043a\u043e\u0434<\/em><\/p>\n<\/li>\n<li>\n<p>\u043d\u0430\u0436\u0430\u043b \u043d\u0430 \u0432\u0441\u043f\u043b\u044b\u0432\u0430\u044e\u0449\u0438\u0439  <em>\u043f\u043e\u043f-\u0430\u043f<\/em><\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u043e\u0445\u043e\u0434\u0438!<\/p>\n<\/li>\n<\/ul>\n<p>\u041d\u0430 \u044d\u043a\u0440\u0430\u043d\u0435 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0430 \u043e\u0445\u0440\u0430\u043d\u043d\u0438\u043a\u0430 \u0432\u044b\u0441\u0432\u0435\u0442\u0438\u043b\u0430\u0441\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e\u0431\u043e \u043c\u043d\u0435 \u0432 \u0441\u0442\u044b\u0434\u043b\u0438\u0432\u043e \u043f\u0440\u0438\u043a\u0440\u044b\u0442\u043e\u043c \u0432\u0438\u0434\u0435 <\/p>\n<figure class=\"bordered full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/7f5\/39e\/ffb\/7f539effb76d62f41d4c061f4bc6ec46.png\" width=\"750\" height=\"1624\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/7f5\/39e\/ffb\/7f539effb76d62f41d4c061f4bc6ec46.png\"\/><figcaption><\/figcaption><\/figure>\n<p>Sic! \u0412 <em>QR-\u043a\u043e\u0434\u0435<\/em> \u043f\u0440\u043e\u0441\u0442\u043e \u0437\u0430\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d \u043b\u0438\u043d\u043a-\u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u0441\u0430\u0439\u0442 <em>\u0413\u043e\u0441\u0443\u0441\u043b\u0443\u0433<\/em>. \u0412 \u0447\u044c\u0435\u0439-\u0442\u043e \u0433\u043e\u043b\u043e\u0432\u0435 \u0441\u0444\u043e\u0440\u043c\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u043b\u043e\u0441\u044c <em>\u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0437\u0430\u0434\u0430\u043d\u0438\u0435<\/em> \u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043f\u043e\u0434 iOS. \u0413\u043e\u043b\u043e\u0432\u0430 \u043e\u043a\u0430\u0437\u0430\u043b\u0430\u0441\u044c \u043c\u043e\u044f. \u0418 \u0437\u0430\u043c\u0435\u0442\u044c\u0442\u0435, \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043d\u0430 \u044d\u043a\u0440\u0430\u043d\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043d\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0439. \u041e\u0447\u0435\u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u0430\u0431\u0431\u0440\u0435\u0432\u0438\u0430\u0442\u0443\u0440\u0430 \u0424\u0418\u041e \u0438 3 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 \u0446\u0438\u0444\u0440\u044b \u043f\u0430\u0441\u043f\u043e\u0440\u0442\u0430 \u043d\u0438\u043a\u0430\u043a \u043d\u0435 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u0446\u0438\u0440\u0443\u044e\u0442 \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0430. \u041f\u043e \u044d\u0442\u0438\u043c \u0434\u0430\u043d\u043d\u044b\u043c \u0434\u0430\u0436\u0435 \u043f\u043e\u043b \u0433\u0440\u0430\u0436\u0434\u0430\u043d\u0438\u043d\u0430 (\u0433\u0440\u0430\u0436\u0434\u0430\u043d\u043a\u0438?) \u043d\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c.<\/p>\n<h2>\u0422\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0437\u0430\u0434\u0430\u043d\u0438\u0435<\/h2>\n<ul>\n<li>\n<p>\u041d\u0430\u0434\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441\u0430\u0439\u0442-\u043f\u0430\u0440\u043e\u0434\u0438\u044e (\u0434\u044e\u0436\u0438\u043d\u0430 \u0441\u0442\u0440\u043e\u043a \u043a\u043e\u0434\u0430 \u043d\u0430 <em>PHP<\/em>) \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u0442 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u0438\u0437 \u0441\u0442\u0440\u043e\u043a\u0438 <em>url-<\/em>\u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0442\u0438\u043f\u0430 <em>http:\/\/govuslugi.her\/vam_qr.php?string=BBB_15031964_22345<\/em><\/p>\n<\/li>\n<li>\n<p>\u041d\u0430\u0434\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c <em>iOS<\/em> \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 (\u043f\u0430\u0440\u0443 \u0434\u044e\u0436\u0438\u043d \u0441\u0442\u0440\u043e\u043a \u043d\u0430 <em>swift<\/em>), \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0431\u0443\u0434\u0435\u0442 \u0433\u0435\u043d\u0435\u0440\u0438\u0442\u044c <em>QR-\u043a\u043e\u0434<\/em> \u0438 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u043d\u0430 \u044d\u043a\u0440\u0430\u043d\u0435 <em>iPhone.<\/em><\/p>\n<\/li>\n<\/ul>\n<h2>\u0421\u0435\u0440\u0432\u0435\u0440\u043d\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u043e\u043d\u0430 \u0436\u0435 Web<\/h2>\n<p>\u0412\u043e\u043e\u0431\u0449\u0435, \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u044f \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043b\u0430\u0441\u044c \u043a\u0430\u043a \u0443\u0447\u0435\u0431\u043d\u0438\u043a \u043f\u043e SwiftUI+MVVM+Reactive, \u043d\u043e \u0434\u043b\u044f \u043e\u0431\u0449\u0435\u0433\u043e \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u0437\u0430\u0434\u0430\u0447\u0438 \u043f\u0440\u0438\u0432\u0435\u0434\u0443 \u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f \u0441\u0435\u0440\u0432\u0435\u0440\u043d\u043e\u0439 \u0447\u0430\u0441\u0442\u0438.<\/p>\n<p>\u042f \u0441\u0434\u0435\u043b\u0430\u043b \u0432\u0435\u0431-\u0441\u0442\u0440\u0430\u043d\u0438\u0447\u043a\u0443 \u043d\u0430 PHP, \u043e\u043d\u0430 \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c \u0432\u0445\u043e\u0434\u044f\u0449\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e, \u0437\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u0443\u044e \u0432 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0435 name \u043d\u0430\u0448\u0435\u0433\u043e url-\u0437\u0430\u043f\u0440\u043e\u0441\u0430. \u0422\u0438\u043f\u0430 www.fig.vam\/vsem.php?name=jonny_depp <\/p>\n<p>\u042f \u0438\u0437\u0432\u0438\u043d\u044f\u044e\u0441\u044c, \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u0440\u0430\u0437 \u044f \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043b \u043d\u0430 <em>\u043f\u0435-\u0445\u0435-\u043f\u0435<\/em> \u0432 2005 \u0433\u043e\u0434\u0443, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u043e\u0448\u0443 \u043f\u0440\u043e\u0449\u0435\u043d\u0438\u044f \u0437\u0430 \u043e\u043b\u0434-\u0441\u0442\u0430\u0439\u043b. \u0421\u043b\u0430\u0432\u0430 \u0414\u0436\u043e\u0431\u0441\u0443, \u0432 PHP \u043d\u0435 \u043d\u0430\u0434\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u0443 \u043d\u0430 \u0435\u0451 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u043d\u0438\u0435 \u0438 \u043d\u0430 \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u0432 \u043d\u0435\u0439 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432 \u0432 \u043d\u0443\u0436\u043d\u044b\u0445 \u043c\u0435\u0441\u0442\u0430\u0445, \u043a\u043e\u0434 \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u043b\u043e\u043c\u0430\u0435\u0442\u0441\u044f \u0438 \u044d\u0442\u043e \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u043e. \u041e\u0439, \u0442\u0443\u0445\u043b\u044b\u0435 \u043f\u043e\u043c\u0438\u0434\u043e\u0440\u044b! <\/p>\n<pre><code class=\"php\">if (isset($_GET['name'])) $name=($_GET['name']); else $name=\"Xerr\"; list($fio, $birth, $pass) = explode(\"_\", $name); $user = m_substr($fio, 0, 1, 'UTF-8').\"***** \".m_substr($fio, 1, 1, 'UTF-8').\"*****  \".mb_substr($fio, 2, 1, 'UTF-8').\"********\";  $passport = \"\u041f\u0430\u0441\u043f\u043e\u0440\u0442: \".substr($pass, 0, 2).\"*****\".substr($pass, 2, 3);     $birthday = \"\u0414\u0430\u0442\u0430 \u0440\u043e\u0436\u0434\u0435\u043d\u0438\u044f: \".$birth;<\/code><\/pre>\n<p>\u041a\u0430\u043a \u0432\u0438\u0434\u0438\u0442\u0435, \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 3 \u043d\u0443\u0436\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0435\u043c \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c \u043d\u0430 \u0432\u0435\u0431-\u0441\u0442\u0440\u0430\u043d\u0438\u0447\u043a\u0435. \u041f-\u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u0440\u0430\u0437 \u044f \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043b \u043d\u0430 <em>\u0425-\u0422-\u041c-\u041b<\/em> \u0432 1997 \u0433\u043e\u0434\u0443, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0438\u0437\u0432\u0438\u043d\u0438\u0442\u0435 \u0437\u0430 \u043e\u043b\u0434-\u043e\u043b\u0434-\u0441\u0442\u0430\u0439\u043b \u0438\u0437 \u043f\u0440\u043e\u0448\u043b\u043e\u0433\u043e \u0442\u044b\u0441\u044f\u0447\u0435\u043b\u0435\u0442\u0438\u044f.<\/p>\n<pre><code>echo ' &lt;div class=\"top\">&lt;strong> &lt;span style=\"font-size:140%;color:#FF0000\">QR&lt;\/span> &lt;span style=\"font-size:140%;color:#6666CC\">\u0423\u0421\u041b\u0423\u0413\u0418&lt;\/span>&lt;\/strong> &lt;span style=\"color:#ffffff\">BASHNI.ORG&lt;\/span> &lt;span style=\"font-size:140%;color:#000000\">RUS&lt;\/span>&lt;\/div> &lt;div class=\"relative\">\u0421\u0415\u0420\u0422\u0418\u0424\u0418\u041a\u0410\u0422 \u041e \u0413\u0415\u041d\u0415\u0420\u0410\u0426\u0418\u0418&lt;br>QR-\u041a\u041e\u0414\u0410-19 &lt;div class=\"absolute\">\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u0435\u043d&lt;\/div> &lt;br>&lt;p>\u2116 QR9290499831&lt;\/p>&lt;\/div>&lt;div class=\"info\">&lt;br>'.$user.'&lt;\/div> &lt;div class=\"info\">'.$port.'&lt;\/div> &lt;div class=\"info\">\u0414\u0430\u0442\u0430 \u0440\u043e\u0436\u0434\u0435\u043d\u0438\u044f: '.$birth.'&lt;\/div> &lt;div class=\"close\">\u0417\u0430\u043a\u0440\u044b\u0442\u044c&lt;\/div>';<\/code><\/pre>\n<p>\u0421\u0442\u0438\u043b\u0438 \u044f \u043e\u043f\u0443\u0441\u0442\u0438\u043b, \u0438\u0445 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043d\u0430 \u0433\u0438\u0442\u0445\u0430\u0431\u0435. \u041e\u043d\u0438 \u0442\u0443\u043f\u044b\u0435 \u0438 \u0437\u0430\u0433\u0430\u0434\u043e\u0447\u043d\u044b\u0435, \u043a\u0430\u043a &lt;\u0434\u0438\u0432>\u044b \u0438\u0437 \u0434\u0440\u0435\u0432\u043d\u0438\u0445 \u0441\u043a\u0430\u0437\u043e\u043a \u0412\u043e\u0441\u0442\u043e\u043a\u0430. <\/p>\n<h2>SwiftUI+MVVM<\/h2>\n<p>\u041f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u043a \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044e \u043f\u043e\u0434 iOS. \u041f\u0440\u043e\u0441\u0442\u0438, google. \u0412\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u043f\u0430\u0442\u0442\u0435\u0440\u043d \u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f MVVM. \u0420\u0430\u0437\u0443\u043c\u0435\u0435\u0442\u0441\u044f, \u0434\u043b\u044f \u043d\u0430\u0448\u0435\u0439 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438 \u043e\u043d \u0438\u0437\u0431\u044b\u0442\u043e\u0447\u0435\u043d, \u043d\u043e \u043f\u043e\u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0432\u0441\u0435\u0433\u0434\u0430 \u043f\u043e\u043b\u0435\u0437\u043d\u043e. \u0412\u0434\u0440\u0443\u0433 \u0438\u043d\u0442\u0435\u0440\u0432\u044c\u044e \u043d\u0430 <em>\u0441\u0435\u043d\u044c\u043e\u0440\u0430<\/em>?? \u042f \u0433\u043e\u0442\u043e\u0432, \u0435\u0441\u043b\u0438 \u0447\u0442\u043e, \u0437\u0432\u043e\u043d\u0438\u0442\u0435 \u043e\u0442 $4000. \u0422\u0435\u043b\u0435\u0444\u043e\u043d \u0437\u0430\u0448\u0438\u0442 \u0432 \u0441\u0442\u0430\u0442\u044c\u0435.<\/p>\n<p>\u041c\u043e\u0434\u0435\u043b\u044c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0443\u044e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0438\u0437 \u0441\u0442\u0440\u043e\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043d\u0430\u0434\u043e \u0433\u0434\u0435-\u0442\u043e \u043f\u0440\u0435\u0432\u0440\u0430\u0442\u0438\u0442\u044c \u0432 \u043a\u043e\u0434-\u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0443 \u0438 \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e, \u0433\u043e\u0432\u043e\u0440\u044f\u0449\u0443\u044e \u0447\u0442\u043e \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0435\u043d\u0438\u0435 \u0441\u043e\u0432\u0435\u0440\u0448\u0438\u043b\u043e\u0441\u044c\/\u043d\u0435 \u0441\u043e\u0432\u0435\u0440\u0448\u0438\u043b\u043e\u0441\u044c.<\/p>\n<pre><code>struct UserModel {     var user: User  mutating func updateUser(name:String, birth:String, pass:String) {         let d = \"_\"         let temp = name+d+birth+d+pass         self.user = User(isValid: true, string: temp )     }  mutating func cleanUser() {         self.user = User(isValid: false, string: \"\")     }      struct User {         var isValid:Bool         var string:String         func genUrl()->String {             return urlPath+self.string         }     } } <\/code><\/pre>\n<p>\u041f\u043e\u043b\u043d\u044b\u0439 \u0442\u0435\u043a\u0441\u0442 \u0444\u0430\u0439\u043b\u0430 ModelView.swift \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043d\u0430 \u0433\u0438\u0442\u0445\u0430\u0431\u0435. \u0412\u0442\u043e\u0440\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0430\u0442\u0442\u0435\u0440\u043d\u0430  &#8212; \u0444\u0430\u0439\u043b ContentView.swift. \u041e\u043d \u0440\u0438\u0441\u0443\u0435\u0442 \u0432 \u043e\u0434\u043d\u043e\u043c \u043e\u043a\u043d\u0435 <strong><em>InputView<\/em><\/strong> \u0432\u0432\u043e\u0434 \u0441\u0442\u0440\u043e\u043a\u0438 \u0438 \u043a\u043d\u043e\u043f\u043a\u0438, \u0430 \u0432\u043e \u0432\u0442\u043e\u0440\u043e\u043c \u043e\u043a\u043d\u0435 <strong><em>QRView <\/em><\/strong>\u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 QR-\u043a\u043e\u0434\u0430. \u042d\u0442\u043e\u0442 SwiftUI \u0441\u0442\u0438\u043b\u044c \u0438 \u043e\u043d \u043e\u0447\u0435\u043d\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0432\u0435\u043d &#8212; \u043d\u0435 \u043d\u0443\u0436\u043d\u044b XIB-\u044b, \u0432\u0435\u0440\u0441\u0442\u043a\u0430 \u0438\u0434\u0435\u0442 \u043f\u0440\u044f\u043c\u043e \u0432 \u043a\u043e\u0434\u0435 \u0432 \u0434\u0436\u0430\u0432\u0430-\u0441\u0442\u0438\u043b\u0435.<\/p>\n<pre><code class=\"swift\">import SwiftUI  struct ContentView: View {     @ObservedObject var model: ModelView     var body: some View {         if model.isValid() {             QRView(model: model)         } else {             InputView(model: model)         }     } }   struct InputView: View {     var model: ModelView     @State private var name: String = \"\"     @State private var birth: String = \"\"     @State private var passport: String = \"\"          var body: some View {         VStack {             Spacer()             TextField(\"3 \u0431\u0443\u043a\u0432\u044b \u0424\u0418\u041e\", text: $name)             TextField(\"\u0414\u0420 15.03.1964\", text: $birth)             TextField(\"2+3 \u0446\u0438\u0444\u0440\u044b \u043f\u0430\u0441\u043f\u043e\u0440\u0442\u0430\", text: $passport)             Spacer()             HStack {                 Button(\"\u0421\u0434\u0435\u043b\u0430\u0439 QR\", action: {                     self.model.tapQRButton(name, birth, passport)                 })                 Spacer()                 Button(\"\u041e\u0447\u0438\u0441\u0442\u0438\u0442\u044c\", action: {                     name=\"\"                     birth = \"\"                     passport = \"\"                     self.model.tapClean()                 })             }.padding()             Spacer()         }         .padding()         .textFieldStyle(RoundedBorderTextFieldStyle())     } }   struct QRView: View {     var model: ModelView     @State private var isSharePresented: Bool = false     var body: some View {         VStack {             if let image = model.generateQRCode() {                 Text(\"QR \u043a\u043e\u0434\").bold()                 Text(\"\u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0441\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\")                 Spacer()                 Image(uiImage: image).resizable()                     .frame(width: 200, height: 200)             } else {                 Text(\"QR \u043a\u043e\u0434\").bold().foregroundColor(.red)                 Text(\"\u043d\u0435 \u0441\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\").foregroundColor(.red)                 Spacer()                 Image(systemName: \"qrcode\").resizable()                     .frame(width: 75, height: 75)             }             Spacer()             Button(\"\u041d\u0430\u0437\u0430\u0434\", action: {           self.model.tapClean()             } ).padding()         }.padding()         Spacer()     } }          struct ContentView_Previews: PreviewProvider {         static var previews: some View {             ContentView(model: ModelView())         }     } <\/code><\/pre>\n<p>\u0418, \u043d\u0430\u043a\u043e\u043d\u0435\u0446, \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u0430\u043a\u0442 \u041c\u0435\u0440\u043b\u0435\u0437\u043e\u043d\u0441\u043a\u043e\u0433\u043e \u0431\u0430\u043b\u0435\u0442\u0430 &#8212; \u044d\u0442\u043e \u0444\u0430\u0439\u043b ModelView.swift, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u0434\u043d\u0438\u043c \u0433\u043b\u0430\u0437\u043e\u043c \u0433\u043b\u044f\u0434\u0438\u0442 \u043d\u0430 ContentView \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u043e\u0442 \u043d\u0435\u0433\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u043e \u043d\u0430\u0436\u0430\u0442\u0438\u0438 \u043d\u0430 \u043a\u043d\u043e\u043f\u043a\u0443, \u0430 \u0434\u0440\u0443\u0433\u0438\u043c \u0433\u043b\u0430\u0437\u043e\u043c \u043e\u043d \u0433\u043b\u044f\u0434\u0438\u0442 \u043d\u0430 UserModel, \u043a\u0443\u0434\u0430 \u043e\u043d \u0441\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0435\u0442 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u0443\u044e \u043e\u0442 ContentView \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u0438 \u0437\u0430\u0431\u0438\u0440\u0430\u0435\u0442 \u0441\u0442\u0440\u043e\u043a\u0443, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0432 QR-\u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0443 \u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0432 ContentView. <\/p>\n<pre><code class=\"swift\">\/\/ \/\/  ModelView.swift \/\/  import UIKit  class ModelView: ObservableObject {     @Published private var model:UserModel = UserModel()      func isValid()->Bool {         return model.user.isValid     }      func tapQRButton(_ name:String,_ birth:String,_ pass:String) {         model.updateUser(name: name, birth: birth, pass: pass)     }       func tapClean() {         model.cleanUser()     }          func generateQRCode() -> UIImage? {         var uiImage: UIImage? \/\/        let string = model.user.genUrl()         let string = \"https:\/\/github.com\/PapaBubaDiop\/qrushka\"          if let data = string.data(using: String.Encoding.utf8) {             if let filter = CIFilter(name: \"CIQRCodeGenerator\",                                      parameters: [\"inputMessage\": data,                                                   \"inputCorrectionLevel\": \"L\"]) {                 if let outputImage = filter.outputImage,                    let cgImage = CIContext().createCGImage(outputImage,                                                            from: outputImage.extent) {                     let size = CGSize(width: outputImage.extent.width * 5.0,                                       height: outputImage.extent.height * 5.0)                     UIGraphicsBeginImageContext(size)                     if let context = UIGraphicsGetCurrentContext() {                         context.interpolationQuality = .none                         context.draw(cgImage,                                      in: CGRect(origin: .zero,                                                 size: size))                         uiImage = UIGraphicsGetImageFromCurrentImageContext()                     }                     UIGraphicsEndImageContext()                 }             }         }         return uiImage     } }<\/code><\/pre>\n<p>ModelView \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0430 \u0432\u043d\u0443\u0442\u0440\u0438 ContentView \u0440\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0439<\/p>\n<pre><code>@ObservedObject var model: ModelView <\/code><\/pre>\n<p>\u0438 \u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043e\u043a\u043d\u0430 \u043f\u0435\u0440\u0435\u0440\u0438\u0441\u043e\u0432\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437 \u043a\u043e\u0433\u0434\u0430 \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u043d\u0430\u0448\u0435\u0439 \u043c\u043e\u0434\u0435\u043b\u0438. \u0415\u0449\u0435 \u0440\u0430\u0437 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0439 \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f<\/p>\n<ul>\n<li>\n<p>\u0432\u0432\u043e\u0434\u0438\u043c \u0442\u0435\u043a\u0441\u0442 \u0438 \u043d\u0430\u0436\u0438\u043c\u0430\u0435\u043c \u043a\u043d\u043e\u043f\u043a\u0443 \u0432 ContentView<\/p>\n<\/li>\n<li>\n<p>ModelView \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u044d\u0442\u043e\u0442 \u0442\u0435\u043a\u0441\u0442 \u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u0442 UserModel \u0438 \u0437\u043d\u0430\u0447\u0438\u0442 \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0441\u0430\u043c<\/p>\n<\/li>\n<li>\n<p>UserModel \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u0442 \u0438\u0437 \u0442\u0435\u043a\u0441\u0442\u0430 url \u0432\u0438\u0434\u0435 \u0441\u0442\u0440\u043e\u043a\u0438<\/p>\n<\/li>\n<li>\n<p>\u0440\u0430\u0437 UserModel \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0441\u044f, \u0442\u043e \u0438 ModelView \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0441\u044f, \u0437\u043d\u0430\u0447\u0438\u0442 ContentView \u043f\u0435\u0440\u0435\u0440\u0438\u0441\u043e\u0432\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0441\u0442\u0432\u0438\u0438 \u0441 \u043d\u043e\u0432\u044b\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u044f\u0432\u0438\u043b\u0438\u0441\u044c \u0432 ModelView<\/p>\n<\/li>\n<\/ul>\n<p>\u0423\u0440\u0430, \u043f\u0440\u043e\u0435\u043a\u0442 \u0433\u043e\u0442\u043e\u0432 \u0438 \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u0442\u0441\u044f. No Errors No Warnings.<\/p>\n<h2>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0432 \u0441\u0438\u043c\u0443\u043b\u044f\u0442\u043e\u0440\u0435<\/h2>\n<p>\u0418 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0441\u0442\u0430\u0440\u0442\u043e\u0432\u044b\u0439 \u044d\u043a\u0440\u0430\u043d. \u0417\u0430\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u043f\u043e\u043b\u044f \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0432\u0438\u0438 \u0441 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u043c \u0414\u0436\u043e\u043d\u043d\u0438.<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/f4b\/fbe\/fd4\/f4bfbefd4c14713a88f08ef6687d3f4d.png\" width=\"504\" height=\"946\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/f4b\/fbe\/fd4\/f4bfbefd4c14713a88f08ef6687d3f4d.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u041d\u0430\u0436\u0438\u043c\u0430\u0435\u043c \u043a\u043d\u043e\u043f\u043a\u0443 <strong><em>\u0421\u0434\u0435\u043b\u0430\u0439 QR<\/em><\/strong> \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c QR-\u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0443, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0441\u043a\u0440\u044b\u0442 \u043b\u0438\u043d\u043a \u043d\u0430 \u043d\u0430\u0448 \u0441\u0430\u0439\u0442, \u0433\u0434\u0435 \u0443\u0436\u0435 \u043b\u0435\u0436\u0438\u0442 <em>php-\u0441\u043a\u0440\u0438\u043f\u0442<\/em>, \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 \u0432\u044b\u0448\u0435. \u0421\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438, \u0433\u0440\u0430\u0436\u0434\u0430\u043d\u0435, \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0438\u0435!<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/8ee\/9df\/8d0\/8ee9df8d05587161c105fb0e94b0045f.png\" width=\"800\" height=\"776\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/8ee\/9df\/8d0\/8ee9df8d05587161c105fb0e94b0045f.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0430\u0432\u0435\u0441\u0442\u0438 \u0441\u0432\u043e\u0439 \u0434\u0435\u0432\u0430\u0439\u0441 \u043d\u0430 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0443 \u0438 \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0435\u0435. \u041c\u043e\u044e \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043b \u0442\u043e\u0442 \u0436\u0435 \u043e\u0445\u0440\u0430\u043d\u043d\u0438\u043a \u0438\u0437 \u041f\u043b\u0430\u0437\u044b. Welcome to Russia,  \u0414\u0436\u043e\u043d\u043d\u0438! <\/p>\n<p><strong>\u0412\u043d\u0438\u043c\u0430\u043d\u0438\u0435! \u041d\u0438\u043a\u043e\u0433\u0434\u0430 \u0442\u0430\u043a \u043d\u0435 \u0434\u0435\u043b\u0430\u0439\u0442\u0435! \u041d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f \u0432 \u043d\u0435\u0437\u0430\u043a\u043e\u043d\u043d\u044b\u0445 \u0446\u0435\u043b\u044f\u0445!<\/strong> \u041f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0441\u043a\u043e\u0440\u043e \u044d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0432\u0435\u0441\u0438\u0442\u044c \u043e\u0442 3-\u0445 \u0434\u043e 5-\u0442\u0438.<\/p>\n<h2>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h2>\n<p>\u0412\u0441\u044f \u044d\u0442\u0430 \u0438\u0441\u0442\u043e\u0440\u0438\u044f, \u0440\u0430\u0437\u0443\u043c\u0435\u0435\u0442\u0441\u044f, \u0432\u044b\u043c\u044b\u0448\u043b\u0435\u043d\u0430 \u043e\u0442 \u043d\u0430\u0447\u0430\u043b\u0430 \u0438 \u0434\u043e \u043a\u043e\u043d\u0446\u0430, \u043d\u043e \u043a\u043e\u0434, \u0442\u043e\u0432\u0430\u0440\u0438\u0449\u0438, \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0438\u0439! \u0421\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u0433\u0438\u0442\u0445\u0430\u0431 \u043f\u0440\u0438\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f.<\/p>\n<h2>\u0417\u0430\u0434\u0430\u0447\u043a\u0430<\/h2>\n<p>QR-\u043a\u043e\u0434 \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0440\u0430\u0437\u043d\u043e\u0439 \u0437\u0435\u0440\u043d\u0438\u0441\u0442\u043e\u0441\u0442\u0438 \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0434\u043b\u0438\u043d\u044b \u0441\u0442\u0440\u043e\u043a\u0438. \u041c\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0437\u0430\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043b\u043e \u0432 \u043a\u043e\u0434\u044b \u0447\u0438\u0441\u043b\u043e 0 \u0438 \u0447\u0438\u0441\u043b\u043e 1. \u0423\u0433\u0430\u0434\u0430\u0439\u0442\u0435, \u0433\u0434\u0435 \u043a\u0430\u043a\u043e\u0439 QR-\u043a\u043e\u0434 \u0434\u043b\u044f 0 \u0438 1?<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/f40\/044\/d7c\/f40044d7c09456142d9b6e68e2e4d32b.png\" width=\"640\" height=\"640\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/f40\/044\/d7c\/f40044d7c09456142d9b6e68e2e4d32b.png\"\/><figcaption><\/figcaption><\/figure>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/591483\/\"> https:\/\/habr.com\/ru\/articles\/591483\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u042f \u0447\u0435\u043b\u043e\u0432\u0435\u043a \u0434\u0430\u043b\u0435\u043a\u0438\u0439 \u043e\u0442 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u0436\u0438\u0432\u0443 \u0437\u0430 \u043a\u043e\u043b\u044e\u0447\u043a\u043e\u0439 \u0438 \u043b\u044e\u0431\u043b\u044e \u0431\u0438\u0442\u044c \u0431\u0430\u043a\u043b\u0443\u0448\u0438. \u041d\u043e \u0441\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u043d\u0435\u043f\u0440\u0435\u0434\u0432\u0438\u0434\u0435\u043d\u043d\u043e\u0435, \u043c\u043e\u0435\u043c\u0443 \u0441\u0435\u0440\u0431\u0441\u043a\u043e\u043c\u0443 \u0434\u0440\u0443\u0433\u0443 \u0414\u0436\u043e\u043d\u043d\u0438, \u043f\u0440\u0438\u0435\u0445\u0430\u0432\u0448\u0435\u043c\u0443 \u0432 \u0433\u043e\u0441\u0442\u0438, \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u043b\u0441\u044f QR-\u043a\u043e\u0434. \u041f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0440\u0430\u0441\u0447\u0435\u0445\u043b\u0438\u0442\u044c \u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u0443.<\/p>\n<h2>\u041a\u0440\u0430\u0442\u043a\u043e\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u0435 \u043f\u0435\u0440\u0432\u043e\u0439 \u0441\u0435\u0440\u0438\u0438<\/h2>\n<p>\u041a\u043e \u043c\u043d\u0435 \u043f\u0440\u0438\u0435\u0445\u0430\u043b \u043c\u043e\u0439 \u0441\u0435\u0440\u0431\u0441\u043a\u0438\u0439 \u043f\u0440\u0438\u044f\u0442\u0435\u043b\u044c \u041d\u0438\u043a\u043e\u043b\u0430 \u041f\u0430\u0432\u043b\u043e\u0432\u0438\u0447, \u0432\u0430\u043a\u0446\u0438\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439<sup>2<\/sup> \u041f\u0444\u0430\u0439\u0437\u0435\u0440\u043e\u043c. \u0412 \u043d\u0430\u0448\u0435\u0439 \u0441\u0442\u0440\u0430\u043d\u0435 \u0435\u0433\u043e \u0432\u0441\u044e\u0434\u0443 \u043f\u0440\u043e\u0441\u0438\u043b\u0438 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c <em>QR-\u043a\u043e\u0434<\/em> \u0438\u043b\u0438 <em>\u0433\u0443\u043b\u044f\u0439 \u043c\u0438\u043c\u043e<\/em>.  \u0421\u0438\u0442\u0443\u0430\u0446\u0438\u044f \u0438\u0434\u0438\u043e\u0442\u0441\u043a\u0430\u044f. \u0427\u0435\u043b\u043e\u0432\u0435\u043a \u0434\u0432\u0430\u0436\u0434\u044b \u043f\u0440\u0438\u0432\u0438\u0442 \u041f\u0444\u0430\u0439\u0437\u0435\u0440\u043e\u043c, \u0430 \u0435\u0433\u043e \u043d\u0438\u043a\u0443\u0434\u0430 \u043d\u0435 \u043f\u0443\u0441\u043a\u0430\u044e\u0442. \u042f \u0431\u044b\u043b \u0432 \u0431\u0435\u0448\u0435\u043d\u0441\u0442\u0432\u0435. <\/p>\n<p>-\u0414\u0436\u043e\u043d\u043d\u0438, \u0441\u0433\u0435\u043d\u0435\u0440\u044e-\u043a\u0430 \u044f \u0442\u0435\u0431\u0435 <em>QR-\u043a\u043e\u0434<\/em>, &#8212; \u043f\u043e\u0434\u0443\u043c\u0430\u043b \u044f \u0438 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u043b.<\/p>\n<h2>\u041a\u0430\u043a \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442 QR-\u043a\u043e\u0434<\/h2>\n<p>\u0427\u0442\u043e\u0431\u044b \u043f\u043e\u043d\u044f\u0442\u044c \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0439 \u0432\u0435\u0440\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u043a\u043e\u0434\u0430, \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c\u0441\u044f \u0432 \u043c\u0435\u0441\u0442\u043d\u0443\u044e \u041f\u043b\u0430\u0437\u0443 (\u043f\u0440\u0438\u0432\u0435\u0442 \u0412\u0438\u043a\u0442\u043e\u0440\u0443 \u041b\u0435\u0432\u0430\u0448\u043e\u0432\u0443) \u0438 \u043f\u0440\u0435\u0434\u044a\u044f\u0432\u0438\u0442\u044c \u043e\u0445\u0440\u0430\u043d\u043d\u0438\u043a\u0443 \u0441\u0432\u043e\u0439 <em>QR-\u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442<\/em>. \u041e\u0442\u043a\u0443\u0434\u0430  \u0443 \u043c\u0435\u043d\u044f \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442? \u0410 \u044f \u0432\u0430\u043a\u0446\u0438\u043d\u0438\u0440\u043e\u0432\u0430\u043d <em>\u0421\u043f\u0443\u0442\u043d\u0438\u043a\u043e\u043c V<\/em>. \u0418 \u0432\u043e\u0442 \u0447\u0442\u043e \u044f \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u043b <\/p>\n<ul>\n<li>\n<p>\u043e\u0445\u0440\u0430\u043d\u043d\u0438\u043a \u0432\u043a\u043b\u044e\u0447\u0438\u043b \u0442\u0435\u043b\u0435\u0444\u043e\u043d<\/p>\n<\/li>\n<li>\n<p>\u043e\u0445\u0440\u0430\u043d\u043d\u0438\u043a \u0432\u043a\u043b\u044e\u0447\u0438\u043b \u043a\u0430\u043c\u0435\u0440\u0443 \u043d\u0430 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0435<\/p>\n<\/li>\n<li>\n<p>\u043d\u0430\u0432\u0435\u043b \u043a\u0430\u043c\u0435\u0440\u0443 \u043d\u0430 \u043c\u043e\u0439 <em>QR-\u043a\u043e\u0434<\/em><\/p>\n<\/li>\n<li>\n<p>\u043d\u0430\u0436\u0430\u043b \u043d\u0430 \u0432\u0441\u043f\u043b\u044b\u0432\u0430\u044e\u0449\u0438\u0439  <em>\u043f\u043e\u043f-\u0430\u043f<\/em><\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u043e\u0445\u043e\u0434\u0438!<\/p>\n<\/li>\n<\/ul>\n<p>\u041d\u0430 \u044d\u043a\u0440\u0430\u043d\u0435 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0430 \u043e\u0445\u0440\u0430\u043d\u043d\u0438\u043a\u0430 \u0432\u044b\u0441\u0432\u0435\u0442\u0438\u043b\u0430\u0441\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e\u0431\u043e \u043c\u043d\u0435 \u0432 \u0441\u0442\u044b\u0434\u043b\u0438\u0432\u043e \u043f\u0440\u0438\u043a\u0440\u044b\u0442\u043e\u043c \u0432\u0438\u0434\u0435 <\/p>\n<figure class=\"bordered full-width\"><figcaption><\/figcaption><\/figure>\n<p>Sic! \u0412 <em>QR-\u043a\u043e\u0434\u0435<\/em> \u043f\u0440\u043e\u0441\u0442\u043e \u0437\u0430\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d \u043b\u0438\u043d\u043a-\u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u0441\u0430\u0439\u0442 <em>\u0413\u043e\u0441\u0443\u0441\u043b\u0443\u0433<\/em>. \u0412 \u0447\u044c\u0435\u0439-\u0442\u043e \u0433\u043e\u043b\u043e\u0432\u0435 \u0441\u0444\u043e\u0440\u043c\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u043b\u043e\u0441\u044c <em>\u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0437\u0430\u0434\u0430\u043d\u0438\u0435<\/em> \u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043f\u043e\u0434 iOS. \u0413\u043e\u043b\u043e\u0432\u0430 \u043e\u043a\u0430\u0437\u0430\u043b\u0430\u0441\u044c \u043c\u043e\u044f. \u0418 \u0437\u0430\u043c\u0435\u0442\u044c\u0442\u0435, \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043d\u0430 \u044d\u043a\u0440\u0430\u043d\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043d\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0439. \u041e\u0447\u0435\u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u0430\u0431\u0431\u0440\u0435\u0432\u0438\u0430\u0442\u0443\u0440\u0430 \u0424\u0418\u041e \u0438 3 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 \u0446\u0438\u0444\u0440\u044b \u043f\u0430\u0441\u043f\u043e\u0440\u0442\u0430 \u043d\u0438\u043a\u0430\u043a \u043d\u0435 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u0446\u0438\u0440\u0443\u044e\u0442 \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0430. \u041f\u043e \u044d\u0442\u0438\u043c \u0434\u0430\u043d\u043d\u044b\u043c \u0434\u0430\u0436\u0435 \u043f\u043e\u043b \u0433\u0440\u0430\u0436\u0434\u0430\u043d\u0438\u043d\u0430 (\u0433\u0440\u0430\u0436\u0434\u0430\u043d\u043a\u0438?) \u043d\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c.<\/p>\n<h2>\u0422\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0437\u0430\u0434\u0430\u043d\u0438\u0435<\/h2>\n<ul>\n<li>\n<p>\u041d\u0430\u0434\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441\u0430\u0439\u0442-\u043f\u0430\u0440\u043e\u0434\u0438\u044e (\u0434\u044e\u0436\u0438\u043d\u0430 \u0441\u0442\u0440\u043e\u043a \u043a\u043e\u0434\u0430 \u043d\u0430 <em>PHP<\/em>) \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u0442 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u0438\u0437 \u0441\u0442\u0440\u043e\u043a\u0438 <em>url-<\/em>\u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0442\u0438\u043f\u0430 <em>http:\/\/govuslugi.her\/vam_qr.php?string=BBB_15031964_22345<\/em><\/p>\n<\/li>\n<li>\n<p>\u041d\u0430\u0434\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c <em>iOS<\/em> \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 (\u043f\u0430\u0440\u0443 \u0434\u044e\u0436\u0438\u043d \u0441\u0442\u0440\u043e\u043a \u043d\u0430 <em>swift<\/em>), \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0431\u0443\u0434\u0435\u0442 \u0433\u0435\u043d\u0435\u0440\u0438\u0442\u044c <em>QR-\u043a\u043e\u0434<\/em> \u0438 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u043d\u0430 \u044d\u043a\u0440\u0430\u043d\u0435 <em>iPhone.<\/em><\/p>\n<\/li>\n<\/ul>\n<h2>\u0421\u0435\u0440\u0432\u0435\u0440\u043d\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u043e\u043d\u0430 \u0436\u0435 Web<\/h2>\n<p>\u0412\u043e\u043e\u0431\u0449\u0435, \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u044f \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043b\u0430\u0441\u044c \u043a\u0430\u043a \u0443\u0447\u0435\u0431\u043d\u0438\u043a \u043f\u043e SwiftUI+MVVM+Reactive, \u043d\u043e \u0434\u043b\u044f \u043e\u0431\u0449\u0435\u0433\u043e \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u0437\u0430\u0434\u0430\u0447\u0438 \u043f\u0440\u0438\u0432\u0435\u0434\u0443 \u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f \u0441\u0435\u0440\u0432\u0435\u0440\u043d\u043e\u0439 \u0447\u0430\u0441\u0442\u0438.<\/p>\n<p>\u042f \u0441\u0434\u0435\u043b\u0430\u043b \u0432\u0435\u0431-\u0441\u0442\u0440\u0430\u043d\u0438\u0447\u043a\u0443 \u043d\u0430 PHP, \u043e\u043d\u0430 \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c \u0432\u0445\u043e\u0434\u044f\u0449\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e, \u0437\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u0443\u044e \u0432 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0435 name \u043d\u0430\u0448\u0435\u0433\u043e url-\u0437\u0430\u043f\u0440\u043e\u0441\u0430. \u0422\u0438\u043f\u0430 www.fig.vam\/vsem.php?name=jonny_depp <\/p>\n<p>\u042f \u0438\u0437\u0432\u0438\u043d\u044f\u044e\u0441\u044c, \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u0440\u0430\u0437 \u044f \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043b \u043d\u0430 <em>\u043f\u0435-\u0445\u0435-\u043f\u0435<\/em> \u0432 2005 \u0433\u043e\u0434\u0443, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u043e\u0448\u0443 \u043f\u0440\u043e\u0449\u0435\u043d\u0438\u044f \u0437\u0430 \u043e\u043b\u0434-\u0441\u0442\u0430\u0439\u043b. \u0421\u043b\u0430\u0432\u0430 \u0414\u0436\u043e\u0431\u0441\u0443, \u0432 PHP \u043d\u0435 \u043d\u0430\u0434\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u0443 \u043d\u0430 \u0435\u0451 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u043d\u0438\u0435 \u0438 \u043d\u0430 \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u0432 \u043d\u0435\u0439 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432 \u0432 \u043d\u0443\u0436\u043d\u044b\u0445 \u043c\u0435\u0441\u0442\u0430\u0445, \u043a\u043e\u0434 \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u043b\u043e\u043c\u0430\u0435\u0442\u0441\u044f \u0438 \u044d\u0442\u043e \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u043e. \u041e\u0439, \u0442\u0443\u0445\u043b\u044b\u0435 \u043f\u043e\u043c\u0438\u0434\u043e\u0440\u044b! <\/p>\n<pre><code class=\"php\">if (isset($_GET['name'])) $name=($_GET['name']); else $name=\"Xerr\"; list($fio, $birth, $pass) = explode(\"_\", $name); $user = m_substr($fio, 0, 1, 'UTF-8').\"***** \".m_substr($fio, 1, 1, 'UTF-8').\"*****  \".mb_substr($fio, 2, 1, 'UTF-8').\"********\";  $passport = \"\u041f\u0430\u0441\u043f\u043e\u0440\u0442: \".substr($pass, 0, 2).\"*****\".substr($pass, 2, 3);     $birthday = \"\u0414\u0430\u0442\u0430 \u0440\u043e\u0436\u0434\u0435\u043d\u0438\u044f: \".$birth;<\/code><\/pre>\n<p>\u041a\u0430\u043a \u0432\u0438\u0434\u0438\u0442\u0435, \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 3 \u043d\u0443\u0436\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0435\u043c \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c \u043d\u0430 \u0432\u0435\u0431-\u0441\u0442\u0440\u0430\u043d\u0438\u0447\u043a\u0435. \u041f-\u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u0440\u0430\u0437 \u044f \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043b \u043d\u0430 <em>\u0425-\u0422-\u041c-\u041b<\/em> \u0432 1997 \u0433\u043e\u0434\u0443, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0438\u0437\u0432\u0438\u043d\u0438\u0442\u0435 \u0437\u0430 \u043e\u043b\u0434-\u043e\u043b\u0434-\u0441\u0442\u0430\u0439\u043b \u0438\u0437 \u043f\u0440\u043e\u0448\u043b\u043e\u0433\u043e \u0442\u044b\u0441\u044f\u0447\u0435\u043b\u0435\u0442\u0438\u044f.<\/p>\n<pre><code>echo ' &lt;div class=\"top\">&lt;strong> &lt;span style=\"font-size:140%;color:#FF0000\">QR&lt;\/span> &lt;span style=\"font-size:140%;color:#6666CC\">\u0423\u0421\u041b\u0423\u0413\u0418&lt;\/span>&lt;\/strong> &lt;span style=\"color:#ffffff\">BASHNI.ORG&lt;\/span> &lt;span style=\"font-size:140%;color:#000000\">RUS&lt;\/span>&lt;\/div> &lt;div class=\"relative\">\u0421\u0415\u0420\u0422\u0418\u0424\u0418\u041a\u0410\u0422 \u041e \u0413\u0415\u041d\u0415\u0420\u0410\u0426\u0418\u0418&lt;br>QR-\u041a\u041e\u0414\u0410-19 &lt;div class=\"absolute\">\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u0435\u043d&lt;\/div> &lt;br>&lt;p>\u2116 QR9290499831&lt;\/p>&lt;\/div>&lt;div class=\"info\">&lt;br>'.$user.'&lt;\/div> &lt;div class=\"info\">'.$port.'&lt;\/div> &lt;div class=\"info\">\u0414\u0430\u0442\u0430 \u0440\u043e\u0436\u0434\u0435\u043d\u0438\u044f: '.$birth.'&lt;\/div> &lt;div class=\"close\">\u0417\u0430\u043a\u0440\u044b\u0442\u044c&lt;\/div>';<\/code><\/pre>\n<p>\u0421\u0442\u0438\u043b\u0438 \u044f \u043e\u043f\u0443\u0441\u0442\u0438\u043b, \u0438\u0445 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043d\u0430 \u0433\u0438\u0442\u0445\u0430\u0431\u0435. \u041e\u043d\u0438 \u0442\u0443\u043f\u044b\u0435 \u0438 \u0437\u0430\u0433\u0430\u0434\u043e\u0447\u043d\u044b\u0435, \u043a\u0430\u043a &lt;\u0434\u0438\u0432>\u044b \u0438\u0437 \u0434\u0440\u0435\u0432\u043d\u0438\u0445 \u0441\u043a\u0430\u0437\u043e\u043a \u0412\u043e\u0441\u0442\u043e\u043a\u0430. <\/p>\n<h2>SwiftUI+MVVM<\/h2>\n<p>\u041f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u043a \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044e \u043f\u043e\u0434 iOS. \u041f\u0440\u043e\u0441\u0442\u0438, google. \u0412\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u043f\u0430\u0442\u0442\u0435\u0440\u043d \u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f MVVM. \u0420\u0430\u0437\u0443\u043c\u0435\u0435\u0442\u0441\u044f, \u0434\u043b\u044f \u043d\u0430\u0448\u0435\u0439 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438 \u043e\u043d \u0438\u0437\u0431\u044b\u0442\u043e\u0447\u0435\u043d, \u043d\u043e \u043f\u043e\u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0432\u0441\u0435\u0433\u0434\u0430 \u043f\u043e\u043b\u0435\u0437\u043d\u043e. \u0412\u0434\u0440\u0443\u0433 \u0438\u043d\u0442\u0435\u0440\u0432\u044c\u044e \u043d\u0430 <em>\u0441\u0435\u043d\u044c\u043e\u0440\u0430<\/em>?? \u042f \u0433\u043e\u0442\u043e\u0432, \u0435\u0441\u043b\u0438 \u0447\u0442\u043e, \u0437\u0432\u043e\u043d\u0438\u0442\u0435 \u043e\u0442 $4000. \u0422\u0435\u043b\u0435\u0444\u043e\u043d \u0437\u0430\u0448\u0438\u0442 \u0432 \u0441\u0442\u0430\u0442\u044c\u0435.<\/p>\n<p>\u041c\u043e\u0434\u0435\u043b\u044c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0443\u044e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0438\u0437 \u0441\u0442\u0440\u043e\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043d\u0430\u0434\u043e \u0433\u0434\u0435-\u0442\u043e \u043f\u0440\u0435\u0432\u0440\u0430\u0442\u0438\u0442\u044c \u0432 \u043a\u043e\u0434-\u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0443 \u0438 \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e, \u0433\u043e\u0432\u043e\u0440\u044f\u0449\u0443\u044e \u0447\u0442\u043e \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0435\u043d\u0438\u0435 \u0441\u043e\u0432\u0435\u0440\u0448\u0438\u043b\u043e\u0441\u044c\/\u043d\u0435 \u0441\u043e\u0432\u0435\u0440\u0448\u0438\u043b\u043e\u0441\u044c.<\/p>\n<pre><code>struct UserModel {     var user: User  mutating func updateUser(name:String, birth:String, pass:String) {         let d = \"_\"         let temp = name+d+birth+d+pass         self.user = User(isValid: true, string: temp )     }  mutating func cleanUser() {         self.user = User(isValid: false, string: \"\")     }      struct User {         var isValid:Bool         var string:String         func genUrl()->String {             return urlPath+self.string         }     } } <\/code><\/pre>\n<p>\u041f\u043e\u043b\u043d\u044b\u0439 \u0442\u0435\u043a\u0441\u0442 \u0444\u0430\u0439\u043b\u0430 ModelView.swift \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043d\u0430 \u0433\u0438\u0442\u0445\u0430\u0431\u0435. \u0412\u0442\u043e\u0440\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0430\u0442\u0442\u0435\u0440\u043d\u0430  &#8212; \u0444\u0430\u0439\u043b ContentView.swift. \u041e\u043d \u0440\u0438\u0441\u0443\u0435\u0442 \u0432 \u043e\u0434\u043d\u043e\u043c \u043e\u043a\u043d\u0435 <strong><em>InputView<\/em><\/strong> \u0432\u0432\u043e\u0434 \u0441\u0442\u0440\u043e\u043a\u0438 \u0438 \u043a\u043d\u043e\u043f\u043a\u0438, \u0430 \u0432\u043e \u0432\u0442\u043e\u0440\u043e\u043c \u043e\u043a\u043d\u0435 <strong><em>QRView <\/em><\/strong>\u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 QR-\u043a\u043e\u0434\u0430. \u042d\u0442\u043e\u0442 SwiftUI \u0441\u0442\u0438\u043b\u044c \u0438 \u043e\u043d \u043e\u0447\u0435\u043d\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0432\u0435\u043d &#8212; \u043d\u0435 \u043d\u0443\u0436\u043d\u044b XIB-\u044b, \u0432\u0435\u0440\u0441\u0442\u043a\u0430 \u0438\u0434\u0435\u0442 \u043f\u0440\u044f\u043c\u043e \u0432 \u043a\u043e\u0434\u0435 \u0432 \u0434\u0436\u0430\u0432\u0430-\u0441\u0442\u0438\u043b\u0435.<\/p>\n<pre><code class=\"swift\">import SwiftUI  struct ContentView: View {     @ObservedObject var model: ModelView     var body: some View {         if model.isValid() {             QRView(model: model)         } else {             InputView(model: model)         }     } }   struct InputView: View {     var model: ModelView     @State private var name: String = \"\"     @State private var birth: String = \"\"     @State private var passport: String = \"\"          var body: some View {         VStack {             Spacer()             TextField(\"3 \u0431\u0443\u043a\u0432\u044b \u0424\u0418\u041e\", text: $name)             TextField(\"\u0414\u0420 15.03.1964\", text: $birth)             TextField(\"2+3 \u0446\u0438\u0444\u0440\u044b \u043f\u0430\u0441\u043f\u043e\u0440\u0442\u0430\", text: $passport)             Spacer()             HStack {                 Button(\"\u0421\u0434\u0435\u043b\u0430\u0439 QR\", action: {                     self.model.tapQRButton(name, birth, passport)                 })                 Spacer()                 Button(\"\u041e\u0447\u0438\u0441\u0442\u0438\u0442\u044c\", action: {                     name=\"\"                     birth = \"\"                     passport = \"\"                     self.model.tapClean()                 })             }.padding()             Spacer()         }         .padding()         .textFieldStyle(RoundedBorderTextFieldStyle())     } }   struct QRView: View {     var model: ModelView     @State private var isSharePresented: Bool = false     var body: some View {         VStack {             if let image = model.generateQRCode() {                 Text(\"QR \u043a\u043e\u0434\").bold()                 Text(\"\u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0441\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\")                 Spacer()                 Image(uiImage: image).resizable()                     .frame(width: 200, height: 200)             } else {                 Text(\"QR \u043a\u043e\u0434\").bold().foregroundColor(.red)                 Text(\"\u043d\u0435 \u0441\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\").foregroundColor(.red)                 Spacer()                 Image(systemName: \"qrcode\").resizable()                     .frame(width: 75, height: 75)             }             Spacer()             Button(\"\u041d\u0430\u0437\u0430\u0434\", action: {           self.model.tapClean()             } ).padding()         }.padding()         Spacer()     } }          struct ContentView_Previews: PreviewProvider {         static var previews: some View {             ContentView(model: ModelView())         }     } <\/code><\/pre>\n<p>\u0418, \u043d\u0430\u043a\u043e\u043d\u0435\u0446, \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u0430\u043a\u0442 \u041c\u0435\u0440\u043b\u0435\u0437\u043e\u043d\u0441\u043a\u043e\u0433\u043e \u0431\u0430\u043b\u0435\u0442\u0430 &#8212; \u044d\u0442\u043e \u0444\u0430\u0439\u043b ModelView.swift, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u0434\u043d\u0438\u043c \u0433\u043b\u0430\u0437\u043e\u043c \u0433\u043b\u044f\u0434\u0438\u0442 \u043d\u0430 ContentView \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u043e\u0442 \u043d\u0435\u0433\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u043e \u043d\u0430\u0436\u0430\u0442\u0438\u0438 \u043d\u0430 \u043a\u043d\u043e\u043f\u043a\u0443, \u0430 \u0434\u0440\u0443\u0433\u0438\u043c \u0433\u043b\u0430\u0437\u043e\u043c \u043e\u043d \u0433\u043b\u044f\u0434\u0438\u0442 \u043d\u0430 UserModel, \u043a\u0443\u0434\u0430 \u043e\u043d \u0441\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0435\u0442 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u0443\u044e \u043e\u0442 ContentView \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u0438 \u0437\u0430\u0431\u0438\u0440\u0430\u0435\u0442 \u0441\u0442\u0440\u043e\u043a\u0443, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0432 QR-\u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0443 \u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0432 ContentView. <\/p>\n<pre><code class=\"swift\">\/\/ \/\/  ModelView.swift \/\/  import UIKit  class ModelView: ObservableObject {     @Published private var model:UserModel = UserModel()      func isValid()->Bool {         return model.user.isValid     }      func tapQRButton(_ name:String,_ birth:String,_ pass:String) {         model.updateUser(name: name, birth: birth, pass: pass)     }       func tapClean() {         model.cleanUser()     }          func generateQRCode() -> UIImage? {         var uiImage: UIImage? \/\/        let string = model.user.genUrl()         let string = \"https:\/\/github.com\/PapaBubaDiop\/qrushka\"          if let data = string.data(using: String.Encoding.utf8) {             if let filter = CIFilter(name: \"CIQRCodeGenerator\",                                      parameters: [\"inputMessage\": data,                                                   \"inputCorrectionLevel\": \"L\"]) {                 if let outputImage = filter.outputImage,                    let cgImage = CIContext().createCGImage(outputImage,                                                            from: outputImage.extent) {                     let size = CGSize(width: outputImage.extent.width * 5.0,                                       height: outputImage.extent.height * 5.0)                     UIGraphicsBeginImageContext(size)                     if let context = UIGraphicsGetCurrentContext() {                         context.interpolationQuality = .none                         context.draw(cgImage,                                      in: CGRect(origin: .zero,                                                 size: size))                         uiImage = UIGraphicsGetImageFromCurrentImageContext()                     }                     UIGraphicsEndImageContext()                 }             }         }         return uiImage     } }<\/code><\/pre>\n<p>ModelView \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0430 \u0432\u043d\u0443\u0442\u0440\u0438 ContentView \u0440\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0439<\/p>\n<pre><code>@ObservedObject var model: ModelView <\/code><\/pre>\n<p>\u0438 \u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043e\u043a\u043d\u0430 \u043f\u0435\u0440\u0435\u0440\u0438\u0441\u043e\u0432\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437 \u043a\u043e\u0433\u0434\u0430 \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u043d\u0430\u0448\u0435\u0439 \u043c\u043e\u0434\u0435\u043b\u0438. \u0415\u0449\u0435 \u0440\u0430\u0437 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0439 \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f<\/p>\n<ul>\n<li>\n<p>\u0432\u0432\u043e\u0434\u0438\u043c \u0442\u0435\u043a\u0441\u0442 \u0438 \u043d\u0430\u0436\u0438\u043c\u0430\u0435\u043c \u043a\u043d\u043e\u043f\u043a\u0443 \u0432 ContentView<\/p>\n<\/li>\n<li>\n<p>ModelView \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u044d\u0442\u043e\u0442 \u0442\u0435\u043a\u0441\u0442 \u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u0442 UserModel \u0438 \u0437\u043d\u0430\u0447\u0438\u0442 \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0441\u0430\u043c<\/p>\n<\/li>\n<li>\n<p>UserModel \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u0442 \u0438\u0437 \u0442\u0435\u043a\u0441\u0442\u0430 url \u0432\u0438\u0434\u0435 \u0441\u0442\u0440\u043e\u043a\u0438<\/p>\n<\/li>\n<li>\n<p>\u0440\u0430\u0437 UserModel \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0441\u044f, \u0442\u043e \u0438 ModelView \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0441\u044f, \u0437\u043d\u0430\u0447\u0438\u0442 ContentView \u043f\u0435\u0440\u0435\u0440\u0438\u0441\u043e\u0432\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0441\u0442\u0432\u0438\u0438 \u0441 \u043d\u043e\u0432\u044b\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u044f\u0432\u0438\u043b\u0438\u0441\u044c \u0432 ModelView<\/p>\n<\/li>\n<\/ul>\n<p>\u0423\u0440\u0430, \u043f\u0440\u043e\u0435\u043a\u0442 \u0433\u043e\u0442\u043e\u0432 \u0438 \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u0442\u0441\u044f. No Errors No Warnings.<\/p>\n<h2>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0432 \u0441\u0438\u043c\u0443\u043b\u044f\u0442\u043e\u0440\u0435<\/h2>\n<p>\u0418 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0441\u0442\u0430\u0440\u0442\u043e\u0432\u044b\u0439 \u044d\u043a\u0440\u0430\u043d. \u0417\u0430\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u043f\u043e\u043b\u044f \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0432\u0438\u0438 \u0441 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u043c \u0414\u0436\u043e\u043d\u043d\u0438.<\/p>\n<figure class=\"\"><figcaption><\/figcaption><\/figure>\n<p>\u041d\u0430\u0436\u0438\u043c\u0430\u0435\u043c \u043a\u043d\u043e\u043f\u043a\u0443 <strong><em>\u0421\u0434\u0435\u043b\u0430\u0439 QR<\/em><\/strong> \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c QR-\u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0443, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0441\u043a\u0440\u044b\u0442 \u043b\u0438\u043d\u043a \u043d\u0430 \u043d\u0430\u0448 \u0441\u0430\u0439\u0442, \u0433\u0434\u0435 \u0443\u0436\u0435 \u043b\u0435\u0436\u0438\u0442 <em>php-\u0441\u043a\u0440\u0438\u043f\u0442<\/em>, \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 \u0432\u044b\u0448\u0435. \u0421\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438, \u0433\u0440\u0430\u0436\u0434\u0430\u043d\u0435, \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0438\u0435!<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u0412\u044b<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-409837","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/409837","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=409837"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/409837\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=409837"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=409837"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=409837"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}