javax.servlet.jsp.PageContext类
javax.servlet.jsp.PageContext源码
java.lang.Object|--javax.servlet.jsp.JspContext|--javax.servlet.jsp.PageContext
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/package javax.servlet.jsp;import java.io.IOException;import javax.servlet.RequestDispatcher;
import javax.servlet.Servlet;
import javax.servlet.ServletConfig;
import javax.servlet.ServletContext;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpSession;
import javax.servlet.jsp.tagext.BodyContent;/*** <p>* PageContext extends JspContext to provide useful context information for* when JSP technology is used in a Servlet environment.PageContext继承了JspContext类,当在Servlet环境中使用JSP技术,这提供了很有用的信息。* <p>* A PageContext instance provides access to all the namespaces associated* with a JSP page, provides access to several page attributes, as well as* a layer above the implementation details. Implicit objects are added* to the pageContext automatically.PageContext实例提供对与JSP页面关联的所有名称空间的访问,提供对几个页面属性的访问,以及对实现细节之上的层的访问(指的就是四大域对象)。隐式对象被自动添加到pageContext中(指的就是九大内置对象)。* <p> The <code> PageContext </code> class is an abstract class, designed to be* extended to provide implementation dependent implementations thereof, by* conformant JSP engine runtime environments. A PageContext instance is* obtained by a JSP implementation class by calling the* JspFactory.getPageContext() method, and is released by calling* JspFactory.releasePageContext().PageContext类是一个抽象类,专门用来被继承,然后提供与其相关的实现,符合JSP的运行环境。JspFactory.getPageContext()方法可以创建PageContext实例JspFactory.releasePageContext()方法可以释放PageContext实例* <p> An example of how PageContext, JspFactory, and other classes can be* used within a JSP Page Implementation object is given elsewhere.在其他地方指明了在一个JSP页面实现对象中如何使用PageContext, JspFactory和其他类。* <p>* The PageContext provides a number of facilities to the page/component* author and page implementor, including:PageContext提供了页面和组件的作者提供了很多的工具,包括:* <ul>* <li>a single API to manage the various scoped namespaces>> 一个单独的API用来管理不同范围的名称空间* <li>a number of convenience API's to access various public objects>> 许多便利的API可以访问各种公共对象* <li>a mechanism to obtain the JspWriter for output>> 可以获取JspWirter实现输出的机制* <li>a mechanism to manage session usage by the page>> 通过页面来管理会话使用的机制* <li>a mechanism to expose page directive attributes to the scripting* environment>> 讲页面指令属性公开给脚本环境的机制* <li>mechanisms to forward or include the current request to other active* components in the application>> 将当前请求转发给应用程序其他活动组件的机制* <li>a mechanism to handle errorpage exception processing>> 处理错误页面异常的机制* </ul>** <p><B>Methods Intended for Container Generated Code</B>* <p>Some methods are intended to be used by the code generated by the* container, not by code written by JSP page authors, or JSP tag library* authors.* <p>The methods supporting <B>lifecycle</B> are <code>initialize()</code>* and <code>release()</code>容器生成代码的方法:initializa()release()* <p>* The following methods enable the <B>management of nested</B> JspWriter* streams to implement Tag Extensions: <code>pushBody()</code>嵌套管理:
pushBody()* <p><B>Methods Intended for JSP authors</B>* <p>* The following methods provide <B>convenient access</B> to implicit objects:* <code>getException()</code>, <code>getPage()</code>* <code>getRequest()</code>, <code>getResponse()</code>,* <code>getSession()</code>, <code>getServletConfig()</code>* and <code>getServletContext()</code>.针对JSP作者的方法:getException()getPage()getRequest()getResponse()getSession()getServletConfig()getServletContext()* <p>* The following methods provide support for <B>forwarding, inclusion* and error handling</B>:* <code>forward()</code>, <code>include()</code>,* and <code>handlePageException()</code>.其余的方法用来:请求转发,包含,处理页面异常:forward()include()handlePageException()*/public abstract class PageContext extends JspContext{/*** Sole constructor. (For invocation by subclass constructors,* typically implicit.)*/public PageContext() {// NOOP by default}/**************************************四大域***********************************//*** Page scope: (this is the default) the named reference remains available* in this PageContext until the return from the current Servlet.service()* invocation.*/// 默认为Page域(最小域),直到从当前的Servelet.service()启用返回都有效public static final int PAGE_SCOPE = 1;/*** Request scope: the named reference remains available from the* ServletRequest associated with the Servlet until the current request* is completed.*/// Request域,直到当前请求结束都有效public static final int REQUEST_SCOPE = 2;/*** Session scope (only valid if this page participates in a session):* the named reference remains available from the HttpSession (if any)* associated with the Servlet until the HttpSession is invalidated.*/// Session域(仅当此页面参与会话才有效)// HttpSession无效时则终止public static final int SESSION_SCOPE = 3;/*** Application scope: named reference remains available in the* ServletContext until it is reclaimed.*/// Application域,直到被回收都有效public static final int APPLICATION_SCOPE = 4;/**************************************四大域***********************************//**************************************九大内置对象***********************************//*** Name used to store the Servlet in this PageContext's nametables.*/public static final String PAGE = "javax.servlet.jsp.jspPage";/*** Name used to store this PageContext in it's own name table.*/public static final String PAGECONTEXT = "javax.servlet.jsp.jspPageContext";/*** Name used to store ServletRequest in PageContext name table.*/public static final String REQUEST = "javax.servlet.jsp.jspRequest";/*** Name used to store ServletResponse in PageContext name table.*/public static final String RESPONSE = "javax.servlet.jsp.jspResponse";/*** Name used to store ServletConfig in PageContext name table.*/public static final String CONFIG = "javax.servlet.jsp.jspConfig";/*** Name used to store HttpSession in PageContext name table.*/public static final String SESSION = "javax.servlet.jsp.jspSession";/*** Name used to store current JspWriter in PageContext name table.*/public static final String OUT = "javax.servlet.jsp.jspOut";/*** Name used to store ServletContext in PageContext name table.*/public static final String APPLICATION = "javax.servlet.jsp.jspApplication";/*** Name used to store uncaught exception in ServletRequest attribute* list and PageContext name table.*/public static final String EXCEPTION = "javax.servlet.jsp.jspException";/**************************************九大内置对象***********************************//*** <p>* The initialize method is called to initialize an uninitialized PageContext* so that it may be used by a JSP Implementation class to service an* incoming request and response within it's _jspService() method.** <p>* This method is typically called from JspFactory.getPageContext() in* order to initialize state.** <p>* This method is required to create an initial JspWriter, and associate* the "out" name in page scope with this newly created object.* <p>* This method should not be used by page or tag library authors.** @param servlet The Servlet that is associated with this PageContext* @param request The currently pending request for this Servlet* @param response The currently pending response for this Servlet* @param errorPageURL The value of the errorpage attribute from the page* directive or null* @param needsSession The value of the session attribute from the* page directive* @param bufferSize The value of the buffer attribute from the page* directive* @param autoFlush The value of the autoflush attribute from the page* directive** @throws IOException during creation of JspWriter* @throws IllegalStateException if out not correctly initialized* @throws IllegalArgumentException If one of the given parameters* is invalid*/public abstract void initialize(Servlet servlet, ServletRequest request,ServletResponse response, String errorPageURL, boolean needsSession,int bufferSize, boolean autoFlush)throws IOException, IllegalStateException, IllegalArgumentException;/*** <p>* This method shall "reset" the internal state of a PageContext, releasing* all internal references, and preparing the PageContext for potential* reuse by a later invocation of initialize(). This method is typically* called from JspFactory.releasePageContext().** <p>* Subclasses shall envelope this method.** <p>* This method should not be used by page or tag library authors.**/public abstract void release();/*** The current value of the session object (an HttpSession).** @return the HttpSession for this PageContext or null*/public abstract HttpSession getSession();/*** The current value of the page object (In a Servlet environment,* this is an instance of javax.servlet.Servlet).** @return the Page implementation class instance associated* with this PageContext*/public abstract Object getPage();/*** The current value of the request object (a ServletRequest).** @return The ServletRequest for this PageContext*/public abstract ServletRequest getRequest();/*** The current value of the response object (a ServletResponse).** @return the ServletResponse for this PageContext*/public abstract ServletResponse getResponse();/*** The current value of the exception object (an Exception).** @return any exception passed to this as an errorpage*/public abstract Exception getException();/*** The ServletConfig instance.** @return the ServletConfig for this PageContext*/public abstract ServletConfig getServletConfig();/*** The ServletContext instance.** @return the ServletContext for this PageContext*/public abstract ServletContext getServletContext();/*** <p>* This method is used to re-direct, or "forward" the current* ServletRequest and ServletResponse to another active component in* the application.* </p>* <p>* If the <I> relativeUrlPath </I> begins with a "/" then the URL specified* is calculated relative to the DOCROOT of the <code> ServletContext </code>* for this JSP. If the path does not begin with a "/" then the URL* specified is calculated relative to the URL of the request that was* mapped to the calling JSP.* </p>* <p>* It is only valid to call this method from a <code> Thread </code>* executing within a <code> _jspService(...) </code> method of a JSP.* </p>* <p>* Once this method has been called successfully, it is illegal for the* calling <code> Thread </code> to attempt to modify the <code>* ServletResponse </code> object. Any such attempt to do so, shall result* in undefined behavior. Typically, callers immediately return from* <code> _jspService(...) </code> after calling this method.* </p>** @param relativeUrlPath specifies the relative URL path to the target* resource as described above** @throws IllegalStateException if <code> ServletResponse </code> is not* in a state where a forward can be performed* @throws ServletException if the page that was forwarded to throws* a ServletException* @throws IOException if an I/O error occurred while forwarding*/public abstract void forward(String relativeUrlPath)throws ServletException, IOException;/*** <p>* Causes the resource specified to be processed as part of the current* ServletRequest and ServletResponse being processed by the calling Thread.* The output of the target resources processing of the request is written* directly to the ServletResponse output stream.* </p>* <p>* The current JspWriter "out" for this JSP is flushed as a side-effect* of this call, prior to processing the include.* </p>* <p>* If the <I> relativeUrlPath </I> begins with a "/" then the URL specified* is calculated relative to the DOCROOT of the <code>ServletContext</code>* for this JSP. If the path does not begin with a "/" then the URL* specified is calculated relative to the URL of the request that was* mapped to the calling JSP.* </p>* <p>* It is only valid to call this method from a <code> Thread </code>* executing within a <code> _jspService(...) </code> method of a JSP.* </p>** @param relativeUrlPath specifies the relative URL path to the target* resource to be included** @throws ServletException if the page that was forwarded to throws* a ServletException* @throws IOException if an I/O error occurred while forwarding*/public abstract void include(String relativeUrlPath)throws ServletException, IOException;/*** <p>* Causes the resource specified to be processed as part of the current* ServletRequest and ServletResponse being processed by the calling Thread.* The output of the target resources processing of the request is written* directly to the current JspWriter returned by a call to getOut().* </p>* <p>* If flush is true, The current JspWriter "out" for this JSP* is flushed as a side-effect of this call, prior to processing* the include. Otherwise, the JspWriter "out" is not flushed.* </p>* <p>* If the <i>relativeUrlPath</i> begins with a "/" then the URL specified* is calculated relative to the DOCROOT of the <code>ServletContext</code>* for this JSP. If the path does not begin with a "/" then the URL* specified is calculated relative to the URL of the request that was* mapped to the calling JSP.* </p>* <p>* It is only valid to call this method from a <code> Thread </code>* executing within a <code> _jspService(...) </code> method of a JSP.* </p>** @param relativeUrlPath specifies the relative URL path to the* target resource to be included* @param flush True if the JspWriter is to be flushed before the include,* or false if not.** @throws ServletException if the page that was forwarded to throws* a ServletException* @throws IOException if an I/O error occurred while forwarding* @since 2.0*/public abstract void include(String relativeUrlPath, boolean flush)throws ServletException, IOException;/*** <p>* This method is intended to process an unhandled 'page' level* exception by forwarding the exception to the specified* error page for this JSP. If forwarding is not possible (for* example because the response has already been committed), an* implementation dependent mechanism should be used to invoke* the error page (e.g. "including" the error page instead).** <p>* If no error page is defined in the page, the exception should* be rethrown so that the standard servlet error handling* takes over.** <p>* A JSP implementation class shall typically clean up any local state* prior to invoking this and will return immediately thereafter. It is* illegal to generate any output to the client, or to modify any* ServletResponse state after invoking this call.** <p>* This method is kept for backwards compatibility reasons. Newly* generated code should use PageContext.handlePageException(Throwable).** @param e the exception to be handled** @throws ServletException if an error occurs while invoking the error page* @throws IOException if an I/O error occurred while invoking the error* page* @throws NullPointerException if the exception is null** @see #handlePageException(Throwable)*/public abstract void handlePageException(Exception e)throws ServletException, IOException;/*** <p>* This method is intended to process an unhandled 'page' level* exception by forwarding the exception to the specified* error page for this JSP. If forwarding is not possible (for* example because the response has already been committed), an* implementation dependent mechanism should be used to invoke* the error page (e.g. "including" the error page instead).** <p>* If no error page is defined in the page, the exception should* be rethrown so that the standard servlet error handling* takes over.** <p>* This method is intended to process an unhandled "page" level exception* by redirecting the exception to either the specified error page for this* JSP, or if none was specified, to perform some implementation dependent* action.** <p>* A JSP implementation class shall typically clean up any local state* prior to invoking this and will return immediately thereafter. It is* illegal to generate any output to the client, or to modify any* ServletResponse state after invoking this call.** @param t the throwable to be handled** @throws ServletException if an error occurs while invoking the error page* @throws IOException if an I/O error occurred while invoking the error* page* @throws NullPointerException if the exception is null** @see #handlePageException(Exception)*/public abstract void handlePageException(Throwable t)throws ServletException, IOException;/*** Return a new BodyContent object, save the current "out" JspWriter,* and update the value of the "out" attribute in the page scope* attribute namespace of the PageContext.** @return the new BodyContent*/public BodyContent pushBody() {return null; // XXX to implement}/*** Provides convenient access to error information.** @return an ErrorData instance containing information about the* error, as obtained from the request attributes, as per the* Servlet specification. If this is not an error page (that is,* if the isErrorPage attribute of the page directive is not set* to "true"), the information is meaningless.** @since 2.0*/public ErrorData getErrorData() {int status = 0;Integer status_code = (Integer)getRequest().getAttribute(RequestDispatcher.ERROR_STATUS_CODE);// Avoid NPE if attribute is not setif (status_code != null) {status = status_code.intValue();}return new ErrorData((Throwable)getRequest().getAttribute(RequestDispatcher.ERROR_EXCEPTION),status,(String)getRequest().getAttribute(RequestDispatcher.ERROR_REQUEST_URI),(String)getRequest().getAttribute(RequestDispatcher.ERROR_SERVLET_NAME));}}
四大域
域 | 作用范围 |
---|---|
page域 | 只能在当前jsp页面使用(当前页面,同时也是最小域) |
request域 | 在同一个请求中使用(转发) |
session域 | 当前会话有效 |
application域 | 整个web应用都有效 |
九大内置对象
具体参考:
JSP的9大内置对象和4大域对象(作用域)
jsp四大作用域和九大对象
JSP九大内置对象及其作用以及四大域对象
对象名称 | 类型 | 作用域 |
---|---|---|
page | javax.servlet.jsp.jspPage | page |
pageContext | javax.servlet.jsp.jspPageContext | page |
request | javax.servlet.jsp.jspRequest | request |
response | javax.servlet.jsp.jspResponse | page |
config | javax.servlet.jsp.jspConfig | page |
session | javax.servlet.jsp.jspSession | session |
out | javax.servlet.jsp.jspOut | page |
application | javax.servlet.jsp.jspApplication | application |
exception | javax.servlet.jsp.jspException | page |
page
代表jsp页面本身,只有在当前页面才是合法的,对应this关键字。
pageContext
pageContext对象可以获取其余8大对象。容器自动创建pageContext对象,可以在jsp页面中直接调用pageContext。
request
该对象封装了客户端向服务器端发送的请求参数,例如在FORM表单中填写的信息。封装了由浏览器或者其他客户端生成的Http请求的细节(参数,属性和数据等)。
response
该对象代表了服务端对客户端的响应,封装了返回给Http客户端的输出。
config
该对象代表了JSP的配置信息。
session
session对象是一个JSP内置对象,它在第一个JSP页面被装载时自动创建,完成会话期管理。从一个客户打开浏览器并连接到服务器开始,到客户关闭浏览器离开这个服务器结束,被称为一个会话。
out
该对象代表了向客户端发送数据的对象。
application
服务器启动后就产生了这个application对象,当客户在所访问的网站的各个页面之间浏览时,这个application对象都是同一个,直到服务器关闭。但是与session不同的是,所有客户的application对象都是同一个,即所有客户共享这个内置的application对象。
exception
该对象代表其他页面中的异常和错误。
内置方法
initialize()
release()
getSession()
getPage()
getRequest()
getResponse()
getException
getServletConfig()
getServletContext()
forward()
include()
handlePageException()
pushBody()
getErrorData()
如若内容造成侵权/违法违规/事实不符,请联系编程学习网邮箱:809451989@qq.com进行投诉反馈,一经查实,立即删除!
相关文章
- springboot java多文件上传
yml配置 spring:servlet:multipart:max-file-size: 10MBmax-request-size: 30MB controller代码 ResponseBodyPostMapping("/OriPicAdd")public ResultVO handleFileUpload(HttpServletRequest request, Integer typeId) {String url "http://localhost:833…...
2024/4/17 17:40:23 - LeetCode 002. 两数相加
1. 题目 给出两个非空的链表用来表示两个非负的整数。其中,它们各自的位数是按照逆序的方式存储的,并且它们的每个节点只能存储一位数字。如果,我们将这两个数相加起来,则会返回一个新的链表来表示它们的和。 您可以假设除了数字…...
2024/5/1 12:23:20 - 以XML方式配置AOP切面
概述 除了使用AspectJ注解声明切面,Spring也支持在bean配置文件中声明切面。这种声明是通过aop名称空间中的XML元素完成的。 正常情况下,基于注解的声明要优先于基于XML的声明。通过AspectJ注解,切面可以与AspectJ兼容,而基于XML…...
2024/5/1 12:31:53 - 小加载动画
在网上学了一个小加载动画,喜欢的话拿一个赞跟我换吧!纯 CSS 没有什么套路,来吧!展示: <!DOCTYPE html> <html lang"en"> <head> <meta charset"UTF-8"> <title>…...
2024/5/1 10:23:46 - 大数据集群搭建CM认知
Apache Hadoop 由Apache 公司开源的Hadoop版本。涵盖了最原生的Hadoop特性,所有的Hadoop发行版均基于该版本进行改进。 Cloudera CDH 由Cloudera公司发行的Hadoop版本,全称(Cloudera’s Distribution Including Apache Hadoop)…...
2024/4/22 15:23:11 - abaqus 6.14有限元分析高级培训视频教程-接触 热力 疲劳分析
abaqus 6.14有限元分析高级培训视频教程-接触 弹塑 热力 疲劳分析 链接:https://pan.baidu.com/s/1LZZIug58wFJV29grGAGJ9Q 提取码:afx7...
2024/4/20 11:12:40 - 同花顺中如何自定义函数
同花顺中如何自定义函数 答:自定义公式就是函数...
2024/4/26 19:52:22 - 30岁了,下面的问题你想清楚了吗?
【你想过什么样的人生】 曾经无数次,犹犹豫豫,进进退退,想要逃避大城市, 走在路上看到外卖小哥那么努力的飞奔,偶尔还看到女性骑手,而我有什么理由退缩? 我想生活在这里,我想每日精…...
2024/4/25 14:53:28 - Docker安装及常用命令
Docker 安装docker 环境装备: 1.linux基础 centOS 7系统内核是3.0以上 环境查看 uname -r显示内核版本cat /etc/os-release查看centos版本第一步卸载旧版本 yum remove docker \docker-client \docker-client-latest \docker-common \docker-latest \docker-la…...
2024/4/25 12:57:03 - 天池项目笔记-金融风控-贷款违约预测 Task4
Task04_建模与调参 modeling and tuning 尝试使用LightGBM、Xgboost和Random Forest三种树模型进行预测和集成 1.划分数据集 X_data train_data[feature_columns] Y_data train_data[isDefault] X_test test_data[feature_columns]from sklearn.model_selection import t…...
2024/4/24 18:38:57 - 分布式系统-4-同步网络一致性算法
引言 上一篇文章讲了分布式同步网络算法中的BFS、最短路径、MST和MIS算法,这一篇文章将会将分布式系统中一个非常重要的问题-一致性。在单节点的环境中,一致性问题是比较容易解决的,像单节点的数据库,因为只有一个节点࿰…...
2024/4/30 21:03:46 - MySQL——索引
MySQL索引 文章目录MySQL索引索引简介为什么使用索引优缺点索引分类普通索引唯一索引主键索引组合索引全文索引索引实现原理Hash索引B树索引B树和B树为什么不使用二叉查找树B树B树聚集索引和非聚集索引非聚集索引聚集索引参考链接索引简介 索引是对数据库表中一列或多列的值进…...
2024/4/19 17:16:55 - ubuntu16.04 必要安装
1, 钉钉 https://github.com/nashaofu/dingtalk/releases/ 2, meld diff sudo apt-get install meld 3, wps 在wps官网下载wps(Linux版本.deb格式) http://www.wps.cn/product/wpslinux/ sudo dpkg -i wps-office_10.1.0.5672~a21_amd64.deb 等待…...
2024/4/27 15:42:47 - Abaqus+Ncode振动疲劳分析视频教程
AbaqusNcode振动疲劳分析视频教程 链接:https://pan.baidu.com/s/1iOc_BUOrK9Qi9oICHLO52w 提取码:z5r8...
2024/4/23 12:58:51 - 了解1D和3D卷积神经网络|Keras
了解1D和3D卷积神经网络|Keras...
2024/4/25 1:06:23 - C++|函数幼儿园级基础知识
1 概述 作用:将一段代码封装起来 把一个较大的程序,分为几个特定的模块 2 函数的定义 语法: 返回值类型 函数名(参数列表) {函数体语句return 表达式 }3 函数的调用 语法:函数名(参数&…...
2024/4/25 23:43:33 - Java-抽象
记录学习过程,仅供参考,有错或者叙述不当请指出。 Java-抽象 关键字:abstract 修饰对象:类、方法 抽象(abstract)是java继承中的一个概念,一个类如果被abstract修饰,那么这个类成…...
2024/4/21 1:13:23 - 数字与字符串系列教材 (二)- Java中把数字转换为字符串,字符串转换为数字
数字与字符串系列教材 (二)- Java中把数字转换为字符串,字符串转换为数字 步骤1:数字转字符串步骤2:字符串转数字步骤3:练习-字符串转换步骤4:答案-字符串转换 步骤 1 : 数字转字符串 方法1: 使用String类的静态方法valueOf 方法…...
2024/4/19 3:05:12 - 剑指-树的子结构-套娃/记忆
题目描述 输入两棵二叉树A和B,判断B是不是A的子结构。(约定空树不是任意一个树的子结构) B是A的子结构, 即 A中有出现和B相同的结构和节点值。 例如: 给定的树 A: 3/ \ 4 5 / \ 1 2给定的树 B: 4 / 1返回 true&…...
2024/4/24 16:53:27 - 区块链学习笔记3-BTC协议
...
2024/4/13 16:12:20
最新文章
- H.265码流解析
这一篇内容旨在对H.265码流中的一些概念做简单了解,部分概念与H.264相同,本篇中将不再重复。 1、NALU H.265(HEVC)码流的NALU结构和AVC有一些不同,属于增强版,HEVC NALU结构如下: NALU Header: Forbidden_zero_bit:1位,必须为0,如果不是则表示NALU非法;Nal_unit_t…...
2024/5/1 15:10:38 - 梯度消失和梯度爆炸的一些处理方法
在这里是记录一下梯度消失或梯度爆炸的一些处理技巧。全当学习总结了如有错误还请留言,在此感激不尽。 权重和梯度的更新公式如下: w w − η ⋅ ∇ w w w - \eta \cdot \nabla w ww−η⋅∇w 个人通俗的理解梯度消失就是网络模型在反向求导的时候出…...
2024/3/20 10:50:27 - datalist是什么,有什么作用?
<datalist>标签用于定义一个预定义选项列表,它可以与文本输入框(<input type"text">)一起使用,提供一组可选的值供用户选择或输入。<datalist>标签中的选项可以通过<option>标签来定义。 <…...
2024/4/29 18:25:15 - MySQL数据库(一)
文章目录 1.MySQL8.0安装配置1.安装教程2.启动方法3.启动注意事项4.Navicat使用5.Navicat演示 2.MySQL数据库基本介绍1.三层结构2.SQL语句分类 3.MySQL数据库基本操作1.创建数据库2.不区分大小写的校对规则3.查看、删除数据库4.备份和恢复数据库1.备份数据库db01和db02…...
2024/5/1 9:08:42 - 416. 分割等和子集问题(动态规划)
题目 题解 class Solution:def canPartition(self, nums: List[int]) -> bool:# badcaseif not nums:return True# 不能被2整除if sum(nums) % 2 ! 0:return False# 状态定义:dp[i][j]表示当背包容量为j,用前i个物品是否正好可以将背包填满ÿ…...
2024/5/1 10:25:26 - 【Java】ExcelWriter自适应宽度工具类(支持中文)
工具类 import org.apache.poi.ss.usermodel.Cell; import org.apache.poi.ss.usermodel.CellType; import org.apache.poi.ss.usermodel.Row; import org.apache.poi.ss.usermodel.Sheet;/*** Excel工具类** author xiaoming* date 2023/11/17 10:40*/ public class ExcelUti…...
2024/5/1 13:20:04 - Spring cloud负载均衡@LoadBalanced LoadBalancerClient
LoadBalance vs Ribbon 由于Spring cloud2020之后移除了Ribbon,直接使用Spring Cloud LoadBalancer作为客户端负载均衡组件,我们讨论Spring负载均衡以Spring Cloud2020之后版本为主,学习Spring Cloud LoadBalance,暂不讨论Ribbon…...
2024/4/29 18:43:42 - TSINGSEE青犀AI智能分析+视频监控工业园区周界安全防范方案
一、背景需求分析 在工业产业园、化工园或生产制造园区中,周界防范意义重大,对园区的安全起到重要的作用。常规的安防方式是采用人员巡查,人力投入成本大而且效率低。周界一旦被破坏或入侵,会影响园区人员和资产安全,…...
2024/5/1 4:07:45 - VB.net WebBrowser网页元素抓取分析方法
在用WebBrowser编程实现网页操作自动化时,常要分析网页Html,例如网页在加载数据时,常会显示“系统处理中,请稍候..”,我们需要在数据加载完成后才能继续下一步操作,如何抓取这个信息的网页html元素变化&…...
2024/4/30 23:32:22 - 【Objective-C】Objective-C汇总
方法定义 参考:https://www.yiibai.com/objective_c/objective_c_functions.html Objective-C编程语言中方法定义的一般形式如下 - (return_type) method_name:( argumentType1 )argumentName1 joiningArgument2:( argumentType2 )argumentName2 ... joiningArgu…...
2024/4/30 23:16:16 - 【洛谷算法题】P5713-洛谷团队系统【入门2分支结构】
👨💻博客主页:花无缺 欢迎 点赞👍 收藏⭐ 留言📝 加关注✅! 本文由 花无缺 原创 收录于专栏 【洛谷算法题】 文章目录 【洛谷算法题】P5713-洛谷团队系统【入门2分支结构】🌏题目描述🌏输入格…...
2024/5/1 6:35:25 - 【ES6.0】- 扩展运算符(...)
【ES6.0】- 扩展运算符... 文章目录 【ES6.0】- 扩展运算符...一、概述二、拷贝数组对象三、合并操作四、参数传递五、数组去重六、字符串转字符数组七、NodeList转数组八、解构变量九、打印日志十、总结 一、概述 **扩展运算符(...)**允许一个表达式在期望多个参数࿰…...
2024/5/1 11:24:00 - 摩根看好的前智能硬件头部品牌双11交易数据极度异常!——是模式创新还是饮鸩止渴?
文 | 螳螂观察 作者 | 李燃 双11狂欢已落下帷幕,各大品牌纷纷晒出优异的成绩单,摩根士丹利投资的智能硬件头部品牌凯迪仕也不例外。然而有爆料称,在自媒体平台发布霸榜各大榜单喜讯的凯迪仕智能锁,多个平台数据都表现出极度异常…...
2024/5/1 4:35:02 - Go语言常用命令详解(二)
文章目录 前言常用命令go bug示例参数说明 go doc示例参数说明 go env示例 go fix示例 go fmt示例 go generate示例 总结写在最后 前言 接着上一篇继续介绍Go语言的常用命令 常用命令 以下是一些常用的Go命令,这些命令可以帮助您在Go开发中进行编译、测试、运行和…...
2024/4/30 14:53:47 - 用欧拉路径判断图同构推出reverse合法性:1116T4
http://cplusoj.com/d/senior/p/SS231116D 假设我们要把 a a a 变成 b b b,我们在 a i a_i ai 和 a i 1 a_{i1} ai1 之间连边, b b b 同理,则 a a a 能变成 b b b 的充要条件是两图 A , B A,B A,B 同构。 必要性显然࿰…...
2024/4/30 22:14:26 - 【NGINX--1】基础知识
1、在 Debian/Ubuntu 上安装 NGINX 在 Debian 或 Ubuntu 机器上安装 NGINX 开源版。 更新已配置源的软件包信息,并安装一些有助于配置官方 NGINX 软件包仓库的软件包: apt-get update apt install -y curl gnupg2 ca-certificates lsb-release debian-…...
2024/5/1 6:34:45 - Hive默认分割符、存储格式与数据压缩
目录 1、Hive默认分割符2、Hive存储格式3、Hive数据压缩 1、Hive默认分割符 Hive创建表时指定的行受限(ROW FORMAT)配置标准HQL为: ... ROW FORMAT DELIMITED FIELDS TERMINATED BY \u0001 COLLECTION ITEMS TERMINATED BY , MAP KEYS TERMI…...
2024/4/30 22:57:18 - 【论文阅读】MAG:一种用于航天器遥测数据中有效异常检测的新方法
文章目录 摘要1 引言2 问题描述3 拟议框架4 所提出方法的细节A.数据预处理B.变量相关分析C.MAG模型D.异常分数 5 实验A.数据集和性能指标B.实验设置与平台C.结果和比较 6 结论 摘要 异常检测是保证航天器稳定性的关键。在航天器运行过程中,传感器和控制器产生大量周…...
2024/4/30 20:39:53 - --max-old-space-size=8192报错
vue项目运行时,如果经常运行慢,崩溃停止服务,报如下错误 FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory 因为在 Node 中,通过JavaScript使用内存时只能使用部分内存(64位系统&…...
2024/5/1 4:45:02 - 基于深度学习的恶意软件检测
恶意软件是指恶意软件犯罪者用来感染个人计算机或整个组织的网络的软件。 它利用目标系统漏洞,例如可以被劫持的合法软件(例如浏览器或 Web 应用程序插件)中的错误。 恶意软件渗透可能会造成灾难性的后果,包括数据被盗、勒索或网…...
2024/5/1 8:32:56 - JS原型对象prototype
让我简单的为大家介绍一下原型对象prototype吧! 使用原型实现方法共享 1.构造函数通过原型分配的函数是所有对象所 共享的。 2.JavaScript 规定,每一个构造函数都有一个 prototype 属性,指向另一个对象,所以我们也称为原型对象…...
2024/5/1 14:33:22 - C++中只能有一个实例的单例类
C中只能有一个实例的单例类 前面讨论的 President 类很不错,但存在一个缺陷:无法禁止通过实例化多个对象来创建多名总统: President One, Two, Three; 由于复制构造函数是私有的,其中每个对象都是不可复制的,但您的目…...
2024/5/1 11:51:23 - python django 小程序图书借阅源码
开发工具: PyCharm,mysql5.7,微信开发者工具 技术说明: python django html 小程序 功能介绍: 用户端: 登录注册(含授权登录) 首页显示搜索图书,轮播图࿰…...
2024/5/1 5:23:20 - 电子学会C/C++编程等级考试2022年03月(一级)真题解析
C/C++等级考试(1~8级)全部真题・点这里 第1题:双精度浮点数的输入输出 输入一个双精度浮点数,保留8位小数,输出这个浮点数。 时间限制:1000 内存限制:65536输入 只有一行,一个双精度浮点数。输出 一行,保留8位小数的浮点数。样例输入 3.1415926535798932样例输出 3.1…...
2024/4/30 20:52:33 - 配置失败还原请勿关闭计算机,电脑开机屏幕上面显示,配置失败还原更改 请勿关闭计算机 开不了机 这个问题怎么办...
解析如下:1、长按电脑电源键直至关机,然后再按一次电源健重启电脑,按F8健进入安全模式2、安全模式下进入Windows系统桌面后,按住“winR”打开运行窗口,输入“services.msc”打开服务设置3、在服务界面,选中…...
2022/11/19 21:17:18 - 错误使用 reshape要执行 RESHAPE,请勿更改元素数目。
%读入6幅图像(每一幅图像的大小是564*564) f1 imread(WashingtonDC_Band1_564.tif); subplot(3,2,1),imshow(f1); f2 imread(WashingtonDC_Band2_564.tif); subplot(3,2,2),imshow(f2); f3 imread(WashingtonDC_Band3_564.tif); subplot(3,2,3),imsho…...
2022/11/19 21:17:16 - 配置 已完成 请勿关闭计算机,win7系统关机提示“配置Windows Update已完成30%请勿关闭计算机...
win7系统关机提示“配置Windows Update已完成30%请勿关闭计算机”问题的解决方法在win7系统关机时如果有升级系统的或者其他需要会直接进入一个 等待界面,在等待界面中我们需要等待操作结束才能关机,虽然这比较麻烦,但是对系统进行配置和升级…...
2022/11/19 21:17:15 - 台式电脑显示配置100%请勿关闭计算机,“准备配置windows 请勿关闭计算机”的解决方法...
有不少用户在重装Win7系统或更新系统后会遇到“准备配置windows,请勿关闭计算机”的提示,要过很久才能进入系统,有的用户甚至几个小时也无法进入,下面就教大家这个问题的解决方法。第一种方法:我们首先在左下角的“开始…...
2022/11/19 21:17:14 - win7 正在配置 请勿关闭计算机,怎么办Win7开机显示正在配置Windows Update请勿关机...
置信有很多用户都跟小编一样遇到过这样的问题,电脑时发现开机屏幕显现“正在配置Windows Update,请勿关机”(如下图所示),而且还需求等大约5分钟才干进入系统。这是怎样回事呢?一切都是正常操作的,为什么开时机呈现“正…...
2022/11/19 21:17:13 - 准备配置windows 请勿关闭计算机 蓝屏,Win7开机总是出现提示“配置Windows请勿关机”...
Win7系统开机启动时总是出现“配置Windows请勿关机”的提示,没过几秒后电脑自动重启,每次开机都这样无法进入系统,此时碰到这种现象的用户就可以使用以下5种方法解决问题。方法一:开机按下F8,在出现的Windows高级启动选…...
2022/11/19 21:17:12 - 准备windows请勿关闭计算机要多久,windows10系统提示正在准备windows请勿关闭计算机怎么办...
有不少windows10系统用户反映说碰到这样一个情况,就是电脑提示正在准备windows请勿关闭计算机,碰到这样的问题该怎么解决呢,现在小编就给大家分享一下windows10系统提示正在准备windows请勿关闭计算机的具体第一种方法:1、2、依次…...
2022/11/19 21:17:11 - 配置 已完成 请勿关闭计算机,win7系统关机提示“配置Windows Update已完成30%请勿关闭计算机”的解决方法...
今天和大家分享一下win7系统重装了Win7旗舰版系统后,每次关机的时候桌面上都会显示一个“配置Windows Update的界面,提示请勿关闭计算机”,每次停留好几分钟才能正常关机,导致什么情况引起的呢?出现配置Windows Update…...
2022/11/19 21:17:10 - 电脑桌面一直是清理请关闭计算机,windows7一直卡在清理 请勿关闭计算机-win7清理请勿关机,win7配置更新35%不动...
只能是等着,别无他法。说是卡着如果你看硬盘灯应该在读写。如果从 Win 10 无法正常回滚,只能是考虑备份数据后重装系统了。解决来方案一:管理员运行cmd:net stop WuAuServcd %windir%ren SoftwareDistribution SDoldnet start WuA…...
2022/11/19 21:17:09 - 计算机配置更新不起,电脑提示“配置Windows Update请勿关闭计算机”怎么办?
原标题:电脑提示“配置Windows Update请勿关闭计算机”怎么办?win7系统中在开机与关闭的时候总是显示“配置windows update请勿关闭计算机”相信有不少朋友都曾遇到过一次两次还能忍但经常遇到就叫人感到心烦了遇到这种问题怎么办呢?一般的方…...
2022/11/19 21:17:08 - 计算机正在配置无法关机,关机提示 windows7 正在配置windows 请勿关闭计算机 ,然后等了一晚上也没有关掉。现在电脑无法正常关机...
关机提示 windows7 正在配置windows 请勿关闭计算机 ,然后等了一晚上也没有关掉。现在电脑无法正常关机以下文字资料是由(历史新知网www.lishixinzhi.com)小编为大家搜集整理后发布的内容,让我们赶快一起来看一下吧!关机提示 windows7 正在配…...
2022/11/19 21:17:05 - 钉钉提示请勿通过开发者调试模式_钉钉请勿通过开发者调试模式是真的吗好不好用...
钉钉请勿通过开发者调试模式是真的吗好不好用 更新时间:2020-04-20 22:24:19 浏览次数:729次 区域: 南阳 > 卧龙 列举网提醒您:为保障您的权益,请不要提前支付任何费用! 虚拟位置外设器!!轨迹模拟&虚拟位置外设神器 专业用于:钉钉,外勤365,红圈通,企业微信和…...
2022/11/19 21:17:05 - 配置失败还原请勿关闭计算机怎么办,win7系统出现“配置windows update失败 还原更改 请勿关闭计算机”,长时间没反应,无法进入系统的解决方案...
前几天班里有位学生电脑(windows 7系统)出问题了,具体表现是开机时一直停留在“配置windows update失败 还原更改 请勿关闭计算机”这个界面,长时间没反应,无法进入系统。这个问题原来帮其他同学也解决过,网上搜了不少资料&#x…...
2022/11/19 21:17:04 - 一个电脑无法关闭计算机你应该怎么办,电脑显示“清理请勿关闭计算机”怎么办?...
本文为你提供了3个有效解决电脑显示“清理请勿关闭计算机”问题的方法,并在最后教给你1种保护系统安全的好方法,一起来看看!电脑出现“清理请勿关闭计算机”在Windows 7(SP1)和Windows Server 2008 R2 SP1中,添加了1个新功能在“磁…...
2022/11/19 21:17:03 - 请勿关闭计算机还原更改要多久,电脑显示:配置windows更新失败,正在还原更改,请勿关闭计算机怎么办...
许多用户在长期不使用电脑的时候,开启电脑发现电脑显示:配置windows更新失败,正在还原更改,请勿关闭计算机。。.这要怎么办呢?下面小编就带着大家一起看看吧!如果能够正常进入系统,建议您暂时移…...
2022/11/19 21:17:02 - 还原更改请勿关闭计算机 要多久,配置windows update失败 还原更改 请勿关闭计算机,电脑开机后一直显示以...
配置windows update失败 还原更改 请勿关闭计算机,电脑开机后一直显示以以下文字资料是由(历史新知网www.lishixinzhi.com)小编为大家搜集整理后发布的内容,让我们赶快一起来看一下吧!配置windows update失败 还原更改 请勿关闭计算机&#x…...
2022/11/19 21:17:01 - 电脑配置中请勿关闭计算机怎么办,准备配置windows请勿关闭计算机一直显示怎么办【图解】...
不知道大家有没有遇到过这样的一个问题,就是我们的win7系统在关机的时候,总是喜欢显示“准备配置windows,请勿关机”这样的一个页面,没有什么大碍,但是如果一直等着的话就要两个小时甚至更久都关不了机,非常…...
2022/11/19 21:17:00 - 正在准备配置请勿关闭计算机,正在准备配置windows请勿关闭计算机时间长了解决教程...
当电脑出现正在准备配置windows请勿关闭计算机时,一般是您正对windows进行升级,但是这个要是长时间没有反应,我们不能再傻等下去了。可能是电脑出了别的问题了,来看看教程的说法。正在准备配置windows请勿关闭计算机时间长了方法一…...
2022/11/19 21:16:59 - 配置失败还原请勿关闭计算机,配置Windows Update失败,还原更改请勿关闭计算机...
我们使用电脑的过程中有时会遇到这种情况,当我们打开电脑之后,发现一直停留在一个界面:“配置Windows Update失败,还原更改请勿关闭计算机”,等了许久还是无法进入系统。如果我们遇到此类问题应该如何解决呢࿰…...
2022/11/19 21:16:58 - 如何在iPhone上关闭“请勿打扰”
Apple’s “Do Not Disturb While Driving” is a potentially lifesaving iPhone feature, but it doesn’t always turn on automatically at the appropriate time. For example, you might be a passenger in a moving car, but your iPhone may think you’re the one dri…...
2022/11/19 21:16:57