闲言 requests模块是一个不完全模拟浏览器行为的模块,只能爬取到网页的HTML文档信息,无法解析和执行CSS、JavaScript代码,因此要我们做人为判断。 selenium模块本质是通过驱动浏览器完全模拟浏览器的操作,比如跳转、输入、点击、下拉等,来拿到网页渲染之后的结果,可支持多种浏览器 ...
分类:
其他好文 时间:
2020-07-20 15:49:27
阅读次数:
86
一、报错信息: Exception in thread "main" java.lang.RuntimeException: java.lang.InstantiationException at org.apache.hadoop.util.ReflectionUtils.newInstance( ...
分类:
编程语言 时间:
2020-07-20 15:47:15
阅读次数:
74
{"msg":"Could not marshal [ResultVo [code=100, result=null, message=ok, exception=null, data=null]]: null; nested exception is javax.xml.bind.MarshalException\n - with linked exception:\n[com.sun.istack.SAXException2: unable to marshal type \"com.domain.ResultVo\" as an element because it is missing an @XmlRootElement annotation]","errorcode":2}
分类:
其他好文 时间:
2020-07-20 11:05:43
阅读次数:
87
#coding=utf-8import pymysql# #查询# def connMySQL():# try:# conn=pymysql.connect('localhost','root','admin')# conn.select_db('five')# except Exception a ...
分类:
数据库 时间:
2020-07-20 10:24:01
阅读次数:
133
从SpringBoot启动类开始看起 @SpringBootApplication public class DemoApplication { public static void main(String[] args) { SpringApplication.run(DemoApplicatio ...
分类:
编程语言 时间:
2020-07-19 23:41:01
阅读次数:
82
10-I. 斐波拉契数列 题意:面试题10- I. 斐波那契数列 思路:最基础的动态规划题。数据量比较大的时候不能使用递归,会报StackOverFlow Exception,最优的方式是迭代计算。 class Solution { public int fib(int n) { if (n <= ...
分类:
其他好文 时间:
2020-07-19 23:20:11
阅读次数:
72
1.什么是JSP内置对象 JSP内置对象是wed容器创建的一组对象 例子: 1 <% 2 int[] value = {60,70,80}; 3 for(int i:value){ 4 out.println(i); 5 } 6 %> 没有进行声明和创建,便可以使用out对象 2.常用的JSP内置对 ...
分类:
Web程序 时间:
2020-07-19 23:13:09
阅读次数:
74
缺少相应jar包 解决方案:(前提是maven已经导入) 在IDEA中点击File > Project Structure > Artifacts > 在右侧Output Layout右击项目名,选择Put into Output Root。 ?执行后,在WEB-INF在增加了lib目录,里面是项目 ...
分类:
编程语言 时间:
2020-07-19 00:33:09
阅读次数:
61
Semaphore Semaphore 字面意思是信号量的意思,它的作用是控制访问特定资源的线程数目。应用场景:资源访问,服务限流。 Semaphore 实现AbstractQueuedSynchronizer的方法与ReentrantLock一样 Semaphore构造方法 public Sema ...
分类:
其他好文 时间:
2020-07-18 22:55:40
阅读次数:
108
背景: 使用脚本ssh tuge2 ""/opt/zookeeper/apache-zookeeper-3.5.5-bin/bin/zkServer.sh start""的时候,报了如下异常: Exception in thread "main" java.lang.UnsupportedClass ...
分类:
Web程序 时间:
2020-07-18 16:02:45
阅读次数:
122