.switch6-light > span {
  line-height: 30px;
  vertical-align: middle;
}

.switch6-light label {
  font-weight: 700;
  margin-bottom: px;
  max-width: 100%;
}

.switch6-light input:focus ~ a,
.switch6-light input:focus + label {
  outline: 1px dotted rgb(136, 136, 136);
}
.switch6-light input {
  position: absolute;
  opacity: 0;
  z-index: 5;
}
.switch6-light input:checked ~ a {
  right: 0%;
}
.switch6-light > span {
  position: absolute;
  left: -100px;
  width: 100%;
  margin: 0px;
  padding-right: 100px;
  text-align: left;
}
.switch6-light > span span {
  position: absolute;
  top: 0px;
  left: 0px;
  z-index: 5;
  display: block;
  width: 50%;
  margin-left: 100px;
  text-align: center;
}
.switch6-light > span span:last-child {
  left: 50%;
}
.switch6-light a {
  position: absolute;
  right: 50%;
  top: 0px;
  z-index: 4;
  display: block;
  width: 50%;
  height: 100%;
  padding: 0px;
}
.onoffswitch-inner-setting-status::before {
  content: "Active";
}

.onoffswitch-inner-setting-status::after {
  content: "Inactive";
}
.onoffswitch-inner-kilda-switch::before {
  content: "Legacy";
}

.onoffswitch-inner-kilda-switch::after {
  content: "Kilda";
}

.onoffswitch-inner-kilda-switch-meter::before{
  content:'Tabular View';
  text-align: left;
}
.onoffswitch-inner-kilda-switch-meter::after{
  content:'JSON view';
  text-align: right;
}

.onoffswitch-inner-kilda-flow-ping::before{
  content:'Raw View';
  text-align: left;
}
.onoffswitch-inner-kilda-flow-ping::after{
  content:'Graphical View';
  text-align: right;
}

.onoffswitch-inner-kilda-connected-devices::before{
  content:'Tabular View';
  text-align: left;
}
.onoffswitch-inner-kilda-connected-devices::after{
  content:'Graphical View';
  text-align: right;
}

.onoffswitch-inner-maintenance-switch::before{
  content:'ON';
  text-align: left;
}
.onoffswitch-inner-maintenance-switch::after{
  content:'OFF';
  text-align: right;
}

.onoffswitch-inner-stats-source::before{
  content:'Victoria';
}

.onoffswitch-inner-stats-source::after{
  content:'TSDB';
}

.onoffswitch-flow-ping {
  right: 93px;
}
.onoffflow-ping {
 width: 120px;
}
.onoffswitch-switch-meter {
   right: 82px;
}
.onoffswitch-meter {
  width: 110px;
}
.onoffswitch-switch-connected-devices {
  right: 85px;
}
.onoffswitch-connected-devices {
 width: 110px;
}

/*End : Switch Css*/

/* Start: User Management CSS */

table.dataTable i.fa {
  font-size: 22px;
  color: #262d37;
  vertical-align: middle;
  margin: 0 3px;
  float: left;
  curso


// DEBUG

  const txs = (await query({
    query: `
    query {
      transactions(
        tags: [{ name: "App-Name", values: "Gitstamp" }]
        first: 2147483647
      ) {
        edges {
          node {
            id
            tags {
              name
              value
            }
          }
        }
      }
    }
    `
  })).data.transactions.edges;

  for (const tx of txs) {
    console.log(`Loading transaction ${tx.node.id}...`);

    $('#commits').append(renderCommit(tx.node.id));

    arweave.transactions.getData(tx.node.id, {decode: true, string: true})
      .then(data => {
        const [title, ...body] = data.split("\n");
        $(`#commit-${tx.node.id}-title`).text(title);
        if (body.length > 0) {
          $(`#commit-${tx.node.id}-message`).text(body.join("\n")).show();
        }
      })
      .catch(error => {
        console.error(error);
        $(`#commit-${tx.node.id}`).hide();
      });

    tx.node.tags.forEach(tag => {
      const key = tag.name;
      const value = tag.value;
      switch (key) {
        case 'Git-Commit':
          $(`#commit-${tx.node.id}-id`).text(value);
          break;
        case 'Git-Commit-Link':
          $(`#commit-${tx.node.id}-link`).attr('href', value).show();
          break;
        case 'Git-Author':
          const author = parseAuthor(value);
          $(`#commit-${tx.node.id}-author`).attr('href', author.link);
          $(`#commit-${tx.node.id}-author`).text((author.service == 'email' ? '' : '@') + author.name);
          $(`#commit-${tx.node.id}-author-icon`).attr('src', author.service + ".svg");
          break;
        case 'Git-Committer-Date':
          $(`#commit-${tx.node.id}-date`).text(value.replace('T', ' '));
          break;
      }
    })
  }
}

$(document).ready(load);
import React, { useState } from 'react';
import Switch from 'react-switch';
import { SunIcon, MoonIcon, MenuIcon, XIcon, ExternalLinkIcon } from '@heroicons/react/outline';

const Navbar = ({ toggleDarkMode, isDarkMode }) => {
  const [menuOpen, setMenuOpen] = useState(false);

  const handleMenuToggle = () => {
    setMenuOpen(!menuOpen);
  };

  return (

exex.rs

          <SunIcon className="text-yellow-500 w-4 h-4" />
          <Switch
            onChange={toggleDarkMode}
            checked={isDarkMode}
            offColor="#e5e7eb"
            onColor="#1f2937"
            offHandleColor="#ffffff"
            onHandleColor="#ffffff"
            uncheckedIcon={false}
            checkedIcon={false}
            height={18}
            width={36}
            handleDiameter={15}
          />
          <MoonIcon className="text-blue-500 w-4 h-4" />

        <button
          onClick={handleMenuToggle}
          className="text-gray-900 dark:text-gray-100 focus:


	@Transactional
	@Override
	public boolean upDateAnnouncement(SysAnnouncement sysAnnouncement) {
		// 1.更新系统信息表数据
		sysAnnouncementMapper.updateById(sysAnnouncement);
		String userId = sysAnnouncement.getUserIds();
		if(oConvertUtils.isNotEmpty(userId)&&sysAnnouncement.getMsgType().equals(CommonConstant.MSG_TYPE_UESR)) {
			// 2.补充新的通知用户数据
			String[] userIds = userId.substring(0, (userId.length()-1)).split(",");
			String anntId = sysAnnouncement.getId();
			Date refDate = new Date();
			for(int i=0;i<userIds.length;i++) {
				LambdaQueryWrapper<SysAnnouncementSend> queryWrapper = new LambdaQueryWrapper<SysAnnouncementSend>();
				queryWrapper.eq(SysAnnouncementSend::getAnntId, anntId);
				queryWrapper.eq(SysAnnouncementSend::getUserId, userIds[i]);
				List<SysAnnouncementSend> announcementSends=sysAnnouncementSendMapper.selectList(queryWrapper);
				if(announcementSends.size()<=0) {
					SysAnnouncementSend announcementSend = new SysAnnouncementSend();
					announcementSend.setAnntId(anntId);
					announcementSend.setUserId(userIds[i]);
					announcementSend.setReadFlag(CommonConstant.NO_READ_FLAG);
					announcementSend.setReadTime(refDate);
					sysAnnouncementSendMapper.insert(announcementSend);
				}
			}
			// 3. 删除多余通知用户数据
			Collection<String> delUserIds = Arrays.asList(userIds);
			LambdaQueryWrapper<SysAnnouncementSend> queryWrapper = new LambdaQueryWrapper<SysAnnouncementSend>();
			queryWrapper.notIn(SysAnnouncementSend::getUserId, delUserIds);
			queryWrapper.eq(SysAnnouncementSend::getAnntId, anntId);
			sysAnnouncementSendMapper.delete(queryWrapper);
		}
		return true;
	}

	// @功能：流程执行完成保存消息通知
	@Override
	public void saveSysAnnouncement(String title, String msgContent) {
		SysAnnouncement announcement = new SysAnnouncement();
		announcement.setTitile(title);
		announcement.setMsgContent(msgContent);
		announcement.setSender("JEECG BOOT");
		announcement.setPriority(CommonConstant.PRIORITY_L);
		announcement.setMsgType(CommonConstant.MSG_TYPE_ALL);
		announcement.setSendStatus(CommonConstant.HAS_SEND);
		announcement.setSendTime(new Date());
		announcement.setDelFlag(CommonConstant.DEL_FLAG_0.toString());
		sysAnnouncementMapper.insert(announcement);
	}

	@Override
	public Page<SysAnnouncement> querySysCementPageByUserId(Page<SysAnnouncement> page, String userId, String msgCategory) {
		if (page.getSize() == -1) {
			return page.setRecords(sysAnnouncementMapper.querySysCementListByUserId(null, userId, msgCategory));
		} else {
			return page.setRecords(sysAnnouncementMapper.querySysCementListByUserId(page, userId, msgCategory));
		}
	}

}
package org.jeecg.modules.dlglong.controller;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;


() === b.getTime() && K === t.selectedMonth && t._keyEvent || p.getTime() === T.getTime() && p.getTime() === b.getTime() ? " " + this._dayOverClass : "") + (z ? " " + this._unselectableClass + " ui-state-disabled" : "") + (H && !u ? "" : " " + S[1] + (T.getTime() === B.getTime() ? " " + this._currentClass : "") + (T.getTime() === O.getTime() ? " ui-datepicker-today" : "")) + "'" + (H && !u || !S[2] ? "" : " title='" + S[2].replace(/'/g, "'") + "'") + (z ? "" : " data-handler='selectDay' data-event='click' data-month='" + T.getMonth() + "' data-year='" + T.getFullYear() + "'") + ">" + (H && !u ? " " : z ? "" + T.getDate() + "" : "" + T.getDate() + "") + "	", T.setDate(T.getDate() + 1), T = this._daylightSavingAdjust(T); w += M + "
" } 11 < ++K && (K = 0, U++), _ += w += "

" + (Y ? "
" + (0 < L[0] && v === L[1] - 1 ? "

" : "") : "") } f += _ } return f += F, t._keyEvent = !1, f }, _generateMonthYearHeader: function (t, e, i, s, n, o, a, r) { var l, h, c, u, d, p, f = this._get(t, "changeMonth"), g = this._get(t, "changeYear"), m = this._get(t, "showMonthAfterYear"), _ = this._get(t, "selectMonthLabel"), v = this._get(t, "selectYearLabel"), b = "
", y = ""; if (o || !f) y += "" + a[e] + ""; else { for (l = s && s.getFullYear() === i, h = n && n.getFullYear() === i, y += "<select class='ui-datepicker-month' aria-label='" + _ + "' data-handler='selectMonth' data-event='change'>", c = 0; c < 12; c++)(!l || c >= s.getMonth()) && (!h || c <= n.getMonth()) && (y += "<option value='" + c + "'" + (c === e ? " selected='selected'" : "") + ">" + r[c] + "</option>"); y += "</select>" } if (m || (b += y + (!o && f && g ? "" : " ")), !t.yearshtml) if (t.yearshtml = "", o || !g) b += "" + i + ""; else { for (a = this._get(t, "yearRange").split(":"), u = (new Date).getFullYear(), d = (_ = function (t) { t = t.match(/c[+\-].*/) ? i + parseInt(t.substring(1), 10) : t.match(/[+\-].*/) ? u + parseInt(t, 10) : parseInt(t, 10); return isNaN(t) ? u : t })(a[0]), p = Math.max(d, _(a[1] || "")), d = s ? Math.max(d, s.getFullYear()) : d, p =


    height: $tooltip-arrow-width;

    &::before {
      right: 0;
      border-width: ($tooltip-arrow-width / 2) $tooltip-arrow-height ($tooltip-arrow-width / 2) 0;
      border-right-color: $tooltip-arrow-color;
    }
  }
}

.bs-tooltip-bottom {
  padding: $tooltip-arrow-height 0;

  .arrow {
    top: 0;

    &::before {
      bottom: 0;
      border-width: 0 ($tooltip-arrow-width / 2) $tooltip-arrow-height;
      border-bottom-color: $tooltip-arrow-color;
    }
  }
}

.bs-tooltip-left {
  padding: 0 $tooltip-arrow-height;

  .arrow {
    right: 0;
    width: $tooltip-arrow-height;
    height: $tooltip-arrow-width;

    &::before {
      left: 0;
      border-width: ($tooltip-arrow-width / 2) 0 ($tooltip-arrow-width / 2) $tooltip-arrow-height;
      border-left-color: $tooltip-arrow-color;
    }
  }
}

/* not used in Coauthor
.bs-tooltip-auto {
  &[x-placement^="top"] {
    @extend .bs-tooltip-top;
  }
  &[x-placement^="right"] {
    @extend .bs-tooltip-right;
  }
  &[x-placement^="bottom"] {
    @extend .bs-tooltip-bottom;
  }
  &[x-placement^="left"] {
    @extend .bs-tooltip-left;
  }
}
*/

// Wrapper for the tooltip content
.tooltip-inner {
  //3 max-width: $tooltip-max-width;
  //3 padding: $tooltip-padding-y $tooltip-padding-x;
  //3 color: $tooltip-color;
  //3 text-align: center;
  //3 background-color: $tooltip-bg;
  //3 @include border-radius($tooltip-border-radius);
}
@media screen and (max-width: 768px) {
  body {
    /* display: block; */
    text-align: center;
  }

  /* Old static header */
  /* header {
        flex-direction: column;
        padding: 10px 5px;
        margin: 20px 20px 15px;
        gap: 10px;
    } */

  /* New hotness hamburger menu */
  header {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    margin: 20px 20px 15px;
  }

  section {
    margin: 15px 20px;
  }

  p {
    margin: 15px 0;
  }

  nav {
    flex-direction: column;
    width: 100%;
    gap: 5px;
  }

  nav a {
    width: 100%;
    padding: 8px 0;
    white-space: normal;
    font-size: 14px;
  }

  .hero {
    flex-direction: column-reverse;
    padding: 15px;
    /* margin: 5px; */
    /* margin: 10px 30px; */
    margin: 15px 20px;
    /* border-radius: 8px; */
    text-align: center;
  }

  .hero-text,
  .hero-image {
    width: 100%;
    min-width: unset;
    padding: 10px 0;
    text-align: center;
    margin: 0;
  }

  .hero-text h1 {
    margin-top: 0.5rem;
  }

  .hero-image img {
    min-width: 80%;
    width: 80%;
    margin: 0 auto;
  }

  .carousel-caption {
    min-width: 80%;
    width: 80%;
    left: 10%;
  }


 = _dt;
    }

    return (s) => {
      let sum = 0;
      for (rtv.t = ti; rtv.t <= tf; rtv.t += dt) {
        sum += math.exp(-s * rtv.t) * f(rtv.t);
      }
      return sum;
    };
  },
  step(t) {
    if (t > 0) {
      return 1;
    }
    return 0;
  },
  window(t, a, b) {
    return math.step(t - a) - math.step(t - b);
  },
});

/**
 * Draws a colored rectangle that covers the canvas.
 * @param {CanvasRenderingContext2D} ctx Canvas context.
 * @param {string} color Background color.
 */
function drawBackground(ctx = rtv.ctx, color = CANVAS_BG) {
  ctx.save(); // Save canvas state
  ctx.fillStyle = color; // Set fill style to requested background color
  ctx.fillRect(0, 0, ctx.canvas.width, ctx.canvas.height); // Draw filled rectangle to cover surface
  ctx.restore(); // Restore canvas state
}

window.addEventListener('load', () => {
  rtv.objs = [];
  Text.setVariable('frame', rtv.frame);

  rtv.c = document.getElementById('viewport');
  rtv.c.style.backgroundColor = CANVAS_BG;

  rtv.ctx = rtv.c.getContext('2d');

  configureCanvas();
  window.addEventListener('resize', configureCanvas);

  // speech synth
  rtv.speech.synth = window.speechSynthesis; // speech synthesis
  window.speechSynthesis.addEventListener('voiceschanged', () => {
    rtv.speech.voices = window.speechSynthesis.getVoices();
  });

  document.getElementById('save').addEventListener('click', () => save(rtv.objs));

  document.getElementById('file').addEventListener('change', (evt) => {
    enterSelect();
    load(evt);
  });

  document.getElementById('load_to_frame').addEventListener('click', () => {
    const text = document.getElementById('selected_objects_text').value;
    const arr = JSON.parse(text);
    rtv.objs = rtv.objs.concat(textArrayToObjs(arr, false));
  });

  rtv.formula_text = document.getElementById('formula_text');
  document.getElementById('load_clear_formula_text').addEventListener('click', () => {
    const t = rtv.formula_text.value;
    for (let i = 0; i < rtv.objs.length; i++) {
      const obj = rtv.objs[i];
      if (typeof obj.change_text === 'function' && obj.is_selected()) {
        obj.change_text(t);
      }
    }
  });
  document.getElementById('load_insert_formula_text').addEventListener('click', () => {
    const t = rtv.formula_text.value;
    rtv.objs.forEach((obj) => {
      if (typeof obj.replace_selected_text === 'function' && obj.is_selected()) {
        obj.change_text(obj.replace_selected_text(t));
      }
    });
  });

  document.getElementById('gen_js').addEventListener('click', () => {
    let js = '';

    rtv.selected_objs.forEach((obj) => {
      if (obj.generate_javascript) {
        const s = obj.generate_javascript();
        js += `${s}\n`;
      }
    });

    document.getElementById('generic').value = js;
  });

  document.getElementById('gen_script').addEventListener('click', () => {
    let script = document.getElementById('generic').value;
    script = script.split('\n


      Red-bre… Mergus… L993… Stewar… 2025…      10  42.5 -76.5 TRUE
#> # ℹ 47 more rows
#> # ℹ 4 more variables: obsReviewed <lgl>, locationPrivate <lgl>, subId <chr>,
#> #   exoticCategory <chr>
```

## Nearest observations of a species

Search for a species’ occurrences near a given latitude and longitude

``` r
nearestobs(species_code('branta canadensis'), 42, -76)
#> Canada Goose (Branta canadensis): cangoo
#> # A tibble: 14 × 13
#>    speciesCode comName  sciName locId locName obsDt howMany   lat   lng obsValid
#>    <chr>       <chr>    <chr>   <chr> <chr>   <chr>   <int> <dbl> <dbl> <lgl>
#>  1 cangoo      Canada … Branta… L109… Hillcr… 2025…       8  42.2 -75.9 TRUE
#>  2 cangoo      Canada … Branta… L247… Conflu… 2025…      14  42.1 -75.9 TRUE
#>  3 cangoo      Canada … Branta… L189… Conflu… 2025…       5  42.1 -75.9 TRUE
#>  4 cangoo      Canada … Branta… L505… Boland… 2025…       9  42.2 -75.9 TRUE
#>  5 cangoo      Canada … Branta… L186… Otsini… 2025…      60  42.1 -75.9 TRUE
#>  6 cangoo      Canada … Branta… L201… Conflu… 2025…     150  42.1 -76.3 TRUE
#>  7 cangoo      Canada … Branta… L351… Anson … 2025…      34  42.1 -76.1 TRUE
#>  8 cangoo      Canada … Branta… L714… Draper… 2025…       4  42.1 -76.3 TRUE
#>  9 cangoo      Canada … Branta… L367… River … 2025…     120  42.1 -76.3 TRUE
#> 10 cangoo      Canada … Branta… L154… IBM Gl… 2025…      13  42.1 -76.0 TRUE
#> 11 cangoo      Canada … Branta… L278… Harold… 2025…      85  42.1 -76.0 TRUE
#> 12 cangoo      Canada … Branta… L137… Apalac… 2025…      80  42.1 -76.1 TRUE
#> 13 cangoo      Canada … Branta… L166… Chugnu… 2025…      80  42.1 -76.0 TRUE
#> 14 cangoo      Canada … Branta… L501… Willia… 2025…      80  42.1 -76.0 TRUE
#> # ℹ 3 more variables: obsReviewed <lgl>, locationPrivate <lgl>, subId <chr>
```

<!--
## Frequency of observations at hotspots or regions

Obtain historical frequencies of bird occurrences by hotspot or region

``` r
# ebirdfreq(loctype = 'hotspots', loc = 'L196159')
```
-->

## Recent notable sightings

Search for notable sightings at a given latitude and longitude

``` r
ebirdnotable(lat = 42, lng = -70)
#> # A tibble: 3,942 × 14
#>    speciesCode comName  sciName locId locName obsDt howMany   lat   lng obsValid
#>    <chr>       <chr>    <chr>   <chr> <chr>   <chr>   <int> <dbl> <dbl> <lgl>
#>  1 norsho      Norther… Spa


1NGH
DO1NGO
DO1NJB
DO1NJW
DO1NMN
DO1NPF
DO1NRZ
DO1NWA
DO1OBA
DO1OHL
DO1OMS
DO1OPA
DO1OY
DO1PBL
DO1PSH
DO1PSL
DO1PST
DO1RAB
DO1RDF
DO1RE
do1rfm
DO1RGI
DO1RHC
DO1RIG
DO1RLL
DO1RLL/P
DO1RLL/QRP
DO1RM
DO1RMS
DO1ROK
DO1RS
DO1RSW
DO1RTO
DO1RTO/M
DO1RWM
DO1RY
DO1SAJ
DO1SC
DO1SDH
DO1SGV
DO1SGV/m
DO1SGV/p
DO1SJF
DO1SKB
DO1SKJ
DO1SKP
DO1SON
DO1SOR
DO1SPK
DO1SPM
DO1SRB
DO1SSB
DO1STG
DO1STG/M
DO1STG/P
DO1SZ
DO1TBW
DO1THG
DO1THK
DO1TI
DO1TJH
DO1TKB
DO1TKS
DO1TMF
DO1TN
DO1TNP
DO1TP
DO1TU
DO1TWI
DO1TWI/EA5
DO1TWI/M
DO1TWI/P
DO1UDF
DO1UE
DO1UJW
DO1UMS
DO1UMS/M
DO1UMS/P
DO1UW
DO1UZ
DO1VB
DO1VB/M
DO1VB/P
DO1VC
DO1VEG
DO1WAH
DO1WGK
DO1WHU
DO1WHV
DO1WUE
DO1WWA
DO1WWW
DO1XG
DO1YCL
DO1YCW
DO1YDK
DO1YDL
DO1YH
DO1YHJ
DO1YHM
DO1YHN
DO1YHN-p
DO1YHN/m
DO1YKL
DO1YWF
DO1ZHL
DO2AC
DO2AFM
DO2AL
DO2AMS
DO2ARS
DO2ART
DO2AV
DO2BAC
DO2BL
DO2BRB
DO2BS
DO2CAT
DO2CT
DO2DE
DO2DP
DO2EC
DO2FML
DO2FW
DO2GF
DO2GMS
DO2GT
DO2HG
DO2HMS
DO2HMW
DO2HN
DO2HRB
DO2HSP
DO2HSP/P
DO2HZ
DO2IH
DO2IH/P
DO2JAX
DO2JD
DO2JUE
DO2JUE/P
DO2KHW
DO2KHW/P
DO2KLA
DO2KLA/P
DO2KZW
DO2LJ
DO2LJ/M
DO2LR
DO2LRD
DO2LRD/P
DO2LY
DO2MCB
DO2MCS
DO2MED
DO2MGY
DO2MHG
DO2MHG/P
DO2MHG/QRP
DO2MKS
DO2MOS
DO2MPS
DO2MPS/P
DO2MX
DO2MZ
DO2MZW
DO2NOB
DO2NPG
DO2OL
DO2PJ
DO2PP
DO2RCS
DO2RFC
DO2ROA
DO2SD
DO2SDA
DO2SK
DO2SMJ
DO2STA
DO2SW
DO2SWA
DO2TC
DO2TE
DO2TV
DO2UDX
DO2VF
DO2VI
DO2WBB
DO2WO
DO2WZ
DO2YEO
DO2YM
DO2ZA
DO2ZX
DO3ANG
DO3AR
DO3BHW
DO3BKK
DO3BO
DO3BOX
DO3DBM


支持设置一个总的读取时间，通过lingering_time来设置，这个时间也就是nginx在关闭写之后，保留socket的时间，客户端需要在这个时间内发送完所有的数据，否则nginx在这个时间过后，会直接关掉连接。当然，nginx是支持配置是否打开lingering_close选项的，通过lingering_close选项来配置。
那么，我们在实际应用中，是否应该打开lingering_close呢？这个就没有固定的推荐值了，如Maxim Dounin所说，lingering_close的主要作用是保持更好的客户端兼容性，但是却需要消耗更多的额外资源（比如连接会一直占着）。

这节，我们介绍了nginx中，连接与请求的基本概念，下节，我们讲基本的数据结构。

基本数据结构(99%)¶

nginx的作者为追求极致的高效，自己实现了很多颇具特色的nginx风格的数据结构以及公共函数。比如，nginx提供了带长度的字符串，根据编译器选项优化过的字符串拷贝函数ngx_copy等。所以，在我们写nginx模块时，应该尽量调用nginx提供的api，尽管有些api只是对glibc的宏定义。本节，我们介绍string、list、buffer、chain等一系列最基本的数据结构及相关api的使用技巧以及注意事项。

ngx_str_t(100%)¶

在nginx源码目录的src/core下面的ngx_string.h|c里面，包含了字符串的封装以及字符串相关操作的api。nginx提供了一个带长度的字符串结构ngx_str_t，它的原型如下：

typedef struct {
    size_t      len;
    u_char     *data;
} ngx_str_t;

在结构体当中，data指向字符串数据的第一个字符，字符串的结束用长度来表示，而不是由’\0’来表示结束。所以，在写nginx代码时，处理字符串的方法跟我们平时使用有很大的不一样，但要时刻记住，字符串不以’\0’结束，尽量使用nginx提供的字符串操作的api来操作字符串。
那么，nginx这样做有什么好处呢？首先，通过长度来表示字符串长度，减少计算字符串长度的次数。其次，nginx可以重复引用一段字符串内存，data可以指向任意内存，长度表示结束，而不用去copy一份自己的


 if (shapeType != ShapeRenderer.ShapeType.Line) {
      shapes.end();
      shapes.begin(ShapeRenderer.ShapeType.Line);
    }

    shapes.setColor(Color.GREEN);
    final int xOffs;
    final int yOffs;
    if (tile.tileType == TileType.FLOOR || tile.tileType == TileType.ROOF) {
      xOffs = 0;
      yOffs = Tile.HEIGHT;
    } else {
      xOffs = 0;
      yOffs = 0;
    }

    y += tile.roofHeight;
    final int PADDING = 2;
    for (int i = 0, s = numBlocks; i < s; i++) {
      final Block block = blocks[i];
      DebugUtils.drawAscii(shapes, Integer.toString(i), x + block.x + xOffs + PADDING, y + -block.y + yOffs - PADDING, Align.topLeft);
    }

    if (!initialDrawing) {
      shapes.end();
    } else if (shapeType != shapes.getCurrentType()) {
      shapes.end();
      shapes.begin(shapeType);
    }
  }

  public void drawDebug(ShapeRenderer shapes, Tile tile, float x, float y) {
    final boolean initialDrawing = shapes.isDrawing();
    final ShapeRenderer.ShapeType shapeType = shapes.getCurrentType();
    if (!initialDrawing) {
      shapes.begin(ShapeRenderer.ShapeType.Line);
    } else if (shapeType != ShapeRenderer.ShapeType.Line) {
      shapes.end();
      shapes.begin(ShapeRenderer.ShapeType.Line);
    }

    y += tile.roofHeight;
    final BBox box = tile.box();
    shapes.setColor(GRID_COLOR);
    for (int yOffs = box.yMin; yOffs < box.yMax; yOffs += Block.RLE_HEIGHT) {
      shapes.line(x + box.xMin, y + yOffs, x + box.xMax, y + yOffs);
    }
    for (int xOffs = box.xMin; xOffs < box.xMax; xOffs += Block.RLE_WIDTH) {
      shapes.line(x + xOffs, y + box.yMin, x + xOffs, y + box.yMax);
    }

    shapes.setColor(Color.WHITE);
    shapes.line(x + Tile.WIDTH50, y + Tile.HEIGHT, x + Tile.WIDTH50, y + Tile.HEIGHT + Tile.WALL_HEIGHT);
    DebugUtils.drawDiamond2(shapes, x, y, Tile.WIDTH, Tile.HEIGHT);

    shapes.setColor(Color.GREEN); // self-reported tile size +1px padding
    shapes.rect(x - 1, y + box.yMin - 1, tile.width + 2, -tile.height + 2);

    shapes.setColor(Color.RED); // texture -1px padding
    shapes.rect(x + box.xMin + 1, y + box.yMin + 1, tile.texture().getRegionWidth() - 2, tile.texture().getRegionHeight() - 2);

    shapes.setColor(Color.WHITE); // bbox
    shapes.rect(x + box.xMin, y + box.yMin, box.width, box.height);

    if (TileType.isRoof(tile.tileType)) {
      shapes.setColor(Color.ORANGE);
      shapes.line(x, y, x, y - tile.roofHeight);
      shapes.line(x - 3, y, x + 2, y);
      shapes.line(x - 3, y - tile.roofHeight, x + 2, y - tile.roofHeight);
    }

    y -= tile.roofHeight;
    shapes.setColo


;,
          "#778e99","#b2967d", "grey78","grey71","#343a40")

# labels
df_labs <- tibble(
    city = factor(levels(parks2c$city), levels = levels(parks2c$city)),
    spend_per_resident_data =  c(600, 400, 200, 50, -100,
                  -240, -360, -475, -580,-680)
  )

# plot
parks2b %>%
  ggplot(aes(x=year, value=spend_per_resident_data, node=city, fill=factor(city,levels=parks2c$city))) +
  geom_sankey_bump(space=15, smooth=12) +
  scale_fill_manual(values=cols) +
  geom_text(data=df_labs, aes(x=2020.1, y=spend_per_resident_data, label=city),
            hjust=0,size=3,lineheight = .75, color=after_scale(cols), fontface="bold") +
  scale_x_continuous(limits=c(2012,2021)) +
  theme_void() +
  theme(panel.grid.major.x = element_line(color = "#E8E1DB"),
        legend.position="none",
        axis.text.x=element_text(color="grey50",size=8))

<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABXgAAANhCAYAAABdAtNeAAAEGWlDQ1BrQ0dDb2xvclNwYWNlR2VuZXJpY1JHQgAAOI2NVV1oHFUUPrtzZyMkzlNsNIV0qD8NJQ2TVjShtLp/3d02bpZJNtoi6GT27s6Yyc44M7v9oU9FUHwx6psUxL+3gCAo9Q/bPrQvlQol2tQgKD60+INQ6Ium65k7M5lpurHeZe58853vnnvuuWfvBei5qliWkRQBFpquLRcy4nOHj4g9K5CEh6AXBqFXUR0rXalMAjZPC3e1W99Dwntf2dXd/p+tt0YdFSBxH2Kz5qgLiI8B8KdVy3YBevqRHz/qWh72Yui3MUDEL3q44WPXw3M+fo1pZuQs4tOIBVVTaoiXEI/MxfhGDPsxsNZfoE1q66ro5aJim3XdoLFw72H+n23BaIXzbcOnz5mfPoTvYVz7KzUl5+FRxEuqkp9G/Ajia219thzg25abkRE/BpDc3pqvphHvR


ge）**：生成器根据问题和上下文，选择最合适的组织模式（如因果关系、比较对比等），然后输出一个包含关键点的大纲.
   - **扩展阶段（Expansion Stage）**：根据前一阶段生成的大纲，LLM扩展每个关键点，形成完整的答案.

2. **新颖的事实性优化方法**：
   - **双细粒度RLHF框架**：为了克服直接应用RLHF（Reinforcement Learning from Human Feedback）的困难，提出了一个双细粒度的RLHF框架。该框架通过在事实性评估和奖励建模两个核心步骤中引入细粒度设计，提供了更密集的奖励信号.
   - **细粒度评估**：三种评估粒度：
     - **整体性**：将整个答案作为一个单元进行评估.
     - **句子级别**：将答案分割成句子，并分别评估每个句子.
     - **子声明级别**：进一步将每个句子分解为多个子声明，并分别评估每个子声明.
   - **细粒度奖励建模**：两种奖励建模粒度：
     - **序列级别**：为每个序列学习单一的奖励，反映相应序列的事实性.
     - **标记级别**：为序列中的每个标记学习奖励，通过聚合所有标记级别的奖励来计算序列的奖励.
   - **PPO优化**：采用近端策略优化（PPO）方法来优化生成模型，通过最大化训练好的奖励模型提供的奖励.

#### 三、实验设计与结果

- **性能比较**：通过广泛的实验，验证了所提出的事实性优化RAG（FoRAG）方法在英文和中文基准测试中的优越性。特别是，当将该方法应用于Llama2-7B-chat时，得到的模型FoRAG-L-7B在连贯性、有用性和事实性这三个常用指标上超过了WebGPT-175B，而FoRAG-L-7B的参数数量仅为WebGPT-175B的1/24.
- **有无提纲增强和事实性优化的FoRAG变体的比较**：实验结果表明，提纲增强和事实性优化显著提高了生成答案的质量.
- **不同事实性优化技术的性能比较**：实验结果表明，双细粒度的RLHF框架在优化事实性方面优于传统的RLHF方法.

#### 四、论文总结

FoRAG提出了一种新颖的大纲增强生成器，在第一阶段生成器使用大纲模板，根据用户查询和上下文草拟答案大纲，第二阶段基于生成的大纲扩展每个观点，构建最终答案。同时提出一种基于精心设计的双精细粒度RLHF框架的事实性优化方法，通过在事实性评


# (condition) ? x : y
# 1- if-else --> x if condition else y
x, y = 4, 2

if x < y:
    min_ = x
else:
    min_ = y

m = x if x < y else y
# print('min: ', x) if x < y else print('min: ', y)

# 1.2- elif --> x if condition1 else y if condition2 else z
#               (      if      ) (        elif     ) ( else )
m = x if x < y else -10 if x == 5 else y

# 2- tuple / list --> (y, x)[condition]

min_ = (y, x)[x < y]

# 3- dictionary --> {False: y, True: x}[condition]

min_ = {False: y, True: x}[x < y]

# 4- lambda --> (lambda: y, lamda: x)[condition]()

min_ = (lambda: y, lambda: x)[x < y]()

# 5- logical operator --> condition and x or y

# print(x and y)  # return x if x is False
# print(x or y)   # return x if x is True

x, y = 1, 4
min_ = x < y and x or y
# True and x or y
# x or y
# y

x, y = 4, 6
min_ = x < y and x or y
# False and x or y
# False or y
# y

min_ = (x < y and [x] or [y])[0]
#   -----------------------------------------------------*********-----------------------------------------------------
#


sth		%g5, [%o0]
	retl
	 mov		%g2, %o0
7:	srl		%g5, 16, %g5
	sth		%g5, [%o0]
	stb		%g0, [%o0 + 2]
	retl
	 mov		%g2, %o0
5:	andcc		%g5, 0xff, %g4
	be		9b
	 srl		%o5, 16, %g5
	andcc		%g5, 0xff, %g0
	be		7f
	 srl		%o5, 8, %g5
	andcc		%g5, 0xff, %g0
	stb		%g4, [%o0]
	sth		%g5, [%o0 + 1]
	sub		%o0, 1, %o0
	bne		1b
	 andcc		%o5, 0xff, %g0
	retl
	 mov		%g2, %o0
7:	stb		%g4, [%o0]
	stb		%g0, [%o0 + 1]
	retl
	 mov		%g2, %o0

2:	andcc		%o4, %o3, %g0
	bne		5f
	 srl		%o5, 16, %g5
	sth		%g5, [%o0]
	sub		%o0, 2, %o0
1:	add		%o0, 4, %o0
4:	sll		%o5, 16, %g6
	ld		[%o1], %o5
	add		%o1, 4, %o1
	srl		%o5, 16, %g5
	sub		%o5, %o2, %o4
	or		%g5, %g6, %g5
	andcc		%o4, %o3, %g0
	be,a		1b
	 st		%g5, [%o0]
	srl		%o5, 24, %o4
	andcc		%o4, 0xff, %g0
	be		7f
	 srl		%o5, 16, %o4
	st		%g5, [%o0]
	andcc		%o4, 0xff, %g0
	be		0b
	 srl		%o5, 8, %o4
1:	andcc		%o4, 0xff, %g0
	be		8f
	 andcc		%o5, 0xff, %g0
	bne		4b
	 add		%o0, 4, %o0
	sth		%o5, [%o0]
	retl
	 mov		%g2, %o0
7:	srl		%g5, 16, %g5
	sth		%g5, [%o0]
	stb		%g0, [%o


.setTransform(840, 2040, 1, 1, 0, 0, 0, 24, 24);
    this.zj = new a.Fa;
    this.zj.parent = this;
    this.zj.setTransform(840, 1992, 1, 1, 0, 0, 0,
      24, 24);
    this.Aj = new a.Fa;
    this.Aj.parent = this;
    this.Aj.setTransform(840, 1944, 1, 1, 0, 0, 0, 24, 24);
    this.Bj = new a.Fa;
    this.Bj.parent = this;
    this.Bj.setTransform(840, 1896, 1, 1, 0, 0, 0, 24, 24);
    this.Cj = new a.Fa;
    this.Cj.parent = this;
    this.Cj.setTransform(696, 1608, 1, 1, 0, 0, 0, 24, 24);
    this.Dj = new a.Fa;
    this.Dj.parent = this;
    this.Dj.setTransform(696, 1656, 1, 1, 0, 0, 0, 24, 24);
    this.Ej = new a.Fa;
    this.Ej.parent = this;
    this.Ej.setTransform(696, 1704, 1, 1, 0, 0, 0, 24, 24);
    this.Fj = new a.Fa;
    this.Fj.parent = this;
    this.Fj.setTransform(696, 1752, 1, 1, 0, 0,
      0, 24, 24);
    this.Gj = new a.Fa;
    this.Gj.parent = this;
    this.Gj.setTransform(696, 1800, 1, 1, 0, 0, 0, 24, 24);
    this.Hj = new a.Fa;
    this.Hj.parent = this;
    this.Hj.setTransform(696, 1848, 1, 1, 0, 0, 0, 24, 24);
    this.Ij = new a.Fa;
    this.Ij.parent = this;
    this.Ij.setTransform(696, 2088, 1, 1, 0, 0, 0, 24, 24);
    this.Jj = new a.Fa;
    this.Jj.parent = this;
    this.Jj.setTransform(696, 2040, 1, 1, 0, 0, 0, 24, 24);
    this.Kj = new a.Fa;
    this.Kj.parent = this;
    this.Kj.setTransform(696, 1992, 1, 1, 0, 0, 0, 24, 24);
    this.Lj = new a.Fa;
    this.Lj.parent = this;
    this.Lj.setTransform(696, 1944, 1, 1, 0,
      0, 0, 24, 24);
    this.Mj = new a.Fa;
    this.Mj.parent = this;
    this.Mj.setTransform(696, 1896, 1, 1, 0, 0, 0, 24, 24);
    this.Nj = new a.Hc;
    this.Nj.parent = this;
    this.Nj.setTransform(696, 2231.95, 1, 1, 0, 0, 0, 24, 24);
    this.Oj = new a.Hc;
    this.Oj.parent = this;
    this.Oj.setTransform(744, 2231.95, 1, 1, 0, 0, 0, 24, 24);
    this.Pj = new a.Hc;
    this.Pj.parent = this;
    this.Pj.setTransform(696, 2183.95, 1, 1, 0, 0, 0, 24, 24);
    this.Qj = new a.Hc;
    this.Qj.parent = this;
    this.Qj.setTransform(744, 2183.95, 1, 1, 0, 0, 0, 24, 24);
    this.Rj = new a.Hc;
    this.Rj.parent = this;
    this.Rj.setTransform(696,
      2135.95,


2",
	1114279:  "NetFlow",
	1114289:  "concur",
	1114290:  "NetSupport",
	1114308:  "DirectAdmin",
	1114309:  "EasyBits",
	1114310:  "Eiq-sec-analyzer",
	1114311:  "Netbotz",
	1114312:  "Aspera FASP",
	1114318:  "Perforce",
	1114320:  "TiVoConnect",
	1114321:  "Polycom",
	1114322:  "WebSphere",
	1114330:  "Radacct RADIUS",
	1114334:  "Securemeeting",
	1114337:  "SANE",
	1114339:  "WebHost",
	1114340:  "CPanel",
	1114342:  "Sibelius",
	1114343:  "Siebel-crm",
	1114347:  "SMS",
	1114350:  "Spirent",
	1114351:  "SPSS",
	1114352:  "Subversion",
	1114355:  "Tripwire",
	1114359:  "WatchGuard Webblocker database transfer",
	1114361:  "WatchGuard Security Event Processor logging",
	1114363:  "Genesys Meeting Center",
	1114365:  "Nagios",
	1114366:  "Microsoft Office 365",
	1114396:  "ChatWork",
	1179649:  "TCP Port Service Multiplexer",
	1179650:  "Management Utility",
	1179651:  "Compression Process",
	1179652:  "Zeroconf",
	1179653:  "Echo",
	1179654:  "Discard",
	1179655:  "Active Users",
	1179656:  "L2TP",
	1179657:  "puparp",
	1179658:  "vsinet",
	1179659:  "maitrd",
	1179660:  "Character Generator",
	1179663:  "applix",
	1179664:  "Net Assistant",
	1179665:  "any private mail system",
	1179666:  "BackOrifice",
	1179667:  "AltaVista Firewall97",
	1179668:  "NSW User System FE",
	1179669:  "MSG ICP",
	1179670:  "MSG Authentication",
	1179671:  "Display Support Protocol",
	1179672:  "any private printer server",
	1179673:  "Time",
	1179674:  "Route Access Protocol",
	1179675:  "Resource Location Protocol",
	1179676:  "graphics",
	1179677:  "Host Name Server",
	1179678:  "NIC Name",
	1179679:  "MPM FLAGS Protocol",
	1179680:  "Message Processing Module [recv]",
	1179681:  "MPM [default send]",
	1179682:  "NI FTP",
	1179683:  "Digital Audit Daemon",
	1179684:  "Login Host Protocol (TACACS)",
	1179685:  "Remote Mail Checking Protocol",
	1179686:  "IMP Logical Address Maintenance",
	1179687:  "XNS Time Protocol",
	1179688:  "Domain Name Server",
	1179689:  "XNS Clearinghouse",
	1179690:  "ISI Graphics Language",
	1179691:  "XNS Authentication",
	1179692:  "Mail Transfer Protocol (MTP)",
	1179693:  "XNS Mail",
	1179694:  "any private file service",
	1179695:  "NI MAIL",
	1179696:  "ACA Services",
	1179697:  "VIA Systems - FTP who


re_dir,
        is_render_binary_ho_rejection=True,
        year_start=time_label_start,
        year_end=time_label_end,
        year_range=time_label_range,
        time_sep_skip_year=time_sep_skip_year)

    # visualisation of heatmap of variable count.
    __visualise_variable_count(
        seq_stack_detection_results=seq_stack_detection_results,
        path_figure_dir=path_figure_dir,
        year_start=time_label_start,
        year_end=time_label_end,
        year_range=time_label_range,
        time_sep_skip_year=time_sep_skip_year)
    __visualise_variable_count(
        seq_stack_detection_results=seq_stack_detection_results,
        path_figure_dir=path_figure_dir,
        is_render_binary_ho_rejection=True,
        year_start=time_label_start,
        year_end=time_label_end,
        year_range=time_label_range,
        time_sep_skip_year=time_sep_skip_year)
    # -------------------------------------------------
    # non-completed codes below
    # detection of common and uncommon variables
    path_analysis_output_dir = path_figure_dir / 'variables-common-uncommon'
    __collect_common_and_uncommon_variables(seq_stack_detection_results, path_analysis_output_dir)
    #
    # __collect_json_files()

def _test():
    # the common config toml file as the config for the interface.py
    PATH_CONFIG = '/home/kmitsuzawa/codes/mmd-tst-variable-selection-word-sense-change-analysis/configs/mainichi_corpus.toml'
    assert Path(PATH_CONFIG).exists(), f"Config file not found: {PATH_CONFIG}"

    main(
        path_config_toml=Path(PATH_CONFIG),
        is_use_full_vocabulary=False)

if __name__ == '__main__':
    # the common config toml file as the config for the interface.py
    # PATH_CONFIG = '/home/kmitsuzawa/codes/mmd-tst-variable-selection-word-sense-change-analysis/configs/mainichi_corpus.toml'
    from argparse import ArgumentParser
    __opt = ArgumentParser()
    __opt.add_argument('-c', '--config', type=str, required=True, help='Path to the config file.')
    __opt.add_argument('-f', '--full', action='store_true', help='Use full vocabulary.')
    _parser = __opt.parse_args()
    assert Path(_parser.config).exists(), f"Config file not found: {_parser.config}"

    main(
        path_config_toml=Path(_parser.config),
        is_use_full_vocabulary=True if _parser.full else False)


import numpy as np
import pytest

import c3.libraries.fidelities as fidelities
from c3.optimizers.optimalcontrol import OptimalControl, OptResultOOBError
from examples.single_qubit_experiment import create_experiment

@pytest.mark.integration
def test_raises_OOB_for_bad_optimizer() -> None:
    exp = create_experiment()
    exp.set_opt_gates(["rx90p[0]"])

    opt_gates = ["rx90p[0]"]
    gateset_opt_map = [
        [
            ("rx90p[0]", "d1", "carrier", "framechange"),
        ],
        [
            ("rx90p[0]", "d1", "gauss", "amp"),
        ],
        [
            ("rx90p[0]", "d1", "gauss", "freq_offset"),
        ],
    ]

    exp.pmap.set_opt_map(gateset_opt_map)

    def bad_alg(x_init, fun, *args, **kwargs):
        res = np.array([x * -99 for x in x_init])
        fun(res)
        return res

    opt = OptimalControl(
        fid_func=fidelities.unitary_infid_set,
        fid_subspace=["Q1"],
        pmap=exp.pmap,
        algorithm=bad_alg,
    )

    exp.set_opt_gates(opt_gates)
    opt.set_exp(exp)

    with pytest.raises(OptResultOOBError):
        opt.optimize_controls()


stfsx f6, r25, r9
/* 80389444 003850A4  EC 22 00 72 */	fmuls f1, f2, f1
/* 80389448 003850A8  90 E1 00 A4 */	stw r7, 0xa4(r1)
/* 8038944C 003850AC  EC 84 40 28 */	fsubs f4, f4, f8
/* 80389450 003850B0  C8 41 00 A0 */	lfd f2, 0xa0(r1)
/* 80389454 003850B4  EC 00 08 24 */	fdivs f0, f0, f1
/* 80389458 003850B8  7C D6 4D 2E */	stfsx f6, r22, r9
/* 8038945C 003850BC  EC 64 18 2A */	fadds f3, f4, f3
/* 80389460 003850C0  EC 22 40 28 */	fsubs f1, f2, f8
/* 80389464 003850C4  7C 79 55 2E */	stfsx f3, r25, r10
/* 80389468 003850C8  EC 01 00 2A */	fadds f0, f1, f0
/* 8038946C 003850CC  7C 78 55 2E */	stfsx f3, r24, r10
/* 80389470 003850D0  7C 17 4D 2E */	stfsx f0, r23, r9
/* 80389474 003850D4  7C 18 4D 2E */	stfsx f0, r24, r9
/* 80389478 003850D8  48 00 56 19 */	bl SetVertexFormat__Q34nw4r3lyt6detailFbUc
/* 8038947C 003850DC  7C 13 00 D0 */	neg r0, r19
/* 80389480 003850E0  7E E6 BB 78 */	mr r6, r23
/* 80389484 003850E4  7C 00 9B 78 */	or r0, r0, r19
/* 80389488 003850E8  7F E8 FB 78 */	mr r8, r31
/* 8038948C 003850EC  7C 00 FE 70 */	srawi r0, r0, 0x1f
/* 80389490 003850F0  38 61 00 68 */	addi r3, r1, 0x68
/* 80389494 003850F4  38 81 00 60 */	addi r4, r1, 0x60
/* 80389498 003850F8  38 A0 00 01 */	li r5, 1
/* 8038949C 003850FC  7F 47 00 38 */	and r7, r26, r0
/* 803894A0 00385100  48 00 5C 35 */	bl DrawQuad__Q34nw4r3lyt6detailFRCQ34nw4r4math4VEC2RCQ34nw4r3lyt4SizeUcPA4_CQ34nw4r4math4VEC2PCQ34nw4r2ut5ColorUc
/* 803894A4 00385104  39 61 00 F0 */	addi r11, r1, 0xf0
/* 803894A8 00385108  4B E3 DC A9 */	bl _restgpr_18
/* 803894AC 0038510C  80 01 00 F4 */	lwz r0, 0xf4(r1)
/* 803894B0 00385110  7C 08 03 A6 */	mtlr r0
/* 803894B4 00385114  38 21 00 F0 */	addi r1, r1, 0xf0
/* 803894B8 00385118  4E 80 00 20 */	blr

.global DrawFrame8__Q34nw4r3lyt6WindowFRCQ34nw4r4math4VEC2PCQ44nw4r3lyt6Window5FrameRCQ34nw4r3lyt15WindowFrameSizeUc
DrawFrame8__Q34nw4r3lyt6WindowFRCQ34nw4r4math4VEC2PCQ44nw4r3lyt


reak;
		}
	}
	return (nd_errbuf);
}

/** @fn char *netdir_sperror(void)
  * @version XNSL_1.0
  * @par Alias:
  * This symbol is a weak alias of __nsl_netdir_sperror().
  */
#pragma weak netdir_sperror
__asm__(".symver __nsl_netdir_sperror,netdir_sperror@@XNSL_1.0");

/** @brief Print a netdir function error string to standard output.
  * @param msg prefix string.
  * @version XNSL_1.0
  * @par Alias:
  * This function is an implementation of netdir_perror().
  *
  * This function prints an error message to standard output that states the
  * cause of a name-to-address mapping failure.  The error message is preceded
  * by the string given as an argument.
  *
  *
  */
void
__nsl_netdir_perror(char *msg)
{
	if (msg)
		fprintf(stderr, "%s: %s\n", msg, __nsl_netdir_sperror());
	else
		fprintf(stderr, "%s\n", __nsl_netdir_sperror());
	return;
}

/** @fn void netdir_perror(char *msg)
  * @param msg prefix string.
  * @version XNSL_1.0
  * @par Alias:
  * This symbol is a weak alias of __nsl_netdir_perror().
  */
#pragma weak netdir_perror
__asm__(".symver __nsl_netdir_perror,netdir_perror@@XNSL_1.0");

/** @} */

// vim: com=srO\:/**,mb\:*,ex\:*/,srO\:/*,mb\:*,ex\:*/,b\:TRANS


/*
  Copyright (c) 2007 Stefan Kurtz <kurtz@zbh.uni-hamburg.de>
  Copyright (c) 2007 Center for Bioinformatics, University of Hamburg

  Permission to use, copy, modify, and distribute this software for any
  purpose with or without fee is hereby granted, provided that the above
  copyright notice and this permission notice appear in all copies.

  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
  WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
  MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
  ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
  ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/

#ifndef SPLITITV_H
#define SPLITITV_H

#include "core/types_api.h"
#include "core/arraydef_api.h"

typedef struct
{
  GtUword lbound,
         rbound;
  GtUchar inchar;
} Boundswithchar;

GT_DECLAREARRAYSTRUCT(Boundswithchar);

#endif


def _calculate_gpu_forward_time(self, tp, node):
    span = 0
    time = 0
    cudaLaunchList = tp.query_dict(
        f"""select * from slices where name like '%CudaLaunchKernel%' and track_id={node.track}
                                    and depth>{node.depth} and ts between {node.start} and {node.end} ORDER BY ts ASC"""
        )
    kernel_list = []
    for cudaLaunch in cudaLaunchList:
        slice_id_origin = cudaLaunch['slice_id']
        slice_id_destination = tp.query_dict(
            f'select * from flow where slice_out={slice_id_origin}')
        if slice_id_destination:
            cuda_slice = tp.query_dict(
                f"select * from slice where slice_id={slice_id_destination[0]['slice_in']}"
                )
            kernel_list.append((cuda_slice[0]['ts'], cuda_slice[0]['ts'] +
                cuda_slice[0]['dur']))
    if kernel_list:
        kernel_list.sort(key=lambda x: x[0])
        span, time = self._calculate_gpu_times(kernel_list)
    node.gpu_forward_span = span
    node.gpu_forward = time


// Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

using System;
using System.Collections.Generic;
using System.ComponentModel.Composition;
using System.Linq;
using VsChromium.Core.Ipc.TypedMessages;
using VsChromium.Server.FileSystem;
using VsChromium.Server.FileSystemDatabase;
using VsChromium.Server.Search;

namespace VsChromium.Server.Ipc.TypedMessageHandlers {
  [Export(typeof(ITypedMessageRequestHandler))]
  public class GetDatabaseDetailsRequestHandler : TypedMessageRequestHandler {
    private readonly IFileSystemSnapshotManager _snapshotManager;
    private readonly ISearchEngine _searchEngine;

    [ImportingConstructor]
    public GetDatabaseDetailsRequestHandler(IFileSystemSnapshotManager snapshotManager, ISearchEngine searchEngine) {
      _snapshotManager = snapshotManager;
      _searchEngine = searchEngine;
    }

    public override


/{roomAlias}")
    suspend fun deleteRoomAlias(@Path("roomAlias") roomAlias: String)
}
/*
 * Copyright (C) 2024 The Matrix.org Foundation C.I.C.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.matrix.android.sdk.internal.session.media

import org.matrix.android.sdk.api.util.JsonDict
import org.matrix.android.sdk.internal.network.NetworkConstants
import retrofit2.http.GET
import retrofit2.http.Query

/**
 * Implementation of the media repository API using the new Authenticated media API.
 */
internal interface AuthenticatedMediaAPI : MediaAPI {
    /**
     * Retrieve the configuration of the content repository
     * Ref: https://spec.matrix.org/v1.11/client-server-api/#get_matrixclientv1mediaconfig
     */
    @GET(NetworkConstants.URI_API_PREFIX_PATH_V1 + "media/config")
    override suspend fun getMediaConfig(): GetMediaConfigResult

    /**
     * Get information about a URL for the client. Typically this is called when a client
     * sees a URL in a message and wants to render a preview for the user.
     * Ref: https://spec.matrix.org/v1.11/client-server-api/#get_matrixclientv1mediapreview_url
     * @param url Required. The URL to get a preview of.
     * @param ts The preferred point in time to return a preview for. The server may return a newer version
     * if it does not have the requested version available.
     */
    @GET(NetworkConstants.URI_API_PREFIX_PATH_V1 + "media/preview_url")
    override suspend fun getPreviewUrlData(@Query("url") url: String, @Query("ts") ts: Long?): JsonDict
}
/*
 * Copyright 2020 The Matrix.org Foundation C.I.C.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.matrix.android.sdk.internal.session.user.accountdata

import org.matrix.android.sdk.internal.network.NetworkConstants
import retrofit2.http.Body
import retrofit2.http.DELETE
import retrofit2.http.PUT
import retrofit2.http.Path

internal interface AccountDataAPI {

    /**
     * Set some account_data for the user.
     *
     * @param userId the user id
     * @param type the type
     * @param params the put params
     */
    @PUT(NetworkConstants.URI_API_PREFIX_PATH_R0 + "user/{userId}/account_data/{type}")
    suspend fun setAccountData(
            @Path("userId") userId: String,
            @Path("type") type: String,
            @Body params: Any
    )

    /**
     * Remove an account_data for the user.
     *
     * @param userId the user id
     * @param type the type
     */
    @DELETE(NetworkConstants.URI_API_PREFIX_PATH_UNSTABLE + "org.matrix.msc3391/user/{userId}/account_data/{type}")
    suspend fun deleteAccountData(
            @Path("userId") user


IER2_SET|VIA6522_IER2_CA1)
	ldx	#VIA6522_IER2
	jsr	ssi263_d_write_chip

	ldx	#0		; clear counts
	ldy	#0

	cli			; enable interrupts

wait_irq:
	lda	irq_count	; see if irq happened

	bne	got_irq

	iny			; otherwise increase counts
	bne	wait_irq
	inx			;
	bne	wait_irq
	sei
	clc			; not found
	rts

got_irq:
	sei			; disable interrupts
	sec			; found

	rts

	;========================
	; detection IRQ handler
	;========================
mb_irq:
	txa				; save X
	pha

	; Clear the 6522 interrupt flag
	lda	#VIA6522_IFR2_CA1
	ldx	#VIA6522_IFR2
	jsr	ssi263_d_write_chip

	; disable speech

	; Raise control bit in register 3 of SSI-263
	lda	#SSI263_CAA_CTL
	ldx	#SSI263_CAA
	jsr	ssi263_d_write_chip

	; Disable talking on SSI-263 (when CTL is toggled)
	lda	#SSI263_DRP_DISABLE_AR
	ldx	#SSI263_DRP
	jsr	ssi263_d_write_chip

	; Lower control bit in SSI-263
	lda	#$70		; also T=7?
	ldx	#SSI263_CAA
	jsr	ssi263_d_write_chip

	; increment our irq count

	inc	irq_count

	; Disable 6522 interrupts
	lda	#VIA6522_IER2_CA1
	ldx	#VIA6522_IER2
	jsr	ssi263_d_write_chip

	pla			; restore X
	tax

	lda	$45		; restore accumulator

	rti			; return from interrupt

        ;========================
        ; write_chip
        ;========================
ssi263_d_write_chip:
ssid_wc_smc1:
        sta     $C000,X
        rts

irq_count:	.byte $00
irq1backup:	.byte $00
irq2backup:	.byte $00


       this.LumaRed = f.getAsFloat(0);
            this.LumaGreen = f.getAsFloat(1);
            this.LumaBlue = f.getAsFloat(2);
        }

        f =
          tmetadata.getTIFFField(BaselineTIFFTagSet.TAG_REFERENCE_BLACK_WHITE);
        if (f != null && f.getCount() == 6) {
            this.referenceBlackY = f.getAsFloat(0);
            this.referenceWhiteY = f.getAsFloat(1);
            this.referenceBlackCb = f.getAsFloat(2);
            this.referenceWhiteCb = f.getAsFloat(3);
            this.referenceBlackCr = f.getAsFloat(4);
            this.referenceWhiteCr = f.getAsFloat(5);
        }
    }

    /*
      The full range component value is converted from the code by:

      FullRangeValue = (code - ReferenceBlack) * CodingRange
                / (ReferenceWhite - ReferenceBlack);

      The code is converted from the full-range component value by:

      code = (FullRangeValue * (ReferenceWhite - ReferenceBlack)
                / CodingRange) + ReferenceBlack;

     */
    public void fromRGB(float r, float g, float b, float[] result) {
        // Convert RGB to full-range YCbCr.
        float Y = (LumaRed*r + LumaGreen*g + LumaBlue*b);
        float Cb = (b - Y)/(2 - 2*LumaBlue);
        float Cr = (r - Y)/(2 - 2*LumaRed);

        // Convert full-range YCbCr to code.
        result[0] = Y*(referenceWhiteY - referenceBlackY)/codingRangeY +
            referenceBlackY;
        result[1] = Cb*(referenceWhiteCb - referenceBlackCb)/codingRangeCbCr +
            referenceBlackCb;
        result[2] = Cr*(referenceWhiteCr - referenceBlackCr)/codingRangeCbCr +
            referenceBlackCr;
    }

    public void toRGB(float x0, float x1, float x2, float[] rgb) {
        // Convert YCbCr code to full-range YCbCr.
        float Y = (x0 - referenceBlackY)*codingRangeY/
            (referenceWhiteY - referenceBlackY);
        float Cb = (x1 - referenceBlackCb)*codingRangeCbCr/
            (referenceWhiteCb - referenceBlackCb);
        float Cr = (x2 - referenceBlackCr)*codingRangeCbCr/
            (referenceWhiteCr - referenceBlackCr);

        // Convert YCbCr to RGB.
        rgb[0] = Cr*(2 - 2*LumaRed) + Y;
        rgb[2] = Cb*(2 - 2*LumaBlue) + Y;
        rgb[1] = (Y - LumaBlue*rgb[2] - LumaRed*rgb[0])/LumaGreen;
    }
}
/*
 * $RCSfile: RawImageWriterSpi.java,v $
 *
 *
 * Copyright (c) 2005 Sun Microsystems, Inc. All  Rights Reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *
 * - Redistribution of source code must retain the above copyright
 *   notice, this  list of conditions and the following disclaimer.
 *
 * - Redistribution in binary form must reproduce the above copyright
 *   notice, this list of conditions and the following disclaimer in
 *   the documentation and/or other materials provided with the
 *   distribution.
 *
 * Neither the name of Sun Microsystems, Inc. or the names of
 * contributors may be used to endorse or promote products derived
 * from this software without specific prior written permission.
 *
 * This software is provided "AS IS," without a warranty of any
 * kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND
 * WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY
 * EXCLUDED. SUN MIDROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL
 * NOT BE LIABLE FOR


# -*- coding: utf-8 -*-
"""Constants reused in all parts of the code."""

COVALENT_RADII = {
    # Covalent radii revisited -- DOI:10.1039/B801115J
    "H": 0.31,
    "He": 0.28,
    "Li": 1.28,
    "Be": 0.96,
    "B": 0.84,
    "C": 0.76,  # for sp3; sp2 = 0.73; sp = 0.69
    "C_1": 0.69,
    "C_2": 0.73,
    "C_R": 0.73,
    "C_3": 0.76,
    "N": 0.71,
    "O": 0.66,
    "F": 0.57,
    "Ne": 0.58,
    "Na": 1.66,
    "Mg": 1.41,
    "Al": 1.21,
    "Si": 1.11,
    "P": 1.07,
    "S": 1.05,
    "Cl": 1.02,
    "Ar": 1.06,
    "K": 2.03,
    "Ca": 1.76,
    "Sc": 1.7,
    "Ti": 1.6,
    "V": 1.53,
    "Cr": 1.39,
    "Mn": 1.61,  # low spin = 1.39
    "Fe": 1.52,  # low spin = 1.32
    "Co": 1.5,  # low spin = 1.26
    "Ni": 1.24,
    "Cu": 1.32,
    "Zn": 1.22,
    "Ga": 1.22,
    "Ge": 1.2,
    "As": 1.19,
    "Se": 1.2,
    "Br": 1.2,
    "Kr": 1.16,
    "Rb": 2.2,
    "Sr": 1.95,
    "Y": 1.9,
    "Zr": 1.5,  # 1.75  !! temporarily added to correct the UIO cluster bonding problem
    "Nb": 1.64,
    "Mo": 1.54,
    "Tc": 1.47,
    "Ru": 1.46,
    "Rh": 1.42,
    "Pd": 1.39,
    "Ag": 1.45,
    "Cd": 1.44,
    "In": 1.42,
    "Sn": 1.39,
    "Sb": 1.39,
    "Te": 1.38,
    "I": 1.39,
    "Xe": 1.4,
    "Cs": 2.44,
    "Ba": 2.15,
    "La": 2.07,
    "Ce": 2.04,
    "Pr": 2.03,
    "Nd": 2.01,
    "Pm": 1.99,
    "Sm": 1.98,
    "Eu": 1.98,
    "Gd": 1.96,
    "Tb": 1.94,
    "Dy": 1.92,
    "Ho": 1.92,
    "Er": 1.89,
    "Tm": 1.9,
    "Yb": 1.87,
    "Lu": 1.87,
    "Hf": 1.75,
    "Ta": 1.7,
    "W": 1.62,
    "Re": 1.51,
    "Os": 1.44,
    "Ir": 1.41,
    "Pt": 1.36,
    "Au": 1.36,
    "Hg": 1.32,
    "Tl": 1.45,
    "Pb": 1.46,
    "Bi": 1.48,
    "Po": 1.4,
    "At": 1.5,
    "Rn": 1.5,
    "Fr": 2.6,
    "Ra": 2.21,
    "Ac": 2.15,
    "Th": 2.06,
    "Pa": 2.0,
    "U": 1.96,
    "Np": 1.9,
    "Pu": 1.87,
    "Am": 1.8,
    "Cm": 1.69,
}

VDW_RADII = {
    "H": 1.1,
    "He": 1.4,
    "Li": 1.81,
    "Be": 1.53,
    "B": 1.92,
    "C": 1.7,
    "N": 1.55,
    "O": 1.52,
    "F": 1.47,
    "Ne": 1.54,
    "Na": 2.27,
    "Mg": 1.73,
    "Al": 1.84,
    "Si": 2.1,
    "P": 1.8,
    "S": 1.8,
    "Cl": 1.75,
    "Ar": 1.88,
    "K": 2.75,
    "Ca": 2.31,
    "Sc": 2.16,
    "Ti": 1.87,
    "V": 1.79,
    "Cr": 1.89,
    "Mn": 1.97,
    "Fe": 1.94,
    "Co": 1.92,
    "Ni": 1.84,
    "Cu": 1.86,
    "Zn": 2.1,
    "Ga": 1.87,
    "Ge": 2.11,
    "As": 1.85,
    "Se": 1.9,
    "Br": 1.83,
    "Kr": 2.02,
    "Rb": 3.03,
    "Sr": 2.49,
    "Y": 2.19,
    "Zr": 1.86,
    "Nb": 2.07,
    "Mo": 2.09,
    "Tc": 2.09,
    "Ru": 2.07,
    "Rh": 1.95,
    "Pd": 2.02,
    "Ag": 2.03,
    "Cd": 2.3,
    "In": 1.93,
    "Sn": 2.17,
    "Sb": 2.06,
    "Te": 2.06,
    "I": 1.98,
    "Xe": 2.16,
    "Cs": 3.43,
    "Ba": 2.68,
    "La": 2.4,
    "Ce": 2.35,
    "Pr": 2.39,
    "Nd": 2.29,
    "Pm": 2.36,
    "Sm": 2.29,
    "Eu": 2.33,
    "Gd": 2.37,
    "Tb": 2.21,
    "Dy": 2.29,
    "Ho": 2.16,
    "Er": 2.35,
    "Tm": 2.27,
    "Yb": 2.42,
    "Lu": 2.21,
    "Hf": 2.12,
    "Ta": 2.17,
    "W": 2.1,
    "Re": 2.17,
    "Os": 2.16,
    "Ir": 2.02,
    "Pt": 2.09,
    "Au": 2.17,
    "Hg": 2.09,
    "Tl": 1.96,
    "Pb": 2.02,
    "Bi": 2.07,
    "Po": 1.97,
    "At": 2.02,
    "Rn": 2.2,
    "Fr": 3.48,
    "Ra": 2.83,
    "Ac": 2.6,
    "Th": 2.37,
    "Pa": 2.43,
    "U": 2.4,
    "Np": 2.21,
    "Pu": 2.43,
    "Am": 2.44,
    "Cm": 2.45,
    "Bk": 2.44,
    "Cf": 2.45,
    "Es": 2.45,
    "Fm": 2.45,
    "Md": 2.46,
    "Lr": 2.46,
}


141, U+7145-7147, U+7149-714b, U+7150-7153, U+7155-7157, U+715a, U+715c, U+715e, U+7160, U+7162, U+7164-7165)
);

/* noto-sans-jp-[32]-700-normal */
@include font.face(
    $family: $jpFamily,
    $weight: 700,
    $url: "~@fontsource/noto-sans-jp/files/noto-sans-jp-32-700-normal.woff2",
    $range: (U+6d7c, U+6d80-6d82, U+6d85, U+6d87, U+6d89-6d8a, U+6d8c-6d8e, U+6d91-6d98, U+6d9c, U+6daa-6dac, U+6dae, U+6db4-6db5, U+6db7-6db9, U+6dbd, U+6dbf, U+6dc2, U+6dc4-6dc8, U+6dca, U+6dcc, U+6dce-6dd0, U+6dd2, U+6dd5-6dd6, U+6dd8-6ddb, U+6ddd-6de0, U+6de2, U+6de4-6de6, U+6de8-6dea, U+6dec, U+6dee-6df0, U+6df2, U+6df4, U+6df6, U+6df8-6dfa, U+6dfc, U+6e00, U+6e04, U+6e0a, U+6e17, U+6e19, U+6e1d-6e20, U+6e22-6e25, U+6e27, U+6e2b, U+6e2d-6e2e, U+6e32, U+6e34, U+6e36, U+6e38-6e3c, U+6e42-6e45, U+6e48-6e49, U+6e4b-6e4f, U+6e51-6e54, U+6e57, U+6e5b-6e5f, U+6e62-6e63, U+6e68, U+6e6b, U+6e6e, U+6e72-6e73, U+6e76, U+6e7b, U+6e7d, U+6e82, U+6e89, U+6e8c-6e8d, U+6e8f, U+6e93, U+6e98-6e99, U+6e9f-6ea0, U+6ea5, U+6ea7, U+6eaa-6eab, U+6ead-6eaf, U+6eb1-6eb4, U+6eb7, U+6ebb-6ebd, U+6ebf-6ec4, U+6ec7-6eca, U+6ecc-6ecf, U+6ed3-6ed5, U+6ed9-6edb, U+6ee6, U+6eeb-6eef, U+6ef7-6ef9, U+6efb, U+6efd-6eff, U+6f04, U+6f08-6f0a, U+6f0c-6f0d, U+6f10-6f11, U+6f13, U+6f15-6f16, U+6f18, U+6f1a-6f1b, U+6f25-6f26, U+6f29-6f2a, U+6f2d, U+6f2f-6f33, U+6f35-6f36, U+6f38, U+6f3b-6f3c, U+6f3e-6f3f, U+6f41, U+6f45, U+6f4f, U+6f51-6f53, U+6f57)
);

/* noto-sans-jp


 $5.PortNum get portnum => $_getN(0);
  @$pb.TagNumber(1)
  set portnum($5.PortNum v) {
    setField(1, v);
  }

  @$pb.TagNumber(1)
  $core.bool hasPortnum() => $_has(0);
  @$pb.TagNumber(1)
  void clearPortnum() => clearField(1);

  ///
  ///  Compressed data.
  @$pb.TagNumber(2)
  $core.List<$core.int> get data => $_getN(1);
  @$pb.TagNumber(2)
  set data($core.List<$core.int> v) {
    $_setBytes(1, v);
  }

  @$pb.TagNumber(2)
  $core.bool hasData() => $_has(1);
  @$pb.TagNumber(2)
  void clearData() => clearField(2);
}

///
///  Full info on edges for a single node
class NeighborInfo extends $pb.GeneratedMessage {
  factory NeighborInfo({
    $core.int? nodeId,
    $core.int? lastSentById,
    $core.int? nodeBroadcastIntervalSecs,
    $core.Iterable<Neighbor>? neighbors,
  }) {
    final $result = create();
    if (nodeId != null) {
      $result.nodeId = nodeId;
    }
    if (lastSentById != null) {
      $result.lastSentById = lastSentById;
    }
    if (nodeBroadcastIntervalSecs != null) {
      $result.nodeBroadcastIntervalSecs = nodeBroadcastIntervalSecs;
    }
    if (neighbors != null) {
      $result.neighbors.addAll(neighbors);
    }
    return $result;
  }
  NeighborInfo._() : super();
  factory NeighborInfo.fromBuffer($core.List<$core.int> i,
          [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) =>
      create()..mergeFromBuffer(i, r);
  factory NeighborInfo.fromJson($core.String i,
          [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) =>
      create()..mergeFromJson(i, r);

  static final $pb.BuilderInfo _i = $pb.BuilderInfo(
      _omitMessageNames ? '' : 'NeighborInfo',
      package: const $pb.PackageName(_omitMessageNames ? '' : 'meshtastic'),
      createEmptyInstance: create)
    ..a<$core.int>(1, _omitFieldNames ? '' : 'nodeId', $pb.PbFieldType.OU3)
    ..a<$core.int>(
        2, _omitFieldNames ? '' : 'lastSentById', $pb.PbFieldType.OU3)
    ..a<$core.int>(3, _omitFieldNames ? '' : 'nodeBroadcastIntervalSecs',
        $pb.PbFieldType.OU3)
    ..pc<Neighbor>(4, _omitFieldNames ? '' : 'neighbors', $pb.PbFieldType.PM,
        subBuilder: Neighbor.create)
    ..hasRequiredFields = false;

  @$core.Deprecated('Using this can add significant overhead to your binary. '
      'Use [GeneratedMessageGenericExtensions.deepCopy] instead. '
      'Will be removed in next major version')
  NeighborInfo clone() => NeighborInfo()..mergeFromMessage(this);
  @$core.Deprecated('Using this can add significant overhead to your binary. '
      'Use [GeneratedMessageGenericExtensions.rebuild] instead. '
      'Will be removed in next major version')
  NeighborInfo copyWith(void Function(NeighborInfo) updates) =>
      super.copyWith((message) => updates(message as NeighborInfo))
          as NeighborInfo;

  $pb.BuilderInfo get info_ => _i;

  @$core.pragma('dart2js:noInline')
  static NeighborInfo create() => NeighborInfo._();
  NeighborInfo createEmptyInstance() => create();
  static $pb.PbList<NeighborInfo> createRepeated() =>
      $pb.


出，JDK8 中永久代完全废弃，改用在本地内存中实现的元空间代替，把 JDK 7 中永久代剩余内容（主要是类型信息）全部移到元空间。

虚拟机规范对方法区的约束宽松，除和堆一样不需要连续内存和可选择固定大小/可扩展外，还可以不实现垃圾回收。垃圾回收在方法区出现较少，主要目标针对常量池和类型卸载。如果方法区无法满足新的内存分配需求，将抛出 OutOfMemoryError。

------

#### 7：运行时常量池的作用是什么?

运行时常量池是方法区的一部分，Class 文件中除了有类的版本、字段、方法、接口等描述信息外，还有一项信息是常量池表，用于存放编译器生成的各种字面量与符号引用，这部分内容在类加载后存放到运行时常量池。一般除了保存 Class 文件中描述的符号引用外，还会把符号引用翻译的直接引用也存储在运行时常量池。

运行时常量池相对于 Class 文件常量池的一个重要特征是动态性，Java 不要求常量只有编译期才能产生，运行期间也可以将新的常量放入池中，这种特性利用较多的是 String 的 `intern` 方法。

运行时常量池是方法区的一部分，受到方法区内存的限制，当常量池无法再申请到内存时会抛出 OutOfMemoryError。

------

#### 8：直接内存是什么？

直接内存不属于运行时数据区，也不是虚拟机规范定义的内存区域，但这部分内存被频繁使用，而且可能导致内存溢出。

JDK1.4 中新加入了 NIO 这种基于通道与缓冲区的 IO，它可以使用 Native 函数库直接分配堆外内存，通过一个堆里的 DirectByteBuffer 对象作为内存的引用进行操作，避免了在 Java 堆和 Native堆来回复制数据。

直接内存的分配不受 Java 堆大小的限制，但还是会受到本机总内存及处理器寻址空间限制，一般配置虚拟机参数时会根据实际内存设置 `-Xmx` 等参数信息，但经常忽略直接内存，使内存区域总和大于物理内存限制，导致动态扩展时出现 OOM。

由直接内存导致的内存溢出，一个明显的特征是在 Heap Dump 文件中不会看见明显的异常，如果发现内存溢出后产生的 Dump 文件很小，而程序中又直接或间接使用了直接内存（典型的间接使用就是 NIO），那么就可以考虑检查直接内存方


craft.util.EnumFacing.Axis;
import net.minecraft.world.World;
import net.minecraftforge.fml.client.FMLClientHandler;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;

import java.lang.ref.WeakReference;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.UUID;

import com.google.common.collect.Lists;

public class TileEntityMinerBase extends TileBaseElectricBlockWithInventory implements ISidedInventory, IMultiBlock, IMachineSides
{
    public static final int HOLDSIZE = 72;
    private int[] slotArray;
    public boolean isMaster = false;
    public EnumFacing facing = EnumFacing.NORTH;
    private BlockPos mainBlockPosition;
    private LinkedList<BlockVec3> targetPoints = new LinkedList<>();
    private WeakReference<TileEntityMinerBase> masterTile = null;
    public boolean updateClientFlag;
    public boolean findTargetPointsFlag;
    public int linkCountDown = 0;
    public static Map<Integer, List<BlockPos>> newMinerBases = new HashMap<Integer, List<BlockPos>>();
    private AxisAlignedBB renderAABB;
    @NetworkedField(targetSide=Side.CLIENT)
    public int linkedMinerDataAIState;
    @NetworkedField(targetSide=Side.CLIENT)
    public int linkedMinerDataDX;
    @NetworkedField(targetSide=Side.CLIENT)
    public int linkedMinerDataDY;
    @NetworkedField(targetSide=Side.CLIENT)
    public int linkedMinerDataDZ;
    @NetworkedField(targetSide=Side.CLIENT)
    public int linkedMinerDataCount;

    public void setMainBlockPosition(BlockPos mainBlockPosition)
    {
        this.mainBlockPosition = mainBlockPosition;
    }

    /**
     * The number of players currently using this chest
     */
    public int numUsingPlayers;

    /**
     * Server sync counter (once per 20 ticks)
     */
    private int ticksSinceSync;

    private boolean spawnedMiner = false;

    public EntityAstroMiner linkedMiner = null;
    public UUID linkedMinerID = null;
    private boolean initialised;

    public TileEntityMinerBase()
    {
        super("tile.miner_base.name");
        this.storage.setMaxExtract(ConfigManagerCore.hardMode ? 20 : 12);
        this.slotArray = new int[HOLDSIZE];
        for (int i = 0; i < HOLDSIZE; i++)
        {
            this.slotArray[i] = i + 1;
        }
        this.inventory = NonNullList.withSize(HOLDSIZE + 1, ItemStack.EMPTY);
    }

    public static void checkNewMinerBases()
    {
        Iterator<Entry<Integer, List<BlockPos>>> entries = newMinerBases.entrySet().iterator();
        while (entries.hasNext())
        {
            Entry<Integer, List<BlockPos>> entry = entries.next();
            if (entry.getValue().isEmpty()) continue;

            World w = WorldUtil.getWorldForDimensionServer(entry.getKey());
            if (w == null)
            {
                GCLog.severe("Astro Miner Base placement: Unable to find server world for dim " + entry.getKey());
                entries.remove();
                continue;
            }

            for (BlockPos posMain : entry.getValue())
            {
                BlockPos master = new BlockPos(posMain);
                for (int x = 0; x < 2; x++)
                {
                    for (int y = 0; y < 2; y++)
                    {
                        for (int z = 0; z < 2; z++)
                        {
                            BlockPos pos = posMain.add(x, y, z);
                            w.setBlockState(pos, AsteroidBlocks.minerBaseFull.getDefaultState(), 2);
                            final TileEntity tile = w.getTileEntity(


_channels = res.channels();
      // load label before augmentations
      std::vector<float> label_buf;
      if (label_map_ != nullptr) {
        label_buf = label_map_->FindCopy(rec.image_index());
      } else if (rec.label != nullptr) {
        CHECK_EQ(param_.label_width, rec.num_label)
          << "rec file provide " << rec.num_label << "-dimensional label "
             "but label_width is set to " << param_.label_width;
        label_buf.assign(rec.label, rec.label + rec.num_label);
      } else {
        CHECK_EQ(param_.label_width, 1)
          << "label_width must be 1 unless an imglist is provided "
             "or the rec file is packed with multi dimensional label";
        label_buf.assign(&rec.header.label, &rec.header.label + 1);
      }
      for (auto& aug : augmenters_[tid]) {
        res = aug->Process(res, &label_buf, prnds_[tid].get());
      }
      mshadow::Tensor<cpu, 3, DType> data;
      if (idx < batch_param_.batch_size) {
        data = mshadow::Tensor<cpu, 3, DType>(data_dptr + idx*unit_size_[0],
          mshadow::Shape3(n_channels, res.rows, res.cols));
      } else {
        out_tmp.Push(static_cast<size_t>(rec.image_index()),
                 mshadow::Shape3(n_channels, res.rows, res.cols),
                 mshadow::Shape1(param_.label_width));
        data = out_tmp.data().Back();
      }

      std::uniform_real_distribution<float> rand_uniform(0, 1);
      std::bernoulli_distribution coin_flip(0.5);
      bool is_mirrored = (normalize_param_.rand_mirror && coin_flip(*(prnds_[tid])))
                         || normalize_param_.mirror;
      float contrast_scaled = 1;
      float illumination_scaled = 0;
      if (!std::is_same<DType, uint8_t>::value) {
        contrast_scaled =
          (rand_uniform(*(prnds_[tid])) * normalize_param_.max_random_contrast * 2
          - normalize_param_.max_random_contrast + 1)*normalize_param_.scale;
        illumination_scaled =
          (rand_uniform(*(prnds_[tid])) * normalize_param_.max_random_illumination * 2
          - normalize_param_.max_random_illumination) * normalize_param_.scale;
      }
      // For RGB or RGBA data, swap the B and R channel:
      // OpenCV store as BGR (or BGRA) and we want RGB (or RGBA)
      if (n_channels == 1) {
        ProcessImage<1>(res, &data, is_mirrored, contrast_scaled, illumination_scaled);
      } else if (n_channels == 3) {
        ProcessImage<3>(res, &data, is_mirrored, contrast_scaled, illumination_scaled);
      } else if (n_channels == 4) {
        ProcessImage<4>(res, &data, is_mirrored, contrast_scaled, illumination_scaled);
      }

      mshadow::Tensor<cpu, 1, real_t> label;
      if (idx < batch_param_.batch_size) {
        label = mshadow::Tensor<cpu, 1, real_t>(label_dptr + idx*unit_size_[1],
          mshadow::Shape1(param_.label_width));
      } else {
        label = out_tmp.label().Back();
      }

      mshadow::Copy(label, mshadow::Tensor<cpu, 1>(dmlc::BeginPtr(label_buf),
        mshadow::Shape1(label_buf.size())));
      res.release();
    }
  });
  }
  omp_exc_.Rethrow();
  return (std::min(static_cast<size_t>(batch_param_.batch_size), gl


 30%;
    float: left;
    padding: 0 10px 20px 20px;
    text-align: right;
    margin-left: 15%;
    border: 0;
    border-right: 3px solid black;
    border-bottom: 3px solid black;
    border-top: 1px solid black;
    border-left: 1px solid black;
  }

  .timeline > li.timeline-inverted > .timeline-panel {
    float: right;
    margin-right: 15%;
    text-align: left;
    padding: 0 10px 20px 20px;
    border: 0;
    border-left: 3px solid black;
    border-bottom: 3px solid black;
    border-top: 1px solid black;
    border-right: 1px solid black;
  }

  .timeline > li.timeline-inverted > .timeline-panel:after,
  .timeline > li.timeline-inverted > .timeline-panel.no-downarrow:after {
        position: absolute;
        top: auto;
        left: -20px;
        right: auto;
        bottom: 0px;
        display: inline-block;
        border-top: 25px solid transparent;
        border-left: 0px solid #000;
        border-right: 20px solid #000;
        border-bottom: 25px solid transparent;
        content:" ";
    }

  .timeline > li .timeline-panel:before,
  .timeline > li .timeline-panel.no-downarrow:before {
    position: absolute;
    bottom: 0px;
    right: -20px;
    left: auto;
    top: auto;
    display: inline-block;
    border-top: 25px solid transparent;
    border-left: 20px solid #000;
    border-right: 0 solid #000;
    border-bottom: 25px solid transparent;
    content:" ";
  }
}/*!
 * Bootstrap v3.3.4 (http://getbootstrap.com)
 * Copyright 2011-2015 Twitter, Inc.
 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
 */

.btn-default,
.btn-primary,
.btn-success,
.btn-info,
.btn-warning,
.btn-danger {
  text-shadow: 0 -1px 0 rgba(0, 0, 0, .2);
  -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 1px rgba(0, 0, 0, .075);
          box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 1px rgba(0, 0, 0, .075);
}
.btn-default:active,
.btn-primary:active,
.btn-success:active,
.btn-info:active,
.btn-warning:active,
.btn-danger:active,
.btn-default.active,
.btn-primary.active,
.btn-success.active,
.btn-info.active,
.btn-warning.active,
.btn-danger.active {
  -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
          box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
}
.btn-default.disabled,
.btn-primary.disabled,
.btn-success.disabled,
.btn-info.disabled,
.btn-warning.disabled,
.btn-danger.disabled,
.btn-default[disabled],
.btn-primary[disabled],
.btn-success[disabled],
.btn-info[disabled],
.btn-warning[disabled],
.btn-danger[disabled],
fieldset[disabled] .btn-default,
fieldset[disabled] .btn-primary,
fieldset[disabled] .btn-success,
fieldset[disabled] .btn-info,
fieldset[disabled] .btn-warning,
fieldset[disabled] .btn-danger {
  -webkit-box-shadow: none;
          box-shadow: none;
}
.btn-def


_3 > T::from_i64(self.grid_size.y_idx_max()).unwrap() {
            y_3 = T::from_i64(self.grid_size.y_idx_min()).unwrap();
        }
        vec![
            GridPoint2D::new(x_1, y_1),
            GridPoint2D::new(x_1, y_2),
            GridPoint2D::new(x_1, y_3),
            GridPoint2D::new(x_2, y_1),
            GridPoint2D::new(x_2, y_3),
            GridPoint2D::new(x_3, y_1),
            GridPoint2D::new(x_3, y_2),
            GridPoint2D::new(x_3, y_3),
        ]
        .into_iter()
    }
}

impl<T> BoardNeighborManager<GridPoint1D<T>, std::vec::IntoIter<GridPoint1D<T>>>
    for NeighborMooreDonut<Shape1D>
where
    T: PointPrimInt,
{
    fn get_neighbors_idx(&self, idx: &GridPoint1D<T>) -> std::vec::IntoIter<GridPoint1D<T>> {
        assert!(self.grid_size.width() >= 3);
        let one_t = T::one();
        let left = idx.x - one_t;
        let right = idx.x + one_t;
        if left < T::from_i64(self.grid_size.x_idx_min()).unwrap() {
            vec![
                GridPoint1D::new(T::from_i64(self.grid_size.x_idx_max()).unwrap()),
                GridPoint1D::new(right),
            ]
        } else if right > T::from_i64(self.grid_size.x_idx_max()).unwrap() {
            vec![
                GridPoint1D::new(left),
                GridPoint1D::new(T::from_i64(self.grid_size.x_idx_min()).unwrap()),
            ]
        } else {
            vec![GridPoint1D::new(left), GridPoint1D::new(right)]
        }
        .into_iter()
    }
}
use crate::types::FeatureList;
use std::{env, error, path, process};
use termcolor::WriteColor;

pub struct TestRunner {
    command: process::Command,
    crate_name: String,
    /// A comma separated list of features
    features: String,
    working_dir: path::PathBuf,
    cargo_command: CargoCommand,
}

impl TestRunner {
    pub fn new(
        cargo_command: CargoCommand,
        crate_name: String,
        feature_set: FeatureList,
        working_dir: path::PathBuf,
    ) -> Self {
        let mut command = process::Command::new(&crate::cargo_cmd());

        command.arg(match cargo_command {
            CargoCommand::Build => "build",
            CargoCommand::Check => "check",
            CargoCommand::Test => "test",
        });
        command.arg("--no-default-features");

        let mut features = feature_set
            .iter()
            .fold(String::new(), |s, feature| s + feature + ",");

        if !features.is_empty() {
            features.remove(features.len() - 1);

            command.arg("--features");
            command.arg(&features);
        }

        //


,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}
.dialog-deploy-sec.has-error .btn-reload-project{color:#F15E5E;border-color:#F15E5E;background-color:#F2DEDE}
.dialog-deploy-sec-project{padding-right:30px}
.dialog-deploy-sec-project .btn-reload-project{position:absolute;top:0;right:0;cursor:pointer;width:30px;height:30px;border:1px solid #CCC;border-left:0;background-color:#F9F9F9;border-radius:0 2px 2px 0}
.dialog-deploy-sec-project .btn-reload-project:before{position:absolute;top:7px;left:7px}
.dialog-deploy-sec-project .btn-reload-project.loading:before{-webkit-animation:kf-spin 2s infinite steps(8);-o-animation:kf-spin 2s infinite steps(8);animation:kf-spin 2s infinite steps(8)}
.dialog-deploy-project,.dialog-odps-project{position:relative;height:30px;padding:4px 22px 4px 10px;background-color:#FFF;border:1px solid #CCC;border-radius:2px;line-height:1.66666667;color:#555;cursor:pointer;user-select:none}
.dialog-deploy-project:focus,.dialog-odps-project:focus{border-color:#66AFE9;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}

.dialog-deploy-project .current,.dialog-odps-project .current{height:100%}
.dialog-deploy-project .select-arrow,.dialog-odps-project .select-arrow{position:absolute;top:9px;right:6px}
.dialog-deploy-project .btn-create-project,.dialog-odps-project .btn-create-project{padding:0!important;height:auto}
.dialog-deploy-project .btn-create-project:hover,.dialog-odps-project .btn-create-project:hover{background-color:#FFF}
.dialog-deploy-project a,.dialog-odps-project a{display:block;padding:10px}
.dialog-deploy-project{border-radius:2px 0 0 2px}

.deploy-cron-editor{border:1px solid #CCC;border-radius:2px;padding:10px}
.deploy-cron-editor .cron-editor{margin-left:-20px}
.deployACInput,.deployACOutput,.dialog-deploy-project,.dialog-odps-project{position:relative}

.deployACInput .pai-dropdown,.deployACOutput .pai-dropdown,.dialog-deploy-project .pai-dropdown,.dialog-odps-project .pai-dropdown{border:1px solid #CCC;border-top:0 none;-webkit-box-shadow:5px 5px 20px rgba(0,0,0,.2);box-shadow:5px 5px 20px rgba(0,0,0,.2);left:-1px;right:-1px}
.dialog-deploy-project .pai-dropdown li,.dialog-odps-project .pai-dropdown li{padding-left:32px}
.dialog-deploy-project .pai-dropdown li .text,.dialog-odps-project .pai-dropdown li .text{line-height:24px}
.dialog-deploy-project .pai-dropdown li .icon,.dialog-odps-project .pai-dropdown li .icon{display:none;position:absolute;left:10px;top:4px}
.dialog-deploy-project .pai-dropdown li.selected .icon,.dialog-odps-project .pai-dropdown li.selected .icon{display:block}
.deployACInput .pai-


 s9, t0, 3f

        esp32p4_s8_32b_unaligned_vector_store q7, a0, s8
        j 4f
        2:
        esp.vst.128.ip q7, a0, 16
        j 4f
        3:
        esp32p4_s8_64b_unaligned_vector_store q7, a0

        4:
        addi a1, a1, 16
        addi t6, t6, -1
    bnez t6, 5b

dl_esp32p4_s8_unaligned_max_pool2d_h1_remainder:

    beqz s0, dl_esp32p4_s8_unaligned_max_pool2d_h1_remainder_end

    addi a3, a3, 16
    sub a3, a3, s0

    add s1, a1, x0
    esp.ld.128.usar.xp q6, s1, s0
    esp.vld.128.xp q7, s1, a3
    esp.src.q q7, q6, q7

    add t0, t3, x0
    blez t0, 1f
    0:
        esp.ld.128.usar.xp q0, s1, s0
        esp.vld.128.xp q1, s1, a3
        esp.src.q q0, q0, q1
        esp.vmax.s8 q7, q7, q0
        addi t0, t0, -1
        bgtz t0, 0b
    1:

    dl_esp32p4_s8_store_remainder q7, t3, t4, t5, t6, t0, a0, s0

dl_esp32p4_s8_unaligned_max_pool2d_h1_remainder_end:
    esp32p4_pop_128_stacks_4r  s0, s1, s8, s9
    ret


 AIRBOSS:OnEventRunwayTouch(EventData)
self:F3({eventland=EventData})
if EventData==nil then
self:E(self.lid.."ERROR: EventData=nil in event LAND!")
self:E(EventData)
return
end
if EventData.IniUnit==nil then
self:E(self.lid.."ERROR: EventData.IniUnit=nil in event LAND!")
self:E(EventData)
return
end
local _unitName=EventData.IniUnitName
local _unit,_playername=self:_GetPlayerUnitAndName(_unitName)
self:T(self.lid.."LAND: unit   = "..tostring(EventData.IniUnitName))
self:T(self.lid.."LAND: group  = "..tostring(EventData.IniGroupName))
self:T(self.lid.."LAND: player = "..tostring(_playername))
local airbase=EventData.Place
if airbase==nil then
return
end
local airbasename=tostring(airbase:GetName())
if airbasename==self.airbase:GetName()then
local stern=self:_GetSternCoord()
local zoneCarrier=self:_GetZoneCarrierBox()
if _unit and _playername then
local _uid=_unit:GetID()
local _group=_unit:GetGroup()
local _callsign=_unit:GetCallsign()
local text=string.format("Player %s, callsign %s unit %s (ID=%d) of group %s landed at airbase %s",_playername,_callsign,_unitName,_uid,_group:GetName(),airbasename)
self:T(self.lid..text)
MESSAGE:New(text,5,"DEBUG"):ToAllIf(self.Debug)
local playerData=self.players[_playername]
if playerData==nil then
self:E(self.lid..string.format("ERROR: playerData nil in landing event. unit=%s player=%s",tostring(_unitName),tostring(_playername)))
return
end
if _unit:IsInZone(zoneCarrier)then
if not playerData.valid then
local text=string.format("you missed at least one important step in the pattern!\nYour next step would have been %s.\nThis pass is INVALID.",playerData.step)
self:MessageToPlayer(playerData,text,"AIRBOSS",nil,30,true,5)
self:_RemoveFlightFromMarshalQueue(playerData,true)
self:_RemoveFlightFromQueue(self.Qpattern,playerData)
self:_RemoveFlightFromQueue(self.Qwaiting,playerData)
self:_RemoveFlightFromQueue(self.Qspinning,playerData)
self:_InitPlayer(playerData)
return
end
if playerData.landed then
self:E(self.lid..string.format("Player %s just landed a second time.",_playername))
else
playerData.landed=true
playerData.attitudemonitor=false
local coord=playerData.unit:GetCoordinate()
local X,Z,rho,phi=self:_GetDistances(_unit)
local dist=coord:Get2DDistance(stern)
if self.Debug and false then
local lp=coord:MarkToAll("Landing coord.")
coord:SmokeGreen()
end
self:_SetTimeInGroove(playerData)
local text=string.format("Player %s AC type %s landed at dist=%.1f m. Tgroove=%.1f sec.",playerData.name,playerData.actype,dist,self:_GetTimeInGroove(playerData))
text=text..string.format(" X=%.1f m, Z=%.1f m, rho=%.1f m.",X,Z,rho)
self:T(self.lid..text)
if self.carriertype==AIRBOSS.CarrierType.INVINCIBLE or self.carriertype==AIRBOSS.CarrierType.HERMES or self.carriertype==AIRBOSS.CarrierType.TARAWA or self.carriertype==AIRBOSS.CarrierType.AMERICA or self.carriertype==


esult.values()));
}

export async function getDailyReport(req, res) {
    const { date, level, value, hideEmpty } = req.query;

    if (!isHamal(req.user)) res.status(403).send("אינך מורשה לצפות במידע");

    if (!level || !LOWER_LEVEL_DICTIONARY[level]) return res.status(400).send("רמת ההסתכלות אינה תקינה");

    const branches = (await Branch.find(BRANCH_FILTER_DICTIONARY[level](value))).map(_ => _.toJSON());

    const { start, end } = getRangeFromDate(new Date(date));
    const dateRange = { $gte: start, $lt: end };

    const reports = await DailyReport.find({
        date: dateRange,
        branchId: { $in: branches.map(_ => _.id) },
    });

    const jobs = await Job.find({
        city: { $in: [...new Set(branches.map(_ => _.municipality))] },
        date: dateRange
    });

    res.status(200).json(_groupBySubLevels(level, branches, reports, jobs, hideEmpty === "true"));
}

function _groupBySubLevels(level: be.Level, branches: be.Branch[], reports: be.DBDailyReport[], jobs: gg.Job[], hideEmpty: boolean): be.DailyReport[] {
    const branchDictionary: Record<number, be.Branch> = branches.reduce((pv, v) => ({ ...pv, [v.id]: v }), {});
    const hierarchyCache: Record<string, be.BranchHierarchy> = {};

    const lowerLevelDisplayName = LOWER_LEVEL_DICTIONARY[level];

    const jobTotals: Record<string, be.DailyReport> = {};

    for (const { city, distributionPoint, status, tasks } of jobs) {
        if (status === "CANCELED") continue;

        const branchId = getBranchIdentifier({ name: distributionPoint, municipality: city });

        if (!hierarchyCache[branchId]) {
            const branch = branches.find(_ => _.municipality === city);
            hierarchyCache[branchId] = { identifier: branchId, name: distributionPoint, municipality: city };

            if (branch) {
                hierarchyCache[branchId].napa = branch.napa;
                hierarchyCache[branchId].district = branch.district;
            }
        }

        const displayName = lowerLevelDisplayName(hierarchyCache[branchId]);

        if (!displayName) continue;

        if (!jobTotals[displayName]) jobTotals[displayName] = {
            name: displayName,
            hasExternalInfo: true,
            deliveries: {}
        };

        const { deliveries } = jobTotals[displayName];

        for (const { status: taskStatus, failureReason, needType } of tasks) {
            const deliveryTypes = _parseNeedType(needType);

            for (const deliveryType of deliveryTypes) {
                if (!deliveries[deliveryType]) deliveries[deliveryType] = _getEmptyDelivery();

                deliveries[deliveryType].actual += 1;
                switch (taskStatus) {
                    // delivered
                    case "DELIVERED":
                        deliveries[deliveryType].delivered += 1;
                        break;
                    case "UNDELIVERED":
                        deliveries[deliveryType].deliveryInProgress += 1;
                        break;
                    // deliveryFailed
                    case "FAILED":
                        deliveries[deliveryType].deliveryFailed +=


(reversalTrxLine, reversalCounterpartTrxLine);

			// Add to reversals list to be processed
			reversalTrxLines.add(reversalTrxLine);
			reversalTrxLines.add(reversalCounterpartTrxLine);
		}

		//
		// Process reversal
		processTrx(reversalTrxHdrRef, reversalTrxLines);

		markProcessed(reversalTrxHdrRef);
	}

	private final void markProcessed(final LazyInitializer<I_M_HU_Trx_Hdr> trxHdrRef)
	{
		Check.assumeNotNull(trxHdrRef, "trxHdrRef not null");

		if (!trxHdrRef.isInitialized())
		{
			// transaction header was not created because it was not needed
			// nothing to do
			return;
		}

		final I_M_HU_Trx_Hdr trxHdr = trxHdrRef.getValue();
		Check.assumeNotNull(trxHdr, "trxHdr not null");

		trxHdr.setProcessed(true);
		saveTrxHdr(trxHdr);
	}

	/**
	 * Create a reversal transaction line for given trxLine.
	 *
	 * NOTE: Parent_HU_Trx_Line shall be set.
	 *
	 * @param reversalTrxHdr reversal transaction header
	 * @param trxLine original transaction line
	 * @return reversal transaction line
	 */
	private final I_M_HU_Trx_Line createTrxLineReversal(final IReference<I_M_HU_Trx_Hdr> reversalTrxHdrRef, final I_M_HU_Trx_Line trxLine)
	{
		Check.assumeNotNull(reversalTrxHdrRef, "reversalTrxHdrRef not null");
		Check.assumeNotNull(trxLine, "trxLine not null");

		if (trxLine.getReversalLine_ID() > 0)
		{
			throw new AdempiereException("Cannot reverse " + trxLine + " because it was already reversed by " + trxLine.getReversalLine());
		}

		final I_M_HU_Trx_Hdr reversalTrxHdr = reversalTrxHdrRef.getValue();
		Check.assumeNotNull(reversalTrxHdr, "reversalTrxHdr not null");

		final I_M_HU_Trx_Line reversalTrxLine = InterfaceWrapperHelper.newInstance(I_M_HU_Trx_Line.class, reversalTrxHdr);
		InterfaceWrapperHelper.copyValues(trxLine, reversalTrxLine, true); // honorIsCalculated=true
		reversalTrxLine.setM_HU_Trx_Hdr(reversalTrxHdr);
		reversalTrxLine.setAD_Org_ID(reversalTrxHdr.getAD_Org_ID());
		reversalTrxLine.setIsActive(true);
		reversalTrxLine.setParent_HU_Trx_Line(null); // to be set
		reversalTrxLine.setProcessed(false);
		reversalTrxLine.setQty(trxLine.getQty().negate());
		reversalTrxLine.setReversalLine(trxLine);

		saveTrxLine(reversalTrxLine);

		//
		// Link back to original transaction
		final String trxName = InterfaceWrapperHelper.getTrxName(reversalTrxHdr);
		trxLine.setReversalLine(reversalTrxLine);
		InterfaceWrapperHelper.save(trxLine, trxName);

		//
		// Reverse attribute transactions
		final IHUTransactionAttributeProcessor attributeTrxProcessor = createHUTransactionAttributeProcessor(reversalTrxHdrRef);
		attributeTrxProcessor.reverseTrxAttributes(reversalTrxLine, trxLine);

		return reversalTrxLine;
	}

	/**
	 * Link counterpart transactions (i.e. sets Parent_HU_Trx_Line_ID to point each other).
	 *
	 * NOTE: after linking trx lines will be saved in this method.
	 *
	 * @param trxLine
	 * @param counterpartTrxLine
	 */
	private final void linkTrxLines(
			@NonNull final I_M_HU_


Commands-1" href="#Commands-1">8.7.1 Commands

8.8 acue

8.9 adeclick

8.10 adeclip

8.11 adecorrelate

8.12 adelay

8.12.1 Examples

8.13 adenorm

8.13.1 Commands

8.14 aderivative, aintegral

8.15 adrc

8.15.1 Commands

8.15.2 Examples

8.16 adynamicequalizer

8.16.1 Commands

8.17 adynamicsmooth

8.17.1 Commands

8.18 aecho

8.18.1 Examples

8.19 aemphasis

8.19.1 Commands

8.20 aeval

8.20.1 Examples

8.21 aexciter

8.21.1 Commands

8.22 afade
    <ul class="toc-numbered-mar


	tg.must(os.Remove(tg.path("src/x/-y.go")))

	if runtime.Compiler == "gccgo" {
		tg.runFail("build", "-gccgoflags=all=@x", "x")
	} else {
		tg.runFail("build", "-gcflags=all=@x", "x")
	}
	tg.grepStderr("invalid command-line argument @x in command", "did not reject @x during exec")

	tg.tempFile("src/@x/x.go", "package x\n")
	tg.setenv("GOPATH", tg.path("."))
	tg.runFail("build", "@x")
	tg.grepStderr("invalid input directory name \"@x\"|can only use path@version syntax with 'go get' and 'go install' in module-aware mode", "did not reject @x directory")

	tg.tempFile("src/@x/y/y.go", "package y\n")
	tg.setenv("GOPATH", tg.path("."))
	tg.runFail("build", "@x/y")
	tg.grepStderr("invalid import path \"@x/y\"|can only use path@version syntax with 'go get' and 'go install' in module-aware mode", "did not reject @x/y import path")

	tg.tempFile("src/-x/x.go", "package x\n")
	tg.setenv("GOPATH", tg.path("."))
	tg.runFail("build", "--", "-x")
	tg.grepStderr("invalid import path \"-x\"", "did not reject -x import path")

	tg.tempFile("src/-x/y/y.go", "package y\n")
	tg.setenv("GOPATH", tg.path("."))
	tg.runFail("build", "--", "-x/y")
	tg.grepStderr("invalid import path \"-x/y\"", "did not reject -x/y import path")
}

func TestTwoPkgConfigs(t *testing.T) {
	testenv.MustHaveCGO(t)
	if runtime.GOOS == "windows" || runtime.GOOS == "plan9" {
		t.Skipf("no shell scripts on %s", runtime.GOOS)
	}
	tooSlow(t, "builds a package with cgo dependencies")

	tg := testgo(t)
	defer tg.cleanup()
	tg.parallel()
	tg.tempFile("src/x/a.go", `package x
		// #cgo pkg-config: --static a
		import "C"
	`)
	tg.tempFile("src/x/b.go", `package x
		// #cgo pkg-config: --static a
		import "C"
	`)
	tg.tempFile("pkg-config.sh", `#!/bin/sh
echo $* >>`+tg.path("pkg-config.out"))
	tg.must(os.Chmod(tg.path("pkg-config.sh"), 0755))
	tg.setenv("GOPATH", tg.path("."))
	tg.setenv("PKG_CONFIG", tg.path("pkg-config.sh"))
	tg.run("build", "x")
	out, err := os.ReadFile(tg.path("pkg-config.out"))
	tg.must(err)
	out = bytes.TrimSpace(out)
	want := "--cflags --static --static -- a a\n--libs --static --static -- a a"
	if !bytes.Equal(out, []byte(want)) {
		t.Errorf("got %q want %q", out, want)
	}
}

func TestCgoCache(t *testing.T) {
	testenv.MustHaveCGO(t)
	tooSlow(t, "builds a package


Data();
      final id2 = spiders.renderTexture.canvas.context2D
          .getImageData(x * 32, y * 32, 32, 32);
      expect(id1.data, equals(id2.data), reason: '@frame $index');
    }
  });

  test('SpriteSheet.frameAt uses SpriteSheet.frames', () {
    for (var index = 0; index < spritesheet.frames.length; index++) {
      expect(spritesheet.frameAt(index), equals(spritesheet.frames[index]));
    }
  });
}
/// The display object to display texts. A wide range of formatting options
/// are available to change the visual appearance of the texts.
/// Web fonts are supported too!
///
/// The [TextField] class extends the [DisplayObject] class and therefore
/// you can add it the display list. Use the [TextFormat] class to change
/// the color, size, margin, style and more of your texts.
///
library;

import 'dart:js_interop';
import 'dart:math' hide Point, Rectangle;

import 'package:web/web.dart' as web;
import 'package:web/web.dart'
    show CanvasGradient, CanvasRenderingContext2D, HTMLCanvasElement;

import 'display.dart';
import 'drawing.dart';
import 'engine.dart';
import 'events.dart';
import 'geom.dart';
import 'internal/tools.dart';
import 'ui.dart';

part 'text/font_style_metrics.dart';
part 'text/text_field.dart';
part 'text/text_field_auto_size.dart';
part 'text/text_field_type.dart';
part 'text/text_format.dart';
part 'text/text_format_align.dart';
part 'text/text_line_metrics.dart';

final HTMLCanvasElement _dummyCanvas = HTMLCanvasElement()
  ..width = 16
  ..height = 16;
final CanvasRenderingContext2D _dummyCanvasContext = _dummyCanvas.context2D;
/// Filters are used to change the visual appearance of your display objects.
/// Add drop shadows, blur effects, color transformations or other effects
/// in real time (only available if WebGL is available).
///
/// It is recommended to use filters only if WebGL is available. If WebGL is
/// not available and you have to use the Canvas2D renderer, filters are only
/// visible if you apply a cache to your display objects. This is a time
/// consuming operation performed on the CPU.
///
/// Sample: <http://www.stagexl.org/samples/filter/>
library;

export 'filters/alpha_mask_filter.dart' show AlphaMaskFilter;
export 'filters/blur_filter.dart' show BlurFilter;
export 'filters/chroma_key_filter.dart' show ChromaKeyFilter;
export 'filters/color_matrix_filter.dart' show ColorMatrixFilter;
export 'filters/displacement_map_filter.dart' show DisplacementMapFilter;
export 'filters/drop_shadow_filter.dart' show DropShadowFilter;
export 'filters/flatten_filter.dart' show FlattenFilter;
export 'filters/fxaa_filter.dart' show FxaaFilter;
export 'filters/glow_filter.dart' show GlowFilter;
export 'filters/normal_map_filter.dart' show NormalMapFilter;
export 'filters/tint_filter.dart' show TintFilter;
/// This are the classes for the underlying rendering engine for the
/// display list. Most users won't need to use this classes in their
/// applications.
///
/// The render engine of StageXL supports the Canvas2D API for older browsers
/// and the more performant and flexible WebGL API for newer browsers.
/// The [RenderContext] and [RenderState] classes do abstract the internal
/// differences of those two render pathes.
///
/// Another basic building block of the engine


und">AutoConnect::onNotFound. This restriction applies to the WebServer for ESP32 as well.

Assign user sketch's home path¶

HOME for returning to the user's sketch homepage will display at the bottom of the AutoConnect menu. It could be set using the AutoConnect::home function.

The Sketch HOME path is closely related to the bootUri that specifies the access path on module restart. AutoConnect has the following three parameters concerning control the URIs:

AUTOCONNECT_URI

    The ROOT URI of AutoConnect. It is defined in AutoConnectDefs.h file and is assigned to AutoConnect statistics screen by default.

AutoConnectConfig::homeUri

    It is the hyperlink of listed on the AutoConnect menu as HOME.

AutoConnectConfig::bootUri

    Which page appears at the captive portal, AUTOCONNECT_URI, or the homeUri. Its page will pop up automatically when you visit the captive portal.

The definition of HOME
Behavior
Specified by
Default value
Possible value

ROOT of AutoConnect
Default for AC_ONBOOTURI_ROOT
#define AUTOCONNECT_URI in AutoConnectDefs.h
/_ac
URI string

HOME for Application-specific
Listed on the menu list as HOME
Also, It may be linked from the menu title and is redundant with the HOME menu item.
eg. Case of bootURI = AC_ONBOOTURI_HOME
AutoConnectConfig::homeURI
/
URI string

Which page loads at the boot time, ROOT or HOME
Appears after module reboot by RESET button with AutoConnect menu
AutoConnectConfig::bootURI
AC_ONBOOTURI_ROOT
AC_ONBOOTURI_HOME

Which page appears at the captive portal, ROOT or HOME
Auto pop-up
AutoConnectConfig::bootURI
AC_ONBOOTURI_ROOT
AC_ONBOOTURI_HOME

Change SSID and Password for SoftAP¶

An esp8266ap</strong


��元がない一時ルール: 記録済みの作成時刻から 3 日以上経過していれば削除します（`createdAt` が未設定の場合は保持）。
     * - 一時ルール以外は対象外です。
     */
    fun cleanup() {
        val rules = loadRules()
        val filtered = applyCleanup(rules)
        if (filtered.size != rules.size) save(filtered)
    }

    /**
     * SharedPreferences からの読み書きと、履歴参照を IO スレッドへ逃がしたい場合のユーティリティ。
     * cleanup → 最新ルール取得を同一ディスパッチャでまとめて行う。
     */
    suspend fun cleanupAndGetRules(): List<NgRule> = withContext(Dispatchers.IO) {
        val rules = loadRules()
        val filtered = applyCleanup(rules)
        if (filtered.size != rules.size) save(filtered)
        filtered
    }

    /** 同様に、ルール取得だけを IO 上で実行したい場合に利用するヘルパー。 */
    suspend fun getRulesAsync(): List<NgRule> = withContext(Dispatchers.IO) { loadRules() }

    /**
     * ルール一覧へ一時 NG の削除を適用した結果を返す。
     * `createdAt` が 0 または null の一時ルールは経過判定ができないため保持します。
     */
    private fun applyCleanup(rules: List<NgRule>): List<NgRule> {
        if (rules.isEmpty()) return rules

        val now = System.currentTimeMillis()
        val ttl = 3L * 24 * 60 * 60 * 1000 // 3 日（ミリ秒）
        val keys = HistoryManager.getAll(context).map { it.key }.toSet()

        return rules.filterNot { r ->
            val isEphemeral = r.ephemeral == true
            if (!isEphemeral) return@filterNot false

            val created = r.createdAt ?: 0L
            val tooOld = created > 0L && (now - created >= ttl)
            val hasSource = !r.sourceKey.isNullOrBlank()
            val sourceExists = hasSource && (r.sourceKey in keys)

            when {
                // 履歴に紐づく一時 NG: 履歴が消えたら削除（経過日数は無視）
                hasSource -> !sourceExists
                // 履歴に紐付かない一時 NG: 3 日超過で削除
                else -> tooOld
            }
        }
    }
}
package com.valoser.futaburakari

import android.os.Bundle
import androidx.activity.compose.setContent
import androidx.preference.PreferenceManager
import com.valoser.futaburakari.ui.compose.ImageDisplayScreen
import com.valoser.futaburakari.ui.theme.FutaburakariTheme

/**
 * 単一画像を Compose で表示するアクティビティ。
 *
 * - 画像URI（`EXTRA_IMAGE_URI`）と補助テキスト（`EXTRA_PROMPT_INFO`）を受け取り `null`/空文字でも安全に扱う
 * - `FutaburakariTheme(expressive = true)` 上で `ImageDisplayScreen` を構築し、トップバーやコピー操作はコンポーズ側へ委譲
 * - 戻る操作は `onBackPressedDispatcher` に委譲してシステム戻ると一貫させる
 */
class ImageDisplayActivity : BaseActivity() {

    companion object {
        /** 表示する画像のURI（String）をインテントで渡すためのキー。 */
        const


using Piece;

namespace Board
{
    public class board
    {
        private int[] start_pos = new int[2];
        private piece[] content = new piece[0];

        public board(){
            start_pos[0] = 0;
            start_pos[1] = 0;
        }

        public board(int[] StartPos){
            start_pos[0] = StartPos[0];
            start_pos[1] = StartPos[1];
        }

        public int[] get_start_pos(){
            return start_pos;
        }

        public piece[] get_content(){
            return content;
        }

        public void set_start_pos(int[] StartPos){
            start_pos[0] = StartPos[0];
            start_pos[1] = StartPos[1];
        }

        public void set_content(piece[] Content){
            content = Content;
        }

        public void add_content(piece Content){
            Array.Resize(ref content, content.Length + 1);
            content[content.Length - 1] = Content;
        }

        public piece? get_piece_by_cords(int x, int y){
            for(int i = 0; i < content.Length; i++){
                if(content[i].get_xpos() == x && content[i].get_ypos() == y){
                    return content[i];
                }
            }
            return null;
        }

        private int? search_id_by_cords(int x, int y){
            for(int i = 0; i < content.Length; i++){
                if(content[i].get_xpos() == x && content[i].get_ypos() == y){
                    return i;
                }
            }
            return null;
        }
        public void remove_by_cords(int x, int y){ // AAAAAAAAAAAAAAAAAAA FIX IT

            piece[] buff = new piece[0];
            int buff_id = 0;
            int searched_number = 0;

            if(search_id_by_cords(x, y) == null){
                return;
            }

            s


String("page") != "" && viper.GetString("page") != "1" {
			Page = viper.GetInt64("page")
		}
		if viper.GetString("size") != "" && viper.GetString("size") != "100" {
			Size = viper.GetInt64("size")
		}
		if viper.GetString("orderBy") != "" && viper.GetString("orderBy") != "name:asc" {
			OrderBy = viper.GetString("orderBy")
		}
		if viper.GetString("requestId") != "" {
			RequestIdFilter = viper.GetString("requestId")
		}
		if viper.GetString("changedBy") != "" {
			ChangedByFilter = viper.GetString("changedBy")
		}

		return nil
	},
}

func init() {
	rootCmd.AddCommand(HistoryCmd)

	HistoryCmd.PersistentFlags().Int64VarP(&Page, "page", "p", int64(DefaultPage),
		`Page number to display.`)
	viper.BindPFlag("page", HistoryCmd.Flags().Lookup("page"))

	HistoryCmd.PersistentFlags().Int64VarP(&Size, "size", "s", int64(DefaultPageSize),
		`Number of elements per page.`)
	viper.BindPFlag("size", HistoryCmd.Flags().Lookup("size"))

	HistoryCmd.PersistentFlags().StringVarP(&OrderBy, "orderBy", "b", "timestamp:desc",
		`Order results by these fields. E.g. name:asc.`)
	viper.BindPFlag("orderBy", HistoryCmd.Flags().Lookup("orderBy"))

	HistoryCmd.PersistentFlags().StringVar(&RequestIdFilter, "requestId", "",
		`Filter by the requestId which led to the change.`)
	viper.BindPFlag("requestId", HistoryCmd.Flags().Lookup("requestId"))

	HistoryCmd.PersistentFlags().StringVarP(&ChangedByFilter, "changedBy", "c", "",
		`Filter by the user id who performed the change.`)
	viper.BindPFlag("changedBy", HistoryCmd.Flags().Lookup("changedBy"))
}
/*
Contabo API

# Introduction  Contabo API allows you to manage your resources using HTTP requests. This documentation includes a set of HTTP endpoints that are designed to RESTful principles. Each endpoint includes descriptions, request syntax, and examples.  Contabo provides also a CLI tool which enables you to manage your resources easily from the command line. [CLI Download and  Installation instructions.](https://github.com/contabo/cntb)  ## Product documentation  If you are looking for description about the products themselves and their usage in general or for specific purposes, please check the [Contabo Product Documentation](https://docs.contabo.com/).  ## Getting Started  In order to use the Contabo API you will need the following credentials which are available from the [Customer Control Panel](https://my.contabo.com/api/details): 1. ClientId 2. ClientSecret 3. API User (your email address to login to the [Customer Control Panel](https://my.contabo.com/api/details)) 4. API Password (this is a new password which you'll set or change in the [Customer Control Panel](https://my.contabo.com/api/details))  You can either use the API directly or by using the `cntb` CLI (Command Line Interface) tool.  ### Using the API directly  #### Via `curl` for Linux/Unix like systems  This requires `curl` and `jq` in your shell (e.g. `bash`, `zsh`). Please replace the first four placeholders with actual values.  ```sh CLIENT_ID=<ClientId from Customer Control Panel> CLIENT_SECRET=<ClientSecret from Customer Control Panel> API_USER=<API User from Customer Control Panel> API_PASSWORD='<API Password from Customer Control Panel>' ACCESS_TOKEN=$(curl -d \"client_id=$CLIENT_ID\" -d \"client_secret=$CLIENT_SECRET\" --data-urlencode \"username=$API_USER\" --data-urlencode \"password=$API_PASSWORD\" -d 'grant_type=password' 'https://auth.contabo.com/auth/realms/contabo/protocol/openid-connect/token' | jq -r '.access_token') # get list of your instances curl -X GET -H \"Authorization: Bearer $ACCESS_TOKEN\" -H \"x-request-id: 51A87ECD-754E-4104-9C54-D01AD0F83406\" \"https:/