Cody

Peng Liu

9
Rank
21
Badges
24095
Score
1 – 50 of 3,317

Peng Liu received Likeable badge for Problem 44345. MATLAB Counter

on 24 Jan 2019

Peng Liu submitted a Comment to Solution 1685833

Don't be confused by the name "str2num", which might give you a wrong impression that this function only works for str to number conversion. In fact, it is more powerful because it supports evaluation of any valid string or character represented MATLAB expressions in much the same way eval does. The underlying implementation of str2num is indeed based on eval. Check the documentation and source file for more details.

on 18 Dec 2018

Peng Liu submitted a Comment to Solution 1075259

Your are right. Among the "missing" family, standardizeMissing and ismissing were introduced in R2013b, whereas others such as rmmissing and fillmissing were introduced in R2016b.

on 25 Oct 2018

Peng Liu received Project Euler I Master badge

on 11 Sep 2018

Peng Liu submitted a Comment to Problem 43670. Words Count: A String Array Approach

Thank you for your interest. Cody is already powered by the newest R2018a. It might be be a good time to start a R2018a challenge group :)

on 1 Apr 2018

Peng Liu submitted a Comment to Problem 44417. 英語の文章内の母音を取り除くコードを書きましょう。

FYI, Cody Coursework is here: https://www.mathworks.com/help/coursework/cody-coursework-for-instructors.html

on 27 Nov 2017

Peng Liu submitted a Comment to Problem 44417. 英語の文章内の母音を取り除くコードを書きましょう。

Could you please stop translating existing Cody problems into Japanese? I might be too harsh on this, but you are ruining Cody in a way that the majority Cody players here cannot read Japanese. If you are teaching a MATLAB course in Japanese, I recommend you to start your course on Cody Coursework, where you can create your own problems in whatever languages you like.

on 27 Nov 2017

Peng Liu submitted a Comment to Solution 1351541

Many thanks Alfonso for your suggestion. I was just thinking if I can ban a persistent cheater based on the player id. What you suggested is exactly what I need. If this guy cheats one more time (which is getting harder now with my added pcode in the test suite), I will definitely ban the guy using your suggested code.

on 21 Nov 2017

Peng Liu submitted a Comment to Solution 1351541

Banned cheater solution.

on 21 Nov 2017

Peng Liu submitted a Comment to Solution 1351007

What's the point to keep cheating?

on 20 Nov 2017

Peng Liu submitted a Comment to Solution 1350563

Dis-allowed.

on 20 Nov 2017

Peng Liu submitted a Comment to Solution 1349442

Hard-coded solutions are disallowed.

on 19 Nov 2017

Peng Liu submitted a Comment to Solution 1328026

Tests #7 and 8 involved an 0*0 array [] as the index, which is an extreme case where MATLAB returns nothing without issuing any error. Since no error occurs in the try block, the program flow does not enter the catch block. Hope this helps.

on 9 Nov 2017

Peng Liu submitted a Comment to Solution 1328026

For the non-integer test cases #3 and #6, it is the subscript indexing error that was catched in your ans{index} indexing statement (because subscript index has to be either positive integer or logical).

on 8 Nov 2017

Peng Liu submitted a Comment to Solution 1328026

Because a comma separated list cannot be assigned to a single variable, this is how your previous solution catched the assignment error and triggered the catch statement (as desired). However, what you did here is only to generate a comma separated list without any assignment, and thus, no assignment error occurs which cannot trigger the catch statement.

on 7 Nov 2017

Peng Liu submitted a Comment to Problem 44390. Test your luck!

Your testsuite is broken.

on 4 Nov 2017

Peng Liu submitted a Comment to Problem 43708. Replace all odd numbers with NaN

@David I agree with you that there is no dedicated channel for reporting Cody bugs, and your idea of Cody-specific discussion forum is awesome. The unable to "delete", unable to "unlike" are longstanding bugs for more than a year now. I hope this should catch the Cody term's attention.

on 3 Nov 2017

Peng Liu submitted a Comment to Problem 44374. Tautology

Having said that, I would raise suggestion to the Cody team that whenever a problem is updated and rescored, all solvers, or at least the solvers whose solutions failed the new tests, should be notified.

on 3 Nov 2017

Peng Liu submitted a Comment to Problem 44374. Tautology

@James. Thank you for your explanation, and I do appreciate. I don't have problems with Jan's approach which gradually reinforces the testsuite and makes the problem harder and harder. In fact, all he did was just addressing all raised comments from the solvers side (thus, nothing to blame here). But I personally hesitated to make such significant changes on my own problem once it is published in the Cody5 anniversary group, because solvers are not notified when their solutions failed the new added test cases. If solvers do not come back to check themselves, they would never know and hence miss the opportunity to complete the problem. Taking my own problem as an exmaple (https://www.mathworks.com/matlabcentral/cody/problems/44353), I did receive a comment on whether there exists a way to make the resolution of the solution map better. I do have a simple way to address this comment by truncating the extremely large solution size to a smaller upper limit (say 100) which would lead to much higher resolution on the solution map. But I didn't do so because it may change the current ranking of the solutions (as the solutions in my problem are measured by runtime speed, which may vary in different runs). I don't want to disappoint any solvers to my problems, so I didn't make any changes to my test suite. I do understand the dilemma here because it is extremely hard to make a perfect test suite for a hard problem, which is perhaps much harder than solving the problem.

on 3 Nov 2017

Peng Liu submitted a Comment to Problem 44374. Tautology

@James. Blame me for the "more than 2 variables" comment? Absolutely nonsense! Commenting is one of Cody's core features which allows players, i.e., ALL OF US, to effectively discuss, share, and communicate on any aspects of a problem or solution, and this is how us players help to make Cody an exciting world. Remember that "Comment on any problem or solution" is the 5th top feature appearing in the definition of Cody (https://www.mathworks.com/matlabcentral/about/cody/) .

on 3 Nov 2017

1 – 50 of 3,317