小编PRA*_*NTH的帖子

分配scala空数组

我对Scala完全不熟悉.在这里,我试图为变量分配一个空数组,它是成功的.但是当我试图将一个整数元素附加到变量时,发生了如下错误:

var c=Array()

c: Array[Nothing] = Array()

scala> c=Array(1)

<console>:8: error: type mismatch;
 found   : Int(1)
 required: Nothing
       c=Array(1)
           ^
Run Code Online (Sandbox Code Playgroud)

这是什么原因?

scala scala-2.8

10
推荐指数
1
解决办法
7037
查看次数

在Ejabberd创建多用户聊天室

到目前为止,我已经成功安装了ejabberd并注册了两个用户进行一对一的聊天.在客户端我使用了strophe并且正常工作与一对一聊天.现在我正在进行多用户聊天,并且必须创建有限用户的聊天室才能访问这个房间.创建MUC的程序是什么?是否有任何命令行界面,如"注册用户名主机名密码",如创建用户.

请帮助我,因为没有适当的ejabberd文档,请建议任何有关创建多用户聊天的好教程.

php ejabberd

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

针对三星智能电视应用的谷歌分析

我谷歌搜索了一天,没有找到适当的解决方案来应用谷歌分析智能电视应用程序.我试过这些链接,但没有运气来破解这个问题.

Google Analytics和三星智能电视应用

我不想要iframe解决方案,因为它只能用于网页浏览而不是事件.目前我在2011年和2013年工作的电视和document.domain在2011年给我"localhost",在2013年给我"".

有没有正确的方法来实施谷歌分析而不使用iframe?

提前致谢.

javascript google-analytics samsung-smart-tv

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

scala中的弃用警告

我已经定义了一个名为的函数,ti但在编译之后它显示了一个弃​​用警告.我在Eclipse中做了同样的事情.代码工作正常但它显示警告.

scala>  def ti(chars:List[Char],a:List[(Char,Integer)]):List[(Char,Integer)] = {
     |    if(chars.length!=0) {
     |      var j = 1
     |      var c = chars.head
     |      for(i<-chars.tail) {
     |        if(c==i) j=j+1
     |      }
     |      a::List((c,j))
     |      ti(chars.tail,a)
     |   }
     |   else a
     | }
Run Code Online (Sandbox Code Playgroud)

警告:有3个弃用警告; 使用-deprecation重新运行以获取详细信息ti:(chars:List [Char],a:List [(Char,Integer)])List [(Char,Integer)]

这是什么原因?

scala

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

Bootstrap模态重叠

我已经实现了bootstrap模式,它工作正常.这是我的代码

<div id="myModal" class="modal fade hide" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-header" style="background-color:#bb4837">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">x</button>
        <h2 style="color:white;vertical-align:middle"id="myModalLabel">Add Multiple Stores</h2>
    </div>
    <div class="modal-body">
        <des style="font-family:garrisons">You can upload a excel sheet with your store details.Please download the multistore template in .xls format <a href="#">here</a>.</des><br><br>
            <input style="margin-left:5em" type="text" id="upload-textstore" onclick="select_file('store','storefile','store','text/csv');" class="span3"/><button type="button" style="margin-bottom:25px;margin-left:10px" onclick="upload('/merchant/v1/fileupload','store')" class="btn btn-upload">Upload</button><br>
        <br><br><br><br>
    </div>
    <div class="modal-footer">
            <form class="form-inline" style="margin-bottom:0px">
                <button class="btn btn-danger " data-dismiss="modal" style="font-size:1.2em;height:32px;width:7em;margin-left:4em;margin-right:.5em" href="#">Select</button>
                <a data-dismiss="modal" href="#" style="font-size:1.2em;margin-top:.4em;margin-left:0px;margin-right:1em">Cancel</a>

            </form>
    </div>
</div>
Run Code Online (Sandbox Code Playgroud)

问题是它与网页中的其他组件重叠并且看起来是隐藏的.

javascript html5 css3 twitter-bootstrap

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