- 博客(12)
- 收藏
- 关注
转载 [React] 生命周期方法
1)componentWillMount is executed before rendering, on both the server and the client side.2)componentDidMount is executed after the first render only on the client side. This is where AJAX reque...
2019-04-10 19:37:00 120
转载 [JS] 贪吃蛇
一个困扰了我半小时的问题:设定是游戏开始后,蛇就自动朝右走,然后我每次按方向键可以改变方向。但是发现只有第一次可以通过方向键改方向,之后方向就改不了了。最后发现是我一开始写的时候对event有一个兼容的写法,event = window.event || e;,之后把它删除,直接switch(e.code)就可以了。document.onkeypress = function (...
2019-02-11 21:36:00 92
转载 [JS] 关于变量作用域的 undefined 和 error
在代码块外声明前使用a> Uncaught ReferenceError: a is not defined声明前用typeoftypeof b> "undefined"声明未赋值就使用var c;c> "undefined"在代码块内没有声明就用if (true) { a;}> Uncaught ReferenceError...
2019-02-11 15:09:00 154
转载 [JS] 变量作用域
var num = 10;fun();function fun() {` console.log(num);` var num = 20;`}>> undefined因为在fun()里,因为log()调用了num,就在这个函数的作用域里找 num,然后把num的声明提前,相当于是:function fun() { var num; ...
2019-02-10 22:51:00 120
转载 [JS] 函数
一、函数的创造方法声明式函数会被提到 js 程序的最上方执行,所以在函数声明的前面也可以调用它。function f(x) { return x+1;}定义式必须先定义后使用var g = function (x) { return x + 2;} 比如以下程序,f(5) 能正常输出,g(5) 处会报错 Uncaught TypeError: g is ...
2019-02-10 15:22:00 85
转载 [spring-boot] 热部署/时间格式化/模拟请求/连接MySQL/日志记录
环境:Spring-boot:2.1.2IDEA 2018.3MAVEN 3.6.01.热部署(hot swapping)加入依赖:<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-devt...
2019-02-05 17:01:00 108
转载 [Idea] 彻底删除一个项目的痕迹
在C:\Users\wyli\.IntelliJIdea2018.3\system\frameworks\detection 中找到要删除的项目删除,才把它从idea里清除了转载于:https://www.cnblogs.com/wanyi/p/10331698.html
2019-01-28 20:41:00 1792
转载 [SQL] mysql报错 The server time zone value...
MySQL 报错: The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecognized or represents more than one time zone.解决方法是更改时区:show variables like '%time_zone%';set global time_zone='+08:00';转载于:...
2019-01-27 18:15:00 143
转载 [Maven] Tomcat多个端口同时运行
在pom.xml中加上一个插件,端口设为8081,:<build> <plugins> <plugin> <groupId>org.apache.tomcat.maven</groupId> <artifactId>tomcat7-maven-plugin</artifactId&g...
2019-01-27 11:47:00 257
转载 [web] 3.0版本的web.xml
<?xml version="1.0" encoding="UTF-8"?><web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http:/...
2019-01-27 11:16:00 233
转载 [Maven] compile报错
maven3.0,编译时报错:不再支持源选项 1.5。请使用 1.6 或更高版本解决方法:在pom.xml中加入jdk的设置我的jdk版本是10.0.2,所以加上:<properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> &...
2019-01-27 00:25:00 235
转载 [JVM] 用Javap分析字节码文件
Java源文件经过编译器编译会生成 .class文件(字节码),然后才能在JVM上运行。javap是JDK自带的分析字节码文件的工具,它的用法如下。F:\IdeaProject\HappyJava\src>javap -help用法: javap <options> <classes>其中, 可能的选项包括: -help -...
2019-01-23 20:10:00 188
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人