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
import jieba txt = open("聊斋志异白话简写版.txt", "r", encoding='utf-8').read() words = jieba.lcut(txt) # 使用精确模式对文本进行分词 counts = {} # 通过键值对的形式存储词语及其出现的次数 for w ...
分类:
其他好文 时间:
2020-11-20 11:24:38
阅读次数:
3
1 import jieba 2 3 txt = open("D:\\西游记.txt", "r", encoding='gb18030').read() 4 words = jieba.lcut(txt) # 使用精确模式对文本进行分词 5 counts = {} # 通过键值对的形式存储词语及其出 ...
分类:
其他好文 时间:
2020-11-19 13:02:49
阅读次数:
32
一、环境 Idea 2020.1 JDK 1.8 maven 二、目的 spring boot 通过整合influxdb gitHub地址: https://github.com/ouyushan/ouyushan-spring-boot-samples 三、步骤 3.1、点击File → New ...
分类:
数据库 时间:
2020-11-19 12:55:13
阅读次数:
14
import jieba txt = open("D:\\西游记.txt", "r", encoding='utf-8').read() words = jieba.lcut(txt) # 使用精确模式对文本进行分词 counts = {} # 通过键值对的形式存储词语及其出现的次数 for wor ...
分类:
其他好文 时间:
2020-11-19 12:43:23
阅读次数:
12
#写古诗到文件中f = open("gushi.txt","w",encoding="utf-8") #不加encoding="utf-8"文件会出现乱码f.write(''' 静夜思 李白窗前明月光,疑是地上霜。举头望明月,低头思故乡。 ''')f.close()#复制:先读出文件中内容,再写入新 ...
分类:
编程语言 时间:
2020-11-18 13:24:20
阅读次数:
28
在 Clock 类上添加 @Component 注解,在需要定时执行的方法上面加上 @Scheduled 注解,并添加 cron 表达式。常见问题包括 @Scheduled 定时任务不生效,@Scheduled 定时任务执行两次等 ...
分类:
编程语言 时间:
2020-11-18 12:26:59
阅读次数:
6
【转】 springboot+websocket示例 1、新建maven工程 工程结构如下: 完整的pom.xml如下: <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" ...
分类:
编程语言 时间:
2020-11-12 14:18:10
阅读次数:
16
import cx_Oracle conn = cx_Oracle.connect('数据库名字', '密码', '**', encoding='UTF-8') cursor = conn.cursor() number = '2020-09-08 11:29:18' cursor.execute( ...
分类:
数据库 时间:
2020-11-12 14:01:08
阅读次数:
16
1.规划登录实现原理流程图 2.编写前端页面 <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <!DOCTYPE html> <html> <head lang="en"> ...
分类:
其他好文 时间:
2020-11-12 13:41:46
阅读次数:
4