风花雪月 风花雪月
4年前
list assignment index out of range
分析:listassignmentindexoutofrange:列表超过限制一种情况是:listindexindex超出范围另一种情况是:list是一个空的,没有一个元素,进行list0就会出现错误!
九路 九路
4年前
二分查找法的递归和非递归的实现
//二分查找法非递归实现,在一个有序的数组中查找e元素的位置,找不到返回1publicstaticintbinarySearch(intdata,inte){intl0;intrdata.length1;while(l<r){
Wesley13 Wesley13
3年前
JS操作数组
1.  如果数组中存在item,则返回元素在数组中的位置,否则返回1functionindexOf(arr,item){if(Array.prototype.indexOf){//IE浏览器支不支持indexOfreturnarr.indexOf(item);}
Stella981 Stella981
3年前
269个JavaScript工具函数,助你提升工作效率(6)
!269个JavaScript工具函数,助你提升工作效率.png(https://static.oschina.net/uploads/img/202009/11172428_tWo3.jpg)151.数组中某元素出现的次数/@param{array}arr@param{}va
Stella981 Stella981
3年前
Maven setting配置
注意:最好在各自目录下修改setting文件 路径~/.m2目录下1.设置Http代理<settings...<proxies<!可以设置多个代理(多个proxy元素)默认地址一个激活(activetrue)的代理生效<!
Stella981 Stella981
3年前
ES6 for in与for of 的使用方法及其区别
  // for in遍历的是数组的索引(即键名),而for of遍历的是数组元素值。 let arr  \1,2,3,4,5,6,7\    for(let index of arr){     //   console.log(index)//1 2 3 4 5 6 7    }    for(let index in
Stella981 Stella981
3年前
HQChart使用教程63
HQChart使用教程63uniapp使用renderjshqchart序步骤1\.安装依赖模块2\.创建renderjsqhchart模块3\.使用HQChartCtrl对hqchart进行简单的封装4\.page页面创建一个view元素绑定到HQChartCtrl
Stella981 Stella981
3年前
Quick Sort(三向切分的快速排序)(Java)
1//三向切分的快速排序2//这种切分方法对于数组中有大量重复元素的情况有比较大的性能提升34publicstaticvoidmain(Stringargs)5{6ScannerinputnewScanner(System.in);7
Wesley13 Wesley13
3年前
JavaSE_坚持读源码_HashSet对象_Java1.7
对于HashSet而言,它是基于HashMap实现的,HashSet底层采用HashMap来保存所有元素,因此HashSet的实现比较简单,查看HashSet的源代码,可以看到如下代码:1packagejava.util;23publicclassHashSet<E
Stella981 Stella981
3年前
Redis 有序集合 命令集
BZPOPMAX(https://www.oschina.net/action/GoToLink?urlhttps%3A%2F%2Fredis.io%2Fcommands%2Fbzpopmax):BZPOPMAXzset1zset20多个集合最大元素BZPOPMIN(https://www.oschina.net/