ptimal_weight(W, w) << '\n';
}
#include <algorithm>
#include <cassert>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <vector>

/*
* Author: Ayran Olckers
* Website https://ayran.dev
* Respect Coursera Honor Code
* Copyright © 2019. All rights reserved
*
*/

const bool DEBUG = false;

struct Point2D {
    int x;
    int y;

    Point2D() : x(0), y(0) {}
    Point2D(int x, int y) : x(x), y(y) {}

    friend std::ostream &operator<<(std::ostream &os, const Point2D &point);
};

std::ostream &operator<<(std::ostream &os, const Point2D &point) {
    os << "(" << point.x << ", " << point.y << ") ";
    return os;
}

struct Set {
    size_t rank;
    int parent;

    Set() : rank(0), parent(-1) {}
};

class DisjointSets {
    std::vector<Set> _sets;

  public:
    DisjointSets(size_t size) : _sets(size) {
        for (size_t i = 0; i < size; ++i) {
            _sets[i].parent = i;
        }
    }

    size_t find(size_t u) {
        // find parent and compress path
        size_t idx{u};
        if (_sets[idx].parent != idx) {
            _sets[idx].parent = find(_sets[idx].parent);
        }
        return _sets[idx].parent;
    }

    void take_union(size_t u, size_t v) {
        auto u_id = find(u);
        auto v_id = find(v);

        if (u_id == v_id) {
            return;
        }

        if (_sets[u_id].rank > _sets[v_id].rank) {
            _sets[v_id].parent = u_id;
        } else {
            _sets[u_id].parent = v_id;
            if (_sets[u_id].rank == _sets[v_id].rank) {
                _sets[v_id].rank++;
            }
        }
    }
};

double distance(const Point2D &s, const Point2D &t) { return std::hypot(s.x - t.x, s.y - t.y); }

// Adaptation of Kruskal's algorithm
// Kruskal's algorithm starts with each vertex as a disjoint set
// The basic idea is to run the algo until only k disjoint sets are left
double clustering(std::vector<Point2D> &points, int k) {
    size_t n{points.size()};
    size_t nclusters{n};
    DisjointSets sets(n);
    // keep track of all edges
    std::vector<std::pair<size_t, size_t>> edges;
    edges.reserve((size_t)n * (n - 1) / 2);
    for (size_t s = 0; s < n; ++s) {
        for (size_t t = s + 1; t < n; ++t) {
            edges.push_back({s, t});
        }
    }
    // sort edges by distances
    std::sort(edges.begin(), edges.end(),
              // lambda function to be able to translate from index to points
              [points](std::pair<size_t, size_t> lhs, std::pair<size_t, size_t> rhs) {
                  auto norm_lhs = distance(points[lhs.first], points[lhs.second]);
                  auto norm_rhs = distance(points[rhs.first], points[rhs.second]);
                  return norm_lhs < norm_rhs;
              });

    // if (DEBUG) {
    //     for (auto &e : edges) {
    //         std::cout << points[e.first] << " -> " << points[e.second] << std::endl;


runicPortal = npcid == ID.npc.RUNIC_PORTAL_AZOUPH and dsp.teleport.runic_portal.AZOUPH or dsp.teleport.runic_portal.DVUCCA
        if dsp.besieged.hasRunicPortal(player, runicPortal) then
            event = npcid == ID.npc.RUNIC_PORTAL_AZOUPH and 131 or 134
        else
            event = npcid == ID.npc.RUNIC_PORTAL_AZOUPH and 124 or 125
        end
    else
        player:messageSpecial(ID.text.RESPONSE)
    end

    if event then
        player:startEvent(event)
    end
end

function onEventUpdate(player, csid, option)
end

function onEventFinish(player, csid, option)
    if option == 1 then
        if csid == 124 then
            dsp.besieged.addRunicPortal(player, dsp.teleport.runic_portal.AZOUPH)
        elseif csid == 125 then
            dsp.besieged.addRunicPortal(player, dsp.teleport.runic_portal.DVUCCA)
        end

        dsp.teleport.toChamberOfPassage(player)
    end
end


4_2.destScene = L2_2
  L14_2.destLocation = ""
  L15_2 = {}
  L16_2 = 0
  L17_2 = 0
  L18_2 = 0
  L15_2[1] = L16_2
  L15_2[2] = L17_2
  L15_2[3] = L18_2
  L14_2.destOffset = L15_2
  L13_2 = L13_2(L14_2)
  L12_2.mapChangeInfo = L13_2
  L12_2.forcePosition = L6_2
  L12_2.forceRotation = L7_2
  L12_2.callFromFieldStart = true
  L13_2 = A0_2[16]
  L13_2 = L13_2.startType
  L13_2 = 1 == L13_2
  L12_2.callFromContinue = L13_2
  L11_2, L12_2, L13_2, L14_2, L15_2, L16_2, L17_2, L18_2 = L11_2(L12_2)
  L8_2(L9_2, L10_2, L11_2, L12_2, L13_2, L14_2, L15_2, L16_2, L17_2, L18_2)
  L8_2 = C1DB14DCC9D7634FA
  L8_2 = L8_2.S760DAE4C5371A78E
  L9_2 = nil
  L8_2(L9_2)
  L8_2 = CFC8F368D91411014
  L8_2 = L8_2.S12AB211B0A58477E
  L8_2 = L8_2()
  L9_2 = L8_2
  L8_2 = L8_2.F9105A2D51E329C40
  L8_2(L9_2)
  L8_2 = C10578806AC30DCA3
  L8_2 = L8_2.SBA6FF574C1C9AA09
  L8_2 = L8_2.h
  L8_2 = L8_2.FEVT_COMMON_0065_FORCE_WALK
  L9_2 = L47_1.tnull
  if L8_2 == L9_2 then
    L8_2 = nil
  end
  if true == L8_2 then
    L9_2 = CFC8F368D91411014
    L9_2 = L9_2.SA92CAF490088B894
    L9_2 = L9_2()
    L9_2 = L9_2[25]
    L9_2 = L9_2[1]
    L9_2 = L9_2[3]
    L10_2 = L9_2
    L9_2 = L9_2.FB0E319FDADB5BBDD
    L11_2 = C7B6EC0248A970468
    L11_2 = L11_2.new
    L12_2 = true
    L11_2 = L11_2(L12_2)
    L12_2 = false
    L9_2(L10_2, L11_2, L12_2)
  end
end

_ENV["CDD18C7CA3E537D06"]["prototype"]["F66F7E5A90EF2ECFB"] = function(A0_2)

  local L1_2, L2_2, L3_2, L4_2, L5_2, L6_2, L7_2, L8_2, L9_2, L10_2, L11_2, L12_2
  L1_2 = c37452BA0
  L1_2 = L1_2.fD8C39FA5
  L2_2 = C8F93126DACB9F8DD
  L2_2 = L2_2.S62549C7FA456CA60
  L2_2


-transparent-90);
    --tlp-sticky-footer-shadow: 0 -2px 3px var(--tlp-dark-color-transparent-90);
    --tlp-button-shadow: 0 1px 2px rgb(0 0 0 / 8%), 0 1px 2px rgb(0 0 0 / 10%),
        0 -0.5px 0 rgb(0 0 0 / 3%);
    --tlp-button-shadow-hover: 0 1px 1px rgb(0 0 0 / 8%), 0 0 1px rgb(0 0 0 / 8%),
        0 -1px 0 rgb(0 0 0 / 3%);
    --tlp-shadow-focus-width: 2px;
    --tlp-shadow-focus: 0 0 0 var(--tlp-shadow-focus-width) #{color.adjust(
            $tlp-main-color,
            $alpha: - 0.65
        )};
    --tlp-shadow-focus-error: 0 0 0 var(--tlp-shadow-focus-width) #{color.adjust(
            $tlp-danger-color,
            $alpha: - 0.65
        )};

    // radius
    --tlp-small-radius: 3px;
    --tlp-medium-radius: 4px;
    --tlp-large-radius: 6px;
    --tlp-x-large-radius: 8px;

    // highlight darker button
    --tlp-sidebar-action-background: rgb(255 255 255 / 25%);
    --tlp-sidebar-action-quick-link-background: rgb(255 255 255 / 30%);
    --tlp-sidebar-action-background-hover: rgb(255 255 255 / 35%);

    // Badges
    --tlp-badge-font-size: 0.75rem;
    --tlp-badge-line-height: 0.75rem;
    --tlp-badge-font-weight: 600;
    --tlp-badge-padding: calc(5px - 1px * var(--tlp-is-condensed)) var(--tlp-small-spacing);

    // Form elements
    --tlp-form-element-padding-horizontal: 12px;
    --tlp-form-element-border-transition-duration: 150ms;
    --tlp-form-element-border-color: var(--tlp-neutral-dark-color-darker-05);
    --tlp-form-element-border-radius: var(--tlp-medium-radius);
    --tlp-form-element-background: var(--tlp-white-color);
    --tlp-form-element-font-size: 0.875rem;
    --tlp-form-element-small-font-size: 0.8125rem;
    --tlp-form-element-height: 40px;
    --tlp-form-element-small-height: 32px;
    --tlp-form-element-select-background-size: 8px;
    --tlp-form-element-placeholder-color: var(--tlp-neutral-dark-color-darker-10);
}
/**
 * Copyright (c) Enalean, 2016-Present. All Rights Reserved.
 *
 * This file is a part of Tuleap.
 *
 * Tuleap is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * Tuleap 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 Tuleap. If not, see <http://www.gnu.org/licenses/>.
 */

@use "basepath";

/* stylelint-disable selector-no-qualifying-type */
h3.toggler


super.safeAdd(squares, position, Direction.Up, Direction.Up, Direction.Left, Direction.Left);
        }

        if (position.isSquare(Direction.Up, Direction.Right) && !position.getSquare(Direction.Up, Direction.Right).isOccupied()) {
            super.safeAdd(squares, position, Direction.Up, Direction.Up, Direction.Right, Direction.Right);
        }

        if (position.isSquare(Direction.Down, Direction.Left) && !position.getSquare(Direction.Down, Direction.Left).isOccupied()) {
            super.safeAdd(squares, position, Direction.Down, Direction.Down, Direction.Left, Direction.Left);
        }

        if (position.isSquare(Direction.Down, Direction.Right) && !position.getSquare(Direction.Down, Direction.Right).isOccupied()) {
            super.safeAdd(squares, position, Direction.Down, Direction.Down, Direction.Right, Direction.Right);
        }

        return squares
            .filter(x => !x.isOverTheRiver(position.getPiece().color))
            .filter(x => !x.isOccupied() || x.getPiece().color !== position.getPiece().color);
    }
}import { BeachballOptions } from '../types/BeachballOptions';
import { PackageInfos } from '../types/PackageInfo';
import path from 'path';
import { isPathIncluded } from './isPathIncluded';

export function getScopedPackages(options: BeachballOptions, packageInfos: PackageInfos): string[] {
  if (!options.scope) {
    return Object.keys(packageInfos);
  }

  let includeScopes = options.scope!.filter(s => !s.startsWith('!'));
  includeScopes = includeScopes.length > 0 ? includeScopes : ['**/*', '', '*'];
  const excludeScopes = options.scope!.filter(s => s.startsWith('!'));

  const scopedPackages: string[] = [];

  for (let [pkgName, info] of Object.entries(packageInfos)) {
    const relativePath = path.relative(options.path, path.dirname(info.packageJsonPath));

    const shouldInclude = isPathIncluded(relativePath, includeScopes, excludeScopes);
    if (shouldInclude) {
      scopedPackages.push(pkgName);
    }
  }

  return scopedPackages;
}
/**
 * react可以直接使用html转译，但是不能添加花括号
 */
interface IItem {
  key: string;
  value: string
}
const ICONLIST: IItem[] = [
  {
    key: 'share',
    value: 'e52c'
  },
  {
    key: 'upArrow',
    value: 'e53c'
  },
  {
    key: 'return',
    value: 'e53d'
  },
  {
    key: 'downArrow',
    value: 'e53e'
  },
  {
    key: 'rightArrow',
    value: 'e53f'
  },
  {
    key: 'leftArrow',
    value: 'e540'
  },
  {
    key: 'circle',
    value: 'e542'
  },
  {
    key: 'pull',
    value: '4542'
  },
  {
    key: 'close',
    value: 'e546'
  },
  {
    key: 'edit',
    value: 'e54a'
  },
  {
    key: 'delete',
    value: 'e54e'
  },
  {
    key: 'bgCircleChecked',
    value: 'e54f'
  },
  {
    key: 'directionDown',
    value: 'e55b'
  },
  {
    key: 'topPosition',
    value: 'e55c'
  },
  {
    key: 'directionLeft',
    value: 'e55d'
  },
  {
    key: 'direct


/DannyLuna17/BulletDroid2');
    try {
      await launchUrl(uri, mode: LaunchMode.externalApplication);
    } catch (_) {
      await launchUrl(uri);
    }
  }

  void _loadExpandedState() {
    final service = ref.read(runnerUiStateServiceProvider);
    final expanded = service.getBottomExpanded(defaultValue: true);
    setState(() {
      _isBottomSectionExpanded = expanded;
    });
  }

  Future<void> _toggleExpandedState() async {
    setState(() {
      _isBottomSectionExpanded = !_isBottomSectionExpanded;
    });
    final service = ref.read(runnerUiStateServiceProvider);
    await service.setBottomExpanded(_isBottomSectionExpanded);
  }

  void _handleStartCountInput(String value) {
    final runnerId = widget.placeholderId ?? 'default';
    final newValue = int.tryParse(value);
    if (newValue == null) {
      _startCountController.text = '0';
      return;
    }
    if (newValue >= 0 && newValue <= 999) {
      ref
          .read(multiRunnerProvider.notifier)
          .updateStartCountForRunner(runnerId, newValue);
    } else if (value.isEmpty) {
      ref
          .read(multiRunnerProvider.notifier)
          .updateStartCountForRunner(runnerId, 1);
      _startCountController.text = '1';
    }
  }

  void _handleBotsCountInput(String value) {
    final runnerId = widget.placeholderId ?? 'default';
    final newValue = int.tryParse(value);
    if (newValue == null) {
      _botsCountController.text = '0';
      return;
    }
    if (newValue >= 0 && newValue <= 200) {
      ref
          .read(multiRunnerProvider.notifier)
          .updateBotsCountForRunner(runnerId, newValue);
      _updateDashboardCard();
    } else if (value.isEmpty) {
      ref
          .read(multiRunnerProvider.notifier)
          .updateBotsCountForRunner(runnerId, 1);
      _botsCountController.text = '1';
      _updateDashboardCard();
    }
  }

  Future<void> _updateDashboardCard() async {
    if (widget.placeholderId == null) return;
    await ref
        .read(multiRunnerProvider.notifier)
        .updateDashboardParametersFromRunner(widget.placeholderId!);
  }

  @override
  Widget build(BuildContext context) {
    final runnerId = widget.placeholderId ?? 'default';
    final runnerInstance = ref.watch(runnerInstanceProvider(runnerId));

    // Keep Start At input in sync with provider when runner stops or value changes
    ref.listen<RunnerInstance?>(runnerInstanceProvider(runnerId), (prev, next) {
      if (_isDisposed || !mounted) return;
      if (next == null) return;
      // Only update text when not running to avoid conflicting with disabled state
      if (!next.isRunning) {
        final currentText = _startCountController.text;
        final desiredText = next.startCount.toString();
        if (currentText != desiredText) {
          _startCountController.text = desiredText;
        }
      }
    });

    return Scaffold(
      backgroundColor: GeistColors.white,
      appBar: PreferredSize(
        preferredSize: const Size.fromHeight(60),
        child: AppBar(
          toolbarHeight: 60,
          backgroundColor: GeistColors.white,
          elevation: 0,
          leading: IconButton(
            icon: Icon(
              Icons.arrow_back,
              size: 26,
              color: Theme.of(context).colorScheme.onSurface,
            ),
            onPressed: () {
              if (context.canPop()) {
                context.pop();
              } else {
                context.go(AppPath.dashboard);
              }
            },
          ),
          title


dAt = sql.NullTime{Time: a.AcknowledgedAt, Valid: true}
	}

	var resolvedBy *string
	if a.ResolvedBy != "" {
		resolvedBy = &a.ResolvedBy
	}
	var resolvedAt sql.NullTime
	if a.ResolvedAt != (time.Time{}) {
		resolvedAt = sql.NullTime{Time: a.ResolvedAt, Valid: true}
	}

	var assignedBy *string
	if a.AssignedBy != "" {
		assignedBy = &a.AssignedBy
	}
	var assignedAt sql.NullTime
	if a.AssignedAt != (time.Time{}) {
		assignedAt = sql.NullTime{Time: a.AssignedAt, Valid: true}
	}

	metadata := []byte("{}")
	if len(a.Metadata) > 0 {
		b, err := json.Marshal(a.Metadata)
		if err != nil {
			return dbAlarm{}, errors.Wrap(repoerr.ErrMalformedEntity, err)
		}
		metadata = b
	}

	return dbAlarm{
		ID:             a.ID,
		RuleID:         a.RuleID,
		DomainID:       a.DomainID,
		ChannelID:      a.ChannelID,
		ClientID:       a.ClientID,
		Subtopic:       a.Subtopic,
		Measurement:    a.Measurement,
		Value:          a.Value,
		Unit:           a.Unit,
		Cause:          a.Cause,
		Threshold:      a.Threshold,
		Status:         a.Status,
		Severity:       a.Severity,
		AssigneeID:     a.AssigneeID,
		CreatedAt:      a.CreatedAt,
		UpdatedAt:      updatedAt,
		UpdatedBy:      updatedBy,
		AssignedAt:     assignedAt,
		AssignedBy:     assignedBy,
		AcknowledgedAt: acknowledgedAt,
		AcknowledgedBy: acknowledgedBy,
		ResolvedAt:     resolvedAt,
		ResolvedBy:     resolvedBy,
		Metadata:       metadata,
	}, nil
}

func toAlarm(dbr dbAlarm) (alarms.Alarm, error) {
	var updatedBy string
	if dbr.UpdatedBy != nil {
		updatedBy = *dbr.UpdatedBy
	}
	var updatedAt time.Time
	if dbr.UpdatedAt.Valid {
		updatedAt = dbr.UpdatedAt.Time
	}

	var assignedBy string
	if dbr.AssignedBy != nil {
		assignedBy = *dbr.AssignedBy
	}
	var assignedAt time.Time
	if dbr.AssignedAt.Valid {
		assignedAt = dbr.AssignedAt.Time
	}

	var acknowledgedBy string
	if dbr.AcknowledgedBy != nil {
		acknowledgedBy = *dbr.AcknowledgedBy
	}
	var acknowledgedAt time.Time
	if dbr.AcknowledgedAt.Valid {
		acknowledgedAt = dbr.AcknowledgedAt.Time
	}

	var resolvedBy string
	if dbr.ResolvedBy != nil {
		resolvedBy = *dbr.ResolvedBy
	}
	var resolvedAt time.Time
	if dbr.ResolvedAt.Valid {
		resolvedAt = dbr.ResolvedAt.Time
	}

	var metadata map[string]any
	if len(dbr.Metadata) > 0 {
		err := json.Unmarshal(dbr.Metadata, &metadata)
		if err != nil {
			return alarms.Alarm{}, errors.Wrap(repoerr.ErrMalformedEntity, err)
		}
	}

	return alarms.Alarm{
		ID:             dbr.ID,
		RuleID:         dbr.RuleID,
		DomainID:       dbr.DomainID,
		ChannelID:      dbr.ChannelID,
		ClientID:       dbr.ClientID,
		Subtopic:       dbr.Subtopic,
		Measurement:    dbr.Measurement,
		Value:          dbr.Value,
		Unit:           dbr.Unit,
		Threshold:      dbr.Threshold,
		Cause:          dbr.Cause,
		Status:         dbr.Status,
		Severity:       dbr.Severity,


                            Value::Win => Value::Lose,
                            Value::Lose => Value::Win,
                        },
                    );

                    if n_state.timeout {
                        // すでにタイムアウトしていたのなら、終了処理 すっとばして早よ終われだぜ☆（＾～＾）
                        return n_state;
                    }
                    self.evaluation.after_search();

                    // 下の木の結果を、ひっくり返して、引き継ぎます。
                    exists_lose = n_state.turn_over_and_choice(
                        &opponent_ts,
                        move_,
                        self.evaluation.centi_pawn(),
                    );
                }
            }

            // (2) Remove the placed stone.
            // (二) 置いた石は取り除きます。
            self.evaluation.before_undo_move(captured_piece_centi_pawn);
            pos.undo_move();

            if let Some(forward_cut_off2) = &forward_cut_off2 {
                match forward_cut_off2 {
                    ForwardCutOff2::KingCatch => {
                        break;
                    }
                    ForwardCutOff2::Leaf => {}
                }
            }

            let mut backword_cut_off = None;
            match n_state.bestmove.value {
                Value::Win => {
                    // この手について、次の手ではなく、２手以上先で勝ったんだろ☆（＾～＾）もう探索しなくていいぜ☆（＾～＾）この手にしようぜ☆（＾～＾）！
                    backword_cut_off = Some(BackwardCutOff::YouWin);
                }
                Value::Lose => {
                    // この手について、次の相手の番で王さまを取られたか、３手先以上の奇数番で詰められたんだろ☆（＾～＾）詰められてない別の手を探すんだぜ、続行☆（＾～＾）！
                }
                Value::CentiPawn(current_centi_pawn) => {
                    // ベータカット判定☆（＾～＾）
                    match another_branch_best {
                        Value::CentiPawn(another_branch_best_centi_pawn) => {
                            // 兄弟局面より良い手を見つけたのなら、相手から見ればこの手は選ばないから、もう探索しなくていいぜ☆（＾～＾）
                            // これが　いわゆるベータカットだぜ☆（＾～＾）
                            if another_branch_best_centi_pawn <= current_centi_pawn {
                                backword_cut_off = Some(BackwardCutOff::BetaCut);
                            }
                        }
                        Value::Win => {
                            // 初手に、ゴミの最大値として入っているか、兄弟局面で勝ちの手があったようだぜ☆（＾～＾）
                            // ベータカットは起こらないぜ☆（＾～＾）
                        }
                        Value::Lose => {
                            // 兄弟局面に負けがあるんだったら、この
                            // 負けに比べればどんな手でも良いぜ☆（＾～＾）ベータカットな☆（＾～＾）！
                            backword_cut_off = Some(BackwardCutOff::BetaCut);
                        }
                    }
                }
            }

            // (4) Depending o


4], "waipian24": 3, "waipian25": 3, "comtelegram\u9891\u9053": [3, 4], "waipianxingqiutelegram\u7fa4": 3, "waipian\u5e7f\u544a\u5408\u4f5c": 3, "waipianbot": 3, "\u7da0\u6d32": 3, "4st": 3, "ann": [3, 4], "toc_a": 3, "\u6211\u5011\u6210\u7acb\u65bc2020\u5e744\u67089\u65e5\u5728": 3, "\u6953\u6797\u7db2\u4e8b\u4ef6": 3, "\u767c\u751f\u7684\u90a3\u4e00\u5929\u5f88\u591a\u8207\u52d5\u6f2b\u76f8\u95dc\u7684\u7db2\u7ad9\u9678\u7e8c\u70ba\u4e86\u907f\u514d\u906d\u5230\u6ce2\u53ca\u800c\u9078\u64c7\u4e86\u95dc\u7ad9\u907f\u98a8\u982d\u6211\u5011\u5c31\u662f\u5728\u90a3\u500b\u6642\u5019\u65bca1\u6210\u7acb\u4e86\u540d\u70ba": 3, "\u96fb\u5831\u983b\u9053\u7576\u6642\u76ee\u7684\u662f\u70ba\u4e86\u7d66\u52d5\u6f2b\u8ff7\u4e00\u500b\u6c99\u6f20\u4e2d\u7684\u6a02\u5712\u800c\u53d6\u540d\u70ba": 3, "\u6211\u5011\u7684\u53e3\u865f\u70ba": 3, "\u4e0d\u653e\u5ee3\u544a\u53ca\u4e0d\u8ca9\u552e": 3, "\u50c5\u70ba\u4e86\u7da0\u6d32\u800c\u6d3b": 3, "32434": 3, "catindexbot\u641c\u7d22\u673a\u5668\u4eba": 3, "\u9a6c\u680f\u5c71\u6c49\u5316\u7ec4": 3, "mlshhz": 3, "69384": 3, "\u7528\u7231\u53d1\u7535\u7684\u9e3d\u5b50\u7a9d": 3, "onion666": 3, "\u6697\u7f51\u5bfc\u822a": 3, "onion666666": 3, "directori": 3, "666666666tjjjeweu5iikuj7hkpke5phvdylcless7g4dn6vma2xxcad": 3, "freembook": 3, "\u4e66\u7c4d\u53d1\u5e03": [3, 4], "freembook_channel": 3, "7876": 3, "\u8fea\u62dc\u534e\u4eba\u9876\u5c16\u8bdd\u672f\u9986": 3, "hao1234iytv": 3, "6720": 3, "\u9ad8\u6e05\u751f\u6d3b\u7d20\u6750\u9891\u9053": 3,


using WaaS.Models;
using WaaS.Runtime;
using ExecutionContext = WaaS.Runtime.ExecutionContext;

namespace WaaS.Tests.Wast;

public class WastRunner : IDisposable
{
    private readonly Dictionary<string, Instance> instances = new();

    private WastRunner(string directory)
    {
        Directory = directory;
    }

    public string Directory { get; }
    public Instance? CurrentInstance { get; private set; }
    public Imports CurrentImports { get; } = SpecTest.CreateImports();

    public ExecutionContext Context { get; } = new(ushort.MaxValue);

    public void Dispose()
    {
        CurrentInstance?.Dispose();
        Context.Dispose();
    }

    private void AddInstance(Module module, string? name)
    {
        CurrentInstance = new Instance(module, CurrentImports);
        if (!string.IsNullOrEmpty(name)) instances[name] = CurrentInstance;
    }

    public void AddInstance(string filename, string? name)
    {
        AddInstance(Module.Create(File.ReadAllBytes(Path.Combine(Directory, filename))), name);
    }

    public Instance Instantiate(string filename)
    {
        return new Instance(Module.Create(File.ReadAllBytes(Path.Combine(Directory, filename))), CurrentImports);
    }

    public Instance GetInstance(string name)
    {
        return instances[name];
    }

    public void Register(Instance instance, string name)


eshProtos.HardwareModel.ANDROID_SIM
    private val node =
        listOf(
            NodeInfo(4, MeshUser("+zero", "User Zero", "U0", model)),
            NodeInfo(5, MeshUser("+one", "User One", "U1", model), Position(37.1, 121.1, 35)),
            NodeInfo(6, MeshUser("+two", "User Two", "U2", model), Position(37.11, 121.1, 40)),
            NodeInfo(7, MeshUser("+three", "User Three", "U3", model), Position(37.101, 121.1, 40)),
            NodeInfo(8, MeshUser("+four", "User Four", "U4", model), Position(37.116, 121.1, 40)),
        )

    private val currentDefaultLocale = LocaleListCompat.getDefault().get(0) ?: Locale.US

    @Before
    fun setup() {
        Locale.setDefault(Locale.US)
    }

    @After
    fun tearDown() {
        Locale.setDefault(currentDefaultLocale)
    }

    @Test
    fun distanceGood() {
        Assert.assertEquals(node[1].distance(node[2]), 1111)
        Assert.assertEquals(node[1].distance(node[3]), 111)
        Assert.assertEquals(node[1].distance(node[4]), 1779)
    }

    @Test
    fun distanceStrGood() {
        Assert.assertEquals(node[1].distanceStr(node[2], DisplayUnits.METRIC_VALUE), "1.1 km")
        Assert.assertEquals(node[1].distanceStr(node[3], DisplayUnits.METRIC_VALUE), "111 m")
        Assert.assertEquals(node[1].distanceStr(node[4], DisplayUnits.IMPERIAL_VALUE), "1.1 mi")
        Assert.assertEquals(node[1].distanceStr(node[3], DisplayUnits.IMPERIAL_VALUE), "364 ft")
    }
}
/*
 * Copyright (c) 2025 Meshtastic LLC
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * 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, see <https://www.gnu.org/licenses/>.
 */

package org.meshtastic.core.model.util

import android.widget.EditText
import org.meshtastic.core.model.BuildConfig
import org.meshtastic.proto.ConfigProtos
import org.meshtastic.proto.MeshProtos

/**
 * When printing strings to logs sometimes we want to print useful debugging information about users or positions. But
 * we don't want to leak things like usernames or locations. So this function if given a string, will return a string
 * which is a maximum of three characters long, taken from the tail of the string. Which should effectively hide real
 * usernames and locations, but still let us see if values were zero, empty or different.
 */
val Any?.anonymize: String
    get() = this.anonymize()

/** A version of anonymize that allows passing in a custom minimum length */
fun Any?.anonymize(maxLen: Int = 3) = if (this != null) ("..." + this.toString().takeLast(maxLen)) else "null"

// A toString that makes sure all newlines are removed (for nice logging).
fun Any.toOneLineString() = this.toString().replace('\n', ' ')

fun ConfigProtos.Config.toOneLineString(): String {
    val redactedFields = """(wifi_psk:|public_key:|private_key:|admin_key:)\s*".*"""


= SQLITE_OK;      /* Return code */
            u8 tempFile = 0;         /* True for temp files (incl. in-memory files) */ // Needs to be u8 for later tests
            u8 memDb = 0;            /* True if this is an in-memory file */
            bool readOnly = false;   /* True if this is a read-only file */
            int journalFileSize;     /* Bytes to allocate for each journal fd */
            StringBuilder zPathname = null; /* Full path to database file */
            int nPathname = 0;       /* Number of bytes in zPathname */
            bool useJournal = (flags & PAGER_OMIT_JOURNAL) == 0; /* False to omit journal */
            bool noReadlock = (flags & PAGER_NO_READLOCK) != 0;  /* True to omit read-lock */
            int pcacheSize = sqlite3PcacheSize();       /* Bytes to allocate for PCache */
            u16 szPageDflt = SQLITE_DEFAULT_PAGE_SIZE;  /* Default page size */

            /* Figure out how much space is required for each journal file-handle
            ** (there are two of them, the main journal and the sub-journal). This
            ** is the maximum space required for an in-memory journal file handle
            ** and a regular journal file-handle. Note that a "regular journal-handle"
            ** may be a wrapper capable of caching the first portion of the journal
            ** file in memory to implement the atomic-write optimization (see
            ** source file journal.c).
            */
            if (sqlite3JournalSize(pVfs) > sqlite3MemJournalSize())
            {
                journalFileSize = ROUND8(sqlite3JournalSize(pVfs));
            }
            else
            {
                journalFileSize = ROUND8(sqlite3MemJournalSize());
            }

            /* Set the output variable to NULL in case an error occurs. */
            ppPager = null;

            /* Compute and store the full pathname in an allocated buffer pointed
            ** to by zPathname, length nPathname. Or, if this is a temporary file,
            ** leave both nPathname and zPathname set to 0.
            */
            if (!String.IsNullOrEmpty(zFilename))
            {
                nPathname = pVfs.mxPathname + 1;
                zPathname = new StringBuilder(nPathname * 2);// sqlite3Malloc( nPathname * 2 );
                if (zPathname == null)
                {
                    return SQLITE_NOMEM;
                }
#if !SQLITE_OMIT_MEMORYDB
                if (zFilename == ":memory:")//if( strcmp(zFilename,":memory:")==null )
                {
                    memDb = 1;
                    zPathname.Length = 0;
                }
                else
#endif
                {
                    //zPathname[0] = 0; /* Make sure initialized even if FullPathname() fails */
                    rc = sqlite3OsFullPathname(pVfs, zFilename, nPathname, zPathname);
                }

                nPathname = sqlite3Strlen30(zPathname);
                if (rc == SQLITE_OK && nPathname + 8 > pVfs.mxPathname)
                {
                    /* This branch is taken when the journal path required by
                    ** the database being opened will be more than pVfs.mxPathname
                    ** bytes in length. This means the database cannot be opened,
                    ** as it will not be possible to open the journal file or even
                    ** check for a hot-journal before reading.
                    */
                    rc = SQLITE_CANTOPEN;
                }
                if (rc != SQLITE_OK)
                {
                    //sqlite3_free( ref zPathname );
                    return rc;
                }
            }

            /* Allocate memory for the Pager structure, PCache object, the
            ** three file descriptors, the database file name and the journal
            **


:w*i+x+dw2])
			}
		}
	}
	for _, fci := range f.images[0] {
		fci.img = make([]Sprite, len(f.palettes))
		for i, p := range f.palettes {
			if i == 0 {
				fci.img[0].shareCopy(spr)
				fci.img[0].Size[0] = fci.w
				px2 := make([]byte, int(fci.w)*int(fci.img[0].Size[1]))
				copyCharRect(px2, int(fci.w), px, int(fci.ofs),
					int(spr.Size[0]), int(spr.Size[1]))
				fci.img[0].SetPxl(px2)
			} else {
				i, fci := i, fci
				sys.mainThreadTask <- func() {
					fci.img[i].shareCopy(&fci.img[0])
					fci.img[i].Size[0] = fci.w
				}
			}
			fci.img[i].Offset[0], fci.img[i].Offset[1], fci.img[i].Pal = 0, 0, p[:]
		}
	}
	return f, nil
}

func loadFntV2(filename string, height int32) (*Fnt, error) {
	f := newFnt()

	content, err := LoadText(filename)

	if err != nil {
		return nil, Error("File not found")
	}

	lines := SplitAndTrim(string(content), "\n")
	i := 0
	var name string

	for ; i < len(lines); i++ {
		name, _ = SectionName(lines[i])
		if len(name) > 0 {
			is := NewIniSection()
			i++
			is.Parse(lines, &i)
			i--
			switch name {
			case "def":
				loadDefInfo(f, filename, is, height)
			}
		}
	}
	return f, nil
}

func loadDefInfo(f *Fnt, filename string, is IniSection, height int32) {
	f.Type = strings.ToLower(is["type"])
	if _, ok := is["banktype"]; ok {
		f.BankType = strings.ToLower(is["banktype"])
	}
	ary := SplitAndTrim(is["size"], ",")
	if len(ary[0]) > 0 {
		f.Size[0] = I32ToU16(Atoi(ary[0]))
	}
	if len(ary) > 1 && len(ary[1]) > 0 {
		f.Size[1] = I32ToU16(Atoi(ary[1]))
	}
	ary = SplitAndTrim(is["spacing"], ",")
	if len(ary[0]) > 0 {
		f.Spacing[0] = Atoi(ary[0])
	}
	if len(ary) > 1 && len(ary[1]) > 0 {
		f.Spacing[1] = Atoi(ary[1])
	}
	f.colors = Clamp(Atoi(is["colors"]), 1, 255)
	ary = SplitAndTrim(is["offset"], ",")
	if len(ary[0]) > 0 {
		f.offset[0] = Atoi(ary[0])
	}
	if len(ary) > 1 && len(ary[1]) > 0 {
		f.offset[1] = Atoi(ary[1])
	}

	if len(is["file"]) > 0 {
		if f.Type == "truetype" {
			LoadFntTtf(f, filename, is["file"], height)
		} else {
			LoadFntSff(f, filename, is["file"])
		}
	}
}

func LoadFntSff(f *Fnt, fontfile string, filename string) {
	fileDir := SearchFile(filename, []string{fontfile, "font/", sys.motifDir, "", "data/"})
	sff, err := loadSff(file


entEnable(ListViewModel renderViewModel, bool flag) {
    renderViewModel.scrollGestureDispatcher.scrollEndDragEventEnable = flag;
  }

  @ControllerProps(NodeProps.kOnMomentumScrollBegin)
  void setMomentumScrollBeginEventEnable(
    ListViewModel renderViewModel,
    bool flag,
  ) {
    renderViewModel.scrollGestureDispatcher.momentumScrollBeginEventEnable = flag;
  }

  @ControllerProps(NodeProps.kOnMomentumScrollEnd)
  void setMomentumScrollEndEventEnable(ListViewModel renderViewModel, bool flag) {
    renderViewModel.scrollGestureDispatcher.momentumScrollEndEventEnable = flag;
  }

  @ControllerProps(NodeProps.kOnScrollEnable)
  void setScrollEventEnable(ListViewModel renderViewModel, bool flag) {
    renderViewModel.scrollGestureDispatcher.scrollEventEnable = flag;
  }

  @ControllerProps(NodeProps.kOnEndReached)
  void setOnEndReached(ListViewModel renderViewModel, bool flag) {
    renderViewModel.scrollGestureDispatcher.endReachedEventEnable = true;
  }

  @override
  void updateEvents(
    ListViewModel renderViewModel,
    Set<EventHolder> holders,
  ) {
    super.updateEvents(renderViewModel, holders);
    if (holders.isNotEmpty) {
      for (var holder in holders) {
        switch (holder.eventName) {
          case kEventOnScroll:
            setScrollEventEnable(renderViewModel, holder.isAdd);
            break;
          case kEventOnScrollBeginDrag:
            setScrollBeginDragEventEnable(renderViewModel, holder.isAdd);
            break;
          case kEventOnScrollEndDrag:
            setScrollEndDragEventEnable(renderViewModel, holder.isAdd);
            break;
          case kEventOnMomentumScrollBegin:
            setMomentumScrollBeginEventEnable(renderViewModel, holder.isAdd);
            break;
          case kEventOnMomentumScrollEnd:
            setMomentumScrollEndEventEnable(renderViewModel, holder.isAdd);
            break;
          case kEventOnEndReached:
            setOnEndReached(renderViewModel, holder.isAdd);
            break;
          case kEventOnAppear:
            setOnAppear(renderViewModel, holder.isAdd);
            break;
          case kEventOnDisAppear:
            setOnDisAppear(renderViewModel, holder.isAdd);
            break;
          case kEventOnWillAppear:
            setOnWillAppear(renderViewModel, holder.isAdd);
            break;
          case kEventOnWillDisAppear:
            setOnWillDisAppear(renderViewModel, holder.isAdd);
            break;
        }
      }
    }
  }

  @override
  void dispatchFunction(
    ListViewModel viewModel,
    String functionName,
    VoltronArray array, {
    Promise? promise,
  }) {
    super.dispatchFunction(viewModel, functionName, array, promise: promise);
    if (functionName == kFuncScrollToIndex) {
      // list滑动到某个item
      var yIndex = array.get<int>(1) ?? -1;
      var animated = array.get<bool>(2) ?? false;
      var duration = array.get<int>(3) ?? 0; //1.2.7 增加滚动时间 ms,animated==true时生效

      if (duration <= 100) {
        // 保证duration最小为100ms
        duration = 100;
      }
      LogUtils.d("list_scroll", "scroll to index:$yIndex");
      viewModel.scrollToIndex(yIndex, duration, animated);
    } else if (functionName == kFuncScrollToContentOffset) {
      // list滑动到某个距离
      var yOffset = array.get<double>(1) ?? array.get<int>(1)?.toDouble() ?? 0.0;
      var animated = array.get<bool>(2) ?? false;
      var duration = array.get<int>(3) ?? 0; //1.2.7 增加滚动时间 ms,animated==true时生效

      if (duration <= 100) {
        // 保证duration最小为100ms
        duration = 100;
      }


/*

Data abstractions are most effective when used with opaque data types that
hide information. Let's say that we want to implement a collection that
supports a limited number of operations, such as adding an element,
removing an element, and searching for an element.

The following example implements collection_type as an opaque type, hiding
the implementation details of the data type from the library's user.

To accomplish this, we create two header files: an external collection.h
header file included by the user of the data type, and an internal file
included only in files that implement the functionaloty of the data type.

*/

/* In the external collection.h header file, the collection_type data
   type is defined as an instance of struct collection_type, which is
   an incomplete type: */
typedef struct collection_type collection_type;
// Function declarations
extern errno_t create_collection(collection_type ** result);
extern void destroy_collection(collection_type *col);
extern errno_t add_to_collection(collection_type *col, const void *data, size_t byteCount);
extern errno_t remove_from_collection(collection_type *col, const void *data, size_t byteCount);
extern errno_t find_in_collection(const collection_type *col, const void *data, size_t byteCount);
// ---snip---

/* In the internal header file, struct collection_type is fully defined
   but not visible to a user of the data abstraction */
struct node_type {
  void *data;
  size_t size;
  struct node_type *next;
};

struct collection_type {
  size_t num_elements;
  struct node_type *head;
};

/* Modules that implement the abstract data type include both the
   external and internal definitions, whereas users of the data
   abstraction include only the external collection.h file. This
   allows the implementation of the collection_type data type to
   remain private. */


      map['DENOMINACAO'] = Variable<String?>(denominacao);
    }
    if (!nullToAbsent || dataEmissao != null) {
      map['DATA_EMISSAO'] = Variable<DateTime?>(dataEmissao);
    }
    if (!nullToAbsent || horaEmissao != null) {
      map['HORA_EMISSAO'] = Variable<String?>(horaEmissao);
    }
    if (!nullToAbsent || hashRegistro != null) {
      map['HASH_REGISTRO'] = Variable<String?>(hashRegistro);
    }
    return map;
  }

  EcfR06sCompanion toCompanion(bool nullToAbsent) {
    return EcfR06sCompanion(
      id: id == null && nullToAbsent ? const Value.absent() : Value(id),
      idPdvOperador: idPdvOperador == null && nullToAbsent
          ? const Value.absent()
          : Value(idPdvOperador),
      idEcfImpressora: idEcfImpressora == null && nullToAbsent
          ? const Value.absent()
          : Value(idEcfImpressora),
      idEcfCaixa: idEcfCaixa == null && nullToAbsent
          ? const Value.absent()
          : Value(idEcfCaixa),
      serieEcf: serieEcf == null && nullToAbsent
          ? const Value.absent()
          : Value(serieEcf),
      coo: coo == null && nullToAbsent ? const Value.absent() : Value(coo),
      gnf: gnf == null && nullToAbsent ? const Value.absent() : Value(gnf),
      grg: grg == null && nullToAbsent ? const Value.absent() : Value(grg),
      cdc: cdc == null && nullToAbsent ? const Value.absent() : Value(cdc),
      denominacao: denominacao == null && nullToAbsent
          ? const Value.absent()
          : Value(denominacao),
      dataEmissao: dataEmissao == null && nullToAbsent
          ? const Value.absent()
          : Value(dataEmissao),
      horaEmissao: horaEmissao == null && nullToAbsent
          ? const Value.absent()
          : Value(horaEmissao),
      hashRegistro: hashRegistro == null && nullToAbsent
          ? const Value.absent()
          : Value(hashRegistro),
    );
  }

  factory EcfR06.fromJson(Map<String, dynamic> json,
      {ValueSerializer? serializer}) {
    serializer ??= driftRuntimeOptions.defaultSerializer;
    return EcfR06(
      id: serializer.fromJson<int?>(json['id']),
      idPdvOperador: serializer.fromJson<int?>(json['idPdvOperador']),
      idEcfImpressora: serializer.fromJson<int?>(json['idEcfImpressora']),
      idEcfCaixa: serializer.fromJson<int?>(json['idEcfCaixa']),
      serieEcf: serializer.fromJson<String?>(json['serieEcf']),
      coo: serializer.fromJson<int?>(json['coo']),
      gnf: serializer.fromJson<int?>(json['gnf']),
      grg: serializer.fromJson<int?>(json['grg']),
      cdc: serializer.fromJson<int?>(json['cdc']),
      denominacao: serializer.fromJson<String?>(json['denominacao']),
      dataEmissao: serializer.fromJson<DateTime?>(json['dataEmissao']),
      horaEmissao: serializer.fromJson<String?>(json['horaEmissao']),
      hash


er,.search_result_book_item:hover .search_result_book_title {
    color: #b2b4b8
}

.wr_whiteTheme .search_result_book_item:hover .search_result_book_author,.wr_whiteTheme .search_result_book_item:hover .search_result_book_link_Footer,.wr_whiteTheme .search_result_book_item:hover .search_result_book_title {
    color: #5d646e
}

.search_result_book_item:hover .search_result_book_author em,.search_result_book_item:hover .search_result_book_link_Footer em,.search_result_book_item:hover .search_result_book_title em {
    color: #0097ff
}

.wr_whiteTheme .search_result_book_item:hover .search_result_book_author em,.wr_whiteTheme .search_result_book_item:hover .search_result_book_link_Footer em,.wr_whiteTheme .search_result_book_item:hover .search_result_book_title em {
    color: #1b88ee
}

.search_result_book_item:hover .search_result_book_link_arrow {
    background: url(https://weread-1258476243.file.myqcloud.com/web/wrwebnjlogic/image/arrow_right_gray.0cf9af2a.png) no-repeat;
    background-size: 100%
}

@media(-webkit-min-device-pixel-ratio: 2),(min-device-pixel-ratio:2),(min-resolution:2dppx),(min-resolution:192dpi) {
    .search_result_book_item:hover .search_result_book_link_arrow {
        background-image:url(https://weread-1258476243.file.myqcloud.com/web/wrwebnjlogic/image/arrow_right_gray_2x.6197cb85.png)
    }
}

@media(-webkit-min-device-pixel-ratio: 3),(min-device-pixel-ratio:3),(min-resolution:3dppx),(min-resolution:288dpi) {
    .search_result_book_item:hover .search_result_book_link_arrow {
        background-image:url(https://weread-1258476243.file.myqcloud.com/web/wrwebnjlogic/image/arrow_right_gray_3x.7d0708bf.png)
    }
}

.wr_whiteTheme .search_result_book_item:hover .search_result_book_link_arrow {
    background: url(https://weread-1258476243.file.myqcloud.com/web/wrwebnjlogic/image/arrow_right_gray_in_white_theme.b6e642ff.png) no-repeat;
    background-size: 100%
}

@media(-webkit-min-device-pixel-ratio: 2),(min-device-pixel-ratio:2),(min-resolution:2dppx),(min-resolution:192dpi) {
    .wr_whiteTheme .search_result_book_item:hover .search_result_book_link_arrow {
        background-image:url(https://weread-1258476243.file.myqcloud.com/web/wrwebnjlogic/image/arrow_right_gray_in_white_theme_2x.5fa2df54.png)
    }
}

@media(-webkit-min-device-pixel-ratio: 3),(min-device-pixel-ratio:3),(min-resolution:3dppx),(min-resolution:288dpi) {
    .wr_whiteTheme .search_result_book_item:hover .search_result_book_link_arrow {
        background-image:url(https://weread-1258476243.file.myqcloud.com/web/wrwebnjlogic/image/arrow_right_gray_in_white_theme_3x.7069dd5f.png)
    }
}

.search_result_book_item_NoBorder {
    border-radius: 0;
    border: 0 solid hsla(0,0%,100%,.05)
}

@media(-webkit-min-device-


ogSuccessVerboseX(Log::sceNet, SCE_NET_ADHOC_ERROR_WOULD_BLOCK, "would block (disc)");
						}
						else {
							// Simulate blocking behaviour with non-blocking socket, and discard more unresolvable packets until timeout reached
							u64 threadSocketId = ((u64)__KernelGetCurThread()) << 32 | pdpsocket.id;
							return WaitBlockingAdhocSocket(threadSocketId, PDP_RECV, id, buf, len, timeout, saddr, sport, "pdp recv (disc)");
						}
					}
					else
						break;
				}

				// At this point we assumed that the packet is a valid PPSSPP packet
				if (received != SOCKET_ERROR && *len < received) {
					INFO_LOG(Log::sceNet, "sceNetAdhocPdpRecv[%i:%u]: Peeked %u/%u bytes from %s:%u\n", id, getLocalPort(pdpsocket.id), received, *len, ip2str(sin.sin_addr).c_str(), ntohs(sin.sin_port));

					if (received > 0 && *len > 0)
						memcpy(buf, dummyPeekBuf64k, std::min(received, *len));

					// Return the actual available data size
					*len = received;

					// Provide Sender Information
					*saddr = mac;
					*sport = ntohs(sin.sin_port) - portOffset;

					// Update last recv timestamp, may cause disconnection not detected properly tho
					peerlock.lock();
					auto peer = findFriend(&mac);
					if (peer != NULL) peer->last_recv = CoreTiming::GetGlobalTimeUsScaled();
					peerlock.unlock();

					return hleLogVerbose(Log::sceNet, SCE_NET_ADHOC_ERROR_NOT_ENOUGH_SPACE, "not enough space");
				}

				sinlen = sizeof(sin);
				memset(&sin, 0, sinlen);
				// On Windows: Socket Error 10014 may happen when buffer size is less than the minimum allowed/required (ie. negative number on Vulcanus Seek and Destroy), the address is not a valid part of the user address space (ie. on the stack or when buffer overflow occurred), or the address is not properly aligned (ie. multiple of 4 on 32bit and multiple of 8 on 64bit) https://stackoverflow.com/questions/861154/winsock-error-code-10014
				received = recvfrom(pdpsocket.id, (char*)buf, std::max(0, *len), MSG_NOSIGNAL, (struct sockaddr*)&sin, &sinlen);
				error = socket_errno;

				// On Windows: recvfrom on UDP can get error WSAECONNRESET when previous sendto's destination is unreachable (or destination port is not bound), may need to disable SIO_UDP_CONNRESET
				if (received == SOCKET_ERROR && (error == EAGAIN || error == EWOULDBLOCK || error == ECONNRESET)) {
					if (flag == 0) {
						// Simulate blocking behaviour with non-blocking socket
						u64 threadSocketId = ((u64)__KernelGetCurThread()) << 32 | pdpsocket.id;
						return WaitBlockingAdhocSocket(threadSocketId, PDP_RECV, id, buf, len, timeout, saddr, sport, "pdp recv");
					}

					VERBOSE_LOG(Log::sceNet, "%08x=sceNetAdhocPdpRecv: would block", SCE_NET_ADHOC_ERROR_WOULD_BLOCK); // Temporary fix to avoid a crash on the Logs due to trying to Logs syscall's argument from another thread (ie. AdhocMatchingInput thread)
					return SCE_NET_ADHOC_ERROR_WOULD_BLOCK; // hleLogSuccessVerboseX(Log::sceNet, SCE_NET_ADHOC_ERROR_WOULD_BLOCK, "would block");
				}

				hleEatMicro(50);
				// Received Data. UDP can also receives 0 data, while on TCP 0 data = connection gracefully closed, but not sure about PDP tho
				if (received >= 0) {
					DEBUG_LOG(Log::sceNet, "sceNetAdhocPdpRecv


)
			Manga(
				id = generateUid(href),
				url = href,
				publicUrl = a.attrAsAbsoluteUrl("href"),
				title = a.text(),
				coverUrl = null,
				altTitles = emptySet(),
				rating = RATING_UNKNOWN,
				tags = emptySet(),
				description = null,
				state = null,
				authors = emptySet(),
				contentRating = sourceContentRating,
				source = source,
			)
		}
	}

	private var tagCache: ArrayMap<String, MangaTag>? = null
	private val mutex = Mutex()

	private suspend fun getOrCreateTagMap(): Map<String, MangaTag> = mutex.withLock {
		tagCache?.let { return@withLock it }
		val tagMap = ArrayMap<String, MangaTag>()
		val tagElements = webClient.httpGet("https://$domain/arama").parseHtml()
			.requireElementById("genres").select("option")
		for (option in tagElements) {
			if (option.text().isEmpty()) continue
			tagMap[option.text()] = MangaTag(
				key = option.attr("value"),
				title = option.text().toTitleCase(sourceLocale),
				source = source,
			)
		}
		tagCache = tagMap
		return@withLock tagMap
	}

	override suspend fun getDetails(manga: Manga): Manga {
		val doc = webClient.httpGet(manga.url.toAbsoluteUrl(domain)).parseHtml()
		val dateFormat = SimpleDateFormat("dd/MM/yyyy HH:mm:ss", Locale.ROOT)
		val tagMap = getOrCreateTagMap()
		val tags = doc.select("P.card-text .bg-success").mapNotNullToSet { tagMap[it.text()] }
		return manga.copy(
			description = doc.selectFirst("p.card-text")?.html()?.substringAfterLast("<br>"),
			coverUrl = doc.selectFirst("div.align-items-center div.align-items-center img")?.src()
				?: manga.coverUrl,
			tags = tags,
			chapters = doc.requireElementById("sonyuklemeler").select("tbody tr")
				.mapChapters(reversed = true) { i, tr ->
					val a = tr.selectFirstOrThrow("a")
					val href = a.attrAsRelativeUrl("href")
					MangaChapter(
						id = generateUid(href),
						title = a.text(),
						number = i + 1f,
						volume = 0,
						url = href,
						scanlator = null,
						uploadDate = dateFormat.parseSafe(tr.selectFirstOrThrow("time").attr("datetime")),
						branch = null,
						source = source,
					)
				},
		)
	}

	override suspend fun getPages(chapter: MangaChapter): List<MangaPage> {
		val fullUrl = chapter.url.toAbsoluteUrl(domain)
		val doc = webClient.httpGet(fullUrl).parseHtml()
		return doc.select("div.mt-2 img").map { img ->
			val url = img.requireSrc().toRelativeUrl(domain)
			MangaPage(
				id = generateUid(url),
				url = url,
				preview = null,
				source = source,
			)
		}
	}
}
package org.koitharu.kotatsu.parsers.site.all

import org.koitharu.kotatsu.parsers.MangaLoaderContext
import org.koitharu.kotatsu.parsers.MangaSourceParser
import org.koitharu.kotatsu.parsers.config.ConfigKey
import org.koitharu.kotatsu.parsers.core.PagedMangaParser
import org.koitharu.kotatsu.parsers.model.*
import org.koitharu.kotatsu.parsers.util.*
import java.util.*

@MangaSourceParser("MANHWA210", "Manhwa210", type = ContentType.MANHWA)
internal class Manhwa210(context: MangaLoaderContext) : PagedMangaParser(context, MangaParserSource.


///////////////////////////////////////////////////////////////////////////////
// Name:        wx/osx/cocoa/private/date.h
// Purpose:     NSDate-related helpers
// Author:      Vadim Zeitlin
// Created:     2011-12-19
// Copyright:   (c) 2011 Vadim Zeitlin <vadim@wxwidgets.org>
// Licence:     wxWindows licence
///////////////////////////////////////////////////////////////////////////////

#ifndef _WX_OSX_COCOA_PRIVATE_DATE_H_
#define _WX_OSX_COCOA_PRIVATE_DATE_H_

#include "wx/datetime.h"

namespace wxOSXImpl
{

// Functions to convert between NSDate and wxDateTime.

// Returns an NSDate corresponding to the given wxDateTime which can be invalid
// (in which case nil is returned).
inline NSDate* NSDateFromWX(const wxDateTime& dt)
{
    if ( !dt.IsValid() )
        return nil;

    // Get the internal representation as a double used by NSDate.
    double ticks = dt.GetValue().ToDouble();

    // wxDateTime uses milliseconds while NSDate uses (fractional) seconds.
    return [NSDate dateWithTimeIntervalSince1970:ticks/1000.];
}

// Returns wxDateTime corresponding to the given NSDate (which may be nil).
inline wxDateTime NSDateToWX(const NSDate* d)
{
    if ( !d )
        return wxDefaultDateTime;

    // Reverse everything done above.
    wxLongLong ll;
    ll.Assign([d timeIntervalSince1970]*1000);
    wxDateTime dt(ll);
    return dt;
}

} // namespace wxOSXImpl

#endif // _WX_OSX_COCOA_PRIVATE_DATE_H_


 : Purchase impressions from a
  /// group of deals and auction packages.
  /// - "TARGETING_TYPE_EXCHANGE" : Purchase impressions from specific
  /// exchanges.
  /// - "TARGETING_TYPE_SUB_EXCHANGE" : Purchase impressions from specific
  /// sub-exchanges.
  /// - "TARGETING_TYPE_POI" : Target ads around a specific point of interest,
  /// such as a notable building, a street address, or latitude/longitude
  /// coordinates.
  /// - "TARGETING_TYPE_BUSINESS_CHAIN" : Target ads around locations of a
  /// business chain within a specific geo region.
  /// - "TARGETING_TYPE_CONTENT_DURATION" : Target ads to a specific video
  /// content duration.
  /// - "TARGETING_TYPE_CONTENT_STREAM_TYPE" : Target ads to a specific video
  /// content stream type.
  /// - "TARGETING_TYPE_NATIVE_CONTENT_POSITION" : Target ads to a specific
  /// native content position.
  /// - "TARGETING_TYPE_OMID" : Target ads in an Open Measurement enabled
  /// inventory.
  /// - "TARGETING_TYPE_AUDIO_CONTENT_TYPE" : Target ads to a specific audio
  /// content type.
  /// - "TARGETING_TYPE_CONTENT_GENRE" : Target ads to a specific content genre.
  /// - "TARGETING_TYPE_YOUTUBE_VIDEO" : Target ads to a specific YouTube video.
  /// Targeting of this type cannot be created or updated using the API.
  /// Although this targeting is inherited by child resources, **inherited
  /// targeting of this type will not be retrieveable**.
  /// - "TARGETING_TYPE_YOUTUBE_CHANNEL" : Target ads to a specific YouTube
  /// channel. Targeting of this type cannot be created or updated using the
  /// API. Although this targeting is inherited by child resources, **inherited
  /// targeting of this type will not be retrieveable**.
  /// - "TARGETING_TYPE_SESSION_POSITION" : Target ads to a serve it in a
  /// certain position of a session. Only supported for Ad Group resources under
  /// YouTube Programmatic Reservation line items. Targeting of this type cannot
  /// be created or updated using the API.
  /// - "TARGETING_TYPE_CONTENT_THEME_EXCLUSION" : Filter website content by
  /// content themes (for example, religion). Only supported for Advertiser
  /// resources. Targeting of this type cannot be created or updated using the
  /// API. This targeting is only inherited by child YouTube and Demand Gen line
  /// item resources.
  core.String? targetingType;

  CreateAssignedTargetingOptionsRequest({
    this.assignedTargetingOptions,
    this.targetingType,
  });

  CreateAssignedTargetingOptionsRequest.fromJson(core.Map json_)
    : this(
        assignedTargetingOptions:
            (json_['assignedTargetingOptions'] as core.List?)
                ?.map(
                  (value) => AssignedTargetingOption.fromJson(
                    value as core.Map<core.String, core.dynamic>,
                  ),
                )
                .toList(),
        targetingType: json_['targetingType'] as core.String?,
      );

  core.Map<core.String, core.dynamic> toJson() => {
    if (assignedTargetingOptions != null)
      'assignedTargetingOptions': assignedTargetingOptions!,
    if (targetingType != null) 'targetingType': targetingType!,
  };
}

/// Request message for \[SdfDownloadTaskService.CreateSdfDownloadTask\].
class CreateSdfDownloadTaskRequest {
  /// The ID of the advertiser to download SDF for.
  core.String? advertiserId;

  /// Filters on entities by their entity IDs.
  IdFilter? idFilter;

  /// Filters on Inventory Sources by thei


             val imm: MipsImmediate) : AMipsInstruction16(core, data, Type.VOID, imm) {

    override val mnem = "sw"

    override fun execute() {
        val address = core.reg(29) + (imm.value shl 2)
        if (address[1..0] != 0uL)
            throw MipsHardwareException.AdES(core.pc, address)
        core.outl(address, core.reg(31))
    }
}/*
 *
 * This file is part of Kopycat emulator software.
 *
 * Copyright (C) 2023 INFORION, LLC
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * Non-free licenses may also be purchased from INFORION, LLC,
 * for users who do not want their programs protected by the GPL.
 * Contact us for details kopycat@inforion.ru
 *
 * 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 *
 */
package ru.inforion.lab403.kopycat.cores.mips.instructions.cpu.mips16.arith

import ru.inforion.lab403.kopycat.cores.mips.instructions.AMipsInstruction16
import ru.inforion.lab403.kopycat.cores.mips.operands.MipsRegister
import ru.inforion.lab403.kopycat.modules.cores.MipsCore

/**
 * Created by shiftdj on 21.06.2021.
 */

// addu rz, rx, ry
class addu(
        core: MipsCore,
        data: ULong,
        val rx: MipsRegister,
        val ry: MipsRegister,
        val rz: MipsRegister) : AMipsInstruction16(core, data, Type.VOID, rx, ry, rz) {

    override val mnem = "addu"

    override fun execute() {
        rz.value(core, rx.value(core) + ry.value(core))
    }
}/*
 *
 * This file is part of Kopycat emulator software.
 *
 * Copyright (C) 2023 INFORION, LLC
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * Non-free licenses may also be purchased from INFORION, LLC,
 * for users who do not want their programs protected by the GPL.
 * Contact us for details kopycat@inforion.ru
 *
 * 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 *
 */
package ru.inforion.lab403.kopycat.cores.mips.instructions.cpu.mips16.arith

import ru.inforion.lab403.common.extensions.signextRenameMeAfter
import ru.inforion.lab403.kopycat.cores.mips.instructions.AMipsInstruction
import ru.inforion.lab403.kopycat.cores.mips.operands.MipsImmediate
import ru.inforion.lab403.kopycat.cores.mi


.substring(pc).toUpperCase().startsWith('ENDSWITCH')) {
        if (switchList.isEmpty) {
          {
            result = pc + 9;
          }
        } else {
          switchList.removeLast();
        }
      }
    }
    if (result == 0) {
      _handleError(_SWITCHWITHOUTEND);
    }
    state.scriptIndex = result;
  }

  void exitSwitchStatement() {
    findCorrespondingENDSWITCH();
  }

  void executeCommandENDSWITCH() {
    state.switchStack.pop();
  }

  void executeCommandFOR() {
    _GCWizardScriptClassForLoopInfo stckvar = _GCWizardScriptClassForLoopInfo();
    state.controlStack.push(FORLOOP);
    Object? valueStart;
    Object? valueTarget;
    String vname;
    Object? stepValue;

    getToken();
    vname = state.token;
    if (isNotAVariable(vname)) {
      state.variables[vname] = 0.0;
    }

    stckvar.loopVariable = vname;

    getToken();
    if (state.token[0] != '=') {
      _handleError(_EQUALEXPECTED);
      return;
    }

    valueStart = evaluateExpression();
    if (_isANumber(valueStart)) {
      state.variables[stckvar.loopVariable] = (valueStart as num);
    } else {
      _handleError(_INVALIDTYPECAST);
    }

    getToken();
    if (state.keywordToken != TO) _handleError(_TOEXPECTED);

    valueTarget = evaluateExpression();
    if (_isANumber(valueTarget)) {
      stckvar.targetValue = valueTarget as num;
    } else {
      _handleError(_INVALIDTARGETVALUE);
      return;
    }

    stckvar.descending = ((valueStart as num) > (valueTarget));

    getToken();
    if (state.keywordToken != STEP) {
      putBack();
      stckvar.stepValue = 1;
    } else {
      stepValue = evaluateExpression();
      if (_isAInt(stepValue)) {
        stckvar.stepValue = (stepValue as int).toInt();
      } else if (_isADouble(stepValue)) {
        stckvar.stepValue = (stepValue as num).toDouble();
      } else {
        _handleError(_INVALIDTYPECAST);
        return;
      }
    }

    if (stckvar.descending) {
      if (valueTarget <= (state.variables[stckvar.loopVariable] as num)) {
        stckvar.loopStart = state.scriptIndex;
        state.forStack.push(stckvar);
      } else {
        while (state.keywordToken != NEXT) {
          getToken();
        }
      }
    } else {
      if (valueTarget >= (state.variables[stckvar.loopVariable] as num)) {
        stckvar.loopStart = state.scriptIndex;
        state.forStack.push(stckvar);
      } else {
        while (state.keywordToken != NEXT) {
          getToken();
        }
      }
    }
  }

  void exitLoopNEXT() {
    List<int> forList = [];
    int result = 0;
    for (int pc = state.scriptIndex; pc < state.script.length; pc++) {
      if (state.script.substring(pc).toUpperCase().startsWith('FOR')) {
        forList.add(pc);
      }
      if (state.script.substring(pc).toUpperCase().startsWith('NEXT')) {
        if (forList.isEmpty) {
          result = pc + 4;
        } else {
          forList.removeLast();
        }
      }
    }
    if (result == 0) {
      _handleError(_FORWITHOUTNEXT);
      return;
    }
    state.scriptIndex = result;
  }

  void findCorrespondingNEXT() {
    List<int> forList = [];
    int re


 res.Payload.Data)
}

// (POST /instances).
func (r *restHandlers) PostInstances(ctx echo.Context) error {
	log.Debug().Msg("PostInstances")

	err := ValidateQuery(ctx.QueryParams(), nil)
	if err != nil {
		return ctx.JSON(http.StatusBadRequest, err.Error())
	}

	// cast the body to a type, as it is known which type we are receiving
	body := new(api.Instance)
	res, err := r.CreateAndExecuteJob(ctx, types.Post, types.Instance, body, nil, nil)
	if err != nil {
		return err
	}
	return ctx.JSON(res.Status, res.Payload.Data)
}

// (DELETE /instances/{instanceID}).
func (r *restHandlers) DeleteInstancesInstanceID(ctx echo.Context, instanceID string) error {
	log.Debug().Msg("DeleteInstancesInstanceID")

	err := ValidateQuery(ctx.QueryParams(), nil)
	if err != nil {
		return ctx.JSON(http.StatusBadRequest, err.Error())
	}

	params := handlers.InstanceURLParams{
		InstanceID: instanceID,
	}
	res, err := r.CreateAndExecuteJob(ctx, types.Delete, types.Instance, nil, nil, params)
	if err != nil {
		return err
	}
	return ctx.JSON(res.Status, res.Payload.Data)
}

// (GET /instances/{instanceID}).
func (r *restHandlers) GetInstancesInstanceID(ctx echo.Context, instanceID string) error {
	log.Debug().Msg("GetInstancesInstanceID")

	err := ValidateQuery(ctx.QueryParams(), nil)
	if err != nil {
		return ctx.JSON(http.StatusBadRequest, err.Error())
	}

	params := handlers.InstanceURLParams{
		InstanceID: instanceID,
	}
	res, err := r.CreateAndExecuteJob(ctx, types.Get, types.Instance, nil, nil, params)
	if err != nil {
		return err
	}
	return ctx.JSON(res.Status, res.Payload.Data)
}

// (PATCH /instances/{instanceID}).
func (r *restHandlers) PatchInstancesInstanceID(ctx echo.Context, instanceID string) error {
	log.Debug().Msg("PatchInstancesInstanceID")

	err := ValidateQuery(ctx.QueryParams(), nil)
	if err != nil {
		return ctx.JSON(http.StatusBadRequest, err.Error())
	}

	params := handlers.InstanceURLParams{
		InstanceID: instanceID,
	}

	// cast the body to a type, as it is known which type we are receiving
	body := new(api.Instance)
	res, err := r.CreateAndExecuteJob(ctx, types.Patch, types.Instance, body, nil, params)
	if err != nil {
		return err
	}
	return ctx.JSON(res.Status, res.Payload.Data)
}

// (PUT /instances/{instanceID}/invalidate).
func (r *restHandlers) PutInstancesInstanceIDInvalidate(ctx echo.Context, instanceID string) error {
	log.Debug().Msg("PutInstancesInstanceIDInvalidate")

	err := ValidateQuery(ctx.QueryParams(), nil)
	if err != nil {
		return ctx.JSON(http.StatusBadRequest, err.Error())
	}

	params := handlers.InstanceURLParams{
		InstanceID: instanceID,
		Action:     types.InstanceActionInvalidate,
	}

	// cast the body to a type, as it is known which type we are receiving
	body := new(api.Instance)
	res, err := r.CreateAndExecuteJob(ctx, types.Put, types.Instance, body, nil, params)
	if err != nil {
		return err
	}
	return ctx.JSON(res.Status, re


ertex.unwrap();
        *vertex.get_mut_value() += 1;
        assert_eq!(Some(&SimpleVertex::new(2, 6)), graph.get_vertex(&2));

        let edge = graph.get_mut_edge((&1, &2));
        assert_eq!(Some(&mut DirectedEdge::new(1,2, 3)), edge);
        let edge = edge.unwrap();
        edge.set_weight(12);
        assert_eq!(Some(&DirectedEdge::new(1,2, 12)), graph.get_edge((&1, &2)));
    }
}
<reponame>yuvallanger/nphysics
//! Objects that may be added to the physical world.

pub use self::material::Material;

pub use self::body::{ActivationStatus, Body, BodyMut, BodyPart, BodyPartMut, BodyStatus};
pub use self::body_set::{Bodies, BodyHandle, BodySet};
pub use self::collider::{Collider, ColliderData, ColliderHandle, Colliders, Sensor, SensorHandle};
pub use self::ground::Ground;
pub use self::multibody::{Multibody, MultibodyLinks, MultibodyWorkspace};
pub(crate) use self::multibody_link::{MultibodyLink, MultibodyLinkVec};
pub use self::multibody_link::{MultibodyLinkId, MultibodyLinkMut, MultibodyLinkRef};
pub use self::rigid_body::RigidBody;

mod material;

mod body;
mod body_set;
mod collider;
mod ground;
mod multibody;
mod multibody_link;
mod rigid_body;
//use num_derive::FromPrimitive;
use serde::Serialize;

#[derive(PartialEq, Clone, Debug, Serialize)]
pub enum TagSignature {
    VendorTag(String),
    AToB0Tag                          ,  /* 'A2B0' */
    AToB1Tag                          ,  /* 'A2B1' */
    AToB2Tag                          ,  /* 'A2B2' */
    AToB3Tag                          ,  /* 'A2B3' */
    AToM0Tag                          ,  /* 'A2M0' */
//  BlueColorantTag                   ,  /* 'bXYZ' Renamed to BlueMatrixColumnTag V2->V4? */
    BlueMatrixColumnTag               ,  /* 'bXYZ' */
    BlueTRCTag                        ,  /* 'bTRC' */
    BrdfColorimetricParameter0Tag     ,  /* 'bcp0' */
    BrdfColorimetricParameter1Tag     ,  /* 'bcp1' */
    BrdfColorimetricParameter2Tag     ,  /* 'bcp2' */
    BrdfColorimetricParameter3Tag     ,  /* 'bcp3' */
    BrdfSpectralParameter0Tag         ,  /* 'bsp0' */
    BrdfSpectralParameter1Tag         ,  /* 'bsp1' */
    BrdfSpectralParameter2Tag         ,  /* 'bsp2' */
    BrdfSpectralParameter3Tag         ,  /* 'bsp3' */
    BRDFAToB0Tag                      ,  /* 'bAB0' */
    BRDFAToB1Tag                      ,  /* 'bAB1' */
    BRDFAToB2Tag                      ,  /* 'bAB2' */
    BRDFAToB3Tag                      ,  /* 'bAB3' */
    BRDFDToB0Tag                      ,  /* 'bDB0' */
    BRDFDToB1Tag                      ,  /* 'bDB1' */
    BRDFDToB2Tag                      ,  /* 'bDB2' */
    BRDFDToB3Tag                      ,  /* 'bDB3' */
    BRDFMToB0Tag                      ,  /* 'bMB0' */
    BRDFMToB1Tag                      ,  /* 'bMB1' */
    BRDFMToB2Tag                      ,  /* 'bMB2' */
    BRDFMToB3Tag                      ,  /* 'bMB


็ยิ่งดีเท่านั้น ส่วนที่ดีที่สุด คุณไม่จำเป็นต้องเป็นโปรแกรมเมอร์จึงจะเขียนเอกสารทางเทคนิคได้

สิ่งสำคัญที่สุดคือฟังสิ่งที่คนรอบตัวคุณพูดคุยกัน ดูว่าคุณสามารถรับรู้ถึงความจำเป็นเร่งด่วนหรือไม่ ตัวอย่างเช่น เมื่อเร็ว ๆ นี้ในรายชื่อผู้รับจดหมายของนักพัฒนา Parrot มีการตัดสินใจที่จะใช้ GitHub เป็นระบบตั๋วปัญหา โดยละทิ้งการติดตั้ง Trac แบบเก่าที่พวกเขามี บางคนไม่เห็นด้วยกับการเคลื่อนไหวนี้เนื่องจากไม่มีทางที่จะแปลงตั๋วเป็นระบบของ GitHub ได้ หลังจากทะเลาะกันมาทั้งวัน ฉันก็พูดขึ้นและพูดว่า "ถ้าฉันเขียนตัวแปลงล่ะ" ผู้คนต่างตื่นเต้นกับความคิดนี้ ฉันใช้เวลาเขียนโปรแกรมแปลงตั๋วสำหรับตั๋วมากกว่า 450 ใบ ดังนั้นเราจึงไม่สูญเสียประวัติตั๋วเลย มันเป็นความสำเร็จที่ยิ่งใหญ่. ฉันได้เข้าร่วม และนักพัฒนาหลักยังคงมุ่งเน้นไปที่ธุรกิจการทำงานกับ Parrot

16. **สอนและช่วยเหลือผู้อื่น**:
    วิธีที่ดีที่สุดในการเรียนรู้เพิ่มเติมเกี่ยวกับหัวข้อใดหัวข้อหนึ่งคือการพยายามสอนหัวข้อนั้น
    ครูที่ดีที่สุดคือผู้ที่สามารถอธิบายเร


md" class="mw-redirect" title="おてんば恋娘">おてんば恋娘

东方红魔乡　～ the Embodiment of Scarlet Devil.

07	華のさかづき大江山 -FIRST ver.-	01:56

	编曲	幻獣ローガン

	原曲
華のさかづき大江山

东方地灵殿　～ Subterranean Animism.

08	Flashback the Journey	01:48

	作曲	<a href="/


ndices,
            n_vertices,
            p,
            n,
            s,
            uv,
            alpha_mask,
            shadow_alpha_mask,
        }
    }
}

#[derive(Clone, Serialize, Deserialize)]
pub struct Triangle {
    mesh: Arc<TriangleMesh>,
    pub id: u32,
}

impl Triangle {
    pub fn new(mesh: Arc<TriangleMesh>, tri_number: u32) -> Self {
        Triangle {
            mesh,
            id: tri_number,
        }
    }
    pub fn get_uvs(&self) -> [Point2f; 3] {
        if self.mesh.uv.is_empty() {
            [
                Point2f { x: 0.0, y: 0.0 },
                Point2f { x: 1.0, y: 0.0 },
                Point2f { x: 1.0, y: 1.0 },
            ]
        } else {
            [
                self.mesh.uv[self.mesh.vertex_indices[(self.id * 3) as usize] as usize],
                self.mesh.uv[self.mesh.vertex_indices[(self.id * 3) as usize + 1] as usize],
                self.mesh.uv[self.mesh.vertex_indices[(self.id * 3) as usize + 2] as usize],
            ]
        }
    }
    // Shape
    pub fn object_bound(&self) -> Bounds3f {
        let idx1: usize = (self.id * 3) as usize;
        let idx = &self.mesh.vertex_indices[idx1..(idx1 + 3)];
        let p0: &Point3f = &self.mesh.p[idx[0] as usize];
        let p1: &Point3f = &self.mesh.p[idx[1] as usize];
        let p2: &Point3f = &self.mesh.p[idx[2] as usize];
        bnd3_union_pnt3f(
            &Bounds3f::new(
                self.mesh.world_to_object.transform_point(p0),
                self.mesh.world_to_object.transform_point(p1),
            ),
            &self.mesh.world_to_object.transform_point(p2),
        )
    }
    pub fn world_bound(&self) -> Bounds3f {
        let idx1: usize = (self.id * 3) as usize;
        let idx = &self.mesh.vertex_indices[idx1..(idx1 + 3)];
        let p0: &Point3f = &self.mesh.p[idx[0] as usize];
        let p1: &Point3f = &self.mesh.p[idx[1] as usize];
        let p2: &Point3f = &self.mesh.p[idx[2] as usize];
        bnd3_union_pnt3f(&Bounds3f::new(*p0, *p1), p2)
    }
    pub fn intersect(&self, ray: &Ray, t_hit: &mut Float, isect: &mut SurfaceInteraction) -> bool {
        // get triangle vertices in _p0_, _p1_, and _p2_
        let idx1: usize = (self.id * 3) as usize;
        let idx = &self.mesh.vertex_indices[idx1..(idx1 + 3)];
        let p0: &Point3f = &self.mesh.p[idx[0] as usize];
        let p1: &Point3f = &self.mesh.p[idx[1] as usize];
        let p2: &Point3f = &self.mesh.p[idx[2] as usize];
        // translate vertices based on ray origin
        let mut p0t: Point3f = *p0
            - Vector3f {
                x: ray.o.x,
                y: ray.o.y,
                z: ray.o.z,
            };
        let mut p1t: Point3f = *p1
            - Vector3f {
                x: ray.o.x,
                y: ray.o.y,
                z: ray.o.z,
            };
        let mut p2t: Point3f = *p2
            - Vector3f {
                x


local E, L, V, P, G = unpack(ElvUI)
local UF = E:GetModule("UnitFrames")
local ns = oUF
local ElvUF = ns.oUF

local _G = _G
local setmetatable, getfenv, setfenv = setmetatable, getfenv, setfenv
local type, unpack, select, pairs = type, unpack, select, pairs
local min, random = math.min, math.random
local format, find = string.format, string.find

local UnitMana = UnitMana
local UnitManaMax = UnitManaMax
local UnitHealth = UnitHealth
local UnitHealthMax = UnitHealthMax
local UnitName = UnitName
local UnitClass = UnitClass
local InCombatLockdown = InCombatLockdown
local UnregisterUnitWatch = UnregisterUnitWatch
local RegisterUnitWatch = RegisterUnitWatch
local RegisterStateDriver = RegisterStateDriver
local LOCALIZED_CLASS_NAMES_MALE = LOCALIZED_CLASS_NAMES_MALE
local CLASS_SORT_ORDER = CLASS_SORT_ORDER
local MAX_RAID_MEMBERS = MAX_RAID_MEMBERS

local attributeBlacklist = {["showRaid"] = true, ["showParty"] = true, ["showSolo"] = true}
local configEnv
local originalEnvs = {}
local overrideFuncs = {}

local function createConfigEnv()
	if configEnv then return end
	configEnv = setmetatable({
		UnitMana = function (unit, displayType)
			if find(unit, "target") or find(unit, "focus") then
				return UnitMana(unit, displayType)
			end

			return random(1, UnitManaMax(unit, displayType) or 1)
		end,
		UnitHealth = function(unit)
			if find(unit, "target") or find(unit, "focus") then
				return UnitHealth(unit)
			end

			return random(1, UnitHealthMax(unit))
		end,
		UnitName = function(unit)
			if find(unit, "target") or find(unit, "focus") then
				return UnitName(unit)
			end
			if E.CreditsList then
				local max = #E.CreditsList
				return E.CreditsList[random(1, max)]
			end
			return "Test Name"
		end,
		UnitClass = function(unit)
			if find(unit, "target") or find(unit, "focus") then
				return UnitClass(unit)
			end

			local classToken = CLASS_SORT_ORDER[random(1, #(CLASS_SORT_ORDER))]
			return LOCALIZED_CLASS_NAMES_MALE[classToken], classToken
		end,
		Hex = function(r, g, b)
			if type(r) == "table" then
				if r.r then r, g, b = r.r, r.g, r.b else r, g, b = unpack(r) end
			end
			return format("|cff%02x%02x%02x", r*255, g*255, b*255)
		end,
		ColorGradient = ElvUF.ColorGradient,
	}, {
		__index = _G,
		__newindex = function(_, key, value) _G[key] = value end,
	})

	overrideFuncs["namecolor"] = ElvUF.Tags.Methods["namecolor"]
	overrideFuncs["name:veryshort"] = ElvUF.Tags.Methods["name:veryshort"]
	overrideFuncs["name:short"] = ElvUF.Tags.Methods["name:short"]
	overrideFuncs["name:medium"] = ElvUF.Tags.Methods["name:medium"]
	overrideFuncs["name:long"] = ElvUF.Tags.Methods["name:long"]

	overrideFuncs["healthcolor"] = ElvUF.Tags.Methods["healthcolor"]
	overrideFuncs["health:current"] = ElvUF.Tags.Methods["health:current"]
	overrideFuncs["health:deficit"] = ElvUF.Tags.Methods["health:deficit"]
	overrideFuncs[


d with JAI.WarpPolynomial.createWarp : {}"+ ArrayUtils.toString(warpTotal.getXCoeffs()));
        logger.info("coeffsY : estimated with JAI.WarpPolynomial.createWarp : {}"+ ArrayUtils.toString(warpTotal.getYCoeffs()));
        logger.info("-----");

        // show polynomials depending on logger level <- not in production
        logger.info("coeffsX : estimated with PolyFIt for JAI : {}"+ ArrayUtils.toString(coeffsXTemp));
        logger.info("coeffsY : estimated with PolyFit for JAI : {}"+ ArrayUtils.toString(coeffsYTemp));
        logger.info("-----");

        float[] xCoeffs = new float[coeffsXTemp.length];
        float[] yCoeffs = new float[coeffsYTemp.length];
        for (int i = 0; i < coeffsY.length; i++) {
            yCoeffs[i] = (float) coeffsYTemp[i];
            xCoeffs[i] = (float) coeffsXTemp[i];
        }

        WarpPolynomial warpInterp = new WarpGeneralPolynomial(xCoeffs, yCoeffs);

        Point2D srcPoint = new Point2D.Double(1354, 23214);
//        Point2D srcPoint = new Point2D.Double(2523, 2683);
        Point2D tgtPointExp = new Point2D.Double(srcPoint.getX() * ratioX, srcPoint.getY() * ratioY);

        Point2D srcPointNorm = new Point2D.Double(
                normalize2(srcPoint.getX(), win.pixlo, win.pixhi),
                normalize2(srcPoint.getY(), win.linelo, win.linehi));

        Point2D tgtPoint_JAI_1 = warpTotal.mapDestPoint(srcPoint);
        Point2D tgtPoint_JAI_2 = warpInterp.mapDestPoint(srcPoint);

        double tgtX_polyfit = srcPoint.getX() + polyval(srcPoint.getY(), srcPoint.getX(), coeffsX);
        double tgtY_polyfit = srcPoint.getY() + polyval(srcPoint.getY(), srcPoint.getX(), coeffsY);

        double tgtX_polyfit_norm = srcPoint.getX() + polyval(srcPointNorm.getY(), srcPointNorm.getX(), coeffsXNorm);
        double tgtY_polyfit_norm = srcPoint.getY() + polyval(srcPointNorm.getY(), srcPointNorm.getX(), coeffsYNorm);

        logger.info("============ ");
        logger.info("Input Test Point (x,y): {}, {}"+ srcPoint.getX()+ srcPoint.getY());
        logger.info("============ ");
        logger.info("Target Expected: {}, {}"+ tgtPointExp.getX()+ tgtPointExp.getY());
        logger.info("Offset Expected: {}, {}"+ (tgtPointExp.getX() - srcPoint.getX())+ (tgtPointExp.getY() - srcPoint.getY()));
        logger.info("============ ");
        logger.info("Target - JAI-Impl-1: {}, {}"+ tgtPoint_JAI_1.getX()+ tgtPoint_JAI_1.getY());
        logger.info("Target - JAI-Impl-2: {}, {}"+ tgtPoint_JAI_2.getX()+ tgtPoint_JAI_2.getY());
        logger.info(" ---- ");
        logger.info("Target - polyFit     : {}, {}"+ tgtX_polyfit+ tgtY_polyfit);
        logger.info("Target - polyFit-Norm: {}, {}"+ tgtX_polyfit_norm+ tgtY_polyfit_norm);
        logger.info("============ ");
        logger.info("Error - JAI-Impl-1: {}, {}"+ (tgtPoint_JAI_1.getX() - tgtPointExp.getX())+ (tgtPoint_JAI_1.getY() - tgtPointExp.getY()));
        logger.info("Error - JAI-Impl-2: {}, {}"+ (tgtPoint_JAI_2.getX() -


WREG,W40REG,loop2

	MOVW $0x8f1bbcdc,VREG
loop3:
	BODY(0,FN3,VREG,AREG,BREG,CREG,DREG,EREG)
	BODY(4,FN3,VREG,EREG,AREG,BREG,CREG,DREG)
	BODY(8,FN3,VREG,DREG,EREG,AREG,BREG,CREG)
	BODY(12,FN3,VREG,CREG,DREG,EREG,AREG,BREG)
	BODY(16,FN3,VREG,BREG,CREG,DREG,EREG,AREG)

	ADDU $20,WREG
	BNE WREG,W60REG,loop3

	MOVW $0xca62c1d6,VREG
loop4:
	BODY(0,FN24,VREG,AREG,BREG,CREG,DREG,EREG)
	BODY(4,FN24,VREG,EREG,AREG,BREG,CREG,DREG)
	BODY(8,FN24,VREG,DREG,EREG,AREG,BREG,


 members = match guild.members(&ctx.http, Some(1000), after).await {
        Ok(members) => members,
        Err(_) => break,
      };

      after = match members.last() {
        Some(member) => Some(member.user.id),
        None => None,
      };
      store::members(&ctx, members).await;
    }
  }
  async fn guild_role_create(&self, ctx: Context, guild_id: GuildId, new: Role) {
    store::role(&ctx, guild_id, &new).await;
  }
  async fn guild_role_delete(
    &self,
    ctx: Context,
    guild_id: GuildId,
    role_id: RoleId,
    _: Option<Role>,
  ) {
    delete::role(&ctx, guild_id, role_id).await;
  }
  async fn guild_role_update(&self, ctx: Context, guild_id: GuildId, _: Option<Role>, new: Role) {
    store::role(&ctx, guild_id, &new).await;
  }
  async fn guild_update(&self, ctx: Context, _: Option<Guild>, guild: PartialGuild) {
    store::part_guild(ctx, guild).await;
  }
  async fn guild_member_addition(&self, ctx: Context, _: GuildId, member: Member) {
    store::members(&ctx, vec![member]).await;
  }
  async fn guild_member_update(&self, ctx: Context, _: Option<Member>, member: Member) {
    store::members(&ctx, vec![member]).await;
  }
  async fn guild_member_removal(
    &self,
    ctx: Context,
    guild_id: GuildId,
    user: User,
    _: Option<Member>,
  ) {
    delete::member(ctx, guild_id, user.id).await;
  }
}
use serde::{Deserialize, Serialize};
use std::fs::File;
use std::io::prelude::*;

use dialoguer::console::Style;
use dialoguer::{theme::ColorfulTheme, Confirm, Input};

/**
 * @Article Configuration
 *
 * Configuration parameters:
 */
#[derive(Deserialize, Serialize, Debug, Clone)]
pub struct Config {
    /**
     * @Article Configuration
     *
     * - `docs_folder` - a path to a folder which will contain all generated documents.
     *
     * > **NOTE** be careful, all files in the `docs_folder` will be replaced by documentation files.
     */
    pub docs_folder: Option<String>,
    /**
     * @Article Configuration
     *
     * - `project_path` - an entry point for the parser
     */
    pub project_path: String,
    /**
     * @Article Configuration
     *
     * - `files_patterns` - unix style pathname patterns for matching files which will be parsed.
     */
    pub files_patterns: Vec<String>,
    /**
     * @Article Configuration
     * - `repositories` - you can specify a repository list by setting to parse and generate documentation from all
     * repositories from the list. It can be useful if you have many repositories.
     *
     * For example a microservices architecture:
     * ```
     *
     *                        +-------------------+
     *                        |                   |
     *           +------------+   Documentation   +------------+
     *           |            |        repo       |            |
     *           |            +---------+---------+            |
     *           |                      |                      |
     *           |                      |                      |
     *           |                      |                      |
     *           |                      |                      |
     * +-------------------+  +---------|---------+  +---------|---------+
     * |                   |  |                   |  |                   |
     * |   Microservice 1  |  |   Microservice 2  |  |   Microservice 3  |
     * |       repo        |  |        repo       |  |        repo       |
     * +--------


DeletionOption)
			delete(rawMsg, key)
		case "replicationPort":
			err = unpopulate(val, "ReplicationPort", &h.ReplicationPort)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", h, err)
		}
	}
	return nil
}

// MarshalJSON implements the json.Marshaller interface for type HyperVReplicaBaseReplicationDetails.
func (h HyperVReplicaBaseReplicationDetails) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "initialReplicationDetails", h.InitialReplicationDetails)
	objectMap["instanceType"] = "HyperVReplicaBaseReplicationDetails"
	populateDateTimeRFC3339(objectMap, "lastReplicatedTime", h.LastReplicatedTime)
	populate(objectMap, "vMDiskDetails", h.VMDiskDetails)
	populate(objectMap, "vmId", h.VMID)
	populate(objectMap, "vmNics", h.VMNics)
	populate(objectMap, "vmProtectionState", h.VMProtectionState)
	populate(objectMap, "vmProtectionStateDescription", h.VMProtectionStateDescription)
	return json.Marshal(objectMap)
}

// UnmarshalJSON implements the json.Unmarshaller interface for type HyperVReplicaBaseReplicationDetails.
func (h *HyperVReplicaBaseReplicationDetails) UnmarshalJSON(data []byte) error {
	var rawMsg map[string]json.RawMessage
	if err := json.Unmarshal(data, &rawMsg); err != nil {
		return fmt.Errorf("unmarshalling type %T: %v", h, err)
	}
	for key, val := range rawMsg {
		var err error
		switch key {
		case "initialReplicationDetails":
			err = unpopulate(val, "InitialReplicationDetails", &h.InitialReplicationDetails)
			delete(rawMsg, key)
		case "instanceType":
			err = unpopulate(val, "InstanceType", &h.InstanceType)
			delete(rawMsg, key)
		case "lastReplicatedTime":
			err = unpopulateDateTimeRFC3339(val, "LastReplicatedTime", &h.LastReplicatedTime)
			delete(rawMsg, key)
		case "vMDiskDetails":
			err = unpopulate(val, "VMDiskDetails", &h.VMDiskDetails)
			delete(rawMsg, key)
		case "vmId":
			err = unpopulate(val, "VMID", &h.VMID)
			delete(rawMsg, key)
		case "vmNics":
			err = unpopulate(val, "VMNics", &h.VMNics)
			delete(rawMsg, key)
		case "vmProtectionState":
			err = unpopulate(val, "VMProtectionState", &h.VMProtectionState)
			delete(rawMsg, key)
		case "vmProtectionStateDescription":
			err = unpopulate(val, "VMProtectionStateDescription", &h.VMProtectionStateDescription)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", h, err)
		}
	}
	return nil
}

// MarshalJSON implements the json.Marshaller interface for type HyperVReplicaBluePolicyDetails.
func (h HyperVReplicaBluePolicyDetails) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]any)
	populate(objectMap, "allowedAuthenticationType", h.AllowedAuthenticationType)
	populate(objectMap, "applicationConsistentSnapshotFrequencyInHours", h.ApplicationConsistentSnapshotFrequencyInHours)
	populate(objectMap, "compression", h.Compression)
	populate(objectMap, "initialReplicationMethod", h.InitialReplicationMethod)
	objectMap["instanceType"] = "HyperVReplica2012R2"
	populate(objectMap, "offlineReplicationExportPath", h.OfflineRe


/***********************************************************************************
    Filename: mbus_paket.h
***********************************************************************************/

#ifndef MBUS_PACKET_H
#define MBUS_PACKET_H

#include "mbus/mbus_defs.h"             // for uint8, uint16
//----------------------------------------------------------------------------------
//  Constants
//----------------------------------------------------------------------------------

#define PACKET_C_FIELD  0x44
#define MAN_CODE        0x0CAE
#define MAN_NUMBER      0x12345678
#define MAN_ID          0x01
#define MAN_VER         0x07
#define PACKET_CI_FIELD 0x78

#define PACKET_OK              0
#define PACKET_CODING_ERROR    1
#define PACKET_CRC_ERROR       2

#define WMBUS_SMODE            1
#define WMBUS_TMODE            2

//----------------------------------------------------------------------------------
// Functions
//----------------------------------------------------------------------------------

void encodeTXPacket(uint8* pPacket, uint8* pData, uint8 dataSize);

uint16 packetSize(uint8 lField);
uint16 byteSize(uint8 Smode, uint8 transmit, uint16 packetSize);

void   encodeTXBytesTmode(uint8* pByte, uint8* pPacket, uint16 packetSize);
uint16 decodeRXBytesTmode(uint8* pByte, uint8* pPacket, uint16 packetSize);

void   encodeTXBytesSmode(uint8* pByte, uint8* pPacket, uint16 packetSize);
uint16 decodeRXBytesSmode(uint8* pByte, uint8* pPacket, uint16 packetSize);

#endif

/***********************************************************************************
  Copyright 2008 Texas Instruments Incorporated. All rights reserved.

  IMPORTANT: Your use of this Software is limited to those specific rights
  granted under the terms of a software license agreement between the user
  who downloaded the software, his/her employer (which must be your employer)
  and Texas Instruments Incorporated (the "License").  You may not use this
  Software unless you agree to abide by the terms of the License. The License
  limits your use, and you acknowledge, that the Software may not be modified,
  copied or distributed unless embedded on a Texas Instruments microcontroller
  or used solely and exclusively in conjunction with a Texas Instruments radio
  frequency transceiver, which is integrated into your product.  Other than for
  the foregoing purpose, you may not use, reproduce, copy, prepare derivative
  works of, modify, distribute, perform, display or sell this Software and/or
  its documentation for any purpose.

  YOU FURTHER ACKNOWLEDGE AND AGREE THAT THE SOFTWARE AND DOCUMENTATION ARE
  PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED,
  INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE,
  NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL
  TEXAS INSTRUMENTS OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER CONTRACT,
  NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER
  LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
  INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE
  OR CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT
  OF SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
  (INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.

  Should you have any questions regarding your right to use this Software,
  contact Texas Instruments Incorporated at www.TI.com.
***********************************************************************************/


CableRequest) Unset() {
	v.value = nil
	v.isSet = false
}

func NewNullableBriefCableRequest(val *BriefCableRequest) *NullableBriefCableRequest {
	return &NullableBriefCableRequest{value: val, isSet: true}
}

func (v NullableBriefCableRequest) MarshalJSON() ([]byte, error) {
	return json.Marshal(v.value)
}

func (v *NullableBriefCableRequest) UnmarshalJSON(src []byte) error {
	v.isSet = true
	return json.Unmarshal(src, &v.value)
}
/*
NetBox REST API

No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)

API version: 4.3.0-Docker-3.3.0 (4.3)
*/

// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.

package netbox

import (
	"encoding/json"
)

// checks if the PatchedWritableConsoleServerPortRequest type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &PatchedWritableConsoleServerPortRequest{}

// PatchedWritableConsoleServerPortRequest Adds support for custom fields and tags.
type PatchedWritableConsoleServerPortRequest struct {
	Device *BriefInterfaceRequestDevice     `json:"device,omitempty"`
	Module NullableConsolePortRequestModule `json:"module,omitempty"`
	Name   *string                          `json:"name,omitempty"`
	// Physical label
	Label       *string                                        `json:"label,omitempty"`
	Type        NullablePatchedWritableConsolePortRequestType  `json:"type,omitempty"`
	Speed       NullablePatchedWritableConsolePortRequestSpeed `json:"speed,omitempty"`
	Description *string                                        `json:"description,omitempty"`
	// Treat as if a cable is connected
	MarkConnected        *bool                  `json:"mark_connected,omitempty"`
	Tags                 []NestedTagRequest     `json:"tags,omitempty"`
	CustomFields         map[string]interface{} `json:"custom_fields,omitempty"`
	AdditionalProperties map[string]interface{}
}

type _PatchedWritableConsoleServerPortRequest PatchedWritableConsoleServerPortRequest

// NewPatchedWritableConsoleServerPortRequest instantiates a new PatchedWritableConsoleServerPortRequest object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewPatchedWritableConsoleServerPortRequest() *PatchedWritableConsoleServerPortRequest {
	this := PatchedWritableConsoleServerPortRequest{}
	return &this
}

// NewPatchedWritableConsoleServerPortRequestWithDefaults instantiates a new PatchedWritableConsoleServerPortRequest object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewPatchedWritableConsoleServerPortRequestWithDefaults() *PatchedWritableConsoleServerPortRequest {
	this := PatchedWritableConsoleServerPortRequest{}
	return &this
}

// GetDevice returns the Device field value if set, zero value otherwise.
func (o *PatchedWritableConsoleServerPortRequest) GetDevice() BriefInterfaceRequestDevice {
	if o == nil || IsNil(o.Device) {
		var ret BriefInterfaceRequestDevice
		return ret
	}
	return *o.Device
}

// GetDeviceOk returns a tuple with the Device field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PatchedWritableConsoleServerPortRequest) GetDeviceOk() (*BriefInterfaceRequestDevice, bool) {
	if o == nil || IsNil(o.Device) {
		return nil, f


/*
 *  linux/arch/arm/mm/cache-v6.S
 *
 *  Copyright (C) 2001 Deep Blue Solutions Ltd.
 *
 * 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 is the "shell" of the ARMv6 processor support.
 */
#include <linux/linkage.h>
#include <linux/init.h>
#include <asm/assembler.h>

#include "proc-macros.S"

#define HARVARD_CACHE
#define CACHE_LINE_SIZE		32
#define D_CACHE_LINE_SIZE	32

/*
 *	v6_flush_cache_all()
 *
 *	Flush the entire cache.
 *
 *	It is assumed that:
 */
ENTRY(v6_flush_kern_cache_all)
	mov	r0, #0
#ifdef HARVARD_CACHE
	mcr	p15, 0, r0, c7, c14, 0		@ D cache clean+invalidate
	mcr	p15, 0, r0, c7, c5, 0		@ I+BTB cache invalidate
#else
	mcr	p15, 0, r0, c7, c15, 0		@ Cache clean+invalidate
#endif
	mov	pc, lr

/*
 *	v6_flush_cache_all()
 *
 *	Flush all TLB entries in a particular address space
 *
 *	- mm    - mm_struct describing address space
 */
ENTRY(v6_flush_user_cache_all)
	/*FALLTHROUGH*/

/*
 *	v6_flush_cache_range(start, end, flags)
 *
 *	Flush a range of TLB entries in the specified address space.
 *
 *	- start - start address (may not be aligned)
 *	- end   - end address (exclusive, may not be aligned)
 *	- flags	- vm_area_struct flags describing address space
 *
 *	It is assumed that:
 *	- we have a VIPT cache.
 */
ENTRY(v6_flush_user_cache_range)
	mov	pc, lr

/*
 *	v6_coherent_kern_range(start,end)
 *
 *	Ensure that the I and D caches are coherent within specified
 *	region.  This is typically used when code has been written to
 *	a memory region, and will be executed.
 *
 *	- start   - virtual start address of region
 *	- end     - virtual end address of region
 *
 *	It is assumed that:
 *	- the Icache does not read data from the write buffer
 */
ENTRY(v6_coherent_kern_range)
	bic	r0, r0, #CACHE_LINE_SIZE - 1
1:
#ifdef HARVARD_CACHE
	mcr	p15, 0, r0, c7, c10, 1		@ clean D line
	mcr	p15, 0, r0, c7, c5, 1		@ invalidate I line
#endif
	mcr	p15, 0, r0, c7, c5, 7		@ invalidate BTB entry
	add	r0, r0, #CACHE_LINE_SIZE
	cmp	r0, r1
	blo	1b
#ifdef HARVARD_CACHE
	mov	r0, #0
	mcr	p15, 0, r0, c7, c10, 4		@ drain write buffer
#endif
	mov	pc, lr

/*
 *	v6_flush_kern_dcache_page(kaddr)
 *
 *	Ensure that the data held in the page


: FungusRenameReq.proto

package emu.grasscutter.net.proto;

public final class FungusRenameReqOuterClass {
  private FungusRenameReqOuterClass() {}
  public static void registerAllExtensions(
      com.google.protobuf.ExtensionRegistryLite registry) {
  }

  public static void registerAllExtensions(
      com.google.protobuf.ExtensionRegistry registry) {
    registerAllExtensions(
        (com.google.protobuf.ExtensionRegistryLite) registry);
  }
  public interface FungusRenameReqOrBuilder extends
      // @@protoc_insertion_point(interface_extends:FungusRenameReq)
      com.google.protobuf.MessageOrBuilder {

    /**
     * uint32 name_id = 13;
     * @return The nameId.
     */
    int getNameId();

    /**
     * uint32 fungus_id = 9;
     * @return The fungusId.
     */
    int getFungusId();
  }
  /**
   *

   * CmdId: 29655
   * Obf: NDEPPHOPDCD
   *

   *
   * Protobuf type {@code FungusRenameReq}
   */
  public static final class FungusRenameReq extends
      com.google.protobuf.GeneratedMessageV3 implements
      // @@protoc_insertion_point(message_implements:FungusRenameReq)
      FungusRenameReqOrBuilder {
  private static final long serialVersionUID = 0L;
    // Use FungusRenameReq.newBuilder() to construct.
    private FungusRenameReq(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }
    private FungusRenameReq() {
    }

    @java.lang.Override
    @SuppressWarnings({"unused"})
    protected java.lang.Object newInstance(
        UnusedPrivateParameter unused) {
      return new FungusRenameReq();
    }

    @java.lang.Override
    public final com.google.protobuf.UnknownFieldSet
    getUnknownFields() {
      return this.unknownFields;
    }
    private FungusRenameReq(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      this();
      if (extensionRegistry == null) {
        throw new java.lang.NullPointerException();
      }
      com.google.protobuf.UnknownFieldSet.Builder unknownFields =
          com.google.protobuf.UnknownFieldSet.newBuilder();
      try {
        boolean done = false;
        while (!done) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              done = true;
              break;
            case 72: {

              fungusId_ = input.readUInt32();
              break;
            }
            case 104: {

              nameId_ = input.readUInt32();
              break;
            }
            default: {
              if (!parseUnknownField(
                  input, unknownFields, extensionRegistry, tag)) {
                done = true;
              }
              break;
            }
          }
        }
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.setUnfinishedMessage(this);
      } catch (java.io.IOException e) {
        throw new com.google.protobuf.InvalidProtocolBufferException(
            e).setUnfinishedMessage(this);
      } finally {
        this.unknownFields = unknownFields.build();
        makeExtensionsImmutable();
      }
    }
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return emu.grasscutte


# Copyright 2022 The ChromiumOS Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

from recipe_engine.post_process import Filter

DEPS = [
    "crosvm",
    "recipe_engine/buildbucket",
    "recipe_engine/context",
    "recipe_engine/raw_io",
    "recipe_engine/step",
    "recipe_engine/path",
    "recipe_engine/file",
]

def RunSteps(api):
    with api.crosvm.source_context():
        # Execute push in a bash script so there is no chance of leaking the github token via luci
        # logs.
        api.step("Pushing to github", ["bash", api.resource("push_to_github.sh")])

def GenTests(api):
    yield (api.test("basic") + api.post_process(Filter("Pushing to github")))


.resetStepUi(!0);var t=this.javascriptGenerator.workspaceToCode(this.workspace)||"";setTimeout((function(){e.myInterpreter=new Interpreter(t,((t,n)=>e.initApi(t,n,e)),e),function t(){if(e.myInterpreter){var n=!1;try{n=e.myInterpreter.run()}catch(o){console.error("error!",o),n=e.interceptError(o),console.log("in error",n)}n?e.runnerPid=setTimeout(t,10):(e.resetStepUi(!1),e.finishRun&&e.finishRun())}}()}),1)}}highlightBlock(e){this.workspace.highlightBlock(e),this.highlightPause=!0;var t=this.workspace.getBlockById(e);this.blockExecutedID.length>0&&(console.timeEnd(this.blockExecutedType+"_"+this.blockExecutedID),$e({dateEnd:new Date,dateStart:this.blockExecutedDateStart,id:e,typeBlock:this.blockExecutedType||""})),this.blockExecutedID=e,null!==t&&void 0!==t&&t.type?this.blockExecutedType=t.type:this.blockExecutedType="",this.blockExecutedDateStart=new Date,console.time(this.blockExecutedType+"_"+e),this.stepExecute++}initApi(e,t,n){n.initApiJS(e,t,n)}initApiJS(e,t,n){var o=this;e.setProperty(t,"errHandler",e.createNativeFunction((e=>{var t="error";e&&(t=JSON.stringify(e));var o=new Error(t);if(!n.interceptError(o))throw o})));e.setProperty(t,"startDebugger",e.createNativeFunction((function(e,t,n){o.highlightBlock(t),console.log(e,t,n)}))),st.Instance.NewBlocks().forEach((n=>{n.addWrapper(e,t)}));e.setProperty(t,"changeHost",e.createNativeFunction((function(e,t){if(0===(t=(t=t?t.toString():"").trim()).length)return e;if(0===(e=(e=e||"").trim()).length&&!(e=t).startsWith("http")&&!e.startsWith("/"))throw new Error(`please put in front of ${t} http:// or https://`);var n=new URL(e);if(t.startsWith("http")){var o=new URL(t);n.hostname=o.hostname,n.protocol=o.protocol}else n.hostname=t.replace("https://","").replace("http://","");var r=n.href;return r.endsWith("/")&&(r=r.substring(0,r.length-1)),r})));e.setProperty(t,"changePort",e.createNativeFunction((function(e,t){var n=new URL(e);console.log(`url ${n.href}`),n.port=t,console.log(`url ${n.href}`);var o=n.href;return o.endsWith("/")&&(o=o.substring(0,o.length-1)),o})));e.setProperty(t,"alert",e.createNativeFunction((function(e){e=arguments.length?e:"",n.myCallBackCode(e,n)})));e.setProperty(t,"prompt",e.createNativeFunction((function(e){return window.prompt(e)})));e.setProperty(t,"highlightBlock",e.createNativeFunction((function(e){return e=String(e||""),n.stepExecute++,o.highlightBlock(e)})))}};function lt(e){return function(t){if(function(e){return $(null===e||void 0===e?void 0:e.lift)}(t))return t.lift((function(t){try{return e(t,this)}catch(n){this.error(