总结下flex 属性的用法 demo: Read More
posted @ 2020-10-16 13:00 break_happy Views(90) Comments(0) Diggs(0) Edit
When $a \ne 0$, there are two solutions to \(ax^2 + bx + c = 0\) and they are$$x = {-b \pm \sqrt{b^2-4ac} \over 2a}.$$ \begin{equation}\label{eq6}[x_{ Read More
posted @ 2020-03-20 22:30 break_happy Views(486) Comments(0) Diggs(0) Edit
理解流: 用户在页面上的持续交互就是一条条事件流,比如一个input的输入流。 一个事件的整条处理链路(设置loading,组装参数,发请求,取消loading)就是一个流。 一个数据来自多个来源。就可以定义一条新的数据流,merge了多个来源流。每一个来源变化都能触发数据流的更新。 api: bi Read More
posted @ 2020-01-07 15:58 break_happy Views(220) Comments(0) Diggs(0) Edit
vscode 有easy-less 插件,看下配置支持自定义扩展名。 { "less.compile": { "outExt": ".acss" } } Read More
posted @ 2019-03-27 17:46 break_happy Views(2686) Comments(2) Diggs(0) Edit
react-devtools 有chrome插件版,但在chrome 插件下的通信调试不够透明,且chrome 的插件特别是开发工具界面几乎无法调试。 看到了react-devtools 也提供electron 版本的调试工具。 正好学习一下。 文件结构: react-devtools-core/s Read More
posted @ 2019-03-25 17:12 break_happy Views(1614) Comments(0) Diggs(0) Edit
网站b中包含向网站a发送的请求,那么网站b就会获得网站a的cookie,网站a登录了则网站b的cookie中会有网站a的sessionid,此时如果网站a对外提供需要sessionid的jsonp接口就会导致安全隐私信息泄漏。 jsonp的安全性确实很低。 Read More
posted @ 2017-06-27 09:13 break_happy Views(331) Comments(0) Diggs(0) Edit
koa的核心设计 是由 koa 与 koa-compose两个包构成的。 包含了 上下文context的创建引用,中间件的概念及其合并执行的机制。 application.js koa1.0中直接将context绑定到了中间件中的this引用,koa2.0 将context作为参数传给中间件 创建c Read More
posted @ 2017-04-06 12:42 break_happy Views(313) Comments(0) Diggs(0) Edit
.sortBy:排序 支持 list 和 map .filter:返回通过真值检测的元素值 支持 list 和 map .filterNot:返回不通过真值检测的元素值 支持 list 和 map .map 支持 list 和 map .merge .mergeDeep Read More
posted @ 2016-11-08 17:08 break_happy Views(335) Comments(0) Diggs(0) Edit
简单的co用例: var co=require("co") class view{ constructor(){ co(function*(){ var p1=this.ajax1() var p2=this.ajax2() try{ var result=yield [p1,p2] console Read More
posted @ 2016-02-24 13:50 break_happy Views(1922) Comments(0) Diggs(0) Edit
不少知名项目都在用lodash替换underscorelodash Lazy evaluation英文原文:http://filimanjaro.com/blog/2014/introducing-lazy-evaluation/lodash 延迟求值 中文翻译http://www.cnblogs.... Read More
posted @ 2015-05-27 14:37 break_happy Views(926) Comments(0) Diggs(0) Edit
1. node-webkit 启动页使用requrejs 将webapp中的require改为requirejs,因为requirejs本来就应该用requirejs的,require只是requirejs的一个别名。 2. node-webkit前端 requirejs模块中调用node-wbki Read More
posted @ 2015-02-13 16:09 break_happy Views(3433) Comments(0) Diggs(0) Edit
canvas html5load1主要思路update 实现12个点的绘制和旋转效果 var update = function() { ctx.save();// 把当前绘图状态保存起来 ct... Read More
posted @ 2015-01-22 13:19 break_happy Views(1101) Comments(0) Diggs(0) Edit
关于rem,主要参考文档1。腾讯ISUX (http://isux.tencent.com/web-app-rem.html)2。http://www.w3cplus.com/css3/define-font-size-with-css3-rem现在移动端 web app 的自适应布局的方案有 5种... Read More
posted @ 2015-01-18 15:07 break_happy Views(27267) Comments(3) Diggs(5) Edit
Canvas依赖分辨率不支持事件处理器 弱的a56爆大奖在线娱乐渲染能力能够以 .png 或 .jpg 格式保存结果图像最适合图像密集型的游戏,其中的许多对象会被频繁重绘SVG不依赖分辨率支持事件处理器最适合带有大型渲染区域的应用程序(比如谷歌地图)复杂度高会减慢渲染速度(任何过度使用 DOM 的应用都不快)不适合... Read More
posted @ 2014-12-10 16:42 break_happy Views(9046) Comments(3) Diggs(0) Edit
node-webkit 是什么就不介绍了 注意官网的一句话 ”node-webkit is based on Chromium and node.js " a56爆大奖在线娱乐node-webkit 实际是嵌套了个Chromium 浏览器 ,而不是webkit内核。 1项目目录,配置 package.json 2开 Read More
posted @ 2014-11-17 00:42 break_happy Views(1750) Comments(0) Diggs(0) Edit
关于 angular service factory provider 方面有很多,a56爆大奖在线娱乐也来写一篇加深下印象provider 是一切方法的基础,a56爆大奖在线娱乐功能也最强,provider 用来定义一个可以被注入的服务,其实就是一个依赖注入的模块。已ng-route 为例var ngRouteModule = a... Read More
posted @ 2014-09-12 12:07 break_happy Views(1126) Comments(0) Diggs(0) Edit
首先认识requirejsrequirejs是个包加载器,核心功能是模块化管理,可以实现按需加载。 重点是明白 模块化不是按需加载。模块化的意义: 是通过代码逻辑表明模块之间的依赖关系和执行顺序,按照模块逻辑来分解代码,起到配合mvc框架架构项目的作用。按需加载:顾名思义 根据需要 通过模块依赖 e... Read More
posted @ 2014-07-09 17:30 break_happy Views(3883) Comments(1) Diggs(1) Edit
define([],function(){ var myChart={ init:function(options){ this.ctx = options.ctx; this.data = options.data; ... Read More
posted @ 2014-06-13 23:40 break_happy Views(2682) Comments(0) Diggs(0) Edit
1. 路由启动 $locationProvider.html5Mode(true);通过pushstatex修改urlapp.jsdefine([ 'angular', "App/Ctrl/controllers", "App/Directive/directive", "a... Read More
posted @ 2014-06-13 14:31 break_happy Views(10390) Comments(0) Diggs(0) Edit
nodejs有eventEmitter 类,想到backbone 有个event模块 可以对对象做事件绑定和触发,是backbone的核心模块。backbone event模块on 添加自定义事件off 删除自定义事件trigger 派发自定义事件once 添加只执行一次的自定义事件 (内部依赖于_... Read More
posted @ 2014-05-02 00:07 break_happy Views(341) Comments(0) Diggs(0) Edit