我想使用maven-resources-plugin将资源复制到另一个目录.
我的资源目录具有以下结构:
log4j.xml
xml
|_ resource-1
|_ resource-n
Run Code Online (Sandbox Code Playgroud)
我想只将log4.xml复制到输出目录.这是我的插件代码:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>2.6</version>
<configuration>
<outputDirectory>${glassfish.conf}</outputDirectory>
<resources>
<resource>
<directory>${conf.location}</directory>
<includes>
<include>**/log4j.xml</include>
</includes>
<excludes>
<exclude>**/xml/*</exclude>
</excludes>
</resource>
</resources>
</configuration>
<executions>
<execution>
<id>copy-log4j-to-glassfish</id>
<phase>package</phase>
<goals>
<goal>copy-resources</goal>
</goals>
</execution>
</executions>
</plugin>
Run Code Online (Sandbox Code Playgroud)
但是所有都被复制到输出目录(log4j.xml和xml目录).
我试过了
<resource>
<directory>${conf.location}</directory>
<excludes>
<exclude>**/xml/*</exclude>
</excludes>
</resource>
Run Code Online (Sandbox Code Playgroud)
要么
<resource>
<directory>${conf.location}</directory>
<includes>
<include>**/log4j.xml</include>
</includes>
</resource>
Run Code Online (Sandbox Code Playgroud)
甚至
<resource>
<directory>${conf.location}</directory>
<excludes>
<exclude>**/*</exclude>
</excludes>
</resource>
Run Code Online (Sandbox Code Playgroud)
但目录的所有内容都包含在内......问题是什么?
谢谢
我做一个动态表格,如果我删除一行,那么循环结果就是NaN我想要的删除元素,当我删除元素时,其0值不通过NaN。就像我删除1 = 5时显示的第5个元素NaN。如何清除此错误,取而代之的是0,总和为零,我该怎么办?
$("body").on('change', '.quantity', function() {
var that = $(this);
if ($('#itemcounter').val()==""){
$('#itemscounter').val("1");
var counter=$('#itemscounter').val();
var quantity=$('#quantity').val();
var unitprice=$('#unitprice').val();
var linetotal=quantity*unitprice;
that.parent().find('.linetotal').val(linetotal)
$("#invoicetotalamount").val(+linetotal)
var discount=document.getElementById('discount').value ;
var discountamount= discount/100 * linetotal;
var amount=linetotal-discountamount;
$("#balanceamount").val(+amount);
} else {
var counter=$('#itemscounter').val();
var quantity=$('#quantity').val();
var unitprice=$('#unitprice').val();
var linetotal=quantity*unitprice;
$('#linetotal').val(+linetotal);
var sum=linetotal;
for (i = 2; i <=counter; i++) {
var quantity=parseFloat($('#quantity' + i).val());
var unitprice=parseFloat($('#unitprice' + i).val());
var linetotal=quantity*unitprice;
$('#linetotal' + i).val(+linetotal);
alert(sum);
sum=+sum +(+(linetotal));
} …Run Code Online (Sandbox Code Playgroud) mouseenter如果语句$("."+ElementID+"-delta-ui-dropdown-appendHere").attr('style') == 'display: block;'){为false ,我有一个从元素中删除类的事件.
它完美地工作,直到我添加了一个通过调整浏览器大小触发的事件.最初加载时,mouseenter事件工作正常,但是当我调整浏览器大小时,mouseenter即使条件为真,事件也会删除该类.
如果我删除$(window).resize代码,该mouseenter事件将再次起作用.
//this is the code triggered
var getWidth = $("."+ElementID+"-delta-ui-dropdown-appendHere").outerWidth();
$(window).resize(function() {
// This will execute whenever the window is resized
if ($(window).width() >= 992) {
console.log('original');
$(".delta-ui-dropdown-common-"+ElementID+"").css({width:getWidth});
} else {
var inputGroupWidth = $(".delta-ui-dropdown-"+ElementID+"").width();
$(".delta-ui-dropdown-common-"+ElementID+"").css({width:inputGroupWidth});
console.log('fit');
}
});
//this code removes the class even though the condition is true
$('.delta-ui-dropdown-icon-'+ElementID).mouseenter(function() {
if ($("."+ElementID+"-delta-ui-dropdown-appendHere").attr('style') == 'display: block;') {
} else {
$('.delta-ui-dropdown-icon-'+ElementID).removeClass('focus');
} …Run Code Online (Sandbox Code Playgroud) 这似乎是很长的做事方式,是否可以动态地为ids分配数字?
$(function () {
$('#Button1').click(function(){
$('#RegularExpressionValidator1, #RegularExpressionValidator2, #RequiredFieldValidator1, #RequiredFieldValidator2, #RequiredFieldValidator3, #RequiredFieldValidator4, #RequiredFieldValidator5, #RequiredFieldValidator6, #RequiredFieldValidator7, #RequiredFieldValidator8, #RequiredFieldValidator9').css("display", "block");
});
});
Run Code Online (Sandbox Code Playgroud)
这些是.NET生成的ID,我无权访问.
在悬停时,样式不会将显示更改为阻止.我将不胜感激任何评论.
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta charset="UTF-8">
<title>CSS Selectors</title>
<style>
div ul li:hover> ul {
display:block;
}
</style>
</head>
<body>
<div id="container">
<ul>
<li> List Item
<ul style="display:none;">
<li> Child </li>
</ul>
</li>
<li> List Item </li>
<li> List Item </li>
<li> List Item </li>
</ul>
</div>
</body>
</html>
Run Code Online (Sandbox Code Playgroud) 我正在使用一个非常简单的代码在滚动上制作一个粘性元素.
我想制作.top sticky,它包裹在.wrap中.当我向下滚动时,我想设置与包裹相关的.top的位置(这样它从左边开始:0与.wrap相关,与身体无关.我想把它保留在.wrap中.我怎么能这样做?谢谢.
jQuery的:
var top = $('.top').offset().top;
$(window).scroll(function (event) {
var y = $(this).scrollTop();
if (y >= top){
$('.top').addClass('sticky');
}
else{
$('.top').removeClass('sticky');
}
});
Run Code Online (Sandbox Code Playgroud)
CSS:
.wrap{
width: 300px;
border: 1px solid green;
margin: 0 auto;
height: 1000px;
}
.top{
background: green;
height: 100px;
}
.sticky{
position: fixed;
top: 0;
left: 0;
width: 100%;
}
Run Code Online (Sandbox Code Playgroud)
将Perl 5.8.8移至Perl 5.18.2时的优势和特点是什么?
注意:1.我需要perl 5.8.8的优点和缺点2.我需要perl 5.18.2的优点和缺点
for (String userName : studentEnrollments.keySet()) {
System.out.println("Student: " + userName);
ArrayList<String> courses = studentEnrollments.get(userName);
String courseMessage = "Courses: ";
for (String singleCourse : courses) {
courseMessage += singleCourse + ", ";
System.out.println(courseMessage);
}
}
Run Code Online (Sandbox Code Playgroud)
在for循环之后,它会打印出学生正在学习的每门课程.使用逗号打印字符串的正确方法是什么,最后没有最后一个逗号?
例如:AC130,AC140,AC150,AC130,AC140,AC150
namespace MyProgram
{
public class ParentClass
{
}
public class childClass : ParentClass
{
public int Normal()
{
return 1;
}
}
}
Run Code Online (Sandbox Code Playgroud)
别的地方:
ParentClass parentc = new ParentClass();
parentc.Normal(); //<-- I can't call the function normal!
Run Code Online (Sandbox Code Playgroud)
我需要帮助才能使用它.