小编Dav*_*que的帖子

为什么我无法从AWS管理控制台启动Java SSH客户端?

在AWS管理控制台中,我选择一个EC2实例,然后从"实例操作"菜单中单击"连接".我看到以下弹出窗口:

在此输入图像描述

而不是我通常会看到的字段,我得到上面关于在我的浏览器中启用java的消息.但是在我的浏览器中启用了java .我用这个页面进行了测试 以确认.我正在运行Java SE 6 Update 24.

我在Linux Mint 13 64bit上使用Google Chrome v20.0.我也试过Firefox,结果是一样的.我可以从Windows框中访问Java SSH Client而没有任何问题,因此它可能是特定于Linux的问题.

amazon-ec2 amazon-web-services

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

访问公共爬网AWS公共数据集

我需要浏览和下载常见爬网的公共数据集的子集.页面提到托管数据的位置.
如何浏览并可能下载在s3:// aws-publicdatasets/common-crawl/crawl-002 /上托管的常见爬网数据?

amazon amazon-s3 amazon-ec2 amazon-web-services common-crawl

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

未能读取候选组件类

我正在编写一个 GWT 项目,并且能够运行它。当我单独集成 Spring 时,它可以工作,但后来我尝试集成 Hibernate,这把事情搞砸了。我收到以下错误。

我尝试通过 Spring 的源代码进行调试,但不幸的是我没有看到它从哪里抛出异常。

org.springframework.beans.factory.BeanDefinitionStoreException: Failed to read    
candidate component class: file [C:\ws\TicTacToe\war\WEB-INF\classes\com\tic\server\dao\entity\UserEntity.class]; nested exception is 
java.lang.ArrayIndexOutOfBoundsException: 165: java.lang.ArrayIndexOutOfBoundsException: 165
Run Code Online (Sandbox Code Playgroud)

我相信这没有多大意义。这是完整的错误跟踪:

WARNING: Nested in org.springframework.beans.factory.BeanDefinitionStoreException:    
Failed to read candidate component class: file [C:\all-development-tools\all-
eclipse\eclipse-kepler\ws\TicTacToe\war\WEB-
INF\classes\com\tic\server\dao\entity\UserEntity.class]; nested exception is  
java.lang.ArrayIndexOutOfBoundsException: 165:
java.lang.ArrayIndexOutOfBoundsException: 165
at org.springframework.asm.ClassReader.readLabel(Unknown Source)
at org.springframework.asm.ClassReader.a(Unknown Source)
at org.springframework.asm.ClassReader.accept(Unknown Source)
at org.springframework.asm.ClassReader.accept(Unknown Source)
at org.springframework.core.type.classreading.SimpleMetadataReader.<init>(SimpleMetadataReader.java:64)
at org.springframework.core.type.classreading.SimpleMetadataReaderFactory.getMetadataReader(SimpleMetadataReaderFactory.java:80)
at org.springframework.core.type.classreading.CachingMetadataReaderFactory.getMetadataReader(CachingMetadataReaderFactory.java:102)
at org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider.findCandidateComponents(ClassPathScanningCandidateComponentProvider.java:257)
at org.springframework.context.annotation.ClassPathBeanDefinitionScanner.doScan(ClassPathBeanDefinitionScanner.java:242)
at org.springframework.context.annotation.ComponentScanAnnotationParser.parse(ComponentScanAnnotationParser.java:123)
at org.springframework.context.annotation.ConfigurationClassParser.doProcessConfigurationClass(ConfigurationClassParser.java:219)
at org.springframework.context.annotation.ConfigurationClassParser.processConfigurationClass(ConfigurationClassParser.java:154)
at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:140)
at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:282)
at …
Run Code Online (Sandbox Code Playgroud)

gwt spring hibernate

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

使用src在javascript中隐藏图像

我的图像定义如下:

<div id="logo" class="exhibit-flowingFacet">
  <div class="wrapper">
    <img src="path/to/the/image/logo.png">
    </img>
  </div>
</div>
Run Code Online (Sandbox Code Playgroud)

我想用一个javascript通过它的src获取图像并隐藏它.

function hideImage() { 
  if (document.getElementById() 
  {
    if (document.getElementById('logo').getElementsByClassName('wrapper').src=="path/to/the/image/logo.png")
    {
      document.style.visibility = 'hidden';
    }  
  }
};

hideImage();
Run Code Online (Sandbox Code Playgroud)

但代码不起作用!! 任何的想法?

javascript image hide

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

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

包括源的类路径条目

我的第一个GWT程序没有运行并显示错误,如下所示.Plz的帮助.我不明白出了什么问题:(这就是控制台中显示的内容.

Loading modules
   com.BasicProject.basic
      Loading inherited module 'com.BasicProject.basic'
         [ERROR] Unable to find 'com/BasicProject/basic.gwt.xml' on your classpath; could be a typo, or maybe you forgot to include a classpath entry for source?
[ERROR] shell failed in doStartup method
Run Code Online (Sandbox Code Playgroud)

gwt

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

在 C# 中调用 SQL 连接方法

我将此方法调用到我的登录表单。我不知道这有什么问题。我创建了一个名为 MyConnection 的类,这个类包含我的 SQL ConnectionString。我想要的是我可以调用这个函数。名为 Myfunction 的 Class1 方法将被调用到我的登录表单,因此调用连接字符串会更快。

public static class MyConnection
{
    public static SqlConnection getConnection()
    {                
        string conn = "Data Source=EDGAR-PC\\SQLEXPRESS;Initial Catalog=Project1;Integrated Security=True";
        SqlConnection myConn = new SqlConnection(conn);
        return myConn;    
    }    
}
Run Code Online (Sandbox Code Playgroud)

c# sql-server methods class

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

线程睡眠,不做

我在Java中遇到Thread问题.我想点击按钮(bt1)将背景设置为图片,然后等待5秒并将相同按钮的背景设置为图片.问题是从未设置过第一张图片.程序只需等待5秒钟并设置picture2.这是代码.

bt1.setOnClickListener(new View.OnClickListener() {

    @Override

    public void onClick(View v) {
          bt1.setBackgroundResource(R.drawable.picture);
              try
                 {
                   Thread.sleep(5000);
              }
              catch( InterruptedException e )
              {
                  e.printStackTrace();
              }
          bt1.setBackgroundResource(R.drawable.pic);
        }
    });

}
Run Code Online (Sandbox Code Playgroud)

java multithreading android sleep

0
推荐指数
2
解决办法
208
查看次数

Google 登录状态

我正在尝试在我的网站中构建一个 Google 登录按钮。我试图避免使用他们的内置按钮。下面的代码可以让用户登录,但我不知道如何让我的网页在用户刷新页面或离开网站并返回时记住他们已登录。

使用 Chrome 的开发人员工具,我可以看到https://accounts.google.comLocal Storage和下都有一个条目Session Storage。它们似乎或多或少包含相同的信息,包括用户的验证令牌。

我不明白的是如何让gapi.auth2.init()函数识别和使用这个令牌。该文件似乎并没有掩盖它。

<html>
    <head>
        <title>Login Test</title>
        <script src="http://code.jquery.com/jquery-2.1.4.js"></script>
        <script src="https://apis.google.com/js/platform.js?onload=renderButton" async defer></script>
    </head>

    <script>
        var googleUser = {};
        function renderButton() {
            gapi.load('auth2', function(){
                auth2 = gapi.auth2.init({
                    client_id: 'MY_CREDENTIALS.apps.googleusercontent.com',
                });
                attachSignin(document.getElementById('customBtn'));
            });
        };

        function attachSignin(element) {
            auth2.attachClickHandler(element, {},
                function(googleUser) {
                    document.getElementById('name').innerText = "Signed in: " +
                        googleUser.getBasicProfile().getName();
                }, function(error) {
                    alert(JSON.stringify(error, undefined, 2));
                }
            );
        }
    </script>

    <body>
        <div id="gSignInWrapper">
            <span class="label">Sign in with:</span> …
Run Code Online (Sandbox Code Playgroud)

login oauth-2.0 google-oauth

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