小编jas*_*n m的帖子

包含<my reference>的封闭实例是必需的

包含的封闭实例是必需的

下面是代码.positionObj是我试图使用的对象,它给了我上面的错误.

目前还不清楚为什么.

package toolBox;
import toolBox.Secretary.positionObj;    

public class PositionManagement {
    public static HashMap<String, Secretary.positionObj> main(String vArg){
        positionObj newPosition=new positionObj();
    }
}
Run Code Online (Sandbox Code Playgroud)

java instance

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

使用正则表达式替换新行/返回空格

对于知道的人来说这是一个非常基本

而不是来自

"This is my text. 

And here is a new line"
Run Code Online (Sandbox Code Playgroud)

至:

"This is my text. And here is a new line"
Run Code Online (Sandbox Code Playgroud)

我明白了:

"This is my text.And here is a new line.
Run Code Online (Sandbox Code Playgroud)

知道为什么吗?

L.replaceAll("[\\\t|\\\n|\\\r]","\\\s");
Run Code Online (Sandbox Code Playgroud)

我想我找到了罪魁祸首.

在下一行,我执行以下操作:

L.replaceAll( "[^a-zA-Z0-9|^!|^?|^.|^\\s]", "");
Run Code Online (Sandbox Code Playgroud)

这似乎是导致我的问题.

知道为什么吗?

我显然尝试执行以下操作:删除所有非字符,并删除所有新行.

java regex

29
推荐指数
3
解决办法
9万
查看次数

setAttribute('display','none')不起作用

function classInfo(e){
    document.getElementById('classRight').setAttribute('display','none');
    alert(e);   
}
Run Code Online (Sandbox Code Playgroud)

我认为这段代码非常直接,它不起作用,并没有隐藏有问题的元素.我正在接受警报,这让我觉得没有问题.

任何帮助,将不胜感激.

javascript dom

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

硒出乎意料地有问题

我现在已经在一些项目上使用了selenium一段时间了.

使用正在运行的代码我现在收到以下错误:

    C:\Users\%USER%\Miniconda\python.exe C:/Users/%USER%/PycharmProjects/c_r/quick_debug.py
    Traceback (most recent call last):
      File "C:/Users/%USER%/PycharmProjects/c_r/quick_debug.py", line 17, in <module>
        c.setUp()
      File "C:\Users\%USER%\PycharmProjects\c_r\c.py", line 40, in setUp
        self.driver = webdriver.Chrome()
      File "C:\Users\%USER%\Miniconda\lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 67, in __init__
        desired_capabilities=desired_capabilities)
      File "C:\Users\%USER%\Miniconda\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 87, in __init__
        self.start_session(desired_capabilities, browser_profile)
      File "C:\Users\%USER%\Miniconda\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 141, in start_session
        'desiredCapabilities': desired_capabilities,
      File "C:\Users\%USER%\Miniconda\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 201, in execute
        self.error_handler.check_response(response)
      File "C:\Users\%USER%\Miniconda\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 181, in check_response
        raise exception_class(message, screen, stacktrace)
    selenium.common.exceptions.WebDriverException: Message: unknown error: unrecognized Blink revision: 3b3c00f2d95c45cca18ab944acced413fb759311
      (Driver info: chromedriver=2.10.267521,platform=Windows NT 6.3 x86_64)


    Process …
Run Code Online (Sandbox Code Playgroud)

python selenium google-chrome selenium-chromedriver selenium-webdriver

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

重装后,Mongo等待27017

我已经卸载并重新安装了mongo(3.0.1),确定我接受了Windows 8上的网络访问,但我仍然有同样的问题"等待27017".

我发送的命令如下:

PS C:\Program Files\MongoDB\Server\3.0\bin> .\mongod.exe --dbpath  C:\mongodb\data
2015-04-01T21:33:46.787-0400 I JOURNAL  [initandlisten] journal dir=C:\mongodb\data\journal
2015-04-01T21:33:46.790-0400 I JOURNAL  [initandlisten] recover : no journal files present, no recovery needed
2015-04-01T21:33:46.972-0400 I JOURNAL  [durability] Durability thread started
2015-04-01T21:33:46.973-0400 I JOURNAL  [journal writer] Journal writer thread started
2015-04-01T21:33:47.134-0400 I CONTROL  [initandlisten] MongoDB starting : pid=7436 port=27017 dbpath=C:\mongodb\data 64
-bit host=CookieMunster
2015-04-01T21:33:47.135-0400 I CONTROL  [initandlisten] targetMinOS: Windows 7/Windows Server 2008 R2
2015-04-01T21:33:47.135-0400 I CONTROL  [initandlisten] db version v3.0.1
2015-04-01T21:33:47.136-0400 I CONTROL  [initandlisten] git version: …
Run Code Online (Sandbox Code Playgroud)

mongodb windows-8

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

pytesseract找不到指定的文件

我的代码很简单,如下:

import pytesseract
from PIL import Image

img = Image.open('C:/temp/foo.jpg')
img.load()
i = pytesseract.image_to_string(img)
Run Code Online (Sandbox Code Playgroud)

我得到的错误响应是:

Traceback (most recent call last):
  File "img.py", line 6, in <module>
    i = pytesseract.image_to_string(img)
  File "build\bdist.win32\egg\pytesseract\pytesseract.py", line 161, in image_to
_string
  File "build\bdist.win32\egg\pytesseract\pytesseract.py", line 94, in run_tesse
ract
  File "C:\Users\%USER%\AppData\Local\Continuum\Anaconda\lib\subprocess.py",
line 710, in __init__
    errread, errwrite)
  File "C:\Users\%USER%\AppData\Local\Continuum\Anaconda\lib\subprocess.py",
line 958, in _execute_child
    startupinfo)
WindowsError: [Error 2] The system cannot find the file specified
Run Code Online (Sandbox Code Playgroud)

任何指导都会很棒.

将tesseract添加到我的路径变量有助于: C:\Program Files (x86)\Tesseract-OCR

但是在尝试运行pytesseract时,代码现在崩溃了.

python tesseract python-tesseract

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

对于正文中的每个元素类型

例如

For each div in body
          div.innerHtml = "poo"
next div
Run Code Online (Sandbox Code Playgroud)

这显然是伪代码,但演示了我想要做的事情.

javascript dom

16
推荐指数
3
解决办法
7万
查看次数

如何检查变量数组是否未分配?

   Dim Result() As Variant
Run Code Online (Sandbox Code Playgroud)

在我的观察窗口中,显示为

Expression | Value | Type
Result     |       | Variant/Variant()
Run Code Online (Sandbox Code Playgroud)

我如何检查以下内容:

   if Result is nothing then
Run Code Online (Sandbox Code Playgroud)

要么

   if Result is Not Set then
Run Code Online (Sandbox Code Playgroud)

这基本上是我想要完成的,但第一个不起作用,第二个不存在.

vba variant

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

GCE - 如果我使用SSH或从终端登录,用户名不同?

我创建了一个没有任何内容的新项目.

当我创建我的第一个微实例时,我做了以下操作

  1. 使用浏览器窗口SSH连接到它.我知道了:

    USER_NAME @实例1:〜$

  2. 如果我使用gcloud命令连接:

    gcloud compute --project"projectname-165421"ssh --zone"us-east1-b""instance-1"

    我被带到:

    用户名@实例1:〜$

为什么会发生这种情况,我该如何解决?

这创建了两个独立的用户,这给我带来了很大的困惑!

谢谢

google-compute-engine

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

vba:从函数返回字典

这概述了我想要做的事情.

这对我不起作用,目前还不清楚为什么.

提前感谢您的帮助.

        Sub mySub()
        dim myDict as Dictionary
            myDict=new Dictionary

                myDict=myFunc()

        End Sub

        Function myFunc()
            dim myDict2
                set myDict2 = new Dictionary

                    'some code that does things and adds to myDict2'

            myFunc=myDict2
        End Function
Run Code Online (Sandbox Code Playgroud)

excel vba excel-2003 excel-vba

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