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
refactor: 给部分代码添加注释 #37
refactor: 给部分代码添加注释 #37
Conversation
d9cc2c0
to
d99afbe
Compare
} | ||
private final static Logger log = LoggerFactory.getLogger(ICheckServiceImpl.class); | ||
/** | ||
* unicode 编码中,中文字符占两个字节,因此文本最大长度设为2000而非1000 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个正确吗?我调试来看获取的长度是正确的,并没有*2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
不知道,我没改这里的代码🤔如果没有乘2的话那么related的长度是不是也不用除以2了?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2000是因为我设置的就是2000,想要和前端统一的话改成1000就好了()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
改了
2c5d87b
to
e988dcb
Compare
e988dcb
to
659266d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
look very good to me😘
} | ||
return stringSegs; | ||
} | ||
static List<String> getStringSegs(String s) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
此函数使用滑动窗口将字符串分段以便比较,用到的地方就是两个文本段相同部分的标记(compareArticle函数)。可以换成新的算法来标记(前端用上了)。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
注释加上了。
可以换成新的算法来标记(前端用上了)。
这个怎么说?
659266d
to
54f9f49
Compare
根据 #35 的editorconfig文件更改了大部分代码缩进
给 ArticleCompareUtil 添加注释,把 main 的测试移到 test 目录下做单元测试
把工具类的 main 测试移动到 test 目录下
给 ICheckService 和 ICheckServiceImpl 添加注释,并调整了部分写法
将部分类或者函数的注释改成javadoc格式的注释
给 LeaderBoard 添加了注释并调整了部分写法