当我用jslint验证以下代码时,我得到以下错误.
function displayMegaDropDown() {
"use strict";
var liMegaPosition, divMegaOffset;
liMegaPosition = jQuery(this).position();
divMegaOffset = { top: liMegaPosition.top + jQuery(this).height(), left: liMegaPosition.left };
jQuery(this).find("div").offset(divMegaOffset);
jQuery(this).addClass("hovering");
}
Run Code Online (Sandbox Code Playgroud)
第4行字符29处的问题:严格违规.
Run Code Online (Sandbox Code Playgroud)liMegaPosition = jQuery(this).position();第5行的问题56:严格违规.
Run Code Online (Sandbox Code Playgroud)divMegaOffset = { top: liMegaPosition.top + jQuery(this).height(), left: liM...第6行第12个问题:严格违规.
Run Code Online (Sandbox Code Playgroud)jQuery(this).find("div").offset(divMegaOffset);第8行第12个问题:严格违规.
Run Code Online (Sandbox Code Playgroud)jQuery(this).addClass("hovering");
我猜这是因为使用了jQuery(这个),但我不明白要用什么替换它.请注意,这不是因为jQuery未声明为全局.
我的应用程序使用Spring自动布线来配置bean.我刚刚尝试添加@Transactional,似乎没有调用预期的代理.我希望PersonalController使用事务代理包装的UpdatePublicMapService调用UpdatePublicMapService.
我看到的是PersonalController被实例化两次.它第一次获得代理但第二次获得未代理的目标.我究竟做错了什么?
非常感谢您的帮助.
web.xml中
...
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/applicationContext.xml, /WEB-INF/applicationContext-security.xml</param-value>
</context-param>
...
Run Code Online (Sandbox Code Playgroud)
applicationContext.xml中
...
<tx:annotation-driven transaction-manager="txManager"/>
<bean id="txManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
<property name="dataSource" ref="dataSource"/>
</bean>
...
Run Code Online (Sandbox Code Playgroud)
的applicationContext-security.xml文件
...
<context:component-scan base-package="com.th"/>
<context:component-scan base-package="org.springframework.security.core.userdetails"/>
...
Run Code Online (Sandbox Code Playgroud)
PersonalController
@Controller
@RequestMapping("/personal")
public class PersonalController {
@Autowired
public void setUpdatePublicMapService(UpdatePublicMapService updatePublicMapService) {
this.updatePublicMapService = updatePublicMapService;
}
}
Run Code Online (Sandbox Code Playgroud)
UpdatePublicMapService
@Service
@Transactional
public class UpdatePublicMapService {
...
}
Run Code Online (Sandbox Code Playgroud)
记录片段
13:14:40,268 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating shared instance of singleton bean 'personalController'
13:14:40,268 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating instance of bean 'personalController'
...
13:14:40,293 …Run Code Online (Sandbox Code Playgroud) 我是ElasticSearch的新手,我正在为一个项目进行评估.
在ES中,复制可以是同步或异步.在异步的情况下,只要将文档写入主分片,客户端就会返回成功.然后将文档异步推送到其他副本.
当异步编写时,我们如何确保在完成GET时,即使数据没有传播到所有副本,也会返回数据.因为当我们在ES中执行GET时,查询将转发到相应分片的其中一个副本.如果我们异步写入,主分片可能具有文档,但是用于执行GET的所选副本可能尚未接收/写入文档.在Cassandra中,我们可以在写入和读取时指定一致性级别(ONE,QUORUM,ALL).ES中的读取是否可能?
当我设置我的分支时,我做了:
git svn rebase
git checkout -b branch-a
Run Code Online (Sandbox Code Playgroud)
然后我把那个分支到远程的Git仓库和一个同事和我没有使用它的工作git commit,git pull和git push.
现在,我想从subversion中获取所有新的更改,所以我做了:
git checkout master
git svn rebase
git checkout branch-a
git rebase master
Run Code Online (Sandbox Code Playgroud)
此时我很困惑.似乎发生的事情是git会在一次或多次冲突中提交并迫使我解决它们.然而,冲突似乎是git让HEAD指向树的尖端(使用最新的代码),然后尝试逐个应用每个更改,就好像它将它们应用于原始分支点一样.
感觉就像我重新编写所有代码一样,大部分解决方案都是保留HEAD块并摆脱提交块.
我的期望是git rebase master命令将在分支之前的提交处开始,从master添加每个提交,然后在分支上添加每个提交.然后,这将在分支上产生与尖端之前几乎相同的尖端.
那么,任何人都可以解释我无法理解的内容.如果做不到这一点,任何人都可以建议如何找出为什么git决定这样做.我会在寻找什么git log,看看它为什么这样做.
编辑:2012-03-06
进一步的研究表明,我们似乎在我们的分支和分支结构中有多个提交的多个副本,git log --graph当我们认为只有一个时,从中显示多个分支.
一个片段(鉴定去除细节和提交信息已被替换为MESSAGE- Ñ MESSAGE-.Ñ是指相同的消息):
| * | commit f5c48df66ed9d733364562d8f125866aa6483c1e
| | | Author: commiter-b
| | | Date: Mon Feb 27 16:18:05 2012 -0800
| | |
| | …Run Code Online (Sandbox Code Playgroud) git ×1
git-rebase ×1
git-svn ×1
java ×1
javascript ×1
jquery ×1
jslint ×1
nosql ×1
spring ×1
use-strict ×1