 {
		write(FD, dismsg, strlen(dismsg));
		sleep(5);
	}
	tipabort(NOSTR);
}

void
intcopy()
{
	raw();
	quit = 1;
	longjmp(intbuf, 1);
}

execute(s)
	char *s;
{
	register char *cp;

	if ((cp = rindex(value(SHELL), '/')) == NULL)
		cp = value(SHELL);
	else
		cp++;
	shell_uid();
	execl(value(SHELL), cp, "-c", s, 0);
}

args(buf, a)
	char *buf, *a[];
{
	register char *p = buf, *start;
	register char **parg = a;
	register int n = 0;

	do {
		while (*p && (*p == ' ' || *p == '\t'))
			p++;
		start = p;
		if (*p)
			*parg = p;
		while (*p && (*p != ' ' && *p != '\t'))
			p++;
		if (p != start)
			parg++, n++;
		if (*p)
			*p++ = '\0';
	} while (*p);

	return(n);
}

prtime(s, a)
	char *s;
	time_t a;
{
	register i;
	int nums[3];

	for (i = 0; i < 3; i++) {
		nums[i] = (int)(a % quant[i]);
		a /= quant[i];
	}
	printf("%s", s);
	while (--i >= 0)
		if (nums[i] || i == 0 && nums[1] == 0 && nums[2] == 0)
			printf("%d %s%c ", nums[i], sep[i],
				nums[i] == 1 ? '\0' : 's');
	printf("\r\n!\r\n");
}

variable()
{
	char	buf[256];

	if (prompt("[set] ", buf))
		return;
	vlex(buf);
	if (vtable[BEAUTIFY].v_access&CHANGED) {
		vtable[BEAUTIFY].v_access &= ~CHANGED;
		kill(pid, SIGSYS);
	}
	if (vtable[SCRIPT].v_access&CHANGED) {
		vtable[SCRIPT].v_access &= ~CHANGED;
		setscript();
		/*
		 * So that "set record=blah script" doesn't
		 *  cause two transactions to occur.
		 */
		if (vtable[RECORD].v_access&CHANGED)
			vtable[RECORD].v_access &= ~CHANGED;
	}
	if (vtable[RECORD].v_access&CHANGED) {
		vtable[RECORD].v_access &= ~CHANGED;
		if (boolean(value(SCRIPT)))
			setscript();
	}
	if (vtable[TAND].v_access&CHANGED) {
		vtable[TAND].v_access &= ~CHANGED;
		if (boolean(value(TAND)))
			tandem("on");
		else
			tandem("off");
	}
 	if (vtable[LECHO].v_access&CHANGED) {
 		vtable[LECHO].v_access &= ~CHANGED;
 		HD = boolean(value(LECHO));
 	}
	if (vtable[PARITY].v_access&CHANGED) {
		vtable[PARITY].v_access &= ~CHANGED;
		setparity();
	}
}

/*
 * Turn tandem mode on or off for remote tty.
 */
tandem(option)
	char *option;
{
	struct sgttyb rmtty;

	ioctl(FD, TIOCGETP, &rmtty);
	if (strcmp(option,"on") == 0) {
		rmtty.sg_flags |= TANDEM;
		arg.sg_flags |= TANDEM;
	} else {
		rmtty.sg_flags &= ~TANDEM;
		arg.sg_flags &= ~TANDEM;
	}
	ioctl(FD, TIOCSETP, &rmtty);
	ioctl(0,  TIOCSETP, &arg);
}

/*
 * Send a break.
 */
genbrk()
{

	ioctl(FD, TIOCSBRK, NULL);
	sleep(1);
	ioctl(FD, TIOCCBRK, NULL);
}

/*
 * Suspend tip
 */
suspend(c)
	char c;
{

	unraw();
	kill(c == CTRL('y') ? getpid() : 0, SIGTSTP);
	raw();
}

/*
 *	expand a file name if it includes shell meta characters
 */

char *
expand(name)
	char name[];
{
	static char xname[BUFSIZ];
	char cmdbuf[BUFSIZ];
	register int pid, l, rc;
	register char *cp, *Shell;
	int s, pivec[2], (*sigint)();

	if (!anyof(name, "~{[*?$`'\"\\"))
		return(name);
	/* sigint = signal(SIGINT, SIG_IGN); */
	if (pipe(pivec) < 0) {
		perror("pipe");
		/* signal(SIGINT, sigint) */
		return(name);
	}
	sprintf(cmdbuf, "echo %s", name);
	if ((pid = vfork()) == 0) {
		Shell = value(SHELL);
		if (Shell == NOSTR)
			Shell = _PATH_BSHELL;
		close(pivec[0]);
		close(1);
		dup(pivec[1]);
		close(pivec[1]);
		close(2);
		shell_uid();
		execl(Shell, Shell, "-c", cmdbuf, 0);
		_exit(1);
	}
	if (pid == -1) {
		perror("fork");
		close(pivec[0]);
		close(pivec[1]);
		return(NOSTR);
	}
	close(pivec[1]);
	l = read(pivec[0], xname, BUFSIZ);
	close(pivec[0]);
	while (wait(&s) != pid);
		;
	s &= 0377;
	if (s != 0 && s != SIGPIPE) {
		fprintf(stderr, "\"Echo\" failed\n");
		return(NOSTR);
	}
	if (l < 0) {
		perror("read");
		return(NOSTR);
	}
	if (l == 0) {
		fprintf(stderr, "\"%s\": No match\n", name);
		return(NOSTR);
	}
	if (l == BUFSIZ) {
		fprintf(stderr, "Buffer overflow expanding \"%s\"\n", name);
		return(NOSTR);
	}
	xname[l] = 0;
	for (cp = &xname[l-1]; *cp == '\n' && cp > xname; cp--)
		;
	*++cp = '\0';
	return(xname);
}

/*
 * Are any of the characters in the two strings the same?
 */

anyof(s1, s2)
	register char *s1, *s2;
{
	register int c;

	while (c = *s1++)
		if (any(c, s2))
			return(1);
	return(0);
}


       return this.subfield;
            }
        }

        public virtual int Degree
        {
            get
            {
                return this.minimalPolynomial.Degree;
            }
        }

        public virtual IPolynomial MinimalPolynomial
        {
            get
            {
                return this.minimalPolynomial;
            }
        }

        public override bool Equals(object obj)
        {
            if(this == obj)
            {
                return true;
            }
            var other = obj as GenericPolynomialExtensionField;
            if(null == other)
            {
                return false;
            }
            return this.subfield.Equals(other.subfield) && this.minimalPolynomial.Equals(other.minimalPolynomial);
        }

        public override int GetHashCode()
        {
            throw new NotImplementedException();
        }
    }
}


widget.groupInfoM != null &&
        widget.groupInfoM!.groupInfo.avatarUpdatedAt != 0) {
      return FutureBuilder<File?>(
          future: ChannelAvatarHandler().readOrFetch(widget.groupInfoM!,
              enableServerRetry: widget.enableServerRetry),
          builder: (context, snapshot) {
            if (snapshot.hasData) {
              return VoceAvatar.file(
                  file: snapshot.data!,
                  size: widget.size,
                  isCircle: widget.isCircle);
            } else {
              return _buildNonFileAvatar();
            }
          });
    } else {
      return _buildNonFileAvatar();
    }
  }

  Widget _buildNonFileAvatar() {
    if (widget.avatarBytes != null && widget.avatarBytes!.isNotEmpty) {
      return VoceAvatar.bytes(
          avatarBytes: widget.avatarBytes!,
          size: widget.size,
          isCircle: widget.isCircle);
    } else if (widget.name != null && widget.name!.isNotEmpty) {
      return VoceAvatar.name(
          name: widget.name!, size: widget.size, isCircle: widget.isCircle);
    } else if (widget._isDefaultPublicChannel ?? false) {
      return VoceAvatar.icon(
          icon: AppIcons.channel, size: widget.size, isCircle: widget.isCircle);
    } else {
      return VoceAvatar.icon(
          icon: AppIcons.private_channel,
          size: widget.size,
          isCircle: widget.isCircle);
    }
  }

  Future<void> _onChannelChanged(
      GroupInfoM groupInfoM, EventActions action, bool afterReady) async {
    if (groupInfoM.gid == widget.groupInfoM?.gid) {
      if (mounted && afterReady) {
        setState(() {});
      }
    }
  }
}
import 'dart:convert';
import 'dart:io';
import 'dart:math';
import 'dart:typed_data';

import 'package:dio/dio.dart';
import 'package:vocechat_client/api/lib/dio_util.dart';
import 'package:vocechat_client/api/models/msg/msg_archive/archive.dart';
import 'package:vocechat_client/api/models/resource/file_prepare_request.dart';
import 'package:vocechat_client/api/models/resource/file_upload_response.dart';
import 'package:vocechat_client/app.dart';

import 'package:vocechat_client/api/models/resource/open_graphic_parse_response.dart';

class ResourceApi {
  late final String _baseUrl;

  ResourceApi({String? serverUrl}) {
    final url = serverUrl ?? App.app.chatServerM.fullUrl;
    _baseUrl = "$url/api/resource";
  }

  Future<Response<Uint8List>> getImage(String imageId) async {
    final dio = DioUtil(baseUrl: _baseUrl);
    final res = await dio.get<List<int>>("/image?id=$imageId",
        options: Options(responseType: ResponseType.bytes));

    var newRes = Response<Uint8List>(
        headers: res.headers,
        requestOptions: res.requestOptions,
        isRedirect: res.isRedirect,
        statusCode: res.statusCode,
        statusMessage: res.statusMessage,
        redirects: res.redirects,
        extra: res.extra);
    res.extra;

    if (res.statusCode == 200 && res.data != null) {
      newRes.data = Uint8List.fromList(res.data!);
    }
    return newRes;
  }

  Future<Response<Uint8List>> getUserAvatar(int uid,
      {bool enableServerRetry = true}) async {
    final dio = DioUtil(baseUrl: _baseUrl, enableRetry: enableServerRetry);
    final res = await dio.get<List<int>>("/a


40.png");
}

.e1a-rel-woman_gesturing_no_tone5 {
  background-image: url("emojione/assets/4.5/png/128/1f645-1f3ff-2640.png");
}

.e1a-man_gesturing_no {
  background-image: url("https://cdn.jsdelivr.net/emojione/assets/4.5/png/128/1f645-2642.png");
}

.e1a-rel-man_gesturing_no {
  background-image: url("emojione/assets/4.5/png/128/1f645-2642.png");
}

.e1a-man_gesturing_no_tone1 {
  background-image: url("https://cdn.jsdelivr.net/emojione/assets/4.5/png/128/1f645-1f3fb-2642.png");
}

.e1a-rel-man_gesturing_no_tone1 {
  background-image: url("emojione/assets/4.5/png/128/1f645-1f3fb-2642.png");
}

.e1a-man_gesturing_no_tone2 {
  background-image: url("https://cdn.jsdelivr.net/emojione/assets/4.5/png/128/1f645-1f3fc-2642.png");
}

.e1a-rel-man_gesturing_no_tone2 {
  background-image: url("emojione/assets/4.5/png/128/1f645-1f3fc-2642.png");
}

.e1a-man_gesturing_no_tone3 {
  background-image: url("https://cdn.jsdelivr.net/emojione/assets/4.5/png/128/1f645-1f3fd-2642.png");
}

.e1a-rel-man_gesturing_no_tone3 {
  background-image: url("emojione/assets/4.5/png/128/1f645-1f3fd-2642.png");
}

.e1a-man_gesturing_no_tone4 {
  background-image: url("https://cdn.jsdelivr.net/emojione/assets/4.5/png/128/1f645-1f3fe-2642.png");
}

.e1a-rel-man_gesturing_no_tone4 {
  background-image: url("emojione/assets/4.5/png/128/1f645-1f3fe-2642.png");
}

.e1a-man_gesturing_no_tone5 {
  background-image: url("https://cdn.jsdelivr.net/emojione/assets/4.5/png/128/1f645-1f3ff-2642.png");
}

.e1a-rel-man_gesturing_no_tone5 {
  background-image: url("emojione/assets/4.5/png/128/1f645-1f3ff-2642.png");
}

.e1a-person_gesturing_ok {
  background-image: url("https://cdn.jsdelivr.net/emojione/assets/4.5/png/128/1f646.png");
}

.e1a-rel-person_gesturing_ok {
  background-image: url("emojione/assets/4.5/png/128/1f646.png");
}

.e1a-person_gesturing_ok_tone1 {
  background-image: url("https://cdn.jsdelivr.net/emojione/assets/4.5/png/128/1f646-1f3fb.png");
}

.e1a-rel-person_gesturing_ok_tone1 {
  background-image: url("emojione/assets/4.5/png/128/1f646-1f3fb.png");
}

.e1a-pers


  ◦ **原因**：聚焦全球科技巨头（如谷歌、亚马逊），受益数字化转型，长期增长确定性高。
    ◦ **适合场景**：高风险偏好，押注全球科技趋势。

---

### **二、需谨慎投资的10个宽基指数及原因**
1. **上证综指（000001）**
   • **原因**：覆盖沪市全样本（含大量低流动性股票），传统周期行业占比过高（金融、能源），成长性弱。

2. **深证综指（399106）**
   • **原因**：包含深市所有股票，中小盘股占比大，波动性极高且流动性分化严重，长期跑输其他宽基。

3. **中证200指数**
   • **原因**：介于沪深300和中证500之间，定位模糊，行业集中度高（金融占25%），缺乏独特配置价值。

4. **中证700指数**
   • **原因**：由中证500+中证200组成，成分股质量参差不齐，长期收益低于同类指数。

5. **中小板指（399005）**
   • **原因**：随注册制改革逐渐边缘化，成分股被创业板和科创板分流，流动性下降。

6. **红利指数（如中证红利）**
   • **原因**：虽属宽基但策略侧重高股息，周期性强，长期收益低于成长型指数，需警惕“价值陷阱”。

7. **中证全指**
   • **原因**：覆盖A股全部股票，包含大量微盘股，流动性风险高，不适合普通投资者长期持有。

8. **中证100指数**
   • **原因**：与沪深300高度重叠（前100大市值），但行业更集中（金融占40%），缺乏分散性。

9. **B股指数**
   • **原因**：流动性极差，外资参与度低，长期被边缘化，政策支持缺失。

10. **恒生综指（港股）**
    ◦ **原因**：港股受国际资本流动影响大，近年流动性萎缩，成分股中地产和金融占比过高，风险集中。

---

### **总结建议**
• **长期投资核心逻辑**：选择行业分散、流动性好、编制规则透明的宽基，如沪深300+中证500+中证A50组合。
• **避坑要点**：警惕行业过度集中、流动性差、


appingFrames[0].start} -> ${overlappingFrames[0].end}`);
        }

        await this._timeFramesRepo!.save(
            new TimeFrame()
                .setEnd(t.end)
                .setStart(t.start)
                .setOpeningHour({weekDay: weekday} as any)
        );

        this._changes.next(await this.getConfig());
    }

    /**
     * Deletes a opening hour frame from a given weekday
     *
     * @param weekday - The number of the weekday (0 = sunday, 6 = saturday)
     * @param t - The time frame or ID of the timeframe to delete
     */
    public async deleteTimeFrame(weekday: number, t: ITimeFrame|number) {
        if (typeof t === 'number') {
            await this._timeFramesRepo.delete(t);
            return;
        }

        await this._timeFramesRepo.delete({start: t.start, end: t.end, openingHour: {weekDay: weekday}});

        this._changes.next(await this.getConfig());
        return;
    }

    /**
     * Returns the current opening hour configuraiton from the database
     */
    public async getConfig(): Promise<OpeningHourConfig> {
        let all = await this._openingHoursRepo.find({relations: ['times']});

        let result: OpeningHourConfig = {};

        all.forEach(config => {
            result[config.weekDay] = config.times || [];
        });

        return result;
    }

    /**
     * @internal
     *
     * Set up the database connection and perform maintainance tasks
     */
    private async _setup() {
        await this._db.ready;

        this._openingHoursRepo = this._db.getRepository(OpeningHour);
        this._timeFramesRepo = this._db.getRepository(TimeFrame);

        await this._ensureAllDays();

        this._resolve();
        this._log.info(`database initialized`);
    }

    /**
     * @internal
     *
     * Ensures that the database contains an entry for each day of week
     */
    private async _ensureAllDays() {
        let all = await this._openingHoursRepo.find();

        if (all.length < 7) {
            this._log.info(`Need to insert missing days`);
            let toCreate: OpeningHour[] = [];

            for (let i = 1; i < 8; i++) {
                if (all.some(o => o.weekDay === i) === false) {
                    let h = new OpeningHour();
                    h.weekDay = i;
                    toCreate.push(h);
                }
            }

            await this._openingHoursRepo.save(toCreate);
        } else {
            this._log.info(`All days available`);
        }
    }
}
    import Cryptography from './Cryptography';

/**
 * Class containing a Merkle tree structure and its related operations.
 */
export default class MerkleTree {
  /**
   * Stores the Merkle tree root node once finalize() is called.
   */
  private merkleTreeRootNode?: IMerkleNode;

  /**
   * Hashing function usinged by this Merkle tree.
   */
  private hash: (value: Buffer) => Buffer = Cryptography.sha256hash;

  /**
   * Intermediate structure for storing different sizes of balanced Merkle trees that will eventually form one final tree.
   * [0] stores tree of 1 leaf, [1] stores tree of 2 leaves, [2] -> 4 leaves, [3] -> 8 leaves and so on.
   */
  private subtrees: (IMerkleNode | undefined) [] = [];

  /**
   * A map such that given a value, the corresponding leaf hash node is located.
   */
  private valueToMerkleNodeMap = new Map<Buffer, IMerkleNode>();

  /**
   * Creates a MerkleTree.
   * @param v


 W) * (n * 2 + 1);
      auto data_c = data + (H * W) * (n * C + c);
      for (decltype(H) y = 0; y < H; y++) {
        for (decltype(W) x = 0; x < W; x++) {
          auto xf = x + *flow_x++;
          auto yf = y + *flow_y++;
          auto xl = clamp_to_index(std::floor(xf), W - 1);
          auto yt = clamp_to_index(std::floor(yf), H - 1);
          auto xr = clamp_to_index(std::floor(xf) + 1, W - 1);
          auto yb = clamp_to_index(std::floor(yf) + 1, H - 1);
          auto tl = data_c[yt * W + xl];
          auto tr = data_c[yt * W + xr];
          auto bl = data_c[yb * W + xl];
          auto br = data_c[yb * W + xr];
          auto alpha = xf - xl, beta = yf - yt;
          auto interp_upper = alpha * (tr - tl) + tl;
          auto interp_lower = alpha * (br - bl) + bl;
          *out++ = beta * (interp_lower - interp_upper) + interp_upper;
        }
      }
    }
  }
}

template <typename T>
void WarpByFlow<T>::backward_impl(const Variables &inputs,
                                  const Variables &outputs,
                                  const vector<bool> &propagate_down,
                                  const vector<bool> &accum) {
  if (!(propagate_down[0] || propagate_down[1])) {
    return;
  }

  auto g_outp = outputs[0]->get_grad_pointer<T>(this->ctx_);

  auto N = outputs[0]->shape().at(0);
  auto C = outputs[0]->shape().at(1);
  auto H = outputs[0]->shape().at(2);
  auto W = outputs[0]->shape().at(3);

  if (propagate_down[0]) {
    if (!accum[0])
      inputs[0]->grad()->zero();

    auto g_data = inputs[0]->cast_grad_and_get_pointer<T>(this->ctx_, false);
    auto flow = inputs[1]->get_data_pointer<T>(this->ctx_);
    auto grad = g_outp;

    for (decltype(N) n = 0; n < N; n++) {
      for (decltype(C) c = 0; c < C; c++) {
        auto flow_x = flow + (H * W) * (n * 2);
        auto flow_y = flow + (H * W) * (n * 2 + 1);
        auto g_data_c = g_data + (H * W) * (n * C + c);
        for (decltype(H) y = 0; y < H; y++) {
          for (decltype(W) x = 0; x < W; x++) {
            auto xf = x + *flow_x++;
            auto yf = y + *flow_y++;
            auto xl = clamp_to_index(std::floor(xf), W - 1);
            auto yt = clamp_to_index(std::floor(yf), H - 1);
            auto xr = clamp_to_index(std::floor(xf) + 1, W - 1);
            auto yb = clamp_to_index(std::floor(yf) + 1, H - 1);
            g_data_c[yt * W + xl] += (1 - xf + xl) * (1 - yf + yt) * (*grad);
            g_data_c[yb * W + xl] += (1 - xf + xl) * (yf - yt) * (*grad);
            g_data_c[yt * W + xr] += (xf - xl) * (1 - yf + yt) * (*grad);
            g_data_c[yb * W + xr] += (xf - xl) * (yf - yt) * (*grad);
            grad++;
          }
        }
      }
    }
  }


="code" href="structcutlass_1_1layout_1_1GeneralMatrix.html#a435e6e78b25296cd7ccaada3dcd4e16b">capacity(MatrixCoord const &extent) const {

  904     Index s;

  905     if (layout_id_ == MatrixLayout::kRowMajor) {

  906       s = extent.row();

  907     }

  908     else {

  909       s = extent.column();

  910     }

  911

  912     Index v = Index((s + stride_[1] - 1) / stride_[1]);

  913     return LongIndex(v) * LongIndex(stride_[0]);

  914   }

  915 };


     */
    public var userUpdate: qaul.rpc.users.UsersOuterClass.UserEntry
      @JvmName("getUserUpdate")
      get() = _builder.getUserUpdate()
      @JvmName("setUserUpdate")
      set(value) {
        _builder.setUserUpdate(value)
      }
    /**
     * ```
     * User Update
     *
     * Sent to libqaul to update the verification & blocked fields
     * of a user.
     * All other fields will be ignored.
     * ```
     *
     * `.qaul.rpc.users.UserEntry user_update = 4;`
     */
    public fun clearUserUpdate() {
      _builder.clearUserUpdate()
    }
    /**
     * ```
     * User Update
     *
     * Sent to libqaul to update the verification & blocked fields
     * of a user.
     * All other fields will be ignored.
     * ```
     *
     * `.qaul.rpc.users.UserEntry user_update = 4;`
     * @return Whether the userUpdate field is set.
     */
    public fun hasUserUpdate(): kotlin.Boolean {
      return _builder.hasUserUpdate()
    }

    /**
     * ```
     * Security Number Request
     *
     * Requests the specific security number for
     * for the connection with this user.
     * ```
     *
     * `.qaul.rpc.users.SecurityNumberRequest security_number_request = 5;`
     */
    public var securityNumberRequest: qaul.rpc.users.UsersOuterClass.SecurityNumberRequest
      @JvmName("getSecurityNumberRequest")
      get() = _builder.getSecurityNumberRequest()
      @JvmName("setSecurityNumberRequest")
      set(value) {
        _builder.setSecurityNumberRequest(value)
      }
    /**
     * ```
     * Security Number Request
     *
     * Requests the specific security number for
     * for the connection with this user.
     * ```
     *
     * `.qaul.rpc.users.SecurityNumberRequest security_number_request = 5;`
     */
    public fun clearSecurityNumberRequest() {
      _builder.clearSecurityNumberRequest()
    }
    /**
     * ```
     * Security Number Request
     *
     * Requests the specific security number for
     * for the connection with this user.
     * ```
     *
     * `.qaul.rpc.users.SecurityNumberRequest security_number_request = 5;`
     * @return Whether the securityNumberRequest field is set.
     */
    public fun hasSecurityNumberRequest(): kotlin.Boolean {
      return _builder.hasSecurityNumberRequest()
    }

    /**
     * ```
     * Security Number Response
     *
     * Libqaul's response containing the security number.
     *
     * The security number contains 8 blocks of 5 digit numbers.
     * They shall be rendered in two rows. If a number is
     * smaller then five-digits, the missing digits shall be filled
     * with leading zeros.
     *
     * example rendering of security number:
     * 13246 42369 46193 12484
     * 12142 31101 09874 34545
     * ```
     *
     * `.qaul.rpc.users.SecurityNumberResponse security_number_response = 6;`
     */
    public var securityNumberResponse: qaul.rpc.users.UsersOuterClass.SecurityNumberResponse
      @JvmName("getSecurityNumberResponse")
      get() = _builder.getSecurityNumberResponse()
      @JvmName("setSecurityNumberResponse")
      set(value) {
        _builder.setSecurityNumberResponse(value)
      }
    /**
     * ```
     * Security Number Response
     *
     * Libqaul's response containing the security number.
     *
     * The security number contains 8 blocks of 5 digit numbers.
     * They shall be rendered in two rows. If a number is


SDma(0x80);
;              break;
Fcn13:
	lxi	b,0x80
	jmp	BSDma

;------------------------------------------------
;         case 7:				/* Get IO Byte */
;         case 8: break;			/* Set IO Byte */
;         case 14: break;			/* Select Disk
;         case 25: break;			/* Return Current Disk */
;         case 28: break;			/* Write Protect Disk */
;         case 30: break;			/* Set File Attribytes */
;         case 32: break;			/* Get/Set User Code */
Fcn7:
Fcn8:
Fcn14:
Fcn25:				; 0 = Drive A
Fcn28:
Fcn30:
Fcn32:				; Return User 0
;         default: break;
;     }
;     return (0);

Exit0:	lxi	h,0
	ret

;------------------------------------------------
;         case 15: return (openfile (arg));		/* Open File */
; openfile (blk)
; {
;     desc = open (getname (arg), 2);
				; DE -> arg
Fcn15:	call	Fcn17		; Does this file exist?
	mov	a,h
	ana	l
	inr	a		; File Not Found (-1)?
	rz			; ..return -1 if File doesn't exist

Open1:	call	CkSrch		;  (Close Search File)

;     arg.recno = 0;

	call	ZeroCR
	mvi	d,13
	dad	d
	mvi	m,0x80		; use S1 as file open flag

	jmp	Exit0		;  Return Dir Code for Entry

;.....
; Common File Open Routine.  Used by Read, Write and Search First.
; Enter: DE = File Mode
;	 hl = Ptr to Null-terminated Path String
; Exit : A = 0 if Error, hl = -1
;	     File Descriptor, A <> 0 if Ok

OpenF:	push	d		; Mode
	push	h		;  Path
	mvi	a,1		;   Fuzix Open Fcn #
	call	syscall		;    _open (Path, Mode);
	pop	b		; Clean Stack
	pop	b
	mov	a,h
	ana	l
	inr	a		; FF -> 0
	ret			; ..return (hl=-1/A=0 if Err, hl=fd/A<>0 of Ok)

;------------------------------------------------
;         case 16: return (closefile (arg));		/* Close File */

;     if (close (arg->desc) == -1)

Fcn16:	lhld	_arg
	lxi	d,13
	dad	d
	mvi	m,0		; clear file open flag

	mvi	a,11		; Fuzix sync function #
	call	syscall		; Execute!

	jmp	Exit0		; Return OK

;....
; Close file descriptor

CloseV:	push	d
	mvi	a,2		;  Fuzix Close Fcn #
	call	syscall		;   Execute!
	pop	b		; Clean Stack
	ret

;------------------------------------------------
;         case 17:					/* Search First */

Fcn17:	call	CkSrch		; Ensure Search File closed
	lxi	h,'.'		; Open current directory (.\0)
	shld	RName		;  store name in Secondary work string
	lxi	d,0		; Open Read-Only
	lxi	h,RName
	call	OpenF		;  _open ('.', 0);
	rz			; hl = -1, A = 0 if Can't Open

	shld	srchFD		; Else Ok, Save File De


8z"></path>
</svg>

        © 2022 GitHub, Inc.

Footer navigation

Terms

Privacy

Security

Status

Docs

Contact GitHub

Pricing

API

Training

          <li class


/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

#ifndef nsInputStreamChannel_h__
#define nsInputStreamChannel_h__

#include "nsBaseChannel.h"
#include "nsIInputStreamChannel.h"

//-----------------------------------------------------------------------------

class nsInputStreamChannel : public nsBaseChannel
                           , public nsIInputStreamChannel
{
public:
    NS_DECL_ISUPPORTS_INHERITED
    NS_DECL_NSIINPUTSTREAMCHANNEL

    nsInputStreamChannel() :
      mIsSrcdocChannel(false) {}

protected:
    virtual ~nsInputStreamChannel() {}

    virtual nsresult OpenContentStream(bool async, nsIInputStream **result,
                                       nsIChannel** channel) override;

    virtual void OnChannelDone() override {
        mContentStream = nullptr;
    }

private:
    nsCOMPtr<nsIInputStream> mContentStream;
    nsCOMPtr<nsIURI> mBaseURI;
    nsString mSrcdocData;
    bool mIsSrcdocChannel;
};

#endif // !nsInputStreamChannel_h__


ifer has the keypair
            // [slug]:[value]

            // So, check for modifiers.

            @if map-get($utility, modifiers) != null {
              // If there are modifiers, capture them as $our-modifiers.

              $our-modifiers: map-get($utility, modifiers);
            } @else {
              // If there aren't, build a dummy so we can keep
              // all our build in the same loop.

              $our-modifiers: (
                "slug": null,
              );
            }

            // OK! C'mon, let's loop!
            // https://www.youtube.com/watch?v=X9i2i07wPUw

            // -------- For each modifier in $our-modifiers ----------

            @each $mod-key, $mod-val in $our-modifiers {
              $property: if(
                $mod-val == null or $mod-val == "",
                $property-default,
                multi-cat($property-default, $mod-val)
              );

              // Now we go through to set the $selector.

              // If mod-props.slug is noModifier...

              @if $mod-key ==
                "" or
                $mod-key ==
                slug or
                smart-quote($mod-key) ==
                "noModifier"
              {
                // First, we can test to see if the base $b is null

                @if $b == null {
                  // If it _is_ null, the rule's selector is $v.

                  $selector: $v;

                  // if the value is noValue ('')
                } @else if $no-value {
                  // selector is the base only

                  $selector: $b;
                } @else {
                  // otherwise, selctor is joined with a hyphen.

                  $selector: $b + "-" + $v;

                  // Nice! We just took care of the non-modifier cases!
                }
              }

              // If there _is_ a modifier...

              @else {
                $mv: if($no-value, $mod-key, $mod-key + "-" + $v);

                // Once we have $mv, test for $b
                // and build the selector as before.

                $selector: if($b == null, $mv, $b + "-" + $mv);
              }

              // finished setting modifier vars

              // Hey. Did we just finish $selector?
              // And do we also have $property and $value?
              // We do?!?!?! We do!

              // FINALLY, 'BUILD THE RULE, MAX!'
              // https://www.youtube.com/watch?v=R3Igz5SfBCE

              @include render-utility(
                $utility,
                $selector,
                $property,
                $value,
                $val-value,
                $media-key
              );
            } // end the modifier loop
          } // end the null value conditional
        } // end the value loop
      } // end the output conditional
    }
  } // end the utility loop
  // (ﾉ◕ヮ◕)ﾉ*:･ﾟ✧
}

@mixin render-utilities-in($utilities) {
  @include these-utilities($utilities);

  $our-breakpoints: map-deep-get($system-properties, breakpoints, standard);
  @each $media-key, $media-value in $our-breakpoints {
    @if map-get($theme-utility-breakpoints, $media-key) {
      @include at-media($m


<Scalars['Boolean']>;
  seen_dogs_reaction?: Maybe<Scalars['String']>;
  updated_at?: Maybe<Scalars['timestamptz']>;
  walker_id?: Maybe<Scalars['Int']>;
};

/** aggregate stddev on columns */
export type Walk_Stddev_Fields = {
  __typename?: 'walk_stddev_fields';
  dog_id?: Maybe<Scalars['Float']>;
  dogs_seen?: Maybe<Scalars['Float']>;
  dogs_seen_reacted?: Maybe<Scalars['Float']>;
  id?: Maybe<Scalars['Float']>;
  jumps?: Maybe<Scalars['Float']>;
  walker_id?: Maybe<Scalars['Float']>;
};

/** order by stddev() on columns of table "walk" */
export type Walk_Stddev_Order_By = {
  dog_id?: Maybe<Order_By>;
  dogs_seen?: Maybe<Order_By>;
  dogs_seen_reacted?: Maybe<Order_By>;
  id?: Maybe<Order_By>;
  jumps?: Maybe<Order_By>;
  walker_id?: Maybe<Order_By>;
};

/** aggregate stddev_pop on columns */
export type Walk_Stddev_Pop_Fields = {
  __typename?: 'walk_stddev_pop_fields';
  dog_id?: Maybe<Scalars['Float']>;
  dogs_seen?: Maybe<Scalars['Float']>;
  dogs_seen_reacted?: Maybe<Scalars['Float']>;
  id?: Maybe<Scalars['Float']>;
  jumps?: Maybe<Scalars['Float']>;
  walker_id?: Maybe<Scalars['Float']>;
};

/** order by stddev_pop() on columns of table "walk" */
export type Walk_Stddev_Pop_Order_By = {
  dog_id?: Maybe<Order_By>;
  dogs_seen?: Maybe<Order_By>;
  dogs_seen_reacted?: Maybe<Order_By>;
  id?: Maybe<Order_By>;
  jumps?: Maybe<Order_By>;
  walker_id?: Maybe<Order_By>;
};

/** aggregate stddev_samp on columns */
export type Walk_Stddev_Samp_Fields = {
  __typename?: 'walk_stddev_samp_fields';
  dog_id?: Maybe<Scalars['Float']>;
  dogs_seen?: Maybe<Scalars['Float']>;
  dogs_seen_reacted?: Maybe<Scalars['Float']>;
  id?: Maybe<Scalars['Float']>;
  jumps?: Maybe<Scalars['Float']>;
  walker_id?: Maybe<Scalars['Float']>;
};

/** order by stddev_samp() on columns of table "walk" */
export type Walk_Stddev_Samp_Order_By = {
  dog_id?: Maybe<Order_By>;
  dogs_seen?: Maybe<Order_By>;
  dogs_seen_reacted?: Maybe<Order_By>;
  id?: Maybe<Order_By>;
  jumps?: Maybe<Order_By>;
  walker_id?: Maybe<Order_By>;
};

/** aggregate sum on columns */
export type Walk_Sum_Fields = {
  __typename?: 'walk_sum_fields';
  dog_id?: Maybe<Scalars['Int']>;
  dogs_seen?: Maybe<Scalars['Int']>;
  dogs_seen_reacted?: Maybe<Scalars['Int']>;
  id?: Maybe<Scalars['Int']>;
  jumps?: Maybe<Scalars['Int']>;
  walker_id?: Maybe<Scalars['Int']>;
};

/** order by sum() on columns of table "walk" */
export type Walk_Sum_Order_By = {
  dog_id?: Maybe<Order_By>;
  dogs_seen?: Maybe<Order_By>;
  dogs_seen_reacted?: Maybe<Order_By>;
  id?: Maybe<Order_By>;
  jumps?: Maybe<Order_By>;
  walker_id?: Maybe<Order_By>;
};

/** update columns of table "walk" */
export enum Walk_Update_Column {
  /** column name */
  CreatedAt = 'created_at',
  /** column name */
  Dog


-16, .push-17, .push-18, .push-19, .push-20, .push-21, .push-22, .push-23, .push-24 {float:right;position:relative;}
.prepend-top {margin-top:1.5em;}
.append-bottom {margin-bottom:1.5em;}
.box {padding:1.5em;margin-bottom:1.5em;background:#E5ECF9;}
hr {background:#ddd;color:#ddd;clear:both;float:none;width:100%;height:.1em;margin:0 0 1.45em;border:none;}
hr.space {background:#fff;color:#fff;visibility:hidden;}
.clearfix:after, .container:after {content:"\0020";display:block;height:0;clear:both;visibility:hidden;overflow:hidden;}
.clearfix, .container {display:block;}
.clear {clear:both;}
/* --------------------------------------------------------------

   link-icons.css
   * Icons for links based on protocol or file type.

   See the Readme file in this folder for additional instructions.

-------------------------------------------------------------- */

/* Use this class if a link gets an icon when it shouldn't. */
body a.noicon {
  background:transparent none !important;
  padding:0 !important;
  margin:0 !important;
}

/* Make sure the icons are not cut */
a[href^="http:"], a[href^="mailto:"], a[href^="http:"]:visited,
a[href$=".pdf"], a[href$=".doc"], a[href$=".xls"], a[href$=".rss"],
a[href$=".rdf"], a[href^="aim:"] {
  padding:2px 22px 2px 0;
  margin:-2px 0;
  background-repeat: no-repeat;
  background-position: right center;
}

/* External links */
a[href^="http:"]          { background-image: url(icons/external.png); }
a[href^="mailto:"]        { background-image: url(icons/email.png); }
a[href^="http:"]:visited  { background-image: url(icons/visited.png); }

/* Files */
a[href$=".pdf"]   { background-image: url(icons/pdf.png); }
a[href$=".doc"]   { background-image: url(icons/doc.png); }
a[href$=".xls"]   { background-image: url(icons/xls.png); }

/* Misc */
a[href$=".rss"],
a[href$=".rdf"]   { background-image: url(icons/feed.png); }
a[href^="aim:"]   { background-image: url(icons/im.png); }
/* http://prismjs.com/download.html?themes=prism-coy&languages=markup+css+clike+javascript+go&plugins=file-highlight */
/**
 * prism.js Coy theme for JavaScript, CoffeeScript, CSS and HTML
 * Based on https://github.com/tshedor/workshop-wp-theme (Example: http://workshop.kansan.com/category/sessions/basics or http://workshop.timshedor.com/category/sessions/basics);
 * @author Tim  Shedor
 */

code[class*="language-"],
pre[class*="language-"] {
	color: black;
	font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
	direction:


top, currentPos.right - currentPos.left,
				currentPos.bottom - currentPos.top, SWP_NOZORDER|SWP_NOOWNERZORDER);
		}
	}
	Dialog->getNextPos (currentPos);
}

// ***************************************************************************

bool CFormMemCombo::getWindowRect (RECT &rect) const
{
	if (Combo)
	{
		// Get parent rect
		RECT parentRect;
		IFormWidget::getWindowRect (parentRect);

		// Add my rect
		RECT myRect;
		Combo.GetWindowRect (&myRect);
		UnionRect(&rect, &myRect, &parentRect);
		return true;
	}
	else
		return false;
}

// ***************************************************************************
// CFormCombo
// ***************************************************************************

CFormCombo::CFormCombo (CFormDialog *dialog, uint structId, const char *atomName, IFormWidget::TTypeSrc typeForm, uint slot) : IFormWidget (dialog, structId, atomName, typeForm, slot)
{
}

// ***************************************************************************

CFormCombo::~CFormCombo ()
{
	if (IsWindow (Label))
		Label.DestroyWindow ();
	if (IsWindow (Combo))
		Combo.DestroyWindow ();
}

// ***************************************************************************

void CFormCombo::create (DWORD wStyle, RECT &currentPos, CFormDialog *parent, uint &dialog_index, const char *label)
{
	// Get the doc
	CGeorgesEditDoc *doc = Dialog->View->GetDocument ();
	nlassert (doc);

	FirstId = dialog_index;
	LastId = FirstId;

	// Get the value for the type pointer (if any)
	const CFormDfn *parentDfn;
	uint indexDfn;
	const CFormDfn *nodeDfn;
	const CType *nodeType;
	CFormElm *node;
	UFormDfn::TEntryType type;
	bool array;
	bool parentVDfnArray;
	CForm *form=doc->getFormPtr ();
	CFormElm *elm = doc->getRootNode (getSlot ());
	nlverify ( elm->getNodeByName (FormName.c_str (), &parentDfn, indexDfn,
		&nodeDfn, &nodeType, &node, type, array, parentVDfnArray, true, NLGEORGES_FIRST_ROUND) );

	// Save the label
	SavedLabel = label;

	// Create the type combo
	parent->setStaticSize (currentPos);
	Label.Create(nlUtf8ToTStr(label), WS_VISIBLE, currentPos, parent);
	parent->initWidget (Label);
	parent->getNextPosLabel (currentPos);

	// Create the mem combobox
	parent->setComboSize (currentPos, parent->SmallWidget);
	RECT comboPos = currentPos;
	parent->adjusteComboSize (comboPos);
	Combo.Create (WS_CHILD|WS_VSCROLL|WS_VISIBLE|CBS_DROPDOWNLIST|CBS_HASSTRINGS|WS_CHILD|WS_TABSTOP, comboPos, parent, dialog_index ? dialog_index : 0xFFFE);
	parent->initWidget (Combo);
	parent->getNextPos (currentPos);

	// Get predefs
	if (nodeType)
	{
		Combo.InsertString (0, _T(""));
		for (uint predef=0; predef<nodeType->Definitions.size(); predef++)
		{
			Combo.InsertString(predef + 1, nlUtf8ToTStr(nodeType->Definitions[predef].Label));
		}
	}

	dialog_index += 1;
}

// ***************************************************************************

void CFormCombo::updateData (bool update)
{
	Combo.UpdateData (update?TRUE:FALSE);
}

//


(p)
		if err != nil {
			return cid.Cid{}, fmt.Errorf("assets: could load Asset '%s': %s", p, err)
		}

		dirMap[gopath.Base(p)] = files.NewBytesFile(d)
	}

	basePath, err := api.Unixfs().Add(nd.Context(), files.NewMapDirectory(dirMap))
	if err != nil {
		return cid.Cid{}, err
	}

	if err := api.Pin().Add(nd.Context(), basePath); err != nil {
		return cid.Cid{}, err
	}

	return basePath.RootCid(), nil
}
package profile

import (
	"archive/zip"
	"bytes"
	"context"
	"testing"
	"time"

	"github.com/stretchr/testify/assert"
	"github.com/stretchr/testify/require"
)

func TestProfiler(t *testing.T) {
	allCollectors := []string{
		CollectorGoroutinesStack,
		CollectorGoroutinesPprof,
		CollectorVersion,
		CollectorHeap,
		CollectorAllocs,
		CollectorBin,
		CollectorCPU,
		CollectorMutex,
		CollectorBlock,
		CollectorTrace,
	}

	cases := []struct {
		name string
		opts Options
		goos string

		expectFiles []string
	}{
		{
			name: "happy case",
			opts: Options{
				Collectors:           allCollectors,
				ProfileDuration:      1 * time.Millisecond,
				MutexProfileFraction: 4,
				BlockProfileRate:     50 * time.Nanosecond,
			},
			expectFiles: []string{
				"goroutines.stacks",
				"goroutines.pprof",
				"version.json",
				"heap.pprof",
				"allocs.pprof",
				"ipfs",
				"cpu.pprof",
				"mutex.pprof",
				"block.pprof",
				"trace",
			},
		},
		{
			name: "windows",
			opts: Options{
				Collectors:           allCollectors,
				ProfileDuration:      1 * time.Millisecond,
				MutexProfileFraction: 4,
				BlockProfileRate:     50 * time.Nanosecond,
			},
			goos: "windows",
			expectFiles: []string{
				"goroutines.stacks",
				"goroutines.pprof",
				"version.json",
				"heap.pprof",
				"allocs.pprof",
				"ipfs.exe",
				"cpu.pprof",
				"mutex.pprof",
				"block.pprof",
				"trace",
			},
		},
		{
			name: "sampling profiling disabled",
			opts: Options{
				Collectors:           allCollectors,
				MutexProfileFraction: 4,
				BlockProfileRate:     50 * time.Nanosecond,
			},
			expectFiles: []string{
				"goroutines.stacks",
				"goroutines.pprof",
				"version.json",
				"heap.pprof",
				"allocs.pprof",
				"ipfs",
			},
		},
		{
			name: "Mutex profiling disabled",
			opts: Options{
				Collectors:       allCollectors,
				ProfileDuration:  1 * time.Millisecond,
				BlockProfileRate: 50 * time.Nanosecond,
			},
			expectFiles: []string{
				"goroutines.stacks",
				"goroutines.pprof",
				"version.json",
				"heap.pprof",
				"allocs.pprof",
				"ipfs",
				"cpu.pprof",
				"block.pprof",
				"trace",
			},
		},
		{
			name: "block profiling disabled",
			opts: Options{
				Collectors:           allCollectors,
				Profil


    final computed = multiply.product.floatingPointValue;

    expect(computed, equals(expected), reason: '''
      $fv1 (${fv1.toDouble()})\t+
      $fv2 (${fv2.toDouble()})\t=
      $computed (${computed.toDouble()})\tcomputed
      $expected (${expected.toDouble()})\texpected
''');
    await Simulator.endSimulation();
  });
}
// Copyright (C) 2023-2025 Intel Corporation
// SPDX-License-Identifier: BSD-3-Clause
//
// fifo.dart
// Implementation of FIFOs.
//
// 2023 March 13
// Author: Max Korbel <max.korbel@intel.com>

import 'dart:math';

import 'package:collection/collection.dart';
import 'package:rohd/rohd.dart';
import 'package:rohd_hcl/rohd_hcl.dart';
import 'package:rohd_vf/rohd_vf.dart';

/// A module [Fifo] implementing a simple FIFO (First In, First Out) buffer.
///
/// Supports a bypass if [Fifo] is empty and written & read at the same time.
class Fifo<LogicType extends Logic> extends Module {
  /// High if the entire FIFO is full and it cannot accept any more new items.
  Logic get full => output('full');

  /// High if there is nothing in [Fifo].
  Logic get empty => output('empty');

  /// Read data for the next item in [Fifo]
  ///
  /// This data is visible even when not actively removing from [Fifo].
  late final LogicType readData;

  /// High if an error condition is reached.
  ///
  /// There is no guarantee that it will hold high once asserted.
  /// Behavior upon error is undefined.
  ///
  /// If [generateError] is `false`, this output will not exist.
  Logic? get error => generateError ? output('error') : null;

  /// The number of items in [Fifo].
  ///
  /// If [generateOccupancy] is `false`, this output will not exist.
  Logic? get occupancy => generateOccupancy ? output('occupancy') : null;

  /// The depth of [Fifo].
  ///
  /// Must be greater than 0.
  final int depth;

  /// If `true`, then the [occupancy] output will be generated.
  final bool generateOccupancy;

  /// If `true`, then the [error] output will be generated.
  final bool generateError;

  /// If `true`, then it is possible to bypass through [Fifo] by writing
  /// and reading at the same time while [empty].
  final bool generateBypass;

  /// Push signal.
  Logic get _writeEnable => input('writeEnable');

  /// Pop signal.
  Logic get _readEnable => input('readEnable');

  /// Clock.
  Logic get _clk => input('clk');

  /// Reset.
  Logic get _reset => input('reset');

  /// Write data.
  Logic get _writeData => input('writeData');

  /// The width of the data transmitted through this [Fifo].
  final int dataWidth;

  /// The address width for elements in the storage of this [Fifo].
  final int _addrWidth;

  /// The first initial values of the [Fifo], if any.
  late final List<Logic> _initialValues;

  /// Constructs a [Fifo] with [RegisterFile]-based storage.
  ///
  /// If [initialValues] is provided, the [Fifo] will contain those values after
  /// [reset]. The length of [initialValues] must fit in the [depth]. The values
  /// may be either [Logic]s or constants compatible with [LogicValue.of].
  Fifo(Logic clk, Logic reset,
      {required Logic writeEnable,
      required LogicType writeData,
      required Logic readEnable,
      required this.depth,
      this.generateError


务器必须重新开始积累。

　　由于我们能维持这个状态，FastCGI应用程序对与这样的问题就更有效。一个FastCGI应用程序在初始化阶段能够计算一个扩展的源数据的表，并保持表的不同范围。当客户端请求一个特别原始数据的时候，循环应答需要从表里查询。

　　这里有一个原始数据代码事例：

　　#include "fcgi_stdio.h"

　　#include <stdlib.h>

　　#include <string.h>

　　#define POTENTIALLY_PRIME 0

　　#define COMPOSITE 1

　　#define VALS_IN_SIEVE_TABLE 1000000

　　#define MAX_NUMBER_OF_PRIME_NUMBERS 78600

　　long int sieve_table[VALS_IN_SIEVE_TABLE];

　　long int prime_table[MAX_NUMBER_OF_PRIME_NUMBERS];

　　void

　　initialize_prime_table(void)

　　{

　　long int prime_counter=1;

　　long int current_prime=2, c, d;

　　prime_table[prime_counter]=current_prime;

　　while (current_prime < VALS_IN_SIEVE_TABLE) {

　　for (c = current_prime; c <= VALS_IN_SIEVE_TABLE;

　　c += current_prime) {

　　sieve_table[c] = COMPOSITE;

　　}

　　for (d=current_prime+1; sieve_table[d] == COMPOSITE; d++);

　　prime_table[++prime_counter]=d;

　　current_prime=d;

　　}

　　}

　　void main(void)

　　{

　　char *query_string;

　　long int n;

　　initialize_prime_table();

　　while(FCGI_Accept() >= 0) {

　　printf("Content-type: text/html\r\n"

　　"\r\n");

　　printf("<title>Prime FastCGI</title>\n"

　　"
Prime FastCGI
\n");

　　query_string = getenv("QUERY_STRING");

　　if(query_string == NULL) {

　　printf("Usage: Specify a positive number in the query string.\n");

　　} else {

　　query_string = strchr(query_string, `=') + 1;

　　n = strtol(query_string);

　　if(n < 1) {

　　printf("The query string `%s' is not a positive number.\n",

　　query_string);

　　} else if(n > MAX_NUMBER_OF_PRIME_NUMBERS) {

　　printf("The number %d is too large for this program.\n", n);

　　} else{

　　printf("The %ldth prime number is %ld.\n", n, prime_table[n]);

　　}

　　}

　　}


至北四环路)、三里河路(木樨地路口至甘家口)、万寿路(万寿路口至万寿路北口)、朱各庄路(万寿路北口至西四环中路东辅路)等道路。")
                    elif choose8 == str(0):  # 若不是绿通：
                        choose9 = input("您的机动车是否已办理\"进京通行证\"？已办理请输入\"1\"，未办理请输入\"0\"。")  # 判断是否办理货车通行证
                        if choose9 == str(1):  # 已办理：
                            print("可驶入六环路(含)以内道路，全天禁止驶入长安街(新兴桥至国贸桥)、人民大会堂南侧路、西侧路、广场东、西侧路、南、北池子大街，南、北长街，府右街、王府井大街，台基厂路、中关村南路、科学院南路(知春路至北四环路)、三里河路(木樨地路口至甘家口)、万寿路(万寿路口至万寿路北口)、朱各庄路(万寿路北口至西四环中路东辅路)等道路。")
                        elif choose9 == str(0):  # 未办理：
                            print("禁止驶入六环路(含)以内道路")
                        else:  # 错误处理，下同
                            print("错误！请输入\"1\"或\"0\"。")
                    else:
                        print("错误！请输入\"1\"或\"0\"。")
            else:
                print("错误！请输入\"1\"或\"0\"。")
    else:
        print("错误！请输入\"1\"或\"0\"。")
else:
    pint("错误！请输入\"1\"或\"0\"。")

```

### 效果

- 真的好复杂

![图片描述](https://doc.shiyanlou.com/courses/uid1190679-20240124-1706104423357)

- 这只是个简单的限号规则
- 更复杂的是法律

### 秦律

- 各行各业各个领域"皆有法式"

![图片描述](https://doc.shiyanlou.com/courses/uid1190679-20240125-1706167974454)

- 征发徭役和兵役的《徭律》、《傅律》、《敦表律》和《戍律》

### 大泽乡

- 认字的人不多
	- 法律又太复杂
	- 需要专业人士

![图片描述](https://doc.shiyanlou.com/courses/uid1190679-20240125-1706168101695)

- 驻守渔阳密云的队伍
	- 罪不至死
	- 但是 没有人知道细节

### 约法三章

- 与父老约，法三章耳；
- 杀人者死，伤人及盗抵罪。
-


q) } function zg(R) { var q = Ae.getNewWorker(); if (!q) return 6; Ae.runningWorkers.push(q), Ae.pthreads[R.pthread_ptr] = q, q.pthread_ptr = R.pthread_ptr; var le = { cmd: "run", start_routine: R.startRoutine, arg: R.arg, pthread_ptr: R.pthread_ptr }; return q.runPthread = () => { N && q.ref(), q.postMessage(le, R.transferList), delete q.runPthread }, q.loaded && q.runPthread(), 0 } var uh = { varargs: void 0, get: function () { uh.varargs += 4; var R = l()[uh.varargs - 4 >>> 2]; return R }, getStr: function (R) { var q = st(R); return q } }; function ph(R) { if (C) return Xr(1, 1, R); Se = R, Na() || (Ae.terminateAllThreads(), c.onExit && c.onExit(R), ke = !0), x(R, new Hs(R)) } function Wg(R, q) { if (Se = R, !q && C) throw dh(R), "unwind"; ph(R) } var ch = Wg; function Bg(R) { if (R instanceof Hs || R == "unwind") return Se; x(1, R) } var Ae = { unusedWorkers: [], runningWorkers: [], tlsInitFunctions: [], pthreads: {}, init: function () { C ? Ae.initWorker() : Ae.initMainThread() }, initMainThread: function () { for (var R = 8; R--;)Ae.allocateUnusedWorker() }, initWorker: function () { xe = !1 }, setExitStatus: function (R) { Se = R }, terminateAllThreads: function () { for (var R of Object.values(Ae.pthreads)) Ae.returnWorkerToPool(R); for (var R of Ae.unusedWorkers) R.terminate(); Ae.unusedWorkers = [] }, returnWorkerToPool: function (R) { var q = R.pthread_ptr; delete Ae.pthreads[q], Ae.unusedWorkers.push(R), Ae.runningWorkers.splice(Ae.runningWorkers.indexOf(R), 1), R.pthread_ptr = 0, N && R.unref(), ox(q) }, receiveObjectTransfer: function (R) { }, threadInitTLS: function () { Ae.tlsInitFunctions.forEach(R => R()) }, loadWasmModuleToWorker: function (R, q) { R.onmessage = Fe => { var me = Fe.data, we = me.cmd; if (R.pthread_ptr && (Ae.currentProxiedOperationCallerThread = R.pthread_ptr), me.targetThread && me.targetThread != Th()) { var Ct = Ae.pthreads[me.targetThread]; Ct ? Ct.postMessage(me, me.transferList) : J('Internal error! Worker sent a message "' + we + '" to target pthread ' + me.targetThread + ", but that thread no longer exists!"), Ae.currentProxiedOperationCallerThread = void 0; return } we === "processProxyingQueue" ? Xp(me.queue) : we === "spawnThread" ? zg(me) : we === "cleanupThread" ? jp(me.thread) : we === "killThread" ? Pg(me.thread) : we === "cancelThread" ? Lg(me.thread) : we === "loaded" ? (R.loaded = !0, N && R.unref(), q && q(R), R.runPthread && R.runPthread()) : we === "print" ? Z("Thread " + me.threadId + ": " + me.text) : we === "printErr" ? J("Thread " + me.threadId + ": " + me.text) : we === "alert" ? alert("Thread " + me.threadId + ": " + me.text) : me.target === "setimmediate" ? R.postMessa


 breps[FZ_REPS_HOME    ] = 0;
    if (keyState == GLFW_KEY_V  ) breps[FZ_REPS_HOLD    ]++; else breps[FZ_REPS_HOLD    ] = 0;
    if (keyState == GLFW_KEY_B  ) breps[FZ_REPS_NOTE    ]++; else breps[FZ_REPS_NOTE    ] = 0;
    if (keyState == GLFW_KEY_UP )   lastAnalogY += 20000;
    if (keyState == GLFW_KEY_DOWN ) lastAnalogY -= 20000;
    if (keyState == GLFW_KEY_LEFT )  lastAnalogX += 20000;
    if (keyState == GLFW_KEY_RIGHT ) lastAnalogX -= 20000;
  } else if (action == GLFW_RELEASE) {
    if (keyState == GLFW_KEY_LEFT_SHIFT  ) breps[FZ_REPS_SELECT  ]--; else breps[FZ_REPS_SELECT  ] = 0;
    if (keyState == GLFW_KEY_ENTER  ) breps[FZ_REPS_START   ]--; else breps[FZ_REPS_START   ] = 0;
    if (keyState == GLFW_KEY_W  ) breps[FZ_REPS_UP      ]--; else breps[FZ_REPS_UP      ] = 0;
    if (keyState == GLFW_KEY_D  ) breps[FZ_REPS_RIGHT   ]--; else breps[FZ_REPS_RIGHT   ] = 0;
    if (keyState == GLFW_KEY_S  ) breps[FZ_REPS_DOWN    ]--; else breps[FZ_REPS_DOWN    ] = 0;
    if (keyState == GLFW_KEY_A  ) breps[FZ_REPS_LEFT    ]--; else breps[FZ_REPS_LEFT    ] = 0;
    if (keyState == GLFW_KEY_Q  ) breps[FZ_REPS_LTRIGGER]--; else breps[FZ_REPS_LTRIGGER] = 0;
    if (keyState == GLFW_KEY_E  ) breps[FZ_REPS_RTRIGGER]--; else breps[FZ_REPS_RTRIGGER] = 0;
    if (keyState == GLFW_KEY_I  ) breps[FZ_REPS_TRIANGLE]--; else breps[FZ_REPS_TRIANGLE] = 0;
    if (keyState == GLFW_KEY_L  ) breps[FZ_REPS_CIRCLE  ]--; else breps[FZ_REPS_CIRCLE  ] = 0;
    if (keyState == GLFW_KEY_M  ) breps[FZ_REPS_CROSS   ]--; else breps[FZ_REPS_CROSS   ] = 0;
    if (keyState == GLFW_KEY_J  ) breps[FZ_REPS_SQUARE  ]--; else breps[FZ_REPS_SQUARE  ] = 0;
    if (keyState == GLFW_KEY_T  ) breps[FZ_REPS_HOME    ]--; else breps[FZ_REPS_HOME    ] = 0;
    if (keyState == GLFW_KEY_V  ) breps[FZ_REPS_HOLD    ]--; else breps[FZ_REPS_HOLD    ] = 0;
    if (keyState == GLFW_KEY_B  ) breps[FZ_REPS_NOTE    ]--; else breps[FZ_REPS_NOTE    ] = 0;
    if (keyState == GLFW_KEY_UP )   lastAnalogY = 0;
    if (keyState == GLFW_KEY_DOWN ) lastAnalogY = 0;
  }
}

// process all input: query GLFW whether relevant keys are pressed/released this frame and react accordingly
// ---------------------------------------------------------------------------------------------------------
static void key_callback(GLFWwindow* window, int key, int scancode, int action, int mods)
{
  last_key = key;
  updateReps(key


angleStrip();
      testContext.testPixel( 32, 32, 0xffbcbcc0 )
      testContext.testPixel( 0, 0, 0xffff0402 )
      testContext.assertNoError();
    });

  });

});const tabs = require('modulekit-tabs')
const natsort = require('natsort').default

const state = require('./state')
const getPathFromJSON = require('./getPathFromJSON')
const CategoryOverpass = require('./CategoryOverpass')

class CategoryOverpassConfig {
  constructor (master) {
    this.master = master
    this.data = this.master.data.config

    this.tabConfig = new tabs.Tab({
      id: 'config'
    })
    this.master.tools.add(this.tabConfig)

    this.tabConfig.header.innerHTML = '<i class="fa fa-cog" aria-hidden="true"></i>'
    this.tabConfig.header.title = lang('config')

    this.domConfig = document.createElement('form')
    this.tabConfig.content.appendChild(this.domConfig)

    this.tabConfig.on('select', () => {
      this.formConfig.resize()
      this.formConfig.focus()
    })

    for (const k in this.data) {
      const f = this.data[k]
      if ('name' in f && typeof f.name === 'string') {
        global.currentCategory = this.master
        const t = OverpassLayer.twig.twig({ data: f.name, autoescape: true })
        f.name = decodeHTML(t.render({}).toString())
      } else if (!('name' in f)) {
        f.name = lang('tag:' + k)
      }

      if ('query' in f) {
        f.queryTemplate = OverpassLayer.twig.twig({ data: f.query, autoescape: false })
      }

      if ('values' in f) {
        const valueNameTemplate = OverpassLayer.twig.twig({ data: f.valueName || '{{ value }}', autoescape: true })

        if (typeof f.values === 'string') {
          const valuesTemplate = OverpassLayer.twig.twig({ data: f.values, autoescape: true })
          const div = document.createElement('div')
          div.innerHTML = valuesTemplate.render(this.master.data)

          const options = div.getElementsByTagName('option')
          f.values = {}

          for (let i = 0; i < options.length; i++) {
            const option = options[i]

            const k = option.value
            f.values[k] = {}

            Array.from(option.attributes).forEach(attr => {
              f.values[k][attr.name] = attr.value
            })

            if (option.textContent) {
              f.values[k].name = option.textContent
            }
          }
        }

        if (Array.isArray(f.values) && f.valueName) {
          const newValues = {}
          f.values.forEach(value => {
            newValues[value] = decodeHTML(valueNameTemplate.render({ value }).toString())
          })
          f.values = newValues
        } else if (typeof f.values === 'object') {
          for (const k1 in f.values) {
            if (typeof f.values[k1] === 'string') {
              const t = OverpassLayer.twig.twig({ data: f.values[k1], autoescape: true })
              f.values[k1] = decodeHTML(t.render({}).toString())
            } else if (typeof f.values[k1] === 'object') {
              if (!('name' in f.values[k1])) {
                f.values[k1].name = decodeHTML(valueNameTemplate.render({ value: k1 }).toString())
              } else if (f.values[k1].name) {


est.setEndTime(DATE_FORMAT.parse("2021-01-24 06:00:00"));
        } catch (ParseException e) {
            e.printStackTrace();
        }
        scsSlowLogRequest.setType(ScsSlowLogType.Proxy);
        scsSlowLogRequest.setNodeId("scs-bj-kmazymvcuenz_proxy_0");
        ScsSlowLogResponse slowLogResponse = scsClient.getSlowLog(scsSlowLogRequest);
        print(logger, "getSlowLog", slowLogResponse);
    }

    @Test
    public void modifySlowLog() {
        ScsSlowLogModifyRequest slowLogModifyRequest = new ScsSlowLogModifyRequest();
        slowLogModifyRequest.setInstanceId(instanceInfo.getInstanceId());
        slowLogModifyRequest.setAction(ScsSlowLogAction.OPEN);
        AbstractBceResponse response = scsClient.modifySlowLog(slowLogModifyRequest);
        print(logger, "modifySlowLog", response);
    }

    @Test
    public void getZoneList() {
        ScsZoneResponse zoneResponse = scsClient.getZoneList();
        print(logger, "getZoneList", zoneResponse);
    }

    @Test
    public void getSubnetList() {
        ScsSubnetRequest request = readJson("scs/subnet_request.json", ScsSubnetRequest.class);
        ScsSubnetResponse subnetResponse = scsClient.getSubnetList(request);
        print(logger, "getSubnetList", subnetResponse);
    }

    @Test
    public void releaseInstance() {
        ScsReleaseInstanceRequest request = readJson("scs/release_instance.json", ScsReleaseInstanceRequest.class);
        AbstractBceResponse response = scsClient.releaseInstance(request);
        print(logger, "releaseInstance", response);
    }

    @Test
    public void checkClientAuth() {
        String clientAuth = "abcdefgh";
        ScsArgumentUtil.checkClientAuth(clientAuth);
    }
}/*
 * Copyright (c) 2014-2019 Baidu.com, Inc. All Rights Reserved
 *
 * 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 com.baidubce.services.billing;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.baidubce.BceClientException;
import com.baidubce.BceServiceException;
import com.baidubce.auth.DefaultBceCredentials;
import com.baidubce.services.billing.model.ResourceMonthBillRequest;
import com.baidubce.services.billing.model.ResourceMonthBillResponse;
import com.baidubce.services.billing.model.bill.CostSplitBillRequest;
import com.baidubce.services.billing.model.bill.CostSplitBillResponse;
import com.baidubce.services.billing.model.bill.ProductMonthBillSummaryRequest;
import com.baidubce.services.billing.model.bill.ProductMonthBillSummaryResponse;
import com.baidubce.services.billing.model.bill.ResourceBillListQueryRequest;
import com.baidubce.services.billing.model.bill.ResourceBillListQueryResponse;
import com.baidubce.services.billing.model.bill.ShareBillRequest;
import com.baidubce.services.billing.model.bill.ShareBillResponse;
import com.baidubce.services.billing.model.finance.SupervisorBalanceQueryRequest;
import com.baidubce.services.billing.model.finance.SupervisorBalanceResponse;
import com.baidubce.services.b


 内边距 */
	/* padding: 10rpx 10rpx 10rpx 10rpx; */
	/* 内部字体颜色 */
	/* color: #00A4FF; */
	/* 盒子透明度 */
	/* opacity: 0.8; */
	/* 背景颜色 */
	/* background-color: #000000 !important; */
	/* 宽度 */
	/* width: 100rpx; */
	/* 高度 */
	/* height: 100rx; */
}

/* 订单页 订单页中部商品列表框 内框*/
#list_diff .item_order {
	/* 圆角边框 */
	border-radius: 20rpx;
	/* 边框阴影 */
	/* box-shadow: 0rpx 0rpx 20rpx 10rpx #ccc; */
	/* 外边距 */
	/* margin: 10rpx 10rpx 10rpx 10rpx; */
	/* 内边距 */
	/* padding: 10rpx 10rpx 10rpx 10rpx; */
	/* 内部字体颜色 */
	/* color: #00A4FF; */
	/* 盒子透明度 */
	/* opacity: 0.8; */
	/* 背景颜色 */
	/* background-color: #000000 !important; */
	/* 宽度 */
	/* width: 100rpx; */
	/* 高度 */
	/* height: 100rx; */
}

/*订单页 订单页中部商品列表框 内框 待付款  */
#list_diff .state {
	/*文字摆放位置*/
	/* text-align: left !important; */
	/* 文字大小 */
	/* font-size: 50rpx !important; */
	/* font-weight: 600; */
	/* 字体倾斜 */
	/* font-style:oblique; */
	/* 下划线 */
	/* text-decoration:underline; */
	/* 下划线颜色 */
	/* text-decoration-color: #00a4ff; */
	/* 文字颜色 */
	/* color: #0000FF; */
	/* 下边框线 */
	/* border-bottom: 2px solid #f8f8f8; */
}

/* 订单页 订单页中部商品列表框 内框 商品列表 */
#list_diff .goods_list {
	/* 圆角边框 */
	/* border-radius: 20rpx; */
	/* 边框阴影 */
	/* box-shadow: 0rpx 0rpx 20rpx 10rpx #ccc; */
	/* 外边距 */
	/* margin: 10rpx 10rpx 10rpx 10rpx; */
	/* 内边距 */
	/* padding: 10rpx 10rpx 10rpx 10rpx; */
	/* 内部字体颜色 */
	/* color: #00A4FF; */
	/* 盒子透明度 */
	/* opacity: 0.8; */
	/* 背景颜色 */
	/* background-color: #000000 !important; */
	/* 宽度 */
	/* width: 100rpx; */
	/* 高度 */
	/* height: 100rx; */
}

/* 订单页 订单页中部商品列表框 内框 商品列表  左边图片 */
#list_diff .goods_list .img_block {
	border-radius: 20rpx;
	/* 边框阴影 */
	/* box-shadow: 0rpx 0rpx 20rpx 10rpx #ccc; */
	/* 外边距 */
	/* margin: 10rpx 10rpx 10


 pet
* Speed: Speed parameter, should be comma values e.g. 0.3
* Player: Optional player_name/player_UUID parameter targeting a player from the console or command block.

### /petblocks rotaterel

```
/petblocks rotaterel <name> <direction> <angle> [player]
```

Rotates the pet relative to its current rotation.

* Name: Identifier of a pet
* Direction: LEFT, RIGHT, UP, DOWN
* Angle: Angle in degrees e.g. 45, 90
* Player: Optional player_name/player_UUID parameter targeting a player from the console or command block.

### /petblocks entitytype

```
/petblocks entitytype <name> <entityType> [player]
```

Changes the entity type of the pet. The default type is minecraft:armor_stand

* Name: Identifier of a pet
* EntityType: An entitytype in the minecraft format. e.g. minecraft:bee, minecraft:dolphin, minecraft:armor_stand. For minecraft versions below 1.11, you need to use the [entity number](https://github.com/CircuitLord/Minecraft-1.9-MCP/blob/bc89baf1fd0b5d422478619e7aba01c0b23bd405/temp/src/minecraft/net/minecraft/entity/EntityList.java#L232) instead.
* Player: Optional player_name/player_UUID parameter targeting a player from the console or command block.

### /petblocks entityvisible

```
/petblocks entityvisible <name> <true/false> [player]
```

Changes if the body of an entity is visible. For armorstands this is false, for most of the other entities this should be true.

* Name: Identifier of a pet
* Player: Optional player_name/player_UUID parameter targeting a player from the console or command block.

### /petblocks groundoffset

```
/petblocks groundoffset <name> <offset> [player]
```

Changes the offset of the body of the entity to the ground. Useful when configuring different entity types.

* Name: Identifier of a pet
* Offset: A numeric comma value. e.g. 0.3, -0.3, 1.0
* Player: Optional player_name/player_UUID parameter targeting a player from the console or command block.

### /petblocks ridingspeed

```
/petblocks ridingspeed <name> <speed> [player]
```

Changes the speed while riding a pet.

* Name: Identifier of a pet
* Offset: A numeric comma value. e.g. 0.3, 0.5, 1.5
* Player: Optional player_name/player_UUID parameter targeting a player from the console or command block.

### /petblocks variable

```
/petblocks variable <name> <key> <value> [player]
```

Sets the value of the variable with the given key. This is useful store arbitrary data into the pet.
e.g. health, selected particle, selected sound, etc.

* Name: Identifier of a pet
* Key: A key to store and retrieve a value
* Value: Arbitrary data to store.
* Player: Optional player_name/player_UUID parameter targeting a player from the console or command block.

## Command /petblocksgui

**Required Permission:**
``
petblocks.command
``

### /petblocksgui open

```
/petblocksgui open <name> [arguments.../player]
```

Starts a new GUI session and opens the GUI with the given name for the executing player. If any other GUIs were open when executing this command, they get discarded from the navigation history.

* Name: Identifier of a GUI menu
* Argument/Player: Optional arguments to provide the GUI with additional arguments and optionally a player to open the GUI for.

Samples:

* Opens the inventory for the executing player.

```
/petblocksgui open simple_sample_menu
```

* Opens the inventory for the player named "Pikachu".
* The slash separates arguments with the player name (in this case there are 0 arguments)

```
/petblocksgui open simple_sample_menu / Pikachu


using Devon4Net.Application.Kafka.Producer.Business.KafkaManagement.Handlers;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;

namespace Devon4Net.Application.Kafka.Producer.Business.KafkaManagement.Controllers
{
    /// <summary>
    /// Controller to put messages in the Kafka topic (defined in appsettings)
    /// </summary>
    public class MessageController : Controller
    {
        private readonly MessageProducerHandler MessageProducer;

        public MessageController(MessageProducerHandler messageProducer)
        {
            MessageProducer = messageProducer;
        }

        /// <summary>
        /// Send a message with the specified key and value
        /// </s


    command.Content[4] == 0x00 &&
                command.Content[5] == 0x08 &&
                command.Content[6] == 0x02 &&
                command.Content[7] == 0x0F &&
                command.Content[8] == 0x00 &&
                command.Content[9] == 0x7B &&
                command.Content[10] == 0x00 &&
                command.Content[11] == 0x04 &&
                command.Content[12] == 0x01 &&
                command.Content[13] == 0x09)
            {

            }
            else
            {
                Assert.Fail( "command check failed : " + HslCommunication.BasicFramework.SoftBasic.ByteToHexString( command.Content, ' ' ) );
            }
        }

        [TestMethod]
        public void BuildWriteRegisterCommandTest( )
        {
            ModbusTcpNet modbusTcp = new ModbusTcpNet( "127.0.0.1" );

            OperateResult<byte[]> command = modbusTcp.BuildWriteRegisterCommand( "s=2;123", new byte[] { 0x12, 0x34, 0x56, 0x78 } );
            Assert.IsTrue( command.IsSuccess, "command create failed" );

            if (command.Content[2] == 0x00 &&
                command.Content[3] == 0x00 &&
                command.Content[4] == 0x00 &&
                command.Content[5] == 0x0B &&
                command.Content[6] == 0x02 &&
                command.Content[7] == 0x10 &&
                command.Content[8] == 0x00 &&
                command.Content[9] == 0x7B &&
                command.Content[10] == 0x00 &&
                command.Content[11] == 0x02 &&
                command.Content[12] == 0x04 &&
                command.Content[13] == 0x12 &&
                command.Content[14] == 0x34 &&
                command.Content[15] == 0x56 &&
                command.Content[16] == 0x78)
            {

            }
            else
            {
                Assert.Fail( "command check failed : " + HslCommunication.BasicFramework.SoftBasic.ByteToHexString( command.Content, ' ' ) );
            }
        }
    }
}


(slate)
    }
}use sudograph_tests::{
    CASES,
    LOGGING,
    utilities::agent::{
        deploy_canister,
        update_test
    }
};

#[test]
fn test_update() {
    tokio::runtime::Runtime::new().unwrap().block_on(async {
        deploy_canister("dfx-deploy-update");
        update_test(
            "qaa6y-5yaaa-aaaaa-aaafa-cai",
            "test_update",
            *CASES,
            &*LOGGING
        ).await.unwrap();
    });
}<reponame>aaroncirillo/rust-thrift-tls<gh_stars>1-10
mod simple_service;

pub use simple_service::*;
<gh_stars>0
pub const VALID_PLATFORMS: &[&str] = &[
    "as3",
    "c",
    "cfml",
    "cocoa",
    "csharp",
    "elixir",
    "go",
    "groovy",
    "haskell",
    "java",
    "javascript",
    "native",
    "node",
    "objc",
    "other",
    "perl",
    "php",
    "python",
    "ruby",
];

/// Invalid environment strings (case sensitive).
pub const INVALID_ENVIRONMENTS: &[&str] = &["none"];

/// Invalid release version strings (case insensitive).
pub const INVALID_RELEASES: &[&str] = &["latest", "..", "."];
// Copyright (c) 2018 FaultyRAM
//
// Licensed under the Apache License, Version 2.0
// <LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0> or the
// MIT license <LICENSE-MIT or http://opensource.org/licenses/MIT>, at
// your option. This file may not be copied, modified, or distributed
// except according to those terms.

//! Provides support for detecting Windows SDK installations.

#![cfg(target_os = "windows")]
#![forbid(warnings)]
#![forbid(future_incompatible)]
#![deny(unused)]
#![forbid(box_pointers)]
#![forbid(missing_copy_implementations)]
#![forbid(missing_debug_implementations)]
#![forbid(missing_docs)]
#![forbid(trivial_casts)]
#![forbid(trivial_numeric_casts)]
#![forbid(unsafe_code)]
#![forbid(unused_import_braces)]
#![deny(unused_qualifications)]
#![forbid(unused_results)]
#![forbid(variant_size_differences)]
#![cfg_attr(feature = "cargo-clippy", forbid(clippy))]
#![cfg_attr(feature = "cargo-clippy", forbid(clippy_pedantic))]
#![cfg_attr(feature = "cargo-clippy", forbid(clippy_complexity))]
#![cfg_attr(feature = "cargo-clippy", deny(clippy_correctness))]
#![cfg_attr(feature = "cargo-clippy", forbid(clippy_perf))]
#![cfg_attr(feature = "cargo-clippy", forbid(clippy_style))]

#[macro_use]
extern crate serde_derive;
extern crate winreg;

use std::env;
use std::ffi::OsStr;
use std::io::{self, ErrorKind};
use std::path::{Path, PathBuf};
use winreg::enums::{KEY_WOW64_32KEY, HKEY_LOCAL_MACHINE, KEY_QUERY_VALUE};
use winreg::RegKey;

const V10_0_REG_KEY: &str = r"SOFTWARE\Microsoft\Microsoft SDKs\Windows\v10.0";
const V8_1A_REG_KEY: &str = r"SOFTWARE\Microsoft\Microsoft SDKs\Windows\v8.1A";
const V8_1_REG_KEY: &str = r"SOFTWARE\Microsoft\Microsoft SDKs\Windows\v8.1";
const V8_0A_REG_KEY: &str = r"SOFTWARE\Microsoft\Microsoft SDKs\Windows\v8.0A";
const V8_0_REG_


core.annotations.BomPolicy;
import org.diylc.core.annotations.ComponentDescriptor;
import org.diylc.core.annotations.EditableProperty;
import org.diylc.core.measures.Size;
import org.diylc.core.measures.SizeUnit;
import org.diylc.utils.Constants;

@ComponentDescriptor(name = "Ground", author = "Branislav Stojkovic", category = "Schematic Symbols",
    instanceNamePrefix = "GND", description = "Ground schematic symbol",
    zOrder = IDIYComponent.COMPONENT, bomPolicy = BomPolicy.NEVER_SHOW, autoEdit = false)
public class GroundSymbol extends AbstractComponent<Void> implements ICommonNode {

  private static final long serialVersionUID = 1L;

  public static Color COLOR = Color.black;
  public static Size SIZE = new Size(0.15d, SizeUnit.in);

  private Point2D.Double point = new Point2D.Double(0, 0);
  private Color color = COLOR;
  private Size size = SIZE;
  private GroundSymbolType type = GroundSymbolType.DEFAULT;
  private Orientation orientation = Orientation.DEFAULT;
  private Integer stroke = 1;

  @SuppressWarnings("incomplete-switch")
  @Override
  public void draw(Graphics2D g2d, ComponentState componentState, boolean outlineMode, Project project,
      IDrawingObserver drawingObserver) {
    double sizePx = size.convertToPixels();
    g2d.setStroke(ObjectCache.getInstance().fetchBasicStroke((float)getStroke()));

    double x = point.getX();
    double y = point.getY();

    switch (getOrientation()) {
      case _90:
        g2d.rotate(Math.PI / 2, point.getX(), point.getY());
        break;
      case _180:
        g2d.rotate(Math.PI, point.getX(), point.getY());
        break;
      case _270:
        g2d.rotate(Math.PI * 3 / 2, point.getX(), point.getY());
        break;
    }

    Polygon poly =
        new Polygon(new int[] {(int)(x - sizePx / 2), (int)(x + sizePx / 2), (int)x}, new int[] {(int)(y + sizePx / 6), (int)(y + sizePx / 6),
            (int)(y + sizePx)}, 3);

    g2d.setColor(Constants.TRANSPARENT_COLOR);
    g2d.fill(poly);

    drawingObserver.stopTracking();

    g2d.setColor(color);
    g2d.drawLine((int)x, (int)y, (int)x, (int)(y + sizePx / 6));
    if (type == GroundSymbolType.DEFAULT) {
      double delta = sizePx / 7.5;
      for (int i = 0; i < 5; i++) {
        g2d.drawLine((int)(x - sizePx / 2 + delta * i), (int)(y + sizePx / 6 * (i + 1)), (int)(x + sizePx / 2 - delta * i), (int)(y + sizePx / 6
            * (i + 1)));
      }
    } else {
      g2d.draw(poly);
    }
  }

  @Override
  public void drawIcon(Graphics2D g2d, int width, int height) {
    int margin = 3 * width / 32;
    g2d.setStroke(ObjectCache.getInstance().fetchBasicStroke(1));
    g2d.setColor(COLOR);
    g2d.drawLine(width / 2, margin * 2, width / 2, margin * 3 + height / 5);
    for (int i = 0; i < 5; i++) {
      g2d.drawLine(margin * (i + 1), margin * (3 + i) + height / 5, width - margin * (i + 1), margin * (3 + i) + height
          / 5);
    }
  }

  @EditableProperty(name = "Style")
  public GroundSymbolType getType() {
    return type;
  }

  public void setType(GroundSymbolType type) {
    this.type = type;
  }

  @EditableProperty
  public int getStr


asets/apple2orange/testA/n07740461_1541.jpg')
        #imgs_B = self.data_loader.load_img('datasets/apple2orange/testB/n07749192_4241.jpg')

        # Translate images to the other domain
        fake_B = self.g_AB.predict(imgs_A)
        fake_A = self.g_BA.predict(imgs_B)
        # Translate back to original domain
        reconstr_A = self.g_BA.predict(fake_B)
        reconstr_B = self.g_AB.predict(fake_A)

        gen_imgs = np.concatenate([imgs_A, fake_B, reconstr_A, imgs_B, fake_A, reconstr_B])

        # Rescale images 0 - 1
        gen_imgs = 0.5 * gen_imgs + 0.5

        titles = ['Original', 'Translated', 'Reconstructed']
        fig, axs = plt.subplots(r, c)
        cnt = 0
        for i in range(r):
            for j in range(c):
                axs[i,j].imshow(gen_imgs[cnt])
                axs[i, j].set_title(titles[j])
                axs[i,j].axis('off')
                cnt += 1
        fig.savefig("images/%s/%d_%d.png" % (self.dataset_name, epoch, batch_i))
        plt.close()

if __name__ == '__main__':
    gan = CycleGAN()
    gan.train(epochs=200, batch_size=1, sample_interval=200)


/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
 * Copyright (c) 2010 TELEMATICS LAB, DEE - Politecnico di Bari
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation;
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 *
 * Author: Giuseppe Piro <g.piro@poliba.it>
 *         Nicola Baldo  <nbaldo@cttc.es>
 */

#ifndef LTE_NET_DEVICE_H
#define LTE_NET_DEVICE_H

#include <ns3/net-device.h>
#include <ns3/event-id.h>
#include <ns3/mac48-address.h>
#include <ns3/traced-callback.h>
#include <ns3/nstime.h>
#include <ns3/lte-phy.h>
#include <ns3/ideal-control-messages.h>

namespace ns3 {

class Node;
class Packet;

/**
 * \defgroup lte LTE Models
 *
 */

/**
 * \ingroup lte
 *
 * LteNetDevice provides  basic implementation for all LTE network devices
 */
class LteNetDevice : public NetDevice
{
public:
  static TypeId GetTypeId (void);

  LteNetDevice (void);
  virtual ~LteNetDevice (void);

  virtual void DoDispose (void);

  // inherited from NetDevice
  virtual void SetIfIndex (const uint32_t index);
  virtual uint32_t GetIfIndex (void) const;
  virtual Ptr<Channel> GetChannel (void) const;
  virtual bool SetMtu (const uint16_t mtu);
  virtual uint16_t GetMtu (void) const;
  virtual void SetAddress (Address address);
  virtual Address GetAddress (void) const;
  virtual bool IsLinkUp (void) const;
  virtual void AddLinkChangeCallback (Callback<void> callback);
  virtual bool IsBroadcast (void) const;
  virtual Address GetBroadcast (void) const;
  virtual bool IsMulticast (void) const;
  virtual bool IsPointToPoint (void) const;
  virtual bool IsBridge (void) const;
  virtual Ptr<Node> GetNode (void) const;
  virtual void SetNode (Ptr<Node> node);
  virtual bool NeedsArp (void) const;
  virtual void SetReceiveCallback (NetDevice::ReceiveCallback cb);
  virtual Address GetMulticast (Ipv4Address addr) const;
  virtual Address GetMulticast (Ipv6Address addr) const;
  virtual void SetPromiscReceiveCallback (PromiscReceiveCallback cb);
  virtual bool SendFrom (Ptr<Packet> packet, const Address& source, const Address& dest, uint16_t protocolNumber);
  virtual bool SupportsSendFrom (void) const;

  /**
   * receive a packet from the lower layers in order to forward it to the upper layers
   *
   * \param p the packet
   */
  void Receive (Ptr<Packet> p);

protected:

  NetDevice::ReceiveCallback m_rxCallback;

private:
  LteNetDevice (const LteNetDevice &);
  LteNetDevice & operator= (const LteNetDevice &);

  Ptr<Node> m_node;

  TracedCallback<> m_linkChangeCallbacks;

  uint32_t m_ifIndex;
  bool m_linkUp;
  mutable uint16_t m_mtu;

  Mac48Address m_address;
};

} // namespace ns3

#endif /* LTE_NET_DEVICE_H */


.common.internal.util.SqlProviderUtil.whereIn;
import static io.kadai.common.internal.util.SqlProviderUtil.whereInInterval;
import static io.kadai.common.internal.util.SqlProviderUtil.whereLike;
import static io.kadai.common.internal.util.SqlProviderUtil.whereNotIn;
import static io.kadai.common.internal.util.SqlProviderUtil.whereNotInInterval;

import io.kadai.common.internal.util.SqlProviderUtil;
import java.util.stream.IntStream;

public class MonitorMapperSqlProvider {
  private MonitorMapperSqlProvider() {}

  @SuppressWarnings("unused")
  public static String getTaskCountOfWorkbaskets() {
    return OPENING_SCRIPT_TAG
        + "SELECT B.WORKBASKET_KEY, B.AGE_IN_DAYS, COUNT(B.AGE_IN_DAYS) AS NUMBER_OF_TASKS FROM ("
        + "<if test=\"_databaseId == 'db2'\">"
        + "SELECT T.WORKBASKET_KEY, (DAYS(T.${timestamp}) - DAYS(CAST(#{now} as TIMESTAMP))) "
        + "as AGE_IN_DAYS "
        + "</if> "
        + "<if test=\"_databaseId == 'h2'\">"
        + "SELECT T.WORKBASKET_KEY, DATEDIFF('DAY', #{now}, T.${timestamp}) as AGE_IN_DAYS "
        + "</if> "
        + "<if test=\"_databaseId == 'postgres'\">"
        + "SELECT T.WORKBASKET_KEY, DATE_PART('DAY', T.${timestamp} - #{now}) as AGE_IN_DAYS "
        + "</if> "
        + "FROM TASK T "
        + "LEFT JOIN ATTACHMENT A ON T.ID = A.TASK_ID "
        + OPENING_WHERE_TAG
        + taskWhereStatements()
        + "<if test=\"report.combinedClassificationFilter != null\">"
        + "AND <foreach collection='report.combinedClassificationFilter' "
        + "item='item' separator='OR'> "
        + "T.CLASSIFICATION_ID = #{item.taskClassificationId}"
        + "<if test=\"item.attachmentClassificationId != null\">"
        + "AND A.CLASSIFICATION_ID = #{item.attachmentClassificationId}"
        + "</if>"
        + "</foreach>"
        + "</if>"
        + "AND T.${timestamp} IS NOT NULL "
        + CLOSING_WHERE_TAG
        + ") B "
        + "GROUP BY B.WORKBASKET_KEY, B.AGE_IN_DAYS"
        + CLOSING_SCRIPT_TAG;
  }

  @SuppressWarnings("unused")
  public static String getTaskCountOfCategories() {
    return OPENING_SCRIPT_TAG
        + "SELECT B.CLASSIFICATION_CATEGORY, B.AGE_IN_DAYS, "
        + "COUNT(B.AGE_IN_DAYS) AS NUMBER_OF_TASKS FROM ("
        + "SELECT CLASSIFICATION_CATEGORY, "
        + "<if test=\"_databaseId == 'db2'\">"
        + "(DAYS(${timestamp}) - DAYS(CAST(#{now} as TIMESTAMP))) as AGE_IN_DAYS "
        + "</if> "
        + "<if test=\"_databaseId == 'h2'\">"
        + "DATEDIFF('DAY', #{now}, ${timestamp}) as AGE_IN_DAYS "
        + "</if> "
        + "<if test=\"_databaseId == 'postgres'\">"
        + "DATE_PART('DAY', ${timestamp} - #{now}) as AGE_IN_DAYS "
        + "</if> "
        + "FROM TASK T "
        + OPENING_WHERE_TAG
        + taskWhereStatements()
        + "AND ${timestamp} IS NOT NULL "
        + CLOSI


 url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgd2lkdGg9IjI0cHgiIHZpZXdCb3g9IjAgMCAyNCAyNCI+PGc+PHBhdGggZD0iTTcgMGMxLjY1IDAgMyAxLjM1IDMgM3YxOGMwIDEuNjUtMS4zNSAzLTMgM3MtMy0xLjM1LTMtM1YzYzAtMS42NSAxLjM1LTMgMy0zem0xMCAwYzEuNjUgMCAzIDEuMzUgMyAzdjE4YzAgMS42NS0xLjM1IDMtMyAzcy0zLTEuMzUtMy0zVjNjMC0xLjY1IDEuMzUtMyAzLTN6IiBmaWxsPSIjZmZmIj48L3BhdGg+PC9nPjwvc3ZnPg==) 50% 50% no-repeat;
}
 span.PIN_1701447941842_embed_pin .PIN_1701447941842_pages .PIN_1701447941842_overlay .PIN_1701447941842_controls .PIN_1701447941842_pause,  span.PIN_1701447941842_embed_pin .PIN_1701447941842_pages .PIN_1701447941842_overlay .PIN_1701447941842_controls .PIN_1701447941842_play {
  position: absolute;
  display: block;
  height: 64px;
  width: 64px;
  border-radius: 32px;
}
 span.PIN_1701447941842_embed_pin .PIN_1701447941842_pages .PIN_1701447941842_overlay .PIN_1701447941842_nav {
  user-select: none;
  position: absolute;
  height: 100%;
  width: 20%;
  background: transparent url() 0 0 no-repeat;
  background-size: 24px 24px;
  z-index: 1;
}
 span.PIN_1701447941842_embed_pin .PIN_1701447941842_pages .PIN_1701447941842_overlay .PIN_1701447941842_nav.PIN_1701447941842_forward,  span.PIN_1701447941842_embed_pin .PIN_1701447941842_pages .PIN_1701447941842_overlay .PIN_1701447941842_nav.PIN_1701447941842_forward_noop {
  right: 0;
}
 span.PIN_1701447941842_embed_pin .PIN_1701447941842_pages .PIN_1701447941842_overlay .PIN_1701447941842_nav.PIN_1701447941842_backward,  span.PIN_1701447941842_embed_pin .PIN_1701447941842_pages .PIN_1701447941842_overlay .PIN_1701447941842_nav.PIN_1701447941842_backward_noop {
  left: 0;
}
 span.PIN_1701447941842_embed_pin .PIN_1701447941842_pages .PIN_1701447941842_overlay .PIN_1701447941842_nav.PIN_1701447941842_forward {
  background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMj


lls/sys_exit, size 1216, link 0, flags 6, type=1
....
libbpf: prog 'sched_process_exit': relo #0: <byte_off> [51] struct task_struct.pid (0:85 @ offset 2456)
libbpf: prog 'sched_process_exit': relo #0: matching candidate #0 <byte_off> [80] struct task_struct.pid (0:85 @ offset 2456)
libbpf: prog 'sched_process_exit': relo #0: patched insn #9 (ALU/ALU64) imm 2456 -> 2456
libbpf: unpinned map 'sc_ctrl_map' from '/sys/fs/bpf/proc_image_map/sc_ctrl_map'
libbpf: pinned map '/sys/fs/bpf/proc_image_map/sc_ctrl_map'

```

### 2.3.控制策略：

可使用`controller`工具进行策略控制，策略切换。

重启一个终端, 在`lmp/eBPF_Supermarket/CPU_Subsystem/eBPF_proc_image`目录下运行 `controller`可执行文件。

通过`controller -h`命令可查看进程画像策略切换方法:

```shell
xhb@1:~/lmp/eBPF_Supermarket/CPU_Subsystem/eBPF_proc_image$ sudo ./controller -h
Usage: controller [OPTION...]
Trace process to get process image.

  -a, --activate             Set startup policy of proc_image tool
  -c, --cpuid=CPUID          Set For Tracing  per-CPU Process(other processes
                             don't need to set this parameter)
  -d, --deactivate           Initialize to the original deactivated state
  -f, --finish               Finish to run eBPF tool
  -k, --keytime=KEYTIME      Collects keytime information about
                             processes(0:except CPU kt_info,1:all kt_info,any 0
                             or 1 when deactivated)
  -l, --lock                 Collects lock information about processes
  -m, --myproc               Trace the process of the tool itself (not tracked
                             by default)
  -p, --pid=PID              Process ID to trace
  -P, --tgid=TGID            Thread group to trace
  -r, --resource             Collects resource usage information about
                             processes
  -s, --syscall=SYSCALLS     Collects syscall sequence (1~50) information about
                             processes(any 1~50 when deactivated)
  -S, --schedule             Collects schedule information about processes
                             (trace tool process)
  -t, --time=TIME-SEC        Max Running Time(0 for infinite)
  -?, --help                 Give this help list
      --usage                Give a short usage message

Mandatory or optional arguments to long options are also mandatory or optional
for any corresponding short options.
```

使用syscall_image工具的不同参数，控制该工具的使用策略：

| 参数 |                                                              |


 1, self.block_size, self.block_size).expand(x.size(
            0), self.groups, C // self.groups, self.block_size, self.block_size).contiguous()
        p = p.view(B, C, self.block_size, self.block_size)
        q = q.view(B, self.groups, 1, self.block_size, self.block_size).expand(x.size(
            0), self.groups, C // self.groups, self.block_size, self.block_size).contiguous()
        q = q.view(B, C, self.block_size, self.block_size)
        p = self.resize_mat(p, H // self.block_size)
        q = self.resize_mat(q, W // self.block_size)
        y = p.matmul(x)
        y = y.matmul(q)

        y = self.conv2(y)
        return y

class BatNonLocalAttn(nn.Module):
    """ BAT
    Adapted from: https://github.com/BA-Transform/BAT-Image-Classification
    """

    def __init__(
            self, in_channels, block_size=7, groups=2, rd_ratio=0.25, rd_channels=None, rd_divisor=8,
            drop_rate=0.2, act_layer=nn.ReLU, norm_layer=nn.BatchNorm2d, **_):
        super().__init__()
        if rd_channels is None:
            rd_channels = make_divisible(in_channels * rd_ratio, divisor=rd_divisor)
        self.conv1 = ConvBnAct(in_channels, rd_channels, 1, act_layer=act_layer, norm_layer=norm_layer)
        self.ba = BilinearAttnTransform(rd_channels, block_size, groups, act_layer=act_layer, norm_layer=norm_layer)
        self.conv2 = ConvBnAct(rd_channels, in_channels, 1,  act_layer=act_layer, norm_layer=norm_layer)
        self.dropout = nn.Dropout2d(p=drop_rate)

    def forward(self, x):
        xl = self.conv1(x)
        y = self.ba(xl)
        y = self.conv2(y)
        y = self.dropout(y)
        return y + x


/* Function asinhf vectorized with SSE4.
   Copyright (C) 2021-2025 Free Software Foundation, Inc.
   This file is part of the GNU C Library.

   The GNU C Library is free software; you can redistribute it and/or
   modify it under the terms of the GNU Lesser General Public
   License as published by the Free Software Foundation; either
   version 2.1 of the License, or (at your option) any later version.

   The GNU C Library is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   Lesser General Public License for more details.

   You should have received a copy of the GNU Lesser General Public
   License along with the GNU C Library; if not, see
   https://www.gnu.org/licenses/.  */

/*
 * ALGORITHM DESCRIPTION:
 *
 *   Compute asinh(x) as log(x + sqrt(x*x + 1))
 *
 *   Special cases:
 *
 *   asinh(NaN) = quiet NaN, and raise invalid exception
 *   asinh(INF) = that INF
 *   asinh(0)   = that 0
 *
 */

/* Offsets for data table __svml_sasinh_data_internal
 */
#define SgnMask				0
#define sOne				16
#define sPoly				32
#define iBrkValue			160
#define iOffExpoMask			176
#define sBigThreshold			192
#define sC2				208
#define sC3				224
#define sHalf				240
#define sLargestFinite			256
#define sLittleThreshold		272
#define sSign				288
#define sThirtyOne			304
#define sTopMask11			320
#define sTopMask8			336
#define XScale				352
#define sLn2				368

#include <sysdep.h>

	.section .text.sse4, "ax", @progbits
ENTRY(_ZGVbN4v_asinhf_sse4)
	subq	$72, %rsp
	cfi_def_cfa_offset(80)
	movaps	%xmm0, %xmm8

	/*
	 * Split X into high and low parts, XHi (<= 11 bits) and XLo (<= 13 bits)
	 * We could use either X or |X| here, but it doesn't seem to matter
	 */
	movups	sTopMask11+__svml_sasinh_data_internal(%rip), %xmm10
	movaps	%xmm8, %xmm2
	andps	%xmm8, %xmm10

	/*
	 * Compute X^2 = (XHi + XLo)^2 = XHi^2 + XLo * (X + XHi)
	 * The two parts are shifted off by around 11 bits. So even though
	 * the low bit will not in general be exact, it's near enough
	 */
	movaps	%xmm10, %xmm3
	subps	%xmm10, %xmm2
	mulps	%xmm10, %xmm3
	addps	%xmm8, %xmm10

	/* Load the constant 1 and a sign mask */
	movups	sOne+__svml_sasinh_data_internal(%rip), %xmm7

	/*
	 * Finally, express Y + W = X^2 + 1 accurately where Y has <= 8 bits.
	 * If |X| <= 1 then |XHi| <= 1 and so |X2Hi| <= 1, so we can treat 1
	 * as the dominant component in the compensated summation. Otherwise,
	 * if |X| >= 1, then since X2Hi only has 22 significant bits, the basic
	 * addition will be exact anyway until we get to |X| >= 2^24. But by
	 * that time the log function is well-conditioned enough that the
	 * rounding error doesn't matter.


Stringf(t, "%s/%s", testDir, "incorrect_edgehostname_domainprefix_3.tf"),
					ExpectError: regexp.MustCompile("A prefix for the edge hostname with the \"akamaized.net\" suffix must begin with a letter, end with a letter or digit, and contain only letters, digits, and hyphens, for example, abc-def, or abc-123"),
				},
			},
		},
		"invalid edge hostname domain prefix for `akamaized.net`. The domain prefix can't end with a hyphen": {
			steps: []resource.TestStep{
				{
					Config:      testutils.LoadFixtureStringf(t, "%s/%s", testDir, "edgehostname_domainprefix_ends_with_invalid_char_-.tf"),
					ExpectError: regexp.MustCompile("A prefix for the edge hostname with the \"akamaized.net\" suffix must begin with a letter, end with a letter or digit, and contain only letters, digits, and hyphens, for example, abc-def, or abc-123"),
				},
			},
		},
		"invalid edge hostname domain prefix for `edgesuite.net`. The domain prefix can't end with two consecutive dots": {
			steps: []resource.TestStep{
				{
					Config:      testutils.LoadFixtureStringf(t, "%s/%s", testDir, "edgehostname_domainprefix_ends_with_consecutive_dots.tf"),
					ExpectError: regexp.MustCompile("A prefix for the edge hostname with the \"edgesuite.net\" suffix must begin with a letter, end with a letter, digit, or dot, and contain only letters, digits, dots, and hyphens, for example, abc-def.123.456., or abc.123-def"),
				},
			},
		},
		"invalid edge hostname domain prefix. The domain prefix exceeds the maximum allowed length of 63 characters": {
			steps: []resource.TestStep{
				{
					Config:      testutils.LoadFixtureStringf(t, "%s/%s", testDir, "edgehostname_domainprefix_more_than_allowed_length.tf"),
					ExpectError: regexp.MustCompile(regexp.QuoteMeta(`The edge hostname prefix must be at least 1 character(s) and no more than 63 characters for "edgesuite.net" suffix; you provided 64 character(s).`)),
				},
			},
		},
		"invalid edge hostname domain prefix. The domain prefix less the minimum required length of 4 characters for akamaized.net": {
			steps: []resource.TestStep{
				{
					Config:      testutils.LoadFixtureStringf(t, "%s/%s", testDir, "edgehostname_domainprefix_for_akamaized_dot_net_less_than_minimum_required_length.tf"),
					ExpectError: regexp.MustCompile(regexp.QuoteMeta(`The edge hostname prefix must be at least 4 character(s) and no more than 63 characters for "akamaized.net" suffix; you provided 2 character(s).`)),
				},
			},
		},
		"invalid edge hostname domain prefix. The domain prefix less the minimum required length of 1 characters": {
			steps: []resource.TestStep{
				{
					Config:      testutils.LoadFixtureStringf(t, "%s/%s", testDir, "edgehostname_domainprefix_less_than_minimum_required_length.tf"),
					ExpectError: regexp.MustCompile(regexp.QuoteMeta(`The edge hostname prefix must be at least 1 character(s) and no more than 63 characters for "edgesuite.net" suffix; you provided 0 character(s).`)),
				},
			},
		},
		"valid edge hostname with hyphen in domain prefix name for akamaized.net, create edge hostname": {
			init: func(mp *papi.Mock, mh *hapi.Mock) {
				// Create


6DF000C */  jal        func_80037E98
/* 2A020C4 800832FC 3E0065A2 */   sb        $a1, 0x3E($s3)
.Llevel_31_80083300:
/* 2A020C8 80083300 0C00258E */  lw         $a1, 0xC($s1)
/* 2A020CC 80083304 21202002 */  addu       $a0, $s1, $zero
/* 2A020D0 80083308 C05D000C */  jal        VecCopy
/* 2A020D4 8008330C 0800A524 */   addiu     $a1, $a1, 0x8
/* 2A020D8 80083310 21206002 */  addu       $a0, $s3, $zero
/* 2A020DC 80083314 04000524 */  addiu      $a1, $zero, 0x4
/* 2A020E0 80083318 21300000 */  addu       $a2, $zero, $zero
/* 2A020E4 8008331C 70E3000C */  jal        func_80038DC0
/* 2A020E8 80083320 21380000 */   addu      $a3, $zero, $zero
/* 2A020EC 80083324 01000924 */  addiu      $t1, $zero, 0x1
.Llevel_31_80083328:
/* 2A020F0 80083328 32210208 */  j          .Llevel_31_800884C8
/* 2A020F4 8008332C 280029AE */   sw        $t1, 0x28($s1)
.L80083330_:
/* 2A020F8 80083330 3D006392 */  lbu        $v1, 0x3D($s3)
/* 2A020FC 80083334 07000224 */  addiu      $v0, $zero, 0x7
/* 2A02100 80083338 0E006210 */  beq        $v1, $v0, .Llevel_31_80083374
/* 2A02104 8008333C 10000224 */   addiu     $v0, $zero, 0x10
/* 2A02108 80083340 21206002 */  addu       $a0, $s3, $zero
/* 2A0210C 80083344 0780013C */  lui        $at, %hi(D_80075794)
/* 2A02110 80083348 945720AC */  sw         $zero, %lo(D_80075794)($at)
/* 2A02114 8008334C 3D006392 */  lbu        $v1, 0x3D($s3)
/* 2A02118 80083350 3F006592 */  lbu        $a1, 0x3F($s3)
/* 2A0211C 80083354 400062A2 */  sb         $v0, 0x40($s3)
/* 2A02120 80083358 410062A2 */  sb         $v0, 0x41($s3)
/* 2A02124 8008335C 07000224 */  addiu      $v0, $zero, 0x7
/* 2A02128 80083360 3D0062A2 */  sb         $v0, 0x3D($s3)
/* 2A0212C 80083364 3F0060A2 */  sb         $zero, 0x3F($s3)
/* 2A02130 80083368 3C0063A2 */  sb         $v1, 0x3C($s3)
/* 2A02134 8008336C A6DF000C */  jal        func_80037E98
/* 2A02138 80083370 3E0065A2 */   sb        $a1, 0x3E($s3)
.Llevel_31_80083374:
/* 2A0213C 80083374 21206002 */  addu       $a0, $s3, $zero
/* 2A02140 80083378 06000524 */  addiu      $a1, $zero, 0x6
/* 2A0


a1
	dbra	d7,.calcnormloop

	move.w	(sp)+,d7
	subq.w	#1,d7
	movea.l	(sp)+,a0
	lea	.temp_buf,a1

.calcnormloop2:
	movem.l	(a1),d0-d2
	move.l	d0,d3
	move.l	d1,d4
	move.l	d2,d5
	muls.l	d3,d3
	muls.l	d4,d4
	muls.l	d5,d5
	add.l	d3,d5
	add.l	d4,d5
	move.l	d5,d1
	bsr	CALC_ATARISQRT
	swap	d0
	addq.w	#1,d0
	ext.l	d0
	move.l	#$00ffffff,d3
	divs.l	d0,d3
	movem.l	(a1)+,d0-d2
	muls.l	d3,d0
	muls.l	d3,d1
	muls.l	d3,d2
	swap	d0				* / Scale the vector
	swap	d1				* | for working with
	swap	d2				* \ 256*256 textures.
	move.w	d0,(a0)+			* / Store
	move.w	d1,(a0)+			* | the
	move.w	d2,(a0)+			* \ vector.
	dbra	d7,.calcnormloop2

	rts

	BSS

.norm_buf:
	DS.L	3*10000
.temp_buf:
	DS.L	50000

	TEXT

* INPUT: a1: address of baseobject
CALCULATE_FACENORMALS:
	lea	facenormal_buf,a0
	move.w	(a1)+,d0
	lea	poly_buf,a2	;mulu.w	#pointsize,d0
				;lea	(a1,d0.l),a2

	move.w	(a2)+,d7
	subq.w	#1,d7

.loop:	move.w	(a2)+,d3
	add.w	d3,d3
	movem.w	(a2),d0-d2			* Get pointindexes in triangle.
	adda.w	d3,a2
	;addq	#trianglesize,a2
	mulu.w	#pointsize,d0
	mulu.w	#pointsize,d1
	mulu.w	#pointsize,d2
	lea	(a1,d0.l),a3			* a3 := point1 address
	lea	(a1,d1.l),a4			* a4 := point2 address
	lea	(a1,d2.l),a5			* a5 := point3 address
	move.w	(a3),d2
	move.w	(a4),d0
	move.w	(a5),d1
	sub.w	d2,d0				* RX1 := X1-X0
	sub.w	d2,d1				* RX2 := X2-X0
	move.w	pointy(a3),d4
	move.w	pointy(a4),d2
	move.w	pointy(a5),d3
	sub.w	d4,d2				* RY1 := Y1-Y0
	sub.w	d4,d3				* RY2 := Y2-Y0
	move.w	pointz(a3),a6
	move.w	pointz(a4),d4


[    0.533881] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 249)
[    0.547154] Serial: 8250/16550 driver, 5 ports, IRQ sharing disabled
[    0.555985] printk: console [ttyS0] disabled
[    0.569474] printk: console [ttyS0] enabledx4140000 (irq = 15, base_baud = 1562500) is a 16550A
[    0.569474] printk: console [ttyS0] enabled
[    0.578043] printk: bootconsole [sbi0] disabled
[    0.578043] printk: bootconsole [sbi0] disabled
[    0.588676] wireguard: WireGuard 1.0.0 loaded. See www.wireguard.com for information.
[    0.596813] wireguard: Copyright (C) 2015-2019 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved.
[    0.607494] libphy: Fixed MDIO Bus: probed
[    0.611776] tun: Universal TUN/TAP device driver, 1.6
[    0.617634] bm-dwmac 4070000.ethernet: IRQ eth_wake_irq not found
[    0.623980] bm-dwmac 4070000.ethernet: IRQ eth_lpi not found
[    0.629925] bm-dwmac 4070000.ethernet: Hash table entries set to unexpected value 0
[    0.637968] bm-dwmac 4070000.ethernet: no reset control found
[    0.644144] bm-dwmac 4070000.ethernet: User ID: 0x10, Synopsys ID: 0x37
[    0.651022] bm-dwmac 4070000.ethernet:       DWMAC1000
[    0.655905] bm-dwmac 4070000.ethernet: DMA HW capability register supported
[    0.663115] bm-dwmac 4070000.ethernet: RX Checksum Offload Engine supported
[    0.670326] bm-dwmac 4070000.ethernet: COE Type 2
[    0.675204] bm-dwmac 4070000.ethernet: TX Checksum insertion supported
[    0.681965] bm-dwmac 4070000.ethernet: Normal descriptors
[    0.687561] bm-dwmac 4070000.ethernet: Ring mode enabled
[    0.693066] bm-dwmac 4070000.ethernet: Enable RX Mitigation via HW Watchdog Timer
[    0.700816] bm-dwmac 4070000.ethernet: device MAC address a6:45:37:ce:05:16
[    0.732483] libphy: stmmac: probed
[    0.736075] CVITEK CV182XA stmmac-0:00: attached PHY driver [CVITEK CV182XA] (mii_bus:phy_addr=stmmac-0:00, irq=POLL)
[    0.747066] CVITEK CV182XA stmmac-0:01: attached PHY driver [CVITEK CV182XA] (mii_bus:phy_addr=stmmac-0:01, irq=POLL)
[    0.759248] bm-dwmac 4070000.ethernet: Cannot get clk_500m_eth!
[    0.765447] bm-dwmac 4070000.ethernet: Cannot get gate_clk_axi4!
[    0.771872] PPP generic driver version 2.4.2
[    0.776606] NET: Registered protocol family 24
[    0.781273] SLIP: version 0.8.4-NET3.019-NEWTTY (dynamic channels, max=256).
[    0.789314] dwc2 4340000.usb: axi clk installed
[    0.794045] dwc2 4340000.usb: apb clk installed
[    0.798751] dwc2 4340000.usb: 125m clk installed


 dependencies
pip install torch torchaudio huggingface_hub
```

---

## 💻 Easy Usage with Automatic Download

> 🎯 **Zero-setup required** - automatic downloads from Hugging Face Hub

### 🦋 Example Output
Running with sample audio [🦋 butterfly.wav](samples/109867__timkahn__butterfly.wav.wav):

```bash
🔄 Loading CUPE english model...
✅ Model loaded on cpu
🎵 Processing audio: 1.26s duration
📊 Processed 75 frames (1200ms total)

📋 Results:
🔤 Phoneme predictions shape: (75,)
🏷 Group predictions shape: (75,)
ℹ Model info: {'model_name': 'english', 'sample_rate': 16000, 'frames_per_second': 62.5}

🔍 First 10 frame predictions:
Frame 0: phoneme=66, group=16
Frame 1: phoneme=66, group=16
Frame 2: phoneme=29, group=7
...

🔤 Phonemes: ['b', 'ʌ', 't', 'h', 'ʌ', 'f', 'l', 'æ']...
🏷 Groups: ['voiced_stops', 'central_vowels', 'voiceless_stops']...
```

### 🐍 Python Code

```python
import torch
import torchaudio
from huggingface_hub import hf_hub_download
import importlib.util

def load_cupe_model(model_name="english", device="auto"):
    """🔄 Load CUPE model with automatic downloading from Hugging Face Hub"""

    model_files = {
        "english": "en_libri1000_uj01d_e199_val_GER=0.2307.ckpt",
        "multilingual-mls": "multi_MLS8_uh02_e36_val_GER=0.2334.ckpt",
        "multilingual-mswc": "multi_mswc38_ug20_e59_val_GER=0.5611.ckpt"
    }

    if device == "auto":
        device = "cuda" if torch.cuda.is_available() else "cpu"

    # 📥 Download files automatically from Hugging Face Hub
    repo_id = "Tabahi/CUPE-2i"
    model_file = hf_hub_download(repo_id=repo_id, filename="model2i.py")
    windowing_file = hf_hub_download(repo_id=repo_id, filename="windowing.py")
    checkpoint = hf_hub_download(repo_id=repo_id, filename=f"ckpt/{model_files[model_name]}")
    model_utils_file = hf_hub_download(repo_id=repo_id, filename="model_utils.py")

    # 🔧 Import modules dynamically
    _ = import_module_from_file("model_utils", model_utils_file)
    spec = importlib.util.spec_from_file_location("model2i", model_file)
    model2i = importlib.util.module_from_spec(spec)
    spec.loader.exec_module(model2i)

    spec = importlib.util.spec_from_file_location("windowing", windowing_file)
    windowing = importlib.util.module_from_spec(spec)
    spec.loader.exec_module(windowing)

    # 🚀 Initialize model
    extractor = model2i.CUPEEmbeddingsExtractor(checkpoint, device=device)
    return extractor, windowing

# 🎯 Example usage
extractor, windowing = load_cupe_model("english")

# 🎵 Load and process your audio
audio, sr = torchaudio.load("your_audio.wav")
if sr != 16000:
    resampler = torchaudio.transforms.Resample(sr, 16000)
    audio = resampler(a