会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
honghong
我是红红, 码农一枚,欢迎带走
博客园
首页
新随笔
联系
订阅
管理
上一页
1
···
5
6
7
8
9
10
11
下一页
2018年7月14日
node进程捕捉错误
摘要: var childProcess = require('child_process'); var commitMessage = (function() { var spawn = childProcess.spawnSync(<common>, <param>); var errorText =
阅读全文
posted @ 2018-07-14 17:59 wanhong
阅读(363)
评论(0)
推荐(0)
2018年7月10日
js 实现路由功能
摘要: 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
阅读(492)
评论(0)
推荐(0)
2018年7月9日
Vue数据绑定和响应式原理
摘要: Vue数据绑定和响应式原理 当实例化一个Vue构造函数,会执行 Vue 的 init 方法,在 init 方法中主要执行三部分内容,一是初始化环境变量,而是处理 Vue 组件数据,三是解析挂载组件。以上三部分内容构成了 Vue 的整个执行过程。 Vue 实现了一个 观察者-消费者(订阅者) 模式来实
阅读全文
posted @ 2018-07-09 01:31 wanhong
阅读(417)
评论(0)
推荐(0)
2018年6月22日
JavaScript实现MVVM之我就是想监测一个普通对象的变化
摘要: 转载 我的博客始终都有一个特点,就是喜欢从0开始,努力让小白都能看的明白,即使看不明白,也能知道整体的来龙去脉,这篇博客依然秉承着这个风格。以MVVM模式为主线去实现的JavaScript框架非常流行,诸如 angular、Ember、Polymer、vue 等等,它们的一个特点就是数据的双向绑定。
阅读全文
posted @ 2018-06-22 11:19 wanhong
阅读(511)
评论(0)
推荐(1)
2018年6月15日
缓存的理解
摘要: 浏览器资源访问过程: 1.当访问静态资源文件时,首先使用url hashcode作为key查询本地资源缓存。 2.如果没找到资源,那么直接访问浏览器,然后将请求的资源文件缓存并载入到html中。 3.如果找到资源,读该资源在服务器创建的的时间,加入http响应头If-Modified-Since:
阅读全文
posted @ 2018-06-15 09:57 wanhong
阅读(273)
评论(0)
推荐(0)
2018年6月6日
理解promise 02
摘要: 1:promise是什么? 就是(链式)包装的回调函数. 2:语法 new Promise( function(resolve, reject) {...} /* executor */ ); executor是带有 resolve 和 reject 两个参数的函数 。Promise构造函数执行时立
阅读全文
posted @ 2018-06-06 11:48 wanhong
阅读(115)
评论(0)
推荐(0)
2018年6月3日
线段与线段的交点
摘要: + [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
阅读(288)
评论(0)
推荐(0)
2018年6月2日
线段与线段交点的推导公式
摘要: 知识储备: 知识储备: 叉乘: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
阅读(3219)
评论(0)
推荐(0)
2018年5月20日
promise你懂了吗?
摘要: 你能答对几题? 题目一 题目二 题目三 题目四 题目五 题目六 题目七 题目八 题目九 题目十
阅读全文
posted @ 2018-05-20 21:34 wanhong
阅读(170)
评论(0)
推荐(0)
2018年4月27日
webgl example1
摘要: 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
阅读(415)
评论(0)
推荐(0)
上一页
1
···
5
6
7
8
9
10
11
下一页
公告