小编Bra*_*rad的帖子

是什么导致Google搜索显示GitHub回购的副行?

当我在某些GitHub存储库上进行Google搜索时,我会在第三行(在URL后面)看到一个署名和一个日期.例如,以下屏幕截图中的"by D Stark - 2016"行.是什么原因导致显示此信息以及信息的根源是什么?

在此输入图像描述

github google-search

7
推荐指数
1
解决办法
153
查看次数

如何在Chapel中保留可接受类型的列表以进行比较

假设我有类Student,BadStudent:Student,GoodStudent:StudentExcellentStudent: Student.我想要一个只能GoodExceptional学生一起操作的课程方法.就像是:

class AdvancedBasketWeaving {

  // this is the question:
  var acceptableStudentTypes: [1..2] = [GoodStudent, ExcellentStudent];

  proc accept(student: Student) {
    for at in this.acceptableStudentTypes {
      if student.type == at then return "YES!";
    }
    return "Computer says 'No'";
  }
}
Run Code Online (Sandbox Code Playgroud)

我如何获得此功能?

chapel

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

如何在Chapel中找到变量的类型

我似乎遇到了答案,然后我失去了它.我处在"迷失"阶段.如果我在Chapel中有一个对象,那么Python的等价物是什么

>>> thing = 'i am a thing'
>>> type(thing)
<type 'str'>
Run Code Online (Sandbox Code Playgroud)

我已经看到了,writeln(A.type)并且writeln(type(A))都抛出了表单的错误

'writeln(type _array(DefaultSparseArr(real(64),2,int(64),DefaultSparseDom(2,int(64),_domain(DefaultRectangularDom(2,int(64),false))))))'
$CHPL_HOME/modules/standard/IO.chpl:3992: note: candidates are: channel.writeln(out error: syserr) [233811]
$CHPL_HOME/modules/standard/IO.chpl:3998: note:                 channel.writeln() [233840]
$CHPL_HOME/modules/standard/IO.chpl:4006: note:                 channel.writeln(const args ...?k, out error: syserr) [233876]
$CHPL_HOME/modules/standard/IO.chpl:4012: note:                 channel.writeln(const args ...?k) [233916]
$CHPL_HOME/modules/standard/IO.chpl:4020: note:                 channel.writeln(const args ...?k, style: iostyle) [233954]
$CHPL_HOME/modules/standard/IO.chpl:4047: note:                 channel.writeln(const args ...?k, style: iostyle, out error: syserr) [233998]
$CHPL_HOME/modules/standard/IO.chpl:4267: note:                 writeln(const args ...?n) [235140]
$CHPL_HOME/modules/standard/IO.chpl:4273: note:                 writeln() [235158]
Run Code Online (Sandbox Code Playgroud)

chapel

4
推荐指数
1
解决办法
66
查看次数

标签 统计

chapel ×2

github ×1

google-search ×1