Tengine 400 Bad Reques错误

Posted in Linux/Unix on April 22nd, 2015 by adam

tengine在合并javascript文件时,nginx返回400错误,百思不得其解。
原来是tengine:
默认只有text/css application/x-javascript

增加concat_types “application/javascript”;即可。…

Tags: , ,

php configure error unsupported size of off_t

Posted in PHP on April 18th, 2015 by adam

系统环境:macos 10.10.2 vbox4.3.20 centos7 php5.6
–enable-opcache出错,取消后
PHP编译时zip_add.c报错:error unsupported size of off_t

但是有意思的事,我把 –with-zilb 和 --enable-zip单独放一行的时候,编译通过。

Xcode6.3出错NSString is not implicitly convertible to String

Posted in MAC on April 14th, 2015 by adam

Xcode6.3最近更新后,swift出错:NSString is not implicitly convertible to String

直接用as String或者String()转型即可。

比如:

pathForResource(shaderName, ofType: “glsl”)
=》
pathForResource(shaderName as String, ofType: String(“glsl”))

Tags: ,

Jquery Ajax Parsererror: Unexpected end of input

Posted in 前端 on April 10th, 2015 by adam


使用jquery-1.9.1进行ajax提交 Error 报错:
parsererror
Unexpected end of input

根据这里的解释:

“parsererror”, SyntaxError: {message: “Unexpected end of input”}

jQuery 1.8.3 did report a success, 1.9.1 reports a failure.

根据这里的解释,解决办法是:
var json = $.parseJSON(jsonString || “null”);
或者
dataType: “text”

Tags: ,

To Anyone Wanna Buy My Domains

Posted in 赚钱 on March 23rd, 2015 by adam

Currently (2015) my available domains ares:

zhaiduo.com
hairfans.com
1f1t.com
hr81.com
zizuyou.com
BIZLAYOUT.COM
Ivnidea.com
LPXQ.NET
shader3D.com
qcDog.com
xfdyc.com
pinlenaicha.com
nbriji.com
vv81.com

Leave me messages if any questions. [4-6-9-1 6597 at qq.com]

PHP出错:json_encode: Invalid UTF-8 sequence in argument

Posted in PHP on March 19th, 2015 by adam

json打包出错:

json_encode(): Invalid UTF-8 sequence in argument

解决办法:检测非法UTF8

mb_check_encoding($strs,’UTF-8′)

然后

mb_convert_encoding($strs,’UTF-8′,’UTF-8′);

即可保证不会出现Invalid UTF-8的错误,但是可能结果字符串中会有问号等乱码。

spmjs运行构建命令出错

Posted in 前端 on March 6th, 2015 by adam

npm update以后,运行spm build提示:
spm Deprecated: buildArgs.include is deprecated, using sea, standalone and umd instead.:

构建失败。貌似spm不小心被升级为3的版本。

试着重装spm@2.x
cnpm cache clean 清理缓存
cnpm uninstall spm -g 卸载模块
cnpm uninstall spm@2.x -g 卸载模块

cnpm install spm@2.x -g
cnpm install spm-build@0.x -g

spm build
//////////////
….
Done: without errors.

问题解决。

更多参考:
迁移 spm2 的模块到 spm3

https://github.com/spmjs/spm/wiki/%E8%BF%81%E7%A7%BB-spm2-%E7%9A%84%E6%A8%A1%E5%9D%97%E5%88%B0-spm3

Tags: ,

再次把博客移回国内

Posted in 网站维护 on January 29th, 2015 by adam

兜兜转转,总要适应环境,过去的就过去吧,未来就在眼前~你好! 2015~

RSS Feed