d::getRegisterTime, checkTime);

        // 检查IP
        if (registerIp != null) {
            queryWrapper.and((java.util.function.Consumer<QueryWrapper>) qw -> qw.eq(InviteRecord::getRegisterIp, registerIp));
        }

        // 检查设备ID
        if (deviceId != null && registerIp == null) {
            queryWrapper.and((java.util.function.Consumer<QueryWrapper>) qw -> qw.eq(InviteRecord::getDeviceId, deviceId));
        }

        long count = this.count(queryWrapper);
        return count > 0;
    }

    @Override
    @Transactional(rollbackFor = Exception.class)
    public int revokeExpiredInviteRewards() {
        LocalDateTime deadline = LocalDateTime.now().minusDays(PointsConstants.INVITE_REWARD_GRACE_DAYS);
        QueryWrapper queryWrapper = QueryWrapper.create()
                .eq(InviteRecord::getStatus, InviteStatusEnum.REGISTERED.getValue())
                .le(InviteRecord::getRegisterTime, deadline);

        List<InviteRecord> expiredRecords = this.list(queryWrapper);
        if (expiredRecords.isEmpty()) {
            return 0;
        }

        int revokedCount = 0;
        for (InviteRecord record : expiredRecords) {
            Long inviterId = record.getInviterId();
            Long inviteeId = record.getInviteeId();
            if (inviterId == null || inviteeId == null || inviteeId <= 0) {
                continue;
            }

            boolean deductionSucceeded = false;

            try {
                userPointsService.deductPoints(
                        inviterId,
                        PointsConstants.INVITE_REGISTER_INVITER_REWARD,
                        PointsTypeEnum.INVITE.getValue(),
                        "邀请奖励回收（被邀请人7天无操作）",
                        record.getId()
                );
                deductionSucceeded = true;
            } catch (Exception e) {
                log.warn("邀请奖励回收失败-邀请人扣减异常，记录ID: {}, 错误: {}", record.getId(), e.getMessage());
            }

            try {
                userPointsService.deductPoints(
                        inviteeId,
                        PointsConstants.INVITE_REGISTER_INVITEE_REWARD,
                        PointsTypeEnum.INVITE.getValue(),
                        "邀请奖励回收（被邀请人7天无操作）",
                        record.getId()
                );
                deductionSucceeded = true;
            } catch (Exception e) {
                log.warn("邀请奖励回收失败-被邀请人扣减异常，记录ID: {}, 错误: {}", record.getId(), e.getMessage());
            }

            int inviterPoints = record.getInviterPoints() == null ? 0 : record.getInviterPoints();
            int inviteePoints = record.getInviteePoints() == null ? 0 : record.getInviteePoints();
            record.setStatus(InviteStatusEnum.REVOKED.getValue());
            record.setRewardTime(LocalDateTime.now());
            record.setInviterPoints(Math.max(0, inviterPoints - PointsConstants.INVITE_REGISTER_INVITER_REWARD));
            record.setInviteePoints(Math.max(0, inviteePoints - PointsConstants.INVITE_REGISTER_INVITEE_REWARD));
            boolean updated = this.updateById(record);
            if (!updated) {
                log.warn("邀请奖励回收后更新记录状态失败


em>Static is a local matter to the CPE.  Some of this object's parameter descriptions refer to whether a Rule is Static when specifying whether or not the parameter value can be modified.
For enabled table entries, if SourceInterface is not a valid reference and SourceAllInterfaces is false, then the table entry is inoperable and the CPE MUST set Status to Error_Misconfigured.

At most one entry in this table (regardless of whether or not it is enabled) can exist with a given value for Alias. On creation of a new table entry, the Agent MUST choose an initial value for Alias such that the new entry does not conflict with any existing entries.

-

2.0

Enable

boolean

W

Enables or disables this Rule entry.

false

2.0

Status

string

R

The status of this Rule entry.   Enumeration of:

Disabled

Enabled

Error_Misconfigured

Error (OPTIONAL)
The Error_Misconfigured value indicates that a necessary configuration value is undefined or invalid.
The Error value MAY be used by the CPE to indicate a locally defined error condition.

Disabled

2.0

<span id="D.De


XMLTags::ParseValues(char const *t, GMap<GUTF8String,GUTF8String> &args,bool downcase)
{
  GUTF8String argn;
  char const *tt;
  while((argn=getargn(t,tt)).length())
  {
    if(downcase)
      argn=argn.downcase();
    args[argn]=getargv(tt,t).fromEscaped();
  }
}

lt_XMLTags::~lt_XMLTags() {}

lt_XMLTags::lt_XMLTags(void) : startline(0) {}

lt_XMLTags::lt_XMLTags(const char n[]) : startline(0)
{
  char const *t;
  name=tagtoname(n,t);
  ParseValues(t,args);
}

void
lt_XMLTags::init(const GP<ByteStream> &bs)
{
  GP<XMLByteStream> gxmlbs=XMLByteStream::create(bs);
  init(*gxmlbs);
}

void
lt_XMLTags::init(const GURL &url)
{
  const GP<ByteStream> bs=ByteStream::create(url,"rb");
  init(bs);
}

void
lt_XMLTags::init(XMLByteStream &xmlbs)
{
  if(!get_count())
  {
    G_THROW( ERR_MSG("XMLTags.no_GP") );
  }
  GPList<lt_XMLTags> level;
  GUTF8String tag,raw(xmlbs.gets(0,'<',false));
  int linesread=xmlbs.get_lines_read();
  if(!isspaces(raw))
  {
    G_THROW( (ERR_MSG("XMLTags.raw_string") "\t")+raw);
  }
  GUTF8String encoding;
  for(int len;(len=(tag=xmlbs.gets(0,'>',true)).length());)
  {
    if(tag[len-1] != '>')
    {
      G_THROW((ERR_MSG("XMLTags.bad_tag") "\t")+tag);
    }
    switch(tag[1])
    {
      case '?':
      {
        while(len < 4 || tag.substr(len-2,len) != "?>")
        {
          GUTF8String cont(xmlbs.gets(0,'>',true));
          if(!cont.length())
          {
            G_THROW( (ERR_MSG("XMLTags.bad_PI") "\t")+tag);
          }
          len=((tag+=cont).length());
        }
        char const *n;
        GUTF8String xtag = tag.substr(2,-1);
        GUTF8String xname = tagtoname(xtag,n);
        if(xname.downcase() == "xml")
        {
          ParseValues(n,args);
          for(GPosition pos=args;pos;++pos)
          {
            if(args.key(pos) == "encoding")
            {
              const GUTF8String e=args[pos].upcase();
              if(e != encoding)
              {
                xmlbs.set_encoding((encoding=e));
              }
            }
          }
        }
        break;
      }
      case '!':
      {
        if(tag[2] == '-' && tag[3] == '-')
        {
          while((len < 7) ||
            (tag.substr(len-3,-1) != "-->"))
          {
            GUTF8String cont(xmlbs.gets(0,'>',true));
            if(!cont.length())
            {
              GUTF8String mesg;
              mesg.format( ERR_MSG("XMLTags.bad_comment") "\t%s",(const char *)tag);
              G_THROW(mesg);
            }
            len=((tag+=cont).length());
          }
        }
        break;
      }
      case '/':
      {
        GUTF8String xname=tagtoname(tag.substr(2,-1));
        GPosition last=level.lastpos();
        if(last)
        {


ad\u5858\u6e7e\u751f\u4ea7\u961f\u8d2b\u519c\u5973\u793e\u5458\u5f6d\u987a\u534e\u8bf4\uff1a\u201c\u8fc7\u53bb\u662f\u5b98\u5927\u6c11\u7ec6\uff0c\u4ec0\u4e48\u4e8b\u53ea\u6709\u5b98\u8bb2\u4e86\u5c31\u662f\u5bf9\u7684\uff0c\u767e\u59d3\u5f00\u4e0d\u5f97\u53e3\uff0c\u5982\u4eca\u653f\u7b56\u6362\u4e86\u5e95\uff0c\u5b98\u505a\u9519\u4e86\u4e8b\uff0c\u4e5f\u5411\u767e\u59d3\u8ba4\u9519\uff0c\u8fd9\u662f\u4ece\u672a\u6709\u8fc7\u7684\u4e8b\u3002\u201d\u738b\u5bb6\u51b2\u751f\u4ea7\u961f\u8d2b\u519c\u5434\u4fdd\u751f\u8bf4\uff1a\u201c\u53ea\u6709\u5171\u4ea7\u515a\u624d\u8fd9\u6837\u4f1f\u5927\uff0c\u51e0\u5e74\u7684\u4e8b\u60c5\u90fd\u67e5\u5f97\u6e05\u6e05\u695a\u695a\u3002\u201d\u5927\u961f\u6cbb\u4fdd\u4e3b\u4efb\u5f6d\u4e19\u79cb\u8bf4\uff1a\u201c\u51af\u56fd\u5168\u6848\u5b50\u6df1\u523b\u5730\u6559\u80b2\u4e86\u6211\uff0c\u4eca\u540e\u529e\u4efb\u4f55\u4e8b\u90fd\u5f97\u5c0f\u5fc3\uff0c\u8981\u5bf9\u515a\u3001\u5bf9\u4eba\u6c11\u8d1f\u8d23\u3002\u201d", "type": "paragraph"}, {"text": "\u6765\u6e90\uff1a\u300a\u4eba\u6c11\u516c\u5b89\u300b1961\u5e74\u7b2c15\u671f\uff081961\u5e7410\u670812\u65e5\uff09", "type": "paragraph"}]}
  </script>

    [返回索引页面]

   冯国全错案已经纠正

   日期：1961-10-12 作者：湖南省公安厅

   湖南省公安厅

   八月三日晚上，由湖南省公安厅、长沙市和�


-bar-section .dropdown li:not(.has-form):not(.active):hover > a:not(.button) {
        color: white;
        background-color: #555555;
        background: #272727; }
      .top-bar-section .dropdown li label {
        white-space: nowrap;
        background: #333333; }
      .top-bar-section .dropdown li .dropdown {
        left: 100%;
        top: 0; }
    .top-bar-section > ul > .divider, .top-bar-section > ul > [role="separator"] {
      border-bottom: none;
      border-top: none;
      border-right: solid 1px #4e4e4e;
      clear: none;
      height: 45px;
      width: 0; }
    .top-bar-section .has-form {
      background: #333333;
      padding: 0 15px;
      height: 45px; }
    .top-bar-section .right li .dropdown {
      left: auto;
      right: 0; }
      .top-bar-section .right li .dropdown li .dropdown {
        right: 100%; }
    .top-bar-section .left li .dropdown {
      right: auto;
      left: 0; }
      .top-bar-section .left li .dropdown li .dropdown {
        left: 100%; }

  .no-js .top-bar-section ul li:hover > a {
    background-color: #555555;
    background: #272727;
    color: white; }
  .no-js .top-bar-section ul li:active > a {
    background: #008cba;
    color: white; }
  .no-js .top-bar-section .has-dropdown:hover > .dropdown {
    display: block;
    position: static !important;
    height: auto;
    width: auto;
    overflow: visible;
    clip: auto;
    position: absolute !important; } }
.breadcrumbs {
  display: block;
  padding: 0.5625rem 0.875rem 0.5625rem;
  overflow: hidden;
  margin-left: 0;
  list-style: none;
  border-style: solid;
  border-width: 1px;
  background-color: #f4f4f4;
  border-color: gainsboro;
  border-radius: 3px; }
  .breadcrumbs > * {
    margin: 0;
    float: left;
    font-size: 0.6875rem;
    line-height: 0.6875rem;
    text-transform: uppercase;
    color: #008cba; }
    .breadcrumbs > *:hover a, .breadcrumbs > *:focus a {
      text-decoration: underline; }
    .breadcrumbs > * a {
      color: #008cba; }
    .breadcrumbs > *.current {
      cursor: default;
      color: #333333; }
      .breadcrumbs > *.current a {
        cursor: default;
        color: #333333; }
      .breadcrumbs > *.current:hover, .breadcrumbs > *.current:hover a, .breadcrumbs > *.current:focus, .breadcrumbs > *.current:focus a {
        text-decoration: none; }
    .breadcrumbs > *.unavailable {
      color: #999999; }
      .breadcrumbs > *.unavailable a {
        color: #999999; }
      .breadcrumbs > *.unavailable:hover, .breadcrumbs > *.unavailable:hover a, .breadcrumbs > *.unavailable:focus,
      .breadcrumbs > *.unavailable a:focus {
        text-decoration: none;
        color: #999999;
        cursor: default; }
    .breadcrumbs > *:before {


$a3, 0x24($s0)
/* B1BF1C 800A4D7C E7A00010 */  swc1  $f0, 0x10($sp)
/* B1BF20 800A4D80 0C028B9C */  jal   func_800A2E70
/* B1BF24 800A4D84 00A03025 */   move  $a2, $a1
.L800A4D88:
/* B1BF28 800A4D88 8FBF0024 */  lw    $ra, 0x24($sp)
.L800A4D8C:
/* B1BF2C 800A4D8C 8FB00020 */  lw    $s0, 0x20($sp)
/* B1BF30 800A4D90 27BD0290 */  addiu $sp, $sp, 0x290
/* B1BF34 800A4D94 03E00008 */  jr    $ra
/* B1BF38 800A4D98 00000000 */   nop


+(((-1.0)*x1199))+((cj4*x1199))+(((-1.0)*x1182*x1204)));
evalcond[3]=((-1.0)+(((-1.0)*cj4*sj5*x1182*x1206))+(((-1.0)*x1182*x1200))+((x1187*x1203))+(((-1.0)*x1182*x1205))+(((-1.0)*x1187*x1204))+((x1187*x1209))+((x1187*x1202))+((x1187*x1208))+((x1182*x1210))+(((-1.0)*x1182*x1207))+x1211+(((-1.0)*cj4*x1211))+(((-1.0)*x1182*x1201)));
if( IKabs(evalcond[0]) > IKFAST_EVALCOND_THRESH  || IKabs(evalcond[1]) > IKFAST_EVALCOND_THRESH  || IKabs(evalcond[2]) > IKFAST_EVALCOND_THRESH  || IKabs(evalcond[3]) > IKFAST_EVALCOND_THRESH  )
{
continue;
}
}

{
IkReal j1array[1], cj1array[1], sj1array[1];
bool j1valid[1]={false};
_nj1 = 1;
IkReal x1212=((0.646708404322884)*cj4);
IkReal x1213=((0.62876328674038)*cj5);
IkReal x1214=((0.62876328674038)*sj5);
IkReal x1215=((0.373377619497519)*cj4*cj5);
IkReal x1216=((0.373377619497519)*cj4*sj5);
IkReal x1217=((0.746754716733336)*cj5*sj4);
IkReal x1218=((0.746754716733336)*sj4*sj5);
if( IKabs(((((-1.0)*(0.289291595677116)*r12))+(((-1.0)*r10*x1217))+(((-1.0)*r10*x1216))+((r11*x1213))+((r10*x1214))+(((-1.0)*r12*x1212))+(((-1.0)*(3.44827586206897)*py))+((r11*x1218))+(((-1.0)*r11*x1215)))) < IKFAST_ATAN2_MAGTHRESH && IKabs(((((-1.0)*r21*x1218))+(((3.44827586206897)*pz))+((r20*x1217))+((r21*x1215))+(((-1.0)*r20*x1214))+((r22*x1212))+(((0.289291595677116)*r22))+(((-1.0)*r21*x1213))+((r20*x1216)))) < IKFAST_ATAN2_MAGTHRESH && IKabs(IKsqr(((((-1.0)*(0.289291595677116)*r12))+(((-1.0)*r10*x1217))+(((-1.0)*r10*x1216))+((r11*x1213))+((r10*x1214))+(((-1.0)*r12*x1212))+(((-1.0)*(3.44827586206897)*py))+((r11*x1218))+(((-1.0)*r11*x1215))))+IKsqr(((((-1.0)*r21*x1218))+(((3.44827586206897)*pz))+((r20*x1217))+((r21*x1215))+(((-1.0)*r20*x1214))+((r22*x1212))+(((0.289291595677116)*r22))+(((-1.0)*r2


esumen de tus descubrimientos. No te preocupes, sin duda te elogiará por hacer tu deber con el pueblo de Ventormenta.","Tu audiencia comenzará pronto, así que será mejor que te des prisa, todavía te queda un buen tramo hasta el Castillo de Ventormenta."}, {"Lleva el informe de Baros Alexston sobre la Hermandad Defias al rey Varian Wrynn en el Castillo de Ventormenta."}},
[397] = {"Nos has hecho un gran servicio", {"He oído que a Lord Wishock le gustó mucho la bebida.","Nos has hecho un gran servicio, <nombre>. Los brujos de Ventormenta podremos seguir trabajando sin más interrupciones gracias a ti. Por tus esfuerzos, te he preparado un regalo especial. Habla con mi sirviente, Zggi, y pídele tu recompensa."}, {"Habla con Zggi, el sirviente de Zardeth de los Zarpanegra, para pedir tu recompensa."}},
[398] = {"Se busca: Ojo de gusano", {"Se busca: ¡Ojo de gusano!","Considerado una bestia incluso entre los propios gnolls, Ojo de gusano ha sido sentenciado a muerte por sus crímenes en contra de los Renegados. Este infame villano ha estado robando cuerpos y poniéndolos a disposición del ejército del rey Exánime. Ojo de gusano fue visto por última vez saqueando las tierras situadas en las proximidades de la Granja de Garren, al norte de Rémol.","A partir de este momento, la ciudad de Rémol ofrece una recompensa al que sea capaz de llevar a cabo su ejecución. Muéstrale al ejecutor Zygand la garra del villano una vez ejecutada la sentencia.","La clemencia queda relegada a los débiles."}, {"Mata a Ojo de gusano y llévale su garra al ejecutor Zygand de Rémol para obtener una recompensa."}},
[399] = {"Principios humildes", {"Parece que hace una eternidad desde que tan solo era un chico trabajando en la granja de Páramos de Poniente. Dicen que nunca puedes regresar, y es cierto. Doblemente cierto en mi caso, unos ladrones quemaron y tomaron mi casa.","He hablado con mi padre para descubrir el destino de alguna de mis posesiones, incluyendo mi primera brújula. No fue capaz de salvarlas. Sin embargo, también dice que deberían estar escondidas en la granja.","Encontrarás la Hacienda de Alexston al oeste de la Colina del Centinela. ¿Quizás podrías ir y recuperarla?"}, {"Ve a la casa de Baros Alexston en Páramos del Poniente y busca su brújula. A continuación, llévasela al Distrito de la Catedral, en Ventormenta."}},
[400] = {"Herramientas para Brasacerada", {"Beldin Brasacerada es el dueño de la tienda de mecánica local y además es el mejor técnico de máquinas de asedio. Pero es implacable con sus herramientas. ¡Te aseguro que rompe más llaves de arclite de las que le podemos suministrar!","Acabamos de completar su último pedido. Si se lo llevas, seguro que te compensa el esfuerzo.","Su tienda, el Almacén de Brasacerada está al noreste de Kharanos. Y es un lugar en el que se reúnen los pilotos veteranos de máquinas de asedio, así que, <atento/atenta>, por si oyes algo interesante."}, {"Entrega las herramientas de Brasacerada a Beldin Brasacerada."}},
[401] = {"Espera a que Sirra acabe", {"Casi he


        .sortedWith(compareBy<List<DetailContent>> { grp -> extractResNo(grp.firstOrNull() ?: return@compareBy Int.MAX_VALUE) ?: Int.MAX_VALUE })
        .flatten()
}

/**
 * 指定した Text の本文を引用している投稿（被引用）を集計します。
 * - ソース本文（正規化後）の行から候補文を抽出（「No.」「ID:」などのヘッダ風は除外、長さ>=2）。`extraCandidates` があれば同様に正規化の上で追加。
 * - 任意の引用行（先頭の '>' は段数無視で剥がす）が候補文に完全一致する投稿をヒットとする。
 *   `extraCandidates` が空でない場合は、非引用行の完全一致も許容。
 * - 正規化は ZWSP 除去、全角空白/＞/≫→半角、NFKC、連続空白の圧縮、trim を行う。
 * - ヒットごとに Text 行と直後の Image/Video を次の Text/ThreadEndTime までまとめ、No. 昇順で整列のうえフラット化。
 */
internal fun buildBackReferencesByContent(
    all: List<DetailContent>,
    source: DetailContent.Text,
    extraCandidates: Set<String> = emptySet(),
    plainTextOf: (DetailContent.Text) -> String = { t -> android.text.Html.fromHtml(t.htmlContent, android.text.Html.FROM_HTML_MODE_COMPACT).toString() },
): List<DetailContent> {
    fun normalize(s: String): String = Normalizer.normalize(
        s.replace("\u200B", "").replace('　', ' ').replace('＞', '>').replace('≫', '>'),
        Normalizer.Form.NFKC
    ).replace(Regex("\\s+"), " ").trim()

    // ソース本文から候補行を抽出（空でない/ヘッダ風でない/長さ>=2）
    val srcPlain = plainTextOf(source)
    val candidates: Set<String> = srcPlain.lines()
        .map { normalize(it) }
        .filter { it.isNotBlank() && !it.startsWith("No.", ignoreCase = true) && !it.startsWith("ID:", ignoreCase = true) && it.length >= 2 }
        .toSet()
        .let {
            if (extraCandidates.isEmpty()) it
            else it + extraCandidates.map { s -> normalize(s) }
        }
    if (candidates.isEmpty()) return emptyList()

    // 候補と完全一致する引用行を含む投稿を抽出
    val hitIndexes = all.withIndex().filter { (idx, c) ->
        if (c !is DetailContent.Text) return@filter false
        if (c.id == source.id) return@filter false
        val plain = plainTextOf(c)
        val quoteLines = plain.lines()
            .filter { it.trim().startsWith(">") }
            .map { normalize(it.trim().replaceFirst(Regex("^>+"), "")) }
            .filter { it.isNotBlank() }
            .toSet()
        if (quoteLines.any { it in candidates }) return@filter true

        // extraCandidates がある場合は、プレーン本文行での完全一致も許容
        if (extraCandidates.isNotEmpty()) {
            val plainLines = plain.lines().map { normalize(it) }.filter { it.isNotBlank() }
            if (plainLines.any { it in candidates }) {
                return@filter true
            }
        }

        false
    }.map { it.index }

    if (hitIndexes.isEmpty()) return emptyList()

    val groups = mutableListOf<List<DetailContent>>()
    for (i in hitIndexes) {
        val group = mutableListOf<DetailCo


6 = `shown${EVENT_KEY$7}`;\nconst EVENT_HIDE$6 = `hide${EVENT_KEY$7}`;\nconst EVENT_HIDDEN$6 = `hidden${EVENT_KEY$7}`;\nconst EVENT_CLICK_DATA_API$4 = `click${EVENT_KEY$7}${DATA_API_KEY$4}`;\nconst CLASS_NAME_SHOW$7 = 'show';\nconst CLASS_NAME_COLLAPSE = 'collapse';\nconst CLASS_NAME_COLLAPSING = 'collapsing';\nconst CLASS_NAME_COLLAPSED = 'collapsed';\nconst CLASS_NAME_DEEPER_CHILDREN = `:scope .${CLASS_NAME_COLLAPSE} .${CLASS_NAME_COLLAPSE}`;\nconst CLASS_NAME_HORIZONTAL = 'collapse-horizontal';\nconst WIDTH = 'width';\nconst HEIGHT = 'height';\nconst SELECTOR_ACTIVES = '.collapse.show, .collapse.collapsing';\nconst SELECTOR_DATA_TOGGLE$4 = '[data-bs-toggle=\"collapse\"]';\nconst Default$a = {\n  parent: null,\n  toggle: true\n};\nconst DefaultType$a = {\n  parent: '(null|element)',\n  toggle: 'boolean'\n};\n\n/**\n * Class definition\n */\n\nclass Collapse extends BaseComponent {\n  constructor(element, config) {\n    super(element, config);\n    this._isTransitioning = false;\n    this._triggerArray = [];\n    const toggleList = SelectorEngine.find(SELECTOR_DATA_TOGGLE$4);\n    for (const elem of toggleList) {\n      const selector = SelectorEngine.getSelectorFromElement(elem);\n      const filterElement = SelectorEngine.find(selector).filter(foundElement => foundElement === this._element);\n      if (selector !== null && filterElement.length) {\n        this._triggerArray.push(elem);\n      }\n    }\n    this._initializeChildren();\n    if (!this._config.parent) {\n      this._addAriaAndCollapsedClass(this._triggerArray, this._isShown());\n    }\n    if (this._config.toggle) {\n      this.toggle();\n    }\n  }\n\n  // Getters\n  static get Default() {\n    return Default$a;\n  }\n  static get DefaultType() {\n    return DefaultType$a;\n  }\n  static get NAME() {\n    return NAME$b;\n  }\n\n  // Public\n  toggle() {\n    if (this._isShown()) {\n      this.hide();\n    } else {\n      this.show();\n    }\n  }\n  show() {\n    if (this._isTransitioning || this._isShown()) {\n      return;\n    }\n    let activeChildren = [];\n\n    // find active children\n    if (this._config.parent) {\n      activeChildren = this._getFirstLevelChildren(SELECTOR_ACTIVES).filter(element => element !== this._element).map(element => Collapse.getOrCreateInstance(element, {\n        toggle: false\n      }));\n    }\n    if (activeChildren.length && activeChildren[0]._isTransitioning) {\n      return;\n    }\n    const startEvent = EventHandler.trigger(this._element, EVENT_SHOW$6);\n    if (startEvent.defaultPrevented) {\n      return;\n    }\n    for (const activeInstance of activeChildren) {\n      activeInstance.hide();\n    }\n    const dimension = this._getDimension();\n    this._element.classList.remove(CLASS_NAME_COLLAPSE);\n    this._element.classList.add(CLASS_NAME_COLLAPSING);\n    this._element.style[dimension] = 0;\n    this._addAriaAndCollapsedClass(this._triggerArray, true);\n    this._isTransitioning = true;\n    const complete = () => {\n      this._isTransitioning = false;\n      this._element.classList.remove(CLASS_NAME_COLLAPSING);\n      this._element.classList.add(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW$7);\n


 mod get_profile_information;
pub mod get_room_information;
#![no_std] // No standard library. We can't use this.
#![no_main] // We do have a main, but not in the standard Rust way.
#![feature(asm, global_asm)]

// Include assembly file during compilation.
// We need to include some things at the top of
// the text section.
global_asm!(include_str!("asm/init.s"));

// Rust modules that we include with the project.
pub mod otter;
mod panic;

// Compute the nth Fibonacci number.
// fib(0) = 1, fib(1) = 1, fib(n) = fib(n-1) + fib(n-2)
fn fib(n: u32) -> u32 {
    match n {
        0 | 1 => 1,
        _ => fib(n - 1) + fib(n - 2),
    }
}

// main() is called by Rust, so we can drop the C ABI.
fn main() {
    loop {
        // Load in switches value.
        let sw = otter::switches_rd() as u32;

        // Calculate fibonacci number.
        let fib = fib(sw) as u16;

        // Write it to the seven segment display.
        otter::sseg_wr(fib);
    }
}

// While RISC-V is a supported platform for Rust, it does not have
// a stable ABI (on any platform, for that matter).
// 'no_mangle' and 'extern "C"' makes Rust use the C ABI.
// Once we are calling Rust from Rust, we don't need this anymore.
//
// Rust will not let you do a lot of unsafe things.
// Returning from your entry-point on baremetal is one of those
// things. This code will not compile if it is possible to
// return from _rust_entry(). Hence, the panic (which does not return).
#[no_mangle]
pub extern "C" fn _rust_entry() -> ! {
    main();
    panic!();
}
<reponame>napi-rs/rolldown<filename>core/src/module_loader.rs
use std::collections::HashMap;

use log::debug;
use once_cell::sync::Lazy;
use swc_common::{sync::Lrc, SourceMap};

use crate::analyse::DynImportDesc;
use crate::types::{ModOrExt, ResolveIdResult, ResolvedId, UnresolvedModule};
use crate::utils;
use crate::utils::resolve_id::resolve_id;
use crate::utils::transform::transform;
use crate::{external_module::ExternalModule, module::Module};
use crate::{
  types::{shared, Shared},
  utils::plugin_driver::PluginDriver,
  // GraphError,
};

pub(crate) static SOURCE_MAP: Lazy<Lrc<SourceMap>> = Lazy::new(Default::default);

#[derive(Clone)]
pub struct ModuleLoader {
  pub modules_by_id: HashMap<String, ModOrExt>,
  plugin_driver: Shared<PluginDriver>,
}

impl ModuleLoader {
  pub fn new(plugin_driver: Shared<PluginDriver>) -> Shared<Self> {
    shared(Self {
      modules_by_id: HashMap::default(),
      plugin_driver,
    })
  }

  fn add_module_source(&self, id: &str, _importer: Option<&str>, module: &mut Module) {
    debug!("add_module_source of id: {}", id);
    let source = self
      .plugin_driver
      .borrow()
      .load(id)
      .unwrap_or(std::fs::read_to_string(id).unwrap());
    // hook `load` was called

    module.update_options();

    let transformed = transform(source, module, &self.plugin_driver.borrow());
    // hook `transform` was called

    module.set_source(transformed)
  }


ex(ctx, SSL_SERVERINFOV2, serverinfo,
                                    serverinfo_length);
 end:
    /* SSL_CTX_use_serverinfo makes a local copy of the serverinfo. */
    OPENSSL_free(name);
    OPENSSL_free(header);
    OPENSSL_free(extension);
    OPENSSL_free(serverinfo);
    BIO_free(bin);
    return ret;
}

static int ssl_set_cert_and_key(SSL *ssl, SSL_CTX *ctx, X509 *x509, EVP_PKEY *privatekey,
                                STACK_OF(X509) *chain, int override)
{
    int ret = 0;
    size_t i;
    int j;
    int rv;
    CERT *c = ssl != NULL ? ssl->cert : ctx->cert;
    STACK_OF(X509) *dup_chain = NULL;
    EVP_PKEY *pubkey = NULL;

    /* Do all security checks before anything else */
    rv = ssl_security_cert(ssl, ctx, x509, 0, 1);
    if (rv != 1) {
        SSLerr(SSL_F_SSL_SET_CERT_AND_KEY, rv);
        goto out;
    }
    for (j = 0; j < sk_X509_num(chain); j++) {
        rv = ssl_security_cert(ssl, ctx, sk_X509_value(chain, j), 0, 0);
        if (rv != 1) {
            SSLerr(SSL_F_SSL_SET_CERT_AND_KEY, rv);
            goto out;
        }
    }

    pubkey = X509_get_pubkey(x509); /* bumps reference */
    if (pubkey == NULL)
        goto out;
    if (privatekey == NULL) {
        privatekey = pubkey;
    } else {
        /* For RSA, which has no parameters, missing returns 0 */
        if (EVP_PKEY_missing_parameters(privatekey)) {
            if (EVP_PKEY_missing_parameters(pubkey)) {
                /* nobody has parameters? - error */
                SSLerr(SSL_F_SSL_SET_CERT_AND_KEY, SSL_R_MISSING_PARAMETERS);
                goto out;
            } else {
                /* copy to privatekey from pubkey */
                EVP_PKEY_copy_parameters(privatekey, pubkey);
            }
        } else if (EVP_PKEY_missing_parameters(pubkey)) {
            /* copy to pubkey from privatekey */
            EVP_PKEY_copy_parameters(pubkey, privatekey);
        } /* else both have parameters */

        /* check that key <-> cert match */
        if (EVP_PKEY_cmp(pubkey, privatekey) != 1) {
            SSLerr(SSL_F_SSL_SET_CERT_AND_KEY, SSL_R_PRIVATE_KEY_MISMATCH);
            goto out;
        }
    }
    if (ssl_cert_lookup_by_pkey(pubkey, &i) == NULL) {
        SSLerr(SSL_F_SSL_SET_CERT_AND_KEY, SSL_R_UNKNOWN_CERTIFICATE_TYPE);
        goto out;
    }

    if (!override && (c->pkeys[i].x509 != NULL
                      || c->pkeys[i].privatekey != NULL
                      || c->pkeys[i].chain != NULL)) {
        /* No override, and something already there */
        SSLerr(SSL_F_SSL_SET_CERT_AND_KEY, SSL_R_NOT_REPLACING_CERTIFICATE);
        goto out;
    }

    if (chain != NULL) {
        dup_chain = X509_chain_up_ref(chain);
        if  (dup_chain == NULL) {
            SSLerr(SSL_F_SSL_SET_CERT_AND_KEY, ERR_R_MALLOC_FAILURE);
            goto out;
        }
    }

    sk_X509_pop_free(c->pkeys[i].chain, X509_free);
    c->pkeys[i].chain = dup_chain;

    X509_free(c->pkeys[i].x509);
    X509_up_ref(x509);
    c->pkeys[i].x509 = x509;

    EVP_PKEY_free(c->pkeys[i].privatekey);
    EVP_PKEY_up_ref(privatekey);
    c->pkeys[i].privatekey = privatekey;

    c->key = &(c->pkeys[i]);

    ret = 1;
 out:
    EVP_PKEY_free(pubkey);
    return ret;
}

int SSL_use_cert_and_key(SSL *ssl, X509 *x509, EVP_PKEY *privatekey,
                         STACK_OF(X509) *chain, int override)
{
    return ssl_set_cert_and_key(ssl, NULL, x509, privatekey, chain, override);
}

int SSL_CTX_use_cert_and_key(SSL_CTX *ctx, X509 *x509, EVP_PKEY *privatekey,
                             STACK_OF(X509) *chain, int override)
{
    return ssl_set_cert_and_key(NULL, ctx, x509, privatekey, chain, override);
}


    data class PluginArtifact(val group: String, val name: String, val version: String)

    private fun findPluginVersions(plugins: Map<String, String>, artifacts: List<PluginArtifact>) =
        plugins.map { (id, version) ->
            if (version == "null") {
                val pluginArtifact = artifacts.firstOrNull { it.name == "$id.gradle.plugin" }
                    ?: if (id.startsWith("org.jetbrains.kotlin.")) {
                        artifacts.firstOrNull {
                            (it.group == "org.jetbrains.kotlin" && it.name == "kotlin-gradle-plugin")
                                    //plugin "org.jetbrains.kotlin.native.cocoapods"
                                    // is bundled in "org.jetbrains.kotlin.multiplatform.gradle.plugin" artifact
                                    || it.name == "org.jetbrains.kotlin.multiplatform.gradle.plugin"
                        }
                    } else if (id == "com.android.application" || id == "com.android.library") {
                        artifacts.firstOrNull { it.group == "com.android.tools.build" && it.name == "gradle" }
                    } else {
                        Logger.d("Unknown plugin $id")
                        null
                    }

                Application(id, Version(pluginArtifact?.version ?: "null"))
            } else {
                Application(id, Version(version))
            }
        }
}package org.jetbrains.kotlin.doctor.entity

import kotlinx.serialization.SerializationException
import kotlinx.serialization.decodeFromString
import kotlinx.serialization.json.Json
import kotlinx.serialization.json.JsonObject

enum class OS(private val str: String) {
    MacOS("macOS"),
    Windows("Windows"),
    Linux("Linux");

    override fun toString() = str
}

enum class Shell(val path: String, val profile: String) {
    Bash("/bin/bash", "~/.bash_profile"),
    Zsh("/bin/zsh", "~/.zprofile")
}

data class ProcessResult(val code: Int, val rawOutput: String?) {
    val output get() = if (code == 0) rawOutput else null
}

interface System {
    val currentOS: OS
    val osVersion: Version?
    val cpuInfo: String?
    val homeDir: String
    val shell: Shell?

    fun getEnvVar(name: String): String?
    fun execute(command: String, vararg args: String): ProcessResult

    fun fileExists(path: String): Boolean
    fun readFile(path: String): String?
    fun writeTempFile(content: String): String
    fun readArchivedFile(pathToArchive: String, pathToFile: String): String?
    fun findAppsPathsInDirectory(prefix: String, directory: String, recursively: Boolean = false): List<String>
}

fun System.isUsingRosetta() =
    execute("sysctl", "sysctl.proc_translated").output
        ?.substringAfter("sysctl.proc_translated: ")
        ?.toIntOrNull() == 1

fun System.isUsingM1() =
    cpuInfo?.contains("Apple") == true

fun System.parsePlist(path: String): Map<String, Any>? {
    if (!fileExists(path)) return null
    return try {
        execute("/usr/bin/plutil", "-convert", "json", "-o", "-", path).output
            ?.let { Json.decodeFromString<JsonObject>(it) }
    } catch (e: SerializationException) {
        null
    }
}

fun System.spotlightFindAppPaths(appId: String): List<String> =
    execute("/usr/bin/mdfind", "kMDItemCFBundleIdentifier=\"$appId\"").output
        ?.split("\n")
        ?.filter { it.isNotBlank() }
        .orEmpty()
package org.jetbrains.kotlin.doctor.entity

import kotlin.math.max

class Version : Comparable<Version> {
    val rawString: String
    val major: Int?


_new (splay_tree_compare_fn,
				  splay_tree_delete_key_fn,
				  splay_tree_delete_value_fn);
extern splay_tree splay_tree_new_with_allocator (splay_tree_compare_fn,
						 splay_tree_delete_key_fn,
						 splay_tree_delete_value_fn,
						 splay_tree_allocate_fn,
						 splay_tree_deallocate_fn,
						 void *);
extern splay_tree splay_tree_new_typed_alloc (splay_tree_compare_fn,
					      splay_tree_delete_key_fn,
					      splay_tree_delete_value_fn,
					      splay_tree_allocate_fn,
					      splay_tree_allocate_fn,
					      splay_tree_deallocate_fn,
					      void *);
extern void splay_tree_delete (splay_tree);
extern splay_tree_node splay_tree_insert (splay_tree,
					  splay_tree_key,
					  splay_tree_value);
extern void splay_tree_remove	(splay_tree, splay_tree_key);
extern splay_tree_node splay_tree_lookup (splay_tree, splay_tree_key);
extern splay_tree_node splay_tree_predecessor (splay_tree, splay_tree_key);
extern splay_tree_node splay_tree_successor (splay_tree, splay_tree_key);
extern splay_tree_node splay_tree_max (splay_tree);
extern splay_tree_node splay_tree_min (splay_tree);
extern int splay_tree_foreach (splay_tree, splay_tree_foreach_fn, void*);
extern int splay_tree_compare_ints (splay_tree_key, splay_tree_key);
extern int splay_tree_compare_pointers (splay_tree_key,	splay_tree_key);

#ifdef __cplusplus
}
#endif /* __cplusplus */

#endif /* _SPLAY_TREE_H */


thrown here?
        }
    }

    /**
     * Renames this file to {@code newPath}. This operation is supported for both
     * files and directories.
     *
     *
Many failures are possible. Some of the more likely failures include:
     *

     *
Write permission is required on the directories containing both the source and
     * destination paths.
     *
Search permission is required for all parents of both paths.
     *
Both paths be on the same mount point. On Android, applications are most likely to hit
     * this restriction when attempting to copy between internal storage and an SD card.
     *

     *
     *
Note that this method does not throw {@code IOException} on failure.
     * Callers must check the return value.
     *
     * @param newPath the new path.
     * @return true on success.
     */
    @DSComment("Activity on IO class")
    @DSSpec(DSCat.FILE_SYSTEM)
    @DSGenerator(tool_name = "Doppelganger", tool_version = "2.0", generated_on = "2013-12-30 12:56:44.580 -0500", hash_original_method = "FDC5D6D625B3CE9B182F17F4E03581A9", hash_generated_method = "7C1AE3A6CB934088A19AA981E3FB6DB0")

public boolean renameTo(File newPath) {
        try {
            Libcore.os.rename(path, newPath.path);
            return true;
        } catch (ErrnoException errnoException) {
            return false;
        }
    }

    /**
     * Returns a string containing a concise, human-readable description of this
     * file.
     *
     * @return a printable representation of this file.
     */

    @DSComment("From safe class list")
    @DSSafe(DSCat.SAFE_LIST)
    @DSGenerator(tool_name = "Doppelganger", tool_version = "2.0", generated_on = "2013-12-30 12:56:44.583 -0500", hash_original_method = "2B0DBB93241DF37011E39BE4D10F6879", hash_generated_method = "26C57ED0CDB609D607D36CA3242D043F")
    @Override
    public String toString() {
        return path;
    }

@DSComment("File Information")
    @DSSafe(DSCat.SAFE_LIST)
    @DSGenerator(tool_name = "Doppelganger", tool_version = "0.4.2", generated_on = "2013-07-17 10:24:43.857 -0400", hash_original_method = "700C756497BE64476D6C692FA75956E5", hash_generated_method = "83B703FD7718250D40AE9A9467D048ED")
    public URI toURI() {
        String name = getAbsoluteName();
        try
        {
            if(!name.startsWith("/"))
            {
                URI var81CE9C8452AED16CEDF893615168C3D2_1760874075 =                 new URI("file", null, "/" + name, null, null);
                //var81CE9C8452AED16CEDF893615168C3D2_1760874075.addTaint(getTaint());
                return var81CE9C8452AED16CEDF893615168C3D2_1760874075;
            } //End block
            else
            if(name.startsWith("//"))
            {
                URI var29D90A9A6DADA7CCD352DB7E1FC69FFB_1073480290 =                 new URI("file", "", nam


2)
		and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c20862918.target(e,tp,eg,ep,ev,re,r,rp,chk)
	if chk==0 then
		if e:GetLabel()~=100 then return false end
		e:SetLabel(0)
		return e:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsExistingMatchingCard(c20862918.costfilter1,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil,tp)
	end
	e:SetLabel(0)
	Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
	local g1=Duel.SelectMatchingCard(tp,c20862918.costfilter1,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil,tp)
	local race=g1:GetFirst():GetOriginalRace()
	local att=g1:GetFirst():GetOriginalAttribute()
	local code=g1:GetFirst():GetCode()
	Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
	local g2=Duel.SelectMatchingCard(tp,c20862918.costfilter2,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,g1:GetFirst(),race,att,code,tp)
	e:SetLabel(race,att,code,g2:GetFirst():GetCode())
	g1:Merge(g2)
	Duel.Remove(g1,POS_FACEUP,REASON_COST)
	Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c20862918.activate(e,tp,eg,ep,ev,re,r,rp)
	local race,att,code1,code2=e:GetLabel()
	Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
	local g=Duel.SelectMatchingCard(tp,c20862918.thfilter,tp,LOCATION_DECK,0,1,1,nil,race,att,code1,code2)
	if g:GetCount()>0 then
		Duel.SendtoHand(g,nil,REASON_EFFECT)
		Duel.ConfirmCards(1-tp,g)
	end
end


Init();

            _helper.SetAudioSourceRoot(transform);
            _helper.SingleSoundEndOfPlayEvent += (value) =>
            {
                SingleSoundEndOfPlayEvent?.Invoke(value);
            };

            Mute = MuteDefault;
            BackgroundPriority = BackgroundPriorityDefault;
            SinglePriority = SinglePriorityDefault;
            MultiplePriority = MultiplePriorityDefault;
            WorldPriority = WorldPriorityDefault;
            OneShootPriority= OneShootPriorityDefault;
            BackgroundVolume = BackgroundVolumeDefault;
            SingleVolume = SingleVolumeDefault;
            MultipleVolume = MultipleVolumeDefault;
            WorldVolume = WorldVolumeDefault;
            OneShootVolume = OneShootVolumeDefault;
        }

        /// <summary>
        /// 播放背景音乐
        /// </summary>
        /// <param name="clip">音乐剪辑</param>
        /// <param name="isLoop">是否循环</param>
        /// <param name="speed">播放速度</param>
        public void PlayBackgroundMusic(AudioClip clip, bool isLoop = true, float speed = 1)
        {
            _helper.PlayBackgroundMusic(clip, isLoop, speed);
        }
        /// <summary>
        /// 暂停播放背景音乐
        /// </summary>
        /// <param name="isGradual">是否渐进式</param>
        public void PauseBackgroundMusic(bool isGradual = true)
        {
            _helper.PauseBackgroundMusic(isGradual);
        }
        /// <summary>
        /// 恢复播放背景音乐
        /// </summary>
        /// <param name="isGradual">是否渐进式</param>
        public void ResumeBackgroundMusic(bool isGradual = true)
        {
            _helper.ResumeBackgroundMusic(isGradual);
        }
        /// <summary>
        /// 停止播放背景音乐
        /// </summary>
        public void StopBackgroundMusic()
        {
            _helper.StopBackgroundMusic();
        }

        /// <summary>
        /// 播放单通道音效
        /// </summary>
        /// <param name="clip">音乐剪辑</param>
        /// <param name="isLoop">是否循环</param>
        /// <param name="speed">播放速度</param>
        public void PlaySingleSound(AudioClip clip, bool isLoop = false, float speed = 1)
        {
            _helper.PlaySingleSound(clip, isLoop, speed);
        }
        /// <summary>
        /// 暂停播放单通道音效
        /// </summary>
        /// <param name="isGradual">是否渐进式</param>
        public void PauseSingleSound(bool isGradual = true)
        {
            _helper.PauseSingleSound(isGradual);
        }
        /// <summary>
        /// 恢复播放单通道音效
        /// </summary>
        /// <param name="isGradual">是否渐进式</param>
        public void ResumeSingleSound(bool isGradual = true)
        {
            _helper.ResumeSingleSound(isGradual);
        }
        /// <summary>
        /// 停止播放单通道音效
        /// </summary>
        public void StopSingleSound()
        {
            _helper.StopSingleSound();
        }

        /// <summary>
        /// 播放多通道音效
        /// </summary>
        /// <param name="clip">音乐剪辑</param>
        /// <param na


.setInfo(info);
    ldifEntryPanel.setInfo(info);
    tableEntryPanel.setInfo(info);
    errorSearchingPanel.setInfo(info);
  }

  private DN[] parentReadOnly;
  private DN[] nonDeletable;
  {
    try
    {
      parentReadOnly = new DN[] {
        DN.decode(ConfigConstants.DN_TASK_ROOT),
        DN.decode(ConfigConstants.DN_MONITOR_ROOT),
        DN.decode(ConfigConstants.DN_BACKUP_ROOT),
        DN.decode(Constants.REPLICATION_CHANGES_DN),
        DN.decode(ServerConstants.DN_EXTERNAL_CHANGELOG_ROOT)
      };
      nonDeletable = new DN[] {
          DN.decode(ConfigConstants.DN_CONFIG_ROOT),
          DN.decode(ConfigConstants.DN_DEFAULT_SCHEMA_ROOT),
          DN.decode(ConfigConstants.DN_TRUST_STORE_ROOT)
      };
    }
    catch (Throwable t)
    {
      throw new RuntimeException("Error decoding DNs: "+t, t);
    }
  }

  /**
   * Returns true if the provided DN corresponds to a read-only
   * entry and false otherwise.
   * @param sDn the DN of the entry.
   * @return true if the provided DN corresponds to a read-only
   * entry and false otherwise.
   */
  public boolean isReadOnly(String sDn)
  {
    boolean isReadOnly = false;
    try
    {
      DN dn = DN.decode(sDn);
      for (DN parentDN : parentReadOnly)
      {
        if (dn.isDescendantOf(parentDN))
        {
          isReadOnly = true;
          break;
        }
      }
      if (!isReadOnly)
      {
        isReadOnly = dn.equals(DN.NULL_DN);
      }
    }
    catch (Throwable t)
    {
      throw new RuntimeException("Error decoding DNs: "+t, t);
    }
    return isReadOnly;
  }

  /**
   * Returns true if the provided DN corresponds to an entry that
   * can be deleted and false otherwise.
   * @param sDn the DN of the entry.
   * @return true if the provided DN corresponds to an entry that
   * can be deleted and false otherwise.
   */
  public boolean canDelete(String sDn)
  {
    boolean canDelete = true;
    try
    {
      DN dn = DN.decode(sDn);
      for (DN parentDN : parentReadOnly)
      {
        if (dn.isDescendantOf(parentDN))
        {
          canDelete = false;
          break;
        }
      }
      if (canDelete)
      {
        for (DN cannotDelete : nonDeletable)
        {
          if (cannotDelete.equals(dn))
          {
            canDelete = false;
            break;
          }
        }
      }
      if (canDelete)
      {
        canDelete = !dn.equals(DN.NULL_DN);
      }
    }
    catch (Throwable t)
    {
      throw new RuntimeException("Error decoding DNs: "+t, t);
    }
    return canDelete;
  }

  /**
   * Saves the changes done to the entry.
   * @param modal whether the progress dialog for the task must be modal or
   * not.
   */
  private void saveChanges(boolean modal)
  {
    newTask = null;
    final ArrayList<Message> errors = new ArrayList<Message>();
    // Check that the entry is correct.
    try
    {
      ProgressDialog dlg = new ProgressDialog(
          Utilities.getFrame(this),
          Utilities.getFrame(this),
          INFO_CTRL_PANEL_MODIFYING_ENTRY_CHANGES_TITLE.get(), getInfo());
      dlg.setModal(modal);
      Entry entry = displayedEntryPanel.getEntry();


short preamble"]
pub const wifi_phy_rate_t_WIFI_PHY_RATE_2M_S: wifi_phy_rate_t = 5;
#[doc = "< 5.5 Mbps with short preamble"]
pub const wifi_phy_rate_t_WIFI_PHY_RATE_5M_S: wifi_phy_rate_t = 6;
#[doc = "< 11 Mbps with short preamble"]
pub const wifi_phy_rate_t_WIFI_PHY_RATE_11M_S: wifi_phy_rate_t = 7;
#[doc = "< 48 Mbps"]
pub const wifi_phy_rate_t_WIFI_PHY_RATE_48M: wifi_phy_rate_t = 8;
#[doc = "< 24 Mbps"]
pub const wifi_phy_rate_t_WIFI_PHY_RATE_24M: wifi_phy_rate_t = 9;
#[doc = "< 12 Mbps"]
pub const wifi_phy_rate_t_WIFI_PHY_RATE_12M: wifi_phy_rate_t = 10;
#[doc = "< 6 Mbps"]
pub const wifi_phy_rate_t_WIFI_PHY_RATE_6M: wifi_phy_rate_t = 11;
#[doc = "< 54 Mbps"]
pub const wifi_phy_rate_t_WIFI_PHY_RATE_54M: wifi_phy_rate_t = 12;
#[doc = "< 36 Mbps"]
pub const wifi_phy_rate_t_WIFI_PHY_RATE_36M: wifi_phy_rate_t = 13;
#[doc = "< 18 Mbps"]
pub const wifi_phy_rate_t_WIFI_PHY_RATE_18M: wifi_phy_rate_t = 14;
#[doc = "< 9 Mbps"]
pub const wifi_phy_rate_t_WIFI_PHY_RATE_9M: wifi_phy_rate_t = 15;
#[doc = "< MCS0 with long GI, 6.5 Mbps for 20MHz, 13.5 Mbps for 40MHz"]
pub const wifi_phy_rate_t_WIFI_PHY_RATE_MCS0_LGI: wifi_phy_rate_t = 16;
#[doc = "< MCS1 with long GI, 13 Mbps for 20MHz, 27 Mbps for 40MHz"]
pub const wifi_phy_rate_t_WIFI_PHY_RATE_MCS1_LGI: wifi_phy_rate_t = 17;
#[doc = "< MCS2 with long GI, 19.5 Mbps for 20MHz, 40.5 Mbps for 40MHz"]
pub const wifi_phy_rate_t_WIFI_PHY_RATE_MCS2_LGI: wifi_phy_rate_t = 18;
#[doc = "< MCS3 with long GI, 26 Mbps for 20MHz, 54 Mbps for 40MHz"]
pub const wifi_phy_rate_t_WIFI_PHY_RATE_MCS3_LGI: wifi_phy_rate_t = 19;
#[doc = "< MCS4 with long GI, 39 Mbps for 20MHz, 81 Mbps for 40MHz"]
pub const wifi_phy_rate_t_WIFI_PHY_RATE_MCS4_LGI: wifi_phy_rate_t = 20;
#[doc = "< MCS5 with long GI, 52 Mbps for 20MHz, 108 Mbps for 40MHz"]
pub const wifi_phy_rate_t_WIFI_PHY_RATE_MCS5_LGI: wifi_phy_rate_t = 21;
#[doc = "< MCS6 with long GI, 58.5 Mbps for 20MHz, 121.5 Mbps for 40MHz"]
pub const wifi_phy_rate_t_WIFI_PHY_RATE_MCS6_LGI: wifi_phy_rate_t = 22;
#[doc = "< MCS7 with long GI, 65 Mbps for 20MHz, 135 Mbps for 40MHz"]
pub const wifi_phy_rate_t_WIFI_PHY_RATE_MCS7_LGI: wifi_phy_rate_t = 23;
#[doc = "< MCS0 with short GI, 7.2 Mbps for 20MHz, 15 Mbps for 40MHz"]
pub const wifi_phy_rate_t_WIFI_PHY_RATE_MCS0_SGI: wifi_phy_rate_t = 24;
#[doc = "< MCS1 with short GI, 14.4 Mbps for 20MHz, 30 Mbps for 40


y-axis x-coordinate
	 * @param yy
	 *            y-axis y-coordinate
	 * @param yz
	 *            y-axis z-coordinate
	 * @param zx
	 *            z-axis x-coordinate
	 * @param zy
	 *            z-axis y-coordinate
	 * @param zz
	 *            z-axis z-coordinate
	 */
	public Quaternion setFromAxes(boolean normalizeAxes, float xx, float xy, float xz, float yx, float yy, float yz,
			float zx, float zy, float zz) {
		if (normalizeAxes) {
			final float lx = 1f / Vector3.len(xx, xy, xz);
			final float ly = 1f / Vector3.len(yx, yy, yz);
			final float lz = 1f / Vector3.len(zx, zy, zz);
			xx *= lx;
			xy *= lx;
			xz *= lx;
			yx *= ly;
			yy *= ly;
			yz *= ly;
			zx *= lz;
			zy *= lz;
			zz *= lz;
		}
		// the trace is the sum of the diagonal elements; see
		// http://mathworld.wolfram.com/MatrixTrace.html
		final float t = xx + yy + zz;

		// we protect the division by s by ensuring that s>=1
		if (t >= 0) { // |w| >= .5
			float s = (float) Math.sqrt(t + 1); // |s|>=1 ...
			w = 0.5f * s;
			s = 0.5f / s; // so this division isn't bad
			x = (zy - yz) * s;
			y = (xz - zx) * s;
			z = (yx - xy) * s;
		} else if ((xx > yy) && (xx > zz)) {
			float s = (float) Math.sqrt(1.0 + xx - yy - zz); // |s|>=1
			x = s * 0.5f; // |x| >= .5
			s = 0.5f / s;
			y = (yx + xy) * s;
			z = (xz + zx) * s;
			w = (zy - yz) * s;
		} else if (yy > zz) {
			float s = (float) Math.sqrt(1.0 + yy - xx - zz); // |s|>=1
			y = s * 0.5f; // |y| >= .5
			s = 0.5f / s;
			x = (yx + xy) * s;
			z = (zy + yz) * s;
			w = (xz - zx) * s;
		} else {
			float s = (float) Math.sqrt(1.0 + zz - xx - yy); // |s|>=1
			z = s * 0.5f; // |z| >= .5
			s = 0.5f / s;
			x = (xz + zx) * s;
			y = (zy + yz) * s;
			w = (yx - xy) * s;
		}

		return this;
	}

	/**
	 * Set this quaternion to the rotation between two vectors.
	 *
	 * @param v1
	 *            The base vector, which should be normalized.
	 * @param v2
	 *            The target vector, which should be normalized.
	 * @return This quaternion for chaining
	 */
	public Quaternion setFromCross(final Vector3 v1, final Vector3 v2) {
		final float dot = MathUtil.clamp(v1.dot(v2), -1f, 1f);
		final float angle = (float) Math.acos(dot);
		return setFromAxisRad(v1.y * v2.z - v1.z * v2.y, v1.z * v2.x - v1.x * v2.z, v1.x * v2.y - v1.y * v2.x, angle);
	}

	/**
	 * Set this quaternion to the rotation between two vectors.
	 *
	 * @param x1
	 *            The base vectors x value, which should be normalized.
	 * @param y1
	 *            The base vectors y value, which should be normalized.
	 * @param z1
	 *            The base vectors z value, which should be normalized.
	 * @param x2
	 *            The target vector x value, which should be normalized.
	 * @pa


//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by \generate-code.bat.
//
//     Changes to this file will be lost when the code is regenerated.
//     The build server regenerates the code before each build and a pre-build
//     step will regenerate the code on each local build.
//
//     See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units.
//
//     Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities.
//     Add UnitDefinitions\MyQuantity.json and run generate-code.bat to generate new units or quantities.
//
// </auto-generated>
//------------------------------------------------------------------------------

// Licensed under MIT No Attribution, see LICENSE file at the root.
// Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet.

using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Threading;
using UnitsNet.InternalHelpers;
using UnitsNet.Tests.Helpers;
using UnitsNet.Tests.TestsBase;
using UnitsNet.Units;
using Xunit;

// Disable build warning CS1718: Comparison made to same variable; did you mean to compare something else?
#pragma warning disable 1718

// ReSharper disable once CheckNamespace
namespace UnitsNet.Tests
{
    /// <summary>
    /// Test of RadiationExposure.
    /// </summary>
// ReSharper disable once PartialTypeWithSinglePart
    public abstract partial class RadiationExposureTestsBase : QuantityTestsBase
    {
        protected abstract double CoulombsPerKilogramInOneCoulombPerKilogram { get; }
        protected abstract double MicrocoulombsPerKilogramInOneCoulombPerKilogram { get; }
        protected abstract double MicroroentgensInOneCoulombPerKilogram { get; }
        protected abstract double MillicoulombsPerKilogramInOneCoulombPerKilogram { get; }
        protected abstract double MilliroentgensInOneCoulombPerKilogram { get; }
        protected abstract double NanocoulombsPerKilogramInOneCoulombPerKilogram { get; }
        protected abstract double PicocoulombsPerKilogramInOneCoulombPerKilogram { get; }
        protected abstract double RoentgensInOneCoulombPerKilogram { get; }

// ReSharper disable VirtualMemberNeverOverriden.Global
        protected virtual double CoulombsPerKilogramTolerance { get { return 1e-5; } }
        protected virtual double MicrocoulombsPerKilogramTolerance { get { return 1e-5; } }
        protected virtual double MicroroentgensTolerance { get { return 1e-5; } }
        protected virtual double MillicoulombsPerKilogramTolerance { get { return 1e-5; } }
        protected virtual double MilliroentgensTolerance { get { return 1e-5; } }
        protected virtual double NanocoulombsPerKilogramTolerance { get { return 1e-5; } }
        protected virtual double PicocoulombsPerKilogramTolerance { get { return 1e-5; } }
        protected virtual double RoentgensTolerance { get { return 1e-5; } }
// ReSharper restore VirtualMemberNeverOverriden.Global

        protected (double UnitsInBaseUnit, double Tolerence) GetConversionFactor(RadiationExposureUnit unit)
        {
            return unit switch
            {
                RadiationExposureUnit.CoulombPerKilogram => (CoulombsPerKilogramInOneCoulombPerKilogram, CoulombsPerKilogramTolerance),
                RadiationExposureUnit.MicrocoulombPerKilogram => (MicrocoulombsPerKilogramInOneCoulombPerKilogram, MicrocoulombsPerKilogramTolerance),
                RadiationExposureUnit.Microroentgen => (MicroroentgensInOne


！”宁夕意外救了只小包子，结果被附赠了一只大包子。婚后，陆霆骁宠妻如命千依百顺，虐起狗来连亲儿子都不放过。“老板，公司真给夫人拿去玩？难道夫人要卖公司您也不管？”“卖你家公司了？”“大少爷，不好了！夫人说要把屋顶掀了！”“还不去帮夫人扶梯子。”“粑粑，谢谢你给小宝买的大熊！”“那是买给你妈妈的。”“老公，这个剧本我特别喜欢，只是床戏有点多，我可以接吗？”陆霆骁神色淡定：“可以。”当天晚上，宁夕扶着腰连滚带爬逃下床。陆霆骁！可以你大爷！！！",
                "cover": "/agent/http%3A%2F%2Fimg.1391.com%2Fapi%2Fv1%2Fbookcenter%2Fcover%2F1%2F86590%2F86590_9ec02fe59dbd40b999c420fcc43a75b0.jpg%2F",
                "site": "zhuishuvip",
                "banned": 0,
                "latelyFollower": 82377,
                "retentionRatio": "45.82"
            }...
        ],
        "id": "54d43437d47d13ff21cad58b",
        "total": 98
    },
    "ok": true
}
```

### 3. 获取主题书单列表

**请求URL：**`http://api.zhuishushenqi.com/book-list`

**示例：**

[http://api.zhuishushenqi.com/book-list?duration=all&sort=collectorCount&start=0&limit=20&tag=古代&gender=male](http://api.zhuishushenqi.com/book-list?duration=all&sort=collectorCount&start=0&limit=20&tag=古代&gender=male)

**请求方式**

```shell
GET
```

**参数类型：query**

| 参数     | 是否必选 | 类型   | 说明                                                         |
| -------- | -------- | ------ | ------------------------------------------------------------ |
| duration | 是       | string | 本周最热：duration=last-seven-days&sort=collectorCount,最新发布：duration=all&sort=created,最多收藏：duration=all&sort=collectorCount |
| sort     | 是       | string | 看上个参数                                                   |
| start    | 是       | string | 起始位置从0开始                                              |
| limit    | 是       | string | 20                                                           |
| tag      | 是       | string | 都市、古代、架空、重生、玄幻、网游                           |
| gender   | 是       | string | male、female                                                 |

**返回示例：**

```json
{
    "total": 1916,
    "bookLists": [
        {
            "_id": "5659f9c28498cf236a508b08",
            "title": "无敌爽文🐎",
            "author": "原罪&七罪",
            "desc": "本人很,懒喜欢的收藏  经典📚无限📘  粮草&储备   ♞♞ 挑灯💡夜读📖   🌙",
            "gender": "male",
            "collectorCount": 31459,
            "cover": "/agent/http%


 - операторът за деление се показва с наклонена черта, като всички символи във формулата са подредени на един ред.

Относно останалите параметри, се прилагат следните общи правила:

Интервалите между символите се управляват автоматично, независимо от въведените в програмния код.

Променливите се форматират като <var>курсив</var>, както и мерните единици, но с различен цвят.

Операторът за умножение"*" се замества със символа "∙".

Операторът за степенуване "^" се форматира като горен индекс.

Първата долна черта в име на функция или променлива "_" се форматира като долен индекс.

Функцията sqr се замества със символа за коренуване "√ ".

По-долу са показани различни примери за форматиране на изрази:

                    Текст
                    Html

                    x  +  3
                    <var>x</var> + 3

                    x-3
                    <var>x</var> – 3

                    3*x
                    3∙<var>x</var>

                    (x + 1)/3
                    (<var>x</var> + 1)/3 или <var>x</var> + 13

                    x+3 * y
                    <var>x</var> + 3∙<var>y</var>

                    sqr(x+3)
                    √<var>x</var> + 3

                    x_1^3
                    <var>x</var>13

                    si


            snprintf(path, sizeof(path), "%s/%s", dirname, entry->d_name);

            if (openJoystickDevice(path))
                count++;
        }

        closedir(dir);
    }

    // Continue with no joysticks if enumeration fails

    qsort(_glfw.joysticks, count, sizeof(_GLFWjoystick), compareJoysticks);
    return GLFW_TRUE;
}

// Close all opened joystick handles
//
void _glfwTerminateJoysticksLinux(void)
{
    int jid;

    for (jid = 0;  jid <= GLFW_JOYSTICK_LAST;  jid++)
    {
        _GLFWjoystick* js = _glfw.joysticks + jid;
        if (js->present)
            closeJoystick(js);
    }

    regfree(&_glfw.linjs.regex);

    if (_glfw.linjs.inotify > 0)
    {
        if (_glfw.linjs.watch > 0)
            inotify_rm_watch(_glfw.linjs.inotify, _glfw.linjs.watch);

        close(_glfw.linjs.inotify);
    }
}

void _glfwDetectJoystickConnectionLinux(void)
{
    ssize_t offset = 0;
    char buffer[16384];

    if (_glfw.linjs.inotify <= 0)
        return;

    const ssize_t size = read(_glfw.linjs.inotify, buffer, sizeof(buffer));

    while (size > offset)
    {
        regmatch_t match;
        const struct inotify_event* e = (struct inotify_event*) (buffer + offset);

        offset += sizeof(struct inotify_event) + e->len;

        if (regexec(&_glfw.linjs.regex, e->name, 1, &match, 0) != 0)
            continue;

        char path[PATH_MAX];
        snprintf(path, sizeof(path), "/dev/input/%s", e->name);

        if (e->mask & (IN_CREATE | IN_ATTRIB))
            openJoystickDevice(path);
        else if (e->mask & IN_DELETE)
        {
            int jid;

            for (jid = 0;  jid <= GLFW_JOYSTICK_LAST;  jid++)
            {
                if (strcmp(_glfw.joysticks[jid].linjs.path, path) == 0)
                {
                    closeJoystick(_glfw.joysticks + jid);
                    break;
                }
            }
        }
    }
}

//////////////////////////////////////////////////////////////////////////
//////                       GLFW platform API                      //////
//////////////////////////////////////////////////////////////////////////

int _glfwPlatformPollJoystick(_GLFWjoystick* js, int mode)
{
    // Read all queued events (non-blocking)
    for (;;)
    {
        struct input_event e;

        errno = 0;
        if (read(js->linjs.fd, &e, sizeof(e)) < 0)
        {
            // Reset the joystick slot if the device was disconnected
            if (errno == ENODEV)
                closeJoystick(js);

            break;
        }

        if (e.type == EV_SYN)
        {
            if (e.code == SYN_DROPPED)
                _glfw.linjs.dropped = GLFW_TRUE;
            else if (e.code == SYN_REPORT)
            {
                _glfw.linjs.dropped = GLFW_FALSE;
                pollAbsState(js);
            }
        }

        if (_glfw.linjs.dropped)
            continue;

        if (e.type == EV_KEY)
            handleKeyEvent(js, e.code, e.value);
        else if (e.type == EV_ABS)
            handleAbsEvent(js, e.code, e.value);
    }

    return js->present;
}

void _glfwPlatformUpdateGamepadGUID(char* guid)
{
}


_id": "3716"
	},
	{
		"id": "40798",
		"name": "DilovasÃ„Â±",
		"state_id": "3716"
	},
	{
		"id": "40799",
		"name": "Gebze",
		"state_id": "3716"
	},
	{
		"id": "40800",
		"name": "Golcuk",
		"state_id": "3716"
	},
	{
		"id": "40801",
		"name": "Izmit",
		"state_id": "3716"
	},
	{
		"id": "40802",
		"name": "Kandira",
		"state_id": "3716"
	},
	{
		"id": "40803",
		"name": "Karamursel",
		"state_id": "3716"
	},
	{
		"id": "40804",
		"name": "Kocaeli",
		"state_id": "3716"
	},
	{
		"id": "40805",
		"name": "Korfez",
		"state_id": "3716"
	},
	{
		"id": "40806",
		"name": "Ahirli",
		"state_id": "3717"
	},
	{
		"id": "40807",
		"name": "Akoren",
		"state_id": "3717"
	},
	{
		"id": "40808",
		"name": "Aksehir",
		"state_id": "3717"
	},
	{
		"id": "40809",
		"name": "Altinekin",
		"state_id": "3717"
	},
	{
		"id": "40810",
		"name": "Beysehir",
		"state_id": "3717"
	},
	{
		"id": "40811",
		"name": "Bozkir",
		"state_id": "3717"
	},
	{
		"id": "40812",
		"name": "Cihanbeyli",
		"state_id": "3717"
	},
	{
		"id": "40813",
		"name": "Cumra",
		"state_id": "3717"
	},
	{
		"id": "40814",
		"name": "Derbent",
		"state_id": "3717"
	},
	{
		"id": "40815",
		"name": "Derebucak",
		"state_id": "3717"
	},
	{
		"id": "40816",
		"name": "Doganhisar",
		"state_id": "3717"
	},
	{
		"id": "40817",
		"name": "Emirgazi",
		"state_id": "3717"
	},
	{
		"id": "40818",
		"name": "Eregli",
		"state_id": "3717"
	},
	{
		"id": "40819",
		"name": "Guneysinir",
		"state_id": "3717"
	},
	{
		"id": "40820",
		"name": "Hadim",
		"state_id": "3717"
	},
	{
		"id": "40821",
		"name": "Halkapinar",
		"state_id": "3717"
	},
	{
		"id": "40822",
		"name": "Huyuk",
		"state_id": "3717"
	},
	{
		"id": "40823",
		"name": "Ilgin",
		"state_id": "3717"
	},
	{
		"id": "40824",
		"name": "Kadinhani",
		"state_id": "3717"
	},
	{
		"id":


fFloat(this, View.ALPHA, 0F, 1F).apply {
        addListener(object : AnimatorListener {
            override fun onAnimationStart(animation: Animator?) {
                super.onAnimationStart(animation)
                this@fadeIn.visibility = View.VISIBLE
                this@fadeIn.isEnabled = true
                removeListener(this)
            }
        })
        setDuration(duration)
        setStartDelay(startDelay)
        start()

    }
}

/**
 *  Fades in this view and fades out the [otherView] view simultaneously
 *  @param  otherView the view to fade out
 *  @param duration duration of the animation
 *  @param visibility The visibility of [otherView] at the end of the animation
 */
fun View.crossFadeWidth(
    otherView: View,
    duration: Long = 1000,
    startDelay: Long = 0,
    visibility: Int = View.GONE
): AnimatorSet {
    val fadeIn = ObjectAnimator.ofFloat(this, View.ALPHA, 0F, 1F)
    val fadeOut = ObjectAnimator.ofFloat(otherView, View.ALPHA, 1F, 0F)

    return AnimatorSet().apply {
        addListener(object : AnimatorListener {
            override fun onAnimationStart(animation: Animator?) {
                super.onAnimationStart(animation)
                this@crossFadeWidth.isEnabled = true
                otherView.isEnabled = false
                this@crossFadeWidth.visibility = View.VISIBLE
            }

            override fun onAnimationEnd(animation: Animator?) {
                super.onAnimationEnd(animation)
                otherView.visibility = visibility
                this@apply.removeListener(this)
            }
        })
        setDuration(duration)
        setStartDelay(startDelay)
        playTogether(
            fadeIn,
            fadeOut
        )
        start()
    }
}

fun Bitmap.inputStream(quality: Int = 80): InputStream {
    val bos = ByteArrayOutputStream()
    compress(Bitmap.CompressFormat.JPEG, quality, bos)
    return ByteArrayInputStream(bos.toByteArray())
}

fun String?.contains(other: String?, caseSensitive: Boolean = true): Boolean {
    if (this == null && other == null) return true
    if (this != null && other != null) return contains(ignoreCase = caseSensitive, other = other)
    return false
}

/**
 * Helper extension to URL encode a [String]. Returns an empty string when called on null.
 */
inline val String?.urlEncoded: String
    get() = if (Charset.isSupported("UTF-8")) {
        URLEncoder.encode(this ?: "", "UTF-8")
    } else {
        // If UTF-8 is not supported, use the default charset.
        @Suppress("deprecation")
        URLEncoder.encode(this ?: "")
    }
internal val Long.urlEncoded: String get() = this.toString().urlEncoded

fun <T> LiveData<T>.observeOnce(lifecycleOwner: LifecycleOwner, observer: Observer<T>) {
    observe(lifecycleOwner, object : Observer<T> {
        override fun onChanged(t: T?) {
            observer.onChanged(t)
            removeObserver(this)
        }
    })
}

/**
 * Helper extension to convert a potentially null [String] to a [Uri] falling back to [Uri.EMPTY]
 */
fun String?.toUri(): Uri = this?.let { Uri.parse(it) } ?: Uri.EMPTY

/**
 * Converts an Int in pixels to dp(density independent pixels)
 */
val Int.dp: Int get() = (this / Resources.getSystem().displayMetrics.density).toInt()

/**
 * Converts an Int in dp(density independent pixels) to pixels
 */
val Int.px: Int get() = (this * Resources.getSystem().displayMetrics.density).toInt()

/**
 * Converts an Float in pixels to dp(density independent pixels)
 */
val Float.dp: Float get() = (this / Resources.get


a> 6 _+′_
_+′_ : ∀ {m n} (i : Fin m) (j : Fin n) → Fin (ℕ.pred m ℕ.+ n)
i +′ j = inject≤ (i + j) (ℕₚ.+-monoˡ-≤ _ (<a id="33025" href="Data.Fin.Properties


#!/usr/bin/env python
# encoding: utf-8
'''
@author: LoRexxar
@contact: lorexxar@gmail.com
@file: BugcrowdSpider.py
@time: 2020/8/4 15:30
@desc:

'''

from django.core.management.base import BaseCommand

from web.vultargetspider.controller.bugcrowd import BugcrowdSpider

from utils.log import logger

import sys
import traceback

class Command(BaseCommand):
    help = 'spider for Bugcrowd'

    def add_arguments(self, parser):
        # Positional arguments
        parser.add_argument('appname', type=str)

    def handle(self, *args, **options):

        try:
            if 'appname' not in options:
                logger.error('[Bugcrowd Spider] no appname input.')
                sys.exit(0)

            logger.info("[Bugcrowd Spider] Bugcrowd {} Scope spider start.".format(options['appname']))
            h = BugcrowdSpider()
            result_list = h.spider(options['appname'])

            for result in result_list:
                print(result)

        except KeyboardInterrupt:
            logger.warn("[Spider] stop monitor.")
            sys.exit(0)
        except:
            logger.error("[Spider] something error, {}".format(traceback.format_exc()))


Call, Inc.` | 18/07/2023 |
| `Venture Drilling Supply` | 17/07/2023 |
| `CPA Advisors Group` | 14/07/2023 |
| `Info Salons` | 14/07/2023 |
| `Telepizza` | 13/07/2023 |
| `The Traffic Tech` | 13/07/2023 |
| `Quikcard Solutions Inc.` | 13/07/2023 |
| `Jadranka Group` | 13/07/2023 |
| `Dental One Craigieburn` | 13/07/2023 |
| `ANL Packaging` | 13/07/2023 |
| `BTU` | 13/07/2023 |
| `Pesquera Diamante S.A.` | 11/07/2023 |
| `Weitkamp · Hirsch and Kollegen Steuerberatungsgesellschaft mbH` | 11/07/2023 |
| `Kansas medical center LLC` | 11/07/2023 |
| `Danbury Public Schools` | 11/07/2023 |
| `Advanced Fiberglass Industries` | 11/07/2023 |
| `Citelis Mobility` | 11/07/2023 |
| `Motor Components, LLC` | 11/07/2023 |
| `Cabra Consulting Ltd` | 09/07/2023 |
| `New Century Advisors, LLC` | 07/07/2023 |
| `ROBERT L BAYLESS PRODUCER LLC` | 07/07/2023 |
| `KIRWIN FRYDAY MEDCALF Lawyers LLP` | 06/07/2023 |
| `Polanglo` | 04/07/2023 |
| `ISPE Connecting Pharmaceutical Knowledge` | 28/06/2023 |
| `PORTERROOFING` | 28/06/2023 |
| `CON-STRUCT` | 28/06/2023 |
| `JOB-SA BETON J.O.B SA` | 26/06/2023 |
| `CLEAR MEDI HEALTHCARE` | 26/06/2023 |
| `Lysander Shipping` | 26/06/2023 |
| `LEGALILAVORO` | 26/06/2023 |
| `PNEUMAX` | 26/06/2023 |
| `CYBERFREIGHT SYSTEMS MARITIMES INC.` | 21/06/2023 |
| `SITARA` | 21/06/2023 |
| `The Akin Law LLC` | 20/06/2023 |
| `MAXIMUM PRIME ALIMENTOS EIRELI` | 20/06/2023 |
| `Onsupport Corporation` | 19/06/2023 |
| `Texas Hotel and Lodging Association` | 19/06/2023 |
| `TARLE LAW, P.C.` | 19/06/2023 |
| `PrintGlobe, Inc.` | 19/06/2023 |
| `BLUESAGE` | 19/06/2023 |
| `Futura Agronegócios` | 19/06/2023 |
| `LOONGSON` | 19/06/2023 |
| `PORTBLUE` | 19/06/2023 |
| `DANIEL C. HARRIS, O.D` | 15/06/2023 |
| `Hornbill` | 15/06/2023 |
| `Stone Fox Ventures` | 15/06/2023 |
| `Ligas Gerais Industria E Comercio` | 15/06/2023 |
| `Studio Legale Ranchino` | 15/06/2023 |
| `San Luis Obispo County Office of Education` | 15/06/2023 |
| `Law Offices of Sergio J. Siderman` | 15/06/2023 |
| `Law Society of South Africa` | 15/06/2023 |
| `Jeff Wyler Automotive Family, Inc.` | 13/06/2023 |
| `Transprensa` | 12/06/2023 |
| `CEMAF PARTICIPACOES E ADMINISTRACAO DE BENS LTDA` | 11/06/2023 |
| `Defesa da Classe Trabalhadora (Declatra)` | 11


 NewExtensions(generic.New(), webhooks.NewWebHook(http.NewServeMux()))
}

func defaultFixture() *agonesv1.Fleet {
	f := &agonesv1.Fleet{
		ObjectMeta: metav1.ObjectMeta{
			Name:      "fleet-1",
			Namespace: "default",
			UID:       "1234",
		},
		Spec: agonesv1.FleetSpec{
			Replicas:   5,
			Scheduling: apis.Packed,
			Template:   agonesv1.GameServerTemplateSpec{},
		},
	}
	f.ApplyDefaults()
	return f
}

func defaultGSSpec() *agonesv1.GameServerTemplateSpec {
	return &agonesv1.GameServerTemplateSpec{
		Spec: agonesv1.GameServerSpec{
			Container: "udp-server",
			Ports: []agonesv1.GameServerPort{{
				ContainerPort: 7654,
				Name:          "gameport",
				PortPolicy:    agonesv1.Dynamic,
				Protocol:      corev1.ProtocolUDP,
			}},
			Template: corev1.PodTemplateSpec{
				Spec: corev1.PodSpec{
					Containers: []corev1.Container{{
						Name:            "udp-server",
						Image:           "gcr.io/images/new:0.2",
						ImagePullPolicy: corev1.PullIfNotPresent,
						Resources: corev1.ResourceRequirements{
							Requests: corev1.ResourceList{
								corev1.ResourceCPU:    resource.MustParse("30m"),
								corev1.ResourceMemory: resource.MustParse("32Mi"),
							},
							Limits: corev1.ResourceList{
								corev1.ResourceCPU:    resource.MustParse("30m"),
								corev1.ResourceMemory: resource.MustParse("32Mi"),
							},
						},
					}},
				},
			},
		},
	}
}

func getAdmissionReview(raw []byte) admissionv1.AdmissionReview {
	gvk := metav1.GroupVersionKind(agonesv1.SchemeGroupVersion.WithKind("Fleet"))

	return admissionv1.AdmissionReview{
		Request: &admissionv1.AdmissionRequest{
			Kind:      gvk,
			Operation: admissionv1.Create,
			Object: runtime.RawExtension{
				Raw: raw,
			},
		},
		Response: &admissionv1.AdmissionResponse{Allowed: true},
	}
}

// MOCKS SECTION

type fakeGSSListerWithErr struct {
}

// GameServerSetLister interface implementation
func (fgsl *fakeGSSListerWithErr) List(_ labels.Selector) (ret []*v1.GameServerSet, err error) {
	return nil, errors.New("random-err")
}

// GameServerSetLister interface implementation
func (fgsl *fakeGSSListerWithErr) Get(_ string) (ret *v1.GameServerSet, err error) {
	return nil, errors.New("random-err")
}

func (fgsl *fakeGSSListerWithErr) GameServerSets(_ string) agonesv1client.GameServerSetNamespaceLister {
	return fgsl
}

type fakeFleetsGetterWithErr struct{}

// FleetsGetter interface implementation
func (ffg *fakeFleetsGetterWithErr) Fleets(_ string) agonesv1clientset.FleetInterface {
	return &fakeFleetsGetterWithErr{}
}

func (ffg *fakeFleetsGetterWithErr) Create(_ context.Context, _ *v1.Fleet, _ metav1.CreateOptions) (*v1.Fleet, error) {
	panic("not implemented")
}

func (ffg *fakeFleetsGetterWithErr) Update(_ context.Context, _ *v1.Fleet, _ metav1.UpdateOptions) (*v1.Fleet, error) {
	panic("not implemented")
}

func (ffg *fakeFleetsGetterWithErr) UpdateStatus(_ context.Context, _ *


"literal-block">
$ autoreconf -i

Also, you need Sphinx to build the man page.

If you are building aria2 for Mac OS X, take a look at
the makerelease-osx.mk GNU Make makefile.

The quickest way to build aria2 is first to run configure script:

$ ./configure

To build statically linked aria2, use <tt class="docutils literal">ARIA2_STATIC=yes</tt>
command-line option:

$ ./configure ARIA2_STATIC=yes

After configuration is done, run <tt class="docutils literal">make</tt> to compile the program:

$ make

See Cross-compiling Windows binary to create a Windows binary.
See Cross-compiling Android binary to create an Android binary.

The configure script checks available libraries and enables as many
features as possible except for experimental features not enabled by
default.

Since 1.1.0, aria2 checks the certificate of HTTPS servers by default.
If you build with OpenSSL or the recent version of GnuTLS which has
<tt class="docutils literal">gnutls_certificate_set_x509_system_trust()</tt> function and the
library is properly configured to locate the system-wide CA
certificates store, aria2 will automatically load those certificates
at the startup. If it is not the case, I recommend supplying the path
to the CA bundle file. For example, in Debian the path to CA bundle
file is '/etc/ssl/certs/ca-certificates.crt' (in ca-certificates
package). This may vary depending on your distribution. You can give
it to configure script using <tt class="docutils literal">--with-ca-bundle option</tt>:

$ ./configure --with-ca-bundle='/etc/ssl/certs/ca-certificates.crt'
$ make

Without <tt class="docutils literal">--with-ca-bundle</tt> option, you will encounter the error when
accessing HTTPS servers because the certificate cannot be verified
without the CA bundle. In such a case, you can specify the CA bundle file
using aria2's <tt class="docutils literal">--ca-certificate</tt> option.  If you don't have the CA bundle
file installed, then the last resort is to disable the certificate
validation using <tt class="docutils literal">--check-certificate=false</tt>.

Using the native OSX (AppleTLS) and/or Windows (WinTLS) implementation
will automatically use the system certificate store, so
<tt class="docutils literal">--with-ca-bundle</tt> is not necessary and will be ignored when using
these implementations.

By default, the bash_completion file named <tt class="docutils literal">aria2c</tt> is installed to
the directory <tt class="docutils literal">$prefix/share/doc/aria2/bash_completion</tt>.  To change
the install directory of the file, use <tt class="docutils literal">--with-bashcompletiondir</tt>


dMapList,ifs_ms_PlayList_layout_console)
	elseif (this.iState == ifs_ms_state.command) then
	   IFObj_fnSetVis(this.MapListbox, 1)
	   ifs_ms_MapList_layout_console.CursorIdx = nil
	   ListManager_fnFillContents(this.MapListbox,missionselect_listbox_contents,ifs_ms_MapList_layout_console)

	   IFObj_fnSetVis(this.ModeListbox, nil)
	   ifs_ms_ModeList_layout_console.CursorIdx = nil

	   IFObj_fnSetVis(this.EraListbox, nil)
	   ifs_ms_EraList_layout_console.CursorIdx = nil

	   ifs_ms_PlayList_layout_console.CursorIdx = nil
	   ListManager_fnFillContents(this.PlayListbox,gPickedMapList,ifs_ms_PlayList_layout_console)

	   ListManager_fnSetFocus(nil)
	elseif (this.iState == ifs_ms_state.playlist) then
	   IFObj_fnSetVis(this.MapListbox, 1)
	   ifs_ms_MapList_layout_console.CursorIdx = nil
	   ListManager_fnFillContents(this.MapListbox,missionselect_listbox_contents,ifs_ms_MapList_layout_console)
	   ListManager_fnSetFocus(this.MapListbox)

	   IFObj_fnSetVis(this.ModeListbox, nil)
	   ifs_ms_ModeList_layout_console.CursorIdx = nil

	   IFObj_fnSetVis(this.EraListbox, nil)
	   ifs_ms_EraList_layout_console.CursorIdx = nil

	   ifs_ms_PlayList_layout_console.CursorIdx = ifs_ms_PlayList_layout_console.SelectedIdx
	   ListManager_fnFillContents(this.PlayListbox,gPickedMapList,ifs_ms_PlayList_layout_console)
	   ListManager_fnSetFocus(this.PlayListbox)
	end

	-- Always update the other chunks. Those are split off into their own
	-- functions for readability
	ifs_missionselect_console_fnUpdateButtons(this)
	ifs_missionselect_console_fnUpdateHelptext(this)
	ifs_missionselect_console_fnUpdateInfoBoxes(this)
	ifs_missionselect_console_fnUpdateMovie(this)
end

-- Helper function: clears the playlist
function ifs_missionselect_console_fnClearPlaylist(this)
	gPickedMapList = {
		{ Map = gDelAllMapsStr, bIsRemoveAll = 1, },
	}
end

-- Callback function: list of maps is full, and user got a dialog to
-- that effect. This is called when that dialog is dismissed.
function ifs_missionselect_console_fnFullPopupDone()
	local this = ifs_missionselect_console
	ifs_missionselect_console_fnShowHideListboxes(this,1)
end

-- Helper function: given a map, mode & era, none of which are
-- wildcards, adds the map to the list.
function ifs_missionselect_console_fnAddMap4(this, MapSelection, ModeSelection, EraSelection)
	-- Map & mode must not be a wildcard to get here.
	assert(not MapSelection.bIsWildcard)
	assert(not ModeSelection.bIsWildcard)
	assert(not EraSelection.bIsWildcard)

	local Idx = table.getn(gPickedMapList) + 1

	-- If playlist is full, notify the user, don't add it.
	if(Idx > (this.iMaxMissions+1)) then
		ifs_missionselect_console_fnShowHideListboxes(this,nil)
		Popup_Ok.fnDone = ifs_missionselect_console_fnFullPopupDone
		Popup_Ok:fnActivate(1)
		gPopup_fnSetTitleStr(Popup_Ok, "ifs.missionselect.listfull")
		return
	end

	local NewMapfile = string.format(MapSelection.


/* Generated by RuntimeBrowser
   Image: /System/Library/PrivateFrameworks/iWorkImport.framework/iWorkImport
 */

@interface KNBuildAttributeTuple : TSPObject <NSCopying> {
    KNBuildAttributeValue * _attributeValue;
    KNBuildChunkIdentifier * _buildChunkIdentifier;
    NSUUID * _buildId;
    bool  _definedAttributeValue;
    bool  _definedBuildChunkIdentifier;
    bool  _definedBuildId;
    NSString * _property;
}

@property (nonatomic, readonly) KNBuild *build;
@property (nonatomic, readonly) KNBuildChunk *chunk;
@property (nonatomic, readonly) bool isBuildTuple;
@property (nonatomic, readonly) bool isChunkTuple;
@property (nonatomic, readonly) NSString *property;
@property (nonatomic, readonly) KNBuildAttributeValue *value;

+ (id)tupleForBuild:(id)arg1 property:(id)arg2 value:(id)arg3;
+ (id)tupleWithChunk:(id)arg1 property:(id)arg2 value:(id)arg3;
+ (id)tupleWithChunk:(id)arg1 referent:(unsigned long long)arg2;

- (id)build;
- (id)chunk;
- (id)copyWithZone:(struct _NSZone { }*)arg1;
- (id)description;
- (id)initWithBuild:(id)arg1 chunk:(id)arg2 property:(id)arg3 value:(id)arg4;
- (id)initWithBuild:(id)arg1 property:(id)arg2 value:(id)arg3;
- (id)initWithChunk:(id)arg1 property:(id)arg2 value:(id)arg3;
- (bool)isBuildTuple;
- (bool)isChunkTuple;
- (bool)isValidForSlide:(id)arg1;
- (id)property;
- (id)value;

@end


  ipairs(
            EntityGetComponent(
                (projectile_thats_responsible ~= 0 and projectile_thats_responsible) or entity_thats_responsible,
                "VariableStorageComponent"
            ) or {}
        )
    do
        if ComponentGetValue2(v, "name") == "ew_gid_lid" then
            gid = v
            break
        end
    end
    if dtypes == 1 and gid ~= nil and ComponentGetValue2(gid, "value_bool") then
        -- Damage the client
        CrossCall("ew_ds_client_damaged", EntityGetName(entity_id), damage, message)
    end
end


);
		}

		Map<String, String> templateContent = new HashMap<>();
		templateEmail.getTemplateParts().keySet().stream()
			.forEach(key -> templateContent.put(key.getKey(), templateEmail.getTemplateParts().get(key)));

		return templateContent;
	}

}/*
 * Copyright (c), Eclipse Foundation, Inc. and its licensors.
 *
 * All rights reserved.
 *
 * This program and the accompanying materials are made available under the
 * terms of the Eclipse Distribution License v1.0, which is available at
 * https://www.eclipse.org/org/documents/edl-v10.php
 *
 * SPDX-License-Identifier: BSD-3-Clause
 */
package jakarta.tutorial.websimplemessage;

import java.util.logging.Level;
import java.util.logging.Logger;

import jakarta.annotation.Resource;
import jakarta.enterprise.context.RequestScoped;
import jakarta.faces.application.FacesMessage;
import jakarta.faces.context.FacesContext;
import jakarta.inject.Inject;
import jakarta.inject.Named;
import jakarta.jms.JMSConsumer;
import jakarta.jms.JMSContext;
import jakarta.jms.JMSRuntimeException;
import jakarta.jms.Queue;

@Named
@RequestScoped
public class ReceiverBean {

    static final Logger logger = Logger.getLogger("ReceiverBean");
    @Inject
    private JMSContext context;
    @Resource(lookup = "java:comp/jms/webappQueue")
    private Queue queue;

    /**
     * Creates a new instance of ReceiverBean
     */
    public ReceiverBean() {
    }

    /*
     * Within a try-with-resources block, create context.
     * Create consumer, then receive message, using a timeout.
     * Create FacesMessage to display on page.
     */
    public void getMessage() {
        try {
            JMSConsumer receiver = context.createConsumer(queue);
            String text = receiver.receiveBody(String.class, 1000);

            if (text != null) {
                FacesMessage facesMessage =
                        new FacesMessage("Reading message: " + text);
                FacesContext.getCurrentInstance().addMessage(null, facesMessage);
            } else {
                FacesMessage facesMessage =
                        new FacesMessage("No message received after 1 second");
                FacesContext.getCurrentInstance().addMessage(null, facesMessage);
            }
        } catch (JMSRuntimeException t) {
            logger.log(Level.SEVERE,
                    "ReceiverBean.getMessage: Exception: {0}",
                    t.toString());
        }
    }
}
/*
 * Copyright (c), Eclipse Foundation, Inc. and its licensors.
 *
 * All rights reserved.
 *
 * This program and the accompanying materials are made available under the
 * terms of the Eclipse Distribution License v1.0, which is available at
 * https://www.eclipse.org/org/documents/edl-v10.php
 *
 * SPDX-License-Identifier: BSD-3-Clause
 */
package jakarta.tutorial.batch.webserverlog.items;

/* Represents a line in the input log file
   Used as input items in the ItemReader implementation */
public class LogLine {

    private final String datetime;
    private final String ipaddr;
    private final String browser;
    private final String url;

    /* Construct the line from individual items */
    public LogLine(String datetime, String ipaddr,
        String browser, String url) {
        this.datetime = datetime;
        this.ipaddr = ipaddr;
        this.browser = browser;
        this.url = url;
    }

    /* Construct an item from a log line */
    public LogLine(String line) {
        //System.out.println(line);
        String[] result = line.split(", ");
        this.datetime = result[0];
        this.ipaddr = result[1];
        this.browser = result[2];
        this.url = result[


ve.l	sample_buff2_mix,buffmixadr(a6)
	add.l	#2500,buffmixadr(a6)
ok2_2:
	cmp.w	#2,what
	bne.s	ok3_2
	move.l	sample_buff2_mix,buffmixadr(a6)
	add.l	#5000,buffmixadr(a6)
ok3_2:
	bsr.w	mainproc
	move.w	d0,oldd0(a6)
	move.w	d1,oldd1(a6)
	move.w	d2,oldd2(a6)
	move.w	d3,oldd3(a6)
	move.w	d4,oldd4(a6)
	move.w	d5,oldd5(a6)
	move.w	d6,oldd6(a6)
*-------------------- channel 3a,3b mix ---------------------------
	lea	chanarea(a6),a6
	lea	sample_pos3,a2	; sample positions
	move.w	oldd0(a6),d0
	move.w	oldd1(a6),d1
	move.w	oldd2(a6),d2
	move.w	oldd3(a6),d3
	move.w	oldd4(a6),d4
	move.w	oldd5(a6),d5
	move.w	oldd6(a6),d6
	lea	8(a1),a1

	tst.w	what
	bne.s	ok1_3
	move.l	sample_buff3_mix,buffmixadr(a6)
ok1_3:
	cmp.w	#1,what
	bne.s	ok2_3
	move.l	sample_buff3_mix,buffmixadr(a6)
	add.l	#2500,buffmixadr(a6)
ok2_3:
	cmp.w	#2,what
	bne.s	ok3_3
	move.l	sample_buff3_mix,buffmixadr(a6)
	add.l	#5000,buffmixadr(a6)
ok3_3:
	bsr.w	mainproc
	move.w	d0,oldd0(a6)
	move.w	d1,oldd1(a6)
	move.w	d2,oldd2(a6)
	move.w	d3,oldd3(a6)
	move.w	d4,oldd4(a6)
	move.w	d5,oldd5(a6)
	move.w	d6,oldd6(a6)
*-------------------- channel 4a,4b mix ---------------------------
	lea	chanarea(a6),a6
	lea	sample_pos4,a2	; sample positions
	move.w	oldd0(a6),d0
	move.w	oldd1(a6),d1
	move.w	oldd2(a6),d2
	move.w	oldd3(a6),d3
	move.w	oldd4(a6),d4
	move.w	oldd5(a6),d5
	move.w	oldd6(a6),d6
	lea	8(a1),a1

	tst.w	what
	bne.s	ok1_4
	move.l	sample_buff4_mix,buffmixadr(a6)
ok1_4:
	cmp.w	#1,what
	bne.s	ok2_4
	move.l	sample_buff4_mix,buffmixadr(a6)
	add.l	#2500,buffmixadr(a6)
ok2_4:
	cmp.w	#2,what
	bne.s	ok3_4
	move.l	sample_buff4_mix,buffmixadr(a6)
	add.l	#5000,buffmixadr(a6)
ok3_4:


| 1970-01-01T00:00:00.000000036Z |", // in group 1 - seq_num: 1
    //         "| Boston     | mon |      | 1970-01-01T00:00:00.000000038Z |", // in group 3 - seq_num: 5
    //         "| Medford    | sun | 55   | 1970-01-01T00:00:00.000000022Z |", // in group 4 - seq_num: 7
    //         "| Medford    | wed |      | 1970-01-01T00:00:00.000000026Z |", // in group 2 - seq_num: 4
    //         "| Reading    | mon | 58   | 1970-01-01T00:00:00.000000040Z |", // in group 4 - seq_num: 8
    //         "| Wilmington | mon |      | 1970-01-01T00:00:00.000000035Z |", // in group 3 - seq_num: 6
    //         "+------------+-----+------+--------------------------------+",
    //     ];

    let mut partitions = BTreeMap::new();

    // ------------------------------------------
    // Build the first partition
    let partition_id = PartitionId::new(1);
    let (mut p1, seq_num) =
        make_first_partition_data(partition_id, loc, sequencer_id, table_id, table_name);

    // ------------------------------------------
    // Build the second partition if asked

    let mut seq_num = seq_num.get();
    if two_partitions {
        let partition_id = PartitionId::new(2);
        let mut p2 = PartitionData::new(partition_id);
        // Group 4: in buffer of p2
        // Fill `buffer`
        seq_num += 1;
        let (_, mb) = mutable_batch_lp::test_helpers::lp_to_mutable_batch(
            r#"test_table,city=Medford day="sun",temp=55 22"#,
        );
        p2.buffer_write(SequenceNumber::new(seq_num), mb).unwrap();
        seq_num += 1;
        let (_, mb) = mutable_batch_lp::test_helpers::lp_to_mutable_batch(
            r#"test_table,city=Reading day="mon",temp=58 40"#,
        );
        p2.buffer_write(SequenceNumber::new(seq_num), mb).unwrap();

        partitions.insert(TEST_PARTITION_2.to_string(), p2);
    } else {
        // Group 4: in buffer of p1
        // Fill `buffer`
        seq_num += 1;
        let (_, mb) = mutable_batch_lp::test_helpers::lp_to_mutable_batch(
            r#"test_table,city=Medford day="sun",temp=55 22"#,
        );
        p1.buffer_write(SequenceNumber::new(seq_num), mb).unwrap();
        seq_num += 1;
        let (_, mb) = mutable_batch_lp::test_helpers::lp_to_mutable_batch(
            r#"test_table,city=Reading day="mon",temp=58 40"#,
        );
        p1.buffer_write(SequenceNumber::new(seq_num), mb).unwrap();
    }

    partitions.insert(TEST_PARTITION_1.to_string(), p1);
    partitions
}

/// Make data for one partition with tombstones
pub(crate) async fn make_one_partition_with_tombstones(
    exec: &query::exec::Executor,
    loc: DataLocation,
    sequencer_id: SequencerId,
    table_id: TableId,
    table_name: &str,
) -> BTreeMap<String, PartitionData> {
    // In-memory data includes these rows but split between 4 groups go into
    // different batches of parittion 1 or partittion 2  as requeted
    // let expected = vec![
    //         "+------------+-----+------+--------------------------------+",
    //         "| city       | day | temp | time                           |",
    //         "+------------+---


pointHistoryJpaEntity.isCancel.eq(false),
                pointHistoryJpaEntity.school.id.eq(schoolId),
                startAt?.let { pointHistoryJpaEntity.createdAt.goe(it) },
                endAt?.let { pointHistoryJpaEntity.createdAt.lt(it) }
            )
            .orderBy(pointHistoryJpaEntity.createdAt.desc())
            .fetch()
            .mapNotNull {
                pointHistoryMapper.toDomain(it)
            }
    }

    override fun saveAllPointHistories(pointHistories: List<PointHistory>) {
        pointHistoryRepository.saveAll(
            pointHistories.map {
                pointHistoryMapper.toEntity(it)
            }
        )
    }

    override fun queryPointHistoryByGcnIn(gcns: List<String>) =
        pointHistoryRepository.findByStudentGcnIn(gcns)
            .map { pointHistoryMapper.toDomain(it)!! }

    override fun queryPointTotalsGroupByStudent(): List<StudentTotalVO> {
        val latestPointHistory = QPointHistoryJpaEntity("latestPointHistory")

        val history = JPAExpressions
            .select(latestPointHistory.id)
            .from(latestPointHistory)
            .where(
                latestPointHistory.studentGcn.eq(
                    studentJpaEntity.grade.stringValue().toString() +
                        studentJpaEntity.classRoom.stringValue() +
                        studentJpaEntity.number.stringValue().toString().padStart(2, '0')
                ),
                latestPointHistory.studentName.eq(studentJpaEntity.name)
            )
            .orderBy(latestPointHistory.createdAt.desc())
            .limit(1)

        return queryFactory
            .select(
                QQueryStudentTotalVO(
                    studentJpaEntity.id,
                    pointHistoryJpaEntity.bonusTotal,
                    pointHistoryJpaEntity.minusTotal
                )
            )
            .from(studentJpaEntity)
            .join(pointHistoryJpaEntity).on(
                pointHistoryJpaEntity.id.`in`(history)
            )
            .fetch()
    }
}
package team.aliens.dms.android.shared.date.junit

import org.junit.Before
import org.junit.Test
import org.threeten.bp.LocalDate
import org.threeten.bp.LocalDateTime
import org.threeten.bp.ZoneOffset
import team.aliens.dms.android.shared.date.toDate
import team.aliens.dms.android.shared.date.toEpochMilli
import team.aliens.dms.android.shared.date.toLocalDate
import team.aliens.dms.android.shared.date.toLocalDateTime
import java.util.Date

class ExtensionsTest {
    private var mEpochMillis: Long = -1
    private var mEpochSecond: Long = -1
    private lateinit var mLocalDateTime: LocalDateTime
    private lateinit var mLocalDate: LocalDate
    private lateinit var mDate: Date
    private lateinit var mDateTime: Date
    private lateinit var mZoneOffset: ZoneOffset
    private lateinit var mIsoDateTimeFormat: String
    private lateinit var mIsoDateFormat: String

    @Before
    fun setupDateMembers() {
        this.mEpochMillis = 1147113414000L
        this.mEpochSecond = 1147046400L
        this.mLocalDateTime = LocalDateTime.of(2006, 5, 8, 18, 36, 54)
        this.mLocalDate = LocalDate.of(2006, 5, 8)
        this.mDate = Date(2006, 5, 8)
        this.mDateTime = Date(2006, 5, 8, 18, 36, 54)
        this.mZoneOffset = ZoneOffset.UTC
        this.mIsoDateTimeFormat = "2006-05-08T18:36:54"
        this.mIsoDateFormat = "2006-05-08"

        check(mEpochMillis != -1L)
        check(mEpochSecond != -1L)
        check(::mLocalDateTime.isInitialized)
        check(::m


uery) FirstID(ctx context.Context) (id string, err error) {
	var ids []string
	if ids, err = bpq.Limit(1).IDs(setContextOp(ctx, bpq.ctx, ent.OpQueryFirstID)); err != nil {
		return
	}
	if len(ids) == 0 {
		err = &NotFoundError{billproduct.Label}
		return
	}
	return ids[0], nil
}

// FirstIDX is like FirstID, but panics if an error occurs.
func (bpq *BillProductQuery) FirstIDX(ctx context.Context) string {
	id, err := bpq.FirstID(ctx)
	if err != nil && !IsNotFound(err) {
		panic(err)
	}
	return id
}

// Only returns a single BillProduct entity found by the query, ensuring it only returns one.
// Returns a *NotSingularError when more than one BillProduct entity is found.
// Returns a *NotFoundError when no BillProduct entities are found.
func (bpq *BillProductQuery) Only(ctx context.Context) (*BillProduct, error) {
	nodes, err := bpq.Limit(2).All(setContextOp(ctx, bpq.ctx, ent.OpQueryOnly))
	if err != nil {
		return nil, err
	}
	switch len(nodes) {
	case 1:
		return nodes[0], nil
	case 0:
		return nil, &NotFoundError{billproduct.Label}
	default:
		return nil, &NotSingularError{billproduct.Label}
	}
}

// OnlyX is like Only, but panics if an error occurs.
func (bpq *BillProductQuery) OnlyX(ctx context.Context) *BillProduct {
	node, err := bpq.Only(ctx)
	if err != nil {
		panic(err)
	}
	return node
}

// OnlyID is like Only, but returns the only BillProduct ID in the query.
// Returns a *NotSingularError when more than one BillProduct ID is found.
// Returns a *NotFoundError when no entities are found.
func (bpq *BillProductQuery) OnlyID(ctx context.Context) (id string, err error) {
	var ids []string
	if ids, err = bpq.Limit(2).IDs(setContextOp(ctx, bpq.ctx, ent.OpQueryOnlyID)); err != nil {
		return
	}
	switch len(ids) {
	case 1:
		id = ids[0]
	case 0:
		err = &NotFoundError{billproduct.Label}
	default:
		err = &NotSingularError{billproduct.Label}
	}
	return
}

// OnlyIDX is like OnlyID, but panics if an error occurs.
func (bpq *BillProductQuery) OnlyIDX(ctx context.Context) string {
	id, err := bpq.OnlyID(ctx)
	if err != nil {
		panic(err)
	}
	return id
}

// All executes the query and returns a list of BillProducts.
func (bpq *BillProductQuery) All(ctx context.Context) ([]*BillProduct, error) {
	ctx = setContextOp(ctx, bpq.ctx, ent.OpQueryAll)
	if err := bpq.prepareQuery(ctx); err != nil {
		return nil, err
	}
	qr := querierAll[[]*BillProduct, *BillProductQuery]()
	return withInterceptors[[]*BillProduct](ctx, bpq, qr, bpq.inters)
}

// AllX is like All, but panics if an error occurs.
func (bpq *BillProductQuery) AllX(ctx context.Context) []*BillProduct {
	nodes, err := bpq.All(ctx)
	if err != nil {
		panic(err)
	}
	return nodes
}

// IDs executes the query and returns a list of BillProduct IDs.
func (bpq *BillProductQuery) IDs(ctx context.Context) (ids []string, err error) {
	if bpq.ctx.Unique == nil && bpq.path != nil {
		bpq.Unique(true)
	}
	ctx = setContextOp(ctx, bpq.ctx, ent.OpQueryIDs)
	if err = bpq.Select(billproduct.FieldID).Scan(ctx, &ids); err != nil {


MruInnerMeshFormat, ".ply" );
        setDefaultSerializeMeshFormat( format );
        format = loadString( cMruInnerPointsFormat, ".ply" );
        setDefaultSerializePointsFormat( format );
        format = loadString( cMruInnerVoxelsFormat, ".vdb" );
        setDefaultSerializeVoxelsFormat( format );
    }

    if ( cfg.hasJsonValue( cVisualObjectTags ) )
    {
        auto& manager = VisualObjectTagManager::instance();
        deserializeFromJson( cfg.getJsonValue( cVisualObjectTags ), manager );
    }
}

void ViewerSettingsManager::saveSettings( const Viewer& viewer )
{
    const auto& viewport = viewer.viewport();
    const auto& params = viewport.getParameters();
    auto& cfg = Config::instance();
    cfg.setBool( cOrthographicParamKey, params.orthographic );
    cfg.setBool( cSortDroppedFiles, viewer.getSortDroppedFiles() );
    cfg.setJsonValue( cScrollForceConfigKey, viewer.scrollForce );

    if ( viewer.globalBasis )
    {
        Json::Value globalBasis;
        globalBasis[cGlobalBasisVisibleKey] = viewer.globalBasis->isVisible( viewport.id );
        globalBasis[cGlobalBasisGridVisibleKey] = viewer.globalBasis->isGridVisible( viewport.id );
        if ( params.globalBasisScaleMode == Viewport::Parameters::GlobalBasisScaleMode::Auto )
            globalBasis[cGlobalBasisScaleKey] = "Auto";
        else
            globalBasis[cGlobalBasisScaleKey] = viewer.globalBasis->getAxesLength( viewport.id );
        cfg.setJsonValue( cGlobalBasisKey, globalBasis );
    }

    saveInt( cGLPickRadiusParamKey, viewer.glPickRadius );

    if ( auto menu = viewer.getMenuPlugin() )
    {
        saveInt( cEnableSavedDialogPositions, menu->isSavedDialogPositionsEnabled() );
        cfg.setJsonValue( cUserUIScaleKey, menu->getUserScaling() );
    }

    auto ribbonMenu = viewer.getMenuPluginAs<RibbonMenu>();
    if ( ribbonMenu )
    {
        cfg.setBool( cTopPanelPinnedKey, ribbonMenu->isTopPannelPinned() );
        cfg.setBool( cAutoClosePlugins, ribbonMenu->getAutoCloseBlockingPlugins() );
        auto sceneObjectsList = ribbonMenu->getSceneObjectsList();
        if ( sceneObjectsList )
        {
            cfg.setBool( cShowSelectedObjects, sceneObjectsList->getShowNewSelectedObjects() );
            cfg.setBool( cDeselectNewHiddenObjects, sceneObjectsList->getDeselectNewHiddenObjects() );

            auto ribbonSceneObjectsList = std::dynamic_pointer_cast< RibbonSceneObjectsListDrawer >( sceneObjectsList );
            if ( ribbonSceneObjectsList )
                cfg.setBool( cCloseContextOnChange, ribbonSceneObjectsList->getCloseContextOnChange() );
        }
    }

    Json::Value sceneControls;
    for ( int i = 0; i < int( MouseMode::Count ); ++i )
    {
        MouseMode mode = MouseMode( i );
        if ( mode == MouseMode::None )
            continue;
        auto control = viewer.mouseController().findControlByMode( mode );
        int key = control ? MouseController::mouseAndModToKey( *control ) : -1;
        sceneControls[getMouseModeString( mode )] = key;
    }
    cfg.setJsonValue( cSceneControlsParamKey, sceneControls );

    // SceneSettings
    cfg.setEnum( cShadingModeEnum, cShadingModeParamKey, ( int )SceneSettings::getDefaultShadingMode() );
    Json::Value cnfCNCSettings = SceneSettings::getCNCMachineSettings().saveToJson();
    cfg.setJsonValue( cncMachineSettingsKey, cnfCNCSettings );

    Json::Value colorThemePreset;
    colorThemePreset["TypeId"] = int( ColorTheme::getThemeType() );
    colorThemePreset["Name"] =