maven分模块的好处,请简单说明。谢谢啦,谢谢啦,谢谢啦

maven分模块的好处,请简单说明。谢谢啦,谢谢啦,谢谢啦,谢谢啦

11个回答

1.方便重用,当我们再开发一条teacher线的时候,我们只需要引用itoo-base,itoo-exam-api,这些包都是复用的,称为我们平台复用的基础类库,供所有的项目使用。这是模块化最重要的一个目的。
2.灵活性。比如我们这些公共的jar包,itoo-base,itoo-tool,itoo-exam-api等这些jar包,我们不需要再当源码,只需要deploy到nexus,其他人从nexus下载即可。代码的可维护性、可扩展性好,并且保证了项目独立性与完整性。

模块可重用,模块依赖据用传递作用

每个模块都可以作为单独的服务来发布

sinat_34344123
lvgo 回复StackTc: 分布式
大约一年之前 回复
d007letian
007Detective 回复StackTc: 单独发布的话,就有点像微服务了,轻量级的服务,可以为别的服务提供服务而不依赖于别的服务;可维护性和可扩展性也就变好了
大约一年之前 回复
StackTc
StackTc 单独发布的好处呢
大约一年之前 回复

简单给你举例, A , B 两个都是独立的项目,假如 A 要调用 B 中的 方法 或者是数据 就需要使用 连接访问的方式进行调用 ,这之间会现延迟问题。
如果这时候出现个C 可以将 A 和 B 整合起来 将A 与 B 共通的东西 提取出 让两个 项目 进行引用 ,这样当需要深化出第三个项目时 公共的东西就
不需要再次书写 而只是引用 ,这就是最原始的继承理念

模块划分
为了防止传递依赖,我们各个模块之间尽量用直接依赖的方式。本篇文章介绍多模块化开发,我们做过Maven项目的都知道,我们的项目一般都是分模块的,每个模块都会对应着一个POM.xml文件,它们之间通过继承和聚合(也称多模块,multi-module)相互关联

每个模块独立部署,可扩展性,维护性高!

代码解耦,并且每个模块独立部署。

代码管理方便、后续或扩展方便

每个模块独立部署,可扩展性

使代码工程的组织结构更加清晰,模块的分层,每个模块的代码可以进行高内聚,独立部署,并且模块之间的依赖关系更加明确,整个工程各层各模块之间实现松耦合。

共11条数据 1 尾页
Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
谢谢啦~!!
java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriverrn at java.net.URLClassLoader$1.run(URLClassLoader.java:200)rn at java.security.AccessController.doPrivileged(Native Method)rn at java.net.URLClassLoader.findClass(URLClassLoader.java:188)rn at java.lang.ClassLoader.loadClass(ClassLoader.java:306)rn at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)rn at java.lang.ClassLoader.loadClass(ClassLoader.java:251)rn at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)rn at java.lang.Class.forName0(Native Method)rn at java.lang.Class.forName(Class.java:164)rn at TestJdbc.main(TestJdbc.java:10)rnjava.lang.NullPointerExceptionrn at TestJdbc.main(TestJdbc.java:26)rn
谢谢啦
function CheckAll(form) rn rn for (var i=0;i
散分啦,谢谢!!
散分啦,谢谢!!
散分啦,谢谢
散分啦,谢谢
请帮帮忙,谢谢啦
[code=C/C++]rnrnrnrn#includernusing namespace std;rnint main()rnrn const int i = 21;rn const int ii = 3;rn int a[i],b[ii];rn for(int i=0;i<5;i++)rn rn a[i] = b[ii];//什么效果阿.我快哭了rn std::cout<
我是新手啦,问题简单啦!谢谢答复啦~~~~~
运行c++ builder 程序是不是也需要几个固定的运行文件?rnrn我找到了vcl50.bpl,但是没有找到cc3250mt.dll,请问哪里有?还有这样类似的文件吗?
简单的单链表问题,谢谢啦
#includern#includernrnstruct nodernrn int data;rn struct node *next;rn;rnstruct node *creatlist(int a[])rnrn struct node *h,*p,*q;rn int i;rn h=NULL;rn for(i=0;i<6;i++)rn rn q=(struct node*)malloc(sizeof(struct node));rn q->data=a[i];rn q->next=NULL;rn if(h==NULL) h=p=q;rn else rn rn p->next=q;rn p=q;rn rn rn return h;rnrnvoid outlist(struct node *h)rnrn struct node *p;rn p=h;rn if(p==NULL)rn printf("The list is NULL\n");rn elsern rn printf("head");rn dorn rn printf("->%d",p->data);rn p=p->next;rn rn while(p!=NULL);rn printf("->end\n");rn rnrnvoid main()rnrn struct node *head;rn int a[6]=2,4,10,7,5,9;rn head=creatlist(a);rn printf("\nThe original list :\n");rn outlist(head);rnrn我想问一下,在函数struct node *creatlist(int a[])中,为什么要把h赋值NULL,rn还有就是在函数void outlist(struct node *h),为什么要写rnif(p==NULL)rnprintf("The list is NULL\n");rn链表不是已经生成了吗,写这个有什么作用,谢谢了rnrnrn
请高手指点,谢谢啦
我有个WORD文档,我想下载到本地再查看,所以需一个下载函数,请大家帮帮我.谢谢
请教个问题~谢谢啦!
SSH2中配合注解的方式如何上传文件?rnrnpackage chinaas.member.action.userPhoto;rnrnimport java.io.File;rnimport java.io.FileInputStream;rnimport java.io.FileOutputStream;rnimport java.io.InputStream;rnimport java.io.OutputStream;rnimport java.util.List;rnrnimport javax.annotation.Resource;rnrnimport org.apache.struts2.ServletActionContext;rnimport org.apache.struts2.convention.annotation.Action;rnimport org.apache.struts2.convention.annotation.InterceptorRef;rnimport org.apache.struts2.convention.annotation.Namespace;rnimport org.apache.struts2.convention.annotation.ParentPackage;rnimport org.apache.struts2.convention.annotation.Result;rnimport org.apache.struts2.convention.annotation.Results;rnimport org.springframework.stereotype.Controller;rnrnimport chinaas.member.action.BaseAction;rnimport chinaas.member.entity.Photo;rnimport chinaas.member.service.userPhoto.UserPhotoService;rnrn@Controllerrn@Namespace("/")rn@ParentPackage(value = "struts-default")rn@Results(@Result(name = "fail", location = "/failed.jsp"))rn//@InterceptorRefs( @InterceptorRef(value = "fileUploadStack"),@InterceptorRef(value="defaultStack"))rnpublic class UserPhotoAction extends BaseAction rnrn rn // 用户管理Servicern @Resource(name = "userPhotoServiceImpl")rn private UserPhotoService userPhotoService;rnrn // 上传文件rn @SuppressWarnings("static-access")rn rn @Action(value = "/upload", results = @Result(name = SUCCESS, location = "/success.jsp") ,interceptorRefs=@InterceptorRef(value="fileUploadStack"))rn public String uploadPhoto() throws Exception rn System.out.println("upload");rn //User u = (User) this.s2Util.getSession().getAttribute("user");rn System.out.println(">>>>>>>>>>>>>>>>>>"+ServletActionContext.getRequest().getRealPath("/upload"));rn System.out.println("tmpFile>>>>>>>"+file);rn for(int i=0;i0)rn os.write(buffer, 0, length);rn rn /*Photo p = new Photo();rn p.setAddTime(UtilTools.getDate());rn p.setUploaderId(1);rn p.setPhotoName((this.getTmpFileFileName().get(i)));rn p.setDescribes(po.getDescribes());rn userPhotoService.addPhoto(p);*/rn is.close();rn os.close();rn rnrn msg="用户上传图片成功!";rn return SUCCESS;rn rn rn rn private String msg;rn private Photo po;rn private List file;//用户上传的文件rn private List fileFileName;//后缀是固定的,struts2自动将值填充rn private List fileContentType;rn public Photo getPo() rn return po;rn rn public List getFile() rn return file;rn rn public void setFile(List file) rn this.file = file;rn rn public List getFileFileName() rn return fileFileName;rn rn public void setFileFileName(List fileFileName) rn this.fileFileName = fileFileName;rn rn public List getFileContentType() rn return fileContentType;rn rn public void setFileContentType(List fileContentType) rn this.fileContentType = fileContentType;rn rn public void setPo(Photo po) rn this.po = po;rn rn public String getMsg() rn return msg;rn rn public void setMsg(String msg) rn this.msg = msg;rn rn rnrn结果包空指针~~~~rnjava.lang.NullPointerExceptionrn chinaas.member.action.userPhoto.UserPhotoAction.uploadPhoto(UserPhotoAction.java:46)rn sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)rn sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)rn java.lang.reflect.Method.invoke(Method.java:597)rn com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:440)rn com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:279)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:242)rn com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:122)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)rn com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:195)rn com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)rn com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:195)rn com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)rn org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:93)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)rn com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:138)rn com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)rn org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)rn com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:176)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)rn org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:306)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)rn org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:52)rn org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:468)rn org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)rn org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:76)rnrnrn
请高手帮忙,谢谢啦
一个jsp注册的程序,用Servlet提交注册,可是一直出现以下错误,这是怎么回事啊,请大家帮帮忙rndescription The server encountered an internal error () that prevented it from fulfilling this request.rnrnexception rnrnjavax.servlet.ServletException: Error allocating a servlet instancern org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)rn org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)rn org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:875)rn org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)rn org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)rn org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)rn org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)rn java.lang.Thread.run(Thread.java:595)rnrnrnroot cause rnrnjava.lang.NoClassDefFoundError: ch24/Servlet/RegProcessServlet (wrong name: RegProcessServlet)rn java.lang.ClassLoader.defineClass1(Native Method)rn java.lang.ClassLoader.defineClass(ClassLoader.java:620)rn java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)rn org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1876)rn org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:889)rn org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1353)rn org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1232)rn org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)rn org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)rn org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:875)rn org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)rn org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)rn org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)rn org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)rn java.lang.Thread.run(Thread.java:595)rnrnrnnote The full stack trace of the root cause is available in the Apache Tomcat/5.5.27 logs.rn
请大神不吝赐教,谢谢啦!!
哪位前辈能帮我看看下面的程序,基于UDP协议的套接字C/S编程,只在同一台计算机上实现,服务器端和客户端均能正常run,但是相互发送数据时却报错,错误代码如下:send data failed!10047,而我在MSDN上查得原因为WSAEAFNOSUPPORT——Addresses in the specified family cannot be used with this socket. 也就是说发送的地址不对,我应该怎么设服务器端和客户区端地址啊,还有端口号,请大侠不吝赐教啊,很想搞懂这类编程,谢谢!(注意C/S只在同一台计算机上运行.另外本机的IP地址为:192.168.1.103)rnrn[code=C/C++]//服务器端程序rn#includern#includern#includernrnvoid main()rnrn WORD wVersionRequested;rn WSADATA wsaData;rn int err;rn SOCKET sockSrv;rn int sendBytes;rn rn wVersionRequested = MAKEWORD( 1, 1 );rn rn err = WSAStartup( wVersionRequested, &wsaData );rn if ( err != 0 )rn rn printf("start up the winsock failed!\n");rn return;rn rn if ( LOBYTE( wsaData.wVersion ) != 1 ||rn HIBYTE( wsaData.wVersion ) != 1 )rn rn WSACleanup( );rn return; rn rnrn printf("start up the winsock succeed!\n");rn //创建socketrn printf("create the scoket!\n");rn sockSrv=socket(AF_INET,SOCK_DGRAM,0);rn if(sockSrv==INVALID_SOCKET)rn rn printf("create socket succeed!\n");rn WSACleanup( );rn return;rn rn printf("create socket succeed!\n");rnrn //地址信息rn SOCKADDR_IN addrSrv;rn [color=#FF0000]addrSrv.sin_addr.S_un.S_addr=htonl(INADDR_ANY); rn addrSrv.sin_family=AF_INET;rn addrSrv.sin_port=htons(6000);[/color] rn //绑定rn printf("bind the addr with the socket!\n");rn if(bind(sockSrv,(SOCKADDR*)&addrSrv,sizeof(SOCKADDR)))rn rn printf("bind failed!\n");rn WSACleanup( );rn closesocket(sockSrv);rn return;rn rn printf("bind succeed!\n");rnrn char recvBuf[100];rn char sendBuf[100];rn char tempBuf[100];rnrn SOCKADDR_IN addrClt;rn int len=sizeof(SOCKADDR);rnrn memset(recvBuf,0,sizeof(recvBuf));rn memset(tempBuf,0,sizeof(tempBuf));rn memset(sendBuf,0,sizeof(sendBuf));rn do rn rn printf("Please input data:\n");rn gets(sendBuf);rn sendBytes=sendto(sockSrv,sendBuf,strlen(sendBuf)+1,0,(SOCKADDR*)&addrClt,len);rn if(sendBytes==SOCKET_ERROR)rn rn printf("send data failed!%d\n",WSAGetLastError());rn WSACleanup( );rn closesocket(sockSrv);rn exit(1);rn rn printf("send data succeed!\n");rnrn recvfrom(sockSrv,recvBuf,100,0,(SOCKADDR*)&addrClt,&len);rn if('q'==recvBuf[0])rn rn sendto(sockSrv,"q",strlen("q")+1,0,(SOCKADDR*)&addrClt,len);rn printf("Chat end!\n");rn break;rn rn sprintf(tempBuf,"%s says: %s",inet_ntoa(addrSrv.sin_addr),recvBuf);rn printf("%s\n",tempBuf);rn while(1);rn closesocket(sockSrv);rn WSACleanup();rnrnrn//客户端程序rn#includern#includern#includernrnvoid main()rnrn WORD wVersionRequested;rn WSADATA wsaData;rn int err;rn int sendBytes,recvBytes;rn SOCKET sockClt;rn //启动winsock库rn printf("start up the winsock!\n");rn wVersionRequested = MAKEWORD( 1, 1 );rn err = WSAStartup( wVersionRequested, &wsaData );rn if ( err != 0 )rn rn return;rn rn if ( LOBYTE( wsaData.wVersion ) != 1 ||rn HIBYTE( wsaData.wVersion ) != 1 )rn rn WSACleanup( );rn return; rn rnrn //创建客户端套接字rn sockClt=socket(AF_INET,SOCK_DGRAM,0);rn if(sockClt==INVALID_SOCKET)rn rn printf("create cltsocket succeed!\n");rn WSACleanup( );rn return;rn rn printf("create socket succeed!\n");rnrn //地址信息rn SOCKADDR_IN addrClt;rn [color=#FF0000]addrClt.sin_addr.S_un.S_addr=inet_addr("127.0.0.1");rn addrClt.sin_family=AF_INET;rn addrClt.sin_port=htons(4000);[/color] rn char recvBuf[100];rn char sendBuf[100];rnrn SOCKADDR_IN addrSrv;rn int len=sizeof(SOCKADDR);rnrn memset(recvBuf,0,sizeof(recvBuf));rn memset(sendBuf,0,sizeof(sendBuf));rn dorn rn gets(sendBuf); //输入数据rn sendBytes=sendto(sockClt,sendBuf,strlen(sendBuf)+1,0,(SOCKADDR*)&addrSrv,len);rn if(sendBytes==SOCKET_ERROR)rn rn printf("send data to server failed! %d\n",WSAGetLastError());rn closesocket(sockClt);rn WSACleanup();rn exit(1);rn rn printf("send data succeed!\n");rnrn recvBytes=recvfrom(sockClt,recvBuf,100,0,(SOCKADDR*)&addrSrv,&len);rn if(recvBytes==SOCKET_ERROR)rn rn printf("recv data from client failed!\n");rn closesocket(sockClt);rn WSACleanup();rn exit(1);rn rn if(recvBytes)rn rn printf(recvBuf);rn printf("\n");rn printf("chat end!\n");rn rn while(1);rn closesocket(sockClt);rn WSACleanup();rn[/code]
请高手指点,谢谢啦!
此代码的意图是要实现元素的生成与删除某个元素,此代码也通过了连接和编译,在却完成不了删除的功能,请高手指点,谢谢!rnrn#includernclass tongxunlurnrnpublic:rn char name[20],address[20];rn tongxunlu *next;rn;rntongxunlu *shuru()rnrn int a=1;rn tongxunlu *s; rn s=new tongxunlu;rn tongxunlu *first=s;rn while(a==1)rn rn cout<<"name:"<>(*s).name;rn cout<<"address"<>(*s).address;rn cout<<"如果想继续请输入1,否则输入0:"<>a;rn if(a==1)rn (*s).next=new tongxunlu;rn rn (*s).next=NULL;rn return first;rnrnvoid shanchu(int k)//删除第K项rnrn tongxunlu *p,*q;rn p=shuru();rn if(k==1)rn rn q=p;rn p=(*p).next;rn delete q;rn return;rn rn for(int i=1;i>b;rn if(b==1)rn rn int c;rn cout<<"删第几个?"<>c;rn shanchu(c);rn return 0;rn rn else rn return 0;rnrn
请教个小问题,谢谢啦
自己做程序时候遇到一个小问题,进行不下去了,拜托大家帮帮忙~谢谢啦rnrn问题是:自己做的程序 如何在网页中调用rnrn比如说 像QQ或者淘宝旺旺那样 点击之后调用本机的QQ和旺旺的客户端。rnrn上网查了一下网页嵌入播放器的代码如下rnrnrnrnrnrn重点在于 编写自己的客户端的时候 如何提供出来 classid的值,和如何接收到 参数 filenamernrn编写客户端的环境是VC++6.0rnrn写的有些乱,谢谢大家了~rn
几个问题,谢谢啦
sqlserver 的补丁在哪下载?rn如何查看当前SQLSERVER的版本?
问题啦~谢谢!
1。哪里有stl泛型的类库什么的?rn譬如:rnrnrnrnrn有详细的资料嘛~rn不会又说是MSDN吧~:)rn呵呵~rn2。一些加密的光盘~rn一放入光驱就让你输入密码的那种!rnrn怎么破戒!rnrn我记得哪里说什么软件的~谢谢~rnrnrn
谁能解释一下?谢谢啦!
在网页顶端发现这样一段代码,不懂!谁能解释一下?谢谢啦!rn<%@ Register Assembly="Meta.Web" Namespace="Meta.Web.Controls" TagPrefix="mc" %>rnrn还有下面一段,请解释一下每句的意思!rnArrayList year, month, day,year1;rn SqlConnection cn;rn SqlDataAdapter da;rn SqlCommand cmd,cmd1,cmd2,cmd3,cmd4,cmd5;rn SqlDataReader dr1, dr2, dr,dr3,dr4,dr5;rn string strcon,strsql,strsql1,strsql2,strsql3,strsql4,strsql5,strsql6;
大家帮帮忙!谢谢啦
我想用在pb的代码中创建表、加字段 ,得怎么写啊??rnrnCONNECT USING sqlca;rnsSql="CREATE TABLE [dbo].[zy_mxls] (&rn [lshh] [char] (11) COLLATE Chinese_PRC_CI_AS NOT NULL ,&rn [plh] [int] NOT NULL ,&rn [bm] [char] (10) COLLATE Chinese_PRC_CI_AS NULL ,&rn [huowname] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,&rn [xshy] [char] (20) COLLATE Chinese_PRC_CI_AS NULL ,&rn [spid] [char] (11) COLLATE Chinese_PRC_CI_AS NOT NULL ,&rn [spbh] [char] (11) COLLATE Chinese_PRC_CI_AS NULL ,&rn [spmch] [varchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,&rn [sptm] [char] (15) COLLATE Chinese_PRC_CI_AS NULL ,&rn [shpgg] [varchar] (40) COLLATE Chinese_PRC_CI_AS NULL ,&rn [dw] [varchar] (6) COLLATE Chinese_PRC_CI_AS NULL ,&rn [dj] [decimal](14, 4) NULL "rn .rn .rn .rnrn我找不到方法,不知道要怎么写.......
求解,谢谢啦!
轮转数(每个字符依次向右移)rn例:rn字符串abcd 经过一次轮转后为dabc 此时位移记作1rn字符串abcd 进过两次轮转后为 cdab 此时位移记作2rn以下代码为求字符串S,经过n次位移后的新字符串rnvoid shift(char *s,int n)rnrnchar *p;rnchar *q;rnint len=strlen(s);rnif(len==0) return;rnchar *s2=(char *)malloc(_______); //这里填sizeof(char)*len对吗?rnp=s;rnq=s2+n%len;rnwhile(*p)rnrn *q++=*p++;rn if((q-s2)=len)rn rn *q=_____; //这里要填什么?rn q=s2; rn rnrnstrcpy(s,s2);rnfree(s2);rnrn
rroo来,谢谢啦:)
谢谢~送100,再次谢:)
快来呀,谢谢啦,
那位高手能告诉我,在C++里面的directX在.net里面怎么也找不到,有什么东西和它相当那?我想进行图像处理,谢谢啦
帮忙点下,谢谢啦
帮忙[color=#FF0000][url=http://stat.p.cn/afp/wayl/;as=4d6e0c593b3c4c9d0001;ad=4d6f0f357428f9f50001;ap=0;pu=4ab0b7fed17d993f0001;sid=union_channel_27_16684063672;/?http://union.p.cn/channel/baidu/?u_id=union_channel_27_16684063672 ]点一下[/url][/color],只耽误您几秒钟的时间,但会帮我很大忙,谢谢啦
救命啊!!!!谢谢啦
错误:rnMicrosoft OLE DB Provider for ODBC Drivers 错误 '80040e14' rnrn[Microsoft][ODBC SQL Server Driver][SQL Server]'now' 不是可以识别的 函数名。 rnrn/bbs_bear/index.asp,行286 rnrn代码如下rnfunction todays()rn rn ' tmprs=conn.execute("Select count(announceid) from bbs1 Where year(dateandtime)="&year&" and month(dateandtime)="&month&" and day(dateandtime)="&day&"")rn tmprs=conn.execute("Select count(announceid) from bbs1 Where year(dateandtime)=year(now()) and month(dateandtime)=month(now()) and day(dateandtime)=day(now())")rn todays=tmprs(0)rn set tmprs=nothingrn if isnull(todays) then todays=0rnend function
菜鸟问题,谢谢啦~
我怎么把byte类型转换成char ??rnrn直接用char(xxx); 编译通过,不过运行的时候跳出。rnrn谢谢大家~~
虚心求教,谢谢啦!!!
我用断点按f11,,没两下就出现这个(如图)[img=http://hi.csdn.net/attachment/201202/5/10296601_1328421025VRFd.jpg][/img]rn确定不行,取消就出现下面代码(部分),那这是啥意思啊,rn004039BF mov ecx,dword ptr [ebp-10h]rn004039C2 mov dword ptr fs:[0],ecxrn004039C9 pop edirn004039CA pop esirn004039CB pop ebxrn004039CC mov esp,ebprn004039CE pop ebprn004039CF retrn_amsg_exit:rn004039D0 push ebprn004039D1 mov ebp,esprn004039D3 cmp dword ptr [___error_mode (0042e0c0)],2rn004039DA je _amsg_exit+11h (004039e1)rn004039DC call _FF_MSGBANNER (0040a320)rn004039E1 mov eax,dword ptr [rterrnum]rn004039E4 push eaxrn004039E5 call _NMSG_WRITE (0040a370)rn004039EA add esp,4rn004039ED push 0FFhrn004039F2 call dword ptr [__aexit_rtn (0042ade0)]rn004039F8 add esp,4rn004039FB pop ebprn004039FC retrn--- No source file -------------------------------------------------------------------------------------------rn004039FD int 3rn004039FE int 3rn004039FF int 3rn--- crt0.c ---------------------------------------------------------------------------------------------------rnfast_error_exit:rn00403A00 push ebprn00403A01 mov ebp,esprn00403A03 cmp dword ptr [___error_mode (0042e0c0)],2rn00403A0A je fast_error_exit+11h (00403a11)rn00403A0C call _FF_MSGBANNER (0040a320)rn00403A11 mov eax,dword ptr [rterrnum]rn00403A14 push eaxrn00403A15 call _NMSG_WRITE (0040a370)rn00403A1A add esp,4rn00403A1D push 0FFhrn00403A22 call dword ptr [__imp__ExitProcess@4 (0043015c)]rn00403A28 pop ebprn00403A29 retrn--- No source file -------------------------------------------------------------------------------------------rn00403A2A int 3rn00403A2B int 3rn00403A2C int 3rn00403A2D int 3rn00403A2E int 3rn00403A2F int 3rn
大神再来,谢谢啦。。。。。。。。。。。。
定义学生类Student,从Person类派生n    包含的字段:学号StuID(字符串类型,长度固定,以实际学号的长度为准)、课程成绩CourseScore(集合类型,集合中的元素类型为结构体coursescore,访问修饰符采用private)、学生身份title(类型为枚举类型StuTitle)n    包含的属性:n    课程门数CourseNumber,定义为只读属性,表示学生所选的课程门数n    包含的方法:n    Public void CourseAdd(string coursename, float score);n   Public void CourseAdd(coursescore course);
帮我一下啦,谢谢
开发一些很普通的2D卡通类小游戏,最大可能也不会超出100M吧。rn需要一些怎样的技术呢?不知道微软的vc++2005或vc#2005是否可以开发?
帮帮忙~ 谢谢啦
有关intraweb的ArcIWDlgMessageBox1组件能否给个代码演示?? rnrn类似 if application.messagebox('test','test',mb_yesno)=idyes thenrn beginrnrn end;rn的选择语句????谢谢!!
文件读写问题。谢谢啦!
在某文件中查找某单词,找到就在该行的开头打上“*”号。我下面的程序怎么不行呀:rn//: FindWord.javarnimport java.io.*;rnpublic class FindWord rn public static void main(String[] args) throws java.io.IOException rn long pos = 0;rn long len;rn int i;rn String s;rn RandomAccessFile rafInput = new RandomAccessFile("in.txt","rw");rn s = rafInput.readLine();rn while(s != null) rn //System.out.println(s);rn if (s.regionMatches(0,"see",0,3)) rn len = s.length();rn pos = rafInput.getFilePointer();rn //System.out.println(s+": "+len+",pos:"+pos);rn rafInput.seek(pos - len);rn rafInput.writeChar('*');rn rafInput.seek(pos);rn rn s = rafInput.readLine();rn rn rn///:~rn--------------------------------------------------------------------------rn运行程序前的in.txt 内容:rnrnhellornhappy new yearrngood luckrngtgrnsee urntake carernlolrn--------------------------------------------------------------------------rn运行程序后的 in.txt内容:rnrnhellornhappy new yearrngood luckrngtgrnse *urntake carernlolrn--------------------------------------------------------------------------rn文件寻位不对呀;而且我是想插入一个符号,而不是覆盖呀rns.regionMatches(0,"see",0,3) 可以用吗?为什么我改了个词(new)就查找不到了呢?rnrn谢谢!!!!!!!!rn
运行的问题~谢谢啦
[code=Java]/*rn * AlarmTimerMidlet.javarn *rn * Created on December 18, 2007, 3:23 AMrn */rnrnpackage com.apress.rischpater.alarmtimer;rnrnimport java.io.*;rnimport java.util.*;rnimport java.lang.*;rnimport javax.microedition.io.*;rnimport javax.microedition.midlet.*;rnimport javax.microedition.lcdui.*;rnimport javax.microedition.rms.*;rnrn/**rn *rn * @author Ray Rischpaterrn */rnpublic class AlarmTimerMidlet extends MIDlet implements CommandListener rn rn /**rn * Creates a new instance of AlarmTimerMidletrn */rn public AlarmTimerMidlet() rn rn rn class MyTask extends TimerTask rn private AlarmTimerMidlet owner;rn void setOwner( AlarmTimerMidlet o ) rn owner = o;rn rn public void run() rn owner.alarmFired();rn rn rn rn private Form infoForm;rn private StringItem helloStringItem;rn private Command exitCommand;rn private Alert alarmAlert;rn private long DELAY = 15 * 1000;rn private Timer timer;rn private MyTask task;rn private long whenLaunched = new Date().getTime();rn private String storeName = "AlarmTimerStore";rn private RecordStore store;rnrn /** This method initializes UI of the application. rn */rn private void initialize() rn try rn Date d = new Date();rn long whenToFire = d.getTime() + DELAY;rn store = RecordStore.openRecordStore(storeName, true);rnrn if (store.getNumRecords()>0)rn byte b[] = store.getRecord(1);rn ByteArrayInputStream bais = new ByteArrayInputStream(b);rn DataInputStream dis = new DataInputStream(bais);rn whenToFire = dis.readLong();rn if (whenToFire < whenLaunched) rn getDisplay().setCurrent(get_alarmAlert());rn rn store.deleteRecord(1);rn store.closeRecordStore();rn return;rn rn store.closeRecordStore();rn rn String me = this.getClass().getName();rn PushRegistry.registerAlarm(me, 0); rn timer = new Timer();rn task = new MyTask();rn task.setOwner(this);rn timer.schedule(task, whenToFire - d.getTime() );rn rn getDisplay().setCurrent(get_infoForm());rn rn catch( Exception e) ;rn rn rn /** Called by the system to indicate that a command has been invoked on a particular displayable. rn * @param command the Command that ws invokedrn * @param displayable the Displayable on which the command was invokedrn */rn public void commandAction(Command command, Displayable displayable) rn if (displayable == infoForm) rn if (command == exitCommand) rn exitMIDlet();rn rn rn rn rn private void scheduleMIDlet( ) rn try rn String me = this.getClass().getName();rn Date when = new Date();rn if (when.getTime() < whenLaunched + DELAY) rn PushRegistry.registerAlarm(me, whenLaunched + DELAY);rn rnrn ByteArrayOutputStream baos = new ByteArrayOutputStream();rn DataOutputStream dos = new DataOutputStream( baos );rn dos.writeLong(whenLaunched + DELAY);rn byte b[] = baos.toByteArray();rn store = RecordStore.openRecordStore(storeName, true);rn store.addRecord(b, 0, b.length);rn store.closeRecordStore();rn rn catch (Exception e) rn rn rn private void alarmFired() rn getDisplay().setCurrent(get_alarmAlert(), get_infoForm());rn rn rn /**rn * This method should return an instance of the display.rn */rn public Display getDisplay() rn return Display.getDisplay(this);rn rn rn /**rn * This method should exit the midlet.rn */rn public void exitMIDlet() rn getDisplay().setCurrent(null);rn try rn if ( getDisplay().getCurrent() != get_infoForm() )rn scheduleMIDlet(); rn rn catch(Exception e) ;rn destroyApp(true);rn notifyDestroyed();rn rn rn /** This method returns instance for infoForm component and should be called instead of accessing infoForm field directly. rn * @return Instance for infoForm componentrn */rn public Form get_infoForm() rn if (infoForm == null) rn infoForm = new Form(null, new Item[] get_helloStringItem());rn infoForm.addCommand(get_exitCommand());rn infoForm.setCommandListener(this);rn rn return infoForm;rn rn rn /** This method returns instance for helloStringItem component and should be called instead of accessing helloStringItem field directly.rn * @return Instance for helloStringItem componentrn */rn public StringItem get_helloStringItem() rn if (helloStringItem == null) rn // Insert pre-init code herern helloStringItem = new StringItem("", "An alarm has been set for fifteen seconds from now.");rn // Insert post-init code herern //GEN-BEGIN:MVDGetEnd4rn return helloStringItem;rn //GEN-END:MVDGetEnd4rn rn /** This method returns instance for exitCommand component and should be called instead of accessing exitCommand field directly.rn * @return Instance for exitCommand componentrn */rn public Command get_exitCommand() rn if (exitCommand == null) rn exitCommand = new Command("Exit", Command.EXIT, 1);rn rn return exitCommand;rn rn /** This method returns instance for alarmAlert component and should be called instead of accessing alarmAlert field directly. rn * @return Instance for alarmAlert componentrn */rn public Alert get_alarmAlert() rn if (alarmAlert == null) rn alarmAlert = new Alert(null, "The alarm has fired.\n", null, null);rn alarmAlert.setTimeout(-2);rn rn return alarmAlert;rn rn rn rn public void startApp() rn initialize();rn rn rn public void pauseApp() rn rn rn public void destroyApp(boolean unconditional) rn timer = null;rn task = null;rn rn rnrn[/code]rnrnrn这个是书上的代码,J2ME基础教程上的!rn运行后出现rnRunning with storage root C:\Documents and Settings\db2admin\j2mewtk\2.5.2\appdb\MediaControlSkinrnRunning with locale: Chinese_People's Republic of China.936rnRunning in the identified_third_party security domainrnjava.lang.Error: Unresolved compilation problem: rn The declared package "com.apress.rischpater.alarmtimer" does not match the expected package ""rnrn at AlarmTimerMidlet.(+9)rn at java.lang.Class.runCustomCode(+0)rn at com.sun.midp.midlet.MIDletState.createMIDlet(+34)rn at com.sun.midp.midlet.Scheduler.schedule(+52)rn at com.sun.midp.main.Main.runLocalClass(+28)rn at com.sun.midp.main.Main.main(+80)rnExecution completed.rn3409176 bytecodes executedrn18 thread switchesrn1668 classes in the system (including system classes)rn17709 dynamic objects allocated (531764 bytes)rn2 garbage collections (459376 bytes collected)rnrnrnrn请问怎么解决?rn谢谢了啊?
帮帮忙啦,谢谢
我是一个Java初学者,请问一下用Java怎么样连接SQL Server,知道的请指教,谢谢了
请教~~~~~谢谢啦
有什么好的方法可以快速提高自己的美工水平~现在公司要我一个人做个网站,美工和代码都要我做~rn代码是没问题~美工不好~photoshop还行,其它就惨了~你们都是代码和美工都能独挡一面的吗,快教教我,谢谢啦~
BCB5.0的注册码。谢谢啦
BCB5.0的注册码。谢谢啦
高手再进啦,谢谢!
向数据库里录入大量的数据,在编写数据库插入方法的时候,好象可以通过"?"来替代数据,有人有代码吗???rn发来看看啊,谢谢了
急用,谢谢啦!!
C语言中文件的应用,怎么保存文件才能使文件尾可见的文本文档??能否据一例子、、??rnvoid Store(Message *head)rnrn FILE *fp;rn if((fp=fopen("D://message.text","w"))==NULL)rn rn cout<<"文件打开失败"<next)rn rn fwrite(temp,sizeof(Message),1,fp);rn rn fclose(fp);rnrn为什么上面的保存文件打开时是乱码,请各位高手指教!谢谢!
参数传递的问题,谢谢啦
rn[code=C/C++]rnconst int a =0 ; //const int *another =0rnconst int b= 1 ;rnvoid test_demo(const int * &test)rn //to do rn test =&b;rnrn[/code]rnrn[code=C/C++]rn//1rn test_demo(&a); //error,提示说参数传递中cannot convert parameter 1 from 'const int *' to 'const int *&'rn test_demo(anther);//okrn[/code]rn难道两者不都是 from 'const int *' to 'const int *&' 么,为什么第一个不行呢,谢谢
注册表问题!!!谢谢啦!!!
我想通过注册表找到某一程序的安装路径rn可是,程序可能装在win98/xp/200 下的rn我要对注册表操作的话rn是不是要区分操作系统?rn也就是编程是一样的吗?rn有没有待吗?rn
帮帮忙,谢谢啦。
windows setting->user Rights Assignment->右边的Change the system time中点击Add User or Group...,怎么没有弹出select users of groups,以前是有的,被朋友玩了之后就变成这样,他把我系统哪里给禁用啦,怎么修复啊,帮忙下,谢谢啦。。我的时间现在也改不了,那里面没有我的帐户,希望帮忙下。,谢谢。问他他老说没有啊///
大家帮忙啦 谢谢
数据库中有p_ip的字段记录的是ip地址rn例如:记录的是 218.9.15.11 如何让它在前台显示为218.9.15.*rn最好能给出代码片段 谢谢大家
求助一下,谢谢啦
vector > dpm(X+1,vector(B+1,empty));rn这段语句的完整含义是什么啊
求解决方案,谢谢啦
我想在图片上面打出很多的小格子 rn格子的密度可以控制 rn图片的格式任意rn这个可以用什么实现rn
相关热词 c# xml的遍历循环 c# 取 查看源码没有的 c#解决高并发 委托 c#日期转化为字符串 c# 显示问号 c# 字典对象池 c#5.0 安装程序 c# 分页算法 c# gmail 发邮件 c# 多层文件