问题:在复制一些代码时会同时复制每行的行号,删除比较麻烦,所以利用python3本身的代码进行一键删除。 # 导入re 模块来使用正则表达式 import re """去掉行号""" print('remove application start') # 定义去除行号函数 def remove_li ...
分类:
编程语言 时间:
2021-03-16 13:46:16
阅读次数:
0
# 1. 文件操作# 一个函数: open()函数,创建一个文件对象# 三个方法:read/write/close # 2.open()函数# 默认以只读方式r打开文件,并返回文件对象# open(filename, mode) filename文件名 mode访问模式# 2.1 打开文件# fil ...
分类:
其他好文 时间:
2021-03-16 12:01:10
阅读次数:
0
注意修改 localRepository <?xml version="1.0" encoding="UTF-8"?> <settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001 ...
分类:
其他好文 时间:
2021-03-16 11:54:14
阅读次数:
0
打开settings->Editor->File Encodings,设置Global Encoding和Project Encoding还有Default encoding for properties Files为UTF-8 找到idea安装目录下bin文件夹下的idea.exe.vmoptio ...
分类:
其他好文 时间:
2021-03-15 11:34:17
阅读次数:
0
文件备份与重命名 # 2种方式打开文件、备份文件、 import os # 打开文件 class FileOpen: @staticmethod def file_open1(file): fp = open(file, "w+", encoding="utf-8") # 无需flush,因为clo ...
分类:
其他好文 时间:
2021-03-15 10:54:22
阅读次数:
0
水平虚线 shape: line-horizontal.xml <?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape ...
分类:
移动开发 时间:
2021-03-09 13:55:09
阅读次数:
0
# open(r'e:\user\niuhanyang\xxxx\a.txt',)#原字符 操作文件 加r会读出来 f = open('a.txt','a+',encoding='utf-8') #三种模式 有中文要加上utf-8 读一共三种方式 r模式只能读不能写 只读模式 f = open('a ...
分类:
编程语言 时间:
2021-03-09 13:38:00
阅读次数:
0
一、返回值分类 1.字符串 2.void 3.ModelAndView 二、转发和重定向 1.forward转发 2.Redirect重定向 三、ResponseBody响应json数据 需要在pom.xml中添加如下代码: <?xml version="1.0" encoding="UTF-8"? ...
分类:
编程语言 时间:
2021-03-09 12:58:55
阅读次数:
0
在python文件开头加上以下一段代码,即可解决中文编码问题,屡试不爽 # encoding=utf8 import sys reload(sys) sys.setdefaultencoding('utf8') ...
分类:
编程语言 时间:
2021-03-08 14:23:06
阅读次数:
0
记得关闭日志信息 #日志信息#mybatis-plus.configuration.log-impl=org.apache.ibatis.logging.stdout.StdOutImpl <?xml version="1.0" encoding="UTF-8"?><configuration sc ...
分类:
编程语言 时间:
2021-03-08 13:05:41
阅读次数:
0