官方地址:http://dojotoolkit.org/reference-guide/1.10/dojo/_base/lang.html#dojo-base-lang应用加载声明:require(["dojo/_base/lang"], function(lang){ // lang now c....
分类:
其他好文 时间:
2014-07-09 22:09:00
阅读次数:
431
最今在玩2048这款小游戏,游戏逻辑简单,非常适合我这种对于游戏新入行的人来实现逻辑。于是选择了最拿手的ruby语言来实现这款小游戏的主要逻辑。还是挺简单的,加起来4小时左右搞定。
上代码:
require 'optparse'
module Help
HELP_TEXT =< move to left
r =>...
分类:
其他好文 时间:
2014-07-08 18:02:06
阅读次数:
252
主要关注红色标记语句即可。
The include (or require) statement takes all the text/code/markup that exists in the specified file and copies it into the file that uses the include statement.
Including files is ...
分类:
Web程序 时间:
2014-07-08 12:53:30
阅读次数:
213
var formidable = require('formidable');var util = require('util');exports.upload = function(req,res){ var form = new formidable.IncomingForm(); ...
分类:
Web程序 时间:
2014-07-08 00:48:06
阅读次数:
417
官方地址:http://dojotoolkit.org/reference-guide/1.10/dojo/domReady.html#dojo-domreadydom加载完成后,执行。require(["dojo/domReady!"], function(){ // will not be c....
分类:
其他好文 时间:
2014-07-08 00:43:09
阅读次数:
250
1、使用nodemailer模块var nodemailer = require("nodemailer");2、代码如下exports.send_email = function(req,res) { //发件人信息设置 var smtpTransport = nodemailer.c...
分类:
Web程序 时间:
2014-07-08 00:39:18
阅读次数:
366
看了不少人的,主要还是错误处理有点问题,不多说了贴代码:require "lfs"function getpathes(rootpath, pathes) pathes = pathes or {} ret, files, iter = pcall(lfs.dir, rootpath) ...
分类:
其他好文 时间:
2014-07-05 22:07:38
阅读次数:
471
Composer的基本使用在项目中使用composer.json在项目中使用composer,你需要有一个composer.json文件,此文件的作用主要用来声明包之间的相互关系和其他的一些元素标签。require关键字第一件事情在composer.json就是使用require关键字了,你将告诉c...
分类:
其他好文 时间:
2014-07-05 18:15:01
阅读次数:
188
WebSocket首先新建一个空的文件夹,通过npm安装nodejs-websocket:npm install nodejs-websocket
新建app.js文件:var ws = require("nodejs-websocket");
ws.createServer(function(conn){
conn.on("text", function (str) {...
分类:
Web程序 时间:
2014-07-05 11:02:09
阅读次数:
335
1、使用node-xlsx包var xlsx = require('node-xlsx'); 只支持xlsx格式2、解析的Excel文件格式如下:3、程序如下: var obj = xlsx.parse('D:/test.xlsx'); //第一个工作表的数据 var data = o...
分类:
Web程序 时间:
2014-07-03 20:14:12
阅读次数:
357