<?php function bubble_sort(&$arr){ $count = count($arr); for($i=0;$i<$count-1;$i++){ for($j=$i+1;$j<$count;$j++){ if($arr[$j]<$arr[$i]){ $arr[$i] = $a ...
分类:
编程语言 时间:
2020-11-10 11:07:55
阅读次数:
9
原理:就是监听页面滚动事件,分析clientHeight、scrollTop、scrollHeight三者的属性关系。 window.addEventListener('scroll', function() { const clientHeight = document.documentEleme ...
分类:
Web程序 时间:
2020-11-10 11:04:36
阅读次数:
17
html代码 <a class="btn btn-primary fa fa-export" href="javascript:void(0);" onclick="expExcel()"><span>导出excel</span></a> js代码 function expExcel() { var ...
分类:
其他好文 时间:
2020-11-10 10:53:41
阅读次数:
4
开始我把 script 模块写到了 template 里面总是编译不通过。 第二点 template 里面可以写变量也可以写函数,写函数 script 里面就要写 /*methods:{ details: function(){ return this.site + "学的不是技术,更是梦想" ; ...
分类:
其他好文 时间:
2020-11-10 10:45:32
阅读次数:
3
1.表单数据 { field: 'mainSupervision', align: 'center', title: '监督要点', formatter: function (value, row, index) { var html = $.common.sprintf("<input oncli ...
分类:
其他好文 时间:
2020-11-10 10:38:33
阅读次数:
3
1. 背景: C++有不同的调用形式:函数指针、lambda表达式、有operator()的类对象等。 形式不同但调用方式却相同。为了能够统一,引入std::function和std::bind,来实现。 例子: // 普通函数 int add(int a, int b){return a+b;} ...
分类:
编程语言 时间:
2020-11-08 17:55:55
阅读次数:
33
1.大小写转换 str.toUpperCase() //都转为大写字母 str.toLowerCase() //都转位小写字母 2.获取子字符串 str.slice(start,end) //从start截取到end 特点: 1.包含start,不包含end 2.如果省略end,表示一直选取到尾 3 ...
前端异步方法 在进行前端操作时主要的异步操作有: 定时器操作 ajax异步操作 事件绑定 回调(不严谨) 在使使用定时器以及ajax异步操作时,返回值会显示为空。 下面看这个例子: function testNormal(){ var str = "是否会显示?" return str } func ...
分类:
其他好文 时间:
2020-11-07 17:48:09
阅读次数:
32
事件循环是asyncio提供的核心运行机制 column column asyncio.get_event_loop() 返回一个事件循环对象,时asyncio.BaseEventLoop的实例 AbstractEventLoop.stop() 停止运行事件循环 AbstractEventLoop. ...
分类:
其他好文 时间:
2020-11-07 17:43:04
阅读次数:
28
/* 141.TAN TAN(<number>) 返回正切值 TANH(<number>) 返回指定数值参数的双曲正切值。 */ SELECT TAN (0.0) FROM DUMMY; SELECT TANH(1) FROM DUMMY; /* 142. 类型转换 TO_ALPHANUM(<val ...
分类:
数据库 时间:
2020-11-07 17:13:21
阅读次数:
24