因为项目经理一直在变需求,最开始说要生成word,结果又要pdf,不想再写pdf想直接进行转换,网上搜了一下,有的只能windows用,而poi转换后文字会不对齐串行,aspose是比较简单并符合需求的。 代码基本来自这篇博客https://www.cnblogs.com/zhaosq/p/9796 ...
分类:
Web程序 时间:
2020-02-26 01:24:30
阅读次数:
143
import re text = "123123aoasasdfaisdfs阿瑟东阿瑟东佛阿迪斯发到付撒大沙发" # 查找所有的数字 nums = re.findall(r'\d+', text) print(nums) # 查找所有的单词 words = re.findall(r'[a-zA-Z] ...
分类:
编程语言 时间:
2020-02-25 19:45:11
阅读次数:
83
本文始发于个人公众号: TechFlow ,原创不易,求个关注 链接 "Substring with Concatenation of All Words" 难度 Hard 描述 给定一个字符串s作为母串,和一系列长度相等的字符串words,要求返回s当中所有的位置,使得从该位置开始可以找到所有的w ...
分类:
其他好文 时间:
2020-02-24 12:49:39
阅读次数:
90
Problem : Given a non empty string s and a dictionary wordDict containing a list of non empty words, determine if s can be segmented into a space sepa ...
分类:
其他好文 时间:
2020-02-21 22:20:48
阅读次数:
70
The 12th Doctor’s last words: “Oh there it is. Silly old universe. The more I save it, the more it needs saving. It’s a treadmill. “Yes, Yes I know th ...
分类:
其他好文 时间:
2020-02-21 18:15:37
阅读次数:
91
2020-02-18 New words scarf -- 围巾 bobby pin --发夹针 bow tie -- 领结 hair band -- 发带 apron -- 围裙 mitten -- 手套 helmet -- 头盔 accelerate -- 加快 applause -- 鼓掌;喝 ...
分类:
其他好文 时间:
2020-02-19 13:03:23
阅读次数:
256
1,accomplishment,something that is successful. 2,acronym,abbreviation,first letters,some words./?æk.r?.n?m/. 3,adhere,to stick firmly. 4,aggression,/? ...
分类:
其他好文 时间:
2020-02-15 09:20:18
阅读次数:
87
题意 有n个字符串,记为s1,s2……sn,s2与s1合并,合并的方式为:s1的后缀若与s2的前缀相同,就可以重叠起来,要最长的。 举个例子: “1333” “33345” → “133345” s1与s2合并后产生的字符串,再与s3合并,以此类推。 思路 两个字符串的子串匹配,比较容易想到哈希。 ...
分类:
其他好文 时间:
2020-02-12 16:12:06
阅读次数:
69
Convert a non-negative integer to its english words representation. Given input is guaranteed to be less than 231 - 1. Example 1: Input: 123 Output: " ...
分类:
其他好文 时间:
2020-02-10 10:16:33
阅读次数:
75
应用实例: 准备一个txt文件 import jieba txt = open("三国演义.txt","r", encoding = 'gbk',errors='ignore').read() #读取已存好的txt文档 words = jieba.lcut(txt) #进行分词 counts = { ...
分类:
编程语言 时间:
2020-02-09 16:33:19
阅读次数:
84