{"id":195552,"date":"2013-10-01T09:03:03","date_gmt":"2013-10-01T05:03:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=195552"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=195552","title":{"rendered":"<span class=\"post_title\">8+ \u0432 1: \u043a\u0430\u043a \u044f \u0445\u043e\u0442\u0435\u043b \u043f\u0440\u0438\u0432\u043b\u0435\u0447\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435<\/span>"},"content":{"rendered":"<div class=\"content html_format\">   \t\u0414\u043e\u0431\u0440\u044b\u0439 \u0432\u0435\u0447\u0435\u0440, \u0445\u0430\u0431\u0440\u0430\u0447\u0438\u0442\u0430\u0442\u0435\u043b\u0438!<\/p>\n<p>  <s>\u041f\u0435\u0440\u0435\u0434<\/s> \u0432\u044b\u0445\u043e\u0434\u043e\u043c <a href=\"http:\/\/habrahabr.ru\/post\/195554\/\"><s>8+ \u0432 1: \u043d\u0430\u0448 \u043d\u043e\u0432\u044b\u0439 \u043c\u0435\u0441\u0441\u0435\u043d\u0434\u0436\u0435\u0440 \u043f\u043e\u0434 iOS \u0438 Android<\/s><\/a>, \u043c\u043d\u0435 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u043f\u0440\u043e\u0434\u0435\u043b\u0430\u0442\u044c \u043a\u043e\u0435-\u043a\u0430\u043a\u0443\u044e \u0440\u0430\u0431\u043e\u0442\u0443 \u043f\u043e \u0438\u0437\u0443\u0447\u0435\u043d\u0438\u044e \u0442\u0435\u0445 \u043c\u0435\u0441\u0442, \u043a\u0443\u0434\u0430 \u043c\u044b \u0441\u043e\u0431\u0438\u0440\u0430\u043b\u0438\u0441\u044c \u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u0435\u0441\u0441-\u0440\u0435\u043b\u0438\u0437\u044b. \u041e\u0434\u043d\u0438\u043c \u0438\u0437 \u0442\u0430\u043a\u0438\u0445 \u043c\u0435\u0441\u0442 \u0441\u0442\u0430\u043b \u0425\u0430\u0431\u0440.<\/p>\n<p>  \u041c\u044b \u0437\u0430\u0434\u0430\u043b\u0438\u0441\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c\u0438 \u0432\u043e\u043f\u0440\u043e\u0441\u0430\u043c\u0438:  <\/p>\n<ul>\n<li> \u0412 \u043a\u0430\u043a\u043e\u0439 \u0434\u0435\u043d\u044c \u043d\u0435\u0434\u0435\u043b\u0438 \u043b\u0443\u0447\u0448\u0435 \u0432\u0441\u0435\u0433\u043e \u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0441\u0442? <\/li>\n<li> \u0412 \u043a\u0430\u043a\u043e\u0435 \u0432\u0440\u0435\u043c\u044f (\u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b \u0432\u0440\u0435\u043c\u0435\u043d\u0438) \u043b\u0443\u0447\u0448\u0435 \u0432\u0441\u0435\u0433\u043e \u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0441\u0442? <\/li>\n<li> \u0412 \u043a\u0430\u043a\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0433\u043e\u0434\u0430 \u043b\u0443\u0447\u0448\u0435 \u0432\u0441\u0435\u0433\u043e \u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0441\u0442? <\/li>\n<\/ul>\n<p>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/5d9\/b79\/d44\/5d9b79d443b9a714b7902e49c9610154.gif\" alt=\"image\"\/><\/p>\n<p>  <a name=\"habracut\"><\/a><\/p>\n<h5>\u0412\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u0435<\/h5>\n<p>  \u041c\u0435\u043d\u044f \u0441 \u0441\u0430\u043c\u043e\u0433\u043e \u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0435 \u043f\u043e\u043a\u0438\u0434\u0430\u043b\u043e \u043e\u0449\u0443\u0449\u0435\u043d\u0438\u0435 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0433\u0434\u0435-\u0442\u043e \u044f \u043f\u043e\u0434\u043e\u0431\u043d\u0443\u044e \u0441\u0442\u0430\u0442\u044c\u044e \u0443\u0436\u0435 \u0432\u0438\u0434\u0435\u043b, \u0433\u0434\u0435-\u0442\u043e \u0443\u0436\u0435 \u044d\u0442\u043e\u0442 \u0432\u043e\u043f\u0440\u043e\u0441 \u043f\u043e\u0434\u043d\u0438\u043c\u0430\u043b\u0441\u044f, \u043d\u043e \u0433\u0434\u0435?! \u042f \u0442\u0430\u043a \u0438 <s>\u043d\u0435 \u0441\u043c\u043e\u0433 \u043d\u0430\u0439\u0442\u0438, \u0441\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e \u043f\u043b\u043e\u0445\u043e \u0438\u0441\u043a\u0430\u043b<\/s> (<a href=\"http:\/\/habrahabr.ru\/post\/145045\/\">\u0442\u0443\u0442<\/a>, <a href=\"http:\/\/habrahabr.ru\/post\/80948\/\">\u0442\u0443\u0442<\/a>, <a href=\"http:\/\/habrahabr.ru\/post\/162209\/\">\u0442\u0443\u0442<\/a>), \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0440\u0435\u0448\u0438\u043b \u043f\u0440\u043e\u0432\u0435\u0441\u0442\u0438 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0440\u0430\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435 \u0438, \u043f\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438, \u0432\u044b\u044f\u0441\u043d\u0438\u0442\u044c \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0435 \u043c\u043e\u043c\u0435\u043d\u0442\u044b.<\/p>\n<p>  \u0425\u043e\u0447\u0443 \u0443\u0442\u043e\u0447\u043d\u0438\u0442\u044c, \u0447\u0442\u043e \u043f\u043e\u0434 \u00ab\u043b\u0443\u0447\u0448\u0435 \u0432\u0441\u0435\u0433\u043e\u00bb \u043c\u044b \u043f\u043e\u0434\u0440\u0430\u0437\u0443\u043c\u0435\u0432\u0430\u0435\u043c \u043f\u0440\u0438\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u0435 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0447\u0438\u0441\u043b\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043b\u0438\u0431\u043e \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u044f\u0442 (\u043f\u0440\u043e\u0447\u0438\u0442\u0430\u044e\u0442), \u043b\u0438\u0431\u043e \u0434\u043e\u0431\u0430\u0432\u044f\u0442 \u0432 \u0437\u0430\u043a\u043b\u0430\u0434\u043a\u0438, \u043b\u0438\u0431\u043e \u043f\u0440\u043e\u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0438\u0440\u0443\u044e\u0442 \u043f\u043e\u0441\u0442.<\/p>\n<p>  \u041d\u0430\u0447\u0430\u043b\u043e\u0441\u044c \u0432\u0441\u0451 \u0441 \u043f\u0430\u0440\u0441\u0438\u043d\u0433\u0430 \u0441\u0442\u0430\u0442\u0435\u0439. \u0411\u043b\u0430\u0433\u043e \u0443 \u0445\u0430\u0431\u0440\u0430 \u0435\u0441\u0442\u044c \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u044b \u043f\u043e\u0441\u0442\u043e\u0432 \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043c\u043e\u0436\u043d\u043e \u0441\u043f\u043e\u043a\u043e\u0439\u043d\u043e \u043f\u0440\u043e\u0439\u0442\u0438\u0441\u044c \u0438 \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e:<\/p>\n<p>  <code> http:\/\/habrahabr.ru\/post\/[id]\/ <\/code><\/p>\n<p>  \u041d\u0430 \u0441\u043a\u043e\u0440\u0443\u044e \u0440\u0443\u043a\u0443 \u0431\u044b\u043b \u043d\u0430\u043f\u0438\u0441\u0430\u043d \u0433\u0440\u0430\u0431\u0431\u0435\u0440 \u043d\u0430 Objective-C.  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 \u0433\u0440\u0430\u0431\u0431\u0435\u0440\u0430<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"objectivec\">\/\/ \/\/  main.m \/\/  HabrahabrParser \/\/ \/\/  Created by AndrewShmig on 9\/27\/13. \/\/  Copyright (c) 2013 AndrewShmig. All rights reserved. \/\/  #import &lt;Foundation\/Foundation.h&gt;   NSString* getPublishDate(NSString *); NSString* getPostViewsCount(NSString *); NSString* getFavCount(NSString *); NSString* getCommentsCount(NSString *); NSString* removeTags(NSString *);   int main(int argc, const char * argv[]) {     \/\/    freopen(&quot;\/Users\/new\/Documents\/Development\/HabrahabrParser\/habrahabr.txt&quot;, &quot;w&quot;, stdout);                  const int MAX = 200000;                  for(int i=1; i&lt;=MAX; i++) {                          @autoreleasepool {                                  NSString *url = [NSString stringWithFormat:@&quot;http:\/\/habrahabr.ru\/post\/%d\/&quot;, i];                 NSURL *link = [NSURL URLWithString:url];                 NSURLRequest *request = [NSURLRequest requestWithURL:link];                                  NSError *error = nil;                 NSData *post = [NSURLConnection sendSynchronousRequest:request                                                      returningResponse:nil                                                                  error:&error];                 NSString *path = [NSString stringWithFormat:@&quot;\/Volumes\/TimeMachine Backup\/HabrahabrPages\/%d.txt&quot;, i];                 [post writeToFile:path atomically:YES];                                  NSLog(@&quot;[%d \/ %d]&quot;, i, MAX);             }         }          return 0; }  NSString* removeTags(NSString *matchString) {     if(nil == matchString)         return nil;          NSRegularExpression *tagContent = [NSRegularExpression regularExpressionWithPattern:@&quot;&gt;.+&lt;&quot;                                                                                 options:NSRegularExpressionCaseInsensitive                                                                                   error:nil];     __block NSString* resultingString;     [tagContent enumerateMatchesInString:matchString                                  options:0                                    range:NSMakeRange(0, [matchString length])                               usingBlock:^(NSTextCheckingResult *result, NSMatchingFlags flags, BOOL *stop) {                                   resultingString = [matchString substringWithRange:[result range]];                                   *stop = YES;                               }];          return [resultingString substringWithRange:NSMakeRange(1, [resultingString length] - 2)]; }  NSString* getCommentsCount(NSString *html) {     if(nil == html)         return nil;          NSRegularExpression *regex = [NSRegularExpression regularExpressionWithPattern:@&quot;id=\\&quot;comments_count\\&quot;&gt;.+&lt;\/&quot;                                                                            options:NSRegularExpressionCaseInsensitive                                                                              error:nil];     __block NSString *comments;     [regex enumerateMatchesInString:html                             options:0                               range:NSMakeRange(0, [html length])                          usingBlock:^(NSTextCheckingResult *result, NSMatchingFlags flags, BOOL *stop) {                                                            comments = [html substringWithRange:[result range]];                              *stop = YES;                                                        }];          return comments; }  NSString* getFavCount(NSString *html) {     if(nil == html)         return nil;          NSRegularExpression *regex = [NSRegularExpression regularExpressionWithPattern:@&quot;title=\\&quot;\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439, \u0434\u043e\u0431\u0430\u0432\u0438\u0432\u0448\u0438\u0445 \u043f\u043e\u0441\u0442 \u0432 \u0438\u0437\u0431\u0440\u0430\u043d\u043d\u043e\u0435\\&quot;&gt;.+&lt;\/&quot;                                                                            options:NSRegularExpressionCaseInsensitive                                                                              error:nil];     __block NSString *fav;     [regex enumerateMatchesInString:html                             options:0                               range:NSMakeRange(0, [html length])                          usingBlock:^(NSTextCheckingResult *result, NSMatchingFlags flags, BOOL *stop) {                                                            fav = [html substringWithRange:[result range]];                              *stop = YES;                                                        }];          return fav; }  NSString* getPostViewsCount(NSString *html) {     if(nil == html)         return nil;          NSRegularExpression *regex = [NSRegularExpression regularExpressionWithPattern:@&quot;title=\\&quot;\u041f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u044b \u043f\u043e\u0441\u0442\u0430\\&quot;&gt;.+&lt;\/&quot;                                                                            options:NSRegularExpressionCaseInsensitive                                                                              error:nil];     __block NSString *views;     [regex enumerateMatchesInString:html                             options:0                               range:NSMakeRange(0, [html length])                          usingBlock:^(NSTextCheckingResult *result, NSMatchingFlags flags, BOOL *stop) {                                                            views = [html substringWithRange:[result range]];                              *stop = YES;                                                        }];          return views; }  NSString* getPublishDate(NSString *html) {          NSRegularExpression *regex = [NSRegularExpression regularExpressionWithPattern:@&quot;class=\\&quot;published\\&quot;&gt;.+&lt;\/&quot;                                                                            options:NSRegularExpressionCaseInsensitive                                                                              error:nil];     __block NSString *date;     [regex enumerateMatchesInString:html                             options:0                               range:NSMakeRange(0, [html length])                          usingBlock:^(NSTextCheckingResult *result, NSMatchingFlags flags, BOOL *stop) {                                                            date = [html substringWithRange:[result range]];                              *stop = YES;                                                        }];          return date; } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u041f\u0440\u0438\u044f\u0442\u043d\u043e \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0442\u044c:<br \/>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage3\/d4a\/52e\/59e\/d4a52e59eea34fe9b76ba2b720713d45.png\"\/><br \/>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage3\/850\/ea2\/502\/850ea25024b359d1a2f2e0efa6a9c46a.png\"\/><\/p>\n<p>  \u041d\u0430 \u0432\u0441\u0451 \u0443 \u043c\u0435\u043d\u044f \u0443\u0448\u043b\u043e \u0447\u0430\u0441\u043e\u0432 17-19.<\/p>\n<p>  \u0412\u0441\u0435 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 \u0438\u043d\u0434\u0435\u043a\u0441\u0430 1 \u043f\u043e 200000 \u0432\u0435\u0441\u044f\u0442 \u043d\u0430 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 (28 \u0441\u0435\u043d\u0442\u044f\u0431\u0440\u044f 2013, 20:03):  <\/p>\n<pre><code class=\"bash\">AndrewShmigs-MacBook-Pro:TimeMachine Backup new$ du -sh HabrahabrPages\/  18G\tHabrahabrPages\/ <\/code><\/pre>\n<h5>\u0424\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u044f<\/h5>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0438\u0437\u0431\u0430\u0432\u0438\u0442\u044c\u0441\u044f \u043e\u0442 \u0432\u0441\u0435\u0445 \u043b\u0438\u0448\u043d\u0438\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 \u2014 \u044d\u0442\u043e \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0441 \u043f\u043e\u0441\u0442\u0430\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u044b\u043b\u0438 \u0441\u043a\u0440\u044b\u0442\u044b \u0438\u043b\u0438 \u0442\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0435\u0449\u0435 \u043d\u0435 \u0431\u044b\u043b\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u044b.<br \/>  \u041f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u043c\u043e\u0436\u043d\u043e \u043a\u0430\u0436\u0434\u0443\u044e \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443, \u00ab\u0432\u044b\u0434\u0438\u0440\u0430\u0442\u044c\u00bb \u043d\u0443\u0436\u043d\u044b\u0435 \u043d\u0430\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u0438 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u0438\u0445 \u0432 \u0434\u0440\u0443\u0433\u043e\u0439 \u0444\u0430\u0439\u043b (\u043e\u0431\u0449\u0438\u0439).<\/p>\n<p>  \u0418\u0437 \u043a\u0430\u0436\u0434\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438 \u0432 \u0431\u043b\u043e\u0433\u0435 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e:  <\/p>\n<ul>\n<li> \u0414\u0430\u0442\u0443 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438 <\/li>\n<li> \u041a\u043e\u043b-\u0432\u043e \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u043e\u0432 <\/li>\n<li> \u041a\u043e\u043b-\u0432\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0439 \u0432 \u0438\u0437\u0431\u0440\u0430\u043d\u043d\u043e\u0435 <\/li>\n<li> \u041a\u043e\u043b-\u0432\u043e \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0435\u0432 <\/li>\n<\/ul>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 \u043f\u0430\u0440\u0441\u0435\u0440\u0430 \u043d\u0430 Objective-C<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"objectivec\">\/\/ \/\/  main.m \/\/  HabrahabrParser \/\/ \/\/  Created by AndrewShmig on 9\/27\/13. \/\/  Copyright (c) 2013 AndrewShmig. All rights reserved. \/\/  #import &lt;Foundation\/Foundation.h&gt;   NSString* getPublishDate(NSString *); NSString* getPostViewsCount(NSString *); NSString* getFavCount(NSString *); NSString* getCommentsCount(NSString *); NSString* removeTags(NSString *);   int main(int argc, const char * argv[]) {     FILE *output = fopen(&quot;\/Volumes\/TimeMachine Backup\/HabrahabrData.txt&quot;, &quot;a&quot;);          @autoreleasepool {                  const int MAX = 200000;         int totalOk = 0;                  for(int i=1; i&lt;=MAX; i++) {                          @autoreleasepool {                                  \/\/                NSString *url = [NSString stringWithFormat:@&quot;http:\/\/habrahabr.ru\/post\/%d\/&quot;, i];                 \/\/                NSURL *link = [NSURL URLWithString:url];                 \/\/                NSURLRequest *request = [NSURLRequest requestWithURL:link];                 \/\/                 \/\/                NSError *error = nil;                 \/\/                NSData *post = [NSURLConnection sendSynchronousRequest:request                 \/\/                                                     returningResponse:nil                 \/\/                                                                 error:&error];                 \/\/                NSString *path = [NSString stringWithFormat:@&quot;\/Volumes\/TimeMachine Backup\/HabrahabrPages\/%d.txt&quot;, i];                 \/\/                [post writeToFile:path atomically:YES];                 \/\/                 \/\/                NSLog(@&quot;[%d \/ %d]&quot;, i, MAX);                 NSString *path = [NSString stringWithFormat:@&quot;\/Volumes\/TimeMachine Backup\/HabrahabrPages\/%d.txt&quot;, i];                 NSString *page = [NSString stringWithContentsOfFile:path                                                            encoding:NSUTF8StringEncoding                                                               error:nil];                                  if(nil == page) continue; \/\/ \u043c\u043e\u0439 \u043a\u043e\u0441\u044f\u043a \u0441 \u0444\u0430\u0439\u043b\u0430\u043c\u0438                                  NSString *publishedAt = removeTags(getPublishDate(page));                 NSString *viewsCount = removeTags(getPostViewsCount(page));                 NSString *favsCount = removeTags(getFavCount(page));                 NSString *commentsCount = removeTags(getCommentsCount(page));                                  if(nil == publishedAt) {                     [[NSFileManager defaultManager] removeItemAtPath:path                                                                error:nil];                                          continue; \/\/ closed post                 }                                  totalOk++;                                  NSLog(@&quot;%d,%@,%@,%@,%@&quot;, i, publishedAt, viewsCount, favsCount, commentsCount);                                  fprintf(output, &quot;%d,%s,%s,%s,%s\\n&quot;, i, [publishedAt UTF8String],                         [viewsCount UTF8String], [favsCount UTF8String],                         [commentsCount UTF8String]);             }         }                  NSLog(@&quot;totalOK: %d&quot;, totalOk);                  fclose(output);     }          return 0; }  NSString* removeTags(NSString *matchString) {     if(nil == matchString)         return nil;          NSRegularExpression *tagContent = [NSRegularExpression regularExpressionWithPattern:@&quot;&gt;.+&lt;&quot;                                                                                 options:NSRegularExpressionCaseInsensitive                                                                                   error:nil];     __block NSString* resultingString;     [tagContent enumerateMatchesInString:matchString                                  options:0                                    range:NSMakeRange(0, [matchString length])                               usingBlock:^(NSTextCheckingResult *result, NSMatchingFlags flags, BOOL *stop) {                                   resultingString = [matchString substringWithRange:[result range]];                                   *stop = YES;                               }];          return [resultingString substringWithRange:NSMakeRange(1, [resultingString length] - 2)]; }  NSString* getCommentsCount(NSString *html) {     if(nil == html)         return nil;          NSRegularExpression *regex = [NSRegularExpression regularExpressionWithPattern:@&quot;id=\\&quot;comments_count\\&quot;&gt;.+&lt;\/&quot;                                                                            options:NSRegularExpressionCaseInsensitive                                                                              error:nil];     __block NSString *comments;     [regex enumerateMatchesInString:html                             options:0                               range:NSMakeRange(0, [html length])                          usingBlock:^(NSTextCheckingResult *result, NSMatchingFlags flags, BOOL *stop) {                                                            comments = [html substringWithRange:[result range]];                              *stop = YES;                                                        }];          return comments; }  NSString* getFavCount(NSString *html) {     if(nil == html)         return nil;          NSRegularExpression *regex = [NSRegularExpression regularExpressionWithPattern:@&quot;title=\\&quot;\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439, \u0434\u043e\u0431\u0430\u0432\u0438\u0432\u0448\u0438\u0445 \u043f\u043e\u0441\u0442 \u0432 \u0438\u0437\u0431\u0440\u0430\u043d\u043d\u043e\u0435\\&quot;&gt;.+&lt;\/&quot;                                                                            options:NSRegularExpressionCaseInsensitive                                                                              error:nil];     __block NSString *fav;     [regex enumerateMatchesInString:html                             options:0                               range:NSMakeRange(0, [html length])                          usingBlock:^(NSTextCheckingResult *result, NSMatchingFlags flags, BOOL *stop) {                                                            fav = [html substringWithRange:[result range]];                              *stop = YES;                                                        }];          return fav; }  NSString* getPostViewsCount(NSString *html) {     if(nil == html)         return nil;          NSRegularExpression *regex = [NSRegularExpression regularExpressionWithPattern:@&quot;title=\\&quot;\u041f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u044b \u043f\u043e\u0441\u0442\u0430\\&quot;&gt;.+&lt;\/&quot;                                                                            options:NSRegularExpressionCaseInsensitive                                                                              error:nil];     __block NSString *views;     [regex enumerateMatchesInString:html                             options:0                               range:NSMakeRange(0, [html length])                          usingBlock:^(NSTextCheckingResult *result, NSMatchingFlags flags, BOOL *stop) {                                                            views = [html substringWithRange:[result range]];                              *stop = YES;                                                        }];          return views; }  NSString* getPublishDate(NSString *html) {          NSRegularExpression *regex = [NSRegularExpression regularExpressionWithPattern:@&quot;class=\\&quot;published\\&quot;&gt;.+&lt;\/&quot;                                                                            options:NSRegularExpressionCaseInsensitive                                                                              error:nil];     __block NSString *date;     [regex enumerateMatchesInString:html                             options:0                               range:NSMakeRange(0, [html length])                          usingBlock:^(NSTextCheckingResult *result, NSMatchingFlags flags, BOOL *stop) {                                                            date = [html substringWithRange:[result range]];                              *stop = YES;                                                        }];          return date; } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0412\u0441\u0435\u0433\u043e \u0441\u0442\u0430\u0442\u0435\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u0435\u0439\u0447\u0430\u0441 \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u0432 \u043e\u0442\u043a\u0440\u044b\u0442\u043e\u043c \u0434\u043e\u0441\u0442\u0443\u043f\u0435: 115468.<br \/>  \u041f\u043e <a href=\"http:\/\/yadi.sk\/d\/2yCtPDH1A5Ush\">\u044d\u0442\u043e\u0439<\/a> (<a href=\"http:\/\/yadi.sk\/d\/kN1T8QdCA5Wkz\">\u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442<\/a>) \u0441\u0441\u044b\u043b\u043a\u0435 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u043a\u0430\u0447\u0430\u0442\u044c \u0444\u0430\u0439\u043b \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u0444\u043e\u0440\u043c\u0430\u0442\u0435:<br \/>  <code> 195428,26 \u0441\u0435\u043d\u0442\u044f\u0431\u0440\u044f \u0432 19:56,13667,264,37 <\/code><\/p>\n<p>  \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u0435\u043b\u044f \u0432\u044b\u0441\u0442\u0443\u043f\u0430\u0435\u0442 \u0437\u0430\u043f\u044f\u0442\u0430\u044f. \u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u044b \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u043f\u043e\u0440\u044f\u0434\u043a\u0435:  <\/p>\n<ul>\n<li> \u0418\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u043f\u043e\u0441\u0442\u0430 <\/li>\n<li> \u0414\u0430\u0442\u0430 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438 <\/li>\n<li> \u041a\u043e\u043b-\u0432\u043e \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u043e\u0432 <\/li>\n<li> \u041a\u043e\u043b-\u0432\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0439 \u0432 \u0438\u0437\u0431\u0440\u0430\u043d\u043d\u043e\u0435 <\/li>\n<li> \u041a\u043e\u043b-\u0432\u043e \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0435\u0432 <\/li>\n<\/ul>\n<p>  \u0415\u0441\u043b\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e, \u0442\u043e \u0432\u0441\u0435 \u0444\u0430\u0439\u043b\u044b \u043c\u043e\u0433\u0443 \u0440\u0430\u0437\u0434\u0430\u0442\u044c \u0438\u043b\u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c (\u0441\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e \u0442\u043e\u0440\u0440\u0435\u043d\u0442\u043e\u043c, \u0432 \u0441\u0436\u0430\u0442\u043e\u043c \u0432\u0438\u0434\u0435 \u0432\u0435\u0441\u0438\u0442 \u043f\u043e\u0440\u044f\u0434\u043a\u0430 4 GB). \u041f\u0438\u0448\u0438\u0442\u0435 \u0432 \u041b\u0421.<\/p>\n<p>  \u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435, \u0447\u0442\u043e \u043c\u044b \u0441\u0434\u0435\u043b\u0430\u0435\u043c, \u0442\u0430\u043a \u044d\u0442\u043e \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043c \u0434\u0430\u0442\u044b \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0439 \u043a \u0435\u0434\u0438\u043d\u043e\u043c\u0443 \u0444\u043e\u0440\u043c\u0430\u0442\u0443: <code>TT:TT.DD.MM.YYYY<\/code><br \/>  \u0412 \u0442\u0435\u043a\u0443\u0449\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0443 \u043d\u0430\u0441 \u043c\u043e\u0433\u0443\u0442 \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u0442\u044c\u0441\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0432\u0438\u0434\u044b \u0434\u0430\u0442 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0439:<br \/>  <code>13 \u0438\u044e\u043b\u044f 2006 \u0432 18:23<\/code><br \/>  <code>15 \u0444\u0435\u0432\u0440\u0430\u043b\u044f \u0432 05:27<\/code><\/p>\n<p>  \u0414\u043b\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u044b \u044f \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u043b \u0434\u0430\u0442\u044b \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 (\u0438\u0445 \u0431\u0443\u043a\u0432\u0430\u043b\u044c\u043d\u043e \u043f\u0430\u0440\u0443 \u0448\u0442\u0443\u043a \u0431\u044b\u043b\u043e, \u043f\u043e\u0442\u0435\u0440\u0438 \u0442\u0435\u0440\u043f\u0438\u043c\u044b\u0435):<br \/>  <code>\u0441\u0435\u0433\u043e\u0434\u043d\u044f \u0432 18:23<\/code><br \/>  <code>\u0432\u0447\u0435\u0440\u0430 \u0432 17:44<\/code><\/p>\n<p>  \u041d\u0430\u0448 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043f\u0430\u0440\u0441\u0435\u0440 \u0434\u043e\u043b\u0436\u0435\u043d \u0440\u0435\u0448\u0430\u0442\u044c \u0434\u0432\u0435 \u0437\u0430\u0434\u0430\u0447\u0438:  <\/p>\n<ul>\n<li> \u041f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u044b\u0432\u0430\u0442\u044c \u0434\u0430\u0442\u0443 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438 \u0432 \u043d\u0443\u0436\u043d\u044b\u0439 \u0444\u043e\u0440\u043c\u0430\u0442 <\/li>\n<li> \u0418\u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c (null) \u0437\u0430\u043f\u0438\u0441\u0438 \u0432 \u0441\u0442\u043e\u043b\u0431\u0446\u0435 \u00ab\u0417\u0430\u043a\u043b\u0430\u0434\u043a\u0438\u00bb \u043d\u0430 \u00ab0\u00bb (null \u0437\u0430\u043f\u0438\u0441\u044c \u0432 \u0441\u0442\u043e\u043b\u0431\u0446\u0435 \u0441 \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430\u043c\u0438 \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438 \u0441\u0442\u0430\u0442\u044c\u0438 \u0442\u0430\u043a\u043e\u0433\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u0430 \u0435\u0449\u0435 \u043d\u0435 \u0431\u044b\u043b\u043e) <\/li>\n<\/ul>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041f\u0430\u0440\u0441\u0435\u0440 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u044e\u0449\u0438\u0439 \u0434\u0430\u0442\u044b \u0432 \u043d\u0443\u0436\u043d\u044b\u0439 \u0444\u043e\u0440\u043c\u0430\u0442 \u043d\u0430 Objective-C<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"objectivec\">\/\/ \/\/  main.m \/\/  HabrahabrParser \/\/ \/\/  Created by AndrewShmig on 9\/27\/13. \/\/  Copyright (c) 2013 AndrewShmig. All rights reserved. \/\/  #import &lt;Foundation\/Foundation.h&gt;  NSString* parseDate(NSString *); NSString* parseFav(NSString *);  int main(int argc, const char * argv[]) {     NSString *path = [NSString stringWithFormat:@&quot;\/Volumes\/TimeMachine Backup\/HabrahabrData.txt&quot;];     NSString *fileContent = [NSString stringWithContentsOfFile:path                                                       encoding:NSUTF8StringEncoding                                                          error:nil];          NSArray *lines = [fileContent componentsSeparatedByString:@&quot;\\n&quot;];     FILE *output = fopen(&quot;\/Volumes\/TimeMachine Backup\/HabrahabrDataParsedData.txt&quot;, &quot;a&quot;);     for(NSString *line in lines) {         @autoreleasepool {             NSMutableArray *components = [[line componentsSeparatedByString:@&quot;,&quot;] mutableCopy];                          if(0 == [components count])                 continue;                          NSString *newDateFormat = parseDate(components[1]);             NSString *newFavFormat = parseFav(components[3]);                          if(nil == newDateFormat) {                 continue;             }                          components[1] = newDateFormat;             components[3] = newFavFormat;                          NSString *newLine = [components componentsJoinedByString:@&quot;,&quot;];             NSLog(@&quot;%@&quot;, newLine);             fprintf(output, &quot;%s\\n&quot;, [newLine UTF8String]);         }     }     fclose(output);          return 0; }  NSString* parseDate(NSString *date) {     NSArray *components = [date componentsSeparatedByString:@&quot; &quot;];     NSUInteger count = [components count];          if(5 == count || 4 == count || 6 == count) {         \/\/        0, 1, 2, 4         NSLog(@&quot;date: %@&quot;, date);                  NSString *day;         NSString *month = components[1];         if(6 == count) {             day = components[1];             month = components[2];         } else {             day = components[0];             month = components[1];         }                  NSString *year;         if(5 == count) {             year = components[2];         } else {             year = @&quot;2013&quot;;         }         NSString *time = [components lastObject];                  NSArray *months = @[@&quot;\u044f\u043d\u0432\u0430\u0440\u044f&quot;, @&quot;\u0444\u0435\u0432\u0440\u0430\u043b\u044f&quot;, @&quot;\u043c\u0430\u0440\u0442\u0430&quot;, @&quot;\u0430\u043f\u0440\u0435\u043b\u044f&quot;, @&quot;\u043c\u0430\u044f&quot;,                             @&quot;\u0438\u044e\u043d\u044f&quot;, @&quot;\u0438\u044e\u043b\u044f&quot;, @&quot;\u0430\u0432\u0433\u0443\u0441\u0442\u0430&quot;, @&quot;\u0441\u0435\u043d\u0442\u044f\u0431\u0440\u044f&quot;, @&quot;\u043e\u043a\u0442\u044f\u0431\u0440\u044f&quot;,                             @&quot;\u043d\u043e\u044f\u0431\u0440\u044f&quot;, @&quot;\u0434\u0435\u043a\u0430\u0431\u0440\u044f&quot;];         NSUInteger index = [months indexOfObject:month] + 1;                  return [NSString stringWithFormat:@&quot;%@.%@.%@.%@&quot;, time, day, @(index), year];     }          return nil; }  NSString* parseFav(NSString *fav) {     if([fav isEqualToString:@&quot;(null)&quot;]) {         return @&quot;0&quot;;     }          return fav; } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0421\u043a\u0430\u0447\u0430\u0442\u044c \u0444\u0430\u0439\u043b \u0432 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u043e\u043c \u0444\u043e\u0440\u043c\u0430\u0442\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u043e <a href=\"http:\/\/yadi.sk\/d\/L-C1eU-YA5dgB\">\u044d\u0442\u043e\u0439<\/a> \u0441\u0441\u044b\u043b\u043a\u0435.  <\/p>\n<pre><code class=\"bash\">1,18:23.13.7.2006,(null),4,32 2,00:45.14.7.2006,(null),0,34 <\/code><\/pre>\n<h5>\u041f\u043e \u0447\u0430\u0441\u0430\u043c \u0438 \u043c\u0438\u043d\u0443\u0442\u0430\u043c, \u0434\u043d\u044f\u043c, \u043c\u0435\u0441\u044f\u0446\u0430\u043c \u0438 \u0433\u043e\u0434\u0430\u043c<\/h5>\n<p>  <i>\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435:<\/i> \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u043c\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432\u043a\u043b\u044e\u0447\u0430\u044e\u0442 \u0432 \u0441\u0435\u0431\u044f \u0437\u0430\u043f\u0438\u0441\u0438 \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 2006 \u0433\u043e\u0434\u0430 \u043f\u043e 28 \u0441\u0435\u043d\u0442\u044f\u0431\u0440\u044f 2013.<\/p>\n<p>  <b>\u0412\u043e\u043f\u0440\u043e\u0441: \u0412 \u043a\u0430\u043a\u0438\u0435 \u0447\u0430\u0441\u044b \u0441\u0443\u0442\u043e\u043a \u043f\u0443\u0431\u043b\u0438\u043a\u0443\u0435\u0442\u0441\u044f \u043d\u0430\u0438\u0431\u043e\u043b\u044c\u0448\u0435\u0435 \u0447\u0438\u0441\u043b\u043e \u043f\u043e\u0441\u0442\u043e\u0432?<\/b>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">Objective-C Source Code<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"objectivec\">\/\/ \/\/  main.m \/\/  HabrahabrParser \/\/ \/\/  Created by AndrewShmig on 9\/27\/13. \/\/  Copyright (c) 2013 AndrewShmig. All rights reserved. \/\/  #import &lt;Foundation\/Foundation.h&gt;  int main(int argc, const char * argv[]) {          NSString *path = [NSString stringWithFormat:@&quot;\/Volumes\/TimeMachine Backup\/HabrahabrDataParsedDate.txt&quot;];     NSString *fileContent = [NSString stringWithContentsOfFile:path                                                       encoding:NSUTF8StringEncoding                                                          error:nil];          NSArray *lines = [fileContent componentsSeparatedByString:@&quot;\\n&quot;];     int hours[24] = {0};          for(NSString *line in lines) {         NSArray *components = [line componentsSeparatedByString:@&quot;,&quot;];         NSString *time = [components[1] componentsSeparatedByString:@&quot;.&quot;][0];         int hour = (int)[[time componentsSeparatedByString:@&quot;:&quot;][0] integerValue];          hours[hour]++;     }               FILE *file = fopen(&quot;\/Volumes\/TimeMachine Backup\/HabrahabrByOurs.txt&quot;, &quot;a&quot;);     for(int index=0; index&lt;24; index++) {         fprintf(file, &quot;%d, %d\\n&quot;, index, hours[index]);     }     fclose(file);          return 0; } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage3\/532\/83c\/8d6\/53283c8d6d8926f7fc811521104d4187.png\"\/><\/p>\n<p>  <b>\u0412\u043e\u043f\u0440\u043e\u0441: \u0412 \u043a\u0430\u043a\u0438\u0435 \u043c\u0438\u043d\u0443\u0442\u044b \u043f\u0443\u0431\u043b\u0438\u043a\u0443\u0435\u0442\u0441\u044f \u043d\u0430\u0438\u0431\u043e\u043b\u044c\u0448\u0435\u0435 \u0447\u0438\u0441\u043b\u043e \u043f\u043e\u0441\u0442\u043e\u0432?<\/b>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">Objective-C Source Code<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"objectivec\">\/\/ \/\/  main.m \/\/  HabrahabrParser \/\/ \/\/  Created by AndrewShmig on 9\/27\/13. \/\/  Copyright (c) 2013 AndrewShmig. All rights reserved. \/\/  #import &lt;Foundation\/Foundation.h&gt;  int main(int argc, const char * argv[]) {          NSString *path = [NSString stringWithFormat:@&quot;\/Volumes\/TimeMachine Backup\/HabrahabrDataParsedDate.txt&quot;];     NSString *fileContent = [NSString stringWithContentsOfFile:path                                                       encoding:NSUTF8StringEncoding                                                          error:nil];          NSArray *lines = [fileContent componentsSeparatedByString:@&quot;\\n&quot;];     int mins[59] = {0};          for(NSString *line in lines) {         NSArray *components = [line componentsSeparatedByString:@&quot;,&quot;];         NSString *time = [components[1] componentsSeparatedByString:@&quot;.&quot;][0];         int min = (int)[[time componentsSeparatedByString:@&quot;:&quot;][1] integerValue];          mins[min]++;     }               FILE *file = fopen(&quot;\/Volumes\/TimeMachine Backup\/HabrahabrByOurs.txt&quot;, &quot;a&quot;);     for(int index=0; index&lt;60; index++) {         fprintf(file, &quot;%d, %d\\n&quot;, index, mins[index]);     }     fclose(file);          return 0; } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage3\/6dc\/4a3\/f00\/6dc4a3f009e04bf553b88a87dc69bc27.png\"\/><\/p>\n<p>  <b>\u0412\u043e\u043f\u0440\u043e\u0441: \u0412 \u043a\u0430\u043a\u0438\u0435 \u0447\u0430\u0441\u044b \u0438 \u043c\u0438\u043d\u0443\u0442\u044b \u043f\u0443\u0431\u043b\u0438\u043a\u0443\u0435\u0442\u0441\u044f \u043d\u0430\u0438\u0431\u043e\u043b\u044c\u0448\u0435\u0435 \u0447\u0438\u0441\u043b\u043e \u043f\u043e\u0441\u0442\u043e\u0432?<\/b>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">Objective-C Source Code<\/b><\/p>\n<div class=\"spoiler_text\">\/\/<br \/>  \/\/ main.m<br \/>  \/\/ HabrahabrParser<br \/>  \/\/<br \/>  \/\/ Created by AndrewShmig on 9\/27\/13.<br \/>  \/\/ Copyright \u00a9 2013 AndrewShmig. All rights reserved.<br \/>  \/\/<\/p>\n<p>  #import &lt;Foundation\/Foundation.h&gt;<\/p>\n<p>  int main(int argc, const char * argv[])<br \/>  {<\/p>\n<p>   NSString *path = [NSString stringWithFormat:@&quot;\/Volumes\/TimeMachine Backup\/HabrahabrDataParsedDate.txt&quot;];<br \/>   NSString *fileContent = [NSString stringWithContentsOfFile:path<br \/>   encoding:NSUTF8StringEncoding<br \/>   error:nil];<\/p>\n<p>   NSArray *lines = [fileContent componentsSeparatedByString:@&quot;\\n&quot;];<br \/>   int time[1440] = {0};<\/p>\n<p>   for(NSString *line in lines) {<br \/>   NSArray *components = [line componentsSeparatedByString:@&quot;,&quot;];<br \/>   NSString *timeStr = [components[1] componentsSeparatedByString:@&quot;.&quot;][0];<\/p>\n<p>   int min = (int)[[timeStr componentsSeparatedByString:@&quot;:&quot;][1] integerValue];<br \/>   int hour = (int)[[timeStr componentsSeparatedByString:@&quot;:&quot;][0] integerValue];<\/p>\n<p>   time[hour*60+min]++;<br \/>   }<\/p>\n<p>   FILE *file = fopen(&quot;\/Volumes\/TimeMachine Backup\/RESULTS.txt&quot;, \u00aba\u00bb);<br \/>   for(int index=0; index&lt;1440; index++) {<br \/>   fprintf(file, &quot;%d, %d\\n&quot;, index, time[index]);<br \/>   }<br \/>   fclose(file);<\/p>\n<p>   return 0;<br \/>  }  <\/div>\n<\/div>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage3\/b1e\/207\/688\/b1e207688552aaaecbdd776c74b93701.png\"\/><\/p>\n<p>  <b>\u0412\u043e\u043f\u0440\u043e\u0441: \u0412 \u043a\u0430\u043a\u043e\u0439 \u0434\u0435\u043d\u044c \u043c\u0435\u0441\u044f\u0446\u0430 \u043f\u0443\u0431\u043b\u0438\u043a\u0443\u0435\u0442\u0441\u044f \u043d\u0430\u0438\u0431\u043e\u043b\u044c\u0448\u0435\u0435 \u0447\u0438\u0441\u043b\u043e \u043f\u043e\u0441\u0442\u043e\u0432?<\/b>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">Objective-C Source Code<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"objectivec\">\/\/ \/\/  main.m \/\/  HabrahabrParser \/\/ \/\/  Created by AndrewShmig on 9\/27\/13. \/\/  Copyright (c) 2013 AndrewShmig. All rights reserved. \/\/  #import &lt;Foundation\/Foundation.h&gt;  NSString* parseDate(NSString *); NSString* parseFav(NSString *);  int main(int argc, const char * argv[]) {     NSString *path = [NSString stringWithFormat:@&quot;\/Volumes\/TimeMachine Backup\/HabrahabrDataParsedData.txt&quot;];     NSString *fileContent = [NSString stringWithContentsOfFile:path                                                       encoding:NSUTF8StringEncoding                                                          error:nil];          NSArray *lines = [fileContent componentsSeparatedByString:@&quot;\\n&quot;];     int days[31] = {0};          for(NSString *line in lines) {         @autoreleasepool {             NSMutableArray *components = [[line componentsSeparatedByString:@&quot;,&quot;] mutableCopy];             NSArray *datetime = [components[1] componentsSeparatedByString:@&quot;.&quot;];                          int day = (int)[datetime[1] integerValue];             days[day]++;         }     }          FILE *output = fopen(&quot;\/Volumes\/TimeMachine Backup\/RESULT.txt&quot;, &quot;a&quot;);     for(int i=1; i&lt;32; i++) {         fprintf(output, &quot;%d,%d\\n&quot;, i, days[i]);     }     fclose(output);          return 0; } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage3\/9a4\/8c6\/e63\/9a48c6e63e3999ee92e933bae28d180c.png\"\/><\/p>\n<p>  <b>\u0412\u043e\u043f\u0440\u043e\u0441: \u0412 \u043a\u0430\u043a\u043e\u0439 \u043c\u0435\u0441\u044f\u0446 \u043f\u0443\u0431\u043b\u0438\u043a\u0443\u0435\u0442\u0441\u044f \u043d\u0430\u0438\u0431\u043e\u043b\u044c\u0448\u0435\u0435 \u0447\u0438\u0441\u043b\u043e \u043f\u043e\u0441\u0442\u043e\u0432?<\/b>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">Objective-C Source Code<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"objectivec\">\/\/ \/\/  main.m \/\/  HabrahabrParser \/\/ \/\/  Created by AndrewShmig on 9\/27\/13. \/\/  Copyright (c) 2013 AndrewShmig. All rights reserved. \/\/  #import &lt;Foundation\/Foundation.h&gt;  int main(int argc, const char * argv[]) {          NSString *path = [NSString stringWithFormat:@&quot;\/Volumes\/TimeMachine Backup\/HabrahabrDataParsedDate.txt&quot;];     NSString *fileContent = [NSString stringWithContentsOfFile:path                                                       encoding:NSUTF8StringEncoding                                                          error:nil];          NSArray *lines = [fileContent componentsSeparatedByString:@&quot;\\n&quot;];     int months[31] = {0};          for(NSString *line in lines) {         NSArray *components = [line componentsSeparatedByString:@&quot;,&quot;];         NSString *month = [components[1] componentsSeparatedByString:@&quot;.&quot;][2];                  months[(int)[month integerValue]]++;     }               FILE *file = fopen(&quot;\/Volumes\/TimeMachine Backup\/RESULTS.txt&quot;, &quot;a&quot;);     for(int index=1; index&lt;13; index++) {         fprintf(file, &quot;%d, %d\\n&quot;, index, months[index]);     }     fclose(file);          return 0; } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage3\/53e\/f68\/af6\/53ef68af633c9cfc0a72869b0d3c4ac6.png\"\/><\/p>\n<p>  <b>\u0412\u043e\u043f\u0440\u043e\u0441: \u0412 \u043a\u0430\u043a\u043e\u0439 \u0433\u043e\u0434 \u0431\u044b\u043b\u043e \u043e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u043d\u043e \u043d\u0430\u0438\u0431\u043e\u043b\u044c\u0448\u0435\u0435 \u0447\u0438\u0441\u043b\u043e \u043f\u043e\u0441\u0442\u043e\u0432?<\/b>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">Objective-C Source Code<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"objectivec\">\/\/ \/\/  main.m \/\/  HabrahabrParser \/\/ \/\/  Created by AndrewShmig on 9\/27\/13. \/\/  Copyright (c) 2013 AndrewShmig. All rights reserved. \/\/  #import &lt;Foundation\/Foundation.h&gt;  int main(int argc, const char * argv[]) {          NSString *path = [NSString stringWithFormat:@&quot;\/Volumes\/TimeMachine Backup\/HabrahabrDataParsedDate.txt&quot;];     NSString *fileContent = [NSString stringWithContentsOfFile:path                                                       encoding:NSUTF8StringEncoding                                                          error:nil];          NSArray *lines = [fileContent componentsSeparatedByString:@&quot;\\n&quot;];     int years[2020] = {0};          for(NSString *line in lines) {         NSArray *components = [line componentsSeparatedByString:@&quot;,&quot;];         NSString *year = [components[1] componentsSeparatedByString:@&quot;.&quot;][3];                  years[(int)[year integerValue]]++;     }               FILE *file = fopen(&quot;\/Volumes\/TimeMachine Backup\/RESULTS.txt&quot;, &quot;a&quot;);     for(int index=2005; index&lt;2014; index++) {         fprintf(file, &quot;%d, %d\\n&quot;, index, years[index]);     }     fclose(file);          return 0; } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage3\/048\/898\/c2f\/048898c2f126bca105967a8135ca8f5c.png\"\/><\/p>\n<h5>\u041f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u044b<\/h5>\n<p>  \u0417\u0434\u0435\u0441\u044c, \u043a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u0441\u0442\u043e\u0438\u0442 \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e 63310 \u0441\u0442\u0430\u0442\u0435\u0439 \u0431\u044b\u043b\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u0434\u043e \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u0431\u044b\u043b \u0432\u0432\u0435\u0434\u0435\u043d \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b \u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043a\u043e\u043b-\u0432\u0430 \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u043e\u0432 \u0441\u0442\u0430\u0442\u044c\u0438, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0441 \u0442\u043e\u0439 \u0447\u0430\u0441\u0442\u044c\u044e \u0441\u0442\u0430\u0442\u0435\u0439, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043a\u043e\u043b-\u0432\u043e \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u043e\u0432 \u0443\u0436\u0435 \u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043b\u043e\u0441\u044c.<\/p>\n<p>  <b>\u0412\u043e\u043f\u0440\u043e\u0441: \u043e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u0432 \u043f\u043e\u0441\u0442 \u0432 \u043a\u0430\u043a\u0443\u044e \u043c\u0438\u043d\u0443\u0442\u0443 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u043a\u043e\u043b-\u0432\u043e \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u043e\u0432?<\/b>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">Objective-C Source Code<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"objectivec\">\/\/ \/\/  main.m \/\/  HabrahabrParser \/\/ \/\/  Created by AndrewShmig on 9\/27\/13. \/\/  Copyright (c) 2013 AndrewShmig. All rights reserved. \/\/  #import &lt;Foundation\/Foundation.h&gt;  int main(int argc, const char * argv[]) {          NSString *path = [NSString stringWithFormat:@&quot;\/Volumes\/TimeMachine Backup\/HabrahabrDataParsedDate.txt&quot;];     NSString *fileContent = [NSString stringWithContentsOfFile:path                                                       encoding:NSUTF8StringEncoding                                                          error:nil];          NSArray *lines = [fileContent componentsSeparatedByString:@&quot;\\n&quot;];     int mins[60] = {0};          for(NSString *line in lines) {         NSArray *parts = [line componentsSeparatedByString:@&quot;,&quot;];                  NSString *views = parts[2];         if([views isEqualToString:@&quot;(null)&quot;]) continue;                  int viewsCount = (int)[views integerValue];         int min = (int)[[[parts[1] componentsSeparatedByString:@&quot;.&quot;][0] componentsSeparatedByString:@&quot;:&quot;][1] integerValue];                  mins[min]+=viewsCount;     }               FILE *file = fopen(&quot;\/Volumes\/TimeMachine Backup\/RESULTS.txt&quot;, &quot;a&quot;);     int start = 0;     int end = 60;     for(int index=start; index&lt;end; index++) {         fprintf(file, &quot;%d, %d\\n&quot;, index, mins[index]);     }     fclose(file);          return 0; } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage3\/ccb\/ae7\/be4\/ccbae7be4b2c5cf6e0d24f50b4c3a36d.png\"\/><\/p>\n<p>  \u0421\u0440\u0435\u0434\u043d\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f:  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">Objective-C Source Code<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"objectivec\">\/\/ \/\/  main.m \/\/  HabrahabrParser \/\/ \/\/  Created by AndrewShmig on 9\/27\/13. \/\/  Copyright (c) 2013 AndrewShmig. All rights reserved. \/\/  #import &lt;Foundation\/Foundation.h&gt;  NSString* parseDate(NSString *); NSString* parseFav(NSString *);  int main(int argc, const char * argv[]) {     NSString *path = [NSString stringWithFormat:@&quot;\/Volumes\/TimeMachine Backup\/HabrahabrDataParsedData.txt&quot;];     NSString *fileContent = [NSString stringWithContentsOfFile:path                                                       encoding:NSUTF8StringEncoding                                                          error:nil];          NSArray *lines = [fileContent componentsSeparatedByString:@&quot;\\n&quot;];     int mins[60] = {0};     int minsCount[60] = {0};          for(NSString *line in lines) {         @autoreleasepool {             NSMutableArray *components = [[line componentsSeparatedByString:@&quot;,&quot;] mutableCopy];             NSArray *datetime = [components[1] componentsSeparatedByString:@&quot;.&quot;]; \/\/            int hour = (int)[[datetime[0] componentsSeparatedByString:@&quot;:&quot;][0] integerValue];             int min = (int)[[datetime[0] componentsSeparatedByString:@&quot;:&quot;][1] integerValue]; \/\/            int day = (int)[datetime[1] integerValue]; \/\/            int month = (int)[datetime[2] integerValue]; \/\/            int year = (int)[datetime[3] integerValue];                          if([components[2] isEqualToString:@&quot;(null)&quot;]) continue;                          int viewsCount = (int)[components[2] integerValue];             mins[min]+=viewsCount;             minsCount[min]++;         }     }          FILE *output = fopen(&quot;\/Volumes\/TimeMachine Backup\/RESULT.txt&quot;, &quot;a&quot;);     for(int i=0; i&lt;60; i++) {         fprintf(output, &quot;%d,%f\\n&quot;, i, 1.0f * mins[i] \/ minsCount[i]);     }     fclose(output);          return 0; } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage3\/a4a\/b5a\/777\/a4ab5a7772f3f2c018c38e03392eefcd.png\"\/><\/p>\n<p>  <b>\u0412\u043e\u043f\u0440\u043e\u0441: \u0432 \u043a\u0430\u043a\u0438\u0435 \u0447\u0430\u0441\u044b \u0434\u043e\u0441\u0442\u0438\u0433\u0430\u0435\u0442\u0441\u044f \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u043a\u043e\u043b-\u0432\u043e \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u043e\u0432?<\/b>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">Objective-C Source Code<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"objectivec\">\/\/ \/\/  main.m \/\/  HabrahabrParser \/\/ \/\/  Created by AndrewShmig on 9\/27\/13. \/\/  Copyright (c) 2013 AndrewShmig. All rights reserved. \/\/  #import &lt;Foundation\/Foundation.h&gt;  int main(int argc, const char * argv[]) {          NSString *path = [NSString stringWithFormat:@&quot;\/Volumes\/TimeMachine Backup\/HabrahabrDataParsedDate.txt&quot;];     NSString *fileContent = [NSString stringWithContentsOfFile:path                                                       encoding:NSUTF8StringEncoding                                                          error:nil];          NSArray *lines = [fileContent componentsSeparatedByString:@&quot;\\n&quot;];     int hours[60] = {0};          for(NSString *line in lines) {         NSArray *parts = [line componentsSeparatedByString:@&quot;,&quot;];                  NSString *views = parts[2];         if([views isEqualToString:@&quot;(null)&quot;]) continue;                  int viewsCount = (int)[views integerValue];         int hour = (int)[[[parts[1] componentsSeparatedByString:@&quot;.&quot;][0] componentsSeparatedByString:@&quot;:&quot;][0] integerValue];                  hours[hour]+=viewsCount;     }               FILE *file = fopen(&quot;\/Volumes\/TimeMachine Backup\/RESULTS.txt&quot;, &quot;a&quot;);     int start = 0;     int end = 60;     for(int index=start; index&lt;end; index++) {         fprintf(file, &quot;%d, %d\\n&quot;, index, hours[index]);     }     fclose(file);          return 0; } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage3\/324\/85a\/373\/32485a37313c7a01085984506d9ad76e.png\"\/><\/p>\n<p>  \u0421\u0440\u0435\u0434\u043d\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f:  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">Objective-C Source Code<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"objectivec\">\/\/ \/\/  main.m \/\/  HabrahabrParser \/\/ \/\/  Created by AndrewShmig on 9\/27\/13. \/\/  Copyright (c) 2013 AndrewShmig. All rights reserved. \/\/  #import &lt;Foundation\/Foundation.h&gt;  NSString* parseDate(NSString *); NSString* parseFav(NSString *);  int main(int argc, const char * argv[]) {     NSString *path = [NSString stringWithFormat:@&quot;\/Volumes\/TimeMachine Backup\/HabrahabrDataParsedData.txt&quot;];     NSString *fileContent = [NSString stringWithContentsOfFile:path                                                       encoding:NSUTF8StringEncoding                                                          error:nil];          NSArray *lines = [fileContent componentsSeparatedByString:@&quot;\\n&quot;];     const int MAX = 24;     int mins[MAX] = {0};     int minsCount[MAX] = {0};          for(NSString *line in lines) {         @autoreleasepool {             NSMutableArray *components = [[line componentsSeparatedByString:@&quot;,&quot;] mutableCopy];             NSArray *datetime = [components[1] componentsSeparatedByString:@&quot;.&quot;];             int hour = (int)[[datetime[0] componentsSeparatedByString:@&quot;:&quot;][0] integerValue]; \/\/            int min = (int)[[datetime[0] componentsSeparatedByString:@&quot;:&quot;][1] integerValue]; \/\/            int day = (int)[datetime[1] integerValue]; \/\/            int month = (int)[datetime[2] integerValue]; \/\/            int year = (int)[datetime[3] integerValue];                          if([components[2] isEqualToString:@&quot;(null)&quot;]) continue;                          int viewsCount = (int)[components[2] integerValue];             mins[hour]+=viewsCount;             minsCount[hour]++;         }     }          FILE *output = fopen(&quot;\/Volumes\/TimeMachine Backup\/RESULT.txt&quot;, &quot;a&quot;);     for(int i=0; i&lt;MAX; i++) {         fprintf(output, &quot;%d,%f\\n&quot;, i, 1.0f * mins[i] \/ minsCount[i]);     }     fclose(output);          return 0; } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage3\/e7f\/f6a\/bad\/e7ff6abad65934eaff9a13285d1a807f.png\"\/><\/p>\n<p>  <b>\u0412\u043e\u043f\u0440\u043e\u0441: \u0432 \u043a\u0430\u043a\u0438\u0435 \u0434\u043d\u0438 \u043c\u0435\u0441\u044f\u0446\u0430 \u0434\u043e\u0441\u0442\u0438\u0433\u0430\u0435\u0442\u0441\u044f \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u043a\u043e\u043b-\u0432\u043e \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u043e\u0432?<\/b>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">Objective-C Source Code<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"objectivec\">\/\/ \/\/  main.m \/\/  HabrahabrParser \/\/ \/\/  Created by AndrewShmig on 9\/27\/13. \/\/  Copyright (c) 2013 AndrewShmig. All rights reserved. \/\/  #import &lt;Foundation\/Foundation.h&gt;  NSString* parseDate(NSString *); NSString* parseFav(NSString *);  int main(int argc, const char * argv[]) {     NSString *path = [NSString stringWithFormat:@&quot;\/Volumes\/TimeMachine Backup\/HabrahabrDataParsedData.txt&quot;];     NSString *fileContent = [NSString stringWithContentsOfFile:path                                                       encoding:NSUTF8StringEncoding                                                          error:nil];          NSArray *lines = [fileContent componentsSeparatedByString:@&quot;\\n&quot;];     int days[31] = {0};          for(NSString *line in lines) {         @autoreleasepool {             NSMutableArray *components = [[line componentsSeparatedByString:@&quot;,&quot;] mutableCopy];             NSArray *datetime = [components[1] componentsSeparatedByString:@&quot;.&quot;];                          int day = (int)[datetime[1] integerValue];                          if([components[2] isEqualToString:@&quot;(null)&quot;]) continue;             int viewsCount = (int)[components[2] integerValue];                          days[day]+=viewsCount;         }     }          FILE *output = fopen(&quot;\/Volumes\/TimeMachine Backup\/RESULT.txt&quot;, &quot;a&quot;);     for(int i=1; i&lt;32; i++) {         fprintf(output, &quot;%d,%d\\n&quot;, i, days[i]);     }     fclose(output);          return 0; } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage3\/327\/bff\/c27\/327bffc27001fd11cf8aa4a3523b9a85.png\"\/><\/p>\n<p>  \u0421\u0440\u0435\u0434\u043d\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f:  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">Objective-C Source Code<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"objectivec\">\/\/ \/\/  main.m \/\/  HabrahabrParser \/\/ \/\/  Created by AndrewShmig on 9\/27\/13. \/\/  Copyright (c) 2013 AndrewShmig. All rights reserved. \/\/  #import &lt;Foundation\/Foundation.h&gt;  NSString* parseDate(NSString *); NSString* parseFav(NSString *);  int main(int argc, const char * argv[]) {     NSString *path = [NSString stringWithFormat:@&quot;\/Volumes\/TimeMachine Backup\/HabrahabrDataParsedData.txt&quot;];     NSString *fileContent = [NSString stringWithContentsOfFile:path                                                       encoding:NSUTF8StringEncoding                                                          error:nil];          NSArray *lines = [fileContent componentsSeparatedByString:@&quot;\\n&quot;];     const int MAX = 32;     const int MIN = 1;     int mins[MAX] = {0};     int minsCount[MAX] = {0};          for(NSString *line in lines) {         @autoreleasepool {             NSMutableArray *components = [[line componentsSeparatedByString:@&quot;,&quot;] mutableCopy];             NSArray *datetime = [components[1] componentsSeparatedByString:@&quot;.&quot;]; \/\/            int hour = (int)[[datetime[0] componentsSeparatedByString:@&quot;:&quot;][0] integerValue]; \/\/            int min = (int)[[datetime[0] componentsSeparatedByString:@&quot;:&quot;][1] integerValue];             int day = (int)[datetime[1] integerValue]; \/\/            int month = (int)[datetime[2] integerValue]; \/\/            int year = (int)[datetime[3] integerValue];                          if([components[2] isEqualToString:@&quot;(null)&quot;]) continue;                          int viewsCount = (int)[components[2] integerValue];             mins[day]+=viewsCount;             minsCount[day]++;         }     }          FILE *output = fopen(&quot;\/Volumes\/TimeMachine Backup\/RESULT.txt&quot;, &quot;a&quot;);     for(int i=MIN; i&lt;MAX; i++) {         fprintf(output, &quot;%d,%f\\n&quot;, i, 1.0f * mins[i] \/ minsCount[i]);     }     fclose(output);          return 0; } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage3\/922\/db8\/4f4\/922db84f45cb27792f260ace36fef06d.png\"\/><\/p>\n<h5>\u0418\u0437\u0431\u0440\u0430\u043d\u043d\u043e\u0435<\/h5>\n<p>  <b>\u0412\u043e\u043f\u0440\u043e\u0441: \u043e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u0441\u0442\u044b \u0432 \u043a\u0430\u043a\u0438\u0435 \u043c\u0438\u043d\u0443\u0442\u044b \u043f\u0440\u0438\u043d\u043e\u0441\u044f\u0442 \u0441\u0432\u043e\u0438\u043c \u0432\u043b\u0430\u0434\u0435\u043b\u044c\u0446\u0430\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u0432\u0441\u0435\u0433\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0439 \u0432 \u0438\u0437\u0431\u0440\u0430\u043d\u043d\u043e\u0435?<\/b>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">Objective-C Source Code<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code>\/\/ \/\/  main.m \/\/  HabrahabrParser \/\/ \/\/  Created by AndrewShmig on 9\/27\/13. \/\/  Copyright (c) 2013 AndrewShmig. All rights reserved. \/\/  #import &lt;Foundation\/Foundation.h&gt;  int main(int argc, const char * argv[]) {          NSString *path = [NSString stringWithFormat:@&quot;\/Volumes\/TimeMachine Backup\/HabrahabrDataParsedDate.txt&quot;];     NSString *fileContent = [NSString stringWithContentsOfFile:path                                                       encoding:NSUTF8StringEncoding                                                          error:nil];          NSArray *lines = [fileContent componentsSeparatedByString:@&quot;\\n&quot;];     int mins[60] = {0};          for(NSString *line in lines) {         NSArray *parts = [line componentsSeparatedByString:@&quot;,&quot;];                  NSString *favs = parts[3];         int favsCount = (int)[favs integerValue];         int min = (int)[[[parts[1] componentsSeparatedByString:@&quot;.&quot;][0] componentsSeparatedByString:@&quot;:&quot;][1] integerValue];                  mins[min]+=favsCount;     }               FILE *file = fopen(&quot;\/Volumes\/TimeMachine Backup\/RESULTS.txt&quot;, &quot;a&quot;);     int start = 0;     int end = 60;     for(int index=start; index&lt;end; index++) {         fprintf(file, &quot;%d, %d\\n&quot;, index, mins[index]);     }     fclose(file);          return 0; } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage3\/48b\/275\/85a\/48b27585a2b424c45108bdcc9ee0c871.png\"\/><\/p>\n<p>  \u0421\u0440\u0435\u0434\u043d\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435:  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">Objective-C Source Code<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"objectivec\">\/\/ \/\/  main.m \/\/  HabrahabrParser \/\/ \/\/  Created by AndrewShmig on 9\/27\/13. \/\/  Copyright (c) 2013 AndrewShmig. All rights reserved. \/\/  #import &lt;Foundation\/Foundation.h&gt;  NSString* parseDate(NSString *); NSString* parseFav(NSString *);  int main(int argc, const char * argv[]) {     NSString *path = [NSString stringWithFormat:@&quot;\/Volumes\/TimeMachine Backup\/HabrahabrDataParsedData.txt&quot;];     NSString *fileContent = [NSString stringWithContentsOfFile:path                                                       encoding:NSUTF8StringEncoding                                                          error:nil];          NSArray *lines = [fileContent componentsSeparatedByString:@&quot;\\n&quot;];     const int MAX = 60;     const int MIN = 0;     int mins[MAX] = {0};     int minsCount[MAX] = {0};          for(NSString *line in lines) {         @autoreleasepool {             NSMutableArray *components = [[line componentsSeparatedByString:@&quot;,&quot;] mutableCopy];             NSArray *datetime = [components[1] componentsSeparatedByString:@&quot;.&quot;]; \/\/            int hour = (int)[[datetime[0] componentsSeparatedByString:@&quot;:&quot;][0] integerValue];             int min = (int)[[datetime[0] componentsSeparatedByString:@&quot;:&quot;][1] integerValue]; \/\/            int day = (int)[datetime[1] integerValue]; \/\/            int month = (int)[datetime[2] integerValue]; \/\/            int year = (int)[datetime[3] integerValue];              \/\/            if([components[2] isEqualToString:@&quot;(null)&quot;]) continue;              \/\/            int viewsCount = (int)[components[2] integerValue];             int favsCount = (int)[components[3] integerValue];             mins[min]+=favsCount;             minsCount[min]++;         }     }          FILE *output = fopen(&quot;\/Volumes\/TimeMachine Backup\/RESULT.txt&quot;, &quot;a&quot;);     for(int i=MIN; i&lt;MAX; i++) {         fprintf(output, &quot;%d,%f\\n&quot;, i, 1.0f * mins[i] \/ minsCount[i]);     }     fclose(output);          return 0; } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage3\/ef1\/c3a\/6f7\/ef1c3a6f7505ffffd97a689b074cf432.png\"\/><\/p>\n<p>  <b>\u0412\u043e\u043f\u0440\u043e\u0441: \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u044f \u043f\u043e\u0441\u0442\u0430 \u0432 \u043a\u0430\u043a\u043e\u0439 \u0447\u0430\u0441 \u043f\u0440\u0438\u043d\u043e\u0441\u0438\u0442 \u0441\u0432\u043e\u0435\u043c\u0443 \u0430\u0432\u0442\u043e\u0440\u0443 \u0431\u043e\u043b\u044c\u0448\u0435\u0435 \u0447\u0438\u0441\u043b\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0439 \u0432 \u0438\u0437\u0431\u0440\u0430\u043d\u043d\u043e\u0435?<\/b>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">Objective-C Source Code<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"objectivec\">\/\/ \/\/  main.m \/\/  HabrahabrParser \/\/ \/\/  Created by AndrewShmig on 9\/27\/13. \/\/  Copyright (c) 2013 AndrewShmig. All rights reserved. \/\/  #import &lt;Foundation\/Foundation.h&gt;  int main(int argc, const char * argv[]) {          NSString *path = [NSString stringWithFormat:@&quot;\/Volumes\/TimeMachine Backup\/HabrahabrDataParsedDate.txt&quot;];     NSString *fileContent = [NSString stringWithContentsOfFile:path                                                       encoding:NSUTF8StringEncoding                                                          error:nil];          NSArray *lines = [fileContent componentsSeparatedByString:@&quot;\\n&quot;];     int hours[24] = {0};          for(NSString *line in lines) {         NSArray *parts = [line componentsSeparatedByString:@&quot;,&quot;];                  NSString *favs = parts[3];         int favsCount = (int)[favs integerValue];         int hour = (int)[[[parts[1] componentsSeparatedByString:@&quot;.&quot;][0] componentsSeparatedByString:@&quot;:&quot;][0] integerValue];                  hours[hour]+=favsCount;     }               FILE *file = fopen(&quot;\/Volumes\/TimeMachine Backup\/RESULTS.txt&quot;, &quot;a&quot;);     int start = 0;     int end = 24;     for(int index=start; index&lt;end; index++) {         fprintf(file, &quot;%d, %d\\n&quot;, index, hours[index]);     }     fclose(file);          return 0; } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage3\/014\/9a7\/cd4\/0149a7cd44f5381db228073c2f4cc8a3.png\"\/><\/p>\n<p>  \u0421\u0440\u0435\u0434\u043d\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f:  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">Objective-C Source Code<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"objectivec\">\/\/ \/\/  main.m \/\/  HabrahabrParser \/\/ \/\/  Created by AndrewShmig on 9\/27\/13. \/\/  Copyright (c) 2013 AndrewShmig. All rights reserved. \/\/  #import &lt;Foundation\/Foundation.h&gt;  NSString* parseDate(NSString *); NSString* parseFav(NSString *);  int main(int argc, const char * argv[]) {     NSString *path = [NSString stringWithFormat:@&quot;\/Volumes\/TimeMachine Backup\/HabrahabrDataParsedData.txt&quot;];     NSString *fileContent = [NSString stringWithContentsOfFile:path                                                       encoding:NSUTF8StringEncoding                                                          error:nil];          NSArray *lines = [fileContent componentsSeparatedByString:@&quot;\\n&quot;];     const int MAX = 24;     const int MIN = 0;     int mins[MAX] = {0};     int minsCount[MAX] = {0};          for(NSString *line in lines) {         @autoreleasepool {             NSMutableArray *components = [[line componentsSeparatedByString:@&quot;,&quot;] mutableCopy];             NSArray *datetime = [components[1] componentsSeparatedByString:@&quot;.&quot;];             int hour = (int)[[datetime[0] componentsSeparatedByString:@&quot;:&quot;][0] integerValue]; \/\/            int min = (int)[[datetime[0] componentsSeparatedByString:@&quot;:&quot;][1] integerValue]; \/\/            int day = (int)[datetime[1] integerValue]; \/\/            int month = (int)[datetime[2] integerValue]; \/\/            int year = (int)[datetime[3] integerValue];              \/\/            if([components[2] isEqualToString:@&quot;(null)&quot;]) continue;              \/\/            int viewsCount = (int)[components[2] integerValue];             int favsCount = (int)[components[3] integerValue];             mins[hour]+=favsCount;             minsCount[hour]++;         }     }          FILE *output = fopen(&quot;\/Volumes\/TimeMachine Backup\/RESULT.txt&quot;, &quot;a&quot;);     for(int i=MIN; i&lt;MAX; i++) {         fprintf(output, &quot;%d,%f\\n&quot;, i, 1.0f * mins[i] \/ minsCount[i]);     }     fclose(output);          return 0; } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage3\/0c1\/d42\/177\/0c1d421776435dbc0fb34ce81cab77c4.png\"\/><\/p>\n<p>  <b>\u0412\u043e\u043f\u0440\u043e\u0441: \u0432 \u043a\u0430\u043a\u043e\u0439 \u0434\u0435\u043d\u044c \u043c\u0435\u0441\u044f\u0446\u0430 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u044f \u043f\u043e\u0441\u0442\u0430 \u043f\u0440\u0438\u043d\u0435\u0441\u0435\u0442 \u0430\u0432\u0442\u043e\u0440\u0443 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u043a\u043e\u043b-\u0432\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0439 \u0432 \u0438\u0437\u0431\u0440\u0430\u043d\u043d\u043e\u0435?<\/b>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">Objective-C Source Code<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"objectivec\">\/\/ \/\/  main.m \/\/  HabrahabrParser \/\/ \/\/  Created by AndrewShmig on 9\/27\/13. \/\/  Copyright (c) 2013 AndrewShmig. All rights reserved. \/\/  #import &lt;Foundation\/Foundation.h&gt;  NSString* parseDate(NSString *); NSString* parseFav(NSString *);  int main(int argc, const char * argv[]) {     NSString *path = [NSString stringWithFormat:@&quot;\/Volumes\/TimeMachine Backup\/HabrahabrDataParsedData.txt&quot;];     NSString *fileContent = [NSString stringWithContentsOfFile:path                                                       encoding:NSUTF8StringEncoding                                                          error:nil];          NSArray *lines = [fileContent componentsSeparatedByString:@&quot;\\n&quot;];     int days[31] = {0};          for(NSString *line in lines) {         @autoreleasepool {             NSMutableArray *components = [[line componentsSeparatedByString:@&quot;,&quot;] mutableCopy];             NSArray *datetime = [components[1] componentsSeparatedByString:@&quot;.&quot;];             int day = (int)[datetime[1] integerValue];                          int favsCount = (int)[components[3] integerValue];             days[day]+=favsCount;         }     }          FILE *output = fopen(&quot;\/Volumes\/TimeMachine Backup\/RESULT.txt&quot;, &quot;a&quot;);     for(int i=1; i&lt;32; i++) {         fprintf(output, &quot;%d,%d\\n&quot;, i, days[i]);     }     fclose(output);          return 0; } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage3\/4e6\/66e\/bbb\/4e666ebbb4e7951d9156d5bee8fe8f97.png\"\/><\/p>\n<p>  \u0421\u0440\u0435\u0434\u043d\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f:  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">Objective-C Source Code<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"objectivec\">\/\/ \/\/  main.m \/\/  HabrahabrParser \/\/ \/\/  Created by AndrewShmig on 9\/27\/13. \/\/  Copyright (c) 2013 AndrewShmig. All rights reserved. \/\/  #import &lt;Foundation\/Foundation.h&gt;  NSString* parseDate(NSString *); NSString* parseFav(NSString *);  int main(int argc, const char * argv[]) {     NSString *path = [NSString stringWithFormat:@&quot;\/Volumes\/TimeMachine Backup\/HabrahabrDataParsedData.txt&quot;];     NSString *fileContent = [NSString stringWithContentsOfFile:path                                                       encoding:NSUTF8StringEncoding                                                          error:nil];          NSArray *lines = [fileContent componentsSeparatedByString:@&quot;\\n&quot;];     const int MAX = 32;     const int MIN = 1;     int mins[MAX] = {0};     int minsCount[MAX] = {0};          for(NSString *line in lines) {         @autoreleasepool {             NSMutableArray *components = [[line componentsSeparatedByString:@&quot;,&quot;] mutableCopy];             NSArray *datetime = [components[1] componentsSeparatedByString:@&quot;.&quot;]; \/\/            int hour = (int)[[datetime[0] componentsSeparatedByString:@&quot;:&quot;][0] integerValue]; \/\/            int min = (int)[[datetime[0] componentsSeparatedByString:@&quot;:&quot;][1] integerValue];             int day = (int)[datetime[1] integerValue]; \/\/            int month = (int)[datetime[2] integerValue]; \/\/            int year = (int)[datetime[3] integerValue];              \/\/            if([components[2] isEqualToString:@&quot;(null)&quot;]) continue;              \/\/            int viewsCount = (int)[components[2] integerValue];             int favsCount = (int)[components[3] integerValue];             mins[day]+=favsCount;             minsCount[day]++;         }     }          FILE *output = fopen(&quot;\/Volumes\/TimeMachine Backup\/RESULT.txt&quot;, &quot;a&quot;);     for(int i=MIN; i&lt;MAX; i++) {         fprintf(output, &quot;%d,%f\\n&quot;, i, 1.0f * mins[i] \/ minsCount[i]);     }     fclose(output);          return 0; } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage3\/d65\/617\/8f0\/d656178f0fe31f6614ff47d59806604e.png\"\/><\/p>\n<p>  \u0410 \u0432\u043e\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0437\u0430 2013 \u0433\u043e\u0434:<br \/>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage3\/8bd\/43e\/9bc\/8bd43e9bcf74c8bca0d9fd896e5aa4f1.png\"\/><\/p>\n<p>  <b>\u0412\u043e\u043f\u0440\u043e\u0441: \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u044f \u0432 \u043a\u0430\u043a\u043e\u0439 \u043c\u0435\u0441\u044f\u0446 \u043f\u0440\u0438\u043d\u0435\u0441\u0435\u0442 \u0430\u0432\u0442\u043e\u0440\u0443 \u043f\u043e\u0441\u0442\u0430 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0439 \u0432 \u0438\u0437\u0431\u0440\u0430\u043d\u043d\u043e\u0435?<\/b>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">Objective-C Source Code<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"objectivec\">\/\/ \/\/  main.m \/\/  HabrahabrParser \/\/ \/\/  Created by AndrewShmig on 9\/27\/13. \/\/  Copyright (c) 2013 AndrewShmig. All rights reserved. \/\/  #import &lt;Foundation\/Foundation.h&gt;  int main(int argc, const char * argv[]) {          NSString *path = [NSString stringWithFormat:@&quot;\/Volumes\/TimeMachine Backup\/HabrahabrDataParsedDate.txt&quot;];     NSString *fileContent = [NSString stringWithContentsOfFile:path                                                       encoding:NSUTF8StringEncoding                                                          error:nil];          NSArray *lines = [fileContent componentsSeparatedByString:@&quot;\\n&quot;];     int months[12] = {0};          for(NSString *line in lines) {         NSArray *parts = [line componentsSeparatedByString:@&quot;,&quot;];                  NSString *favs = parts[3];         int favsCount = (int)[favs integerValue];         int month = (int)[[parts[1] componentsSeparatedByString:@&quot;.&quot;][2] integerValue];                  months[month]+=favsCount;     }               FILE *file = fopen(&quot;\/Volumes\/TimeMachine Backup\/RESULTS.txt&quot;, &quot;a&quot;);     int start = 1;     int end = 13;     for(int index=start; index&lt;end; index++) {         fprintf(file, &quot;%d, %d\\n&quot;, index, months[index]);     }     fclose(file);          return 0; } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u041d\u0430 \u0425\u0430\u0431\u0440\u0435 \u0434\u0435\u043a\u0430\u0431\u0440\u044c \u043f\u0440\u044f\u043c \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u043c\u0435\u0441\u044f\u0446 \u0441\u0447\u0430\u0441\u0442\u044c\u044f \u0438 \u0434\u043e\u0431\u0440\u043e\u0442\u044b \ud83d\ude42<br \/>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage3\/30f\/63c\/a58\/30f63ca5889e81bac7c68c0e9a80f9e5.png\"\/><\/p>\n<h5>\u041a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438<\/h5>\n<p>  <b>\u0412\u043e\u043f\u0440\u043e\u0441: \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u044f \u043f\u043e\u0441\u0442\u0430 \u0432 \u043a\u0430\u043a\u0443\u044e \u043c\u0438\u043d\u0443\u0442\u0443 \u043f\u0440\u0438\u043d\u0435\u0441\u0435\u0442 \u0430\u0432\u0442\u043e\u0440\u0443 \u043d\u0430\u0438\u0431\u043e\u043b\u044c\u0448\u0435\u0435 \u0447\u0438\u0441\u043b\u043e \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0435\u0432?<\/b>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">Objective-C Source Code<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"objectivec\">\/\/ \/\/  main.m \/\/  HabrahabrParser \/\/ \/\/  Created by AndrewShmig on 9\/27\/13. \/\/  Copyright (c) 2013 AndrewShmig. All rights reserved. \/\/  #import &lt;Foundation\/Foundation.h&gt;  int main(int argc, const char * argv[]) {          NSString *path = [NSString stringWithFormat:@&quot;\/Volumes\/TimeMachine Backup\/HabrahabrDataParsedDate.txt&quot;];     NSString *fileContent = [NSString stringWithContentsOfFile:path                                                       encoding:NSUTF8StringEncoding                                                          error:nil];          NSArray *lines = [fileContent componentsSeparatedByString:@&quot;\\n&quot;];     int mins[60] = {0};          for(NSString *line in lines) {         NSArray *parts = [line componentsSeparatedByString:@&quot;,&quot;];                  NSString *comments = parts[3];         int favsCount = (int)[comments integerValue]; \/\/        int mins = (int)[[parts[1] componentsSeparatedByString:@&quot;.&quot;][2] integerValue];         int min = (int)[[[parts[1] componentsSeparatedByString:@&quot;.&quot;][0] componentsSeparatedByString:@&quot;:&quot;][1] integerValue];                  mins[min]+=favsCount;     }               FILE *file = fopen(&quot;\/Volumes\/TimeMachine Backup\/RESULTS.txt&quot;, &quot;a&quot;);     int start = 0;     int end = 60;     for(int index=start; index&lt;end; index++) {         fprintf(file, &quot;%d, %d\\n&quot;, index, mins[index]);     }     fclose(file);          return 0; } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage3\/784\/968\/807\/7849688079710c56550274ca2925063e.png\"\/><\/p>\n<p>  <b>\u0412\u043e\u043f\u0440\u043e\u0441: \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u044f \u043f\u043e\u0441\u0442\u0430 \u0432 \u043a\u0430\u043a\u043e\u0439 \u0447\u0430\u0441 \u043f\u0440\u0438\u043d\u0435\u0441\u0443\u0442 \u0430\u0432\u0442\u043e\u0440\u0443 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u043a\u043e\u043b-\u0432\u043e \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0435\u0432?<\/b>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">Objective-C Source Code<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"objectivec\">\/\/ \/\/  main.m \/\/  HabrahabrParser \/\/ \/\/  Created by AndrewShmig on 9\/27\/13. \/\/  Copyright (c) 2013 AndrewShmig. All rights reserved. \/\/  #import &lt;Foundation\/Foundation.h&gt;  int main(int argc, const char * argv[]) {          NSString *path = [NSString stringWithFormat:@&quot;\/Volumes\/TimeMachine Backup\/HabrahabrDataParsedDate.txt&quot;];     NSString *fileContent = [NSString stringWithContentsOfFile:path                                                       encoding:NSUTF8StringEncoding                                                          error:nil];          NSArray *lines = [fileContent componentsSeparatedByString:@&quot;\\n&quot;];     int hours[24] = {0};          for(NSString *line in lines) {         NSArray *parts = [line componentsSeparatedByString:@&quot;,&quot;];                  NSString *comments = parts[3];         int favsCount = (int)[comments integerValue]; \/\/        int mins = (int)[[parts[1] componentsSeparatedByString:@&quot;.&quot;][2] integerValue];         int hour = (int)[[[parts[1] componentsSeparatedByString:@&quot;.&quot;][0] componentsSeparatedByString:@&quot;:&quot;][0] integerValue];                  hours[hour]+=favsCount;     }               FILE *file = fopen(&quot;\/Volumes\/TimeMachine Backup\/RESULTS.txt&quot;, &quot;a&quot;);     int start = 0;     int end = 24;     for(int index=start; index&lt;end; index++) {         fprintf(file, &quot;%d, %d\\n&quot;, index, hours[index]);     }     fclose(file);          return 0; } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage3\/4da\/81b\/157\/4da81b15788208e1a5597fa42e438943.png\"\/><\/p>\n<p>  \u0421\u0440\u0435\u0434\u043d\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f:<br \/>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage3\/06e\/6a5\/e56\/06e6a5e560025ff9d42ee78b131ac5da.png\"\/><\/p>\n<p>  \u0422\u043e\u043b\u044c\u043a\u043e \u0437\u0430 2013 \u0433\u043e\u0434:<br \/>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage3\/80c\/108\/dc3\/80c108dc389b73f1da57ed6f8e814918.png\"\/><\/p>\n<p>  <b>\u0412\u043e\u043f\u0440\u043e\u0441: \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u044f \u043f\u043e\u0441\u0442\u0430 \u0432 \u043a\u0430\u043a\u043e\u0439 \u0434\u0435\u043d\u044c \u043c\u0435\u0441\u044f\u0446\u0430 \u043f\u0440\u0438\u043d\u0435\u0441\u0435\u0442 \u0430\u0432\u0442\u043e\u0440\u0443 \u043d\u0430\u0438\u0431\u043e\u043b\u044c\u0448\u0435\u0435 \u043a\u043e\u043b-\u0432\u043e \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0435\u0432?<\/b>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">Objective-C Source Code<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"objectivec\">\/\/ \/\/  main.m \/\/  HabrahabrParser \/\/ \/\/  Created by AndrewShmig on 9\/27\/13. \/\/  Copyright (c) 2013 AndrewShmig. All rights reserved. \/\/  #import &lt;Foundation\/Foundation.h&gt;  NSString* parseDate(NSString *); NSString* parseFav(NSString *);  int main(int argc, const char * argv[]) {     NSString *path = [NSString stringWithFormat:@&quot;\/Volumes\/TimeMachine Backup\/HabrahabrDataParsedData.txt&quot;];     NSString *fileContent = [NSString stringWithContentsOfFile:path                                                       encoding:NSUTF8StringEncoding                                                          error:nil];          NSArray *lines = [fileContent componentsSeparatedByString:@&quot;\\n&quot;];     int days[31] = {0};          for(NSString *line in lines) {         @autoreleasepool {             NSMutableArray *components = [[line componentsSeparatedByString:@&quot;,&quot;] mutableCopy];             NSArray *datetime = [components[1] componentsSeparatedByString:@&quot;.&quot;];             int day = (int)[datetime[1] integerValue];                          int comments = (int)[components[4] integerValue];             days[day]+=comments;         }     }          FILE *output = fopen(&quot;\/Volumes\/TimeMachine Backup\/RESULT.txt&quot;, &quot;a&quot;);     for(int i=1; i&lt;32; i++) {         fprintf(output, &quot;%d,%d\\n&quot;, i, days[i]);     }     fclose(output);          return 0; } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage3\/d26\/2b5\/e2d\/d262b5e2da7aeb9143b7c6fe7b1c0451.png\"\/><\/p>\n<p>  <b>\u0412\u043e\u043f\u0440\u043e\u0441: \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u044f \u0432 \u043a\u0430\u043a\u043e\u043c \u043c\u0435\u0441\u044f\u0446\u0435 \u043f\u0440\u0438\u043d\u0435\u0441\u0435\u0442 \u0430\u0432\u0442\u043e\u0440\u0443 \u043d\u0430\u0438\u0431\u043e\u043b\u044c\u0448\u0435 \u0447\u0438\u0441\u043b\u043e \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0435\u0432?<\/b>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">Objective-C Source Code<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"objectivec\">\/\/ \/\/  main.m \/\/  HabrahabrParser \/\/ \/\/  Created by AndrewShmig on 9\/27\/13. \/\/  Copyright (c) 2013 AndrewShmig. All rights reserved. \/\/  #import &lt;Foundation\/Foundation.h&gt;  int main(int argc, const char * argv[]) {          NSString *path = [NSString stringWithFormat:@&quot;\/Volumes\/TimeMachine Backup\/HabrahabrDataParsedDate.txt&quot;];     NSString *fileContent = [NSString stringWithContentsOfFile:path                                                       encoding:NSUTF8StringEncoding                                                          error:nil];          NSArray *lines = [fileContent componentsSeparatedByString:@&quot;\\n&quot;];     int months[12] = {0};          for(NSString *line in lines) {         NSArray *parts = [line componentsSeparatedByString:@&quot;,&quot;];                  NSString *comments = parts[3];         int commentsCount = (int)[comments integerValue];         int month = (int)[[parts[1] componentsSeparatedByString:@&quot;.&quot;][2] integerValue]; \/\/        int hour = (int)[[[parts[1] componentsSeparatedByString:@&quot;.&quot;][0] componentsSeparatedByString:@&quot;:&quot;][0] integerValue];                  months[month]+=commentsCount;     }               FILE *file = fopen(&quot;\/Volumes\/TimeMachine Backup\/RESULTS.txt&quot;, &quot;a&quot;);     int start = 1;     int end = 13;     for(int index=start; index&lt;end; index++) {         fprintf(file, &quot;%d, %d\\n&quot;, index, months[index]);     }     fclose(file);          return 0; } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage3\/071\/094\/9b0\/0710949b0b73a4b1a488231c8fefb2c0.png\"\/><\/p>\n<p>  <b>\u0412\u043e\u043f\u0440\u043e\u0441: \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u044f \u0432 \u043a\u0430\u043a\u043e\u043c \u0433\u043e\u0434\u0443 \u043f\u0440\u0438\u043d\u0435\u0441\u0451\u0442 \u0430\u0432\u0442\u043e\u0440\u0443 \u043d\u0430\u0438\u0431\u043e\u043b\u044c\u0448\u0435\u0435 \u0447\u0438\u0441\u043b\u043e \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0435\u0432?<\/b>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">Objective-C Source Code<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"objectivec\">\/\/ \/\/  main.m \/\/  HabrahabrParser \/\/ \/\/  Created by AndrewShmig on 9\/27\/13. \/\/  Copyright (c) 2013 AndrewShmig. All rights reserved. \/\/  #import &lt;Foundation\/Foundation.h&gt;  int main(int argc, const char * argv[]) {          NSString *path = [NSString stringWithFormat:@&quot;\/Volumes\/TimeMachine Backup\/HabrahabrDataParsedDate.txt&quot;];     NSString *fileContent = [NSString stringWithContentsOfFile:path                                                       encoding:NSUTF8StringEncoding                                                          error:nil];          NSArray *lines = [fileContent componentsSeparatedByString:@&quot;\\n&quot;];     int years[2020] = {0};          for(NSString *line in lines) {         NSArray *parts = [line componentsSeparatedByString:@&quot;,&quot;];                  NSString *comments = parts[3];         int commentsCount = (int)[comments integerValue];         int year = (int)[[parts[1] componentsSeparatedByString:@&quot;.&quot;][3] integerValue]; \/\/        int hour = (int)[[[parts[1] componentsSeparatedByString:@&quot;.&quot;][0] componentsSeparatedByString:@&quot;:&quot;][0] integerValue];                  years[year]+=commentsCount;     }               FILE *file = fopen(&quot;\/Volumes\/TimeMachine Backup\/RESULTS.txt&quot;, &quot;a&quot;);     int start = 2005;     int end = 2014;     for(int index=start; index&lt;end; index++) {         fprintf(file, &quot;%d, %d\\n&quot;, index, years[index]);     }     fclose(file);          return 0; } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage3\/a8d\/29c\/03d\/a8d29c03d5fdce1268d1f6e5d5230f6c.png\"\/><\/p>\n<h5>\u0417\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c \u0447\u0438\u0441\u043b\u0430 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0435\u0432 \u043e\u0442 \u0447\u0438\u0441\u043b\u0430 \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u043e\u0432<\/h5>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">Objective-C<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"objectivec\">\/\/ \/\/  main.m \/\/  HabrahabrParser \/\/ \/\/  Created by AndrewShmig on 9\/27\/13. \/\/  Copyright (c) 2013 AndrewShmig. All rights reserved. \/\/  #import &lt;Foundation\/Foundation.h&gt;  NSString* parseDate(NSString *); NSString* parseFav(NSString *);  int main(int argc, const char * argv[]) {     NSString *path = [NSString stringWithFormat:@&quot;\/Volumes\/TimeMachine Backup\/HabrahabrDataParsedData.txt&quot;];     NSString *fileContent = [NSString stringWithContentsOfFile:path                                                       encoding:NSUTF8StringEncoding                                                          error:nil];          NSArray *lines = [fileContent componentsSeparatedByString:@&quot;\\n&quot;];     const int MAX = 24;     const int MIN = 0;     int mins[MAX] = {0};     int minsCount[MAX] = {0};          FILE *output = fopen(&quot;\/Volumes\/TimeMachine Backup\/RESULT.txt&quot;, &quot;a&quot;);     for(NSString *line in lines) {         @autoreleasepool {             NSMutableArray *components = [[line componentsSeparatedByString:@&quot;,&quot;] mutableCopy];             NSArray *datetime = [components[1] componentsSeparatedByString:@&quot;.&quot;]; \/\/            int hour = (int)[[datetime[0] componentsSeparatedByString:@&quot;:&quot;][0] integerValue]; \/\/            int min = (int)[[datetime[0] componentsSeparatedByString:@&quot;:&quot;][1] integerValue]; \/\/            int day = (int)[datetime[1] integerValue]; \/\/            int month = (int)[datetime[2] integerValue]; \/\/            int year = (int)[datetime[3] integerValue]; \/\/            if(year != 2013) continue;                          if([components[2] isEqualToString:@&quot;(null)&quot;]) continue;                          int viewsCount = (int)[components[2] integerValue]; \/\/            int favsCount = (int)[components[3] integerValue];             int comments = (int)[components[4] integerValue]; \/\/            mins[hour]+=comments; \/\/            minsCount[hour]++;             fprintf(output, &quot;%d,%d\\n&quot;, viewsCount, comments);         }     }      \/\/    FILE *output = fopen(&quot;\/Volumes\/TimeMachine Backup\/RESULT.txt&quot;, &quot;a&quot;); \/\/    for(int i=MIN; i&lt;MAX; i++) { \/\/        fprintf(output, &quot;%d,%f\\n&quot;, i, 1.0f * mins[i] \/ minsCount[i]); \/\/    }     fclose(output);          return 0; } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage3\/ac7\/241\/114\/ac7241114ce18c0ed42718326055de49.png\"\/><\/p>\n<h5>\u0417\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c \u0447\u0438\u0441\u043b\u0430 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0439 \u0432 \u0438\u0437\u0431\u0440\u0430\u043d\u043d\u043e\u0435 \u043e\u0442 \u0447\u0438\u0441\u043b\u0430 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0435\u0432<\/h5>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">Objective-C Source Code<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"objectivec\">\/\/ \/\/  main.m \/\/  HabrahabrParser \/\/ \/\/  Created by AndrewShmig on 9\/27\/13. \/\/  Copyright (c) 2013 AndrewShmig. All rights reserved. \/\/  #import &lt;Foundation\/Foundation.h&gt;  NSString* parseDate(NSString *); NSString* parseFav(NSString *);  int main(int argc, const char * argv[]) {     NSString *path = [NSString stringWithFormat:@&quot;\/Volumes\/TimeMachine Backup\/HabrahabrDataParsedData.txt&quot;];     NSString *fileContent = [NSString stringWithContentsOfFile:path                                                       encoding:NSUTF8StringEncoding                                                          error:nil];          NSArray *lines = [fileContent componentsSeparatedByString:@&quot;\\n&quot;];     const int MAX = 24;     const int MIN = 0;     int mins[MAX] = {0};     int minsCount[MAX] = {0};          FILE *output = fopen(&quot;\/Volumes\/TimeMachine Backup\/RESULT.txt&quot;, &quot;a&quot;);     for(NSString *line in lines) {         @autoreleasepool {             NSMutableArray *components = [[line componentsSeparatedByString:@&quot;,&quot;] mutableCopy];             NSArray *datetime = [components[1] componentsSeparatedByString:@&quot;.&quot;]; \/\/            int hour = (int)[[datetime[0] componentsSeparatedByString:@&quot;:&quot;][0] integerValue]; \/\/            int min = (int)[[datetime[0] componentsSeparatedByString:@&quot;:&quot;][1] integerValue]; \/\/            int day = (int)[datetime[1] integerValue]; \/\/            int month = (int)[datetime[2] integerValue]; \/\/            int year = (int)[datetime[3] integerValue]; \/\/            if(year != 2013) continue;              \/\/            if([components[2] isEqualToString:@&quot;(null)&quot;]) continue;              \/\/            int viewsCount = (int)[components[2] integerValue];             int favsCount = (int)[components[3] integerValue];             int comments = (int)[components[4] integerValue]; \/\/            mins[hour]+=comments; \/\/            minsCount[hour]++;             fprintf(output, &quot;%d,%d\\n&quot;, favsCount, comments);         }     }      \/\/    FILE *output = fopen(&quot;\/Volumes\/TimeMachine Backup\/RESULT.txt&quot;, &quot;a&quot;); \/\/    for(int i=MIN; i&lt;MAX; i++) { \/\/        fprintf(output, &quot;%d,%f\\n&quot;, i, 1.0f * mins[i] \/ minsCount[i]); \/\/    }     fclose(output);          return 0; } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<div class=\"spoiler\"><b class=\"spoiler_title\">MATLAB Source Code<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code>fid = fopen('\/Volumes\/TimeMachine Backup\/RESULT.txt', 'r');  while ~feof(fid)     arr = fscanf(fid,'%d,%d',2);     favs = arr(1);     comments = arr(2);          hold on;     plot(comments, favs, '*b') end  fclose(fid); <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0417\u0430 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u044d\u0442\u043e\u0433\u043e \u0433\u0440\u0430\u0444\u0438\u043a\u0430 \u043f\u0440\u0438\u043d\u043e\u0448\u0443 \u0441\u0432\u043e\u0438 \u0438\u0437\u0432\u0438\u043d\u0435\u043d\u0438\u044f, LibreOffice \u043e\u0442\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0442\u0430\u043a\u043e\u0435 \u043a\u043e\u043b-\u0432\u043e \u0434\u0430\u043d\u043d\u044b\u0445, \u0430 \u043f\u0440\u043e Numbers \u043c\u043e\u043b\u0447\u0443.<br \/>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage3\/fe7\/8aa\/32c\/fe78aa32c60e1fd33a894a86716c95a2.jpg\"\/><br \/>  <i>\u041f\u043e \u043e\u0441\u0438 \u0425 \u2014 \u043a\u043e\u043b-\u0432\u043e \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0435\u0432, \u0430 \u043f\u043e \u043e\u0441\u0438 \u0423 \u2014 \u043a\u043e\u043b-\u0432\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0439 \u0432 \u0438\u0437\u0431\u0440\u0430\u043d\u043d\u043e\u0435<\/i><\/p>\n<h5>\u0423\u0433\u0430\u0434\u0430\u0439\u043a\u0430<\/h5>\n<p>  \u041a\u0442\u043e \u043f\u0440\u0438\u043a\u0438\u043d\u0435\u0442, \u0447\u0442\u043e \u0436\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u043e \u043d\u0430 \u044d\u0442\u0438\u0445 \u0433\u0440\u0430\u0444\u0438\u043a\u0430\u0445?<br \/>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage3\/941\/a04\/13b\/941a0413ba3062b8f2fb9fbfe2104625.jpg\"\/><br \/>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage3\/667\/b14\/377\/667b14377975000da96eef3c4e5dd1ac.jpg\"\/><br \/>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage3\/d8f\/bd0\/cb6\/d8fbd0cb613412d6b85f3744ea7df85c.jpg\"\/><br \/>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage3\/4a1\/966\/6c8\/4a19666c8a8df3ace05eae210b4f7d74.jpg\"\/><br \/>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage3\/efe\/448\/465\/efe4484653ebca764a16ec6424718797.jpg\"\/><\/p>\n<h5>\u0412 \u0437\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h5>\n<p>  \u0421\u043f\u0430\u0441\u0438\u0431\u043e \u0437\u0430 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435!<\/p>\n<p>  \u041c\u044b \u0441 \u0431\u043e\u043b\u044c\u0448\u0438\u043c \u043d\u0435\u0442\u0435\u0440\u043f\u0435\u043d\u0438\u0435\u043c \u0445\u043e\u0442\u0438\u043c \u0443\u0436\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u0412\u0430\u043c, \u0447\u0442\u043e \u043c\u044b \u043d\u0430\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0438 \u043d\u0430 iOS \u0438 Android, \u043d\u043e \u043f\u043e\u043a\u0430, \u043a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u044d\u0442\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u0440\u0430\u043d\u043e\u2026    \t<\/p>\n<div class=\"clear\"><\/div>\n<\/p><\/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=\"http:\/\/habrahabr.ru\/post\/195552\/\"> http:\/\/habrahabr.ru\/post\/195552\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\">   \t\u0414\u043e\u0431\u0440\u044b\u0439 \u0432\u0435\u0447\u0435\u0440, \u0445\u0430\u0431\u0440\u0430\u0447\u0438\u0442\u0430\u0442\u0435\u043b\u0438!<\/p>\n<p>  <s>\u041f\u0435\u0440\u0435\u0434<\/s> \u0432\u044b\u0445\u043e\u0434\u043e\u043c <a href=\"http:\/\/habrahabr.ru\/post\/195554\/\"><s>8+ \u0432 1: \u043d\u0430\u0448 \u043d\u043e\u0432\u044b\u0439 \u043c\u0435\u0441\u0441\u0435\u043d\u0434\u0436\u0435\u0440 \u043f\u043e\u0434 iOS \u0438 Android<\/s><\/a>, \u043c\u043d\u0435 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u043f\u0440\u043e\u0434\u0435\u043b\u0430\u0442\u044c \u043a\u043e\u0435-\u043a\u0430\u043a\u0443\u044e \u0440\u0430\u0431\u043e\u0442\u0443 \u043f\u043e \u0438\u0437\u0443\u0447\u0435\u043d\u0438\u044e \u0442\u0435\u0445 \u043c\u0435\u0441\u0442, \u043a\u0443\u0434\u0430 \u043c\u044b \u0441\u043e\u0431\u0438\u0440\u0430\u043b\u0438\u0441\u044c \u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u0435\u0441\u0441-\u0440\u0435\u043b\u0438\u0437\u044b. \u041e\u0434\u043d\u0438\u043c \u0438\u0437 \u0442\u0430\u043a\u0438\u0445 \u043c\u0435\u0441\u0442 \u0441\u0442\u0430\u043b \u0425\u0430\u0431\u0440.<\/p>\n<p>  \u041c\u044b \u0437\u0430\u0434\u0430\u043b\u0438\u0441\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c\u0438 \u0432\u043e\u043f\u0440\u043e\u0441\u0430\u043c\u0438:  <\/p>\n<ul>\n<li> \u0412 \u043a\u0430\u043a\u043e\u0439 \u0434\u0435\u043d\u044c \u043d\u0435\u0434\u0435\u043b\u0438 \u043b\u0443\u0447\u0448\u0435 \u0432\u0441\u0435\u0433\u043e \u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0441\u0442? <\/li>\n<li> \u0412 \u043a\u0430\u043a\u043e\u0435 \u0432\u0440\u0435\u043c\u044f (\u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b \u0432\u0440\u0435\u043c\u0435\u043d\u0438) \u043b\u0443\u0447\u0448\u0435 \u0432\u0441\u0435\u0433\u043e \u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0441\u0442? <\/li>\n<li> \u0412 \u043a\u0430\u043a\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0433\u043e\u0434\u0430 \u043b\u0443\u0447\u0448\u0435 \u0432\u0441\u0435\u0433\u043e \u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0441\u0442? <\/li>\n<\/ul>\n<p>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/5d9\/b79\/d44\/5d9b79d443b9a714b7902e49c9610154.gif\" alt=\"image\"\/><\/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-195552","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/195552","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=195552"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/195552\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=195552"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=195552"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=195552"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}