centos下安装node.js并且连接mysql

1、下载node.js源码版本node-v0.6.7.tar.gz(http://nodejs.org/#download), 2、解压node-v0.6.7  tar -xzvf node-v0.6.7.tar.gz 3、cd node-v0.6.7      ./configure      make      make install 4、进入到node目录/usr/local/bin/(whereis node) 5、新建一个example.js var http = require(‘http’); http.createServer(function (request, response){     response.writeHead(200, {‘Content-Type’: ‘text/plain’});     response.end(‘Hello Worle\n’); }).listen(8124); console.log(‘Server run!’); 6、执行 node example.js Server run! 7、安装db-mysql           npm install db-mysql … 继续阅读

发表在 移动web开发 | 留下评论

kindle fire安装搜狗输入法

root Kindle Fire,详看:http://bbs.imp3.net/thread-10503957-1-1.html 安装任何你喜欢的中文输入法,比如搜狗输入法或者谷歌拼音输入法 运行RE文件管理器,到/data/app目录, 将输入法的apk文件剪切到/system/app(在re顶部设置挂载为读/写)。 重启Kindle Fire。 再次运行RE管理器,到/system/app目录,运行刚才你移动过来的apk文件,安装好之后,删除。 注:长按文件就会弹出操作菜单!

发表在 工具推荐 | 5 条评论

html5学习轨迹——Web 上的视频

视频格式当前,video 元素支持三种视频格式: 格式 IE Firefox Opera Chrome Safari Ogg No 3.5+ 10.5+ 5.0+ No MPEG 4 9.0+ No No 5.0+ 3.0+ WebM No 4.0+ 10.6+ 6.0+ No Ogg = 带有 Theora 视频编码和 Vorbis 音频编码的 Ogg 文件 MPEG4 = 带有 H.264 … 继续阅读

发表在 前端技术 | 留下评论

Zend Studio 9.0正式版注册破解

1、下载com.zend.php.core_9.0.0.201111081531.jar文件,下载成功后复制到你安装Zend Studio 9.0的plugins目录下,覆盖同名文件。 2、启动Zend Studio 9.0,输入如下注册码License key(删除掉第二第三行的回车): 34E606CF10C3E4CF202ABCEAA9B0B7A64DD2C5862A514B944AAAB38E3EB8 A5F2CD735A2AB4CF9B952590EFA62BA0AB2B3E5D99C33C55309EE143165A C7F1817D626574615F3B32312F31312F323031313B392E303B3030313B313B3330 com.zend.php.core_9.0.0.201111081531.jar下载地址:http://115.com/file/cl1j8dxs#com.zend.php.core_9.0.0.201111081531.jar              

发表在 工具推荐 | 留下评论

js实现php函数的功能

使用js实现php函数的功能,包含了大部分php函数。用起来非常方便。 参考:http://phpjs.org

发表在 前端技术 | 一条评论

利用jquery的getJson解决ajax跨域问题

js: $.getJSON(“http://www.mm-bm.com/test.php?a=1&b=2&callback=?”, function(data){ alert(data.a); } test.php: $callback = $_GET['callback']; $array = array( ‘a’=>$_GET['a'], ‘b’=>$_GET['b'], ); $json = json_encode ($array); $jsonp = $callback . ‘(‘ . $json . ‘)’; echo $jsonp; exit;

发表在 前端技术 | 4 条评论

xcode下phonegap不能使用$.getJSON的解决方案

$.getJSON(“http://www.mm-bm.com/test.php?a=1&b=2&callback=?”, function(data){ alert(data.a); } 在PhoneGap.plist下添加 参考: http://stackoverflow.com/questions/7869351/getjson-not-working-in-xcode-4-2-and-ios5-using-phonegap1-1-0 adding the remote host in the trusted ones on plist use the headers: header(‘Access-Control-Allow-Origin: *’); Some of that 3 tips must solve your problem.

发表在 移动web开发 | 留下评论

php可变数量的参数列表

使用 func_num_args(),func_get_arg(),和 func_get_args() 函数即可。 <?php function foo() { $numargs = func_num_args(); echo “Number of arguments: $numargs<br />\n”; if ($numargs >= 2) { echo “Second argument is: ” . func_get_arg(1) . “<br />\n”; } $arg_list = func_get_args(); for ($i = 0; … 继续阅读

发表在 php | 2 条评论

Q-Dir 资源管理器

Q-Dir是一款很不错的资源管理器,免费、支持中文,支持32和64位系统。在win 7下可以提高工作效率。 下载链接 截图如下:  

发表在 工具推荐 | 留下评论

ios下phonegap的截屏插件screenshot

一、共3个文件            1、ScreenShot.js           function Screenshot() { } /** * Save the screenshot to the user’s Photo Library */ Screenshot.prototype.saveScreenshot = function() { PhoneGap.exec(“Screenshot.saveScreenshot”); }; PhoneGap.addConstructor(function() { if(!window.plugins) { window.plugins = {}; } window.plugins.screenShot … 继续阅读

发表在 移动web开发 | 留下评论