-
ML之SVM:基于sklearn的svm算法实现对支持向量的数据进行标注
2018-08-22 10:15:54ML之SVM:基于sklearn的svm算法实现对支持向量的数据进行标注 目录 输出结果 实现代码 输出结果 实现代码 import numpy as np import matplotlib.pyplot as pl #python中的绘图模块 from...ML之SVM:基于sklearn的svm算法实现对支持向量的数据进行标注
目录
输出结果
实现代码
import numpy as np import matplotlib.pyplot as pl #python中的绘图模块 from pylab import show from sklearn import svm np.random.seed(0) #随机固定随机值 X = np.r_[np.random.randn(20,2)-[2,2],np.random.randn(20,2)+[2,2]] #随机生成左下方20个点,右上方20个点 Y = [0]*20+[1]*20 #将前20个归为标记0,后20个归为标记1 #建立模型 clf = svm.SVC(kernel='linear') clf.fit(X,Y) #传入参数 #画出建立的超平面 w = clf.coef_[0] #取得w值,w中是二维的 a = -w[0]/w[1] #计算直线斜率 xx = np.linspace(-5,5) #随机产生连续x值 yy = a*xx-(clf.intercept_[0])/w[1] #根据随机x得到y值 #计算与直线相平行的两条直线 b = clf.support_vectors_[0] yy_down = a*xx+(b[1]-a*b[0]) b = clf.support_vectors_[-1] yy_up = a*xx+(b[1]-a*b[0]) print('w:',w) print('a:',a) print('support_vectors:',clf.support_vectors_) print('clf.coef_',clf.coef_) #画出三条直线 pl.plot(xx,yy,'k-') pl.plot(xx,yy_down,'k--') pl.plot(xx,yy_up,'k--') pl.scatter(clf.support_vectors_[:,0],clf.support_vectors_[:,1],s=100,c="g") #,facecolors='none',zorder=10 pl.scatter(X[:,0],X[:,1],c=Y, cmap=pl.cm.Paired) pl.axis('tight') pl.title('The bold circle is the support vector') pl.show()
-
QT对摄像头支持
2014-04-08 15:55:50Qt从5.0开始支持android摄像头,但是目前还没有做到统一完全跨平台API。还需要根据不同的平台系统来处理。这是因为Qt中QImage支持格式不全,现在不支持YUV格式。 Qt中捕获视频流用两种方式: 一、用QCamera::...Qt从5.0开始支持android摄像头,但是目前还没有做到统一完全跨平台API。还需要根据不同的平台系统来处理。这是因为Qt中QImage支持格式不全,现在不支持YUV格式。
Qt中捕获视频流用两种方式:
一、用QCamera::setViewfinder(QAbstractVideoSurface *surface)
先从QAbstractVideoSurface派生子类:
class MyVideoSurface : public QAbstractVideoSurface { QList<QVideoFrame::PixelFormat> supportedPixelFormats( QAbstractVideoBuffer::HandleType handleType = QAbstractVideoBuffer::NoHandle) const { Q_UNUSED(handleType); // 返回你将处理的格式 return QList<QVideoFrame::PixelFormat>() << QVideoFrame::Format_RGB32 //windows 平台、linux 平台默认都支持 RGB32 格式 << QVideoFrame::Format_RGB24 << QVideoFrame::Format_ARGB32 << QVideoFrame::Format_ARGB32_Premultiplied << QVideoFrame::Format_RGB565 << QVideoFrame::Format_RGB555 //android支持的格式 << QVideoFrame::Format_NV21 << QVideoFrame::Format_YV12 << QVideoFrame::Format_RGB565 << QVideoFrame::Format_YUV420P << QVideoFrame::Format_YUYV << QVideoFrame::Format_AYUV444 << QVideoFrame::Format_Jpeg ; } bool present(const QVideoFrame &frame) { Q_UNUSED(frame); // 处理捕获的帧 return true; } }; MyVideoSurface surface; QCamera m_Camera; m_Camera.setCaptureMode(QCamera::CaptureMode::CaptureVideo); m_Camera.setViewfinder(&surface);
二、用QVideoProbecamera = new QCamera; viewfinder = new QCameraViewfinder(); camera->setViewfinder(viewfinder); camera->setCaptureMode(QCamera::CaptureVideo); videoProbe = new QVideoProbe(this); if (videoProbe->setSource(camera)) { // Probing succeeded, videoProbe->isValid() should be true. connect(videoProbe, SIGNAL(videoFrameProbed(QVideoFrame)), this, SLOT(detectBarcodes(QVideoFrame))); } camera->start(); // Viewfinder frames should now also be emitted by // the video probe, even in still image capture mode. // Another alternative is to install the probe on a // QMediaRecorder connected to the camera to get the // recorded frames, if they are different from the // viewfinder frames.
windows支持格式为RGB24、RGB32;android支持格式为NV21
下面我对捕获和显示进行了封装:
CaptureVideoFrame.h
/* * 作者:康林(msn、email: kl222@126.com) * * 从摄像头(QCarmera)或者(Player)中捕获视频帧。 * 注意:android后景摄像头捕获的视频翻转-90度,前景摄像头翻转90度。 * 用法: * QCamera m_Camera; * m_Camera.setCaptureMode(QCamera::CaptureVideo); * CCaptureVideoFrame videoFrame; * videoFrame.setSource(&m_Camera); * 注册SLOT: * connect(&videoFrame, SIGNAL(CaptureFrame(const QVideoFrame&)), * SLOT(CaptureVideoFrame(const QVideoFrame&))); * 在SLOT 中 CaptureVideoFrame(const QVideoFrame&) 处理捕获到的视频帧。 * * 示例代码: * QList<QByteArray> device = QCamera::availableDevices(); * QList<QByteArray>::iterator it; * for(it = device.begin(); it != device.end(); it++) * { * qDebug("Camera:%s", qPrintable(QCamera::deviceDescription(*it))); * } * * QCamera camera(QCamera::availableDevices().at(1)); * camera.setCaptureMode(QCamera::CaptureVideo); * CFrmPlayer player; * CCaptureVideoFrame captureVideoFrame; * if(captureVideoFrame.setSource(&camera)) * { * qDebug("probe.setSource is ok"); * player.connect(&captureVideoFrame, SIGNAL(CaptureFrame(QVideoFrame)), * SLOT(present(QVideoFrame))); * } * * player.show(); * player.activateWindow(); * camera.start(); */ #ifndef CAPTUREVIDEOFRAME_H #define CAPTUREVIDEOFRAME_H #include <QAbstractVideoSurface> #include <QCamera> class CCaptureVideoFrame : public QAbstractVideoSurface { Q_OBJECT public: explicit CCaptureVideoFrame(QObject *parent = 0); virtual QList<QVideoFrame::PixelFormat> supportedPixelFormats( QAbstractVideoBuffer::HandleType handleType = QAbstractVideoBuffer::NoHandle) const; bool setSource(QCamera *pCamera); signals: //视频帧捕获信号 void CaptureFrame(const QVideoFrame &frame); private slots: virtual bool present(const QVideoFrame &frame); }; #endif // CAPTUREVIDEOFRAME_H
CaptureVideoFrame.cpp/** 作者:康林(msn、email: kl222@126.com)*/ #include "CaptureVideoFrame.h" #include <QCamera> CCaptureVideoFrame::CCaptureVideoFrame(QObject *parent) : QAbstractVideoSurface(parent) { } QList<QVideoFrame::PixelFormat> CCaptureVideoFrame::supportedPixelFormats(QAbstractVideoBuffer::HandleType handleType) const { Q_UNUSED(handleType); return QList<QVideoFrame::PixelFormat>() << QVideoFrame::Format_RGB32 //windows 平台、linux 平台默认都支持 RGB32 格式 << QVideoFrame::Format_RGB24 << QVideoFrame::Format_ARGB32 << QVideoFrame::Format_ARGB32_Premultiplied << QVideoFrame::Format_RGB565 << QVideoFrame::Format_RGB555 //android支持的格式 << QVideoFrame::Format_NV21 << QVideoFrame::Format_YV12 << QVideoFrame::Format_RGB565 << QVideoFrame::Format_YUV420P << QVideoFrame::Format_YUYV << QVideoFrame::Format_AYUV444 << QVideoFrame::Format_Jpeg ; } //捕获视频帧。windows下格式是RGB32;android下是NV21bool CCaptureVideoFrame::present(const QVideoFrame &frame){ qDebug("CCaptureVideoFrame::present format:%d", frame.pixelFormat()); emit CaptureFrame(frame); return true; } //根据不同的平台,设置捕获方式bool CCaptureVideoFrame::setSource(QCamera *pCamera){ bool ret = true; //捕获视频 pCamera->setViewfinder(this); return ret; }
源码:https://github.com/KangLin/FaceRecognizer/blob/master/Src/CameraQtCaptureVideoFrame.h
或者:https://github.com/KangLin/RabbitIm/tree/master/Media/Camera
QT对摄像头的支持存在的一些问题:
QT得到到捕获帧相关的参数
QT 在windows、linux下捕获视频只有5帧/秒左右,在我的电脑上用时 240ms 左右。在Android手机上可达到15帧/s(60ms左右)。
QT 在 windows、linux下多个摄像头切换正常,但在 android 手机上,前后摄像头不能切换。代码如下:
void CFrmVideo::on_cmbCamera_currentIndexChanged(int index) { LOG_MODEL_DEBUG("Video", "CFrmVideo::on_cmbCamera_currentIndexChanged"); m_CameraPostition = QCamera::availableDevices().at(index); OpenCamera(); LOG_MODEL_DEBUG("Video", "CFrmVideo::on_cmbCamera_currentIndexChanged end"); } int CFrmVideo::OpenCamera() { if(!m_pCall) { LOG_MODEL_ERROR("Video", "CFrmVideo::OpenCamera m_pCall is null"); return -1; } if(m_pCamera) { CloseCamera(); } m_pCamera = new QCamera(m_CameraPostition); if(!m_pCamera) { LOG_MODEL_WARNING("Video", "Open carmera fail"); return -1; } m_pCamera->setCaptureMode(QCamera::CaptureVideo); m_CaptureVideoFrame.setSource(m_pCamera); //m_pCamera->load(); m_pCamera->start(); return 0; } int CFrmVideo::CloseCamera() { if(m_pCamera) { m_pCamera->stop(); //m_pCamera->unload(); delete m_pCamera; m_pCamera = NULL; } return 0; }
-
netty对websocket的支持
2020-12-03 16:47:47netty对websocket的支持 什么是WebSocket? WebSocket是一种在2011年被互联网工程任务组(IETF)标准化的协议。WebSocket解决了一个长期存在的问题:既然底层的协议(HTTP)是一个请求/响应模式的交互序列(半双工)...netty对websocket的支持
什么是WebSocket?
WebSocket是一种在2011年被互联网工程任务组(IETF)标准化的协议。WebSocket解决了一个长期存在的问题:既然底层的协议(HTTP)是一个请求/响应模式的交互序列(半双工),那么如何实时地发布信息呢?AJAX提供了一定程度上的改善,但是数据流仍然是由客户端所发送的请求驱动的,还有其他的一些或多或少的取巧方式(Comet)。
WebSocket规范以及它的实现代表了对一种更加有效的解决方案的尝试。简单地说,WebSocket提供了在一个单个的TCP连接上提供双向的通信,它为网页和远程服务器之间的双向通信提供了一种替代HTTP轮询的方案。也就是说,WebSocket在客户端和服务器之间提供了真正的双向数据交换,WebSocket连接允许客户端和服务器之间进行全双工通信,以便任一方都可以通过建立的连接将数据推送到另一端。WebSocket只需要建立一次连接,就可以一直保持连接状态,这相比于轮询方式的不停建立连接显然效率要大大提高。
特点:
- HTML5中的协议,实现与客户端与服务器双向通信,基于消息的文本或二进制数据通信。
- 适合于对数据的实时性要求比较强的场景,如通信、直播、共享桌面,特别适合于客户。
- 与服务频繁交互的情况下,如实时共享、多人协作等平台。
缺点:
- 采用新的协议,前台和后端都需要实现websocket协议。
- 客户端并不是所有浏览器都支持。
WebSocket通信握手
Websocket借用了HTTP的协议来完成一部分握手。
要使用WebSocket,客户端的请求头中必须携带如下信息:
Connection: Upgrade Upgrade: websocket Sec-WebSocket-Extensions: permessage-deflate; client_max_window_bits Sec-WebSocket-Key: eKx07sBdizAQzCa6Hq4Bvw== Sec-WebSocket-Version: 13
说明:
Connection: Upgrade
:表示客户端希望连接升级。Upgrade: websocket
:Upgrade字段必须设置Websocket,表示希望升级到Websocket协议。Sec-WebSocket-Key
:是一个随机的字符串。Sec-WebSocket-Version
:表示支持的Websocket版本。RFC6455要求使用的版本是13,之前草案的版本均应当弃用。
服务器端返回的响应头:
connection: upgrade sec-websocket-accept: tUrLqjHcbpMSjRS6Lqcns5SN8Ac= upgrade: websocket
Upgrade: websocket
:与客户端一致。Connection: Upgrade
:与客户端一致。sec-websocket-accept
:服务器端把客户端端请求头中的Sec-WebSocket-Key
加上一个特殊字符串“258EAFA5-E914-47DA-95CA-C5AB0DC85B11”,然后计算SHA-1摘要,之后进行BASE-64编码,将结果做为 “Sec-WebSocket-Accept” 头的值,返回给客户端。如此操作,可以尽量避免普通HTTP请求被误认为Websocket协议。
至此,HTTP已经完成它所有工作了,接下来就是完全按照Websocket协议进行通信。
netty代码实现
服务器端代码如下:
Server.java
package com.morris.netty.protocol.websocket; import io.netty.bootstrap.ServerBootstrap; import io.netty.channel.ChannelFuture; import io.netty.channel.ChannelInitializer; import io.netty.channel.ChannelPipeline; import io.netty.channel.EventLoopGroup; import io.netty.channel.nio.NioEventLoopGroup; import io.netty.channel.socket.SocketChannel; import io.netty.channel.socket.nio.NioServerSocketChannel; import io.netty.handler.codec.http.HttpObjectAggregator; import io.netty.handler.codec.http.HttpRequestDecoder; import io.netty.handler.codec.http.HttpResponseEncoder; import io.netty.handler.codec.http.HttpServerCodec; import io.netty.handler.codec.http.websocketx.WebSocketFrameAggregator; import io.netty.handler.codec.http.websocketx.WebSocketServerProtocolHandler; import io.netty.handler.codec.http.websocketx.extensions.compression.WebSocketServerCompressionHandler; import io.netty.handler.stream.ChunkedWriteHandler; public class Server { private static final int port = 8899; public static void main(String[] args) throws Exception { EventLoopGroup bossGroup = new NioEventLoopGroup(); EventLoopGroup workerGroup = new NioEventLoopGroup(); try { ServerBootstrap b = new ServerBootstrap(); b.group(bossGroup, workerGroup) .channel(NioServerSocketChannel.class) .childHandler(new ChannelInitializer<SocketChannel>() { @Override protected void initChannel(SocketChannel ch) throws Exception { ChannelPipeline pipeline = ch.pipeline(); pipeline.addLast(new HttpServerCodec()); // 请求消息编解码器 pipeline.addLast(new HttpObjectAggregator(65536));// 目的是将多个消息转换为单一的request或者response对象 pipeline.addLast(new WebSocketServerProtocolHandler("/ws")); // websocket协议支持,url为/ws pipeline.addLast(new ServerHandler()); } }); ChannelFuture future = b.bind("127.0.0.1", port).sync(); future.channel().closeFuture().sync(); } finally { bossGroup.shutdownGracefully(); workerGroup.shutdownGracefully(); } } }
ServerHandler.java
package com.morris.netty.protocol.websocket; import io.netty.channel.ChannelHandlerContext; import io.netty.channel.SimpleChannelInboundHandler; import io.netty.handler.codec.http.websocketx.TextWebSocketFrame; import lombok.extern.slf4j.Slf4j; import java.time.LocalDateTime; @Slf4j public class ServerHandler extends SimpleChannelInboundHandler<TextWebSocketFrame> { @Override protected void channelRead0(ChannelHandlerContext ctx, TextWebSocketFrame msg) throws Exception { log.info("receive from client: {}", msg.text()); ctx.writeAndFlush(new TextWebSocketFrame(LocalDateTime.now().toString())); } }
客户端采用html,代码如下:
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Socket</title> <script type="text/javascript"> var websocket; //如果浏览器支持WebSocket if(window.WebSocket){ websocket = new WebSocket("ws://localhost:8899/ws"); //获得WebSocket对象 //当有消息过来的时候触发 websocket.onmessage = function(event){ var respMessage = document.getElementById("respMessage"); respMessage.value += "\n" + event.data; } //连接关闭的时候触发 websocket.onclose = function(event){ var respMessage = document.getElementById("respMessage"); respMessage.value += respMessage.value + "\n断开连接"; } //连接打开的时候触发 websocket.onopen = function(event){ var respMessage = document.getElementById("respMessage"); respMessage.value = "建立连接"; } }else{ alert("浏览器不支持WebSocket"); } function sendMsg(msg) { //发送消息 if(window.WebSocket){ if(websocket.readyState == WebSocket.OPEN) { //如果WebSocket是打开状态 websocket.send(msg); //send()发送消息 } }else{ return; } } </script> </head> <body> <form onsubmit="return false"> <textarea style="width: 300px; height: 200px;" name="message"></textarea> <input type="button" onclick="sendMsg(this.form.message.value)" value="发送"><br> <h3>信息</h3> <textarea style="width: 300px; height: 400px;" id="respMessage"></textarea> <input type="button" value="清空" onclick="javascript:document.getElementById('respMessage').value = ''"> </form> </body> </html>
测试结果如下:
可见Websocket需要借助HTTP的协议来完成握手,在数据的传输过程中不再需要http头部了,只有数据部分,真正的实现了实时和高效。注意要使用websocket的压缩功能,要将WebSocketServerProtocolHandler的扩展参数改为true。
pipeline.addLast(new WebSocketServerCompressionHandler()); // 支持ws数据的压缩传输 pipeline.addLast(new WebSocketServerProtocolHandler("/ws", null ,true)); // websocket协议支持,url为/ws
-
Feign的配置及对hystrix的支持
2018-11-08 12:28:14Feign的配置及对hystrix的支持文章目录
Feign
自定义配置时,@Configuration和@ComponentScan包不应重叠
- 示例:
- @FeignClient注解的放在com.mmzs.cloud.feign包下面
@FeignClient(name = "xxxx", url = "http://localhost:8761/", configuration = Configuration2.class)
- @Configuration注解的放在com.mmzs.config包下面
@FeignClient所在的接口中,不支持@GetMapping等组合注解
//value此处的值一定要和指定的应用microservice-provider-user的controller中的映射路径一致 @RequestMapping(method = RequestMethod.GET, value = "/user/{id}", consumes = "application/json") // 此处有两个坑: //- 1. 不支持@GetMapping等组合注解 //- 2. @PathVariable得设置value public User findById(@PathVariable("id") Long id);
使用@PathVariable时,需要指定其value
public String findServiceName(@PathVariable("serviceName") String serviceName);
Feign暂不支持复杂对象作为一个参数
- 错误用法
// 该请求不会成功,只要参数是复杂对象,即使指定了是GET方法,feign依然会以POST方法进行发送请求。可能是我没找到相应的注解或使用方法错误。 @RequestMapping(method = RequestMethod.GET, value = "/feign-get-user") public User getUser(User user);
- 正确用法
@RequestMapping(method = RequestMethod.GET, value = "/feign-get-user") public User getUser(@RequestParam("id") Long id, @RequestParam("username") String username, @RequestParam("age") String age);
feign对hystrix的支持
添加feign对hystrix的支持,全局配置
application.xml配置:
feign.hystrix.enabled = true
禁用单个FegionClient的Hystrix的支持
// Configuration1表示feign的自定义配置类 @FeignClient(name = "microservice-provider-user", configuration = Configuration1.class)
@Configuration public class Configuration1 { //禁用当前配置的hystrix,局部禁用 @Bean @Scope("prototype") public Feign.Builder feignBuilder() { return Feign.builder(); } }
fallback和fallbackFactory定义的类
- fallback定义的类
- 只重写了一个方法
@Component //这个类不一定要和UserFeignClient写在同一个类中, public class HystrixClientFallback implements UserFeignClient { @Override public User findById(Long id) { User user = new User(); user.setId(1L); user.setUsername("我是HystrixClientFallback"); return user; } }
- fallbackFactory定义的类
- 不只重写了方法,还能捕获异常
@Component public class HystrixClientFallbackFactory implements FallbackFactory<UserFeignClient> { private static Logger LOGGER = LoggerFactory.getLogger(HystrixClientFallbackFactory.class); @Override public UserFeignClient create(Throwable cause) { //打印日志 HystrixClientFallbackFactory.LOGGER.info("fallback; reason was: " + cause.getMessage()); return new UserFeignClient() { @Override public User findById(Long id) { User user = new User(); user.setId(-1L); user.setUsername("我是HystrixClientFallbackFactory"); return user; } }; } }
注: fallbackFactory相当于fallback的增强版,也就是说fallbackFactory的范围更广,到收集异常的边界处了。因此我们是可以利用fallbackFactory属性来打印fallback异常的。
-正确用法如下:@FeignClient(name = "microservice-provider-user", /*fallback = HystrixClientFallback.class,*/ fallbackFactory = HystrixClientFallbackFactory.class)
fallback和fallbackFactory
如下这种方式的注解,fallback和fallbackFactory是会有冲突的,但不会报错,只是会让断路器执行fallback中重写的方法
@FeignClient(name = "microservice-provider-user", fallback = HystrixClientFallback.class, fallbackFactory = HystrixClientFallbackFactory.class)
- 示例:
-
Java对HTTP2的支持
2018-07-02 14:15:28说到Java对HTTP2的支持情况,实质上...1. Java对TLS 1.2及其ALPN扩展的支持 1.1 Java 6 初始时不支持TLS 1.2,但在最新的更新包(6u191)支持,并且客户端默认即使用TLS 1.2。 但是为了支持HTTP2,还要借助于Je... -
IIS7.5配置对PHP的支持
2018-11-15 11:29:38以下环境是 Windows server2008R2 IIS7.5 ...所以,我们就需要配置 IIS 对 PHP 的支持。 怎么安装 IIS 的话,我不说了,今天主要讲怎么配置 IIS 对PHP的支持。 我们首先需要下载PHP的压缩包,这里我们用的是p... -
Openwrt增加对 sd card 支持
2016-07-26 10:16:56本文章所选择的目标芯片为MT7620。... 1、dts文件增加对sdhci的支持,开启硬件对sd card接口驱动支持。 2、增加对sd card的驱动程序支持。 3、增加对语言格式的支持,如utf8。 4、增加对vfat文件系统支持。 -
JRebel 对Springboot的热部署支持
2018-04-19 08:52:37JRebel 对Springboot的热部署支持 1.介绍 JRebel 已经能够支持Springboot项目的热部署了。 但是好像JRebel 只能支持到Spring4.x Springboot的2.0.0版本使用了Spring5.0.4 使用JRebel 热部署2.0.0的项目时会报错 ... -
uft对各浏览器版本支持
2017-05-31 14:38:34uft对各浏览器版本支持 -
关于Bootstrap对浏览器支持
2016-12-23 11:18:12Bootstrap框架主要是实现响应式网页布局,在windows平台,IE8-11目前都是支持的,但是对于IE8和IE9...另外,需要注意的是,IE8需要配合Respond.js文件才能实现对媒体查询(media query)的支持。 CSS3 IE8 I -
freeswitch 对dtmf 支持
2014-03-23 21:24:45我建了一个 Freeswitch 学习 交流群, 45211986, ...freeswitch支持三种dtmf, inband, rfc2833和Info,fs支持这三种dtmf之间的转换,fs处理dtmf方式有两种,一种是intercept(捕获)另一种是透传(passthru), 如果 -
Spring对多线程支持
2017-07-24 16:17:52JDK给我们提供了非常方便的操作线程的API,JDK5之后更是新增了JUC包的支持,并发编程大师Doug Lea(JDK并发的作者)也是一直在为我们使用线程做着不懈的努力。 为什么还要使用Spring来实现多线程呢?这是句废话!... -
JDK | Switch对String的支持
2019-06-11 19:50:12但是,作为一个程序员我们不仅要知道他有多么好用,还要知道它是如何实现的,switch对整型的支持是怎么实现的呢?对字符型是怎么实现的呢?String类型呢?有一点Java开发经验的人这个时候都会猜测switc... -
分布式事务之——MySQL对XA事务的支持
2018-03-31 14:41:01MySQL Connector/J 从5.0.0版本之后开始直接提供对XA的支持。 需要注意的是, 在DTP模型中,mysql属于资源管理器(RM)。而一个完整的分布式事务中,一般会存在多个RM,由事务管理器TM来统一进行协调。因此,这里所... -
IE对SVG的支持
2015-02-04 16:55:141、IE9以上支持SVG,IE11的支持最好。 要支持SVG需要添加 , 并且本地IE内核需要在10以上 2、SVG箭头的移动和放大缩小在IE中不是很好的支持, 添加如下行: (感觉是重绘)参考:... -
POI对JDK版本支持及XLSX
2017-04-01 13:51:39对JDK6的支持,最后版本是POI-3.10.1;从POI-3.11开始,最低支持JDK7。 POI-3.5开始提供对xlsx格式的支持,而此前版本只支持xls格式。 xlsx实质上是ooxml格式,使用xml记录数据,用ZIP打包压缩,后缀名修改为xlsx... -
firefox 对WebRTC支持
2014-06-08 00:33:14firefox pc和android 最新版本已经默认支持webrtc, 同时,firefox在支持VP8的同时支持H264 codec,这无疑增加了webrtc的兼容性,笔者刚刚测试firefox android版本和 chrome pc版本及chrome android版本浏览器webrtc... -
selenium停止对PhantomJS的支持
2018-05-07 17:23:46今天发现最新版本的selenium3.11.0停止对PhantomJS的支持,需要对selenium降级卸载最新版本:pip3 uninstall selenium安装历史版本:pip3 install selenium==3.10.0通过尝试,3.8.0版本不会再提示。另外,在系统环境... -
Python中对多态的支持和使用
2018-08-17 15:45:54同样python中也支持多态,但是是有限的的支持多态性,主要是因为python中变量的使用不用声明,所以不存在父类引用指向子类对象的多态体现,同时python不支持重载。在python中 多态的使用不如Java中那么明显,所以... -
IntelliJ IDEA 添加对 Extjs6 支持
2015-10-22 13:39:23IntelliJ IDEA 添加对 Extjs6 支持 -
测试OpenStack 对IPv6的支持
2017-12-20 16:14:58测试环境: OpenStack 版本:Pike OpenStack neutron plugin : OVN ...OpenStack + OVN 提供了对IPv6的支持能力。本次测试了内部网络。以后有条件的话会进行外部网络相关的,如floating IP等的IPv6功能测试。 -
Unity3d 对手柄支持的坑
2015-04-15 20:35:51为了对游戏测试在淘宝买了北通小手柄2,便宜,但是没有摇杆,就使用左边的上下左右键,在windows控制面板中相应一切正常,在unity就是不响应轴axis,所有轴都试了一遍,弄了一晚上,查了一下北通是与ps3手柄相同,就... -
jupyter添加对JAVA/C++支持
2019-07-21 15:40:09最近很喜欢使用jupyter这个IDE,因为jupyter有所见即所得的效果,于是想让 Jupyter添加对java、C++的支持。 对Java的支持 首先要保证java版本在java9或以上 1、从https://github.com/SpencerPark/IJava/releases... -
基于OKHttp实现对Https的支持
2017-04-14 08:55:13基于OKHttp实现对Https的支持,OKHttp版本:OKHttp3.6.0 -
Nginx实现对chunk请求支持
2017-04-28 21:03:55原文地址:http://linuxgp.blog.51cto.com/1708668/1132419 HTTP协议有一种分块...它对HTTP请求和HTTP响应都是适用的。但是目前的nginx版本只支持chunked响应而不支持请求,如果收到chunked请求的话会返回411错 -
所有浏览器对h5的标签支持
2018-04-26 12:56:26只要用浏览器打开该链接就可以知道,浏览器对h5不同标签的支持或不支持http://html5test.com/ -
Feign对Hystrix的支持
2016-12-18 17:26:18如果Hystrix在classpath下,默认情况下将包括Feign与断路器的所有方法。返回一个com.netflix.hystrix.HystrixCommand去使用,...要禁用Feign的Hystrix支持,设置feign.hystrix.enable=false。要在每个客户端上禁用Hyst -
VS2010对C++11的支持程度
2017-02-09 17:13:45VS2010对C++11支持程度 -
Eclipse 对 Java8 的支持
2015-05-09 13:21:24Eclipse Luna SR2已经添加了对Java8的支持,可直接到官网下载Luna。我这里有个 eclipse for mac的版本 如果你懒得下载Luna,并且已经有 Kepler SR2,可以通过下面三个步骤,添加对java8的支持。亲测成功 下述...