Xor Sum AtCoder 2272 Time limit : 2sec / Memory limit : 256MB Score : 600 points Problem Statement You are given a positive integer N. Find the number ...
分类:
其他好文 时间:
2020-05-11 19:09:03
阅读次数:
87
有时候我们需要知道某个页面被访问的次数,这时我们就需要在页面上添加页面统计器,页面访问的统计一般在用户第一次载入时累加该页面的访问数上。 要实现一个计数器,您可以利用应用程序隐式对象和相关方法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
题意为,输入“I am zhang.” 输出“zhang. am I”. 我的思路是先将每个单词翻转,然后再讲整个句子翻转。 注意怎么识别单个单词,一种是空格,另一种是句子的结尾。 #include<bits/stdc++.h> using namespace std; void Reverse(s ...
分类:
其他好文 时间:
2020-05-11 01:26:55
阅读次数:
92
题目非常简单,之所以记录一下是因为总是忽略中序遍历的特性:排序二叉树中序遍历会得到一个有序数组。该特性很实用也很神奇,就像一颗满二叉排序树的根节点必然是对应有序数组的中点一样。该特性可以帮助我们更好的理解排序树的结构。 List<Integer> re=new LinkedList<Integer> ...
分类:
其他好文 时间:
2020-05-11 01:04:03
阅读次数:
56
#include<iostream> #include<string> using namespace std; uint32_t reverseBits(uint32_t n) { uint32_t a = 0; int count = 0; string s = ""; while (n) { ...
分类:
其他好文 时间:
2020-05-10 20:54:12
阅读次数:
55
"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
1.数据描述 想了想决定爬一下海工的录取分数线,但是刚开始只能爬出数据,没有办法转化为列表形式,于是在网上找了很多方法,也参考了一下同学的,终于将其转化为列表形式得了。 for tr in data: lt=[] lg=[] ltd=tr.find_all('td') if len(ltd)==0: ...
分类:
其他好文 时间:
2020-05-10 19:26:39
阅读次数:
67