转自:http://www.cnblogs.com/futuredo/archive/2012/10/19/2727204.html Constructing and matching binaries Erlang/OTP R15B02 In R12B, the most natural way to write binary construction and matching is now significantly faster than in earlier releases. 在R12
1. 获取应用数据/缓存大小 其中pm为实例化的PackageManager,因为需要遍历所有的已安装的应用.因此需要开启子线程进行处理. 还有需要注意的是,在Android4.2之前getPackageSizeInfo方法参数是没有第二个int类型的参数的,贴出来的代码适合4.2以后的版本,在反射获取方法时,增加了userHandle的参数信息.至于增加的参数userHandle的解释是:The user whose size information should be retrieved.我
在需要备份数据库里面的数据时,我们需要知道数据库占用了多少磁盘大小,可以通过一些sql语句查询到整个数据库的容量,也可以单独查看表所占容量. 1.要查询表所占的容量,就是把表的数据和索引加起来就可以了 select sum(DATA_LENGTH)+sum(INDEX_LENGTH) from information_schema.tables where table_schema='数据库名'; 上面获取的结果是以字节为单位的,可以通过%1024在%1024的到M为单位的结果. 2.查询所有的