小编xpt*_*xpt的帖子

更新到28.0后无法确定当前版本的FireFox

当我使用Firefox 28.0运行我的Selenium测试时,我得到:

"WebDriver.dll中出现'OpenQA.Selenium.WebDriverException'类型的例外,但未在用户代码中处理

其他信息:无法使用注册表确定当前版本的FireFox,请确保您已正确安装FireFox"

我昨天用Firefox成功运行了测试.

我认为Firefox从昨天开始自动更新到28.0.

今天我收到了上述错误.

我卸载Firefox并重新安装,但我仍然得到相同的例外.

Selenium 2.40 Firefox 28.0 Gallio和MbUnit 3.4

有关如何修复的任何想法?我想我可以切换到IE进行测试.

埃德

firefox selenium

7
推荐指数
1
解决办法
5903
查看次数

Pandas Bar图,如何注释分组的水平条形图

我问这个问题,因为我还没有找到一个关于如何注释分组水平Pandas条形图的工作示例.我知道以下两点:

但它们都是关于垂直条形图.即,要么没有水平条形图的解决方案,要么它没有完全工作.

在这个问题上工作了几个星期之后,我终于能够用一个示例代码提出问题,这几乎就是我想要的,而不是100%工作.需要你的帮助才能实现100%的目标.

我们走了,完整的代码在这里上传.结果如下:

熊猫图

你可以看到它几乎正常工作,只是标签没有放在我想要的地方,我不能把它们移到一个更好的地方.此外,由于图表栏的顶部用于显示错误吧,这样我真正想要的是移向y轴的注释文字,很好地排队在y轴的左边或右边,这取决于X -值.例如,这是我的同事可以用MS Excel做的事情:

MS Excel图表

Python可以用Pandas图表做到这一点吗?

我在上面的url中包含了注释的代码,一个是我的全部 - 我可以做的,另一个是参考(来自In [23]):

# my all-that-I-can-do
def autolabel(rects):
    #if height constant: hbars, vbars otherwise
    if (np.diff([plt.getp(item, 'width') for item in rects])==0).all():
        x_pos = [rect.get_x() + rect.get_width()/2. for rect in rects]
        y_pos = [rect.get_y() + 1.05*rect.get_height() for rect in rects]
        scores = [plt.getp(item, 'height') for item in rects]
    else:
        x_pos = [rect.get_width()+.3 for rect in rects]
        y_pos = [rect.get_y()+.3*rect.get_height() for rect in …
Run Code Online (Sandbox Code Playgroud)

python plot bar-chart pandas

7
推荐指数
1
解决办法
2460
查看次数

Ubuntu meld:系统上未安装 GSettings 架构

这是一个 vanilla Ubuntu 16.04 LTS,完全基于Xubuntu 核心。所以我需要自己安装软件包。一切都很顺利,除了meld在开始时,我会得到:

(meld:4188): GLib-GIO-ERROR **: No GSettings schemas are installed on the system

[2]+  Trace/breakpoint trap  
Run Code Online (Sandbox Code Playgroud)

我找到了三个现有的答案,但没有一个适合我的案例。

按照建议,我已经重新安装了gsettings-desktop-schemas

sudo apt-get install --reinstall gsettings-desktop-schemas
Run Code Online (Sandbox Code Playgroud)

但是,它们都不起作用。

  $ ls -l /usr/share/glib-2.0/schemas/org.gtk.Settings.FileChooser.gschema.xml   
  -rw-r--r-- 1 root root 5354 2016-03-24 16:46 /usr/share/glib-2.0/schemas/org.gtk.Settings.FileChooser.gschema.xml

$ XDG_DATA_DIR=/usr/share/glib-2.0/schemas/ meld ...
(meld:4326): GLib-GIO-ERROR **: No GSettings schemas are installed on the system

[2]+  Trace/breakpoint trap
Run Code Online (Sandbox Code Playgroud)

ubuntu settings gnome meld

7
推荐指数
1
解决办法
7926
查看次数

github,如何搜索我发布或评论过的问题

github只列出我发布或评论的几个问题,所以我想知道如何自己搜索其余的问题,我自己参与的所有问题.

search github

7
推荐指数
1
解决办法
401
查看次数

curl: (60) SSL 证书问题:在代理后面上传时

我需要在公司代理后面进行卷曲上传。根据我尝试的网站,我遇到了以下两种类型的问题,

  • 卷曲:(35)错误:1408F10B:SSL例程:ssl3_get_record:版本号错误
  • curl: (60) SSL 证书问题:无法获取本地颁发者证书

详细信息如下:

情况1:

. . . 
< HTTP/1.1 200 Connection established
< Proxy-agent: CCProxy
< 
* Proxy replied 200 to CONNECT request
* CONNECT phase completed!
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
*   CAfile: /etc/ssl/certs/ca-certificates.crt
  CApath: /etc/ssl/certs
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* CONNECT phase completed!
* CONNECT phase completed!
* error:1408F10B:SSL routines:ssl3_get_record:wrong version number
* Closing connection 0
curl: (35) error:1408F10B:SSL routines:ssl3_get_record:wrong version …
Run Code Online (Sandbox Code Playgroud)

ssl upload proxy curl zscaler

7
推荐指数
1
解决办法
2万
查看次数

Pandas Plot,如何控制条宽和间隙

希望这是一个简单的问题 - 如何在用熊猫绘图时控制条宽和间隙?

完整代码在此处,转贴如下:

df = pd.DataFrame({
        'person':[x*3 for x in list('ABCDEF')],
        'score1':np.random.randn(6),
        'score2':np.random.randn(6),
        'score3':np.random.randn(6),
        'score4':np.random.randn(6),
        'score5':np.random.randn(6)
                   })
print(df)
ax = df.set_index(['person']).plot(kind='barh')
ax.invert_yaxis()
Run Code Online (Sandbox Code Playgroud)

在此输入图像描述

结果条宽度太薄,间隙太宽,我该如何修复?谢谢.

python plot bar-chart pandas

6
推荐指数
1
解决办法
6508
查看次数

ES6类,传递函数作为参数来注册expressjs路由

该类用于扩展expressjs应用程序中的所有控制器:

import response from '../utils/responseParser.js';

const APISLUG = '/api/v1/';

export default class BaseController {

  constructor(name, app, model){
    this.model = model;
    this.app = app;
    this.name = name;
    console.log(model);
    this.register();
  }

  register() {
    this.app.get(APISLUG + this.name, this.all);
  }
  /*
  Retrive all records
  */
  all(req, res, next) {
    this.model.all(req.body, (err, data) => {
      if(err) return res.json(response.replyError(data));
      return res.json(response.reply(data));
    });
  }
}
Run Code Online (Sandbox Code Playgroud)

如您所见,我已经制作了一个"注册"方法来自动设置所有基本路线.

unable to read property " model " of undefined "在这一行收到错误:

this.app.get(APISLUG + this.name, this.all);
Run Code Online (Sandbox Code Playgroud)

我相信这是因为当我将函数作为参数传递时范围会丢失.我怎么解决这个问题?

javascript ecmascript-6

6
推荐指数
1
解决办法
7980
查看次数

使用 contains 过滤 JMESPath

JMESPath 是 Azure 使用的 JSON 查询语言。

使用http://jmespath.org/给出的自己的示例

{
  "locations": [
    {"name": "Seattle", "state": "WA"},
    {"name": "New York", "state": "NY"},
    {"name": "Bellevue", "state": "WA"},
    {"name": "Olympia", "state": "WA"}
  ]
}
Run Code Online (Sandbox Code Playgroud)

如何列出名称中包含字母"l"或字符串的所有位置"le"?谢谢。

json filtering filter jmespath

6
推荐指数
1
解决办法
4177
查看次数

如何减少TFS工作空间中的项目数

我得到以下内容

TF401190: The local workspace XXXXXX;XXXXXX has 353943 items in it, 
which exceeds the recommended limit of 100000 items. To improve 
performance, either reduce the number of items in the workspace, 
or convert the workspace to a server workspace.
Run Code Online (Sandbox Code Playgroud)

但是如何减少工作空间中的项目数?

我已经查阅了以下文章,但仍然有些损失。

tfs

6
推荐指数
1
解决办法
4675
查看次数

Docker 无法在代理 TLS 握手超时后提取图像

我在 CentOS 7 上安装了最新的 Docker 版本 18.06.0。我的服务器位于公司网络中,因此使用代理服务器访问注册表。我已根据 docker 文档添加了代理设置。但最终在部分工作中添加代理设置。即现在 docker 在运行之前使用代理来拉取图像。

但现在它无法给出以下错误:

$ sudo docker run hello-world
Unable to find image ‘hello-world:latest’ locally
docker: Error response from daemon: Get https://registry-1.docker.io/v2/: proxyconnect tcp: net/http: TLS handshake timeout.
Run Code Online (Sandbox Code Playgroud)

此外,登录失败:

$ sudo docker login --username=XXXX
Password:
Error response from daemon: Get https://registry-1.docker.io/v2/: proxyconnect tcp: EOF
Run Code Online (Sandbox Code Playgroud)

我的代理速度很快。当我使用 wget 或 curl 从互联网下载任何东西时,我看到 90 到 100Mbps 的速度。我机器上的其他应用程序实用程序(例如 yum)正在完美地使用此代理,并且运行良好。现在不知道为什么只有Docker下载镜像有问题。

安装和配置的详细信息如下:

版本:

$ sudo docker version
Client:
Version: 18.06.0-ce
API version: 1.38
Go version: go1.10.3
Git commit: 0ffa825 …
Run Code Online (Sandbox Code Playgroud)

ssl proxy docker docker-registry docker-pull

6
推荐指数
2
解决办法
2万
查看次数