JAVA的Collections类中shuffle的用法

就是随机打乱原来的顺序,和洗牌一样。如:

输出结果:

打乱前:
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
第0次打乱:
[6, 3, 2, 0, 8, 1, 7, 5, 4, 9]
第1次打乱:
[6, 2, 3, 0, 8, 5, 7, 4, 9, 1]
第2次打乱:
[1, 7, 9, 4, 6, 0, 2, 5, 3, 8]
第3次打乱:
[0, 4, 2, 8, 9, 1, 3, 7, 5, 6]
第4次打乱:
[8, 1, 3, 0, 7, 9, 4, 2, 5, 6]

 

摘自:http://topic.csdn.net/u/20080308/17/642f73e3-ff7b-4144-a52b-190a72be1e49.html

发布了270 篇原创文章 · 获赞 276 · 访问量 379万+
展开阅读全文

could not execute query是什么原因导致的啊?

05-03

There is no Action mapped for namespace / and action name LoginAction_login. - [unknown location] at com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:177) at org.apache.struts2.impl.StrutsActionProxy.prepare(StrutsActionProxy.java:61) at org.apache.struts2.impl.StrutsActionProxyFactory.createActionProxy(StrutsActionProxyFactory.java:39) at com.opensymphony.xwork2.DefaultActionProxyFactory.createActionProxy(DefaultActionProxyFactory.java:47) at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:458) at org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77) at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:76) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:96) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489) at java.lang.Thread.run(Thread.java:619) Hibernate: select administra0_.id as id0_, administra0_.administrator_id as administ6_0_, administra0_.email as email0_, administra0_.name as name0_, administra0_.password as password0_, administra0_.realname as realname0_ from Administrator administra0_ where 1=1 and ( lower(administra0_.name) like 'admin' ) and administra0_.password='123456' 17:26:22,465 WARN org.hibernate.util.JDBCExceptionReporter:100 - SQL Error: 1054, SQLState: 42S22 17:26:22,466 ERROR org.hibernate.util.JDBCExceptionReporter:101 - Unknown column 'administra0_.administrator_id' in 'field list' 在控制台出现以下语句是什么意思 Hibernate: select administra0_.id as id0_, administra0_.administrator_id as administ6_0_, administra0_.email as email0_, administra0_.name as name0_, administra0_.password as password0_, administra0_.realname as realname0_ from Administrator administra0_ where 1=1 20:48:32,118 WARN org.hibernate.util.JDBCExceptionReporter:100 - SQL Error: 1054, SQLState: 42S22 20:48:32,126 ERROR org.hibernate.util.JDBCExceptionReporter:101 - Unknown column 'administra0_.administrator_id' in 'field list' Hibernate: select administra0_.id as id0_, administra0_.administrator_id as administ6_0_, administra0_.email as email0_, administra0_.name as name0_, administra0_.password as password0_, administra0_.realname as realname0_ from Administrator administra0_ where 1=1 20:48:37,948 WARN org.hibernate.util.JDBCExceptionReporter:100 - SQL Error: 1054, SQLState: 42S22 20:48:37,949 ERROR org.hibernate.util.JDBCExceptionReporter:101 - Unknown column 'administra0_.administrator_id' in 'field list' 问答

tomcat 启动问题,无法打开浏览器访问

08-18

启动信息如下,有很多???是什么原因,浏览器输入localhost:8080无法出现访问页面,求大神告知解决办法 ?? 18, 2015 4:15:54 ?? org.apache.catalina.core.AprLifecycleListener init INFO: Loaded APR based Apache Tomcat Native library 1.1.33 using APR version 1.5.1. ?? 18, 2015 4:15:55 ?? org.apache.catalina.core.AprLifecycleListener init INFO: APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true]. ?? 18, 2015 4:15:55 ?? org.apache.catalina.core.AprLifecycleListener initializeSSL INFO: OpenSSL successfully initialized with version OpenSSL 1.0.1m 19 Mar 2015 ?? 18, 2015 4:15:56 ?? org.apache.coyote.http11.Http11AprProtocol init INFO: Initializing Coyote HTTP/1.1 on http-8080 ?? 18, 2015 4:15:56 ?? org.apache.coyote.ajp.AjpAprProtocol init INFO: Initializing Coyote AJP/1.3 on ajp-8009 ?? 18, 2015 4:15:56 ?? org.apache.catalina.startup.Catalina load INFO: Initialization processed in 1403 ms ?? 18, 2015 4:15:56 ?? org.apache.catalina.core.StandardService start INFO: Starting service Catalina ?? 18, 2015 4:15:56 ?? org.apache.catalina.core.StandardEngine start INFO: Starting Servlet Engine: Apache Tomcat/6.0.44 ?? 18, 2015 4:15:56 ?? org.apache.catalina.startup.HostConfig deployDirectory INFO: Deploying web application directory docs ?? 18, 2015 4:15:56 ?? org.apache.catalina.startup.HostConfig deployDirectory INFO: Deploying web application directory examples ?? 18, 2015 4:15:56 ?? org.apache.catalina.core.ApplicationContext log INFO: ContextListener: contextInitialized() ?? 18, 2015 4:15:56 ?? org.apache.catalina.core.ApplicationContext log INFO: SessionListener: contextInitialized() ?? 18, 2015 4:15:56 ?? org.apache.catalina.startup.HostConfig deployDirectory INFO: Deploying web application directory host-manager ?? 18, 2015 4:15:56 ?? org.apache.catalina.startup.HostConfig deployDirectory INFO: Deploying web application directory manager ?? 18, 2015 4:15:56 ?? org.apache.catalina.startup.HostConfig deployDirectory INFO: Deploying web application directory ROOT ?? 18, 2015 4:15:56 ?? org.apache.coyote.http11.Http11AprProtocol start INFO: Starting Coyote HTTP/1.1 on http-8080 ?? 18, 2015 4:15:56 ?? org.apache.coyote.ajp.AjpAprProtocol start INFO: Starting Coyote AJP/1.3 on ajp-8009 ?? 18, 2015 4:15:56 ?? org.apache.catalina.startup.Catalina start INFO: Server startup in 591 ms 问答

没有更多推荐了,返回首页

©️2019 CSDN 皮肤主题: 大白 设计师: CSDN官方博客

分享到微信朋友圈

×

扫一扫,手机浏览