本周一直在学习bash并陷入困境.
#!/bin/sh
if [ false ]; then
echo "True"
else
echo "False"
fi
Run Code Online (Sandbox Code Playgroud)
这将始终输出True,即使条件似乎表示不是这样.如果我删除括号[]然后它工作,但我不明白为什么.
我不知道我能做些什么才能导致这种情况因为我花在编程上的时间已经延长了,而且我已经忘记了我可能做过的事情.但现在当我加载Eclipse时,它说:
The errors below were detected when validating the file "web-app_2_5.xsd" via the file "web.xml". In most cases these errors can be detected by validating "web-app_2_5.xsd" directly. However it is possible that errors will only occur when web-app_2_5.xsd is validated in the context of web.xml.
s4s-elt-character: Non-whitespace characters are not allowed in schema elements other than 'xs:appinfo' and 'xs:documentation'. Saw 'JDK 6 XML-related APIs'.
The entity name must immediately follow the '&' in the entity reference.
Run Code Online (Sandbox Code Playgroud)
我的前几行web.xml看起来就像这样.
<?xml version="1.0" encoding="UTF-8"?> …Run Code Online (Sandbox Code Playgroud) 我有一个自定义日期选择器弹出窗口有时无法在IE中工作.它适用于Chrome和Edge.
代码看起来像这样:
<frameset>
<frame>Buttons for next/prev month/year</frame>
<frame>This is the actual calendar that gets redrawn when the above buttons are used
<a href="javascript:parent.opener.setDate(1);">1</a> //there's a different anchor tag for each day of the month
</frame>
<frameset>
Run Code Online (Sandbox Code Playgroud)
所以这里有点奇怪.我们有两个网络,称之为新旧.旧的可能有很多无证的全球政策变化,新的可能接近政府标准.这适用于旧网络上的任何浏览器,但不适用于新网络上的IE(11).它适用于Edge.此外,如果顶部框架按钮用于选择下一个/上个月,或仅选择"今天"按钮,则所有底部框架锚定链接都能正常工作.没有控制台错误/警告,网络监视器中没有任何内容显示请求返回错误代码,点击只是不注册.我在customFunction()中放置一个断点,当链接不起作用时它不会中断,但是如果链接可以工作,它将会中断.
唯一对我来说很奇怪的是整个弹出窗口的代码看起来像:
str = "<frameset><frame name='topFrame' " +
"src='javascript:parent.opener.drawTop'></frame><frame name='bottomFrame' "+
"src='javascript:parent.opener.drawBottom'><frame</frameset>"
document.write(str);
Run Code Online (Sandbox Code Playgroud)
我确实想检查一下,当使用prev/next/etc按钮时重绘底部框架的代码与第一次加载时调用的函数相同.
然而,看起来奇怪的是,在第一次加载时,DOM检查器显示所有内容(顶部框架,底部框架包括每月每天的所有单独数字等),但调试器(F12工具)不显示用document.write(str)加载的代码; 线.为了能够看到该代码并设置断点,我必须使用prev/next按钮,然后在Debugger中显示另一个.html文件,该文件具有与DOM匹配的构造HTML.
我得到了一些奇怪的错误,似乎是因为缺少了库,但我无法弄清楚它丢失的地方,因为我看到的所有指南似乎都没有包括我遗漏的任何东西.我已经包含了AspectJ jar,我正在使用IntelliJ编译ajc.
Error:ajc: can't determine annotations of missing type javax.cache.annotation.CacheRemove
when weaving type com.webbilly.dao.hibernate.GenericDAO
when weaving classes
when weaving
when batch building BuildConfig[null] #Files=10 AopXmls=#0
[Xlint:cantFindType]
Run Code Online (Sandbox Code Playgroud)
这里它指定了javax.cache.annotation.CacheRemove,但是还有其他文件缺失,我试图用java2s中的包进行创可贴,但它仍然缺少这个.
我有以下 xml 摘录,我想要的只是版本标记中的字符串 2014.4.0.0008。
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ExternalMetadataPack xmlns="xmlns://www.fortifysoftware.com/schema/externalMetadata" schemaVersion="1.0">
<PackInfo>
<Name>Main External List Mappings</Name>
<PackID>main-external-mappings</PackID>
<Version>2014.4.0.0008</Version>
</PackInfo>
</ExternalMetadataPack>
Run Code Online (Sandbox Code Playgroud)
我尝试了一些事情并得到了这样的结果:
xmllint --xpath "//PackInfo/@Version[local-name()='ExternalMetadataPack']" externalmetadata.xml
Run Code Online (Sandbox Code Playgroud)
但似乎没有任何效果。这表示 XPath 集是空的,如果我在 --xpath 参数中包含 string() ,那么它不会返回任何内容。