mac下安装php-cgi有多种方法,这里只介绍比较简单的两个方法;
- 用brew安装
- 直接下载安装XAMPP
如果安装了xcode,那么推荐使用brew来安装php。详细使用方法见官网,这里只说明如何装php-cgi;
- (NSString *) rgbToHex: (NSColor*) color { | |
NSString *hexColor = [NSString stringWithFormat:@"#%02X%02X%02X", | |
(int) ([color redComponent] * 0xFF), | |
(int) ([color greenComponent] * 0xFF), | |
(int) ([color blueComponent] * 0xFF) | |
]; | |
return hexColor; | |
} |
var queue = function(funcs, scope) { | |
(function next() { | |
if(funcs.length > 0) { | |
funcs.shift().apply(scope || {}, [next].concat(Array.prototype.slice.call(arguments, 0))); | |
} | |
})(); | |
}; | |
var obj = { | |
value: null |
function getOffset( el ) { | |
var _x = 0; | |
var _y = 0; | |
while( el && !isNaN( el.offsetLeft ) && !isNaN( el.offsetTop ) ) { | |
_x += el.offsetLeft - el.scrollLeft; | |
_y += el.offsetTop - el.scrollTop; | |
el = el.offsetParent; | |
} | |
return { top: _y, left: _x }; | |
} |
mac下安装php-cgi有多种方法,这里只介绍比较简单的两个方法;
如果安装了xcode,那么推荐使用brew来安装php。详细使用方法见官网,这里只说明如何装php-cgi;
isNumeric: function( obj ) { | |
// parseFloat NaNs numeric-cast false positives (null|true|false|"") | |
// ...but misinterprets leading-number strings, particularly hex literals ("0x...") | |
// subtraction forces infinities to NaN | |
return !jQuery.isArray( obj ) && obj - parseFloat( obj ) >= 0; | |
} |
var Class = function (base, extend) { | |
var parent = null; | |
if (Object.prototype.toString.apply(base) == '[object Function]') { | |
parent = base; | |
} else { | |
extend = base; | |
} | |
var fn = function () { | |
this.initialize.apply(this, arguments); |
FIS和FIS+的争议诞生之初就开始了,用FIS的同学一上来就会问“FIS和FIS+有什么区别呀?”。鉴于此,大概说一下FIS及FIS+的历史及其区别。
FIS产生之初定位就是做一个内核,提供一套编译体系以及一套静态资源管理的设计思路及其本地调试。编译体系可以简单通过配置+插件的方式任意扩展。FIS+就通过扩展实现了一套适合于后端是PHP+Smarty3的编译体系,然后在后端实现了静态资源管理,提出了诸如quickling
,i18n
,fis-plus(default)
之类的解决方案。这块值得说明以下的是解决方案fis-plus
其实它和编译体系的命令包取了相同的名字。下面详细说明编译体系、静态资源管理及本地调试。
整个编译体系还有很大一块内容是目录规范,还有一块是以文件类型为基础的插件体系。
➜ go-sqlite3 git:(master) ✗ go build -compiler gc
# github.com/mattn/go-sqlite3
gcc did not produce error at completed:1
on input:
#line 3 "/Users/shouding/dev/go/fis/src/github.com/mattn/go-sqlite3/sqlite3.go"
#include <sqlite3.h>
#include <stdlib.h>
#include <string.h>
var asyncMap = require('slide').asyncMap; | |
var http = require('http'); | |
asyncMap( | |
[ | |
"http://www.baidu.com", | |
"http://zhidao.baidu.com" | |
] , | |
function (url, cb) { |