#includeint main (){ #ifdef ONLINE_JUDGE #else freopen ("in.txt","r",stdin); #endif int n,m; int a[101]; while(scanf("%d",&n)!=EOF&&(na[k+1])...
分类:
其他好文 时间:
2014-11-23 22:52:28
阅读次数:
245
void GetAllString(int start, string & str, vector & res) { if (start == str.size()) { res.push_back(str); } else { ...
分类:
其他好文 时间:
2014-11-23 17:16:19
阅读次数:
189
#include using namespace std;int search(int key){ int i; int a[150]; for(i=0;i>a; num=search(a); if(num==0) { cout<<"您输入的数不存在"<<endl; } else cout<...
分类:
其他好文 时间:
2014-11-23 13:03:31
阅读次数:
176
代码如下:
#include
int Strlen(const char *s)
{
if( NULL == s)
return -1;
if('\0' == *s)
return 0;
else
return Strlen(s+1)+1;
}
int main()
{
printf("Strlen(\"123\")=%d\n",Strlen("123"));
r...
分类:
其他好文 时间:
2014-11-22 10:41:55
阅读次数:
204
/**
* 激活设备管理器
*
* @param context
* 上下文对象
*/
public static void activeApp(Context context) {
if (context instanceof Activity) {
activeApplication(context);
} else...
分类:
其他好文 时间:
2014-11-21 20:31:59
阅读次数:
165
1 如果是查询sql server 2000,把sys.extended_properties修改为SysProperties 2 3 SELECT 4 表名 = CASE WHEN A.COLORDER=1 THEN D.NAME ELSE '' END, 5 表说明 =...
分类:
数据库 时间:
2014-11-21 20:25:22
阅读次数:
285
char与TCHAR相互转化char strUsr[10] = "Hello";TCHAR Name[100];#ifdef UNICODE MultiByteToWideChar(CP_ACP, 0, strUsr, -1, Name, 100);#else strcpy(Name, ...
分类:
其他好文 时间:
2014-11-21 20:09:06
阅读次数:
180
运动框架:
先要清除定时器,防止多次点击或者移入移出时,开启多个定时器,元素的运动会是所有定时器中运动的总和当达到目的时,要清除定时器(使用if/else 实现)
N...
分类:
编程语言 时间:
2014-11-21 18:57:52
阅读次数:
273
1.#ifdef和#if defined
注意两者都有个define的作用,区别在于使用方式上。前者的通常用法是:
#ifdef X
....
#else
....
#endif
只能在两者中选择是否有定义。对于后者,常用法是:
#if defined x1
....
#elif defined x2
....
#elif de...
分类:
其他好文 时间:
2014-11-21 16:21:03
阅读次数:
131
利用IE自带的WebBrowser进行打印打印判断:if(factory.object)//打印设置的判断 factory.printing.PageSetup(); else alert("对不起!现在不支持!");if(factory.object)//打印预览...
分类:
Web程序 时间:
2014-11-21 16:07:49
阅读次数:
265