02 2020 档案

摘要:硬件安装环境 "官方文档(英)" CPU Performance is primarily bounded by IO (disk and network) rather than CPU. Available CPUs will impact longer running operations a 阅读全文
posted @ 2020-02-24 09:07 LeoShi2020 阅读(657) 评论(0) 推荐(0) 编辑
摘要:生产环境 安装Docker服务 添加代理 "官方原文(英)" 启动服务 END 阅读全文
posted @ 2020-02-24 08:53 LeoShi2020 阅读(134) 评论(0) 推荐(0) 编辑
摘要:LVM LVM是逻辑盘卷管理(Logical Volume Manager)的简称,它是Linux环境下对磁盘分区进行管理的一种机制,LVM是建立在硬盘和分区之上的一个逻辑层,来提高磁盘分区管理的灵活性。LVM是在磁盘分区和文件系统之间添加的一个逻辑层,来为文件系统屏蔽下层磁盘分区布局,提供一个抽象 阅读全文
posted @ 2020-02-24 08:32 LeoShi2020 阅读(1347) 评论(0) 推荐(0) 编辑
摘要:盒子模型 需求一个大盒子500 一个小盒子 200 小盒子在大盒子居中 阅读全文
posted @ 2020-02-23 20:11 LeoShi2020 阅读(125) 评论(0) 推荐(0) 编辑
摘要:CentOS7 mini默认不带命令补全需要自行安装 "使用国内yum清华源" 安装完后退出当前窗口再登录生效 END 阅读全文
posted @ 2020-02-23 13:10 LeoShi2020 阅读(2620) 评论(0) 推荐(0) 编辑
摘要:1. 指定字符前面添加 sed -i 's/指定的字符/需要添加的字符&/' 文件名称 修改Linux启动配置 将 GRUB_CMDLINE_LINUX="rd.lvm.lv=centos/root rd.lvm.lv=centos/swap rhgb quiet" 改为 GRUB_CMDLINE_ 阅读全文
posted @ 2020-02-23 12:45 LeoShi2020 阅读(6469) 评论(0) 推荐(0) 编辑
摘要:` ` 阅读全文
posted @ 2020-02-22 17:59 LeoShi2020 阅读(255) 评论(0) 推荐(0) 编辑
摘要:` ` ` ` 阅读全文
posted @ 2020-02-22 17:30 LeoShi2020 阅读(191) 评论(0) 推荐(0) 编辑
摘要:公司服务器只允许YUM出公网 END 阅读全文
posted @ 2020-02-21 16:39 LeoShi2020 阅读(466) 评论(0) 推荐(0) 编辑
摘要:js function 相当于 python def js语句结束符; python为缩进符 JavaScript Python END 阅读全文
posted @ 2020-02-21 10:35 LeoShi2020 阅读(150) 评论(0) 推荐(0) 编辑
摘要:链式编程 节约代码量 END 阅读全文
posted @ 2020-02-20 21:22 LeoShi2020 阅读(97) 评论(0) 推荐(0) 编辑
摘要:DOM 和 jQuery 相互转换 1. DOM 转jQuery $(DOM对象) 2. jQuery 转 DOM END 阅读全文
posted @ 2020-02-20 13:50 LeoShi2020 阅读(270) 评论(0) 推荐(0) 编辑
摘要:iQuery和DOM对象 用原生js获取来的对象就是DOM对象 jQuery对象 jQuery对象的本质是: 利用$对DOM对象包装后产生的对象(伪数组形式存储) END 阅读全文
posted @ 2020-02-20 13:36 LeoShi2020 阅读(115) 评论(0) 推荐(0) 编辑
摘要:$ 是 jQuery 的缩写 ` ` 阅读全文
posted @ 2020-02-20 12:58 LeoShi2020 阅读(294) 评论(0) 推荐(0) 编辑
摘要:jQuery入口函数 等着DOM结构渲染完毕即可执行内部代码,不必等到所有外部资源加载完毕 演示代码 由于本人使用Flask Jinjia2注释样式为 { } END 阅读全文
posted @ 2020-02-20 11:55 LeoShi2020 阅读(314) 评论(0) 推荐(0) 编辑
摘要:临时使用方法 pip install -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com celery /root/.pyenv/versions/3.9.14/bin/python3.9 -m pip install - 阅读全文
posted @ 2020-02-19 22:35 LeoShi2020 阅读(247) 评论(0) 推荐(0) 编辑
摘要:官网地址 直接下载地址(MacOS) END 阅读全文
posted @ 2020-02-19 16:47 LeoShi2020 阅读(541) 评论(0) 推荐(0) 编辑
摘要:` ` 阅读全文
posted @ 2020-02-18 09:41 LeoShi2020 阅读(294) 评论(0) 推荐(0) 编辑
摘要:修改配置文件(永久修改) 命令方式(临时修改重启失效) ` ` 阅读全文
posted @ 2020-02-18 09:23 LeoShi2020 阅读(765) 评论(0) 推荐(0) 编辑
摘要:系统环境 安装依赖 添加Docker Yum源 安装报错 先安装containerd.io 再安装docker ce 打开Docker服务 ` ` 阅读全文
posted @ 2020-02-18 09:19 LeoShi2020 阅读(5628) 评论(1) 推荐(1) 编辑
摘要:` ` 阅读全文
posted @ 2020-02-18 09:03 LeoShi2020 阅读(475) 评论(0) 推荐(0) 编辑
摘要:` ` 阅读全文
posted @ 2020-02-17 11:39 LeoShi2020 阅读(905) 评论(0) 推荐(0) 编辑
摘要:接收订阅 发布订阅 接收信息结果 阅读全文
posted @ 2020-02-16 22:47 LeoShi2020 阅读(382) 评论(0) 推荐(0) 编辑
摘要:Python 操作redis 阅读全文
posted @ 2020-02-16 22:41 LeoShi2020 阅读(321) 评论(0) 推荐(0) 编辑
摘要:通过网络无法访问Redis redis-cli 172.16.1.111 Could not connect to Redis at 127.0.0.1:6379: Connection refused 修改配置文件 vi /etc/redis.conf bind 127.0.0.1 172.16. 阅读全文
posted @ 2020-02-16 21:33 LeoShi2020 阅读(1145) 评论(0) 推荐(0) 编辑
摘要:设置Redis密码 修改/etc/redis.conf 一定要强密码redis为内存存储 抗暴力破解强 重启服务 登录redis 验证密码 命令直接登录 阅读全文
posted @ 2020-02-16 21:15 LeoShi2020 阅读(710) 评论(0) 推荐(0) 编辑
摘要:配置文件位置 RDB存储配置 持久化地址 查看持久化文件 关闭RDB 注释掉所有的save项 命令方式 ` 开启AOF 修改配置文件 命令方式(无效) 文件存放路径 参考网站:http://redisdoc.com/persistence/index.html 阅读全文
posted @ 2020-02-16 20:59 LeoShi2020 阅读(461) 评论(0) 推荐(0) 编辑
摘要:发布订阅 发布:打电话 订阅:接电话 订阅频道 发布信息 接收到订阅 参考网站: http://redisdoc.com/pubsub/index.html 阅读全文
posted @ 2020-02-16 19:19 LeoShi2020 阅读(273) 评论(0) 推荐(0) 编辑
摘要:哈希相当于下面Python代码 HSET添加哈希 删除哈希 获取所有的key value HMSET一次添加多个键值对 分别获取键值 查看key是否存在 获取总共的键值对 参考网站:http://redisdoc.com/hash/index.html 阅读全文
posted @ 2020-02-16 18:19 LeoShi2020 阅读(250) 评论(0) 推荐(0) 编辑
摘要:SADD 集合添加 SMEMBERS 查看元素 SREM移除元素 SCARD 查看元素个数 SINTER集合交集 SUNION集合并集 集合差集 参考链接:http://redisdoc.com/set/index.html 阅读全文
posted @ 2020-02-16 17:54 LeoShi2020 阅读(243) 评论(0) 推荐(0) 编辑
摘要:LPUSH添加列表 LRANGE 获取全部值 列表左侧添加字符 右侧添加字符串 左右删除列表值 LINDEX列表下标获取值 LLEN列表长度 参考链接 http://redisdoc.com/list/ 阅读全文
posted @ 2020-02-16 17:36 LeoShi2020 阅读(403) 评论(0) 推荐(0) 编辑
摘要:登录Redis 添加字符串 EX 超期时间60s ` ` 阅读全文
posted @ 2020-02-16 17:18 LeoShi2020 阅读(164) 评论(0) 推荐(0) 编辑
摘要:系统环境 yum安装 ` ` Redis服务启动 Redis开机启动 查看运行状态 查看程序进程以及端口 6379 阅读全文
posted @ 2020-02-16 17:02 LeoShi2020 阅读(669) 评论(0) 推荐(0) 编辑
摘要:安装python-memchached插件 pip install python-memcached Collecting python-memcached Downloading python_memcached-1.59-py2.py3-none-any.whl (16 kB) Requirem 阅读全文
posted @ 2020-02-16 13:44 LeoShi2020 阅读(401) 评论(0) 推荐(0) 编辑
摘要:telnet连接memcached 查看端口是否可访问 # telnet 172.16.1.1 11211 Trying 172.16.1.1... Connected to 172.16.1.1. Escape character is '^]'. ^] 添加获取数据 添加语法set没有值的时候添 阅读全文
posted @ 2020-02-16 12:39 LeoShi2020 阅读(176) 评论(0) 推荐(0) 编辑
摘要:# yum install telnet Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile Resolving Dependencies --> Running transaction check > P 阅读全文
posted @ 2020-02-16 12:30 LeoShi2020 阅读(554) 评论(0) 推荐(0) 编辑
摘要:shell直接运行 cat > 01.yumrepo.sh << 'EOF' # 创建备份路径 mkdir -p /etc/yum.repos.d/repo.bak/ # 备份源 mv /etc/yum.repos.d/*.repo /etc/yum.repos.d/repo.bak/ # 导入镜像 阅读全文
posted @ 2020-02-16 12:26 LeoShi2020 阅读(7456) 评论(0) 推荐(0) 编辑
摘要:查看memcached信息 $ brew info memcached memcached: stable 1.5.22 (bottled), HEAD High performance, distributed memory object caching system https://memcac 阅读全文
posted @ 2020-02-16 11:44 LeoShi2020 阅读(239) 评论(0) 推荐(0) 编辑
摘要:#!/usr/bin/env pyhton # coding:utf-8 # @Time : 2020-02-16 10:07 # @Author : LeoShi # @Site : # @File : demo.py # @Software : MacOS Python 3.7 import s 阅读全文
posted @ 2020-02-16 10:44 LeoShi2020 阅读(3560) 评论(0) 推荐(0) 编辑
摘要:返回值规范 json { "code":200, "message":"" "data":[ { "title":"xxx", "content":"xxx" }, { "title":"xxx", "content":"xxx" } ] } 状态码规范 状态码状态码英文名称中文描述 100 Con 阅读全文
posted @ 2020-02-15 18:40 LeoShi2020 阅读(749) 评论(0) 推荐(0) 编辑
摘要:Chrome 调试的时候经常发现缓存没有清理 MacOS :⌘+⇧+r Windows:Ctrl + F5 阅读全文
posted @ 2020-02-15 18:22 LeoShi2020 阅读(445) 评论(0) 推荐(0) 编辑
摘要:获取数据库列表屏蔽系统自带数据库 # 原代码 db_list_result = [('master', ), ('tempdb', ), ('model', ), ('msdb', ), ('student', ), ('school', )] db_list = [] for _database 阅读全文
posted @ 2020-02-15 08:52 LeoShi2020 阅读(2214) 评论(0) 推荐(0) 编辑
摘要:<span>服务器名称:<input type="text" name="server_name" placeholder="服务器名称自动获得" disabled="disabled"> </span><br> 显示结果服务器名称为灰色不可填入数据 服务器名称: 阅读全文
posted @ 2020-02-14 11:10 LeoShi2020 阅读(429) 评论(0) 推荐(0) 编辑
摘要:EXEC xp_cmdshell 'wmic logicaldisk get freespace,caption | findstr C'; <class 'pyodbc.Row'> ('C: 25581236224 \r', ) 查看所有磁盘可用空间 Exec master.dbo.xp_fixe 阅读全文
posted @ 2020-02-14 00:30 LeoShi2020 阅读(323) 评论(0) 推荐(0) 编辑
摘要:运行环境: 服务器端: MSSQL 2014 Server 2012 R2 程序端: Python 3.7.4 MacOS 10.14.6 CentOS Linux release 7.7.1908 (Core) 程序代码 #!/usr/bin/env pyhton # coding:utf-8 # 阅读全文
posted @ 2020-02-13 12:57 LeoShi2020 阅读(338) 评论(0) 推荐(0) 编辑
摘要:Socket5 curl --socks5 10.2.46.19:10808 http://www.baidu.com # 查询结果 <!DOCTYPE html> <!--STATUS OK--><html> <head><meta http-equiv=content-type content= 阅读全文
posted @ 2020-02-13 12:17 LeoShi2020 阅读(1956) 评论(1) 推荐(0) 编辑
摘要:环境: Windows 2012 R2 SQL Server 2014 通过MSSQL查询数据库服务器时间,报错如下: pyodbc.ProgrammingError: ('42000', '[42000] [Microsoft][ODBC Driver 17 for SQL Server][SQL 阅读全文
posted @ 2020-02-12 20:11 LeoShi2020 阅读(5773) 评论(0) 推荐(0) 编辑
摘要:# string to bytes # 方法一:直接复制bytes类型 b'<str>' b = b'Hello World' print(type(b)) print(b) # 方法二:转换 s = 'Hello World' b = bytes(s,encoding='utf-8') print 阅读全文
posted @ 2020-02-12 20:00 LeoShi2020 阅读(592) 评论(0) 推荐(0) 编辑
摘要:运行环境 Windows 2012 R2 1. Windows需要打开WinRM服务,Server系统默认打开,默认端口5985 # WinRM服务查看 PS C:\Users\Administrator> winrm enumerate winrm/config/listener Listener 阅读全文
posted @ 2020-02-12 19:54 LeoShi2020 阅读(2578) 评论(1) 推荐(1) 编辑
摘要:# 获取服务信息 PS C:\Users\Administrator> Get-Service win* Status Name DisplayName Stopped WinHttpAutoProx... WinHTTP Web Proxy Auto-Discovery Se... Running 阅读全文
posted @ 2020-02-12 18:18 LeoShi2020 阅读(4126) 评论(0) 推荐(0) 编辑
摘要:使用subprocess模块 import subprocess # 防火墙服务存在关闭状态 child1 = subprocess.Popen(["systemctl status firewalld | grep Active"], stdout=subprocess.PIPE, shell=T 阅读全文
posted @ 2020-02-12 17:40 LeoShi2020 阅读(454) 评论(0) 推荐(0) 编辑
摘要:Linux执行完命令之后默认会有一个返回值 # ls app backupconfig.json Doc manage.py __pycache__ settings.py # echo $? 0 错误对照表 "OS error code 1: Operation not permitted" "O 阅读全文
posted @ 2020-02-12 13:37 LeoShi2020 阅读(1441) 评论(0) 推荐(0) 编辑
摘要:- 错误代码如下: pip install pyodbc Looking in indexes: http://172.16.1.250/repository/douban/simple Collecting pyodbc Downloading http://172.16.1.250/reposi 阅读全文
posted @ 2020-02-12 11:02 LeoShi2020 阅读(293) 评论(0) 推荐(0) 编辑
摘要:Python 通过pyodbc 连接SQL Server 数据库驱动 安装环境 cat /etc/redhat-release CentOS Linux release 7.7.1908 (Core) 微软官网 https://docs.microsoft.com/zh-cn/sql/connect 阅读全文
posted @ 2020-02-12 10:53 LeoShi2020 阅读(4995) 评论(0) 推荐(0) 编辑
摘要:方法一:Key Value 直接获取 databases = {1: 'Student', 2: 'School'} for k,v in databases.items(): print(k,v) 1 Student 2 School 方法二:通过循环Key获取Value databases = 阅读全文
posted @ 2020-02-12 10:50 LeoShi2020 阅读(9080) 评论(0) 推荐(0) 编辑
摘要:用法:isinstance(变量,list) li = [1,2,3] print(type(li)) if isinstance(li,list): print("This is a List") <class 'list'> This is a List 阅读全文
posted @ 2020-02-12 10:42 LeoShi2020 阅读(10949) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示