上一页 1 ··· 5 6 7 8 9 10 11 下一页
摘要: var childProcess = require('child_process'); var commitMessage = (function() { var spawn = childProcess.spawnSync(<common>, <param>); var errorText = 阅读全文
posted @ 2018-07-14 17:59 wanhong 阅读(355) 评论(0) 推荐(0) 编辑
摘要: class Router { constructor() { this.routes = [] } handle(pattern, handler) { this.routes.push({ pattern, handler }) } exec(pathname) { for (const rout 阅读全文
posted @ 2018-07-10 20:22 wanhong 阅读(484) 评论(0) 推荐(0) 编辑
摘要: Vue数据绑定和响应式原理 当实例化一个Vue构造函数,会执行 Vue 的 init 方法,在 init 方法中主要执行三部分内容,一是初始化环境变量,而是处理 Vue 组件数据,三是解析挂载组件。以上三部分内容构成了 Vue 的整个执行过程。 Vue 实现了一个 观察者-消费者(订阅者) 模式来实 阅读全文
posted @ 2018-07-09 01:31 wanhong 阅读(405) 评论(0) 推荐(0) 编辑
摘要: 转载 我的博客始终都有一个特点,就是喜欢从0开始,努力让小白都能看的明白,即使看不明白,也能知道整体的来龙去脉,这篇博客依然秉承着这个风格。以MVVM模式为主线去实现的JavaScript框架非常流行,诸如 angular、Ember、Polymer、vue 等等,它们的一个特点就是数据的双向绑定。 阅读全文
posted @ 2018-06-22 11:19 wanhong 阅读(505) 评论(0) 推荐(1) 编辑
摘要: 浏览器资源访问过程: 1.当访问静态资源文件时,首先使用url hashcode作为key查询本地资源缓存。 2.如果没找到资源,那么直接访问浏览器,然后将请求的资源文件缓存并载入到html中。 3.如果找到资源,读该资源在服务器创建的的时间,加入http响应头If-Modified-Since: 阅读全文
posted @ 2018-06-15 09:57 wanhong 阅读(259) 评论(0) 推荐(0) 编辑
摘要: 1:promise是什么? 就是(链式)包装的回调函数. 2:语法 new Promise( function(resolve, reject) {...} /* executor */ ); executor是带有 resolve 和 reject 两个参数的函数 。Promise构造函数执行时立 阅读全文
posted @ 2018-06-06 11:48 wanhong 阅读(104) 评论(0) 推荐(0) 编辑
摘要: + [cpp] view plain copy point getcrosspoint(point a,point a1,point b,point b1) { point base=b1-b; double d1=abs(cross(base,a-b)); double d2=abs(cross( 阅读全文
posted @ 2018-06-03 00:14 wanhong 阅读(277) 评论(0) 推荐(0) 编辑
摘要: 知识储备: 知识储备: 叉乘:http://blog.csdn.net/nightmare_ak/article/details/77199940 定比分点法:http://blog.csdn.net/nightmare_ak/article/details/77917293 对于线段,只要先判断是 阅读全文
posted @ 2018-06-02 21:06 wanhong 阅读(3184) 评论(0) 推荐(0) 编辑
摘要: 你能答对几题? 题目一 题目二 题目三 题目四 题目五 题目六 题目七 题目八 题目九 题目十 阅读全文
posted @ 2018-05-20 21:34 wanhong 阅读(161) 评论(0) 推荐(0) 编辑
摘要: WebGL Demo main(); function main() { const canvas = document.querySelector('#glcanvas'); const gl = canvas.getContext('webgl'); if (!gl) { alert('Unabl... 阅读全文
posted @ 2018-04-27 16:55 wanhong 阅读(403) 评论(0) 推荐(0) 编辑
上一页 1 ··· 5 6 7 8 9 10 11 下一页
点击右上角即可分享
微信分享提示