![](https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
JAVA高频TIPS
火蓝棋
主要研究海量数据存储、实时计算与机器学习
展开
-
Lua脚本操作Redis字节数组例子
/** * 空间索引申请方法(value存储为Byte类型) * 索引结构: * 块开始索引,4字节,最大1.9G :2147483647/1024/1024/1024=1.9G (没有用块编号乘2048作开始索引,然后用两个字节存块编号,是因为两字节太小) * 索引偏移量4字节,最大1.9G :2147483647/1024/1024/1024=1...原创 2019-10-16 11:11:02 · 1749 阅读 · 0 评论 -
遍历Map的方式选择
public static void main(String[] args) {// 循环遍历Map的4中方法Map<Integer, Integer> map = new HashMap<Integer, Integer>();map.put(1, 2);// 1. entrySet遍历,在键和值都需要时使用(最常用)for (Map.Entry<Intege...原创 2019-10-14 19:24:22 · 77 阅读 · 0 评论