摘要:
在做一个公众号商城,遇到了跨域问题。 后端用了beego框架 ctx.ResponseWriter.Header().Set("Access-Control-Allow-Methods", "POST, GET, PUT, OPTIONS") ctx.ResponseWriter.Header(). 阅读全文
摘要:
1、报错:You must configure either the server or JDBC driver (via the serverTimezone conf) 这是由于mysql时区问题导致,默认是美国时区,而我们会比他们迟8个小时。 解决方式: i:jdbc加载的时候: ?serve 阅读全文
摘要:
1、修改pom.xml配置 <plugin> <groupId>org.apache.tomcat.maven</groupId> <artifactId>tomcat7-maven-plugin</artifactId> <version>2.2</version> <configuration> 阅读全文
摘要:
package project_demo.p1; public class Father { protected void f(){} } package project_demo.p1; public class Son1 extends Father{ public Son1() throws 阅读全文
摘要:
创建一个长度为6的int型数组,要求数组元素的值都在1-30之间,且是随机赋值。同时,要求元素的值各不相同。 import org.junit.Test; import java.util.Random; public class DemoTest { @Test public void test1 阅读全文
摘要:
public class StaticDemo { /* * (1)特点: 1、static是一个修饰符,用于修饰成员。(成员变量,成员函数)static修饰的成员变量 称之为静态变量或类变量。 2、static修饰的成员被所有的对象共享。 3、static优先于对象存在,因为static的成员随着 阅读全文
摘要:
1、使用maven创建好一个webapp项目 2、pom.xml: 第一步:修改版本 <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <maven.compiler.source>1.8< 阅读全文
摘要:
1、mvn clean:删除当前工程中target 2、mvn compile::将当前工程中main文件下所在的java编译为.class,输送到当前工程中target 3、mvn test::调用test文件夹下所有测试类中的所有测试方法,并生成测试报告 4、mvn package:将工程中te 阅读全文
摘要:
<script type="text/javascript"> String.prototype.reverse = function(){ this.split("").reverse().join("") } //在二进制中回文数最低位会是1 那么代表这个数会是奇数 var num = 11 while(true) { if(num.toString() == num.toString().r 阅读全文
摘要:
新增的元素一定要在$("#父元素")内 阅读全文