题目 Given an array of integers, find out whether there are two distinct indices i and j in the array such that the absolute difference between and is a ...
分类:
其他好文 时间:
2020-03-31 01:13:11
阅读次数:
88
Given an array of integers and an integer k, find out whether there are two distinct indices i and j in the array such that nums[i] = nums[j] and the ...
分类:
其他好文 时间:
2020-03-29 21:16:05
阅读次数:
58
题目 Given an array of integers, find if the array contains any duplicates. Your function should return true if any value appears at least twice in the ...
分类:
其他好文 时间:
2020-03-29 19:40:21
阅读次数:
65
有以下几种可能 1、创建动态web工程时候没选运行环境: 2、运行环境和xml文件版本不匹配 6.0匹配2.5 3、jar包冲突:Servlet-API和jsp-API冲突 ...
分类:
其他好文 时间:
2020-03-26 21:43:31
阅读次数:
112
Introduction 先说说要做的功能 希望用数据库的 duplicate primary key 来实现一个简易的锁功能,加锁成功与否取决于是否成功 insert,此时必须要明确的执行 insert sql,而不是 update sql 本文以一个简单地订单锁作为例子,数据库字段信息如下: c ...
分类:
编程语言 时间:
2020-03-20 22:32:25
阅读次数:
98
[toc] 选择自动提交还是手动提交方式和业务场景相关,可以查看前面的博客,根据原理进行选择。 单线程消费 pom consumerConfig consumer 批量消费 开启批量消费需要3步 1、消费者设置 max.poll.records/ 2、消费者 开启批量消费 factory.setBa ...
分类:
编程语言 时间:
2020-03-13 20:52:10
阅读次数:
82
"题目" 题意:删除重复的字符,得到字典序最小的结果字符串 题解:贪心,咱们从结果字符串的左边开始,左边第一个字符在原字符串中的右边一定有n 1个不同的字符,这里n就是结果字符串的长度。 所以我们每次遍历数组,找到右边有n 1个不同字符的字符,并选择最小的那个。 由于最多26个字母,最多遍历26次, ...
分类:
其他好文 时间:
2020-03-13 20:22:01
阅读次数:
47
调试界面时,在控制台看到error信息,如下图所示: 上图中的错误提示信息很明了,就是检查到重复的key值,很有可能会应发更新错误。根据错误提示的位置,在代码中找到这样的一个循环: 在上图中step.id可能会有重复的值,为了确保key值的唯一性,我们可以在step对象中组合相关的元素来确保key值 ...
分类:
其他好文 时间:
2020-03-12 09:47:24
阅读次数:
61
传统基于单机的数据库技术已经无法支撑海量数据的访问处理,在此情况下,支持系统高扩展,强一致的分库分表Sharding架构的数据库集群GaussDB100应运而生。它采用Shared-nothing架构的分布式系统,它是由众多拥有独立且互不共享CPU、内存、存储等系统资源的逻辑节点组成。1、操作系统设置1.1内核参数[root@hwd10~]#/etc/sysctl.confkernel.sem=5
分类:
数据库 时间:
2020-03-11 12:35:25
阅读次数:
277
1 """ 2 Given an array nums containing n + 1 integers where each integer is between 1 and n (inclusive), prove that at least one duplicate number must ...
分类:
其他好文 时间:
2020-03-07 09:40:06
阅读次数:
81