之前没有用过枚举,不懂。今天找了些资料学习了,现在总结如下:(希望高手看到后批评指教)枚举的作用:1、限定某一类型的取值范围。2.不再写public
static final...(如果取值范围太广,就太麻烦了),但最终enum还是要转化成class类型,还是会加public static fina...
分类:
编程语言 时间:
2014-05-12 22:22:57
阅读次数:
400
PermutationsTime Limit:1000MSMemory
Limit:65536KTotal Submissions:2549Accepted:1336DescriptionWe remind that the
permutation of some final set is a on...
分类:
其他好文 时间:
2014-05-12 12:36:19
阅读次数:
330
环境系统:阿里云64位centos 6.3[rao@AY~]$ cat
/etc/issueCentOS release 6.3 (Final)Kernel \r on an \m[rao@AY~]$ uname -aLinux
AY1404062027584053a1Z 2.6.32-358.6....
分类:
其他好文 时间:
2014-05-12 09:27:33
阅读次数:
510
先抛出结果,Update先于Draw执行。
以Android平台来分析
找到Cocos2dRender.java
找到函数
public void onDrawFrame(final GL10 gl)
这是Android OpenGL的刷帧函数,在里面Cocos2d-x执行了Native函数
Cocos2dxRenderer.nativeRender();
找...
分类:
其他好文 时间:
2014-05-11 21:21:09
阅读次数:
427
A very early version of a software product that may
not contain all of the features that are planned for the final version.
Typically,softwaregoes t.....
分类:
其他好文 时间:
2014-05-10 18:26:14
阅读次数:
517
In Django parlance, a project is the final product,
and it assembles one or more applications together.Manage.py is a pointer back
to Django-admin.py ...
分类:
其他好文 时间:
2014-05-10 07:56:19
阅读次数:
480
一、枚举传统的方式:?在某些情况下,一个类的对象是有限而且固定的。例如季节类,只能有 4
个对象?手动实现枚举类:—private 修饰构造器。—属性使用 private final 修饰。—把该类的所有实例都使用 public static
final 来修饰。练习代码: 1 public cla...
分类:
编程语言 时间:
2014-05-10 06:45:30
阅读次数:
498
继昨天自学中应该注意的事项之后,今天再来聊一下java中容易出现的基本问题吧。
首先基本类型和它的包装类我就不多说了,但是值得注意的是String,首先它并不是基本类型,其次它被定义为final类型(也就是说不可集成),为什么要把String定义为final
?,网上也有很多答案,比较好的答案是:主要是为了“效率” 和 “安全性” 的缘故。若 String允许被继承, 由于它的高度被使用率,...
分类:
其他好文 时间:
2014-05-09 22:56:20
阅读次数:
313
Android写动画效果不是一般的麻烦,网上找了好久,终于解决了动画的问题,总结记录以共勉。仅以水平方向移动效果做说明,垂直方向类似。public
void slideview(final float p1, final float p2) { TranslateAnimation anima...
分类:
移动开发 时间:
2014-05-09 19:48:01
阅读次数:
305
public class InitServlet extends HttpServlet {
private static final long serialVersionUID = -
5826096764263027718L;
public void destroy() {
super.destroy();
}
public void init() throws Servl...
分类:
编程语言 时间:
2014-05-09 14:45:06
阅读次数:
324