上一页 1 ··· 5 6 7 8 9 10 下一页
摘要: // 快速排序算法:关键在于定义基准元素,头尾元素与基准元素对比,定义头尾元素下标,头小右移,头大停止,尾大左移,尾小停止,头大尾小元素交换 function partition(arr, startIndex, endIndex) { var pivot = arr[startIndex]; va 阅读全文
posted @ 2020-03-23 08:52 Peter_Yang0942 阅读(140) 评论(0) 推荐(0) 编辑
摘要: // 冒泡排序算法 function bubbleSort(arr) { console.log('排序算法第0次:' + arr.join(',')); var len = arr.length; var lastIndex = 0; // 最后标记的脚标 var sortBorder = len 阅读全文
posted @ 2020-03-23 08:47 Peter_Yang0942 阅读(266) 评论(0) 推荐(0) 编辑
摘要: 方法一:利用两个栈实现队列 let stack1 = [], //两个数组模拟栈的行为 stack2 = []; function push(node) { //栈是后入先出(LIFO),队列是先入先出(FIFO) while (stack2.length !== 0) { stack1.push( 阅读全文
posted @ 2020-03-23 08:43 Peter_Yang0942 阅读(313) 评论(0) 推荐(0) 编辑
摘要: 1、引用exif.js //图片方向角 added by lzk var Orientation = null; EXIF.getData(file, function() { EXIF.getAllTags(this); Orientation = EXIF.getTag(this, 'Orien 阅读全文
posted @ 2019-10-10 11:18 Peter_Yang0942 阅读(1177) 评论(0) 推荐(0) 编辑
摘要: const img = new Image(); img.setAttribute("crossOrigin", 'Anonymous'); img.src = url + '?t=' + new Date().getTime(); imgBg.onload = function() {} imgB 阅读全文
posted @ 2019-04-26 14:08 Peter_Yang0942 阅读(921) 评论(0) 推荐(0) 编辑
摘要: function drawCircleImage(url, callback) { const canvas = document.createElement('canvas'); const img = new Image(); img.setAttribute("crossOrigin", 'A 阅读全文
posted @ 2019-04-15 14:39 Peter_Yang0942 阅读(478) 评论(0) 推荐(0) 编辑
摘要: vue项目中报错: You are running Vue in development mode.Make sure to turn on production mode when deploying for production.See more tips at https://vuejs.or 阅读全文
posted @ 2019-04-04 18:10 Peter_Yang0942 阅读(4139) 评论(0) 推荐(0) 编辑
摘要: 移动端各种滚动场景需求的插件: 文档地址: better-scroll:https://ustbhuangyi.github.io/better-scroll/doc/zh-hans/#better-scroll%20%E6%98%AF%E4%BB%80%E4%B9%88 iscroll:http: 阅读全文
posted @ 2019-03-28 14:17 Peter_Yang0942 阅读(192) 评论(0) 推荐(0) 编辑
摘要: 官方链接:https://qiao.baidu.com/ 1、下载软件安装注册 2、 <--此段代码添加在</head>前。为保证统计准确,请勿将同一段代码添加到多个站点中。--> <script> var _hmt = _hmt || []; (function() { var hm = docu 阅读全文
posted @ 2019-02-26 14:51 Peter_Yang0942 阅读(1370) 评论(2) 推荐(0) 编辑
摘要: 安装: npm install vue-slider-component 详细文档见:https://nightcatsama.github.io/vue-slider-component/example/#QuickStart 阅读全文
posted @ 2019-01-03 15:56 Peter_Yang0942 阅读(2691) 评论(0) 推荐(0) 编辑
上一页 1 ··· 5 6 7 8 9 10 下一页