JSP内置对象的使用

JSP内置对象 一、JSP内置对象的概述 由于JSP使用Java作为脚本语言,所以JSP将具有强大的对象处理能力,并且可以动态的创建Web页面的内容。但Java语法在使用一个对象前,需要先实例化这个对象,其实这是一件比较繁琐的事情。JSP为了简化开发,提供了一些内置对象,用来实现很多JSP应用。在使用JSP内置对象时,不需要定义这些对象,直接使用即可。 在JSP中一共预先定义了9个这样的对象,分别为request、response、session、application、out、pageCon
分类: 其他 发布时间: 12-04 22:48 阅读次数: 0

LeetCode-Easy刷题(23) Convert Sorted Array to Binary Search Tree

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/sqh201030412/article/details/78668673 Given an array where elements are sorted in ascending order, convert it to a height balanced BST. 将有序数组转化为二分查找树 public TreeNode sortedArrayToBST(int[] nums) {
分类: 其他 发布时间: 12-04 22:47 阅读次数: 0

LeetCode-Easy刷题(24) Balanced Binary Tree

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/sqh201030412/article/details/78679779 Given a binary tree, determine if it is height-balanced. For this problem, a height-balanced binary tree is defined as a binary tree in which the depth of the two
分类: 其他 发布时间: 12-04 22:47 阅读次数: 0

LeetCode-Easy刷题(25) Minimum Depth of Binary Tree

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/sqh201030412/article/details/78679785 Given a binary tree, find its minimum depth. The minimum depth is the number of nodes along the shortest path from the root node down to the nearest leaf node. 找出
分类: 其他 发布时间: 12-04 22:47 阅读次数: 0

LeetCode-Easy刷题(26) Path Sum

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/sqh201030412/article/details/78679794 Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the given sum. For example:
分类: 其他 发布时间: 12-04 22:46 阅读次数: 0

LeetCode-Easy刷题(27) Pascal's Triangle

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/sqh201030412/article/details/78679802 Given numRows, generate the first numRows of Pascal's triangle. For example, given numRows = 5, Return [ [1], [1,1], [1,2,1], [1,3,3,1], [1,4,6,4,1
分类: 其他 发布时间: 12-04 22:46 阅读次数: 0

LeetCode-Easy刷题(28) Pascal's Triangle II

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/sqh201030412/article/details/78679811 Given an index k, return the kth row of the Pascal's triangle. For example, given k = 3, Return [1,3,3,1]. Note: Could you optimize your algorithm to use only O(k
分类: 其他 发布时间: 12-04 22:46 阅读次数: 0

LeetCode-Easy刷题(29) Best Time to Buy and Sell Stock

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/sqh201030412/article/details/78679820 Say you have an array for which the ith element is the price of a given stock on day i. If you were only permitted to complete at most one transaction (ie, buy on
分类: 其他 发布时间: 12-04 22:46 阅读次数: 0

LeetCode-Easy刷题(30) Best Time to Buy and Sell Stock II

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/sqh201030412/article/details/78679830 Say you have an array for which the ith element is the price of a given stock on day i. Design an algorithm to find the maximum profit. You may complete as many t
分类: 其他 发布时间: 12-04 22:45 阅读次数: 0

LeetCode-Easy刷题(31) Single Number

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/sqh201030412/article/details/78679841 Given an array of integers, every element appears twice except for one. Find that single one. Note: Your algorithm should have a linear runtime complexity. Could
分类: 其他 发布时间: 12-04 22:45 阅读次数: 0

LeetCode-Easy刷题(32) Linked List Cycle

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/sqh201030412/article/details/78679851 Given a linked list, determine if it has a cycle in it. Follow up: Can you solve it without using extra space? 给定一个链表,确定它是否有一个循环。 你能在不使用额外空间的情况下解决它吗? //两个速度指针
分类: 其他 发布时间: 12-04 22:45 阅读次数: 0

LeetCode-Easy刷题(33) Min Stack

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/sqh201030412/article/details/78679856 Design a stack that supports push, pop, top, and retrieving the minimum element in constant time. push(x) -- Push element x onto stack. pop() -- Removes the eleme
分类: 其他 发布时间: 12-04 22:45 阅读次数: 0

Spring Boot 要点小结

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/sqh201030412/article/details/79065428 对于Web开发而言,Spring Boot 最近比较有名气.我觉得主要的原因在于开箱即用及功能广泛的特点. 明白Spring Boot 是什么?说到底,其实底层的实现都是一致的,Spring Boot 以Pom.xml依赖的方式免去了原来繁琐的配置整合,默认给你提供你引入功能的默认配置.你要做的仅仅是将原来你做的事情,转化
分类: 其他 发布时间: 12-04 22:44 阅读次数: 0

[NOI2017]蚯蚓排队 hash

题面:洛谷 题解:   我们暴力维护当前所有队伍内的所有子串(长度k = 1 ~ 50)的出现次数。   把每个子串都用一个hash值来表示,每次改变队伍形态都用双向链表维护,并暴力更新出现次数。   现在考虑复杂度。   如果只有连接,没有断开,那么复杂度为不同的子串个数:50n(注意只要O(n)预处理前缀和后缀hash就可以做到O(1)得到一个子串的hash值)   如果有断开,那么最多就每断开一次就对应要再重连一次。所以复杂度最多增加2500 * 断开次数,而断开次数1e3....   
分类: 其他 发布时间: 12-04 22:44 阅读次数: 0

写if-else不外乎两种场景:异常逻辑处理和不同状态处理。

写if-else不外乎两种场景:异常逻辑处理和不同状态处理。 异常逻辑处理说明只能一个分支是正常流程,而不同状态处理都所有分支都是正常流程。 第一个例子`if (obj != null)`是异常处理,是代码健壮性判断,只有if里面才是正常的处理流程,`else`分支是出错处理流程 //举例一:异常逻辑处理例子 Object obj = getObj(); if (obj != null) { //do something }else{ //do something    第二
分类: 其他 发布时间: 12-04 22:44 阅读次数: 0

窗体

extends 继承多个父类 public class Demo extends JFrame{//Demo继承于JFrame public Demo(){//方法体 setVisible(true);//窗体可见 setBounds(700,400,100,100);//设置窗体的横纵坐标和窗体大小 setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);//设置窗体的关闭状态 Containe
分类: 其他 发布时间: 12-04 22:44 阅读次数: 0

SpringMVC学习笔记_02

1、springmvc对多视图的支持 (1)导入xml格式视图支持的jar包   注意:springmvc本身就支持xml格式,所以不用导入其他支持的jar包了。 (2)在springmvc.xml中配置支持多视图     <!-- 配置支持多视图 -->     <bean class="org.springframework.web.servlet.view.ContentNegotiatingViewResolver"> <!-- 配置支持的媒体类型 --> <!-- spring3.2
分类: 其他 发布时间: 12-04 22:44 阅读次数: 0

北大集训2018垫底记

day0   早上五点半起来赶飞机。   下午到北大报到,然后去饭堂吃饭。   农园一楼的菜还是挺好的,就是有点贵。随便吃一点就要 15+,吃好一点就要 25+。 day1   开场先看题,然后感觉第一题挺可做的,就头铁去写 t1 了。最终写了两个小时还是写出来了。   然后去看第二题,先把暴力写了。又看到有一个所有数都是某个质数的幂的子任务,也去写了一下。最开始写了个比较复杂的做法,后来想到只需要记指数的差就好了,改了一下就过了那个子任务。   第三题想了好久还是不会,只能打暴力了。   得
分类: 其他 发布时间: 12-04 22:44 阅读次数: 0

Vue:(一)概况

Vue:https://cn.vuejs.org/ (一)Vue概况 Vue本身并不是一个框架 Vue结合周边生态构成一个灵活的、渐进式框架 声明式渲染 组件系统 客户端路由 状态管理 构建工具 (二)Vue核心思想 数据驱动 组件化 (三)Vue和React对比 Vue 模板和渲染函数的弹性选择 简单的语法及项目构建 更快的渲染速度和更小的体积 React 更适用大型应用和更好的可测试性 同时适用于Web端和原生App 更大的生态圈带来的更多支持和工具 Vue和React相同点 利用虚拟DO
分类: 其他 发布时间: 12-04 22:44 阅读次数: 0

12.4站立会议

12.4确定了分数等级
分类: 其他 发布时间: 12-04 22:44 阅读次数: 0