返回顶部
摘要: location配置 阅读全文
posted @ 2020-05-08 12:07 公梓小白 阅读(1073) 评论(0) 推荐(0) 编辑
摘要: 启动命令 命令详情说明 阅读全文
posted @ 2020-03-25 11:36 公梓小白 阅读(0) 评论(0) 推荐(0) 编辑
摘要: 使用uwsgi的Python Tracebacker输入死锁日志 阅读全文
posted @ 2019-10-24 21:09 公梓小白 阅读(324) 评论(0) 推荐(0) 编辑
摘要: 以下是服务的nginx配置,nginx有一个配置文件叫nginx.conf,里面可以填写每个应用的nginx配置文件的文件夹,下面是某个应用的配置文件 nginx.conf配置 #user nobody; user root; worker_processes 4; worker_rlimit_no 阅读全文
posted @ 2019-08-19 18:38 公梓小白 阅读(529) 评论(0) 推荐(0) 编辑
摘要: 一、全局变量的修改 在web项目代码中,有很多全局变量,有的是使用字符串这样的不可变对象,而有的则是使用字典这样的可变对象。如果在代码里面修改了可变的全局变量(如dict,list),就会导致进程中的这个全局变量都修改了。在web服务中,每次request请求都会生成一个新的线程,这个线程会共用进程 阅读全文
posted @ 2019-04-23 21:41 公梓小白 阅读(208) 评论(0) 推荐(0) 编辑
摘要: 一、链表排序 1、归并排序(递归版) 这个算法要采用递归,空间复杂度没办法达到O(n),时间复杂度为O(nlog(n) # -*- coding: utf-8 -*-' class ListNode(object): def __init__(self, x): self.val = x self. 阅读全文
posted @ 2019-04-06 13:11 公梓小白 阅读(5839) 评论(2) 推荐(0) 编辑
摘要: 1、crontab e 编辑crontab文件,修改任务 新任务安装后或任务修改后不需要重启cron进程即可生效。 2、crontab l 列出某个用户cron服务的详细内容 3、 /etc/init.d/cron start //启动服务 /etc/init.d/cron stop //关闭服务 阅读全文
posted @ 2019-01-15 23:49 公梓小白 阅读(433) 评论(0) 推荐(0) 编辑
摘要: 如果是使用 nohup python abc.py nohup.log 2 &1 & 的话,可以将日志写入到nohup.log文件,但是没法实时用tail f nohup.log来查看日志。 解决方法: nohup python u abc.py nohup.log 2 &1 & 因为python会 阅读全文
posted @ 2019-01-12 18:28 公梓小白 阅读(7237) 评论(1) 推荐(0) 编辑
摘要: 允许下面三个域名http://www.123admin.com、http://m.123admin.com、http://wap.123admin.com 进行跨域访问 阅读全文
posted @ 2018-12-30 21:32 公梓小白 阅读(6150) 评论(0) 推荐(0) 编辑
摘要: 一、索引 1、查看索引 db.order.getIndexes() 2、创建索引 db.order.createIndex({"dt":1}) 3、删除索引 db.order.dropIndex("user_id_1") 删除字段user_id的索引(后面要加一个1) 二、添加、删除字段 1 、添加 阅读全文
posted @ 2018-12-14 15:27 公梓小白 阅读(249) 评论(0) 推荐(0) 编辑