今天做一个Android的文件管理器,里面用到非常多的地方用到了getResources。Drawable currentIcon = null;currentIcon = getResources().getDrawable(R.drawable.folder);currentIcon = ge....
分类:
移动开发 时间:
2015-05-01 18:33:54
阅读次数:
192
#include
using namespace std;
template
struct Node
{
T data;
Node *link;
Node():data(T()),link(NULL){}
};
template
struct M_Node
{
Node *adj;//保存节点指针.
T data; //保存当前递减数字个数.
};
template
class...
分类:
编程语言 时间:
2015-05-01 17:28:53
阅读次数:
171
下面这段代码有什么问题吗?(Arduino上运行)class C{public: C(){ ptr = new int[12]; } ~C(){ if(ptr!=NULL)delete [] ptr; } void reset(){ ...
分类:
其他好文 时间:
2015-05-01 13:13:12
阅读次数:
125
<html>
<head>
<style>
div{width:100px;height:100px;position:absolute;background:red;left:0;top:50px;}
</style>
<script>
vartimer=null;
functionstartMove()
{
clearInterval(timer);//开定时器前先关闭定时器。否则会多开几个定时器,d..
分类:
Web程序 时间:
2015-05-01 12:11:17
阅读次数:
104
尊重知识,尊重作者。原文链接:http://www.thebigdata.cn/JieJueFangAn/14134.html在大数据网站看到的,方便日后查用转来保存。 1. 应尽量避免在 where 子句中对字段进行 null值判断,否则将导致引擎放弃使用索引而进行全表扫描,如: select.....
分类:
其他好文 时间:
2015-05-01 11:57:29
阅读次数:
160
opencv的鼠标事件主要涉及两个函数回调函数cvSetMouseCallbackvoid cvSetMouseCallback( const char* window_name, CvMouseCallback on_mouse, void* param CV_DEFAULT(NULL));window_name:鼠标执行的窗口名on_mouse:每次指定窗口鼠标事件发生时被调用的函数指针para...
分类:
其他好文 时间:
2015-05-01 10:42:14
阅读次数:
132
/**
* 获取外网的IP
*/
public static String GetNetIp() {
URL infoUrl = null;
InputStream inStream = null;
String ipLine = "";
HttpURLConnection httpConnection = null;
try {
infoUrl = new U...
分类:
移动开发 时间:
2015-04-30 21:57:25
阅读次数:
193
1.使用using声明 .using namespace spacename .using namespace::name2.标准库类型string Initialization .string s // default null string .string s(s1) ...
分类:
编程语言 时间:
2015-04-30 19:36:15
阅读次数:
149
srand(time(NULL));是我们熟悉的c++随机函数,用时间做种子。但由于在多线程环境下若想在子线程中随机出不同的随机数则需随机种子的不同。但time以秒计算,略显不足,故参考这篇文章解决此问题:/* 初始化随机种子 */void InitRand(){ // 如果支持高性能精度计...
分类:
编程语言 时间:
2015-04-30 15:49:38
阅读次数:
154
SQL Server 中有两个參数,语法: ISNULL(check_expression, replacement_value)check_expression 与 replacement_value 数据类型必须一致 假设 check_expression 为 NULL,则返回 replace....
分类:
数据库 时间:
2015-04-30 14:04:28
阅读次数:
152