2022.1.26
不改变视觉效果的情况下,减少场景的复杂性
2022.2.15
this指向

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
//1. 普通函数
//普通函数的this指向window
function fn(){
console.log(this);
};
fn();
// fn.call();
//2. 对象的方法
//对象的方法 this指向的是对象o
var o ={
sayHi:function (){
console.log(this);
}
};
o.sayHi();
//3. 构造函数
//构造函数的this指向实例对象ldh
//原型对象的this指向实例对象ldh
function Star(){
console.log(this);
};
Star.prototype.sing = function (){
console.log(this);
}
var ldh = new Star();
ldh.sing();
//4. 绑定事件函数
//this 指向函数调用者btn
btn.onclick = function (){
console.log(this);
};
//点击就可以调用
//5. 定时器函数
//定时器里面的this指向window
setInterval(function (){
console.log(this)
},3000);
//这个函数是定时器自动1s调用一次
//6. 立即执行函数
//立即执行函数里面的this指向window
(function (){
console.log(this);
})();
//立即执行函数是自动调用
————————————————
版权声明:本文为CSDN博主「cake_eat」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/cake_eat/article/details/108851411
fetch方法
.then(data)=>{ console.log(data); }
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
fetch("http://localhost:3000/books?id=123456",{
method:"get"
})
.then(function(value1){
console.log(value1);
return "hello";
})
.then(function(value2){
console.log(value2);
return "HelloWorld";
})
/*
.then(function(data){
console.log(data);
return data.text();
})
*/
.then(data=>{
console.log(data);
})
2022.2.16
插件
vscode-icons
Bracket Pair Colorizer
Beautify
Auto Close Tag
异步返回值问题
https://www.jb51.net/article/100661.htm
JS时间比较
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
//参考地址: https://www.cnblogs.com/Byme/p/7687313.html
function tab(date1,date2){
var oDate1 = new Date(date1);
var oDate2 = new Date(date2);
if(oDate1.getTime() > oDate2.getTime()){
console.log('第一个大');
} else if(oDate1.getTime() < oDate2.getTime()){
console.log('第二个大');
}else if(oDate1.getTime() == oDate2.getTime()){
console.log('一样大');
}
}
tab('2015-10-10 00:00:00','2015-10-03 00:00:00');
tab('2015-10-10','2015-10-03');
这样的时间格式都是可以的;
需要注意的是中间的分割符号 '-'必须是英文的;否者不能够比较;
今天不晓得为啥,写成了中文符号,英文符号中中文符号是有区别的
时间格式这一种,要使用英文符号
new Date()参数格式如下:( 得到一个中国标准时间 )
1、用整数初始化日期对象
var date1 = new Date(2017,06,06); console.log(date1); // Thu Jul 06 2017 00:00:00 GMT+0800 (中国标准时间)
var date1 = new Date(2017,1,1); console.log(date1); // Wed Feb 01 2017 00:00:00 GMT+0800 (中国标准时间)
var date1 = new Date(2017,01-2,01); console.log(date1); // Thu Dec 01 2016 00:00:00 GMT+0800 (中国标准时间)
var date1 =new Date(2017,06,06,06,06,06); console.log(date1); // Thu Jul 06 2017 06:06:06 GMT+0800 (中国标准时间)
说明: new Date( year, month, date, hrs, min, sec) 按给定的参数创建一日期对象
2、用字符串初始化日期对象
var date2 = new Date(“2017/06/06”); console.log(date2); // Tue Jun 06 2017 00:00:00 GMT+0800 (中国标准时间)
var date2 = new Date(“2017-08-08”); console.log(date2); // Tue Aug 08 2017 08:00:00 GMT+0800 (中国标准时间)
var date2 = new Date(“2017-9-9”); console.log(date2); // Sat Sep 09 2017 00:00:00 GMT+0800 (中国标准时间)
getTime() 返回从 1970 年 1 月 1 日(指定日期)至今的毫秒数
var d=new Date();
document.write("从 1970/01/01 至今已过去 " + d.getTime() + " 毫秒");
2022.2.17
去除重复值
https://www.cnblogs.com/shj-com/p/7458510.html
排序
https://blog.csdn.net/m0_37885651/article/details/80016718
2022.2.18
JS 深拷贝和浅拷贝
https://www.jianshu.com/p/f4329eb1bace
https://blog.csdn.net/HOMEXS/article/details/114947344
可视化
leaflet+Echarts
https://www.cnblogs.com/giserhome/p/11203941.html

带箭头的线
https://www.cnblogs.com/s0611163/archive/2020/08/01/13414151.html
https://www.cnblogs.com/xtfge/p/9949063.html
mapbox和leaflet对比
https://blog.csdn.net/wyf86/article/details/103704914
debug
1
2
3
4
5
//清空画图区域
let container = document.getElementById("canvas")
let ctx = container.getContext("2d")
ctx.clearRect(0, 0, container.width, container.height);//这里是container
一个实例
https://www.cnblogs.com/yijiaming/p/11540022.html
leaflet示例
https://blog.csdn.net/QQ98281642/article/details/117514585
CSS实现自适应屏幕高度
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<style>
body,html{
margin:0px;
height:100%;
}
.div1{
width:100px;
height:100%;
background:red;
}
</style>
</head>
<body>
<div class="div1">
</div>
</body>
</html>

deck.gl
https://ld246.com/article/1605362989924
kepler.gl
https://blog.csdn.net/sinat_41310868/article/details/114108212
Unfolded Studio
ES6 支持函数带有默认参数
1
2
3
4
5
6
7
function myFunction(x, y = 10) {
// y is 10 if not passed or undefined
return x + y;
}
myFunction(0, 2) // 输出 2
myFunction(5); // 输出 15, y 参数的默认值
DBSCAN
https://www.cnblogs.com/sddai/p/7911680.html
https://blog.csdn.net/weixin_37831477/article/details/78953043
Event

javascript中,const声明的对象和var声明的对象有何异同?
块级作用域:代码执行时遇到花括号,会创建一个块级作用域,花括号结束,销毁块级作用域



2022.3.7
RGBA转16进制
function hexify(color) { var values = color .replace(/rgba?(/, ‘’) .replace(/)/, ‘’) .replace(/[\s+]/g, ‘’) .split(‘,’); var a = parseFloat(values[3] || 1), r = Math.floor(a * parseInt(values[0]) + (1 - a) * 255), g = Math.floor(a * parseInt(values[1]) + (1 - a) * 255), b = Math.floor(a * parseInt(values[2]) + (1 - a) * 255); return “#” + (“0” + r.toString(16)).slice(-2) + (“0” + g.toString(16)).slice(-2) + (“0” + b.toString(16)).slice(-2); }
var myHex = hexify(‘rgba(255,232,186,0.4)’); // “#f5faf3”
console.log(myHex);
https://blog.csdn.net/qq_37198814/article/details/82024338
聚类算法(DBSCAN、OPTICS、KMeans)
https://github.com/LukaszKrawczyk/density-clustering
三角剖分
https://gitee.com/mirrors/delaunator
11级切片,200
hifleetst
爬出来的数据转json
文档
marker svg
不能显示符号 尺寸?

private、public
https://blog.csdn.net/heyue_99/article/details/68945650
https://blog.csdn.net/qq_38045106/article/details/84666638
scss转css
https://www.sassmeister.com/
开源社区
https://blog.csdn.net/weixin_46078894/article/details/108954974
proj4js


函数放进任务队列
先执行主线程
Event Loop
只指定成员变量的名称
1
2
3
4
5
6
7
id = 'world';
let obj = {
name: 'hello',
id
}
console.log(obj.id);

创建二维数组
https://www.cnblogs.com/lhs-fight/p/14212969.html
一个函数有异步
一个函数有
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
function a() {
setTimeout(function () {
console.log("b")
}, 1000);
console.log("a");
}
function c() {
console.log("c");
}
a();
c();
//a
//c
//b
前端技术总结
https://www.kancloud.cn/zhangqh/front/302716

https://juejin.cn/post/6974356682574921765
原始类型和引用类型
1.赋值的区别 引用 值
2.比较的区别
3.传参的区别

https://www.zhihu.com/question/504120353/answer/2262155770
https://blog.csdn.net/huihui_999/article/details/120939161
https://www.cnblogs.com/kgwei520blog/p/13667378.html
Nodejs解决乱码
https://www.yisu.com/zixun/621728.html
vue create 和vue init webpack的区别
https://blog.csdn.net/qq_22182989/article/details/103611934
https://blog.csdn.net/weixin_42581303/article/details/123644358
display: none; DOM 结构:浏览器不会渲染 display 属性为 none 的元素,不占据空间; 事件监听:无法进行 DOM 事件监听; 性能:动态改变此属性时会引起重排,性能较差; 继承:不会被子元素继承,毕竟子类也不会被渲染; transition:transition 不支持 display。 visibility: hidden; DOM 结构:元素被隐藏,但是会被渲染不会消失,占据空间; 事件监听:无法进行 DOM 事件监听; 性 能:动态改变此属性时会引起重绘,性能较高; 继 承:会被子元素继承,子元素可以通过设置 visibility: visible; 来取消隐藏; transition:transition 不支持 display。 opacity: 0; DOM 结构:透明度为 100%,元素隐藏,占据空间; 事件监听:可以进行 DOM 事件监听; 性 能:提升为合成层,不会触发重绘,性能较高; 继 承:会被子元素继承,且,子元素并不能通过 opacity: 1 来取消隐藏; transition:transition 不支持 opacity。
‘vue-cli-service’ 不是内部或外部命令,也不是可运行的程序 或批处理文件。
解决方法:npm install
mysql5.7+SQLyog 安装
https://zhuanlan.zhihu.com/p/373515920
https://blog.csdn.net/junR_980218/article/details/124419384
天若
https://blog.csdn.net/u014723479/article/details/121177187
洋葱模型
https://zhuanlan.zhihu.com/p/279391637
https://zhuanlan.zhihu.com/p/417163957
midway->egg->koa
nest->express

js内存泄漏
https://segmentfault.com/a/1190000020231307
入门文章,写的很好
https://zhuanlan.zhihu.com/p/74546693