为什么我这个程序每次交叉验证求取spread的结果都不同呢?最终结果也不相同? 20C

%% 清空环境变量
clc;
clear all
close all
nntwarn off;%关闭警告

%% 载入数据
load data;
% 载入数据并将数据分成训练和预测两类
p_train=p(1:12,:);%p 影响因素,t 实际值
t_train=t(1:12,:);
p_test=p(13,:);
t_test=t(13,:);
%% 交叉验证
desired_spread=[];
mse_max=10e20;
desired_input=[];%期望
desired_output=[];
result_perfp=[];
indices = crossvalind('Kfold',length(p_train),4);%K折交叉验证,随机选择
h=waitbar(0,'正在寻找最优化参数....')%进度条
k=1;
for i = 1:4
perfp=[];
disp(['以下为第',num2str(i),'次交叉验证结果'])%输出
test = (indices == i); train = ~test;%==是逻辑判断,是则等于1,否则等于0
p_cv_train=p_train(train,:);
t_cv_train=t_train(train,:);
p_cv_test=p_train(test,:);
t_cv_test=t_train(test,:);
p_cv_train=p_cv_train';
t_cv_train=t_cv_train';
p_cv_test= p_cv_test';
t_cv_test= t_cv_test';
[p_cv_train,minp,maxp,t_cv_train,mint,maxt]=premnmx(p_cv_train,t_cv_train);%归一化
p_cv_test=tramnmx(p_cv_test,minp,maxp);
for spread=0.1:0.1:2
net=newgrnn(p_cv_train,t_cv_train,spread);
waitbar(k/80,h);
disp(['当前spread值为', num2str(spread)]);
test_Out=sim(net,p_cv_test);%书签
test_Out=postmnmx(test_Out,mint,maxt);
error=t_cv_test-test_Out;
disp(['当前网络的mse为',num2str(mse(error))])
perfp=[perfp mse(error)];
if mse(error)<mse_max
mse_max=mse(error);
desired_spread=spread;
desired_input=p_cv_train;
desired_output=t_cv_train;
end
k=k+1;
end
result_perfp(i,:)=perfp;
end;
close(h)
disp(['最佳spread值为',num2str(desired_spread)])
disp(['此时最佳输入值为'])
desired_input
disp(['此时最佳输出值为'])
desired_output
%% 采用最佳方法建立GRNN网络
net=newgrnn(desired_input,desired_output,desired_spread);
p_test=p_test';
p_test=tramnmx(p_test,minp,maxp);
grnn_prediction_result=sim(net,p_test);
grnn_prediction_result=postmnmx(grnn_prediction_result,mint,maxt);
grnn_error=t_test-grnn_prediction_result';
disp(['GRNN神经网络三项流量预测的误差为',num2str(abs(grnn_error))])
save best desired_input desired_output p_test t_test grnn_error mint maxt


2个回答

k折交叉验证https://blog.csdn.net/u011650143/article/details/71519240
每次的结果应该是不一样,但是经过多次,结果应该不会相差太大
想让结果复现,或者让每次结果一样,你需要设置一个随机种子,随机种子一样,每次执行结果就会是一样的
看一下matlab的随机数种子用法:https://blog.csdn.net/qq_26569761/article/details/53465617

xianyiming01
xianyiming01 对,已经解决了,程序开始加一句rng default就行,感谢
8 个月之前 回复

已经解决了,程序开始加一句rng default就行

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
weka 十折交叉验证 为什么每次结果都相同
如题rn利用weka做 分类运算,在使用weka的时候,每次结果都相同,,谁能解释一下其中的原因?
该程序每次运行,结果不同,为什么??
#include rn#include rnrnvoid main( void )rnrn printf( "\nProcess id: %d\n", _getpid() );rnrn该程序每次运行,结果不同,为什么??
为什么域名解析结果不相同?
请问一下,我用gethostbyname()函数解析的域名怎么与用nslookpu 命令解析的不一样,与WSAAsyncGetHostByName()解析的也不一样:举个例子说明一下:rnnslookpu www.tsinghua.edu.cnrnE:\>nslookup www.tsinghua.edu.cnrnServer: dns.whut.edu.cnrnAddress: 202.114.88.10rnrnNon-authoritative answer:rnName: www.d.tsinghua.edu.cnrnAddress: 166.111.4.100rnAliases: www.tsinghua.edu.cnrnrn我用我写的一个小程序来解析,结果如下:rnHost Name:www.d.tsinghua.edu.cnrnAlias:rnwww.tsinghua.edu.cnrn192.108.58.0rnrn程序源码如下:rn[code=C/C++]#includern#pragma comment(lib,"ws2_32.lib")rn#includernusing namespace std;rnchar *hostname="www.tsinghua.edu.cn";rnrnint main()rnrn WSADATA data;rn if(WSAStartup(0x0202,&data)!=0)rn rn cout<<"Failed to start up:"<h_name<h_aliases[i]!=NULL;i++)rn rn cout<h_aliases[i]<h_addr_list[j]!=NULL;j++)rn rn in_addr addr;rn addr.S_un.S_addr=(LONG)pHost->h_addr_list[j];rn cout<h_name;rn strHostAddr+="\r\n";rn int i=0;rn strHostAddr+="Aliases:\r\n";rn while (pHost->h_aliases[i]!=NULL)rn rn strHostAddr+=pHost->h_aliases[i];rn strHostAddr+="\r\n";rn i++;rn rn if (pHost->h_addrtype==AF_INET)rn rn strHostAddr+="Address type:IPV4.\r\n";rn rn else if(pHost->h_addrtype==AF_INET6)rn rn strHostAddr+="Address type:IPV6\r\n";rn rn elsern rn strHostAddr+="UnKnown address type.\r\n";rn rn if (pHost->h_length==4)rn rn IN_ADDR inaddr;rn for (int j=0;pHost->h_addr_list[j]!=NULL;j++)rn rn inaddr.S_un.S_addr=(LONG)pHost->h_addr_list[j];rn strHostAddr+=inet_ntoa(inaddr);rn strHostAddr+="\r\n";rn rn rn pEdit->SetWindowText(strHostAddr);rn rnrnrnvoid CDemoDlg::OnButton1()rnrn m_hGetHost=[color=#FF0000]WSAAsyncGetHostByName[/color](m_hWnd,WM_GETHOSTBYNAME,"www.tsinghua.edu.cn",m_host,MAXGETHOSTSTRUCT);rn if(m_hGetHost==NULL)rn rn CString strErr;rn strErr.Format("Failed to Get host by name:%d\n",WSAGetLastError());rn MessageBox(strErr,NULL,MB_OK|MB_ICONERROR);rn rn[/code]
为什么两者的结果不相同?
public class Sum rnrn //计算a加到b的方法,绝对值的声明方法是:Math.abs(-9)rn rn public static int add(int a,int b)rn rn int sum=0;rn for(int i=0;i
为什么这个随机程序每次调用的结果都一样
/*rn * File: 6.c.rn * This file contains a program to rn * conpute the similar value of πrn */rnrn#includern#includern#includernrn/* Fuctions prototypes */rnrnrnvoid Randomize(void);rnrnrn/*main fuction*/rnrnmain()rnrn int i;rn double x,y;rn int count=0;rnrn for(i=0;i<10000;i++)rn x=rand()/(double) (RAND_MAX+1);rn Randomize();rn y=rand()/(double) (RAND_MAX+1);rn if((x*x+y*y)<1)rn count++;rn rn printf("The similar value of πis %f\n",4*count/10000);rnrnrnrnrnvoid Randomize(void)rnrn srand((int) time(NULL));rnrnrnrn我用这个随机的方法,发现很多也不是随机的。每次调用的结果都是一样,不知道为什么?rn能否请哪为仁兄指点一二,在此不胜感激。。
为什么两个程序输出结果不相同
下面两个程序为什么输出结果不相同rn/* 程序1 */rn a=1;b=1;c=178;rn if((a*4+b*0.4+c*0.2)==40)rn rn printf("\nAAA");rn getch();rn rn elsern rn printf("\nBBB");rn getch();rn rn/* 程序2 */rn a=1;b=1;c=178;rn m=(a*4+b*0.4+c*0.2);rn if(m==40)rn rn printf("\nAAA");rn getch();rn rn elsern rn printf("\nBBB");rn getch();rn rn看看输出结果不同,是什么原因?
右移的问题 为什么结果不相同
int c = 0xcffffff3;rn printf("%x\n", 0xcffffff3>>2);rn printf("%x\n", c>>2);
为什么结果不相同,两个字符串?
大家看下面的语句,为什么结果不相同呢?rnrnrnedit2.Text:='AABB3322';rnrnrnif pchar(edit2.Text)<>pchar('AABB3322') thenrnshowmessage('不相同')rnelsernshowmessage('相同');rnrn显示的是“不相同”,谁给解答一下。rn
为什么这个程序不能结果呢? 谢谢
includern#includern#includernusing namespace std;rnvoid main()rnrn const size_t arr_size=8;rn int int_arr[arr_size];rn for(size_t ix=0;ix!=arr_size;++ix)rn cin>>int_arr[ix];rn vector ivec(int_arr,int_arr+arr_size);rn for(vector::iterator iter=ivec.begin();iter!=ivec.end();++iter)rn cout<<*(ivec[iter]);rn rnrnrn为什么这个程序不能结果呢? 谢谢
为什么这个程序。。。。运行不出结果呢
为什么这个程序。。。。运行不出结果呢rn#includern#includerntypedef struct BNodernrn char data;rn struct BNode *lchild;rn struct BNode *rchild;rnBTNode;rntypedef BTNode *BinTree;rnvoid CreateBinTree(BinTree *root)//以先序来建立二叉树rnrn char ch;rn if((ch=getchar())==' ')//这个代表空格,可换别的字符rn *root=NULL; //建立空二叉树rn elsern rn *root=(BTNode*)malloc(sizeof(BTNode));//开辟空间,生成节点rn (*root)->data=ch;rn CreateBinTree(&((*root)->lchild));rn CreateBinTree(&((*root)->rchild));rn rnrnvoid PreOrder(BinTree root)//先序遍历rnrn if(root!=NULL)rn rn printf("%c",root->data);//访问根节点rn PreOrder(root->lchild);//遍历左子树rn PreOrder(root->rchild);//遍历右子树rn rn;rnrnvoid InOrder(BinTree root)//中序遍历rnrn if(root!=NULL)rn rn PreOrder(root->lchild); //遍历左子树rn printf("%c",root->data);//访问根节点rn PreOrder(root->rchild);//遍历右子树rn rnrnvoid PostOrder(BinTree root)//后序遍历rnrn if(root!=NULL)rn rn PreOrder(root->lchild);//遍历左子树rn PreOrder(root->rchild);//遍历右子树rn printf("%c",root->data);//访问根节点rnrnvoid main()rnrn BinTree root;rn CreateBinTree(&root);rn printf("先序:");rn PreOrder(root);rn printf("\n");rn printf("中序:");rn InOrder(root);rn printf("\n");rn printf("后序:");rn PostOrder(root);rn printf("\n");rn rn
多线程的问题,为什么每次结果都一样?
void thread(void)rnrnint i;rnfor(i=0;i<3;i++)rnprintf("This is a pthread.\n");rnrnrnint main(void)rnrnpthread_t id;rnint i,ret;rnret=pthread_create(&id,NULL,(void *) thread,NULL);rnif(ret!=0)rnprintf ("Create pthread error!\n");rnexit (1);rnrnfor(i=0;i<3;i++)rnprintf("This is the main process.\n");rnpthread_join(id,NULL);rnreturn (0);rnrn我的执行结果为什么每次都是一样:rnThis is the main processrnThis is the main processrnThis is the main processrnThis is a pthreadrnThis is a pthreadrnThis is a pthreadrn并没有看到象rnThis is the main processrnThis is the main processrnThis is a pthreadrnThis is the main processrnThis is a pthreadrnThis is a pthread 这样的线程竞争引起的不同执行结果啊?
我这两个程序为什么输出结果不同?
void main()rnrn int cocks=0,hens,chicks;rn while(cocks <=19)rn hens=0;rn while(hens<=33)rn chicks=100-cocks-hens;rn if(5.0*cocks+3.0*hens+chicks/3.0==100.0)rn printf("%d %d %d\n",cocks,hens,chicks);rn hens++;rn rn cocks++;rn rnrnrnrnrnrnrnmain()rnrn int cocks,hens,chicks;rn for(cocks=0;cocks<=19;cocks++)rn for(hens=0;hens<=33;hens++)rn chicks=100-cocks-hens;rn if(5*cocks+3*hens+chicks/3==100)rn printf("cocks=%d,hens=%d,chicks=%d\n",cocks,hens,chicks);rn Z
为什么是这个结果呢?
class WithFinals rn void f() rn System.out.println("WithFinals.f()");rn rnrnclass OverridingPrivate extends WithFinals rn private void f() rn System.out.println("OverridingPrivate.f()");rn rnrnpublic class FinalOverridingIllusion rn public static void main(String[] args) rn OverridingPrivate op1 =rn new OverridingPrivate();rn WithFinals op = op1;rn op.f();rn rn rnrn结果显示OverridingPrivate.f() ,是因为因为实例已经生成了啊!只是传了一个引用过去啊 ,所以还是调用OverridingPrivate的方法,但是如果把class OverridingPrivate extends WithFinals rn方法改成 private void f() 了呢,为什么实例又不能访问了呢?通过不了编译,为什么呢?实例已经生成了,调用原来的方法,但是具有的是转型的访问权利? rn
为什么是这个结果呢?
/* example1.c */rn#include rn#include rn#include rnint main()rnrn int i = 0x12345678; /* 以低位字节优先方式存储,即0x78 0x56 0x34 0x12 */rn int *p = &i;rn char h = *((char *)p); /* 将i的高位字节赋给h */rn printf("i = 0x%x\n", i);rn printf("h = 0x%x\n", h);rn int j = htonl(i); /* 转换为以高位字节优先方式,即0x12 0x34 0x56 0x78 */rn printf("j = 0x%x\n", j);rn return 0;rnrnrn运行结果是:rni=0x12345678rnh=0x78rnj=0x78563412rnrn对h=0x78表示不解rnchar h = *((char *)p)是什么意思啊?rn还有%x是哪种类型的通配符啊?
顺序不同为什么输出结果不同呢?
两个程序:rn#includernvoid main()rnrn int a,b,c;rn a=b=1;rn printf("%d %d %d\n",a,(a++,b++,++b),b);rnrn输出结果为2 3 1rn#includernvoid main()rnrn int a,b,c;rn a=b=1;rn printf("%d %d %d\n",(a++,b++,++b),a,b);rnrn输出结果为3 1 1rn这是为什么呢?请指点,谢谢rn
hibernate缓存怎么这么诡异,我每次刷新页面的结果都不同
同一个页面,数据库有3条记录,有两条是新添加的,刷新一下,可能一条记录都没有,再刷一下,可能出来一条,再刷一下,可能是3条。我设置了query.setCacheMode(CacheMode.IGNORE);这个方法也没用,请问大家遇到过这种问题没?
为什么我这个程序结果不对
把1 0改成'1' '0'就对了rn/*求100之内的素数 */rn#include rn#include rn#include rn#define N 100rn/*筛选*/rnrnmain()rnrn int upper;rn char a[N];rnrn memset(a,1,N);rn a[0] = a[1] = 0;rn /*判断*/rn upper = (int)sqrt(N+1);rn for(int i=2; i<=upper; i++)/*检验数*/rn rn if(a[i] == (char)1)rn rn for(int j=i+i; j<=N; j+=i)rn rn a[j]=(char)0;rn rn rn rn /*打印*/rn for(i=2; i<=N; i++)rn if(a[i] == (char)1) rn printf("%8d",i);rn rn
为什么我这个程序没有结果?
#include "iostream.h"rn#include "stdio.h"rnrnvoid string_copy(char* p,char* q)rnrn rn for(;*p!='\0';p++,q++)rn rn *q=*p; rn rn *q='\0';rn rnrnrnvoid main()rnrn char* a="I love China.";rn char* b="hello world he";rn string_copy(a,b);rn printf("%s",b);rnrn
我的这个程序为什么输出没有结果?
#includernusing namespace std;rn#includerntypedef struct stondernrn char data;rn struct stonde *next;rnStacknode;rnint ishw(char str[])rnrn int i=0;char ch;rn Stacknode *st=NULL,*p;rn while((ch=str[i++])!='\0')rn rn p=(Stacknode *)malloc(sizeof(Stacknode));rn p->data=ch;rn p->next=st;rn st=p;rn rn i=0;rn while(st!=NULL)rn rn p=st;rn ch=p->data;rn st=st->next;rn free(p);rn if(ch!=str[i++])rn return 0;rn rn return 1;rnrnint main()rnrn char str[]="abcdcba";rn int ishw(char str[]);rn
这个程序的结果是什么?为什么?
#include rnvoid main()rnrn int a,b;rn clrscr();rn for(a=1,b=1;a<=100;a++)rn rn if(b>=10) break;rn if(b%3==1)rn b+=3;continue;rn rn printf("%d\n",a);rnZrnrn我搞不清这个程序的意思,最后输出的是a,那for语句里的东西都是关于b的,还有用吗?
为什么这个程序没有结果
一个将数字转化为字符串的程序,但是运行没有结果。rn#includernint getlen(char *s)rnrn int n;rn for(n = 1;*s != '\0';s++)rn n++;rnrnreturn n;rnrnvoid reverse(char s[])rnrn int c,i,j;rn for(i = 0,j = getlen(s)-1;i < j;i++,j--)rn rn c = s[i];rn s[i] = s[j];rn s[j] = c;rn rnrnvoid itoa(int n,char s[])rnrn int i,sign;rn if((sign = n) < 0)rn rn n = -n;rn rn i = 0;rn dorn rn s[i++] = n % 10 +'0';rn while((n/=10)>0);rn if(sign < 0)rn rn s[i++] = '-';rn rn s[i] = '\0';rn reverse(s);rnrnint main()rnrn int n=154;rn char s[100];rn itoa(n,s);rn for(int i=0;s[i]='\0';i++)rn rn printf("%c",s[i]);rn rn return 0;rnrn
这个程序为什么没有结果?
#includern#includern#define n1 0.0414rn#define n2 0.0468rn#define n3 0.054rn#define n4 0.0072rn#define n5 0.0585rnvoid Fangan1(double number)rnrn number=5*(1+n1,5);rn printf("%f\n,number");rnrnvoid Fangan2(double number)rnrn number=2*(1+n2,2);rn number=3*(1+n3,3);rn printf("%f\n",number);rnrnvoid Fangan3(double number)rnrn number=3*(1+n3,3);rn number=2*(1+n2,2);rn printf("%f\n",number);rnrnvoid Fangan4(double number)rnrn number=number*pow(1+n1,5);rn printf("%f\n",number);rnrnrnvoid Fangan5(double number)rnrn number=number*pow(1+n4/4,4*5); rn printf("%f\n",number);rnrnrnint main()rnrn // double n1,n2,n3,n4;rn char ch;rn double number;rn printf("请输入你所要存储的钱:");rn scanf("%d",&number);rn printf("请选择你要的储存类型:\n");rn ch=getchar();rn rn switch(ch)rn rn case 'a':rn Fangan1(number);rn break;rn case 'b':rn Fangan2(number);rn break;rn case 'c':rn Fangan3(number);rn break;rn case 'd':rn Fangan4(number);rn break;rn case 'e':rn Fangan5(number);rn break;rn rn return 0;rnrn
随机函数编的程序为什么每次执行结果都一样?
vc里rond函数,说是随机,编译成exe文件后,在dos提示符下,怎么每次执行都是一样的数,刚编译好的时候是rn5 6 3 2 2rn等执行多少遍还是rn5 6 3 2 2rnrn怎么会事啊!!!
为什么我这个程序出来的结果都是1呢
是验证表达式 getchar()!=EOF的值是0还是1rn是《C程序设计语言》里的练习1-6rn#include rnmain()rn int c;rn while (c = getchar() != EOF)rn printf("c is %d\n",c);rn printf("%d - at EOF\n", c);rn system("pause");rn
为什么结果不同
#includern#includern#define PI 3.14rnint main()rnrn float r,h,a;rn scanf("%f%f",&r,&h);rn a=PI*r*r*h;rn printf("%.2f\n",a);rn printf("%.2f",PI*r*r*h);rn system("pause");rn return 0;rnrn输入1.5 3 输出结果不同,如果不控制格式直接printf("%.2f\n",a); printf("%.2f",PI*r*r*h);结果是一样的。rn 谁能详细的解释一下么???? rn
结果数量为什么不同?
select *from smtopm where exists (SELECT smtopm.item_key FROM smtopm inner join iir on trim(iir.itm_key)=trim(smtopm.item_key));rn与rnSELECT smtopm.item_key FROM smtopm inner join iir on trim(iir.itm_key)=trim(smtopm.item_key);rn为什么不同,难道这里的EXISTS有问题吗?rnrnrnFUCK oracle
消息处理,为什么不同的结果 ??
我在一个窗口中自定义一个消息。rnrnrnrnprocedure tform2.myownermessage(var msg:tWMmymessage);rnbeginrn if (msg.Name = 'test')and (msg.Time = 110) thenrn showmessage('收到消息');rnend;rnrnprocedure TForm2.Button1Click(Sender: TObject);rnvarrn s1:String;rn s:pointer;rnbeginrn s1 :='test';rn s:=pointer(s1);rn sendmessage(handle,WM_mymessage,Integer(s),110);rnend;rn这样当button1click时,可以接受到消息。但是我在另外一个窗口发送消息的时候,为什么接受到的消息参数不对??rn如下:rnrnprocedure TForm1.Button1Click(Sender: TObject);rnvarrn s1:String;rn s:^string;rn Hwd:THandle;rnbeginrn Hwd:= findwindow('TForm2',nil);rn if Hwd<>0 thenrn beginrn s1 :='test';rn getmem(s,length(s1)+1);rn s:=@s1;rn sendmessage(hwd,WM_User+$100,integer(s),110);rn end;rnend;rnrnForm2可以接受到消息,但是为什么参数s得到的不对,即不是test.rn该如何修改??
为什么.*和.+ 返回的结果不同
SQL> WITH t(a) AS (SELECT 'a' FROM dual)rn 2 SELECT regexp_replace(a,'(.*)',q'['\1']'),regexp_replace(a,'(.+)',q'['\1']') FROM t;rn rnREGEXP_REPLACE(A,'(.*)',Q'['\1 REGEXP_REPLACE(A,'(.+)',Q'['\1rn------------------------------ ------------------------------rn'a''' 'a'rnrnrnrn有人能讲解下么。
为什么结果不同?
int main()rnrn List poly1,poly2;rn cout<<"按降幂输入第一个多项式"<
为什么输出的结果不同?????
dim k,j,length,temp,temp1rn NN = "14,24,16,9,10,2,4,22,5,21,17,3,0,0"rn AA = Split(NN,",")rnlength=ubound(AA) rnfor k=0 to lengthrn for j=k+1 to lengthrn if AA(k)>AA(j) thenrn temp=AA(k)rn AA(k)=AA(j)rn AA(j)=temprn end ifrn nextrnnextrnresponse.write temp & " "rn rnAA=Array(14,24,16,9,10,2,4,22,5,21,17,3,0,0)rnlength=ubound(AA)rnfor k=0 to lengthrn for j=k+1 to lengthrn if AA(k)>AA(j) thenrn temp1=AA(k)rn AA(k)=AA(j)rn AA(j)=temp1rn end ifrn nextrnnext rnresponse.write temp1
结果为什么不同??????????
"100rn 计算 ∑i 的程序.rn i=0"rn请看下面的程序:rnrn  int i,sum(0);rn char buffer[40];rn for(i=1;i<=100;i++)rnrn sum+=i;rnrn sprintf(buffer,"sum=%d",sum);rn pDC->TextOut(10,30,buffer);rnrn上面程序计算出来的结果sum=101;rn再看看下面这个程序,它也是求上面那个问题的程序:rnrn int i,sum(0);rn while(i++<100)rnrn sum+=i;rnrn char buffer[40];rn sprintf(buffer,"sum=%d",sum);rn pDC->TextOut(10,30,buffer);rnrn它计算出的结果:sum=85904396;rn算同一问题的两个程序为什么会得出两个不同的结果呢,是怎么回事其中哪个是对的?????rn
为什么查询结果不同?
比较着急、棘手的问题,求各位大虾们看看! rn我用C#开发的程序,在iis中承载.Net远程对象,在对数据库检索时发生下面的问题: rn使用的查询语句不变,输入的参数不变的情况下,查询的结果不同,请问是什么原因? rn数据库是oracle8i,iis是5.0,.netFramework是2.0 rnrn我的查询语句: rnSELECT VNO, LOADPLANNO, WERKS, ORDERTYPE, OTPTEXT, VBELN, MTART, MTBEZ, rn MATKL, WGBEZ, LGORT, LGOBE, FCJS, FCMNG, JLMNG, CKDATE, CH, CKNAM, rn CKHZSTATUS, KUNNR, NAME1, YSSTATUS, PDDATE, BANZU, HZCLSTATUS, rn PZHJHH, CHX, CHZH, RAILROAD, STATION, LEASEDLINE, STATUS, BZH, HWMC, rn HWDW, HWZL, BJYS, BIAOZH, HYNAME, HYDATE, CCDATE, JCDATE, FCNAME, rn FCDATE, PZSTATUS, LTVNO, YFSTATUS, YFNAME, YFDATE, YFKD, YFBKD, YFBXF, rn LIFNR, MCOD1, UPLOADDATE, UPLOADNAM, UPLOADSTATUS, BZMNG, BSTNK, rn TRUSTBILLNUM, TBSTATUS, JLWTDATE, OLDLGORT, OLDLGOBE, JHSTATUS, JHSL, rn KUNWE, NAME2, LRDATE rnFROM XBCCGL.EXPORTHEADER rnWHERE (JCDATE between :T1 and :T2) and ((YSSTATUS = '0' and STATUS = '3') or (YSSTATUS <> '0' and STATUS = '1')) rn and ((VBELN like :VBELN) or (:VBELN1 is null)) rn and ((CH like :CH) or (:CH1 is null)) rn and ((PZHJHH like :PZHJHH) or (:PZHJHH1 is null)) rn and ((RAILROAD like :RAILROAD) or (:RAILROAD1 is null)) rn and ((STATION like :STATION) or (:STATION1 is null)) rn and ((LGORT like :LGORT) or (:LGORT1 is null)) rn and ((LGOBE like :LGOBE) or (:LGOBE1 is null)) rn and ((KUNNR like :KUNNR) or (:KUNNR1 is null)) rn and ((NAME1 like :NAME1) or (:NAME11 is null)) rn and ((KUNWE like :KUNWE) or (:KUNWE1 is null)) rn and ((NAME2 like :NAME2) or (:NAME21 is null)) rn and ((BSTNK like :BSTNK) or (:BSTNK1 is null)) rn and ((CHX like :CHX) or (:CHX1 is null)) rn and ((HWMC like :HWMC) or (:HWMC1 is null)) rn and (YSSTATUS in (:YSSTATUS1, :YSSTATUS2, :YSSTATUS3)) rnrn输入的参数值: rnt1:2006-5-11 18:00:00 rnt2:2006-5-12 17:59:59 rnYSSTATUS1:‘0’ rnYSSTATUS2:‘1’ rnYSSTATUS3:‘2’ rn其他参数全部为"" rn大多数情况下,查询结果为191条记录(这是正确值),但连续查询几次会出现查询结果为134、36、11、...条记录 rn把远程对象从iis移到本地客户端时,这种现象没有发现,请问这是什么原因,怎么解决? rnrn在此先谢过各位! rn
为什么会有不同的结果????
rn为什么会有不同的结果????rnrnint AA(char *a)rnrn return sizeof(a);rnrnrnvoid __fastcall TForm1::Button1Click(TObject *Sender)rnrnrnchar b[10];rnrnLabel1->Caption=AA(b);rnLabel2->Caption=sizeof(b);rnrnLabel1->Caption为4;rnLabel2->Caption为10;rn为什么呢?
编译结果为什么不同?
student.h中定义了virtual void display(ostream& out);rnrnstudent.cpp中:rnrn#include"student.h"rnvoid Student::display(ostream& out)rnrn out<
为什么顺序不同结果不同?
[size=24px][/size][code=VB]Private Sub Form_Click()rnDim i As Integer, max As Integer, t As IntegerrnPrint "随机产生的十个数为:";rnRandomizernFor i = 1 To 10rn t = Int(100 * Rnd + 1)rn Print t;rn max = Int(100 * Rnd + 1)rn If max <= t Then max = trnNext irn Printrn Printrn Print "最大的数为:"; maxrnEnd Sub[/code]rn这是我写的程序,我不知道错哪了?请高手赐教,并告诉原因,谢谢!
为什么我的程序结果不对?
我正在看 钱能的《C++程序设计教程》,上个星期做了道课后题,题目是这样的:rn4.有一些日期,在文件abc.txt中,后面加*号的日期表示要加班的日期,试汇总所有每个月25号的天数,如果是加班日,则该天乘2.rn(其中abc.txt为rnOct. 25 2003rnOct. 26 2003rnSep. 12 2003*rnJuy. 25 2002*rnApp. 25 2004 )rn我写的代码是rn//Listing 3.9.4=======================================================rn#include rn#include rn#include rnusing namespace std;rnint main()rnrn int days=0;rn ifstream fin("abc.txt");rn for (string s; getline(fin,s); )rn rn if (s.find("25"))rn rn if (s.find("*")) // 问一下这里如果是字符,也要用单引号吗? 单引号怎么输入?rn rn ++(++days);rn rn elsern rn ++days;rn rn rn rn rn cout <<"Total Days:"<
学生求助:为什么程序每次输出的结果不一样呢?
程序很简单:rn[code=c]rn#include rn#include rnrnDWORD WINAPI Fun1Proc( LPVOID lpParameter );rnrnint main()rnrn HANDLE hThread1;rn hThread1 = CreateThread(NULL,0,Fun1Proc,NULL,0,NULL);rn CloseHandle(hThread1);rn cout<<"main thread is running"<
我的这两个程序 为什么输出不相同呢?
题大意是 有n 个人围一圈 数到三退出 输出最后省余的人的编号 我是在tc2.0下编译通过的 输入8 时 f1 输出2 f2 输出1 rn f1 rn #includernrnmain(void)rnrnint i,k,m,n,*p;rnint num[50];rn p=num;rnprintf("please intput a number:");rnscanf("%d",&n);rnfor(i=0;irn#includernmain(void)rnrn int i,num[50],m,n,*p;rn p=num;rn printf("please input a number:");rn scanf("%d",&n);rn for(i=0;i
为什么两个insert的结果不同呢?
一样的数据,为什么#temp是插在前面?rncreate table #t (a int)rninsert #t select 2rnunion all select 5rnunion all select 3rnunion all select 6rnunion all select 1rnunion all select 4rnrnselect * into #temp from #t rnselect * from #temprnrninsert into #temp select * from #t order by arninsert into #t select * from #t order by arnrnselect * from #temprnselect * from #trnrndrop table #trndrop table #temprnrn所影响的行数为 6 行)rnrnrn(所影响的行数为 6 行)rnrna rn----------- rn2rn5rn3rn6rn1rn4rnrn(所影响的行数为 6 行)rnrnrn(所影响的行数为 6 行)rnrnrn(所影响的行数为 6 行)rnrna rn----------- rn1rn2rn3rn4rn5rn6rn2rn5rn3rn6rn1rn4rnrn(所影响的行数为 12 行)rnrna rn----------- rn2rn5rn3rn6rn1rn4rn1rn2rn3rn4rn5rn6rnrn(所影响的行数为 12 行)
同样的程序不同的结果?
显示修改时间的程序段是相同的,但在两个不同的网站上使用,一个正确,一个却总是显示当前访问时间?
相关热词 c# xml的遍历循环 c# 取 查看源码没有的 c#解决高并发 委托 c#日期转化为字符串 c# 显示问号 c# 字典对象池 c#5.0 安装程序 c# 分页算法 c# gmail 发邮件 c# 多层文件