原创 RMI公網訪問

RMI客戶端調用服務端是報錯: Could not connect to remote service [rmi://公網ip:port/rmiService]; nested exception is java.rmi.ConnectI

原创 windows環境下搭建私服maven nexus3

下載nexuse 下載地址:https://www.sonatype.com/download-oss-sonatype 選擇需要的版本下載 安裝 1. 先安裝jdk1.8版本 2. 註冊windows服務,dos進入:解壓路徑下\ne

原创 docker常用命令

安裝docker yum install docker 啓動docker # CentOS7 systemctl start docker.service 設置docker開機啓動 # CentOS7 systemctl e

原创 使用selenium+phantomjs 遇到org/openqa/selenium/browserlaunchers/Proxies問題

使用selenium+phantomjs過程中遇到下面問題   解決方案:更換selenium或phantomjs版本 我這裏是用的是 <dependency>           <groupId>com.codeborne</gro

原创 百度地圖實現軌跡回放(顯示到達時間)

使用了百度路書 直接上代碼,添加祕鑰直接運行 <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-

原创 windows系統查看端口是否佔用

打開命令行窗口 查看全部端口使用情況:netstat -ano,查看某個端口使用情況:netstat -aon|findstr "8080" pid爲最後的3596 打開任務管理器,點擊查看---->選擇列,勾選pid          

原创 mysql 導入單個字段太大報錯

mysql 導入數據時,出現如下錯誤 [Err] 2006 - MySQL server has gone away 原因:MySQL會根據配置文件會限制server接受的數據包的大小。如果寫入大數據時,因爲默認的配置太小,插入和更新操作

原创 hibernate 查詢常量只返回第一個字符

在Hibernate中如果通過 session.createSQLQuery("select '合計' as name from dual").list() 查詢,返回值中只會有一個“合”字。 經查,常量在數據庫中被認爲是CHA

原创 webMagic發送post請求綁定參數

webMagic 0.7.0版本中移除了老的在request.extra中設置NameValuePair的方式,使用RequestBody 。 webMagic 0.7.0以下版本使用 Extra Request request

原创 chromedriver與chrome的對應關係表

chromedriver與chrome的對應關係表: 下載地址:http://chromedriver.storage.googleapis.com/index.html chromedriver版本 支持的Chrome版本

原创 sql 查詢存在一個表而不在另一個表中的數據

方法一(效率底) select distinct A.ID from A where A.ID not in (select ID from B) 方法二(效率中) select A.ID from A left join B on

原创 webMagic獲取cookie登陸

想要爬取的網站需要登錄時,可以用Selenium模擬瀏覽器登陸,獲取cookie,設置到webMagic的site中。   使用selenium,配置maven依賴 <dependency> <g