 } = renderHook(() => useAsync())

  const mockData = Symbol('mock data')
  act(() => result.current.setData(mockData))

  expect(result.current).toEqual({
    ...resolvedState,
    data: mockData,
  })
})

test('can set the error', async () => {
  const { result } = renderHook(() => useAsync())

  const mockError = Symbol('rejected value')
  act(() => result.current.setError(mockError))

  expect(result.current).toEqual({
    ...rejectedState,
    error: mockError,
  })
})

test('No state updates happen if the component is unmounted while pending', async () => {
  const { promise, resolve } = deferred<any>()
  const { result, unmount } = renderHook(() => useAsync())

  const spiedConsoleError = jest.spyOn(console, 'error')

  let p: Promise<any>
  act(() => {
    p = result.current.run(promise)
  })

  unmount()

  await act(async () => {
    resolve!(Symbol('resolved value'))
    await p
  })

  expect(spiedConsoleError).not.toHaveBeenCalled()
  spiedConsoleError.mockRestore()
})
import { Request, Response } from 'express';
import { getResult } from './result';

export default {
  // 正常登陆 admin 123456
  // 密码错误 admin xxxxxx
  // 角色登陆 role  123456
  // 手机登陆 不限定
  // 'POST  /api/v1/signin': (req: Request, res: Response) => {
  //   const { password, username, type, mobile, captcha, role } = req.body;
  //   if (password === '123456' && username === 'admin') {
  //     res.send(
  //       getResult({
  //         status: 'ok', // ok, error
  //         access_token: '12345678',
  //       }),
  //     );
  //     return;
  //   }
  //   if (username === 'admin') {
  //     // 测试登陆失败
  //     res.send(getResult({ status: 'error' }));
  //     return;
  //   }
  //   if (type === ':account:' && username === 'role' && !role) {
  //     // 测试具有角色的用户
  //     res.send(
  //       getResult({
  //         status: 'error', // 登陆失败
  //         message: '请选择角色',
  //         roles: [
  //           { id: 'admin', name: '管理员' },
  //           { id: '用户', name: '用户' },
  //         ],
  //       }),
  //     );
  //     return;
  //   }
  //   if (type === ':account:' && username === 'role' && !!role) {
  //     res.send(
  //       getResult({
  //         status: 'ok',
  //         access_token: '12345679',
  //       }),
  //     );
  //     return;
  //   }
  //   if (type === ':mobile:') {
  //     // 手机模式登陆测试
  //     res.send(
  //       getResult({
  //         status: 'ok',
  //         access_token: '22345678',
  //       }),
  //     );
  //     return;
  //   }
  //   // 登陆发生异常,不适合登陆
  //   res.send(
  //     getResult(null, {
  //       success: false,
  //       errorCode: 'SIGNIN-ERROR',
  //       errorMessage: '未知异常',
  //     }),
  //   );
  // },
  // 'GET /api/


2268478073947867462);
     DK(KP707106781, +0.707106781186547524400844362104849039284835938);
     DK(KP1_414213562, +1.414213562373095048801688724209698078569671875);
     DK(KP765366864, +0.765366864730179543456919968060797733522689125);
     DK(KP1_847759065, +1.847759065022573512256366378793576573644833252);
     {
	  INT i;
	  for (i = v; i > 0; i = i - 1, I = I + ivs, O = O + ovs, MAKE_VOLATILE_STRIDE(16, is), MAKE_VOLATILE_STRIDE(16, os)) {
	       E T7, Tl, T4, Tk, Td, To, Tg, Tn;
	       {
		    E T5, T6, T1, T3, T2;
		    T5 = I[WS(is, 2)];
		    T6 = I[WS(is, 6)];
		    T7 = FMA(KP1_847759065, T5, KP765366864 * T6);
		    Tl = FNMS(KP1_847759065, T6, KP765366864 * T5);
		    T1 = I[0];
		    T2 = I[WS(is, 4)];
		    T3 = KP1_414213562 * T2;
		    T4 = T1 + T3;
		    Tk = T1 - T3;
		    {
			 E T9, Tf, Tc, Te, Ta, Tb;
			 T9 = I[WS(is, 1)];
			 Tf = I[WS(is, 7)];
			 Ta = I[WS(is, 5)];
			 Tb = I[WS(is, 3)];
			 Tc = KP707106781 * (Ta + Tb);
			 Te = KP707106781 * (Ta - Tb);
			 Td = T9 + Tc;
			 To = Te + Tf;
			 Tg = Te - Tf;
			 Tn = T9 - Tc;
		    }
	       }
	       {
		    E T8, Th, Tq, Tr;
		    T8 = T4 + T7;
		    Th = FNMS(KP390180644, Tg, KP1_961570560 * Td);
		    O[WS(os, 7)] = T8 - Th;
		    O[0] = T8 + Th;
		    Tq = Tk - Tl;
		    Tr = FMA(KP1_111140466, Tn, KP1_662939224 * To);
		    O[WS(os, 5)] = Tq - Tr;
		    O[WS(os, 2)] = Tq + Tr;
	       }
	       {
		    E Ti, Tj, Tm, Tp;
		    Ti = T4 - T7;
		    Tj = FMA(KP390180644, Td, KP1_961570560 * Tg);
		    O[WS(os, 4)] = Ti - Tj;
		    O[WS(os, 3)] = Ti + Tj;
		    Tm = Tk + Tl;
		    Tp = FNMS(KP1_111140466, To, KP1_662939224 * Tn);
		    O[WS(os, 6)] = Tm - Tp;
		    O[WS(os, 1)] = Tm + Tp;
	       }
	  }
     }
}

static const kr2r_desc desc = { 8, "e01_8", {20, 9, 6, 0}, &GENUS, REDFT01 };

void X(codelet_e01_8) (planner *p) {
     X(kr2r_register) (p, e01_8, &desc);
}

#endif				/* HAVE_FMA */


)

var (
	listRuntime    string
	listType       string
	listEnabledStr string
	listAll        bool
	listQuiet      bool
	listNoTrunc    bool
)

func init() {
	rootCmd.AddCommand(listCmd)

	listCmd.Flags().StringVar(&listRuntime, "runtime", "", "Filter by runtime (ollama, vllm, diffusers)")
	listCmd.Flags().StringVar(&listType, "type", "", "Filter by type (chat, image, embed)")
	listCmd.Flags().StringVar(&listEnabledStr, "enabled", "", "Filter by enabled status (true/false)")
	listCmd.Flags().BoolVarP(&listAll, "all", "a", false, "Show all models including hidden ones")
	listCmd.Flags().BoolVarP(&listQuiet, "quiet", "q", false, "Only show model IDs")
	listCmd.Flags().BoolVar(&listNoTrunc, "no-trunc", false, "Don't truncate output")
}

// listCmd represents the list command
var listCmd = &cobra.Command{
	Use:     "list",
	Aliases: []string{"ls"},
	Short:   "List helix models",
	Long: `List all available Helix models with filtering options.

Examples:
  # List all models
  helix model list

  # List only VLLM models
  helix model list --runtime vllm

  # List only chat models
  helix model list --type chat

  # List only enabled models
  helix model list --enabled true

  # Show all models including hidden ones
  helix model list --all

  # Show only model IDs (quiet mode)
  helix model list --quiet`,
	RunE: func(cmd *cobra.Command, _ []string) error {
		apiClient, err := client.NewClientFromEnv()
		if err != nil {
			return err
		}

		query := &store.ListModelsQuery{}

		// Apply filters
		if listRuntime != "" {
			query.Runtime = types.Runtime(listRuntime)
		}
		if listType != "" {
			query.Type = types.ModelType(listType)
		}
		if listEnabledStr != "" {
			if listEnabledStr == "true" {
				enabled := true
				query.Enabled = &enabled
			} else if listEnabledStr == "false" {
				enabled := false
				query.Enabled = &enabled
			}
		}
		// Note: Hide filtering will be handled client-side since the query doesn't support it

		allModels, err := apiClient.ListHelixModels(cmd.Context(), query)
		if err != nil {
			return fmt.Errorf("failed to list models: %w", err)
		}

		// Filter hidden models client-side if not showing all
		var models []*types.Model
		for _, model := range allModels {
			if !listAll && model.Hide {
				continue // Skip hidden models unless --all is specified
			}
			models = append(models, model)
		}

		if listQuiet {
			for _, model := range models {
				fmt.Fprintln(cmd.OutOrStdout(), model.ID)
			}
			return nil
		}

		if len(models) == 0 {
			fmt.Fprintln(cmd.OutOrStdout(), "No models found")
			return nil
		}

		table := tablewriter.NewWriter(cmd.OutOrStdout())

		header := []string{"ID", "NAME", "TYPE", "RUNTIME", "MEMORY", "CONTEXT", "ENABLED", "CREATED"}
		table.SetHeader(header)

		// Configure table styling (Docker-like)
		table.SetAutoWrapText(false)
		table.SetAutoFormatHeaders(true)
		table.SetHeaderAlignment(tablewriter.ALIGN_LEFT)
		table.SetAlignment(tablewriter.ALIGN_LEFT)
		table.SetCenterSeparator("")
		table.SetColumnSeparator("")
		table.SetRowSeparator("")
		table.SetHeaderLine(false)
		table.SetBorder(false)
		table.SetTablePadding("  ")
		table.SetNoWhiteSpace(false)

		f


using EventStore.Client;
using Eventuous.ElasticSearch.Store;
using Eventuous.EventStore;
using Eventuous.Sut.App;
using Eventuous.Sut.Domain;
using Nest;
using static Eventuous.Sut.App.Commands;

namespace ElasticPlayground;

public class ConnectorAndArchive {
    readonly EsdbEventStore    _esdbEventStore;
    readonly ElasticEventStore _elasticEventStore;
    readonly TieredEventStore  _tieredStore;

    public ConnectorAndArchive(IElasticClient elasticClient, EventStoreClient eventStoreClient) {
        _elasticEventStore = new(elasticClient);
        _esdbEventStore    = new(eventStoreClient);
        _tieredStore       = new(_esdbEventStore, _elasticEventStore);
    }

    public async Task Execute() {
        var bookRoom = Generator.CreateBookRoomCommand();

        await Seed(_elasticEventStore, boo


');

  /// {@template dart.ui.semantics.hasRequiredState}
  /// The semantics node has the quality of either being required or not.
  ///
  /// See also:
  ///
  ///   * [SemanticsFlag.isRequired], which controls whether the node is required.
  /// {@endtemplate}
  static const SemanticsFlag hasRequiredState = SemanticsFlag._(
    _kHasRequiredStateIndex,
    'hasRequiredState',
  );

  /// {@template dart.ui.semantics.isRequired}
  /// Whether a semantics node is required.
  ///
  /// If true, user input is required on the semantics node before a form can
  /// be submitted.
  ///
  /// For example, a login form requires its email text field to be non-empty.
  ///
  /// See also:
  ///
  ///   * [SemanticsFlag.hasRequiredState], which enables a required state state.
  /// {@endtemplate}
  static const SemanticsFlag isRequired = SemanticsFlag._(_kIsRequiredIndex, 'isRequired');

  /// The possible semantics flags.
  ///
  /// The map's key is the [index] of the flag and the value is the flag itself.
  static const Map<int, SemanticsFlag> _kFlagById = <int, SemanticsFlag>{
    _kHasCheckedStateIndex: hasCheckedState,
    _kIsCheckedIndex: isChecked,
    _kHasSelectedStateIndex: hasSelectedState,
    _kIsSelectedIndex: isSelected,
    _kIsButtonIndex: isButton,
    _kIsTextFieldIndex: isTextField,
    _kIsFocusedIndex: isFocused,
    _kHasEnabledStateIndex: hasEnabledState,
    _kIsEnabledIndex: isEnabled,
    _kIsInMutuallyExclusiveGroupIndex: isInMutuallyExclusiveGroup,
    _kIsHeaderIndex: isHeader,
    _kIsObscuredIndex: isObscured,
    _kScopesRouteIndex: scopesRoute,
    _kNamesRouteIndex: namesRoute,
    _kIsHiddenIndex: isHidden,
    _kIsImageIndex: isImage,
    _kIsLiveRegionIndex: isLiveRegion,
    _kHasToggledStateIndex: hasToggledState,
    _kIsToggledIndex: isToggled,
    _kHasImplicitScrollingIndex: hasImplicitScrolling,
    _kIsMultilineIndex: isMultiline,
    _kIsReadOnlyIndex: isReadOnly,
    _kIsFocusableIndex: isFocusable,
    _kIsLinkIndex: isLink,
    _kIsSliderIndex: isSlider,
    _kIsKeyboardKeyIndex: isKeyboardKey,
    _kIsCheckStateMixedIndex: isCheckStateMixed,
    _kHasExpandedStateIndex: hasExpandedState,
    _kIsExpandedIndex: isExpanded,
    _kHasRequiredStateIndex: hasRequiredState,
    _kIsRequiredIndex: isRequired,
  };

  // TODO(matanlurey): have original authors document; see https://github.com/flutter/flutter/issues/151917.
  // ignore: public_member_api_docs
  static List<SemanticsFlag> get values => _kFlagById.values.toList(growable: false);

  // TODO(matanlurey): have original authors document; see https://github.com/flutter/flutter/issues/151917.
  // ignore: public_member_api_docs
  static SemanticsFlag? fromIndex(int index) => _kFlagById[index];

  @override
  String toString() => 'SemanticsFlag.$name';
}

/// Checked state of a semantics node.
enum CheckedState {
  /// The semantics node does not have a check state.
  none(0),

  /// The semantics node is checked.
  isTrue(1),

  /// The semantics node is not checked.
  isFalse(2),

  /// The semantics node represents a tristate checkbox in a mixed state.
  mixed(3);

  /// The Constructor of the flag.
  const CheckedState(this.value);

  /// The value of the flag.
  final int value;

  /// If two seman


ch64-pc-windows-msvc`       |
| `i686-pc-windows-msvc`          |
| `x86_64-unknown-linux-gnu`      |
| `x86_64-unknown-linux-musl`     |
| `aarch64-unknown-linux-gnu`     |
| `aarch64-unknown-linux-musl`    |
| `armv7-unknown-linux-gnueabihf` |

## License

MIT License

<!-- Badges -->

[npm-version-src]: https://img.shields.io/npm/v/crates-llms-txt?style=flat&colorA=080f12&colorB=1fa669
[npm-version-href]: https://npmjs.com/package/crates-llms-txt
[npm-downloads-src]: https://img.shields.io/npm/dm/crates-llms-txt?style=flat&colorA=080f12&colorB=1fa669
[npm-downloads-href]: https://npmjs.com/package/crates-llms-txt
[license-src]: https://img.shields.io/github/license/kingsword09/crates_llms_txt.svg?style=flat&colorA=080f12&colorB=1fa669
[license-href]: https://github.com/kingsword09/crates_llms_txt/blob/main/LICENSE
[crates-src]: https://img.shields.io/crates/v/crates_llms_txt
[crates-href]: https://crates.io/crates/crates_llms_txt
[crates-download-src]: https://img.shields.io/crates/d/crates_llms_txt?label=crates-download
[crates-download-href]: https://crates.io/crates/crates_llms_txt
# imagemask
图片隐写工具，可用于隐写文本或者文件数据。最多隐写文本字符数或者文件大小由图片的长与高来决定。

* 在线演示
https://ipfs.io/ipfs/QmUG1TKotQYsp6bSw6pX4crFWfhJRNTnJre7buEaYYBV72

* 使用示例
```html
<script type="text/javascript" src="imagemask.js"></script>
<script type="text/javascript">
var mask = new ImageMask({
    debug: false,   //是否开启调试模式
    charSize: 16,   //字符的字节位数，默认为16，即字符最大值为0xFFFF
    mixCount: 2,    //隐写数据要混合到图片颜色值里的最低位数，值范围在1-5，默认为2，如果大于3，则图片会失真很严重
    lengthSize: 24  //数据长度值的占用字节位数，默认为24，也即数据长度最大值为16777215
});
</script>
```
  * 隐写文本
```javascript
//脚本里传入页面的canvas对象和要隐写的文本
var output = document.getElementById('output');
var canvas = document.getElementById('canvas');
mask.hideText(canvas, '要隐写的文本');
output.src = canvas.toDataURL();
```
  * 隐写文件
```javascript
//脚本里传入页面的canvas对象和要隐写的文本
var output = document.getElementById('output');
var canvas = document.getElementById('canvas');
var file = document.getElementById('file');
mask.hideFile(canvas, file.files[0], , function(result){
		if(result.success){
			output.src = canvas.toDataURL();
		}else{
			alert(result.message);
		}
});
```

* 读出图片里隐写的文本
```javascript
var canvas = document.getElementById('canvas');
var message = mask.revealText(canvas);
```

* 读出图片里隐写的文件
```javascript
var canvas = document.getElementById('canvas');
var file = mask.revealFile(canvas);       //file.name = 文件名称， file.data = 文件数据
```

>* 示例图片
>>* 包含一章小说的风景图片
  ![](https://ipfs.io/ipfs/QmQnHuGoKP3ZTyixygndWa4hXfhRKZ18ZgkipeqbUeQpWg)

>>* 包含一张美女图片的风景图片
  ![](https://ipfs.io/ipfs/QmNUiD81fU7ypgqkrrUrJVasmACm


else {
        spup_cycles     += t.XSDLL - t.RCD - spup_act - t.RP;
        latest_pre_cycle = timestamp + zero_guard(t.XSDLL - t.RCD - spup_act - (2 * t.RP), "t.XSDLL - t.RCD - spup_act - (2 * t.RP) < 0");
      }
    }
  }
  mem_state = MS_NOT_IN_PD;
}

void CommandAnalysis::handleNopEnd(int64_t timestamp)
{
  // May be optionally used at the end of memory trace for better accuracy
  // Update all counters based on completion of operations.
  const MemTimingSpec& t = memSpec.memTimingSpec;
  for (unsigned b = 0; b < num_banks; b++) {
    if (bank_state[b] == BANK_ACTIVE) {
      actcyclesBanks[b] += zero_guard(timestamp - first_act_cycle_banks[b], "first_act_cycle is in the future (bank)");
    }
  }

  if (nActiveBanks() > 0 && mem_state == MS_NOT_IN_PD) {
    actcycles += zero_guard(timestamp - first_act_cycle, "first_act_cycle is in the future");
    idle_act_update(latest_read_cycle, latest_write_cycle,
                    latest_act_cycle, timestamp);
  } else if (nActiveBanks() == 0 && mem_state == MS_NOT_IN_PD) {
    precycles += zero_guard(timestamp - last_pre_cycle, "6 last_pre_cycle is in the future");
    idle_pre_update(timestamp, latest_pre_cycle);
  } else if (mem_state == CommandAnalysis::MS_PDN_F_ACT) {
    f_act_pdcycles += zero_guard(timestamp - pdn_cycle, "pdn_cycle is in the future");
  } else if (mem_state == CommandAnalysis::MS_PDN_S_ACT) {
    s_act_pdcycles += zero_guard(timestamp - pdn_cycle, "pdn_cycle is in the future");
  } else if (mem_state == CommandAnalysis::MS_PDN_F_PRE) {
    f_pre_pdcycles += zero_guard(timestamp - pdn_cycle, "pdn_cycle is in the future");
  } else if (mem_state == CommandAnalysis::MS_PDN_S_PRE) {
    s_pre_pdcycles += zero_guard(timestamp - pdn_cycle, "pdn_cycle is in the future");
  } else if (mem_state == CommandAnalysis::MS_SREF) {
    auto rfc_minus_rp = (t.RFC - t.RP);

    if (timestamp > sref_cycle + t.RFC) {
      if (sref_cycle_window <= sref_cycle + rfc_minus_rp) {
        sref_ref_act_cycles += rfc_minus_rp - sref_ref_act_cycles_window;
        sref_ref_act_cycles_window = rfc_minus_rp;
        sref_cycle_window = sref_cycle + rfc_minus_rp;
      }
      if (sref_cycle_window <= sref_cycle + t.RFC) {
        sref_ref_pre_cycles += t.RP - sref_ref_pre_cycles_window;
        sref_ref_pre_cycles_window = t.RP;
        sref_cycle_window = sref_cycle + t.RFC;
      }
      sref_cycles += zero_guard(timestamp - sref_cycle_window, "sref_cycle_window is in the future");
    } else if (timestamp > sref_cycle + rfc_minus_rp) {

      if (sref_cycle_window <= sref_cycle + rfc_minus_rp) {
        sref_ref_act_cycles += rfc_minus_rp - sref_ref_act_cycles_window;
        sref_ref_act_cycles_window = rfc_minus_rp;
        sref_cycle_window = sref_cycle + rfc_minus_rp;
      }
      sref_ref_pre_cycles_window += timestamp - sref_cycle_window;
      sref_ref_pre_cycles += timestamp - sref_cycle_window;
    } else {
      sref_ref_act_cycles_window += timestamp - sref_cycle_window;
      sref_


_id': '15771562',
      'collected': false,
      'comment_list_prefix': [],
      'comments': 4,
      'content': '大大大床房',
      'created_at': '2019-12-28 09:10:52',
      'data_type': 'post',
      'delete': false,
      'event_tags': ['微缩摄影研究所', '中国创意摄影', '取景器里的小美好'],
      'excerpt': '大大大床房',
      'favorite_list_prefix': [],
      'favorites': 46,
      'image_count': 1,
      'images': [
        {
          'description': '',
          'excerpt': '',
          'height': 914,
          'img_id': 379767001,
          'img_id_str': '379767001',
          'title': '001',
          'user_id': 15771562,
          'width': 914
        }
      ],
      'is_favorite': false,
      'last_read': null,
      'parent_comments': '4',
      'passed_time': '2019年12月28日',
      'post_id': 61079247,
      'published_at': '2019-12-28 09:10:52',
      'recommend': true,
      'recom_type': '',
      'rewardable': true,
      'reward_list_prefix': [],
      'rewards': '0',
      'rqt_id': '',
      'shares': 0,
      'site': {
        'description': '资深创意摄影师',
        'domain': '',
        'followers': 474,
        'has_everphoto_note': true,
        'icon':
            'https://lf3-tccdn-tos.pstatp.com/obj/tuchong-avatar/ll_15771562_1',
        'is_bind_everphoto': false,
        'is_following': false,
        'name': '感青影像',
        'site_id': '15771562',
        'type': 'user',
        'url': 'https://tuchong.com/15771562/',
        'verification_list': [
          {'verification_reason': '资深创意摄影师', 'verification_type': 13}
        ],
        'verifications': 1,
        'verified': true
      },
      'site_id': '15771562',
      'sites': [],
      'tags': ['微缩摄影研究所', '中国创意摄影', '取景器里的小美好', '微型创意摄影'],
      'title': '',
      'title_image': null,
      'type': 'multi-photo',
      'update': false,
      'url': 'https://tuchong.com/15771562/61079247/',
      'views': 2230
    },
    {
      'author_id': '15791930',
      'collected': false,
      'comment_list_prefix': [],
      'comments': 2,
      'content': '寺庙 青红色调',
      'created_at': '2019-12-25 20:15:22',
      'data_type': 'post',
      'delete': false,
      'event_tags': ['带我看看，你的城市', '福建摄影圈', '让摄影穿破次元壁'],
      'excerpt': '寺庙 青红色调',
      'favorite_list_prefix': [],
      'favorites': 34,
      'image_count': 2,
      'images': [
        {
          'description': '',
          'excerpt': '',
          'height': 5477,
          'img_id': 474989837,
          'img_id_str': '474989837',
          'title': '537552',
          'user_id': 15791930,


SUR_7_1_2:
			busType = juce::AudioChannelSet::create7point1point2();
			break;
		case BusType::SUR_7_0_4:
			busType = juce::AudioChannelSet::create7point0point4();
			break;
		case BusType::SUR_7_1_4:
			busType = juce::AudioChannelSet::create7point1point4();
			break;
		case BusType::SUR_7_0_6:
			busType = juce::AudioChannelSet::create7point0point6();
			break;
		case BusType::SUR_7_1_6:
			busType = juce::AudioChannelSet::create7point1point6();
			break;
		case BusType::SUR_9_0_4:
			busType = juce::AudioChannelSet::create9point0point4();
			break;
		case BusType::SUR_9_1_4:
			busType = juce::AudioChannelSet::create9point1point4();
			break;
		case BusType::SUR_9_0_6:
			busType = juce::AudioChannelSet::create9point0point6();
			break;
		case BusType::SUR_9_1_6:
			busType = juce::AudioChannelSet::create9point1point6();
			break;
		case BusType::QUADRAPHONIC:
			busType = juce::AudioChannelSet::quadraphonic();
			break;
		case BusType::PENTAGONAL:
			busType = juce::AudioChannelSet::pentagonal();
			break;
		case BusType::HEXAGONAL:
			busType = juce::AudioChannelSet::hexagonal();
			break;
		case BusType::OCTAGONAL:
			busType = juce::AudioChannelSet::octagonal();
			break;
		case BusType::AMBISONIC_0:
		case BusType::AMBISONIC_1:
		case BusType::AMBISONIC_2:
		case BusType::AMBISONIC_3:
		case BusType::AMBISONIC_4:
		case BusType::AMBISONIC_5:
		case BusType::AMBISONIC_6:
		case BusType::AMBISONIC_7:
			busType = juce::AudioChannelSet::ambisonic(static_cast<int>(type) - 100);
			break;
		default:
			busType = juce::AudioChannelSet::stereo();
			break;
		}

		return busType;
	}

	BusType getBusType(const juce::AudioChannelSet& channels) {
		if (channels == juce::AudioChannelSet::disabled()) {
			return BusType::DISABLED;
		}
		else if (channels == juce::AudioChannelSet::mono()) {
			return BusType::MONO;
		}
		else if (channels == juce::AudioChannelSet::stereo()) {
			return BusType::STEREO;
		}
		else if (channels == juce::AudioChannelSet::createLCR()) {
			return BusType::LCR;
		}
		else if (channels == juce::AudioChannelSet::createLRS()) {
			return BusType::LRS;
		}
		else if (channels == juce::AudioChannelSet::createLCRS()) {
			return BusType::LCRS;
		}
		else if (channels == juce::AudioChannelSet::create5point0()) {
			return BusType::SUR_5_0;
		}
		else if (channels == juce::AudioChannelSet::create5point1()) {
			return BusType::SUR_5_1;
		}
		else if (channels == juce::AudioChannelSet::create5point0point2()) {
			return BusType::SUR_5_0_2;
		}
		else if (channels == juce::AudioChannelSet::create5point1point2()) {
			return BusType::SUR_5_1_2;
		}
		else if (channels == juce::AudioChannelSet::create5


//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose:
//
//=============================================================================//

#ifndef HUD_BASETIMER_H
#define HUD_BASETIMER_H
#ifdef _WIN32
#pragma once
#endif

#include "hud_numericdisplay.h"

//-----------------------------------------------------------------------------
// Purpose: Base class for all the hud elements that are just a numeric display
//			with some options for text and icons
//-----------------------------------------------------------------------------
class CHudBaseTimer : public CHudNumericDisplay
{
	DECLARE_CLASS_SIMPLE( CHudBaseTimer, CHudNumericDisplay );

public:
	CHudBaseTimer(vgui::Panel *parent, const char *name);

	void SetMinutes( int minutes );
	void SetSeconds( int seconds );

protected:
	// vgui overrides
	virtual void Paint();

	void SetToPrimaryColor();
	void SetToSecondaryColor();

private:
	void PaintTime(vgui::HFont font, int xpos, int ypos, int mins, int secs);

	int m_iMinutes;
	int m_iSeconds;
	wchar_t m_LabelText[32];

	CPanelAnimationVar( float, m_flBlur, "Blur", "0" );
	CPanelAnimationVar( float, m_flAlphaOverride, "Alpha", "255" );
	CPanelAnimationVar( Color, m_TextColor, "TextColor", "FgColor" );
	CPanelAnimationVar( Color, m_FlashColor, "SecondaryColor", "FgColor" );

	CPanelAnimationVar( vgui::HFont, m_hNumberFont, "NumberFont", "HudNumbers" );
	CPanelAnimationVar( vgui::HFont, m_hNumberGlowFont, "NumberGlowFont", "HudNumbersGlow" );
	CPanelAnimationVar( vgui::HFont, m_hSmallNumberFont, "SmallNumberFont", "HudNumbersSmall" );
	CPanelAnimationVar( vgui::HFont, m_hTextFont, "TextFont", "Default" );

	CPanelAnimationVarAliasType( float, text_xpos, "text_xpos", "8", "proportional_float" );
	CPanelAnimationVarAliasType( float, text_ypos, "text_ypos", "20", "proportional_float" );
	CPanelAnimationVarAliasType( float, digit_xpos, "digit_xpos", "50", "proportional_float" );
	CPanelAnimationVarAliasType( float, digit_ypos, "digit_ypos", "2", "proportional_float" );
	CPanelAnimationVarAliasType( float, digit2_xpos, "digit2_xpos", "98", "proportional_float" );
	CPanelAnimationVarAliasType( float, digit2_ypos, "digit2_ypos", "16", "proportional_float" );
};

#endif // HUD_BASETIMER_H


             Effect shieldEffect = Terraria.Graphics.Effects.Filters.Scene["CalamityMod:RoverDriveShield"].GetShader().Shader;
                shieldEffect.Parameters["time"].SetValue(Main.GlobalTimeWrappedHourly * 0.24f);
                shieldEffect.Parameters["blowUpPower"].SetValue(2.5f);
                shieldEffect.Parameters["blowUpSize"].SetValue(0.5f);
                shieldEffect.Parameters["noiseScale"].SetValue(noiseScale);

                float baseShieldOpacity = 0.9f + 0.1f * (float)Math.Sin(Main.GlobalTimeWrappedHourly * 2f);
                shieldEffect.Parameters["shieldOpacity"].SetValue(baseShieldOpacity);
                shieldEffect.Parameters["shieldEdgeBlendStrenght"].SetValue(4f);

                Color blueTint = new Color(51, 102, 255);
                Color cyanTint = new Color(71, 202, 255);
                Color wulfGreen = new Color(194, 255, 67) * 0.8f;
                Color edgeColor = CalamityUtils.MulticolorLerp(Main.GlobalTimeWrappedHourly * 0.2f, blueTint, cyanTint, wulfGreen);
                shieldEffect.Parameters["shieldColor"].SetValue(blueTint.ToVector3());
                shieldEffect.Parameters["shieldEdgeColor"].SetValue(edgeColor.ToVector3());

                Main.spriteBatch.End();
                Main.spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.Additive, Main.DefaultSamplerState, DepthStencilState.None, Main.Rasterizer, shieldEffect, Main.GameViewMatrix.TransformationMatrix);

                if (RoverDrive.NoiseTex == null)
                    RoverDrive.NoiseTex = ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/GreyscaleGradients/TechyNoise");

                Texture2D tex = RoverDrive.NoiseTex.Value;
                Vector2 pos = NPC.Center + NPC.gfxOffY * Vector2.UnitY - Main.screenPosition;
                Main.spriteBatch.Draw(tex, pos, null, Color.White, 0, tex.Size() / 2f, scale, 0, 0);

                Main.spriteBatch.End();
                Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.Rasterizer, null, Main.Transform);

            }
        }

        public override void ModifyNPCLoot(NPCLoot npcLoot)
        {
            npcLoot.Add(ModContent.ItemType<WulfrumMetalScrap>(), 1, 1, 2);
            npcLoot.Add(ModContent.ItemType<RoverDrive>(), 10);
            npcLoot.Add(ModContent.ItemType<WulfrumBattery>(), new Fraction(7, 100));
            npcLoot.AddIf(info => info.npc.ModNPC<WulfrumRover>().Supercharged, ModContent.ItemType<EnergyCore>());
        }
    }
}


te::parse;
use crate::source::*;
use crate::syntax::*;
use crate::token::*;
use std::collections::{HashMap, HashSet};
use std::path::PathBuf;
use std::rc::Rc;

#[derive(Clone, Copy)]
pub enum DiagnosticSeverity {
    Error,
}

#[derive(Clone)]
pub struct Diagnostic {
    pub severity: DiagnosticSeverity,
    pub range: TextRange,
    pub message: String,
}

#[derive(Clone)]
pub struct TextPosition {
    pub line: usize,
    pub character: usize,
}

impl From<Position> for TextPosition {
    fn from(it: Position) -> Self {
        Self {
            line: it.line,
            character: it.character,
        }
    }
}

impl From<TextPosition> for Position {
    fn from(it: TextPosition) -> Self {
        Self {
            line: it.line,
            character: it.character,
        }
    }
}

#[derive(Clone)]
pub struct TextRange {
    pub start: TextPosition,
    pub end: TextPosition,
}

impl From<Range> for TextRange {
    fn from(it: Range) -> Self {
        Self {
            start: it.start.into(),
            end: it.end.into(),
        }
    }
}

impl From<TextRange> for Range {
    fn from(it: TextRange) -> Self {
        Self {
            start: it.start.into(),
            end: it.end.into(),
        }
    }
}

#[derive(Clone)]
pub struct TextLocation {
    pub source_path: Rc<PathBuf>,
    pub range: TextRange,
}

impl TextLocation {
    fn new(source_path: Rc<PathBuf>, range: Range) -> Self {
        TextLocation {
            source_path,
            range: range.into(),
        }
    }
}

#[derive(Default)]
pub struct World {
    empty_string: Rc<String>,
    source_files: HashSet<SourceFile>,
    source_codes: HashMap<SourceFile, Rc<SourceCode>>,
    syntax_roots: HashMap<TokenSource, (Rc<SourceCode>, Rc<SyntaxRoot>)>,
}

impl World {
    pub fn new() -> Self {
        World::default()
    }

    pub fn add_source_file(&mut self, source_path: Rc<PathBuf>) {
        let source_file = SourceFile { source_path };

        self.source_files.insert(source_file);
    }

    pub fn remove_source_file(&mut self, source_path: Rc<PathBuf>) {
        let source_file = SourceFile { source_path };
        let token_source = TokenSource::from_file(source_file.clone());

        self.source_files.remove(&source_file);

        // 関連データも削除する。
        self.source_codes.remove(&source_file);
        self.syntax_roots.remove(&token_source);
    }

    fn get_source_code(&mut self, source_file: &SourceFile) -> Rc<SourceCode> {
        self.source_codes
            .get(&source_file)
            .cloned()
            .unwrap_or_else(|| self.empty_string.clone())
    }

    pub fn set_source_code(&mut self, source_path: Rc<PathBuf>, source_code: SourceCode) {
        let source_file = SourceFile { source_path };
        let token_source = TokenSource::from_file(source_file.clone());

        if self.get_source_code(&source_file).as_str() == source_code.as_str() {
            return;
        }

        // 依存データを削除する。
        self.syntax_roots.remove(&token_source);

        self.source_codes.insert(source_file, Rc::new(source_code));
    }

    fn require_syntax_root(&mut self, source_file: SourceFile) -> Rc<SyntaxRoot> {
        let source_


4), %xmm6

// CHECK: psadbw 64(%rdx,%rax), %xmm6
// CHECK: encoding: [0x66,0x0f,0xf6,0x74,0x02,0x40]
psadbw 64(%rdx,%rax), %xmm6

// CHECK: psadbw 64(%rdx), %xmm6
// CHECK: encoding: [0x66,0x0f,0xf6,0x72,0x40]
psadbw 64(%rdx), %xmm6

// CHECK: psadbw (%rdx), %xmm6
// CHECK: encoding: [0x66,0x0f,0xf6,0x32]
psadbw (%rdx), %xmm6

// CHECK: psadbw %xmm6, %xmm6
// CHECK: encoding: [0x66,0x0f,0xf6,0xf6]
psadbw %xmm6, %xmm6

// CHECK: pshufd $0, 485498096, %xmm6
// CHECK: encoding: [0x66,0x0f,0x70,0x34,0x25,0xf0,0x1c,0xf0,0x1c,0x00]
pshufd $0, 485498096, %xmm6

// CHECK: pshufd $0, -64(%rdx,%rax,4), %xmm6
// CHECK: encoding: [0x66,0x0f,0x70,0x74,0x82,0xc0,0x00]
pshufd $0, -64(%rdx,%rax,4), %xmm6

// CHECK: pshufd $0, 64(%rdx,%rax,4), %xmm6
// CHECK: encoding: [0x66,0x0f,0x70,0x74,0x82,0x40,0x00]
pshufd $0, 64(%rdx,%rax,4), %xmm6

// CHECK: pshufd $0, 64(%rdx,%rax), %xmm6
// CHECK: encoding: [0x66,0x0f,0x70,0x74,0x02,0x40,0x00]
pshufd $0, 64(%rdx,%rax), %xmm6

// CHECK: pshufd $0, 64(%rdx), %xmm6
// CHECK: encoding: [0x66,0x0f,0x70,0x72,0x40,0x00]
pshufd $0, 64(%rdx), %xmm6

// CHECK: pshufd $0, (%rdx), %xmm6
// CHECK: encoding: [0x66,0x0f,0x70,0x32,0x00]
pshufd $0, (%rdx), %xmm6

// CHECK: pshufd $0, %xmm6, %xmm6
// CHECK: encoding: [0x66,0x0f,0x70,0xf6,0x00]
pshufd $0, %xmm6, %xmm6

// CHECK: pshufhw $0, 485498096, %xmm6
// CHECK: encoding: [0xf3,0x0f,0x70,0x34,0x25,0xf0,0x1c,0xf0,0x1c,0x00]
pshufhw $0, 485498096, %xmm6

// CHECK: pshufhw $0, -64(%rdx,%rax,4), %xmm6
// CHECK: encoding: [0xf3,0x0f,0x70,0x74,0x82,0xc0,0x00]
pshufhw $0, -64(%rdx,%rax,4), %xmm6

// CHECK: pshufhw $0, 64(%rdx,%rax,4), %xmm6
// CHECK: encoding: [0xf3,0x0f,0x70,0x74,0x82,0x40,0x00]
pshufhw $0, 64(%rdx,%rax,4), %xmm6

// CHECK: pshu


{
				opt.set(dom_prefix + 'mkcp_guise', queryParam.headerType || "none");
				opt.set(dom_prefix + 'mkcp_seed', queryParam.seed || "");
			} else if (queryParam.type === "grpc") {
				opt.set(dom_prefix + 'grpc_serviceName', (queryParam.serviceName || queryParam.path) || "");
				opt.set(dom_prefix + 'grpc_mode', queryParam.mode || "gun");
			}

			queryParam.security = queryParam.security || "tls";
			opt.set(dom_prefix + 'tls', queryParam.security === "tls");
			if (queryParam.security === "tls") {
				var tls_serverName = queryParam.peer;
				if (queryParam.sni) {
					tls_serverName = queryParam.sni
				}
				tls_serverName = tls_serverName || "";
				opt.set(dom_prefix + 'tls_serverName', tls_serverName);
				opt.set(dom_prefix + 'alpn', queryParam.alpn || 'default');
			}
			opt.set(dom_prefix + 'tls_allowInsecure', true);
			if ((queryParam.allowinsecure ?? '0') === '0' && (queryParam.insecure ?? '0') === '0') {
				opt.set(dom_prefix + 'tls_allowInsecure', false);
			}

			if (m.hash) {
				opt.set('remarks', decodeURIComponent(m.hash.substr(1)));
			}
		}
		if (ssu[0] === "vmess") {
			var sstr = b64DecodeUnicode((ssu[1] || "").replace(/#.*/, "").trim());
			var ploc = sstr.indexOf("/?");
			if (vmess_type == "sing-box" && has_singbox) {
				dom_prefix = "singbox_"
				opt.set('type', "sing-box");
			} else if (has_xray) {
				dom_prefix = "xray_"
				opt.set('type', "Xray");
			}
			opt.set(dom_prefix + 'protocol', "vmess");
			var url0, param = "";
			if (ploc > 0) {
				url0 = sstr.substr(0, ploc);
				param = sstr.substr(ploc + 2);
			}
			var ssm = JSON.parse(sstr);
			opt.set('remarks', ssm.ps);
			opt.set(dom_prefix + 'address', unbracketIP(ssm.add));
			opt.set(dom_prefix + 'port', ssm.port);
			opt.set(dom_prefix + 'uuid', ssm.id);
			opt.set(dom_prefix + 'tls', ssm.tls === "tls");
			if (ssm.tls === "tls") {
				var tls_serverName = ssm.host;
				if (ssm.sni) {
					tls_serverName = ssm.sni
				}
				opt.set(dom_prefix + 'tls_serverName', tls_serverName);
			}
			ssm.net = ssm.net.toLowerCase();
			if (ssm.net === "kcp" || ssm.net === "mkcp")
				ssm.net = "mkcp"
			if (dom_prefix == "singbox_" && ssm.net === "raw") {
				ssm.net = "tcp";
			} else if (dom_prefix == "xray_" && ssm.net === "tcp") {
				ssm.net = "raw";
			}
			if (ssm.net === "h2" || ssm.net === "http") {
				ssm.net = "http";
			}
			if (dom_prefix == "xray_" && ssm.net === "http") {
				opt.set(dom_prefix + 'transport', "xhttp");
			} else {
				opt.set(dom_prefix + 'transport', ssm.net);
			}
			if (ssm.net === "raw" || ssm.net === "tcp") {
				opt.set(dom_prefix + 'tcp_guise', (ssm.host && ssm.host !=


 1},
		{Type: lexer.NUMBER, Val: "1", Line: 1},
		{Type: lexer.EOL},
		{Type: lexer.EOF},
	}

	/*
		pramga cellscript 0.0.1
	*/

	expected := &FileNode{
		Instructions: []Node{
			&PragmaNode{
				Version: VersionScheme{
					Major: 0,
					Minor: 0,
					Patch: 1,
				},
			},
		},
	}

	assert.Equal(t, expected, Parse(input, &option.Options{Debug: false}))
}

func TestFunction(t *testing.T) {
	input := []lexer.Item{
		{Type: lexer.KEYWORD, Val: "extern", Line: 1},
		{Type: lexer.OPERATOR, Val: "(", Line: 1},
		{Type: lexer.KEYWORD, Val: "func", Line: 1},
		{Type: lexer.IDENTIFIER, Val: "foo", Line: 1},
		{Type: lexer.OPERATOR, Val: "(", Line: 1},
		{Type: lexer.OPERATOR, Val: ")", Line: 1},
		{Type: lexer.IDENTIFIER, Val: "int32", Line: 1},
		{Type: lexer.OPERATOR, Val: ")", Line: 1},
		{Type: lexer.EOL},
		{Type: lexer.EOF},
	}

	/*
		extern (
			func foo() int32
			func bar() int32
		)
		extern func foo() int32
	*/

	expected := &FileNode{
		Instructions: []Node{
			&ExternNode{
				FuncNodes: []*DefineFuncNode{
					&DefineFuncNode{
						Name:     "foo",
						IsNamed:  true,
						IsMethod: false,
						IsExtern: true,

						MethodOnType:      nil,
						IsPointerReceiver: false,
						InstanceName:      "",

						Arguments: nil,
						ReturnValues: []*NameNode{
							&NameNode{
								Type: &SingleTypeNode{
									TypeName: "int32",
								},
							},
						},
						Body: nil,
					},
				},
			},
		},
	}

	assert.Equal(t, expected, Parse(input, &option.Options{Debug: false}))
}

func TestCondition(t *testing.T) {
	input := []lexer.Item{
		{Type: lexer.IDENTIFIER, Val: "a", Line: 1},
		{Type: lexer.OPERATOR, Val: ">", Line: 1},
		{Type: lexer.IDENTIFIER, Val: "b", Line: 1},
		{Type: lexer.OPERATOR, Val: "&&", Line: 1},
		{Type: lexer.IDENTIFIER, Val: "b", Line: 1},
		{Type: lexer.OPERATOR, Val: ">", Line: 1},
		{Type: lexer.IDENTIFIER, Val: "c", Line: 1},
		{Type: lexer.EOL},
		{Type: lexer.EOF},
	}

	/*
		a > b && b > c
	*/

	expected := &FileNode{
		Instructions: []Node{
			&OperatorNode{
				Operator: "&&",
				Left: &OperatorNode{
					Operator: ">",
					Left: &NameNode{Name: "a"},
					Right: &NameNode{Name: "b"},
				},
				Right: &OperatorNode{
					Operator: ">",
					Left: &NameNode{Name: "b"},
					Right: &NameNode{Name: "c"},
				},
			},
		},
	}

	/*
		a + d > 2 && b == false || c < 3
	*/

	input = []lexer.Item{
		{Type: lexer.IDENTIFIER, Val: "a", Line: 1},
		{Type: lexer.OPERATOR, Val: "+", Line: 1},
		{Type: lexer.IDENTIFIER, Val: "d", Line: 1},
		{Type: lexer.OPERATOR, Val: ">", Line: 1},
		{Type: lexer.NUMBER, Val: "2", Line: 1},
		{Type: lexer.OPERATOR, Val: "&&", L


        .get("/accounts/0xa550c18/events/0x1::NotFound::Configuration/events")
        .await;
    context.check_golden_output(resp);
}

#[tokio::test]
async fn test_get_events_by_invalid_account_event_handle_struct_name() {
    let mut context = new_test_context(current_function_name!());
    let resp = context
        .expect_status_code(404)
        .get("/accounts/0xa550c18/events/0x1::Reconfiguration::NotFound/events")
        .await;
    context.check_golden_output(resp);
}

#[tokio::test]
async fn test_get_events_by_invalid_account_event_handle_field_name() {
    let mut context = new_test_context(current_function_name!());
    let resp = context
        .expect_status_code(404)
        .get("/accounts/0xa550c18/events/0x1::Reconfiguration::Configuration/not_found")
        .await;
    context.check_golden_output(resp);
}

#[tokio::test]
async fn test_get_events_by_invalid_account_event_handle_field_type() {
    let mut context = new_test_context(current_function_name!());

    let resp = context
        .expect_status_code(400)
        .get("/accounts/0xa550c18/events/0x1::Reconfiguration::Configuration/epoch")
        .await;
    context.check_golden_output(resp);
}

// until we have generics in the genesis
#[ignore]
#[tokio::test]
async fn test_get_events_by_struct_type_has_generic_type_parameter() {
    let mut context = new_test_context(current_function_name!());

    // This test is for making sure we can look up right struct with generic
    // type specified in the URL path.
    // Instead of creating the example, we just look up an event handle that does not exist.
    let path = format!(
        "/accounts/0x1/events/{}/coin",
        utf8_percent_encode(
            "0x1::Coin::CoinStore<0x1::TestCoin::TestCoin>",
            NON_ALPHANUMERIC
        )
    );
    let resp = context.expect_status_code(404).get(path.as_str()).await;
    context.check_golden_output(resp);
}
use crate::result::MwsResult;
use crate::xmlhelper::decode::{FromXmlStream, XmlEventStream};
use chrono::{DateTime, Utc};

pub mod any_offer_changed;
use self::any_offer_changed::AnyOfferChangedNotification;

#[allow(non_snake_case)]
#[derive(Debug, Default, PartialEq, Serialize, FromXmlStream)]
pub struct NotificationMetaData {
  pub NotificationType: String,
  pub PayloadVersion: String,
  pub UniqueId: String,
  pub PublishTime: Option<DateTime<Utc>>,
  pub SellerId: String,
  pub MarketplaceId: String,
}

#[derive(Debug, Serialize, PartialEq)]
pub enum NotificationPayload {
  AnyOfferChanged(AnyOfferChangedNotification),
  Unknown,
}

impl Default for NotificationPayload {
  fn default() -> Self {
    NotificationPayload::Unknown
  }
}

impl<S> FromXmlStream<S> for NotificationPayload
where
  S: XmlEventStream,
{
  fn from_xml(s: &mut S) -> MwsResult<Self> {
    use crate::xmlhelper::decode::{element, AnyElementName};
    element(s, AnyElementName, |s| match s.local_name() {
      "AnyOfferChangedNotification" => Ok(NotificationPayload::AnyOfferChanged(
        AnyOfferChangedNotification::from_xml(s)?,
      )),
      _ => Ok(NotificationPayload::Unknown),
    })
  }
}

#[allow(non_snake_case)]
#[derive(Debug, Default, PartialEq, Serialize, FromXmlStream)]
pub struct Notification {
  pub NotificationPayload: NotificationPayload,
  pub NotificationMetaData: NotificationMetaData,
}

#[cfg(test)]
mod tests {
  use super::any_offer_changed::*;
  use super::*;
  use crate::xmlhelper::decode::parse_xml_string;
  use chrono::{TimeZone, Utc};

  #[t


instid1(VALU_DEP_2)
	v_add_co_u32 v30, vcc_lo, s0, v18
	v_add_co_ci_u32_e32 v31, vcc_lo, s1, v19, vcc_lo
	s_waitcnt vmcnt(0)
	v_dual_fmac_f32 v26, s6, v22 :: v_dual_fmac_f32 v27, s6, v23
	v_dual_fmac_f32 v28, s6, v24 :: v_dual_fmac_f32 v29, s6, v25
	v_dual_mul_f32 v24, s5, v15 :: v_dual_mul_f32 v25, s5, v14
	v_dual_mul_f32 v22, s5, v17 :: v_dual_mul_f32 v23, s5, v16
	global_store_b128 v[34:35], v[26:29], off
	global_load_b128 v[18:21], v[30:31], off
	v_add_nc_u32_e32 v26, v0, v76
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_ashrrev_i32_e32 v27, 31, v26
	v_lshlrev_b64 v[14:15], 2, v[26:27]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_co_u32 v26, vcc_lo, s0, v14
	v_add_co_ci_u32_e32 v27, vcc_lo, s1, v15, vcc_lo
	s_waitcnt vmcnt(0)
	v_dual_fmac_f32 v22, s6, v18 :: v_dual_fmac_f32 v23, s6, v19
	v_dual_fmac_f32 v24, s6, v20 :: v_dual_fmac_f32 v25, s6, v21
	v_dual_mul_f32 v20, s5, v11 :: v_dual_mul_f32 v21, s5, v10
	v_dual_mul_f32 v18, s5, v13 :: v_dual_mul_f32 v19, s5, v12
	global_store_b128 v[30:31], v[22:25], off
	global_load_b128 v[14:17], v[26:27], off
	v_add_nc_u32_e32 v22, v0, v72
	v_add_nc_u32_e32 v0, v0, v68
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_ashrrev_i32_e32 v23, 31, v22
	v_ashrrev_i32_e32 v1, 31, v0
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_lshlrev_b64 v[10:11], 2, v[22:23]
	v_lshlrev_b64 v[0:1], 2, v[0:1]
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_add_co_u32 v22, vcc_lo, s0, v10
	v_add_co_ci_u32_e32 v23, vcc_lo, s1, v11, vcc_lo
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_4)
	v_add_co_u32 v0, vcc_lo


 x.visit_expr_mut(|x| f(VisitMut::Expr(x))));
                ret_type.iter_mut().for_each(|x| f(VisitMut::Expr(x)));
                f(VisitMut::Stmt(body));
            }
            StmtP::For(lhs, box (over, body)) => {
                lhs.visit_expr_mut(|x| f(VisitMut::Expr(x)));
                f(VisitMut::Expr(over));
                f(VisitMut::Stmt(body));
            }
            // Nothing else contains nested statements
            StmtP::Break => {}
            StmtP::Continue => {}
            StmtP::Pass => {}
            StmtP::Return(ret) => {
                ret.iter_mut().for_each(|x| f(VisitMut::Expr(x)));
            }
            StmtP::Expression(e) => f(VisitMut::Expr(e)),
            StmtP::Assign(lhs, rhs) => {
                lhs.visit_expr_mut(|x| f(VisitMut::Expr(x)));
                f(VisitMut::Expr(rhs));
            }
            StmtP::AssignModify(lhs, _, rhs) => {
                lhs.visit_expr_mut(|x| f(VisitMut::Expr(x)));
                f(VisitMut::Expr(rhs));
            }
            StmtP::Load(..) => {}
        }
    }

    pub fn visit_stmt<'a>(&'a self, mut f: impl FnMut(&'a AstStmtP<P>)) {
        self.visit_children(|x| match x {
            Visit::Stmt(x) => f(x),
            Visit::Expr(_) => {} // Nothing to do
        })
    }

    pub fn visit_stmt_mut<'a>(&'a mut self, mut f: impl FnMut(&'a mut AstStmtP<P>)) {
        self.visit_children_mut(|x| match x {
            VisitMut::Stmt(x) => f(x),
            VisitMut::Expr(_) => {} // Nothing to do
        })
    }

    pub fn visit_expr<'a>(&'a self, mut f: impl FnMut(&'a AstExprP<P>)) {
        // Note the &mut impl on f, it's subtle, see
        // https://stackoverflow.com/questions/54613966/error-reached-the-recursion-limit-while-instantiating-funcclosure
        fn pick<'a, P: AstPayload>(x: Visit<'a, P>, f: &mut impl FnMut(&'a AstExprP<P>)) {
            match x {
                Visit::Stmt(x) => x.visit_children(|x| pick(x, f)),
                Visit::Expr(x) => f(x),
            }
        }
        self.visit_children(|x| pick(x, &mut f))
    }

    pub fn visit_expr_mut<'a>(&'a mut self, mut f: impl FnMut(&'a mut AstExprP<P>)) {
        fn pick<'a, P: AstPayload>(x: VisitMut<'a, P>, f: &mut impl FnMut(&'a mut AstExprP<P>)) {
            match x {
                VisitMut::Stmt(x) => x.visit_children_mut(|x| pick(x, f)),
                VisitMut::Expr(x) => f(x),
            }
        }
        self.visit_children_mut(|x| pick(x, &mut f))
    }

    pub fn visit_stmt_result<E>(
        &self,
        mut f: impl FnMut(&AstStmtP<P>) -> Result<(), E>,
    ) -> Result<(), E> {
        let mut result = Ok(());
        let f2 = |x: &AstStmtP<P>| {
            if result.is_ok() {
                result = f(x);
            }
        };
        self.visit_stmt(f2);
        result
    }
}

impl<P: AstPayload> P


h,  v16.4s

        trn1            v16.2s,  v16.2s,  v24.2s
        mov             v17.8b,  v24.8b

2:
        bl              L(\type\()_8tap_filter_2)

        ext             v18.8b,  v17.8b,  v24.8b,  #4
        smull           v2.4s,   v16.4h,  v1.h[0]
        smlal           v2.4s,   v17.4h,  v1.h[1]
        smlal           v2.4s,   v18.4h,  v1.h[2]
        smlal           v2.4s,   v24.4h,  v1.h[3]

        srshl           v2.4s,   v2.4s,   v29.4s // -(6+intermediate_bits)
        sqxtun          v2.4h,   v2.4s
        umin            v2.4h,   v2.4h,   v31.4h
        subs            \h,  \h,  #2
        st1             {v2.s}[0], [\dst], \d_strd
        st1             {v2.s}[1], [\ds2], \d_strd
        b.le            0f
        mov             v16.8b,  v18.8b
        mov             v17.8b,  v24.8b
        b               2b

280:    // 2x8, 2x16, 2x32 hv
        ld1             {v1.8b},  [\xmy]
        sub             \src, \src, #2
        sub             \sr2, \src, \s_strd, lsl #1
        sub             \src, \sr2, \s_strd
        add             \ds2, \dst, \d_strd
        lsl             \s_strd, \s_strd, #1
        lsl             \d_strd, \d_strd, #1
        sxtl            v0.8h,   v0.8b
        sxtl            v1.8h,   v1.8b
        mov             x15, x30

        ld1             {v27.8h}, [\src], \s_strd
        ext             v28.16b, v27.16b, v27.16b, #2
        smull           v27.4s,  v27.4h,  v0.4h
        smull           v28.4s,  v28.4h,  v0.4h
        addp            v27.4s,  v27.4s,  v28.4s
        addp            v16.4s,  v27.4s,  v27.4s
        srshl           v16.2s,  v16.2s,  v30.2s // -(6-intermediate_bits)
        // The intermediates from the horizontal pass fit in 16 bit without
        // any bias; we could just as well keep them as .4s, but narrowing
        // them to .4h gives a significant speedup on out of order cores
        // (at the cost of a smaller slowdown on in-order cores such as A53).

        bl              L(\type\()_8tap_filter_2)
        xtn             v16.4h,  v16.4s
        trn1            v16.2s,  v16.2s,  v24.2s
        mov             v17.8b,  v24.8b
        bl              L(\type\()_8tap_filter_2)
        ext             v18.8b,  v17.8b,  v24.8b,  #4
        mov             v19.8b,  v24.8b
        bl


using System.Linq.Expressions;

namespace FastEndpoints;

/// <summary>
/// a dto representing search parameters for pending job storage record retrieval
/// </summary>
/// <typeparam name="TStorageRecord">the type of storage record</typeparam>
public struct PendingJobSearchParams<TStorageRecord> where TStorageRecord : IJobStorageRecord
{
    /// <summary>
    /// the ID of the job queue for fetching the next batch of records for.
    /// </summary>
    public string QueueID { get; internal set; }

    /// <summary>
    /// a boolean lambda expression to match the next batch of reco


bn_sub_words,(.-bn_sub_words)

/*
 * Code below depends on the fact that upper parts of the %l0-%l7
 * and %i0-%i7 are zeroed by kernel after context switch. In
 * previous versions this comment stated that "the trouble is that
 * it's not feasible to implement the mumbo-jumbo in less V9
 * instructions:-(" which apparently isn't true thanks to
 * 'bcs,a %xcc,.+8; inc %rd' pair. But the performance improvement
 * results not from the shorter code, but from elimination of
 * multicycle none-pairable 'rd %y,%rd' instructions.
 *
 *							Andy.
 */

#define FRAME_SIZE	-96

/*
 * Here is register usage map for *all* routines below.
 */
#define t_1	%o0
#define	t_2	%o1
#define c_12	%o2
#define c_3	%o3

#define ap(I)	[%i1+4*I]
#define bp(I)	[%i2+4*I]
#define rp(I)	[%i0+4*I]

#define	a_0	%l0
#define	a_1	%l1
#define	a_2	%l2
#define	a_3	%l3
#define	a_4	%l4
#define	a_5	%l5
#define	a_6	%l6
#define	a_7	%l7

#define	b_0	%i3
#define	b_1	%i4
#define	b_2	%i5
#define	b_3	%o4
#define	b_4	%o5
#define	b_5	%o7
#define	b_6	%g1
#define	b_7	%g4

.align	32
.global bn_mul_comba8
/*
 * void bn_mul_comba8(r,a,b)
 * BN_ULONG *r,*a,*b;
 */
bn_mul_comba8:
	save	%sp,FRAME_SIZE,%sp
	mov	1,t_2
	lduw	ap(0),a_0
	sllx	t_2,32,t_2
	lduw	bp(0),b_0	!=
	lduw	bp(1),b_1
	mulx	a_0,b_0,t_1	!mul_add_c(a[0],b[0],c1,c2,c3);
	srlx	t_1,32,c_12
	stuw	t_1,rp(0)	!=!r[0]=c1;

	lduw	ap(1),a_1
	mulx	a_0,b_1,t_1	!mul_add_c(a[0],b[1],c2,c3,c1);
	addcc	c_12,t_1,c_12
	clr	c_3		!=
	bcs,a	%xcc,.+8
	add	c_3,t_2,c_3
	lduw	ap(2),a_2
	mulx	a_1,b_0,t_1	!=!mul_add_c(a[1],b[0],c2,c3,c1);
	addcc	c_12,t_1,t_1
	bcs,a	%xcc,.+8
	add	c_3,t_2,c_3
	srlx	t_1,32,c_12	!=
	stuw	t_


F              (1 << 5)  /* Bit 5:  XOSCDLF interrupt */
#define PRCM_OSCINT_LFSRCDONE            (1 << 6)  /* Bit 6:  LFSRCDONE interrupt */
#define PRCM_OSCINT_HFSRCPEND            (1 << 7)  /* Bit 7:  HFSRCPEND interrupt  */

/****************************************************************************
 * Public Types
 ****************************************************************************/

/****************************************************************************
 * Public Data
 ****************************************************************************/

/****************************************************************************
 * Public Function Prototypes
 ****************************************************************************/

#endif /* __ARCH_ARM_SRC_TIVA_HARDWARE_CC13X2_CC26X2_CC13X2_CC26X2_PRCM_H */


// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

using System;
using Microsoft.VisualStudio.Services.Common;
using Microsoft.VisualStudio.Services.WebApi;

namespace Microsoft.MSBuildCache.AzurePipelines;

internal static class AzDOHelpers
{
    private static readonly string? AccessToken = Environment.GetEnvironmentVariable("SYSTEM_ACCESSTOKEN");

    private static readonly string? CollectionUri = Environment.GetEnvironmentVariable("SYSTEM_TEAMFOUNDATIONCOLLECTIONURI");

    public static Guid SessionGuid => VssClientHttpRequestSettings.Default.SessionId;

    public static VssBasicCredential GetCredentials()
    {
        EnsureAzureDevopsEnvironment();
        if (AccessToken == null)
        {
            throw new InvalidOperationException("Access token is not available. See: https://learn.microsoft.com/en-us/azure/devops/pipelines/build


t of conditions and the following disclaimer in the
       documentation and/or other materials provided with the distribution.
    3. The name of the author may not be used to endorse or promote products
       derived from this software without specific prior written permission.

    THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
    OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
    WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
    ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
    DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
    DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
    OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
    HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
    LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
    OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
    SUCH DAMAGE.
*/

/*
 * imap.cpp - This file contains code for doing image map type things.
 */

#include "machine.h"
#include "types.h"
#include "imap.h"
#include "util.h"
#include "imageio.h"

rawimage * imagelist[MAXIMGS];
int numimages;

void ResetImages(void) {
  int i;
  numimages=0;
  for (i=0; i<MAXIMGS; i++) {
    imagelist[i]=NULL;
  }
}

void LoadImage(rawimage * image) {
  if (!image->loaded) {
    readimage(image);
    image->loaded=1;
  }
}

color ImageMap(rawimage * image, flt u, flt v) {
  color col, colx, colx2;
  flt x,y, px, py;
  int x1, x2, y1, y2;
  unsigned char * ptr;
  unsigned char * ptr2;

  if (!image->loaded) {
    LoadImage(image);
    image->loaded=1;
  }

  if ((u <= 1.0) && (u >=0.0) && (v <= 1.0) && (v >= 0.0)) {
    x=(image->xres - 1.0) * u; /* floating point X location */
    y=(image->yres - 1.0) * v; /* floating point Y location */

    px = x - ((int) x);
    py = y - ((int) y);

    x1 = (int) x;
    x2 = x1 + 1;

    y1 = (int) y;
    y2 = y1 + 1;

    ptr  = image->data + ((image->xres * y1) + x1) * 3;
    ptr2 = image->data + ((image->xres * y1) + x2) * 3;

    colx.r = (flt) ((flt)ptr[0] + px*((flt)ptr2[0] - (flt) ptr[0])) / 255.0;
    colx.g = (flt) ((flt)ptr[1] + px*((flt)ptr2[1] - (flt) ptr[1])) / 255.0;
    colx.b = (flt) ((flt)ptr[2] + px*((flt)ptr2[2] - (flt) ptr[2])) / 255.0;

    ptr  = image->data + ((image->xres * y2) + x1) * 3;
    ptr2 = image->data + ((image->xres * y2) + x2) * 3;

    colx2.r = ((flt)ptr[0] + px*((flt)ptr2[0] - (flt)ptr[0])) / 255.0;
    colx2.g = ((flt)ptr[1] + px*((flt)ptr2[1] - (flt)ptr[1])) / 255.0;
    colx2.b = ((flt)ptr[2] + px*((flt)ptr2[2] - (flt)ptr[2])) / 255.0;

    col.r = colx.r + py*(colx2.r - colx.r);
    col.g = colx.g + py*(colx2.g - colx.g);
    col.b = colx.b + py*(colx2.b - colx.b);

  }
  else {
    col.r=0.0;
    col.g=0.0;
    col.b=0.0;
  }
  return col;
}

rawimage


)
{
	va_list ap;

	if (p != NULL) {
		place_printfrom(p);
		fprintf(stderr, "%s:%u:%u: ", place_getname(p),
			p->line, p->column);
	} else {
		fprintf(stderr, "%s: ", myprogname);
	}
	va_start(ap, fmt);
	vfprintf(stderr, fmt, ap);
	va_end(ap);
	fprintf(stderr, "\n");
}

void
complain_fail(void)
{
	overall_failure = true;
}

bool
complain_failed(void)
{
	return overall_failure;
}

////////////////////////////////////////////////////////////
// module init and cleanup

void
place_init(void)
{
	placefilearray_init(&placefiles);
}

void
place_cleanup(void)
{
	placefilearray_destroyall(&placefiles);
	placefilearray_cleanup(&placefiles);
}


th
        val npc = Blacksmith()
        do {
            npc.pos = level.pointToCell(rect.random(1))
        } while (level.heaps.get(npc.pos) != null)
        level.mobs.add(npc)

        // traps
        for (p in rect.getAllPoints()) {
            val cell = level.pointToCell(p)
            if (level.map[cell] == Terrain.TRAP)
                level.setTrap(FireTrap().reveal(), cell)
        }

        return DigResult(rect, Wall.ArroundBut(rect, wall.direction.opposite), DigResult.Type.Special)
    }
}
package com.egoal.darkestpixeldungeon.levels.diggers.specials

import com.egoal.darkestpixeldungeon.Dungeon

import com.egoal.darkestpixeldungeon.items.Generator
import com.egoal.darkestpixeldungeon.items.keys.IronKey
import com.egoal.darkestpixeldungeon.items.scrolls.Scroll
import com.egoal.darkestpixeldungeon.levels.Level
import com.egoal.darkestpixeldungeon.levels.Terrain
import com.egoal.darkestpixeldungeon.levels.diggers.DigResult
import com.egoal.darkestpixeldungeon.levels.diggers.Direction
import com.egoal.darkestpixeldungeon.levels.diggers.Rect
import com.egoal.darkestpixeldungeon.levels.diggers.Wall
import com.egoal.darkestpixeldungeon.levels.diggers.normal.RectDigger
import com.watabou.utils.Point
import com.watabou.utils.Random

/**
 * Created by 93942 on 2018/12/5.
 */

class LibraryDigger : RectDigger() {
    override fun chooseRoomSize(wall: Wall) = Point(Random.IntRange(4, 6), Random.IntRange(4, 6))

    override fun dig(level: Level, wall: Wall, rect: Rect): DigResult {
        Fill(level, rect, Terrain.EMPTY)

        // lock the door
        val door = overlappedWall(wall, rect).random(0)
        Set(level, door, Terrain.LOCKED_DOOR)
        level.addItemToSpawn(IronKey(Dungeon.depth))

        // book shelf
        val sa: Point
        val sb: Point
        when (wall.direction) {
            Direction.Left -> {
                LinkVertical(level, rect.x1, rect.y1, rect.y2, Terrain.BOOKSHELF)
                sa = Point(door.x - 1, door.y - 1)
                sb = Point(door.x - 1, door.y + 1)
            }
            Direction.Right -> {
                LinkVertical(level, rect.x2, rect.y1, rect.y2, Terrain.BOOKSHELF)
                sa = Point(door.x + 1, door.y - 1)
                sb = Point(door.x + 1, door.y + 1)
            }
            Direction.Up -> {
                LinkHorizontal(level, rect.y1, rect.x1, rect.x2, Terrain.BOOKSHELF)
                sa = Point(door.x - 1, door.y - 1)
                sb = Point(door.x + 1, door.y - 1)
            }
            Direction.Down -> {
                LinkHorizontal(level, rect.y2, rect.x1, rect.x2, Terrain.BOOKSHELF)
                sa = Point(door.x - 1, door.y + 1)
                sb = Point(door.x + 1, door.y + 1)
            }
        }

        // statuary
        if (level.map[level.pointToCell(sa)] == Terrain.EMPTY)
            Set(level, sa, Terrain.STATUE)
        if (level.map[level.pointToCell(sb)] == Terrain.EMPTY)
            Set(level, sb, Terrain.STATUE)

        // items
        val n = Random.IntRange(2, 3)
        for (i in 1..n) {
            var pos: Int
            do {
                pos = level.pointTo


oid.graphics.PixelFormat;
import android.os.Bundle;
import android.util.Log;
import android.view.Surface;
import android.view.SurfaceHolder;
import android.view.SurfaceView;
import android.view.View;
import android.view.WindowManager;
import android.widget.AdapterView;
import android.widget.Button;
import android.widget.Spinner;

import android.support.v4.app.ActivityCompat;
import android.support.v4.content.ContextCompat;

public class MainActivity extends Activity implements SurfaceHolder.Callback
{
    public static final int REQUEST_CAMERA = 100;

    private NcnnYoloFace ncnnyoloface = new NcnnYoloFace();
    private int facing = 0;

    private Spinner spinnerModel;
    private Spinner spinnerCPUGPU;
    private int current_model = 0;
    private int current_cpugpu = 0;

    private SurfaceView cameraView;

    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState)
    {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);

        getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);

        cameraView = (SurfaceView) findViewById(R.id.cameraview);

        cameraView.getHolder().setFormat(PixelFormat.RGBA_8888);
        cameraView.getHolder().addCallback(this);

        Button buttonSwitchCamera = (Button) findViewById(R.id.buttonSwitchCamera);
        buttonSwitchCamera.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View arg0) {

                int new_facing = 1 - facing;

                ncnnyoloface.closeCamera();

                ncnnyoloface.openCamera(new_facing);

                facing = new_facing;
            }
        });

        spinnerModel = (Spinner) findViewById(R.id.spinnerModel);
        spinnerModel.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
            @Override
            public void onItemSelected(AdapterView<?> arg0, View arg1, int position, long id)
            {
                if (position != current_model)
                {
                    current_model = position;
                    reload();
                }
            }

            @Override
            public void onNothingSelected(AdapterView<?> arg0)
            {
            }
        });

        spinnerCPUGPU = (Spinner) findViewById(R.id.spinnerCPUGPU);
        spinnerCPUGPU.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
            @Override
            public void onItemSelected(AdapterView<?> arg0, View arg1, int position, long id)
            {
                if (position != current_cpugpu)
                {
                    current_cpugpu = position;
                    reload();
                }
            }

            @Override
            public void onNothingSelected(AdapterView<?> arg0)
            {
            }
        });

        reload();
    }

    private void reload()
    {
        boolean ret_init = ncnnyoloface.loadModel(getAssets(), current_model, current_cpugpu);
        if (!ret_init)
        {
            Log.e("MainActivity", "ncnnyoloface loadModel failed");
        }
    }

    @Override
    public void surfaceChanged(SurfaceHolder holder, int format, int width, int height)
    {
        ncnnyoloface.setOutputWindow(holder.getSurface());
    }

    @Override
    public void surfaceCreated(SurfaceHolder holder)
    {


"outfit" }, message) then
		if player:getStorageValue(Storage.Quest.U7_8.DruidOutfits.DruidHatAddon) == 9 then
			npcHandler:say("I can see in your eyes that you are a honest and friendly person, |PLAYERNAME|. You were patient enough to learn our language and I will grant you a special gift. Will you accept it?", npc, creature)
			npcHandler:setTopic(playerId, 1)
		end
	elseif MsgContains(message, "yes") and npcHandler:getTopic(playerId) == 1 then
		player:setStorageValue(Storage.Quest.U7_8.DruidOutfits.DruidHatAddon, 10)
		player:addOutfitAddon(148, 2)
		player:addOutfitAddon(144, 2)
		player:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE)
		npcHandler:say(player:getSex() == PLAYERSEX_FEMALE and "From now on, you shall be known as |PLAYERNAME|, the wolf girl. You shall be fast and smart as Morgrar, the great white wolf. He shall guide your path." or "From now on, you shall be known as |PLAYERNAME|, the bear warrior. You shall be strong and proud as Angros, the great dark bear. He shall guide your path.", npc, creature)
		npcHandler:setTopic(playerId, 0)
	end
	return true
end

npcHandler:setCallback(CALLBACK_GREET, greetCallback)
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:setMessage(MESSAGE_GREET, "Interesting. A human who can speak the language of wolves.")
npcHandler:setMessage(MESSAGE_FAREWELL, "YOOOOUHHOOOUU!")
npcHandler:setMessage(MESSAGE_WALKAWAY, "YOOOOUHHOOOUU!")
npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true)

-- npcType registering the npcConfig table
npcType:register(npcConfig)


interop.CPointer
import kotlinx.cinterop.DoubleVar
import kotlinx.cinterop.IntVar
import kotlinx.cinterop.alloc
import kotlinx.cinterop.cstr
import kotlinx.cinterop.invoke
import kotlinx.cinterop.pointed
import kotlinx.cinterop.ptr
import kotlinx.cinterop.readValue
import kotlinx.cinterop.reinterpret
import kotlinx.cinterop.value

open class Crypto(
  @Suppress("UNUSED_PARAMETER")
  __ignore: String?
) : Reference(null) {
  constructor() : this(null) {
    if (Godot.shouldInitHandle()) {
      _handle = __new()
    }
  }

  fun generateRandomBytes(size: Int): PoolByteArray {
    val self = this
    return Allocator.allocationScope {
      val _ret = PoolByteArray()
      val _retPtr = _ret._value.ptr
      __method_bind.generateRandomBytes.call(self._handle, listOf(size), _retPtr)
      _ret._value = _retPtr.pointed.readValue()
      _ret
    }
  }

  fun generateRsa(size: Int): CryptoKey {
    val self = this
    return Allocator.allocationScope {
      lateinit var _ret: CryptoKey
      val _tmp = alloc<COpaquePointerVar>()
      val _retPtr = _tmp.ptr
      __method_bind.generateRsa.call(self._handle, listOf(size), _retPtr)
      _ret = objectToType<CryptoKey>(_tmp.value!!)
      _ret
    }
  }

  fun generateSelfSignedCertificate(
    key: CryptoKey,
    issuerName: String = "CN=myserver,O=myorganisation,C=IT",
    notBefore: String = "20140101000000",
    notAfter: String = "20340101000000"
  ): X509Certificate {
    val self = this
    return Allocator.allocationScope {
      lateinit var _ret: X509Certificate
      val _tmp = alloc<COpaquePointerVar>()
      val _retPtr = _tmp.ptr
      val _args = mutableListOf<Any?>()
      _args.add(key)
      _args.add(issuerName)
      _args.add(notBefore)
      _args.add(notAfter)
      __method_bind.generateSelfSignedCertificate.call(self._handle, _args, _retPtr)
      _ret = objectToType<X509Certificate>(_tmp.value!!)
      _ret
    }
  }

  companion object {
    internal fun __new(): COpaquePointer = Allocator.allocationScope {
      val fnPtr = checkNotNull(Godot.gdnative.godot_get_class_constructor)("Crypto".cstr.ptr)
      requireNotNull(fnPtr) { "No instance found for Crypto" }
      val fn = fnPtr.reinterpret<CFunction<() -> COpaquePointer>>()
      fn()
    }
    /**
     * Container for method_bind pointers for Crypto
     */
    private object __method_bind {
      val generateRandomBytes: CPointer<godot_method_bind>
        get() = Allocator.allocationScope {
          val ptr = checkNotNull(Godot.gdnative.godot_method_bind_get_method)("Crypto".cstr.ptr,
            "generate_random_bytes".cstr.ptr)
          requireNotNull(ptr) { "No method_bind found for method generate_random_bytes" }
        }
      val generateRsa: CPointer<godot_method_bind>
        get() = Allocator.allocationScope {
          val ptr = checkNotNull(Godot.gdnative.godot_method_bind_get_method)("Crypto".cstr.ptr,
            "generate_rsa".cstr.ptr)
          requireNotNull(ptr) { "No method_bind found for method generate_rsa" }


# 15. Escreva um programa para receber duas notas, uma para a prova 1 e a outra para a prova 2. Então verifique se o estudante foi aprovado ou reprovado em cada uma delas.

from functions import ask_for_grade

grade1 = ask_for_grade("Insira a nota da primeira prova: ")
grade2 = ask_for_grade("Insira a nota da segunda prova: ")
min_grade = ask_for_grade("Insira a nota de média da escola: ")

if grade1 >= min_grade:
    print("O estudante foi aprovado na prova 1")
else:
    print("O estudante foi reprovado na prova 1")

if grade2 >= min_grade:
    print("O estudante foi aprovado na prova 2")
else:
    print("O estudante foi reprovado na prova 2")


"),
--   r = {
--     fn.openApp("Spotify"),
--     { ["shift"] = fn.openRaycastExtension("mattisssa/spotify-player/yourLibrary") },
--   },
--   t = {
--     fn.openApp("TablePlus"),
--     -- { ["shift"] = fn.openRaycastExtension("ChrisChinchilla/trello/searchBoards") }
--   },
--   u = {
--     fn.openApp("Things3"),
--     { ["shift"] = fn.sendKeys(old_hyper, "u") },
--   },
--   w = { -- Notion ("w" for "wiki")
--     fn.openTab("notion.so"),
--     { ["shift"] = fn.openRaycastExtension("notion/notion/search-page") }
--   },
--   z = fn.openApp("zoom.us")
-- })

-- local windowModalTimer = nil
-- local function resetTimer()
--   if type(windowModalTimer) == 'table' then windowModalTimer:stop() end
--   windowModalTimer = hs.timer.doAfter(5, function() windowModal:exit() end)
--   print("5 more seconds on the clock")
-- end

-- local function bind(key, action)
--   windowModal:bind({}, key, nil, function()
--     action()
--     resetTimer()
--   end)
-- end

-- bind("0", function() windowModal:exit() end)
-- bind("escape", function() windowModal:exit() end)

-- bind("tab", fn.windowCommand("next-display"))

-- bind("a", fn.windowCommand("almost-maximize"))

-- bind("q", fn.windowCommand("first-two-thirds"))
-- bind("p", fn.windowCommand("last-third"))

-- bind("h", fn.windowCommand("maximize-height"))
-- bind("w", fn.windowCommand("maximize-width"))

-- bind("f", fn.windowCommand("maximize"))
-- bind("m", fn.windowCommand("center-three-fourths"))

-- bind("h", fn.windowCommand("move-left"))
-- bind("k", fn.windowCommand("move-up"))
-- bind("j", fn.windowCommand("move-down"))
-- bind("l", fn.windowCommand("move-right"))

-- bind("r", fn.windowCommand("restore"))

-- bind("-", fn.windowCommand("make-smaller"))
-- bind("=", fn.windowCommand("make-larger"))

-- local menuItem = hs.menubar.new(true, 'window')
-- menuItem:setTitle("Window")

-- function windowModal:entered()
--   hyper.exit()
--   menuItem:setTitle("WINDOW")
-- end

-- function windowModal:exited()
--   menuItem:setTitle("Window")
-- end

-- -- TODO things, 1password, etc even when the app is closed
-- -- https://evantravers.com/articles/2020/06/08/hammerspoon-a-better-better-hyper-key/#even-when-the-app-is-closed


RELEASE: GstNavigationEventType = 2;
pub const GST_NAVIGATION_EVENT_MOUSE_BUTTON_PRESS: GstNavigationEventType = 3;
pub const GST_NAVIGATION_EVENT_MOUSE_BUTTON_RELEASE: GstNavigationEventType = 4;
pub const GST_NAVIGATION_EVENT_MOUSE_MOVE: GstNavigationEventType = 5;
pub const GST_NAVIGATION_EVENT_COMMAND: GstNavigationEventType = 6;

pub type GstNavigationMessageType = c_int;
pub const GST_NAVIGATION_MESSAGE_INVALID: GstNavigationMessageType = 0;
pub const GST_NAVIGATION_MESSAGE_MOUSE_OVER: GstNavigationMessageType = 1;
pub const GST_NAVIGATION_MESSAGE_COMMANDS_CHANGED: GstNavigationMessageType = 2;
pub const GST_NAVIGATION_MESSAGE_ANGLES_CHANGED: GstNavigationMessageType = 3;
pub const GST_NAVIGATION_MESSAGE_EVENT: GstNavigationMessageType = 4;

pub type GstNavigationQueryType = c_int;
pub const GST_NAVIGATION_QUERY_INVALID: GstNavigationQueryType = 0;
pub const GST_NAVIGATION_QUERY_COMMANDS: GstNavigationQueryType = 1;
pub const GST_NAVIGATION_QUERY_ANGLES: GstNavigationQueryType = 2;

pub type GstVideoAlphaMode = c_int;
pub const GST_VIDEO_ALPHA_MODE_COPY: GstVideoAlphaMode = 0;
pub const GST_VIDEO_ALPHA_MODE_SET: GstVideoAlphaMode = 1;
pub const GST_VIDEO_ALPHA_MODE_MULT: GstVideoAlphaMode = 2;

pub type GstVideoChromaMethod = c_int;
pub const GST_VIDEO_CHROMA_METHOD_NEAREST: GstVideoChromaMethod = 0;
pub const GST_VIDEO_CHROMA_METHOD_LINEAR: GstVideoChromaMethod = 1;

pub type GstVideoChromaMode = c_int;
pub const GST_VIDEO_CHROMA_MODE_FULL: GstVideoChromaMode = 0;
pub const GST_VIDEO_CHROMA_MODE_UPSAMPLE_ONLY: GstVideoChromaMode = 1;
pub const GST_VIDEO_CHROMA_MODE_DOWNSAMPLE_ONLY: GstVideoChromaMode = 2;
pub const GST_VIDEO_CHROMA_MODE_NONE: GstVideoChromaMode = 3;

pub type GstVideoColorMatrix = c_int;
pub const GST_VIDEO_COLOR_MATRIX_UNKNOWN: GstVideoColorMatrix = 0;
pub const GST_VIDEO_COLOR_MATRIX_RGB: GstVideoColorMatrix = 1;
pub const GST_VIDEO_COLOR_MATRIX_FCC: GstVideoColorMatrix = 2;
pub const GST_VIDEO_COLOR_MATRIX_BT709: GstVideoColorMatrix = 3;
pub const GST_VIDEO_COLOR_MATRIX_BT601: GstVideoColorMatrix = 4;
pub const GST_VIDEO_COLOR_MATRIX_SMPTE240M: GstVideoColorMatrix = 5;
pub const GST_VIDEO_COLOR_MATRIX_BT2020: GstVideoColorMatrix = 6;

pub type GstVideoColorPrimaries = c_int;
pub const GST_VIDEO_COLOR_PRIMARIES_UNKNOWN: GstVideoColorPrimaries = 0;
pub const GST_VIDEO_COLOR_PRIMARIES_BT709: GstVideoColorPrimaries = 1;
pub const GST_VIDEO_COLOR_PRIMARIES_BT470M: GstVideoColorPrimaries = 2;
pub const GST_VIDEO_COLOR_PRIMARIES_BT470BG: GstVideoColorPrimaries = 3;
pub const GST_VIDEO_COLOR_PRIMARIES_SMPTE170M: GstVideoColorPrimaries = 4;
pub const GST_VIDEO_COLOR_PRIMARIES_SMPTE240M: GstVideoColorPrimaries = 5;
pub const GST_VIDEO_COLOR_PRIMARIES_FILM: GstVideo


tShader)
    checkError(glc, "glAttachShader / vertex")

    const fragShader = this.fragShader = compileShader(glc.FRAGMENT_SHADER, fragSource)
    glc.attachShader(prog, fragShader)
    checkError(glc, "glAttachShader / fragment")

    glc.linkProgram(prog)
    if (!glc.getProgramParameter(prog, glc.LINK_STATUS)) {
      const log = glc.getProgramInfoLog(prog)
      glc.deleteShader(vertShader)
      glc.deleteShader(fragShader)
      glc.deleteProgram(prog)
      throw new Error(`Failed to link program: ${log}`)
    }
  }

  /** Returns the uniform location with the specified `name`.
    * @throws Error if no uniform exists with the supplied name. */
  getUniformLocation (name :string) :WebGLUniformLocation {
    const loc = this.glc.getUniformLocation(this.prog, name)
    if (loc) return loc
    throw new Error(`Failed to get ${name} uniform.`)
  }

  /** Returns the attribute location with the specified `name`.
    * @throws Error if no attribute exists with the supplied name. */
  getAttribLocation (name :string) :number {
    const loc = this.glc.getAttribLocation(this.prog, name)
    if (loc >= 0) return loc
    throw new Error(`Failed to get ${name} attribute.`)
  }

  /** Binds this shader program to the GL context it was created with. */
  activate () {
    this.glc.useProgram(this.prog)
  }

  /** Disposes this shader program, freeing its GL context resources. */
  dispose () {
    this.glc.deleteShader(this.vertShader)
    this.glc.deleteShader(this.fragShader)
    this.glc.deleteProgram(this.prog)
  }
}

/** Reprenents a GL render target (i.e. frame buffer). */
export interface RenderTarget extends Disposable {
  /** The size of this render target in pixels. */
  size :dim2
  /** The scale between display units and pixels for this target. */
  scale :vec2
  /** Whether or not to flip the y-axis when rendering to this target. When rendering to textures
    * we do not want to flip the y-axis, when rendering to the screen we do (so that the origin is
    * at the upper left). */
  flip :boolean
  /** Binds this render target. Subsequent drawing commands will be rendered to it. */
  bind () :void
}

//
// Textures and images

/** Config data used when creating textures. */
export type TextureConfig = {
  /** Whether the texture repeat's in the x-direction. */
  repeatX :boolean
  /** Whether the texture repeat's in the y-direction. */
  repeatY :boolean
  /** The GL filter to use when the texture is scaled down: `LINEAR` or `NEAREST`. */
  minFilter :number
  /** The GL filter to use when the texture is scaled up: `LINEAR` or `NEAREST`. */
  magFilter :number
  /** Whether or not to generate mipmaps for this texture. */
  mipmaps :boolean,
  /** The DPI scale to use for this texture. Its display dimensions will be computed as the inverse
    * scale of its pixel dimensions. */
  scale :Scale
}

/** A square region of a texture. Simplifies rendering tiles from texture atlases. */
export interface Tile {
  /** The texture which contains this tile. */
  texture :Texture
  /** The display size of this tile (in display units, not pixels). */
  size :dim2
  /** The `s` texture coordinate. */
  s :vec2
  /** The `t` texture coordinate. */
  t :vec2
}

// used for default ST coords
const zeroOne = vec2.fromValues(0, 1)

/** Wraps up  a GL context, texture, and config. */
export class Texture implements


#define M 800
int s[501][501],t[501][501];
int q[M];
main(x,y,i,j,f,g,_x,_y,px,py,qx,qy,rx,ry){
	scanf("%d%d",&y,&x);
		for(getchar(),j=0;j<y;getchar(),j++)
			for(i=0;i<x;i++)
				s[j][i]=getchar();
		for(i=0;i<x;i++)
			for(j=0;j<y;j++){
				if(s[j][i]=='S')px=i,py=j;
				if(s[j][i]=='C')qx=i,qy=j;
				if(s[j][i]=='G')rx=i,ry=j;
				if(s[j][i]!='#')s[j][i]=0;
			}
		memcpy(t,s,sizeof(t));
		q[0]=(px<<16)|py;s[q[0]&0xffff][q[0]>>16]=1;f=0;g=1;
		for(;f!=g;){
			_x=q[f]>>16,_y=q[f]&0xffff;f=(f+1)%M;
			if(s[_y][_x-1]==0)q[g]=((_x-1)<<16)|(_y),g=(g+1)%M,s[_y][_x-1]=s[_y][_x]+1;
			if(s[_y][_x+1]==0)q[g]=((_x+1)<<16)|(_y),g=(g+1)%M,s[_y][_x+1]=s[_y][_x]+1;
			if(s[_y-1][_x]==0)q[g]=((_x)<<16)|(_y-1),g=(g+1)%M,s[_y-1][_x]=s[_y][_x]+1;
			if(s[_y+1][_x]==0)q[g]=((_x)<<16)|(_y+1),g=(g+1)%M,s[_y+1][_x]=s[_y][_x]+1;
			if(s[qy][qx])break;
		}
		if(f==g)puts("-1"),exit(0);
		q[0]=(qx<<16)|qy;t[q[0]&0xffff][q[0]>>16]=1;f=0;g=1;
		for(;f!=g;){
			_x=q[f]>>16,_y=q[f]&0xffff;f=(f+1)%M;
			if(t[_y][_x-1]==0)q[g]=((_x-1)<<16)|(_y),g=(g+1)%M,t[_y][_x-1]=t[_y][_x]+1;
			if(t[_y][_x+1]==0)q[g]=((_x+1)<<16)|(_y),g=(g+1)%M,t[_y][_x+1]=t[_y][_x]+1;
			if(t[_y-1][_x]==0)q[g]=((_x)<<16)|(_y-1),g=(g+1)%M,t[_y-1][_x]=t[_y][_x]+1;
			if(t[_y+1][_x]==0)q[g]=((_x)<<16)|(_y+1),g=(g+1)%M,t[_y+1][_x]=t[_y][_x]+1;
			if(t[ry][rx])break;
		}
		if(f==g)puts("-1"),exit(0);
		printf("%d\n",s[qy][qx]-1+t[ry][rx]-1);
	exit(0);
}


ات در پانویس
\n' +
  '
پیوند نمانام‌سازی در پانویس
\n' +
  '
دسته تغییر اندازه ویرایشگر در پانویس
\n' +
  '
\n' +
  '\n' +
  '
اگر بخشی از رابط کاربری موجود نباشد، رد می‌شود.
\n' +
  '\n' +
  '
اگر پانویس دارای تمرکز بر پیمایش صفحه‌کلید باشد، و نوار کناری قابل‌مشاهده وجود ندارد، فشردن Shift+Tab\n' +
  '  تمرکز را به گروه نوار ابزار اول می‌برد، نه آخر.
\n' +
  '\n' +
  '
پیمایش در بخش‌های رابط کاربری
\n' +
  '\n' +
  '
برای جابجایی از یک عنصر رابط کاربری به بعدی، کلید جهت‌نمای مناسب را فشار دهید.
\n' +
  '\n' +
  '
کلیدهای جهت‌نمای چپ و راست
\n' +
  '\n' +
  '
\n' +
  '
جابجایی بین منوها در نوار منو.
\n' +
  '
باز کردن منوی فرعی در یک منو.
\n' +
  '
جابجایی بین دکمه‌ها در یک گروه نوار ابزار.
\n' +
  '
جابجایی بین موارد در مسیر عنصر پانویس.
\n' +
  '
\n' +
  '\n' +
  '
کلیدهای جهت‌نمای پایین و بالا
\n' +
  '\n' +
  '
\n' +
  '
جابجایی بین موارد منو در یک منو.
\n' +
  '
جابجایی بین موارد در یک منوی بازشوی نوار ابزار.
\n' +
  '
\n' +
  '\n' +
  '
کلیدهایجهت‌نما در بخش رابط کاربری متمرکز می‌چرخند.
\n' +
  '\n' +
  '
برای بستن یک منوی باز، یک منوی فرعی باز، یا یک منوی بازشوی باز، کلید Esc را فشار دهید.
\n' +
  '\n' +
  '
اگر تمرکز فعلی در «بالای» یک بخش رابط کاربری خاص است، فشردن کلید Esc نیز موجب


top_k_scores_in_batch = similarity_scores[q_idx][top_k_indices_in_batch].tolist()

                # Retrieve the actual index IDs for top_k results
                top_k_iids_in_batch = [index_batch[idx].iid for idx in top_k_indices_in_batch]

                # Append to the accumulated list of top_k results for the current query
                if len(batch_top_k_iids) <= q_idx:
                    batch_top_k_iids.append(top_k_iids_in_batch)
                    batch_top_k_scores.append(top_k_scores_in_batch)
                else:
                    # Append new results and sort to maintain only the overall top_k
                    combined_iids = batch_top_k_iids[q_idx] + top_k_iids_in_batch
                    combined_scores = batch_top_k_scores[q_idx] + top_k_scores_in_batch

                    # Sort and select top_k
                    sorted_indices = sorted(range(len(combined_scores)), key=lambda x: combined_scores[x], reverse=True)[:top_k]
                    batch_top_k_iids[q_idx] = [combined_iids[idx] for idx in sorted_indices]
                    batch_top_k_scores[q_idx] = [combined_scores[idx] for idx in sorted_indices]

        # Update query examples with the retrieved results
        for k, q_example in enumerate(query_batch):
            q_example.retrieved_iids = batch_top_k_iids[k]
            q_example.retrieved_scores = batch_top_k_scores[k]
            eval_dataset.query_examples[i * args.batch_size + k] = q_example

            results[q_example.qid] = {
                "retrieved_iids": batch_top_k_iids[k],
                "retrieved_scores": batch_top_k_scores[k]
            }

    # Save results to a JSON file
    with open("retrieval_results.json", "w") as f:
        json.dump(results, f, indent=4)
        # Post-processing and evaluation:
    if args.dataset in ["fiq-dress", "fiq-shirt", "fiq-toptee"]:
        eval_dataset.evaluate_recall()
    elif args.dataset in ["circo"]:
        eval_dataset.write_to_file(os.path.join(args.output, args.dataset + "_" + args.model_size))
    else:
        raise NotImplementedError

    print("Inference Done.")


 *image;
{
    int n;
    Arg wargs[2];

    n = 0;
    XtSetArg(wargs[n], XtNimage, (XtArgVal) image); n++;
    XtSetValues(w, wargs, n);
}

extern void SWRequestSelection();

void RequestSelection(w, event, params, num_params)
    Widget w;
    XEvent *event;
    String *params;
    Cardinal *num_params;
{
    SWRequestSelection(w, event->xbutton.time);
}

extern void SWGrabSelection();

void GrabSelection(w, event, params, num_params)
    Widget w;
    XEvent *event;
    String *params;
    Cardinal *num_params;
{
    SWGrabSelection(w, event->xbutton.time);
}

Pixmap SWGetPixmap(w)
    Widget w;
{
    ScaleWidget sw = (ScaleWidget) w;
    Pixmap pixmap;

    pixmap = XCreatePixmap(XtDisplay(w), XtWindow(w),
			   sw->scale.width,
			   sw->scale.height,
			   sw->scale.image->depth);
    ScaleImage(sw, pixmap,
	       0, 0, 0, 0,
	       (Dimension) sw->scale.image->width,
	       (Dimension) sw->scale.image->height);

    return(pixmap);
}


  They are
			       native  to the Linux console driver.  Colors are in SGR parameters: 0 =
			       black, 1 = red, 2 = green, 3 = brown, 4 = blue, 5 = magenta, 6 =  cyan,
			       7 = white.

			       ESC [ 1 ; n ]       Set color n as the underline color
			       ESC [ 2 ; n ]       Set color n as the dim color
			       ESC [ 8 ]           Make the current color pair the default attributes.
			       ESC [ 9 ; n ]       Set screen blank timeout to n minutes.
			       ESC [ 10 ; n ]      Set bell frequency in Hz.
			       ESC [ 11 ; n ]      Set bell duration in msec.
			       ESC [ 12 ; n ]      Bring specified console to the front.
			       ESC [ 13 ]          Unblank the screen.
			       ESC [ 14 ; n ]      Set the VESA powerdown interval in minutes.

		*/
	}
	return n, nil
}

// WriteChars writes the bytes to given writer.
func (term *WindowsTerminal) WriteChars(fd uintptr, w io.Writer, p []byte) (n int, err error) {
	if len(p) == 0 {
		return 0, nil
	}
	return w.Write(p)
}

const (
	CAPSLOCK_ON        = 0x0080 //The CAPS LOCK light is on.
	ENHANCED_KEY       = 0x0100 //The key is enhanced.
	LEFT_ALT_PRESSED   = 0x0002 //The left ALT key is pressed.
	LEFT_CTRL_PRESSED  = 0x0008 //The left CTRL key is pressed.
	NUMLOCK_ON         = 0x0020 //The NUM LOCK light is on.
	RIGHT_ALT_PRESSED  = 0x0001 //The right ALT key is pressed.
	RIGHT_CTRL_PRESSED = 0x0004 //The right CTRL key is pressed.
	SCROLLLOCK_ON      = 0x0040 //The SCROLL LOCK light is on.
	SHIFT_PRESSED      = 0x0010 // The SHIFT key is pressed.
)

const (
	KEY_CONTROL_PARAM_2 = ";2"
	KEY_CONTROL_PARAM_3 = ";3"
	KEY_CONTROL_PARAM_4 = ";4"
	KEY_CONTROL_PARAM_5 = ";5"
	KEY_CONTROL_PARAM_6 = ";6"
	KEY_CONTROL_PARAM_7 = ";7"
	KEY_CONTROL_PARAM_8 = ";8"
	KEY_ESC_CSI         = "\x1B["
	KEY_ESC_N           = "\x1BN"
	KEY_ESC_O           = "\x1BO"
)

var keyMapPrefix = map[WORD]string{
	VK_UP:     "\x1B[%sA",
	VK_DOWN:   "\x1B[%sB",
	VK_RIGHT:  "\x1B[%sC",
	VK_LEFT:   "\x1B[%sD",
	VK_HOME:   "\x1B[1%s~", // showkey shows ^[[1
	VK_END:    "\x1B[4%s~", // showkey shows ^[[4
	VK_INSERT: "\x1B[2%s~",
	VK_DELETE: "\x1B[3%s~",
	VK_PRIOR:  "\x1B[5%s~",
	VK_NEXT:   "\x1B[6%s~",
	VK_F1:     "",
	VK_F2:     "",
	VK_F3:     "\x1B[13%s~",
	VK_F4:     "\x1B[14%s~",
	VK_F5:     "\x1B[15%s~",
	VK_F6:     "\x1B[17%s~",
	VK_F7:     "\x1B[18%s~",
	VK_F8:     "\x1B[19%s~",
	VK_F9:     "\x1B[20%s~",
	VK_F10:    "\x1B[21%s~",
	VK_F11:    "\x1B[23%s~",
	VK_F12:    "\x1B[24%s~",
}

var arrowKeyMapPrefix = map[WORD]string{
	VK_UP:    "%s%sA",
	VK_DOWN:  "%s%sB",
	VK_RIGHT: "%s%sC",
	VK_LEFT:  "%s%sD",
}

func getControlStateParameter(shift, alt, control, meta bool) string {
	if shift && alt && contro


^^^^^
// [analyzer] SYNTACTIC_ERROR.EXPECTED_BODY
// [analyzer] SYNTACTIC_ERROR.MISSING_IDENTIFIER
// [cfe] A mixin declaration must have a body, even if it is empty.
// [cfe] Expected an identifier, but got 'mixin'.

mixin enum E { value }
//    ^^^^
// [analyzer] SYNTACTIC_ERROR.EXPECTED_BODY
// [analyzer] SYNTACTIC_ERROR.MISSING_IDENTIFIER
// [cfe] A mixin declaration must have a body, even if it is empty.
// [cfe] Expected an identifier, but got 'enum'.

mixin typedef T = String;
//    ^^^^^^^
// [analyzer] SYNTACTIC_ERROR.EXPECTED_BODY
// [analyzer] SYNTACTIC_ERROR.MISSING_IDENTIFIER
// [cfe] A mixin declaration must have a body, even if it is empty.
// [cfe] Expected an identifier, but got 'typedef'.

mixin extension StringExtension on String {}
//    ^^^^^^^^^
// [analyzer] SYNTACTIC_ERROR.EXPECTED_BODY
// [analyzer] SYNTACTIC_ERROR.MISSING_IDENTIFIER
// [cfe] A mixin declaration must have a body, even if it is empty.
// [cfe] Expected an identifier, but got 'extension'.
// Copyright (c) 2023, the Dart project authors.  Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// Error when mixing in a regular class inside its library.

class Class {
  int foo = 0;
}

mixin Mixin {
  int foo = 0;
}

abstract class A with Class {}
//                    ^^^^^
// [analyzer] COMPILE_TIME_ERROR.CLASS_USED_AS_MIXIN
// [cfe] The class 'Class' can't be used as a mixin because it isn't a mixin class nor a mixin.

class B with Class {}
//           ^^^^^
// [analyzer] COMPILE_TIME_ERROR.CLASS_USED_AS_MIXIN
// [cfe] The class 'Class' can't be used as a mixin because it isn't a mixin class nor a mixin.

class C = Object with Class;
//                    ^^^^^
// [analyzer] COMPILE_TIME_ERROR.CLASS_USED_AS_MIXIN
// [cfe] The class 'Class' can't be used as a mixin because it isn't a mixin class nor a mixin.

abstract class D with Class, Mixin {}
//                    ^^^^^
// [analyzer] COMPILE_TIME_ERROR.CLASS_USED_AS_MIXIN
// [cfe] The class 'Class' can't be used as a mixin because it isn't a mixin class nor a mixin.

class E with Class, Mixin {}
//           ^^^^^
// [analyzer] COMPILE_TIME_ERROR.CLASS_USED_AS_MIXIN
// [cfe] The class 'Class' can't be used as a mixin because it isn't a mixin class nor a mixin.

class NamedMixinClassApplication = Object with Class;
//                                             ^^^^^
// [analyzer] COMPILE_TIME_ERROR.CLASS_USED_AS_MIXIN
// [cfe] The class 'Class' can't be used as a mixin because it isn't a mixin class nor a mixin.
// Copyright (c) 2022, the Dart project authors.  Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// Syntax errors such as using `base` keyword in a place other than a class or
// mixin.

abstract class BaseMembers {
  base int


cc_I	orncc 	%r23, 0x01d3, %r24
	.word 0xfa04a132  ! 3496: LDUW_I	lduw	[%r18 + 0x0132], %r29
T0_dtlb_err_151:
!$EV error (0,expr(@VA(.MAIN.T0_dtlb_err_151),16,16),1,DTLB_DATA,13)
	.word 0xfea45660  ! 3498: STWA_R	stwa	%r31, [%r17 + %r0] 0xb3
	.word 0xf5048000  ! 3499: LDF_R	ld	[%r18, %r0], %f26
T0_hwint_455:
!$EV trig_pc_d(0,expr(@VA(.MAIN.T0_hwint_455), 16, 16)) -> intp(0, 0, 0)
	.word 0xf4256114  ! 3502: STW_I	stw	%r26, [%r21 + 0x0114]
	.word 0xf625c000  ! 3503: STW_R	stw	%r27, [%r23 + %r0]
T0_dtlb_err_152:
!$EV error (0,expr(@VA(.MAIN.T0_dtlb_err_152),16,16),1,DTLB_DATA,39)
	.word 0xfb1d8000  ! 3505: LDDF_R	ldd	[%r22, %r0], %f29
	.word 0xbc24c000  ! 3505: SUB_R	sub 	%r19, %r0, %r30
	.word 0xf53c210b  ! 3506: STDF_I	std	%f26, [0x010b, %r16]
	.word 0xfa14c000  ! 3507: LDUH_R	lduh	[%r19 + %r0], %r29
	.word 0xf1bc43e0  ! 3509: STDFA_R	stda	%f24, [%r0, %r17]
	.word 0xf4f50a80  ! 3510: STXA_R	stxa	%r26, [%r20 + %r0] 0x54
	.word 0xfd3c0000  ! 3511: STDF_R	std	%f30, [%r0, %r16]
T0_dtlb_err_153:
!$EV error (0,expr(@VA(.MAIN.T0_dtlb_err_153),16,16),1,DTLB_DATA,16)
	.word 0xf0744000  ! 3513: STX_R	stx	%r24, [%r17 + %r0]
T0_irf_ce_300:
!$EV error(0,expr(@VA(.MAIN.T0_irf_ce_300), 16, 16),1,IRF,ce,36,7, x,x,x, x,x,x)
	.word 0xbeac4000  ! 3514: ANDNcc_R	andncc 	%r17, %r0, %r31
T0_hwint_456:
!$EV trig_pc_d(0,expr(@VA(.MAIN.T0_hwint_456), 16, 16)) -> intp(0, 0, 20)
T0_irf_ce_301:
!$EV error(0,expr(@VA(.MAIN.T0_irf_ce_301), 16, 16),1,IRF,ce,14,1, x,x,x, x,x,x)
	.word 0xf99421c4  ! 3518: LDQFA_I	-	[%r16, 0x01c4], %f28
	.word 0xb21ce10d  ! 3518: XOR_I	xor 	%r19, 0x010d, %r25
	.word 0xbea4c000  ! 3519: SUBcc_R	subcc 	%r19, %r0, %r31
T0


enrechte/schwerpunktthemen/rechte-des-kindes/">Rechte des Kindes

Sicherheit von JournalistInnen

VerteidigerInnen der Menschenrechte

Kampf gegen Rassismus

Kampf gegen den Menschenhandel

Konferenz "Menschenhandel in Konflikt- und Krisensituationen", 20. Oktober 2017

Minderheitenrechte

Glaubens- und Gewissensfreiheit

Menschenrechtsbildung

Österreich im VN-Menschenrechtsrat

Menschenrechte in der EU

Menschenrechte als Querschnittsmaterie

EU-Menschenrechtsleitlinien

EU-Menschenrechtsdialoge

EU-Grundrechteagentur

Menschenrechte im Europarat

Menschenrechte in der OSZE

Menschenrechte in den Vereinten Nationen

<a href="/e


ize = size + _i1.U32Codec.codec.sizeHint(value1);
    size = size + _i1.U64Codec.codec.sizeHint(value2);
    size = size + const _i3.AccountId32Codec().sizeHint(value3);
    return size;
  }

  void encodeTo(_i1.Output output) {
    _i1.U8Codec.codec.encodeTo(
      3,
      output,
    );
    _i1.U64Codec.codec.encodeTo(
      value0,
      output,
    );
    _i1.U32Codec.codec.encodeTo(
      value1,
      output,
    );
    _i1.U64Codec.codec.encodeTo(
      value2,
      output,
    );
    const _i1.U8ArrayCodec(32).encodeTo(
      value3,
      output,
    );
  }

  @override
  bool operator ==(Object other) =>
      identical(
        this,
        other,
      ) ||
      other is TaskUpdated &&
          other.value0 == value0 &&
          other.value1 == value1 &&
          other.value2 == value2 &&
          _i4.listsEqual(
            other.value3,
            value3,
          );

  @override
  int get hashCode => Object.hash(
        value0,
        value1,
        value2,
        value3,
      );
}
// ignore_for_file: no_leading_underscores_for_library_prefixes
import 'dart:typed_data' as _i3;

import 'package:polkadart/scale_codec.dart' as _i1;
import 'package:quiver/collection.dart' as _i4;

import '../../primitive_types/h256.dart' as _i2;

class ContractInfo {
  const ContractInfo({
    required this.trieId,
    required this.codeHash,
    required this.storageBytes,
    required this.storageItems,
    required this.storageByteDeposit,
    required this.storageItemDeposit,
    required this.storageBaseDeposit,
    required this.delegateDependencies,
  });

  factory ContractInfo.decode(_i1.Input input) {
    return codec.decode(input);
  }

  /// TrieId
  final List<int> trieId;

  /// CodeHash<T>
  final _i2.H256 codeHash;

  /// u32
  final int storageBytes;

  /// u32
  final int storageItems;

  /// BalanceOf<T>
  final BigInt storageByteDeposit;

  /// BalanceOf<T>
  final BigInt storageItemDeposit;

  /// BalanceOf<T>
  final BigInt storageBaseDeposit;

  /// BoundedBTreeMap<CodeHash<T>, BalanceOf<T>, T::
  ///MaxDelegateDependencies>
  final Map<_i2.H256, BigInt> delegateDependencies;

  static const $ContractInfoCodec codec = $ContractInfoCodec();

  _i3.Uint8List encode() {
    return codec.encode(this);
  }

  Map<String, dynamic> toJson() => {
        'trieId': trieId,
        'codeHash': codeHash.toList(),
        'storageBytes': storageBytes,
        'storageItems': storageItems,
        'storageByteDeposit': storageByteDeposit,
        'storageItemDeposit': storageItemDeposit,
        'storageBaseDeposit': storageBaseDeposit,
        'delegateDependencies': delegateDependencies.map((
          key,
          value,
        ) =>
            MapEntry(
              key.toList(),
              value,
            )),
      };

  @override
  bool operator ==(Object other) =>
      identical(
        this,
        other,
      ) ||


 tablero en el tic-tac-toe o las 361 intersecciones en el Go 19×19. Para cualquier estado *s*, la función de acción devuelve el **subconjunto finito** *A(s) ⊆ M* que consiste en movimientos legales en *s*. Asumimos que *M* es finito para la clase de juegos de mesa deterministas discutidos aquí.

### 1.1 Universo de Movimientos $M$

Antes de descomponer la tupla formal, es útil aclarar el marcador $M$ en el mapeo de acción $A:S\to 2^{M}$. **$M$ es el *alfabeto de movimientos primitivos*** —el conjunto más pequeño de símbolos que identifican de manera única cualquier movimiento legal sin referencia a *cuál* estado se toma. Algunos ejemplos:

| Juego | Contenido típico de $M$ | $\|M\|$ |
|-------|--------------------------|---------|
| Tic-tac-toe | Nueve coordenadas del tablero (p.ej. "arriba-izquierda", "centro") | 9 |
| Ajedrez | Todas las tripletas de tipo de pieza × casilla de origen × casilla de destino † | ≈20 000 |
| Conecta Cuatro | Siete índices de columna 0–6 | 7 |
| Go (19×19) | 361 índices de intersección más "pasar" | 362 |

† Los tamaños exactos dependen de si las promociones, en passant, enroque, etc. se tratan como símbolos de movimiento separados.

**Propiedades de $M$**
* $M$ es **finito** para cada juego de mesa considerado en este capítulo (juegos de turnos aleatorios con dados pueden extender $M$ para incluir movimientos de azar, pero el conjunto sigue siendo finito por movimiento).
* $M$ es **agnóstico de estado**: la prueba de legalidad ocurre cuando formamos el subconjunto $A(s)\subseteq M$ para un estado particular $s$.
* $M$ a menudo lleva estructura adicional—coordenadas espaciales, tipos de piezas—explotada por funciones heurísticas y redes neuronales, pero la *definición del árbol en sí* necesita solo la noción teórica de conjuntos de pertenencia.

Con $M$ en mente, ahora podemos presentar formalmente la tupla completa del juego.

---

#### Ejemplo tic-tac-toe

Para un tablero $3\times3$ fijamos un sistema de coordenadas **fila–columna** cuyo origen está en la esquina superior izquierda.
Sea

$\text{Filas } r\in\{0,1,2\}, \qquad \text{Columnas } c\in\{0,1,2\}.$

Definimos el **universo de movimientos**

$M_{\text{tic-tac-toe}} =\bigl\{\,m_{r,c}\;\bigl|\;r\in\{0,1,2\},\;c\in\{0,1,2\}\bigr\}, \qquad |M_{\text{tic-tac-toe}}|=9.$

Cada símbolo $m_{r,c}$ denota la acción «colocar la marca propia en la casilla $(r,c)$».
La legalidad se decide más adelante al filtrar las casillas ya ocupadas en el estado $s$.

* **Finitud.** La cardinalidad de $M$ es $9$; todo el árbol de juego entra en unas pocas páginas.
* **Agnosticismo de estado.** Los nueve símbolos existen sin importar si la casilla está vacía; el subconjunto legal es $A(s)\subseteq M$.
* **Simetrías.** Rotaciones y reflexiones permutan los $m_{r,c


3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z",fill:"currentColor"})),Pm=t(r()),Lm=()=>Pm.default.createElement("svg",{role:"img",width:"16",height:"16",viewBox:"0 0 448 512","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg"},Pm.default.createElement("path",{d:"M53.21 467c1.562 24.84 23.02 45 47.9 45h245.8c24.88 0 46.33-20.16 47.9-45L416 128H32L53.21 467zM432 32H320l-11.58-23.16c-2.709-5.42-8.25-8.844-14.31-8.844H153.9c-6.061 0-11.6 3.424-14.31 8.844L128 32H16c-8.836 0-16 7.162-16 16V80c0 8.836 7.164 16 16 16h416c8.838 0 16-7.164 16-16V48C448 39.16 440.8 32 432 32z",fill:"currentColor"})),Dm=t(r()),Rm=e=>{return Dm.default.createElement("div",{className:"marketplace-card__authors"},e.authors.map(e=>Dm.default.createElement("a",{title:e.name,className:"marketplace-card__author",href:e.url,draggable:"false",dir:"auto",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),key:e.name+e.url},e.name)))},Mm=t(r()),_m=a=>{const[e,t]=Mm.default.useState(!1),n={[y("grid.externalJS")]:"external JS",[y("grid.archived")]:"archived",[y("grid.dark")]:"dark",[y("grid.light")]:"light"};var r=e=>{return e.filter((e,t,r)=>r.indexOf(e)===t).reduce((e,t)=>{var r=n[t]||t;return!a.showTags&&t!==y("grid.externalJS")&&t!==y("grid.archived")||e.push(Mm.default.createElement("li",{className:"marketplace-card__tag",draggable:!1,"data-tag":r},t)),e},[])};let o=[...a.tags??[]].sort(e=>e===y("grid.externalJS")||e===y("grid.archived")?-1:1),i=[];return 1<o.length-4&&(i=a.tags.slice(4),o=o.slice(0,4)),Mm.default.createElement("div",{className:"marketplace-card__tags-container"},Mm.default.createElement("ul",{className:"marketplace-card__tags"},r(o),i.length&&e?r(i):null),i.length&&!e?Mm.default.createElement("button",{className:"marketplace-card__tags-more-btn",onClick:e=>{e.stopPropagation(),t(!0)}},"..."):null)},jm=window.Spicetify,Bm=class extends w.default.Component{tags;menuType;localStorageKey;key=null;type=Bm;constructor(e){super(e),this.menuType=jm.ReactComponent.Menu,this.localStorageKey=No(e),Object.assign(this,e),this.tags=e.item.tags||[],e.item.include&&this.tags.push(y("grid.externalJS")),e.item.archived&&this.tags.push(y("grid.archived")),this.state={installed:null!==localStorage.getItem(this.localStorageKey),stars:this.props.item.stars||0,tagsExpanded:!1,externalUrl:this.props.item.user&&this.props.item.repo?`https://github.com/${this.props.item.user}/`+this.props.item.repo:"",lastUpdated:this.props.item.user