GitHub PullRequestReviewCommentEvent at 2014-10-23 14:40:37
Repository: ds
Actor: romandev
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/romandev/ds/pulls/comments/19281153","id":19281153,"diff_hunk":"@@ -0,0 +1,135 @@\n+#include <iostream>\n+#include <cstdlib>\n+#include \"jukStructure.h\"\n+\n+using std::cout;\n+using std::endl;\n+template <typename Type>\n+ArrStack<Type>::ArrStack() {\n+  topNum = 0;\n+}\n+\n+template <typename Type>\n+bool ArrStack<Type>::push(Type mNode) {\n+  if ( topNum < MAX_SIZE ) {\n+  \tnode[topNum] = mNode;\n+  \ttopNum++;\n+  \treturn true;\n+  }\n+\n+  else {\n+  \tcout << \"Stack overflow\" << endl;\n+  \texit(1);\n+  }\n+}\n+\n+template <typename Type>\n+Type ArrStack<Type>::pop() {\n+  Type ret;\n+\n+  if ( topNum > 0 ) {\n+  \tret = node[topNum-1];\n+  \tnode[topNum-1]= 0;\n+  \ttopNum--;\n+\n+  \treturn ret;\n+  }\n+\n+  else {\n+//  \tcout << \"Stack underflow!(current topNum = \" << topNum <<\")\" << endl;\n+  \treturn false;\n+  }\n+}\n+\n+template <typename Type>\n+Type ArrStack<Type>::peek() {\n+  if ( topNum > 0 ) {\n+  \treturn node[topNum-1];\n+  }\n+  else {\n+  \treturn false;\n+  }\n+}\n+\n+template <typename Type>\n+void ArrStack<Type>::show() {\n+  for ( int i = 0; i < MAX_SIZE; i++ )\n+  \tcout << \"data[\" << i << \"]=\" << node[i] << endl;\n+}\n+\n+template <typename Type>\n+ArrQueue<Type>::ArrQueue() {\n+  cnt = rear = front = 0;\n+}\n+\n+template <typename Type>\n+bool ArrQueue<Type>::enqueue(Type mNode) {\n+  if ( cnt < MAX_SIZE ) {\n+  \tnode[rear] = mNode;\n+  \trear = (rear+1)%MAX_SIZE;\n+  \tcnt++;\n+  \treturn true;\n+  }\n+  else {\n+//  \tcout << \"Queue is full!\" << endl;\n+  \treturn false;\n+  }\n+}\n+\n+template <typename Type>\n+Type ArrQueue<Type>::dequeue() {\n+  Type ret;\n+\n+  if ( cnt > 0 ) {\n+  \tret = node[front];\n+  \tnode[front] = 0;\n+  \tfront = (front+1)%MAX_SIZE;\n+  \tcnt--;\n+  \treturn ret;\n+  }\n+  else {\n+//  cout << \"Queue is empty!\" << endl;\n+  \treturn false;\n+  }\n+}\n+\n+template <typename Type>\n+Type ArrQueue<Type>::peek() {\n+  if ( cnt > 0 ) {\n+  \treturn node[front];\n+  }\n+  else {\n+//  \tcout << \"Queue is empty!\" << endl;\n+  \treturn false;\n+  }\n+}\n+\n+template <typename Type>\n+void ArrQueue<Type>::show() {\n+  if ( cnt == 0 ) {\n+  \tcout << \"Queue is empty!\" << endl;\n+  \treturn;\n+  }\n+\n+  int i = front;\n+\n+  do {\n+  \tcout << \"node [\" << i << \"] = \" << node[i] << endl;\n+  \ti = (i+1)%MAX_SIZE;\n+  }\n+  while ( i != rear );\n+}\n+\n+int main() {","path":"jukStructure.cpp","position":123,"original_position":123,"commit_id":"c591c88743dc8a3bfbca2b1f8e0be0778d909b40","original_commit_id":"c591c88743dc8a3bfbca2b1f8e0be0778d909b40","user":{"login":"romandev","id":1106770,"avatar_url":"https://avatars.githubusercontent.com/u/1106770?v=2","gravatar_id":"","url":"https://api.github.com/users/romandev","html_url":"https://github.com/romandev","followers_url":"https://api.github.com/users/romandev/followers","following_url":"https://api.github.com/users/romandev/following{/other_user}","gists_url":"https://api.github.com/users/romandev/gists{/gist_id}","starred_url":"https://api.github.com/users/romandev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/romandev/subscriptions","organizations_url":"https://api.github.com/users/romandev/orgs","repos_url":"https://api.github.com/users/romandev/repos","events_url":"https://api.github.com/users/romandev/events{/privacy}","received_events_url":"https://api.github.com/users/romandev/received_events","type":"User","site_admin":false},"body":"You should split implementation and test into each other files.","created_at":"2014-10-23T14:40:37Z","updated_at":"2014-10-23T14:40:37Z","html_url":"https://github.com/romandev/ds/pull/1#discussion_r19281153","pull_request_url":"https://api.github.com/repos/romandev/ds/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/romandev/ds/pulls/comments/19281153"},"html":{"href":"https://github.com/romandev/ds/pull/1#discussion_r19281153"},"pull_request":{"href":"https://api.github.com/repos/romandev/ds/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/romandev/ds/pulls/1","id":23100567,"html_url":"https://github.com/romandev/ds/pull/1","diff_url":"https://github.com/romandev/ds/pull/1.diff","patch_url":"https://github.com/romandev/ds/pull/1.patch","issue_url":"https://api.github.com/repos/romandev/ds/issues/1","number":1,"state":"open","locked":false,"title":"Stack, Queue","user":{"login":"jukBae","id":9331680,"avatar_url":"https://avatars.githubusercontent.com/u/9331680?v=2","gravatar_id":"","url":"https://api.github.com/users/jukBae","html_url":"https://github.com/jukBae","followers_url":"https://api.github.com/users/jukBae/followers","following_url":"https://api.github.com/users/jukBae/following{/other_user}","gists_url":"https://api.github.com/users/jukBae/gists{/gist_id}","starred_url":"https://api.github.com/users/jukBae/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jukBae/subscriptions","organizations_url":"https://api.github.com/users/jukBae/orgs","repos_url":"https://api.github.com/users/jukBae/repos","events_url":"https://api.github.com/users/jukBae/events{/privacy}","received_events_url":"https://api.github.com/users/jukBae/received_events","type":"User","site_admin":false},"body":"Implement stack, queue","created_at":"2014-10-21T16:54:26Z","updated_at":"2014-10-23T14:40:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"654f82dabb8935a07572470649eda03802f65bb8","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/romandev/ds/pulls/1/commits","review_comments_url":"https://api.github.com/repos/romandev/ds/pulls/1/comments","review_comment_url":"https://api.github.com/repos/romandev/ds/pulls/comments/{number}","comments_url":"https://api.github.com/repos/romandev/ds/issues/1/comments","statuses_url":"https://api.github.com/repos/romandev/ds/statuses/c591c88743dc8a3bfbca2b1f8e0be0778d909b40","head":{"label":"jukBae:master","ref":"master","sha":"c591c88743dc8a3bfbca2b1f8e0be0778d909b40","user":{"login":"jukBae","id":9331680,"avatar_url":"https://avatars.githubusercontent.com/u/9331680?v=2","gravatar_id":"","url":"https://api.github.com/users/jukBae","html_url":"https://github.com/jukBae","followers_url":"https://api.github.com/users/jukBae/followers","following_url":"https://api.github.com/users/jukBae/following{/other_user}","gists_url":"https://api.github.com/users/jukBae/gists{/gist_id}","starred_url":"https://api.github.com/users/jukBae/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jukBae/subscriptions","organizations_url":"https://api.github.com/users/jukBae/orgs","repos_url":"https://api.github.com/users/jukBae/repos","events_url":"https://api.github.com/users/jukBae/events{/privacy}","received_events_url":"https://api.github.com/users/jukBae/received_events","type":"User","site_admin":false},"repo":{"id":25534055,"name":"ds","full_name":"jukBae/ds","owner":{"login":"jukBae","id":9331680,"avatar_url":"https://avatars.githubusercontent.com/u/9331680?v=2","gravatar_id":"","url":"https://api.github.com/users/jukBae","html_url":"https://github.com/jukBae","followers_url":"https://api.github.com/users/jukBae/followers","following_url":"https://api.github.com/users/jukBae/following{/other_user}","gists_url":"https://api.github.com/users/jukBae/gists{/gist_id}","starred_url":"https://api.github.com/users/jukBae/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jukBae/subscriptions","organizations_url":"https://api.github.com/users/jukBae/orgs","repos_url":"https://api.github.com/users/jukBae/repos","events_url":"https://api.github.com/users/jukBae/events{/privacy}","received_events_url":"https://api.github.com/users/jukBae/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jukBae/ds","description":"","fork":true,"url":"https://api.github.com/repos/jukBae/ds","forks_url":"https://api.github.com/repos/jukBae/ds/forks","keys_url":"https://api.github.com/repos/jukBae/ds/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jukBae/ds/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jukBae/ds/teams","hooks_url":"https://api.github.com/repos/jukBae/ds/hooks","issue_events_url":"https://api.github.com/repos/jukBae/ds/issues/events{/number}","events_url":"https://api.github.com/repos/jukBae/ds/events","assignees_url":"https://api.github.com/repos/jukBae/ds/assignees{/user}","branches_url":"https://api.github.com/repos/jukBae/ds/branches{/branch}","tags_url":"https://api.github.com/repos/jukBae/ds/tags","blobs_url":"https://api.github.com/repos/jukBae/ds/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jukBae/ds/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jukBae/ds/git/refs{/sha}","trees_url":"https://api.github.com/repos/jukBae/ds/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jukBae/ds/statuses/{sha}","languages_url":"https://api.github.com/repos/jukBae/ds/languages","stargazers_url":"https://api.github.com/repos/jukBae/ds/stargazers","contributors_url":"https://api.github.com/repos/jukBae/ds/contributors","subscribers_url":"https://api.github.com/repos/jukBae/ds/subscribers","subscription_url":"https://api.github.com/repos/jukBae/ds/subscription","commits_url":"https://api.github.com/repos/jukBae/ds/commits{/sha}","git_commits_url":"https://api.github.com/repos/jukBae/ds/git/commits{/sha}","comments_url":"https://api.github.com/repos/jukBae/ds/comments{/number}","issue_comment_url":"https://api.github.com/repos/jukBae/ds/issues/comments/{number}","contents_url":"https://api.github.com/repos/jukBae/ds/contents/{+path}","compare_url":"https://api.github.com/repos/jukBae/ds/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jukBae/ds/merges","archive_url":"https://api.github.com/repos/jukBae/ds/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jukBae/ds/downloads","issues_url":"https://api.github.com/repos/jukBae/ds/issues{/number}","pulls_url":"https://api.github.com/repos/jukBae/ds/pulls{/number}","milestones_url":"https://api.github.com/repos/jukBae/ds/milestones{/number}","notifications_url":"https://api.github.com/repos/jukBae/ds/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jukBae/ds/labels{/name}","releases_url":"https://api.github.com/repos/jukBae/ds/releases{/id}","created_at":"2014-10-21T16:47:55Z","updated_at":"2014-10-21T16:52:19Z","pushed_at":"2014-10-22T17:53:30Z","git_url":"git://github.com/jukBae/ds.git","ssh_url":"git@github.com:jukBae/ds.git","clone_url":"https://github.com/jukBae/ds.git","svn_url":"https://github.com/jukBae/ds","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":"C++","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":"romandev:master","ref":"master","sha":"94fa9161aef5d225324007df33ec40e8510c2957","user":{"login":"romandev","id":1106770,"avatar_url":"https://avatars.githubusercontent.com/u/1106770?v=2","gravatar_id":"","url":"https://api.github.com/users/romandev","html_url":"https://github.com/romandev","followers_url":"https://api.github.com/users/romandev/followers","following_url":"https://api.github.com/users/romandev/following{/other_user}","gists_url":"https://api.github.com/users/romandev/gists{/gist_id}","starred_url":"https://api.github.com/users/romandev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/romandev/subscriptions","organizations_url":"https://api.github.com/users/romandev/orgs","repos_url":"https://api.github.com/users/romandev/repos","events_url":"https://api.github.com/users/romandev/events{/privacy}","received_events_url":"https://api.github.com/users/romandev/received_events","type":"User","site_admin":false},"repo":{"id":25533837,"name":"ds","full_name":"romandev/ds","owner":{"login":"romandev","id":1106770,"avatar_url":"https://avatars.githubusercontent.com/u/1106770?v=2","gravatar_id":"","url":"https://api.github.com/users/romandev","html_url":"https://github.com/romandev","followers_url":"https://api.github.com/users/romandev/followers","following_url":"https://api.github.com/users/romandev/following{/other_user}","gists_url":"https://api.github.com/users/romandev/gists{/gist_id}","starred_url":"https://api.github.com/users/romandev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/romandev/subscriptions","organizations_url":"https://api.github.com/users/romandev/orgs","repos_url":"https://api.github.com/users/romandev/repos","events_url":"https://api.github.com/users/romandev/events{/privacy}","received_events_url":"https://api.github.com/users/romandev/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/romandev/ds","description":"","fork":false,"url":"https://api.github.com/repos/romandev/ds","forks_url":"https://api.github.com/repos/romandev/ds/forks","keys_url":"https://api.github.com/repos/romandev/ds/keys{/key_id}","collaborators_url":"https://api.github.com/repos/romandev/ds/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/romandev/ds/teams","hooks_url":"https://api.github.com/repos/romandev/ds/hooks","issue_events_url":"https://api.github.com/repos/romandev/ds/issues/events{/number}","events_url":"https://api.github.com/repos/romandev/ds/events","assignees_url":"https://api.github.com/repos/romandev/ds/assignees{/user}","branches_url":"https://api.github.com/repos/romandev/ds/branches{/branch}","tags_url":"https://api.github.com/repos/romandev/ds/tags","blobs_url":"https://api.github.com/repos/romandev/ds/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/romandev/ds/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/romandev/ds/git/refs{/sha}","trees_url":"https://api.github.com/repos/romandev/ds/git/trees{/sha}","statuses_url":"https://api.github.com/repos/romandev/ds/statuses/{sha}","languages_url":"https://api.github.com/repos/romandev/ds/languages","stargazers_url":"https://api.github.com/repos/romandev/ds/stargazers","contributors_url":"https://api.github.com/repos/romandev/ds/contributors","subscribers_url":"https://api.github.com/repos/romandev/ds/subscribers","subscription_url":"https://api.github.com/repos/romandev/ds/subscription","commits_url":"https://api.github.com/repos/romandev/ds/commits{/sha}","git_commits_url":"https://api.github.com/repos/romandev/ds/git/commits{/sha}","comments_url":"https://api.github.com/repos/romandev/ds/comments{/number}","issue_comment_url":"https://api.github.com/repos/romandev/ds/issues/comments/{number}","contents_url":"https://api.github.com/repos/romandev/ds/contents/{+path}","compare_url":"https://api.github.com/repos/romandev/ds/compare/{base}...{head}","merges_url":"https://api.github.com/repos/romandev/ds/merges","archive_url":"https://api.github.com/repos/romandev/ds/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/romandev/ds/downloads","issues_url":"https://api.github.com/repos/romandev/ds/issues{/number}","pulls_url":"https://api.github.com/repos/romandev/ds/pulls{/number}","milestones_url":"https://api.github.com/repos/romandev/ds/milestones{/number}","notifications_url":"https://api.github.com/repos/romandev/ds/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/romandev/ds/labels{/name}","releases_url":"https://api.github.com/repos/romandev/ds/releases{/id}","created_at":"2014-10-21T16:43:13Z","updated_at":"2014-10-21T16:43:13Z","pushed_at":"2014-10-21T16:43:13Z","git_url":"git://github.com/romandev/ds.git","ssh_url":"git@github.com:romandev/ds.git","clone_url":"https://github.com/romandev/ds.git","svn_url":"https://github.com/romandev/ds","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/romandev/ds/pulls/1"},"html":{"href":"https://github.com/romandev/ds/pull/1"},"issue":{"href":"https://api.github.com/repos/romandev/ds/issues/1"},"comments":{"href":"https://api.github.com/repos/romandev/ds/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/romandev/ds/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/romandev/ds/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/romandev/ds/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/romandev/ds/statuses/c591c88743dc8a3bfbca2b1f8e0be0778d909b40"}}}}