gdchent / blog Goto Github PK
View Code? Open in Web Editor NEW夯实基础
夯实基础
ssh-keygen -t rsa -C "[email protected]" //生成git本地ssh的key密钥
git init //生成本地.git文件夹
git add . //加入git管理
git config --global user.name "gdchent" //全局配置用户名
git config --global user.email "[email protected]" //配置全局工程邮件
git config -- user.name "gdchent" //仅仅配置当前工程的用户名
git config -- user.email "[email protected]" //配置当前工程的邮件名称
git commit -m "git init工程" //提交本地git备注信息
git remote add origin https://github.com/xxxx.git //追加远程git仓库名称(origin) 以及它的对应地址
git checkout -b chentao //创建新的分支chentao
git pull origin master //拉取origin远程的master分支代码
git push origin master //推送代码到远程
git commit --amend --no-edit //把当前修改的东西追加到上次commit的备注里面
git reset --hard xxx //输入回退码 返回到对应的代码处
git push origin --delete master //删除远程master分支
git reset --soft HEAD6 //表示撤销本地6次commit 有git add .6 //表示撤销本地6次commit 不包含本地git add .
git reset --mixed HEAD
https://segmentfault.com/a/1190000022034575?utm_source=sf-related
指的是将原型链和借用构造函数的技术组合到一块。
示例代码如下:
// 定义一个父类
function SuperType(name,age){
console.log('父类构造器调用')
this.name=name;
this.age=age;
}
//定义原型类方法
SuperType.prototype.sayName=function(){
console.log('super说名字 '+this.sayName); //指向调用者的名字
}
//定义子类
function SubType(name,age){
console.log('子类构造器调用')
//在它之前先调用父类构造器
SuperType.call(this,name,age)
this.name=name;
this.age=age;
}
//比如 原型自己声明 自己的方法
SubType.prototype.subSayName=function(){
//这个是函数表达式
console.log('儿子说名字'+this.name)
}
//让子类的原型对象 其实new的时候就是做了这么一件事情
SubType.prototype=new SuperType();
//创建子类的实例
var subType=new SubType() ;
缺点就是:创建子类的实例 父类的构造函数会调用两次。第一次是子类的原型直接指向父类的实例对象,这个时候会调用第一次。第二次就是创建子类对象的时候,子类的构造器通过调用SuperType.call方法来调用父类的构造器方法。
因为我在申请的时候选择的是自动生存证书 所以我这里直接下载我nginx服务器支持的证书即可。
ssl证书具体详情参见官方文档地址:https://help.aliyun.com/document_detail/28548.html?spm=a2c4g.11186623.6.557.5c9162aaDvvLff
function test(){
console.log(arguments.callee) ;
}
test() //输出函数本身
详细解释见书本:你不知道的js上卷 第三章 3.3.1
https://cloud.tencent.com/developer/article/1346293
https://www.cnblogs.com/slly/p/6732749.html
第一步:浏览器第一次请求的时候 获取服务器返回的response的header给客户端
第二步:浏览器从本地中去寻找是否有缓存,如果有缓存,会通过Expire/Cacha-control的max-age字段值做比较,如果在有效期内就读取缓存,如果缓存过期重新向服务器发送请求
浏览器有缓存,并且缓存过期了,才有协商缓存。
第一次请求后台服务器的时候,服务器返回Last-Modified字段,客户端后续请求的时候将上次请求的Last-Modified字段 ,添加到请求的If-Last-Modified发送给后台,后台服务器比较时间是不是很旧,如果较旧则说明文件没有被修改,返回304Not Modified,浏览器从缓存中读取缓存,如果时间不是很旧,说明文件被更新,浏览器直接从服务器加载资源, 返回200
BOM的核心对象是window,它是用来表示浏览器的一个实例。在浏览器中。window既是一个浏览器窗口,同时也是ecmascript规定的global.
总结:浏览器窗口(window)作为global对象,网页中任何一个变量 对象 属性 方法都是在window中的,
所以可以访问parseInt方法
js=bom+dom+ecmascript 第一章讲过了。
window添加的属性 不可以 通过delete操作符被直接删除,因为它自带的 [[Configurable]]属性被设置为false。
在之前有讲过。如果我们集成了第三方框架,因为每一个框架页面都有自己的全局执行环境的问题。
而在js中为每一个window对象提供了一个f'rames 属性(数组)来访问其它的框架的window,这样我们就可以通过window.frames的索引去获取到它,会根据页面的引入的从上往下的顺序依次获取子window对象.
示例代码入下:(比如frameset标签的嵌套问题)
<html>
<head>
</head>
<body>
<frameset rows ="100,*">
<framesrc="frame.htm"name="topFrame">
<frameset cols="50%,50%">
<framesrc="anotherframe.htm"name="leftFrame">
<framesrc="anotherframeset.htm"name="rightFrame"></frameset>
</frameset>
</body>
</html>
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.