2013年05月24日

20130524-224712.jpg

漂亮的老婆

LruCache为什么需要保存到RetainFragment, why need RetainFragment?

2013年02月17日

看了android 文档里的bitmapfun例子, 一开始怎么都不明白为什么需要把LruCache放到fragment里面, 后来再仔细回头看了看文档:

Runtime configuration changes, such as a screen orientation change, cause Android to destroy and restart the running activity with the new configuration (For more information about this behavior, see Handling Runtime Changes). You want to avoid having to process all your images again so the user has a smooth and fast experience when a configuration change occurs.

Luckily, you have a nice memory cache of bitmaps that you built in the Use a Memory Cache section. This cache can be passed through to the new activity instance using a Fragment which is preserved by callingsetRetainInstance(true)). After the activity has been recreated, this retained Fragment is reattached and you gain access to the existing cache object, allowing images to be quickly fetched and re-populated into theImageView objects.

 

原来当手机横竖屏变化时, activity会被销毁再创建,为了不丢失LruCache, 所以通过setRetainInstance(true), 保存了cache里的数据, 我就更疑惑了, 为什么不把LruCache设置成全局静态变量, 这样不是程序所有地方都可以共享地用到cache了吗

mysql grant all 不生效, mysql grant not work

2012年10月12日

mysql grant all 不生效, mysql grant not work,

很奇怪我用的grant明明没有错, 一看文档, 原来为了使grant能尽快生效, 最好运行一下下面这个命令:
flush privileges

dedecms 不支持 php 5.4.6

2012年08月25日

dedecms 使用了php方法session_register, 而在php 5.4.X里已经把这个方法去掉了, 所以为了使用dedecms目前最高版本只能用到5.3.X, 我目前用的dedecms版本是V5.7正式版(2012-06-21).

windows browser not using hosts file – but ping is ok

2012年08月20日

if you are using proxy to connect the network, the hosts file may not work for browser,
but the ping is ok, ping will return the correct ip address you set in hosts file,i haven’t found a solution to make it working, since if not set the proxy, network will totally not work.

hosts文件为什么对浏览器没用呢,而ping返回来的又是正确的IP呢? 有可能是你正在使用代理上网,
目前我也不知道怎么解决这个问题, 因为不设代理的话,网络就完全不能用了

Page 1 of 1612345...10...Last »