摘要: https://stackoverflow.com/questions/5745721/automatically-generating-java-source-code https://www.cs.odu.edu/~zeil/cs330/latest/CS382/translating/inde 阅读全文
posted @ 2022-01-21 21:55 rxh1999 阅读(24) 评论(0) 推荐(0)
摘要: 为什么要手动生成代码? 当生成代码是最优选择的时候,那么整个系统必然在某些地方有问题。 可能是开发者的代码水平缺陷 可能是编程语言设计缺陷 可能是框架缺陷 开发者的代码水平缺陷 你的代码的维护者只拥有平均的技能水平。 语言缺陷 比如java的equals和hashCode方法,重写它们实在太标准了以 阅读全文
posted @ 2022-01-21 21:54 rxh1999 阅读(39) 评论(0) 推荐(0)
摘要: 第二章. Java虚拟机的结构 这篇文章定义了一个抽象的java虚拟机。不包含任何的具体实现。 为了正确地实现一个java虚拟机,你只需要正确地解析class文件并且正确地执行文件定义的操作。不属于java虚拟机定义的实现细节将不必要地限制实现者的创造力。比如,运行时数据区的内存布局,使用的垃圾回收 阅读全文
posted @ 2022-01-18 00:40 rxh1999 阅读(50) 评论(0) 推荐(0)
摘要: Teach Yourself Programming in Ten Years[21/09/19][21/09/30] 阅读全文
posted @ 2021-09-19 10:28 rxh1999 阅读(12) 评论(0) 推荐(0)
摘要: 获取Class instance.getClass() person.getClass() byte[] bytes = new byte[1024]; bytes.getClass(); primitive.class boolean.class int[][].class Class.forNa 阅读全文
posted @ 2021-08-26 21:51 rxh1999 阅读(17) 评论(0) 推荐(0)
摘要: 预备知识 阳历(Solar Calendar), 根据地球围绕太阳公转轨道位置制定的历法 阴历(Lunar Calendar),按照月亮的月相周期制定的历法 阴阳历,朔望月指示月球的相位,年则与太阳有关 农历(Chinese Calendar),是中国使用的阴阳历,也称黄历,夏历 格里历(Grego 阅读全文
posted @ 2021-06-30 15:40 rxh1999 阅读(79) 评论(0) 推荐(0)
摘要: 修改CMakeLists.txt cmake_minimum_required(VERSION 3.17) project(codeforces) set(CMAKE_CXX_STANDARD 20) #add_executable(codeforces main.cpp) # 遍历项目根目录下所有 阅读全文
posted @ 2021-04-02 13:16 rxh1999 阅读(313) 评论(0) 推荐(0)
摘要: 参考文献: http://www.cplusplus.com/reference/algorithm/lower_bound/ http://www.cplusplus.com/reference/algorithm/upper_bound/ 两个comp函数的参数位置是不同的,不能直接使用一个co 阅读全文
posted @ 2021-04-02 11:30 rxh1999 阅读(282) 评论(0) 推荐(0)
摘要: [52. N皇后 II](https://leetcode-cn.com/problems/n-queens-ii/) 给同学讲一下思考dfs的方法论 ## 1. 思考dfs每个状态的含义 dfs(row)代表当前在第row+1行放置皇后 ```cpp class Solution { public 阅读全文
posted @ 2021-04-01 19:32 rxh1999 阅读(178) 评论(0) 推荐(0)
摘要: [88. 合并两个有序数组](https://leetcode-cn.com/problems/merge-sorted-array/) 双指针,从后向前做 ```cpp class Solution { public: void merge(vector& nums1, int m, vector 阅读全文
posted @ 2021-04-01 16:26 rxh1999 阅读(34) 评论(0) 推荐(0)