//动态原型模式function Box(name,age){ this.name = name; this.age = age; this.family = ['哥哥','姐姐','妹妹']; if(typeof this.run != 'function'){ ...
分类:
其他好文 时间:
2014-08-17 18:17:42
阅读次数:
176
//原型创建对象function Box(){};Box.prototype.name = 'Lee';Box.prototype.age = 100;Box.prototype.run = function(){ return this.name + this.age + 'running....
分类:
其他好文 时间:
2014-08-17 15:30:22
阅读次数:
179
//构造函数创建对象function Box(name,age){ //创建一个对象 this.name = name; //添加一个属性 this.age = age; this.run = function(){ return this...
分类:
其他好文 时间:
2014-08-17 15:25:42
阅读次数:
137
#import @class Author;@interface Books : NSObject{ @private NSString *color; int book_id; NSString *box; Author *author; NSArray *r...
分类:
移动开发 时间:
2014-08-17 03:48:31
阅读次数:
226
前几天才发现有
box-sizing 这么个样式属性,研究了一番感觉很有意思,
通过指定容器的盒子模型类型,达到不同的展示效果
例如:当一个容器宽度定义为 width:100%; 之后,如果再增加 padding 或者 border 则会溢出父容器,是向外扩张的
如果使用该样式,指定为 box-sizing: border-box; 则 padding 和 bo...
分类:
Web程序 时间:
2014-08-16 23:52:51
阅读次数:
544
C++继承和java中的差不多,下面举个简单示例:
main.cpp:
#include
#include "Box.h"
#include "Carton.h"
using std::cout;
using std::endl;
int main(){
Box myBox(40.0,30.0,20.0);
Carton myCarton;
Carton candy...
分类:
编程语言 时间:
2014-08-16 13:53:50
阅读次数:
266
Description
RPG battles
In many typical RPG games, you battle with bad guys, creatures, monsters or ghosts etc. all the time. After each battle, you may get magic potions th...
分类:
其他好文 时间:
2014-08-16 13:51:30
阅读次数:
245
Harry Potter and the Hide StoryTime Limit: 10000/5000 MS (Java/Others)Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 2324Accepted Submi...
分类:
其他好文 时间:
2014-08-16 01:02:59
阅读次数:
254
在使用Qt Designer设计窗体界面时,我们可以使用Widget Box里的窗体控件非常方便的绘制界面,比如拖进去一个按钮,一个文本编辑器等。虽然Qt Designer里的控件可以满足我们大部分的需求,但是有时候,也会产生一些特殊的需要,比如一个输入框,我们要输入的是经纬度,此时就会有两种输入方...
分类:
其他好文 时间:
2014-08-16 00:58:59
阅读次数:
320
ShortcutEnglishComputerese?new lineinsertNewline:??new line (don't leave form box)1insertNewlineIgnoringFieldEditor:?new lineinsertNewline:??new line ...
分类:
其他好文 时间:
2014-08-15 14:34:38
阅读次数:
148