小编Din*_*ino的帖子

CreateProcess error = 2,系统找不到指定Roo的文件

我正忙着做比萨教程,当我进入执行测试命令时,我得到上述错误.我检查了Windows Path并添加了所有必需的链接到STS文件.我很茫然.这是我第四次尝试本教程并且遇到了这个命令.请帮忙,这让我很沮丧.

spring spring-roo

7
推荐指数
2
解决办法
5929
查看次数

将点击转换为悬停事件javascript

我试图在悬停汉堡棒时动画,我在网上找到了一个例子并设法让它在mouseenter上运行,但是我希望它在鼠标离开汉堡栏后返回汉堡栏.

这是代码,因为你可以看到mouseenter工作,但是当我移动鼠标时,我希望它回到汉堡栏并且不能保留为X.

(function() {"use strict";
  var toggles = document.querySelectorAll(".c-hamburger");
  for (var i = toggles.length - 1; i >= 0; i--) {
    var toggle = toggles[i];
    toggleHandler(toggle);
  };
  function toggleHandler(toggle) {
    toggle.addEventListener("mouseenter", function(e) {
      e.preventDefault();
      (this.classList.contains("is-active") === true) ? this.classList.remove("is-active"): this.classList.add("is-active");
    });
  }
             
})();
Run Code Online (Sandbox Code Playgroud)
.c-hamburger {
  display: block;
  position: relative;
  overflow: hidden;
  margin: 0;
  padding: 0;
  width: 66px;
  height: 55px;
  font-size: 0;
  text-indent: -9999px;
  appearance: none;
  box-shadow: none;
  border-radius: none;
  border: none;
  cursor: pointer;
  transition: background 0.3s;
}

.c-hamburger:focus {
  outline: …
Run Code Online (Sandbox Code Playgroud)

html javascript css jquery

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

检查URL是HTTPS还是HTTP协议?

我目前正在使用以下内容从这里这里的 Android文档中读取文件.用户选择(在设置屏幕中)他们的站点是使用HTTP还是HTTPS协议.如果他们的网站使用HTTP协议,那么它同时适用于HttpURLConnectionHttpsURLConnection,但如果他们的网站使用HTTPS协议,那么它不工作HttpURLConnection协议,最糟糕的是它并没有给我一个异常错误.下面是我正在使用的示例代码.

所以从本质上讲,我如何检查网址是否为HTTPS协议,以检查用户是否选择了正确的协议?

InputStream inputStream;
HttpURLConnection urlConnection;
HttpsURLConnection urlHttpsConnection;
boolean httpYes, httpsYes; 
try {
if (httpSelection.equals("http://")) {
  URL url = new URL(weburi);
  urlConnection = (HttpURLConnection) url.openConnection();
  inputStream = new BufferedInputStream((urlConnection.getInputStream()));
httpYes = True;
}
if (httpSelection.equals("https://")) {
  URL url = new URL(weburi);
  urlHttpsConnection = (HttpsURLConnection) url.openConnection();
  urlHttpsConnection.setSSLSocketFactory(context.getSocketFactory());
  inputStream = urlHttpsConnection.getInputStream();
  https=True;
}

catch (Exception e) {
//Toast Message displays and settings intent re-starts
}
finally {
  readFile(in);
if(httpYes){ 
    urlConnection.disconnect();
    httpYes = …
Run Code Online (Sandbox Code Playgroud)

java https android http

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

搜索字符串数组而不使用循环

我有以下数组

String[] arrKey  = new String[] {"A","B","C","D","E",......"Y","Z"};
Run Code Online (Sandbox Code Playgroud)

我想搜索数组并给我索引字母的索引.比方说,我想搜索字母"E",当我搜索数组时,它应该给我"E"的位置,所以我应该得到索引位置4.我不想在循环中这样做.可能吗?我一直在寻找,无法找到答案.

java arrays string search

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

将棒棒糖置于静音模式/静音模式而非优先模式

目前,我正在使用以下方法将手机设置为静音模式:

AudioManager audioManager = (AudioManager) mContext.getSystemService(Context.AUDIO_SERVICE);
audioManager.setRingerMode(AudioManager.RINGER_MODE_SILENT);
Run Code Online (Sandbox Code Playgroud)

但是我注意到,在Lollipop中,它将手机置于“优先模式”,通知栏顶部带有一个小星星。但我希望它是100%静音,而不是“优先模式”。这可能吗?要将棒棒糖设为100%静音?

我试图像这样将setRingerMode设置为0

audioManager.setRingerMode(0);
Run Code Online (Sandbox Code Playgroud)

但这仍然给了我星星,而不是说话者穿过它的线路,并且说在它下面的括号中带有(优先)振动。

android

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

onKeyUp不工作的JavaScript

我试图使用javascript填充div标签与名称字段中输入的内容(下面的示例).我不确定我做错了什么,但它不起作用,我不知道为什么不呢?我想要的只是当用户输入下面显示的名字时.我看过其他例子,但仍然困惑为什么这个例子不起作用.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4 /strict.dtd"> 
<html lang="en-GB"> 
  <head> 
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 
    <title>hello whirled</title> 
    <script type="text/javascript">
        document.getElementById("name").onkeyup = function() {
            document.getElementById("display").innerHTML = this.value;
        }
    </script> 
</head> 
<body> 
    <h1> 
        Bla Bla
    </h1> 
    <form method="get" action=" "> 
        <p> 
            Other Text goes here
        </p> 
        <p> 
            Type your first name here: 
            <input type="text" id="name" value="">
        </p> 
        <div id="display">'s ball is not in the ball park.</div> 
        <noscript>  
            <div> 
                If you can see this then SCRIPTS are turned OFF on your machine …
Run Code Online (Sandbox Code Playgroud)

html javascript

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

标签 统计

android ×2

html ×2

java ×2

javascript ×2

arrays ×1

css ×1

http ×1

https ×1

jquery ×1

search ×1

spring ×1

spring-roo ×1

string ×1