小编nik*_*kow的帖子

如何自动滚动到特定的表格行?

我有一个带有标题的html页面,一个包含100个项目和一个页脚的表格.

搜索时,我会突出显示包含数据的行.

但是,如果突出显示的行是第75行,则用户必须向下滚动才能找到它.

如何自动滚动到该行?

我确实看到了scrollTo(),但看到它只需要轴点.

有什么建议?

谢谢.

(在C,html,css和javascript/jquery中使用cgi)

html javascript jquery dom

6
推荐指数
1
解决办法
7148
查看次数

如何在oracle 11g中查询主键

有谁知道如何在Oracle 11g中查询表的主键?我在SQL Server上看到了类似的问题,但是我在尝试该线程的答案时没有运气.

谢谢!

sql oracle11g

5
推荐指数
1
解决办法
3万
查看次数

使用一种方法的文档字符串自动覆盖另一种方法的文档字符串

问题:我有一个类,其中包含一个execute调用另一个方法的模板方法_execute。子类应该重写_execute以实现某些特定功能。此功能应记录在 的文档字符串中_execute。高级用户可以创建自己的子类来扩展库。但是,处理此类子类的另一个用户应该只使用execute,因此如果他使用 ,他将看不到正确的文档字符串help(execute)

因此,最好以这样的方式修改基类,以便在子类中 的文档字符串execute自动替换为 的文档字符串_execute。有什么想法可以做到这一点吗?

我正在考虑使用元类来做到这一点,使这对用户完全透明。

python metaclass

4
推荐指数
1
解决办法
3355
查看次数

使用DataProvider参数化的JGiven失败,"方法'名称'应该没有参数"

我正在为我的测试工作JGiven框架(已经是一个大粉丝!).我使用@DataProvider时遇到了问题

我正在浏览文档http://jgiven.org/docs/parameterizedscenarios/, 但是我收到以下错误

java.lang.Exception: Method test_update_order should have no parameters
        at org.junit.runners.model.FrameworkMethod.validatePublicVoidNoArg(FrameworkMethod.java:76)
        at org.junit.runners.ParentRunner.validatePublicVoidNoArgMethods(ParentRunner.java:155)
        at org.junit.runners.BlockJUnit4ClassRunner.validateTestMethods(BlockJUnit4ClassRunner.java:
208)
        at org.junit.runners.BlockJUnit4ClassRunner.validateInstanceMethods(BlockJUnit4ClassRunner.j
ava:188)
        at org.junit.runners.BlockJUnit4ClassRunner.collectInitializationErrors(BlockJUnit4ClassRunn
er.java:128)
        at org.junit.runners.ParentRunner.validate(ParentRunner.java:416)
        at org.junit.runners.ParentRunner.<init>(ParentRunner.java:84)
        at org.junit.runners.BlockJUnit4ClassRunner.<init>(BlockJUnit4ClassRunner.java:65)
        at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.<init>(SpringJUnit4ClassR
unner.java:111)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:
57)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorIm
pl.java:45)
Run Code Online (Sandbox Code Playgroud)

我的Test类如下

@RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes=Application.class)
@WebAppConfiguration
@IntegrationTest("server.port:0")
@Story( { "JIRA-123" } )
@Description("Story: coffee shop")
public class CoffeeShopTest extends ScenarioTest<GivenSomeState, WhenSomeAction, ThenSomeOutcome> {

    @Test @Issue( { "OUI-1156"} )
    @Description("Test for update order for coffee shop")
    @DataProvider( {
        "1",
        "3",
        "2", …
Run Code Online (Sandbox Code Playgroud)

java bdd spring-integration junit4 jgiven

4
推荐指数
1
解决办法
1065
查看次数

如何在Eclipse中自动填充段落?

我想在Eclipse中自动填充一个段落到80个字符(或其他一些固定宽度).这可以通过Emacs中的键盘命令实现吗?或者是否有插件(我在谷歌上找不到任何东西)?

编辑:我不确定这是否相关,但我需要这个用于Python代码中的文档字符串(使用PyDev插件).

python eclipse formatting word-wrap

2
推荐指数
1
解决办法
1273
查看次数