以leetcode上的一个题目为例子。 连接 解题思路: 举个例子。word1 = abcd word2=abce.将word1变为word2.假设我们均考虑到第4个字符,d!=e, 直接替换 也就是前三个字符需要的次数+1。 把d删除掉,让第三个字符c和word2的第四个字符匹配,在d的后边添加一 ...
分类:
其他好文 时间:
2020-07-13 15:26:01
阅读次数:
53
下载Oracle VM VirtualBox 下载下来安装 下载镜像 http://archive.kernel.org/centos-vault/6.5/isos/i386/CentOS-6.5-i386-minimal.iso 安装虚拟机 这里我安装的是32bit的centOS6.5 mini版 ...
分类:
其他好文 时间:
2020-07-13 13:50:57
阅读次数:
79
import pdfplumber as pdf with pdf.open(r'E:\pdf\python.pdf')as f: for i in f.pages: con=i.extract_text() print(con) ...
分类:
其他好文 时间:
2020-07-13 13:30:27
阅读次数:
49
file ,err :=os.Open("d:\\aaa.txt") // 打开文件句柄 if err!=nil{ fmt.Println("打开文件出错") }else { fmt.Println("文件存在") } read := bufio.NewReader(file) // 创建文件读取对 ...
分类:
其他好文 时间:
2020-07-13 13:26:03
阅读次数:
97
1 C语言代码 1 #include <stdio.h> 2 #include <unistd.h> 3 4 int main() 5 { 6 if(!fork()){while(1)printf(“A”);} 7 if(!fork()){while(1)printf(“B”);} 8 wait() ...
分类:
其他好文 时间:
2020-07-12 22:36:25
阅读次数:
81
问题出现: 在eclipse中pull项目至github上出现该问题 查看报错日志 org.eclipse.jgit.api.errors.TransportException: https://github.com/muzhiyi1996/test1.git: cannot open git-up ...
分类:
Web程序 时间:
2020-07-12 22:33:02
阅读次数:
155
题目链接:https://atcoder.jp/contests/panasonic2020/tasks/panasonic2020_d 题意:给定n 输出所有长度为n的 要求字符串, 要求的字符串是满足 所有 s[i]=s[j]时t[i]=t[j] 或者 s[i]!=s[j]时 t[i]!=t[j ...
分类:
其他好文 时间:
2020-07-12 22:14:56
阅读次数:
70
[root@kunpeng82 sdn-ip-topology]# zebra -d -f quagga-sdn.conf vty_read_config: failed to open configuration file /root/ryu/SDN-IP-Ryu/sdn-ip-topology/ ...
分类:
其他好文 时间:
2020-07-12 20:33:14
阅读次数:
84
问题场景 希望在macbook上查看linux服务器的图形, 例如使用feh命令或者 cv2.imshow() 等情形. 如果没正确配置则会报错: feh ERROR: Can't open X display. It *is* running, yeah? 配置 首先下载安装 https://ww ...
分类:
系统相关 时间:
2020-07-12 16:23:22
阅读次数:
176
lsof简介 lsof(list open files)是一个列出当前系统打开文件的工具。在linux环境下,任何事物都以文件的形式存在,通过文件不仅仅可以访问常规数据,还可以访问网络连接和硬件。所以如传输控制协议 (TCP) 和用户数据报协议 (UDP) 套接字等,系统在后台都为该应用程序分配了一 ...
分类:
系统相关 时间:
2020-07-12 16:17:12
阅读次数:
61