小编Var*_*run的帖子

Trie复杂性和搜索

什么是创建一个复杂线索单词列表的,什么是该线索寻找另一组字的复杂性?当我有哈希表时,我应该使用trie进行字符串搜索吗?

algorithm hashtable trie time-complexity data-structures

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

kapacitor配置为远程Influxdb节点时无法获取警报

当我在kapacitor.conf的Influxdb设置中的url设置中尝试localhost时,我能够正确地获取警报.

但是当我试图将url指向某个远程位置时,你可能无法获得任何警报.

有人可以帮助我吗?

请在下面找到kapacitor.conf文件:

# The hostname of this node.
# Must be resolvable by any configured InfluxDB hosts.
hostname = "localhost"
# Directory for storing a small amount of metadata about the server.
data_dir = "/var/lib/kapacitor"

[http]
  # HTTP API Server for Kapacitor
  # This server is always on,
  # it servers both as a write endpoint
  # and as the API endpoint for all other
  # Kapacitor calls.
  bind-address = ":9092"
  auth-enabled = false
  log-enabled = true
  write-tracing …
Run Code Online (Sandbox Code Playgroud)

monitoring alerts influxdb kapacitor

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

Webrtc远程视频流不起作用

设置remoteDescription时,我在Firefox中遇到以下错误:

DOMException [InvalidStateError:“无法在状态have-local-offer中设置远程报价”代码:11 nsresult:0x8053000b位置:http:// localhost:8080 / resources / assets / js / test-online.js:111]

请在下面找到我的test-online.js代码

var localVideo;
var remoteVideo;
var peerConnection;
var serverConnection;
var peerConnectionConfig = {'iceServers': [{'url': 'stun:stun.services.mozilla.com'}, {'url': 'stun:stun.l.google.com:19302'}]};
pageReady();
var offerOptions = {
          offerToReceiveAudio: 1,
          offerToReceiveVideo: 1
        };

var sdpConstraints = {'mandatory': {
      'OfferToReceiveAudio':true,
      'OfferToReceiveVideo':true }};

function pageReady() {
    localVideo = document.getElementById('localVideo');
    remoteVideo = document.getElementById('remoteVideo');

    localVideo.addEventListener('loadedmetadata', function() {
          trace('Local video videoWidth: ' + this.videoWidth +
            'px,  videoHeight: ' + this.videoHeight + 'px');
    });

    remoteVideo.addEventListener('loadedmetadata', function() {
          trace('Remote …
Run Code Online (Sandbox Code Playgroud)

javascript stream webrtc spring-websocket

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

开放封闭原则与战略模式

我已经看过战略模式和开放封闭原则对我来说都是一样的.如果它们相同,为什么我们有不同的名称模式\原则.

请分享您对此的想法.

design-patterns solid-principles

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

如何在c#或Java中进行堆栈交换

我想交换两个堆栈,这基本上意味着堆栈的内容.我怎样才能在C#或Java或C中做到这一点

java algorithm stack data-structures c#-4.0

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