1.内容观察者ContentObserver 如果ContentProvider的访问者需要知道ContentProvider中的数据发生了变化,可以在ContentProvider 发生数据变化时调用getContentResolver().notifyChange(uri, null)来通知注册在此URI上的访问者,例子如下: private static final Uri URI = Uri.parse("content://person.db"); public class…
在 Linux 中,有多种方法可以查看系统的版本信息. uname 命令 huey@huey-K42JE:~$ uname -a Linux huey-K42JE 3.5.0-43-generic #66~precise1-Ubuntu SMP Thu Oct 24 14:55:08 UTC 2013 i686 i686 i386 GNU/Linux lsb_release 命令 huey@huey-K42JE:~$ lsb_release -a No LSB modules are avai…
一.如何查看服务器的CPU 今天安装了9台Linux服务器,型号完全不一样(有DELL. HP和IBM服务器),又懒得去对清单,如何在Linux下cpu的个数和核数呢?另外,nginx的cpu工作模式也需要确切的知道linux服务器到 底有多少个逻辑cpu,不过现在服务器那是相当的彪悍,直接上worker_processes 8吧. 判断依据: 1. 具有相同core id的cpu是同一个core的超线程.(Physical id and core id are not necessarily…