非商业,LeetCode链接附上: https://leetcode-cn.com/problems/word-pattern/ 进入正题。 题目: 给定一种规律 pattern 和一个字符串 str ,判断 str 是否遵循相同的规律。 这里的 遵循 指完全匹配,例如, pattern 里的每个字 ...
分类:
其他好文 时间:
2020-11-25 12:43:50
阅读次数:
7
有时候git明明已经配置了用户名和密码,但在项目中,有时候pull和push的时候却每次都要提示输入用户名和密码,很浪费时间。 解决办法 在git bash中输入: git config --global credential.helper store 执行完上面的git命令后,在命令行正常执行pu ...
分类:
其他好文 时间:
2020-11-25 12:33:41
阅读次数:
2
昨天做了一个udhcpd与udhcpc的守护,目前只会用shell模仿编写,还有什么方法可以做守护呢? 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 #! /bin/sh #进程名字可 ...
分类:
系统相关 时间:
2020-11-23 12:39:19
阅读次数:
22
生成key 192.168.1.50:6379> set name1 hxlOK192.168.1.50:6379> set name2 hxl02OK192.168.1.50:6379> set name3 hxl03OK192.168.1.50:6379> get name1"hxl"192.1 ...
分类:
其他好文 时间:
2020-11-23 12:37:45
阅读次数:
7
WSGI(Python Web Server Gateway Interface) 为 Web Server 和 Python Web Application 之间提供了标准的数据通道. 是 Python 界的 一个广泛的可用的 WEB API 规范, 使 web server 提供更加规范的 AP ...
分类:
编程语言 时间:
2020-11-23 12:07:14
阅读次数:
9
一、前言 1、需求来由 内部资料归档混乱,内部归档地址不一,不利于资料查找及工作交接 更新不及时,本地文档更新完,未同步上传到ftp服务器 归档文档多为word或pdf格式,不易于编辑维护 搭配wss任务管理系统使用,每一任务原则上都要求有输出件,以便于对任务做质量管控及绩效考核打分 综合以上实际存 ...
分类:
其他好文 时间:
2020-11-21 12:28:58
阅读次数:
6
需求背景 在开发过程中,经常遇到用户提出 如果某个内容没有填写,则需要弹出提示,并且将页面滚动到指定位置的需求。那这种情况应该怎么实现呢?具体代码如下: 一、给链接a加个#的方式来实现跳转。 div1 div2 div3 <div id="container"> <a href="#div1">di ...
分类:
Web程序 时间:
2020-11-21 12:27:15
阅读次数:
21
fromdocximportDocumentfromdocx.enum.styleimportWD_STYLE_TYPEfromdocx.enum.textimportWD_ALIGN_PARAGRAPHimportosclassWord:definit(self):passself.doc=Document()defwrite_word(self):‘‘‘主函数‘‘‘titles=input(‘
分类:
其他好文 时间:
2020-11-21 12:00:03
阅读次数:
7
kube-system:是 namespace 名称 1、查看命名空间 kubectl get all -n kube-system 2、删除deployment(先删除deployment,删除后replicaset.apps 和 pod 自动就被删除了) kubectl delete deplo ...
分类:
其他好文 时间:
2020-11-21 11:45:05
阅读次数:
4
import jieba txt = open("西游记.txt", "r", encoding='utf-8').read() words = jieba.lcut(txt) # 使用精确模式对文本进行分词 counts = {} # 通过键值对的形式存储词语及其出现的次数 for word in ...
分类:
其他好文 时间:
2020-11-20 11:30:40
阅读次数:
32