摘要:ActiveMQ介绍 ActiveMQ 是Apache出品,最流行的,能力强劲的开源消息总线。ActiveMQ 是一个完全支持JMS1.1和J2EE 1.4规范的 JMS Provider实现,尽管JMS规范出台已经是很久的事情了,但是JMS在当今的J2EE应用中间仍然扮演着特殊的地位。 特性列表:
阅读全文
摘要:配置好ActiveMQ后,前几次都启动成功。有一天启动时发现启动不成功,查看报错日志发现出现如下提示: Failed to start Apache ActiveMQ (localhost, ID:*-PC-*-*-0:1). Reason: Java.io.IOException: Transpo
阅读全文
摘要:二维码解析 Python中关于二维码解析的现成模块有很多,比较著名的就是Zbar以及ZXing.然而很不幸的是,官方的版本都是支持到python2.x,下面是在python2.x的例子: 其中 data就是我们需要的已经解析得到的内容。 直接pip install zbar可能会出错,可以下载exe
阅读全文
摘要:简介python-qrcode是个用来生成二维码图片的第三方模块,依赖于 PIL 模块和 qrcode 库。 简单用法 高级用法 参数含义:version:值为1~40的整数,控制二维码的大小(最小值是1,是个12×12的矩阵)。 如果想让程序自动确定,将值设置为 None 并使用 fit 参数即可
阅读全文
摘要:在实际的项目中可能会碰到key重复的情况,正常的MAP类型是不允许重复的key,所以就要使用multimap了,multimap的使用和map基本类似,可以无缝对接 #include <map> typedef pair<string, int> PAIR; ostream& operator<<(
阅读全文
摘要:那么我们如何实现对pair按value进行比较呢? 第一种:是最原始的方法,写一个比较函数; 第二种:刚才用到了,写一个函数对象。这两种方式实现起来都比较简单。 typedef pair<string, int> PAIR; bool cmp_by_value(const PAIR& lhs, co
阅读全文
摘要:为了实现快速查找,map内部本身就是按序存储的(比如红黑树)。在我们插入<key, value>键值对时,就会按照key的大小顺序进行存储。这也是作为key的类型必须能够进行<运算比较的原因。现在我们用string类型作为key,因此,我们的存储就是按学生姓名的字典排序储存的。 【参考代码】 #in
阅读全文
摘要:在C++中如何实现String和其他类型互换呢?最好的方式是使用stringstream,下面简单介绍下: 1.其他类型转换为String #include <sstream> stringstream sstr; string s1; s1.append("string "); sstr << 1
阅读全文
摘要:使用pip的时候报错Fatal error in launcher: Unable to create process using pip.exe 解决办法,升级pip python -m pip install -U pip 或者 python -m pip install --upgrade p
阅读全文
摘要:1 package com.selenium.driver; 2 import java.io.File; 3 import java.io.IOException; 4 import java.net.URL; 5 import java.util.HashMap; 6 import java.util.Map; 7 import java.util.Set; ...
阅读全文
摘要:1 package com.liuke.selenium.driver; 2 3 import java.sql.SQLException; 4 import java.util.List; 5 import org.json.JSONException; 6 import org.openqa.selenium.By; 7 import org.openqa.se...
阅读全文
摘要:用JS去掉日期输入框的readOnly属性。 代码如下: String js="document.getElementById('dateTimeId').removeAttribute('readOnly');document.getElementById('dateTimeId').setAtt
阅读全文
摘要:# 执行js得到整个HTML html = driver.execute_script("return document.documentElement.outerHTML") 获得整个文档的HTML html = driver.find_element_by_xpath("//*").get_at
阅读全文
摘要:安装.net framework 4.5.2 https://www.microsoft.com/zh-CN/download/details.aspx?id=42641 安装C编译器 python2.7 https://www.microsoft.com/en-us/download/detail
阅读全文
摘要:Capabilities are options that you can use to customize and configure a ChromeDriver session. This page documents all ChromeDriver supported capabiliti
阅读全文
摘要:There are lots of command lines which can be used with the Google Chrome browser. Some change behavior of features, others are for debugging or experi
阅读全文