{"action":"created","comment":{"url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/pulls/comments/84151137","pull_request_review_id":4946671,"id":84151137,"diff_hunk":"@@ -0,0 +1,51 @@\n+#!/usr/bin/env ruby\n+stack = []\n+gSymbol = false\n+begin\n+  lexem = gets\n+  if [\"+\", \"-\", \"/\", \"*\", \"!\", \"^\"].include? lexem.chr\n+    b = stack.pop\n+    a = stack.pop\n+    case lexem.chr\n+      when '+' then stack.push(a + b)\n+      when '-' then stack.push(a - b)\n+      when '*' then stack.push(a * b)\n+      when '^' then stack.push(a ** b)\n+      when '!' then\n+        bits = []\n+        a = a.to_i\n+        begin\n+          bits.push(a % 2)\n+          a /= 2\n+        end while (a > 0)\n+        bits.reverse!\n+        #puts bits\n+        i = 0\n+        while i < bits.length\n+          if (b > 0) && (bits[i] == 1)\n+            bits[i] = 0\n+            b -= 1\n+          end\n+          i += 1\n+        end\n+        i = 0\n+        result = 0\n+        while i < bits.length\n+          result += bits[i] * (2 ** i)\n+          i += 1\n+        end    \n+        stack.push(result)\n+      when '/' then \n+        if b == 0 then\n+          puts \"Division by zero. \" + a.to_s + \"/\" + b.to_s\n+        else  ","path":"2016/IlyaKovalenko/1/calculator.rb","position":41,"original_position":41,"commit_id":"59b72035a16157ba9491bb1cc29ae832968bc92c","original_commit_id":"59b72035a16157ba9491bb1cc29ae832968bc92c","user":{"login":"houndci-bot","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=3","gravatar_id":"","url":"https://api.github.com/users/houndci-bot","html_url":"https://github.com/houndci-bot","followers_url":"https://api.github.com/users/houndci-bot/followers","following_url":"https://api.github.com/users/houndci-bot/following{/other_user}","gists_url":"https://api.github.com/users/houndci-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci-bot/subscriptions","organizations_url":"https://api.github.com/users/houndci-bot/orgs","repos_url":"https://api.github.com/users/houndci-bot/repos","events_url":"https://api.github.com/users/houndci-bot/events{/privacy}","received_events_url":"https://api.github.com/users/houndci-bot/received_events","type":"User","site_admin":false},"body":"Trailing whitespace detected.","created_at":"2016-10-19T19:43:38Z","updated_at":"2016-10-19T19:43:38Z","html_url":"https://github.com/rubyroidlabs/bsuir-courses/pull/443#discussion_r84151137","pull_request_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/pulls/443","_links":{"self":{"href":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/pulls/comments/84151137"},"html":{"href":"https://github.com/rubyroidlabs/bsuir-courses/pull/443#discussion_r84151137"},"pull_request":{"href":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/pulls/443"}}},"pull_request":{"url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/pulls/443","id":90077023,"html_url":"https://github.com/rubyroidlabs/bsuir-courses/pull/443","diff_url":"https://github.com/rubyroidlabs/bsuir-courses/pull/443.diff","patch_url":"https://github.com/rubyroidlabs/bsuir-courses/pull/443.patch","issue_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/issues/443","number":443,"state":"open","locked":false,"title":"implement homework 1","user":{"login":"ilyacoding","id":6131801,"avatar_url":"https://avatars.githubusercontent.com/u/6131801?v=3","gravatar_id":"","url":"https://api.github.com/users/ilyacoding","html_url":"https://github.com/ilyacoding","followers_url":"https://api.github.com/users/ilyacoding/followers","following_url":"https://api.github.com/users/ilyacoding/following{/other_user}","gists_url":"https://api.github.com/users/ilyacoding/gists{/gist_id}","starred_url":"https://api.github.com/users/ilyacoding/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ilyacoding/subscriptions","organizations_url":"https://api.github.com/users/ilyacoding/orgs","repos_url":"https://api.github.com/users/ilyacoding/repos","events_url":"https://api.github.com/users/ilyacoding/events{/privacy}","received_events_url":"https://api.github.com/users/ilyacoding/received_events","type":"User","site_admin":false},"body":"## Фамилия Имя\r\nКоваленко Илья\r\n\r\n## Email\r\nilyacoding@yandex.ru\r\n\r\n## Номер домашнего задания\r\n1\r\n\r\n## Ссылка на видео с демо работы\r\nhttp://recordit.co/XTauE4c9y3\r\n\r\n## Комментарии\r\nСделал продвинутую версию.\r\nПоддерживаемые операции: + - * / ^ !\r\n\r\n","created_at":"2016-10-19T19:43:24Z","updated_at":"2016-10-19T19:43:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c1a617473c19ce54247072520c3eaafd790d7f78","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/pulls/443/commits","review_comments_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/pulls/443/comments","review_comment_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/issues/443/comments","statuses_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/statuses/59b72035a16157ba9491bb1cc29ae832968bc92c","head":{"label":"ilyacoding:homework-1","ref":"homework-1","sha":"59b72035a16157ba9491bb1cc29ae832968bc92c","user":{"login":"ilyacoding","id":6131801,"avatar_url":"https://avatars.githubusercontent.com/u/6131801?v=3","gravatar_id":"","url":"https://api.github.com/users/ilyacoding","html_url":"https://github.com/ilyacoding","followers_url":"https://api.github.com/users/ilyacoding/followers","following_url":"https://api.github.com/users/ilyacoding/following{/other_user}","gists_url":"https://api.github.com/users/ilyacoding/gists{/gist_id}","starred_url":"https://api.github.com/users/ilyacoding/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ilyacoding/subscriptions","organizations_url":"https://api.github.com/users/ilyacoding/orgs","repos_url":"https://api.github.com/users/ilyacoding/repos","events_url":"https://api.github.com/users/ilyacoding/events{/privacy}","received_events_url":"https://api.github.com/users/ilyacoding/received_events","type":"User","site_admin":false},"repo":{"id":71390653,"name":"bsuir-courses","full_name":"ilyacoding/bsuir-courses","owner":{"login":"ilyacoding","id":6131801,"avatar_url":"https://avatars.githubusercontent.com/u/6131801?v=3","gravatar_id":"","url":"https://api.github.com/users/ilyacoding","html_url":"https://github.com/ilyacoding","followers_url":"https://api.github.com/users/ilyacoding/followers","following_url":"https://api.github.com/users/ilyacoding/following{/other_user}","gists_url":"https://api.github.com/users/ilyacoding/gists{/gist_id}","starred_url":"https://api.github.com/users/ilyacoding/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ilyacoding/subscriptions","organizations_url":"https://api.github.com/users/ilyacoding/orgs","repos_url":"https://api.github.com/users/ilyacoding/repos","events_url":"https://api.github.com/users/ilyacoding/events{/privacy}","received_events_url":"https://api.github.com/users/ilyacoding/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ilyacoding/bsuir-courses","description":"This is common repository for all student to submit all their homeworks","fork":true,"url":"https://api.github.com/repos/ilyacoding/bsuir-courses","forks_url":"https://api.github.com/repos/ilyacoding/bsuir-courses/forks","keys_url":"https://api.github.com/repos/ilyacoding/bsuir-courses/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ilyacoding/bsuir-courses/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ilyacoding/bsuir-courses/teams","hooks_url":"https://api.github.com/repos/ilyacoding/bsuir-courses/hooks","issue_events_url":"https://api.github.com/repos/ilyacoding/bsuir-courses/issues/events{/number}","events_url":"https://api.github.com/repos/ilyacoding/bsuir-courses/events","assignees_url":"https://api.github.com/repos/ilyacoding/bsuir-courses/assignees{/user}","branches_url":"https://api.github.com/repos/ilyacoding/bsuir-courses/branches{/branch}","tags_url":"https://api.github.com/repos/ilyacoding/bsuir-courses/tags","blobs_url":"https://api.github.com/repos/ilyacoding/bsuir-courses/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ilyacoding/bsuir-courses/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ilyacoding/bsuir-courses/git/refs{/sha}","trees_url":"https://api.github.com/repos/ilyacoding/bsuir-courses/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ilyacoding/bsuir-courses/statuses/{sha}","languages_url":"https://api.github.com/repos/ilyacoding/bsuir-courses/languages","stargazers_url":"https://api.github.com/repos/ilyacoding/bsuir-courses/stargazers","contributors_url":"https://api.github.com/repos/ilyacoding/bsuir-courses/contributors","subscribers_url":"https://api.github.com/repos/ilyacoding/bsuir-courses/subscribers","subscription_url":"https://api.github.com/repos/ilyacoding/bsuir-courses/subscription","commits_url":"https://api.github.com/repos/ilyacoding/bsuir-courses/commits{/sha}","git_commits_url":"https://api.github.com/repos/ilyacoding/bsuir-courses/git/commits{/sha}","comments_url":"https://api.github.com/repos/ilyacoding/bsuir-courses/comments{/number}","issue_comment_url":"https://api.github.com/repos/ilyacoding/bsuir-courses/issues/comments{/number}","contents_url":"https://api.github.com/repos/ilyacoding/bsuir-courses/contents/{+path}","compare_url":"https://api.github.com/repos/ilyacoding/bsuir-courses/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ilyacoding/bsuir-courses/merges","archive_url":"https://api.github.com/repos/ilyacoding/bsuir-courses/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ilyacoding/bsuir-courses/downloads","issues_url":"https://api.github.com/repos/ilyacoding/bsuir-courses/issues{/number}","pulls_url":"https://api.github.com/repos/ilyacoding/bsuir-courses/pulls{/number}","milestones_url":"https://api.github.com/repos/ilyacoding/bsuir-courses/milestones{/number}","notifications_url":"https://api.github.com/repos/ilyacoding/bsuir-courses/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ilyacoding/bsuir-courses/labels{/name}","releases_url":"https://api.github.com/repos/ilyacoding/bsuir-courses/releases{/id}","deployments_url":"https://api.github.com/repos/ilyacoding/bsuir-courses/deployments","created_at":"2016-10-19T19:10:37Z","updated_at":"2016-10-19T19:10:39Z","pushed_at":"2016-10-19T19:18:08Z","git_url":"git://github.com/ilyacoding/bsuir-courses.git","ssh_url":"git@github.com:ilyacoding/bsuir-courses.git","clone_url":"https://github.com/ilyacoding/bsuir-courses.git","svn_url":"https://github.com/ilyacoding/bsuir-courses","homepage":null,"size":6519,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"rubyroidlabs:master","ref":"master","sha":"d0f9d8959f21076a7bbdbe6069587e92a6856557","user":{"login":"rubyroidlabs","id":5137565,"avatar_url":"https://avatars.githubusercontent.com/u/5137565?v=3","gravatar_id":"","url":"https://api.github.com/users/rubyroidlabs","html_url":"https://github.com/rubyroidlabs","followers_url":"https://api.github.com/users/rubyroidlabs/followers","following_url":"https://api.github.com/users/rubyroidlabs/following{/other_user}","gists_url":"https://api.github.com/users/rubyroidlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/rubyroidlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rubyroidlabs/subscriptions","organizations_url":"https://api.github.com/users/rubyroidlabs/orgs","repos_url":"https://api.github.com/users/rubyroidlabs/repos","events_url":"https://api.github.com/users/rubyroidlabs/events{/privacy}","received_events_url":"https://api.github.com/users/rubyroidlabs/received_events","type":"Organization","site_admin":false},"repo":{"id":14405320,"name":"bsuir-courses","full_name":"rubyroidlabs/bsuir-courses","owner":{"login":"rubyroidlabs","id":5137565,"avatar_url":"https://avatars.githubusercontent.com/u/5137565?v=3","gravatar_id":"","url":"https://api.github.com/users/rubyroidlabs","html_url":"https://github.com/rubyroidlabs","followers_url":"https://api.github.com/users/rubyroidlabs/followers","following_url":"https://api.github.com/users/rubyroidlabs/following{/other_user}","gists_url":"https://api.github.com/users/rubyroidlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/rubyroidlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rubyroidlabs/subscriptions","organizations_url":"https://api.github.com/users/rubyroidlabs/orgs","repos_url":"https://api.github.com/users/rubyroidlabs/repos","events_url":"https://api.github.com/users/rubyroidlabs/events{/privacy}","received_events_url":"https://api.github.com/users/rubyroidlabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rubyroidlabs/bsuir-courses","description":"This is common repository for all student to submit all their homeworks","fork":false,"url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses","forks_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/forks","keys_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/teams","hooks_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/hooks","issue_events_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/issues/events{/number}","events_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/events","assignees_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/assignees{/user}","branches_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/branches{/branch}","tags_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/tags","blobs_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/git/refs{/sha}","trees_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/statuses/{sha}","languages_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/languages","stargazers_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/stargazers","contributors_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/contributors","subscribers_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/subscribers","subscription_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/subscription","commits_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/commits{/sha}","git_commits_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/git/commits{/sha}","comments_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/comments{/number}","issue_comment_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/issues/comments{/number}","contents_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/contents/{+path}","compare_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/merges","archive_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/downloads","issues_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/issues{/number}","pulls_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/pulls{/number}","milestones_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/milestones{/number}","notifications_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/labels{/name}","releases_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/releases{/id}","deployments_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/deployments","created_at":"2013-11-14T19:55:12Z","updated_at":"2016-10-18T20:24:26Z","pushed_at":"2016-10-19T19:43:24Z","git_url":"git://github.com/rubyroidlabs/bsuir-courses.git","ssh_url":"git@github.com:rubyroidlabs/bsuir-courses.git","clone_url":"https://github.com/rubyroidlabs/bsuir-courses.git","svn_url":"https://github.com/rubyroidlabs/bsuir-courses","homepage":null,"size":6519,"stargazers_count":26,"watchers_count":26,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":152,"mirror_url":null,"open_issues_count":26,"forks":152,"open_issues":26,"watchers":26,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/pulls/443"},"html":{"href":"https://github.com/rubyroidlabs/bsuir-courses/pull/443"},"issue":{"href":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/issues/443"},"comments":{"href":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/issues/443/comments"},"review_comments":{"href":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/pulls/443/comments"},"review_comment":{"href":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/pulls/443/commits"},"statuses":{"href":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/statuses/59b72035a16157ba9491bb1cc29ae832968bc92c"}}}}
{"actor":{"display_login":"houndci-bot"}}