{"id":93,"date":"2026-01-29T15:59:58","date_gmt":"2026-01-29T07:59:58","guid":{"rendered":"http:\/\/47.100.165.17\/wordpress\/?page_id=93"},"modified":"2026-01-30T15:56:18","modified_gmt":"2026-01-30T07:56:18","slug":"%e8%81%94%e7%b3%bb%e6%88%91","status":"publish","type":"page","link":"https:\/\/yunyanglib.cn\/?page_id=93","title":{"rendered":"\u521b\u4f5c\u65f6\u95f4\u7ebf"},"content":{"rendered":"<div class=\"custom-timeline-container\"><div class=\"custom-timeline\"><div class=\"timeline-item\"><div class=\"timeline-dot\"><\/div><div class=\"timeline-date\">2026\u5e7405\u670828\u65e5<\/div><div class=\"timeline-content\"><h5><a href=\"https:\/\/yunyanglib.cn\/?p=1505\" target=\"_blank\">\u7b2c 133 \u7bc7\uff1a\u3010Java\u3011\u5b57\u8282\u6d41\u8be6\u89e3<\/a><\/h5><\/div><\/div><div class=\"timeline-item\"><div class=\"timeline-dot\"><\/div><div class=\"timeline-date\">2026\u5e7405\u670827\u65e5<\/div><div class=\"timeline-content\"><h5><a href=\"https:\/\/yunyanglib.cn\/?p=1490\" target=\"_blank\">\u7b2c 132 \u7bc7\uff1a\u3010Java\u3011\u6587\u4ef6\u7c7b\u8be6\u89e3\uff1a\u4ece\u57fa\u7840\u64cd\u4f5c\u5230\u5de5\u5177\u7c7b\u5b9e\u6218<\/a><\/h5><\/div><\/div><div class=\"timeline-item\"><div class=\"timeline-dot\"><\/div><div class=\"timeline-date\">2026\u5e7405\u670822\u65e5<\/div><div class=\"timeline-content\"><h5><a href=\"https:\/\/yunyanglib.cn\/?p=1457\" target=\"_blank\">\u7b2c 131 \u7bc7\uff1a\u3010Java\u3011Java IO \u77e5\u8bc6\u4f53\u7cfb\uff1a\u4ece\u539f\u7406\u5230\u5b9e\u6218\uff0c\u4e00\u6587\u5403\u900f\u6d41\u64cd\u4f5c<\/a><\/h5><\/div><\/div><div class=\"timeline-item\"><div class=\"timeline-dot\"><\/div><div class=\"timeline-date\">2026\u5e7405\u670819\u65e5<\/div><div class=\"timeline-content\"><h5><a href=\"https:\/\/yunyanglib.cn\/?p=1429\" target=\"_blank\">\u7b2c 130 \u7bc7\uff1a\u3010Java\u3011TreeMap \u8be6\u89e3\uff1a\u4ece\u7ea2\u9ed1\u6811\u539f\u7406\u5230\u5b9e\u6218\u5e94\u7528<\/a><\/h5><\/div><\/div><div class=\"timeline-item\"><div class=\"timeline-dot timeline-dot-hidden\"><\/div><div class=\"timeline-date timeline-date-hidden\"><\/div><div class=\"timeline-content\"><h5><a href=\"https:\/\/yunyanglib.cn\/?p=1452\" target=\"_blank\">\u7b2c 129 \u7bc7\uff1a\u3010Java\u3011Iterator \u4e0e Iterable \u7684\u533a\u522b\uff1a\u4ece\u539f\u7406\u5230\u5b9e\u6218<\/a><\/h5><\/div><\/div><div class=\"timeline-item\"><div class=\"timeline-dot\"><\/div><div class=\"timeline-date\">2026\u5e7405\u670818\u65e5<\/div><div class=\"timeline-content\"><h5><a href=\"https:\/\/yunyanglib.cn\/?p=1446\" target=\"_blank\">\u7b2c 128 \u7bc7\uff1a\u3010Java\u3011Comparable \u548c Comparator \u7684\u533a\u522b\uff1a\u4ece\u539f\u7406\u5230\u4ee3\u7801\u5b9e\u6218<\/a><\/h5><\/div><\/div><div class=\"timeline-item\"><div class=\"timeline-dot\"><\/div><div class=\"timeline-date\">2026\u5e7405\u670817\u65e5<\/div><div class=\"timeline-content\"><h5><a href=\"https:\/\/yunyanglib.cn\/?p=1443\" target=\"_blank\">\u7b2c 127 \u7bc7\uff1a\u3010Java\u3011WeakHashMap\u8be6\u89e3\uff1a\u539f\u7406\u3001\u5b9e\u73b0\u4e0e\u5b9e\u6218<\/a><\/h5><\/div><\/div><div class=\"timeline-item\"><div class=\"timeline-dot\"><\/div><div class=\"timeline-date\">2026\u5e7405\u670815\u65e5<\/div><div class=\"timeline-content\"><h5><a href=\"https:\/\/yunyanglib.cn\/?p=1437\" target=\"_blank\">\u7b2c 126 \u7bc7\uff1a\u3010Java\u3011PriorityQueue\u8be6\u89e3\uff1a\u4ece\u4f7f\u7528\u5230\u5e95\u5c42\u539f\u7406\u5168\u89e3\u6790<\/a><\/h5><\/div><\/div><div class=\"timeline-item\"><div class=\"timeline-dot\"><\/div><div class=\"timeline-date\">2026\u5e7405\u670809\u65e5<\/div><div class=\"timeline-content\"><h5><a href=\"https:\/\/yunyanglib.cn\/?p=1434\" target=\"_blank\">\u7b2c 125 \u7bc7\uff1a\u3010Java\u3011ArrayDeque \u8be6\u89e3\uff1a\u53cc\u7aef\u961f\u5217\u7684\u9ad8\u6548\u5b9e\u8df5\u6307\u5357<\/a><\/h5><\/div><\/div><div class=\"timeline-item\"><div class=\"timeline-dot\"><\/div><div class=\"timeline-date\">2026\u5e7405\u670807\u65e5<\/div><div class=\"timeline-content\"><h5><a href=\"https:\/\/yunyanglib.cn\/?p=1423\" target=\"_blank\">\u7b2c 124 \u7bc7\uff1a\u3010Java\u3011LinkedHashMap\u8be6\u89e3\uff1a\u6709\u5e8f\u6620\u5c04\u4e0eLRU\u7f13\u5b58\u5b9e\u6218<\/a><\/h5><\/div><\/div><\/div><div class=\"timeline-pagination\"><ul class='page-numbers'>\n\t<li><span aria-current=\"page\" class=\"page-numbers current\">1<\/span><\/li>\n\t<li><a class=\"page-numbers\" href=\"https:\/\/yunyanglib.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fpages%2F93&#038;paged=2\">2<\/a><\/li>\n\t<li><a class=\"page-numbers\" href=\"https:\/\/yunyanglib.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fpages%2F93&#038;paged=3\">3<\/a><\/li>\n\t<li><span class=\"page-numbers dots\">&hellip;<\/span><\/li>\n\t<li><a class=\"page-numbers\" href=\"https:\/\/yunyanglib.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fpages%2F93&#038;paged=14\">14<\/a><\/li>\n\t<li><a class=\"next page-numbers\" href=\"https:\/\/yunyanglib.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fpages%2F93&#038;paged=2\">\u4e0b\u4e00\u9875 \u00bb<\/a><\/li>\n<\/ul>\n<\/div><\/div>\n\n\n<p class=\"wp-block-paragraph\">\n    <div id=\"contribution-wrapper\" style=\"width: 800px; margin: 20px 0;\">\n        <!-- \u53f3\u4e0a\u89d24\u7ea7\u8272\u5757\u56fe\u4f8b -->\n        <div id=\"heatmap-legend\" style=\"display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-bottom: 10px;\">\n            <span style=\"font-size: 0.9rem; color: #666;\">\u4e0d\u6d3b\u8dc3<\/span>\n            <div style=\"width: 20px; height: 20px; background: #ffffff; border: 1px solid #e0e0e0;\"><\/div>\n            <div style=\"width: 20px; height: 20px; background: #c8e6c9; border: 1px solid #e0e0e0;\"><\/div>\n            <div style=\"width: 20px; height: 20px; background: #66bb6a; border: 1px solid #e0e0e0;\"><\/div>\n            <div style=\"width: 20px; height: 20px; background: #2e7d32; border: 1px solid #e0e0e0;\"><\/div>\n            <span style=\"font-size: 0.9rem; color: #666;\">\u6d3b\u8dc3<\/span>\n        <\/div>\n\n        <!-- \u70ed\u529b\u56fe\u5bb9\u5668 -->\n        <div id=\"contribution-heatmap\" style=\"width: 100%; height: 250px; padding: 20px; border: 1px solid #ddd;\">\n            <div id=\"full-calendar\" style=\"width: 100%; height: 100%;\"><\/div>\n        <\/div>\n    <\/div>\n\n    <script src=\"https:\/\/cdn.bootcdn.net\/ajax\/libs\/d3\/7.8.5\/d3.min.js\"><\/script>\n    <script>\n    window.onload = function() {\n        if (!d3) {\n            document.getElementById(\"contribution-heatmap\").innerHTML = \"D3\u52a0\u8f7d\u5931\u8d25\";\n            return;\n        }\n\n        const contributionData = {\"2026-05-28\":1,\"2026-05-27\":1,\"2026-05-22\":1,\"2026-05-19\":2,\"2026-05-18\":1,\"2026-05-17\":1,\"2026-05-15\":1,\"2026-05-09\":1,\"2026-05-07\":1,\"2026-05-06\":1,\"2026-04-30\":1,\"2026-04-29\":1,\"2026-04-28\":1,\"2026-04-27\":1,\"2026-04-26\":1,\"2026-04-24\":1,\"2026-04-22\":1,\"2026-04-21\":1,\"2026-04-20\":1,\"2026-04-19\":1,\"2026-04-17\":1,\"2026-04-16\":1,\"2026-04-15\":1,\"2026-04-14\":1,\"2026-04-12\":1,\"2026-04-11\":1,\"2026-04-10\":2,\"2026-04-09\":2,\"2026-04-08\":2,\"2026-04-07\":2,\"2026-04-06\":1,\"2026-04-04\":1,\"2026-04-03\":2,\"2026-04-02\":2,\"2026-04-01\":2,\"2026-03-30\":1,\"2026-03-29\":1,\"2026-03-28\":1,\"2026-03-27\":1,\"2026-03-26\":1,\"2026-03-25\":1,\"2026-03-24\":1,\"2026-03-23\":1,\"2026-03-22\":1,\"2026-03-21\":1,\"2026-03-20\":1,\"2026-03-19\":1,\"2026-03-18\":1,\"2026-03-17\":1,\"2026-03-16\":1,\"2026-03-15\":1,\"2026-03-14\":1,\"2026-03-13\":1,\"2026-03-12\":1,\"2026-03-11\":1,\"2026-03-10\":1,\"2026-03-09\":1,\"2026-03-08\":1,\"2026-03-07\":1,\"2026-03-06\":1,\"2026-03-05\":1,\"2026-03-04\":1,\"2026-03-03\":1,\"2026-03-02\":1,\"2026-03-01\":1,\"2026-02-28\":1,\"2026-02-27\":1,\"2026-02-26\":1,\"2026-02-25\":1,\"2026-02-24\":1,\"2026-02-19\":1,\"2026-02-18\":1,\"2026-02-17\":1,\"2026-02-16\":1,\"2026-02-15\":1,\"2026-02-14\":1,\"2026-02-13\":1,\"2026-02-12\":2,\"2026-02-11\":2,\"2026-02-10\":3,\"2026-02-09\":2,\"2026-02-07\":1,\"2026-02-06\":5,\"2026-02-05\":5,\"2026-02-04\":5,\"2026-02-03\":5,\"2026-02-02\":4,\"2026-02-01\":5,\"2026-01-31\":5,\"2026-01-30\":2,\"2026-01-29\":1,\"2026-01-27\":1};\n        const startDate = new Date(\"2026\", 0, 1);\n        const endDate = new Date(\"2026\", 11, 31);\n        const today = new Date(); \/\/ \u83b7\u53d6\u5f53\u524d\u65e5\u671f\uff08\u7528\u4e8e\u533a\u5206\u8fc7\u53bb\/\u672a\u6765\uff09\n        today.setHours(0, 0, 0, 0); \/\/ \u91cd\u7f6e\u65f6\u95f4\u4e3a0\u70b9\uff0c\u907f\u514d\u65f6\u5206\u79d2\u5e72\u6270\u65e5\u671f\u5224\u65ad\n        const dateRange = d3.timeDays(startDate, endDate);\n        const cellSize = 14;\n        const margin = { top: 20, right: 10, bottom: 30, left: 10 };\n\n        \/\/ ******** \u65b0\u589e1\uff1a\u521b\u5efatooltip\u5143\u7d20\uff08\u9ed8\u8ba4\u9690\u85cf\uff09 ********\n        const tooltip = d3.select(\"body\").append(\"div\")\n            .attr(\"class\", \"heatmap-tooltip\")\n            .style(\"position\", \"absolute\")\n            .style(\"background-color\", \"#ffffff\")\n            .style(\"border\", \"1px solid #e0e0e0\")\n            .style(\"border-radius\", \"4px\")\n            .style(\"padding\", \"6px 10px\")\n            .style(\"font-size\", \"0.9rem\")\n            .style(\"box-shadow\", \"0 2px 5px rgba(0, 0, 0, 0.1)\")\n            .style(\"opacity\", 0) \/\/ \u9ed8\u8ba4\u900f\u660e\u9690\u85cf\n            .style(\"pointer-events\", \"none\") \/\/ \u4e0d\u963b\u6321\u9f20\u6807\u4e8b\u4ef6\n            .style(\"z-index\", \"9999\"); \/\/ \u786e\u4fdd\u5728\u6700\u4e0a\u5c42\n\n        \/\/ \u521b\u5efaSVG\u5bb9\u5668\n        const svg = d3.select(\"#full-calendar\")\n            .append(\"svg\")\n            .attr(\"width\", \"100%\")\n            .attr(\"height\", \"100%\")\n            .append(\"g\")\n            .attr(\"transform\", `translate(${margin.left}, ${margin.top})`);\n\n        \/\/ ******** \u65b0\u589e2\uff1a\u65e5\u671f\u683c\u5f0f\u5316\u51fd\u6570\uff082026-01-26 Mon\uff09 ********\n        const dateFormatter = d3.timeFormat(\"%Y-%m-%d %a\"); \/\/ %Y=\u5e74, %m=\u6708, %d=\u65e5, %a=\u661f\u671f\u7f29\u5199\uff08Mon\/Tue\u7b49\uff09\n\n        \/\/ \u70ed\u529b\u56fe\u989c\u8272\uff1a\u4e0e4\u7ea7\u56fe\u4f8b\u5bf9\u5e94\n        const cells = svg.selectAll(\".cell\")\n            .data(dateRange)\n            .enter().append(\"rect\")\n            .attr(\"class\", \"cell\")\n            .attr(\"width\", cellSize - 1)\n            .attr(\"height\", cellSize - 1)\n            .attr(\"x\", d => d3.timeWeek.count(d3.timeYear(d), d) * cellSize)\n            .attr(\"y\", d => d3.timeFormat(\"%w\")(d) * cellSize)\n            .attr(\"fill\", d => {\n                const dateStr = d3.timeFormat(\"%Y-%m-%d\")(d);\n\t\t\t\t\t\tconst articleCount = contributionData[dateStr] || 0;\n                if (articleCount >= 5) return \"#2e7d32\"; \/\/ \u7b49\u7ea74\uff08\u6d3b\u8dc3\uff09\n                if (articleCount >= 3) return \"#66bb6a\"; \/\/ \u7b49\u7ea73\n                if (articleCount >= 1) return \"#c8e6c9\"; \/\/ \u7b49\u7ea72\n                return \"#ffffff\"; \/\/ \u7b49\u7ea71\uff08\u4e0d\u6d3b\u8dc3\uff09\n            })\n            .attr(\"stroke\", \"#f0f0f0\");\n\n        \/\/ ******** \u65b0\u589e3\uff1a\u9f20\u6807\u60ac\u6d6e\u4e8b\u4ef6\uff08\u533a\u5206\u8fc7\u53bb\/\u672a\u6765\u65e5\u671f\uff09 ********\n        cells\n            \/\/ \u9f20\u6807\u79fb\u5165\uff1a\u663e\u793atooltip\n            .on(\"mouseover\", function(event, d) {\n                \/\/ 1. \u683c\u5f0f\u5316\u65e5\u671f\u4e3a\u300c2026-01-26 Mon\u300d\u683c\u5f0f\n                const formattedDate = dateFormatter(d);\n                \/\/ 2. \u91cd\u7f6e\u5f53\u524d\u65e5\u671f\u7684\u65f6\u5206\u79d2\uff08\u907f\u514d\u65f6\u5206\u79d2\u5e72\u6270\u5224\u65ad\uff09\n                const cellDate = new Date(d);\n                cellDate.setHours(0, 0, 0, 0);\n\n                \/\/ 3. \u533a\u5206\u300c\u8fc7\u53bb\/\u5f53\u524d\u65e5\u671f\u300d\u548c\u300c\u672a\u6765\u65e5\u671f\u300d\n                let tooltipContent = \"\";\n                if (cellDate <= today) {\n                    \/\/ \u8fc7\u53bb\/\u5f53\u524d\u65e5\u671f\uff1a\u663e\u793a\u300c\u65e5\u671f + \u6587\u7ae0\u6570\u300d\n                    const dateStr = d3.timeFormat(\"%Y-%m-%d\")(d);\n                    const articleCount = contributionData[dateStr] || 0;\n                    tooltipContent = `${formattedDate}<br>\u521b\u4f5c\u6587\u7ae0\uff1a${articleCount} \u7bc7`;\n                } else {\n                    \/\/ \u672a\u6765\u65e5\u671f\uff1a\u53ea\u663e\u793a\u300c\u65e5\u671f\u300d\n                    tooltipContent = formattedDate;\n                }\n\n                \/\/ 4. \u663e\u793atooltip\u5e76\u8c03\u6574\u4f4d\u7f6e\uff08\u8ddf\u968f\u9f20\u6807\uff09\n                tooltip.html(tooltipContent)\n                    .style(\"left\", (event.pageX + 10) + \"px\") \/\/ \u9f20\u6807\u53f3\u4fa710px\n                    .style(\"top\", (event.pageY - 20) + \"px\") \/\/ \u9f20\u6807\u4e0a\u65b920px\n                    .transition() \/\/ \u6de1\u5165\u6548\u679c\n                    .duration(200)\n                    .style(\"opacity\", 0.95);\n            })\n            \/\/ \u9f20\u6807\u79fb\u51fa\uff1a\u9690\u85cftooltip\n            .on(\"mouseout\", function() {\n                tooltip.transition() \/\/ \u6de1\u51fa\u6548\u679c\n                    .duration(500)\n                    .style(\"opacity\", 0);\n            });\n\n        \/\/ \u6708\u4efd\u6807\u7b7e\n        const months = d3.timeMonths(startDate, endDate);\n        svg.selectAll(\".month-label\")\n            .data(months)\n            .enter().append(\"text\")\n            .attr(\"class\", \"month-label\")\n            .attr(\"x\", d => d3.timeWeek.count(d3.timeYear(d), d) * cellSize)\n            .attr(\"y\", 7 * cellSize + 20)\n            .attr(\"font-size\", \"11px\")\n            .attr(\"fill\", \"#666\")\n            .text(d => d3.timeFormat(\"%b\")(d));\n    };\n    <\/script>\n\n    <style>\n    .cell:hover {\n        stroke: #333 !important;\n        stroke-width: 1px !important;\n    }\n    <\/style>\n    <\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-93","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/yunyanglib.cn\/index.php?rest_route=\/wp\/v2\/pages\/93","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/yunyanglib.cn\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/yunyanglib.cn\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/yunyanglib.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/yunyanglib.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=93"}],"version-history":[{"count":10,"href":"https:\/\/yunyanglib.cn\/index.php?rest_route=\/wp\/v2\/pages\/93\/revisions"}],"predecessor-version":[{"id":145,"href":"https:\/\/yunyanglib.cn\/index.php?rest_route=\/wp\/v2\/pages\/93\/revisions\/145"}],"wp:attachment":[{"href":"https:\/\/yunyanglib.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=93"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}