默认的是“https://pypi.python.org/simple”,我们可将其替换为如下的几个数据来源,这些都是国内的pip镜像:清华:https://pypi.tuna.tsinghua.edu.cn/simple阿里:http://mirrors.aliyun.com/pypi/simpl ...
分类:
编程语言 时间:
2020-06-20 21:53:29
阅读次数:
105
package com.hy.fddsvr.utils; import java.io.BufferedOutputStream; import java.io.File; import java.io.FileOutputStream; import java.sql.Timestamp; imp ...
分类:
编程语言 时间:
2020-06-20 19:43:12
阅读次数:
109
1.安装celery pip install -U celery -i https://pypi.douban.com/simple ##-U是指update的意思 2.创建mycelery目录 luffyapi/ ├── mycelery/ ├── config.py # 配置文件 ├── __i ...
分类:
编程语言 时间:
2020-06-20 17:00:26
阅读次数:
66
1.可以通过settings/dev.py的ALLOWED_HOSTS,设置允许访问 # 设置哪些客户端可以通过地址访问到后端 ALLOWED_HOSTS = [ 'api.luffycity.cn', ] 2.安装跨域模块(一下代码修改都是在settings.dev下进行的) pip instal ...
分类:
编程语言 时间:
2020-06-20 11:36:32
阅读次数:
76
开始写后端工程: cnpm i express body-parser jwt-simple cors express-session connect-mongo mongoose -S ...
分类:
其他好文 时间:
2020-06-19 23:10:37
阅读次数:
92
使用 EXPLAIN 函数可以清楚的查看语句的执行情况 EXPLAIN select id from b_nc_card where id != 10000; 一共查询了:530912 行 优化后 EXPLAIN (select id from b_nc_card where id > 10000) ...
分类:
数据库 时间:
2020-06-19 19:19:51
阅读次数:
56
https://nodejs.org/api/net.html#net_net_createconnection 代理前:client → server 代理后:client → proxy → server game-client.js: const net = require("net"); c ...
分类:
Web程序 时间:
2020-06-19 16:18:50
阅读次数:
62
抽象工厂 建立一个最高层级的工厂,用来生产不同产品的工厂,然后再建立一个产品规范,用来规定生产的产品需要有什么样的功能。 这样做的好处就是不需要关心创建的细节,并将一个系列的产品一起创建 产品的规范: /*电脑产品*/ public interface ComputerProduct { publi ...
分类:
其他好文 时间:
2020-06-19 12:14:34
阅读次数:
43
好风凭借力,送我上青云。 介绍 SQLAlchemy对象关系映射器提供了一种将用户定义的Python类与数据库表以及这些类(对象)的实例与相应表中的行关联起来的方法 1. 安装 pip install sqlalchemy -i https://pypi.doubanio.com/simple 2. ...
分类:
数据库 时间:
2020-06-18 15:49:30
阅读次数:
49
1078 Hashing (25分) The task of this problem is simple: insert a sequence of distinct positive integers into a hash table, and output the positions of ...
分类:
其他好文 时间:
2020-06-17 12:38:08
阅读次数:
61