小编Qua*_* Vo的帖子

VS Code:禁用打开文件和资源管理器之间的链接

我可以在Visual Studio Code中禁用编辑器的功能链接吗?

我的项目有很多文件,所以资源管理器树很长,但是当我打开一个编辑器选项卡时,这个文件将自动聚焦在资源管理器面板上.如何禁用该功能?

eclipse中的相​​同功能:

这个函数在eclipse中

visual-studio-code

46
推荐指数
4
解决办法
7308
查看次数

为 MediaRecorder 录制的视频添加元数据

我正在使用 MediaRecorder 从画布元素录制动画。下载视频后,视频信息为空(时长、比特率、帧率……)

在此输入图像描述

这是我制作下载网址的方法

    const blob = new Blob(data, { type: 'video/webm' });
    const url = window.URL.createObjectURL(blob);
Run Code Online (Sandbox Code Playgroud)

有没有办法添加元数据来下载文件?

javascript video web-mediarecorder

6
推荐指数
0
解决办法
1615
查看次数

反应原生 + SSL 套接字:错误:xhr 轮询错误

我正在使用socket.io-clientssl 套接字服务器连接来自本机应用程序的套接字,并在connect-error事件 - 时出错[Error: xhr poll error]

这是我来自 react native(客户端)的代码:

import io from 'socket.io-client';

import Config from '../../config';

var socketConfig = {
    secure: true
}

function connect() {
    this.socket = io(Config.notificationUrl, socketConfig);
    // this.socket.connect();

    this.socket.on('connect', () => console.log("Socket connected", self.socket.id));
    this.socket.on('connect_error', (err) => console.log("connect_error", err));
    this.socket.on('error', (err) => console.log("error", err));
}
Run Code Online (Sandbox Code Playgroud)

我尝试将传输:['websocket', 'polling'] 添加到 socketConfig,但我也遇到了其他错误[Error: websocket error]。也尝试使用import io from 'socket.io-client/dist/socket.io',但没有什么不同。

注意:我成功连接到使用 http 协议的套接字服务器。

我正在使用 react native 0.40.0 和 socket.io-client 1.7.3。

sockets ssl node.js react-native

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

FindIterable<Document> 是否加载所有文档?

目前,我正在使用MongoCollection<Document>获取所有文档,返回类型为FindIterable<Document>,然后循环遍历 Iterable 来处理每个文档。

前任:

FindIterable<Document> docs = getCollection().find();
for(Document doc : docs) {
    ...
}
Run Code Online (Sandbox Code Playgroud)

但我不知道 FindIterable 是否会加载所有文档并循环它,或者只是加载游标并稍后在循环时获取文档?

java mongodb

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

fonttools 将 ttf 转换为 woff2

目前,我正在使用 fonttools( https://github.com/fonttools/fonttools )通过2 个步骤将字体文件转换ttf为命令woff2ttx

  • 转换ttfttx
  • 然后转换ttxwoff2

但是速度太慢,ttx文件又大,有什么办法ttf可以woff2直接用fonttools转成来提高性能?

fonts ttx-fonttools

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

解码列表时忽略无效项目

解码列表时是否可以忽略无效项目?\n示例:我有一个模型

\n
type Type\n    = A\n    | B\n\ntype alias Section =\n    { sectionType : Type\n    , index : Int\n    }\n\n\ngetTypeFromString : String -> Maybe Type\ngetTypeFromString input =\n    case input of\n        \xe2\x80\x9ca\xe2\x80\x9d ->\n            Just A\n\n        \xe2\x80\x9cb\xe2\x80\x9d ->\n            Just B\n\n        _ ->\n            Nothing\n\ndecodeType : Decoder Type\ndecodeType =\n    Decode.string\n        |> Decode.andThen\n            (\\str ->\n                case getTypeFromString str of\n                    Just sectionType ->\n                        Decode.succeed sectionType\n\n                    Nothing ->\n                        Decode.fail <| ("Unknown type" ++ str)\n            )\n\n\ndecodeSection : Decoder Section\ndecodeSection =\n    Decode.map2 Section\n        (Decode.field "type" decodeType)\n        (Decode.field "index" Decode.int)\n …
Run Code Online (Sandbox Code Playgroud)

elm

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