HTML:使用协商缓存。CSS&JS&图片:使用强缓存,文件命名带上hash值,使用chunkhash或contenthash,不使用hash。以nodejs为例,如果需要浏览器强缓存,我们可以这样设置:res.setHeader('Cache-Control', 'public, max-age= ...
分类:
其他好文 时间:
2020-05-10 13:14:40
阅读次数:
57
最近都在用vue做APP内嵌H5页面,在APP点击后退时如果在路由中跳转过多次 点后退会后退很多次才能退出页面 用户体验很差。 下面来说下解决方法 因为hisotry模式官方说需要服务器配置所以路由一直在用hash模式,针对这一需求需要了解h5新加的history模式 H5引入了history.pu ...
分类:
移动开发 时间:
2020-05-10 12:48:31
阅读次数:
99
link class Solution { public: long mod = 100000000000007L; long head=1L; int distinctEchoSubstrings(string text) { int n=text.size(); unordered_set<lo ...
分类:
其他好文 时间:
2020-05-10 10:57:17
阅读次数:
52
首先应该明白报这个错误说明了你用的jedis方法与redis服务器中存储数据的类型存在冲突。 例如:数据库中有一个key是usrInfo的数据存储的是Hash类型的,但是你使用jedis执行数据 操作的时候却使用了非Hash的操作方法,比如Sorted Sets里的方法。此时就会报 ERR Oper ...
分类:
其他好文 时间:
2020-05-10 01:02:16
阅读次数:
66
git checkout . #本地所有修改内的。没有的提交的,都返回到原来的状态 git stash #把所有没有提交的修容改暂存到stash里面。可用git stash pop回复。 git reset --hard HASH #返回到某个节点,不保留修改。 git reset --soft H ...
分类:
其他好文 时间:
2020-05-09 23:10:24
阅读次数:
71
package com.intfish.util; /** * */ import org.apache.commons.lang3.StringEscapeUtils; import org.apache.commons.lang3.text.StrBuilder; import java.io. ...
分类:
其他好文 时间:
2020-05-08 20:08:23
阅读次数:
79
1、启动客户端: 在 src 下 默认启动: ./redis-server 启动客户端 ./redis-cli 远程连接: redis-cli -h host -p port -a password 2、 五种数据类型: string,hash,list,set 及zset(sorted set:有 ...
分类:
其他好文 时间:
2020-05-08 19:57:52
阅读次数:
99
Python数据结构总结 dict与set的实现原理 两者的原理都是哈希表。 dict与set实现原理是一样的,都是将实际的值放到list中。唯一不同的在于hash函数操作的对象,对于dict,hash函数操作的是其key,而对于set是直接操作的它的元素,假设操作内容为x,其作为因变量,放入has ...
分类:
编程语言 时间:
2020-05-08 12:53:05
阅读次数:
74
[root@k8snode2 k8s_images]# kubeadm join --token f0bc0b.7aa9033c4f7ae16c 192.168.6.7:6443 --discovery-token-ca-cert-hash sha256:ee4c3346ade1c7ce0eeb80 ...
分类:
Web程序 时间:
2020-05-08 12:45:24
阅读次数:
142
1. #include <iostream> #include <map> #include <hash_map> // 对该结构体按照xxx排序,在hash_map中存储name和地址 struct Site { Site(const std::string &n, const std::stri ...
分类:
其他好文 时间:
2020-05-07 22:40:06
阅读次数:
82