Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix off-by-one issue with paging #97

Merged
merged 2 commits into from
Aug 1, 2023
Merged

Conversation

spencerchubb
Copy link
Contributor

This pull request only changes one line.

It also addresses issue #87 which was opened a year ago.

The issue arises if you try to get a user who is an exact multiple of 20 (note that 20 is the page size). For example, the 100th user should get page 81-100, but instead gets 101-120

For example, look at the sum of ranks page and enter 2011SBAH01. He should be the 100th user, but instead it shows #101-120

@campos20
Copy link
Member

I don't think that this solves the issue as it changes the behavior for all the cases, including the one that is currently working. Do you have some time do debug this issue? We can do a screen share.

@spencerchubb
Copy link
Contributor Author

Yes I'll email you

@campos20
Copy link
Member

campos20 commented Aug 1, 2023

I still want to use the call with screen share (pretty much because I want to see how easy/not easy this project is for other people to run this, but I checked and the correct fix is to change this line to

floor((region_rank-1) / :PAGE_SIZE)

@campos20 campos20 merged commit d5163c7 into thewca:main Aug 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants