//C++类转换构造函数和转换函数复习
#include
#include
using namespace std;
class Student
{
private:
string name;
int age;
double grade;
public:
Student(string name_, int age_, doubl...
分类:
编程语言 时间:
2015-05-19 10:46:21
阅读次数:
125
首先需要先了解结构体的基本知识:
1.结构体定义:
struct 结构体名
{
……结构体成员;
}
举例:struct student
{
char name[10];
int age;
}2.结构指针-struct *p
其中,p为指向结构的一个指针,在给p传地址时,要给他传入结构体类型的地址。
举例:struct student *p;
st...
分类:
其他好文 时间:
2015-05-18 23:07:49
阅读次数:
148
for...in循环var obj = { age: 18, fname: "Rand ", lname: "McKinnon" };function showProps(obj, objName) { var result = ""; for (var prop in obj) { ...
分类:
编程语言 时间:
2015-05-18 22:39:23
阅读次数:
133
val df = sqlContext.load("/opt/modules/spark1.3.1/examples/src/main/resources/people.json","json")df.select("name","age").save("/opt/test/namesAndAges...
分类:
数据库 时间:
2015-05-18 16:07:42
阅读次数:
355
#import @interface Student:NSObject{ //成员变量尽量不要用@public int age;} /*set方法作用:提供一个方法给外界,设置age属性值,可以在方法里面对参数过滤命名规范:1)方法名必须以set开头2)set后面跟上成员变量的名称,...
分类:
移动开发 时间:
2015-05-18 14:37:19
阅读次数:
156
#import /*1.继承好处:1)抽取重复代码2)建立了类之间的关系3)子类可以拥有父类中的所有成员变量和方法2.注意点1)基本上所有的根类都是NSObject*/@interface Animal:NSObject{ int _age; double _weight;}-(void)set.....
分类:
移动开发 时间:
2015-05-18 14:36:37
阅读次数:
166
最近用Python处理了一些json数据,但在过程中遇到一些问题,遂记录之。
1.Python Post json格式数据至服务器:
查阅了一些资料,大多是这么样的:
__author__ = 'jiezhi'
import urllib
import urllib2
data = {'name': 'jiezhi', 'age': '24'}
ret = u...
分类:
编程语言 时间:
2015-05-18 12:55:56
阅读次数:
193
Objective-C中的@property、@synthesize及点语法都是与两个函数有关的,一是setter函数,另一个是getter函数 以前我们是这样来定义setter与getter函数的 @interface?Dog:NSObject??
{??
????int?age;?...
分类:
其他好文 时间:
2015-05-18 09:20:45
阅读次数:
117
左边是mongodb查询语句,右边是sql语句。对照着用,挺方便。
db.users.find() select * from users
db.users.find({"age" : 27}) select * from users where age = 27
db.users.find({"username" : "joe", "age" : 27}) select * from us...
分类:
数据库 时间:
2015-05-17 23:34:46
阅读次数:
217
一般情况下,我们在类中定义函数时经常需要向函数传递参数 1 name = $name;12 $this->age = $age;13 $this->adress = $adress;14 }15 16 } ...
分类:
编程语言 时间:
2015-05-17 20:01:35
阅读次数:
155