有时候我们需要知道某个页面被访问的次数,这时我们就需要在页面上添加页面统计器,页面访问的统计一般在用户第一次载入时累加该页面的访问数上。 要实现一个计数器,您可以利用应用程序隐式对象和相关方法getAttribute()和setAttribute()来实现。 这个对象表示JSP页面的整个生命周期中。 ...
分类:
Web程序 时间:
2020-05-11 18:47:26
阅读次数:
79
一般我们对缓存读操作的时候有这么一个固定的套路: 如果我们的数据在缓存里边有,那么就直接取缓存的。 如果缓存里没有我们想要的数据,我们会先去查询数据库,然后将数据库查出来的数据写到缓存中。 最后将数据返回给请求 代码例子: 1 @Override 2 public R selectOrderById ...
分类:
其他好文 时间:
2020-05-11 15:33:03
阅读次数:
50
实现用户登录权限验证 我的项目的目录 1、先创建一个User类 package po;public class User { private Integer id;//id private String username;//用户名 private String password;//密码 publ ...
分类:
编程语言 时间:
2020-05-11 13:34:19
阅读次数:
70
题目 You are given a positive integer N(1≦N≦1e18). Find the number of the pairs of integers u and v(0≦u,v≦N) such that there exist two non-negative inte ...
分类:
其他好文 时间:
2020-05-11 13:07:17
阅读次数:
68
题目非常简单,之所以记录一下是因为总是忽略中序遍历的特性:排序二叉树中序遍历会得到一个有序数组。该特性很实用也很神奇,就像一颗满二叉排序树的根节点必然是对应有序数组的中点一样。该特性可以帮助我们更好的理解排序树的结构。 List<Integer> re=new LinkedList<Integer> ...
分类:
其他好文 时间:
2020-05-11 01:04:03
阅读次数:
56
"Problem Statement" You are given a positive integer $N$. Find the number of the pairs of integers $u$ and $v(0≤u,v≤N)$such that there exist two non n ...
分类:
其他好文 时间:
2020-05-10 19:32:45
阅读次数:
67
leetcode 13.[罗马数字转整数] [罗马数字转整数]: https://leetcode cn.com/problems/roman to integer/ leetcode 12.[整数转罗马数字] [整数转罗马数字]: https://leetcode cn.com/problems/ ...
分类:
其他好文 时间:
2020-05-10 18:57:07
阅读次数:
55
package LeetCode_504 /** * 504. Base 7 (7进制) * https://leetcode.com/problems/base-7/description/ * Given an integer, return its base 7 string represen ...
分类:
其他好文 时间:
2020-05-10 14:50:02
阅读次数:
44
function PingServer(HostIP: string;LinkTimeOut: integer): boolean; var RRemoteC: TIdIcmpClient; AReplyStatus: TReplyStatus; begin try result := true; ...
MySQL支持多种类型,大致可以分为三类:数值、日期/时间和字符串(字符)类型。 一、数值类型 MySQL支持所有标准SQL数值数据类型。 这些类型包括严格数值数据类型(INTEGER、SMALLINT、DECIMAL和NUMERIC),以及近似数值数据类型(FLOAT、REAL和DOUBLE PR ...
分类:
数据库 时间:
2020-05-10 10:55:49
阅读次数:
85