Skip to content

Add an option for user to retrieve recent submission in certain programming language #33

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

Closed
wants to merge 5 commits into from

Conversation

lejiati
Copy link

@lejiati lejiati commented Jun 1, 2017

  1. Add an option for user to get a previous submission in a certain language.
  2. Change one behavior: when user chose a language and there are no accepted submission, program returns the most non accepted submission in this language rather than the "global" recent.
  3. Fix bug: When user select a language and the most submission in this language is accepted while the "global" latest submission is not accepted, the program will create an accepted copy with 'notac' in filename.

Jiati Le added 3 commits May 31, 2017 22:39
…recent submission in requried programming language, if no submissino in required language, an error will be printed. If no language is specified, program will retrive retrive most recent accepted submission.
…ed submission, program will return the most recent non accepted submission in this language
… which language we use. When user specified a language, the status should be related to the latest submission in this language rather than problem
@skygragon
Copy link
Owner

@timle1029 Thanks for pulling. Could you please merge those 3 patches into single one? basically you can use git rebase -i HEAD^^^ and squash them into one.

if (argv.lang === 'all') {
return true;
}
return argv.lang === x.lang;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could use one line to do the same:

return argv.lang === 'all' || argv.lang === x.lang;

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for suggestion! I'll replace them with this one line statement.
I'm sorry that I might mess up this pull request with too many commits, seems that I made a mistake during rebase. I would like to close this PR and make a new PR with one commit.
Sorry for the inconvenience.

Jiati Le added 2 commits June 1, 2017 01:25
…ed submission, program will return the most recent non accepted submission in this language (+2 squashed commits)

Squashed commits:
[7150f97] bug-fix: problem state is related to the latest submission regardless which language we use. When user specified a language, the status should be related to the latest submission in this language rather than problem
[6fdb72f] simplify code
@lejiati lejiati closed this Jun 1, 2017
tainenko pushed a commit to tainenko/leetcode-cli that referenced this pull request Jan 30, 2020
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