小编khr*_*ris的帖子

如何找出在Linux中使用文件的进程?

我试图在Linux中删除一个文件rm -rf file_name,但得到了错误:

rm: file_name not removed.  Text file busy
Run Code Online (Sandbox Code Playgroud)

如何找出使用此文件的进程?

linux ps

78
推荐指数
3
解决办法
12万
查看次数

如何使用Selenium检查页面中是否存在某些文本?

我正在使用Selenium WebDriver,如何检查页面中是否存在某些文本?也许有人推荐我有用的资源,我可以阅读它.谢谢

validation selenium assert webdriver

46
推荐指数
4
解决办法
23万
查看次数

如何使用Eclipse将WSDL转换为Java类?

我有一个WSDL文件(或者更确切地说,它的URL).我需要将它转换为Java类.我还需要为它描述的Web服务提供测试.我是Web服务的新手,有人可以告诉我如何将WSDL转换为Java吗?

我使用Eclipse JEE Kepler.也许有一些插件可以自动执行此操作?

java eclipse wsdl

37
推荐指数
4
解决办法
14万
查看次数

cx_Oracle:distutils.errors.DistutilsSetupError:找不到Oracle包含文件

我需要在Linux上安装cx_Oracle for Python 2.5(Linux 2.6.18-371.1.2.el5 i686).我已经安装了Oracle客户端10.2.0.4.

我试过以下:1.cx_Oracle tar.gz从下载http://sourceforge.net/projects/cx-oracle/files/.我不知道哪个列出的版本适用于python 2.5和Oracle客户端10.2.0.4,所以请尝试cx_Oracle-5.1.tar.gz.解压缩tar,转到解压缩文件夹并运行python setup.py install.我收到了错误:

Traceback (most recent call last):
File "setup.py", line 187, in <module>
raise DistutilsSetupError("cannot locate Oracle include files")
distutils.errors.DistutilsSetupError: cannot locate Oracle include files
Run Code Online (Sandbox Code Playgroud)

在.bash_profile中我设置了oracle路径:

export ORACLE_HOME=/usr/oracle/10.2.0.4/client
export PATH=$ORACLE_HOME/bin
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
Run Code Online (Sandbox Code Playgroud)

如何解决这样的错误,也许我需要另一个版本的cx_Oracle tar?

  1. 运行pip install cx_Oracle.得到错误:

下载/解压缩cx-Oracle

Cannot fetch index base URL https://pypi.python.org/simple/
Could not find any downloads that satisfy the requirement cx-Oracle
No distributions at all found for cx-Oracle
Run Code Online (Sandbox Code Playgroud)

有人可以告诉我正确的解决方案吗?

更新 建议响应后我得到以下错误:

...
cx_Oracle.c:496: warning: …
Run Code Online (Sandbox Code Playgroud)

linux oracle cx-oracle python-2.5

20
推荐指数
1
解决办法
3万
查看次数

如何使用Selenium WebDriver和Java关闭特定窗口?

我使用Selenium WebDriver.我打开第一页然后打开第二页 - 执行一些操作并返回第一页.在我想要关闭第二页之前,我使用命令driver.close();,但它会关闭第一页而不是第二页.如何使Selenium关闭特定窗口?

部分代码

String HandleBefore = driver.getWindowHandle();

 driver.findElement(By.xpath("...")).click();
 for (String twohandle : driver.getWindowHandles()) {
        driver.switchTo().window(twohandle);
    }       
 driver.findElement(By.linkText("001")).click();
 driver.close();
Run Code Online (Sandbox Code Playgroud)

java selenium window webdriver selenium-webdriver

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

Maven:从元素'plugin'开始发现无效内容

我用plagins更新了我的pom.xml并得到了错误:

 cvc-complex-type.2.4.a: Invalid content was found starting with element 'plugin'. One of      '{"http://maven.apache.org/POM/
 4.0.0":parent, "http://maven.apache.org/POM/4.0.0":description, "http://maven.apache.org/POM/4.0.0":prerequisites, 
 "http://maven.apache.org/POM/4.0.0":issueManagement, "http://maven.apache.org/POM/4.0.0":ciManagement,  "http://
 maven.apache.org/POM/4.0.0":inceptionYear, "http://maven.apache.org/POM/4.0.0":mailingLists, "http://
 maven.apache.org/POM/4.0.0":developers, "http://maven.apache.org/POM/4.0.0":contributors, "http://maven.apache.org/
 POM/4.0.0":licenses, "http://maven.apache.org/POM/4.0.0":scm,   "http://maven.apache.org/POM/4.0.0":organization, 
 "http://maven.apache.org/POM/4.0.0":build, "http://maven.apache.org/POM/4.0.0":profiles, "http://maven.apache.org/
 POM/4.0.0":modules, "http://maven.apache.org/POM/4.0.0":repositories, "http://maven.apache.org/POM/
 4.0.0":pluginRepositories, "http://maven.apache.org/POM/4.0.0":reports,  "http://maven.apache.org/POM/4.0.0":reporting, 
 "http://maven.apache.org/POM/4.0.0":dependencyManagement, "http://maven.apache.org/POM/
 4.0.0":distributionManagement}' is expected.
Run Code Online (Sandbox Code Playgroud)

这是pom.xml文件:

    <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>com</groupId>
<artifactId>test</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>

<name>test</name>
<url>http://maven.apache.org</url>

<properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

<dependencies>
    <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>4.8.2</version>
        <scope>test</scope>
        <type>jar</type>
    </dependency>
    <dependency>
        <groupId>oracle</groupId>
        <artifactId>ojdbc16</artifactId>
        <version>11.2.0.1.0</version>
        <type>jar</type>
    </dependency>
</dependencies>
<plugin>
   <groupId>org.apache.cxf</groupId>
   <artifactId>cxf-java2ws-plugin</artifactId>
   <version>2.5.1</version>
   <dependencies>
      <dependency>
         <groupId>org.apache.cxf</groupId> …
Run Code Online (Sandbox Code Playgroud)

pom.xml maven

15
推荐指数
1
解决办法
3万
查看次数

Selenium WebDriver:打开新选项卡而不是新窗口

我正在使用Selenium WebDriver.每个链接都在新的浏览器窗口中打开.这对我来说不方便.如何更改它以便在新标签中打开?

selenium tabs window webdriver selenium-webdriver

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

DatabaseError:ORA-00911:无效字符

我有以下代码在Oracle db中执行sql问题:

try:
    conn = cx_Oracle.connect(DB_LOGIN+"/"+DB_PWD+"@"+SID)
    cursor = connection.cursor()
    cursor.execute(sql)
    connection.commit()
    cursor.close()
    conn.close()
except cx_Oracle.DatabaseError, ex:
    error, = ex.args
    print 'Error.code =', error.code
    print 'Error.message =' , error.message
    print 'Error.offset =', error.offset
    conn.rollback()
Run Code Online (Sandbox Code Playgroud)

我收到了错误:DatabaseError: <cx_Orac...40066758>.

为什么我在控制台中看不到完整的错误消息?看起来异常部分未执行.我在linux上使用python 2.5和oracle 10.2.0.

更新:经过一番调查,我发现错误是DatabaseError: ORA-00911: invalid character.

我的sql字符串如下:sql = "SELECT ID FROM TABLE WHERE DESC = '" + str(desc[0]) + "';".这是生成的字符串:"SELECT ID FROM TABLE WHERE DESC = '3312';"

当我在SQL Developer中执行相同的请求时,它可以工作.那么我做错了什么?

python oracle cx-oracle

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

如何在Selenium webdriver中等待警报?

可能重复:
selenium 2.4.0,如何检查是否存在警报

我使用以下代码关闭警报窗口:

Alert alert3 = driver.switchTo().alert();
alert3.dismiss();
Run Code Online (Sandbox Code Playgroud)

主窗口打开几秒后出现警报.

我该如何等待并检查警报是否出现?

java selenium alert selenium-webdriver

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

如何在汇合处继续编号列表?

我不确定它是否是提出这样问题的正确位置,但我需要弄清楚如何在Confluence中创建列表样式.我有一个现成的编号列表,但数字被输入为简单文本.如何将数字更改为列表样式.我尝试在新项目之前输入#,但是它会从我的列表中为每个项目输入1.

我怎么能这样编号顺序放?

list confluence

8
推荐指数
2
解决办法
6549
查看次数