- 博客(9)
- 收藏
- 关注
原创 Jackson和FastJson性能谁更快
前言jackson和fastjson大概是我们使用得最多的两个json序列化包和反序列化包。网上的性能对比很多,大多数的结果对fastjson都不利,甚至有的结论是比Gson还要慢,但是我觉得fastjson是阿里系的,应该性能不会差,于是作了一系列对比。我们这里使用的是最新的两个包jackjson为2.8版本,而fastjson为1.2.14版本对比使用对象在对比中使用的对象基本包含了所有的数据类
2016-07-24 01:09:47 10974 3
原创 redis集群的介绍
redis-cluster架构图 redis-cluster把所有的物理节点映射到[0-16383]slot上,cluster 负责维护,Redis 集群中内置了 16384 个哈希槽,当需要在 Redis 集群中放置一个 key-value 时,redis 先对 key 使用 crc16 算法算出一个结果,然后把结果对 16384 求余数,这样每个 key 都会对应一个编号在 0-16383 之
2016-07-14 20:24:20 515
转载 Linux的inode的理解
一、inode是什么?理解inode,要从文件储存说起。 文件储存在硬盘上,硬盘的最小存储单位叫做”扇区”(Sector)。每个扇区储存512字节(相当于0.5KB)。操作系统读取硬盘的时候,不会一个个扇区地读取,这样效率太低,而是一次性连续读取多个扇区,即一次性读取一个”块”(block)。这种由多个扇区组成的”块”,是文件存取的最小单位。”块”的大小,最常见的是4KB,即连续八个 sector
2016-07-12 11:22:48 268
原创 leetcode-35. Search Insert Position
题目链接:https://leetcode.com/problems/search-insert-position/ Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inser
2016-07-12 09:06:30 284
原创 中间件不支持setautocommit(false)怎么办?
前提最近在某个公司实习,框架使用的是springmvc+spring+mybatis,具体名字就不说了,所有事务都没有用无法回滚,导师叫我和db人员对接,我就写了一个Jdbc的原生的测试测试代码如下: try { Class.forName("com.mysql.jdbc.Driver"); } catch (ClassNotFoundException e)
2016-07-11 13:39:53 1864
原创 leetcode96. Unique Binary Search Trees
题目链接:https://leetcode.com/problems/unique-binary-search-trees/ 题目: Given n, how many structurally unique BST’s (binary search trees) that store values 1…n?For example, Given n = 3, there are a total
2016-07-10 11:29:42 417 1
转载 ping工作原理
一、什么是 PING DOS 命令,一般用于检测网络通与不通 ,也叫时延,其值越大,速度越慢 PING (Packet Internet Grope),因特网包探索器,用于测试网络连接量的程序。Ping 发 送一个 ICMP 回声请求消息给目的地并报告是否收到所希望的 ICMP 回声应答。它是用来检查网络是否通畅或者网络连接速度的命令。 作为一个生活在网络上的管理员或 者黑客来说,ping 命令是第
2016-07-10 09:40:58 826
原创 leetcode108. Convert Sorted Array to Binary Search Tree
题目链接:https://leetcode.com/problems/convert-sorted-array-to-binary-search-tree/ 题目: Given an array where elements are sorted in ascending order, convert it to a height balanced BST.Subscribe to see wh
2016-07-06 23:19:15 298
原创 leetcocde-337. House Robber III
题目链接:https://leetcode.com/problems/house-robber-iii/ 题目内容: The thief has found himself a new place for his thievery again. There is only one entrance to this area, called the “root.” Besides the roo
2016-07-01 11:05:33 281
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人