{"id":4189,"date":"2025-12-21T13:40:56","date_gmt":"2025-12-21T13:40:56","guid":{"rendered":"https:\/\/mattressmachineryzl.com\/?page_id=4189"},"modified":"2025-12-21T13:41:12","modified_gmt":"2025-12-21T13:41:12","slug":"curl-too-many-subrequests-111","status":"publish","type":"page","link":"https:\/\/mattressmachineryzl.com\/mk\/curl-too-many-subrequests-111\/","title":{"rendered":"Pocket Spring Machine Caculate"},"content":{"rendered":"<section id=\"zl-pocket-capacity-table\" style=\"max-width:980px;margin:0 auto;padding:20px;\">\n  <style>\n    .zl-cap-wrap{font-family:Arial, \"Microsoft YaHei\", sans-serif;color:#111;}\n    .zl-cap-table{width:100%;border-collapse:collapse;table-layout:fixed;background:#fff;}\n    .zl-cap-table td,.zl-cap-table th{border:1.5px solid #111;padding:10px 12px;vertical-align:middle;}\n\n    .zl-title{font-size:28px;font-weight:700;text-align:center;padding:14px 10px;}\n    .zl-sub{font-size:20px;text-align:center;padding:10px 10px;}\n\n    \/* English bigger, Chinese smaller *\/\n    .zl-label{ text-align:center; line-height:1.15; }\n    .zl-label .en{ display:block; font-size:22px; font-weight:800; }\n    .zl-label .zh{ display:block; font-size:14px; font-weight:600; color:#444; margin-top:6px; }\n\n    .zl-input{\n      width:100%; border:0; outline:0; background:transparent;\n      text-align:center; font-size:22px; color:#1d4ed8; font-weight:800;\n    }\n    .zl-input::placeholder{color:#93c5fd;font-weight:700;}\n\n    .zl-value{font-size:22px;font-weight:800;text-align:center;color:#111;}\n    .zl-value.blue{color:#1d4ed8;}\n    .zl-value.red{color:#dc2626;font-size:26px;}\n\n    .zl-note{margin-top:10px;border:1px solid #111;padding:10px 12px;font-size:14px;line-height:1.55;}\n    .zl-btns{display:flex;gap:10px;justify-content:flex-end;margin:10px 0;}\n    .zl-btn{\n      border:1px solid #111;background:#fff;padding:8px 12px;border-radius:8px;cursor:pointer;\n      font-weight:800;\n    }\n    .zl-btn:hover{background:#f5f5f5;}\n    .zl-err{display:none;margin-top:10px;border:1px solid #dc2626;background:#fef2f2;color:#b91c1c;padding:10px 12px;border-radius:8px;}\n\n    @media (max-width: 720px){\n      .zl-title{font-size:22px;}\n      .zl-sub{font-size:16px;}\n      .zl-label .en{font-size:18px;}\n      .zl-label .zh{font-size:12px;}\n      .zl-input,.zl-value{font-size:18px;}\n      .zl-value.red{font-size:22px;}\n    }\n  <\/style>\n\n  <div class=\"zl-cap-wrap\">\n    <div class=\"zl-btns\">\n      <button class=\"zl-btn\" id=\"zlUseDefault\">Use Default \/ \u6062\u590d\u9ed8\u8ba4<\/button>\n      <button class=\"zl-btn\" id=\"zlCopyResult\">Copy Results \/ \u590d\u5236\u7ed3\u679c<\/button>\n    <\/div>\n\n    <table class=\"zl-cap-table\" aria-label=\"Pocket spring capacity calculator\">\n      <colgroup>\n        <col style=\"width:34%\">\n        <col style=\"width:22%\">\n        <col style=\"width:22%\">\n        <col style=\"width:22%\">\n      <\/colgroup>\n\n      <tr>\n        <th class=\"zl-title\" colspan=\"4\">\n          Pocket Machine <span id=\"zlTitleSpeed\">160<\/span> spring\/min\n        <\/th>\n      <\/tr>\n      <tr>\n        <th class=\"zl-sub\" colspan=\"4\">\n          One Pocket Machine <span id=\"zlSubSpeed\">160<\/span> spring\/min\n        <\/th>\n      <\/tr>\n\n      <!-- Header labels (EN bigger, ZH smaller) -->\n      <tr>\n        <th class=\"zl-label\">\n          <span class=\"en\">cURL Too many subrequests.<\/span>\n          <span class=\"zh\">\u901f\u5ea6\/min<\/span>\n        <\/th>\n        <th class=\"zl-label\">\n          <span class=\"en\">Work time<\/span>\n          <span class=\"zh\">\u5de5\u4f5c\u65f6\u957f\/h<\/span>\n        <\/th>\n        <th class=\"zl-label\">\n          <span class=\"en\">Time loss factor<\/span>\n          <span class=\"zh\">\u635f\u8017\u7cfb\u6570<\/span>\n        <\/th>\n        <th class=\"zl-label\">\n          <span class=\"en\">Waist Diameter<\/span>\n          <span class=\"zh\">\u8170\u5f84(mm)<\/span>\n        <\/th>\n      <\/tr>\n\n      <!-- Inputs row -->\n      <tr>\n        <td><input class=\"zl-input\" id=\"zlSpeed\" type=\"number\" step=\"0.01\" min=\"1\" max=\"300\" value=\"160\" \/><\/td>\n        <td><input class=\"zl-input\" id=\"zlWorkTime\" type=\"number\" step=\"0.1\" min=\"1\" max=\"24\" value=\"8\" \/><\/td>\n        <td><input class=\"zl-input\" id=\"zlLoss\" type=\"number\" step=\"0.01\" min=\"0.60\" max=\"1.00\" value=\"0.90\" \/><\/td>\n        <td><input class=\"zl-input\" id=\"zlWaist\" type=\"number\" step=\"0.1\" min=\"30\" max=\"80\" value=\"55\" \/><\/td>\n      <\/tr>\n\n      <!-- Springs\/day -->\n      <tr>\n        <th class=\"zl-label\">\n          <span class=\"en\">Springs\/day<\/span>\n          <span class=\"zh\">\u65e5\u4ea7\u5f39\u7c27\u6570<\/span>\n        <\/th>\n        <td class=\"zl-value\" colspan=\"3\" id=\"zlSpringsDay\">\u2014<\/td>\n      <\/tr>\n\n      <!-- Mattress size -->\n      <tr>\n        <th class=\"zl-label\">\n          <span class=\"en\">Mattress Size (mm)<\/span>\n          <span class=\"zh\">\u5e8a\u57ab\u5c3a\u5bf8(mm)<\/span>\n        <\/th>\n        <td class=\"zl-value\" colspan=\"2\">\n          <input class=\"zl-input\" id=\"zlMattA\" type=\"number\" step=\"1\" min=\"800\" max=\"3000\" value=\"1800\" \/>\n        <\/td>\n        <td class=\"zl-value\">\n          <input class=\"zl-input\" id=\"zlMattB\" type=\"number\" step=\"1\" min=\"800\" max=\"3000\" value=\"2000\" \/>\n        <\/td>\n      <\/tr>\n\n      <!-- Arrangement -->\n      <tr>\n        <th class=\"zl-label\">\n          <span class=\"en\">Spring arrangement<\/span>\n          <span class=\"zh\">\u5f39\u7c27\u6392\u5217<\/span>\n        <\/th>\n        <td class=\"zl-value\" colspan=\"2\" id=\"zlArrA\">\u2014<\/td>\n        <td class=\"zl-value\" id=\"zlArrB\">\u2014<\/td>\n      <\/tr>\n\n      <!-- Actually arrangement -->\n      <tr>\n        <th class=\"zl-label\">\n          <span class=\"en\">Actually arrangement<\/span>\n          <span class=\"zh\">\u786e\u8ba4\u6392\u5217<\/span>\n        <\/th>\n        <td class=\"zl-value blue\" colspan=\"2\" id=\"zlActA\">\u2014<\/td>\n        <td class=\"zl-value blue\" id=\"zlActB\">\u2014<\/td>\n      <\/tr>\n\n      <!-- Springs\/mattress -->\n      <tr>\n        <th class=\"zl-label\">\n          <span class=\"en\">Springs\/mattress<\/span>\n          <span class=\"zh\">\u4e00\u5f20\u5e8a\u57ab\u5f39\u7c27\u603b\u6570<\/span>\n        <\/th>\n        <td class=\"zl-value\" colspan=\"3\" id=\"zlSpringsMattress\">\u2014<\/td>\n      <\/tr>\n\n      <!-- Mattress\/day -->\n      <tr>\n        <th class=\"zl-label\">\n          <span class=\"en\">Mattress\/day<\/span>\n          <span class=\"zh\">\u65e5\u4ea7\u5e8a\u57ab\u6570<\/span>\n        <\/th>\n        <td class=\"zl-value red\" colspan=\"3\" id=\"zlMattressDay\">\u2014<\/td>\n      <\/tr>\n    <\/table>\n\n    <div class=\"zl-err\" id=\"zlErrBox\"><\/div>\n\n    <div class=\"zl-note\">\n      <b>Rules<\/b> \/ \u8ba1\u7b97\u89c4\u5219<br\/>\n      1) Springs\/day = Speed \u00d7 60 \u00d7 Work time \u00d7 Time loss factor<br\/>\n      2) Arrangement = Mattress size \u00f7 Waist Diameter (No extra packing factor \/ \u4e0d\u52a0\u6392\u5e03\u7cfb\u6570)<br\/>\n      3) Actually arrangement: A = <b>CEIL<\/b> (\u5411\u4e0a\u53d6\u6574), B = <b>FLOOR<\/b> (\u5411\u4e0b\u53d6\u6574)<br\/>\n      4) Springs\/mattress = Actually A \u00d7 Actually B<br\/>\n      5) Mattress\/day = Springs\/day \u00f7 Springs\/mattress (show 2 decimals \/ \u4fdd\u75592\u4f4d\u5c0f\u6570)<br\/>\n      <br\/>\n      <b>Time loss factor<\/b>: 1.00 = ideal output \/ \u7406\u60f3\u4ea7\u80fd\uff1b<b>0.90 = recommended default<\/b> \/ \u63a8\u8350\u9ed8\u8ba4\u503c\uff08\u9884\u7559\u7ea610%\u635f\u8017\uff09\n    <\/div>\n  <\/div>\n\n  <script>\n    (function(){\n      const DEFAULTS = { speed:160, workTime:8, loss:0.90, waist:55, mattA:1800, mattB:2000 };\n      const LIMITS = { speed:[1,300], workTime:[1,24], loss:[0.60,1.00], waist:[30,80], matt:[800,3000] };\n      const $ = (id) => document.getElementById(id);\n\n      const el = {\n        speed: $(\"zlSpeed\"), workTime: $(\"zlWorkTime\"), loss: $(\"zlLoss\"), waist: $(\"zlWaist\"),\n        mattA: $(\"zlMattA\"), mattB: $(\"zlMattB\"),\n        titleSpeed: $(\"zlTitleSpeed\"), subSpeed: $(\"zlSubSpeed\"),\n        springsDay: $(\"zlSpringsDay\"), arrA: $(\"zlArrA\"), arrB: $(\"zlArrB\"),\n        actA: $(\"zlActA\"), actB: $(\"zlActB\"),\n        springsMattress: $(\"zlSpringsMattress\"), mattressDay: $(\"zlMattressDay\"),\n        errBox: $(\"zlErrBox\"),\n        useDefault: $(\"zlUseDefault\"), copyResult: $(\"zlCopyResult\")\n      };\n\n      function numOrDefault(v, d){ if (v === \"\" || v == null) return d; const n = Number(v); return Number.isFinite(n) ? n : d; }\n      function fmt(n, digits=0){ if (!Number.isFinite(n)) return \"\u2014\"; return n.toLocaleString(undefined,{minimumFractionDigits:digits,maximumFractionDigits:digits}); }\n      function round2(n){ return Math.round(n*100)\/100; }\n      function inRange(x,a,b){ return x>=a && x<=b; }\n\n      function validate(v){\n        const errs = [];\n        if (!inRange(v.speed, ...LIMITS.speed)) errs.push(`Speed must be ${LIMITS.speed[0]}\u2013${LIMITS.speed[1]} springs\/min.`);\n        if (!inRange(v.workTime, ...LIMITS.workTime)) errs.push(`Work time must be ${LIMITS.workTime[0]}\u2013${LIMITS.workTime[1]} h\/day.`);\n        if (!inRange(v.loss, ...LIMITS.loss)) errs.push(`Time loss factor must be ${LIMITS.loss[0]}\u2013${LIMITS.loss[1]}.`);\n        if (!inRange(v.waist, ...LIMITS.waist)) errs.push(`Waist Diameter must be ${LIMITS.waist[0]}\u2013${LIMITS.waist[1]} mm.`);\n        if (!inRange(v.mattA, ...LIMITS.matt) || !inRange(v.mattB, ...LIMITS.matt)) errs.push(`Mattress Size must be ${LIMITS.matt[0]}\u2013${LIMITS.matt[1]} mm.`);\n        return errs;\n      }\n\n      function calc(){\n        const v = {\n          speed: numOrDefault(el.speed.value, DEFAULTS.speed),\n          workTime: numOrDefault(el.workTime.value, DEFAULTS.workTime),\n          loss: numOrDefault(el.loss.value, DEFAULTS.loss),\n          waist: numOrDefault(el.waist.value, DEFAULTS.waist),\n          mattA: numOrDefault(el.mattA.value, DEFAULTS.mattA),\n          mattB: numOrDefault(el.mattB.value, DEFAULTS.mattB)\n        };\n\n        el.titleSpeed.textContent = fmt(v.speed,0);\n        el.subSpeed.textContent = fmt(v.speed,0);\n\n        const errs = validate(v);\n        if (errs.length){\n          el.errBox.style.display = \"block\";\n          el.errBox.innerHTML = \"<b>Please check \/ \u8bf7\u68c0\u67e5\uff1a<\/b><br\/>\" + errs.map(e => \"\u2022 \" + e).join(\"<br\/>\");\n        } else {\n          el.errBox.style.display = \"none\";\n          el.errBox.innerHTML = \"\";\n        }\n\n        const springsDay = v.speed * 60 * v.workTime * v.loss;\n        const arrA = v.mattA \/ v.waist;\n        const arrB = v.mattB \/ v.waist;\n\n        \/\/ Confirmed: A CEIL, B FLOOR\n        const actA = Math.ceil(arrA);\n        const actB = Math.floor(arrB);\n\n        const springsMattress = actA * actB;\n        const mattressDay = springsMattress > 0 ? round2(springsDay \/ springsMattress) : NaN;\n\n        el.springsDay.textContent = fmt(Math.round(springsDay),0);\n        el.arrA.textContent = fmt(arrA,2);\n        el.arrB.textContent = fmt(arrB,2);\n        el.actA.textContent = fmt(actA,0);\n        el.actB.textContent = fmt(actB,0);\n        el.springsMattress.textContent = fmt(springsMattress,0);\n        el.mattressDay.textContent = Number.isFinite(mattressDay) ? fmt(mattressDay,2) : \"\u2014\";\n      }\n\n      function setDefault(){\n        el.speed.value = DEFAULTS.speed;\n        el.workTime.value = DEFAULTS.workTime;\n        el.loss.value = DEFAULTS.loss;\n        el.waist.value = DEFAULTS.waist;\n        el.mattA.value = DEFAULTS.mattA;\n        el.mattB.value = DEFAULTS.mattB;\n        calc();\n      }\n\n      async function copyResults(){\n        const text =\n`Pocket Spring Output (EN\/\u4e2d\u6587)\n------------------------------\nSpeed: ${el.speed.value || DEFAULTS.speed} springs\/min  |  \u901f\u5ea6: ${el.speed.value || DEFAULTS.speed}\nWork time: ${el.workTime.value || DEFAULTS.workTime} h\/day  |  \u5de5\u4f5c\u65f6\u957f: ${el.workTime.value || DEFAULTS.workTime}\nTime loss factor: ${el.loss.value || DEFAULTS.loss}  |  \u635f\u8017\u7cfb\u6570: ${el.loss.value || DEFAULTS.loss}\nWaist Diameter: ${el.waist.value || DEFAULTS.waist} mm  |  \u8170\u5f84: ${el.waist.value || DEFAULTS.waist} mm\nMattress Size: ${(el.mattA.value || DEFAULTS.mattA)} \u00d7 ${(el.mattB.value || DEFAULTS.mattB)} mm  |  \u5e8a\u57ab\u5c3a\u5bf8: ${(el.mattA.value || DEFAULTS.mattA)} \u00d7 ${(el.mattB.value || DEFAULTS.mattB)} mm\n\nSprings\/day: ${el.springsDay.textContent}  |  \u65e5\u4ea7\u5f39\u7c27\u6570: ${el.springsDay.textContent}\nArrangement: ${el.arrA.textContent} , ${el.arrB.textContent}  |  \u6392\u5217: ${el.arrA.textContent} , ${el.arrB.textContent}\nActually arrangement: ${el.actA.textContent} \u00d7 ${el.actB.textContent}  |  \u786e\u8ba4\u6392\u5217: ${el.actA.textContent} \u00d7 ${el.actB.textContent}\nSprings\/mattress: ${el.springsMattress.textContent}  |  \u5355\u5e8a\u5f39\u7c27\u6570: ${el.springsMattress.textContent}\nMattress\/day: ${el.mattressDay.textContent}  |  \u65e5\u4ea7\u5e8a\u57ab\u6570: ${el.mattressDay.textContent}\n`;\n        try{\n          await navigator.clipboard.writeText(text);\n          el.copyResult.textContent = \"Copied \/ \u5df2\u590d\u5236\";\n          setTimeout(()=> el.copyResult.textContent=\"Copy Results \/ \u590d\u5236\u7ed3\u679c\", 1200);\n        }catch(e){\n          alert(\"Copy failed. Please copy manually \/ \u590d\u5236\u5931\u8d25\uff0c\u8bf7\u624b\u52a8\u590d\u5236\u3002\");\n        }\n      }\n\n      [\"input\",\"change\"].forEach(evt=>{\n        [el.speed, el.workTime, el.loss, el.waist, el.mattA, el.mattB].forEach(x=>x.addEventListener(evt, calc));\n      });\n      el.useDefault.addEventListener(\"click\", setDefault);\n      el.copyResult.addEventListener(\"click\", copyResults);\n\n      calc();\n    })();\n  <\/script>\n<\/section>","protected":false},"excerpt":{"rendered":"<p>Use Default \/ \u6062\u590d\u9ed8\u8ba4 Copy Results \/ \u590d\u5236\u7ed3\u679c Pocket Machine 160 spring\/min One Pocket Machine 160 spring\/min Speed \u901f\u5ea6\/min Work time \u5de5\u4f5c\u65f6\u957f\/h Time loss factor \u635f\u8017\u7cfb\u6570 Waist Diameter \u8170\u5f84(mm) Springs\/day \u65e5\u4ea7\u5f39\u7c27\u6570 \u2014 Mattress Size (mm) \u5e8a\u57ab\u5c3a\u5bf8(mm) Spring arrangement \u5f39\u7c27\u6392\u5217 \u2014 \u2014 Actually arrangement \u786e\u8ba4\u6392\u5217 \u2014 \u2014 Springs\/mattress \u4e00\u5f20\u5e8a\u57ab\u5f39\u7c27\u603b\u6570 \u2014 Mattress\/day \u65e5\u4ea7\u5e8a\u57ab\u6570 \u2014 Rules \/ \u8ba1\u7b97\u89c4\u5219 [\u2026]<\/p>","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_acf_changed":false,"_seopress_robots_primary_cat":"","_seopress_titles_title":"","_seopress_titles_desc":"","_seopress_robots_index":"","_zeroy_edited":true,"_zeroy_last_edited":"2025-12-21 13:41:38","footnotes":""},"class_list":["post-4189","page","type-page","status-publish","hentry"],"acf":[],"_links":{"self":[{"href":"https:\/\/mattressmachineryzl.com\/mk\/wp-json\/wp\/v2\/pages\/4189","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mattressmachineryzl.com\/mk\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/mattressmachineryzl.com\/mk\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/mattressmachineryzl.com\/mk\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mattressmachineryzl.com\/mk\/wp-json\/wp\/v2\/comments?post=4189"}],"version-history":[{"count":1,"href":"https:\/\/mattressmachineryzl.com\/mk\/wp-json\/wp\/v2\/pages\/4189\/revisions"}],"predecessor-version":[{"id":4190,"href":"https:\/\/mattressmachineryzl.com\/mk\/wp-json\/wp\/v2\/pages\/4189\/revisions\/4190"}],"wp:attachment":[{"href":"https:\/\/mattressmachineryzl.com\/mk\/wp-json\/wp\/v2\/media?parent=4189"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}