jfo planet

Hope is the best gift that tomorrow gives.

  • 首页
  • 分类
  • 归档
  • 标签
  • 搜索
close

JQuery参考

发表于 2011-11-25   |   分类于 python/js/php/html/mysql/http
 =================================================================http://www.oschina.net/news/23240/jquery-skills?from=201111203. 数组方式使用jQuery对象运行选择器的结果是一个jQuery对象。然而,jQuery类库让你感觉你正在使用一个定义了index和长度的数组。// Selecting all the navigation buttons:var buttons = $(‘#navigation a.button’);// We can loop though the collection:for(var i=0;i<buttons.length;i++){ console.log(buttons[i]); // A DOM element, not a jQuery object}// We can even slice it:var firstFour = buttons.slice(0,4);如果性能是你关注的, ...
阅读全文 »

Using Ant to Automate Building Android Applications

发表于 2011-10-09   |   分类于 Android
keytool.exe -list -keystore key.store -vkeytool.exe -genkey -keystore key.store -alias dicewars -validity 222222keytool.exe -importkeystore -srckeystore ../../MyControlWidget/config/mycontrol.keystore -destkeystore key.storekeytool.exe -export -file dice.cer -keystore key.store -alias dicewars http://www.androidengineer.com/2010/06/using-ant-to-automate-building-android.html The standard way to develop and deploy Android applications is using Eclipse. This is great because it is free, ...
阅读全文 »

重复导入联系人的问题(Contact AGGREGATION)

发表于 2011-09-28   |   分类于 Android
 重复导入联系人时,android会把相同的联系人放在一个联系人名片夹中,通过编辑联系人界面可以看到。这样可能会带来编辑的bug,同时看着也不爽。研究了下代码,原来,android导入时,会调用合并的功能。通过设置RawContacts.AGGREGATION_MODE可以达到导入不合并的效果。RawContacts.AGGREGATION_MODE可以设置为:RawContacts.AGGREGATION_MODE_DEFAULT;RawContacts.AGGREGATION_MODE_IMMEDIATE;RawContacts.AGGREGATION_MODE_SUSPENED;RawContacts.AGGREGATION_MODE_DISABLED;(详见android.provider.ContactsContract.java) 在导入联系人时insert的地方(frameworks/base/core/java/android/pim/vcard/VCardEntry.java : pushIntoContentResolver ...
阅读全文 »

联系人批量插入实例(VCardEntry.java)

发表于 2011-09-28   |   分类于 Android
frameworks/base/core/java/android/pim/vcard/VCardEntry.java        public Uri pushIntoContentResolver(ContentResolver resolver);     public Uri pushIntoContentResolver(ContentResolver resolver) {        ArrayList<ContentProviderOperation> operationList =            new ArrayList<ContentProviderOperation>();        // After applying the batch the first result’s Uri is returned so ...
阅读全文 »

json libs:Jackson/gson

发表于 2011-09-16   |   分类于 Java
 http://wiki.fasterxml.com/JacksonInFiveMinutesJackson is a multi-purpose Java library for processing JSON.  经比较,发现google的gson更好用!!!
阅读全文 »

【转】JVM内存回收时根节点的枚举(安全点与安全区域)

发表于 2011-09-08   |   分类于 Java
原文http://icyfenix.iteye.com/blog/1166660  在上一篇《HotSpot虚拟机对象探秘》中,我们讨论了在HotSpot里对象是如何创建的、有怎样的内存布局、如何查找和使用。在本篇中,我们将继续探讨虚拟机自动内存管理系统的最重要一块职能:虚拟机如何对死亡的对象进行内存回收。   本篇里面,所有涉及到具体JVM实现的内容,仍然默认为基于HotSpot虚拟机的实现,后文不再单独说明。 对象存活的判定   当一个对象不会再被使用的时候,我们会说这对象已经死亡。对象何时死亡,写程序的人应当是最清楚的。如果计算机也要弄清楚这件事情,就需要使用一些方法来进行对象存活判定,常见的方法有引用计数(Reference Counting)有可达性分析(Reachability Analysis)两种。   引用计数算法的大致思想是给对象中添加一个引用计数器,每当有一个地方引用它时,计数器值就加1;当引用失效时,计数器值就减1;任何时刻计数器为0的对象就是不可能再被使用的。它的实现简单,判定效率也很高,在大部分情况下它都是一个不错的 ...
阅读全文 »

html 如何响应touch事件

发表于 2011-09-08   |   分类于 python/js/php/html/mysql/http
使用document.addEventListener添加touch事件<!DOCTYPE html><html>    <head>        <title>touch test </title>        <style type="text/css">            .item {                float: left;                width: 25%;            }        </style>&n ...
阅读全文 »

Customize Android Browser Scaling with target-densityDpi

发表于 2011-09-07   |   分类于 Android
WebSettings webSettings = mWebView.getSettings();webSettings.setDefaultZoom(ZoomDensity.FAR);ZoomDensity:Enum for specifying the WebView’s desired density. FAR makes 100% looking like in 240dpi MEDIUM makes 100% looking like in 160dpi CLOSE makes 100% looking like in 120dpi ~~ OR ~~ It was hard to find this little gem, so I thought I’d share it with the world: the Android team has implemented a custom meta viewport property to allow you to customize browser scaling for high resolution ...
阅读全文 »

AlarmManager and Timer

发表于 2011-08-25   |   分类于 Android
AlarmManager and Timer1. The Alarm Manager holds a CPU wake lock as long as the alarm receiver’s onReceive() method is executing. This guarantees that the phone will not sleep until you have finished handling the broadcast.2. If your alarm receiver called Context.startService(), it is possible that the phone will sleep before the requested service is launched. To prevent this, your BroadcastReceiver and Service will need to implement a separate wake lock policy to ensure that the phon ...
阅读全文 »

HttpEntity.consumeContent()

发表于 2011-08-25   |   分类于 python/js/php/html/mysql/http
HttpEntity.consumeContent(): TODO: The name of this method is misnomer. It will be renamed to #finish() in the next major release. This method is called to indicate that the content of this entity is no longer required. All entity implementations are expected to release all allocated resources as a result of this method invocation. Content streaming entities are also expected to dispose of the remaining content, if any. Wrapping entities should delegate this call to the wrapped entity ...
阅读全文 »
1…121314…61
jfo

jfo

605 日志
38 分类
4 标签
RSS
GitHub 微博
友情链接
  • 收藏夹
  • 网络剪贴板
  • 爱逛吧
© 2007 - 2018 jfo
由 Hexo 强力驱动
主题 - NexT.Pisces