SpringBootFreemarker.zip
老师,这个一直报这个错,但是代码我觉得写的也没什么问题啊,不知道什么原因
#coding=utf-8 with open(r"c:/mypicture.jpg",'rb') as srcFile,open("2.2二进制文件的读写","wb") as destFile: for line in srcFile: destFile.write(line)
老师,为什么这样读不了呀,我就把照片存在桌面上,应该就是c盘呀我在c盘里面搜,但是它就到这里进度条就一直没动了,5分钟了都,而且搜的过程也贼慢,之前都把东西存在c盘后来都删了,现在有文件都放到d盘去了,但是他运行还是很慢,老师有时间能不能帮我清个内存,麻烦了
为什么x<40时,right=true
#为文本文件每一行末尾增加行号(加啥都行) #coding=utf-8 with open(r"d:\b.txt","r",encoding="utf-8") as f: lines=f.readlines() lines2=[line.rstrip()+"#"+str(index)+"\n" for index,line in zip(range(1,lines+1))] #用列表推导式做处理 huawei#2 with open("b.txt","w") as f: f.writelines(lines2)
老师,怎么会这样的呀,我跟着视频敲得一模一样呀,没有把整型和列表连在一起呀
#coding=utf-8 class AgeError(Exception): def __init__(self,errorinfo): #info信息 Exception.__init__(self) self.errorInfo=errorinfo def __str__(self): return str(self.errorInfo)+"年龄错误!应在1-150之间" if __name__=="__main__": #如果是True,则模块是作为独立文件执行,这下面可以写测试代码 age=int(input("输入一个年龄:")) if age<1 or age>=150: raise AgeError(age) else: print("正常的年龄:",age)
老师,为什么我按要求搞得和视频里老师调试的不一样啊,代码应该没问题,断点也设置了,怎么是个这样的
老师,等值连接是使用值的相等性,是指那一列的值全部相等吗?
老师,我这在构造器里面调用别的构造器为什么出现红色标记?我看了老师调用构造器是一样的,谢谢。
import traceback try: a = int(10.3) b = int(input("请输入一个不为0的数:")) c = a / b print(c) except: traceback.print_exc()
运行图:我的记事本里并没有生成报错的。但是用with的时候就生成了,而且运行界面如下,按老师视频里讲的,这两个不是等价的吗,应该运行结果一样呀,为什么会这样呢
#traceback模块生成异常日志 coding=utf-8 import traceback try: a = int(10.3) b = int(input("请输入一个不为0的数:")) c = a / b print(c) except: with open(r"d:/a.txt","a") as f: traceback.print_exc(file=f)
老师,我这个pycham每次都说没有解释器运行是什么原因呀,点了也能用但是就是每次都要点,是要安在c盘才可以吗?
a=b=((a)) ((b)) (a) (b)
C:\Users\Administrator\PycharmProjects\pythonProject01\venv\Scripts\python.exe C:/Users/Administrator/PycharmProjects/pythonProject01/my02.py
<class 'int'>
<class 'str'>
88
Process finished with exit code 0
是不是“”里面代表的是字符串,但是输出结果都是88
self.btn01["command"]=self.songhua
老师,这个括号里的command是什么作用?这个是专门用来绑定事件的嘛?
老师这里的linkActiveClass不明白啊,这是干啥的?????
老师 你这个on 触发的是什么时间吗 一脸懵逼 不是说药用emit.(事件名,回调函数)来触发得嘛 现在为啥又可以直接触发了
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title> <style> *{ margin: 0; padding: 0; } body{ background-color: #f1f1f1; } .container{ width: 1240px; margin: 0 auto; } .container ul{ overflow: hidden; clear: both; } .container ul li{ position: relative; float: left; list-style: none; background-color: #fff; margin-top: 10px; margin-right: 9px; width: 303px; height: 375px; } .container ul li a img{ height: 230px; margin-top: 30px; } .container ul li:nth-child(4n){ margin-right: 0; } .container ul li a{ display: block; width: 100%; height: 100%; text-align: center; text-decoration: none; } .text .name{ display: block; color: #333; font-size: 16px; margin-bottom: 2px; } .text .desc{ display: block; color: #999; font-size: 14px; } .text .price i{ font-style: normal; font-size: 14px; bottom: 3px; } .text .price{ display: inline-block; color: #c00; font-size: 22px; padding-left: 14px; } .text .price em{ font-size: 16px; font-style: normal; } .product-sign{ position:absolute; top: 30px; left: 30px; display: block; width: 60px; height: 60px; background-color: #ff64a6; border-radius: 50%; line-height: 60px; color: #fff; font-size: 16px; text-align: center; } </style> </head> <body> <div class="container"> <ul> <li> <a href="#"> <img src="./1.png" alt=""> <div class="text"> <span class="name">魅族 18</span> <span class="desc">限时领券最高立省1000 | 12期免息</span> <span class="price"><i>¥</i>3900<em>起</em></span> </div> <span class="product-sign">免息</span> </a> </li> <li> <a href="#"> <img src="./1.png" alt=""> <div class="text"> <span class="name">魅族 18</span> <span class="desc">限时领券最高立省1000 | 12期免息</span> <span class="price"><i>¥</i>3900<em>起</em></span> </div> <span class="product-sign">免息</span> </a> </li> <li> <a href="#"> <img src="./1.png" alt=""> <div class="text"> <span class="name">魅族 18</span> <span class="desc">限时领券最高立省1000 | 12期免息</span> <span class="price"><i>¥</i>3900<em>起</em></span> </div> <span class="product-sign">免息</span> </a> </li> <li> <a href="#"> <img src="./1.png" alt=""> <div class="text"> <span class="name">魅族 18</span> <span class="desc">限时领券最高立省1000 | 12期免息</span> <span class="price"><i>¥</i>3900<em>起</em></span> </div> <span class="product-sign">免息</span> </a> </li> </ul> </div> </body> </html>
.container ul li{
position: relative;
}这里面的position一定要用relative相对定位吗?
这样也可以吧
非常抱歉给您带来不好的体验!为了更深入的了解您的学习情况以及遇到的问题,您可以直接拨打投诉热线:
我们将在第一时间处理好您的问题!
关于
课程分类
百战程序员微信公众号
百战程序员微信小程序
©2014-2025百战汇智(北京)科技有限公司 All Rights Reserved 北京亦庄经济开发区科创十四街 赛蒂国际工业园网站维护:百战汇智(北京)科技有限公司 京公网安备 11011402011233号 京ICP备18060230号-3 营业执照 经营许可证:京B2-20212637