自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(75)
  • 收藏
  • 关注

原创 Ubuntu虚拟机部署OpenStack

修改#PermitRootLogin prohibit-password为PermitRootLogin yes。将下载好的etcd、novnc、cirros安装包放到对应位置,重新执行安装脚本./stack.sh。pip.conf中的内容。

2023-10-25 16:06:04 793

原创 Mac系统远程连接Windows11

一、远程桌面连接Windows111、下载并安装Microsoft Remote Desktop for mac。(Microsoft Remote Desktop for mac简介,下载链接)2、Windows11开启远程桌面。3、为当前Windows11账号设置密码。二、ssh连接Windows111、下载并安装OpenSSH。(OpenSSH官网,下载连接)2、使用ssh命令或ssh工具连接Windows11。

2023-07-09 07:10:21 1053

原创 HTTP多用户认证访问隔离目录

test01为用户目录,可批量复制,需要修改.htaccess中的。为登录目录用户(不需要添加到系统用户中,可直接执行步骤4创建用户),可在目录下新建首页index.html文件。若要修改默认主目录,需要同时修改。如要增加默认主页,可在。

2023-06-06 21:37:31 559 1

原创 Camtasia2021 Mac系统无法录制系统声音,系统音频插件安装失败解决方法

Camtasia2021 Mac系统无法录制系统声音,系统音频插件安装失败解决方法

2023-03-11 21:18:22 929 2

原创 管理变量和事实playbook

管理变量和事实playbook

2022-07-13 16:48:09 82

原创 二进制中1的个数

问题:请实现一个函数,输入一个整数,输出该数二进制表示中1的个数。解法一: public static void main(String[] args) { Scanner sc=new Scanner(System.in); int N=sc.nextInt(); System.out.println(Integer.toString(N,2)); int count=0; for(int i=0;i<32;i

2022-05-11 08:52:47 96

原创 唯一成对的数

问题:1-1000放在含有1001个元素的数组中,只有唯一的一个元素值重复,其它均只出现一次。每个数组元素只能访问一次,设计一个算法,将它找出来;不用辅助存储空间,能否设计一个算法实现?解法1(异或法):public static void main(String[] args) { int N=1001; int[] arr=new int[N]; for(int i=0;i<arr.length-1;i++){ arr[i

2022-05-09 15:10:58 62

原创 RedHat8更换国内源

1、备份原有yum配置文件cd /etc/yum.repos.d/curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-8.repomv redhat.repo redhat.repo_bak2、修改以下两个配置文件,将enabled的值改为0vi /etc/yum/pluginconf.d/product-id.confvi /etc/yum/pluginconf.d/subscrip

2022-05-02 09:35:03 2339 1

原创 Liunx破解root密码,适用于Red Hat,CentOS系统

1、启动系统按e键2、在linux那行最后,加上rd.break,按ctrl+x启动3、输入以下命令mount -o remount,rw /sysrootchroot /sysrootpasswd roottouch /.autorelabelexitexit

2022-05-01 12:28:12 519

原创 Linux网卡丢失解决方法

问题描述:启动Linux系统后ens33网卡丢失解决方法:执行以下命令,重启网卡systemctl stop NetworkManagersystemctl disable NetworkManagersystemctl start network.serviceservice network restart

2021-10-25 15:40:01 5108

原创 Java读写HDFS

1、Java包依赖pom.xml配置<?xml version="1.0" encoding="UTF-8"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven

2021-09-25 17:27:38 377

原创 保存Windows10随机聚焦锁屏壁纸

1、Win+R键打开运行窗口,输入以下命令,打开壁纸路径%localappdata%\Packages\Microsoft.Windows.ContentDeliveryManager_cw5n1h2txyewy\LocalState\Assets2、修改图片格式方法:复制打开文件路径下的文件至新文件夹,Win+R键打开运行窗口,使用cd命令进入到新文件夹,输入以下命令修改图片格式ren * *.jpg复制打开文件路径下的文件至新文件夹,在新文件夹内新建txt文件,写入以下内容,写入

2021-09-08 12:47:49 948

原创 简单回复HTML页面的web框架

1、服务端codeimport socketserver = socket.socket()server.bind(('127.0.0.1', 8001))server.listen()while True: conn, addr = server.accept() from_brower_msg = conn.recv(1024) print(from_brower_msg) conn.send(b'HTTP/1.1 200 ok\r\n\r\n') c

2021-08-07 08:12:22 148

原创 CentOS 7更换下载源

1、查看当前系统的下载地址curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repocat CentOS-Base.repo2、更换阿里下载源curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo...

2021-06-28 16:46:49 225

原创 IDEA启动Tomcat控制台中文乱码

问题描述IDEA启动Tomcat后,控制台输出日志中文乱码解决方法第一步,修改IDEA配置找到Editor下的File Encodings,检查Global Encoding,Project Encoding,Default encoding for properties files是否都为UTF-8,若不是,则全部修改成UTF-8第二步,修改VmOption找到Help下的Edit Custom VM Options,添加一行-Dfile.encoding=UTF-8最后一步,

2021-05-23 11:23:32 464

原创 Java基于MongoDB实现的图书管理系统

写在前面:图书管理系统适合的数据库应该是MySQL,但产品需要这个功能,所以使用了MongoDB数据库。项目部署时除了使用IDEA生成war,也使用Ant编译源码生成war,不过Ant工具的确强大。外包依赖库使用了gson、jstl、mongo驱动包。一、项目开发阶段1、第一个项目模块是数据库操作模块BookDaoImplpublic class BookDaoImpl { MongoDatabase mongoDatabase = MongoDBUtil.getConnect(); .

2021-05-13 17:40:36 1895

原创 Python生成词云图

1、安装Python包pip install jiebapip install numpypip install matplotlibpip wordcloud2、安装wordcloud失败解决方法,手动安装下载安装包,链接: link.

2021-04-22 14:02:32 215 1

原创 Java操作MongoDB数据库

1、连接MongoDB数据库public void test01() { //链接MongoDB数据库 MongoClient mongoClient = new MongoClient("localhost", 27017); MongoDatabase mongoDatabase = mongoClient.getDatabase("test"); System.out.println(mongoDatabase); }2、连

2021-04-08 09:37:23 126

原创 IDEA链接MySQL数据报错: Server returns invalid timezone

问题:IDEA链接MySQL数据报错Server returns invalid timezone. Go to 'Advanced' tab and set 'serverTimezone' property manually.解决方案:在Advanced中设置serverTimezoned值:Asia/ShanghaiOK解决

2021-03-31 17:45:36 86

原创 Hibernate工具类

Hibernate工具类public class HibernateUtils { private static SessionFactory factory; static { Configuration cfg = new Configuration().configure(); factory = cfg.buildSessionFactory(); Runtime.getRuntime().addShutdownHook(new T

2021-03-31 11:29:58 115

原创 Navicat使用快捷键

1、常规键动作CTRL+SHIFT+#(# 代表 1 至 9)添加到收藏夹F8Navicat 主窗口或对象选项卡CTRL+TAB 或 SHIFT+CTRL+TAB下一个窗口或选项卡CTRL+Q新建查询F1帮助2、Navicat主窗口键动作CTRL+G打开设置位置的文件夹CTRL+#(# 代表 1 至 9)打开收藏夹链接F6命令列界面CTRL+L历史日志F12仅显示活跃对象CTRL+N

2021-03-24 17:32:44 805

原创 Windows+L键不能锁屏解决方案

Windows+L键不能锁屏解决方案1、按下Ctrl+Esc键(window键的组合键),看看是否好用,如果是好的情况,那么大概率是windows键被锁住了。2、第二步:按下Fn+Windows键,解开Windowns键,此时Windowns+L已经可以使用了。...

2021-03-23 16:46:42 31618 6

原创 Windows10忘记MySQL密码登录

1、启动CMD,越过授权表启动MySQL(需要提前配置MySQL的系统环境变量)mysqld --skip-grant-tables &2、无密码登录mysql -uroot3、修改root密码alter user 'root'@'localhost' identified by '自定义密码';

2021-03-16 16:37:23 82

原创 文件上传JAVA实现

实现简单文件的上传protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { DiskFileItemFactory factory = new DiskFileItemFactory(); ServletFileUpload sfu = new ServletFileUpload(factory)

2021-03-03 14:40:24 78 1

原创 Git下载安装并上传文件至GitHub

一、Git安装1、Git下载,链接地址:Link,安装步骤下一步即可2、在桌面,点击Git Bash Here,打开Git命令行窗口3、配置Git本地用户# 配置用户名git config --global user.name "用户名"# 配置邮箱git config --global user.email "邮箱地址"4、查看Git用户名和邮箱地址git config user.namegit config user.emailgit config --global --

2021-02-25 15:16:37 137

原创 Java手写简单网页验证码

1、后台Java主程序@WebServlet("/VerificationCode")public class VerificationCode extends HttpServlet { @Override protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { int width = 120;

2021-01-21 17:44:42 85

原创 IntelliJ IDEA输出窗口中文乱码解决方法

1、打开IDEA点击Help,选择Edit Custom VM Options。2、在打开的窗口中编辑idea64.exe.vmoptions,添加-Dfile.encoding=utf-8,重启IDEA。

2021-01-20 15:16:59 1131

原创 JDBC链接MySQL的三种方式

1、第一种链接方式public static void main(String[] args) throws SQLException, ClassNotFoundException { Class.forName("com.mysql.cj.jdbc.Driver"); String url="jdbc:mysql://localhost:3306/test1?serverTimezone=UTC"; String user="root";

2021-01-13 09:28:17 120

原创 Java遍历文件夹下的JPG文件

Java遍历文件夹下的JPG文件public static void main(String[] args) { Scanner scanner=new Scanner(System.in); String path = scanner.nextLine(); File file=new File(path); if(!file.exists()){ System.out.println("此路径对应的文件不存在");

2021-01-07 09:42:11 983

原创 Java递归遍历文件夹并打印出问价内容

Java递归遍历文件夹并打印出问价内容public static void main(String[] args) { File dir=new File("D:\\IntelliJ IDEA 2019.3.5"); printSubFile(dir); } public static void printSubFile(File dir){ File[] subfiles = dir.listFiles(); for(Fi

2021-01-07 09:03:22 147

原创 Windows下安装MongoDB压缩版

1、官网下载MongoDB zip版(链接)2、解压下载好的MongoDB压缩包,新建安装目录(这里以在 D盘下新建MongoDB文件夹为例作为安装目录)在D盘新建安装文件夹,重命名为MongoDB将解压好的文件拷贝进新建的MongoDB文件夹内进入新建的MongoDB文件夹,在文件夹分别新建data、log文件夹,用于存放数据文件和 日志新建文本文件,重命名为mongo.conf(...

2020-03-07 22:11:05 197

原创 Docker使用小结

1、查看本地镜像docker images2、在仓库搜索镜像(如搜索centos镜像)docker search centos3、从仓库拉取镜像(如拉取centos镜像)docker pull centos4、删除本地镜像(如删除本地centos镜像)docker rmi centos5、使用本地镜像创建容器(如创建centos容器)docker run -it cent...

2020-03-02 23:46:56 125

原创 CentOS7安装Docker

1、安装gccyum -y install gccyum -y install gcc-c++2、卸载docker旧版本yum -y remove docker docker-common docker-selinux docker-engine3、安装需要的软件包yum install -y yum-utils device-mapper-persistent-data lvm...

2020-03-02 23:20:36 185

原创 最大公约数和最小公倍数——Java

求两个数的最大公约数和最小公倍数,Java实现public static void main(String[] args) { Scanner scann=new Scanner(System.in); int m=scann.nextInt(); int n=scann.nextInt(); int min=(m<=n)?m...

2020-02-21 18:09:49 409

原创 斐波那契数列——Python

使用列表实现nums = list()a = 0b = 1i = 0while i < 10: nums.append(a) a, b = b, a + b i += 1for num in nums: print(num)使用迭代器实现class Fibonacci: def __init__(self, all_num): ...

2019-12-22 16:44:27 180

原创 collections导入错误

从Python3中导入collectionsfrom collections import Iterablefrom collections import Iterator出现以下错误DeprecationWarning: Using or importing the ABCs from ‘collections’ instead of from ‘collections.abc’ i...

2019-12-21 17:20:36 733

原创 拷贝文件夹——Python

import osimport multiprocessingdef copy_file(q, file_name, old_folder_name, new_folder_name): # print("========>模拟copy文件:从%s----->到%s 文件名是:%s" % (old_folder_name, new_folder_name, file_n...

2019-12-21 15:18:31 123

原创 tcp收发数据——Python

1、客户端import socketdef main(): tcp_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) server_ip = input("请输入要连接的服务器的ip:") server_port = int(input("请输入要连接的服务器的port:")) server...

2019-12-19 12:07:35 278

原创 udp收发数据——Python

import socketdef send_msg(udp_socket): dest_ip = input("请输入对方的ip:") dest_port = int(input("请输入对方的port:")) send_data = input("请输入要发送的消息:") udp_socket.sendto(send_data.encode("utf-8")...

2019-12-18 17:29:31 120

原创 大文件复制——Python

对大文件进行复制,读一行复制一行file_read = open("C:\\Users\\me\\Desktop\\readme.txt")file_write = open("C:\\Users\\me\\Desktop\\readme2.txt", "w")while True: text = file_read.readline() if not text: ...

2019-12-14 09:09:43 364

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除