11 2022 档案

摘要:创建项目目录 mkdir tutorial cd tutorial 创建一个virtualenv来隔离我们本地的包依赖关系 python -m venv venv env\Scripts\activate 创建项目 pip install djangorestframework 创建一个新项目和一个 阅读全文
posted @ 2022-11-28 11:47 vx_guanchaoguo0 阅读(16) 评论(0) 推荐(0) 编辑
摘要:使用django的定时任务一般出现各种问题 例如找不到这个注册表 或者urls 不存在等 etc.... 版本不兼容 我的版本 django 2.2.8 django_apscheduler==0.2.12 APScheduler~=3.9.1.post1 如果单独使用 APScheduler 导致 阅读全文
posted @ 2022-11-27 15:09 vx_guanchaoguo0 阅读(338) 评论(0) 推荐(0) 编辑
摘要:在docker desk 崩溃后 安装不上postgresql 安装mac postgressql 需要先安装 brew brew install postgres 初始化数据库 其他目录可能没有权限 initdb ~/postgres ####创建数据库默认 postgres createdb 查 阅读全文
posted @ 2022-11-23 14:33 vx_guanchaoguo0 阅读(163) 评论(0) 推荐(0) 编辑
摘要:mac m2 navicat premium // 安装xcode用于编辑plist文件 brew install xcodes 打开plist open ~/Library/Preferences/com.navicat.NavicatPremium.plist 删除如下内容 就进入到配置目录 c 阅读全文
posted @ 2022-11-23 14:02 vx_guanchaoguo0 阅读(870) 评论(0) 推荐(0) 编辑
摘要:#### 很多人用容器开发喜欢用 docker desktop * 目前是最新版本 Docker Desktop 4.14.1 * 查看方式 https://docs.docker.com/desktop/release-notes/ * 本人多次此时 添加加速地址 不生效 任然出现 Error r 阅读全文
posted @ 2022-11-23 09:38 vx_guanchaoguo0 阅读(1299) 评论(0) 推荐(1) 编辑
摘要:docker postgresql 启动异常 一般是非正常的关闭 造成事务的日志文件损坏了 ==这个基本就是数据会消失== 还不如重新设置容器来的简单 恢复办法 关闭或者删除当前容器 使用交互方式启动 docker run -it -v /Users/jimogangdan/data/pgsql:/ 阅读全文
posted @ 2022-11-22 15:43 vx_guanchaoguo0 阅读(97) 评论(0) 推荐(0) 编辑
摘要:无锁方案就是 lock-free 一般多个线程写文件 三步 open seek write linux io 两个原子操作 open o_create write o_appned java 测试 import java.io.BufferedWriter; import java.io.FileW 阅读全文
posted @ 2022-11-18 09:41 vx_guanchaoguo0 阅读(27) 评论(0) 推荐(0) 编辑
摘要:全家桶都可以用 新版的UI 安装步骤 插件地址 https://github.com/guanchaoguo/blog_download_files/blob/master/files/new_ui_preview.jar 阅读全文
posted @ 2022-11-17 09:20 vx_guanchaoguo0 阅读(22) 评论(0) 推荐(0) 编辑
摘要:很多web 框架中经常看到slug的使用 什么是slug? slug 是一种术语 意为 爬行虫 鼻涕虫 使用使用包含数字 字母 下划线的 的 短标签 有什么用呢? 有利于seo的优化 一般的参数 例如 news-article-title 用在什么地方? 一般是用于web框架的 url的解析和处理 阅读全文
posted @ 2022-11-15 16:07 vx_guanchaoguo0 阅读(499) 评论(0) 推荐(0) 编辑
摘要:新建一个目录 mkdir example 基本说明文件 README.rst LICENSE setup.cfg setup.py MANIFEST.in docs example/README.rst 点击查看代码 example Polls is a Django app to conduct 阅读全文
posted @ 2022-11-15 10:52 vx_guanchaoguo0 阅读(63) 评论(0) 推荐(0) 编辑
摘要:/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)" 如果提示 git 未安装 https://sourceforge.net/projects/git-osx-installer 阅读全文
posted @ 2022-11-14 09:36 vx_guanchaoguo0 阅读(13) 评论(0) 推荐(0) 编辑
摘要:使用国内源 全局 win + R 输入 %APPDATA% 回车 新建 pip/pip.ini 写入如下内容 [global] index-url=https://pypi.tuna.tsinghua.edu.cn/simple [install] trusted-host=pypi.tuna.ts 阅读全文
posted @ 2022-11-08 21:30 vx_guanchaoguo0 阅读(31) 评论(0) 推荐(0) 编辑
摘要:构建镜像 dockerfile 点击查看代码 # 现在我们需要配置一些东西。 # 编译参数,用于指定 Swoole 版本 ARG swoole_ver # 保存到环境变量,如果没有传递就给默认值 ENV SWOOLE_VER=${swoole_ver:-"v4.5.0"} # apk 是 alpin 阅读全文
posted @ 2022-11-08 20:59 vx_guanchaoguo0 阅读(75) 评论(0) 推荐(0) 编辑
摘要:version: "3" services: pgsql: container_name: pgsql image: postgres:latest privileged: true environment: POSTGRES_PASSWORD: password POSTGRES_USER: po 阅读全文
posted @ 2022-11-08 20:54 vx_guanchaoguo0 阅读(20) 评论(0) 推荐(0) 编辑
摘要:使用ide 上传文件 代替postman 上传文件 环境文件 http-client.private.env.json { "dev": { "host": "http://localhost:15731/api/v1/", "jwt": "" } } 新建文件 .http后缀结尾即可 ### 上传 阅读全文
posted @ 2022-11-08 16:37 vx_guanchaoguo0 阅读(23) 评论(0) 推荐(0) 编辑
摘要:#### 背景 * pycharm + win10 环境开发 很多时候 需要编译 一些c++ 拓展 例如 bcrypt==3.1.4 * win 安装一堆的 Microsoft Visual C++ 14.0 is required #### 内置服务 ``` set -eux && sed -i 阅读全文
posted @ 2022-11-08 10:12 vx_guanchaoguo0 阅读(24) 评论(0) 推荐(0) 编辑
摘要:递归回溯实现 退出条件全部遍历结束 // 全部结束 if (count == 81): # 递归出口 return True // 已经填充过了 # 行优先遍历 row = count // 9 # 行标 col = count % 9 # 列标 if matrix[row][col] != 0: 阅读全文
posted @ 2022-11-02 22:31 vx_guanchaoguo0 阅读(80) 评论(0) 推荐(0) 编辑
摘要:python 1~100 生成 3一个组 print ([[x for x in range(1,100)] [i:i+3] for i in range(0,100,3)]) 阅读全文
posted @ 2022-11-02 20:51 vx_guanchaoguo0 阅读(25) 评论(0) 推荐(0) 编辑
摘要:为什么需要nginx tornado 内置的web http server 功能受限 python的多线程 是解释器GIL的大锁 实际是一个线程运行 充分利用多核能力 nginx 点击查看代码 user nginx; worker_processes 5; error_log /var/log/ng 阅读全文
posted @ 2022-11-02 11:54 vx_guanchaoguo0 阅读(53) 评论(0) 推荐(0) 编辑
摘要:使用分隔符号 分隔符编码 点击查看代码 func DelimeterEncode(message string) ([]byte, error) { var pkg = new(bytes.Buffer) err := binary.Write(pkg, binary.BigEndian, []by 阅读全文
posted @ 2022-11-02 11:16 vx_guanchaoguo0 阅读(49) 评论(0) 推荐(0) 编辑

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