状态模式,主要是用于存在大量case判断的操作执行,同时这些case依赖于对象的状态,那么就可以将大量的case判断封装为独立的类。Context:-state,当前状态对象。ChangeState(state),切换state对象。OperationInterface(),调用State->Ope...
分类:
其他好文 时间:
2014-12-23 10:23:51
阅读次数:
201
#include #include #include using namespace std;stack g_stack;class Context{public: void SetExpression(string sExpr) { m_sExpr = sExpr; } string ...
分类:
其他好文 时间:
2014-12-23 10:17:24
阅读次数:
144
(1)tomcat启动中报异常:java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener(20141222-冬至-待解决) 1、解决过程:稍微百度了下,说是spring-web类没....
分类:
编程语言 时间:
2014-12-23 00:13:39
阅读次数:
174
用户本地连接打开数据库报错The server principal "epointztb" is not able to access the database "epointbidhzchunanpb55" under the current security context. (Microsof...
分类:
其他好文 时间:
2014-12-23 00:12:10
阅读次数:
338
django.shortcuts package提供提供帮助类和函数可以更便捷的操作MVC中的每一部分,包含: render(request, template_name,[dictionary],[context_instance],[content_type],[status],[current...
分类:
其他好文 时间:
2014-12-23 00:08:31
阅读次数:
245
1.1 Context descriptorsTomcat4中的Manager和Admin管理工具其实就是利用它来部署的。在Tomcat5中提出了Context descriptor这个概念,且为其配置了一个专有目录,而不像Tomcat4那样大杂烩一般地放置在$appBase目录下。Context ...
分类:
其他好文 时间:
2014-12-22 22:32:16
阅读次数:
261
public int getResource(String imageName){ Context ctx=getBaseContext(); int resId = getResources().getIdentifier(imageName, "drawable" ...
分类:
移动开发 时间:
2014-12-22 19:33:06
阅读次数:
237
我今天想分享的是FM模块的保存方法,即FmSharedPreferences.java
FmSharedPreferences(Context context)在构造方法中加载Load()方法,
public void Load(){
Log.d(LOGTAG, "Load preferences ");
if(mContext == null)
...
分类:
移动开发 时间:
2014-12-22 16:13:09
阅读次数:
175
一.获取屏幕宽高:
(1). WindowManager wm = (WindowManager)getSystemService(Context.WINDOW_SERVICE);
int width = wm.getDefaultDisplay().getWidth();
int height = wm.getDefaultDisplay().getHeight();
(2)....
分类:
移动开发 时间:
2014-12-22 11:16:02
阅读次数:
200
一、学习案例:关于上一章的《Hibernate之Ognl详解》的演示项目很多朋友说后面的不是很了解。这一章就暂且做下讲解。
a)根对象就是我们通过context.setRoot(...);设置的对象,我们可以设置多个。
b)#,如果不是根对象就用#取对象,否则直接取对象。
c)调用静态方法需要使用@...@...。如:@java.lang.Integer@toBinaryString(...
分类:
其他好文 时间:
2014-12-22 11:14:23
阅读次数:
188