GitHub PullRequestReviewCommentEvent at 2014-11-26 14:14:36
Repository: 05_Hashing_Lab
Actor: brinkmwj
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/MiamiOH-CSE274/05_Hashing_Lab/pulls/comments/20936538","id":20936538,"diff_hunk":"@@ -71,10 +70,124 @@ class HashTable : public USet <Key, T> {\n   unsigned long numItems; //Number of items in the hash table\n \n   //Note: Ordinarily, these OUGHT to be private. In this case I have\n-  // made them public for easy of testing.\n+  // made them public for ease of testing.\n  public:\n   unsigned long numRemoved; //Number of slots that have been removed but not re-used. Those that have isDel == true\n   unsigned long backingArraySize;\n+  unsigned \tint prime;\n };\n \n-#include \"HashTable.ipp\"\n+\n+\n+\n+\n+\n+\n+//CONTENTS OF THE IPP FILE\n+\n+\n+\n+\n+\n+\n+\n+//You will need this so you can make a string to throw in\n+// remove\n+#include <string>\n+\n+template <class Key, class T>\n+HashTable<Key, T>::HashTable(){\n+\tprime = 0;\n+\tT* backingArray = New T[hashPrimes[prime]];\n+\tbackingArraySize = numItems;\n+\tnumRemoved = 0;\n+\tfor (unsigned int x = 0; x < hashPrimes[prime]; x++){\n+\t\tbackingArray[x].isNull = true;\n+\t}\n+}\n+\n+template <class Key, class T>\n+HashTable<Key, T>::~HashTable() {\n+\tfor (unsigned int x = 0; x < hashPrimes[prime]; x++){\n+\tdelete backingArray[x];\n+\t}\n+\tbackingArray = NULL;\n+}\n+\n+template <class Key, class T>\n+unsigned long HashTable<Key, T>::calcIndex(Key k){\n+\tif (backingArray[k%backingArraySize].isNull == true || backingArray[k%backingArraySize].isDel == true){\n+\t\treturn numItems;\n+\t}\n+\telse if (backingArray[k%backingArraySize].isNull == false && backingArray[k%backingArraySize].isDel == false){\n+\t\treturn k;\n+\t}\n+\treturn numItems; //This indicates failure, since it is an impossible value\n+}\n+\n+template <class Key, class T>\n+void HashTable<Key, T>::add(Key k, T x){\n+\tnumItems++;\n+\tif(numItems + numRemoved >= backingArraySize){\n+\t\tgrow();\n+\t} else if(backingArray[k%backingArraySize].isNull == false && backingArray[k%backingArraySize].isDel == false){","path":"HashTable.h","position":74,"original_position":74,"commit_id":"16d9464fe07dd34c1965effbd3242158a56b6e38","original_commit_id":"16d9464fe07dd34c1965effbd3242158a56b6e38","user":{"login":"brinkmwj","id":591376,"avatar_url":"https://avatars.githubusercontent.com/u/591376?v=3","gravatar_id":"","url":"https://api.github.com/users/brinkmwj","html_url":"https://github.com/brinkmwj","followers_url":"https://api.github.com/users/brinkmwj/followers","following_url":"https://api.github.com/users/brinkmwj/following{/other_user}","gists_url":"https://api.github.com/users/brinkmwj/gists{/gist_id}","starred_url":"https://api.github.com/users/brinkmwj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brinkmwj/subscriptions","organizations_url":"https://api.github.com/users/brinkmwj/orgs","repos_url":"https://api.github.com/users/brinkmwj/repos","events_url":"https://api.github.com/users/brinkmwj/events{/privacy}","received_events_url":"https://api.github.com/users/brinkmwj/received_events","type":"User","site_admin":false},"body":"Again, need to do probing to find the correct space. Would be best to fix calcIndex and then use it here.","created_at":"2014-11-26T14:14:36Z","updated_at":"2014-11-26T14:14:36Z","html_url":"https://github.com/MiamiOH-CSE274/05_Hashing_Lab/pull/40#discussion_r20936538","pull_request_url":"https://api.github.com/repos/MiamiOH-CSE274/05_Hashing_Lab/pulls/40","_links":{"self":{"href":"https://api.github.com/repos/MiamiOH-CSE274/05_Hashing_Lab/pulls/comments/20936538"},"html":{"href":"https://github.com/MiamiOH-CSE274/05_Hashing_Lab/pull/40#discussion_r20936538"},"pull_request":{"href":"https://api.github.com/repos/MiamiOH-CSE274/05_Hashing_Lab/pulls/40"}}},"pull_request":{"url":"https://api.github.com/repos/MiamiOH-CSE274/05_Hashing_Lab/pulls/40","id":22293224,"html_url":"https://github.com/MiamiOH-CSE274/05_Hashing_Lab/pull/40","diff_url":"https://github.com/MiamiOH-CSE274/05_Hashing_Lab/pull/40.diff","patch_url":"https://github.com/MiamiOH-CSE274/05_Hashing_Lab/pull/40.patch","issue_url":"https://api.github.com/repos/MiamiOH-CSE274/05_Hashing_Lab/issues/40","number":40,"state":"open","locked":false,"title":"Homework 5 Solutions","user":{"login":"clarkdb","id":8559039,"avatar_url":"https://avatars.githubusercontent.com/u/8559039?v=3","gravatar_id":"","url":"https://api.github.com/users/clarkdb","html_url":"https://github.com/clarkdb","followers_url":"https://api.github.com/users/clarkdb/followers","following_url":"https://api.github.com/users/clarkdb/following{/other_user}","gists_url":"https://api.github.com/users/clarkdb/gists{/gist_id}","starred_url":"https://api.github.com/users/clarkdb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/clarkdb/subscriptions","organizations_url":"https://api.github.com/users/clarkdb/orgs","repos_url":"https://api.github.com/users/clarkdb/repos","events_url":"https://api.github.com/users/clarkdb/events{/privacy}","received_events_url":"https://api.github.com/users/clarkdb/received_events","type":"User","site_admin":false},"body":"","created_at":"2014-10-06T15:45:13Z","updated_at":"2014-11-26T14:14:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6e79159f26d631d66183cb61d262eda50ffa48a4","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/MiamiOH-CSE274/05_Hashing_Lab/pulls/40/commits","review_comments_url":"https://api.github.com/repos/MiamiOH-CSE274/05_Hashing_Lab/pulls/40/comments","review_comment_url":"https://api.github.com/repos/MiamiOH-CSE274/05_Hashing_Lab/pulls/comments/{number}","comments_url":"https://api.github.com/repos/MiamiOH-CSE274/05_Hashing_Lab/issues/40/comments","statuses_url":"https://api.github.com/repos/MiamiOH-CSE274/05_Hashing_Lab/statuses/16d9464fe07dd34c1965effbd3242158a56b6e38","head":{"label":"clarkdb:master","ref":"master","sha":"16d9464fe07dd34c1965effbd3242158a56b6e38","user":{"login":"clarkdb","id":8559039,"avatar_url":"https://avatars.githubusercontent.com/u/8559039?v=3","gravatar_id":"","url":"https://api.github.com/users/clarkdb","html_url":"https://github.com/clarkdb","followers_url":"https://api.github.com/users/clarkdb/followers","following_url":"https://api.github.com/users/clarkdb/following{/other_user}","gists_url":"https://api.github.com/users/clarkdb/gists{/gist_id}","starred_url":"https://api.github.com/users/clarkdb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/clarkdb/subscriptions","organizations_url":"https://api.github.com/users/clarkdb/orgs","repos_url":"https://api.github.com/users/clarkdb/repos","events_url":"https://api.github.com/users/clarkdb/events{/privacy}","received_events_url":"https://api.github.com/users/clarkdb/received_events","type":"User","site_admin":false},"repo":{"id":24724735,"name":"05_Hashing_Lab","full_name":"clarkdb/05_Hashing_Lab","owner":{"login":"clarkdb","id":8559039,"avatar_url":"https://avatars.githubusercontent.com/u/8559039?v=3","gravatar_id":"","url":"https://api.github.com/users/clarkdb","html_url":"https://github.com/clarkdb","followers_url":"https://api.github.com/users/clarkdb/followers","following_url":"https://api.github.com/users/clarkdb/following{/other_user}","gists_url":"https://api.github.com/users/clarkdb/gists{/gist_id}","starred_url":"https://api.github.com/users/clarkdb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/clarkdb/subscriptions","organizations_url":"https://api.github.com/users/clarkdb/orgs","repos_url":"https://api.github.com/users/clarkdb/repos","events_url":"https://api.github.com/users/clarkdb/events{/privacy}","received_events_url":"https://api.github.com/users/clarkdb/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/clarkdb/05_Hashing_Lab","description":"Implement a hash table in C++","fork":true,"url":"https://api.github.com/repos/clarkdb/05_Hashing_Lab","forks_url":"https://api.github.com/repos/clarkdb/05_Hashing_Lab/forks","keys_url":"https://api.github.com/repos/clarkdb/05_Hashing_Lab/keys{/key_id}","collaborators_url":"https://api.github.com/repos/clarkdb/05_Hashing_Lab/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/clarkdb/05_Hashing_Lab/teams","hooks_url":"https://api.github.com/repos/clarkdb/05_Hashing_Lab/hooks","issue_events_url":"https://api.github.com/repos/clarkdb/05_Hashing_Lab/issues/events{/number}","events_url":"https://api.github.com/repos/clarkdb/05_Hashing_Lab/events","assignees_url":"https://api.github.com/repos/clarkdb/05_Hashing_Lab/assignees{/user}","branches_url":"https://api.github.com/repos/clarkdb/05_Hashing_Lab/branches{/branch}","tags_url":"https://api.github.com/repos/clarkdb/05_Hashing_Lab/tags","blobs_url":"https://api.github.com/repos/clarkdb/05_Hashing_Lab/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/clarkdb/05_Hashing_Lab/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/clarkdb/05_Hashing_Lab/git/refs{/sha}","trees_url":"https://api.github.com/repos/clarkdb/05_Hashing_Lab/git/trees{/sha}","statuses_url":"https://api.github.com/repos/clarkdb/05_Hashing_Lab/statuses/{sha}","languages_url":"https://api.github.com/repos/clarkdb/05_Hashing_Lab/languages","stargazers_url":"https://api.github.com/repos/clarkdb/05_Hashing_Lab/stargazers","contributors_url":"https://api.github.com/repos/clarkdb/05_Hashing_Lab/contributors","subscribers_url":"https://api.github.com/repos/clarkdb/05_Hashing_Lab/subscribers","subscription_url":"https://api.github.com/repos/clarkdb/05_Hashing_Lab/subscription","commits_url":"https://api.github.com/repos/clarkdb/05_Hashing_Lab/commits{/sha}","git_commits_url":"https://api.github.com/repos/clarkdb/05_Hashing_Lab/git/commits{/sha}","comments_url":"https://api.github.com/repos/clarkdb/05_Hashing_Lab/comments{/number}","issue_comment_url":"https://api.github.com/repos/clarkdb/05_Hashing_Lab/issues/comments/{number}","contents_url":"https://api.github.com/repos/clarkdb/05_Hashing_Lab/contents/{+path}","compare_url":"https://api.github.com/repos/clarkdb/05_Hashing_Lab/compare/{base}...{head}","merges_url":"https://api.github.com/repos/clarkdb/05_Hashing_Lab/merges","archive_url":"https://api.github.com/repos/clarkdb/05_Hashing_Lab/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/clarkdb/05_Hashing_Lab/downloads","issues_url":"https://api.github.com/repos/clarkdb/05_Hashing_Lab/issues{/number}","pulls_url":"https://api.github.com/repos/clarkdb/05_Hashing_Lab/pulls{/number}","milestones_url":"https://api.github.com/repos/clarkdb/05_Hashing_Lab/milestones{/number}","notifications_url":"https://api.github.com/repos/clarkdb/05_Hashing_Lab/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/clarkdb/05_Hashing_Lab/labels{/name}","releases_url":"https://api.github.com/repos/clarkdb/05_Hashing_Lab/releases{/id}","created_at":"2014-10-02T15:30:38Z","updated_at":"2014-10-03T20:15:16Z","pushed_at":"2014-10-07T21:11:18Z","git_url":"git://github.com/clarkdb/05_Hashing_Lab.git","ssh_url":"git@github.com:clarkdb/05_Hashing_Lab.git","clone_url":"https://github.com/clarkdb/05_Hashing_Lab.git","svn_url":"https://github.com/clarkdb/05_Hashing_Lab","homepage":null,"size":2095,"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":"MiamiOH-CSE274:master","ref":"master","sha":"207f71123514be58478bb249ad81fc0f9e266bbd","user":{"login":"MiamiOH-CSE274","id":1835517,"avatar_url":"https://avatars.githubusercontent.com/u/1835517?v=3","gravatar_id":"","url":"https://api.github.com/users/MiamiOH-CSE274","html_url":"https://github.com/MiamiOH-CSE274","followers_url":"https://api.github.com/users/MiamiOH-CSE274/followers","following_url":"https://api.github.com/users/MiamiOH-CSE274/following{/other_user}","gists_url":"https://api.github.com/users/MiamiOH-CSE274/gists{/gist_id}","starred_url":"https://api.github.com/users/MiamiOH-CSE274/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MiamiOH-CSE274/subscriptions","organizations_url":"https://api.github.com/users/MiamiOH-CSE274/orgs","repos_url":"https://api.github.com/users/MiamiOH-CSE274/repos","events_url":"https://api.github.com/users/MiamiOH-CSE274/events{/privacy}","received_events_url":"https://api.github.com/users/MiamiOH-CSE274/received_events","type":"Organization","site_admin":false},"repo":{"id":11390960,"name":"05_Hashing_Lab","full_name":"MiamiOH-CSE274/05_Hashing_Lab","owner":{"login":"MiamiOH-CSE274","id":1835517,"avatar_url":"https://avatars.githubusercontent.com/u/1835517?v=3","gravatar_id":"","url":"https://api.github.com/users/MiamiOH-CSE274","html_url":"https://github.com/MiamiOH-CSE274","followers_url":"https://api.github.com/users/MiamiOH-CSE274/followers","following_url":"https://api.github.com/users/MiamiOH-CSE274/following{/other_user}","gists_url":"https://api.github.com/users/MiamiOH-CSE274/gists{/gist_id}","starred_url":"https://api.github.com/users/MiamiOH-CSE274/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MiamiOH-CSE274/subscriptions","organizations_url":"https://api.github.com/users/MiamiOH-CSE274/orgs","repos_url":"https://api.github.com/users/MiamiOH-CSE274/repos","events_url":"https://api.github.com/users/MiamiOH-CSE274/events{/privacy}","received_events_url":"https://api.github.com/users/MiamiOH-CSE274/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/MiamiOH-CSE274/05_Hashing_Lab","description":"Implement a hash table in C++","fork":false,"url":"https://api.github.com/repos/MiamiOH-CSE274/05_Hashing_Lab","forks_url":"https://api.github.com/repos/MiamiOH-CSE274/05_Hashing_Lab/forks","keys_url":"https://api.github.com/repos/MiamiOH-CSE274/05_Hashing_Lab/keys{/key_id}","collaborators_url":"https://api.github.com/repos/MiamiOH-CSE274/05_Hashing_Lab/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/MiamiOH-CSE274/05_Hashing_Lab/teams","hooks_url":"https://api.github.com/repos/MiamiOH-CSE274/05_Hashing_Lab/hooks","issue_events_url":"https://api.github.com/repos/MiamiOH-CSE274/05_Hashing_Lab/issues/events{/number}","events_url":"https://api.github.com/repos/MiamiOH-CSE274/05_Hashing_Lab/events","assignees_url":"https://api.github.com/repos/MiamiOH-CSE274/05_Hashing_Lab/assignees{/user}","branches_url":"https://api.github.com/repos/MiamiOH-CSE274/05_Hashing_Lab/branches{/branch}","tags_url":"https://api.github.com/repos/MiamiOH-CSE274/05_Hashing_Lab/tags","blobs_url":"https://api.github.com/repos/MiamiOH-CSE274/05_Hashing_Lab/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/MiamiOH-CSE274/05_Hashing_Lab/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/MiamiOH-CSE274/05_Hashing_Lab/git/refs{/sha}","trees_url":"https://api.github.com/repos/MiamiOH-CSE274/05_Hashing_Lab/git/trees{/sha}","statuses_url":"https://api.github.com/repos/MiamiOH-CSE274/05_Hashing_Lab/statuses/{sha}","languages_url":"https://api.github.com/repos/MiamiOH-CSE274/05_Hashing_Lab/languages","stargazers_url":"https://api.github.com/repos/MiamiOH-CSE274/05_Hashing_Lab/stargazers","contributors_url":"https://api.github.com/repos/MiamiOH-CSE274/05_Hashing_Lab/contributors","subscribers_url":"https://api.github.com/repos/MiamiOH-CSE274/05_Hashing_Lab/subscribers","subscription_url":"https://api.github.com/repos/MiamiOH-CSE274/05_Hashing_Lab/subscription","commits_url":"https://api.github.com/repos/MiamiOH-CSE274/05_Hashing_Lab/commits{/sha}","git_commits_url":"https://api.github.com/repos/MiamiOH-CSE274/05_Hashing_Lab/git/commits{/sha}","comments_url":"https://api.github.com/repos/MiamiOH-CSE274/05_Hashing_Lab/comments{/number}","issue_comment_url":"https://api.github.com/repos/MiamiOH-CSE274/05_Hashing_Lab/issues/comments/{number}","contents_url":"https://api.github.com/repos/MiamiOH-CSE274/05_Hashing_Lab/contents/{+path}","compare_url":"https://api.github.com/repos/MiamiOH-CSE274/05_Hashing_Lab/compare/{base}...{head}","merges_url":"https://api.github.com/repos/MiamiOH-CSE274/05_Hashing_Lab/merges","archive_url":"https://api.github.com/repos/MiamiOH-CSE274/05_Hashing_Lab/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/MiamiOH-CSE274/05_Hashing_Lab/downloads","issues_url":"https://api.github.com/repos/MiamiOH-CSE274/05_Hashing_Lab/issues{/number}","pulls_url":"https://api.github.com/repos/MiamiOH-CSE274/05_Hashing_Lab/pulls{/number}","milestones_url":"https://api.github.com/repos/MiamiOH-CSE274/05_Hashing_Lab/milestones{/number}","notifications_url":"https://api.github.com/repos/MiamiOH-CSE274/05_Hashing_Lab/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/MiamiOH-CSE274/05_Hashing_Lab/labels{/name}","releases_url":"https://api.github.com/repos/MiamiOH-CSE274/05_Hashing_Lab/releases{/id}","created_at":"2013-07-13T16:48:12Z","updated_at":"2014-11-04T17:59:12Z","pushed_at":"2013-12-14T18:10:05Z","git_url":"git://github.com/MiamiOH-CSE274/05_Hashing_Lab.git","ssh_url":"git@github.com:MiamiOH-CSE274/05_Hashing_Lab.git","clone_url":"https://github.com/MiamiOH-CSE274/05_Hashing_Lab.git","svn_url":"https://github.com/MiamiOH-CSE274/05_Hashing_Lab","homepage":null,"size":1702,"stargazers_count":1,"watchers_count":1,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":42,"mirror_url":null,"open_issues_count":18,"forks":42,"open_issues":18,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/MiamiOH-CSE274/05_Hashing_Lab/pulls/40"},"html":{"href":"https://github.com/MiamiOH-CSE274/05_Hashing_Lab/pull/40"},"issue":{"href":"https://api.github.com/repos/MiamiOH-CSE274/05_Hashing_Lab/issues/40"},"comments":{"href":"https://api.github.com/repos/MiamiOH-CSE274/05_Hashing_Lab/issues/40/comments"},"review_comments":{"href":"https://api.github.com/repos/MiamiOH-CSE274/05_Hashing_Lab/pulls/40/comments"},"review_comment":{"href":"https://api.github.com/repos/MiamiOH-CSE274/05_Hashing_Lab/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/MiamiOH-CSE274/05_Hashing_Lab/pulls/40/commits"},"statuses":{"href":"https://api.github.com/repos/MiamiOH-CSE274/05_Hashing_Lab/statuses/16d9464fe07dd34c1965effbd3242158a56b6e38"}}}}