题目描述 Given two strings a and b we define a*b to be their concatenation. For example, if a = "abc" and b = "def" then a*b = "abcdef". If we think of co ...
分类:
其他好文 时间:
2020-05-03 18:40:49
阅读次数:
162
Python 迭代器特点: 从第一个元素开始访问,直到结束被遍历的对象,期间不能回退。 两个方法: iter()和next() 把类创建为迭代器需要两个方法: __iter__()和__next__() 其中__iter__方法返回一个迭代器对象,该对象包含实现了的__next__()方法 迭代器通 ...
分类:
编程语言 时间:
2020-05-03 13:11:46
阅读次数:
69
1.主题:百度新闻爬取 2. python代码: import requests from bs4 import BeautifulSoup def getHTMLText(url): try: r = requests.get(url,timeout=30) r.raise_for_status( ...
分类:
其他好文 时间:
2020-05-03 10:59:32
阅读次数:
207
html <form> <input type="file" class="form-control form-control-file"accept=".csv, application/vnd.ms-excel, application/vnd.openxmlformats-officedocu ...
分类:
Web程序 时间:
2020-05-03 10:44:08
阅读次数:
1481
1、使用Navicat 新建一个数据库 2、新建一个数据表 CREATE TABLE t_user( id int(6) PRIMARY KEY auto_increment, name VARCHAR(40), age int(3), bir TIMESTAMP ) 3、新建一个project,f ...
分类:
编程语言 时间:
2020-05-03 00:29:57
阅读次数:
120
Java专题十九:浅拷贝与深拷贝 [TOC] 19.1. clone方法 方法是 类提供的一个用于对象拷贝的方法,且是 ,使用时需要类实现 接口,否则将抛出 异常 ~~~ // java.lang.Object protected native Object clone() throws Clone ...
分类:
编程语言 时间:
2020-05-02 12:02:47
阅读次数:
64
原型模式 原型模式(Prototype Pattern),使用原型实例复制生成新的对象。若某个类的实例化比较复杂,完全重新创建成本较大,这时可以使用原型模式。这种模式是在内存(堆)中拷贝对象,比直接new一个对象节省资源。对象拷贝的时候构造器是不会执行。 结构图: Prototype:提供拷贝方法的 ...
分类:
其他好文 时间:
2020-05-02 00:14:48
阅读次数:
78
起因:今天练习 SpringBoot 下 Mybatis 使用的时候报了一个奇怪的错误 org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): mapper.CustomerMapper.get ...
分类:
移动开发 时间:
2020-05-01 22:11:39
阅读次数:
378
首先要写一个自己的拦截器,实现HandlerInterceptor接口,并且实现接口中的三个方法,同时添加 @Component 注解,把自己的拦截器放入容器 中管理,方便以后的注入使用。 @Component public class MyIntercepor implements Handler ...
分类:
编程语言 时间:
2020-05-01 18:42:01
阅读次数:
67
工具类: 1、ExcelUtil.java public class ExcelUtil<T> { /*** * 读取Excel方法 */ public static <T extends BaseRowModel> ArrayList<T> readExcel(MultipartFile exce ...
分类:
其他好文 时间:
2020-05-01 17:09:07
阅读次数:
429