Unable to read HiveServer2 uri from ZooKeeper 1C

Exception in thread "main" java.sql.SQLException: org.apache.hive.jdbc.ZooKeeperHiveClientException: Unable to read HiveServer2 uri from ZooKeeper
at org.apache.hive.jdbc.HiveConnection.(HiveConnection.java:127)
at org.apache.hive.jdbc.HiveDriver.connect(HiveDriver.java:105)
at java.sql.DriverManager.getConnection(DriverManager.java:664)
at java.sql.DriverManager.getConnection(DriverManager.java:247)
at JDBCExample.main(JDBCExample.java:142)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:140)
Caused by: org.apache.hive.jdbc.ZooKeeperHiveClientException: Unable to read HiveServer2 uri from ZooKeeper
at org.apache.hive.jdbc.ZooKeeperHiveClientHelper.getNextServerUriFromZooKeeper(ZooKeeperHiveClientHelper.java:109)
at org.apache.hive.jdbc.Utils.resolveAuthorityUsingZooKeeper(Utils.java:492)
at org.apache.hive.jdbc.Utils.resolveAuthority(Utils.java:464)
at org.apache.hive.jdbc.Utils.parseURL(Utils.java:371)
at org.apache.hive.jdbc.HiveConnection.(HiveConnection.java:125)
... 9 more
Caused by: org.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode = ConnectionLoss for /hiveserver2
at org.apache.zookeeper.KeeperException.create(KeeperException.java:99)
at org.apache.zookeeper.KeeperException.create(KeeperException.java:51)
at org.apache.zookeeper.ZooKeeper.getChildren(ZooKeeper.java:2231)
at org.apache.curator.framework.imps.GetChildrenBuilderImpl$3.call(GetChildrenBuilderImpl.java:214)
at org.apache.curator.framework.imps.GetChildrenBuilderImpl$3.call(GetChildrenBuilderImpl.java:203)
at org.apache.curator.RetryLoop.callWithRetry(RetryLoop.java:107)
at org.apache.curator.framework.imps.GetChildrenBuilderImpl.pathInForeground(GetChildrenBuilderImpl.java:199)
at org.apache.curator.framework.imps.GetChildrenBuilderImpl.forPath(GetChildrenBuilderImpl.java:191)
at org.apache.curator.framework.imps.GetChildrenBuilderImpl.forPath(GetChildrenBuilderImpl.java:38)
at org.apache.hive.jdbc.ZooKeeperHiveClientHelper.getNextServerUriFromZooKeeper(ZooKeeperHiveClientHelper.java:91)
... 13 more

1个回答

PHP上层接口的封装。别人底层接口做的是单一的增删改。我需要调用多个不同服务器上的接口来处理我需要的数据。进行更新到相应的接口里面。但是如果有的数据更改不成功了。需要事务的回滚。现在我知道的是同一个数据库里面的话,操作数据库的事务是可以实现的。但是不同的服务器不同的数据库,我需要事务处理的话。需要怎么做。我百度了分布式事务。但是没看懂。百度说的是JAVA的。我写PHP的跟他不一样。求大神指点

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
我使用iframe实现了点击左边栏 只有右边的内容变化 但在跳转到servlert并转向jsp时,jsp的表格样式无法显示
<div id="header1" class="panel-heading" style="padding-top:15px"> <i class="glyphicon glyphicon-dashboard" ></i> <a href="${pageContext.request.contextPath }/DoctorServlet" target="mainiframe">&nbsp咨询师管理</a> </div> <div id="page_content"> <iframe name="mainiframe" src="admin_shouye.jsp" id="mainiframe" scrolling="no" onload="resizeFrameHeight()" frameborder="0" width="100%"></iframe> </div> servlet: protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { DoctorDao ddao = new DoctorDao(); List<Doctor> findAll = ddao.findAllDoctor(); System.out.println(findAll); request.setAttribute("doc", findAll); request.getRequestDispatcher("Admin/doctor_find.jsp").forward(request, response); //response.sendRedirect("admin/doctor_find.jsp"); } jsp:<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <!-- 引入所使用的bootstrap文件 --> <link href="../css/bootstrap.min.css" rel="stylesheet"> <script src="../js/jquery-3.0.0.min.js"></script> <script src="../js/bootstrap.min.js"></script> <style type="text/css"> <style> #outer { width: 800px; height: 500px; position: absolute; } </style> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>Insert title here</title> </head> <body> <div id="outer"> <center> <table class="table table-striped table-bordered table-hover table-condensed"> <thead> <tr class="active"> <td>编号</td> <td>姓名</td> <td>个人照片</td> <td>密码</td> <td>性别</td> <td>年龄</td> <td>手机号</td> <td>邮箱</td> <td>等级</td> <td>技能</td> <td>状态</td> </tr> </thead> <tbody> <c:forEach items="${doc}" var="doc"> <tr> <td>${doc.doctor_id}</td> <td>${doc.doctor_name}</td> <td>${doc.img}</td> <td>${doc.doctor_pwd}</td> <td>${doc.sex}</td> <td>${doc.age}</td> <td>${doc.phone}</td> <td>${doc.email}</td> <td>${doc.level}</td> <td>${doc.skill}</td> <td>${doc.active}</td> </tr> </c:forEach> </tbody> </table> </center> </div> </body> </html>
mysql connector c++ 抛出异常
我在官网下了mysql-connector-c++-8.0.17之后跑官网上的例程,抛出了下面这个错误: Connector/C++ standalone program example... Creating session on tcp://127.0.0.1 ... terminate called after throwing an instance of 'std::bad_alloc' what(): std::bad_alloc 已放弃 (核心已转储) 我想知道是哪里出了问题,应该怎么解决 我用的系统是Ubuntu 18.04.4 下面是我的cmake ``` cmake_minimum_required(VERSION 3.10) project(SERVER) set(CMAKE_CXX_STANDARD 11) set(CMAKE_CXX_STANDARD_REQUIRED ON) # Boost Library set(BOOST_INC_DIR /usr/local/include) set(BOOST_LIB_DIR /usr/local/lib) include_directories(${BOST_INC_DIR}) link_directories(${BOOST_LIB_DIR}) add_subdirectory(src) ``` ``` # Class MySqlConnector referenced by Class MySqlSession set(MYSQLCONNECTOR_LIB_DIR /usr/local/lib/mysql-connector-c++) set(MYSQLCONNECTOR_INC_DIR /usr/local/include) set(MYSQLCONNECTOR_SRC mysqlcppconn) include_directories(${MYSQLCONNECTOR_INC_DIR} ${SQL_INC_DIR}) link_directories(${MYSQLCONNECTOR_LIB_DIR}) add_executable(Server main.cpp) target_link_libraries(Server ${MYSQLCONNECTOR_SRC}) ``` ``` /* * Copyright (c) 2008, 2019, Oracle and/or its affiliates. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License, version 2.0, as * published by the Free Software Foundation. * * This program is also distributed with certain software (including * but not limited to OpenSSL) that is licensed under separate terms, * as designated in a particular file or component or in included license * documentation. The authors of MySQL hereby grant you an * additional permission to link the program and your derivative works * with the separately licensed software that they have included with * MySQL. * * Without limiting anything contained in the foregoing, this file, * which is part of MySQL Connector/C++, is also subject to the * Universal FOSS Exception, version 1.0, a copy of which can be found at * http://oss.oracle.com/licenses/universal-foss-exception. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * See the GNU General Public License, version 2.0, for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* Basic example of an application using JDBC API of Connector/C++ */ /* Standard C++ includes */ #include <stdlib.h> #include <iostream> #include <sstream> #include <stdexcept> /* Note: Boost must be in the include path to build code which uses the JDBC API. */ #include <boost/scoped_ptr.hpp> #include <mysql/jdbc.h> #define DEFAULT_URI "tcp://127.0.0.1" #define EXAMPLE_USER "root" #define EXAMPLE_PASS "" #define EXAMPLE_DB "test" using namespace std; /* Usage example for Driver, Connection, (simple) Statement, ResultSet */ int main(int argc, const char **argv) { const char *url = (argc > 1 ? argv[1] : DEFAULT_URI); const string user(argc >= 3 ? argv[2] : EXAMPLE_USER); const string pass(argc >= 4 ? argv[3] : EXAMPLE_PASS); const string database(argc >= 5 ? argv[4] : EXAMPLE_DB); cout << endl; cout << "Connector/C++ standalone program example..." << endl; cout << endl; try { sql::Driver * driver = sql::mysql::get_driver_instance(); /* Using the Driver to create a connection */ cout << "Creating session on " << url << " ..." << endl << endl; boost::scoped_ptr< sql::Connection > con(driver->connect(url, user, pass)); con->setSchema(database); boost::scoped_ptr< sql::Statement > stmt(con->createStatement()); boost::scoped_ptr< sql::ResultSet > res(stmt->executeQuery("SELECT 'Welcome to Connector/C++' AS _message")); cout << "\t... running 'SELECT 'Welcome to Connector/C++' AS _message'" << endl; while (res->next()) { cout << "\t... MySQL replies: " << res->getString("_message") << endl; cout << "\t... say it again, MySQL" << endl; cout << "\t....MySQL replies: " << res->getString(1) << endl; } } catch (sql::SQLException &e) { /* The JDBC API throws three different exceptions: - sql::MethodNotImplementedException (derived from sql::SQLException) - sql::InvalidArgumentException (derived from sql::SQLException) - sql::SQLException (derived from std::runtime_error) */ cout << "# ERR: SQLException in " << __FILE__; cout << "(" << "EXAMPLE_FUNCTION" << ") on line " << __LINE__ << endl; /* Use what() (derived from std::runtime_error) to fetch the error message */ cout << "# ERR: " << e.what(); cout << " (MySQL error code: " << e.getErrorCode(); cout << ", SQLState: " << e.getSQLState() << " )" << endl; return EXIT_FAILURE; } cout << endl; cout << "... find more at http://www.mysql.com" << endl; cout << endl; return EXIT_SUCCESS; } ```
浏览器无法解析Ubuntu服务器中的php文件,只能自动下载
如题,环境Ubuntu16.04+nginx+php7.0 网站www.zxc233.top。 当访问www.zxc233.top/index.html时,一切正常, 但当访问[www.zxc233.top/_h5ai/public/index.php](www.zxc233.top/_h5ai/public/index.php "www.zxc233.top/_h5ai/public/index.php")时,即不可浏览和解析该文件,只能下载到本地,求解!请各位大佬帮我看一下吧,谢谢了!!! 下面是sites-available中的default文件 ``` ## # You should look at the following URL's in order to grasp a solid understanding # of Nginx configuration files in order to fully unleash the power of Nginx. # http://wiki.nginx.org/Pitfalls # http://wiki.nginx.org/QuickStart # http://wiki.nginx.org/Configuration # # Generally, you will want to move this file somewhere, and start with a clean # file but keep this around for reference. Or just disable in sites-enabled. # # Please see /usr/share/doc/nginx-doc/examples/ for more detailed examples. ## # Default server configuration # server { listen 80 default_server; listen [::]:80 default_server; # SSL configuration # # listen 443 ssl default_server; # listen [::]:443 ssl default_server; # # Note: You should disable gzip for SSL traffic. # See: https://bugs.debian.org/773332 # # Read up on ssl_ciphers to ensure a secure configuration. # See: https://bugs.debian.org/765782 # # Self signed certs generated by the ssl-cert package # Don't use them in a production server! # # include snippets/snakeoil.conf; root /var/www/html; # Add index.php to the list if you are using PHP index index.html index.htm index.nginx-debian.html; server_name _; location / { if (-f $request_filename/index.html){ rewrite (.*) $1/index.html break; } if (-f $request_filename/index.php){ rewrite (.*) $1/index.php; } if (!-f $request_filename){ rewrite (.*) /index.php; } root /var/www/html; index index.php; } location ~ \.php$ { root /var/www/html; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } # First attempt to serve request as file, then # as directory, then fall back to displaying a 404. try_files $uri $uri/ =404; # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 # #location ~ \.php$ { # include snippets/fastcgi-php.conf; # # # With php7.0-cgi alone: # fastcgi_pass 127.0.0.1:9000; # # With php7.0-fpm: # fastcgi_pass unix:/run/php/php7.0-fpm.sock; #} # deny access to .htaccess files, if Apache's document root # concurs with nginx's one # #location ~ /\.ht { # deny all; #} } # Virtual Host configuration for example.com # # You can move that to a different file under sites-available/ and symlink that # to sites-enabled/ to enable it. # #server { # listen 80; # listen [::]:80; # # server_name example.com; # # root /var/www/example.com; # index index.html; # # location / { # try_files $uri $uri/ =404; # } #} ```
Flutter使用报错error: Target of URI doesn't exist: 'package:flutter/material.dart',且‘package get’不能运行.
Windows系统初次安装Flutter和AS,显示没有依赖,package get不能运行。采用了目前网上能找到的方法都不管用或是无从下手。 运行package get 后显示![图片说明](https://img-ask.csdn.net/upload/202002/07/1581088458_426060.png)
springcloud Hoxton.SR1 在网关中添加 zipkin 配置后报错 This converter does not support this method 应该如何解决
pom.xml 配置 ``` <dependencies> <!--微服务注册--> <!-- https://mvnrepository.com/artifact/org.springframework.cloud/spring-cloud-starter-netflix-eureka-client --> <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-netflix-eureka-client</artifactId> </dependency> <!--网关配置--> <!-- https://mvnrepository.com/artifact/org.springframework.cloud/spring-cloud-starter-netflix-zuul --> <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-netflix-zuul</artifactId> </dependency> <!--限流--> <!-- https://mvnrepository.com/artifact/com.marcosbarbero.cloud/spring-cloud-zuul-ratelimit --> <dependency> <groupId>com.marcosbarbero.cloud</groupId> <artifactId>spring-cloud-zuul-ratelimit</artifactId> <version>2.3.0.RELEASE</version> </dependency> <!--限流redis数据库记录数据--> <!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-data-redis --> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-redis</artifactId> </dependency> <!--OAuth--> <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-oauth2</artifactId> </dependency> <!-- https://mvnrepository.com/artifact/org.projectlombok/lombok --> <dependency> <groupId>org.projectlombok</groupId> <artifactId>lombok</artifactId> </dependency> <!--自定义config配置--> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-configuration-processor</artifactId> <optional>true</optional> </dependency> <dependency> <groupId>com.alibaba</groupId> <artifactId>fastjson</artifactId> <version>1.2.62</version> </dependency> <!-- 被zipkin服务追踪的启动依赖--> <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-zipkin</artifactId> </dependency> <!--配置rabbitmq--> <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-stream-rabbit</artifactId> </dependency> </dependencies> ``` application.yml ``` server: port: 6020 spring: application: name: Gateway-Zuul #对曝光的微服务的名称 #配置redis redis: host: 127.0.0.1 port: 6379 password: admin jedis: pool: max-active: 100 max-idle: 8 min-idle: 4 max-wait: 10000 timeout: 3000 #rabbitmq rabbitmq: host: 127.0.0.1 port: 5672 username: admin password: admin #zipkin在rabbitmq消息队列zipkin zipkin: sender: type: rabbit rabbitmq: queue: zipkin #被追踪的可能性,默认是0.1 表示百分之10 sleuth: sampler: probability: 1.0 eureka: client: service-url: defaultZone: http://Eureka7001.com:7001/eureka/ registry-fetch-interval-seconds: 5 # 默认为30秒 表示eureka client间隔多久去拉取服务注册信息,默认为30秒,对于api-gateway,如果要迅速获取服务注册状态,可以缩小该值,比如5秒 instance: instance-id: ${spring.application.name}:${spring.cloud.client.ip-address}:${spring.application.instance_id:${server.port}} #修改之后的ip prefer-ip-address: true #访问路径显示IP地址 zuul: host: connect-timeout-millis: 15000 #HTTP连接超时要比Hystrix的大 socket-timeout-millis: 60000 #socket超时 ignored-services: "*" # 不允许用微服务名访问了,如果禁用所有的,可以使用 "*" routes: OAuth-server: /auth/** sensitive-headers: #允许传递敏感信息 #限流配置 ratelimit: enabled: true repository: REDIS behind-proxy: true add-response-headers: false default-policy-list: #optional - will apply unless specific policy exists - limit: 20 #optional - request number limit per refresh interval window quota: 1 #optional - request time limit per refresh interval window (in seconds) refresh-interval: 1 #default value (in seconds) type: #optional # - user - origin - url - httpmethod security: oauth2: client: #令牌端点 access-token-uri: http://localhost:${server.port}/auth/oauth/token #授权端点 user-authorization-uri: http://localhost:${server.port}/auth/oauth/authorize #OAuth2客户端ID client-id: test #OAuth2客户端密钥 client-secret: test authorization: check-token-access: http://localhost:${server.port}/auth/oauth/check_token resource: jwt: key-value: jkdfjkdf ribbon: ReadTimeout: 10000 ConnectTimeout: 10000 hystrix: command: default: execution: isolation: thread: timeoutInMilliseconds: 3000 circuitBreaker: enabled: true requestVolumeThreshold: 10 sleepWindowInMilliseconds: 10000 errorThresholdPercentage: 60 ``` 报错信息: ``` 2020-02-09 17:04:44.448 ERROR [Gateway-Zuul,bb484313c41a709a,0245f4527d3b0826,true] 20368 --- [ask-scheduler-1] o.s.integration.handler.LoggingHandler : org.springframework.messaging.MessagingException: Failed to invoke method; nested exception is java.lang.UnsupportedOperationException: This converter does not support this method at org.springframework.integration.endpoint.MethodInvokingMessageSource.doReceive(MethodInvokingMessageSource.java:115) at org.springframework.integration.endpoint.AbstractMessageSource.receive(AbstractMessageSource.java:167) at org.springframework.integration.endpoint.SourcePollingChannelAdapter.receiveMessage(SourcePollingChannelAdapter.java:250) at org.springframework.integration.endpoint.AbstractPollingEndpoint.doPoll(AbstractPollingEndpoint.java:359) at org.springframework.integration.endpoint.AbstractPollingEndpoint.pollForMessage(AbstractPollingEndpoint.java:328) at org.springframework.integration.endpoint.AbstractPollingEndpoint.lambda$null$1(AbstractPollingEndpoint.java:275) at org.springframework.integration.util.ErrorHandlingTaskExecutor.lambda$execute$0(ErrorHandlingTaskExecutor.java:57) at org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:50) at org.springframework.integration.util.ErrorHandlingTaskExecutor.execute(ErrorHandlingTaskExecutor.java:55) at org.springframework.integration.endpoint.AbstractPollingEndpoint.lambda$createPoller$2(AbstractPollingEndpoint.java:272) at org.springframework.cloud.sleuth.instrument.async.TraceRunnable.run(TraceRunnable.java:67) at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54) at org.springframework.scheduling.concurrent.ReschedulingRunnable.run(ReschedulingRunnable.java:93) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) Caused by: java.lang.UnsupportedOperationException: This converter does not support this method at org.springframework.integration.support.converter.DefaultDatatypeChannelMessageConverter.toMessage(DefaultDatatypeChannelMessageConverter.java:85) at org.springframework.messaging.converter.CompositeMessageConverter.toMessage(CompositeMessageConverter.java:83) at org.springframework.cloud.function.context.catalog.BeanFactoryAwareFunctionRegistry$FunctionInvocationWrapper.lambda$convertOutputValueIfNecessary$2(BeanFactoryAwareFunctionRegistry.java:620) at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) at java.util.ArrayList$ArrayListSpliterator.tryAdvance(ArrayList.java:1359) at java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:126) at java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:499) at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:486) at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472) at java.util.stream.FindOps$FindOp.evaluateSequential(FindOps.java:152) at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) at java.util.stream.ReferencePipeline.findFirst(ReferencePipeline.java:464) at org.springframework.cloud.function.context.catalog.BeanFactoryAwareFunctionRegistry$FunctionInvocationWrapper.convertOutputValueIfNecessary(BeanFactoryAwareFunctionRegistry.java:626) at org.springframework.cloud.function.context.catalog.BeanFactoryAwareFunctionRegistry$FunctionInvocationWrapper.doApply(BeanFactoryAwareFunctionRegistry.java:569) at org.springframework.cloud.function.context.catalog.BeanFactoryAwareFunctionRegistry$FunctionInvocationWrapper.get(BeanFactoryAwareFunctionRegistry.java:474) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.springframework.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:282) at org.springframework.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:266) at org.springframework.integration.endpoint.MethodInvokingMessageSource.doReceive(MethodInvokingMessageSource.java:112) ... 19 moreyi ```
aria2的下载过程中出现的问题
![图片说明](https://img-ask.csdn.net/upload/202001/25/1579953732_414237.png) 如上,都下载了三分之二了,但是出现了这个问题,再之后我重新下载都是0%了,这个文件是百度云里的一个压缩包,请问我要怎么解决呢? 链接里面是这样的内容 {"error_code":31326,"error_msg":"user is not authorized, hitcode:109","error_info":"","request_id":576012996596119898} 日志文件里是以下错误 2020-01-25 19:21:54.674205 [ERROR] [AbstractCommand.cc:351] CUID#46 - Download aborted. URI=https://pcs.baidu.com/rest/2.0/pcs/file?method=download&app_id=250528&path=%2F%E6%88%91%E7%9A%84%E8%B5%84%E6%BA%90%2FAdode%202020%20Win%20SP%E7%8B%AC%E7%AB%8B%E8%BD%AF%E4%BB%B6%E7%89%88%2FAdobe_Premiere_Pro_2020_14.0.0.572_SP_20191104.rar Exception: [AbstractCommand.cc:351] errorCode=22 URI=https://qdall01.baidupcs.com/file/f95a0d1622194300c97e7bc5eab1c517?bkt=en-26dcfdb4e5ee1a49eaf26265901af17c7cb1a8d473b7b2d0f89e135eb3b16b6cd6f92cd7a24beab5&fid=2319825596-250528-146821423475030&time=1579951314&sign=FDTAXGERLQlBHSKfWa-DCb740ccc5511e5e8fedcff06b081203-rFw%2BC6T4CpDgPr9iQzMzPJVhIg8%3D&to=92&size=1746725415&sta_dx=1746725415&sta_cs=15995&sta_ft=rar&sta_ct=5&sta_mt=1&fm2=MH%2CYangquan%2CAnywhere%2C%2Chebei%2Ccnc&ctime=1572880951&mtime=1579814977&resv0=-1&resv1=0&resv2=rlim&resv3=5&resv4=1746725415&vuk=2319825596&iv=-2&htype=&randtype=&newver=1&newfm=1&secfm=1&flow_ver=3&pkey=en-c2a2fca1773dfa1364bc3730768be1bcb4cf5bef3ca0d927cbb5764460f95e026aacd80c89972ca5&sl=80740430&expires=8h&rt=pr&r=256240782&mlogid=575341430521813490&vbdid=-&fin=Adobe_Premiere_Pro_2020_14.0.0.572_SP_20191104.rar&fn=Adobe_Premiere_Pro_2020_14.0.0.572_SP_20191104.rar&rtype=1&dp-logid=575341430521813490&dp-callid=0.1.1&hps=1&tsl=15&csl=78&fsl=-1&csign=JtHNlwtNujNMslqmqqjzpnVG2os%3D&so=0&ut=8&uter=4&serv=0&uc=1549241048&ti=39965399e74cce840cd661163e109ade9588392c4c4ffa4f&reqlabel=250528_d_67e5f81d750fb4c6056140b161259bf8_-1_b0231fc6c5c41d1af6d537905b85ad8f&by=themis -> [HttpSkipResponseCommand.cc:240] errorCode=22 The response status is not successful. status=403
阿里云+nginx+ssl+https配置后,网页依旧无法显示,请大神指教
阿里云+nginx+ssl配置后,网页依旧无法显示,请大神指教 域名已经解析 ![图片说明](https://img-ask.csdn.net/upload/202002/09/1581225059_616698.png) 服务器相关端口已打开 ![图片说明](https://img-ask.csdn.net/upload/202002/09/1581231238_906425.png) 系统是unbuntu16,nginx版本为1.15,已有ssl模块 ![图片说明](https://img-ask.csdn.net/upload/202002/09/1581225248_962076.png) ssl证书有上传至服务器 ![图片说明](https://img-ask.csdn.net/upload/202002/09/1581225321_579997.png) nginx的配置文件nginx.conf内容如下 ``` #user nobody; worker_processes 1; #error_log logs/error.log; #error_log logs/error.log notice; #error_log logs/error.log info; #pid logs/nginx.pid; events { worker_connections 1024; } http { include mime.types; default_type application/octet-stream; #log_format main '$remote_addr - $remote_user [$time_local] "$request" ' # '$status $body_bytes_sent "$http_referer" ' # '"$http_user_agent" "$http_x_forwarded_for"'; #access_log logs/access.log main; sendfile on; #tcp_nopush on; #keepalive_timeout 0; keepalive_timeout 65; #gzip on; # server { # listen 80; # server_name localhost; # #charset koi8-r; # #access_log logs/host.access.log main; # location / { # root html; # index index.html index.htm; # } # #error_page 404 /404.html; # # redirect server error pages to the static page /50x.html # # # error_page 500 502 503 504 /50x.html; # location = /50x.html { # root html; # } # # proxy the PHP scripts to Apache listening on 127.0.0.1:80 # # # #location ~ \.php$ { # # proxy_pass http://127.0.0.1; # #} # # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 # # # #location ~ \.php$ { # # root html; # # fastcgi_pass 127.0.0.1:9000; # # fastcgi_index index.php; # # fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name; # # include fastcgi_params; # #} # # deny access to .htaccess files, if Apache's document root # # concurs with nginx's one # # # #location ~ /\.ht { # # deny all; # #} # } # another virtual host using mix of IP-, name-, and port-based configuration # #server { # listen 8000; # listen somename:8080; # server_name somename alias another.alias; # location / { # root html; # index index.html index.htm; # } #} # HTTPS server # server { listen 443 ssl; server_name www.faceanalyze.club faceanalyze.club; ssl_certificate /usr/local/nginx/cert/cert.pem; ssl_certificate_key /usr/local/nginx/cert/cert.key; # ssl_session_cache shared:SSL:1m; ssl_session_timeout 5m; ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;; ssl_protocols TLSv1 TLSv1.1 TLSv1.2; ssl_prefer_server_ciphers on; location / { root html; index index.html index.htm; } } server { listen 80; server_name www.faceanalyze.club faceanalyze.club; return 301 https://$server_name$request_uri; } } ``` nginx有重新加载配置,端口使用情况如下 ![图片说明](https://img-ask.csdn.net/upload/202002/09/1581225719_742816.png) 用浏览器查看时,无法显示 ![图片说明](https://img-ask.csdn.net/upload/202002/09/1581225832_412617.png) 请大神求解!谢谢
【小白求助】安卓opencv用分类器对人脸进行识别的一些问题
小白入门,最近在看opencv的人脸识别(分类) 然后按照网上的代码,学习了之后,自己写了一段,发现运行的时候会卡很久,甚至直接退出,并且越用越卡。 我想实现的是对一张图片进行读入,然后加载多个分类器对图片内容进行识别,从而达到分类的目的。 我那个问题困扰了我一天,想来求助大神 我加载人脸识别的模型没问题,但是同时加载两个模型,比如说人脸和上身,就会卡死。 代码分3个部分,分别是MainActivity.java , execDetect.java , Detector.java 以下是MainActivity.java ``` package com.RinGo.IMGfenlei; import android.content.Context; import android.content.Intent; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.net.Uri; import android.os.Bundle; import android.os.Environment; import android.provider.MediaStore; import android.util.Log; import android.view.View; import android.widget.Button; import android.widget.ImageButton; import android.widget.TextView; import android.widget.Toast; import androidx.appcompat.app.AppCompatActivity; import org.opencv.android.Utils; import org.opencv.core.Mat; import org.opencv.core.MatOfRect; import org.opencv.core.Rect; import org.opencv.core.Scalar; import org.opencv.imgproc.Imgproc; import org.opencv.objdetect.CascadeClassifier; public class MainActivity extends AppCompatActivity { private Detector frontfaceDetector; private Detector smileDetector; private static String CAMERAIMAGENAME = "image.jpg"; private ImageButton imageButton; private ImageButton imageButton2; private TextView textView; private Bitmap bitmap; private Bitmap rectBitmap; private Bitmap resizeBitmap; private Toast toast; private Button addFile; private Button startDetect; private Button check; private execDetect toDetcet; private String show; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); textView = (TextView) findViewById(R.id.tv_face); // imageButton = (ImageButton) findViewById(R.id.iv_face); //imageButton.setGravity(Gravity.CENTER_HORIZONTAL | Gravity.CENTER_VERTICAL); // imageButton2 = (ImageButton) findViewById(R.id.iv_face2); // imageButton2.setGravity(Gravity.CENTER_HORIZONTAL | Gravity.CENTER_VERTICAL); toDetcet=new execDetect(); addFile=(Button)findViewById(R.id.addPic); startDetect=(Button)findViewById(R.id.startDetect); check=(Button)findViewById(R.id.check); startDetect.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { // startDetect.setClickable(false); textView.setText("正在检测"); // detect(); Thread d =new Thread(new Runnable() { @Override public void run() { toDetcet.initExecDetect(MainActivity.this,bitmap); // Toast.makeText(MainActivity.this, "initialize succeed", Toast.LENGTH_SHORT).show(); show= toDetcet.startDetect(); // Toast.makeText(MainActivity.this, " succeed", Toast.LENGTH_SHORT).show(); } }); d.run(); textView.setText(show); // startDetect.setClickable(true); } }); check.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { // startDetect.setClickable(false); textView.setText(toDetcet.getReturntoMain()); // startDetect.setClickable(true); } }); addFile.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { // 添加照片 // 打开本地相册 Intent intent1 = new Intent(Intent.ACTION_PICK, android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI); startActivityForResult(intent1, 101); //startActivity(intent1); } }); String strLibraryName = "opencv_java3"; // 不需要添加前缀 libopencv_java3 { try { Log.e("loadLibrary", strLibraryName); System.loadLibrary(strLibraryName); //System.loadLibrary(Core.NATIVE_LIBRARY_NAME); // couldn't find "libopencv_java320.so" } catch (UnsatisfiedLinkError e) { Log.e("loadLibrary", "Native code library failed to load.\n" + e); } catch (Exception e) { Log.e("loadLibrary", "Exception: " + e); } } // frontfaceDetector = new Detector(this, R.raw.haarcascade_frontalface_alt, 6, 0.2F, 0.2F, new Scalar(255, 0, 0, 255)); } /** * 点击添加照片事件 * * @param v */ public void onClick(View v) { int bt_id = v.getId(); switch (bt_id) { /* case R.id.takePhoto: // 拍照 // 打开本地相机 Intent intent2 = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE); Uri imageUri = Uri.fromFile(new File(Environment.getExternalStorageDirectory(), CAMERAIMAGENAME)); intent2.putExtra(MediaStore.EXTRA_OUTPUT, imageUri); startActivityForResult(intent2, 102); break; */ case R.id.back: this.finish(); break; default: break; } } @Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); // 加判断 不选择照片或者不拍照时不闪退 //Log.e("data", String.valueOf(data)); //if (data == null) //return; bitmap = null; switch (requestCode) { // 选择图片库的图片 case 101: if (resultCode == RESULT_OK) { try { Uri uri = data.getData(); bitmap = MediaStore.Images.Media.getBitmap(this.getContentResolver(), uri); } catch (Exception e) { e.printStackTrace(); } } break; // 表示调用本地照相机拍照 case 102: if (resultCode == RESULT_OK) { //Bundle bundle = data.getExtras(); //bm = (Bitmap) bundle.get("data"); bitmap = BitmapFactory.decodeFile(Environment.getExternalStorageDirectory() + "/" + CAMERAIMAGENAME); } break; default: break; } Log.e("bitmap", String.valueOf(bitmap)); if (bitmap == null) { toast = Toast.makeText(MainActivity.this, "未选择图像", Toast.LENGTH_SHORT); toast.show(); return; } // 识别图片 并画框 /* Thread detect=new Thread(new Runnable() { @Override public void run() { } }); detect.run(); */ // 将照片剪裁 bitmap将被释放重新赋值 //int ibWidth = imageButton.getWidth(); // int ibHeight = imageButton.getHeight(); //resizeBitmap = imageButton.resizeBitmap(bitmap, ibWidth, ibHeight); //imageButton.setBitmap(resizeBitmap); //imageButton2.setBitmap(rectBitmap); } private void detect() { MainActivity.this.runOnUiThread(new Runnable() { @Override public void run() { toDetcet.initExecDetect(MainActivity.this,bitmap); // Toast.makeText(MainActivity.this, "initialize succeed", Toast.LENGTH_SHORT).show(); String show= toDetcet.startDetect(); // Toast.makeText(MainActivity.this, " succeed", Toast.LENGTH_SHORT).show(); textView.setText(show); } }); //textView.setText(toDetcet.getReturntoMain()); } } ``` 以下是activity_main.xml ``` <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> <TextView android:id="@+id/tv_face" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginBottom="16dp" android:text="未检测到人脸" android:textColor="@color/colorAccent" app:layout_constraintBottom_toTopOf="@+id/ll1" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintRight_toRightOf="parent" /> <LinearLayout android:id="@+id/ll1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="horizontal" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintRight_toRightOf="parent"> <com.qmuiteam.qmui.widget.roundwidget.QMUIRoundButton android:id="@+id/addPic" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginBottom="5dp" android:layout_weight="1" android:onClick="onClick" android:text=" 选择图片(CV) " android:textSize="16sp" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintRight_toRightOf="parent" /> <com.qmuiteam.qmui.widget.roundwidget.QMUIRoundButton android:id="@+id/startDetect" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginBottom="5dp" android:layout_weight="1" android:onClick="onClick" android:text=" 开始识别 " android:textSize="16sp" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintRight_toRightOf="parent" /> <com.qmuiteam.qmui.widget.roundwidget.QMUIRoundButton android:id="@+id/check" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginBottom="5dp" android:layout_weight="1" android:onClick="onClick" android:text=" 结果 " android:textSize="16sp" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintRight_toRightOf="parent" /> <com.qmuiteam.qmui.widget.roundwidget.QMUIRoundButton android:id="@+id/back" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginBottom="0dp" android:layout_weight="1" android:onClick="onClick" android:text=" 返回 " android:textSize="16sp" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintRight_toRightOf="parent" /> </LinearLayout> </LinearLayout> ``` 以下是execDetect.java ``` package com.RinGo.IMGfenlei; import android.content.Context; import android.graphics.Bitmap; import android.util.Log; import org.opencv.android.Utils; import org.opencv.core.Mat; import org.opencv.core.MatOfRect; import org.opencv.core.Rect; import org.opencv.core.Scalar; import org.opencv.imgproc.Imgproc; import org.opencv.objdetect.CascadeClassifier; import com.RinGo.IMGfenlei.R; import com.RinGo.IMGfenlei.Detector; import java.io.File; import java.io.FileOutputStream; import java.io.InputStream; public class execDetect { private Detector frontfaceDetector; private Detector smilefaceDetector; private Detector[] detectors=new Detector[10]; private Detector detector; private Bitmap bitmap; private Bitmap rectBitmap; private String returntoMain=""; private String[] detectorNames=new String[10]; private CascadeClassifier mFrontalFaceClassifier = null; //正脸 级联分类器 private CascadeClassifier mProfileFaceClassifier = null; //侧脸 级联分类器 private int smilefacenum=0; private Context mcontext; private int[] cascades=new int[10]; public void initExecDetect(Context _context,Bitmap _bitmap) { bitmap=_bitmap; mcontext=_context; cascades[0]=R.raw.haarcascade_frontalface_alt; detectors[0] = new Detector(_context,R.raw.haarcascade_frontalface_alt, 1, 0.2F, 0.2F, new Scalar(255, 0, 0, 255)); detectorNames[0]="正面人脸"; cascades[1]=R.raw.lbpcascade_frontalface; detectors[1] = new Detector(_context,R.raw.lbpcascade_frontalface, 1, 0.2F, 0.2F, new Scalar(255, 0, 0, 255)); detectorNames[1]="正面人脸2"; } public String startDetect() { // bitmapToMat Mat toMat = new Mat(); Utils.bitmapToMat(bitmap, toMat); // Mat copyMat = new Mat(); // toMat.copyTo(copyMat); // 复制 // togray Mat gray = new Mat(); MatOfRect mRect = new MatOfRect(); Imgproc.cvtColor(toMat, gray, Imgproc.COLOR_RGBA2GRAY); for (int id = 0; id < detectors.length; id++) { //detector = new Detector(mcontext,cascades[id], 3, 0.1F, 0.1F, new Scalar(255, 0, 0, 255)); try { int num = 0; mRect=new MatOfRect(); Rect[] object = detectors[id].detectObjectImage( gray, mRect); Log.e("objectLength", object.length + ""); num=object.length; /* for (Rect rect : object) { num++; } */ returntoMain =returntoMain+ String.format("检测到%1$d个" + detectorNames[id], num) + "\n"; } catch (Exception e) { e.printStackTrace(); } //textView.setText(String.format("检测到%1$d个人脸", facenum)); //Utils.matToBitmap(toMat, bitmap); } return returntoMain; } public String getReturntoMain() { return returntoMain; } } ``` 以下是Detector.java,定义了我的级联分类器的设置 ``` package com.RinGo.IMGfenlei; import android.content.Context; import org.opencv.core.Mat; import org.opencv.core.MatOfRect; import org.opencv.core.Rect; import org.opencv.core.Scalar; import org.opencv.core.Size; import org.opencv.objdetect.CascadeClassifier; import org.opencv.objdetect.Objdetect; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; /** * Created by think-hxr on 17-10-12. */ public class Detector { private CascadeClassifier mCascadeClassifier; private int mMinNeighbors; private float mRelativeObjectWidth; private float mRelativeObjectHeight; private Scalar mRectColor; /** * 构造方法 * * @param context 上下文 * @param id 级联分类器ID * @param minNeighbors 连续几帧确认目标 * @param relativeObjectWidth 最小宽度屏占比 * @param relativeObjectHeight 最小高度屏占比 * @param rectColor 画笔颜色 */ public Detector(Context context, int id, int minNeighbors, float relativeObjectWidth, float relativeObjectHeight, Scalar rectColor) { context = context.getApplicationContext(); mCascadeClassifier = createDetector(context, id); mMinNeighbors = minNeighbors; mRelativeObjectWidth = relativeObjectWidth; mRelativeObjectHeight = relativeObjectHeight; mRectColor = rectColor; } /** * 创建检测器 * * @param context 上下文 * @param id 级联分类器ID * @return 检测器 */ private CascadeClassifier createDetector(Context context, int id) { CascadeClassifier javaDetector; InputStream is = null; FileOutputStream os = null; try { is = context.getResources().openRawResource(id); File cascadeDir = context.getDir("cascade", Context.MODE_PRIVATE); File cascadeFile = new File(cascadeDir, id + ".xml"); os = new FileOutputStream(cascadeFile); byte[] buffer = new byte[4096]; int bytesRead; while ((bytesRead = is.read(buffer)) != -1) { os.write(buffer, 0, bytesRead); } javaDetector = new CascadeClassifier(cascadeFile.getAbsolutePath()); //javaDetector=new CascadeClassifier(); // javaDetector.load(cascadeFile.getAbsolutePath()); if (javaDetector.empty()) { javaDetector = null; } boolean delete = cascadeDir.delete(); return javaDetector; } catch (IOException e) { e.printStackTrace(); return null; } finally { try { if (null != is) { is.close(); } if (null != os) { os.close(); } } catch (IOException e) { e.printStackTrace(); } } } /** * 目标检测 视频 * * @param gray 灰度图像 * @param object 识别结果的容器 * @return 检测到的目标位置集合 */ public Rect[] detectObject(Mat gray, MatOfRect object) { // 使用Java人脸检测 mCascadeClassifier.detectMultiScale( gray, // 要检查的灰度图像 object, // 检测到的人脸 1.1, // 表示在前后两次相继的扫描中,搜索窗口的比例系数。默认为1.1即每次搜索窗口依次扩大10%; mMinNeighbors, // 默认是3 控制误检测,表示默认几次重叠检测到人脸,才认为人脸存在 Objdetect.CASCADE_SCALE_IMAGE, getSize(gray, mRelativeObjectWidth, mRelativeObjectHeight), // 目标最小可能的大小 gray.size()); // 目标最大可能的大小 return object.toArray(); } /** * 目标检测 图片 * * @param gray 灰度图像 * @param object 识别结果的容器 * @return */ public Rect[] detectObjectImage(Mat gray, MatOfRect object) { mCascadeClassifier.detectMultiScale(gray,object); return object.toArray(); } /** * 根据屏占比获取大小 * * @param gray gray * @param relativeObjectWidth 最小宽度屏占比 * @param relativeObjectHeight 最小高度屏占比 * @return 大小 */ private Size getSize(Mat gray, float relativeObjectWidth, float relativeObjectHeight) { Size size = gray.size(); int cameraWidth = gray.cols(); int cameraHeight = gray.rows(); int width = Math.round(cameraWidth * relativeObjectWidth); int height = Math.round(cameraHeight * relativeObjectHeight); size.width = 0 >= width ? 0 : (cameraWidth < width ? cameraWidth : width); // width [0, cameraWidth] size.height = 0 >= height ? 0 : (cameraHeight < height ? cameraHeight : height); // height [0, cameraHeight] return size; } /** * 获取画笔颜色 * * @return 颜色 */ public Scalar getRectColor() { return mRectColor; } } ```
nginx配置php,可以看到phpinfo,但是解析不了其他的php代码
我在ubuntu上搭建lnmp环境,在配置nginx的时候有个小问题。 在/etc/nginx/sites-available/创建一个test文件 ``` server { listen 9090; #listen [::]:9090; server_name test.com; large_client_header_buffers 4 16k; client_max_body_size 300m; client_body_buffer_size 128k; proxy_connect_timeout 600; proxy_read_timeout 600; proxy_send_timeout 600; proxy_buffer_size 64k; proxy_buffers 4 32k; proxy_busy_buffers_size 64k; proxy_temp_file_write_size 64k; root /var/www/test; #index index.html index.php; index index.html index.htm index.php; location / { try_files $uri $uri/ =404; } # pass PHP scripts to FastCGI server # location ~ \.php$ { # include snippets/fastcgi-php.conf; # # # With php-fpm (or other unix sockets): fastcgi_pass unix:/var/run/php/php7.0-fpm.sock; # # With php-cgi (or other tcp sockets): #fastcgi_pass 127.0.0.1:9090; fastcgi_index index.php; # fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } # deny access to .htaccess files, if Apache's document root # concurs with nginx's one # #location ~ /\.ht { # deny all; #} } ``` 然后在fastcgi_params文件下添加 ``` fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; ``` 访问127.0.0.1:9090/index.php,会报 GET http://127.0.0.1:9090/index.php net::ERR_INCOMPLETE_CHUNKED_ENCODING 200 (OK) 在nginx的error.log日志中有 2020/01/31 17:11:55 [error] 15569#15569: *6 upstream timed out (110: Connection timed out) while reading upstream, client: 127.0.0.1, server: test.com, request: "GET /index.php HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.0-fpm.sock:", host: "127.0.0.1:9090"
Unable to read TLD "META-INF/taglib.tld"
I got an error when using tomcat,the below are the details.And I looked over the source of jaser and found [location[1] = "META-INF/taglib.tld";] in the org.apache.jasper.compiler.TagLibraryInfoImpl.java and TagPluginManager.java.I want to know how to solve it and why?? Thanks. ---------------my web.xml <jsp-config> <taglib> <taglib-uri>/struts-tags</taglib-uri> <taglib-location>/WEB-INF/lib/struts2-core-2.1.6.jar</taglib-location> </taglib> </jsp-config> -------------- There is only struts-tag.tld in the struts2-core-2.1.6.jar. --------------------------------------------------------------------- Servlet.service() for servlet jsp threw exception org.apache.jasper.JasperException: Unable to read TLD "META-INF/taglib.tld" from JAR file "file:/X:/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/AccountMgr/WEB-INF/lib/struts2-core-2.1.6.jar": java.lang.NullPointerException at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:51) at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:409) at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:181) at org.apache.jasper.compiler.TagLibraryInfoImpl.<init>(TagLibraryInfoImpl.java:182) at org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:429) at org.apache.jasper.compiler.Parser.parseDirective(Parser.java:492) at org.apache.jasper.compiler.Parser.parseElements(Parser.java:1439) at org.apache.jasper.compiler.Parser.parse(Parser.java:137) at org.apache.jasper.compiler.ParserController.doParse(ParserController.java:255) at org.apache.jasper.compiler.ParserController.parse(ParserController.java:103) at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:170) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:332) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:312) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:299) at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:586) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:389) 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:128) 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:293) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454) at java.lang.Thread.run(Thread.java:620)
关于JSTL的foreach问题。
``` <%@ page import="java.util.ArrayList" %> <%@ page import="java.util.List" %> <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> <%@ page contentType="text/html;charset=UTF-8" language="java" %> <html> <head> <title>Title</title> </head> <body> <% class Person{ public String name; public int age; public Person(String name, int age){ this.name=name; this.age=age; } public String toString(){ return name+","+age; } } List<Person> person=new ArrayList<Person>(); person.add(new Person("zhangsan",15)); person.add(new Person("lisi",14)); person.add(new Person("wangwu",25)); person.add(new Person("zhaoliu",55)); pageContext.setAttribute("person",person); %> <c:forEach items="${person}" var="p"> <br>${p.name}----${p.age} </c:forEach> </body> </html> ``` 直接输出${p}可以打印tostring结果,但是取属性就不行。这是为啥? ![图片说明](https://img-ask.csdn.net/upload/202002/07/1581057611_247187.png)
c# mvc 中因为我用session保存了信息,时间一长session过期,需要重新跳转外部某个链接重新获取状态
c# mvc 中因为我用session保存了信息,时间一长session过期,需要重新跳转外部某个链接重新获取状态,问题出现在这了: https://open.weixin.qq.com/connect/oauth2/authorize?appid=qwe123123qqqq&redirect_uri=http://www.xxxxxx.com/userInfo/Index&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect &字符后面的 redirect_uri scope 都出现了未定义实体的错误, 请问怎么解决
关于Vue中v-for遍历的问题
如图: 使用semanticUI 的tab组件,要实现这个tab切换效果, ![图片说明](https://img-ask.csdn.net/upload/202001/29/1580301878_788972.png) 在静态页面可以切换: 这是原始代码 ``` $('.menu .item').tab(); ---------------------------------- <div class="ui top attached tabular menu"> <a class="active item" data-tab="first">First</a> <a class="item" data-tab="second">Second</a> <a class="item" data-tab="third">Third</a> </div> <div class="ui bottom attached active tab segment" data-tab="first"> First </div> <div class="ui bottom attached tab segment" data-tab="second"> Second </div> <div class="ui bottom attached tab segment" data-tab="third"> Third </div> ``` 我想要实现 的效果是 使用 vue 获取到后台传递过来的tab标签里的分类数据, 点击标签,下方自动切换到对应的div. 自己的代码: ``` <div id="workArea" class="m-container m-padded-tb-big"> <div class="ui top attached tabular menu"> <a v-for="c in categories" class="item" data-tab="first">{{ c.name}}</a> </div> <div class="ui bottom attached active tab segment" data-tab="first"> First </div> </div> ``` 达到这个效果 ![图片说明](https://img-ask.csdn.net/upload/202001/29/1580302472_363102.png) 我想请问一下这个下面的div 要怎么写才能实现这样一个vue切换效果呢 下面是全部代码: ``` <!DOCTYPE html> <html xmlns:th="http://www.w3.org/1999/xhtml"> <head> <meta charset="utf-8"> <title>工具</title> <link rel="stylesheet" type="text/css" href="../../static/css/me.css" th:href="@{/css/me.css}"> <link rel="stylesheet" href="https://cdn.jsdelivr.net/semantic-ui/2.2.4/semantic.min.css"> </head> <body style="background: #439B78;"> <div style="height: 20px;"></div> <div id="workArea" class="m-container m-padded-tb-big"> <div class="ui top attached tabular menu"> <a v-for="c in categories" class="active item" data-tab="first">{{ c.name}}</a> </div> <div class="ui bottom attached active tab segment" data-tab="first"> First </div> </div> <script src="../../static/js/jquery.min.js" th:src="@{/js/jquery.min.js}"></script> <script src="../../static/js/vue.min.js" th:src="@{/js/vue.min.js}"></script> <script src="../../static/js/axios.min.js" th:src="@{/js/axios.min.js}"></script> <script src="https://cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.js"></script> <script type="text/javascript"> $(function(){ var data1 = { uri: 'forekit', categories: [] }; var vue = new Vue({ el: '#workArea', data: data1, mounted:function(){ this.load(); }, methods:{ load: function() { var url = this.uri; axios.get(url).then(function(response){ vue.categories = response.data; }); } } }); $('.menu .item').tab(); }); </script> </body> </html> ```
SpringBoot中@Autowired注入bean失败:Error creating bean with name“XXXController”?
# 报错信息: ``` org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'authorizeController': Unsatisfied dependency expressed through field 'userMapper'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userMapper' defined in file [E:\STS-WorkSpace\Forum\target\classes\com\Forum\mapper\UserMapper.class]: Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Property 'sqlSessionFactory' or 'sqlSessionTemplate' are required at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:643) ~[spring-beans-5.2.2.RELEASE.jar:5.2.2.RELEASE] at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:116) ~[spring-beans-5.2.2.RELEASE.jar:5.2.2.RELEASE] at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:399) ~[spring-beans-5.2.2.RELEASE.jar:5.2.2.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1422) ~[spring-beans-5.2.2.RELEASE.jar:5.2.2.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:594) ~[spring-beans-5.2.2.RELEASE.jar:5.2.2.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517) ~[spring-beans-5.2.2.RELEASE.jar:5.2.2.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:323) ~[spring-beans-5.2.2.RELEASE.jar:5.2.2.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory$$Lambda$141/1866850137.getObject(Unknown Source) ~[na:na] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.2.2.RELEASE.jar:5.2.2.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321) ~[spring-beans-5.2.2.RELEASE.jar:5.2.2.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-5.2.2.RELEASE.jar:5.2.2.RELEASE] at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:879) ~[spring-beans-5.2.2.RELEASE.jar:5.2.2.RELEASE] at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:878) ~[spring-context-5.2.2.RELEASE.jar:5.2.2.RELEASE] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:550) ~[spring-context-5.2.2.RELEASE.jar:5.2.2.RELEASE] at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:141) ~[spring-boot-2.2.2.RELEASE.jar:2.2.2.RELEASE] at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:747) [spring-boot-2.2.2.RELEASE.jar:2.2.2.RELEASE] at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397) [spring-boot-2.2.2.RELEASE.jar:2.2.2.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:315) [spring-boot-2.2.2.RELEASE.jar:2.2.2.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226) [spring-boot-2.2.2.RELEASE.jar:2.2.2.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1215) [spring-boot-2.2.2.RELEASE.jar:2.2.2.RELEASE] at com.Forum.ForumApplication.main(ForumApplication.java:19) [classes/:na] Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userMapper' defined in file [E:\STS-WorkSpace\Forum\target\classes\com\Forum\mapper\UserMapper.class]: Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Property 'sqlSessionFactory' or 'sqlSessionTemplate' are required at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1796) ~[spring-beans-5.2.2.RELEASE.jar:5.2.2.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:595) ~[spring-beans-5.2.2.RELEASE.jar:5.2.2.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517) ~[spring-beans-5.2.2.RELEASE.jar:5.2.2.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:323) ~[spring-beans-5.2.2.RELEASE.jar:5.2.2.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory$$Lambda$141/1866850137.getObject(Unknown Source) ~[na:na] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.2.2.RELEASE.jar:5.2.2.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321) ~[spring-beans-5.2.2.RELEASE.jar:5.2.2.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-5.2.2.RELEASE.jar:5.2.2.RELEASE] at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276) ~[spring-beans-5.2.2.RELEASE.jar:5.2.2.RELEASE] at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1287) ~[spring-beans-5.2.2.RELEASE.jar:5.2.2.RELEASE] at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1207) ~[spring-beans-5.2.2.RELEASE.jar:5.2.2.RELEASE] at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:640) ~[spring-beans-5.2.2.RELEASE.jar:5.2.2.RELEASE] ... 20 common frames omitted Caused by: java.lang.IllegalArgumentException: Property 'sqlSessionFactory' or 'sqlSessionTemplate' are required at org.springframework.util.Assert.notNull(Assert.java:198) ~[spring-core-5.2.2.RELEASE.jar:5.2.2.RELEASE] at org.mybatis.spring.support.SqlSessionDaoSupport.checkDaoConfig(SqlSessionDaoSupport.java:123) ~[mybatis-spring-2.0.1.jar:2.0.1] at org.mybatis.spring.mapper.MapperFactoryBean.checkDaoConfig(MapperFactoryBean.java:73) ~[mybatis-spring-2.0.1.jar:2.0.1] at org.springframework.dao.support.DaoSupport.afterPropertiesSet(DaoSupport.java:44) ~[spring-tx-5.2.2.RELEASE.jar:5.2.2.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1855) ~[spring-beans-5.2.2.RELEASE.jar:5.2.2.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1792) ~[spring-beans-5.2.2.RELEASE.jar:5.2.2.RELEASE] ... 31 common frames omitted ``` # Mapper代码: ``` package com.Forum.mapper; import org.apache.ibatis.annotations.Insert; import org.apache.ibatis.annotations.Mapper; import com.Forum.Model.User; @Mapper public interface UserMapper{ @Insert("insert into user (name,account_id,token,gmt_create,gmt_modified) values (#{name},#{accountId}),#{token},#{gmtCreate},#{gmtModified}") public void insert(User user); } ``` # 启动代码: ``` package com.Forum; import org.mybatis.spring.annotation.MapperScan; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; import org.springframework.context.annotation.ComponentScan; @SpringBootApplication(exclude = {DataSourceAutoConfiguration.class}) @ComponentScan(basePackages = {"com.Forum.*"}) @MapperScan(basePackages = {"com.Forum.mapper"}) public class ForumApplication { public static void main(String[] args) { SpringApplication.run(ForumApplication.class, args); } } ``` # Controller代码: ```package com.Forum.Controller; import java.util.UUID; import javax.servlet.http.HttpServletRequest; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestParam; import com.Forum.Dto.AccesstokenDTO; import com.Forum.Dto.GitHubUser; import com.Forum.Model.User; import com.Forum.Provider.GitHubProvider; import com.Forum.mapper.UserMapper; @Controller public class AuthorizeController{ @Autowired private GitHubProvider gitHubProvider; @Value("${github.client.id}") private String clientId; @Value("${github.client.secret}") private String clientSecret; @Value("${github.redirect.uri}") private String redirectUri; @Autowired public UserMapper userMapper; @GetMapping("/callback") public String callback(@RequestParam(name="code") String code, @RequestParam(name="state") String state, HttpServletRequest request ) { AccesstokenDTO accesstokenDTO = new AccesstokenDTO(); accesstokenDTO.setCode(code); accesstokenDTO.setRedirect_uri("redirectUri"); accesstokenDTO.setClient_id(clientId); accesstokenDTO.setClient_secret(clientSecret); accesstokenDTO.setState(state); String accessToken = gitHubProvider.getAccessToken(accesstokenDTO); GitHubUser githubUser = gitHubProvider.getUser(accessToken); if(githubUser != null) { // 登录成功,写cookie和session User user = new User(); user.setToken(UUID.randomUUID().toString()); user.setName(githubUser.getName()); user.setAccountId(String.valueOf(githubUser.getId())); user.setQmtCreate(System.currentTimeMillis()); user.setQmtModified(user.getQmtCreate()); userMapper.insert(user); request.getSession().setAttribute("user", githubUser); return "redirect:/"; // 去掉地址后缀 }else { // 登录失败,重新登录 return "redirect:/"; } } } ```
Android调用摄像头录像时出现空指针异常
Process: com.android.camera2, PID: 21756 java.lang.NullPointerException: Attempt to invoke virtual method 'void com.android.camera.FocusOverlayManager.overrideFocusMode(com.android.ex.camera2.portability.CameraCapabilities$FocusMode)' on a null object reference ``` private void startVideo() { Intent intent = new Intent(); //指定动作,启动相机 intent.setAction(MediaStore.ACTION_VIDEO_CAPTURE); intent.addCategory(Intent.CATEGORY_DEFAULT); Log.d(TAG, "指定启动相机动作,完成。"); //创建文件 createVideoFile(); Log.d(TAG, "创建视频文件结束。"); //添加权限 intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION); Log.d(TAG, "添加权限。"); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { //做一些处理 //获取uri mVideoUri = FileProvider.getUriForFile(this, "com.example.camera.fileprovider", mVideoFile); } else { //在版本低于此的时候,做一些处理 mVideoUri = Uri.fromFile(mVideoFile); } Log.d(TAG, "根据视频文件路径获取uri。"); //将uri加入到额外数据 intent.putExtra(MediaStore.EXTRA_OUTPUT, mVideoUri); Log.d(TAG, "将uri加入启动相机的额外数据。"); Log.d(TAG, "启动相机..."); //启动相机并要求返回结果 startActivityForResult(intent, VIDEO_RESULT_CODE); Log.d(TAG, "拍摄中..."); } ```
本人是初学者看一些代码有些不懂,还请大神指点一下,谢谢
${ msg }表示什么意思呢??? index.jsp怎么跳转到main.jsp呢??? **index.jsp** ``` <html > <title>聊天室</title> <link href="CSS/style.css" rel="stylesheet"> <script type="text/javascript"> function check(){ if(document.getElementById("form1").username.value==""){ alert("请输入用户名!"); document.getElementById("form1").username.focus(); return false; } if(document.getElementById("form1").password.value==""){ alert("请输入密码名!"); document.getElementById("form1").password.focus(); return false; } } </script> <body> <br> <center><h3 style="color:red;">${ msg }</h3></center> <form id="form1" name="form1" method="post" action="${pageContext.request.contextPath }/user" onSubmit="return check()"> <input type="hidden" name="method" value="login"> <table width="371" height="230" border="0" align="center" cellpadding="0" cellspacing="0" background="images/login.jpg"> <tr> <td height="120" colspan="3" class="word_dark">&nbsp;</td> </tr> <tr> <td width="53" align="center" valign="top" class="word_dark">&nbsp;</td> <td width="216" align="center" valign="top" class="word_dark"> <table width="100%" height="100%"> <tr> <td>用户名:</td> <td><input type="text" name="username" class="login"></td> </tr> </table> </td> <td width="94" valign="top" class="word_dark"></td> </tr> <tr> <td width="53" align="center" valign="top" class="word_dark">&nbsp;</td> <td width="216" align="center" valign="top" class="word_dark"> <table width="100%" height="100%"> <tr> <td>密&nbsp;&nbsp;码:</td> <td><input type="password" name="password" class="login"></td> </tr> </table> </td> <td width="94" valign="top" class="word_dark"></td> </tr> <tr> <td width="53" align="center" valign="top" class="word_dark">&nbsp;</td> <td width="216" align="center" valign="top" class="word_dark"> <input name="Submit" type="submit" class="btn_bg" value="进 入"> </td> <td width="94" valign="top" class="word_dark"> </td> </tr> </table> </form> </body> </html> ``` **main** ``` <%@page contentType="text/html" pageEncoding="UTF-8"%> <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> <%@ include file="safe.jsp"%> <html> <head> <title>聊天室</title> <link href="CSS/style.css" rel="stylesheet"> <script type="text/javascript" src="${ pageContext.request.contextPath }/js/jquery-1.8.3.js"></script> <script type="text/javascript"> var sysBBS = "<span style='font-size:14px; line-height:30px;'>欢迎光临心之语聊天室,请遵守聊天室规则,不要使用不文明用语。</span><br><span style='line-height:22px;'>";var sysBBS = "<span style='font-size:14px; line-height:30px;'>欢迎光临心之语聊天室,请遵守聊天室规则,不要使用不文明用语。</span><br><span style='line-height:22px;'>"; window.setInterval("showContent();",1000); window.setInterval("showOnLine();",10000); window.setInterval("check();",1000); // Jquery:JS框架. // 相当于window.onload $(function(){ showOnLine(); showContent(); check(); }); function check(){ $.post("${pageContext.request.contextPath}/user?method=check",function(data){ if(data == 1){ // 提示用户下线了 alert("用户已经被踢下线了!"); // 回到登录页面! window.location = "index.jsp"; } }); } // 显示在线人员列表 function showOnLine(){ // 异步发送请求 获取在线人员列表 // Jquery发送异步请求 $.post("${pageContext.request.contextPath}/online.jsp?"+new Date().getTime(),function(data){ // $("#online") == document.getElementById("online"); $("#online").html(data); }); } // 显示聊天的内容 function showContent(){ $.post("${pageContext.request.contextPath}/user?"+new Date().getTime(),{'method':'getMessage'},function(data){ $("#content").html(sysBBS+data); }); } function set(selectPerson){ //自动添加聊天对象 if(selectPerson != "${existUser.username}"){ form1.to.value=selectPerson; }else{ alert("请重新选择聊天对象!"); } } function send(){ if(form1.to.value==""){ alert("请选择聊天对象!"); return false; } if(form1.content.value==""){ alert("发送信息不可以为空!"); form1.content.focus(); return false; } // $("#form1").serialize():让表单中所有的元素都提交. // jquery提交数据.{id:1,name:aa,age:25} $.post("${pageContext.request.contextPath}/user?"+new Date().getTime(),$("#form1").serialize(),function(data){ $("#content").html(sysBBS+data+"</span>"); }); } function exit(){ alert("欢迎您下次光临!"); window.location.href="${pageContext.request.contextPath}/user?method=exit"; } function checkScrollScreen(){ if(!$("#scrollScreen").attr("checked")){ $("#content").css("overflow","scroll"); }else{ $("#content").css("overflow","hidden"); //当聊天信息超过一屏时,设置最先发送的聊天信息不显示 //alert($("#content").height()); $("#content").scrollTop($("#content").height()*2); } setTimeout('checkScrollScreen()',500); } </script> </head> <body> <table width="778" height="150" border="0" align="center" cellpadding="0" cellspacing="0" background="images/top.jpg"> <tr> <td>&nbsp;</td> </tr> </table> <table width="778" height="276" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td width="165" valign="top" bgcolor="#f6fded" id="online" style="padding:5px">在线人员列表</td> <td width="613" height="200px" valign="top" background="images/main_bj.jpg" bgcolor="#FFFFFF" style="padding:5px; "> <div style="height:290px; overflow:hidden" id="content">聊天内容</div></td> </tr> </table> <table width="778" height="95" border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="#D6D3CE" background="images/bottom.jpg"> <form action="" id="form1" name="form1" method="post"> <input type="hidden" name="method" value="sendMessage"/> <tr> <td height="30" align="left">&nbsp;</td> <td height="37" align="left"> <input name="from" type="hidden" value="${existUser.username}">[${existUser.username} ]对 <input name="to" type="text" value="" size="35" readonly="readonly"> 表情 <select name="face" class="wenbenkuang"> <option value="无精打采的">无精打采的</option> </select> 说:</td> <td width="189" align="left">&nbsp;&nbsp;字体颜色: <select name="color" size="1" class="wenbenkuang" id="select"> <option selected>默认颜色</option> <option style="color:#999999" value="999999">烟雨蒙蒙</option> </select> </td> <td width="19" align="left"><input name="scrollScreen" type="checkbox" class="noborder" id="scrollScreen" onClick="checkScrollScreen()" value="1" checked> </td> </tr> <tr> <td width="21" height="30" align="left">&nbsp;</td> <td width="549" align="left"> <input name="content" type="text" size="70" onKeyDown="if(event.keyCode==13 && event.ctrlKey){send();}"> <input name="Submit2" type="button" class="btn_grey" value="发送" onClick="send()"> </td> <td align="right"><input name="button_exit" type="button" class="btn_grey" value="退出聊天室" onClick="exit()"> </td> <td align="center">&nbsp;</td> </tr> <tr> <td height="30" align="left">&nbsp;</td> <td align="center">&nbsp;</td> </tr> </form> </table> </body> </html> ```
spring cloud gateway (Greenwich.SR2): how to route a request to a controller of itself ?
spring cloud gateway (Greenwich.SR2): how to route a request to a controller of itself ? I write several controller http api to maintain the gateway configuration data in mysql. I write the Decryption/Encryption logic for the request/response in the Filters. I wanna implement like this: ```r.path("/gateway/**").uri( itself );``` such as http://ip:port/gateway/addServiceInfo will route to the api of this/current instance: ```@Controller MaintainController{ @PostMapping("addServiceInfo") addServiceInfo(){ //do something } }```
spring cloud gateway 自定义负载均衡getLoadBalancer()获取的服务总是同一个服务
根据业务需求,我需要自定义负载均衡规则,获取相应的服务,然后返回; 代码如下: 继承LoadBalancerClientFilter 重写choose方法; ``` protected ServiceInstance choose(ServerWebExchange exchange) { //获取用户票据信息 String ticket= AuthTicketUtils.getBxAuthTicket(exchange.getRequest()); logger.info("=====获取用户登录票据信息:{}============",ticket); if(!StringUtils.isEmpty(ticket)){ //根据ticket获取用户信息 if (this.loadBalancer instanceof RibbonLoadBalancerClient) { RibbonLoadBalancerClient client = (RibbonLoadBalancerClient) this.loadBalancer; String userId=getUserNo(ticket); logger.info("========当前操作用户信息为:{}=============",userId); if(null == userId){ return super.choose(exchange); } //获取服务名称 String serviceId = ((URI) exchange.getAttribute(GATEWAY_REQUEST_URL_ATTR)).getHost(); logger.info("===========当前选择服务名称为:{}===========",serviceId); //这里使用服务ID 和 用户ID 做为选择服务实例的key GrayscaleProperties grayscaleProperties=new GrayscaleProperties(); grayscaleProperties.setServerId(serviceId); grayscaleProperties.setUserId(userId); return client.choose(serviceId,grayscaleProperties); } } return super.choose(exchange); } ``` 当调用client.choose(String name,Object hint)方法时,将会调用我的规则,我的自定义规则代码如下:首先继承了AbstractLoadBalancerRule类,重写choose方法 ``` public Server choose(Object o) { logger.info("=======服务选择:{}=======",o); //获取当前请求的所有服务 logger.info("============LoadBalancer:{}==============",this.getLoadBalancer().toString()); List<Server> servers = this.getLoadBalancer().getReachableServers(); //TODO 逻辑代码省略 return null; } ``` 当调用this.getLoadBalancer()时,返回的总是上一次正确的服务,举例来说我有A、B、C三个服务,当第一次请求A服务的时候正常返回,第二次B服务请求的时候,this.getLoadBalancer()返回的对象信息是A服务的信息; 附图: ![图片说明](https://img-ask.csdn.net/upload/202001/08/1578459146_182033.png) ![图片说明](https://img-ask.csdn.net/upload/202001/08/1578459161_886142.png)
Active MQ 在Centos无法启动
如题,启动信息如下,这是什么情况啊 ``` INFO: Loading '/usr/local/activemq/apache-activemq-5.15.10//bin/env' INFO: Using java '/usr/java/jdk1.8.0_221/bin/java' Java Runtime: Oracle Corporation 1.8.0_221 /usr/java/jdk1.8.0_221/jre Heap sizes: current=63360k free=62653k max=1013632k JVM args: -Xms64M -Xmx1G -Djava.util.logging.config.file=logging.properties -Djava.security.auth.login.config=/usr/local/activemq/apache-activemq-5.15.10//conf/login.config -Dactivemq.classpath=/usr/local/activemq/apache-activemq-5.15.10//conf:/usr/local/activemq/apache-activemq-5.15.10//../lib/: -Dactivemq.home=/usr/local/activemq/apache-activemq-5.15.10/ -Dactivemq.base=/usr/local/activemq/apache-activemq-5.15.10/ -Dactivemq.conf=/usr/local/activemq/apache-activemq-5.15.10//conf -Dactivemq.data=/usr/local/activemq/apache-activemq-5.15.10//data Extensions classpath: [/usr/local/activemq/apache-activemq-5.15.10/lib,/usr/local/activemq/apache-activemq-5.15.10/lib/camel,/usr/local/activemq/apache-activemq-5.15.10/lib/optional,/usr/local/activemq/apache-activemq-5.15.10/lib/web,/usr/local/activemq/apache-activemq-5.15.10/lib/extra] ACTIVEMQ_HOME: /usr/local/activemq/apache-activemq-5.15.10 ACTIVEMQ_BASE: /usr/local/activemq/apache-activemq-5.15.10 ACTIVEMQ_CONF: /usr/local/activemq/apache-activemq-5.15.10/conf ACTIVEMQ_DATA: /usr/local/activemq/apache-activemq-5.15.10/data Usage: ./activemq [--extdir <dir>] [task] [task-options] [task data] Tasks: browse - Display selected messages in a specified destination. bstat - Performs a predefined query that displays useful statistics regarding the specified broker consumer - Receives messages from the broker create - Creates a runnable broker instance in the specified path. decrypt - Decrypts given text dstat - Performs a predefined query that displays useful tabular statistics regarding the specified destination type encrypt - Encrypts given text export - Exports a stopped brokers data files to an archive file list - Lists all available brokers in the specified JMX context producer - Sends messages to the broker purge - Delete selected destination's messages that matches the message selector query - Display selected broker component's attributes and statistics. start - Creates and starts a broker using a configuration file, or a broker URI. stop - Stops a running broker specified by the broker name. Task Options (Options specific to each task): --extdir <dir> - Add the jar files in the directory to the classpath. --version - Display the version information. -h,-?,--help - Display this help information. To display task specific help, use Main [task] -h,-?,--help Task Data: - Information needed by each specific task. JMX system property options: -Dactivemq.jmx.url=<jmx service uri> (default is: 'service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi') -Dactivemq.jmx.user=<user name> -Dactivemq.jmx.password=<password> Tasks provided by the sysv init script: kill - terminate instance in a drastic way by sending SIGKILL restart - stop running instance (if there is one), start new instance console - start broker in foreground, useful for debugging purposes status - check if activemq process is running Configuration of this script: The configuration of this script is read from the following files: /etc/default/activemq /root/.activemqrc /usr/local/activemq/apache-activemq-5.15.10//bin/env This script searches for the files in the listed order and reads the first available file. Modify /usr/local/activemq/apache-activemq-5.15.10//bin/env or create a copy of that file on a suitable location. To use additional configurations for running multiple instances on the same operating system rename or symlink script to a name matching to activemq-instance-<INSTANCENAME>. This changes the configuration location to /etc/default/activemq-instance-<INSTANCENAME> and $HOME/.activemqrc-instance-<INSTANCENAME>. ```
终于明白阿里百度这样的大公司,为什么面试经常拿ThreadLocal考验求职者了
点击上面↑「爱开发」关注我们每晚10点,捕获技术思考和创业资源洞察什么是ThreadLocalThreadLocal是一个本地线程副本变量工具类,各个线程都拥有一份线程私...
程序员必须掌握的核心算法有哪些?
由于我之前一直强调数据结构以及算法学习的重要性,所以就有一些读者经常问我,数据结构与算法应该要学习到哪个程度呢?,说实话,这个问题我不知道要怎么回答你,主要取决于你想学习到哪些程度,不过针对这个问题,我稍微总结一下我学过的算法知识点,以及我觉得值得学习的算法。这些算法与数据结构的学习大多数是零散的,并没有一本把他们全部覆盖的书籍。下面是我觉得值得学习的一些算法以及数据结构,当然,我也会整理一些看过...
Linux(服务器编程):15---两种高效的事件处理模式(reactor模式、proactor模式)
前言 同步I/O模型通常用于实现Reactor模式 异步I/O模型则用于实现Proactor模式 最后我们会使用同步I/O方式模拟出Proactor模式 一、Reactor模式 Reactor模式特点 它要求主线程(I/O处理单元)只负责监听文件描述符上是否有事件发生,有的话就立即将时间通知工作线程(逻辑单元)。除此之外,主线程不做任何其他实质性的工作 读写数据,接受新的连接,以及处...
阿里面试官问我:如何设计秒杀系统?我的回答让他比起大拇指
你知道的越多,你不知道的越多 点赞再看,养成习惯 GitHub上已经开源 https://github.com/JavaFamily 有一线大厂面试点脑图和个人联系方式,欢迎Star和指教 前言 Redis在互联网技术存储方面使用如此广泛,几乎所有的后端技术面试官都要在Redis的使用和原理方面对小伙伴们进行360°的刁难。 作为一个在互联网公司面一次拿一次Offer的面霸,打败了...
五年程序员记流水账式的自白。
不知觉已中码龄已突破五年,一路走来从起初铁憨憨到现在的十九线程序员,一路成长,虽然不能成为高工,但是也能挡下一面,从15年很火的android开始入坑,走过java、.Net、QT,目前仍处于android和.net交替开发中。 毕业到现在一共就职过两家公司,目前是第二家,公司算是半个创业公司,所以基本上都会身兼多职。比如不光要写代码,还要写软著、软著评测、线上线下客户对接需求收集...
C语言魔塔游戏
很早就很想写这个,今天终于写完了。 游戏截图: 编译环境: VS2017 游戏需要一些图片,如果有想要的或者对游戏有什么看法的可以加我的QQ 2985486630 讨论,如果暂时没有回应,可以在博客下方留言,到时候我会看到。 下面我来介绍一下游戏的主要功能和实现方式 首先是玩家的定义,使用结构体,这个名字是可以自己改变的 struct gamerole { char n...
一文详尽系列之模型评估指标
点击上方“Datawhale”,选择“星标”公众号第一时间获取价值内容在机器学习领域通常会根据实际的业务场景拟定相应的不同的业务指标,针对不同机器学习问题如回归、分类、排...
究竟你适不适合买Mac?
我清晰的记得,刚买的macbook pro回到家,开机后第一件事情,就是上了淘宝网,花了500元钱,找了一个上门维修电脑的师傅,上门给我装了一个windows系统。。。。。。 表砍我。。。 当时买mac的初衷,只是想要个固态硬盘的笔记本,用来运行一些复杂的扑克软件。而看了当时所有的SSD笔记本后,最终决定,还是买个好(xiong)看(da)的。 已经有好几个朋友问我mba怎么样了,所以今天尽量客观...
程序员一般通过什么途径接私活?
二哥,你好,我想知道一般程序猿都如何接私活,我也想接,能告诉我一些方法吗? 上面是一个读者“烦不烦”问我的一个问题。其实不止是“烦不烦”,还有很多读者问过我类似这样的问题。 我接的私活不算多,挣到的钱也没有多少,加起来不到 20W。说实话,这个数目说出来我是有点心虚的,毕竟太少了,大家轻喷。但我想,恰好配得上“一般程序员”这个称号啊。毕竟苍蝇再小也是肉,我也算是有经验的人了。 唾弃接私活、做外...
压测学习总结(1)——高并发性能指标:QPS、TPS、RT、吞吐量详解
一、QPS,每秒查询 QPS:Queries Per Second意思是“每秒查询率”,是一台服务器每秒能够相应的查询次数,是对一个特定的查询服务器在规定时间内所处理流量多少的衡量标准。互联网中,作为域名系统服务器的机器的性能经常用每秒查询率来衡量。 二、TPS,每秒事务 TPS:是TransactionsPerSecond的缩写,也就是事务数/秒。它是软件测试结果的测量单位。一个事务是指一...
Python爬虫爬取淘宝,京东商品信息
小编是一个理科生,不善长说一些废话。简单介绍下原理然后直接上代码。 使用的工具(Python+pycharm2019.3+selenium+xpath+chromedriver)其中要使用pycharm也可以私聊我selenium是一个框架可以通过pip下载 pip installselenium -ihttps://pypi.tuna.tsinghua.edu.cn/simple/ ...
阿里程序员写了一个新手都写不出的低级bug,被骂惨了。
这种新手都不会范的错,居然被一个工作好几年的小伙子写出来,差点被当场开除了。
Java工作4年来应聘要16K最后没要,细节如下。。。
前奏: 今天2B哥和大家分享一位前几天面试的一位应聘者,工作4年26岁,统招本科。 以下就是他的简历和面试情况。 基本情况: 专业技能: 1、&nbsp;熟悉Sping了解SpringMVC、SpringBoot、Mybatis等框架、了解SpringCloud微服务 2、&nbsp;熟悉常用项目管理工具:SVN、GIT、MAVEN、Jenkins 3、&nbsp;熟悉Nginx、tomca...
2020年,冯唐49岁:我给20、30岁IT职场年轻人的建议
点击“技术领导力”关注∆每天早上8:30推送 作者|Mr.K 编辑| Emma 来源|技术领导力(ID:jishulingdaoli) 前天的推文《冯唐:职场人35岁以后,方法论比经验重要》,收到了不少读者的反馈,觉得挺受启发。其实,冯唐写了不少关于职场方面的文章,都挺不错的。可惜大家只记住了“春风十里不如你”、“如何避免成为油腻腻的中年人”等不那么正经的文章。 本文整理了冯...
程序员该看的几部电影
1、骇客帝国(1999) 概念:在线/离线,递归,循环,矩阵等 剧情简介: 不久的将来,网络黑客尼奥对这个看似正常的现实世界产生了怀疑。 他结识了黑客崔妮蒂,并见到了黑客组织的首领墨菲斯。 墨菲斯告诉他,现实世界其实是由一个名叫“母体”的计算机人工智能系统控制,人们就像他们饲养的动物,没有自由和思想,而尼奥就是能够拯救人类的救世主。 可是,救赎之路从来都不会一帆风顺,到底哪里才是真实的世界?如何...
Python绘图,圣诞树,花,爱心 | Turtle篇
每周每日,分享Python实战代码,入门资料,进阶资料,基础语法,爬虫,数据分析,web网站,机器学习,深度学习等等。 公众号回复【进群】沟通交流吧,QQ扫码进群学习吧 微信群 QQ群 1.画圣诞树 import turtle screen = turtle.Screen() screen.setup(800,600) circle = turtle.Turtle()...
作为一个程序员,CPU的这些硬核知识你必须会!
CPU对每个程序员来说,是个既熟悉又陌生的东西? 如果你只知道CPU是中央处理器的话,那可能对你并没有什么用,那么作为程序员的我们,必须要搞懂的就是CPU这家伙是如何运行的,尤其要搞懂它里面的寄存器是怎么一回事,因为这将让你从底层明白程序的运行机制。 随我一起,来好好认识下CPU这货吧 把CPU掰开来看 对于CPU来说,我们首先就要搞明白它是怎么回事,也就是它的内部构造,当然,CPU那么牛的一个东...
还记得那个提速8倍的IDEA插件吗?VS Code版本也发布啦!!
去年,阿里云发布了本地 IDE 插件 Cloud Toolkit,仅 IntelliJ IDEA 一个平台,就有 15 万以上的开发者进行了下载,体验了一键部署带来的开发便利。时隔一年的今天,阿里云正式发布了 Visual Studio Code 版本,全面覆盖前端开发者,帮助前端实现一键打包部署,让开发提速 8 倍。 VSCode 版本的插件,目前能做到什么? 安装插件之后,开发者可以立即体验...
破14亿,Python分析我国存在哪些人口危机!
一、背景 二、爬取数据 三、数据分析 1、总人口 2、男女人口比例 3、人口城镇化 4、人口增长率 5、人口老化(抚养比) 6、各省人口 7、世界人口 四、遇到的问题 遇到的问题 1、数据分页,需要获取从1949-2018年数据,观察到有近20年参数:LAST20,由此推测获取近70年的参数可设置为:LAST70 2、2019年数据没有放上去,可以手动添加上去 3、将数据进行 行列转换 4、列名...
2019年除夕夜的有感而发
天气:小雨(加小雪) 温度:3摄氏度 空气:严重污染(399) 风向:北风 风力:微风 现在是除夕夜晚上十点钟,再有两个小时就要新的一年了; 首先要说的是我没患病,至少现在是没有患病;但是心情确像患了病一样沉重; 现在这个时刻应该大部分家庭都在看春晚吧,或许一家人团团圆圆的坐在一起,或许因为某些特殊原因而不能团圆;但不管是身在何处,身处什么境地,我都想对每一个人说一句:新年快乐! 不知道csdn这...
听说想当黑客的都玩过这个Monyer游戏(1~14攻略)
第零关 进入传送门开始第0关(游戏链接) 请点击链接进入第1关: 连接在左边→ ←连接在右边 看不到啊。。。。(只能看到一堆大佬做完的留名,也能看到菜鸡的我,在后面~~) 直接fn+f12吧 &lt;span&gt;连接在左边→&lt;/span&gt; &lt;a href="first.php"&gt;&lt;/a&gt; &lt;span&gt;←连接在右边&lt;/span&gt; o...
在家远程办公效率低?那你一定要收好这个「在家办公」神器!
相信大家都已经收到国务院延长春节假期的消息,接下来,在家远程办公可能将会持续一段时间。 但是问题来了。远程办公不是人在电脑前就当坐班了,相反,对于沟通效率,文件协作,以及信息安全都有着极高的要求。有着非常多的挑战,比如: 1在异地互相不见面的会议上,如何提高沟通效率? 2文件之间的来往反馈如何做到及时性?如何保证信息安全? 3如何规划安排每天工作,以及如何进行成果验收? ...... ...
作为一个程序员,内存和磁盘的这些事情,你不得不知道啊!!!
截止目前,我已经分享了如下几篇文章: 一个程序在计算机中是如何运行的?超级干货!!! 作为一个程序员,CPU的这些硬核知识你必须会! 作为一个程序员,内存的这些硬核知识你必须懂! 这些知识可以说是我们之前都不太重视的基础知识,可能大家在上大学的时候都学习过了,但是嘞,当时由于老师讲解的没那么有趣,又加上这些知识本身就比较枯燥,所以嘞,大家当初几乎等于没学。 再说啦,学习这些,也看不出来有什么用啊!...
2020年的1月,我辞掉了我的第一份工作
其实,这篇文章,我应该早点写的,毕竟现在已经2月份了。不过一些其它原因,或者是我的惰性、还有一些迷茫的念头,让自己迟迟没有试着写一点东西,记录下,或者说是总结下自己前3年的工作上的经历、学习的过程。 我自己知道的,在写自己的博客方面,我的文笔很一般,非技术类的文章不想去写;另外我又是一个还比较热衷于技术的人,而平常复杂一点的东西,如果想写文章写的清楚点,是需要足够...
别低估自己的直觉,也别高估自己的智商
所有群全部吵翻天,朋友圈全部沦陷,公众号疯狂转发。这两周没怎么发原创,只发新闻,可能有人注意到了。我不是懒,是文章写了却没发,因为大家的关注力始终在这次的疫情上面,发了也没人看。当然,我...
这个世界上人真的分三六九等,你信吗?
偶然间,在知乎上看到一个问题 一时间,勾起了我深深的回忆。 以前在厂里打过两次工,做过家教,干过辅导班,做过中介。零下几度的晚上,贴过广告,满脸、满手地长冻疮。 再回首那段岁月,虽然苦,但让我学会了坚持和忍耐。让我明白了,在这个世界上,无论环境多么的恶劣,只要心存希望,星星之火,亦可燎原。 下文是原回答,希望能对你能有所启发。 如果我说,这个世界上人真的分三六九等,...
节后首个工作日,企业们集体开晨会让钉钉挂了
By 超神经场景描述:昨天 2 月 3 日,是大部分城市号召远程工作的第一天,全国有接近 2 亿人在家开始远程办公,钉钉上也有超过 1000 万家企业活跃起来。关键词:十一出行 人脸...
Java基础知识点梳理
虽然已经在实际工作中经常与java打交道,但是一直没系统地对java这门语言进行梳理和总结,掌握的知识也比较零散。恰好利用这段时间重新认识下java,并对一些常见的语法和知识点做个总结与回顾,一方面为了加深印象,方便后面查阅,一方面为了掌握好Android打下基础。
2020年全新Java学习路线图,含配套视频,学完即为中级Java程序员!!
新的一年来临,突如其来的疫情打破了平静的生活! 在家的你是否很无聊,如果无聊就来学习吧! 世上只有一种投资只赚不赔,那就是学习!!! 传智播客于2020年升级了Java学习线路图,硬核升级,免费放送! 学完你就是中级程序员,能更快一步找到工作! 一、Java基础 JavaSE基础是Java中级程序员的起点,是帮助你从小白到懂得编程的必经之路。 在Java基础板块中有6个子模块的学...
B 站上有哪些很好的学习资源?
哇说起B站,在小九眼里就是宝藏般的存在,放年假宅在家时一天刷6、7个小时不在话下,更别提今年的跨年晚会,我简直是跪着看完的!! 最早大家聚在在B站是为了追番,再后来我在上面刷欧美新歌和漂亮小姐姐的舞蹈视频,最近两年我和周围的朋友们已经把B站当作学习教室了,而且学习成本还免费,真是个励志的好平台ヽ(.◕ฺˇд ˇ◕ฺ;)ノ 下面我们就来盘点一下B站上优质的学习资源: 综合类 Oeasy: 综合...
相关热词 c#导入fbx c#中屏蔽键盘某个键 c#正态概率密度 c#和数据库登陆界面设计 c# 高斯消去法 c# codedom c#读取cad文件文本 c# 控制全局鼠标移动 c# temp 目录 bytes初始化 c#
立即提问