上一页 1 2 3 4 5 6 7 8 9 ··· 16 下一页
摘要: var a = {n: 1}var b = a;a.x = a = {n: 2}console.log(a.x);console.log(b.x) 答案是:undefinedObject{n:2}为什么呢?个人见解:1 object属于引用类型,当然得看下内存怎么分配2 连等我一直坚持认为从左往右... 阅读全文
posted @ 2015-03-30 22:37 菠萝君 阅读(218) 评论(0) 推荐(0)
摘要: 1 render传递多值router.get('/', function(req, res, next) { res.render('index', { homeTitle: 'Hello All', homeDescription:'I gonna to write something... 阅读全文
posted @ 2015-03-28 17:23 菠萝君 阅读(197) 评论(0) 推荐(0)
摘要: 1 将可以运行的express项目生成,尽量将启动文件设置为app.js,那就意味着需要将bin/www里面的内容移到app.js里面2 不需要上传依赖项,可以使用.gitignore文件,里面的内容为'node_module'3 Procfile文件,里面的内容为'web: node app.js... 阅读全文
posted @ 2015-03-25 20:49 菠萝君 阅读(281) 评论(0) 推荐(0)
摘要: 1 kvckey value coding-(instancetype)initWithDict:(NSDictionary *)dict{ self = [super init]; if (self) {// self.answer = dict[@"answer"];/... 阅读全文
posted @ 2015-03-24 20:53 菠萝君 阅读(136) 评论(0) 推荐(0)
摘要: 1 和app.js同一目录下添加新文件foo.js2 exports方法var PI = Math.PI;exports.area = function (r) { return PI * r * r;};3 引用//index.js/* * GET home page. */var circ... 阅读全文
posted @ 2015-03-23 23:33 菠萝君 阅读(248) 评论(0) 推荐(0)
摘要: 1 改变状态栏(手机屏幕最上面的状态栏,电池时间那个栏目)/** modify status bar */-(UIStatusBarStyle)preferredStatusBarStyle{ return UIStatusBarStyleLightContent;}2 增加蒙板的写法/** ... 阅读全文
posted @ 2015-03-23 20:35 菠萝君 阅读(158) 评论(0) 推荐(0)
摘要: var ejs = require('ejs');//添加app.engine('.html', ejs.__express); // app.set('view engine', 'ejs');修改app.set('view engine','html');//添加拼接上面3句代码就可以将默认的.... 阅读全文
posted @ 2015-03-19 23:08 菠萝君 阅读(171) 评论(0) 推荐(0)
摘要: 全局添加supervisor 动态监测改变打开app.js 阅读全文
posted @ 2015-03-19 23:06 菠萝君 阅读(245) 评论(0) 推荐(0)
摘要: 1 工厂方法- (instancetype)initWithDict:(NSDictionary *)dict{ self = [super init]; if (self) { self.name = dict[@"name"]; self.icon = d... 阅读全文
posted @ 2015-03-17 20:12 菠萝君 阅读(115) 评论(0) 推荐(0)
摘要: //// ViewController.m// AppManager//// Created by xin on 15-3-16.// Copyright (c) 2015年 Jackey. All rights reserved.//#import "ViewController.h"//... 阅读全文
posted @ 2015-03-16 21:26 菠萝君 阅读(274) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 7 8 9 ··· 16 下一页