什么是不可变类型 变量对应的值中的数据是不能被修改,如果修改就会生成一个新的值从而分配新的内存空间。 # int为不可变类型 n = 5 print(id(n)) 140707604042688 n+=1 print(id(n))140707604042720 b = Falseprint(id(b ...
分类:
编程语言 时间:
2020-06-03 00:25:10
阅读次数:
88
1 //用画布做一个验证码 2 @WebServlet("/image.do") 3 public class ImageCodeServlet extends HttpServlet { 4 private static final long serialVersionUID = 1L; 5 6 ...
分类:
其他好文 时间:
2020-06-02 21:41:14
阅读次数:
84
自定义属性操作 标签自带属性:id\class\onclick等固有属性 支持添加属性:获取固有属性,undefined 获取属性(自定义、固有均支持): -getAttribute('自定义id名') 设置属性 -setAttribute('id名',"vale") 移除属性: removeAtt... ...
分类:
Web程序 时间:
2020-06-01 16:54:27
阅读次数:
125
1 import java.io.UnsupportedEncodingException; 2 import java.security.MessageDigest; 3 import java.security.NoSuchAlgorithmException; 4 import java.ut ...
分类:
系统相关 时间:
2020-06-01 14:08:43
阅读次数:
71
code unless(fboundp('ycFlattenList) procedure(ycFlattenList(listin) prog((output) foreach(arg listin if(listp(arg) output = append(output ycFlattenLis ...
分类:
其他好文 时间:
2020-05-31 20:06:48
阅读次数:
90
前言 因为学习的第一门编程语言是C语言,所以在学习python和编写python代码时,总是会不经意的采用C语言的语法和思想,昨天在看一个代码算法时就出现了这个问题 问题和解决 N = [1] count = 1 for i in range(0,6): print(N) N.append(0) c ...
分类:
编程语言 时间:
2020-05-31 11:06:32
阅读次数:
76
First_AE_Cost.append({'Iteration':epoch,'first_ae_cost':cost1}) with open(os.path.join(self.params['logdir'], 'first_ae_cost.csv'),"w",newline="") as ...
分类:
其他好文 时间:
2020-05-31 09:22:28
阅读次数:
66
1.列表,[ ],删除最后一个元素pop,添加到末尾Append,有序的 代码: colors=["purple", "orange", "green"]guess=input("Guess a color:")if guess in colors: print("You guessed corre ...
分类:
其他好文 时间:
2020-05-31 00:36:57
阅读次数:
69
定义问题 波士顿房价数据集收集于1978年,包括14个特征和506条数据(每条特征的中文解释暂时忽略)。 分析数据,发现输入的特征属性的度量单位是不统一的,也许需要对数据度量单位进行调整。 导入数据 首先导入项目中需要的类库。 1 #导入类库 2 import numpy as np 3 from ...
分类:
系统相关 时间:
2020-05-30 10:59:43
阅读次数:
66
tar功能,1)将多个文文件打包为一个文件,2)将文件打包并压缩,3)将打包的文件解包,4)将打包压缩的文件解压 1、用法 tar [选项] [文件..] 2、命令选项 -A, --catenate 追加 tar 文件至归档-c, --create 创建一个新归档-r, --append 追加文件至 ...
分类:
系统相关 时间:
2020-05-29 22:55:23
阅读次数:
87