求指导c语言编程问题。

求大神c语言题目是提取字母
如输入
2
abc1abc
abc@@abc
输出
abc
abc

abc
abc
我现在就是输出后面有很多烫字加上\0也没用,求教
#include
#include
void fun(char *a)
{
int i,j,k=0,m=0;
char b[100][100];
for(i=0;a[i]!='\0';i++)
{
if((a[i]>='a'&&a[i]<='z')||(a[i]>='A'&&a[i]<='Z'))
{ b[k][m]=a[i];
m++;
}
else{k++;m=0;b[k][0]='1';}
}
for(j=0;j<=k;j++)
{
if(b[j][0]!='1')
{ puts(b[j]);
printf("\n");}
}
printf("\n");
}

int main()
{
int n,i;
char a[100][100];
scanf("%d",&n);
for(i=0;i<n;i++)
{
scanf("%s",a[i]);
}
for(i=0;i<n;i++)
{
fun(a[i]);
}
return 0;
}

5个回答

#include
#include

int main()
{
char s[555555];
int n,i,len,f=0;
scanf("%d\n",&n);
while (n--)
{
gets(s);
for (i=0; s[i]!=0; i++)
{
if((s[i]>='a'&&s[i]<='z')||(s[i]>='A'&&s[i]<='Z'))
{
f=1;
printf("%c",s[i]);
}
else if (f==1)
{
f=0;
printf("\n");
}
}
printf("\n");
}
return 0;
}

路子有点野,不过我看样列这样做应该对;;;

不知道在CSDN中提问的程序能不能写的有点层次感呢,看着好难受。

 //改为:  char b[100][100]={'\0'};

你那个应该是a【i】【j】

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
关于c语言和C++语言,请高手指导
关于C语言和C++语言的比较,自己没有太多的编程经验,有一个问题一直困扰我, 1.为什么C语言和C++优势分别在哪,感觉C++抽象能力确实比C语言强大,但为什么 大多数操作系统都是用C语言写的,不是说C语言不适合编写大型程序吗?操作系统难道 还不算大型程序吗?(难道是为了效率,或者说C语言不适合编写需求不稳定的大型程序 ,而操作系统只要提前做好规划,用C语言还是可以的?) 2.linux下C语言编程用的比较多,但是C语言经常用到全局函数,而C++的类一般都是对 本类的数据进行处理(而非全局函数),如何处理这个矛盾?linux下如何对底层API 进行封装? 3.在linux下有没有对底层API函数进行封装的类库(类似于windows下的MFC)? 问题有些多,请大家指导。
求推荐一个java编程软件
我只是一个热爱编程的孩子,没有系统的学习过。自学了C语言,走了很多弯曲路,后来发现学校编程首先要学会java语言,求大神指导,谢谢
c语言编译器问题与学习方法问题
老师,你好。我是大一的一名专科生。我对编程有很大兴趣,想深入学习c语言有关知识。我现在用的编译器是vc++ 6.0在win7上会出现兼容问题,但可以忽略。我下半期准备换电脑按装win8系统,你知道有哪种编译器适合win8系统的吗?我不是计算机有关专业的学生,都是在在自学。初次接触c语言,从书上看到的好多知识点都好突兀,好多地方都弄不明白。现在我已经看了一些关于c语言的基础知识,但每次在编译器上都是去重复别人的程序代码。感觉学习找不到方向,可以给我指导学习c语言的一些方法吗?
小白刚开始在linux学习c语言编程。有问题不会请各位大神指导下
6行和7行中的main有什么作用![图片](https://img-ask.csdn.net/upload/201511/29/1448799794_338670.jpg)
Linux下网络编程read,write问题(C语言),求大神指点阿!!!
zuijzuj。最近学习socket编程的时候调试代码出现了一些问题,求大神们指导阿!!!我要实现的功能是客户端输入两个操作数和一个运算符,在服务端进行运算再把结果返回到客户端。现在的bug是客户端输入第一个操作数的时候没问题,输入运算符的时候客户端可以通过write函数写入但是服务端读出的结果不是输入的运算符,客户端输入第二个操作数的时候write函数无法写入,这是缓冲区满了吗?缓冲区大小不是由内核自己决定的吗?还是write和read函数调用不当?请大神们指正!这个问题困扰了我好多天了! 以下是客户端和服务端的代码,末尾是运行结果的截图。 客户端: #include <stdlib.h> #include <sys/types.h> #include <stdio.h> #include <sys/socket.h> #include <linux/in.h> #include <string.h> #include <errno.h> int main() { int cfd; /* 文件描述符 */ int recbytes; int sin_size; char result[1024]={0}; /* 接受缓冲区 */ struct sockaddr_in s_add,c_add; /* 存储服务端和本端的ip、端口等信息结构体 */ unsigned short portnum=2015; /* 服务端使用的通信端口,可以更改,需和服务端相同 */ int opnum1,opnum2; char op[2]; char opnum1s[3],opnum2s[3],temp[3]; char mutex[3] = "111"; printf("Hello,welcome to client !\r\n"); /* 建立socket 使用因特网,TCP流传输 */ cfd = socket(AF_INET, SOCK_STREAM, 0); if(-1 == cfd) { printf("socket fail ! \r\n"); return -1; } printf("socket ok !\r\n"); /* 构造服务器端的ip和端口信息,具体结构体可以查资料 */ bzero(&s_add,sizeof(struct sockaddr_in)); s_add.sin_family=AF_INET; s_add.sin_addr.s_addr= inet_addr("192.168.1.104"); /* ip转换为4字节整形,使用时需要根据服务端ip进行更改 */ s_add.sin_port=htons(portnum); printf("s_addr = %#x ,port : %#x\r\n",s_add.sin_addr.s_addr,s_add.sin_port); /* 这里打印出的是小端 和我们平时看到的是相反的。 */ /* 客户端连接服务器,参数依次为socket文件描述符,地址信息,地址结构大小 */ if(-1 == connect(cfd,(struct sockaddr *)(&s_add), sizeof(struct sockaddr))) { printf("connect fail !\r\n"); return -1; } printf("connect ok !\r\n"); /*连接成功*/ //write op and opnumbers to server //write opnumber1 printf("Please enter the first number:"); scanf("%d", &opnum1); itoa(opnum1, opnum1s, 10);//itoa if (-1 == write (cfd, opnum1s,strlen(opnum1s))) { printf("write first number fail!\n"); return 0; } //write op printf("Please enter the op('+','-','*','/'): "); scanf("%s", &op); if (-1 == write (cfd, op ,strlen(op))) { printf("write op fail!\n"); return 0; } //write opnumber2 printf("Please enter the second number:"); scanf("%d", &opnum2); itoa(opnum2, opnum2s, 10); if (-1 == write (cfd, opnum2, strlen(opnum2s))) { printf("write second number fail!\n"); return 0; } else { printf("All has been writed!\n"); } //从服务端接收字符*/ if(-1 == (recbytes = read(cfd,result,5))) { printf("read data fail !\r\n"); return -1; } else printf("read ok\r\nREC:\r\n"); result[recbytes]='\0'; printf("The result is %s\r\n",result); getchar(); /* 此句为使程序暂停在此处,可以使用netstat查看当前的连接 */ close(cfd); /* 关闭连接,本次通信完成 */ return 0; } void itoa(int i,char*string) { int power,j; j=i; for(power=1;j>=10;j/=10) power*=10; for(;power>0;power/=10) { *string++='0'+i/power; i%=power; } *string='\0'; } ``` 服务端: #include <stdlib.h> #include <sys/types.h> #include <stdio.h> #include <sys/socket.h> #include <linux/in.h> #include <string.h> int main() { int sfp,nfp; /* 定义两个描述符 */ struct sockaddr_in s_add,c_add; int sin_size; unsigned short portnum=2015; /* 服务端使用端口 */ int res, opnum1, opnum2, opnumi; int i = 1; int opnum[3]; char op[2],ress; char opnums[3],opnumis[3],opnum1s[3],opnum2s[3],temp[3]; printf("Hello,welcome to my server !\r\n"); sfp = socket(AF_INET, SOCK_STREAM, 0); if(-1 == sfp) { printf("socket fail ! \r\n"); return -1; } printf("socket ok !\r\n"); /* 填充服务器端口地址信息,以便下面使用此地址和端口监听 */ bzero(&s_add,sizeof(struct sockaddr_in)); s_add.sin_family=AF_INET; s_add.sin_addr.s_addr=htonl(INADDR_ANY); /* 这里地址使用全0,即所有 */ s_add.sin_port=htons(portnum); /* 使用bind进行绑定端口 */ if(-1 == bind(sfp,(struct sockaddr *)(&s_add), sizeof(struct sockaddr))) { printf("bind fail !\r\n"); return -1; } printf("bind ok !\r\n"); /* 开始监听相应的端口 */ if(-1 == listen(sfp,5)) { printf("listen fail !\r\n"); return -1; } printf("listen ok!\r\n"); while(1) { sin_size = sizeof(struct sockaddr_in); /* accept服务端使用函数,调用时即进入阻塞状态,等待用户进行连接,在没有客户端进行连接时,程序停止在此处, 不会看到后面的打印,当有客户端进行连接时,程序马上执行一次,然后再次循环到此处继续等待。 此处accept的第二个参数用于获取客户端的端口和地址信息。 */ nfp = accept(sfp, (struct sockaddr *)(&c_add), &sin_size); if(-1 == nfp) { printf("accept fail !\r\n"); return -1; } printf("accept ok!\r\nServer start get connect from %#x : %#x\r\n",ntohl(c_add.sin_addr.s_addr),ntohs(c_add.sin_port)); //read from client while (i <= 4) { if (4 == i) { switch (op[1]) { case '+': res = opnum[1] + opnum[3];break; case '-': res = opnum[1] - opnum[3];break; case '*':res = opnum[1] * opnum[3];break; case '/': res = opnum[1] / opnum[3];break; default : printf("op error!\n"); } itoa(res, ress, 10); if(-1 == write(nfp,ress,strlen(ress))) { printf("write fail!\r\n"); return -1; } printf("write ok!\r\n"); } else { switch(i) { case 2: if ( -1 == read(nfp, op, 1)) { printf("read op fail!\n"); } printf("read op is:%d\n", op);break; case 1: case 3: if ( -1 == read(nfp, temp, 3)) { printf("read %d number fail!\n", i); } printf("read opnum%d is:%s\n", i ,temp); opnum[i] = atoi(temp);break; default : printf("error!\n"); } } i ++; } close(nfp); } close(sfp); return 0; } void itoa(int i,char*string) { int power,j; j=i; for(power=1;j>=10;j/=10) power*=10; for(;power>0;power/=10) { *string++='0'+i/power; i%=power; } *string='\0'; } ``` 客户端运行的情况: Hello,welcome to client ! socket ok ! s_addr = 0x6801a8c0 ,port : 0xdf07 connect ok ! Please enter the first number:123 Please enter the op('+','-','*','/'): + Please enter the second number:444 write second number fail! ![图片说明](https://img-ask.csdn.net/upload/201506/16/1434438899_561887.png) 服务端运行的情况: Hello,welcome to my server ! socket ok ! bind ok ! listen ok! accept ok! Server start get connect from 0xc0a80168 : 0xc42d read opnum1 is:123 read op is:-1074087721 read opnum3 is:123 op error! 段错误 (核心已转储) ![图片说明](https://img-ask.csdn.net/upload/201506/16/1434438921_326746.png)
C语言编程,问题: 1~20排列成一个圈,使俩俩相近的和为素数。
问题: 1~20排列成一个圈,使俩俩相近的和为素数。 陷入尴尬了,判断素数会,不知该如何对这20 个数 连续调用 排序, 还望大神可以指导 我这一小菜鸟。 ps:下面是我打的一个小程序,可以忽视哦。 #include <stdio.h> int fun(); int main() { int i, k, count = 0, j = 0, n = 1, m = 0, a[20], b[20]; for (i = 1; i <= 20; i++) a[i - 1] = i; b[0] = a[0]; for ( i = 1; i < 20; i++, k++ ) // 从这就尴尬了 。。 if ( i != j && fun( a[i] + a[j] ) == 1 ) { b[k] = a[j]; j = i; count++; } printf("\n"); } int fun( int x ) { int n, count; count = 0; for ( n = 1; n <= x / 2; n++ ) { if ( x % n == 0 ) count++; } if ( count == 1 ) return 1; else return 0; }
求各位大神指导!!!急!
当今对航模、机器人等运动机械的控制多采用七通道遥控器。其中五通道为遥杆或滑轮, 可实现对机械的多维度控制。其余两通道为拨杆,可设置不同的控制模式。现给出其中四个 通道(channel)摇杆的三项信息: (1)、 通道序号(number): 00x【x取1~4】 (2)、通道名称 (name) :chx【x取1~4】 (3)、 拨转角度逻辑值(angle)【范围: -1024~1024】 请编程按拨转角度逻辑值由大到小输出各通道的信息(逻辑值自行设定,其余变量名称采取 给定的英文单词)
C语言关于函数调用的一个问题
代码如下,不知道为什么达不到想要的效果 编程初学者,大一。谢谢指导!找了好久没发现问题 谢谢! //输入5个班的成绩,计算各班的平均值,输出所有班中平均值最大的分数,以及所有人中最大的分数 //假设每个班不超过50人 #include <stdio.h> int i; void f1(double a[],int x); double f2(double a[],int x); double f3(double a[],int x); void main() { int s; double Class[50],average[5],max[5],allaverage,allmax; //class中C大写否则与关键字冲突 for(i=0;i<5;i++) { printf("请输入%d班的学生人数:",i+1); scanf("%d",&s); printf("请输入学生成绩:\n"); f1(Class,s); average[i]=f2(Class,s); max[i]=f3(Class,s); } //从5个班的最大平均分最高分里求整个年级的最大值 allaverage=f3(average,5); allmax=f3(max,5); //输出 printf("最高班级平均分为:%.2f\n",allaverage); printf("最高分为:%.2f\n",allmax); } //f1:输入各班成绩 //f2:求平均值 //f3:求最高分 void f1(double a[],int x) { for(i=0;i<x;i++) scanf("%d",&a[i]); } double f2(double a[],int x) { double m; for(i=0,m=0;i<x;i++) m=m+a[i]; return m/x; } double f3(double a[],int x) { int max=0; for(i=0;i<x;i++) { if(a[i]>a[max]) max=i; return a[max]; } }
access数据库,0xC0000005: 读取位置 0xe38e38e4 时发生访问冲突
void CdatabaseDlg::OnBnClickedSelect() { // TODO: 在此添加控件通知处理程序代码 int i = 0; // m_list.DeleteAllItems(); cmd.OnInitDialog(); UpdateData(true); // CRect rect; // 获取编程语言列表视图控件的位置和大小 // m_list.GetClientRect(&rect); // 为列表视图控件添加全行选中和栅格风格 // m_list.SetExtendedStyle(m_list.GetExtendedStyle() | LVS_EX_FULLROWSELECT | LVS_EX_GRIDLINES); // m_list.InsertColumn(0, _T("城市"), LVCFMT_LEFT, rect.Width() / 3); // m_list.InsertColumn(1, _T("区县"), LVCFMT_LEFT, rect.Width() / 3); // m_list.InsertColumn(2, _T("邮编"), LVCFMT_LEFT, rect.Width() / 3); { try { _variant_t RecordsAffected; cmd.m_pRecordset.CreateInstance(__uuidof(Recordset));//初始化Recordset指针 CString search_sql; search_sql = "SELECT * FROM 监视和测量设备"; cmd.m_pRecordset = cmd.m_pConnection->Execute(search_sql.AllocSysString(), NULL, adCmdText); while (!cmd.m_pRecordset->adoEOF) { CString name,department,user,category,number,number1,model,number2,category1,importance,oldpany; CString newpany,cost,date,date1,date2,number3,factory,test,grade,result,state,state1,no,information,date3; // CString chooseid; // CString choosevalue; name = cmd.m_pRecordset->GetCollect("name").bstrVal; m_list.InsertItem(i, name); department = cmd.m_pRecordset->GetCollect("part").bstrVal; m_list.SetItemText(i, 1, department); user = cmd.m_pRecordset->GetCollect("user").bstrVal; m_list.SetItemText(i, 2, user); category = cmd.m_pRecordset->GetCollect("category").bstrVal; m_list.SetItemText(i, 3, category); number = cmd.m_pRecordset->GetCollect("number").bstrVal; m_list.SetItemText(i, 4, number); number1 = cmd.m_pRecordset->GetCollect("number1").bstrVal; m_list.SetItemText(i, 5, number1); model = cmd.m_pRecordset->GetCollect("model").bstrVal; m_list.SetItemText(i, 6, model); number2 = cmd.m_pRecordset->GetCollect("number2").bstrVal; m_list.SetItemText(i, 7, number2); category1 = cmd.m_pRecordset->GetCollect("category1").bstrVal; m_list.SetItemText(i, 8, category1); importance = cmd.m_pRecordset->GetCollect("importance").bstrVal; m_list.SetItemText(i, 9, importance); oldpany = cmd.m_pRecordset->GetCollect("oldpany").bstrVal; m_list.SetItemText(i, 10, oldpany); newpany = cmd.m_pRecordset->GetCollect("newpany").bstrVal; m_list.SetItemText(i, 11, newpany); cost = cmd.m_pRecordset->GetCollect("cost").bstrVal; m_list.SetItemText(i, 12, cost); date = cmd.m_pRecordset->GetCollect("date").bstrVal; m_list.SetItemText(i, 13, date); date1 = cmd.m_pRecordset->GetCollect("date1").bstrVal; m_list.SetItemText(i, 14, date1); date2 = cmd.m_pRecordset->GetCollect("date2").bstrVal; m_list.SetItemText(i, 15, date2); number3 = cmd.m_pRecordset->GetCollect("number3").bstrVal; m_list.SetItemText(i, 16, number3); factory = cmd.m_pRecordset->GetCollect("factory").bstrVal; m_list.SetItemText(i, 17, factory); test = cmd.m_pRecordset->GetCollect("test").bstrVal; m_list.SetItemText(i, 18, test); grade = cmd.m_pRecordset->GetCollect("grade").bstrVal; m_list.SetItemText(i, 19, grade); result = cmd.m_pRecordset->GetCollect("result").bstrVal; m_list.SetItemText(i, 20, result); state = cmd.m_pRecordset->GetCollect("state").bstrVal; m_list.SetItemText(i, 21, state); state1 = cmd.m_pRecordset->GetCollect("state1").bstrVal; m_list.SetItemText(i, 22, state1); no = cmd.m_pRecordset->GetCollect("no").bstrVal; m_list.SetItemText(i, 23, no); information = cmd.m_pRecordset->GetCollect("information").bstrVal; m_list.SetItemText(i, 24, information); date3 = cmd.m_pRecordset->GetCollect("date3").bstrVal; m_list.SetItemText(i, 25, date3); cmd.m_pRecordset->MoveNext(); i++; } cmd.m_pRecordset->Close(); } catch (_com_error e) { AfxMessageBox(_T("搜索失败!")); return; } } } 执行到这date3 = cmd.m__pRecordset->GetCollect("date3").bstrVal; 再往下执行就报错,求大神指导,小白初学者
编程计算:要买该水果A个,至多只能买该水果B个,怎么使用C语言求出这个A B的值是多少
Problem Description 转眼到了收获的季节,由于有TT的专业指导,Lele获得了大丰收。特别是水果,Lele一共种了N种水果,有苹果,梨子,香蕉,西瓜……不但味道好吃,样子更是好看。 于是,很多人们慕名而来,找Lele买水果。 甚至连大名鼎鼎的HDU ACM总教头 lcy 也来了。lcy抛出一打百元大钞,"我要买由M个水果组成的水果拼盘,不过我有个小小的要求,对于每种水果,个数上我有限制,既不能少于某个特定值,也不能大于某个特定值。而且我不要两份一样的拼盘。你随意搭配,你能组出多少种不同的方案,我就买多少份!" 现在就请你帮帮Lele,帮他算一算到底能够卖出多少份水果拼盘给lcy了。 注意,水果是以个为基本单位,不能够再分。对于两种方案,如果各种水果的数目都相同,则认为这两种方案是相同的。 最终Lele拿了这笔钱,又可以继续他的学业了~ Input 本题目包含多组测试,请处理到文件结束(EOF)。 每组测试第一行包括两个正整数N和M(含义见题目描述,0<N,M<=100) 接下来有N行水果的信息,每行两个整数A,B(0<=A<=B<=100),表示至少要买该水果A个,至多只能买该水果B个。 Output 对于每组测试,在一行里输出总共能够卖的方案数。 题目数据保证这个答案小于10^9 Sample Input 2 3 1 2 1 2 3 5 0 3 0 3 0 3 Sample Output 2 12
编程小问题,关于结构体
用结构体类型数组进行程序设计。有五个学生,每个学生的信息包括:学号,姓名,三门课的成绩和平均成绩。从键盘输入每个学生的学号,姓名和三门课的成绩,计算每个学生的平均成绩,计算并输出总平均成绩,求出最高分学生,并输出其信息(姓名和平均成绩)。 实验步骤 ① 用一个函数输入五个学生的数据信息; ② 用一个函数求每个学生的平均成绩; ③ 用一个函数找出最高分的学生; ④ 主函数中调用相关函数,并输出总平均成绩和最高分学生的信息。 这是我写的代码 #include<stdio.h> #define N 5 struct student { int num; char name[20]; int score[3]; }stu[5]; float ave[3]; void input(); void average(); int max(); int main() { input(); average(); int t; t=max(); } void input() { int i,j; for(i=0;i<5;i++) { scanf("%d%c",&stu[i].num,&stu[i].name); for(j=0;j<3;j++) { scanf("%d",&stu[i].score[j]); } } } void average() { int i,j; for(i=0;i<5;i++) { ave[i]=0; for(j=0;j<3;j++) { ave[i]+=stu[i].score[j]; } ave[i]/=3; } } int max() { int i,maxi=0; float max=ave[0]; for(i=1;i<5;i++) { if(max<ave[i]) { max=ave[i]; maxi=i+1; } } return maxi; } 为什么无法运行啊?求指导
多线程TCP/IP网络编程
编写一个socket通信程序,win32控制台的,可以发送、接收消息和文件。要多线程。C语言的。 客户端和服务端各要有怎样的思路,求指导! --------------------------- 目前思路大致是,服务端,两个子线程,主线程接受连接,一个子线程发送消息,一个子线程接收消息。 客户端,主线程连接,一个子线程发送消息,一个子线程接收消息。 现在有个问题,连接多个客户端后,客户端发送的消息会乱掉,服务器又怎么分辨客户端给特定的客户端发送消息。 还有,怎么传输文件。
求指教!在用C#语言写WPF程序时碰到 一个问题,没有思路
问题:怎样用代码实现主窗体的label的MouseDown事件?? 具体描述:假设我把两个Label放在第一行,怎样的代码可以实现让我的鼠标放在这两个Lebel上同时在第二行RichTextBox中分别弹出不一样的内容。 希望会的朋友能给出指导,本人不胜感激!
关于C语言OJ的一道题:Time Limit Exceeded
hihoCoder上的一道关于KMP算法的一道题,题目描述如下: #1015 : KMP算法 时间限制:1000ms 单点时限:1000ms 内存限制:256MB 描述 小Hi和小Ho是一对好朋友,出生在信息化社会的他们对编程产生了莫大的兴趣,他们约定好互相帮助,在编程的学习道路上一同前进。 这一天,他们遇到了一只河蟹,于是河蟹就向小Hi和小Ho提出了那个经典的问题:“小Hi和小Ho,你们能不能够判断一段文字(原串)里面是不是存在那么一些……特殊……的文字(模式串)?” 小Hi和小Ho仔细思考了一下,觉得只能想到很简单的做法,但是又觉得既然河蟹先生这么说了,就肯定不会这么容易的让他们回答了,于是他们只能说道:“抱歉,河蟹先生,我们只能想到时间复杂度为(文本长度 * 特殊文字总长度)的方法,即对于每个模式串分开判断,然后依次枚举起始位置并检查是否能够匹配,但是这不是您想要的方法是吧?” 河蟹点了点头,说道:”看来你们的水平还有待提高,这样吧,如果我说只有一个特殊文字,你能不能做到呢?“ 小Ho这时候还有点晕晕乎乎的,但是小Hi很快开口道:”我知道!这就是一个很经典的模式匹配问题!可以使用KMP算法进行求解!“ 河蟹满意的点了点头,对小Hi说道:”既然你知道就好办了,你去把小Ho教会,下周我有重要的任务交给你们!“ ”保证完成任务!”小Hi点头道。 提示一:KMP的思路 提示二:NEXT数组的使用 提示三:如何求解NEXT数组 输入 第一行一个整数N,表示测试数据组数。 接下来的N*2行,每两行表示一个测试数据。在每一个测试数据中,第一行为模式串,由不超过10^4个大写字母组成,第二行为原串,由不超过10^6个大写字母组成。 其中N<=20 输出 对于每一个测试数据,按照它们在输入中出现的顺序输出一行Ans,表示模式串在原串中出现的次数。 样例输入 5 HA HAHAHA WQN WQN ADA ADADADA BABABB BABABABABABABABABB DAD ADDAADAADDAAADAAD 样例输出 3 1 3 1 0 这是我按照自己的理解提交的代码: #include<stdio.h> #include<string.h> #include<stdlib.h> int KMP(char *ori,char *pat); int main(void) { char *ori,strori[10001]; char *pat,strpat[1000001]; int n;//测试组数 pat=strpat;//必须初始化 有所指向才行 ori=strori; scanf("%d\n",&n); while(n--) { scanf("%s",pat); scanf("%s",ori); printf("%d\n",KMP(ori,pat)); } return 0; } int KMP(char *ori,char *pat) { char *temp,*p; int num=strlen(pat); int i=0,j=0; int *next; int sum=0; //求出next数组 next=(int *)malloc(num*sizeof(int)); memset((int *)next,0,num*sizeof(int)); p=temp=pat; pat++; while(*pat) { if(*pat==*temp) { *(next+i+1)=j+1; pat++; temp++; j++; } else { pat++; j=0; } i++; } //匹配字符串 pat=temp=p; i=j=0; while(*ori) { if(*ori!=*pat) { ori++; if(i!=0)//表明之前有匹配成功过,但还未完全匹配 { ori=ori-1-*(next+i-1);//ori=ori-i-1+(i-*(next+i-1)); pat=p; i=0; } } else { ori++; pat++; i++; if(*pat=='\0') { sum++; ori=ori-1-*(next+i-1); pat=p; i=0; } } } return sum; } 但每次提交结果都是: Time Limit Exceeded TLE 用户程序运行时间超过题目的限制 怎么优化一下我的代码才能是它AC啊?!求大神指导啊。
SCTP编程如何设置添加校验
各位大神好: 我在SCTP编程时发现通信的数据包中没有加入checksum,在网上查了半天也没有找到解决方案,哪位大神有这方面的经验指导一下,不胜感激
java网站启动异常求指导
大神们请看,我用jrebel启动的时候没有问题,有错误,但是能访问。 单纯用tomcat启动,有错误,不能访问。 "D:\Program Files\Java\jdk1.6.0_43\bin\java" -Dcatalina.base=C:\Users\Administrator\.IntelliJIdea13\system\tomcat\Unnamed_passport_com "-Dcatalina.home=D:\Program Files\Apache Software Foundation\Tomcat 7.0" "-Djava.io.tmpdir=D:\Program Files\Apache Software Foundation\Tomcat 7.0\temp" -Dcom.sun.management.jmxremote= -Dcom.sun.management.jmxremote.port=8099 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Djava.rmi.server.hostname=127.0.0.1 -cp "D:\Program Files\Apache Software Foundation\Tomcat 7.0\bin\bootstrap.jar;D:\Program Files\Apache Software Foundation\Tomcat 7.0\bin\tomcat-juli.jar" org.apache.catalina.startup.Bootstrap start [2014-03-23 12:21:58,874] Artifact passport.com:war exploded: Server is not connected. Deploy is not available. 2014-3-23 0:21:59 org.apache.catalina.core.AprLifecycleListener init 信息: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: D:\Program Files\Java\jdk1.6.0_43\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;D:\Program Files (x86)\Zend\ZendServer\share\ZendFramework\bin;D:\Program Files (x86)\Zend\ZendServer\bin;. 2014-3-23 0:21:59 org.apache.coyote.AbstractProtocol init 信息: Initializing ProtocolHandler ["http-bio-8081"] 2014-3-23 0:21:59 org.apache.coyote.AbstractProtocol init 信息: Initializing ProtocolHandler ["ajp-bio-8009"] 2014-3-23 0:21:59 org.apache.catalina.startup.Catalina load 信息: Initialization processed in 620 ms 2014-3-23 0:21:59 org.apache.catalina.core.StandardService startInternal 信息: Starting service Catalina 2014-3-23 0:21:59 org.apache.catalina.core.StandardEngine startInternal 信息: Starting Servlet Engine: Apache Tomcat/7.0.47 2014-3-23 0:21:59 org.apache.coyote.AbstractProtocol start 信息: Starting ProtocolHandler ["http-bio-8081"] 2014-3-23 0:21:59 org.apache.coyote.AbstractProtocol start 信息: Starting ProtocolHandler ["ajp-bio-8009"] 2014-3-23 0:21:59 org.apache.catalina.startup.Catalina start 信息: Server startup in 38 ms Connected to server [2014-03-23 12:21:59,988] Artifact passport.com:war exploded: Artifact is being deployed, please wait... 2014-3-23 0:22:00 org.apache.catalina.loader.WebappClassLoader validateJarFile 信息: validateJarFile(E:\xiito.com\passport.com\target\passport.com\WEB-INF\lib\servlet-api-2.5.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class 2014-3-23 0:22:01 org.apache.catalina.core.ApplicationContext log 信息: No Spring WebApplicationInitializer types detected on classpath 2014-3-23 0:22:01 org.apache.tomcat.websocket.server.WsSci onStartup 信息: JSR 356 WebSocket (Java WebSocket 1.0) support is not available when running on Java 6. To suppress this message, run Tomcat on Java 7, remove the WebSocket JARs from $CATALINA_HOME/lib or add the WebSocketJARs to the tomcat.util.scan.DefaultJarScanner.jarsToSkip property in $CATALINA_BASE/conf/catalina.properties. Note that the deprecated Tomcat 7 WebSocket API will be available. 2014-3-23 0:22:01 org.apache.catalina.core.ApplicationContext log 信息: Initializing Spring FrameworkServlet 'mvc-dispatcher' 2014-3-23 0:22:01 org.springframework.web.servlet.FrameworkServlet initServletBean 信息: FrameworkServlet 'mvc-dispatcher': initialization started 2014-3-23 0:22:02 org.springframework.context.support.AbstractApplicationContext prepareRefresh 信息: Refreshing WebApplicationContext for namespace 'mvc-dispatcher-servlet': startup date [Sun Mar 23 00:22:02 CST 2014]; root of context hierarchy 2014-3-23 0:22:02 org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions 信息: Loading XML bean definitions from ServletContext resource [/WEB-INF/mvc-dispatcher-servlet.xml] 2014-3-23 0:22:02 org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider registerDefaultFilters 信息: JSR-250 'javax.annotation.ManagedBean' found and supported for component scanning 2014-3-23 0:22:03 org.springframework.beans.factory.support.DefaultListableBeanFactory preInstantiateSingletons 信息: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@15384ed5: defining beans [loginRepository,loginService,registerRepository,registerService,errorController,loginController,registerController,verifyCodeController,org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,mvcContentNegotiationManager,org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping#0,org.springframework.format.support.FormattingConversionServiceFactoryBean#0,org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter#0,org.springframework.web.servlet.handler.MappedInterceptor#0,org.springframework.web.servlet.mvc.method.annotation.ExceptionHandlerExceptionResolver#0,org.springframework.web.servlet.mvc.annotation.ResponseStatusExceptionResolver#0,org.springframework.web.servlet.mvc.support.DefaultHandlerExceptionResolver#0,org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping,org.springframework.web.servlet.mvc.HttpRequestHandlerAdapter,org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter,org.springframework.web.servlet.resource.DefaultServletHttpRequestHandler#0,org.springframework.web.servlet.handler.SimpleUrlHandlerMapping#0,org.springframework.web.servlet.view.InternalResourceViewResolver#0,org.springframework.context.annotation.ConfigurationClassPostProcessor.importAwareProcessor]; root of factory hierarchy 2014-3-23 0:22:03 org.springframework.beans.factory.support.DefaultSingletonBeanRegistry destroySingletons 信息: Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@15384ed5: defining beans [loginRepository,loginService,registerRepository,registerService,errorController,loginController,registerController,verifyCodeController,org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,mvcContentNegotiationManager,org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping#0,org.springframework.format.support.FormattingConversionServiceFactoryBean#0,org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter#0,org.springframework.web.servlet.handler.MappedInterceptor#0,org.springframework.web.servlet.mvc.method.annotation.ExceptionHandlerExceptionResolver#0,org.springframework.web.servlet.mvc.annotation.ResponseStatusExceptionResolver#0,org.springframework.web.servlet.mvc.support.DefaultHandlerExceptionResolver#0,org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping,org.springframework.web.servlet.mvc.HttpRequestHandlerAdapter,org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter,org.springframework.web.servlet.resource.DefaultServletHttpRequestHandler#0,org.springframework.web.servlet.handler.SimpleUrlHandlerMapping#0,org.springframework.web.servlet.view.InternalResourceViewResolver#0,org.springframework.context.annotation.ConfigurationClassPostProcessor.importAwareProcessor]; root of factory hierarchy 2014-3-23 0:22:03 org.springframework.web.servlet.FrameworkServlet initServletBean 严重: Context initialization failed org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [com.login.repositories.LoginRepository] for bean with name 'loginRepository' defined in file [E:\xiito.com\passport.com\target\passport.com\WEB-INF\classes\com\Login\repositories\LoginRepository.class]; nested exception is java.lang.ClassNotFoundException: com.login.repositories.LoginRepository at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1263) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType(AbstractAutowireCapableBeanFactory.java:581) at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:1332) at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:898) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:588) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479) at org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:647) at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:598) at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:661) at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:517) at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:458) at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:138) at javax.servlet.GenericServlet.init(GenericServlet.java:160) at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1280) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1193) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1088) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5176) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5460) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633) at org.apache.catalina.startup.HostConfig.manageApp(HostConfig.java:1558) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:301) at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:836) at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:762) at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:620) at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:567) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:301) at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:836) at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:762) at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1454) at javax.management.remote.rmi.RMIConnectionImpl.access$300(RMIConnectionImpl.java:74) at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1295) at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1387) at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:818) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:303) at sun.rmi.transport.Transport$1.run(Transport.java:159) at java.security.AccessController.doPrivileged(Native Method) at sun.rmi.transport.Transport.serviceCall(Transport.java:155) at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918) at java.lang.Thread.run(Thread.java:662) Caused by: java.lang.ClassNotFoundException: com.login.repositories.LoginRepository at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1702) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1547) at org.springframework.util.ClassUtils.forName(ClassUtils.java:258) at org.springframework.beans.factory.support.AbstractBeanDefinition.resolveBeanClass(AbstractBeanDefinition.java:415) at org.springframework.beans.factory.support.AbstractBeanFactory.doResolveBeanClass(AbstractBeanFactory.java:1284) at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1255) ... 58 more 2014-3-23 0:22:03 org.apache.catalina.core.ApplicationContext log 严重: StandardWrapper.Throwable org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [com.login.repositories.LoginRepository] for bean with name 'loginRepository' defined in file [E:\xiito.com\passport.com\target\passport.com\WEB-INF\classes\com\Login\repositories\LoginRepository.class]; nested exception is java.lang.ClassNotFoundException: com.login.repositories.LoginRepository at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1263) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType(AbstractAutowireCapableBeanFactory.java:581) at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:1332) at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:898) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:588) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479) at org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:647) at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:598) at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:661) at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:517) at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:458) at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:138) at javax.servlet.GenericServlet.init(GenericServlet.java:160) at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1280) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1193) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1088) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5176) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5460) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633) at org.apache.catalina.startup.HostConfig.manageApp(HostConfig.java:1558) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:301) at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:836) at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:762) at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:620) at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:567) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:301) at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:836) at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:762) at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1454) at javax.management.remote.rmi.RMIConnectionImpl.access$300(RMIConnectionImpl.java:74) at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1295) at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1387) at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:818) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:303) at sun.rmi.transport.Transport$1.run(Transport.java:159) at java.security.AccessController.doPrivileged(Native Method) at sun.rmi.transport.Transport.serviceCall(Transport.java:155) at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918) at java.lang.Thread.run(Thread.java:662) Caused by: java.lang.ClassNotFoundException: com.login.repositories.LoginRepository at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1702) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1547) at org.springframework.util.ClassUtils.forName(ClassUtils.java:258) at org.springframework.beans.factory.support.AbstractBeanDefinition.resolveBeanClass(AbstractBeanDefinition.java:415) at org.springframework.beans.factory.support.AbstractBeanFactory.doResolveBeanClass(AbstractBeanFactory.java:1284) at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1255) ... 58 more 2014-3-23 0:22:03 org.apache.catalina.core.StandardContext loadOnStartup 严重: Servlet threw load() exception java.lang.ClassNotFoundException: com.login.repositories.LoginRepository at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1702) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1547) at org.springframework.util.ClassUtils.forName(ClassUtils.java:258) at org.springframework.beans.factory.support.AbstractBeanDefinition.resolveBeanClass(AbstractBeanDefinition.java:415) at org.springframework.beans.factory.support.AbstractBeanFactory.doResolveBeanClass(AbstractBeanFactory.java:1284) at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1255) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType(AbstractAutowireCapableBeanFactory.java:581) at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:1332) at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:898) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:588) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479) at org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:647) at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:598) at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:661) at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:517) at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:458) at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:138) at javax.servlet.GenericServlet.init(GenericServlet.java:160) at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1280) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1193) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1088) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5176) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5460) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633) at org.apache.catalina.startup.HostConfig.manageApp(HostConfig.java:1558) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:301) at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:836) at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:762) at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:620) at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:567) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:301) at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:836) at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:762) at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1454) at javax.management.remote.rmi.RMIConnectionImpl.access$300(RMIConnectionImpl.java:74) at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1295) at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1387) at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:818) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:303) at sun.rmi.transport.Transport$1.run(Transport.java:159) at java.security.AccessController.doPrivileged(Native Method) at sun.rmi.transport.Transport.serviceCall(Transport.java:155) at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918) at java.lang.Thread.run(Thread.java:662) [2014-03-23 12:22:03,259] Artifact passport.com:war exploded: Artifact is deployed successfully [2014-03-23 12:22:03,259] Artifact passport.com:war exploded: Deploy took 3,271 milliseconds 2014-3-23 0:22:03 org.apache.catalina.core.ApplicationContext log 信息: Initializing Spring FrameworkServlet 'mvc-dispatcher' 2014-3-23 0:22:03 org.springframework.web.servlet.FrameworkServlet initServletBean 信息: FrameworkServlet 'mvc-dispatcher': initialization started 2014-3-23 0:22:03 org.springframework.context.support.AbstractApplicationContext prepareRefresh 信息: Refreshing WebApplicationContext for namespace 'mvc-dispatcher-servlet': startup date [Sun Mar 23 00:22:03 CST 2014]; root of context hierarchy 2014-3-23 0:22:03 org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions 信息: Loading XML bean definitions from ServletContext resource [/WEB-INF/mvc-dispatcher-servlet.xml] 2014-3-23 0:22:03 org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider registerDefaultFilters 信息: JSR-250 'javax.annotation.ManagedBean' found and supported for component scanning 2014-3-23 0:22:03 org.springframework.beans.factory.support.DefaultListableBeanFactory preInstantiateSingletons 信息: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@6e9b86ea: defining beans [loginRepository,loginService,registerRepository,registerService,errorController,loginController,registerController,verifyCodeController,org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,mvcContentNegotiationManager,org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping#0,org.springframework.format.support.FormattingConversionServiceFactoryBean#0,org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter#0,org.springframework.web.servlet.handler.MappedInterceptor#0,org.springframework.web.servlet.mvc.method.annotation.ExceptionHandlerExceptionResolver#0,org.springframework.web.servlet.mvc.annotation.ResponseStatusExceptionResolver#0,org.springframework.web.servlet.mvc.support.DefaultHandlerExceptionResolver#0,org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping,org.springframework.web.servlet.mvc.HttpRequestHandlerAdapter,org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter,org.springframework.web.servlet.resource.DefaultServletHttpRequestHandler#0,org.springframework.web.servlet.handler.SimpleUrlHandlerMapping#0,org.springframework.web.servlet.view.InternalResourceViewResolver#0,org.springframework.context.annotation.ConfigurationClassPostProcessor.importAwareProcessor]; root of factory hierarchy 2014-3-23 0:22:03 org.springframework.beans.factory.support.DefaultSingletonBeanRegistry destroySingletons 信息: Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@6e9b86ea: defining beans [loginRepository,loginService,registerRepository,registerService,errorController,loginController,registerController,verifyCodeController,org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,mvcContentNegotiationManager,org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping#0,org.springframework.format.support.FormattingConversionServiceFactoryBean#0,org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter#0,org.springframework.web.servlet.handler.MappedInterceptor#0,org.springframework.web.servlet.mvc.method.annotation.ExceptionHandlerExceptionResolver#0,org.springframework.web.servlet.mvc.annotation.ResponseStatusExceptionResolver#0,org.springframework.web.servlet.mvc.support.DefaultHandlerExceptionResolver#0,org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping,org.springframework.web.servlet.mvc.HttpRequestHandlerAdapter,org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter,org.springframework.web.servlet.resource.DefaultServletHttpRequestHandler#0,org.springframework.web.servlet.handler.SimpleUrlHandlerMapping#0,org.springframework.web.servlet.view.InternalResourceViewResolver#0,org.springframework.context.annotation.ConfigurationClassPostProcessor.importAwareProcessor]; root of factory hierarchy 2014-3-23 0:22:03 org.springframework.web.servlet.FrameworkServlet initServletBean 严重: Context initialization failed org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [com.login.repositories.LoginRepository] for bean with name 'loginRepository' defined in file [E:\xiito.com\passport.com\target\passport.com\WEB-INF\classes\com\Login\repositories\LoginRepository.class]; nested exception is java.lang.ClassNotFoundException: com.login.repositories.LoginRepository at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1263) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType(AbstractAutowireCapableBeanFactory.java:581) at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:1332) at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:898) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:588) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479) at org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:647) at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:598) at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:661) at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:517) at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:458) at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:138) at javax.servlet.GenericServlet.init(GenericServlet.java:160) at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1280) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1193) at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:865) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:136) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1041) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:603) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918) at java.lang.Thread.run(Thread.java:662) Caused by: java.lang.ClassNotFoundException: com.login.repositories.LoginRepository at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1702) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1547) at org.springframework.util.ClassUtils.forName(ClassUtils.java:258) at org.springframework.beans.factory.support.AbstractBeanDefinition.resolveBeanClass(AbstractBeanDefinition.java:415) at org.springframework.beans.factory.support.AbstractBeanFactory.doResolveBeanClass(AbstractBeanFactory.java:1284) at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1255) ... 30 more 2014-3-23 0:22:03 org.apache.catalina.core.ApplicationContext log 严重: StandardWrapper.Throwable org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [com.login.repositories.LoginRepository] for bean with name 'loginRepository' defined in file [E:\xiito.com\passport.com\target\passport.com\WEB-INF\classes\com\Login\repositories\LoginRepository.class]; nested exception is java.lang.ClassNotFoundException: com.login.repositories.LoginRepository at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1263) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType(AbstractAutowireCapableBeanFactory.java:581) at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:1332) at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:898) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:588) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479) at org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:647) at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:598) at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:661) at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:517) at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:458) at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:138) at javax.servlet.GenericServlet.init(GenericServlet.java:160) at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1280) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1193) at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:865) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:136) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1041) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:603) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918) at java.lang.Thread.run(Thread.java:662) Caused by: java.lang.ClassNotFoundException: com.login.repositories.LoginRepository at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1702) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1547) at org.springframework.util.ClassUtils.forName(ClassUtils.java:258) at org.springframework.beans.factory.support.AbstractBeanDefinition.resolveBeanClass(AbstractBeanDefinition.java:415) at org.springframework.beans.factory.support.AbstractBeanFactory.doResolveBeanClass(AbstractBeanFactory.java:1284) at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1255) ... 30 more 2014-3-23 0:22:04 org.apache.catalina.core.StandardWrapperValve invoke 严重: Allocate exception for servlet mvc-dispatcher java.lang.ClassNotFoundException: com.login.repositories.LoginRepository at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1702) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1547) at org.springframework.util.ClassUtils.forName(ClassUtils.java:258) at org.springframework.beans.factory.support.AbstractBeanDefinition.resolveBeanClass(AbstractBeanDefinition.java:415) at org.springframework.beans.factory.support.AbstractBeanFactory.doResolveBeanClass(AbstractBeanFactory.java:1284) at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1255) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType(AbstractAutowireCapableBeanFactory.java:581) at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:1332) at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:898) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:588) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479) at org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:647) at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:598) at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:661) at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:517) at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:458) at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:138) at javax.servlet.GenericServlet.init(GenericServlet.java:160) at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1280) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1193) at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:865) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:136) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1041) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:603) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918) at java.lang.Thread.run(Thread.java:662) 2014-3-23 0:22:04 org.apache.catalina.core.ApplicationContext log 信息: Initializing Spring FrameworkServlet 'mvc-dispatcher' 2014-3-23 0:22:04 org.springframework.web.servlet.FrameworkServlet initServletBean 信息: FrameworkServlet 'mvc-dispatcher': initialization started 2014-3-23 0:22:04 org.springframework.context.support.AbstractApplicationContext prepareRefresh 信息: Refreshing WebApplicationContext for namespace 'mvc-dispatcher-servlet': startup date [Sun Mar 23 00:22:04 CST 2014]; root of context hierarchy 2014-3-23 0:22:04 org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions 信息: Loading XML bean definitions from ServletContext resource [/WEB-INF/mvc-dispatcher-servlet.xml] 2014-3-23 0:22:04 org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider registerDefaultFilters 信息: JSR-250 'javax.annotation.ManagedBean' found and supported for component scanning 2014-3-23 0:22:04 org.springframework.beans.factory.support.DefaultListableBeanFactory preInstantiateSingletons 信息: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@55f4c4a3: defining beans [loginRepository,loginService,registerRepository,registerService,errorController,loginController,registerController,verifyCodeController,org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,mvcContentNegotiationManager,org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping#0,org.springframework.format.support.FormattingConversionServiceFactoryBean#0,org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter#0,org.springframework.web.servlet.handler.MappedInterceptor#0,org.springframework.web.servlet.mvc.method.annotation.ExceptionHandlerExceptionResolver#0,org.springframework.web.servlet.mvc.annotation.ResponseStatusExceptionResolver#0,org.springframework.web.servlet.mvc.support.DefaultHandlerExceptionResolver#0,org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping,org.springframework.web.servlet.mvc.HttpRequestHandlerAdapter,org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter,org.springframework.web.servlet.resource.DefaultServletHttpRequestHandler#0,org.springframework.web.servlet.handler.SimpleUrlHandlerMapping#0,org.springframework.web.servlet.view.InternalResourceViewResolver#0,org.springframework.context.annotation.ConfigurationClassPostProcessor.importAwareProcessor]; root of factory hierarchy 2014-3-23 0:22:04 org.springframework.beans.factory.support.DefaultSingletonBeanRegistry destroySingletons 信息: Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@55f4c4a3: defining beans [loginRepository,loginService,registerRepository,registerService,errorController,loginController,registerController,verifyCodeController,org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,mvcContentNegotiationManager,org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping#0,org.springframework.format.support.FormattingConversionServiceFactoryBean#0,org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter#0,org.springframework.web.servlet.handler.MappedInterceptor#0,org.springframework.web.servlet.mvc.method.annotation.ExceptionHandlerExceptionResolver#0,org.springframework.web.servlet.mvc.annotation.ResponseStatusExceptionResolver#0,org.springframework.web.servlet.mvc.support.DefaultHandlerExceptionResolver#0,org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping,org.springframework.web.servlet.mvc.HttpRequestHandlerAdapter,org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter,org.springframework.web.servlet.resource.DefaultServletHttpRequestHandler#0,org.springframework.web.servlet.handler.SimpleUrlHandlerMapping#0,org.springframework.web.servlet.view.InternalResourceViewResolver#0,org.springframework.context.annotation.ConfigurationClassPostProcessor.importAwareProcessor]; root of factory hierarchy 2014-3-23 0:22:04 org.springframework.web.servlet.FrameworkServlet initServletBean 严重: Context initialization failed org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [com.login.repositories.LoginRepository] for bean with name 'loginRepository' defined in file [E:\xiito.com\passport.com\target\passport.com\WEB-INF\classes\com\Login\repositories\LoginRepository.class]; nested exception is java.lang.ClassNotFoundException: com.login.repositories.LoginRepository at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1263) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType(AbstractAutowireCapableBeanFactory.java:581) at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:1332) at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:898) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:588) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479) at org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:647) at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:598) at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:661) at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:517) at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:458) at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:138) at javax.servlet.GenericServlet.init(GenericServlet.java:160) at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1280) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1193) at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:865) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:136) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1041) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:603) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918) at java.lang.Thread.run(Thread.java:662) Caused by: java.lang.ClassNotFoundException: com.login.repositories.LoginRepository at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1702) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1547) at org.springframework.util.ClassUtils.forName(ClassUtils.java:258) at org.springframework.beans.factory.support.AbstractBeanDefinition.resolveBeanClass(AbstractBeanDefinition.java:415) at org.springframework.beans.factory.support.AbstractBeanFactory.doResolveBeanClass(AbstractBeanFactory.java:1284) at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1255) ... 30 more 2014-3-23 0:22:04 org.apache.catalina.core.ApplicationContext log 严重: StandardWrapper.Throwable org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [com.login.repositories.LoginRepository] for bean with name 'loginRepository' defined in file [E:\xiito.com\passport.com\target\passport.com\WEB-INF\classes\com\Login\repositories\LoginRepository.class]; nested exception is java.lang.ClassNotFoundException: com.login.repositories.LoginRepository at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1263) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType(AbstractAutowireCapableBeanFactory.java:581) at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:1332) at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:898) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:588) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479) at org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:647) at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:598) at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:661) at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:517) at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:458) at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:138) at javax.servlet.GenericServlet.init(GenericServlet.java:160) at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1280) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1193) at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:865) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:136) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1041) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:603) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918) at java.lang.Thread.run(Thread.java:662) Caused by: java.lang.ClassNotFoundException: com.login.repositories.LoginRepository at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1702) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1547) at org.springframework.util.ClassUtils.forName(ClassUtils.java:258) at org.springframework.beans.factory.support.AbstractBeanDefinition.resolveBeanClass(AbstractBeanDefinition.java:415) at org.springframework.beans.factory.support.AbstractBeanFactory.doResolveBeanClass(AbstractBeanFactory.java:1284) at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1255) ... 30 more 2014-3-23 0:22:04 org.apache.catalina.core.StandardWrapperValve invoke 严重: Allocate exception for servlet mvc-dispatcher java.lang.ClassNotFoundException: com.login.repositories.LoginRepository at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1702) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1547) at org.springframework.util.ClassUtils.forName(ClassUtils.java:258) at org.springframework.beans.factory.support.AbstractBeanDefinition.resolveBeanClass(AbstractBeanDefinition.java:415) at org.springframework.beans.factory.support.AbstractBeanFactory.doResolveBeanClass(AbstractBeanFactory.java:1284) at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1255) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType(AbstractAutowireCapableBeanFactory.java:581) at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:1332) at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:898) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:588) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479) at org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:647) at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:598) at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:661) at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:517) at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:458) at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:138) at javax.servlet.GenericServlet.init(GenericServlet.java:160) at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1280) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1193) at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:865) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:136) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1041) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:603) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918) at java.lang.Thread.run(Thread.java:662) 2014-3-23 0:22:05 org.apache.catalina.core.ApplicationContext log 信息: Initializing Spring FrameworkServlet 'mvc-dispatcher' 2014-3-23 0:22:05 org.springframework.web.servlet.FrameworkServlet initServletBean 信息: FrameworkServlet 'mvc-dispatcher': initialization started 2014-3-23 0:22:05 org.springframework.context.support.AbstractApplicationContext prepareRefresh 信息: Refreshing WebApplicationContext for namespace 'mvc-dispatcher-servlet': startup date [Sun Mar 23 00:22:05 CST 2014]; root of context hierarchy 2014-3-23 0:22:05 org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions 信息: Loading XML bean definitions from ServletContext resource [/WEB-INF/mvc-dispatcher-servlet.xml] 2014-3-23 0:22:05 org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider registerDefaultFilters 信息: JSR-250 'javax.annotation.ManagedBean' found and supported for component scanning 2014-3-23 0:22:05 org.springframework.beans.factory.support.DefaultListableBeanFactory preInstantiateSingletons 信息: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@37af78ce: defining beans [loginRepository,loginService,registerRepository,registerService,errorController,loginController,registerController,verifyCodeController,org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,mvcContentNegotiationManager,org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping#0,org.springframework.format.support.FormattingConversionServiceFactoryBean#0,org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter#0,org.springframework.web.servlet.handler.MappedInterceptor#0,org.springframework.web.servlet.mvc.method.annotation.ExceptionHandlerExceptionResolver#0,org.springframework.web.servlet.mvc.annotation.ResponseStatusExceptionResolver#0,org.springframework.web.servlet.mvc.support.DefaultHandlerExceptionResolver#0,org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping,org.springframework.web.servlet.mvc.HttpRequestHandlerAdapter,org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter,org.springframework.web.servlet.resource.DefaultServletHttpRequestHandler#0,org.springframework.web.servlet.handler.SimpleUrlHandlerMapping#0,org.springframework.web.servlet.view.InternalResourceViewResolver#0,org.springframework.context.annotation.ConfigurationClassPostProcessor.importAwareProcessor]; root of factory hierarchy 2014-3-23 0:22:05 org.springframework.beans.factory.support.DefaultSingletonBeanRegistry destroySingletons 信息: Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@37af78ce: defining beans [loginRepository,loginService,registerRepository,registerService,errorController,loginController,registerController,verifyCodeController,org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,mvcContentNegotiationManager,org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping#0,org.springframework.format.support.FormattingConversionServiceFactoryBean#0,org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter#0,org.springframework.web.servlet.handler.MappedInterceptor#0,org.springframework.web.servlet.mvc.method.annotation.ExceptionHandlerExceptionResolver#0,org.springframework.web.servlet.mvc.annotation.ResponseStatusExceptionResolver#0,org.springframework.web.servlet.mvc.support.DefaultHandlerExceptionResolver#0,org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping,org.springframework.web.servlet.mvc.HttpRequestHandlerAdapter,org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter,org.springframework.web.servlet.resource.DefaultServletHttpRequestHandler#0,org.springframework.web.servlet.handler.SimpleUrlHandlerMapping#0,org.springframework.web.servlet.view.InternalResourceViewResolver#0,org.springframework.context.annotation.ConfigurationClassPostProcessor.importAwareProcessor]; root of factory hierarchy 2014-3-23 0:22:05 org.springframework.web.servlet.FrameworkServlet initServletBean 严重: Context initialization failed org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [com.login.repositories.LoginRepository] for bean with name 'loginRepository' defined in file [E:\xiito.com\passport.com\target\passport.com\WEB-INF\classes\com\Login\repositories\LoginRepository.class]; nested exception is java.lang.ClassNotFoundException: com.login.repositories.LoginRepository at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1263) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType(AbstractAutowireCapableBeanFactory.java:581) at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:1332) at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:898) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:588) at org.springframework.context.support.AbstractApplicationContext.finishB
新手关于移动开发 windows下Objective-C环境 和 SailfishOS的一些问题
0.最近开始研究移动开发,最先是从IOS开始,因为本人是个应届生,所以用Mac是承受不起的 1.在谷歌搜索了下,于是在win7上安装了gnustep-msys-system和gnustep-core和gnustep-core,可以 在shell中进行Obj-C编程; 2.在搜索资料过程中,看到了SailfishOS,于是去研究了下,安装了SailfishOSSDK-Alpha-1312-Qt5-windows-offine.exe和VirtualBox,在虚拟机模拟器中成功运行了首个SailfishOS程序;这里我想问一下QtCreator和SailfishOS的关系,是不是Jolla把SailfishOS绑定到QtCreator上了,利用Qt作为IDE工具? 3.因为GNU的shell中用vim写代码不舒服,所以我用Notepad++写完代码在shell中编译,然后在doc中运行(因为得写个make,编译完了运行还得cd项目目录,然后运行,所以我直接把.exe拖放到doc中运行),于是我找资料发现了个IDE---Codeblocks,在Codeblocks中集成了Objective-C开发环境([CSDN移动问答][1])。在Qt的可绑定语言中我没有看到Objective-C,请问QtCreator能不能集成Objective-C的开发环境(因为我感觉QtCreator比Codeblocks的UI让我舒服很多,就像VS2010比VS6.0的UI,不要吐槽 0.0) 4.请大神提出一些移动开发学习的指导意见,谢谢。 [1]: http://blog.csdn.net/hjj1006340261/article/details/11488327
最小费用流的问题,数据结构讨论下怎么实现最小费用的算法,采用C编程的办法
Problem Description 在地球上的一个鲜为人知的角落,住着这样一群人.他们整日与算法为伴,以研究出高效的算法为荣.就连竞选村长都是以Word Final的标准进行的.这里的算法风气之浓厚,就连当地的动物们都受到了极大的影响.旺财是村长--TCL(相当于世界冠军的水平)的爱犬,从小就受到村长一家的熏陶,当别的小动物都还在算A+B的的时候,旺财已经学会"迪杰斯特拉"和"贝尔曼-佛德"了,因此他一直是当地的小动物们崇拜的对象,它们眼中的最有希望进Animal Kingdom World Final的明日之星,就连村里面耕地的老牛们见了他都要叫声"大牛好~". 可是,旺财也有他的苦衷.TCL对待他实在是太好了,每天都请医疗专家周海角为旺财开出许多的保健药品(据说TCL那么牛就是因为从小吃周海角开的药).周海角作为一名医疗专家,有着数十年的江湖行医经验,他的药方不是一般人能开得出来的.他每次都会开出两张药方,第一张药方上写有N1种药品(每种药的编号分别为1,2,3……,N1),第二张药方上写有N2种药品(编号分别为N1+1,N1+2,N1+3……,N1+N2),之所以要这样,是因为第一张药方上的药只有村北的药店里才有,而第二张药方上的药只有村南的药店里才有,并且,药方上还明确指出哪些药必须在哪些药服用之后才能服用,否则会有脑残的危险!还需要一提的药是不能打包带回去,只能在相应的药店里在专家指导下当场服用,安全第一嘛。旺财还面临的一个问题是:村北和村南的药店相隔甚远,而且两地之间还有一个规定凡是4条腿或4个轮子的东西经过都要交钱的收费站,作为一条精通算法的小狗,旺财始终把"提高效率减小耗费"作为自己的座右铭.他在想要怎样吃药才能使跑远路的次数最少,这样过路费也会最小.从村南到村北或从村北到村南算一次跑远路,到最后吃完药跑回家,也算一次哦. Input 有多组输入数据.每组数组的第一行有三个整数N1, N2, M. 接下来有M行数组,每行有两个整数 a, b, 分别表示在吃第a种药之前,需要先吃第b种药. 最后一组数据后,会有三个0表示输入结束。所有的数据中, 1<=N1,N2<=60000, 0<=M<=120000, 1<=a,b<=N1+N2. Output 每组数据输出一个整数,表示旺财把药房上的药吃完所需的跑远路的次数. Sample Input 5 3 3 1 2 5 1 3 2 0 0 0 Sample Output 3
spring 配置dubbo报错 求大神指导
Multiple annotations found at this line: - cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'dubbo:module'. - schema_reference.4: Failed to read schema document 'http://code.alibabatech.com/schema/dubbo/dubbo.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>.
Java学习的正确打开方式
在博主认为,对于入门级学习java的最佳学习方法莫过于视频+博客+书籍+总结,前三者博主将淋漓尽致地挥毫于这篇博客文章中,至于总结在于个人,实际上越到后面你会发现学习的最好方式就是阅读参考官方文档其次就是国内的书籍,博客次之,这又是一个层次了,这里暂时不提后面再谈。博主将为各位入门java保驾护航,各位只管冲鸭!!!上天是公平的,只要不辜负时间,时间自然不会辜负你。 何谓学习?博主所理解的学习,它是一个过程,是一个不断累积、不断沉淀、不断总结、善于传达自己的个人见解以及乐于分享的过程。
程序员必须掌握的核心算法有哪些?
由于我之前一直强调数据结构以及算法学习的重要性,所以就有一些读者经常问我,数据结构与算法应该要学习到哪个程度呢?,说实话,这个问题我不知道要怎么回答你,主要取决于你想学习到哪些程度,不过针对这个问题,我稍微总结一下我学过的算法知识点,以及我觉得值得学习的算法。这些算法与数据结构的学习大多数是零散的,并没有一本把他们全部覆盖的书籍。下面是我觉得值得学习的一些算法以及数据结构,当然,我也会整理一些看过
大学四年自学走来,这些私藏的实用工具/学习网站我贡献出来了
大学四年,看课本是不可能一直看课本的了,对于学习,特别是自学,善于搜索网上的一些资源来辅助,还是非常有必要的,下面我就把这几年私藏的各种资源,网站贡献出来给你们。主要有:电子书搜索、实用工具、在线视频学习网站、非视频学习网站、软件下载、面试/求职必备网站。 注意:文中提到的所有资源,文末我都给你整理好了,你们只管拿去,如果觉得不错,转发、分享就是最大的支持了。 一、电子书搜索 对于大部分程序员...
linux系列之常用运维命令整理笔录
本博客记录工作中需要的linux运维命令,大学时候开始接触linux,会一些基本操作,可是都没有整理起来,加上是做开发,不做运维,有些命令忘记了,所以现在整理成博客,当然vi,文件操作等就不介绍了,慢慢积累一些其它拓展的命令,博客不定时更新 free -m 其中:m表示兆,也可以用g,注意都要小写 Men:表示物理内存统计 total:表示物理内存总数(total=used+free) use...
比特币原理详解
一、什么是比特币 比特币是一种电子货币,是一种基于密码学的货币,在2008年11月1日由中本聪发表比特币白皮书,文中提出了一种去中心化的电子记账系统,我们平时的电子现金是银行来记账,因为银行的背后是国家信用。去中心化电子记账系统是参与者共同记账。比特币可以防止主权危机、信用风险。其好处不多做赘述,这一层面介绍的文章很多,本文主要从更深层的技术原理角度进行介绍。 二、问题引入 假设现有4个人...
程序员接私活怎样防止做完了不给钱?
首先跟大家说明一点,我们做 IT 类的外包开发,是非标品开发,所以很有可能在开发过程中会有这样那样的需求修改,而这种需求修改很容易造成扯皮,进而影响到费用支付,甚至出现做完了项目收不到钱的情况。 那么,怎么保证自己的薪酬安全呢? 我们在开工前,一定要做好一些证据方面的准备(也就是“讨薪”的理论依据),这其中最重要的就是需求文档和验收标准。一定要让需求方提供这两个文档资料作为开发的基础。之后开发...
网页实现一个简单的音乐播放器(大佬别看。(⊙﹏⊙))
今天闲着无事,就想写点东西。然后听了下歌,就打算写个播放器。 于是乎用h5 audio的加上js简单的播放器完工了。 演示地点演示 html代码如下` music 这个年纪 七月的风 音乐 ` 然后就是css`*{ margin: 0; padding: 0; text-decoration: none; list-...
Python十大装B语法
Python 是一种代表简单思想的语言,其语法相对简单,很容易上手。不过,如果就此小视 Python 语法的精妙和深邃,那就大错特错了。本文精心筛选了最能展现 Python 语法之精妙的十个知识点,并附上详细的实例代码。如能在实战中融会贯通、灵活使用,必将使代码更为精炼、高效,同时也会极大提升代码B格,使之看上去更老练,读起来更优雅。
数据库优化 - SQL优化
以实际SQL入手,带你一步一步走上SQL优化之路!
通俗易懂地给女朋友讲:线程池的内部原理
餐盘在灯光的照耀下格外晶莹洁白,女朋友拿起红酒杯轻轻地抿了一小口,对我说:“经常听你说线程池,到底线程池到底是个什么原理?”
经典算法(5)杨辉三角
杨辉三角 是经典算法,这篇博客对它的算法思想进行了讲解,并有完整的代码实现。
使用 Docker 部署 Spring Boot 项目
Docker 技术发展为微服务落地提供了更加便利的环境,使用 Docker 部署 Spring Boot 其实非常简单,这篇文章我们就来简单学习下。首先构建一个简单的 S...
英特尔不为人知的 B 面
从 PC 时代至今,众人只知在 CPU、GPU、XPU、制程、工艺等战场中,英特尔在与同行硬件芯片制造商们的竞争中杀出重围,且在不断的成长进化中,成为全球知名的半导体公司。殊不知,在「刚硬」的背后,英特尔「柔性」的软件早已经做到了全方位的支持与支撑,并持续发挥独特的生态价值,推动产业合作共赢。 而对于这一不知人知的 B 面,很多人将其称之为英特尔隐形的翅膀,虽低调,但是影响力却不容小觑。 那么,在...
面试官:你连RESTful都不知道我怎么敢要你?
干货,2019 RESTful最贱实践
刷了几千道算法题,这些我私藏的刷题网站都在这里了!
遥想当年,机缘巧合入了 ACM 的坑,周边巨擘林立,从此过上了"天天被虐似死狗"的生活… 然而我是谁,我可是死狗中的战斗鸡,智力不够那刷题来凑,开始了夜以继日哼哧哼哧刷题的日子,从此"读题与提交齐飞, AC 与 WA 一色 ",我惊喜的发现被题虐既刺激又有快感,那一刻我泪流满面。这么好的事儿作为一个正直的人绝不能自己独享,经过激烈的颅内斗争,我决定把我私藏的十几个 T 的,阿不,十几个刷题网...
白话阿里巴巴Java开发手册高级篇
不久前,阿里巴巴发布了《阿里巴巴Java开发手册》,总结了阿里巴巴内部实际项目开发过程中开发人员应该遵守的研发流程规范,这些流程规范在一定程度上能够保证最终的项目交付质量,通过在时间中总结模式,并推广给广大开发人员,来避免研发人员在实践中容易犯的错误,确保最终在大规模协作的项目中达成既定目标。 无独有偶,笔者去年在公司里负责升级和制定研发流程、设计模板、设计标准、代码标准等规范,并在实际工作中进行...
SQL-小白最佳入门sql查询一
不要偷偷的查询我的个人资料,即使你再喜欢我,也不要这样,真的不好;
redis分布式锁,面试官请随便问,我都会
文章有点长并且绕,先来个图片缓冲下! 前言 现在的业务场景越来越复杂,使用的架构也就越来越复杂,分布式、高并发已经是业务要求的常态。像腾讯系的不少服务,还有CDN优化、异地多备份等处理。 说到分布式,就必然涉及到分布式锁的概念,如何保证不同机器不同线程的分布式锁同步呢? 实现要点 互斥性,同一时刻,智能有一个客户端持有锁。 防止死锁发生,如果持有锁的客户端崩溃没有主动释放锁,也要保证锁可以正常释...
项目中的if else太多了,该怎么重构?
介绍 最近跟着公司的大佬开发了一款IM系统,类似QQ和微信哈,就是聊天软件。我们有一部分业务逻辑是这样的 if (msgType = "文本") { // dosomething } else if(msgType = "图片") { // doshomething } else if(msgType = "视频") { // doshomething } else { // doshom...
Nginx 原理和架构
Nginx 是一个免费的,开源的,高性能的 HTTP 服务器和反向代理,以及 IMAP / POP3 代理服务器。Nginx 以其高性能,稳定性,丰富的功能,简单的配置和低资源消耗而闻名。 Nginx 的整体架构 Nginx 里有一个 master 进程和多个 worker 进程。master 进程并不处理网络请求,主要负责调度工作进程:加载配置、启动工作进程及非停升级。worker 进程负责处...
“狗屁不通文章生成器”登顶GitHub热榜,分分钟写出万字形式主义大作
一、垃圾文字生成器介绍 最近在浏览GitHub的时候,发现了这样一个骨骼清奇的雷人项目,而且热度还特别高。 项目中文名:狗屁不通文章生成器 项目英文名:BullshitGenerator 根据作者的介绍,他是偶尔需要一些中文文字用于GUI开发时测试文本渲染,因此开发了这个废话生成器。但由于生成的废话实在是太过富于哲理,所以最近已经被小伙伴们给玩坏了。 他的文风可能是这样的: 你发现,...
程序员:我终于知道post和get的区别
是一个老生常谈的话题,然而随着不断的学习,对于以前的认识有很多误区,所以还是需要不断地总结的,学而时习之,不亦说乎
《程序人生》系列-这个程序员只用了20行代码就拿了冠军
你知道的越多,你不知道的越多 点赞再看,养成习惯GitHub上已经开源https://github.com/JavaFamily,有一线大厂面试点脑图,欢迎Star和完善 前言 这一期不算《吊打面试官》系列的,所有没前言我直接开始。 絮叨 本来应该是没有这期的,看过我上期的小伙伴应该是知道的嘛,双十一比较忙嘛,要值班又要去帮忙拍摄年会的视频素材,还得搞个程序员一天的Vlog,还要写BU...
加快推动区块链技术和产业创新发展,2019可信区块链峰会在京召开
11月8日,由中国信息通信研究院、中国通信标准化协会、中国互联网协会、可信区块链推进计划联合主办,科技行者协办的2019可信区块链峰会将在北京悠唐皇冠假日酒店开幕。   区块链技术被认为是继蒸汽机、电力、互联网之后,下一代颠覆性的核心技术。如果说蒸汽机释放了人类的生产力,电力解决了人类基本的生活需求,互联网彻底改变了信息传递的方式,区块链作为构造信任的技术有重要的价值。   1...
Java世界最常用的工具类库
Apache Commons Apache Commons有很多子项目 Google Guava 参考博客
程序员把地府后台管理系统做出来了,还有3.0版本!12月7号最新消息:已在开发中有github地址
第一幕:缘起 听说阎王爷要做个生死簿后台管理系统,我们派去了一个程序员…… 996程序员做的梦: 第一场:团队招募 为了应对地府管理危机,阎王打算找“人”开发一套地府后台管理系统,于是就在地府总经办群中发了项目需求。 话说还是中国电信的信号好,地府都是满格,哈哈!!! 经常会有外行朋友问:看某网站做的不错,功能也简单,你帮忙做一下? 而这次,面对这样的需求,这个程序员...
网易云6亿用户音乐推荐算法
网易云音乐是音乐爱好者的集聚地,云音乐推荐系统致力于通过 AI 算法的落地,实现用户千人千面的个性化推荐,为用户带来不一样的听歌体验。 本次分享重点介绍 AI 算法在音乐推荐中的应用实践,以及在算法落地过程中遇到的挑战和解决方案。 将从如下两个部分展开: AI算法在音乐推荐中的应用 音乐场景下的 AI 思考 从 2013 年 4 月正式上线至今,网易云音乐平台持续提供着:乐屏社区、UGC...
【技巧总结】位运算装逼指南
位算法的效率有多快我就不说,不信你可以去用 10 亿个数据模拟一下,今天给大家讲一讲位运算的一些经典例子。不过,最重要的不是看懂了这些例子就好,而是要在以后多去运用位运算这些技巧,当然,采用位运算,也是可以装逼的,不信,你往下看。我会从最简单的讲起,一道比一道难度递增,不过居然是讲技巧,那么也不会太难,相信你分分钟看懂。 判断奇偶数 判断一个数是基于还是偶数,相信很多人都做过,一般的做法的代码如下...
为什么要学数据结构?
一、前言 在可视化化程序设计的今天,借助于集成开发环境可以很快地生成程序,程序设计不再是计算机专业人员的专利。很多人认为,只要掌握几种开发工具就可以成为编程高手,其实,这是一种误解。要想成为一个专业的开发人员,至少需要以下三个条件: 1) 能够熟练地选择和设计各种数据结构和算法 2) 至少要能够熟练地掌握一门程序设计语言 3) 熟知所涉及的相关应用领域的知识 其中,后两个条件比较容易实现,而第一个...
Android 9.0 init 启动流程
阅读五分钟,每日十点,和您一起终身学习,这里是程序员Android本篇文章主要介绍Android开发中的部分知识点,通过阅读本篇文章,您将收获以下内容:一、启动流程概述一、 启动流程概述Android启动流程跟Linux启动类似,大致分为如下五个阶段。1.开机上电,加载固化的ROM。2.加载BootLoader,拉起Android OS。3.加载Uboot,初始外设,引导Kernel启动等。...
相关热词 c# 二进制截断字符串 c#实现窗体设计器 c#检测是否为微信 c# plc s1200 c#里氏转换原则 c# 主界面 c# do loop c#存为组套 模板 c# 停掉协程 c# rgb 读取图片
立即提问