1. 使用最新版本的jQueryjQuery的版本更新很快,你应该总是使用最新的版本。因为新版本会改进性能,还有很多新功能。下面就来看看,不同版本的jQuery性能差异有多大。这里是三条最常见的jQuery选择语句: $('.elem') $('.elem', context) context...
分类:
Web程序 时间:
2014-08-19 18:53:55
阅读次数:
286
概念中是只有静态方法才可以这样调用的,现在 被刷新了,于是我在方法中加入一行$this相关的操作,再运行,立马报错了,也就是PHP在调用方法时,没有严格限制,但是在方法内部执行时,遇 上$this这个变量时抛出: Using $this when not in object context
也就是...
分类:
Web程序 时间:
2014-08-19 16:15:24
阅读次数:
228
在我们的项目中,通过Spring来管理业务逻辑Bean,但是Spring Bean的作用域默认是单例,而我们的业务逻辑Bean不是线程安全的,所以需要将Spring Bean改为多例模式。为单个Bean设置单例或者多例,可以通过设置singleton属性。而通过context:component-s...
分类:
编程语言 时间:
2014-08-19 16:05:24
阅读次数:
182
上几篇讲contact的时候,取得的头像都是存在数据库中,通过:
cursor = context.getContentResolver().query(
ContentUris.withAppendedId(ContactsContract.Data.CONTENT_URI, photoId),
new ...
分类:
移动开发 时间:
2014-08-19 12:57:14
阅读次数:
220
public static int px2sp(Context context, float pxValue) {
final float fontScale = context.getResources().getDisplayMetrics().scaledDensity;
return (int) (pxValue / fontScale + 0....
分类:
移动开发 时间:
2014-08-19 12:56:34
阅读次数:
201
官网说道:As of PHP 5.3.0, PHP implements a feature called late static bindings which can be used to reference the called class in a context of static inhe...
分类:
Web程序 时间:
2014-08-19 12:31:54
阅读次数:
337
1.判断服务是否在运行public static boolean isServiceRunning(Context context, Class serviceClass) { ActivityManager manager = (ActivityManager) context.ge...
分类:
移动开发 时间:
2014-08-19 10:37:23
阅读次数:
206
SimpleAdapter一点也不简单,他的参数就带了5个,天哪,晕了。。今天学的这个适配器,public SimpleAdapter(Context context, List> data, int resource, String[] from, int[] to)看这个大概明白,参数分别是第一...
分类:
移动开发 时间:
2014-08-19 00:49:43
阅读次数:
281
TelephonyManager telManager = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE); /** 获取SIM卡的IMSI码 * SIM卡唯一标识:IMSI 国际移动用户识别码...
分类:
其他好文 时间:
2014-08-18 18:24:32
阅读次数:
294
private static void sendMail(String mail, String mailContext) { try { String context = FileUtil.getFileContent("lostpassEmail.html"); ...
分类:
编程语言 时间:
2014-08-18 18:06:02
阅读次数:
258