1. 使用最新版本的jQueryjQuery的版本更新很快,你应该总是使用最新的版本。因为新版本会改进性能,还有很多新功能。下面就来看看,不同版本的jQuery性能差异有多大。这里是三条最常见的jQuery选择语句: $('.elem') $('.elem', context) context...
分类:
Web程序 时间:
2014-06-25 23:50:51
阅读次数:
301
1. 只返回404 Status Code,自定义404页面在IIS的Error Pages中配置。2. 设置Response.SuppressContent为true,以防有响应内容被发给客户端。3. 以前喜欢用霸道的Response.End()强制中止当前线程,而用Context.Applica...
分类:
Web程序 时间:
2014-06-25 23:28:59
阅读次数:
215
ContextImpl是对Context的一个具体实现类,关键方法如下 1 static class ServiceFetcher { 2 int mContextCacheIndex = -1; 3 /** 4 * Main entrypoint;...
分类:
其他好文 时间:
2014-06-25 22:17:41
阅读次数:
505
FloodlightContextStore 代表的是一种缓存模型(利用的是ConcurrentHashMap),里面存储的是上下文相关的对象,能够根据相应的key得到具体的 Object,存在的意义是Floodlight中注册监听某个事件的listener可以在被调用的时候直接从中取出上下文信息(context information)。下面是重要的代码片段.
基本数据结构:
pub...
分类:
其他好文 时间:
2014-06-24 23:08:38
阅读次数:
210
public class MyAdapter extends BaseAdapter { Context context; public MyAdapter(Context context) { this.context = context; } private...
分类:
其他好文 时间:
2014-06-24 22:03:13
阅读次数:
189
/** * 得到系统内存信息的工具类 * @author zwenkai */public class SystemInfoUtils { /** * 得到运行的进程总个数 * * @param context * @return 运行进程个数 */ public static int getRun...
分类:
其他好文 时间:
2014-06-24 12:31:36
阅读次数:
172
1. 将字符串转换为Guid的形式System.Guid categoryId = newGuid(context.Request["CategoryId"]);//将字符串转换为Guid的形式2.定义DataRow/*----------------------定义DataRow并赋值------...
分类:
其他好文 时间:
2014-06-24 11:35:14
阅读次数:
156
spring.xml新加入 xmlns:context="http://www.springframework.org/schema/context" http://www.springframework.org/schema/context http://www.springf...
分类:
编程语言 时间:
2014-06-22 13:22:33
阅读次数:
244
我们都知道linux中创建新进程是系统调用fork,但实际上fork是clone功能的一部分,clone和fork的主要区别是传递了几个参数。clone隶属于libc,它的意义就是实现线程。
看一下clone函数:...
分类:
其他好文 时间:
2014-06-22 09:43:31
阅读次数:
252
今天在做GCM离线推送时需要判断APP是否在线如果在线则不推送,否则推送离线消息这里就用到了APP是否在线这个技术从网上找了个方法,适当的修改了一下privatebooleanisRunningForeground(Contextcontext){ ActivityManageram=(ActivityManager)context.getSystemService(Context..
分类:
移动开发 时间:
2014-06-21 19:44:57
阅读次数:
180