我有一个新的Fedora 12服务器,我正在尝试设置Mercurial.我有很多变化yum install,大多数事情似乎都很好.但是,在通过apache设置hgwebdir.cgi之后,我无法对hg push当前正在托管的唯一repo 执行操作.我得到的错误是:
searching for changes
abort: HTTP Error 500: Permission denied: .hg/store/lock
Run Code Online (Sandbox Code Playgroud)
httpd作为用户apache运行
UID PID PPID C STIME TTY TIME CMD
root 1691 1 0 13:19 ? 00:00:00 /usr/sbin/httpd
apache 1694 1691 0 13:19 ? 00:00:00 /usr/sbin/httpd
apache 1695 1691 0 13:19 ? 00:00:00 /usr/sbin/httpd
apache 1696 1691 0 13:19 ? 00:00:00 /usr/sbin/httpd
apache 1697 1691 0 13:19 ? 00:00:00 /usr/sbin/httpd
apache 1698 1691 0 13:19 ? 00:00:00 /usr/sbin/httpd
apache 1699 1691 0 …Run Code Online (Sandbox Code Playgroud) 我如何"说"SPARQL?churchname是UTF-8格式?因为回应如下:Pražskýhrad
PREFIX lgv: <http://linkedgeodata.org/vocabulary#>
PREFIX abc: <http://dbpedia.org/class/yago/>
SELECT ?churchname
WHERE
{
<http://dbpedia.org/resource/Prague> geo:geometry ?gm .
?church a lgv:castle .
?church geo:geometry ?churchgeo .
?church lgv:name ?churchname .
FILTER ( bif:st_intersects (?churchgeo,?gm, 10))
}
GROUP BY ?churchname
ORDER BY ?churchname
我目前的ldap身份验证上下文设置如下:
<ldap-server url="ldap://host/dn"
manager-dn="cn=someuser"
manager-password="somepass" />
<authentication-manager>
<ldap-authentication-provider user-search-filter="(samaccountname={0})"/>
</authentication-manager>
Run Code Online (Sandbox Code Playgroud)
现在,我需要能够设置自定义权限映射器(它使用不同的ldap服务器) - 所以我假设我需要设置类似于(http://static.springsource.org/spring的 ldap-server)-security/site/docs/2.0.x/reference/ldap.html):
<bean id="ldapAuthProvider"
class="org.springframework.security.providers.ldap.LdapAuthenticationProvider">
<constructor-arg>
<bean class="org.springframework.security.providers.ldap.authenticator.BindAuthenticator">
<constructor-arg ref="contextSource"/>
<property name="userDnPatterns">
<list><value>uid={0},ou=people</value></list>
</property>
</bean>
</constructor-arg>
<constructor-arg>
<bean class="org.springframework.security.ldap.populator.DefaultLdapAuthoritiesPopulator">
<constructor-arg ref="contextSource"/>
<constructor-arg value="ou=groups"/>
<property name="groupRoleAttribute" value="ou"/>
</bean>
</constructor-arg>
</bean>
Run Code Online (Sandbox Code Playgroud)
但是,如何在安全上下文中将"ldapAuthProvider"引用到ldap-server?
我也使用spring-security 3,所以''不存在......
我试图根据这篇文章用git设置hudson ,但是在构建过程中我仍然会遇到git错误:
FATAL: Could not apply tag-PROJECTNAME-ID
...
Caused by: hudson.plugins.git.GitException: Command returned status code 128:
*** Please tell me who you are.
Run Code Online (Sandbox Code Playgroud)
running:git config --global user.name显示有效数据,.gitconfig 可访问.
如何纠正这些错误?
我想比较两个文件,看看它们在我的shell脚本中是否相同,我的方法是:
diff_output=`diff ${dest_file} ${source_file}`
if [ some_other_condition -o ${diff_output} -o some_other_condition2 ]
then
....
fi
Run Code Online (Sandbox Code Playgroud)
基本上,如果它们是相同的$ {diff_output}应该什么都不包含,上面的测试将评估为true.
但是当我运行我的脚本时,它会说
[:太多的论点
在if [....]行.
有任何想法吗?
假设我们有一个网站使用Web服务来实现其所有功能(即从/向数据库检索和更新数据),Web服务如何验证请求?
据我了解,在传统的java"网站"中,用户提供用户名和密码,并在验证时将jsessionid分配给用户(客户端浏览器).每次客户端浏览器向网站询问某些内容时,该站点都会检查jsessionid,以确保用户已注册并进行身份验证.是否有与此相当的Web服务?如果有,那是什么?
如何改善/加速这种频繁的功能?
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#define M 10 // This is fixed
#define N 8 // This is NOT fixed
// Assumptions: 1. x, a, b and c are all arrays of 10 (M).
// 2. y and z are all matrices of 8 x 10 (N x M).
// Requirement: 1. return the value of ret;
// 2. get all elements of array c
float fnFrequentFunction(const float* x, const float* const* y, const float* const* …Run Code Online (Sandbox Code Playgroud) 像这样的东西.
http://code.google.com/p/squiggle-sql/wiki/Tutorial.
对于需要从UI的用户输入构建复杂sql的情况,这是必需的.目前在我正在使用的项目中正在使用String Manipulation,它看起来很难看并且难以维护.
如何从数据库中的值创建图像图?这个想法来自"Steam",它使用图表来显示有多少用户在线.我怎么能做同样的事情?看起来这个图是一个完整的图像; 不是由零件组成的.这是Steam图表的图片:
alt text http://d-load.org/public/steam-graph.PNG
我一直在网上搜索无济于事.有没有人知道如何访问按钮框中的按钮(使用"带右按钮的对话框"模板创建)?