我一次提交2447个文件时完全陷入了SVN错误.我在Windows 7 64位上使用TortoiseSVN(最新版本).
事实上,一些文件是在Mac上创建的,而其他文件是在PC上创建的,因此TortoiseSVN会因为恼人的Inconsistent line ending style错误而停止提交.
在开始时,为了解决这个问题,我在netbeans中手动打开了被控制的文件,添加了一个空格,删除了它并保存了文件,因此Netbeans正确地转换了所有行结束字符,但似乎不仅仅是"某些文件"被控制了.
当然,我在网上搜索了一个解决方案,但我还没有发现任何适合Windows的环境.
我现在正撞在墙上.
我正在使用spring-security-javaconfig库来实现Spring安全性.如果我使用xml配置文件,我会使用类似这样的内容来定义自定义访问被拒绝页面:
<http auto-config="true">
<intercept-url pattern="/admin*" access="ROLE_ADMIN" />
<access-denied-handler ref="accessDeniedHandler"/>
</http>
Run Code Online (Sandbox Code Playgroud)
到目前为止,这是我的安全配置类:
@Configuration
@EnableWebSecurity
public class SecurityConfigurator extends WebSecurityConfigurerAdapter {
@Override
protected void registerAuthentication(AuthenticationManagerBuilder auth)
throws Exception {
auth.inMemoryAuthentication().withUser("user").password("password").roles("USER");
auth.inMemoryAuthentication().withUser("admin").password("password").roles("ADMIN");
}
@Override
protected void configure(HttpSecurity http) throws Exception {
http.authorizeUrls().antMatchers( "/admin").hasRole("ADMIN");
}
}
Run Code Online (Sandbox Code Playgroud) 我正在尝试让特定的表单字段在iPhone上的Safari浏览器中自动获得焦点.我认为这将是非常简单的,但我不能让这个工作.那么,这实际上是不可能的还是我错过了一些非常明显的东西(我怀疑)?这是我正在使用的代码:
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript">
function formfocus() {
document.getElementById('element').focus();
}
window.onload = formfocus;
</script>
</head>
<body>
<form>
<input/>
<input id="element" autofocus/>
<input/>
</form>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)
您可以看到我试图获得焦点两次,一次通过js,一次通过输入字段上的HTML"aufofocus"属性.这个伎俩也没有.这适用于桌面浏览器,但是当我在iPhone 4上打开页面时,没有骰子,也就是说,我必须通过单击其中一个表单字段手动设置焦点.
最终我想要的是在移动浏览器上打开网站,并专注于表单字段,包括打开键盘以开始输入.
谢谢你的帮助!
Eclipse Luna 4.4.0
构建期间发生错误
Error instantiating builder 'ord.eclipse.m2e.core.maven2Builder'.
Plug-in org.eclipse.m2e.core was unable to load class org.eclipse.m2e.core.internal.builder.MavenBuilder
An error occurred while automatically activating bundle org.eclipse.m2e.core (547).
Plug-in org.eclipse.m2e.core was unable to load class org.eclipse.m2e.core.internal.builder.MavenBuilder.
An error occurred while automatically activating bundle org.eclipse.m2e.core (547).
Error instantiating builder 'org.eclipse.m2e.core.maven2Builder'.
Plug-in org.eclipse.m2e.core was unable to load class org.eclipse.m2e.core.internal.builder.MavenBuilder.
An error occurred while automatically activating bundle org.eclipse.m23.core (547).
Plug-in org.eclipse.m2e.core was unable to load class org.eclipse.m2e.core.internal.builder.MavenBuilder.
an error occurred while automatically activating bundle org.eclipse.m2e.core (547). …Run Code Online (Sandbox Code Playgroud) 我想使用Spring属性占位符填充bean列表属性.
<bean name="XXX" class="XX.YY.Z">
<property name="urlList">
<value>${prop.list}</value>
</property>
</bean>
Run Code Online (Sandbox Code Playgroud)
prop.list.one=foo
prop.list.two=bar
Run Code Online (Sandbox Code Playgroud)
任何帮助将非常感激
我在ubuntu上安装cloudstack,它使用maven来解决它的依赖关系.运行命令时出现以下错误mvn -P deps
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project org.apache.cloudstack:cloudstack:4.2.0 (/home/cloud/apache-cloudstack-4.2.0-src/pom.xml) has 1 error
[ERROR] Non-resolvable parent POM: Could not transfer artifact org.apache:apache:pom:11 from/to central (http://repo.maven.apache.org/maven2): repo.maven.apache.org: Name or service not known and 'parent.relativePath' points at wrong local POM @ line 14, column 11: Unknown host repo.maven.apache.org: Name or service not known -> [Help 2]
[ERROR]
Run Code Online (Sandbox Code Playgroud)
我已经搜索了错误并在pom.xml中尝试了一些更改,但我没有得到解决方案.我不知道导致错误的是什么.
任何建议或最轻微的帮助都将得到承认.谢谢.
这是我的配置:
<appender name="myAppender" class="ch.qos.logback.core.rolling.RollingFileAppender">
<append>true</append>
<file>mylogs.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<!-- daily rollover -->
<fileNamePattern>mylogs-%d{yyyy-MM-dd_HH-mm}.log</fileNamePattern>
<!-- keep 30 days' worth of history -->
<maxHistory>30</maxHistory>
</rollingPolicy>
<encoder>
<pattern>%d{HH:mm:ss.SSS} %-5level %logger{36} [%thread] - %M:%L - %msg%n</pattern>
</encoder>
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
<level>INFO</level>
</filter>
</appender>
Run Code Online (Sandbox Code Playgroud)
根据此处找到的logback文档(http://logback.qos.ch/manual/appenders.html#TimeBasedRollingPolicy),文件将根据我的%d{yyyy-MM-dd_HH-mm}fileNamePattern 每分钟翻转一次.
我观察了它是如何工作的,这是我的发现:
我错过了什么,我以为它会每分钟创建一个日志文件?
我需要更新Oracle数据库中的现有约束以在那里添加新列.
ALTER TABLE MY_PARTNER_DETAILS
MODIFY CONSTRAINT UQ_MY_PARTNER_DETAILS
UNIQUE(PARTNER_CODE,PGOOD_CODE,SITE_CODE,PARTNER_PLACEMENT,PARTNER_PARTICIPATION)
Run Code Online (Sandbox Code Playgroud)
给出错误:
Error at line 1
ORA-00933: SQL command not properly ended
Run Code Online (Sandbox Code Playgroud)
有什么问题?
我正在尝试使用JSCH库版本0.1.49连接到SFTP远程服务器.每次运行程序时,都会收到以下错误:
Initializing...
Connection to SFTP server is successfully
com.jcraft.jsch.JSchException: Unable to connect to SFTP server.com.jcraft.jsch.JSchException: failed to send channel request
at shell.MainClass.JschConnect(MainClass.java:95)
at shell.MainClass.main(MainClass.java:30)
Run Code Online (Sandbox Code Playgroud)
第30行是:sftpChannel.connect()从下面的代码:
System.out.println("Initializing...");
JSch jsch = new JSch();
Session session = null;
try {
session = jsch.getSession(ProjectConstants.rmUsername,ProjectConstants.rmHost, 22);
session.setPassword(ProjectConstants.rmPassword);
java.util.Properties config = new java.util.Properties();
config.put("StrictHostKeyChecking", "no");
session.setConfig(config);
session.connect();
if (session.isConnected() == true) {
System.out.println("Connection to SFTP server is successfully");
}
ChannelSftp sftpChannel = (ChannelSftp) session.openChannel("sftp");
try {
sftpChannel.connect();
} catch (Exception e) {
throw new …Run Code Online (Sandbox Code Playgroud) 我的页面中有一个对话框,其中包含一个输入字段(日期,日历).问题是打开对话框后日历会立即打开,因为焦点是在第一个输入上设置的.
有没有办法在Primefaces中禁用焦点?