我正在使用TURN服务器与我的webrtc应用程序.它在相同的网络和不同的网络中的chrome工作正常.但在Firefox中它在同一网络中工作正常但在不同网络的情况下它显示错误:
ICE failed, see about:webrtc for more details
Run Code Online (Sandbox Code Playgroud)
webrtc日志:
(ice/WARNING) ICE(PC:1480060743115000 (id=119 url=https://172.26.203.112:8889/amit_new/index-rui-dev.jsp#app/contacts)): relay only option results in no host candidate for IP4:10.16.241.33:0/UDP
(ice/WARNING) ICE(PC:1480060743115000 (id=119 url=https://172.26.203.112:8889/amit_new/index-rui-dev.jsp#app/contacts)): relay only option results in no host candidate for IP4:10.32.4.48:0/UDP
(ice/WARNING) ICE(PC:1480060743115000 (id=119 url=https://172.26.203.112:8889/amit_new/index-rui-dev.jsp#app/contacts)): relay only option results in ICE TCP being disabled
(ice/ERR) ICE(PC:1480060743115000 (id=119 url=https://172.26.203.112:8889/amit_new/index-rui-dev.jsp#app/contacts)): peer (PC:1480060743115000 (id=119 url=https://172.26.203.112:8889/amit_new/index-rui-dev.jsp#app/contacts):default) specified too many components
(ice/WARNING) ICE(PC:1480060743115000 (id=119 url=https://172.26.203.112:8889/amit_new/index-rui-dev.jsp#app/contacts)): peer (PC:1480060743115000 (id=119 url=https://172.26.203.112:8889/amit_new/index-rui-dev.jsp#app/contacts):default) specified bogus candidate
(ice/WARNING) ICE(PC:1480060743115000 (id=119 url=https://172.26.203.112:8889/amit_new/index-rui-dev.jsp#app/contacts)): peer (PC:1480060743115000 (id=119 …Run Code Online (Sandbox Code Playgroud) Count-Min草图的宽度(桶数)和深度(哈希函数数)决定了检索到的频率估计的准确性。
摘自Count-Min作者的2005年论文:
参数w和d可以通过设置w =?e /?来选择。和d =?ln1 / ??,其中回答查询的误差在?的范围内。有概率?
如上所述:
w=?e/error?
d=?ln(1/(1?certainty))?
Run Code Online (Sandbox Code Playgroud)
Count-Min原始作者在2011年发表的论文中:
假设我们希望误差最大为0.1(所有频率之和),并且确定性为99.9。然后我们想要2 / w = 1/1000,我们将w = 2000设置为(1/2)^ d = 0.001,即d = log0.001 / log0.5?10。
导致:
w=?2/error?
d=?ln(1?certainty)/ln(1/2)?
Run Code Online (Sandbox Code Playgroud)
然而,误差必须取决于存储在草图中的元素N的总数。元素越多,错误和错误概率就越大。为了创建初始草图,什么是合适的功能?
在java中,可以转换对象而不必将其分配给另一个对象.例如:
Object x = Class.forName(name).newInstance();
if(x instanceof Date){
(Date)x;
x.setTime(0);
}
Run Code Online (Sandbox Code Playgroud)
编译器不允许我这样做,除非我将它分配给另一个Date对象,但有没有一种方法可以在不必分配给另一个对象的情况下进行转换?
因为当您分配例如:Date a = (Date)x,a和x最终成为引用时,两者都能够触及Date方法.但为了使我的代码更清晰,有没有一种方法可以在不必分配的情况下进行投射?