我正在尝试配置NTLM身份验证,但收到错误:
cvc-complex-type.2.4.c:匹配的通配符是strict,但是没有为元素'http'找到声明.
我读了很多类似错误的主题,但我找不到解决问题的方法.
导致错误的security.xml文件是:
<beans:beans xmlns="http://www.springframework.org/schema/security"
xmlns:beans="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/security
http://www.springframework.org/schema/security/spring-security.xsd" >
<http access-denied-page="forms/error403.jsp" entry-point-ref="ntlmEntryPoint" servlet-api-provision="false">
<intercept-url pattern="forms/error403.jsp" filters="none"/>
<intercept-url pattern="forms/**" access="ROLE_GUEST,ROLE_OPERATOR,ROLE_ADMIN" />
<custom-filter position="PRE_AUTH_FILTER"/>
</http>
<authentication-manager alias="mainAuthenticationManager"/>
<authentication-provider user-service-ref='userDetailsService' />
<beans:bean id="userDetailsService"
class="service.UserInfoService">
<beans:property name="dataSource" ref="dataSource" />
<beans:property name="usersByUsernameQuery" value="select distinct name, ' ' as password, 1 as enabled from TMP_SPRING_USERS where name=?" />
<beans:property name="authoritiesByUsernameQuery" value="select name, role from TMP_SPRING_USERS where name=?" />
</beans:bean>
<beans:bean id="ntlmEntryPoint"
class="org.springframework.security.ui.ntlm.NtlmProcessingFilterEntryPoint">
<beans:property name="authenticationFailureUrl" value="forms/error403.html" />
</beans:bean>
<beans:bean id="exceptionTranslationFilter"
class="org.springframework.security.ui.ExceptionTranslationFilter">
<beans:property name="authenticationEntryPoint" …Run Code Online (Sandbox Code Playgroud) 我知道我需要使用«mod_aspdotnet»,但我找不到ASP.NET 4.0的这个模块:仅适用于2.0.
请帮我.
根据如何在使用NPOI创建的Excel文档中将列设置为"自动调整大小"?我这样做了:
foreach (DataColumn column in dataTable.Columns)
{
int rowIndex = 0;
foreach (DataRow row in dataTable.Rows)
{
HSSFRow dataRow = sheet.CreateRow(rowIndex);
dataRow.CreateCell(column.Ordinal).SetCellValue(row[column].ToString());
rowIndex++;
}
sheet.AutoSizeColumn(column.Ordinal);
}
Run Code Online (Sandbox Code Playgroud)
但它不起作用.怎么做对吗?
"活动"是一个有点领域.如果其中一个具有此client_id的行的值为true,则需要将其设置为true
SELECT c.client_id, u.branch_id, a.account_id, activity
FROM Clients c INNER JOIN
accounts a ON c.id=a.client_id INNER JOIN uso u ON a.uso_id = u.uso_id,
(SELECT MAX(CONVERT(int,accounts.activity)) as activity, client_id
FROM accounts GROUP BY client_id) activ
WHERE activ.client_id = c.id
Run Code Online (Sandbox Code Playgroud)
此查询执行大约2分钟.请帮我优化一下.
我需要从服务器迭代本地机器上的文件夹来解析一些文件.这是真的吗?如果这是真的,请告诉我如何做到这一点.
我将过滤器应用于Dataview,之后我需要获取过滤后的数据.在过滤之前我做了:
dvUnloadOpenAccounts.RowFilter = "uso_id = '30640'";
foreach (DataRow row in dvUnloadOpenAccounts.Table.Rows)
{
HSSFRow dataRow = sheet.CreateRow(rowIndex);
foreach (DataColumn column in dvUnloadOpenAccounts.Table.Columns)
{
dataRow.CreateCell(column.Ordinal).SetCellValue(row[column].ToString());
}
rowIndex++;
}
Run Code Online (Sandbox Code Playgroud)
所以我需要对过滤后的数据做同样的事情.
我有一个按日期(按天)分区的表和字段上的本地索引(包括日期字段).如果我查询:
SELECT*FROM table t WHERE t.fdate = '30 .06.2011'
它很快实现了,但是当我做的时候
SELECT*FROM table t WHERE EXTRACT(来自t.fdate的月份)= 6 AND EXTRACT(来自t.fdate的年份)= 2011
它完成大约200秒.
如何优化此查询?可能我需要在EXTRACT(从日期开始的月份)和EXTRACT(从日期开始)创建本地索引?