无法直观地看到 Windows 10 容器。
我尝试通过 RDP 连接(通过 暴露 3389 端口-p 3389:3389)
我知道在容器内有一个虚拟监视器(以 1240x768 模拟)。我创建了一个节点服务器,使用此插件从桌面返回一个 sceeenshot:
https://www.npmjs.com/package/screenshot-desktop
在本地使用它就像一个魅力,我看到了我当前显示器的屏幕截图。但是当我尝试在容器内运行它时,我看到一个黑屏,所以可能无法在视觉上连接......
FROM mcr.microsoft.com/windows/servercore:1903
# FROM mcr.microsoft.com/windows:1903
EXPOSE 3389
Run Code Online (Sandbox Code Playgroud)
docker run -it --rm -p 3389:3389 sample:dev
Run Code Online (Sandbox Code Playgroud)
我尝试了 2 个基本图像,但结果是一样的
我会看到容器内部发生了什么,就像一个虚拟机。
我正在尝试使用读卡器 ( https://www.ewent-online.com/tcpdf/pdf/ew/p/EW1052/ ) 来读取健康卡。
这是代码(从官方文档复制粘贴:https : //developers.google.com/web/updates/2016/03/access-usb-devices-on-the-web):
var device;
navigator['usb'].requestDevice({ filters: [] })
.then(selectedDevice => {
device = selectedDevice;
return device.open(); // Begin a session.
})
.then(() => device.selectConfiguration(1)) // Select configuration #1 forhe device.
.then(() => device.claimInterface(0)) // Request exclusive control over interface #2.
.then(() => device.controlTransferOut({
requestType: 'class',
recipient: 'interface',
request: 0x22,
value: 0x01,
index: 0x00}
)) // Ready to receive data
.then(() => device.transferIn(5, 64)) // Waiting for 64 bytes of data from endpoint …Run Code Online (Sandbox Code Playgroud) 每5个元素可以选择一个元素范围吗?我期待的是:
<ul>
<li>Test</li>
<li>Test</li> //this
<li>Test</li> //this
<li>Test</li> //this
<li>Test</li>
<li>Test</li>
<li>Test</li> //this
<li>Test</li> //this
<li>Test</li> //this
<li>Test</li>
</ul>
Run Code Online (Sandbox Code Playgroud)
从2到4,从7到9等
提前致谢!