方法的重写:1、在子类中可以根据需要对从基类中继承来的方法进行重写。2、重写的方法和被重写的方法必须具有相同方法名称、参数列表和返回类型。3、重写方法不能使用比被重写的方法更严格的访问权限。程序code:class Person{ private int age; private Str...
分类:
编程语言 时间:
2014-09-30 01:07:21
阅读次数:
261
字符集与编码缩写含义:ASCII: American Standard Code for Information InterchangeUCS: Universal Character SetUTF: Unicode/UCS Transformation FormatASCII编码ASCII码是7位...
分类:
其他好文 时间:
2014-09-29 20:57:01
阅读次数:
321
异常只能抛一个,捕捉到再抛一个,也只是一个异常
看下面的代码,如果你认为执行不到(如果 if 条件满足)执行不到第2个 throwException 就错了 (Jeallybean code)
libcore/luni/src/main/native/libcore_io_Posix.cpp#throwException
146 static void throwGaiExcep...
分类:
其他好文 时间:
2014-09-29 18:01:11
阅读次数:
178
Code First自动更新数据库有几种方法 Code First什么都不做Database.SetInitializer(null); 发布网站的话一般要在Application_Start方法里加上这句,发布后不需要Code First了。 Code First总是重建数据库并重设数据...
分类:
其他好文 时间:
2014-09-29 15:02:11
阅读次数:
182
方法一:$("#selIndustyType option[value='1']").attr("selected", "selected");View Code方法二: View Code注意事项: 1、对象相等行判断,使用 === 而不是 == ,js 引擎执行两个相等符号时,会自动进行类型.....
分类:
Web程序 时间:
2014-09-29 14:11:11
阅读次数:
220
这样做,Chart偶尔能出来,更多时候throw exception。exception有两个,一是: exc_bad_access code=1 address=**** 另一个是: exc_breakpoint (code=exc_i386_bpt subcode=0x0) .
分类:
移动开发 时间:
2014-09-29 13:58:50
阅读次数:
197
题目链接:http://poj.org/problem?id=1962
思路:每个集合中用根节点标记这个集合,每个点到根节点的距离。
code:
#include
#include
#include
#include
#include
#include
using namespace std;
const int maxn=20005;
int pa[maxn],d[maxn];
i...
分类:
Web程序 时间:
2014-09-29 13:37:01
阅读次数:
188
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5056
题目大意:就是问在子串中每个小写字母出现次数不超过k次的个数,注意子串是连续的子串。。。。
思路:
code:
#include
#include
#include
#include
#include
using namespace std;
char str[100010];
...
分类:
其他好文 时间:
2014-09-29 11:45:47
阅读次数:
188
PD中建CDM模型,一个Diagram中有两张表,字段不能重复? 工具-model options-model settings 去掉data item 下的unique code 还有一个"Allow reuse"复选框,建议把这个钩也去掉,那么以后就不要担心在模型里发生...
分类:
其他好文 时间:
2014-09-29 11:36:11
阅读次数:
392
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"begin cdf_file = addfile("$NCARG_ROOT/lib/ncarg/data/cdf/contour.cdf","r") temp = cdf_file->.....
分类:
其他好文 时间:
2014-09-29 01:47:47
阅读次数:
294