{"id":298481,"date":"2020-02-10T21:00:11","date_gmt":"2020-02-10T21:00:11","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=298481"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=298481","title":{"rendered":"\u0412\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445: \u0434\u0440\u0443\u0433\u043e\u0439 \u043f\u043e\u0434\u0445\u043e\u0434"},"content":{"rendered":"\n<div class=\"post__text post__text-html\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/487838\/\">\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438 \u0432\u0432\u0435\u0434\u0451\u043d\u043d\u044b\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c \u0438\u043b\u0438 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0445 \u0434\u0440\u0443\u0433\u0438\u043c \u043f\u0443\u0442\u0451\u043c \u0432 \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u043e\u043c \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u0438 \u043f\u043e\u0434\u0440\u0430\u0437\u0443\u043c\u0435\u0432\u0430\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0432\u0441\u0435\u0433\u043e \u043b\u0438\u0448\u044c <b>\u0434\u0432\u0443\u0445<\/b> \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0439 \u0432 \u043a\u043e\u0434\u0435: TRUE \u0438 FALSE. \u0412 \u0434\u0440\u0443\u0433\u043e\u043c \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u044f\u0432\u043d\u043e \u043d\u0435 \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u044b \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e. \u0415\u0441\u0442\u044c \u043b\u0438 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u043f\u043e\u043b\u0443\u0447\u0448\u0435?<br \/>  <a name=\"habracut\"><\/a><br \/>  \u041f\u0440\u043e\u0432\u0435\u0440\u043a\u043e\u0439 \u0437\u0430\u043d\u0438\u043c\u0430\u044e\u0442\u0441\u044f \u0442\u0430\u043a \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u043c\u044b\u0435 <i>\u0412\u0430\u043b\u0438\u0434\u0430\u0442\u043e\u0440\u044b<\/i>(\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043b\u0438\u0448\u044c \u0447\u0430\u0441\u0442\u044c\u044e \u0432\u0441\u0435\u0433\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445). \u0412 \u0441\u0442\u0430\u0442\u044c\u0435 <a href=\"https:\/\/habr.com\/ru\/post\/41772\/\">\u0421\u0435\u0440\u0432\u0435\u0440\u043d\u0430\u044f \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445<\/a> \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0432\u0430\u043b\u0438\u0434\u0430\u0442\u043e\u0440\u0430, \u043d\u043e \u0435\u0441\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043d\u044e\u0430\u043d\u0441\u043e\u0432 \u0432 \u0432\u0438\u0434\u0435 <u>\u043b\u043e\u043a\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 <\/u>\u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u0438 \u0441\u0430\u043c\u043e\u0433\u043e <u>\u0444\u043e\u0440\u043c\u0430\u0442\u0430 \u043e\u0448\u0438\u0431\u043e\u043a<\/u>.<\/p>\n<p>  \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0444\u043e\u0440\u043c\u0430\u0442 \u043e\u0448\u0438\u0431\u043e\u043a.<\/p>\n<p>  \u041f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u043c\u044b\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e\u0431\u044b \u043c\u0435\u0442\u043e\u0434 \u0432\u0430\u043b\u0438\u0434\u0430\u0442\u043e\u0440\u0430, \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u044e\u0449\u0438\u0439 \u0434\u0430\u043d\u043d\u044b\u0435, \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u043b <b>\u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u044e(\u043c\u0430\u0441\u0441\u0438\u0432, \u0441\u043f\u0438\u0441\u043e\u043a \u0438 \u0442.\u0434.) \u0441\u0442\u0440\u043e\u043a<\/b> \u0432\u043c\u0435\u0441\u0442\u043e \u0431\u0443\u043b\u0435\u0432\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0438\u043b\u0438 \u0431\u0440\u043e\u0441\u0430\u043d\u0438\u044f \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0439. \u0422\u0430\u043a\u043e\u0439 \u0444\u043e\u0440\u043c\u0430\u0442 \u0431\u0443\u0434\u0435\u0442 \u0431\u043e\u043b\u0435\u0435 \u0433\u0438\u0431\u043a\u0438\u043c \u0438 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0432\u043d\u044b\u043c.<\/p>\n<p>  \u041f\u0440\u0438\u0432\u0435\u0434\u0443 \u043f\u0440\u0438\u043c\u0435\u0440 \u043d\u0430 Java:<\/p>\n<pre><code class=\"java\">import java.util.ArrayList; import java.util.Collection; import java.util.regex.Matcher; import java.util.regex.Pattern;  public interface ValidateUser { \tString OK = &quot;OK:&quot;; \tString FAIL= &quot;FAIL:&quot;; \tCollection&lt;String&gt; apply(String username, String password, String email); \tdefault Collection&lt;String&gt; passwordValidate(String password){ \t\tvar result = new ArrayList&lt;String&gt;(1); \t\tint size = password.trim().length(); \t\tif(size &lt; 3 || size &gt; 20) result.add(&quot;Password error:too short value or too long name. Password must be greater or 3 characters and smaller then 20 simbols.&quot;); \t\treturn result; \t} \tdefault Collection&lt;String&gt; usernameValidate(String name){ \t\tvar result = new ArrayList&lt;String&gt;(1); \t\tint size = name.trim().length(); \t\tif(size &lt; 3 || size &gt; 30) result.add(&quot;Username error:too short or too long name. Name must be greater or 3 characters and smaller then 30 simbols.&quot;); \t\treturn result; \t} \tdefault Collection&lt;String&gt; emailValidate(String email){ \t\tvar result = new ArrayList&lt;String&gt;(1); \t\tString regex = &quot;^[\\\\w!#$%&amp;'*+\/=?`{|}~^-]+(?:\\\\.[\\\\w!#$%&amp;'*+\/=?`{|}~^-]+)*@(?:[a-zA-Z0-9-]+\\\\.)+[a-zA-Z]{2,6}$&quot;; \t\tPattern pattern = Pattern.compile(regex); \t\tMatcher matcher = pattern.matcher(email); \t\tif (!matcher.find()) result.add(&quot;Email error:&quot; + email + &quot; is not valid&quot;); \t\treturn result; \t} \tclass Default implements ValidateUser{  \t\t@Override \t\tpublic Collection&lt;String&gt; apply(String username, String password, \t\t\t\tString email) { \t\t\tvar errors = passwordValidate(password.trim()); \t\t\terrors.addAll(usernameValidate(username.trim())); \t\t\terrors.addAll(emailValidate(email.trim())); \t\t\treturn errors; \t\t} \t\t \t} } <\/code><\/pre>\n<p>  \u041a\u0430\u043a \u0437\u0434\u0435\u0441\u044c \u0432\u0438\u0434\u043d\u043e \u0432\u0441\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u044e\u0442 \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u044e \u0441\u0442\u0440\u043e\u043a.<\/p>\n<p>  \u041f\u0440\u0438\u043c\u0435\u0440 Unit \u0442\u0435\u0441\u0442\u0430:<\/p>\n<pre><code class=\"java\">        @Test \tvoid validateUserTest() { \t\t \t\tvar validate = new ValidateUser2.Default(); \t\tvar result = validate.apply(&quot;aaa&quot;, &quot;qwe&quot;, &quot;aaa@mail.ru&quot;); \t\tassertTrue(result.isEmpty()); \t\tresult = validate.apply(&quot;aaa&quot;, &quot;qwe&quot;, &quot;&quot;); \t\tassertFalse(result.isEmpty()); \t\tassertEquals(1, result.size()); \t\t \t\tresult = validate.apply(&quot;aa&quot;, &quot;qwe&quot;, &quot;aaa@mail.ru&quot;); \t\tassertFalse(result.isEmpty()); \t\tassertEquals(1, result.size()); \t\t \t\tresult = validate.apply(&quot;aaa&quot;, &quot;qwe&quot;, &quot;@mail.qweqwe&quot;); \t\tassertFalse(result.isEmpty()); \t\tassertEquals(1, result.size()); \t\t \t\tresult = validate.apply(&quot;aa&quot;, &quot;qw&quot;, &quot;&quot;); \t\tassertFalse(result.isEmpty()); \t\tassertEquals(3, result.size()); \t} <\/code><\/pre>\n<p>  \u0410 \u0442\u0435\u043f\u0435\u0440\u044c \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043b\u043e\u043a\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u043e\u0448\u0438\u0431\u043e\u043a.<\/p>\n<p>  \u041f\u0440\u0438\u043c\u0435\u0440 \u0441\u043d\u043e\u0432\u0430 \u043d\u0430 Java:<\/p>\n<pre><code class=\"java\">public interface LocalizedValidation { \tString OK = &quot;OK:&quot;; \tString FAIL= &quot;FAIL:&quot;; \tCollection&lt;String&gt; apply(String username, String password, String email, Locale locale); \tdefault Collection&lt;String&gt; passwordValidate(String password, ResourceBundle bundle){ \t\tvar result = new ArrayList&lt;String&gt;(1); \t\tint size = password.trim().length(); \t\tif(size &lt; 3 || size &gt; 20) result.add(bundle.getString(&quot;password&quot;)); \t\treturn result; \t} \tdefault Collection&lt;String&gt; usernameValidate(String name, ResourceBundle bundle){ \t\tvar result = new ArrayList&lt;String&gt;(1); \t\tint size = name.trim().length(); \t\tif(size &lt; 3 || size &gt; 30) result.add(bundle.getString(&quot;username&quot;)); \t\treturn result; \t} \tdefault Collection&lt;String&gt; emailValidate(String email, ResourceBundle bundle){ \t\tvar result = new ArrayList&lt;String&gt;(1); \t\tString regex = &quot;^[\\\\w!#$%&amp;'*+\/=?`{|}~^-]+(?:\\\\.[\\\\w!#$%&amp;'*+\/=?`{|}~^-]+)*@(?:[a-zA-Z0-9-]+\\\\.)+[a-zA-Z]{2,6}$&quot;; \t\tPattern pattern = Pattern.compile(regex); \t\tMatcher matcher = pattern.matcher(email); \t\tif (!matcher.find()) result.add(bundle.getString(&quot;username&quot;)+email); \t\treturn result; \t} \tclass Default implements LocalizedValidation{  \t\t@Override \t\tpublic Collection&lt;String&gt; apply(String username, String password, \t\t\t\tString email, Locale locale) { \t\t\tResourceBundle bundle = ResourceBundle.getBundle(&quot;errors&quot;, locale); \t\t\tvar errors = passwordValidate(password.trim(), bundle); \t\t\terrors.addAll(usernameValidate(username.trim(), bundle)); \t\t\terrors.addAll(emailValidate(email.trim(), bundle)); \t\t\treturn errors; \t\t} \t} } <\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"java\"> \t@Test \tvoid localizedUserTest() { \t\tvar validate = new LocalizedValidation.Default(); \t\tvar result = validate.apply(&quot;aaa&quot;, &quot;qwe&quot;, &quot;aaa@mail.ru&quot;, Locale.ENGLISH); \t\tassertTrue(result.isEmpty()); \t\tresult = validate.apply(&quot;aaa&quot;, &quot;qwe&quot;, &quot;&quot;, Locale.ENGLISH); \t\tassertFalse(result.isEmpty()); \t\tassertEquals(1, result.size()); \t\tSystem.out.println(result.iterator().next()); \t\t \t\tresult = validate.apply(&quot;aaa&quot;, &quot;qwe&quot;, &quot;&quot;, new Locale(&quot;ru&quot;)); \t\tassertFalse(result.isEmpty()); \t\tassertEquals(1, result.size()); \t\tSystem.out.println(result.iterator().next()); \t} <\/code><\/pre>\n<p>  \u0424\u0430\u0439\u043b\u044b \u043b\u043e\u043a\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0439 \u043b\u0435\u0436\u0430\u0442 \u0432 src\/main\/resources.<\/p>\n<p>  errors_ru.properties:<\/p>\n<pre><code class=\"plaintext\">mail=Email \u043e\u0448\u0438\u0431\u043a\u0430: \u043d\u0435 \u0432\u0435\u0440\u043d\u044b\u0439 Email: username=\u041e\u0448\u0438\u0431\u043a\u0430 \u0438\u043c\u0435\u043d\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f: \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u043a\u043e\u0440\u043e\u0442\u043a\u043e\u0435 \u0438\u043b\u0438 \u0434\u043b\u0438\u043d\u043d\u043e\u0435 \u0438\u043c\u044f. password=\u041e\u0448\u0438\u0431\u043a\u0430 \u0432 \u0434\u043b\u0438\u043d\u0435 \u043f\u0430\u0440\u043e\u043b\u044f: \u043f\u0430\u0440\u043e\u043b\u044c \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0434\u043b\u0438\u043d\u043d\u044b\u0439.<\/code><\/pre>\n<p>  errors.properties:<\/p>\n<pre><code class=\"plaintext\">mail=Email error: is not valid: username=Username error:too short or too long name. Name must be greater or 3 characters and smaller then 30 simbols. password=Password error:too short value or too long name. Password must be greater or 3 characters and smaller then 20 simbols.<\/code><\/pre>\n<p>  \u041d\u0430\u0434\u0435\u044e\u0441\u044c, \u0447\u0442\u043e \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u044b, \u043f\u0438\u0448\u0443\u0448\u0438\u0435 \u043d\u0430 \u0441\u0432\u043e\u0438\u0445 \u044f\u0437\u044b\u043a\u0430\u0445, \u043d\u0430\u0439\u0434\u0443\u0442 \u0442\u0430\u043a\u043e\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u043d\u044b\u043c \u0438 \u0443\u0434\u043e\u0431\u043d\u044b\u043c \u0438 \u0441\u043c\u043e\u0433\u0443\u0442 \u0435\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u0443 \u0441\u0435\u0431\u044f.<\/p>\n<p>  P.S.<\/p>\n<p>  \u0412\u0430\u0440\u0438\u0430\u043d\u0442 \u043c\u0435\u0442\u043e\u0434\u0430 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0438 <b>\u0432\u043e\u0437\u0432\u0440\u0430\u0442 \u0441\u0442\u0440\u043e\u043a\u0438 \u0438\u0437 \u043c\u0435\u0442\u043e\u0434\u0430<\/b>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043c\u043e\u0436\u0435\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0432 \u0441\u0435\u0431\u0435 \u043a\u0430\u043a <b>\u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f<\/b>(\u0431\u0443\u0434\u044c \u0442\u043e Id \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, XML \u0438\u043b\u0438 JSON) \u0442\u0430\u043a \u0438 <b>\u0434\u0430\u043d\u043d\u044b\u0435 \u043e\u0431 \u043e\u0448\u0438\u0431\u043a\u0430\u0445<\/b> \u0438 \u043f\u0430\u0440\u0441\u0438\u0442\u044c\u0441\u044f \u043d\u0430 \u0441\u0442\u043e\u0440\u043e\u043d\u0435 \u043a\u043b\u0438\u0435\u043d\u0442\u0430:<\/p>\n<pre><code class=\"java\">public String authUser(String username, String password, String email, Locale locale) { \tvar validate = new LocalizedValidation.Default(); \tvar errors = validate.apply(&quot;aaa&quot;, &quot;qwe&quot;, &quot;aaa@mail.ru&quot;, locale); \tif(!errors.isEmpty()) { \treturn LocalizedValidation.FAIL+errors.stream().collect(Collectors.joining(&quot;&lt;br\/&gt;&quot;)); \t}else { \t    try { \t\tvar user = new User.Default(0L, username.trim(), email.trim(), new Encrypt().apply(password.trim()), &quot;&quot;).create(dataSource); \t\treturn LocalizedValidation.OK+user.toString();\/\/ or LocalizedValidation.Ok+user.id(); \/\/or LocalizedValidation.Ok+user.toJson(); \t\t} catch (RuntimeException e) { \t\t\treturn FAIL+e.getMessage(); \t\t} \t} } <\/code><\/pre>\n<p>  \u0415\u0441\u0442\u044c, \u043a\u043e\u043d\u0435\u0447\u043d\u043e, \u0437\u0430\u043c\u0435\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u0430\u044f <a href=\"https:\/\/habr.com\/ru\/company\/haulmont\/blog\/427543\/\">\u0441\u0442\u0430\u0442\u044c\u044f \u043d\u0430 \u0445\u0430\u0431\u0440\u0435 \u043f\u0440\u043e \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u044e \u0432 Java<\/a>, \u043d\u043e \u043f\u043e\u0434\u0445\u043e\u0434 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0442\u0430\u043c \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f \u043c\u043e\u0436\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0434\u0430\u043b\u0435\u043a\u043e \u043d\u0435 \u0432\u043e \u0432\u0441\u0435\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 \u0438 \u043e\u0441\u043d\u043e\u0432\u0430\u043d \u043d\u0430 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044f\u0445 \u0438 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f\u0445.<\/p>\n<p>  \u0412 \u043e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u0435 \u0441\u0442\u0430\u0442\u044c\u0438 \u043f\u0430\u0440\u0443 \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0445 \u0441\u0441\u044b\u043b\u043e\u043a \u043f\u0440\u043e \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435:<\/p>\n<ol>\n<li><a href=\"https:\/\/habr.com\/ru\/post\/358178\/\">\u0410\u043d\u0442\u0438\u043f\u0430\u0442\u0442\u0435\u0440\u043d\u044b \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u041f\u041e<\/a><\/li>\n<li><a href=\"https:\/\/habr.com\/ru\/post\/351430\/\">\u041a\u043e\u043d\u0446\u0435\u043f\u0446\u0438\u0438 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f<\/a><\/li>\n<\/ol>\n<\/div>\n<p> \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\/post\/487838\/\"> https:\/\/habr.com\/ru\/post\/487838\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/487838\/\">\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438 \u0432\u0432\u0435\u0434\u0451\u043d\u043d\u044b\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c \u0438\u043b\u0438 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0445 \u0434\u0440\u0443\u0433\u0438\u043c \u043f\u0443\u0442\u0451\u043c \u0432 \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u043e\u043c \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u0438 \u043f\u043e\u0434\u0440\u0430\u0437\u0443\u043c\u0435\u0432\u0430\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0432\u0441\u0435\u0433\u043e \u043b\u0438\u0448\u044c <b>\u0434\u0432\u0443\u0445<\/b> \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0439 \u0432 \u043a\u043e\u0434\u0435: TRUE \u0438 FALSE. \u0412 \u0434\u0440\u0443\u0433\u043e\u043c \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u044f\u0432\u043d\u043e \u043d\u0435 \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u044b \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e. \u0415\u0441\u0442\u044c \u043b\u0438 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u043f\u043e\u043b\u0443\u0447\u0448\u0435?  <\/p>\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-298481","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/298481","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=298481"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/298481\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=298481"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=298481"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=298481"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}