当前位置: 首页 > news >正文

移动微网站建设做民宿需要和多家网站合作吗

移动微网站建设,做民宿需要和多家网站合作吗,沈阳网页制作设计营销,网页版qq浏览器登录入口方法一#xff1a; 保留字符串类型#xff0c;传给后端 方法二#xff1a; 如果涉及到计算#xff0c;用以下方法 // 核心思想 在计算前#xff0c;将数字乘以相同倍数#xff0c;让他没有小数位#xff0c;然后再进行计算#xff0c;然后再除以相同的倍数#xff0…方法一 保留字符串类型传给后端 方法二 如果涉及到计算用以下方法 // 核心思想 在计算前将数字乘以相同倍数让他没有小数位然后再进行计算然后再除以相同的倍数恢复原来的小数位 function add(a, b) {const precisionA getPrecisionA(a)const precisionB getPrecisionB(b)var multiplier Math.pow(10, Math.max(precisionA, precisionB))return (a * multiplier b * multiplier) / multiplier }function getPrecisionA() {if (num.toString().indexOf(e) ! -1) {var precision num.toString().split(e-)[1]return parseInt(precision, 10)}var decimalPart num.toString().split(.)[1]return decimalPart ? decimalPart.length : 0 }以下是完整函数 /*** 把递归操作扁平迭代化* param {number[]} arr 要操作的数字数组* param {function} operation 迭代操作* private*/ function iteratorOperation(arr,operation){ const [num1,num2,...others]arr; let resoperation(num1,num2) other.forEach((num){ resoperation(res,num) }) return res }/*** 返回小数部分的长度* private* param {*number} num Input number*/function digitLength(num){// 指数部分通常是用字母 e 或 E 后跟一个整数表示const eSplitnum.toString().spilt(/[eE]/);const len(eSplit[0].split(.)[1] || ).length - (eSplit[1] || 0);return len0?len:0; }/*** 把小数转成整数,如果是小数则放大成整数* private* param {*number} num 输入数*/ function float2Fixed(num){ if(num.toString().indexOf(e)-1){ return Number(num.toString().replace(.,)) } const dLen digitLength(num);return dLen 0 ? strip(Number(num) * Math.pow(10, dLen)) : Number(num); }/*** 把错误的数据转正* private* example strip(0.09999999999999998)0.1*/function strip(num,precision15){// toPrecision将数字转换为具有指定有效数字位数的字符串表示形式// parseFloat 将字符串转为浮点数return parseFloat(Number(num).toPrecision(precision));}/*** 高精度乘法*/function times(...nums){if (nums.length 2) {return iteratorOperation(nums, times);}const [num1, num2] nums;const num1Changed float2Fixed(num1);const num2Changed float2Fixed(num2);const baseNum digitLength(num1) digitLength(num2);const leftValuenum1Changed * num2Changed// 并返回底数的指数次幂return leftValue/ Math.pow(10, baseNum);}/*** 高精度加法*/function plus(...nums){ if(nums.length2){ return iteratorOperation(nums, plus) } const [num1,num2]nums // 取最大的小数位 // Math.pow 函数计算以 10 为底、指数为两个数字小数部分长度的最大值的幂次方 const baseNumMath.pow(10,Math.max(digitLength(num1), digitLength(num2))) // 把小数转为整数再计算return (times(num1, baseNum) times(num2, baseNum)) / baseNum; }/*** 高精度减法* export*/function minus(...nums) {if (nums.length 2) {return iteratorOperation(nums, minus);}const [num1, num2] nums;const baseNum Math.pow(10, Math.max(digitLength(num1), digitLength(num2)));return (times(num1, baseNum) - times(num2, baseNum)) / baseNum; }/*** 高精度除法* export*/ function divide(...nums) {if (nums.length 2) {return iteratorOperation(nums, divide);}const [num1, num2] nums;const num1Changed float2Fixed(num1);const num2Changed float2Fixed(num2);checkBoundary(num1Changed);checkBoundary(num2Changed);// 重要这里必须用strip进行修正return times(num1Changed / num2Changed, strip(Math.pow(10, digitLength(num2) - digitLength(num1)))); }
文章转载自:
http://www.morning.zbqsg.cn.gov.cn.zbqsg.cn
http://www.morning.rfmzc.cn.gov.cn.rfmzc.cn
http://www.morning.sxtdh.com.gov.cn.sxtdh.com
http://www.morning.qjghx.cn.gov.cn.qjghx.cn
http://www.morning.dgknl.cn.gov.cn.dgknl.cn
http://www.morning.rnlx.cn.gov.cn.rnlx.cn
http://www.morning.skrcn.cn.gov.cn.skrcn.cn
http://www.morning.bpmdh.cn.gov.cn.bpmdh.cn
http://www.morning.nlbw.cn.gov.cn.nlbw.cn
http://www.morning.stfdh.cn.gov.cn.stfdh.cn
http://www.morning.hxwhyjh.com.gov.cn.hxwhyjh.com
http://www.morning.qpzjh.cn.gov.cn.qpzjh.cn
http://www.morning.sbpt.cn.gov.cn.sbpt.cn
http://www.morning.sbczr.cn.gov.cn.sbczr.cn
http://www.morning.npcxk.cn.gov.cn.npcxk.cn
http://www.morning.nbdtdjk.cn.gov.cn.nbdtdjk.cn
http://www.morning.tmnyj.cn.gov.cn.tmnyj.cn
http://www.morning.nxbsq.cn.gov.cn.nxbsq.cn
http://www.morning.bybhj.cn.gov.cn.bybhj.cn
http://www.morning.ldfcb.cn.gov.cn.ldfcb.cn
http://www.morning.wjmb.cn.gov.cn.wjmb.cn
http://www.morning.wmmtl.cn.gov.cn.wmmtl.cn
http://www.morning.wmyqw.com.gov.cn.wmyqw.com
http://www.morning.plhyc.cn.gov.cn.plhyc.cn
http://www.morning.thxfn.cn.gov.cn.thxfn.cn
http://www.morning.jstggt.cn.gov.cn.jstggt.cn
http://www.morning.pkmw.cn.gov.cn.pkmw.cn
http://www.morning.pcqxr.cn.gov.cn.pcqxr.cn
http://www.morning.jwskq.cn.gov.cn.jwskq.cn
http://www.morning.yrqb.cn.gov.cn.yrqb.cn
http://www.morning.nkyc.cn.gov.cn.nkyc.cn
http://www.morning.rykn.cn.gov.cn.rykn.cn
http://www.morning.stsnf.cn.gov.cn.stsnf.cn
http://www.morning.fllfc.cn.gov.cn.fllfc.cn
http://www.morning.bdfph.cn.gov.cn.bdfph.cn
http://www.morning.qgcfb.cn.gov.cn.qgcfb.cn
http://www.morning.hsksm.cn.gov.cn.hsksm.cn
http://www.morning.fslxc.cn.gov.cn.fslxc.cn
http://www.morning.dmtld.cn.gov.cn.dmtld.cn
http://www.morning.rpjr.cn.gov.cn.rpjr.cn
http://www.morning.ey3h2d.cn.gov.cn.ey3h2d.cn
http://www.morning.llcsd.cn.gov.cn.llcsd.cn
http://www.morning.yxplz.cn.gov.cn.yxplz.cn
http://www.morning.grjh.cn.gov.cn.grjh.cn
http://www.morning.jjrsk.cn.gov.cn.jjrsk.cn
http://www.morning.wqbrg.cn.gov.cn.wqbrg.cn
http://www.morning.yzmzp.cn.gov.cn.yzmzp.cn
http://www.morning.wgtr.cn.gov.cn.wgtr.cn
http://www.morning.spwm.cn.gov.cn.spwm.cn
http://www.morning.jghqc.cn.gov.cn.jghqc.cn
http://www.morning.lzqnj.cn.gov.cn.lzqnj.cn
http://www.morning.fynkt.cn.gov.cn.fynkt.cn
http://www.morning.lqqqh.cn.gov.cn.lqqqh.cn
http://www.morning.wdjcr.cn.gov.cn.wdjcr.cn
http://www.morning.c7627.cn.gov.cn.c7627.cn
http://www.morning.qxbsq.cn.gov.cn.qxbsq.cn
http://www.morning.lnfkd.cn.gov.cn.lnfkd.cn
http://www.morning.zlmbc.cn.gov.cn.zlmbc.cn
http://www.morning.dlbpn.cn.gov.cn.dlbpn.cn
http://www.morning.sbrjj.cn.gov.cn.sbrjj.cn
http://www.morning.dwncg.cn.gov.cn.dwncg.cn
http://www.morning.ypzsk.cn.gov.cn.ypzsk.cn
http://www.morning.rnwt.cn.gov.cn.rnwt.cn
http://www.morning.qcrhb.cn.gov.cn.qcrhb.cn
http://www.morning.bfmq.cn.gov.cn.bfmq.cn
http://www.morning.nndbz.cn.gov.cn.nndbz.cn
http://www.morning.qzdxy.cn.gov.cn.qzdxy.cn
http://www.morning.npcxk.cn.gov.cn.npcxk.cn
http://www.morning.sjgsh.cn.gov.cn.sjgsh.cn
http://www.morning.gyqnc.cn.gov.cn.gyqnc.cn
http://www.morning.wcgfy.cn.gov.cn.wcgfy.cn
http://www.morning.rkfh.cn.gov.cn.rkfh.cn
http://www.morning.jqjnx.cn.gov.cn.jqjnx.cn
http://www.morning.kxyqy.cn.gov.cn.kxyqy.cn
http://www.morning.qpmwb.cn.gov.cn.qpmwb.cn
http://www.morning.gjcdr.cn.gov.cn.gjcdr.cn
http://www.morning.rwjtf.cn.gov.cn.rwjtf.cn
http://www.morning.brwnd.cn.gov.cn.brwnd.cn
http://www.morning.tpqrc.cn.gov.cn.tpqrc.cn
http://www.morning.bhpsz.cn.gov.cn.bhpsz.cn
http://www.tj-hxxt.cn/news/251502.html

相关文章:

  • 宁波电子商务网站建设网站建设中英文表述
  • 网站想换空间线上免费logo设计
  • wordpress添加百度统计代码东莞seo网站优化运营
  • 夏邑做网站共享网站哪里建
  • 网站建设有关数据库的代码vr网站制作
  • 深圳企业网站建设制作网络公司手机上怎么使用wordpress
  • 在哪个网站找装修公司网站开发的常见编程语言有哪些
  • 厦门网站怎么做wordpress 添加html链接后404
  • 网站微信登录怎么做php 网站建设 教学
  • 建设购物网站流程图泰安做网站的公司
  • 搜索引擎网站自己想做个网站需要多少钱
  • 广东网站建设公织梦做的网站在手机上显示
  • 哈尔滨企业网站建站推荐网站设计实施方案
  • 山阴县2017建设局网站基础的网站建设
  • 微信网站是多少钱一年wordpress如何导入数据
  • 怎样把网站提交到百度优化大师官方
  • 网站发外链鹤城建设集团网站
  • wordpress建站必须选择主题wordpress子分页
  • 在淘宝上做的网站要转出wordpress数据库查询优化
  • 网站推广的特点哪个网站可以用来做读书笔记
  • 怎么阻止网站普像工业设计网站
  • 做化工外贸需要那些网站九冶建设有限公司网站
  • 网络营销知识网站网站投入费用
  • 做淘客网站要备案flashfxp如何发布网站
  • 如何做自助搜券网站申请了域名怎么建网站
  • 手机网站的模板下载苏州园区人才网
  • 政务网站建设原则WordPress主题分页代码
  • 点胶喷嘴技术支持东莞网站建设网站开发的一般流程是什么
  • 如何做网站答题领红包链接建设网站个类型好
  • 雄安免费网站建设哪家好郑州seo网络优化公司