通常在我们的项目中,可能会遇到写本地文件,最常用的就是图片文件,在这之后需要通知系统重新扫描SD卡,在Android4.4之前也就是以发送一个Action为“Intent.ACTION_MEDIA_MOUNTED”的广播通知执行扫描。如下:this.sendBroadcast(new
Intent(...
分类:
移动开发 时间:
2014-05-05 12:51:41
阅读次数:
427
查看机器可用内存: free -m
我们通过free命令查看机器空闲内存时,会发现free的值很小。这主要是因为,在linux中有这么一种思想,内存不用白不用,因此它尽可能的cache和buffer一些数据,以方便下次使用。但实际上这些内存也是可以立刻拿来使用的。
所以真实的内存情况是 -/+ bu...
分类:
系统相关 时间:
2014-05-05 11:40:43
阅读次数:
459
DescriptionIn the game of DotA, Pudge’s meat
hook is actually the most horrible thing for most of the heroes. The hook is
made up of several consecuti...
分类:
其他好文 时间:
2014-05-05 11:32:29
阅读次数:
288
widget *s =new
widget;s->move((QApplication::desktop()->width()-s->width())/2,(QApplication::desktop()->height()-s->height())/2);s->show();
分类:
其他好文 时间:
2014-05-04 20:39:22
阅读次数:
290
QTranslator* myTranslator=new
QTranslator;myTranslator->load("xxx.qm");app.installTranslator(myTranslator);QTranslator*
chTranslator=new QTranslator;c...
分类:
其他好文 时间:
2014-05-04 20:38:23
阅读次数:
527
windows下将IPython Qt Console的快捷方式修改为:
"C:\Python\IPython Qt Console.exe" --ConsoleWidget.font_family="Courier New"
--ConsoleWidget.font_size=9 --Conso....
分类:
编程语言 时间:
2014-05-04 19:24:27
阅读次数:
1195
package mytest;
import java.util.*;;
public class mymain {
public static void main(String[] args) {
// TODO Auto-generated method stub
System.out.print(new Date());
Properties p=System.get...
分类:
编程语言 时间:
2014-05-04 17:52:02
阅读次数:
363
使用JavaScript获取URL上的参数值
方法一:
function getUrlParam(name) {
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); //构造一个含有目标参数的正则表达式对象
var r = window.location.search.substr(1).match(reg);...
分类:
Web程序 时间:
2014-05-04 17:47:44
阅读次数:
265
中文版显示:Firefox 已经在运行,但是没有响应。如要打开新窗口,您必须先关闭该 Firefox 进程,或者重新启动您的系统。
英文版显示:Firefox is already running, but is not responding. To open a new window, you must first close the existing Firefox process, or ...
分类:
系统相关 时间:
2014-05-04 17:44:21
阅读次数:
647
上文简单介绍了HttpClient和Tomcat服务器的交互,主角是HttpClient,然后它跟服务器交互有两种方式即get和post。所以这个HttpClient就类似于电脑上用的浏览器。当我打开多个网页的时候,并不需要开一个网页就开一个浏览器,而是一个浏览器上面开了好几个网页。对应于HttpClient,即无需连接一次就new一个HttpClient。一般,我们希望一个应用里就一个HttpC...
分类:
移动开发 时间:
2014-05-04 09:20:06
阅读次数:
420