摘要: 1、类型转换: 1.数组转化为List: String[] strArray= new String[]{"Tom", "Bob", "Jane"}; List strList= Arrays.asList(strArray); 2.数组转Set String[] strArray= new Str 阅读全文
posted @ 2019-09-02 09:41 凉城 阅读(305) 评论(0) 推荐(0) 编辑
摘要: Curl命令 DOS命令 1、查询端口占用情况:netstat -aon |findstr "8080"; 查看端口进程号; 2、查看进程号信息: tasklist |findstr "9999"; 3、杀进程: taskkill -f -t -im javaw.exe; 4、修改mysql数据库密 阅读全文
posted @ 2016-11-14 10:25 凉城 阅读(2693) 评论(0) 推荐(0) 编辑
摘要: 数据库可视化工具robomongo 下载地址 链接:https://pan.baidu.com/s/1RjU1BXq2rXFG07Zaw5BHrQ 提取码:o1w5 模糊查询: 包含字符串str : find({'name':/str/i}); {'name':/str/} 以str开头: {'na 阅读全文
posted @ 2016-07-28 09:30 凉城 阅读(1387) 评论(0) 推荐(0) 编辑
摘要: #! /etc/env/bin python3 #! *_* coding=utf8 *_* from pathlib import Path from docx import Document import os # 从word中导出图片 def extract_img_word(filename 阅读全文
posted @ 2022-04-28 16:28 凉城 阅读(453) 评论(0) 推荐(0) 编辑
摘要: git reset HEAD^ # 撤消上一次的commit 不带参数默认是--mixed 例:git reset --mixed HEAD^ 也可以写成git reset HEAD~1 git reset HEAD~2 如果你进行了2次commit,想都撤回,可以使用HEAD~2 git rese 阅读全文
posted @ 2022-03-18 16:50 凉城 阅读(3259) 评论(1) 推荐(0) 编辑
摘要: # -*- coding: utf-8 -*- from docx import Document import os import shutil import traceback def parseFile(file): content = '' file_name = file.split(". 阅读全文
posted @ 2022-02-24 10:39 凉城 阅读(37) 评论(0) 推荐(0) 编辑
摘要: 问题原因: Python在进行编码方式之间的转换时,会将 unicode 作为“中间编码”,但 unicode 最大只有128那么长,所以这里当尝试将 ascii 编码字符串转换成"中间编码" unicode 时由于超出了其范围,就报出了如上错误。 解决办法 将Python的默认编码方式修改为utf 阅读全文
posted @ 2022-02-22 18:02 凉城 阅读(55) 评论(0) 推荐(0) 编辑
摘要: 1、使用date命令查询当前时间,发现时间不准确;计划使用ntpupdate命令同步时间 2、安装ntp服务: yum install ntp 使用ntpdate同步时间报错: ntpdate[13040]: adjust time server ** offset -0.017465 sec 报错 阅读全文
posted @ 2022-02-17 16:55 凉城 阅读(97) 评论(0) 推荐(0) 编辑
摘要: /** * 发送http POST请求 * * @param * @return 远程响应结果 */ public static String sendPost(String u, String json) throws Exception { StringBuffer sbf = new Stri 阅读全文
posted @ 2021-11-02 17:57 凉城 阅读(1151) 评论(0) 推荐(0) 编辑
摘要: 知识点:os.walk()函数 os.walk() 方法用于通过在目录树中游走输出在目录中的文件名,向上或者向下。 os.walk() 方法是一个简单易用的文件、目录遍历器,可以帮助我们高效的处理文件、目录方面的事情。 语法 walk()方法语法格式如下: os.walk(top[, topdown 阅读全文
posted @ 2021-10-21 11:23 凉城 阅读(1325) 评论(0) 推荐(0) 编辑
摘要: #!/usr/bin/env python2 # -*- coding: utf-8 -*- #yum -y install python-pip # yum install libffi-devel openssl-devel #使用python启动一个web服务器 #如果是python 2.x的 阅读全文
posted @ 2021-10-20 16:05 凉城 阅读(961) 评论(0) 推荐(0) 编辑
摘要: 目前钉钉支持群聊消息的通过接口发送,需要建立群聊: 1、创建群聊 2、群聊设置自定义机器人: 根据提示自定义设置,最后获取webhook地址 相关说明文档 3、发送消息实现: def sendDing(msg): ''' 发送钉钉消息功能 ''' dingding_url = 'https://oa 阅读全文
posted @ 2021-10-20 16:02 凉城 阅读(844) 评论(0) 推荐(0) 编辑
摘要: 1、JMSFactory配置 <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http:// 阅读全文
posted @ 2021-09-25 14:46 凉城 阅读(104) 评论(0) 推荐(0) 编辑