摘要: Improving Web App Performance With the Chrome DevTools Timeline and ProfilesWe all want to create high performance web applications. As our apps get more complex, we may want to supportrich animationsand that ideal60frames a second that keep our appsresponsiveandsnappy. Being aware of how to measure 阅读全文
posted @ 2014-03-22 19:50 Kevin Liu Blog 阅读(304) 评论(0) 推荐(0) 编辑
摘要: git clone resource.gitgit branch -alist all the local and remote branchesgit checkout [remote branch] 阅读全文
posted @ 2014-03-18 09:48 Kevin Liu Blog 阅读(645) 评论(0) 推荐(0) 编辑
摘要: (function ($) { var a = ['test1', 'test2', 'test3', 'test4']; recursive(3, 'test').done(function (result) { console.log(result); }); function get(id) { var dfd = $.Deferred(); setTimeout(function () { dfd.resolve(a[id]); }, 1000); return dfd.... 阅读全文
posted @ 2014-03-04 10:20 Kevin Liu Blog 阅读(206) 评论(0) 推荐(0) 编辑
摘要: 利用d3js绘出环形百分比环 (function() { var numberData = [{ value : 0.334, text : "33.4%", color : "#fd12000", id : 1 }, { value : 0.666, text : "66.6%", ... 阅读全文
posted @ 2014-03-04 10:04 Kevin Liu Blog 阅读(2834) 评论(0) 推荐(0) 编辑
摘要: 此代码仿照jquery源码中$.when()的实现function test(i) { var dfd = $.Deferred(); if(i%2 == 0) { console.log("resolve " + i); dfd.resolve(); } else { console.log("failure " + i); dfd.reject(); } return dfd.promise();}function call() { var dfd = $.Deferred(); va... 阅读全文
posted @ 2014-01-21 22:48 Kevin Liu Blog 阅读(342) 评论(0) 推荐(0) 编辑
摘要: 1.命令方式: 1)Create the top-level root: mvn archetype:generate -DarchetypeGroupId=org.codehaus.mojo.archetypes -DarchetypeArtifactId=pom-root -DarchetypeVersion=RELEASE 2)cdinto your newly created root dir 3)每一个子模块: mvn archetype:generate -DarchetypeGroupId=org.apache.maven.archetypes -DarchetypeArt... 阅读全文
posted @ 2013-12-13 13:22 Kevin Liu Blog 阅读(1291) 评论(0) 推荐(0) 编辑
摘要: 1. 什么是用户故事? 用户故事描述了对用户或客户有价值的功能。用户故事由以下三方面组成(3C):一份书面的故事描述,用来做计划和作为提示(Card)。有关故事的对话,用于具体化故事细节(Conversation)。测试,用于表达和编档故事细节且可用于确定故事何时完成(Confirmation)。可以用故事卡来记录用户故事,在故事卡的正面记录故事的简短描述,背面则记录测试要点。2. 什么是优秀的用户故事?优秀的用户故事应该具备以下6个特点(INVEST):独立的(Independent)。可讨论的(Negotiable)。对用户或客户有价值的(Valuable to users or cust 阅读全文
posted @ 2013-09-02 12:07 Kevin Liu Blog 阅读(522) 评论(0) 推荐(0) 编辑
摘要: Linux下安装maven (转载)1.首先到Maven官网下载安装文件,目前最新版本为3.0.3,下载文件为apache-maven-3.0.3-bin.tar.gz,下载可以使用wget命令;2.进入下载文件夹,找到下载的文件,运行如下命令解压tar-xvfapache-maven-2.2.1-bin.tar.gz解压后的文件夹名为apache-maven-3.0.33.使用mv命令将apache-maven-3.0.3文件夹拷贝到自己指定的文件夹,比如/usr/local/下mv-rfapache-maven-3.0.3/usr/local/4.配置环境变量,编辑/etc/profile 阅读全文
posted @ 2013-04-25 11:03 Kevin Liu Blog 阅读(155) 评论(0) 推荐(0) 编辑
摘要: 转载自:http://www.missyuan.com/thread-496832-1-1.html选择字体中需要考量的因素很多,跨平台预装情况、是否有同族的粗体和斜体、Win下没有打开Clear Type时的表现等等。到目前为止也没有找到让我最满意的字体设置,每种字体都有自己的特点和缺点,让我很难取舍:Arial / Tahoma / Verdana这三个字体都非常“安全”主流平台上都预装,而且可读性非常好,用上这些字体应该不会错的。但是相对来说都缺少点个性,毕竟在日常使用中,尤其是大部分Windows XP用户每天都是面对着这些“标准”字体。而Verdana还有个问题是字比较宽,用到Sid 阅读全文
posted @ 2013-03-27 14:53 Kevin Liu Blog 阅读(790) 评论(0) 推荐(0) 编辑
摘要: var a;var b=!!a;a默认是undefined。!a是true,!!a则是false,所以b的值是false,而不再是undefined,也非其它值,主要是为后续判断提供便利。!!一般用来将后面的表达式强制转换为布尔类型的数据(boolean),也就是只能是true或者false; 阅读全文
posted @ 2014-07-27 13:32 Kevin Liu Blog 阅读(220) 评论(0) 推荐(0) 编辑
摘要: Turbolinks[1]:Turbolinks makes following links in your web application faster.Instead of letting the browser recompile the JavaScript and CSS between ... 阅读全文
posted @ 2014-07-17 10:40 Kevin Liu Blog 阅读(222) 评论(0) 推荐(0) 编辑
摘要: var nodes = document.getElementsByTagName("script");var node = nodes[nodes.length - 1];var src = document.querySelector ? node.src : node.getAttribute... 阅读全文
posted @ 2014-07-16 09:53 Kevin Liu Blog 阅读(374) 评论(0) 推荐(0) 编辑
摘要: 对于我来说,在编写javascript的代码的时候,对于undefined的判定会写成:function isUndefined(para) { return (para === undefined || typeof para == "undefined");}除此之外看到另外一种判定方法:... 阅读全文
posted @ 2014-07-16 09:44 Kevin Liu Blog 阅读(251) 评论(0) 推荐(0) 编辑
摘要: package com.liuxian.algo;public class MySortClass implements Comparable { public String userName; public int num; public MySortClass(String userName, int num) { this.userName = userName; this.num = num; } public int compareTo(MySortClass o) { return this.num -... 阅读全文
posted @ 2014-02-18 14:53 Kevin Liu Blog 阅读(242) 评论(0) 推荐(0) 编辑
摘要: simple demo of Handlebars.js & jquery.js 阅读全文
posted @ 2014-02-14 21:32 Kevin Liu Blog 阅读(186) 评论(0) 推荐(0) 编辑