这个语句最后要背下来 还是用到了找得到这一条就行
class Student: # def __init__(self): # self name='崔珮玲' # self score=90 这样子写等于把name和score都定死了,没得边 def __init__(self,name,score): #self必须位于第一个参数 self.name = name self.score = score def say_score(self): #self必须位于第一个参数 print('{0}的分数是{1}',format(self.name,self.score)) s1=Student("gaoqi",18) s1.say_score()
老师 为什么我这个代码跑起来后,他会提示format后面要跟字符串而不是值
老师还是这样,前一天有表格,第二天就没有表格了,但是可以操作,创建的表格已经创建好了,但不显示,刷新也没用,之前您说重启oracle也试了没用,而且我现在用的笔记本是新买,之前的电脑是这样现在的也是这样
老师我用您发的源码用maven插件的tomcat:run还是访问不到index,但我配置了tomcat后直接用tomcat启动能访问得到,这两者区别大不大,对以后maven学习有什么影响吗
public class Test1 { public static void main(String[] args) { //ExecutorService pool = Executors.newSingleThreadExecutor(); ExecutorService pool = Executors.newFixedThreadPool(10); //ExecutorService pool = Executors.newCachedThreadPool(); for (int i = 0; i < 20; i++) { final int n = i; Runnable command = new Runnable() { @Override public void run() { System.out.println("开始执行: " + n); try { Thread.sleep(1000); } catch (InterruptedException e) { e.printStackTrace(); } System.out.println("结束执行: " + n); } }; pool.execute(command); } pool.shutdown(); } }
老师, 请问一下, 在本节课的示例Test1中, 为什么在代码"final int n = i;", 要使用final呢? 不加final, 直接复制 int n = i; 应该也可以达到同样的效果吧?
老师说需要开启端口号,关闭防火墙,输入这个命令,我这里和老师不同,找不到
老师:
测试每一条命令时,如何设置才能达到回车就可以完成指令,而不需要重复run的操作。
老师:我在登陆mysql的时候有这样的错误是什么问题,怎么解决?
老师我这个该怎么解决,把user换成图片中的就有用,写成代码中的就没用
turtle MyRectangal: (x=y=width=height=): .x = x .y = y .width = width .height = height (): area = .width * .height (.format(area)) (): (.format(* .width + * .height)) (): turtle.penup() turtle.goto(.x.y) turtle.pendown() i (): turtle.right() turtle.forward(.width) turtle.right() turtle.forward(.height) turtle.done() s1 = MyRectangal() s1.getArea() s1.getPrimeter() s1.draw() s2 = MyRectangal() s2.getArea() s2.getPrimeter() s2.draw()
s1和s2单独调用没有问题,两个写在一起时出现错误,这个是什么问题
create table student6( stu_id int, stu_name varchar(20) ); #为student6的stu_name 添加not null alter table student6 modify stu_name varchar(20) not null;
老师,已经给stu_name添加了非空约束,第1条stu_name不写报错,写入后可以保存,但是在表格上删除字符成空的后为什么也可以保存;新建第2条的时候也是一样,只要里面之前填过字符,不管现在是否有字符都可以保存。
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title></title> <style> div{ width: 500px; height: 200px; background-color: red; } </style> </head> <body> <div> </div> </body> </html>
实际大小为什么和设的不一样
您好,老师我想问一哈,搜索安装也需要导入jar包吗?
老师为啥我的深拷贝,子对象地址也是相同的
非常抱歉给您带来不好的体验!为了更深入的了解您的学习情况以及遇到的问题,您可以直接拨打投诉热线:
我们将在第一时间处理好您的问题!
关于
课程分类
百战程序员微信公众号
百战程序员微信小程序
©2014-2025百战汇智(北京)科技有限公司 All Rights Reserved 北京亦庄经济开发区科创十四街 赛蒂国际工业园网站维护:百战汇智(北京)科技有限公司 京公网安备 11011402011233号 京ICP备18060230号-3 营业执照 经营许可证:京B2-20212637