摘要: go json文件的序列化和反序列化 package main import ( "encoding/json" "fmt" ) type v40 struct { V41 int V42 string } type jsonFile struct { V1 string V2 string V3 阅读全文
posted @ 2022-08-19 11:24 大长胡子 阅读(44) 评论(1) 推荐(0) 编辑
摘要: json_demo.go package main import ( "encoding/json" "fmt" "io/ioutil" "os" ) type v40 struct { V41 int V42 string } type jsonFile struct { V1 string V2 阅读全文
posted @ 2022-08-18 17:08 大长胡子 阅读(71) 评论(0) 推荐(0) 编辑
摘要: 原文: https://wiki.debian.org/SELinux/Setup 配置步骤原文: ``` 2. Steps to setup SELinux The following steps describe how to install and configure SELinux toge 阅读全文
posted @ 2021-08-27 09:47 大长胡子 阅读(1392) 评论(0) 推荐(1) 编辑
摘要: 这些基础信息,都可以在 /proc 目录里面找到,比如下面这个例子,从文件中获取信息(后面会讲用库的方法 这个例子中,通过/proc/stat 中获取cpu 使用率,类似top命令的功能,主要通过计算cpu在各个阶段使用的时间,来算出使用率 import os import time class S 阅读全文
posted @ 2021-01-18 14:34 大长胡子 阅读(946) 评论(0) 推荐(0) 编辑
摘要: 来,开始从头创建一个仓库: 先创建一个文件夹 test_repo mkdir -p test_repo && cd test_repo 创建一个conf文件夹,此文件夹存放仓库的配置信息 mkdir -p conf && cd conf 开始写仓库配置信息 vim distributions 文件内 阅读全文
posted @ 2020-12-16 16:09 大长胡子 阅读(1685) 评论(0) 推荐(0) 编辑
摘要: 路由 接下来给第一章的小例子增加一点东西: @app.route('/apple') def apple(): return 'This is appple' @app.route('/orange/') def orange(): return 'This is orange' 这样的形式,可以通 阅读全文
posted @ 2020-12-16 10:13 大长胡子 阅读(69) 评论(0) 推荐(0) 编辑
摘要: 以下所有操作在linux系统python3 虚拟环境中使用 source your_env_path/bin/active 安装 pip install flask 第一个简单例子 创建hello.py 内容 from flask import Flask # 导入flask库文件 app = Fl 阅读全文
posted @ 2020-12-15 17:29 大长胡子 阅读(89) 评论(0) 推荐(0) 编辑
摘要: ## 首先启动服务端 ### 服务端 """ 该脚本创建一个TCP服务器,接受客户端信息,返回加了时间缀的信息 """ from socket import * from time import ctime HOST = '' PORT = 21567 BUFSIZ = 1024 ADDR = (H 阅读全文
posted @ 2020-12-14 16:39 大长胡子 阅读(181) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2019-08-26 20:25 大长胡子 阅读(1555) 评论(0) 推荐(0) 编辑
摘要: 用户权限是在用户建立连接确认用户账号密码之后,连接器会到权限表中查找该用户所有的权限,之后该用户所做的一切操作的权限,都依赖于此次的查询。 在用户建立连接之后,如果管理员对该用户的权限做了修改,该用户的权限不会相应的更改,只有重新登录之后,才有相应的权限,原因就是上面操作造成的 如果用户不主动断开连 阅读全文
posted @ 2019-08-15 11:51 大长胡子 阅读(223) 评论(0) 推荐(0) 编辑