自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

原创 java servlet通过url下载文件

protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { // TODO Auto-generated method stub// response.getWriter().append("Served at: ").append(request.getContextPath()); response.setC..

2020-06-23 15:39:46 62

转载 java 计算自定义底数的对数

To calculate a logarithm with custom base in Java, we use the following identity: 1 2 3 4 5 6 7 8 9 @Test public void givenCustomLog_shouldReturnValidResults() { assertEquals(customLog(2, 256...

2020-06-16 18:16:52 126

转载 php 生成AlphaID

<?php$code = AlphaID("816285");echo $code; function AlphaID($in, $to_num = false, $pad_up = false, $passKey = null) { $index = "abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"; if ($passKey !== null) { .

2020-06-16 16:22:06 53

原创 打开.jmx文件时报错CannotResolveClassException kg.apc.jmeter.vizualizers.CorrectedResul

Problem loading XML from:'E:\jmeter\TestPlan-wisebuy.jmx'.Cause:CannotResolveClassException: kg.apc.jmeter.vizualizers.CorrectedResultCollectorDetail:com.thoughtworks.xstream.converters.ConversionException:---- Debugging information ----cau...

2020-06-15 16:53:13 261

原创 打开.jmx文件时报错CannotResolveClassException com.tag.jmeter.ext.config.PropertyReader

Problem loading XML from:'E:\jmeter\BOB\BOB.jmx'.Cause:CannotResolveClassException: com.tag.jmeter.ext.config.PropertyReaderDetail:com.thoughtworks.xstream.converters.ConversionException:---- Debugging information ----cause-exception : com.tho.

2020-06-15 16:51:57 143

转载 java mysql 查询的tinyint值显示为true,false

java mysql 查询的tinyint值显示为true,false

2020-06-10 13:09:06 116

原创 mysql 密码包含特殊字符时,java无法连接Access denied for user

mysql 密码包含特殊字符时,java无法连接Access denied for user 'username'@'localhost' (using password: YES)

2020-06-09 16:00:36 112

原创 windows能用navicat连接数据库,但是不能用mysql命令或者java jdbc访问数据库;但是Linux环境却可以访问

服务器IP地址是外网IP在windows的命令行工具里输入下面,报错mysql -h 212.xx.xx.xx -P 3306 -u db_view dbpasswordERROR 1045 (28000): Access denied for user 'db_view'@'180.173.xx.xx' (using password: YES)

2020-06-05 09:37:52 255

转载 java web项目中如何存放和读取资源配置文件

It's your choice. There are basically three ways in a Java web application archive (WAR):1. Put it in classpathSo that you can load it byClassLoader#getResourceAsStream()with a classpath-relative path:ClassLoader classLoader = Thread.currentThread..

2020-06-03 13:37:58 64

原创 严重: 子容器启动失败java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: 无法启动组件

eclipse eemvc spring严重: 子容器启动失败java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: 无法启动组件[org.apache.catalina.webresources.StandardRoot@63f8276e] at java.base/java.util.concurrent.FutureTask.report(FutureTask.java:122)...

2020-06-02 18:37:54 649

原创 eclipse 经常加载http://www.springframework.org/schema/beans/spring-beans-3.0.xsd 无法访问

<?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context" xmlns:tx="http:...

2020-05-31 14:22:05 217

原创 eclipse官网的镜像不能访问了?

eclipse IDE下载不了了Unable to connect to the database server at this time(eclipse).Unable to connect to the database server at this time(eclipse).Unable to connect to the database server at this time(eclipse).

2020-05-15 14:02:08 483 5

转载 intellij idea 运行时报错the output path is not specified for module

intellij idea 运行时报错:the output path is not specified for module Specify the output path in the Project Structure dialog其实就是没有配置编译路径,ctrl+alrt+shift+s打开配置界面3.设置项目编译目录3.1添加目录我们在刚才创建的项目中添加几个目录...

2020-05-07 13:42:07 168

转载 Windows 10 VirtualBox安装 macOS High Sierra

https://www.howtogeek.com/289594/how-to-install-macos-sierra-in-virtualbox-on-windows-10/Step Two: Create Your Virtual Machine in VirtualBoxNext, head to your Windows machine, andinstall VirtualB...

2020-03-09 10:49:47 520

原创 java使用ssh的方式连接到mysql

using SSH tunnel in Java throughjsch, a Java an implementation of SSH2you have to have an SSH account on the remote host, and for the database example, a database account with a"connect"permi...

2019-12-13 18:20:15 144

原创 使用jsch以ssh的方式访问mysql ,如果提示PortForwardingL: local port 127.0.0.1:1119 cannot be bound.,则每次运行程序前先把原来的程

使用jsch以ssh的方式访问mysql ,如果提示PortForwardingL: local port 127.0.0.1:1119 cannot be bound.,则每次运行程序前先把原来的程序暂停JSchException**:PortForwardingL: local port 127.0.0.1:1119 cannot be bound.也可以在获取异常后} f...

2019-12-13 14:41:21 392

原创 eclipse一打开就提示'Initializing Java Tooling 'has encountered a problem

'Initializing Java Tooling 'has encountered a problemAn internal error occurred during:"Initializing Java Tooling".An internal error occurred during: "Initializing Java Tooling".java.lang.NullPoi...

2019-12-02 17:37:35 92

原创 selenium java下载图片

selenium不能处理操作系统级别的对话框

2019-11-20 17:06:17 114

原创 postman request failed "404 not found"

查了半天才发现是api地址里有空格,以后在code里看下curl命令可以方便看到这些低级错误。

2019-06-17 11:13:09 2101

原创 stackoverflow上图片无法显示

是因为imgur.com这个域名我们访问不了唯一的办法就是fq

2019-06-14 17:09:23 856

原创 android studio运行app(设备上已经安装和未安装的情况)

如果手机设备上已经安装过了app, 点击 工具栏中的Apply Changes 去更新app.或者点击Run去安装和运行app.

2019-06-14 14:51:07 831

原创 小米手机解锁刷机后,安装apk出现Failure [INSTALL_FAILED_USER_RESTRICTED: Install canceled by user]

C:\Users\17030102>adb install E:\素材\apk\weixin.apkPerforming Streamed Installadb: failed to install E:\素材\apk\weixin.apk: Failure [INSTALL_FAILED_USER_RESTRICTED: Install canceled by user]设置--...

2019-06-14 11:07:14 3758 1

翻译 android studio layout的Design页面不能放大缩小,但是Text页面可以放大缩小

It happens from time to time in Android Studio 3. This are steps to try to resolve this issue:invalidate cache and restart studio; choose different emulator from drop-down menu; refresh layout by ...

2019-06-13 14:25:34 1316

原创 android studio Missing Constraints in ConstraintLayout

This view is not constrained. It only has designtime positions, so it will jump to (0,0) at runtime unless you add the constraints The layout editor allows you to place widgets anywhere on the canvas...

2019-06-12 13:28:38 10474 1

原创 Android .xml file error: resource color/green (aka com.wm.helloapp:color/green) not found.

Caused by: com.android.builder.internal.aapt.v2.Aapt2Exception: Android resource linking failedE:\git_code\helloapp\app\src\main\res\layout\activity_main.xml:2: error: resource color/green(aka com.w...

2019-06-11 14:01:46 2074

原创 读取的问题内容有中文,java file not found exception,

读取的问题内容有中文,java file not found exception,文件类型encoding 应该为utf-8无bom

2019-05-17 10:40:31 257

转载 Selenium实战:如何跳过绕不过的登录验证

背景先说一下背景,今天的这个主题是来源于我之前工作中的实战经历,当时在做一个爬虫项目,遇到了非常牛逼的反爬验证,就是之前提到过的某度指数数据,当时费了九牛二虎之力才用selenium+firefox登录成功,可是好景不长,没过多久就发现登录出现了图形验证码了,像下方这样的,出现这东西总不能手工去输入吧,兵来将挡水来土掩,一言不合就开干!马上就想到了图形的OCR识别技术,这个也不麻烦,有很多现成...

2019-05-13 17:45:52 1222

原创 selenium firefox console.error: BroadcastService: Message: Error: Polling for changes failed: Networ

console.error: BroadcastService: receivedBroadcastMessage: handler for remote-settings/monitor_changes threw error: Message: Error: Polling for changes failed: NetworkError when attempting to...

2019-03-01 09:41:49 849

原创 Java 11, eclipse报错polling news feeds has encountered a problem javax/xml/bind/JAXBContext

java升级到11之后Eclipse IDE for Java DevelopersVersion: 2018-09 (4.9.0)Build id: 20180917-1800Windows 10eclipse报错polling news feeds has encountered a problemAn internal error occurred during: "P...

2019-02-14 11:25:51 647

翻译 java pattern.matcher() vs pattern.matches()

pattern.matcher(String s) returns a Matcher that can find patterns in the String s. pattern.matches(String str) tests, if the entire String (str) matches the pattern.In brief (just to remember the...

2019-02-13 15:30:26 327

原创 selenium 获取直接的子节点

 Get all immediate children and nothing deeper <html> <body> <div> </div> <span> <table> </table> </span>

2019-01-29 11:31:26 3880

原创 selenium 使用katalon Recorder导出java webdriver testng 简单示例

package com.example.tests;import java.util.regex.Pattern;import java.util.concurrent.TimeUnit;import org.testng.annotations.*;import static org.testng.Assert.*;import org.openqa.selenium.*;imp...

2019-01-25 11:47:04 353

转载 JDBC为什么要使用PreparedStatement而不是Statement

PreparedStatement是用来执行SQL查询语句的API之一,Java提供了 Statement、PreparedStatement 和 CallableStatement三种方式来执行查询语句,其中 Statement 用于通用查询, PreparedStatement 用于执行参数化查询,而 CallableStatement则是用于存储过程。同时PreparedStatement还...

2018-12-25 11:47:15 159

原创 MAVEN项目标准目录结构

src  -main      –bin 脚本库      –java java源代码文件      –resources 资源库,会自动复制到classes目录里      –filters 资源过滤文件      –assembly 组件的描述配置(如何打包)      –config 配置文件      –webapp web应用的目录。WEB-INF、css、js等  ...

2018-12-09 15:32:52 1112

原创 mysql 在整个数据库中查找包含特定字符串的表和字段

导出整个数据库(包括数据库中的数据) mysqldump -proot123  dbname > dbname.sql

2018-12-09 15:12:53 8820

原创 selenium By.xpath 定位包含多个class值的位置

driver.findElement(By.xpath("(//ul[@class='dropdown-menu inner selectpicker']/li)[last()]/a/span[@class='text']")).click();  

2018-12-04 14:52:38 6199

原创 Element <a id="b1" class="btn btn-success pc btn-1" href="/***=0"> could not be scrolled into view

selenium testng firefoxElement &amp;lt;a id=&quot;b1&quot; class=&quot;btn btn-success pc btn-1&quot; href=&quot;/sys4/new_order/feature/report-api/index.php?r=order/site/create&amp;amp;t=0&quot;&amp;gt; could not be scrolled into view ...

2018-12-03 11:00:44 650

原创 testng selenium 判断一个元素是否加载完成

package com.example.tests;import java.util.regex.Pattern;import java.util.concurrent.TimeUnit;import org.testng.annotations.*;import static org.testng.Assert.*;import org.openqa.selenium.*;imp...

2018-12-03 10:04:48 1714

原创 eclipse java maven testng The import org.testng cannot be resolved

eclipse java maven testng The import org.testng cannot be resolved需要在eclipse的maven 项目里加上TestNG的library

2018-11-22 16:12:30 1002

翻译 Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/xmlbeans/XmlObject

Exception in thread &quot;main&quot; java.lang.NoClassDefFoundError: org/apache/xmlbeans/XmlObject   You have to include one more jar.xmlbeans-2.3.0.jarAdd this and try.Note: It is required for t...

2018-10-31 11:57:23 555

提示
确定要删除当前文章?
取消 删除