create database s9999--注释数据库create table student--创建一个表(code int not null,name varchar(50) not null,sex varchar(50) not null,age int not null)goinsert...
分类:
数据库 时间:
2015-04-19 10:09:08
阅读次数:
138
@property与@synthesize@interface Person : NSObject
{
int _age;
// int age; int _height; double _weight; NSString *_name;
}// @property:可以自动生成某个成员变量的setter和getter声明
@property int age;
//...
分类:
其他好文 时间:
2015-04-19 08:53:36
阅读次数:
166
使用方式之一:this,在构造函数中使用。当使用构造函数的重载时,可使用this关键字。 1 //构造函数-重载 2 public Student(int id, string name, int age, int math) 3 { 4 ...
【例1】弹出 20【分析】function t1(){ var age = 20; function t2(){ alert(age); } return t2;}在大部分的语言中,t1 被调用执行,则申请内存,并把其局部变量 push 入栈,t1 函数执行完毕...
分类:
编程语言 时间:
2015-04-18 14:19:38
阅读次数:
141
继承/*
1.继承的好处:
1> 抽取重复代码
2> 建立了类之间的关系
3> 子类可以拥有父类中的所有成员变量和方法 2.注意点
1> 基本上所有类的根类是NSObject
*/
/********Animal的声明*******/
@interface Animal : NSObject
{
int _age;
double _weight;
}- (void)set...
分类:
其他好文 时间:
2015-04-18 13:07:16
阅读次数:
114
封装set方法@interface Student : NSObject
{
// 成员变量尽量不要用@public
// @public
int age; //@public
// 只读(readonly):只允许外界访问我的no,不允许外界修改我的no
int no; // 只需要提供get方法
}//
/*
set方法
1.作用: 提供一个方法...
分类:
其他好文 时间:
2015-04-18 11:35:20
阅读次数:
105
mysql 事务start transaction;update ...insert ...create table的不行rollback;//回滚commit;//提交redis 事务multiincrby age 1 //age+1decrby age 2 //age-2discard //取消...
分类:
数据库 时间:
2015-04-17 23:50:15
阅读次数:
156
#include "stdafx.h"#include #include struct student{ char name[10]; int num; int age; char addr[40];};student s1[2],s2[2],*p1,*p2;int main...
分类:
其他好文 时间:
2015-04-17 17:42:22
阅读次数:
94
工厂模式function factorial(name,age){ var o=new Object(); o.name=name; o.age=age; o.sayName= function () { alert(th...
分类:
Web程序 时间:
2015-04-17 17:19:56
阅读次数:
163
1、点语法2、成员变量的作用域3、@property和@synthesize点语法点语法的本质还是方法调用1 Person *p = [Person new];2 p.age = 10;//点语法3 p.name = @"li si";//点语法4 //[p setN...
分类:
移动开发 时间:
2015-04-17 15:27:20
阅读次数:
192