我的html中有一个文本区域,这有圆角.但是当我在文本区域内单击时,它会在圆角边缘周围显示一个矩形.
下面是我的HTML.
<textarea placeholder="Enter Text Here..." id="usermsg" class="Textareausermsg" onclick="TextAreaToggle()" style="margin: 0px 0px 0px -50px; width: 490px; height: 41px;"></textarea>
Run Code Online (Sandbox Code Playgroud)
这是我的CSS
.Textareausermsg {
border-radius: 15px;
font-size: 15px;
text-align: left;
line-height: 34px;
}
Run Code Online (Sandbox Code Playgroud)
我有两个数组如下:
var product1 = [
{
"Brand": "One Plus"
},
{
"Brand": "One Plus"
}
];
var product2 = [
{
"Brand": "One Plus"
},
{
"Brand": "Apple"
}
];
Run Code Online (Sandbox Code Playgroud)
我想遍历数组并打印以下内容:
you have 2 One Plusyou have 1 One Plus and 1 Apple下面是我试过的代码。
var product1 = [
{
"Brand": "One Plus"
},
{
"Brand": "One Plus"
}
];
var product2 = [
{
"Brand": "One Plus"
},
{
"Brand": "Apple"
}
];
counter1 = …Run Code Online (Sandbox Code Playgroud)我正在编写一个java代码来循环数据,在其中有另一个循环.以下是我的代码.
String names[] = { "user1", "User2", "User3", "User4", "User5" };
for (int i = 0; i < 10; i++) {
for (int j = 0; j < names.length; j++) {
System.out.println(i + " " + names[j]);
}
}
Run Code Online (Sandbox Code Playgroud)
我得到的输出如下,即每个i用户名被打印,但我希望它们在一系列中打印出来,如果i值.请参阅预期的输出以便更好地理解.
当前输出:
0 user1
0 User2
0 User3
0 User4
0 User5
1 user1
1 User2
1 User3
1 User4
1 User5
2 user1
2 User2
2 User3
2 User4
2 User5
3 user1
3 User2
3 …Run Code Online (Sandbox Code Playgroud) 我正在开发一个聊天控制应用程序,我的问题是这样的。
我输入文本,这用于拨打休息电话、获取响应并将其添加到聊天窗口。
目前我的问题是这样的,聊天窗口变大,页面随着聊天框(div)一起滚动。有人可以告诉我如何停止整个页面的这种增量吗?
简单来说,我的要求是聊天窗口将有一个初始高度,X用户提出一个查询,响应被放入聊天窗口,用户询问另一个,同样的事情发生,但页面不应该滚动,而不是聊天窗口(这已经在我的代码中发生)。
下面是我的代码。
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport"
content="width=device-width, initial-scale=1, maximum-scale=1" />
<meta name="description" content="" />
<meta name="author" content="" />
<link rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script
src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script
src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<!--[if IE]>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<![endif]-->
<title>Bootstrap Chat Box Example</title>
<!-- BOOTSTRAP CORE STYLE CSS -->
<link href="assets/css/bootstrap.css" rel="stylesheet" />
<!-- FONT AWESOME CSS -->
<link href="assets/css/font-awesome.css" rel="stylesheet" />
<!-- CUSTOM STYLE CSS -->
<link href="assets/css/style.css" rel="stylesheet" />
<script type="text/javascript" src="assets/js/jquery.min.js"></script>
<script type="text/javascript">
// jQuery Document
$(document).keypress(function(e) …Run Code Online (Sandbox Code Playgroud) 我有下面的代码,用户必须在数组中输入5个值,并打印出相同的代码.
package Arrays;
import java.util.Scanner;
public class Arrays {
public static void main(String[] args) {
final int size=5;
Scanner input = new Scanner(System.in);
System.out.println("Enter the 5 number you want to be stored in an array");
int a[] =new int[size];
for(int i=0;i<a.length;i++){
a[i]=input.nextInt();
}
displayArray(a);
sumOfArray();
productOfArray();
smallAndLargeOfArray();
averageOfArray();
}
private static void displayArray(int arr[]) {
for (int i = 0; i < arr.length; i++) {
System.out.println(arr[i] + ' ');
}
}
}
Run Code Online (Sandbox Code Playgroud)
这是我的意见:
1
2
3
4
5
Run Code Online (Sandbox Code Playgroud)
我得到的输出是:
33 …Run Code Online (Sandbox Code Playgroud) 我有以下Java程序.
public class A{
public static void main(String[] args) {
double C = 500.0;
int init = 0, incr = 0;
while (init < C) {
init = incr + 2;
}
System.out.println(init);
}
}
Run Code Online (Sandbox Code Playgroud)
在这里,当我运行这个程序时,它不会抛出任何错误,也不会显示任何错误.这里当我while完全禁用块时,程序运行并打印值init(0).
在这里,我甚至试图改变System.out.println(init);到System.out.println("Hello");,但仍然没有禁用while即使这不是印刷块.
请让我知道为什么会出现这个问题,以及我的代码中的错误(如果是这样,请让我知道如何修复它)或任何其他帮助.
谢谢,
拉克什
我想检索我正在处理的XML文档的名称,我正在使用下面的Xpath.
<xsl:value-of select="fn:base-uri()"/>
Run Code Online (Sandbox Code Playgroud)
我得到的resule有文档的整个路径,如下所示
file:///C:/Users/home/Desktop/files/document/08192014/Raw.xml
Run Code Online (Sandbox Code Playgroud)
因此,为了获得XML文档的唯一名称,在Altova中,智能显示了一些功能substring-after-last(),我在下面使用它.
<xsl:value-of select="substring-after-last(fn:base-uri(),'/')"/>
Run Code Online (Sandbox Code Playgroud)
当我运行这个时,我得到了一些错误
Unknown function 'substring-after-last'
Warning location: xsl:stylesheet / xsl:template / html / body / section / div
/ xsl:value-of / @select
Details
XPST0017: The function call 'substring-after-last' does not match the
name of a function in the static context
Run Code Online (Sandbox Code Playgroud)
请让我知道如何解决这个问题并获取文件名,同样的错误也被抛出,substring-before-last()以及Altova中给出的一些其他功能.
我使用XSLT 2.0
在线搜索我发现有一个模板创建并调用该模板,我想知道为什么我直接无法使用给定的功能谢谢
我有下面的DAO文件.
package org.DAO;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.ResultSetMetaData;
import java.sql.Statement;
import java.util.ArrayList;
import java.util.List;
import javax.servlet.RequestDispatcher;
import org.bean.UserBean;
import org.code.general.DBConnection;
public class GetDataDAO {
DBConnection dbConnection = new DBConnection();
public List<UserBean> list() throws Exception {
List<UserBean> userBeans = new ArrayList<UserBean>();
try {
Connection conn = dbConnection.conn;
Statement stmt = dbConnection.stmt;
ResultSet rs = dbConnection.rs;
PreparedStatement ps = dbConnection.ps;
String excelPath = dbConnection.excelPath;
String queryString = null;
dbConnection.createClassForName();
conn = DriverManager.getConnection(
"jdbc:odbc:Driver={Microsoft Excel Driver (*.xls)};DBQ=" + …Run Code Online (Sandbox Code Playgroud) 我有一个 json 数组,我想在其中更新某个虚拟键的值。这是我的代码。
var data = [{
"name": "Abc1"
}, {
"name": "Abc1"
}, {
"name": "Abc1"
}, {
"name": "Abc1"
}, {
"name": "Abc1"
}]
var temp = JSON.parse(JSON.stringify(data)).forEach(item => item.name = 'Hi');
console.log(temp);Run Code Online (Sandbox Code Playgroud)
我得到输出,undefined 但我希望所有的name值都是Hi
我哪里错了?
我有一个HTML文件如下
<html>
<head>
<title>Title</title>
<link rel="stylesheet" type="text/css" href="er:#css" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"></meta>
</head>
<body class="text" id="text">
<div class="chapter">
<a id="page1" />
</div>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)
我想,以取代a id与id num和使用下面的代码.
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.URL;
public class Test {
public static void main(String[] args) throws IOException {
String input = "file:///C:/Users/users/file.html";
URL url= new URL(input);
BufferedReader in = new BufferedReader(new InputStreamReader(url.openStream()));
String inputLine;
while ((inputLine = in.readLine()) != null) {
if (inputLine.contains("a id")) {
inputLine.replace("a …Run Code Online (Sandbox Code Playgroud)