{"id":166,"date":"2023-11-14T01:20:20","date_gmt":"2023-11-13T23:20:20","guid":{"rendered":"https:\/\/blog.yosyfovych.te.ua\/?p=166"},"modified":"2023-11-14T01:20:21","modified_gmt":"2023-11-13T23:20:21","slug":"%d1%80%d0%b5%d0%b0%d0%bb%d1%96%d0%b7%d0%b0%d1%86%d1%96%d1%8f-%d0%b3%d0%b5%d0%bd%d0%b5%d1%80%d0%b0%d1%82%d0%be%d1%80%d0%b0-qr-%d0%ba%d0%be%d0%b4%d1%96%d0%b2-%d0%b2-zennoposter","status":"publish","type":"post","link":"https:\/\/blog.yosyfovych.te.ua\/?p=166","title":{"rendered":"\u0420\u0435\u0430\u043b\u0456\u0437\u0430\u0446\u0456\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430 QR \u043a\u043e\u0434\u0456\u0432 \u0432 ZennoPoster"},"content":{"rendered":"<p>\u041d\u0435\u0434\u0430\u0432\u043d\u043e \u044f \u043e\u043f\u0438\u0441\u0443\u0432\u0430\u0432 \u0437\u0430\u0434\u0430\u0447\u0443, \u0437\u0433\u0456\u0434\u043d\u043e \u044f\u043a\u043e\u0457 \u043f\u043e\u0442\u0440\u0456\u0431\u043d\u043e \u0431\u0443\u043b\u043e \u0432 \u0431\u0430\u0433\u0430\u0442\u043e\u043f\u043e\u0442\u043e\u043a\u043e\u0432\u043e\u043c\u0443 \u0440\u0435\u0436\u0438\u043c\u0456 \u0433\u0435\u043d\u0435\u0440\u0443\u0432\u0430\u0442\u0438 QR \u043a\u043e\u0434\u0438. \u0406 \u043e\u0442, \u0432\u0438\u0440\u0456\u0448\u0438\u0432 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u0438 \u0446\u0435 \u0440\u0456\u0448\u0435\u043d\u043d\u044f, \u0449\u043e\u0431 \u0432\u043e\u043d\u043e \u0432\u0436\u0435 \u0431\u0443\u043b\u043e \u043f\u0456\u0434 \u0440\u0443\u043a\u0430\u043c\u0438 \u0443 \u0432\u0438\u043f\u0430\u0434\u043a\u0443 \u043d\u0435\u043e\u0431\u0445\u0456\u0434\u043d\u043e\u0441\u0442\u0456. \u0420\u043e\u0437\u043a\u0430\u0436\u0443 \u044f\u043a \u0446\u0435 \u0431\u0443\u043b\u043e \u0456 \u044f\u043a \u0432\u0438\u0433\u043b\u044f\u0434\u0430\u0454 \u043a\u043e\u0434.<br \/>\n<!--more\u0427\u0438\u0442\u0430\u0442\u0438--><br \/>\n\u041f\u0435\u0440\u0435\u0434 \u0442\u0438\u043c \u044f\u043a \u043f\u0438\u0441\u0430\u0442\u0438 \u043a\u043e\u0434 \u044f \u0441\u0444\u043e\u0440\u043c\u0443\u043b\u044e\u0432\u0430\u0432 \u0456 \u043e\u043f\u0438\u0441\u0430\u0432 \u0432 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u043c\u0443 \u0432\u0438\u0433\u043b\u044f\u0434\u0456 \u0437\u0430\u0432\u0434\u0430\u043d\u043d\u044f. \u0420\u043e\u0431\u0438\u0432 \u044f \u0446\u0435 \u0443 \u0434\u043e\u0432\u0456\u043b\u044c\u043d\u0456\u0439 \u0444\u043e\u0440\u043c\u0456, \u0449\u043e\u0431 \u0437\u0440\u043e\u0437\u0443\u043c\u0456\u0442\u0438 \u0437 \u0447\u043e\u0433\u043e \u043f\u043e\u0442\u0440\u0456\u0431\u043d\u043e \u043f\u043e\u0447\u0430\u0442\u0438 \u0456 \u044f\u043a\u0456 \u0444\u0443\u043d\u043a\u0446\u0456\u0457 \u043f\u043e\u0432\u0438\u043d\u043d\u0456 \u0431\u0443\u0442\u0438 \u0432 \u0440\u0435\u0430\u043b\u0456\u0437\u0430\u0446\u0456\u0457.<\/p>\n<p>\u041f\u043e\u0447\u0430\u0432 \u0437 \u0442\u043e\u0433\u043e, \u0449\u043e \u0432 \u043c\u0435\u043d\u0435 \u043f\u043e\u0440\u044f\u0434 \u0437 \u043f\u0440\u043e\u0454\u043a\u0442\u043e\u043c \u043f\u043e\u0432\u0438\u043d\u043d\u0456 \u0431\u0443\u0442\u0438 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u0456 \u0444\u0430\u0439\u043b\u0438 \u0456 \u043f\u0430\u043f\u043a\u0430 \u0434\u043b\u044f \u0437\u0431\u0435\u0440\u0435\u0436\u0435\u043d\u043d\u044f \u043a\u0430\u0440\u0442\u0438\u043d\u043e\u043a QR \u043a\u043e\u0434\u0456\u0432. \u0429\u043e\u0431 \u043d\u0435 \u0441\u0442\u0432\u043e\u0440\u044e\u0432\u0430\u0442\u0438 \u0457\u0445 \u0440\u0443\u043a\u0430\u043c\u0438 \u044f \u0441\u0442\u0432\u043e\u0440\u0438\u0432 \u0431\u043b\u043e\u043a \u0421\u0432\u0456\u0439 C# \u043a\u043e\u0434 \u0437 \u0442\u0430\u043a\u0438\u043c \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u043e\u043c \u043a\u043e\u0434\u0443, \u044f\u043a\u0438\u0439 \u0437\u0440\u0430\u0437\u0443 \u0456 \u0432\u0438\u043a\u043e\u043d\u0430\u0432 (\u043f\u0456\u0441\u043b\u044f \u0447\u043e\u0433\u043e \u0431\u043b\u043e\u043a \u043c\u043e\u0436\u043d\u0430 \u0431\u0443\u043b\u043e \u0432\u0438\u0434\u0430\u043b\u0438\u0442\u0438, \u0442\u043e\u043c\u0443 \u0449\u043e \u0440\u043e\u0431\u043e\u0442\u0430 \u0437\u0440\u043e\u0431\u043b\u0435\u043d\u0430).<\/p>\n<pre data-enlighter-language=\"cs\" class=\"EnlighterJSRAW\">\nstring[] files = new[]{&quot;input.txt&quot;, &quot;bad.txt&quot;, &quot;good.txt&quot;};\nstring dir = Path.Combine(project.Directory, &quot;data&quot;);\nif(!Directory.Exists(dir)) Directory.CreateDirectory(dir);\n\nforeach(string name in files) {\n\tstring path = Path.Combine(project.Directory, name);\n\tif(!File.Exists(path)) File.WriteAllText(path, string.Empty);\n}\n<\/pre>\n<p>\u0414\u0430\u043b\u044c\u0448\u0435 \u0432\u0436\u0435 \u0441\u0442\u0432\u043e\u0440\u0438\u0432 \u043d\u0435\u043e\u0431\u0445\u0456\u0434\u043d\u0438\u0445 \u0442\u0440\u0438 \u0441\u043f\u0438\u0441\u043a\u0438 &#8211; input, good, bad \u0456 \u043f\u0440\u0438\u0432&#8217;\u044f\u0437\u0430\u0432 \u0457\u0445 \u0434\u043e \u0441\u0442\u0432\u043e\u0440\u0435\u043d\u0438\u0445 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u0438\u0445 \u0444\u0430\u0439\u043b\u0456\u0432.<br \/>\n\u0422\u0430\u043a \u044f\u043a \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u0438\u0439 \u0444\u0430\u0439\u043b input.txt \u043d\u0435 \u043c\u0456\u0441\u0442\u0438\u0432 \u043d\u0456\u044f\u043a\u0438\u0445 \u0434\u0430\u043d\u0438\u0445, \u0442\u043e \u044f \u0432\u0438\u0440\u0456\u0448\u0438\u0432 \u0437\u0433\u0435\u043d\u0435\u0440\u0443\u0432\u0430\u0442\u0438 \u0434\u0435\u043a\u0456\u043b\u044c\u043a\u0430 \u043f\u043e\u0441\u0438\u043b\u0430\u043d\u043d\u044c, \u0449\u043e\u0431 \u043c\u043e\u0436\u043d\u0430 \u0431\u0443\u043b\u043e \u043d\u0430 \u043d\u0438\u0445 \u043f\u043e\u0442\u0440\u0435\u043d\u0443\u0432\u0430\u0442\u0438\u0441\u044c.<br \/>\n\u0414\u043b\u044f \u0446\u044c\u043e\u0433\u043e \u0441\u0444\u043e\u0440\u043c\u0443\u0432\u0430\u0432 \u0441\u043b\u0456\u0434\u0443\u044e\u0447\u0438\u0439 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442 \u043a\u043e\u0434\u0443, \u044f\u043a\u0438\u0439 \u0442\u0430\u043a\u043e\u0436 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0432 \u043e\u0434\u043d\u043e\u0440\u0430\u0437\u043e\u0432\u043e \u043d\u0430 \u0432\u0438\u043a\u043e\u043d\u0430\u043d\u043d\u044f:<\/p>\n<pre data-enlighter-language=\"cs\" class=\"EnlighterJSRAW\">\nvar input = project.Lists[&quot;input&quot;];\n\nfor(int i =0;i&lt;100;i++){\n\tstring url = string.Format(&quot;https:\/\/blog.yosyfovych.te.ua\/?p={0}&quot;, i);\n\tinput.Add(url);\n}\n<\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440 \u0432 \u043c\u0435\u043d\u0435 \u0432\u0436\u0435 \u0431\u0443\u043b\u0438 \u0432\u0445\u0456\u0434\u043d\u0456 \u0434\u0430\u043d\u0456, \u0456 \u0431\u0443\u043b\u0438 \u043d\u0435\u043e\u0431\u0445\u0456\u0434\u043d\u0456 \u0441\u043f\u0438\u0441\u043a\u0438 \u0434\u043b\u044f \u0437\u0431\u0435\u0440\u0435\u0436\u0435\u043d\u043d\u044f \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0443 \u0440\u043e\u0431\u043e\u0442\u0438.<br \/>\n\u0412\u0438\u0440\u0456\u0448\u0435\u043d\u043d\u044f \u0437\u0430\u0432\u0434\u0430\u043d\u043d\u044f \u0432 \u043c\u0435\u043d\u0435 \u0441\u043a\u043b\u0430\u0434\u0430\u0454\u0442\u044c\u0441\u044f \u0437 \u0442\u0440\u044c\u043e\u0445 \u0431\u043b\u043e\u043a\u0456\u0432 &#8211; \u0441\u0442\u0432\u043e\u0440\u0435\u043d\u043d\u044f \u0456\u043c\u0435\u043d\u0456 \u0444\u0430\u0439\u043b\u0430 \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u043e\u0432\u0443\u044e\u0447\u0438 sha256, \u0441\u043a\u0430\u0447\u0443\u0432\u0430\u043d\u043d\u044f QR \u043a\u043e\u0434\u0443, \u0437\u0431\u0435\u0440\u0435\u0436\u0435\u043d\u043d\u044f \u0444\u0430\u0439\u043b\u0430 \u0432 \u043f\u0430\u043f\u043a\u0443.<br \/>\n\u0422\u043e\u043c\u0443 \u044f \u0437\u0440\u0430\u0437\u0443 \u0456 \u043d\u0430\u043f\u0438\u0441\u0430\u0432 \u0446\u0456 \u0444\u0443\u043d\u043a\u0446\u0456\u0457 \u0456 \u043f\u043e\u043c\u0456\u0441\u0442\u0438\u0432 \u0457\u0445 \u0432 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442.<br \/>\n\u0414\u043b\u044f \u0446\u044c\u043e\u0433\u043e \u0441\u0442\u0432\u043e\u0440\u0438\u0432 \u043d\u043e\u0432\u0438\u0439 \u0431\u043b\u043e\u043a \u0421\u0432\u0456\u0439 C# \u043a\u043e\u0434 \u0437 \u0442\u0430\u043a\u0438\u043c \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u043e\u043c \u043a\u043e\u0434\u0443:<\/p>\n<pre data-enlighter-language=\"cs\" class=\"EnlighterJSRAW\">\nFunc&lt;string, string&gt; CreateName = delegate(string text) {\n\tvar sb = new StringBuilder();\n\tusing (var hash = System.Security.Cryptography.SHA256Managed.Create()) {\n\t\tvar enc = Encoding.UTF8;\n\t\tforeach (var b in hash.ComputeHash(enc.GetBytes(text))) sb.Append(b.ToString(&quot;x2&quot;));\t \n\t}\n\treturn\tstring.Format(&quot;{0}.jpg&quot;,sb.ToString());\n};\n\n\nFunc&lt;string, byte[]&gt; Get = delegate(string link) {\n\t\n\tstring url = string.Format(&quot;https:\/\/chart.googleapis.com\/chart?chs=350x350&amp;cht=qr&amp;chl={0}&amp;choe=UTF-8&amp;chld=H|4&quot;, link);\n\tvar type = ZennoLab.InterfacesLibrary.Enums.Http.ResponceType.BodyOnly;\n\tvar method = ZennoLab.InterfacesLibrary.Enums.Http.HttpMethod.GET;\n\tbyte[] bytes = new Byte[0];\n\ttry {\n\t\tbytes = ZennoPoster.HTTP.RequestBytes(\n\t\t\tmethod: method, \/\/ \u043c\u0435\u0442\u043e\u0434 \u044f\u043a\u0438\u043c \u0431\u0443\u0434\u0435 \u0432\u0456\u0434\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043e \u0437\u0430\u043f\u0438\u0442\n\t\t\turl: url,\/\/ \u043f\u043e \u044f\u043a\u043e\u043c\u0443 \u0430\u0434\u0440\u0435\u0441\u0443 \u0431\u0443\u0434\u0435 \u0432\u0456\u0434\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043e \u0437\u0430\u043f\u0438\u0442\n\t\t\tcontent: string.Empty,\n\t\t\tcontentPostingType: string.Empty,\n\t\t\tproxy: string.Empty,\n\t\t\trespType: type, \/\/ \u0432 \u044f\u043a\u043e\u043c\u0443 \u0432\u0438\u0433\u043b\u044f\u0434\u0456 \u043f\u043e\u0432\u0435\u0440\u043d\u0443\u0442\u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\n\t\t\tUseOriginalUrl: true, \/\/ \u043d\u0435 \u0437\u043c\u0456\u043d\u044e\u0432\u0430\u0442\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0438 \u0437\u0430\u043f\u0438\u0442\u0443\n\t\t\tremoveDefaultHeaders: true \/\/ \u0432\u0438\u0434\u0430\u043b\u0435\u043d\u043d\u044f \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u0438\u0445 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0456\u0432\n\t\t);\n\t}\n\tcatch {\n\t\tproject.SendErrorToLog(&quot;error get&quot;,true);\n\t}\n\treturn bytes;\n};\n\n\nFunc&lt;byte[], string, string, bool&gt; Save = delegate(byte[] qr, string dir, string name) {\n\tbool check = false;\n\ttry {\n\t\tusing (MemoryStream ms = new MemoryStream(qr)){\n\t\t\tusing (var img = Image.FromStream(ms)) {\n\t\t\t\tif(img.Width &gt; 0){\t\n\t\t\t\t\timg.Save(Path.Combine(dir, name),System.Drawing.Imaging.ImageFormat.Jpeg);\n\t\t\t\t\tcheck = true;\t\t\t\n\t\t\t\t}\t\t \n\t\t\t}\n\t\t}\n\t}\n\tcatch {\n\t\tproject.SendInfoToLog(&quot;error save&quot;,true);\n\t}\n\treturn check;\n};\n\n\t\nproject.Context[&quot;name&quot;] = CreateName;\nproject.Context[&quot;sw&quot;] = System.Diagnostics.Stopwatch.StartNew();\nproject.Context[&quot;get&quot;] = Get;\nproject.Context[&quot;save&quot;] = Save;\n\n\n<\/pre>\n<p>\u0412\u043b\u0430\u0441\u043d\u0435 \u0446\u0435\u0439 \u0431\u043b\u043e\u043a \u043d\u0435\u043e\u0431\u0445\u0456\u0434\u043d\u043e \u0431\u0443\u0434\u0435 \u0432\u0438\u043a\u043e\u043d\u0430\u0442\u0438 \u043e\u0434\u0438\u043d \u0440\u0430\u0437 \u043d\u0430 \u043f\u043e\u0447\u0430\u0442\u043a\u0443 \u0432\u0438\u043a\u043e\u043d\u0430\u043d\u043d\u044f \u043f\u0440\u043e\u0454\u043a\u0442\u0443, \u0430 \u0434\u0430\u043b\u044c\u0448\u0435 \u0443\u0436\u0435 \u0432\u0438\u0437\u0438\u0432\u0430\u0442\u0438 \u0446\u0456 \u0444\u0443\u043d\u0446\u0456\u0457 \u0437 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0443 \u043d\u0435\u043e\u0431\u0445\u0456\u0434\u043d\u0443 \u043a\u0456\u043b\u044c\u043a\u0456\u0441\u0442\u044c \u0440\u0430\u0437\u0456\u0432. \u0417\u0440\u0443\u0447\u043d\u043e \u0442\u0438\u043c, \u0449\u043e \u0432\u0438\u0437\u0438\u0432\u0430\u0442\u0438 \u0457\u0445 \u043c\u043e\u0436\u043d\u0430 \u043e\u0434\u043d\u0438\u043c \u0440\u044f\u0434\u043a\u043e\u043c, \u0456 \u043c\u043e\u0436\u043d\u0430 \u0431\u0456\u043b\u044c\u0448\u0435 \u0437\u043e\u0441\u0435\u0440\u0435\u0434\u0438\u0442\u0438 \u0443\u0432\u0430\u0433\u0443 \u043f\u0440\u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u0456 \u043d\u0430 \u0441\u0430\u043c\u0456\u0439 \u043b\u043e\u0433\u0456\u0446\u0456.<\/p>\n<p>\u041f\u0456\u0441\u043b\u044f \u0447\u043e\u0433\u043e \u0443\u0436\u0435 \u0432 \u043d\u043e\u0432\u043e\u043c\u0443 \u0431\u043b\u043e\u0446\u0456 \u043d\u0430\u043f\u0438\u0441\u0430\u0432 \u0440\u0435\u0430\u043b\u0456\u0437\u0430\u0446\u0456\u044e, \u044f\u043a\u0430 \u043e\u0434\u0435\u0440\u0436\u0443\u0454 \u043f\u0435\u0440\u0448\u0438\u0439 \u0440\u044f\u0434\u043e\u043a \u0437 \u0432\u0438\u0434\u0430\u043b\u0435\u043d\u043d\u044f\u043c \u0437 \u0444\u0430\u0439\u043b\u0443 \u044f\u043a\u0438\u0439 \u043c\u0456\u0441\u0442\u0438\u0442\u044c \u0432\u0445\u0456\u0434\u043d\u0456 \u0434\u0430\u043d\u0456. \u0406 \u044f\u043a\u0449\u043e \u0444\u0430\u0439\u043b \u043f\u0443\u0441\u0442\u0438\u0439 &#8211; \u0432\u0438\u0445\u043e\u0434\u0438\u0442\u044c \u0437 \u0431\u043b\u043e\u043a\u0443 \u043f\u043e \u043f\u043e\u043c\u0438\u043b\u0446\u0456 (\u0449\u043e\u0431 \u043c\u043e\u0436\u043d\u0430 \u0431\u0443\u043b\u043e \u0437\u0443\u043f\u0438\u043d\u0438\u0442\u0438 \u0432\u0438\u043a\u043e\u043d\u0430\u043d\u043d\u044f \u043f\u0440\u043e\u0454\u043a\u0442\u0443 \u0437\u0433\u0456\u0434\u043d\u043e \u043d\u0435 \u0443\u0441\u043f\u0456\u0448\u043d\u0438\u0445 \u0432\u0438\u043a\u043e\u043d\u0430\u043d\u043d\u044c). \u0410 \u043a\u043e\u043b\u0438 \u0454 \u0440\u044f\u0434\u043a\u0438 \u0437 \u0434\u0430\u043d\u0438\u043c\u0438 &#8211; \u0442\u043e \u0432 \u043b\u043e\u0433 \u0432\u0438\u0432\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u043f\u043e\u0432\u0456\u0434\u043e\u043c\u043b\u0435\u043d\u043d\u044f \u0441\u043a\u0456\u043b\u044c\u043a\u0438 \u0457\u0445 \u0442\u0430\u043c \u0437\u0430\u043b\u0438\u0448\u0438\u043b\u043e\u0441\u044c.<\/p>\n<p>\u041f\u0456\u0441\u043b\u044f \u0447\u043e\u0433\u043e, \u043f\u043e \u0447\u0435\u0440\u0437\u0456 \u0432\u0438\u0437\u0438\u0432\u0430\u044e\u0442\u044c\u0441\u044f \u0444\u0443\u043d\u0446\u0456\u0457 \u0441\u0442\u0432\u043e\u0440\u0435\u043d\u043d\u044f \u0456\u043c\u0435\u043d\u0456, \u0441\u043a\u0430\u0447\u0443\u0432\u0430\u043d\u043d\u044f \u0444\u0430\u0439\u043b\u0443 \u0456 \u0432\u043b\u0430\u0441\u043d\u0435 \u0439\u043e\u0433\u043e \u0437\u0431\u0435\u0440\u0435\u0436\u0435\u043d\u043d\u044f.<br \/>\n\u0406\u043c&#8217;\u044f \u0437\u0430\u0432\u0436\u0434\u0438 \u0431\u0443\u0434\u0435 \u0441\u0442\u0432\u043e\u0440\u0435\u043d\u043e \u0431\u0435\u0437 \u043f\u043e\u043c\u0438\u043b\u043e\u043a.<br \/>\n\u0421\u043a\u0430\u0447\u0443\u0432\u0430\u043d\u043d\u044f \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438 QR \u043a\u043e\u0434\u0443 \u043c\u043e\u0436\u0435 \u0431\u0443\u0442\u0438 \u0437 \u043f\u043e\u043c\u0438\u043b\u043a\u043e\u044e, \u0442\u043e\u043c\u0443 \u0432 \u0444\u0443\u043d\u0446\u0456\u0457 \u044f\u043a\u0430 \u043e\u043f\u0438\u0441\u0430\u043d\u0430 \u0432\u0438\u0449\u0435 \u043a\u043e\u0434 \u043e\u0434\u044f\u0433\u043d\u0443\u0442\u0438\u0439 \u0432 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0456\u044e try\/catch. \u0406 \u044f\u043a\u0449\u043e \u0432\u0438\u043d\u0438\u043a\u043b\u0430 \u043f\u043e\u043c\u0438\u043b\u043a\u0430 &#8211; \u043f\u043e\u0432\u0435\u0440\u0442\u0430\u0454\u0442\u044c\u0441\u044f \u0437 \u0444\u0443\u043d\u0446\u0456\u0457 \u043f\u0443\u0441\u0442\u0438\u0439 \u043c\u0430\u0441\u0438\u0432, \u0442\u043e\u0431\u0442\u043e \u0431\u0435\u0437 \u0434\u0430\u043d\u0438\u0445.<br \/>\n\u0414\u0430\u043b\u044c\u0448\u0435 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c\u043e \u0434\u043e \u0437\u0431\u0435\u0440\u0435\u0436\u0435\u043d\u043d\u044f \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438, \u0434\u043b\u044f \u0446\u044c\u043e\u0433\u043e \u0437 \u043c\u0430\u0441\u0438\u0432\u0443 \u0431\u0430\u0439\u0442 \u0441\u0442\u0432\u043e\u0440\u044e\u0454\u0442\u044c\u0441\u044f \u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u043d\u044f. \u042f\u043a\u0449\u043e \u0432 \u043c\u0430\u0441\u0438\u0432\u0456 \u043d\u0435 \u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u043d\u044f &#8211; \u0442\u043e \u0441\u0442\u0432\u043e\u0440\u0435\u043d\u0430 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430 \u043d\u0435 \u0431\u0443\u0434\u0435 \u043c\u0430\u0442\u0438 \u0448\u0438\u0440\u0438\u043d\u0438 &#8211; \u0446\u0435 \u044f \u0456 \u043f\u0435\u0440\u0435\u0432\u0456\u0440\u044f\u044e. \u0423 \u0432\u0438\u043f\u0430\u0434\u043a\u0443 \u043a\u043e\u043b\u0438 \u0446\u0435 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430 &#8211; \u0437\u0431\u0435\u0440\u0456\u0433\u0430\u044e \u0456 \u043f\u043e\u0432\u0435\u0440\u0442\u0430\u044e true, \u0456\u043d\u0430\u043a\u0448\u0435 false.<\/p>\n<p>\u0417\u0430\u043b\u0438\u0448\u0438\u043b\u043e\u0441\u044c \u0442\u0456\u043b\u044c\u043a\u0438 \u0437\u0431\u0435\u0440\u0435\u0433\u0442\u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432 \u0441\u043f\u0438\u0441\u043e\u043a \u0437 \u0443\u0441\u043f\u0456\u0448\u043d\u0438\u043c \u0447\u0438 \u043d\u0435 \u0443\u0441\u043f\u0456\u0448\u043d\u0438\u043c \u0432\u0438\u043a\u043e\u043d\u0430\u043d\u043d\u044f\u043c \u0456 \u0432\u0438\u0432\u0435\u0441\u0442\u0438 \u043f\u043e\u0432\u0456\u0434\u043e\u043c\u043b\u0435\u043d\u043d\u044f \u0432 \u043b\u043e\u0433 \u0441\u043a\u0456\u043b\u044c\u043a\u0438 \u0440\u044f\u0434\u043a\u0456\u0432 \u0454 \u0443 \u043a\u043e\u0436\u043d\u043e\u043c\u0443 \u0441\u043f\u0438\u0441\u043a\u0443.<br \/>\n\u0412\u0438\u0448\u0435\u043d\u044c\u043a\u043e\u044e \u043d\u0430 \u0442\u043e\u0440\u0442\u0456 \u0431\u0443\u0434\u0435 \u0442\u0430\u043a\u043e\u0436 \u043f\u043e\u0432\u0456\u0434\u043e\u043c\u043b\u0435\u043d\u043d\u044f \u043f\u0440\u043e \u0442\u0435, \u0441\u043a\u0456\u043b\u044c\u043a\u0438 \u0447\u0430\u0441\u0443 \u0431\u0443\u043b\u043e \u0437\u0430\u0442\u0440\u0430\u0447\u0435\u043d\u043e \u043d\u0430 \u0441\u043a\u0430\u0447\u0443\u0432\u0430\u043d\u043d\u044f \u0456 \u0437\u0431\u0435\u0440\u0435\u0436\u0435\u043d\u043d\u044f QR \u043a\u043e\u0434\u0443, \u0449\u043e \u043c\u043e\u0436\u0435 \u0437\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0438\u0441\u044c, \u043a\u043e\u043b\u0438 \u0437\u0430\u0445\u043e\u0447\u0435\u0442\u044c\u0441\u044f \u043f\u0440\u0438\u0448\u0432\u0438\u0434\u0448\u0438\u0442\u0438 \u043f\u0440\u043e\u0446\u0435\u0441.<\/p>\n<p>\u041d\u0438\u0436\u0447\u0435 \u043d\u0430\u0432\u0435\u0434\u0435\u043d\u0438\u0439 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0439 \u043a\u043e\u0434:<\/p>\n<pre data-enlighter-language=\"cs\" class=\"EnlighterJSRAW\">\nvar input = project.Lists[&quot;input&quot;];\nvar bad = project.Lists[&quot;bad&quot;];\nvar good = project.Lists[&quot;good&quot;];\nvar sw = project.Context[&quot;sw&quot;];\n\nstring dir = Path.Combine(project.Directory, &quot;data&quot;);\nstring link = string.Empty;\nstring name = string.Empty;\n\nint count = 0;\nlock(SyncObjects.ListSyncer){\n\tcount = input.Count;\n\tif(count &gt; 0) {\n\t\tlink = input.GetItem(&quot;0&quot;, true);\n\t\tproject.SendInfoToLog(string.Format(&quot;count all: {0}&quot;, count-1), true);\n\t}\n}\nif(count == 0) {\n\tproject.SendInfoToLog(&quot;Stop&quot;, true);\n\tthrow new Exception();\n}\n\nname =  project.Context[&quot;name&quot;](link);\nbyte[] qr = project.Context[&quot;get&quot;](link);\nbool check = project.Context[&quot;save&quot;](qr, dir, name);\n\nif(check) {\n\tlock(SyncObjects.ListSyncer) good.Add(string.Join(&quot;|&quot;, new[]{name, link }));\n}\nelse lock(SyncObjects.ListSyncer) bad.Add(link);\t\n\nproject.SendInfoToLog(string.Format(&quot;count all: {0} good: {1} bad: {2}&quot;, input.Count,good.Count, bad.Count), true);\n\nsw.Stop();\nproject.SendInfoToLog(string.Format(&quot;\u0421\u0442\u043e\u043f: {0:c} ms&quot;, sw.Elapsed));\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u041d\u0435\u0434\u0430\u0432\u043d\u043e \u044f \u043e\u043f\u0438\u0441\u0443\u0432\u0430\u0432 \u0437\u0430\u0434\u0430\u0447\u0443, \u0437\u0433\u0456\u0434\u043d\u043e \u044f\u043a\u043e\u0457 \u043f\u043e\u0442\u0440\u0456\u0431\u043d\u043e \u0431\u0443\u043b\u043e \u0432 \u0431\u0430\u0433\u0430\u0442\u043e\u043f\u043e\u0442\u043e\u043a\u043e\u0432\u043e\u043c\u0443 \u0440\u0435\u0436\u0438\u043c\u0456 \u0433\u0435\u043d\u0435\u0440\u0443\u0432\u0430\u0442\u0438 QR \u043a\u043e\u0434\u0438. \u0406 \u043e\u0442, \u0432\u0438\u0440\u0456\u0448\u0438\u0432 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u0438 \u0446\u0435 \u0440\u0456\u0448\u0435\u043d\u043d\u044f, \u0449\u043e\u0431 \u0432\u043e\u043d\u043e \u0432\u0436\u0435 \u0431\u0443\u043b\u043e \u043f\u0456\u0434 \u0440\u0443\u043a\u0430\u043c\u0438 \u0443 \u0432\u0438\u043f\u0430\u0434\u043a\u0443 \u043d\u0435\u043e\u0431\u0445\u0456\u0434\u043d\u043e\u0441\u0442\u0456. \u0420\u043e\u0437\u043a\u0430\u0436\u0443 \u044f\u043a \u0446\u0435 \u0431\u0443\u043b\u043e \u0456 \u044f\u043a \u0432\u0438\u0433\u043b\u044f\u0434\u0430\u0454 \u043a\u043e\u0434.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-166","post","type-post","status-publish","format-standard","hentry","category-manuals"],"_links":{"self":[{"href":"https:\/\/blog.yosyfovych.te.ua\/index.php?rest_route=\/wp\/v2\/posts\/166","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.yosyfovych.te.ua\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.yosyfovych.te.ua\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.yosyfovych.te.ua\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.yosyfovych.te.ua\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=166"}],"version-history":[{"count":1,"href":"https:\/\/blog.yosyfovych.te.ua\/index.php?rest_route=\/wp\/v2\/posts\/166\/revisions"}],"predecessor-version":[{"id":167,"href":"https:\/\/blog.yosyfovych.te.ua\/index.php?rest_route=\/wp\/v2\/posts\/166\/revisions\/167"}],"wp:attachment":[{"href":"https:\/\/blog.yosyfovych.te.ua\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=166"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.yosyfovych.te.ua\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=166"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.yosyfovych.te.ua\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=166"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}