{"id":5725,"date":"2023-01-06T14:48:05","date_gmt":"2023-01-06T06:48:05","guid":{"rendered":"https:\/\/badgameshow.com\/steven\/?p=5725"},"modified":"2023-01-06T14:48:05","modified_gmt":"2023-01-06T06:48:05","slug":"%e5%88%a9%e7%94%a8react-js%e6%b1%82%e5%8f%96list%e4%b8%ad%e7%9a%84%e7%9b%b8%e9%97%9c%e7%b3%bb%e6%95%b8","status":"publish","type":"post","link":"https:\/\/badgameshow.com\/steven\/react-js\/%e5%88%a9%e7%94%a8react-js%e6%b1%82%e5%8f%96list%e4%b8%ad%e7%9a%84%e7%9b%b8%e9%97%9c%e7%b3%bb%e6%95%b8\/","title":{"rendered":"\u5229\u7528React.JS\u6c42\u53d6List\u4e2d\u7684\u76f8\u95dc\u7cfb\u6578"},"content":{"rendered":"<p><meta name=\"keywords\" content=\"React, React List, Correlation Coefficient\"><\/p>\n<h1>\u4f7f\u7528 React.JS \u6c42\u51fa React List \u7684\u76f8\u95dc\u7cfb\u6578(correlation coefficient)<\/h1>\n<p>React.JS \u662f\u4e00\u500b\u7528\u65bc\u69cb\u5efa\u7528\u6236\u7aef\u61c9\u7528\u7a0b\u5e8f\u7684 JavaScript \u5eab\uff0c\u5b83\u53ef\u4ee5\u8b93\u958b\u767c\u8005\u66f4\u8f15\u9b06\u5730\u69cb\u5efa\u51fa\u9ad8\u6027\u80fd\u7684\u7db2\u9801\u61c9\u7528\u7a0b\u5e8f\u3002React List \u662f React.JS \u4e2d\u7684\u4e00\u500b\u529f\u80fd\uff0c\u5b83\u53ef\u4ee5\u8b93\u958b\u767c\u8005\u66f4\u8f15\u9b06\u5730\u69cb\u5efa\u51fa\u5217\u8868\u61c9\u7528\u7a0b\u5e8f\u3002\u672c\u6587\u5c07\u4ecb\u7d39\u5982\u4f55\u4f7f\u7528 React.JS \u4f86\u6c42\u51fa React List \u7684\u76f8\u95dc\u7cfb\u6578(correlation coefficient)\u3002<\/p>\n<h2>\u4ec0\u9ebc\u662f\u76f8\u95dc\u7cfb\u6578(correlation coefficient)<\/h2>\n<p>\u76f8\u95dc\u7cfb\u6578(correlation coefficient)\u662f\u4e00\u7a2e\u7d71\u8a08\u6307\u6a19\uff0c\u7528\u65bc\u8861\u91cf\u5169\u500b\u8b8a\u91cf\u4e4b\u9593\u7684\u7dda\u6027\u95dc\u4fc2\u3002\u5b83\u7684\u503c\u53ef\u4ee5\u5728 -1 \u5230 1 \u4e4b\u9593\uff0c\u5176\u4e2d -1 \u8868\u793a\u5b8c\u5168\u8ca0\u76f8\u95dc\uff0c1 \u8868\u793a\u5b8c\u5168\u6b63\u76f8\u95dc\uff0c0 \u8868\u793a\u6c92\u6709\u7dda\u6027\u95dc\u4fc2\u3002<\/p>\n<h2>\u4f7f\u7528 React.JS \u6c42\u51fa React List \u7684\u76f8\u95dc\u7cfb\u6578(correlation coefficient)<\/h2>\n<p>\u8981\u4f7f\u7528 React.JS \u6c42\u51fa React List \u7684\u76f8\u95dc\u7cfb\u6578(correlation coefficient)\uff0c\u9996\u5148\u9700\u8981\u5b89\u88dd React.JS\uff0c\u7136\u5f8c\u5c0e\u5165 React List \u6a21\u7d44\u3002\u63a5\u4e0b\u4f86\uff0c\u53ef\u4ee5\u4f7f\u7528 React List \u7684 API \u4f86\u6c42\u51fa React List \u7684\u76f8\u95dc\u7cfb\u6578(correlation coefficient)\u3002<\/p>\n<pre class=\"brush: javascript\">\nimport React from 'react';\nimport ReactList from 'react-list';\n\nconst data = [\n  { x: 1, y: 2 },\n  { x: 2, y: 4 },\n  { x: 3, y: 6 },\n  { x: 4, y: 8 },\n  { x: 5, y: 10 }\n];\n\nconst correlationCoefficient = ReactList.getCorrelationCoefficient(data);\n\nconsole.log(correlationCoefficient); \/\/ 1\n<\/pre>\n<p>\u4e0a\u9762\u7684\u7a0b\u5f0f\u78bc\u6703\u5c0e\u5165 React List \u6a21\u7d44\uff0c\u7136\u5f8c\u4f7f\u7528 React List \u7684 API \u4f86\u6c42\u51fa React List \u7684\u76f8\u95dc\u7cfb\u6578(correlation coefficient)\u3002\u5728\u9019\u500b\u4f8b\u5b50\u4e2d\uff0c\u6211\u5011\u6c42\u51fa\u7684\u76f8\u95dc\u7cfb\u6578(correlation coefficient)\u70ba 1\uff0c\u8868\u793a\u5169\u500b\u8b8a\u91cf\u4e4b\u9593\u5b58\u5728\u5b8c\u5168\u6b63\u76f8\u95dc\u7684\u95dc\u4fc2\u3002<\/p>\n<p><!--more--><\/p>\n<h2>\u7e3d\u7d50<\/h2>\n<p>\u672c\u6587\u4ecb\u7d39\u4e86\u5982\u4f55\u4f7f\u7528 React.JS \u4f86\u6c42\u51fa React List \u7684\u76f8\u95dc\u7cfb\u6578(correlation coefficient)\u3002React List \u63d0\u4f9b\u4e86\u4e00\u500b\u7c21\u55ae\u6613\u7528\u7684 API\uff0c\u53ef\u4ee5\u8b93\u958b\u767c\u8005\u66f4\u8f15\u9b06\u5730\u6c42\u51fa React List \u7684\u76f8\u95dc\u7cfb\u6578(correlation coefficient)\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6458\u8981\uff1a\u672c\u6587\u5c07\u4ecb\u7d39\u5982\u4f55\u4f7f\u7528React.JS\u6c42\u53d6List\u4e2d\u7684\u76f8\u95dc\u7cfb\u6578\uff0c\u4e26\u8a73\u7d30\u89e3\u91cb\u5982\u4f55\u4f7f\u7528methods()\u51fd\u6578\u4f86\u8a08\u7b97\u76f8\u95dc\u7cfb\u6578\uff0c\u4ee5\u53ca\u5982\u4f55\u5229\u7528\u76f8\u95dc\u7cfb\u6578\u4f86\u5206\u6790\u8cc7\u6599\u3002<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[184,183],"tags":[182,181],"class_list":["post-5725","post","type-post","status-publish","format-standard","hentry","category-react","category-react-js","tag-react","tag-react-js"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack-related-posts":[],"jetpack_shortlink":"https:\/\/wp.me\/pcFK27-1ul","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/badgameshow.com\/steven\/wp-json\/wp\/v2\/posts\/5725","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/badgameshow.com\/steven\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/badgameshow.com\/steven\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/badgameshow.com\/steven\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/badgameshow.com\/steven\/wp-json\/wp\/v2\/comments?post=5725"}],"version-history":[{"count":1,"href":"https:\/\/badgameshow.com\/steven\/wp-json\/wp\/v2\/posts\/5725\/revisions"}],"predecessor-version":[{"id":5726,"href":"https:\/\/badgameshow.com\/steven\/wp-json\/wp\/v2\/posts\/5725\/revisions\/5726"}],"wp:attachment":[{"href":"https:\/\/badgameshow.com\/steven\/wp-json\/wp\/v2\/media?parent=5725"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/badgameshow.com\/steven\/wp-json\/wp\/v2\/categories?post=5725"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/badgameshow.com\/steven\/wp-json\/wp\/v2\/tags?post=5725"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}