尝试获取全尺寸背景图像:
html {
height: 100%;
background:url('../img/bg.jpg') no-repeat center center fixed;
background-size: cover;
}
Run Code Online (Sandbox Code Playgroud)
它显示的背景图像具有正确的宽度,但高度被拉伸.我试过各种各样的选择
html {
background:url('../img/bg.jpg') no-repeat center center fixed;
background-size: 100% auto;
-webkit-background-size: 100% auto;
-moz-background-size: 100% auto;
-o-background-size: 100% auto;
Run Code Online (Sandbox Code Playgroud)
}
去除 height: 100%
但他们都没有工作.
我unique对列有一个约束.当这段代码运行时,我从框架中获取错误日志,但它不是我在Exception块中给出的.
如果存在唯一列,那么我想查询其主键并将其设置为$id并返回到页面.现在它正在停止db错误而不是进入Catch block.
这是我的代码:
try {
$result = $this->db->insert('email', $new_email);
if ($result)
{
$id = $this->db->insert_id();
} else {
throw new Exception("$$$$$$$$$$$$$Log database error");
}
} catch (Exception $e) {
log_message('error',$e->getMessage());
return;
}
Run Code Online (Sandbox Code Playgroud)
**Error Messages** 我从框架得到:
DEBUG - 2013-04-07 05:00:38 --> DB Transaction Failure
ERROR - 2013-04-07 05:00:38 --> Query error: Duplicate entry
Run Code Online (Sandbox Code Playgroud)
我不知道它有什么问题.
如何在Java中运行时添加camel路由?我找到了一个Grails示例,但我已经用Java实现了它.
我的applicationContext.xml已经有一些预定义的静态路由,我想在运行时添加一些动态路由.可能吗?因为包含动态路由的唯一方法是编写route.xml然后将路由定义加载到上下文.它将如何在现有的静态路由上运行? 在运行时路由
我有两个封装定义,不能适合一个定义.
这两个定义如何讨论相同的概念?
我工作的CodeIgniter站点在MediaTemple上托管它时会出现500内部服务器错误.它发生在jQuery Ajax调用期间.
我不知道会出现什么问题.来自控制器或型号的错误?我的Ajax电话:
$.ajax({
url: "<?php echo site_url('invites/save_email') ?>",
type: 'POST',
data: form_data,
success: function(msg) {
window.location.href = "<?php echo site_url('invites/moreinvites')?>"
return true;
},
error: function (xhr, ajaxOptions, thrownError) {
alert(xhr.status);
alert(thrownError);
alert(xhr.responseText);
}
});
Run Code Online (Sandbox Code Playgroud)
xhr.responseText已经归还了我<p>The action you have requested is not allowed.</p>.但是,这是什么意思?
我想使用注释指定以下hbm配置:
<id name="somePK" column=""somePK"" type="long">
<generator class="com.db.hibernate.KeyGenerator"/>
</id>
Run Code Online (Sandbox Code Playgroud)
我不知道如何提供类名
@GeneratedValue(strategy=GenerationType.SEQUENCE, generator="SEQ_STORE")
Run Code Online (Sandbox Code Playgroud)
我是否必须@javax.persistence.SequenceGenerator在每个实体类中指定?
我可以只在@GeneratedValue注释下指定类名吗?
我无法使用LDAP对用户进行身份验证.我有以下细节:
URL=ldap://10.10.10.10:389
LDAP BASE:DC=lab2,DC=ins
LDAP Bind Account: CN=Ldap Bind,OU=Service Accounts,OU=TECH,DC=lab2,DC=ins
LDAP Bind Account Pw: secret
Run Code Online (Sandbox Code Playgroud)
我可以sAMAccountName使用上面的详细信息搜索值,但是如何使用用户名和密码验证用户?
如果您按照我之前的问题进行操作,那么您将了解到,我已成功连接到LDAP服务器但无法对其进行身份验证.
用户进行身份验证:
user: someusername
password: somepwd
Run Code Online (Sandbox Code Playgroud)
我无法连接到LDAP服务器,'somepwd'我应该如何使用someusername.我能够搜索给定的用户sAMAccountName.
我试图在Eclipse Juno中运行Visual Plugin.Visual VM使用说明令人困惑.在Tomcat服务器上运行我的应用程序,我不知道如何将它指向Visual VM.
使用说明:
如何为在Tomcat上运行的应用程序选择Visual VM Launcher?
这似乎是一个常见问题.我已经完成了SO中给出的所有答案,但无法使其发挥作用.
我正在尝试将Spring MVC + Freemarker集成到现有的Web应用程序中.它适用于GET请求,Freemarker Template读取Controller提供的java对象,没有任何问题.
但表单提交无法触及Controller方法.最后我让log4j工作了.这是我得到的错误:
错误
HandlerMethod details:
Controller [application.entry.controller.UserController]
Method [public void application.entry.controller.UserController.handleSave(java.lang.String)]
org.springframework.web.bind.MissingServletRequestParameterException:
Required String parameter 'action' is not present
Run Code Online (Sandbox Code Playgroud)
Freemarker的:
<form method="POST" action="save.html">
------------
<input type="submit" class="btnnew" name="saveWithoutValidation" value="Save Without Validation"></input>
<input type="submit" class="btnnew" name="submit" value="Submit"></input>
</form>
Run Code Online (Sandbox Code Playgroud)
context-root是PORTAL.
为spring-servlet.xml
<bean id="viewResolver" class="org.springframework.web.servlet.view.freemarker.FreeMarkerViewResolver">
<property name="cache" value="true"/>
<property name="prefix" value=""/>
<property name="suffix" value=".ftl"/>
Run Code Online (Sandbox Code Playgroud)
web.xml中
<servlet>
<servlet-name>spring</servlet-name>
<servlet-class>
org.springframework.web.servlet.DispatcherServlet
</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>spring</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
Run Code Online (Sandbox Code Playgroud)
调节器
@RequestMapping(value="/save", method=RequestMethod.POST)
public void handleSave(@RequestParam …Run Code Online (Sandbox Code Playgroud) 我收到一个简单的 JSON 请求值列表,我想将其保存为逗号分隔值。尝试使用以下,但没有奏效。
@Column(nullable = true)
@GeneratedValue(strategy = GenerationType.AUTO)
private ArrayList<String> services = new ArrayList<String>() ;
Run Code Online (Sandbox Code Playgroud)
和
@Column(nullable = true)
@ElementCollection(targetClass = String.class)
private List<String> services = new ArrayList<String>() ;
Run Code Online (Sandbox Code Playgroud)
@ElementCollection抛出异常说table services does not exist。
java ×5
spring ×3
hibernate ×2
jpa ×2
ajax ×1
apache-camel ×1
codeigniter ×1
css ×1
css3 ×1
eclipse ×1
jquery ×1
ldap ×1
oop ×1
php ×1
spring-ldap ×1
spring-mvc ×1
visualvm ×1