JS Bin function darwTrails(){ var canvas = document.getElementById('drawRect'); var context = canvas.getContext('2d'); context.save(); contex...
分类:
其他好文 时间:
2014-07-22 22:51:16
阅读次数:
154
1.在Web.xml中加入 <listener>
????<listener-class>org.springframework.web.context.request.RequestContextListener</listener-class>
</listener> 2.调用代码 public?static?HttpServletRequest?getRe...
分类:
编程语言 时间:
2014-07-21 10:35:40
阅读次数:
197
1.配置SpringMVC-Servlet.xml <!--?注解扫描包,在这个包下的类都会启用注解?-->
<context:component-scan?base-package="com.tgb.web.controller.annotation"?/>
<!--?开启注解?2种皆可-->
<mvc:annotati...
分类:
编程语言 时间:
2014-07-21 10:16:16
阅读次数:
272
本文原创 ,转载必须注明出处 :http://blog.csdn.net/qinjuning前言:本文是我读《Android内核剖析》第7章后形成的读书笔记 ,在此向欲了解Android框架的书籍推荐此书。 大家好, 今天给大家介绍下我们在应用开发中最熟悉而陌生的朋友-----Context类 .....
分类:
移动开发 时间:
2014-07-21 09:38:27
阅读次数:
327
public static int getStatusBarHeight(Context context){ Class c = null; Object obj = null; Field field = null; int x = 0, s...
分类:
移动开发 时间:
2014-07-21 00:26:43
阅读次数:
218
需要加一个权限: ActivityManager manager = (ActivityManager) getSystemService(Context.ACTIVITY_SERVICE); List runningTasks = manager .getRunningTasks(1);...
分类:
其他好文 时间:
2014-07-21 00:15:59
阅读次数:
212
…… ……我们要做的就是自定义一个GridView控件并插入到中间的LinearLayout中public class MyGridView extends GridView{public MyGridView(Context context, AttributeSet attrs) ...
分类:
其他好文 时间:
2014-07-20 22:04:22
阅读次数:
195
这个也是昨天学习的,做下总结。
检查服务是否开启要写成一个工具类,方便使用,传服务的名字返回Boolean值,当然,因为需要,还要传一个上下文context。
说一下这个工具类的几个关键点:
1.方法要传context和serviceName,context用来getSystemService()操作获得ActivityManager。注意,这个方法参数要用大写的Context中的参数:Context.ACTIVITY_SERVICE,要不然会出错,还不知道哪错的,花了我10分钟的时间才知道,谨记下。
2....
分类:
移动开发 时间:
2014-07-20 10:28:16
阅读次数:
200
with语句支持在一个叫上下文管理器的对象的控制下执行一系列语句,语法大概如下:with context as var: statements其中的context必须是个上下文管理器,它实现了两个方法__enter__,__exit__。1.需求是怎么产生的在正常的管理各种系统资源(文件、锁定...
分类:
编程语言 时间:
2014-07-20 10:17:16
阅读次数:
267
public void ProcessRequest(HttpContext context) { context.Response.Clear(); context.Response.Buffer = true; /...
分类:
Web程序 时间:
2014-07-20 09:04:44
阅读次数:
178