generated from Meekdai/Gmeek-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
blogBase.json
1 lines (1 loc) · 54.2 KB
/
blogBase.json
1
{"singlePage": ["about", "link"], "startSite": "06/22/2024", "filingNum": "", "onePageListNum": 10, "commentLabelColor": "#006b75", "yearColorList": ["#bc4c00", "#0969da", "#1f883d", "#A333D0"], "i18n": "CN", "themeMode": "manual", "dayTheme": "light", "nightTheme": "dark", "urlMode": "pinyin", "script": "<script src='https://blog.meekdai.com/Gmeek/plugins/GmeekTOC.js'></script>", "style": "", "head": "", "indexScript": "", "indexStyle": "", "bottomText": "\u2764\ufe0f \u6b22\u8fce\u4f60\u7684\u5230\u6765\uff01 \u2764\ufe0f", "showPostSource": 1, "iconList": {"GitHub": "M8 0c4.42 0 8 3.58 8 8a8.013 8.013 0 0 1-5.45 7.59c-.4.08-.55-.17-.55-.38 0-.27.01-1.13.01-2.2 0-.75-.25-1.23-.54-1.48 1.78-.2 3.65-.88 3.65-3.95 0-.88-.31-1.59-.82-2.15.08-.2.36-1.02-.08-2.12 0 0-.67-.22-2.2.82-.64-.18-1.32-.27-2-.27-.68 0-1.36.09-2 .27-1.53-1.03-2.2-.82-2.2-.82-.44 1.1-.16 1.92-.08 2.12-.51.56-.82 1.28-.82 2.15 0 3.06 1.86 3.75 3.64 3.95-.23.2-.44.55-.51 1.07-.46.21-1.61.55-2.33-.66-.15-.24-.6-.83-1.23-.82-.67.01-.27.38.01.53.34.19.73.9.82 1.13.16.45.68 1.31 2.69.94 0 .67.01 1.3.01 1.49 0 .21-.15.45-.55.38A7.995 7.995 0 0 1 0 8c0-4.42 3.58-8 8-8Z", "music": "M8.75 8.582v5.668a.75.75 0 0 1-1.5 0V8.582a1.75 1.75 0 1 1 1.5 0Zm3.983-7.125a.75.75 0 0 1 1.06.026A7.976 7.976 0 0 1 16 7c0 2.139-.84 4.083-2.207 5.517a.75.75 0 1 1-1.086-1.034A6.474 6.474 0 0 0 14.5 7a6.474 6.474 0 0 0-1.793-4.483.75.75 0 0 1 .026-1.06Zm-9.466 0c.3.286.312.76.026 1.06A6.474 6.474 0 0 0 1.5 7a6.47 6.47 0 0 0 1.793 4.483.75.75 0 0 1-1.086 1.034A7.973 7.973 0 0 1 0 7c0-2.139.84-4.083 2.207-5.517a.75.75 0 0 1 1.06-.026Zm8.556 2.321A4.988 4.988 0 0 1 13 7a4.988 4.988 0 0 1-1.177 3.222.75.75 0 1 1-1.146-.967A3.487 3.487 0 0 0 11.5 7c0-.86-.309-1.645-.823-2.255a.75.75 0 0 1 1.146-.967Zm-6.492.958A3.48 3.48 0 0 0 4.5 7a3.48 3.48 0 0 0 .823 2.255.75.75 0 0 1-1.146.967A4.981 4.981 0 0 1 3 7a4.982 4.982 0 0 1 1.188-3.236.75.75 0 1 1 1.143.972Z"}, "UTC": 8, "rssSplit": "sentence", "exlink": {"GitHub": "https://github.com/Panda-Z-Coding", "music": "https://www.bilibili.com/video/BV1e84y1T7jp/?spm_id_from=333.337.search-card.all.click&vd_source=27551118d172b66be1684b8a184ba967"}, "needComment": 1, "allHead": "", "title": "This is PanDaCo", "email": "2558891266@qq.com", "subTitle": "\u82b8\u751f\u6d6e\u68a6,\u5fc6\u6614\u5f80\u5df2...", "avatarUrl": "https://avatars.githubusercontent.com/u/157597971?s=400&u=a97f3580e282268c6eafe9d807c5b1dfdf02d1d7&v=4", "GMEEK_VERSION": "last", "postListJson": {"P3": {"htmlDir": "docs/post/String-chang-yong-fang-fa-\ud83d\udc4c.html", "labels": ["Java-\u5e38\u7528\u5b9e\u7528\u7c7b"], "postTitle": "String\u5e38\u7528\u65b9\u6cd5\ud83d\udc4c", "postUrl": "post/String-chang-yong-fang-fa-%F0%9F%91%8C.html", "postSourceUrl": "https://github.com/Panda-Z-Coding/Panda-Z-Coding.github.io/issues/3", "commentNum": 0, "wordCount": 3969, "description": "# **_String\u5e38\u7528\u65b9\u6cd5\ud83d\udc4c_**\r\n\r\n### \u300c\u64cd\u4f5cString\u7684\u65b9\u6cd5\u300d\r\n\r\n```java\r\npublic int length() // \u83b7\u53d6\u957f\u5ea6\r\npublic boolean equals(String s) // \u67e5\u770b\u4e24\u4e2aString\u5bf9\u8c61\u662f\u5426\u76f8\u7b49\r\npublic boolean startsWith(String s) // \u524d\u7f00\u662f\u5426\u662fs\r\npublic boolean endsWith(String s) // \u540e\u7f00\u662f\u5426\u662fs\r\npublic int compareTo(String s) // \u901a\u8fc7\u5b57\u5178\u5e8f\u6bd4\u8f83\uff0c\u8fd4\u56de\u6b63\u503c\u30010\u3001\u8d1f\u6570\r\npublic boolean contains(String s) // \u5224\u65adString\u5bf9\u8c61\u91cc\u662f\u5426\u542b\u6709 s\r\npublic int indexOf(String s) // \u8fd4\u56de\u9996\u6b21\u51fa\u73b0s\u7684\u4f4d\u7f6e\r\npublic int lastIndexOf(String s) // \u8fd4\u56de\u6700\u540e\u4e00\u6b21\u51fa\u73b0s\u7684\u4f4d\u7f6e\r\npublic String subString(int startpoint) // \u83b7\u5f97\u4e00\u4e2a\u4ece\u8be5\u4f4d\u7f6e\u5230\u6700\u540e\u7684\u65b0String\u5bf9\u8c61\r\npublic String subString(int start,int end) // \u7c7b\u4f3c\u4e0a\u4e00\u4e2a\uff0c\u53ef\u4ee5\u6307\u5b9a\u6700\u540e\u7684\u4f4d\u7f6e\r\npublic String trim() // \u83b7\u5f97\u8be5\u5bf9\u8c61\u53bb\u9664\u524d\u540e\u7a7a\u683c\u7684\u65b0\u5bf9\u8c61\r\n\r\n```\r\n\r\n### \u300cString\u5bf9\u8c61\u548c\u57fa\u672c\u6570\u636e\u7c7b\u578b\u7684\u8f6c\u6362\u21c4\u300d\r\n\r\n _**String \u27a1\ufe0f \u57fa\u672c\u578b**_\r\n\r\n~~~java\r\npublic static byte parseByte(String s) throws NumberFormatException\r\npublic static short parseShort(String s) throws NumberFormatException\r\npublic static long parseLong(String s) throws NumberFormatException\r\npublic static float parseFloat(String s) throws NumberFormatException\r\npublic static double parseDouble(String s) throws NumberFormatException\r\n~~~\r\n\r\n_**\u57fa\u672c\u578b \u27a1\ufe0f String**_\r\n\r\n```java\r\npublic static String valueOf(_\u6570\u636e\u7c7b\u578b_ n) //\u8fd4\u56de\u4e00\u4e2aString\u5bf9\u8c61\u7684\u5f15\u7528\r\n```\r\n\r\n_**\u57fa\u672c\u7c7b\u578b\u7684\u8fdb\u5236\u8868\u793a**_\r\n\r\n~~~java\r\npublic static String toBinaryString(int i) // \u8fd4\u56dei\u7684\u4e8c\u8fdb\u5236String\u8868\u793a\r\npublic static String toOctalString(int i) // \u516b\u8fdb\u5236\r\npublic static String toHexString(int i) // \u5341\u516d\u8fdb\u5236\r\n// int i \u6216\u8005 long i \u90fd\u53ef\u4ee5\r\n~~~\r\n\r\n_**main()\u65b9\u6cd5\u7684\u53c2\u6570\u5316\ud83d\udc95**_\r\n\r\n\u200b main()\u65b9\u6cd5\u4e2d\u7684args[] \u53ef\u4ee5\u63a5\u53d7\u4ece\u952e\u76d8\u4e0a\u9762\u952e\u5165\u7684\u5b57\u7b26\u5e8f\u5217\uff08\u76f8\u5f53\u4e8e\u6570\u7ec4\uff09\uff0c\u5728\u8fd0\u884c\u65f6\u53ef\u4ee5\u50cf\u4ee5\u4e0b\u6765\u952e\u5165\r\n\r\n> java \u4e3b\u7c7b\u540d \u6570\u636e1 \u6570\u636e2 ...\r\n\r\n### \u300c\u5bf9\u8c61\u7684String\u5bf9\u8c61\u8868\u793a\u300d\r\n\r\n\u5bf9\u4e00\u4e2a\u5bf9\u8c61\u8c03\u7528 toString() \u65b9\u6cd5\u4f1a\u8fd4\u56deString\u5bf9\u8c61\u7684\u5b57\u7b26\u5e8f\u5217\u4e32\r\n\r\n> \u4e00\u822c\u5f62\u5f0f\uff1a\r\n>\r\n> \u521b\u5efa\u5bf9\u8c61\u7684\u7c7b\u540d@\u5bf9\u8c61\u7684\u5f15\u7528\u7684\u5b57\u7b26\u5e8f\u5217\u4e32\r\n\r\n\ud83e\udd14\u8981\u6ce8\u610f\u7684\u662f\uff1atoString() \u662fObject\u7c7b\u7684\u65b9\u6cd5\uff0c\u662f\u53ef\u4ee5\u88ab\u91cd\u5199\u7684\r\n\r\n\r\n\r\n### \u300c**String\u5bf9\u8c61\u4e0e\u5b57\u7b26\u6570\u7ec4\u3001\u5b57\u8282\u6570\u7ec4**\u300d\r\n\r\n_**String\u5bf9\u8c61\u4e0e\u5b57\u7b26\u6570\u7ec4**_\r\n\r\n```java\r\npublic viod getChars(int start,int end,char c[],int offset) // \u5c06String\u5bf9\u8c61\u7684\u5b57\u7b26\u5e8f\u5217start\u5230end-1\u5217\u653e\u5165\u6570\u7ec4\u91cc\r\npublic char[] toCharArray() //\u5168\u90e8String\u7684\u5b57\u7b26\u5e8f\u5217\u8fd4\u56de\u6210\u4e00\u4e2a\u5b57\u7b26\u6570\u7ec4\r\n```\r\n\r\n_**String\u5bf9\u8c61\u4e0e\u5b57\u8282\u6570\u7ec4**_\r\n\r\n>String\u7c7b\u4e2d **String(byte[])** \u548c **String(byte[],int offset,int length)** \u53ef\u4ee5\u8ba9\u6211\u4eec\u7528\u6307\u5b9a\u7684\u5b57\u8282\u6570\u7ec4\u7684\u90e8\u5206\u6216\u8005\u5168\u90e8\u6765\u521b\u5efaString\u5bf9\u8c61\r\n\r\n~~~java\r\npublic byte[] getBytes() // \u7528\u5e73\u53f0\u9ed8\u8ba4\u7684\u5b57\u7b26\u7f16\u7801\u5c06String\u5bf9\u8c61\u653e\u5165\u5b57\u8282\u6570\u7ec4\u7528\uff0c\u5e76\u8fd4\u56de\u5f15\u7528\r\npublic byte[] getBytes(String charsetName) // \u6307\u5b9a\u5b57\u7b26\u7f16\u7801\u3002", "top": 0, "createdAt": 1719073596, "style": "", "script": "<script src='https://blog.meekdai.com/Gmeek/plugins/GmeekTOC.js'></script>", "head": "", "ogImage": "https://avatars.githubusercontent.com/u/157597971?s=400&u=a97f3580e282268c6eafe9d807c5b1dfdf02d1d7&v=4", "createdDate": "2024-06-23", "dateLabelColor": "#bc4c00"}, "P5": {"htmlDir": "docs/post/zheng-ze-biao-da-shi-!-qi-dong-!\ud83e\udd10.html", "labels": ["Java\u57fa\u7840"], "postTitle": "\u6b63\u5219\u8868\u8fbe\u5f0f!\u542f\u52a8!\ud83e\udd10", "postUrl": "post/zheng-ze-biao-da-shi-%21-qi-dong-%21%F0%9F%A4%90.html", "postSourceUrl": "https://github.com/Panda-Z-Coding/Panda-Z-Coding.github.io/issues/5", "commentNum": 0, "wordCount": 1443, "description": "# **_`\u6b63\u5219\u8868\u8fbe\u5f0f!\u542f\u52a8!`_**\r\n\r\n### \u6b63\u5219\u8868\u8fbe\u5f0f\u4e0e\u5143\u5b57\u7b26\r\n\r\n#### _1.\u5b9a\u4e49:_ \r\n>\ud83d\ude0e\u4e00\u4e2aString\u5bf9\u8c61\u7684\u5b57\u7b26\u5e8f\u5217\u4e2d\u5177\u6709\u7279\u6b8a\u610f\u4e49\u7684\u5b57\u7b26\u53eb\u505a **_\u5143\u5b57\u7b26_** !<br>\ud83d\ude2e\u6b63\u5219\u8868\u8fbe\u5f0f\u662f\u4e00\u4e2a**String\u5bf9\u8c61\u7684\u5b57\u7b26\u5e8f\u5217**\r\n\r\n~~~java\r\npublic boolean matches(String regex); // \u5224\u65adString\u5bf9\u8c61\u7684\u5b57\u7b26\u5e8f\u5217\u662f\u5426\u548c\u53c2\u6570regex\u7684\u6b63\u5219\u8868\u8fbe\u5f0f\u5339\u914d\r\n~~~\r\n\r\n##### **_\u5e38\u7528\u5143\u5b57\u7b26\u8868\ud83d\ude0d_**\r\n\r\n|`\u6b63\u5219\u8868\u8fbe\u5f0f`|`\u610f\u4e49`|\r\n|:----------|:-----|\r\n|**.**|\u8868\u793a\u4efb\u4f55\u4e00\u4e2a\u5b57\u7b26|\r\n|**\\\\\\\\.**|\u4ee3\u8868 **.** \u8fd9\u4e2a\u5b57\u7b26|\r\n|**\\\\\\\\d**|0 ~ 9 \u4efb\u4f55\u4e00\u4e2a\u6570\u5b57|\r\n|**\\\\\\\\D**|\u975e\u6570\u5b57\u5b57\u7b26|\r\n|**\\\\\\\\s**|\u7a7a\u683c\u7c7b\u5b57\u7b26\uff0c\u4f8b _\\t \\n \\x0B(\u5782\u76f4\u5236\u8868\u7b26) \\f(\u6362\u9875\u7b26) \\r(\u56de\u8f66\u7b26)_|\r\n|**\\\\\\\\S**|\u975e\u7a7a\u683c\u7c7b|\r\n|**\\\\\\\\w**|\u53ef\u7528\u4e8e\u6807\u8bc6\u7b26\u7684\u5b57\u7b26|\r\n|**\\\\\\\\W**|\u4e0d\u80fd\u7528\u4e8e\u6807\u8bc6\u7b26|\r\n|**\\\\\\\\p{Lower}**|\u5c0f\u5199a ~ z|\r\n|**\\\\\\\\p{Upper}**|\u5927\u5199A ~ Z|\r\n|**\\\\\\\\p{ASCII}**|ASCII\u7801|\r\n|**\\\\\\\\p{Alpha}**|\u5b57\u6bcd|\r\n|**\\\\\\\\p{Digit}**|0 ~ 9 \u4efb\u4f55\u6570\u5b57|\r\n|**\\\\\\\\p{Alnum}**|\u6570\u5b57\u6216\u8005\u5b57\u6bcd|\r\n|**\\\\\\\\p{Punct}**|\u6807\u70b9\u7b26\u53f7\uff1a\u952e\u76d8\u4e0a\u9762\u4f60\u80fd\u5728\u6570\u5b57\u548c\u5b57\u6bcd\u5916\u6253\u51fa\u6765\u7b26\u53f7|\r\n|**\\\\\\\\p{Graph}**|\u53ef\u89c6\u6807\u70b9\uff1a\\p{Alnum} \\p{Punct}|\r\n|**\\\\\\\\p{Print}**|\u53ef\u6253\u5370\u7684|\r\n|**\\\\\\\\p{Blank}**|\u7a7a\u683c\u6216\u8005\u5236\u8868\u7b26|\r\n|**\\\\\\\\p{Cntrl}**|\u63a7\u5236\u7b26\uff1a[\\x00 ~\\\\x1F\\\\x7F] (\u9644\u88681\u9644\u52a0\u89e3\u91ca)|\r\n\r\n>>`\u8865\u5145\u8bf4\u660e`\ud83e\udd10 <br>**\\\\\\\\d \u4e0e \\\\\\\\p{Digit}** \u4e0d\u540c\u4e4b\u5904\u5728\u4e8e >>> \u524d\u8005\u5339\u914d\u7684\u662fASCII\u7801\uff0c\u800c\u540e\u8005\u5339\u914d\u7684\u662fUnicode\u7801\u3002", "top": 0, "createdAt": 1719154146, "style": "", "script": "<script src='https://blog.meekdai.com/Gmeek/plugins/GmeekTOC.js'></script>", "head": "", "ogImage": "https://avatars.githubusercontent.com/u/157597971?s=400&u=a97f3580e282268c6eafe9d807c5b1dfdf02d1d7&v=4", "createdDate": "2024-06-23", "dateLabelColor": "#bc4c00"}, "P6": {"htmlDir": "docs/post/chang-jian---zheng-ze-biao-da-shi-\ud83d\ude0d.html", "labels": ["Java\u57fa\u7840"], "postTitle": "\u5e38\u89c1-\u6b63\u5219\u8868\u8fbe\u5f0f\ud83d\ude0d", "postUrl": "post/chang-jian---zheng-ze-biao-da-shi-%F0%9F%98%8D.html", "postSourceUrl": "https://github.com/Panda-Z-Coding/Panda-Z-Coding.github.io/issues/6", "commentNum": 0, "wordCount": 1232, "description": "# **_`\u5e38\u89c1-\u6b63\u5219\u8868\u8fbe\u5f0f\ud83d\ude0d`_**\r\n\r\n- **`\u5339\u914d\u6574\u6570`**\r\n```java\r\nString regex = '-?[1-9]\\\\d*';\r\n```\r\n\r\n- **`\u5339\u914d\u6d6e\u70b9\u6570`**\r\n```java\r\nString regex = '-?[0-9][0-9]*[.][0-9]+';\r\n```\r\n\r\n- **`\u5339\u914d E-mail \u5f62\u5f0f`**\r\n```java\r\nString regex = '\\\\w+@\\\\w+\\\\.[a-z]+(\\\\.[a-z]+)?';\r\n```\r\n\r\n- **`\u5339\u914d\u8eab\u4efd\u8bc1\u53f7\u7801`**\r\n```java\r\nString regex = '[1-9][0-9]{16}[a-zA-Z0-9]{1}';\r\n```\r\n- **`\u5339\u914d\u65e5\u671f`**\r\n```java\r\nString year = '[1-9][0-9]{3}'; // \u5e74\u96504\u4f4d\u6570\r\nString month = '((0?[1-9])|(1[012]))' //\u7528\u5230 | \u65f6\u8981\u62ec\u53f7\u62ec\u8d77\u6574\u4e2a\u8868\u8fbe\u5f0f\r\nString day = '((0?[1-9])|([12][0-9])|(3[01]?))'\r\nString regex = year + '[-./]' + mouth + '-./' + day; //\u5206\u9694\u7b26\u53efDIY\r\n```\r\n- **`\u5339\u914dURL`**\r\n```java\r\nString regex = '(https?|ftp)://[^\\\\s/$.?#].[^\\\\s]*';\r\n```\r\n\u8fd9\u4e2a\u6b63\u5219\u8868\u8fbe\u5f0f\u53ef\u4ee5\u5339\u914dHTTP\u548cFTP\u534f\u8bae\u7684URL\r\n\r\n- **`\u5339\u914dIP\u5730\u5740`**\r\n```java\r\nString regex = '\\\\b(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\\\b';\r\n```\r\n\u8fd9\u4e2a\u6b63\u5219\u8868\u8fbe\u5f0f\u53ef\u4ee5\u5339\u914dIPv4\u5730\u5740\u3002", "top": 0, "createdAt": 1719159250, "style": "", "script": "<script src='https://blog.meekdai.com/Gmeek/plugins/GmeekTOC.js'></script>", "head": "", "ogImage": "https://avatars.githubusercontent.com/u/157597971?s=400&u=a97f3580e282268c6eafe9d807c5b1dfdf02d1d7&v=4", "createdDate": "2024-06-24", "dateLabelColor": "#bc4c00"}, "P7": {"htmlDir": "docs/post/String-lei-zhong-guan-yu-zheng-ze-biao-da-shi-de-fang-fa-\ud83d\ude0b.html", "labels": ["Java-\u5e38\u7528\u5b9e\u7528\u7c7b"], "postTitle": "String\u7c7b\u4e2d\u5173\u4e8e\u6b63\u5219\u8868\u8fbe\u5f0f\u7684\u65b9\u6cd5\ud83d\ude0b", "postUrl": "post/String-lei-zhong-guan-yu-zheng-ze-biao-da-shi-de-fang-fa-%F0%9F%98%8B.html", "postSourceUrl": "https://github.com/Panda-Z-Coding/Panda-Z-Coding.github.io/issues/7", "commentNum": 0, "wordCount": 467, "description": "# **_`String\u7c7b\u4e2d\u5173\u4e8e\u6b63\u5219\u8868\u8fbe\u5f0f\u7684\u65b9\u6cd5\ud83d\ude0b`_**\r\n\r\n## **\u5b57\u7b26\u5e8f\u5217\u7684\u66ff\u6362** \r\n~~~java\r\npublic String replaceAll(String regex,String replacement) \r\n // \u8fd4\u56de\u4e00\u4e2a\u7531replacement\u5339\u914dregex\u4e4b\u540e\u7684\u65b0String\u5bf9\u8c61\r\n~~~\r\n\r\n## **\u5b57\u7b26\u5e8f\u5217\u7684\u5206\u89e3**\r\n~~~java\r\npublic String[] split(String regex); \r\n //\u901a\u8fc7regex\u7684\u6b63\u5219\u8868\u8fbe\u5f0f\u6765\u5206\u5272\u5f53\u524dString\u5bf9\u8c61\r\n~~~\r\n\r\n> [!NOTE]\r\n> `split()`\u65b9\u6cd5\u8ba4\u4e3a\u5206\u9694\u7b26\u6807\u8bb0\u7684`\u5de6\u53f3\u90fd\u662f\u5355\u8bcd`\uff0c\u6240\u4ee5\u82e5\u5de6\u8fb9\u662f\u7a7a\u5b57\u7b26\uff0c\u90a3\u4e48\u8fd9\u4e2a`\u7a7a\u5b57\u7b26`\u7b97\u4f5c`\u7b2c\u4e00\u4e2a\u5355\u8bcd!`<br>\r\n> \u4f8b\u5982:`String str = '\u516c\u51431949\u5e7410\u67081\u65e5\u662f\u4e2d\u534e\u4eba\u6c11\u5171\u548c\u56fd\u6210\u7acb\u7684\u65e5\u5b50'` <br> \u5f53\u6211\u4eec\u5bf9\u5176\u4f7f\u7528 `regex = '//D+'` \u4f5c\u4e3a\u6807\u8bb0\u7b26\u65f6\uff0c\u6570\u7ec4\u91cc\u9762\u7684\u957f\u5ea6\u662f`4`\u800c\u4e0d\u662f`3` !\r\n\r\n\u3002", "top": 0, "createdAt": 1719219367, "style": "<style>.markdown-alert{padding:0.5rem 1rem;margin-bottom:1rem;border-left:.25em solid var(--borderColor-default,var(--color-border-default));}.markdown-alert .markdown-alert-title {display:flex;font-weight:var(--base-text-weight-medium,500);align-items:center;line-height:1;}.markdown-alert>:first-child {margin-top:0;}.markdown-alert>:last-child {margin-bottom:0;}</style><style>.markdown-alert.markdown-alert-note {border-left-color:var(--borderColor-accent-emphasis, var(--color-accent-emphasis));background-color:var(--color-accent-subtle);}.markdown-alert.markdown-alert-note .markdown-alert-title {color: var(--fgColor-accent,var(--color-accent-fg));}</style>", "script": "<script src='https://blog.meekdai.com/Gmeek/plugins/GmeekTOC.js'></script>", "head": "", "ogImage": "https://avatars.githubusercontent.com/u/157597971?s=400&u=a97f3580e282268c6eafe9d807c5b1dfdf02d1d7&v=4", "createdDate": "2024-06-24", "dateLabelColor": "#bc4c00"}, "P8": {"htmlDir": "docs/post/StringTokenizer-lei-\ud83d\ude0a.html", "labels": ["Java-\u5e38\u7528\u5b9e\u7528\u7c7b"], "postTitle": "StringTokenizer\u7c7b\ud83d\ude0a", "postUrl": "post/StringTokenizer-lei-%F0%9F%98%8A.html", "postSourceUrl": "https://github.com/Panda-Z-Coding/Panda-Z-Coding.github.io/issues/8", "commentNum": 0, "wordCount": 515, "description": "# **_`StringTokenizer\u7c7b`_**\r\n\r\n>**\u524d\u8a00\uff1a`StringTokenizer\u7c7b` \u548c `split()` \u4e0d\u540c\u4e4b\u5904\u5728\u4e8e\u524d\u8005\u4e0d\u4f7f\u7528`\u6b63\u5219\u8868\u8fbe\u5f0f`\u505a\u5206\u9694\u6807\u8bb0**\r\n\r\n- ### **_`\u4e24\u79cd\u6784\u9020\u65b9\u6cd5`_**\r\n```java\r\nStringTokenizer(String s) //\u4e3as\u6784\u9020\u4e00\u4e2a\u5206\u6790\u5668,\u4f7f\u7528\u9ed8\u8ba4\u5206\u9694\u7b26 \r\nStringTokenizer(String s,String delim) //\u4e3as\u6784\u9020\u4e00\u4e2a\u5206\u6790\u5668\uff0c\u53c2\u6570delim\u7684\u5b57\u7b26\u7684 \u4efb\u610f\u6392\u5217 \u4f5c\u4e3a\u5206\u9694\u6807\u8bb0\r\n```\r\n- ### **_StringTokenizer\u7684\u64cd\u4f5c\u65b9\u6cd5_**\r\n\r\n>**\u6211\u4eec\u79f0StringTokenizer\u5bf9\u8c61\u662f\u4e00\u4e2a\u5b57\u7b26\u5e8f\u5217\u5206\u6790\u5668\uff0c\u5b83\u5c01\u88c5\u7684\u6570\u636e\u662f\u82e5\u5e72\u4e2a\u5355\u8bcd\u3002", "top": 0, "createdAt": 1719225556, "style": "", "script": "<script src='https://blog.meekdai.com/Gmeek/plugins/GmeekTOC.js'></script>", "head": "", "ogImage": "https://avatars.githubusercontent.com/u/157597971?s=400&u=a97f3580e282268c6eafe9d807c5b1dfdf02d1d7&v=4", "createdDate": "2024-06-24", "dateLabelColor": "#bc4c00"}, "P9": {"htmlDir": "docs/post/Scanner-lei.html", "labels": ["Java-\u5e38\u7528\u5b9e\u7528\u7c7b"], "postTitle": "Scanner\u7c7b", "postUrl": "post/Scanner-lei.html", "postSourceUrl": "https://github.com/Panda-Z-Coding/Panda-Z-Coding.github.io/issues/9", "commentNum": 0, "wordCount": 928, "description": "# **_`Scanner\u7c7b \ud83e\udd28`_**\r\n\r\n> **\u6211\u4eec\u53ef\u4ee5\u7528`Scanner`\u5bf9\u8c61\u89e3\u6790\u5b57\u7b26\u5e8f\u5217\u4e2d\u7684\u5355\u8bcd\uff0c\u4ece\u800c\u89e3\u6790\u51fa\u7a0b\u5e8f\u9700\u8981\u7684\u6570\u636e**\r\n>\r\n\r\n- **Scanner\u5bf9\u8c61**\r\n \r\n```java\r\nString GDUFE = 'I love GDUFE';\r\n//\u5229\u7528scanner\u89e3\u6790GDUFE\u4e2d\u7684\u5355\u8bcd\r\nScanner scanner = new Scanner(GDUFE);\r\n//\u521b\u5efaScanner\u5bf9\u8c61\r\n```\r\n\r\n- **Scanner\u5bf9\u8c61\u65b9\u6cd5**\r\n - **`.useDelimiter(\u6b63\u5219\u8868\u8fbe\u5f0f); // \u5c06\u6b63\u5219\u8868\u8fbe\u5f0f\u4f5c\u4e3a\u5206\u9694\u6807\u8bb0`** \r\n - **`.next(); // \u8fd4\u56de\u4e00\u4e2a\u5355\u8bcd`**\r\n - **`.hasNext() // \u5224\u65ad\u8fd8\u6709\u65e0\u5355\u8bcd`**\r\n - **`.nextInt(); \u548c .nextDouble(); // \u5bf9\u4e8e\u6570\u5b57\u7c7b\u578b\u7684\u5355\u8bcd\uff0c\u7528\u8fd9\u4e24\u4e2a\u6bd4\u8f83\u59a5\u5f53\uff1b\u5f53\u7136\u5982\u679c\u4e0d\u662f\u6570\u5b57\u7c7b\u578b\u5c31\u4e0d\u8981\u4f5c\u6b7b\u7528\u8fd9\u4e2a`**\r\n - Why? \u4f1a\u53d1\u751f **_`InputMismatchException`_** \u5f02\u5e38\uff0c\u6240\u4ee5\u8bb0\u5f97\u653e\u5165**try-catch**\u8bed\u53e5\u91cc\r\n\r\n\r\n\r\n> [!IMPORTANT]\r\n> - **`\ud83e\udd14\u6240\u4ee5\uff1f\u8fd9\u4e2aScanner\u548cStringTokenizer\u6709\u4ec0\u4e48\u533a\u522b\uff1f\uff1f`**\r\n> - **\u6211\u4eec\u5148\u4ece\u4ed6\u4eec\u5404\u81ea\u7684\u5de5\u4f5c\u539f\u7406\u770b\u8d77\uff1a**\r\n> - **`StringTokenizer` \u662f\u628a\u5206\u89e3\u51fa\u6765\u7684\u5355\u8bcd\u5168\u90e8\u653e\u5165\u5bf9\u8c61\u5b9e\u4f53\u4e2d\ud83d\ude1f**\r\n> - **`Scanner` \u662f\u4ec5\u5b58\u653e\u548b\u6837\u83b7\u53d6\u5355\u8bcd\u5206\u9694\u6807\u8bb0\ud83d\ude32**\r\n> - **\u4e0d\u540c\u7684\u5904\u7406\u5404\u6709\u4ec0\u4e48\u597d\u5904\uff1f**\r\n> - **`StringTokenizer` \u4ee5\u7a7a\u95f4\u6362\u901f\u5ea6**\r\n> - **`Scanner` \u4ee5\u901f\u5ea6\u6362\u7a7a\u95f4**\r\n> - **\u5927\u6587\u4ef6\u89e3\u6790\u53ef\u4ee5\u7528`Scanner`\uff0c\u800c\u60f3\u8981\u5feb\u901f\u77e5\u9053\u5355\u8bcd\u6570\u76ee\u5f97\u7528`StringTokenizer`**\r\n> - **`Scanner`\u4e2d\u6ca1\u6709`countTokens()`\u8fd9\u6837\u7684\u51fd\u6570\uff0c\u56e0\u4e3a\u5b9e\u4f53\u91cc\u9762\u4e0d\u662f\u5355\u8bcd\uff0c\u60f3\u77e5\u9053\u5355\u8bcd\u6570\u91cf\u5fc5\u987b\u4e00\u4e2a\u4e2a\u53d6\u51fa\u6765**\u3002", "top": 0, "createdAt": 1719232921, "style": "<style>.markdown-alert{padding:0.5rem 1rem;margin-bottom:1rem;border-left:.25em solid var(--borderColor-default,var(--color-border-default));}.markdown-alert .markdown-alert-title {display:flex;font-weight:var(--base-text-weight-medium,500);align-items:center;line-height:1;}.markdown-alert>:first-child {margin-top:0;}.markdown-alert>:last-child {margin-bottom:0;}</style><style>.markdown-alert.markdown-alert-important {border-left-color:var(--borderColor-done-emphasis, var(--color-done-emphasis));background-color:var(--color-done-subtle);}.markdown-alert.markdown-alert-important .markdown-alert-title {color: var(--fgColor-done,var(--color-done-fg));}</style>", "script": "<script src='https://blog.meekdai.com/Gmeek/plugins/GmeekTOC.js'></script>", "head": "", "ogImage": "https://avatars.githubusercontent.com/u/157597971?s=400&u=a97f3580e282268c6eafe9d807c5b1dfdf02d1d7&v=4", "createdDate": "2024-06-24", "dateLabelColor": "#bc4c00"}, "P10": {"htmlDir": "docs/post/Pattern-lei-yu-Matcher-lei.html", "labels": ["Java-\u5e38\u7528\u5b9e\u7528\u7c7b"], "postTitle": "Pattern\u7c7b\u4e0eMatcher\u7c7b", "postUrl": "post/Pattern-lei-yu-Matcher-lei.html", "postSourceUrl": "https://github.com/Panda-Z-Coding/Panda-Z-Coding.github.io/issues/10", "commentNum": 0, "wordCount": 15180, "description": "<section id='nice' data-tool='markdown\u7f16\u8f91\u5668' data-website='https://markdown.com.cn/editor' style='font-size: 16px; padding: 25px 30px; word-spacing: 0px; word-break: break-word; word-wrap: break-word; text-align: justify; margin-top: -10px; line-height: 1.25; color: #2b2b2b; font-family: Optima-Regular, Optima, PingFangTC-Light, PingFangSC-light, PingFangTC-light; letter-spacing: 2px; background-image: linear-gradient(90deg, rgba(50, 0, 0, 0.04) 3%, rgba(0, 0, 0, 0) 3%), linear-gradient(360deg, rgba(50, 0, 0, 0.04) 3%, rgba(0, 0, 0, 0) 3%); background-size: 20px 20px; background-position: center center;'><h1 data-tool='markdown.com.cn\u7f16\u8f91\u5668' style='margin-top: 30px; margin-bottom: 15px; font-weight: bold; color: black; font-size: 25px;'><span class='prefix' style='font-weight: bold; color: #40B8FA; display: none;'></span><span class='content' style='display: inline-block; font-weight: bold; color: #40B8FA;'><strong style='color: #3594F7; font-weight: bold;'><span>\u300c</span><em style='font-style: normal; color: #3594F7; font-weight: bold;'><code>Pattern\u7c7b\u4e0eMatcher\u7c7b\ud83d\ude0b</code></em><span>\u300d</span></strong></span><span class='suffix' style='display: inline-block; font-weight: bold; color: #40B8FA;'></span></h1>\r\n<h2 data-tool='markdown.com.cn\u7f16\u8f91\u5668' style='margin-top: 30px; margin-bottom: 15px; font-weight: bold; color: black; font-size: 22px; display: block; border-bottom: 4px solid #40B8FA;'><span class='prefix' style='display: flex; width: 20px; height: 20px; background-size: 20px 20px; background-image: url(https://imgkr.cn-bj.ufileos.com/15fdfb3c-b350-4da9-928e-5f8c506ec325.png); margin-bottom: -22px;'></span><span class='content' style='display: flex; color: #40B8FA; font-size: 20px; margin-left: 25px;'>\u7f8e\u597d\u4e00\u5929\u4ece\u5b66\u4e60\u5f00\u59cb</span><span class='suffix' style='display: flex; box-sizing: border-box; width: 200px; height: 10px; border-top-left-radius: 20px; background: RGBA(64, 184, 250, .5); color: rgb(255, 255, 255); font-size: 16px; letter-spacing: 0.544px; justify-content: flex-end; float: right; margin-top: -10px; box-sizing: border-box !important; overflow-wrap: break-word !important;'></span></h2>\r\n<blockquote data-tool='markdown.com.cn\u7f16\u8f91\u5668' style='display: block; font-size: 0.9em; overflow: auto; overflow-scrolling: touch; padding-top: 10px; padding-bottom: 10px; padding-left: 20px; padding-right: 10px; margin-bottom: 20px; margin-top: 20px; text-size-adjust: 100%; line-height: 1.55em; font-weight: 400; border-radius: 6px; color: #595959; font-style: normal; text-align: left; box-sizing: inherit; border-left: none; border: 1px solid RGBA(64, 184, 250, .4); background: RGBA(64, 184, 250, .1);'><span style='color: RGBA(64, 184, 250, .5); font-size: 34px; line-height: 1; font-weight: 700;'>\u275d</span>\r\n<p style='padding-top: 8px; padding-bottom: 8px; letter-spacing: 2px; font-size: 14px; word-spacing: 2px; margin: 0px; line-height: 26px; color: #595959;'><strong style='color: #3594F7; font-weight: bold;'><span>\u300c</span><code style='font-size: 14px; word-wrap: break-word; margin: 0 2px; background-color: rgba(27,31,35,.05); font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; word-break: break-all; color: #3594F7; background: RGBA(59, 170, 250, .1); display: inline-block; padding: 0 2px; border-radius: 2px; height: 21px; line-height: 22px;'>Pattern \u548c Matcher\u4e24\u4e2a\u7c7b\u662fJava\u91cc\u4e13\u95e8\u7528\u6765\u6a21\u5f0f\u5339\u914d\u7684(\u68c0\u7d22\u548c\u6307\u5b9a\u6a21\u5f0f\u5339\u914d\u7684\u5b57\u7b26\u5e8f\u5217)</code><span>\u300d</span></strong></p>\r\n<span style='float: right; color: RGBA(64, 184, 250, .5);'>\u275e</span></blockquote>\r\n<ul data-tool='markdown.com.cn\u7f16\u8f91\u5668' style='margin-top: 8px; margin-bottom: 8px; padding-left: 25px; font-size: 15px; color: #595959; list-style-type: circle;'>\r\n<li><section style='margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; font-size: 14px; font-weight: normal; color: #595959;'><strong style='color: #3594F7; font-weight: bold;'><span>\u300c</span>\u4f7f\u7528\u6b65\u9aa4<span>\u300d</span></strong>\r\n<ul style='margin-top: 8px; margin-bottom: 8px; padding-left: 25px; font-size: 15px; color: #595959; list-style-type: square;'>\r\n<li><section style='margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; font-size: 14px; font-weight: normal; color: #595959;'><strong style='color: #3594F7; font-weight: bold;'><span>\u300c</span>1.\u521b\u5efa\u6570\u636e\u6e90<span>\u300d</span></strong>\r\n<ul style='margin-top: 8px; margin-bottom: 8px; padding-left: 25px; font-size: 15px; color: #595959; list-style-type: square;'>\r\n<li><section style='margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; font-size: 14px; font-weight: normal; color: #595959;'><code style='font-size: 14px; word-wrap: break-word; margin: 0 2px; background-color: rgba(27,31,35,.05); font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; word-break: break-all; color: #3594F7; background: RGBA(59, 170, 250, .1); display: inline-block; padding: 0 2px; border-radius: 2px; height: 21px; line-height: 22px;'>\u5c06\u4e00\u4e2aString\u5bf9\u8c61\u786e\u5b9a\u4e3a\u8981\u8fdb\u884c\u68c0\u7d22\u7684\u6570\u636e\u6e90</code></section></li></ul>\r\n</section></li><li><section style='margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; font-size: 14px; font-weight: normal; color: #595959;'><strong style='color: #3594F7; font-weight: bold;'><span>\u300c</span>2.\u5efa\u7acbPattern \u7c7b\u5bf9\u8c61<span>\u300d</span></strong>\r\n<ul style='margin-top: 8px; margin-bottom: 8px; padding-left: 25px; font-size: 15px; color: #595959; list-style-type: square;'>\r\n<li><section style='margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; font-size: 14px; font-weight: normal; color: #595959;'><code style='font-size: 14px; word-wrap: break-word; margin: 0 2px; background-color: rgba(27,31,35,.05); font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; word-break: break-all; color: #3594F7; background: RGBA(59, 170, 250, .1); display: inline-block; padding: 0 2px; border-radius: 2px; height: 21px; line-height: 22px;'>Pattern pattern = Pattern.compile(regex); // \u5c01\u88c5\u6b63\u5219\u8868\u8fbe\u5f0f</code></section></li><li><section style='margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; font-size: 14px; font-weight: normal; color: #595959;'><code style='font-size: 14px; word-wrap: break-word; margin: 0 2px; background-color: rgba(27,31,35,.05); font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; word-break: break-all; color: #3594F7; background: RGBA(59, 170, 250, .1); display: inline-block; padding: 0 2px; border-radius: 2px; height: 21px; line-height: 22px;'>Pattern pattern = Pattern.compile(String regex,int flags); //flags\u8bbe\u7f6e\u5339\u914d\u6a21\u5f0f</code></section></li><li><section style='margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; font-size: 14px; font-weight: normal; color: #595959;'><code style='font-size: 14px; word-wrap: break-word; margin: 0 2px; background-color: rgba(27,31,35,.05); font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; word-break: break-all; color: #3594F7; background: RGBA(59, 170, 250, .1); display: inline-block; padding: 0 2px; border-radius: 2px; height: 21px; line-height: 22px;'>flags\u6709\u6548\u503c\u2b07\ufe0f</code> <br><strong style='color: #3594F7; font-weight: bold;'><span>\u300c</span>Pattern.CASE_INSENSITIVE\u3001Pattern.MULTILINE\u3001Pattern.DOTALL\u3001Pattern.UNICODE_CASE\u3001Pattern.CANON_EQ<span>\u300d</span></strong></section></li></ul>\r\n</section></li><li><section style='margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; font-size: 14px; font-weight: normal; color: #595959;'><strong style='color: #3594F7; font-weight: bold;'><span>\u300c</span>3.\u5f97\u5230matcher \u5bf9\u8c61<span>\u300d</span></strong>\r\n<ul style='margin-top: 8px; margin-bottom: 8px; padding-left: 25px; font-size: 15px; color: #595959; list-style-type: square;'>\r\n<li><section style='margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; font-size: 14px; font-weight: normal; color: #595959;'><code style='font-size: 14px; word-wrap: break-word; margin: 0 2px; background-color: rgba(27,31,35,.05); font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; word-break: break-all; color: #3594F7; background: RGBA(59, 170, 250, .1); display: inline-block; padding: 0 2px; border-radius: 2px; height: 21px; line-height: 22px;'>Matcher matcher = pattern.matcher(String dataSource) // dataSource\u5c31\u662f\u6570\u636e\u6e90</code></section></li><li><section style='margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; font-size: 14px; font-weight: normal; color: #595959;'><strong style='color: #3594F7; font-weight: bold;'><span>\u300c</span>pattern \u8c03\u7528 matcher() \u65b9\u6cd5\u8fd4\u56de\u4e00\u4e2a Matcher \u7c7b\u578b\u5bf9\u8c61<span>\u300d</span></strong></section></li></ul>\r\n</section></li><li><section style='margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; font-size: 14px; font-weight: normal; color: #595959;'><strong style='color: #3594F7; font-weight: bold;'><span>\u300c</span>4.\u68c0\u7d22\u6570\u636e<span>\u300d</span></strong>\r\n<ul style='margin-top: 8px; margin-bottom: 8px; padding-left: 25px; font-size: 15px; color: #595959; list-style-type: square;'>\r\n<li><section style='margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; font-size: 14px; font-weight: normal; color: #595959;'><code style='font-size: 14px; word-wrap: break-word; margin: 0 2px; background-color: rgba(27,31,35,.05); font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; word-break: break-all; color: #3594F7; background: RGBA(59, 170, 250, .1); display: inline-block; padding: 0 2px; border-radius: 2px; height: 21px; line-height: 22px;'>\u901a\u8fc7\u5404\u79cd\u65b9\u6cd5\u68c0\u7d22dataSource\u4e2d\u7684\u6570\u636e</code></section></li></ul>\r\n</section></li></ul>\r\n</section></li><li><section style='margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; font-size: 14px; font-weight: normal; color: #595959;'>\ud83c\udf1f<strong style='color: #3594F7; font-weight: bold;'><span>\u300c</span>Matcher\u7c7b\u7684\u5e38\u7528\u65b9\u6cd5<span>\u300d</span></strong>\r\n<ul style='margin-top: 8px; margin-bottom: 8px; padding-left: 25px; font-size: 15px; color: #595959; list-style-type: square;'>\r\n<li><section style='margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; font-size: 14px; font-weight: normal; color: #595959;'><strong style='color: #3594F7; font-weight: bold;'><span>\u300c</span><code style='font-size: 14px; word-wrap: break-word; margin: 0 2px; background-color: rgba(27,31,35,.05); font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; word-break: break-all; color: #3594F7; background: RGBA(59, 170, 250, .1); display: inline-block; padding: 0 2px; border-radius: 2px; height: 21px; line-height: 22px;'>public boolean find() \u4e0e public boolean find(int start)</code><span>\u300d</span></strong> <br> <strong style='color: #3594F7; font-weight: bold;'><span>\u300c</span>\u5bfb\u627e\u4e0eregex\u5339\u914d\u7684<code style='font-size: 14px; word-wrap: break-word; margin: 0 2px; background-color: rgba(27,31,35,.05); font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; word-break: break-all; color: #3594F7; background: RGBA(59, 170, 250, .1); display: inline-block; padding: 0 2px; border-radius: 2px; height: 21px; line-height: 22px;'>\u4e0b\u4e00\u4e2a</code>\u5b50\u5e8f\u5217<span>\u300d</span></strong>\r\n<ul style='margin-top: 8px; margin-bottom: 8px; padding-left: 25px; font-size: 15px; color: #595959; list-style-type: square;'>\r\n<li><section style='margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; font-size: 14px; font-weight: normal; color: #595959;'><strong style='color: #3594F7; font-weight: bold;'><span>\u300c</span><em style='font-style: normal; color: #3594F7; font-weight: bold;'>.start() // \u5b50\u5e8f\u5217\u5f00\u59cb\u4f4d\u7f6e</em><span>\u300d</span></strong></section></li><li><section style='margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; font-size: 14px; font-weight: normal; color: #595959;'><strong style='color: #3594F7; font-weight: bold;'><span>\u300c</span><em style='font-style: normal; color: #3594F7; font-weight: bold;'>.end() // ~\u7ed3\u675f\u4f4d\u7f6e</em><span>\u300d</span></strong></section></li></ul>\r\n</section></li><li><section style='margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; font-size: 14px; font-weight: normal; color: #595959;'><strong style='color: #3594F7; font-weight: bold;'><span>\u300c</span><code style='font-size: 14px; word-wrap: break-word; margin: 0 2px; background-color: rgba(27,31,35,.05); font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; word-break: break-all; color: #3594F7; background: RGBA(59, 170, 250, .1); display: inline-block; padding: 0 2px; border-radius: 2px; height: 21px; line-height: 22px;'>public boolean lookingAt() // \u5224\u65ad\u662f\u5426\u6709\u5339\u914d\u7684\u5b50\u5e8f\u5217\uff08\u53ea\u770b\u4e00\u6b21\uff09</code><span>\u300d</span></strong>\r\n<ul style='margin-top: 8px; margin-bottom: 8px; padding-left: 25px; font-size: 15px; color: #595959; list-style-type: square;'>\r\n<li><section style='margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; font-size: 14px; font-weight: normal; color: #595959;'><strong style='color: #3594F7; font-weight: bold;'><span>\u300c</span><em style='font-style: normal; color: #3594F7; font-weight: bold;'>.start() // \u5b50\u5e8f\u5217\u5f00\u59cb\u4f4d\u7f6e</em><span>\u300d</span></strong></section></li><li><section style='margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; font-size: 14px; font-weight: normal; color: #595959;'><strong style='color: #3594F7; font-weight: bold;'><span>\u300c</span><em style='font-style: normal; color: #3594F7; font-weight: bold;'>.end() // ~\u7ed3\u675f\u4f4d\u7f6e</em><span>\u300d</span></strong></section></li></ul>\r\n</section></li><li><section style='margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; font-size: 14px; font-weight: normal; color: #595959;'><strong style='color: #3594F7; font-weight: bold;'><span>\u300c</span><code style='font-size: 14px; word-wrap: break-word; margin: 0 2px; background-color: rgba(27,31,35,.05); font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; word-break: break-all; color: #3594F7; background: RGBA(59, 170, 250, .1); display: inline-block; padding: 0 2px; border-radius: 2px; height: 21px; line-height: 22px;'>public boolean matchers() // \u662f\u5426\u5b8c\u5168\u5339\u914d</code><span>\u300d</span></strong></section></li><li><section style='margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; font-size: 14px; font-weight: normal; color: #595959;'><strong style='color: #3594F7; font-weight: bold;'><span>\u300c</span><code style='font-size: 14px; word-wrap: break-word; margin: 0 2px; background-color: rgba(27,31,35,.05); font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; word-break: break-all; color: #3594F7; background: RGBA(59, 170, 250, .1); display: inline-block; padding: 0 2px; border-radius: 2px; height: 21px; line-height: 22px;'>public String replaceAll(String replacement) // \u8fd4\u56de\u4e00\u4e2a\u6240\u6709\u80fd\u5339\u914d\u5230\u7684\u5b50\u5e8f\u5217\u66ff\u6362\u6210replacement\u7684\u65b0String\u5bf9\u8c61</code><span>\u300d</span></strong></section></li><li><section style='margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; font-size: 14px; font-weight: normal; color: #595959;'><strong style='color: #3594F7; font-weight: bold;'><span>\u300c</span><code style='font-size: 14px; word-wrap: break-word; margin: 0 2px; background-color: rgba(27,31,35,.05); font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; word-break: break-all; color: #3594F7; background: RGBA(59, 170, 250, .1); display: inline-block; padding: 0 2px; border-radius: 2px; height: 21px; line-height: 22px;'>public String replaceFirst(String replacement) // \u548c\u4e0a\u9762\u7684\u7c7b\u4f3c\uff0c\u53ea\u4e0d\u8fc7\u53ea\u66ff\u6362\u7b2c\u4e00\u4e2a</code><span>\u300d</span></strong></section></li></ul>\r\n</section></li></ul>\r\n</section>\u3002", "top": 0, "createdAt": 1719245753, "style": "", "script": "<script src='https://blog.meekdai.com/Gmeek/plugins/GmeekTOC.js'></script>", "head": "", "ogImage": "https://avatars.githubusercontent.com/u/157597971?s=400&u=a97f3580e282268c6eafe9d807c5b1dfdf02d1d7&v=4", "createdDate": "2024-06-25", "dateLabelColor": "#bc4c00"}, "P11": {"htmlDir": "docs/post/Swing-ji-chu.html", "labels": ["GUI"], "postTitle": "Swing\u57fa\u7840", "postUrl": "post/Swing-ji-chu.html", "postSourceUrl": "https://github.com/Panda-Z-Coding/Panda-Z-Coding.github.io/issues/11", "commentNum": 0, "wordCount": 4335, "description": "# GUI\u5e38\u7528\ud83d\ude2d\r\n\r\n### \u5bb9\u5668\uff08Containers\uff09\r\n\r\n#### JFrame - \u9ed8\u8ba4\u5e03\u5c40\uff1aBorderLatout\r\n- `setTitle(String title)`\uff1a\u8bbe\u7f6e\u7a97\u53e3\u6807\u9898\u3002", "top": 0, "createdAt": 1719410245, "style": "", "script": "<script src='https://blog.meekdai.com/Gmeek/plugins/GmeekTOC.js'></script>", "head": "", "ogImage": "https://avatars.githubusercontent.com/u/157597971?s=400&u=a97f3580e282268c6eafe9d807c5b1dfdf02d1d7&v=4", "createdDate": "2024-06-26", "dateLabelColor": "#bc4c00"}, "P12": {"htmlDir": "docs/post/`StringBuffer` -lei-chang-yong-fang-fa-\ud83d\udc4d.html", "labels": ["Java-\u5e38\u7528\u5b9e\u7528\u7c7b"], "postTitle": "`StringBuffer` \u7c7b\u5e38\u7528\u65b9\u6cd5\ud83d\udc4d", "postUrl": "post/%60StringBuffer%60%20-lei-chang-yong-fang-fa-%F0%9F%91%8D.html", "postSourceUrl": "https://github.com/Panda-Z-Coding/Panda-Z-Coding.github.io/issues/12", "commentNum": 0, "wordCount": 1190, "description": "### `StringBuffer`\r\n\r\n--------------\r\n\r\n1. **\u6784\u9020\u65b9\u6cd5**\r\n - `StringBuffer()`\uff1a\u521b\u5efa\u4e00\u4e2a\u7a7a\u7684 `StringBuffer` \u5bf9\u8c61\u3002", "top": 0, "createdAt": 1719420024, "style": "", "script": "<script src='https://blog.meekdai.com/Gmeek/plugins/GmeekTOC.js'></script>", "head": "", "ogImage": "https://avatars.githubusercontent.com/u/157597971?s=400&u=a97f3580e282268c6eafe9d807c5b1dfdf02d1d7&v=4", "createdDate": "2024-06-27", "dateLabelColor": "#bc4c00"}, "P13": {"htmlDir": "docs/post/ri-qi-he-shi-jian-de-lei-de-fang-fa-\ud83e\udd14.html", "labels": ["Java\u57fa\u7840"], "postTitle": "\u65e5\u671f\u548c\u65f6\u95f4\u7684\u7c7b\u7684\u65b9\u6cd5\ud83e\udd14", "postUrl": "post/ri-qi-he-shi-jian-de-lei-de-fang-fa-%F0%9F%A4%94.html", "postSourceUrl": "https://github.com/Panda-Z-Coding/Panda-Z-Coding.github.io/issues/13", "commentNum": 0, "wordCount": 4032, "description": "`java.time` \u5305\u63d0\u4f9b\u4e86\u5904\u7406\u65e5\u671f\u548c\u65f6\u95f4\u7684\u7c7b\uff0c\u5305\u62ec `LocalDate`\u3001`LocalDateTime` \u548c `LocalTime`\u3002", "top": 0, "createdAt": 1719420752, "style": "", "script": "<script src='https://blog.meekdai.com/Gmeek/plugins/GmeekTOC.js'></script>", "head": "", "ogImage": "https://avatars.githubusercontent.com/u/157597971?s=400&u=a97f3580e282268c6eafe9d807c5b1dfdf02d1d7&v=4", "createdDate": "2024-06-27", "dateLabelColor": "#bc4c00"}, "P14": {"htmlDir": "docs/post/GUI-xiao-li-zi---xuan-ze-ti.html", "labels": ["GUI"], "postTitle": "GUI\u5c0f\u6817\u5b50-\u9009\u62e9\u9898", "postUrl": "post/GUI-xiao-li-zi---xuan-ze-ti.html", "postSourceUrl": "https://github.com/Panda-Z-Coding/Panda-Z-Coding.github.io/issues/14", "commentNum": 0, "wordCount": 2555, "description": "# `\u4e00\u4e2a\u7b80\u5355\u7684GUI\u7a0b\u5e8f`\r\n\r\n\u9644\u5e26\u4e86\u6ce8\u91ca\u4e86\uff0c\u5e94\u8be5\u80fd\u8bb2\u660e\u767d\r\n\r\n```java\r\nimport javax.swing.*;\r\nimport java.awt.*;\r\nimport java.awt.event.ActionEvent;\r\nimport java.awt.event.ActionListener;\r\n\r\npublic class ExamGUI {\r\n public static void main(String[] args) {\r\n JFrame frame = new JFrame('\u5b66\u751f\u8003\u8bd5\u7cfb\u7edf'); //\u521b\u5efa\u5e95\u5c42\u5bb9\u5668\r\n frame.setSize(400, 250);\r\n\r\n JPanel panel = new JPanel(); //\u521b\u5efa\u4e00\u4e2a\u9762\u677f\uff0c\u65b9\u4fbf\u7ba1\u7406\r\n frame.add(panel);\r\n placeComponents(panel); // \u81ea\u5df1\u5199\u7684\u4e00\u4e2a\u51fd\u6570\uff0c\u7528\u6765\u63a7\u5236\u8fd9\u4e2a\u9762\u677f\r\n\r\n frame.setVisible(true);\r\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); //\u521b\u5efa\u7a97\u53e3\u5fc5\u5907\u4e24\u884c\u4ee3\u7801\r\n }\r\n\r\n private static void placeComponents(JPanel panel) {\r\n panel.setLayout(null); //\u8bbe\u7f6e\u4e3a\u81ea\u7531\u5e03\u5c40\r\n\r\n // \u6d41\u7a0b\uff1a1.\u521b\u5efa\u9700\u8981\u7684\u7ec4\u4ef6 2.\u8bbe\u7f6e\u7ec4\u4ef6\u7684\u4f4d\u7f6e\u6216\u8005\u5176\u4ed6\u521d\u59cb\u5316\u4fe1\u606f 3.add\u5230\u5bb9\u5668\u91cc\r\n\r\n JLabel questionLabel = new JLabel('\u95ee\u9898\uff1aJava\u662f\u7531\u54ea\u4e2a\u516c\u53f8\u5f00\u53d1\u7684\uff1f'); //JLabel\u662f\u4e00\u4e2a\u6807\u7b7e\r\n questionLabel.setBounds(20, 20, 300, 30); // \u8bbe\u7f6e\u5728\u9762\u677f\u91cc\u9762\u7684\u4f4d\u7f6e\u548c\u5927\u5c0f\r\n panel.add(questionLabel);\r\n\r\n JRadioButton option1 = new JRadioButton('A. Oracle');\r\n option1.setBounds(20, 50, 100, 30);\r\n panel.add(option1);\r\n\r\n JRadioButton option2 = new JRadioButton('B. Microsoft');\r\n option2.setBounds(20, 80, 100, 30);\r\n panel.add(option2);\r\n\r\n JRadioButton option3 = new JRadioButton('C. IBM');\r\n option3.setBounds(20, 110, 100, 30);\r\n panel.add(option3);\r\n\r\n ButtonGroup group = new ButtonGroup(); // ButtonGroup \u662f\u4e00\u4e2a\u4e0d\u53ef\u89c1\u7684\u7ec4\u4ef6\uff0c\u5b83\u53ef\u4ee5\u628a\u51e0\u4e2a\u6309\u94ae\u7ed1\u5b9a\u5728\u4e00\u8d77\uff0c\u8ba9\u5b83\u4eec\u53ea\u80fd\u9009\u4e00\u4e2a\r\n group.add(option1);\r\n group.add(option2);\r\n group.add(option3);\r\n\r\n JButton submitButton = new JButton('\u63d0\u4ea4');\r\n submitButton.setBounds(20, 140, 80, 30);\r\n panel.add(submitButton);\r\n\r\n JLabel resultLabel = new JLabel();\r\n resultLabel.setBounds(120, 140, 200, 30);\r\n panel.add(resultLabel);\r\n\r\n submitButton.addActionListener(new ActionListener() { // \u628asubmitButton\u6ce8\u518c\u6210\u4e3a\u4e00\u4e2a\u76d1\u89c6\u5668\uff0c\u533f\u540d\u7c7b\u505a\u76d1\u89c6\u5668\uff0c\u5c31\u4e0d\u7528\u518d\u53bb\u5199\u4e00\u4e2a\u7c7b\u4e86\r\n @Override // \u8fd9\u4e00\u4e2a\u65b9\u6cd5\u91cc\u9762\u8981\u4f20\u5165\u7684\u662fActionListener\u7684\u7c7b\u6216\u8005\u5b50\u7c7b\r\n public void actionPerformed(ActionEvent e) { // \u6240\u4ee5\u8fd9\u91cc\u7528 `\u533f\u540d\u7c7b` \u91cd\u5199\u4e86actionPerformed\u65b9\u6cd5``\r\n if (option1.isSelected()) { // .isSelected() \u7528\u6765\u67e5\u770b\u8c01\u88ab\u70b9\u51fb\u4e86\r\n resultLabel.setText('\u7b54\u6848\u6b63\u786e\uff01');\r\n } else {\r\n resultLabel.setText('\u7b54\u6848\u9519\u8bef\uff01');\r\n }\r\n }\r\n });\r\n }\r\n}\r\n```\r\n\r\n\u8fd0\u884c\u7ed3\u679c\uff1a\u2b07\ufe0f\r\n![Snipaste_2024-06-27_10-32-12](https://github.com/Panda-Z-Coding/Panda-Z-Coding.github.io/assets/157597971/ca1d7bf4-d167-4a4e-9cc0-caf6d62159b2)\r\n\u3002", "top": 0, "createdAt": 1719455691, "style": "", "script": "<script src='https://blog.meekdai.com/Gmeek/plugins/GmeekTOC.js'></script>", "head": "", "ogImage": "https://avatars.githubusercontent.com/u/157597971?s=400&u=a97f3580e282268c6eafe9d807c5b1dfdf02d1d7&v=4", "createdDate": "2024-06-27", "dateLabelColor": "#bc4c00"}, "P15": {"htmlDir": "docs/post/I-O-liu.html", "labels": ["I/O"], "postTitle": "I/O\u6d41", "postUrl": "post/I-O-liu.html", "postSourceUrl": "https://github.com/Panda-Z-Coding/Panda-Z-Coding.github.io/issues/15", "commentNum": 0, "wordCount": 3266, "description": "`Gmeek-html<iframe style='border-radius:12px' src='https://open.spotify.com/embed/track/6Hu62PMTZtYh69FeEUrNBh?utm_source=generator' width='100%' height='152' frameBorder='0' allowfullscreen='' allow='autoplay; clipboard-write; encrypted-media; fullscreen; picture-in-picture' loading='lazy'></iframe>`\r\n\r\n# **`I/O\u6d41-\u7b80\u6613\u7248\ud83d\ude09`**\r\n\r\n> \ud83d\ude0bLive is suck but you will like it\r\n\r\n### 1. File\u7c7b - _\u7528\u6765\u83b7\u53d6\u6587\u4ef6\u4fe1\u606f_\r\n- **\u83b7\u53d6\u6587\u4ef6\u5c5e\u6027**\uff1a\r\n - `getName()`\uff1a\u83b7\u53d6\u6587\u4ef6\u540d\u3002", "top": 0, "createdAt": 1719459933, "style": "", "script": "<script src='https://blog.meekdai.com/Gmeek/plugins/GmeekTOC.js'></script>", "head": "", "ogImage": "https://avatars.githubusercontent.com/u/157597971?s=400&u=a97f3580e282268c6eafe9d807c5b1dfdf02d1d7&v=4", "createdDate": "2024-06-27", "dateLabelColor": "#bc4c00"}, "P16": {"htmlDir": "docs/post/Python--pai-xu-suan-fa.html", "labels": ["Python"], "postTitle": "Python-\u6392\u5e8f\u7b97\u6cd5", "postUrl": "post/Python--pai-xu-suan-fa.html", "postSourceUrl": "https://github.com/Panda-Z-Coding/Panda-Z-Coding.github.io/issues/16", "commentNum": 0, "wordCount": 4488, "description": "\u56db\u79cd\u5e38\u89c1\u7684\u6392\u5e8f\u7b97\u6cd5\u7684\u8be6\u7ec6\u89e3\u91ca\u53ca\u5176\u5bf9\u5e94\u7684Python\u4ee3\u7801\u5b9e\u73b0\uff1a\r\n\r\n1. **\u5192\u6ce1\u6392\u5e8f\uff08Bubble Sort\uff09**\r\n2. **\u5806\u6392\u5e8f\uff08Heap Sort\uff09**\r\n3. **\u63d2\u5165\u6392\u5e8f\uff08Insertion Sort\uff09**\r\n4. **\u9009\u62e9\u6392\u5e8f\uff08Selection Sort\uff09**\r\n\r\n---\r\n\r\n## 1. \u5192\u6ce1\u6392\u5e8f\uff08Bubble Sort\uff09\r\n\r\n### **\u7b97\u6cd5\u7b80\u4ecb**\r\n\u5192\u6ce1\u6392\u5e8f\u662f\u4e00\u79cd\u7b80\u5355\u7684\u6392\u5e8f\u7b97\u6cd5\uff0c\u91cd\u590d\u5730\u904d\u5386\u8981\u6392\u5e8f\u7684\u6570\u5217\uff0c\u4e00\u6b21\u6bd4\u8f83\u76f8\u90bb\u7684\u4e24\u4e2a\u5143\u7d20\uff0c\u5982\u679c\u5b83\u4eec\u7684\u987a\u5e8f\u9519\u8bef\u5c31\u628a\u5b83\u4eec\u4ea4\u6362\u8fc7\u6765\u3002", "top": 0, "createdAt": 1726668548, "style": "", "script": "<script src='https://blog.meekdai.com/Gmeek/plugins/GmeekTOC.js'></script>", "head": "", "ogImage": "https://avatars.githubusercontent.com/u/157597971?s=400&u=a97f3580e282268c6eafe9d807c5b1dfdf02d1d7&v=4", "createdDate": "2024-09-18", "dateLabelColor": "#bc4c00"}, "P17": {"htmlDir": "docs/post/-Python--lian-biao-shi-xian.html", "labels": ["Python", "\u6570\u636e\u7ed3\u6784\u4e0e\u7b97\u6cd5"], "postTitle": "<Python>\u94fe\u8868\u5b9e\u73b0", "postUrl": "post/-Python--lian-biao-shi-xian.html", "postSourceUrl": "https://github.com/Panda-Z-Coding/Panda-Z-Coding.github.io/issues/17", "commentNum": 0, "wordCount": 4005, "description": "# Python\u7b97\u6cd5\u5b9e\u4f8b\u7cbe\u7b80\r\n## \u94fe\u8868\uff08link\uff09\r\n```python\r\nclass Node:\r\n def __init__(self, data):\r\n self.data = data\r\n self.next = None \r\n return\r\n def has_value(self, value):\r\n if self.data == value:\r\n return True\r\n else:\r\n return False\r\n#! \u5b9a\u4e49\u4e00\u4e2a\u503c\u4e3a 1 \u7684\u8282\u70b9\r\n#? Node(1)\r\n\r\n#\u94fe\u8868\u7c7b\r\n'''\r\nhead -> \u5934\u8282\u70b9\r\ntail -> \u5c3e\u8282\u70b9\r\nlength -> \u957f\u5ea6\r\n'''\r\n\r\n'''\r\nisempty()\r\nadd_Node(self, item)\r\ninsert_node(self, index, data)\r\ndelete_node_byid(self, item_id)\r\nfind_node(self, value)\r\nprint_link(self)\r\n'''\r\n\r\nclass singlelink:\r\n def __init__(self):\r\n self.head = None\r\n self.tail = None\r\n self.length = 0\r\n return\r\n def isempty(self):\r\n return self.length == 0\r\n #? \u5c3e\u90e8\u6dfb\u52a0\u8282\u70b9\r\n def add_Node(self, item):\r\n if not isinstance(item, Node): #! isinstance(\u5bf9\u8c61, \u7c7b)\u68c0\u67e5\u662f\u5426\u662f\u8fd9\u4e2a\u7c7b\r\n item = Node(item)\r\n if self.head is None:\r\n self.head = item\r\n self.tail = item\r\n else:\r\n self.tail.next = item\r\n self.tail = item\r\n self.length += 1\r\n return\r\n #? \u63d2\u5165\u8282\u70b9\r\n def insert_node(self, index, data):\r\n if self.isempty(): # \u5982\u679c\u94fe\u8868\u4e3a\u7a7a\r\n if index == 0: # \u5728\u7d22\u5f150\u7684\u4f4d\u7f6e\u63d2\u5165\u8282\u70b9\r\n self.head = Node(data)\r\n self.tail = self.head\r\n else:\r\n print('error: out of index')\r\n else: # \u5982\u679c\u94fe\u8868\u4e0d\u4e3a\u7a7a\r\n if index < 0 or index > self.length: # \u5982\u679c\u63d2\u5165\u4f4d\u7f6e\u4e0d\u5728\u94fe\u8868\u8303\u56f4\u5185\r\n print('error: out of index')\r\n else:\r\n item = Node(data) # \u521b\u5efa\u8282\u70b9\r\n if index == 0: # \u5982\u679c\u63d2\u5165\u4f4d\u7f6e\u4e3a\u94fe\u8868\u5934\u90e8\r\n item.next = self.head\r\n self.head = item\r\n else:\r\n node = self.head\r\n j = 0\r\n while j < index - 1 and node.next: # \u627e\u5230\u63d2\u5165\u4f4d\u7f6e\u7684\u524d\u4e00\u4e2a\u8282\u70b9\r\n node = node.next\r\n j += 1\r\n item.next = node.next # \u5728\u63d2\u5165\u4f4d\u7f6e\u63d2\u5165\u8282\u70b9\r\n node.next = item\r\n self.length += 1 # \u94fe\u8868\u957f\u5ea6\u52a01\r\n\r\n #? \u901a\u8fc7\u7d22\u5f15\u5220\u9664\u8282\u70b9\r\n def delete_node_byid(self, item_id):\r\n if self.isempty(): # \u5982\u679c\u94fe\u8868\u4e3a\u7a7a\r\n print('error: link is empty')\r\n return\r\n\r\n id = 1\r\n current_node = self.head # \u5f53\u524d\u8282\u70b9\r\n previous_node = None\r\n\r\n while current_node: # \u5f53\u5f53\u524d\u8282\u70b9\u4e0d\u4e3a\u7a7a\u65f6\r\n if id == item_id:\r\n if previous_node is not None:\r\n previous_node.next = current_node.next\r\n else:\r\n self.head = current_node.next # \u5982\u679c\u4e0a\u4e00\u4e2a\u8282\u70b9\u662f\u7a7a\u7684\uff08\u4e5f\u5c31\u662flink\u662f\u7a7a\u7684\uff09\r\n return\r\n previous_node = current_node\r\n current_node = current_node.next # \u8fd9\u4e24\u884c\u662f\u4e3a\u4e86\u628a\u6307\u9488\u5411\u4e0b\u4e00\u4e2a\u8282\u70b9\u79fb\u52a8\r\n id += 1\r\n\r\n self.length -= 1\r\n\r\n #? \u901a\u8fc7\u6570\u503c\u5728\u94fe\u8868\u4e2d\u627e\u5230\u8282\u70b9\r\n def find_node(self, value):\r\n current_node = self.head\r\n node_id = 1\r\n results = [] # \u53ef\u80fd\u5b58\u5728\u591a\u4e2a\u4e00\u6837\u7684\u503c\r\n while current_node is not None:\r\n if current_node.has_value(value):\r\n results.append(node_id)\r\n current_node = current_node.next\r\n node_id += 1\r\n return results\r\n #? \u6309\u987a\u5e8f\u8f93\u51fa\u94fe\u8868\r\n def print_link(self):\r\n current_node = self.head\r\n while current_node is not None:\r\n print(current_node.data,end=' ')\r\n current_node = current_node.next\r\n return\r\n\r\nnode1 = Node(1)\r\nnode2 = Node(2)\r\nnode3 = Node(3)\r\nprint('-----------')\r\nlink = singlelink()\r\nfor node in [node1,node2,node3]:\r\n link.add_Node(node)\r\nlink.print_link() \r\nprint(f'\u94fe\u8868\u957f\u5ea6\u4e3a{link.length}')\r\nprint('-----------')\r\nlink.insert_node(2,6)\r\nlink.print_link()\r\nprint(f'\u94fe\u8868\u957f\u5ea6\u4e3a{link.length}')\r\nlink.delete_node_byid(1)\r\nlink.print_link()\r\nprint(f'\u94fe\u8868\u957f\u5ea6\u4e3a{link.length}')\r\nlink.add_Node(Node(2))\r\nlink.print_link()\r\nprint()\r\nprint(f'find 2 element : {link.find_node(2)}')\r\nprint('-----------')\r\n```\r\n- \u8fd0\u884c\u2b07\ufe0f\r\n![Snipaste_2024-10-02_17-46-25](https://github.com/user-attachments/assets/8c39ccdc-ab3b-4eed-ab5e-4a1dbe3fc5e1)\r\n\r\n\u3002", "top": 0, "createdAt": 1727862461, "style": "", "script": "<script src='https://blog.meekdai.com/Gmeek/plugins/GmeekTOC.js'></script>", "head": "", "ogImage": "https://avatars.githubusercontent.com/u/157597971?s=400&u=a97f3580e282268c6eafe9d807c5b1dfdf02d1d7&v=4", "createdDate": "2024-10-02", "dateLabelColor": "#bc4c00"}}, "singeListJson": {}, "labelColorDict": {"bug": "#d73a4a", "GUI": "#e99695", "I/O": "#273F8A", "Java-\u5e38\u7528\u5b9e\u7528\u7c7b": "#8086ED", "Java\u57fa\u7840": "#14842D", "Python": "#7ACBB2", "question": "#d876e3", "\u5b50\u7236\u7ee7\u627f": "#83683A", "\u6570\u636e\u7ed3\u6784\u4e0e\u7b97\u6cd5": "#E9D27C", "\u65e5\u5e38": "#C5DEF5"}, "displayTitle": "This is PanDaCo", "faviconUrl": "https://avatars.githubusercontent.com/u/157597971?s=400&u=a97f3580e282268c6eafe9d807c5b1dfdf02d1d7&v=4", "ogImage": "https://avatars.githubusercontent.com/u/157597971?s=400&u=a97f3580e282268c6eafe9d807c5b1dfdf02d1d7&v=4", "primerCSS": "<link href='https://mirrors.sustech.edu.cn/cdnjs/ajax/libs/Primer/21.0.7/primer.css' rel='stylesheet' />", "homeUrl": "https://Panda-Z-Coding.github.io", "prevUrl": "/index.html", "nextUrl": "disabled"}