码迷,mamicode.com
首页 >  
搜索关键字:@age    ( 7165个结果
C++的IO操作
#include using namespace std; int main() {         char name[20];         char gender;         int age;         cout         cin >> name >> gender >> age;         cout         cout     ...
分类:编程语言   时间:2014-09-28 17:50:25    阅读次数:215
C# Sort排序
#region实现IComparable的排序class UserInfo:IComparable { public int ID { get; set; } public int Age { get; set; } public string Nam...
分类:其他好文   时间:2014-09-27 19:35:10    阅读次数:151
黑马程序员 05-OC对象的内存分析
———Java培训、Android培训、iOS培训、.Net培训、期待与您交流! ———首先,完整的代码如下: 1 //1.类的声明 2 #import 3 @interface Person : NSObject 4 { 5 @public 6 int _age;//年龄 7 d...
分类:其他好文   时间:2014-09-27 14:18:09    阅读次数:206
Python学习-6.Python的分支语句
Python的分支语句比较简单,只有if、else、elif三个关键字,也就是说,Python没有switch语句,而且,Python中并没有?:这个三目运算符。例子:1 age = 182 if age < 18:3 print('too young')4 elif age == 18:5...
分类:编程语言   时间:2014-09-27 03:53:39    阅读次数:183
python 条件判断和循环
条件判断计算机之所以能做很多自动化的任务,因为它可以自己做条件判断。比如,输入用户年龄,根据年龄打印不同的内容,在Python程序中,用if语句实现age = 20if age >= 18: print 'your age is',age print 'adult'根据Python的缩进...
分类:编程语言   时间:2014-09-27 03:40:49    阅读次数:273
js类的几种写法
我们常用的有以下几种方法来用JavaScript写一个“类”:1. 构造函数(public属性和方法)1: function Person(iName, iAge){ 2: this.name=iName; //public 3: this.age=iAge; //public 4: th...
分类:Web程序   时间:2014-09-26 19:25:38    阅读次数:220
mongo实践-透过js shell操作mongo
mongo实践-通过js shell操作mongo保存命令:j={name:"wangjingjing",age:15}db.user.save(j);查询命令:var cursor = db.user.find();while(cursor.hasNext())printJson(cursor.n...
分类:Web程序   时间:2014-09-26 18:43:58    阅读次数:227
PHP的数组分为两种类型,一种是索引数组,一种是关联数组。有如下关联数组,我们如何获取它的第一个key和value呢?
示例:$items=array('name'=>'sjm','age'=>'26','sex'=>'男','location'=>'北京');//当然用循环然后break的方式是可以的,但是比较麻烦,如下:foreach($itemsas$key=>$val)break;//那有什么更好的方法吗?下...
分类:Web程序   时间:2014-09-26 17:56:58    阅读次数:233
Struts2_接收参数
1.1 直接创建接收的数据类型 1 public class HelloAction extends ActionSupport { 2 3 private String name; 4 private int age;...
分类:其他好文   时间:2014-09-26 01:42:28    阅读次数:201
结构体1(嵌套使用)
1.结构体嵌套指向结构体的指针:struct student *p; struct student student1; p=&student1; 访问结构体变量成员的方式:p->age;(*p).age;sudent1.age;一个结构体做另一个结构体的成员#include#include#in.....
分类:其他好文   时间:2014-09-25 19:54:37    阅读次数:140
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!