{"id":320,"date":"2016-03-08T16:17:34","date_gmt":"2016-03-08T08:17:34","guid":{"rendered":"http:\/\/goyuwei.com\/blog\/?p=320"},"modified":"2016-03-15T20:10:13","modified_gmt":"2016-03-15T12:10:13","slug":"08032016-tips-of-tolerance-checker-%e5%85%ac%e5%b7%ae%e6%9f%a5%e8%af%a2%e5%99%a8%e5%a4%87%e5%bf%98","status":"publish","type":"post","link":"https:\/\/goyuwei.com\/blog\/?p=320","title":{"rendered":"08\/03\/2016 \u2013 Tips of Tolerance Checker\u2013 \u516c\u5dee\u67e5\u8be2\u5668\u5907\u5fd8"},"content":{"rendered":"<p>(English version follows Chinese Part)<\/p>\n<p>\u4e4b\u524d\u5c31\u6709\u8bf4\u8fc7\u5b9e\u9a8c\u5ba4\u677f\u5757\u4e00\u5171\u6253\u7b97\u540c\u65f6\u8fdb\u884c\u4e24\u4e2a\u9879\u76ee\uff0c\u5929\u6587\u90e8\u5206\u662f\u6674\u5929\u949f\uff0c\u673a\u68b0\u90e8\u5206\u662f\u516c\u5dee\u67e5\u8be2\u5668\u3002\u8fd9\u7bc7\u6587\u7ae0\u6253\u7b97\u8bb0\u5f55\u4e00\u4e0b\u516c\u5dee\u67e5\u8be2\u5668\u7684\u601d\u8003\u5185\u5bb9\u4ee5\u4f5c\u5907\u5fd8\u3002<\/p>\n<p>I was talking about plans of the lab before,\u00a0Web Forecast for astronomy block and\u00a0Tolerance\u00a0Checker for mechanical block. This is the\u00a0memorandum of what I have thought about building the\u00a0tolerance checker.<\/p>\n<p>\u4e00\u5f00\u59cb\u5148\u68c0\u7d22\u4e86\u4e00\u4e0b\u201c\u68c0\u7d22\u5668+\u6570\u636e\u5e93\u201d\u7ed3\u6784\u7684\u5b9e\u73b0\u65b9\u5f0f\uff0c\u5305\u62ecasp+excel, php+myaql, php+excel\u7b49\u7b49\u7b49\u7b49\u3002\u6211\u6839\u636e\u6211\u7684\u5ba2\u89c2\u6761\u4ef6\uff0c\u6253\u7b97\u91c7\u7528php+excel\u7684\u65b9\u5f0f\u6765\u5b9e\u73b0\u7f51\u9875\u67e5\u8868\u5f0f\u7684\u516c\u5dee\u67e5\u8be2\u5668\u3002<\/p>\n<p>The basic structure of online checker is &#8220;checker+database&#8221;, which have kinds of\u00a0 method including\u00a0asp+excel, php+myaql, php+excel and etc. Considering of objective conditions I have, I will go by php+excel solution.<\/p>\n<p>\u9009\u62e9php+html\u4f5c\u4e3a\u524d\u7aef\u548c\u670d\u52a1\u5668\u7aef\u7684\u68c0\u7d22\u5668\u662f\u56e0\u4e3a\u6211\u5df2\u7ecf\u6709\u4e86\u4e00\u4e2a\u652f\u6301php\u7684\u865a\u62df\u4e3b\u673a\uff0c\u76f4\u63a5\u63d0\u4f9b\u4e86\u5728\u7ebf\u8c03\u8bd5\u73af\u5883\uff0c\u800c\u4e14\u6d41\u91cf\u591f\u3001\u901f\u5ea6\u591f\uff0c\u5c31\u4e0d\u6253\u7b97\u518d\u5012\u817e\u4e00\u756a\u642d\u5efa\u672c\u5730\u6d4b\u8bd5\u73af\u5883\u4e86\u3002\u6240\u4ee5\u6ca1\u6709\u91c7\u7528asp\u3002<\/p>\n<p>It is no necessary that set up another local testing environment when I have already got\u00a0virtual host with php supporting. That&#8217;s why I chose php instead asp for my checker and I can test it online.<\/p>\n<p>\u81f3\u4e8e\u6570\u636e\u5e93\uff0c\u4f7f\u7528excel\uff0c\u662f\u56e0\u4e3a\u6211\u5b8c\u5168\u4e0d\u6253\u7b97\u518d\u5b66mysql\uff0c\u53e6\u4e00\u4e2a\u539f\u56e0\u662f\u6781\u9650\u504f\u5dee\u8868\u7684\u6570\u636e\u91cf\u6709\u70b9\u5927\uff0c\u800c\u4e14\u76ee\u524d\u53d6\u5f97\u7684\u6570\u636e\u5fc5\u987b\u8981\u4f9d\u9760\u6211\u624b\u5de5\u8f93\u5165\uff0c\u6240\u4ee5\u9009\u62e9excel\u5728\u521b\u5efa\u6570\u636e\u5e93\u7684\u65f6\u5019\u4f1a\u6bd4\u8f83\u4fbf\u6377\u3002\u53e6\u5916\uff0cphp\u6709\u5f00\u6e90\u7684excel\u8bfb\u53d6\u5de5\u5177\u53ef\u4ee5\u76f4\u63a5\u8c03\u7528\uff0c\u8fd9\u5bf9\u6211\u8fd9\u6837\u4e00\u4e2aphp\u5c0f\u767d\u6765\u8bf4\uff0c\u5b9e\u5728\u662f\u65b9\u4fbf\u4e0d\u8fc7\u3002<\/p>\n<p>As for database, learn to use mysql may take too much time. But the core problem is that entering data of\u00a0tolerance would be a huge project when I have to type it myself by hand. So, excel will be easier for me to setup database files. Luckily, php has\u00a0open source of excel reader that I can use for my checker directly.<\/p>\n<p>\u76ee\u524d\uff0c\u53c2\u8003\u7f51\u7edc\u4e0a\u5df2\u6709\u7684php+excel\u67e5\u8be2\u5668\u4f8b\u5b50\uff0c\u601d\u8003\u4e86\u51e0\u5929\uff0c\u6253\u7b97\u6309\u7167\u5982\u56fe1\u7684\u7ed3\u6784\u521b\u5efa\u67e5\u8be2\u5668\uff0c\u4e0d\u8fc7\u4e5f\u6709\u53ef\u80fd\u9700\u8981\u66f4\u591a\u7684php\u6587\u4ef6\u5728\u670d\u52a1\u5668\u7aef\u8fdb\u884c\u68c0\u7d22\u3001\u67e5\u8868\u64cd\u4f5c\u3002<\/p>\n<p>After searching examples of php+excel checkers online, I make the structure graph as Fig.1. It is a\u00a0prophase plan and there\u00a0might be more php files for the checking function at server side.<\/p>\n<p style=\"text-align: center;\"><a href=\"http:\/\/goyuwei.com\/blog\/wp-content\/uploads\/2016\/03\/20160308-tolerance_checker-2.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-324\" src=\"http:\/\/goyuwei.com\/blog\/wp-content\/uploads\/2016\/03\/20160308-tolerance_checker-2.jpg\" alt=\"20160308-tolerance_checker (2)\" width=\"1280\" height=\"720\" srcset=\"https:\/\/goyuwei.com\/blog\/wp-content\/uploads\/2016\/03\/20160308-tolerance_checker-2.jpg 1280w, https:\/\/goyuwei.com\/blog\/wp-content\/uploads\/2016\/03\/20160308-tolerance_checker-2-300x169.jpg 300w, https:\/\/goyuwei.com\/blog\/wp-content\/uploads\/2016\/03\/20160308-tolerance_checker-2-768x432.jpg 768w, https:\/\/goyuwei.com\/blog\/wp-content\/uploads\/2016\/03\/20160308-tolerance_checker-2-1024x576.jpg 1024w\" sizes=\"auto, (max-width: 1280px) 100vw, 1280px\" \/><\/a><\/p>\n<p style=\"text-align: center;\">\u56fe1(Fig.1)<\/p>\n<p>\u4e3b\u9875\u5ba2\u6237\u7aef\u7684\u8868\u5355\u548c\u670d\u52a1\u5668\u7aef\u68c0\u7d22\u7684\u903b\u8f91\u5982\u56fe2\uff0c\u6211\u76ee\u524d\u6700\u597d\u7684\u6253\u7b97\u662f\u8868\u5355\u548c\u7ed3\u679c\u663e\u793a\u80fd\u591f\u5728\u540c\u4e00\u9875\u9762\u5c55\u73b0\u4e14\u4e0d\u65ad\u590d\u7528\uff0c\u8fd9\u6837\u624d\u662f\u201c\u67e5\u8be2\u5668\u201d\uff0c\u800c\u4e0d\u662f\u201c\u67e5\u8be2\u9875\u201d\u3002<\/p>\n<p>The form on front page has its appearance as Fig.2 and the checking logic of server-side files\u00a0have been shown as well. My better plan of\u00a0the\u00a0front page is that exhibiting\u00a0the\u00a0radio buttons and the return result on the same page which can be\u00a0reused without refreshing the page.<\/p>\n<p style=\"text-align: center;\"><a href=\"http:\/\/goyuwei.com\/blog\/wp-content\/uploads\/2016\/03\/20160308-tolerance_checker-1.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-343\" src=\"http:\/\/goyuwei.com\/blog\/wp-content\/uploads\/2016\/03\/20160308-tolerance_checker-1.jpg\" alt=\"20160308-tolerance_checker-1\" width=\"1280\" height=\"720\" srcset=\"https:\/\/goyuwei.com\/blog\/wp-content\/uploads\/2016\/03\/20160308-tolerance_checker-1.jpg 1280w, https:\/\/goyuwei.com\/blog\/wp-content\/uploads\/2016\/03\/20160308-tolerance_checker-1-300x169.jpg 300w, https:\/\/goyuwei.com\/blog\/wp-content\/uploads\/2016\/03\/20160308-tolerance_checker-1-768x432.jpg 768w, https:\/\/goyuwei.com\/blog\/wp-content\/uploads\/2016\/03\/20160308-tolerance_checker-1-1024x576.jpg 1024w\" sizes=\"auto, (max-width: 1280px) 100vw, 1280px\" \/><\/a><\/p>\n<p style=\"text-align: center;\">\u56fe2(Fig.2)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>(English version follows Chinese Part) \u4e4b\u524d\u5c31\u6709\u8bf4\u8fc7\u5b9e\u9a8c\u5ba4\u677f\u5757\u4e00\u5171\u6253\u7b97\u540c &hellip; <a href=\"https:\/\/goyuwei.com\/blog\/?p=320\" class=\"more-link\">\u7ee7\u7eed\u9605\u8bfb<span class=\"screen-reader-text\">08\/03\/2016 \u2013 Tips of Tolerance Checker\u2013 \u516c\u5dee\u67e5\u8be2\u5668\u5907\u5fd8<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"aside","meta":{"footnotes":""},"categories":[21,9,3],"tags":[],"class_list":["post-320","post","type-post","status-publish","format-aside","hentry","category-lab-log-","category-mechanical-engineering-","category-site-construction-","post_format-post-format-aside"],"_links":{"self":[{"href":"https:\/\/goyuwei.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/320","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/goyuwei.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/goyuwei.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/goyuwei.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/goyuwei.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=320"}],"version-history":[{"count":0,"href":"https:\/\/goyuwei.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/320\/revisions"}],"wp:attachment":[{"href":"https:\/\/goyuwei.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=320"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/goyuwei.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=320"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/goyuwei.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=320"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}