为什么“家电”跑到上面去了,咋办
老师我代码一样防火墙也关了结果输出还是这
老师,请问是2019.3.4版本的IDea不可以吗
我通过官网搭建项目时,JavaBoot都是高版本不是跟老师一样的版本
我该怎么解决呢
Traceback (most recent call last): File "C:/Users/Administrator/Desktop/untitled/mypy01/TANK.GAME/tk27.py", line 476, in <module> MainGame().start_game() File "C:/Users/Administrator/Desktop/untitled/mypy01/TANK.GAME/tk27.py", line 325, in start_game self.display_enemy_tank() File "C:/Users/Administrator/Desktop/untitled/mypy01/TANK.GAME/tk27.py", line 383, in display_enemy_tank e_tank.tank_collide_tank(MainGame.my_tank) File "C:/Users/Administrator/Desktop/untitled/mypy01/TANK.GAME/tk27.py", line 85, in tank_collide_tank if self.live and tank.live:AttributeError: 'NoneType' object has no attribute 'live'
捕获.PNG
老师,这节课,按照老师讲的敲了一下代码,报错了,然后把老师讲的代码也下载下来测试了下,也报错了,就是把子弹类打开,让其打中我方坦克,就报错了
<canvas id="mycat"></canvas>
<script>
var ca=document.getElementById("mycat")
var te=.getContext("2d")
te. fillStyle="#FF0000";
te.fillRect(0,0,80,100);
</script>
老师,为什么它不运行呢?没有生成矩形。
localhost拒绝连接怎么搞
老师,我在执行这里的时候报了这个错误,原因是我觉得是编译文件里面没有mapper文件所造成的,但我把对应依赖也给加上了怎么会编译不进去呢?我使用的IDE是idea,请老师帮忙看看
<?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> <groupId>cn.kent</groupId> <artifactId>ego-rpc</artifactId> <version>1.0-SNAPSHOT</version> </parent> <artifactId>ego-rpc-service-impl</artifactId> <version>1.0-SNAPSHOT</version> <packaging>jar</packaging> <name>ego-rpc-service-impl</name> <repositories> <repository> <id>maven-ali</id> <url>http://maven.aliyun.com/nexus/content/groups/public/</url> <releases> <enabled>true</enabled> </releases> <snapshots> <enabled>true</enabled> <updatePolicy>always</updatePolicy> <checksumPolicy>fail</checksumPolicy> </snapshots> </repository> </repositories> <dependencies> <dependency> <groupId>cn.kent</groupId> <artifactId>ego-rpc-mapper</artifactId> <version>1.0-SNAPSHOT</version> </dependency> <dependency> <groupId>cn.kent</groupId> <artifactId>ego-rpc-service</artifactId> <version>1.0-SNAPSHOT</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-context</artifactId> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-aop</artifactId> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-tx</artifactId> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-jdbc</artifactId> </dependency> <dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> </dependency> <!-- 连接池 --> <dependency> <groupId>com.alibaba</groupId> <artifactId>druid</artifactId> </dependency> <!-- mybatis和spring的整合包 --> <dependency> <groupId>org.mybatis</groupId> <artifactId>mybatis-spring</artifactId> </dependency> <!-- 支持mybatis的日志记录 --> <dependency> <groupId>log4j</groupId> <artifactId>log4j</artifactId> </dependency> <dependency> <groupId>org.aspectj</groupId> <artifactId>aspectjweaver</artifactId> </dependency> <dependency> <groupId>aopalliance</groupId> <artifactId>aopalliance</artifactId> </dependency> <!-- 单元测试 --> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <scope>test</scope> </dependency> <!-- dubbo依赖 --> <dependency> <groupId>com.alibaba</groupId> <artifactId>dubbo</artifactId> </dependency> <!-- zookeeper客户端依赖 --> <dependency> <groupId>com.101tec</groupId> <artifactId>zkclient</artifactId> </dependency> <!-- mybatis分页插件 --> <dependency> <groupId>com.github.pagehelper</groupId> <artifactId>pagehelper</artifactId> </dependency> <!-- Redis客户端 --> <dependency> <groupId>redis.clients</groupId> <artifactId>jedis</artifactId> </dependency> <!-- Apache的通用工具 --> <dependency> <groupId>org.apache.commons</groupId> <artifactId>commons-lang3</artifactId> </dependency> <!-- solr客户端 --> <dependency> <groupId>org.apache.solr</groupId> <artifactId>solr-solrj</artifactId> </dependency> </dependencies> <build> <!-- <plugins> 指定项目的打包插件信息 <plugin> <artifactId>maven-assembly-plugin</artifactId> <configuration> 指定打包描述文件的位置:相对项目根目录的路径 assembly打包的描述文件 <descriptor>assembly/assembly.xml</descriptor> </configuration> <executions> mvn package的时候打包 <execution> <id>make-assembly</id> <phase>package</phase> <goals> <goal>single</goal> </goals> </execution> </executions> </plugin> </plugins> --> <!-- dubbo加载spring的配置文件的时候,是从META-INF/spring开始查找 --> <resources> <resource> <!-- 指定从哪个文件夹拷贝 --> <directory>src/main/resources/spring</directory> <!-- 指定将spring配置文件拷贝到jar包中的META-INF/spring目录 --> <targetPath>META-INF/spring</targetPath> <includes> <include>**/*.xml</include> </includes> </resource> <!-- 其他的文件拷贝到默认的位置 --> <resource> <!-- 指定从哪个文件夹拷贝 --> <directory>src/main/resources</directory> <includes> <include>**/*.xml</include> <include>**/*.properties</include> </includes> </resource> </resources> </build> </project>
printhello()是实例型对象,不应该是不能想函数一样向()一样调用
但这里我调用了,为什么没有报错
package com.url; import java.io.BufferedWriter; import java.io.FileOutputStream; import java.net.URL; import org.omg.CORBA.portable.InputStream; public class TestURL2 { /* * 网络爬虫 * (1)从网络上获取资源www.baidu.com * (2)存储到本地 */ //(1)创建URL对象 URL url=new URL("https://www.baidu.com"); //主页资源 //(2)获取字节输入流 InputStream is=url.openStream(); //(3)缓冲流 BufferedReader br=new BufferedReader(new InputStreamReader(is,"utf-8")); //(4)存储到本地 BufferedWriter bw=new BufferedWriter(new OutputStreamWriter(new FileOutputStream("index.html","utf-8"))); //(5)边度边写 String line =null; while((line=br.readLine)!=null) { bw.write(line); bw.newLine(); bw.flush(); } //(6)关闭流 bw.close(); br.close(); } }
问题:
找不到错误之处
老师,这怎么解决?
想问一下有没有配套的实体书本?。。。。。
老师,我记得课程前面好像没有讲过freemarker...这次突然用Spring整合,看得我有点懵,虽说这个整合的操作上跟jsp没太大区别
什么叫ping命令
import java.sql.Connection; import java.sql.DriverManager; import java.sql.SQLException; import java.sql.Statement; public class JDBCTest1 { public void insertDepartment(int department_id,String department_name,int manager_id,int location_id){ Connection connection=null; Statement state = null; try { Class.forName("oracle.jdbc.OracleDriver"); String url="idbc:oracle:thin:localhost:1521:OCLPDB"; String username="hr"; String psw="1234"; Connection conn=DriverManager.getConnection(url, username, psw); String sql = "insert into departments values("+department_id+","+department_name+","+manager_id+","+location_id+")"; state = connection.createStatement(); int flat = state.executeUpdate(sql); System.out.println(flat); } catch (Exception e) { e.printStackTrace(); }finally { if (state!=null) { try { state.close(); } catch (SQLException e) { e.printStackTrace(); } } if (connection!=null) { try { connection.close(); } catch (SQLException e) { e.printStackTrace(); } } } } public static void main(String args[]){ JDBCTest1 j = new JDBCTest1(); j.insertDepartment(2,"学习部",0,0); } }
老师,为什么连接不上
MyInteger b =MyInteger. valueOf(100);
老师这个MyInteger.valueOf 是什么意思,方法的调用吗,还是什么别的固定写法。
非常抱歉给您带来不好的体验!为了更深入的了解您的学习情况以及遇到的问题,您可以直接拨打投诉热线:
我们将在第一时间处理好您的问题!
关于
课程分类
百战程序员微信公众号
百战程序员微信小程序
©2014-2025百战汇智(北京)科技有限公司 All Rights Reserved 北京亦庄经济开发区科创十四街 赛蒂国际工业园网站维护:百战汇智(北京)科技有限公司 京公网安备 11011402011233号 京ICP备18060230号-3 营业执照 经营许可证:京B2-20212637