我正在使用jQuery .scrollTop在div中滚动图像.它在Firefox中运行良好 - 滚动非常流畅和快速.在IE 8中,滚动非常缓慢且出现故障 - 图像在大约一秒钟内滚动一次 - 两秒钟.图像大小平均在2000*2000和4000*4000像素之间.
有没有办法改进IE 8的这个?
IE 7的性能略好一些,但仍然不够好.
谢谢
编辑:我认为问题在于如何在IE 7和8中实现滚动.我已经启用了两个滚动条(overflow-x和overflow-y),并且我尝试使用这些滚动条滚动图像.问题完全一样.我试过在功能相当不足的PC上运行 - 奔腾双核几年,2 GB RAM以及Core i7台式机,2.8GHz CPU 1600Mhz RAM,结果几乎相同.FireFox滚动速度更快,但其CPU使用率平均比IE CPU使用率高10%.这让我感到困惑......到目前为止,微软肯定会解决这个问题吗?
我发现另一件有点奇怪的事情是在Core 2 Duo笔记本电脑上滚动速度更快.我想知道这是否与显卡驱动程序有关... IE 7/8甚至可以使用GPU吗?
对不起,如果这听起来很傻,但我真的很有兴趣解决这个问题... IE不能那么糟糕..
我有一个看起来像这样的字符串:
"7-6-4-1"
Run Code Online (Sandbox Code Playgroud)
要么
"7"
Run Code Online (Sandbox Code Playgroud)
要么
""
Run Code Online (Sandbox Code Playgroud)
也就是说,一组数字用 - 分隔.可能有零个或多个数字.
我想返回一个堆栈,其中按顺序按下数字(即第一个按7,第一个示例为1个)
如果我只是想返回一个列表,我可以去str.split("-").map{_.toInt}(虽然这对空字符串不起作用)/
虽然没有toStack转换为Stack.所以目前,我有
{
val s = new Stack[Int];
if (x.nonEmpty)
x.split('-').foreach {
y => s.push(y.toInt)
}
s
}
Run Code Online (Sandbox Code Playgroud)
哪个有效,但非常难看.我错过了什么?
编辑:感谢所有响应者,我从这次讨论中学到了很多东西
我们有一个特殊的例程来将子文件夹中的文件分解为扩展,这些扩展将被复制并放入单个扩展文件中.对于这种特殊的方法,我想使用maven-antrun-plugin,通过dirset的顺序迭代和jar包装,我们需要库ant-contrib.
即将推出的插件配置失败并显示错误.我错误配置了什么?谢谢.
插件配置
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.6</version>
<executions>
<execution>
<phase>validate</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
<for param="extension">
<path>
<dirset dir="${basedir}/src/main/webapp/WEB-INF/resources/extensions/">
<include name="*" />
</dirset>
</path>
<sequential>
<basename property="extension.name" file="${extension}" />
<echo message="Creating JAR for extension '${extension.name}'." />
<jar destfile="${basedir}/target/extension-${extension.name}-1.0.0.jar">
<zipfileset dir="${extension}" prefix="WEB-INF/resources/extensions/${extension.name}/">
<include name="**/*" />
</zipfileset>
</jar>
</sequential>
</for>
</target>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>ant-contrib</groupId>
<artifactId>ant-contrib</artifactId>
<version>1.0b3</version>
<exclusions>
<exclusion>
<groupId>ant</groupId>
<artifactId>ant</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.ant</groupId>
<artifactId>ant-nodeps</artifactId>
<version>1.8.1</version>
</dependency>
</dependencies>
</plugin>
Run Code Online (Sandbox Code Playgroud)
错误
[ERROR] Failed to execute goal …Run Code Online (Sandbox Code Playgroud) 每当我观看有关实体框架的演示时,演示者只需设置一些表并使用自动创建的代码存根执行插入,更新和删除,但从不显示任何存储过程的使用.在我看来,这是从客户端执行SQL.
根据我的经验,这不是特别好的做法,所以我假设我对实体框架的理解是错误的.
类似地,WCF RIA Services演示使用EF,并且演示总是相同的.任何人都可以了解如何在典型的业务层/数据访问层/存储过程中使用EF.
我觉得我很困惑,不应该!!
我试图找出执行BCNF分解的正确步骤.我找到了这个例子,但我不明白如何执行正确的步骤.
模式=(A,B,C,D,E,F,G,H)FD's + {A - > CGH,AD-> C,DE-> F,G-> G}
有人可以显示正确的步骤吗?
我正在学习c#,有些事我不明白,我一直无法找到任何有关在线的帮助.
string[] = testarray = { "test1", "test2", "test3" };
teststring = teststring.Join(" ", testarray);
Run Code Online (Sandbox Code Playgroud)
此操作失败,并显示以下错误消息:
使用实例引用无法访问成员'string.Join(string,params string [])'; 用类型名称来限定它.
但是,如果我改为:
teststring = string.Join(" ", testarray);
Run Code Online (Sandbox Code Playgroud)
但是,如果我使用Split中的函数:
teststring = teststring.Split(new char[] {' '});
Run Code Online (Sandbox Code Playgroud)
我不再收到错误.我认为这事做与string类是静态的,有些不是的某些功能,但我怎么能知道哪些功能是静态的,这是不?(如果这是原因)
静态/非静态肯定之间的这些强制调用技术是需要习惯的.
我只想构建GAE内置的简单UI翻译(使用python SDK).
def add_translation(self, pid=None):
trans = Translation()
trans.tlang = db.Key("agtwaW1kZXNpZ25lcnITCxILQXBwTGFuZ3VhZ2UY8aIEDA")
trans.ttype = "UI"
trans.transid = "ui-about"
trans.content = "????"
trans.put()
Run Code Online (Sandbox Code Playgroud)
这导致编码错误:
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe5 in position 0: ordinal not in range(128)
Run Code Online (Sandbox Code Playgroud)
如何使用unicode(utf-8)字符编码正确的插入内容?
python google-app-engine character-encoding google-cloud-datastore
我正在使用SOAPUI工具访问Weblogic 10.3.2中部署的JAX-WS Web服务
请求:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ws="http://ws.pc3.polk.com/">
<soapenv:Header>
<wsse:Security soapenv:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<wsu:Timestamp wsu:Id="Timestamp-1" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<wsu:Created>2010-12-03T21:10:43Z</wsu:Created>
<wsu:Expires>2010-12-03T21:44:03Z</wsu:Expires>
</wsu:Timestamp>
<wsu:Timestamp wsu:Id="Timestamp-60" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<wsu:Created>2010-12-03T20:10:39Z</wsu:Created>
<wsu:Expires>2010-12-03T20:43:59Z</wsu:Expires>
</wsu:Timestamp>
<wsse:UsernameToken wsu:Id="UsernameToken-59" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<wsse:Username>rwerqre</wsse:Username>
<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">ewrqwrwerqer</wsse:Password>
<wsse:Nonce EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">Nmw0ksmiOX+hkiSoWb2Rjg==</wsse:Nonce>
<wsu:Created>2010-12-03T20:10:39.649Z</wsu:Created>
</wsse:UsernameToken>
</wsse:Security>
</soapenv:Header>
<soapenv:Body>
<ws:getMetadata/>
</soapenv:Body>
</soapenv:Envelope>
响应:
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<SOAP-ENV:Fault xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<faultcode>SOAP-ENV:MustUnderstand</faultcode>
<faultstring>MustUnderstand headers:[{http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd}Security] are not understood</faultstring>
</SOAP-ENV:Fault>
</S:Body>
</S:Envelope>
Run Code Online (Sandbox Code Playgroud) 我正在使用VS 2010 Professional(在Windows 7 Professional 64上),使用WCF 4.0编写.我有以下代码:
if (responseMessage.StatusCode == HttpStatusCode.NotFound)
{
throw new ContentNotFoundException(contentId, SSPErrorCode.PartnerRestGetStream404);
}
Run Code Online (Sandbox Code Playgroud)
当安装调试器的过程中,在"if"语句或在此之前,已经设置断点,而条件为假(responseMessage.StatusCode是"OK"),调试器的步骤到"if"语句.然后它跳过"throw"语句而不做任何事情,然后继续执行代码.
我试过了:
重新启动VS,注销我的Windows用户,重新启动,清洗液,再构建它,重建它,回收应用程序池,resarting IIS,加入的条件里面的"if"语句和内部更多的代码 - 没有到目前为止的工作.
在某个地方必须有一个缓存,我可以清理它以摆脱它,但是什么,在哪里?
谷歌搜索此我只找到HTTP: - social.msdn.microsoft.com/Forums/en-US/vsdebug/thread/d4b70fd7-b74a-42ce-a538-7185df3d3254/,所以我手动尝试设置断点,它没"在这个班级中打破了,虽然在其他班级也是如此.
我想在不重新安装VS的情况下解决这个问题.先感谢您!
更新:
Run Code Online (Sandbox Code Playgroud)using System; namespace IEnumerableBug2 { class Program { static void Main(string[] args) { if (new object() == null) throw new Exception(); try { } catch { } } } }
更新#2:
请注意,我的方法中还有一个try-catch语句,在'if'语句后面几行.
我刚试过再次复制这个bug,但失败了.对于可能需要它的其他人,我将把问题留在stackoverflow上,但是,正如我所写,我不再能够重现这种行为.