var le = [{name:"js"}, {name:"css"}, {name:"python"} ]; var index = le.findIndex(function(item){ return item.name== "css"; }); console.log(index);1 ...
分类:
编程语言 时间:
2021-03-01 13:46:39
阅读次数:
0
模块化结合typescript - 泛型改造 // 为函数添加泛型 function useURLLoader<T>(url: string) { const result = ref<T | null>(null) // 在应用中的使用,可以定义不同的数据类型 interface DogResul ...
分类:
其他好文 时间:
2021-03-01 13:32:50
阅读次数:
0
主要依靠一个js文件 ,引入到content页面 $(function () { $.get("header.html",function (data) { $("#header").html(data); }); $.get("footer.html",function (data) { $("# ...
分类:
Web程序 时间:
2021-03-01 13:11:10
阅读次数:
0
onClickRow: function (index) { var editor = feeTable.datagrid('getEditors', index); editor[0].target.next('span').find('input').blur(function () { fee ...
分类:
其他好文 时间:
2021-02-27 13:33:15
阅读次数:
0
<script>function getQueryVariable(variable) { var query = window.location.search.substring(1); var vars = query.split("&"); for (var i=0;i<vars.length ...
分类:
Web程序 时间:
2021-02-27 13:14:25
阅读次数:
0
一 键盘事件 1)常用的三个 //1 onkeyup 按键弹起时触发 document.onkeyup = function () { console.log('弹起时才触发'); } //2 onkeydown 按键按下的时候触发 document.onkeydown = function () ...
分类:
其他好文 时间:
2021-02-26 13:13:55
阅读次数:
0
最近在用tensorrt api实现refinedet,中间过程记录一下。主要参考的如下仓库: https://github.com/wang-xinyu/tensorrtx tensorrt api说明: https://docs.nvidia.com/deeplearning/tensorrt/ ...
1 function httpString(s) { 2 var reg = /(https?|http|ftp|file):\/\/[-A-Za-z0-9+&@#/%?=~_|!:,.;]+[-A-Za-z0-9+&@#/%=~_|]/g; 3 s = s.match(reg); 4 return ...
分类:
Web程序 时间:
2021-02-26 13:00:13
阅读次数:
0
function getRandomIntInclusive(min, max) { min = Math.ceil(min); max = Math.floor(max); return Math.floor(Math.random() * (max - min + 1)) + min; //含最 ...
分类:
Web程序 时间:
2021-02-25 12:00:42
阅读次数:
0
var img = "imgurl";//imgurl 就是你的图片路径 function getBase64Image(img) { var canvas = document.createElement("canvas"); canvas.width = img.width; canvas.he ...
分类:
Web程序 时间:
2021-02-25 11:44:24
阅读次数:
0