一、概述 所谓断点续传,其实只是指下载,也就是要从文件已经下载的地方开始继续下载。在以前版本的HTTP协议是不支持断点的,HTTP/1.1开始就支持了。一般断点下载时才用到Range和Content-Range实体头。HTTP协议本身不支持断点上传,需要自己实现。 二、Range 用于请求头中,指定 ...
分类:
Web程序 时间:
2020-03-23 17:25:21
阅读次数:
97
给定一棵有根树,每个结点有权值 $a_i$,记 $c_i$ 为 $i$ 的子树中权值 $ using namespace std; define int long long const int N = 2005; vector g[N]; priority_queue hp; int ans[N], ...
分类:
其他好文 时间:
2020-03-23 09:19:09
阅读次数:
64
最近在对sql进行性能优化因此对explain相关的知识进行一个简单的整理归纳。 EXPLAIN: 为SELECT语句中使用到的每个表返回一条 SELECT 执行的详细信息;按照MySQL在处理语句时读取它们的顺序列出这些表。 命令输出格式 id = 1 select_type = SIMPLE t ...
分类:
其他好文 时间:
2020-03-23 00:32:13
阅读次数:
78
1.聚类代码: 1 #!/usr/bin/env python 2 # -*- coding: utf-8 -*- 3 # @File : 聚类2.py 4 # @Author: 赵路仓 5 # @Date : 2020/3/19 6 # @Desc : 7 # @Contact : 3983334 ...
分类:
编程语言 时间:
2020-03-22 22:26:38
阅读次数:
88
import turtle import time # 同时设置pencolor=color1, fillcolor=color2 turtle.color("red", "yellow") turtle.begin_fill()#开始填充 for i in range(50): turtle.fo ...
分类:
其他好文 时间:
2020-03-22 20:02:09
阅读次数:
75
代码: #JDTYZL.pyimport mathimport timescale=14s,m,=1,2print("执行开始".center(scale//2, "-"))start = time.perf_counter()for i in range(scale+1): s=math.sqrt ...
分类:
其他好文 时间:
2020-03-22 19:49:54
阅读次数:
62
Given an integer array with all positive numbers and no duplicates, find the number of possible combinations that add up to a positive integer target. ...
分类:
其他好文 时间:
2020-03-22 19:30:38
阅读次数:
66
#带有进度条的圆周率计算 1 import time 2 m = 100 3 pi = 0 4 for i in range(m): 5 a ='*'*i 6 b ='.'*(m-i) 7 c = ((i+1)/m)*100 8 print("\r{:<3.0f}%[{}->{}]".format( ...
分类:
其他好文 时间:
2020-03-22 18:16:30
阅读次数:
88
A - Range Flip Find Route 题意:本题就是给你一个矩阵,要你求出从(1,1)到(h,w)数量最少的黑色方块 题解:在作这一题的时候我最初想到的是用DFS求出每一种可能的方式,比较出它们的最小值,结果TLE了,赛后补题,才懂得还可以用DP来做:这里我们定义一个二维数组dp[h] ...
分类:
其他好文 时间:
2020-03-22 17:48:59
阅读次数:
71
1 class Solution: 2 def sumFourDivisors(self, nums: 'List[int]') -> int: 3 result = 0 4 n = len(nums) 5 for i in range(n): 6 s = set() 7 cur = nums[i] ...
分类:
其他好文 时间:
2020-03-22 14:14:45
阅读次数:
54