我尝试开始使用selenium(今天下载了当前版本)并复制了他们打开浏览器并执行谷歌搜索的示例.
但是,该程序永远挂在第一行WebDriver driver = new FirefoxDriver();.
我安装了Firefox 13.
Thread dump: Thread [main] Thread.sleep(long) line: not available [native method] [local variables unavailable] FirefoxBinary.sleep(long) line: 218 FirefoxBinary.clean(FirefoxProfile, File) line: 234 NewProfileExtensionConnection.start() line: 76 FirefoxDriver.startClient() line: 200 FirefoxDriver(RemoteWebDriver).(CommandExecutor, Capabilities) line: 94 FirefoxDriver.(FirefoxBinary, FirefoxProfile) line: 147 FirefoxDriver.() line: 85 Test.main(String[]) line: 24
我收到了消息
<Warning> <EJB> <BEA-010202> <Call-by-reference is not enabled for the EJB 'myEjb'.
The server will have better performance if it is enabled. To enable call-by-reference, set the enable-call-by-reference element to True in the weblogic-ejb-jar.xml deployment descriptor or corresponding annotation for this EJB.>
Run Code Online (Sandbox Code Playgroud)
和
<Warning> <EJB> <BEA-012035> <The Remote interface method: 'public abstract java.util.Collection my.sessionfassade.ejb.myFassade.myMethod(java.lang.String,java.lang.String,java.util.Collection) throws my.Exception' in EJB 'myEjb' contains a parameter of type: 'java.util.Collection' which is not Serializable. Though the EJB 'myEjb' has call-by-reference set to false, this parameter …Run Code Online (Sandbox Code Playgroud) 为SAFARI存储cookie的方式已经改变了SAFARI 5.1,并且它们在文件的最后8个字节中添加了一种完整性控制代码:
该文件是%APPDATA%\ Apple Computer\Safari\Cookies\Cookies.binarycookies
有人知道最后8个字节对应的是什么吗?
CRC32检查?
请帮忙
我有以下声明在我的数据中找到明确的名称(约1百万条目):
select Prename, Surname from person p1
where Prename is not null and Surname is not null
and not exists (
select * from person p2 where (p1.Surname = p2.Surname OR p1.Surname = p2.Altname)
and p2.Prename LIKE CONCAT(CONCAT('%', p1.Prename), '%') and p2.id <> p1.id
) and inv_date IS NULL
Run Code Online (Sandbox Code Playgroud)
Oracle显示1477315000的巨额成本,并且执行不会在5分钟后结束.简单地将OR分成一个自己存在的子条款将性能提升到0.5秒,成本增加到45000:
select Prename, Surname from person p1
where Prename is not null and Surname is not null
and not exists (
select * from person p2 where p1.Surname = p2.Surname and …Run Code Online (Sandbox Code Playgroud) 我有一个java webdriver驱动的selenium执行,它在列表上循环,在文本框中输入不同的信息并使用FirefoxDriver发送它.
在一台计算机上,相当可重复,在第10次或第11次迭代之后,召唤 findElement(By.id("mi4"))一次UnreachableBrowserException.
Jun 29, 2012 1:52:02 PM org.apache.http.impl.client.DefaultRequestDirector tryConnect
Information: I/O exception (java.net.BindException) caught when connecting to the target host: Address already in use: connect
Jun 29, 2012 1:52:02 PM org.apache.http.impl.client.DefaultRequestDirector tryConnect
Information: Retrying connect
Jun 29, 2012 1:52:02 PM org.apache.http.impl.client.DefaultRequestDirector tryConnect
Information: I/O exception (java.net.BindException) caught when connecting to the target host: Address already in use: connect
...
Exception in thread "main" org.openqa.selenium.remote.UnreachableBrowserException: Error communicating with the remote browser. It may have died.
Build …Run Code Online (Sandbox Code Playgroud) ftpClient.connect与没有活动ftp服务的现有主机一起使用时,超时仅在5分钟后发生,这太长了。
我尝试设置各种超时(setDefaultTimeout,setDataTimeout),但没有任何改变。
FtpClient从SocketClient那里继承有一个setConnectTiemout方法,但是当我使用java.lang.NoSuchMethodError: org/apache/commons/net/ftp/FTPClient.setConnectTimeout它时,运行它时会得到一个。这似乎是由于某些J2SW 1.2兼容性,如Commons-net FAQ中所述:
问:如何设置连接超时?http://wiki.apache.org/commons/Net/FrequentlyAskedQuestions
他们建议SocketFactory使用特定的超时从扩展的Socket类实现自己的创建对象。但是,当尝试使用时,ftpClient.setSocketFactory我也会得到一个java.lang.NoSuchMethodError。
有什么帮助我可以减少连接超时吗?
我用一种旧的自我构思的脚本语言得到了大量遗留代码,我们将其编译/转换为javascript.
该语言有条件跳转,跳转到标签.与常见的goto语句的区别在于,不能进行向后跳转.该语言中没有嵌套的if语句和循环.
由于goto中不存在goto,我正在寻找一种转换goto mylabel并mylabel:进入语义等效结构的算法.
我想使用ifs但发现它不是微不足道的,因为goto标签的任意嵌套.
例:
if cond1 goto a
do something1
if cond2 goto b
do something2
a:
do something3
if cond3 goto c
do something4
c:
do something5
b:
Run Code Online (Sandbox Code Playgroud)
可以改写为:
lbl_b=false;
lbl_c=false;
lbl_a = cond1;
if (!cond1) {
do something1;
lbl_b = cond2;
if (!lbl_b) {
do something2;
}
}
if (!lbl_b) {
do something3;
lbl_c = cond3;
if (!lbl_c) {
do something4;
}
do something5;
}
Run Code Online (Sandbox Code Playgroud)
但是,我无法从中推导出一般算法.
当我执行
System.setProperty("java.security.auth.login.config", ejbLoginConfig);
Run Code Online (Sandbox Code Playgroud)
使用ejbLoginConfig = "../conf/weblogicdomain.conf"并且我的客户端位于包含空格的路径中,我为我的EJB调用获取ClassNotFoundException:
Caused by: java.lang.ClassNotFoundException: my.app.MyFassade
at weblogic.ejb.container.deployer.RemoteBizIntfClassLoader.getClassBytes(RemoteBizIntfClassLoader.java:151)
...
Run Code Online (Sandbox Code Playgroud)
如果我将所有内容移动到没有空格的路径,它将起作用。使用绝对路径不会更改任何内容。
感谢您的想法!
我正在使用Executors.newCachedThreadPool()并invokeAll使用List of Callables来执行长时间运行的多线程处理.我的主线程被阻塞,直到所有线程完成,我可以处理返回的Futures invokeAll.但是invokeAll,如果其中一个Callable抛出异常并终止其他线程,我想立即返回.
使用execute而不是invokeAll阻塞第一个future.get()不需要是抛出execption的那个.
使用忙等待循环所有的期货和检查isDone()似乎也不是最好的方法.
我使用创建一个地图
new MapMaker().softValues().maximumSize(cacheSize).makeMap();
Run Code Online (Sandbox Code Playgroud)
这似乎工作正常,但是,在服务器上部署并将新元素放入地图后,我有时会获得以下异常:
java.lang.IllegalStateException: Can't overwrite cause
at java.lang.Throwable.initCause(Throwable.java:320)
at org.jboss.mx.loading.RepositoryClassLoader.findClass(RepositoryClassLoader.java:624)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at org.jboss.mx.loading.RepositoryClassLoader.loadClassImpl(RepositoryClassLoader.java:474)
at org.jboss.mx.loading.RepositoryClassLoader.loadClass(RepositoryClassLoader.java:415)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at com.google.common.collect.CustomConcurrentHashMap$2.iterator(CustomConcurrentHashMap.java:828)
at java.util.AbstractCollection.remove(AbstractCollection.java:241)
at com.google.common.collect.CustomConcurrentHashMap$Segment.removeFromChain(CustomConcurrentHashMap.java:2599)
at com.google.common.collect.CustomConcurrentHashMap$Segment.processPendingCleanup(CustomConcurrentHashMap.java:2772)
at com.google.common.collect.CustomConcurrentHashMap$Segment.runLockedCleanup(CustomConcurrentHashMap.java:2860)
at com.google.common.collect.CustomConcurrentHashMap$Segment.preWriteCleanup(CustomConcurrentHashMap.java:2806)
at com.google.common.collect.CustomConcurrentHashMap$Segment.put(CustomConcurrentHashMap.java:2374)
at com.google.common.collect.CustomConcurrentHashMap.put(CustomConcurrentHashMap.java:3346)
at my.app.cache.CacheImplGoogleGuava.put(CacheImplGoogleGuava.java:36)
...
Run Code Online (Sandbox Code Playgroud)
可能是什么原因?
- - 更新:
JBoss版本是5.
在Throwable.initCause中设置断点,
并显示ClassNotFoundException消息:
Invalid use of destroyed classloader for com.google.common.collect.Iterators, UCL destroyed at:和Stacktrace
ClassNotFoundException(Throwable).initCause(Throwable):320
UnifiedClassLoader3(RepositoryClassLoader).findClass(String):628
...
UnifiedClassLoader3(ClassLoader).loadClass(String):248
CustomConcurrentHashMap$2.iterator():828
CustomConcurrentHashMap$2(AbstractCollection<E>).remove(Object):241
CustomConcurrentHashMap$Segment.enqueueCleanup(...):2738
CustomConcurrentHashMap$Segment.unsetValue(...):2662
CustomConcurrentHashMap<K, V>.reclaimValue(...)
CustomConcurrentHashMap$SoftValueReference<K, V>.finalizeReferent():1637
...
Method.invoke:574
Finalizer.claenUp:154
Finalizer.run:127
Run Code Online (Sandbox Code Playgroud)
从堆栈跟踪中,似乎地图中的对象最终确定无法加载finalizeReferent类中的对象com.google.common.collect.Iterators.
如何以编程方式枚举和删除Edge浏览器的cookie?
它们似乎不属于临时Internet文件中的IE cookie,因此似乎不会被FindFirstUrlCacheEntry/ FindNextUrlCacheEntryAPI调用返回.
我可以看到cookie文件
C:\Users\...\AppData\Local\Packages\Microsoft.MicrosoftEdge_8wekyb3d8bbwe\AC\#!001\MicrosoftEdge\Cookies
C:\Users\...\AppData\Local\Packages\Microsoft.MicrosoftEdge_8wekyb3d8bbwe\AC\#!002\MicrosoftEdge\Cookies
C:\Users\...\AppData\Local\Packages\Microsoft.MicrosoftEdge_8wekyb3d8bbwe\AC\MicrosoftEdge\Cookies
Run Code Online (Sandbox Code Playgroud)
三个目录有什么区别?如何访问它们并以编程方式删除单个cookie?
我有三个查询,我希望结果行由这些查询的条目组成,这些查询彼此随机连接。
我不想合并结果,而是以或多或少随机的方式加入它们(可以保留原始分布,或者可以统一所有结果)。
我尝试了以下方法:
select *
from
(
SELECT street, number
FROM Addresses
WHERE valid = '1'
order by Dbms_Random.Value
) q1 ,
(
select prename
from person
order by Dbms_Random.Value
) q2 ,
(
select surname
from person
order by Dbms_Random.Value
) q3
Run Code Online (Sandbox Code Playgroud)
然而,我的结果集看起来根本不是随机的:
Main street, 1, Andre, Smith
Main street, 1, Andre, Warnes
Main street, 1, Andre, Jackson
Main street, 1, Andre, Macallister
Run Code Online (Sandbox Code Playgroud)
从查询中删除ORDER BY并将其应用于笛卡尔积的结果是极其低效的,因为表很大,尤其是它们的笛卡尔积。