小编Bob*_*ong的帖子

FindBy注释用于查找WebElements列表

在java中,我使用这样的代码来获取具有相同标识符的WebElements列表:

@FindBy(how = How.CLASS_NAME, using = "name")
private List<WebElement> names;
Run Code Online (Sandbox Code Playgroud)

现在,我正在使用c#而我正在尝试使用以下内容执行相同的操作:

[FindsBy(How = How.ClassName, Using = "name")]
private List<IWebElement> names;
Run Code Online (Sandbox Code Playgroud)

但是,这给出了例外:

System.ArgumentException:类型Castle.Proxies.IWrapsElementProxy_1'的对象不能被转换为类型"System.Collections.Generic.List`1 [OpenQA.Selenium.IWebElement]".

我已经尝试过FindAllBy和FindBys,但这些似乎没有效果.无论如何我还能做到这一点

names = getDriver().findElements(By.ClassNames("..."))

c# selenium webdriver list

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

如何在Lisp中获得点对?

我已经搜索谷歌和其他地方一段时间,但我无法找到如何生成或创建点对.我问这个因为,我需要打开一个如下所示的列表:

(X Y Z)
Run Code Online (Sandbox Code Playgroud)

到以这种格式的列表:

((X . 1) (Y . 2) (Z . 3))
Run Code Online (Sandbox Code Playgroud)

数字代表索引的位置.我有一个函数将列表转换为格式

(X 1 Y 2 Z 3)
Run Code Online (Sandbox Code Playgroud)

这是这个功能:

  (defun listFormat (l)
     (defun place-index (idx l)
        (if (null l)
          nil
          (append (list (first l)) (list idx)
                  (place-index (+ idx 1) (rest l)))))
     (place-index 1 l))
Run Code Online (Sandbox Code Playgroud)

但我不知道如何获得点对.提前致谢

lisp list common-lisp

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

Cuda 中的纹理坐标

我正在使用cuda查看DCT的实现:http://www.cse.nd.edu/courses/cse60881/www/source_code/dct8x8/dct8x8_kernel1.cu 有问题的部分在这里:

__shared__ float CurBlockLocal1[BLOCK_SIZE2];

__global__ void CUDAkernel1DCT(float *Dst, int ImgWidth, int OffsetXBlocks, int OffsetYBlocks)
{
    // Block index
    const int bx = blockIdx.x + OffsetXBlocks;
    const int by = blockIdx.y + OffsetYBlocks;

    // Thread index (current coefficient)
    const int tx = threadIdx.x;
    const int ty = threadIdx.y;

    // Texture coordinates
    const float tex_x = (float)( (bx << BLOCK_SIZE_LOG2) + tx ) + 0.5f;
    const float tex_y = (float)( (by << BLOCK_SIZE_LOG2) + ty ) + 0.5f;

    //copy current …
Run Code Online (Sandbox Code Playgroud)

c textures cuda coordinates

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

标签 统计

list ×2

c ×1

c# ×1

common-lisp ×1

coordinates ×1

cuda ×1

lisp ×1

selenium ×1

textures ×1

webdriver ×1