【1】什么是解释器模式?解释器模式:【2】解释器模式代码示例:代码示例: 1 #include 2 #include 3 #include 4 using namespace std; 5 6 class Context; 7 8 class AbstractExpression 9 {1...
分类:
其他好文 时间:
2014-09-04 23:37:10
阅读次数:
253
Intent
在安卓中,Activity启动时通常需要Intent参数。Intent参数中包含以下几个常用的属性:
Component,指定了要启动的Activity,以及启动的context,使用Intent.setClass或Intent.setComponent方法可以设置;
Action属性,可用Intent.setAction方法设置;
Categor...
分类:
移动开发 时间:
2014-09-04 22:24:20
阅读次数:
241
/**
*
* 返回桌面
* @param context
*/
public static void toHome(Context context )
{
Intent mHomeIntent = new Intent(Intent.ACTION_MAIN);
mHomeIntent.addCategory(Intent.CATEGORY_HOME);...
分类:
移动开发 时间:
2014-09-04 20:56:30
阅读次数:
249
/** * 判断是否是平板 * @param context * @return */public static boolean isTablet(Context context) { return (context.getResources().getConfiguration()....
分类:
移动开发 时间:
2014-09-04 16:54:39
阅读次数:
206
严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListenerorg.springframework...
分类:
编程语言 时间:
2014-09-04 14:53:39
阅读次数:
434
TelephonyManager tm = (TelephonyManager)context.getSystemService(Context.TELEPHONY_SERVICE); String imei = tm.getDeviceId(); String tel = tm.g...
分类:
移动开发 时间:
2014-09-04 14:35:49
阅读次数:
272
iOS的文字高度计算一直是个问题, 苹果也一直在改, 这几天看了一下boundingRectWithSize方法.- (CGRect)boundingRectWithSize:(CGSize)size options:(NSStringDrawingOptions)options context:(...
分类:
其他好文 时间:
2014-09-04 13:13:19
阅读次数:
314
SoundPool 类的构造函数如下:
SoundPool(int maxStreams, int streamType, int srcQuality)
作用:实例化一个SoundPool 实例
第一个参数:允许同时播放的声音最大值
第二个参数:声音类型
第三个参数:声音的品质
SoundPool 类中常用的函数如下:
int load(Context context, int r...
分类:
移动开发 时间:
2014-09-04 11:47:19
阅读次数:
246
在页面渲染过程中,Chromium需要创建多个3D上下文的实例,这些上下文实例彼此之间不但需要共享资源,并且必须在同一个线程中执行GL操作,这就要求Chromium能够有效地处理多个上下文之间的切换。然而,并不是所有的GPU设备都能够很好的支持多个3D,虚拟化3D上下文(ContextVirtua..
分类:
其他好文 时间:
2014-09-04 03:02:08
阅读次数:
423
PartI介绍了OpenGL上下文和绘制表面等基本概念,以及Chromium为什么需要多个3D上下文。本文将继续这个话题,探讨Chromium为什么引入虚拟3D上下文,以及虚拟上下文之间切换有何不同。多个3D上下文的限制Chromium需要使用多个3D上下文,并且这些上下文能够共享资源。然而,目前图..
分类:
其他好文 时间:
2014-09-04 03:01:18
阅读次数:
231