小编Tes*_*min的帖子

如何在GoLang程序中运行二进制文件?

我想在GoLang程序中执行二进制文件.

这是我的代码:

package main

import (
    "fmt"
    "os/exec"
)

func main() {
    output, _ := exec.Command("/home/user/Golang/bin/hello").Output()
    fmt.Println(output)
}
Run Code Online (Sandbox Code Playgroud)

但我得到的输出为:[]

提前致谢.

go

3
推荐指数
2
解决办法
5169
查看次数

Docker Jupyter映像未公开端口

我已经使用高山linux创建了Jupyter docker镜像。一切工作正常,但容器未暴露端口。但是在容器内部,端口仍在工作。但是我无法从主机访问。

我已经写了如下图的图像文件:

FROM vanarajaz/alpine-python

MAINTAINER Vanaraj C "vanaraj@assistanz.com

"RUN python3 -m pip install --upgrade pip && \

python3 -m pip install jupyter

EXPOSE 8888

CMD [ "jupyter", "notebook" ]
Run Code Online (Sandbox Code Playgroud)

创建容器后,出现以下错误:

[I 13:32:34.019 NotebookApp] Writing notebook server cookie secret to /root/.local/share/jupyter/runtime/notebook_cookie_secret[C 13:32:34.592 NotebookApp] Running as root is not recommended. Use --allow-root to bypass.From:Vanaraj
[I 13:32:34.019 NotebookApp] Writing notebook server cookie secret to /root/.local/share/jupyter/runtime/notebook_cookie_secret[C 13:32:34.592 NotebookApp] Running as root is not recommended. Use --allow-root to bypass.
Run Code Online (Sandbox Code Playgroud)

我不知道如何解决此错误。任何帮助是极大的赞赏。提前致谢。

docker jupyter docker-image jupyter-notebook

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

无法打开Firefox浏览器selenium自动化脚本 - 错误:无法在Jenkins Ubuntu中打开显示:: 99

我有一个用selenium webdriver编写的简单自动化脚本.我需要通过Jenkins执行这个脚本.所以我在Jenkins中配置了这个工作,当试图执行时,我无法打开Firefox浏览器.

控制台输出如下:

Running TestSuite
org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms. Firefox console output:
Error: cannot open display: :99
Failed tests: 
 NewTest.testEasy:25 » WebDriver Failed to connect to binary FirefoxBinary(/usr...
Run Code Online (Sandbox Code Playgroud)

这是我的代码:

@Test
    public void testEasy() {
//          WebDriver driver = new FirefoxDriver();
        WebDriver driver = null;
        FirefoxBinary binary = new FirefoxBinary(new File("/usr/bin/firefox"));
        binary.setEnvironmentProperty("DISPLAY",System.getProperty("lmportal.xvfb.id",":99"));
        driver = new FirefoxDriver(binary,null);
        driver.get("https://www.google.co.in/?gfe_rd=cr&ei=drM-V8PiHPPI8AevjriQDA&gws_rd=ssl");
//          String title = driver.getTitle();
//          AssertJUnit.assertTrue(title.contains("Free Selenium Tutorials"));
//          System.out.println("TEST");
    }
Run Code Online (Sandbox Code Playgroud)

firefox selenium jenkins

0
推荐指数
1
解决办法
3707
查看次数