编程笔记
-
此心到处悠然 一
今天聊了很多,逐渐变得清醒。如果谎言是善意的,那就让它继续吧。人们都无法避免被各种生活琐粹、内心桎梏困扰,正视它,并且积极的和它斗争,和它争抢自己的每一分每一秒,这就是个人的胜利,这是今日最大的收获…
-
[AWS] Solve Error: Lambda Options Request UnAuthorized
If you configure CORS (Cross-Origin Resource Sharing) for an API, API Gateway automatically sends a response to preflight OPTIONS requests, even if there isn't an OPTIONS route configured for your AP…
-
web页面搜索框支持提示过往的查询输入历史
使用 redis + H2 DB 实现 一般的网站搜索框都会提示历史搜索内容,方便用户少重复打字,排列顺序按时间由近到远,如果历史搜索内容里有能跟本次输入的内容模糊地匹配上的,就把这些行靠前展示。如果我们的网站做到…
-
LeetCode第1472题:设计浏览器的浏览历史记录
可以引出一个需求设计:记录搜索输入框的历史(https://www.cnblogs.com/zhangjianghao/p/16389820.html) 题目的意图,待解决的问题 分析可能要用的数据结构或算法 分析限制条件的影响,corner case
-
codewars联系题
You are the "computer expert" of a local Athletic Association (C.A.A.). Many teams of runners come to compete. Each time you get a string of all race results of every team who has run. For example he…
-
Input体验redux流程
TodoList.js import React, { Component } from 'react' import {Input,Button,List} from 'antd' import store from './store'; class TodoList extends Component { constructor(props){ super(props) this.state…
-
nc传输文件结束后不退出
原因 版本不同 udp传输不会自动关闭 解决方案 nc -l 1234 > file.img nc ip 1234 -q 0 < file.img 采用tcp传输文件 -q 文件传输结束后,经过几秒后退出
-
CAK 试题:etcd 备份与恢复
官方文档有关这题的资料如下https://kubernetes.io/zh-cn/docs/tasks/administer-cluster/configure-upgrade-etcd/基于上述方式进行验证 未能成功。 总结成功的方式如下:关键两步:1、恢复时 利用--data-dir="/var…
-
向session共享数据(使用的是servletAPI方法,推荐)
向session共享数据(使用的是servletAPI方法,推荐) @RequestMapping("/testSession")public String testSession(HttpSession session){ session.setAttribute("testSession","hello, session"); return "targ…
-
linux 服务器 git ssh获取资源
1、.ssh文件生成需要root用户登录,登录后 会在当前root用户文件夹下生成.ssh文件2、命令生成私钥公钥ssh-keygen直接连续回车完成生成3、配置公钥私钥 私钥:id_rsa 公钥:id_rsa.pub登录github,设置公钥 注意:如…