其实首先是搞下来源码,放进XCode里。。。
光索引就索引了五遍啊简直泣血。。 ###建立xcode项目
-
源码拷贝到本地
-
安装gclient(具体参见下文)
-
切换目录到
home/src_tarball/tarball/chromium/
,运行gclient
, 这个会自动更新源码生成xcode项目文件:$ gclient runhooks
其实首先是搞下来源码,放进XCode里。。。
光索引就索引了五遍啊简直泣血。。 ###建立xcode项目
源码拷贝到本地
安装gclient(具体参见下文)
切换目录到home/src_tarball/tarball/chromium/
,运行gclient
, 这个会自动更新源码生成xcode项目文件:
$ gclient runhooks
//使用express.js+ node.js搭建restful api | |
var express = require('express'); | |
var app = express(); | |
app.use(express.bodyParser()); | |
var quotes = [ | |
{ author : 'Audrey Hepburn', text : "Nothing is impossible, the word itself says 'I'm possible'!"}, |
/** | |
* SASS 学习记录 | |
* date: 2013-09-03 | |
* author: chengmu | |
* Install: gem install sass | |
* StartWatching: sass --watch style.scss:style.css | |
* features: | |
* 嵌套选择器/样式/伪类(`&`指向父元素) | |
* $定义变量(可用于属性名) | |
* 属性值运算 数值/[辅助函数](http://sass-lang.com/docs/yardoc/Sass/Script/Functions.html) |
// Cross Browser Event Utility | |
// Nicholas Zakas, Professional JavaScript for Web Developers p.441 | |
(function(window, document) { | |
'use strict'; | |
var | |
EventUtil = { | |
addHandler: function( element, type, handler ) { | |
if ( element.addEventListener ) { | |
element.addEventListener ( type, handler, false ); |
//Ajax | |
function request(type, url, opts, callback) { | |
var xhr = new XMLHttpRequest(); | |
if (typeof opts === 'function') { | |
callback = opts; | |
opts = null; | |
} | |
xhr.open(type, url); | |
var fd = new FormData(); |
//Ajax | |
function request(type, url, opts, callback) { | |
var xhr = new XMLHttpRequest(); | |
if (typeof opts === 'function') { | |
callback = opts; | |
opts = null; | |
} | |
xhr.open(type, url); | |
var fd = new FormData(); |
/** | |
* 选取dom元素 | |
*/ | |
var $ = document.querySelectorAll.bind (document); | |
myList = Array.prototype.slice.call (myNodeList); | |
/** |
(function () { | |
var a = window.a = { | |
name : 'a' | |
}; | |
var aStr = window.aStr = 'stringA'; | |
window.a.name = 'b'; | |
window.aStr = 'stringB'; | |