题目链接: http://codeforces.com/contest/1343/problem/CC. Alternating Subsequencetime limit per test1 secondmemory limit per test256 megabytesinputstandard ...
分类:
其他好文 时间:
2020-05-21 22:28:44
阅读次数:
79
// 浅拷贝只拷贝最外一层,更深层次对象级别的只拷贝引用 // 深拷贝拷贝多层,每一级别的数据都会拷贝 var obj = { id: 1, name: 'tom', msg:{ age: 18 }, color: ['pink', 'red'], add: null } var o = {} // ...
分类:
其他好文 时间:
2020-05-21 17:45:26
阅读次数:
53
在本文中将介绍在Docker中通过django + uwsgi + nginx部署方式部署Django项目,
由于记录的是学习过程,使用的都是目前较高的版本。
python 版本为3.8.3
django 版本为3.0.6
nginx 版本为1.17.10
好了简单的介绍之后,就进入正题... ...
分类:
其他好文 时间:
2020-05-21 12:02:39
阅读次数:
91
def write_report(url, excel_name, sheet_name): import re import ast import pandas as pd import openpyxl from copy import deepcopy resp = requests.get( ...
分类:
编程语言 时间:
2020-05-20 20:27:12
阅读次数:
438
转自:https://www.cnblogs.com/embrace-ly/p/10693035.html 方法一:递归 let cloneObj = function(obj){ let str, newobj = obj.constructor Array ? [] : {}; if(typeo ...
分类:
其他好文 时间:
2020-05-20 18:54:06
阅读次数:
40
真正的零拷贝有两种方式: mmap+write Sendfile mmap 是一种内存映射文件的方法,即将一个文件或者其他对象映射到进程的地址空间,实现文件磁盘地址和进程虚拟地址空间中一段虚拟地址的一一对应关系。 这样就可以省掉原来内核 Read 缓冲区 Copy 数据到用户缓冲区,但是还是需要内核 ...
分类:
其他好文 时间:
2020-05-20 18:34:29
阅读次数:
72
1、Python镜像构建 项目结构 配置文件 Dockerfile FROM python:3 WORKDIR /usr/src/app COPY requirements.txt ./ RUN pip install no cache dir i https://pypi.tuna.tsinghu ...
分类:
其他好文 时间:
2020-05-20 18:27:36
阅读次数:
57
一、创建方法dict()函数,创建一个字典。 items = [('name','Gumby'),('age',42)]d = dict(items) 或 phonebook = {'alice':'2341','Beth':'9012'} 使用大括号,键和值对应直接创建 dict={key1:di ...
分类:
编程语言 时间:
2020-05-20 17:07:15
阅读次数:
93
#include <bits/stdc++.h> using namespace std; struct B { B() { this->chr = 0xcedf; } short chr; }; struct A { B s; int i; }; int main() { int64_t i64 ...
分类:
其他好文 时间:
2020-05-20 15:52:14
阅读次数:
56
1.语法:if elif else 2.for :for w in words,在编辑同一个集合时,修改该集合可能很难获得正确的结果 所以通常的做法是循环遍历该集合的副本或者是创建新集合。 遍历副本的方法:for user ,starus in users.copy().items(): 创建新集合 ...
分类:
编程语言 时间:
2020-05-20 12:49:32
阅读次数:
61