上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 19 下一页
摘要: Git回滚代码到某个commit 回退命令: $ git reset --hard HEAD^ 回退到上个版本$ git reset --hard HEAD~3 回退到前3次提交之前,以此类推,回退到n次提交之前$ git reset --hard commit_id 退到/进到 指定commit的 阅读全文
posted @ 2021-02-24 16:45 睁yan-ii 阅读(55) 评论(0) 推荐(0) 编辑
摘要: # 模拟多线程 import threading num=0 lock=threading.Lock() def change_it(n): global num if lock.acquire(): try: for i in range(1000000): num = num + n num = 阅读全文
posted @ 2021-02-24 14:00 睁yan-ii 阅读(41) 评论(0) 推荐(0) 编辑
摘要: 元数据 # 通过role_id 分类查出不同种类的平均数与用户当前数值对比 (所有的用户) select `user`.id,`user`.username,`user`.balance,`user`.dollar,vt.avsa,vt.avdo from `user` INNER JOIN # 连 阅读全文
posted @ 2020-12-30 20:19 睁yan-ii 阅读(161) 评论(0) 推荐(0) 编辑
摘要: Python 3.x 中"HTTP Error 403: Forbidden"问题的解决方案 urllib.request.urlopen() 方法经常会被用来打开一个网页的源代码,然后会去分析这个页面源代码,但是对于有的网站使用这种方法时会抛出"HTTP Error 403: Forbidden" 阅读全文
posted @ 2020-12-30 20:07 睁yan-ii 阅读(1314) 评论(0) 推荐(0) 编辑
摘要: 报错(AttributeError: 'str' object has no attribute 'items')的解决办法 导致报错的原因是redis版本过高,对redis进行降级 pip install redis==2.10.6 阅读全文
posted @ 2020-12-30 20:06 睁yan-ii 阅读(5649) 评论(0) 推荐(0) 编辑
摘要: 参照地址 https://www.cnblogs.com/zszxz/p/12222201.html 2.1 安装 psycopg2 # pip install psycopg2 2.2 连接数据库 每条完整的sql执行步骤如下,读者应谨记; 建立连接获得 connect 对象 获得游标对象,一个游 阅读全文
posted @ 2020-12-30 19:39 睁yan-ii 阅读(925) 评论(0) 推荐(0) 编辑
摘要: 1. 安装docker,百度解决; 2. 拉取postgreSQL的docker镜像文件:docker pull postgres:12.1 3. 创建 docker volume,名字为“dv_pgdata"(其实可以省略手动创建,直接跑下一步,docker也会自动创建的):docker volu 阅读全文
posted @ 2020-12-30 19:36 睁yan-ii 阅读(3266) 评论(0) 推荐(0) 编辑
摘要: def get_money(): import re import json import urllib.request url = "http://webforex.hermes.hexun.com/forex/quotelist?code=FOREXUSDCNY&column=Code,Pric 阅读全文
posted @ 2020-12-30 14:56 睁yan-ii 阅读(408) 评论(0) 推荐(0) 编辑
摘要: 1 为什么要使用锁 运行以下代码 # 模拟多线程 import threading def change_it(n): global num for i in range(1000000): num = num + n num = num - n print(num,'555') threass=[ 阅读全文
posted @ 2020-12-29 16:52 睁yan-ii 阅读(173) 评论(0) 推荐(0) 编辑
摘要: 欢迎跳转到本文的原文链接:https://honeypps.com/architect/distribute-lock-based-on-database/ 参照连接 https://blog.csdn.net/u013256816/article/details/92854794 概述 在单机时代 阅读全文
posted @ 2020-12-29 10:45 睁yan-ii 阅读(1783) 评论(0) 推荐(0) 编辑
上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 19 下一页