A
不重叠区间

- 编译错那个就不输了,copy错了,还没点运行
最主要是第二次解答错误,搞不明白了有点,所以看了一些题解,发现好多人也没说清楚,最主要其实是为了避免重叠,应该选区间比较小的那个才对
- 这么个考量,排序时候是否排序区间另一个边界确实没啥意义的感觉
- 说清楚的感觉是这个
R
PMD - Best Practices
不是PMD rules中的 Best Practices,而是指PMD本身,也就是静态代码扫描的 Best Practices
Choose the rules that are right for you
Running every existing rule will result in a huge number of rule violations, most of which will be unimportant. Having to sort through a thousand line report to find the few you’re really interested in takes all the fun out of things.
Instead, start with some selected specific rules, e.g. the rules that detect unused code from the category Best Practices and fix any unused locals and fields.
Then, run rules, that detect empty
ifstatements and such-like. You can find these rules in the category Error Prone.After that, look at all the categories and select the rules, that are useful for your project. You can find an overview of the rules on the Rule Index.
Use the rules you like via a custom ruleset.
选择那些适合你的规则
运行每一个存在的规则将会产生大量的规则违例的结果,这其中绝大多数没那么重要。不得不去整理那数千行的报告找到你真正感兴趣的会把所有乐趣都耗尽。
相对的,从选择一些特定的规则开始,例如最佳实践目录中检查没有使用的代码,并且处理那些没有使用的本地变量和字段
然后,运行那些检查那些类似空的if条件的这样的规则。你可以从错误倾向类别中找到这些规则
再然后,通览所有的类别并且选择那些对于你的项目来说有用的规则。你可以从规则目录中的到这些规则的概览
通过定制ruleset来使用那些你想要的规则
好像不算个啥,确实就是这么干的
PMD rules are not set in stone
Generally, pick the ones you like, and ignore or suppress the warnings you don’t like. It’s just a tool.
PMD 的规则不是一成不变的
通常,选择您喜欢的警告,忽略或抑制您不喜欢的警告。它只是一个工具。
总的来说,不是特别的同意,这个工具就是来帮助发现潜在问题的,忽略或者抑制它?总得有更合适的理由,而不能仅仅因为我是否like吧?否则我用它还干嘛
PMD IDE plugins are nice
Using PMD within your IDE is much more enjoyable than flipping back and forth between an HTML report and your IDE. Most IDE plugins have the “click on the rule violation and jump to that line of code” feature. Find the PMD plugin for your IDE, install it, and soon you’ll be fixing problems much faster.
Suggestions? Comments? Post them here. Thanks!
PMD IDE插件不错
在IDE中使用PMD比一个HTML report有意思得多。绝大多数的IDE插件有点击规则缺陷并且跳到改行代码的功能。找到一个你的IDE的插件,安装,接着你就能更快的修复问题
建议?注释,发到这来。谢谢!
还好吧,看是怎么应用这个东西,如果都这么自觉,其实IDE自己的提示(没装插件之前的)可能也已经够了
T
Apple Music CONTENT_EQUIVALENT
- 刚知道 apple music 有个网页版,对于最近又进一步崇洋媚外的我是个利好,虽然晚了点
- 但是登录打开发现无法播放

搜索得知需要浏览器隐私设置调整一下
S
code analysis
-
- 自尊自律
- 把规则当突破自身现有边界的机会
