11 2020 档案
摘要:安装完MongoDB后,又去捣鼓了MongoDB客户端图形工具Robo 3T,捣鼓半天,当我用SSH远程连接上MongoDB服务时,这一瞬间,难压自己的喜悦之情。 一路走来,跌跌撞撞,感谢那个努力不放弃的自己,从调错到博客记录,每天不知不觉就到了深夜俩三点,还有一次都四点了,嗓子也疼了好几天了,痘痘
阅读全文
摘要:推荐链接 https://www.runoob.com/mongodb/mongodb-linux-install.html https://juejin.cn/post/6844903828811153421 https://blog.csdn.net/u010028869/article/det
阅读全文
摘要:一、报错信息 -bash: ./mongod: 无法执行二进制文件 二、出现原因 在CentOS 7 64位系统下安装MongoDB以后,启动服务出错 三、解决方法 搜了一圈,有2种说法,1是权限,2是版本。我试了下权限,权限没问题,查看版本,都是64,那问题在哪?艾!想起来了,当时下载安装包的时候
阅读全文
摘要:一、报错信息 Warning: Using a password with '-a' or '-u' option on the command line interface may not be safe.” 二、出现原因 redis连接输入密码后提示Warning: 。。。 三、解决方法 htt
阅读全文
摘要:一、报错信息 (error) NOAUTH Authentication required. 二、出现原因 之前设置了redis密码,后来登录客户端时出现,认证问题 三、解决方法 https://www.cnblogs.com/thinkingandworkinghard/p/6739397.htm
阅读全文
摘要:一、报错信息 Could not connect to Redis at 127.0.0.1:6379: Connection refused 二、出现原因 昨天装完redis,服务也启动成功了,客户端正常连接,然后晚上关机睡觉,当然Linux虚拟机也就关闭了。 第一天装redis的时候,我埋了一个
阅读全文
摘要:一、报错信息 图片12行 二、出现原因 在用Linux虚拟机装redis过程中,使用make命令报错 三、解决方法 小问题,随便一搜就解决了。 https://blog.csdn.net/qijkkwcw/article/details/84565324 原文摘下: 分配器allocator, 如果
阅读全文
摘要:一、报错信息 二、出现原因 ssh登录到远程服务器时出现 三、解决方法 ssh -o StrictHostKeyChecking=no 192.168.0.xxx 之后输入密码即可 四、思考总结 问题是小问题,背后确是一个关于SSH 公钥检查的知识点,推荐论坛文章 https://blog.csdn
阅读全文
摘要:一、报错信息 Error response from daemon: driver failed programming external connectivity on endpoint mysql05 (0d2cf07ef37bb7ddd7e8595410871f01ba3e484acdc970
阅读全文
摘要:一、报错信息 error pulling image configuration: read tcp 192.168.0.103:58928->104.18.123.25:443: read: connection reset by peer 二、报错原因 我配置docker 默认镜像源后,拉取to
阅读全文
摘要:一、报错信息 Linux终端报错信息:Job for docker.service failed because the control process exited with error code. See "systemctl status docker.service" and "journa
阅读全文
摘要:一、报错信息 A session ended very soon after starting. Check that the command in profile "New Profile" is correct. 二、出现原因 我在使用iterm2配置SSH连接时,在配置好Profiles,选择
阅读全文
摘要:一、报错信息 You must specify a machine to start, using the command line. Usage: VirtualBoxVM --startvm <name|UUID> Starts the VirtualBox virtual machine wi
阅读全文
摘要:一、报错信息 Expected one result (or null) to be returned by selectOne(), but found: 6] with root cause 二、出现原因 在做后台分页的查询中,写错了查询sql,导致返回值多了,正确的结果应是一条, 三解决方法
阅读全文
摘要:一、报错信息 Parameter index out of range (1 > number of parameters, which is 0). 二、出现原因 在进行like模糊查询时,我将字符串拼接在了sql语句上,'%#{param}%' 三、解决问题 方法一,#不支持拼串,但是$支持,但
阅读全文
摘要:一、报错信息 NullPointerException Can't add values % , null 二、出现原因 在mybatis中使用like进行模糊查询时,不能使用'%#{param}%' 来拼接字符串,便使用 <bind> 标签绑定参数,再之后的查询中,若传入参数为null,便会运行报
阅读全文
摘要:一、导入所需jar包 1、spring的ioc核心4个 2、spring的aop包 5个 3、spring的jdbc模块3个 4、springmvc模块2个 5、spring运行依赖的日志包1个 6、mybatis包1个 7、数据库驱动包1个 8、spring与mybatis整合中间适配包1个 9、
阅读全文
摘要:写在前面: 学习Java的过程中,我们会遇到千奇百怪的问题,造成一度的不自信,一度的崩溃,但我们也只能默默的承受、消化,遇到的问题也只能硬着头皮上,我们都是凡人,没有足够聪明的大脑,所幸我不会放弃,跌倒了,再站起来,向前走。 安装Spring插件(Spring Tool Suite)STS 1、首先
阅读全文
摘要:class Solution { public int numIslands(char[][] grid) { //统计岛屿的数量 int count = 0; for(int i = 0;i < grid.length;i++){ for(int j = 0;j < grid[0].length;
阅读全文
摘要://暴力法 class Solution { public int maxSubArray(int[] nums) { //定义一个当前子序列的和,将初值 设为nums【0】 int sum = nums[0]; //定义一个子序列的全局最大值 int max = sum; //从第二个元素开始 f
阅读全文
摘要:class Solution { //对于 [a, b, c, d],如果有 a <= b <= c <= d ,那么最大收益为 d - a。而 d - a = (d - c) + (c - b) + (b - a) , //因此当访问到一个 prices[i] 且 prices[i] - pric
阅读全文
摘要://暴力法 class Solution { public int maxProfit(int[] prices) { //边界判断 if(prices.length < 2) { return 0; } //定义股票的最大收益 int maxprofit = 0; //定义最低价买入 int mi
阅读全文
摘要:class Solution { public void sortColors(int[] nums) { // [0,zero) = 0 ; [zero,i) = 1; [two,nums.length - 1] = 2 //保证循环开始时[0,zero)为空,所以设置zero 为 -1,遍历时先
阅读全文
摘要:class Solution { public int[] topKFrequent(int[] nums, int k) { //使用HashMap统计每个元素出现的次数,元素为键,元素出现的频次为值 HashMap<Integer,Integer> map = new HashMap<>();
阅读全文
摘要://1.使用最小堆,或最大堆 // 根据 k 的不同,选最大堆和最小堆,目的是让堆中的元素更小 class Solution { public int findKthLargest(int[] nums, int k) { PriorityQueue<Integer> queue = new Pri
阅读全文
摘要:/** * Definition for singly-linked list. * class ListNode { * int val; * ListNode next; * ListNode(int x) { * val = x; * next = null; * } * } */ //快慢指
阅读全文
摘要://动态规划,198的升级版 //在于怎样处理 首尾房子,它们之中只能抢一个 //Math(抢首,抢尾) class Solution { public int rob(int[] nums) { //没房子 if(nums.length == 0) return 0; //一间房子,没得选,必抢
阅读全文
摘要://动态规划 class Solution { public int rob(int[] nums) { int pre = 0; int cur = 0; for(int i = 0;i < nums.length; i++){ // 循环开始时,cur 代表 dp[k - 1]; pre 代表
阅读全文
摘要:class Solution { public int[] productExceptSelf(int[] nums) { int[] res = new int[nums.length]; //left 为该数左边的乘积 int left = 1; //right 为该数右边的乘积 int rig
阅读全文
摘要://摩尔投票法 //1.如果候选人不是maj 则 maj,会和其他非候选人一起反对 会反对候选人,所以候选人一定会下台(maj==0时发生换届选举) //2.如果候选人是maj , 则maj 会支持自己,其他候选人会反对,同样因为maj 票数超过一半,所以maj 一定会成功当选 class Solu
阅读全文
摘要:// class Solution { // public int[] countBits(int num) { // int[] res = new int[num + 1]; // res[0] = 0; // for(int i = 1;i<res.length;i++){ // if(i %
阅读全文

浙公网安备 33010602011771号