编程语言
一、前言 今天在做人脸检测的时候遇到了图片过大的问题,解决方法是在提交图片前先将图片进行压缩。 二、实现代码 from PIL import Image import os def get_size(file): # 获取文件大小:KB size = os.path.getsize(file) re ...
分类:编程语言 时间:2021-06-04 14:19:59 收藏:0 阅读:8
中序遍历递归写法 思考良久写不出来,借鉴了网上的写法 # Definition for a binary tree node. # class TreeNode: # def __init__(self, val=0, left=None, right=None): # self.val = val ...
分类:编程语言 时间:2021-06-04 14:17:50 收藏:0 阅读:8
1 概述 Python3中有6个标准的数据类型 1、Number(数字) 2、String(字符串) 3、List(列表) 4、Tuple(元组) 5、Set(集合) 6、Dictionary(字典) 不可变数据(3个) Number(数字)、String(字符串)、Tuple(元组)。 可变数据( ...
分类:编程语言 时间:2021-06-04 12:24:37 收藏:0 阅读:17
row = 1 while row <= 9: col = 1 while col <= row: print("%d*%d=%d" % (col, row, col*row) , end="\t") col += 1 print("") row += 1 ...
分类:编程语言 时间:2021-06-04 12:23:34 收藏:0 阅读:5
package Array;public class ArrayReverse { public static void main(String[] args) { //数组反转 //定义数组 int[] arr = {11, 22, 33, 44, 55, 66, 77, 885}; //将{11 ...
分类:编程语言 时间:2021-06-04 12:22:39 收藏:0 阅读:9
#操作符练习,求打印的内容 x = True y = False z = False if not x or y: print(1) elif not x or not y and z: print(2) elif not x or y or not y and x: print(3) else: ...
分类:编程语言 时间:2021-06-04 12:22:31 收藏:0 阅读:9
LeetCode 83. Remove Duplicates from Sorted List(删除排序链表中的重复元素) 题目 链接 https://leetcode-cn.com/problems/remove-duplicates-from-sorted-list 问题描述 存在一个按升序排列 ...
分类:编程语言 时间:2021-06-04 12:21:50 收藏:0 阅读:16
##概要 通俗讲,PKCS1是标准RSA秘钥对标准规范,但是都是裸奔的; PKCS8是对加密后的秘钥进行了描述,就是说P8格式的秘钥不是裸奔了 ###PKCS1私钥生成 openssl genrsa -out private.pem 1024 PKCS1格式的private.pem 内容如下 BEG ...
分类:编程语言 时间:2021-06-04 12:20:33 收藏:0 阅读:84
c++类型有四种类型转换,分别是static_cast、const_cast、reinterpret_cast以及dynamic_cast,下面浅谈下个人理解。 1.const_cast 首先看一个错误的用法: 1 const int i = 10; 2 int *p = const_cast<in ...
分类:编程语言 时间:2021-06-04 12:20:12 收藏:0 阅读:18
算法描述: 公钥算法的特点就是很容易由算子计算出结果,而基本上不可能作逆向运算。这也就是使用了两个质数的所要达到的目的。 现在假设Alice和Bob分别是参与DH式密钥交换过程的两方,他们一开始会商议确定一个小质数(一般是2,3,5这样的小数字)和一个大质数(有300位以上)作为加密的原始信息。小质 ...
分类:编程语言 时间:2021-06-04 12:18:14 收藏:0 阅读:10
197697797851284
上一页共512833条下一页
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!