1.判断是否存在,通过exists关键字或者"??"运算符。都将返回一个布尔值? user.name?exists? user.name??? <# if user.name?exists> ? //TO DO </# if > ? <# if user.age??> ? //TO DO </# if > 2.忽略...
分类:
编程语言 时间:
2014-11-20 20:32:40
阅读次数:
123
JS面向对象--创建对象1.对象的创建及常用的操作第一种是使用new运算符例子:var obj = object(); obj.name = "puyao"; obj.age = 20; obj.address = "四川成都";第二种是我们常用的字面量例子:var obj ={ name ="pu...
分类:
Web程序 时间:
2014-11-20 15:05:18
阅读次数:
228
为甚要相互转换,还是因为麻烦,程序员都是反感麻烦的
1 数组转xml
'丁三',
'age'=>29
);
function arr2xml($arr) {
$simxml = new simpleXMLElement('');
...
分类:
编程语言 时间:
2014-11-19 22:19:48
阅读次数:
183
1.throw的作用
class Usre {
private int age;
public void setAge (int age) {
if(age
RuntimeException e = new RuntimeException ("年龄不能为负数");//生成异常对象
throw e;//抛出
}
this.age = age;
}
}
class Tes...
分类:
编程语言 时间:
2014-11-19 18:51:18
阅读次数:
204
Chapter6.h#ifndef __CHAPTER_6_
#define __CHAPTER_6_
/*《深入理解C指针》学习笔记 -- 第六章*/
typedef struct __person
{
char* name;
char* title;
unsigned int age;
}person;
/*结构体内存的释放问题*/
void __struct_memory_...
分类:
其他好文 时间:
2014-11-19 16:07:48
阅读次数:
119
语法:fn.apply(object, args)定义:应用某一对象的一个方法,用另一个对象替换当前对象。应用: 1 # 应用于替换对象 2 function People(name, age){ 3 this.name = name; 4 this.age = age; 5 } ...
分类:
移动开发 时间:
2014-11-19 13:51:01
阅读次数:
268
实现功能:查询单张表Student中返回指定的列一:数据库表结构:二:存储过程: 1 USE [AdventureWorksDW] 2 GO 3 /****** Object: StoredProcedure [dbo].[GetAllStudentInfo] Script Date: 20...
分类:
其他好文 时间:
2014-11-19 07:04:30
阅读次数:
3066
Python中通常使用for...in遍历字典,本文使用item()方法遍历字典。item()item()方法把字典中每对key和value组成一个元组,并把这些元组放在列表中返回。DEMO代码如下:#!/usr/bin/envpython#-*-coding:utf-8-*-dict={"name":"zhangsan","age":"30","city":"shanghai","blog":"ht..
分类:
编程语言 时间:
2014-11-19 02:19:04
阅读次数:
184
function User(name, age) {//构造函数模式 this.name = name; this.age = age; this.show = function () { return this.name+ ' '+this.age; };}要用时候用new运算符就可...
分类:
其他好文 时间:
2014-11-19 00:14:50
阅读次数:
198
LINQ可以和各种类型的数据源一起工作,比如SQL数据库,XML文档等,然而,必须要有实现LINQ查询的代码模块. 这些代码模块叫做LINQ提供程序. 匿名类 var student = new {Lname="hallen",sex="nv",Age=10,Major="history" }; C...
分类:
其他好文 时间:
2014-11-18 23:42:27
阅读次数:
333