再次把博客移回国内

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

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

Virtualbox安装window10的64位预览版错误

Posted in windows on December 26th, 2014 by admin

错误代码如下:
error code 0x0000005d

根据这里的解释:

我升级了VB,然后下载VT-x support check,

http://www.intel.com/support/processors/tools/piu/sb/cs-014921.htm

并且运行了:

“C:Program FilesOracleVirtualBoxVBoxManage.exe” setextradata global VBoxInternal/CPUM/CMPXCHG16B 1

问题解决。

Tags:

Grunt Build Error: require.js blocks are no more supported

Posted in webapp on December 22nd, 2014 by admin

When I use Yo to test Backbone webapp, I get thie error:

Running "useminPrepare:html" (useminPrepare) task
Fatal error: require.js blocks are no more supported.

According to the discuss in grunt-usemin, I update Gruntfile.js with requirejs.dis.options:

Insert the following options:

,
include: '../bower_components/requirejs/require',
mainConfigFile: yeomanConfig.app + '/scripts/main.js',
out: yeomanConfig.dist + '/scripts/app.min.js'

Then update index.html in app category from

<!-- build:js scripts/main.js -->
<script data-main="scripts/main" src="bower_components/requirejs/require.js"></script>
<!-- endbuild -->
</code>
to

<!-- REMOVE THIS AFTER `grunt build` -->
<script data-main="scripts/config" src="bower_components/requirejs/require.js"></script>

<!-- UNCOMMENT THIS AFTER `grunt build` -->
<!-- <script src="scripts/app.min.js"></script> -->

The problem should be resolved.

And after build app to dist category, don't forget to change index.html, use app.min.js to replace requirejs/require.js.

Tags: ,

Mysql5.7 start mysqld.service失败的问题

Posted in Mysql on December 18th, 2014 by admin

根据日志的错误提示:
innoDB pthread_create returned 13

这里给出了mysqld无法启动的相似描述:

http://community.sitepoint.com/t/cannot-set-up-innodb-support-in-mysql-due-to-pthread-create-returned-11-error/44560

系统是centos7。

PHP5.4.35的php_curl.dll问题

Posted in PHP on December 16th, 2014 by admin

php_curl出现curl_init错误。

Windows下64位可以看这里:

http://www.anindya.com/php-5-4-3-and-php-5-3-13-x64-64-bit-for-windows/

XP 32位下:
可以下载PHP5.4.34的php_curl.dll,直接替换即可。

Tags:

Mysql错误:mysql Illegal mix of collations for operation like

Posted in 杂项 on November 5th, 2014 by admin

原因是datetime和autoincrement id不能用like。就是这样。

论程序员的幸福感

Posted in Coding on October 8th, 2014 by admin

程序员的幸福感是什么?你想一辈子写程序,却没有幸福感,那么你是很难一直写下去的。

所谓程序员的幸福感就是:

  • 写程序有自由感
  • 写程序很享受、有惬意感
  • 写程序有灵感、才思泉涌感
  • 写程序有成就感、荣誉感
  • 写程序足够养家,可以体面地活下去

如果满足上述条件,我就觉得可以一辈子写程序,写一辈子程序。

$.parseJSON Unexpected token t错误

Posted in javascript on September 12th, 2014 by admin

常见的原因是:双引号内的引号需要双重释义。例如:”description”:”Created for \”zhaiduo.com\””

验证json格式是否有问题,可以看这里:http://jsonlint.com/

Tags:
RSS Feed