小编Aks*_*ngh的帖子

Windows沙箱功能可以用于驱动程序测试吗?

第一次进行 Windows 驱动程序开发,我想部署我的第一个驱动程序。但我没有第二台电脑。

微软文档

通常,当您测试和调试驱动程序时,调试器和驱动程序在不同的计算机上运行。运行调试器的计算机称为主机,运行驱动程序的计算机称为目标计算机。目标计算机也称为测试计算机

我从vhidmini2作为我的项目基础(UMDF2 版本)开始。我想知道Windows Sandbox功能是否可以用来代替测试计算机?我的驱动程序不会与任何硬件交互。

windows umdf windows-sandbox

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

如何通过将键设置为字符串来使用 recyclerview-selection?

使用 android 库androidx.recyclerview.selection,我尝试RecyclerView按照此处此处的教程实现多项选择。

但是,我希望我keyString, 而不是Long,但我面临以下两个错误:

tracker = SelectionTracker.Builder<String>(
    "selection_id",
    recyclerView,
    StableIdKeyProvider(recyclerView),    // this line shows error
    MyItemDetailsLookup(recyclerView),
    StorageStrategy.createStringStorage()    // this line shows error
    ).withSelectionPredicate(
        SelectionPredicates.createSelectAnything()
    ).build()
Run Code Online (Sandbox Code Playgroud)

我想要一些关于如何ItemKeyProvider实现 a 的细节String,其次,

StorageStrategy.createStringStorage() // this shows error
StorageStrategy.createLongStorage()   // this doesn't show error
Run Code Online (Sandbox Code Playgroud)

为什么会发生这种情况,因为我到处都将泛型类型从Longto替换了String

android kotlin android-recyclerview

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

如何在android中将参数传递给对话框?

我正在调用一个带有参数的对话框,如下所示:

MyDialog("title", "message").show(this@MyActivity.supportFragmentManager, null)
Run Code Online (Sandbox Code Playgroud)

这是我的对话类:

class MyDialog(private val theTitle: String, private val theMessage: String) : DialogFragment() {
    override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {
        return activity.let {
            val myBuilder = AlertDialog.Builder(it)
            myBuilder
                .setTitle(theTitle)
                .setMessage(theMessage)
                .setPositiveButton("OK") { _, _ -> }
            myBuilder.create()
        }
    }
}
Run Code Online (Sandbox Code Playgroud)

但是当设备的方向在旋转时发生变化时,应用程序将停止工作。如果没有传递参数,则不会发生这种情况。那么,如何传递参数以及这样做的最佳方法是什么?

android android-dialogfragment kotlin

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

如何在 Nuxt.js 中处理子页面的多个布局?

我是第一次使用Nuxt.js和。Vue.js所以,我想使用一个模板作为父模板,它基本上需要有两列。每个孩子的两列都有不同的数据。

layouts/content.vue:

<template>
    <b-container fluid>
        <b-row>
            <!--<b-col><nuxt/></b-col>
            <b-col><nuxt/></b-col>-->
        </b-row>
    </b-container>
</template>
Run Code Online (Sandbox Code Playgroud)

这是子 vue 组件:

pages/some-page/index.vue:

<template>
    <div>
        <!-- how to enter data for both the columns -->
    </div>
</template>

<script>
    export default {
        layout: 'content'
    }
</script>
Run Code Online (Sandbox Code Playgroud)

我如何输入处理我的两列content.vue?我想在某些父布局中创建两列,以便以后编辑时,我只有一个文件,其中的更改会反映到所有子页面。

vue.js nuxt.js

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

Element-UI:如何增加按钮的图标大小?

我只是显示一个这样的按钮:

<el-button plain circle icon="el-icon-refresh"></el-button>
Run Code Online (Sandbox Code Playgroud)

但是按钮里面的图标太小了。有没有办法只放大图标?我正在Vue.js为我的项目使用。

element-ui

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

如何在kotlin中使用indexOf作为数据类的ArrayList?

kotlin,我有data class这样的:

data class MyModel (
    val key: String,
    val myValue: String
)
Run Code Online (Sandbox Code Playgroud)

我有一个ArrayList上述模型:

val myList: ArrayList<MyModel>
Run Code Online (Sandbox Code Playgroud)

我不知道如何通过传递键来获取元素的索引:

fun getPosition(key: String): Int = myList.indexOf(/* what to do here? */)
Run Code Online (Sandbox Code Playgroud)

- - 编辑 - -

假设键是唯一的。

kotlin

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