    }

    /**
     * 将输入流的数据上传到sftp作为文件。文件完整路径=basePath+directory
     *
     * @param basePath     服务器的基础路径
     * @param directory    上传到该目录
     * @param sftpFileName sftp端文件名
     * @param input        输入流
     */

    fun upload(basePath: String, directory: String, sftpFileName: String, input: InputStream) {
        checkSftpChannelConnect()
        try {
            channelSftp!!.cd(basePath)
            channelSftp!!.cd(directory)
        } catch (e: SftpException) {
            //目录不存在，则创建文件夹
            val dirs = directory.split("/".toRegex()).dropLastWhile { it.isEmpty() }.toTypedArray()
            var tempPath = basePath
            for (dir in dirs) {
                if ("" == dir) {
                    continue
                }
                tempPath += "/$dir"
                try {
                    channelSftp!!.cd(tempPath)
                } catch (ex: SftpException) {
                    channelSftp!!.mkdir(tempPath)
                    channelSftp!!.cd(tempPath)
                }
            }
        }
        channelSftp!!.put(input, sftpFileName)
    }

    /**
     * 下载文件
     *
     * @param directory    下载目录
     * @param downloadFile 下载的文件
     * @param saveFile     存在本地的完整路径
     */

    private fun download(directory: String, downloadFile: String, saveFile: String) {
        checkSftpChannelConnect()
        Assert.hasText(directory, "directory can't be blank")
        channelSftp!!.cd(directory)
        channelSftp!!.get(downloadFile, FileOutputStream(saveFile))
    }

    /**
     * 下载文件
     *
     * @param directory    下载目录
     * @param downloadFile 下载的文件名
     * @return 字节数组
     */

    fun download(directory: String, downloadFile: String): ByteArray {
        checkSftpChannelConnect()
        Assert.hasText(directory, "directory can't be blank")
        channelSftp!!.cd(directory)
        val `is` = channelSftp!![downloadFile]
        return IOUtils.toByteArray(`is`)
    }

    fun downloadLogFiles(logPath: String, savePath: String, currentFileName: String, historyFileNamePrefix: String) {
        checkSftpChannelConnect()
        val path = File(savePath)
        if (!path.exists()) {
            val success = path.mkdirs()
            if (!success) {
                throw FileSystemException("can't create path $password")
            }
        }
        var saveFile = "$savePath/$currentFileName"
        download(logPath, currentFileName, saveFile)
        log.info("download {} to {} finished", currentFileName, saveFile)
        val fileNames = getFileNames(logPath, historyFileNamePrefix)
        for (fileName in fileNames) {
            saveFile = "$savePath/$fileName"
            download(logPath, fileName, saveFile)
            log.info("download {} to {} finished%n", fileName, saveFile)
        }
    }

    private fun getFileNames(directory: String, prefix: String): List<String> {
        checkSftpChannelConnect()
        return listFiles(directory).stream()
            .filter { lsEntry ->
                lsEntry.filename.startsWith(
                    prefix
                )
            }
            .map { it.filename }
            .sorted()
            .collect(Collectors.toList())
    }

    /**
     * 删除文件
     *
     * @param directory  要删除文件所在目录
     * @param deleteFile 要删除的文件
     */

    fun delete(directory: String, deleteFile: String) {
        checkSftpChannelConnect()


#include "constants/scrcmd.h"
#include "fielddata/script/scr_seq/event_T26R0501.h"
#include "msgdata/msg/msg_0609_T26R0501.h"
	.include "asm/macros/script.inc"

	.rodata

	scrdef scr_seq_T26R0501_000
	scrdef scr_seq_T26R0501_001
	scrdef scr_seq_T26R0501_002
	scrdef_end

scr_seq_T26R0501_000:
	simple_npc_msg msg_0609_T26R0501_00000
	end

scr_seq_T26R0501_001:
	simple_npc_msg msg_0609_T26R0501_00001
	end

scr_seq_T26R0501_002:
	play_se SEQ_SE_DP_SELECT
	lockall
	faceplayer
	goto_if_unset FLAG_UNK_AB9, _0050
	npc_msg msg_0609_T26R0501_00004
	goto _00E3

_0050:
	npc_msg msg_0609_T26R0501_00002
	hasitem ITEM_SEAL_CASE, 1, VAR_SPECIAL_RESULT
	compare VAR_SPECIAL_RESULT, 0
	goto_if_ne _0071
	npc_msg msg_0609_T26R0501_00005
	goto _00E3

_0071:
	give_random_seal VAR_SPECIAL_x8000, VAR_SPECIAL_x8001, VAR_SPECIAL_x8002


?.playlist
                                              .creator.avatarUrl,
                                          Size(Dimens.gap_dp25,
                                              Dimens.gap_dp25)),
                                      size: Dimens.gap_dp25,
                                      identityIconUrl: controller
                                          .detail
                                          .value
                                          ?.playlist
                                          .creator
                                          .avatarDetail
                                          ?.identityIconUrl,
                                    ),
                                  ),
                                  WidgetSpan(child: Gaps.hGap2),
                                  TextSpan(
                                      text: controller.detail.value?.playlist
                                          .creator.nickname,
                                      style: TextStyle(
                                          fontSize: 13,
                                          color:
                                              Colours.white.withOpacity(0.7))),
                                ]))),
                        Gaps.hGap1,
                        //focuse creator
                        if (controller.detail.value?.playlist.creator != null)
                          CreatorFollowWidget(
                            followed: controller
                                .detail.value!.playlist.creator.followed,
                          )
                      ],
                    ),
                  )),
                  //description
                  Expanded(
                    flex: 0,
                    child: Row(
                      children: [
                        ConstrainedBox(
                            constraints:
                                BoxConstraints(maxWidth: Adapt.px(160)),
                            child: Text(
                              //所有的空白和换行 换成默认空白
                              controller.detail.value?.playlist.description
                                      ?.replaceAll(
                                          RegExp(r'\s+\b|\b\s|\n'), ' ') ??
                                  '暂无简介',
                              maxLines: 1,
                              overflow: TextOverflow.ellipsis,
                              style: TextStyle(
                                  fontSize: 12,
                                  color: Colours.white.withOpacity(0.7)),
                            )),
                        Image.asset(
                          ImageUtils.getImagePath('icon_more'),
                          height: 13,
                          width: 13,
                          color: Colours.white.withOpacity(0.65),
                        )
                      ],
                    ),
                  )
                ],
              ),
            ),
          ),
        ],
      ),
    );
  }
}
import 'package:flutter/material.dart';
import 'package:flutter_cloud_music/api/muisc_api.dart';
import 'package:flutter_cloud_music/pages/music_calendar/content/calender_model.dart';
import 'package:get/get.dart';

class CalendarListController extends GetxController {
  final DateTime dateTime;

  CalendarListController(this.dateTime);

  final data = Rx<List<CalenderModel>?>(null);

  int initialScrollIndex = 0;

  int? showFollowDay;

  @override
  void onReady() {
    super.onReady();
    final startTime = DateTime(dateTime.year, dateTime.month);
    // final countDay = DateTime(dateTime.year, dateTime.month + 1, 0).day;
    final countDay = DateUtils.getDaysInMonth(dateTime.year, dateTime.month);
    final endTime = DateTime(dateTime.year, dateTime.month, countDay);
    requestList(startTime, endTime);
  }

  void requestList(DateTime startTime, DateTime endTime) {
    MusicApi.getCalendarEvents(startTime, endTime).then((value) {
      final scrollIndex = value
          .indexWhere((element) => DateUtils.isSameDay(dateTime, element.time));
      if (scrollIndex != -1) {
        initialScrollIndex = scrollIndex;
      }
      data.value = value;
    });
  }
}
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_cloud_music/common/res/dimens


Layout layout = new GridLayout(1, true);
		layout.marginWidth = 10;
		layout.marginHeight = 10;
		layout.numColumns = NUM_COLUMNS;
		parent.setLayout(layout);

		label = new Label(parent, SWT.LEFT);
		WidgetTestUtil.setTestId(this, "manager", label);
		gridData = new GridData();
		gridData.horizontalSpan = 1;
		gridData.horizontalAlignment = GridData.FILL;
		gridData.grabExcessHorizontalSpace = true;
		label.setLayoutData(gridData);
		label.setText(Messages.getString("facility.manager") + " : ");

		this.m_managerComposite = new ManagerListComposite(parent, SWT.NONE, false);

		WidgetTestUtil.setTestId(this, "managerComposite", m_managerComposite);
		gridData = new GridData();
		gridData.horizontalSpan = NUM_COLUMNS - 1;
		gridData.horizontalAlignment = GridData.FILL;
		gridData.grabExcessHorizontalSpace = true;
		this.m_managerComposite.setLayoutData(gridData);

		// 空白
		label = new Label(parent, SWT.NONE);
		WidgetTestUtil.setTestId(this, "space", label);
		gridData = new GridData();
		gridData.horizontalAlignment = GridData.FILL;
		gridData.grabExcessHorizontalSpace = true;
		gridData.horizontalSpan = NUM_COLUMNS;
		label.setLayoutData(gridData);

		/*
		 * 選択中のイベント件数
		 */
		// ラベル
		label = new Label(parent, SWT.LEFT);
		WidgetTestUtil.setTestId(this, "selectEventLabel", label);
		GridData gridData_event = new GridData();
		gridData_event.horizontalAlignment = GridData.FILL;
		gridData_event.grabExcessHorizontalSpace = true;
		gridData_event.horizontalSpan = 1;
		label.setLayoutData(gridData_event);
		label.setText(Messages.getString("dialog.monitor.events.customcommand.run.label.eventnum") + " : ");

		// 件数
		label = new Label(parent, SWT.LEFT);
		WidgetTestUtil.setTestId(this, "select.event.count", label);
		gridData_event = new GridData();
		gridData_event.horizontalAlignment = GridData.FILL;
		gridData_event.grabExcessHorizontalSpace = true;
		gridData_event.horizontalSpan = NUM_COLUMNS - 1;
		label.setLayoutData(gridData_event);
		label.setText(String.valueOf(this.selectEventList.size()) + Messages.getString("record"));

		// 改行
		label = new Label(parent, SWT.NONE);
		WidgetTestUtil.setTestId(this, "space4", label);
		gridData = new GridData();
		gridData.horizontalAlignment = GridData.FILL;
		gridData.grabExcessHorizontalSpace = true;
		gridData.horizontalSpan = NUM_COLUMNS;
		label.setLayoutData(gridData);

		/*
		 * カスタムコマンド一覧
		 */
		// ラベル
		label = new Label(parent, SWT.LEFT);
		WidgetTestUtil.setTestId(this, "list", label);
		gridData = new GridData();
		gridData.horizontalAlignment = GridData.FILL;
		gridData.grabExcessHorizontalSpace = true;
		gridData.horizontalSpan = NUM_COLUMNS;
		label.setLayoutData(gridData);
		label.setText(Messages.getString("dialog.monitor.events.customcommand.run.label.list.title"));

		this.tableComposite = new EventCustomCommandComposite(parent, SWT.NONE);

		WidgetTestUtil.setTestId(this, null, tableComposite);
		gridData = new GridData();
		gridDa


version == 2 && optional -> "$fieldRef != null"
        else -> type.nonDefaultCheck(fieldRef)
    }
    protected val File.Field.Standard.requiresExplicitTypeWithVal get() =
        repeated || (file.version == 2 && optional) || type.requiresExplicitTypeWithVal

    protected val File.Field.Type.string get() = when (this) {
        File.Field.Type.BOOL -> "bool"
        File.Field.Type.BYTES -> "bytes"
        File.Field.Type.DOUBLE -> "double"
        File.Field.Type.ENUM -> "enum"
        File.Field.Type.FIXED32 -> "fixed32"
        File.Field.Type.FIXED64 -> "fixed64"
        File.Field.Type.FLOAT -> "float"
        File.Field.Type.INT32 -> "int32"
        File.Field.Type.INT64 -> "int64"
        File.Field.Type.MESSAGE -> "message"
        File.Field.Type.SFIXED32 -> "sFixed32"
        File.Field.Type.SFIXED64 -> "sFixed64"
        File.Field.Type.SINT32 -> "sInt32"
        File.Field.Type.SINT64 -> "sInt64"
        File.Field.Type.STRING -> "string"
        File.Field.Type.UINT32 -> "uInt32"
        File.Field.Type.UINT64 -> "uInt64"
    }
    protected val File.Field.Type.sizeMethod get() = string + "Size"
    protected val File.Field.Type.readMethod get() = "read" + string.capitalize()
    protected val File.Field.Type.writeMethod get() = "write" + string.capitalize()
    protected val File.Field.Type.standardTypeName get() = when (this) {
        File.Field.Type.BOOL -> "Boolean"
        File.Field.Type.BYTES -> "pbandk.ByteArr"
        File.Field.Type.DOUBLE -> "Double"
        File.Field.Type.ENUM -> error("No standard type name for enums")
        File.Field.Type.FIXED32 -> "Int"
        File.Field.Type.FIXED64 -> "Long"
        File.Field.Type.FLOAT -> "Float"
        File.Field.Type.INT32 -> "Int"
        File.Field.Type.INT64 -> "Long"
        File.Field.Type.MESSAGE -> error("No standard type name for enums")
        File.Field.Type.SFIXED32 -> "Int"
        File.Field.Type.SFIXED64 -> "Long"
        File.Field.Type.SINT32 -> "Int"
        File.Field.Type.SINT64 -> "Long"
        File.Field.Type.STRING -> "String"
        File.Field.Type.UINT32 -> "Int"
        File.Field.Type.UINT64 -> "Long"
    }
    protected val File.Field.Type.wireFormat get() = when (this) {
        File.Field.Type.BOOL, File.Field.Type.ENUM, File.Field.Type.INT32, File.Field.Type.INT64,
            File.Field.Type.SINT32, File.Field.Type.SINT64, File.Field.Type.UINT32, File.Field.Type.UINT64 -> 0
        File.Field.Type.BYTES, File.Field.Type.MESSAGE, File.Field.Type.STRING -> 2
        File.Field.Type.DOUBLE, File.Field.Type.FIXED64, File.Field.Type.SFIXED64 -> 1
        File.Field.Type.FIXED32, File.Field.Type.FLOAT, File.Field.Type.SFIXED32 -> 5
    }
    protected val File.Field.Type.defaultValue get() = when (this) {
        File.Field.Type.BOOL -> "false"
        File.Field.Type.BYTES -> "pbandk.ByteArr.empty"
        File.Field.Type.DOUBLE -> "0.0"
        File.Field.Type.ENUM -> error("No generic default value for enums")
        File.Field.Type.FIXED32, File.Field.Type.INT32, File.Field.Type.SFIXED32,
            File.Field.Type.SINT32, File.Field.Type.UINT32 -> "0"
        File.Field.Type.FIXED64, File.Field.Type.INT64, File.Field.Type.SFIXED64,
            File.Field.Type.SINT64, File.Field.Type.UINT64 -> "0L"
        Fil


    current_token_.literal = NULL;
    current_token_.kind = Token::kILLEGAL;
    if (IsScanningString()) {
      if (c0_ == '$') {
        ReadChar();  // Skip the '$' character.
        if (IsIdentStartChar(c0_) && (c0_ != '$')) {
          ScanIdentNoDollar();
          current_token_.kind = Token::kINTERPOL_VAR;
        } else if (c0_ == '{') {
          Recognize(Token::kINTERPOL_START);
          PushContext();
        } else {
          ErrorMsg("illegal character after $ in string interpolation");
          EndStringLiteral();
          break;
        }
      } else {
        ScanLiteralStringChars(false, false);
      }
      break;
    }
    switch (c0_) {
      case '\0':
        current_token_.kind = Token::kEOS;
        break;

      case '+':  // +  ++  +=
        Recognize(Token::kADD);
        if (c0_ == '+') {
          Recognize(Token::kINCR);
        } else if (c0_ == '=') {
          Recognize(Token::kASSIGN_ADD);
        }
        break;

      case '-':  // -  --  -=
        Recognize(Token::kSUB);
        if (c0_ == '-') {
          Recognize(Token::kDECR);
        } else if (c0_ == '=') {
          Recognize(Token::kASSIGN_SUB);
        }
        break;

      case '*':  // *  *=
        Recognize(Token::kMUL);
        if (c0_ == '=') {
          Recognize(Token::kASSIGN_MUL);
        }
        break;

      case '%':  // %  %=
        Recognize(Token::kMOD);
        if (c0_ == '=') {
          Recognize(Token::kASSIGN_MOD);
        }
        break;

      case '/':  //  /  /=  //  /*
        Recognize(Token::kDIV);
        if (c0_ == '/') {
          ConsumeLineComment();
        } else if (c0_ == '*') {
          ConsumeBlockComment();
        } else if (c0_ == '=') {
          Recognize(Token::kASSIGN_DIV);
        }
        break;

      case '&':  // &  &=  &&
        Recognize(Token::kBIT_AND);
        if (c0_ == '=') {
          Recognize(Token::kASSIGN_AND);
        } else if (c0_ == '&') {
          Recognize(Token::kAND);
        }
        break;

      case '|':  // |  |=  ||
        Recognize(Token::kBIT_OR);
        if (c0_ == '=') {
          Recognize(Token::kASSIGN_OR);
        } else if (c0_ == '|') {
          Recognize(Token::kOR);
        }
        break;

      case '^':  // ^  ^=
        Recognize(Token::kBIT_XOR);
        if (c0_ == '=') {
          Recognize(Token::kASSIGN_XOR);
        }
        break;

      case '[':  // [  []  []=
        Recognize(Token::kLBRACK);
        if (c0_ == ']') {
          Recognize(Token::kINDEX);
          if (c0_ == '=') {
            Recognize(Token::kASSIGN_INDEX);
          }
        }
        break;

      case ']':  //  ]
        Recognize(Token::kRBRACK);
        break;

      case '<':  // <  <=  <<  <<=
        Recognize(Token::kLT);
        if (c0_ == '=') {
          Recognize(Token::kLTE);
        } else if (c0_ == '<') {
          Recognize(Token::kSHL);
          if (c0_ == '=') {
            Recognize(Token::kASSIGN_SHL);
          }
        }
        br


1    $f4, 0x0060($s0)           ## 00000060
/* 0054C 809967EC 0C00BE0A */  jal     Audio_PlayActorSound2

/* 00550 809967F0 E606006C */  swc1    $f6, 0x006C($s0)           ## 0000006C
/* 00554 809967F4 3C058099 */  lui     $a1, %hi(func_809975C0)    ## $a1 = 80990000
/* 00558 809967F8 24A575C0 */  addiu   $a1, $a1, %lo(func_809975C0) ## $a1 = 809975C0
/* 0055C 809967FC 0C2658A8 */  jal     func_809962A0
/* 00560 80996800 02002025 */  or      $a0, $s0, $zero            ## $a0 = 00000000
/* 00564 80996804 1000000A */  beq     $zero, $zero, .L80996830
/* 00568 80996808 8FBF001C */  lw      $ra, 0x001C($sp)
.L8099680C:
/* 0056C 8099680C 3C058099 */  lui     $a1, %hi(func_80997744)    ## $a1 = 80990000
/* 00570 80996810 0C2658A8 */  jal     func_809962A0


 ItemPackagedHex || !nbt.getBoolean("cracked"))
				return@register
			if (nbt.contains(ItemPackagedHex.TAG_PROGRAM))
				lines.add("hexical.cracked.hex".asTranslatedComponent(getText(nbt.getList(ItemPackagedHex.TAG_PROGRAM, NbtElement.COMPOUND_TYPE.toInt()))))
			else
				lines.add("hexical.cracked.cracked".asTranslatedComponent.formatted(Formatting.GOLD))
		}

		ItemTooltipCallback.EVENT.register { stack, _, lines ->
			val nbt = stack.nbt ?: return@register
			if (stack.item !is CurioItem || !nbt.getBoolean("cracked"))
				return@register
			if (CharmUtilities.isStackCharmed(stack))
				lines.add("hexical.cracked.hex".asTranslatedComponent(getText(CharmUtilities.getCompound(stack).getList("hex", NbtElement.COMPOUND_TYPE.toInt()))))
			else
				lines.add("hexical.cracked.cracked".asTranslatedComponent.formatted(Formatting.GOLD))
		}
	}

	private fun getText(hex: NbtList) = hex.fold(Text.empty()) { acc, curr -> acc.append(IotaType.getDisplay(curr.asCompound)) }
}package miyucomics.hexical.inits

import miyucomics.hexical.features.charms.ServerCharmedUseReceiver
import miyucomics.hexical.features.dyes.DyeingUtils
import miyucomics.hexical.features.dyes.entity.DyeingEntityRegistry
import miyucomics.hexical.features.hopper.HopperEndpointRegistry
import miyucomics.hexical.features.lesser_sentinels.ServerLesserSentinelPusher
import miyucomics.hexical.features.mage_blocks.MageBlockModifierRegistry
import miyucomics.hexical.features.media_log.ServerSpyingHooks
import miyucomics.hexical.features.periwinkle.WooleyedEffectRegister
import miyucomics.hexical.features.player.RespawnPersistHook
import miyucomics.hexical.features.prestidigitation.PrestidigitationHandlers
import miyucomics.hexical.features.rotate.BlockRotationHandlers
import miyucomics.hexical.features.scarabs.ScarabHandler
import miyucomics.hexical.features.sentinel_beds.SentinelBedAmbitHook
import miyucomics.hexical.features.sentinel_beds.SentinelBedPoi
import miyucomics.hexical.features.shaders.ServerShaderManager
import miyucomics.hexical.features.telepathy.ServerPeripheralReceiver
import miyucomics.hexical.features.transmuting.TransmutingHelper
import miyucomics.hexical.misc.InitHook

object HexicalHooksServer {
	private val hooks = mutableListOf<InitHook>()
	fun register(hook: InitHook) { hooks.add(hook) }

	fun init() {
		register(ServerCharmedUseReceiver)
		register(ServerLesserSentinelPusher)
		register(ServerPeripheralReceiver)
		register(ServerSpyingHooks)
		register(ServerShaderManager)
		register(RespawnPersistHook)
		register(SentinelBedAmbitHook)
		register(PrestidigitationHandlers)
		register(HopperEndpointRegistry)
		register(TransmutingHelper)
		register(ScarabHandler)
		register(WooleyedEffectRegister)
		register(SentinelBedPoi)
		register(MageBlockModifierRegistry)
		register(BlockRotationHandlers)
		register(DyeingUtils)
		register(DyeingEntityRegistry)

		for (hook in hooks)
			hook.init()
	}
}package miyucomics.hexical.features.breaking

import at.petrak.hexcasting.api.casting.RenderedSpell
import at.petrak.hexca


 100%;
}

.h1, .h2, .h3, .h4, .h5, .h6,
h1, h2, h3, h4, h5, h6 {
  color: #313533;
}

[data-bs-theme=dark] .h1, [data-bs-theme=dark] .h2, [data-bs-theme=dark] .h3, [data-bs-theme=dark] .h4, [data-bs-theme=dark] .h5, [data-bs-theme=dark] .h6,
[data-bs-theme=dark] h1, [data-bs-theme=dark] h2, [data-bs-theme=dark] h3, [data-bs-theme=dark] h4, [data-bs-theme=dark] h5, [data-bs-theme=dark] h6 {
  color: var(--bs-gray-400);
}

a {
  text-decoration: none !important;
}

label {
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.blockquote {
  padding: 10px 20px;
  border-right: 4px solid var(--bs-secondary-bg);
}

.blockquote-reverse {
  border-right: 0;
  border-left: 4px solid var(--bs-secondary-bg);
  text-align: left;
}

@media (min-width: 1200px) {
  .container, .container-lg, .container-md, .container-sm, .container-xl, .container-xxl {
    max-width: 1140px;
  }
}

.row > * {
  position: relative;
}

.alert-outline {
  background-color: var(--bs-secondary-bg);
}

.alert-label-icon {
  position: relative;
  padding-right: 60px;
  border: 0;
}
.alert-label-icon .label-icon {
  position: absolute;
  width: 45px;
  height: 100%;
  right: 0;
  top: 0;
  background-color: rgba(255, 255, 255, 0.1);
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 16px;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  -webkit-box-pack: center;
      -ms-flex-pack: center;
          justify-content: center;
}
.alert-label-icon.label-arrow {
  overflow: hidden;
}
.alert-label-icon.label-arrow .label-icon {
  color: #fff;
}
.alert-label-icon.label-arrow .label-icon:after {
  content: "";
  position: absolute;
  border: 6px solid transparent;
  left: -12px;
}

.alert-border-left {
  border-right: 3px solid;
}

.alert-top-border {
  background-color: var(--bs-secondary-bg);
  border-color: var(--bs-border-color);
  border-top: 2px solid;
  color: var(--bs-body-color);
}

.alert-outline.alert-primary {
  color: #5156be;
}

.alert-border-left.alert-primary {
  border-right-color: #5156be;
}

.alert-top-border.alert-primary {
  border-top-color: #5156be !important;
}

.label-arrow.alert-primary .label-icon {
  background-color: #5156be;
}
.label-arrow.alert-primary .label-icon:after {
  border-right-color: #5156be !important;
}

.alert-outline.alert-secondary {
  color: #74788d;
}

.alert-border-left.alert-secondary {
  border-right-color: #74788d;
}

.


self->ns_per_quantum;

            return (nanos_prime < nanos) ? (int32_t)quants + 1 : (int32_t)quants;
        }

        default:
            abort();
            return 0;
    }
}

// Converts a quantum value to a time interval.
void clock_quantums2time(clock_ref_t _Nonnull self, Quantums quants, struct timespec* _Nonnull ts)
{
    const int64_t ns = (int64_t)quants * (int64_t)self->ns_per_quantum;

    ts->tv_sec = ns / (int64_t)NSEC_PER_SEC;
    ts->tv_nsec = ns - ((int64_t)ts->tv_sec * (int64_t)NSEC_PER_SEC);
}


ZSBmb250LWZhbWlseS1uby1taXNzaW5nLWdlbmVyaWMtZmFtaWx5LWtleXdvcmRcbiAgZm9udDogMC8wIGE7XG4gIGNvbG9yOiB0cmFuc3BhcmVudDtcbiAgdGV4dC1zaGFkb3c6IG5vbmU7XG4gIGJhY2tncm91bmQtY29sb3I6IHRyYW5zcGFyZW50O1xuICBib3JkZXI6IDA7XG5cbiAgQGluY2x1ZGUgZGVwcmVjYXRlKFwiYHRleHQtaGlkZSgpYFwiLCBcInY0LjEuMFwiLCBcInY1XCIsICRpZ25vcmUtd2FybmluZyk7XG59XG4iLCIvLyBzdHlsZWxpbnQtZGlzYWJsZSBkZWNsYXJhdGlvbi1uby1pbXBvcnRhbnRcblxuLy9cbi8vIFZpc2liaWxpdHkgdXRpbGl0aWVzXG4vL1xuXG4udmlzaWJsZSB7XG4gIHZpc2liaWxpdHk6IHZpc2libGUgIWltcG9ydGFudDtcbn1cblxuLmludmlzaWJsZSB7XG4gIHZpc2liaWxpdHk6IGhpZGRlbiAhaW1wb3J0YW50O1xufVxuIl19 */
/*
Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/
.cke_reset{margin:0;padding:0;border:0;background:transparent;text-decoration:none;width:auto;height:auto;vertical-align:baseline;box-sizing:content-box;position:static;transition:none}.cke_reset_all,.cke_reset_all *,.cke_reset_all a,.cke_reset_all textarea{margin:0;padding:0;border:0;background:transparent;text-decoration:none;width:auto;height:auto;vertical-align:baseline;box-sizing:content-box;position:static;transition:none;border-collapse:collapse;font:normal normal normal 12px Arial,Helvetica,Tahoma,Verdana,Sans-Serif;color:#000;text-align:left;white-space:nowrap;cursor:auto;float:none}.cke_reset_all .cke_rtl *{text-align:right}.cke_reset_all iframe{vertical-align:inherit}.cke_reset_all textarea{white-space:pre-wrap}.cke_reset_all textarea,.cke_reset_all input[type="text"],.cke_reset_all input[type="password"]{cursor:text}.cke_reset_all textarea[disabled],.cke_reset_all input[type="text"][disabled],.cke_reset_all input[type="password"][disabled]{cursor:default}.cke_reset_all fieldset{padding:10px;border:2px groove #e0dfe3}.cke_reset_all select{box-sizing:border-box}.cke_reset_all table{table-layout:auto}.cke_chrome{display:block;border:1px solid #d1d1d1;padding:0}.cke_inner{display:block;background:#fff;padding:0;-webkit-touch-callout:none}.cke_float{border:0}.cke_float .cke_inner{padding-bottom:0}.cke_top,.cke_contents,.cke_bottom{display:block;overflow:hidden}.cke_top{border-bottom:1px solid #d1d1d1;background:#f8f8f8;padding:6px 8px 2px;white-space:normal}.cke_float .cke_top{border:1px solid #d1d1d1}.cke_bottom{padding:6px 8px 2px;position:relative;border-top:1px solid #d1d1d1;background:#f8f8f8}.cke_browser_ios .cke_contents{overflow-y:auto;-webkit-overflow-scrolling:touch}.cke_resizer{width:0;height:0;overflow:


视频合集：视频合集id。注意：一次最多只能请求100个内容id，超过100个内容id将不放回数据。
	Platform  string   `json:"platform,omitempty" request:"query,omitempty"` // 平台标识。可为web（影响内容列表类型）
}

// GetFavourInfo 获取收藏内容
func (c *Client) GetFavourInfo(param GetFavourInfoParam) ([]FavourInfo, error) {
	const (
		method = resty.MethodGet
		url    = "https://api.bilibili.com/x/v3/fav/resource/infos"
	)
	return execute[[]FavourInfo](c, method, url, param)
}

type GetFavourListParam struct {
	MediaId  int    `json:"media_id"`                                     // 目标收藏夹mlid（完整id）
	Tid      int    `json:"tid,omitempty" request:"query,omitempty"`      // 分区tid。默认为全部分区。0：全部分区
	Keyword  string `json:"keyword,omitempty" request:"query,omitempty"`  // 搜索关键字
	Order    string `json:"order,omitempty" request:"query,omitempty"`    // 排序方式。按收藏时间:mtime。按播放量: view。按投稿时间：pubtime
	Type     int    `json:"type,omitempty" request:"query,omitempty"`     // 查询范围。0：当前收藏夹（对应media_id）。 1：全部收藏夹
	Ps       int    `json:"ps"`                                           // 每页数量。定义域：1-20
	Pn       int    `json:"pn,omitempty" request:"query,omitempty"`       // 页码。默认为1
	Platform string `json:"platform,omitempty" request:"query,omitempty"` // 平台标识。可为web（影响内容列表类型）
}

type FavourList struct {
	Info struct { // 收藏夹元数据
		Id    int      `json:"id"`    // 收藏夹mlid（完整id），收藏夹原始id+创建者mid尾号2位
		Fid   int      `json:"fid"`   // 收藏夹原始id
		Mid   int      `json:"mid"`   // 创建者mid
		Attr  int      `json:"attr"`  // 属性，0：正常，1：失效
		Title string   `json:"title"` // 收藏夹标题
		Cover string   `json:"cover"` // 收藏夹封面图片url
		Upper struct { // 创建者信息
			Mid       int    `json:"mid"`        // 创建者mid
			Name      string `json:"name"`       // 创建者昵称
			Face      string `json:"face"`       // 创建者头像url
			Followed  bool   `json:"followed"`   // 是否已关注创建者
			VipType   int    `json:"vip_type"`   // 会员类别，0：无，1：月大会员，2：年度及以上大会员
			VipStatue int    `json:"vip_statue"` // 会员开通状态，0：无，1：有
		} `json:"upper"`
		CoverType int      `json:"cover_type"` // 封面图类别（？）
		CntInfo   struct { // 收藏夹状态数
			Collect int


ue;
    let _alive : bool = false;
    println!("Am I alive? {}", _alive);

    let tup : (u32, &str, bool) = (1, "Hey", false);
    println!("This could be a touple {:?}", tup);

    let (_id, _phrase, _alive) = tup;
    println!("Id: {}", _id);
    println!("Phrase: {}", _phrase);
    println!("Alive: {}", _alive);

    let john : (u32, &str, bool) = tup;
    println!("Id: {}", john.0);
    println!("Phrase: {}", john.1);
    println!("Alive: {}", john.2);

    const _MONTHS: [&str; 12] = ["January", "February", "March", "April", "May", "June", "July",
                "August", "September", "October", "November", "December"];
    println!("Months: {:?}", _MONTHS);

    let _arr = [3; 5];
    println!("Array: {:?}", _arr);

    let _arr: [i32; 5] = [1, 2, 3, 4, 5];
    println!("Array: {:?}", _arr);

    println!("2nd Months: {}", _MONTHS[1]);
}
<filename>src/v2/volume_modes.rs
use super::common::*;

/// Mount modes on volumes that are mapped into the Docker container.
#[derive(Debug, Eq, PartialEq, Clone, Copy)]
pub enum VolumeModes {
    /// This volume can be read and written (default).
    ReadWrite,
    /// This volume is read-only.
    ReadOnly,
    /// This volume and the host are perfectly synchronized.
    Consistent,
    /// Permit delays before updates on the host appear in the container.
    Cached,
    /// Permit delays before updates on the container appear in the host.
    Delegated,
}

impl Default for VolumeModes {
    fn default() -> VolumeModes {
        VolumeModes::ReadWrite
    }
}

impl fmt::Display for VolumeModes {
    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
        match self {
            VolumeModes::ReadWrite => write!(f, "rw"),
            VolumeModes::ReadOnly => write!(f, "ro"),
            VolumeModes::Consistent => write!(f, "consistent"),
            VolumeModes::Cached => write!(f, "cached"),
            VolumeModes::Delegated => write!(f, "delegated"),
        }
    }
}

impl FromStr for VolumeModes {
    type Err = Error;

    fn from_str(s: &str) -> Result<Self> {
        match s {
            "rw" => Ok(VolumeModes::ReadWrite),
            "ro" => Ok(VolumeModes::ReadOnly),
            "consistent" => Ok(VolumeModes::Consistent),
            "cached" => Ok(VolumeModes::Cached),
            "delegated" => Ok(VolumeModes::Delegated),
            _ => Err(Error::invalid_value("volume mode", s)),
        }
    }
}

#[test]
fn volume_mode_has_a_string_representation() {
    let pairs = vec![
        (VolumeModes::ReadWrite, "rw"),
        (VolumeModes::ReadOnly, "ro"),
        (VolumeModes::Consistent, "consistent"),
        (VolumeModes::Cached, "cached"),
        (VolumeModes::Delegated, "delegated"),
    ];
    for (mode, s) in pairs {
        assert_eq!(mode.to_string(), s);
        assert_eq!(mode, VolumeModes::from_str(s).unwrap());
    }
}


)      | O(1)      | O(1)      | O(n)      |

## Graph ||  v = vertices, e = edges in graph
### Graph Traversal Algorithms
1. **DFS**: Depth First Search

|                 | Time        | Space       |
| ----------------|:-----------:|:-----------:|
| [DFS with Recursion](https://github.com/RikamPalkar/DSA-Simplified/blob/main/Graphs/Graph%20Traversal%20Algorithms/DFS/DFS%20Recursion.cs)   |O(v + e)   | O(v)        |
| [DFS with Stack](https://github.com/RikamPalkar/DSA-Simplified/blob/main/Graphs/Graph%20Traversal%20Algorithms/DFS/DFS%20Stack.cs)   |O(v + e)   | O(v)        |

2. **BFS**: Breadth First Search

|                 | Time        | Space       |
| ----------------|:-----------:|:-----------:|
| [BFS with Recursion](https://github.com/RikamPalkar/DSA/blob/main/Graphs/Graph%20Traversal%20Algorithms/BFS/BFS%20Recursion.cs)   |O(v + e)   | O(v)        |
| [BFS with Queue](https://github.com/RikamPalkar/DSA/blob/main/Graphs/Graph%20Traversal%20Algorithms/BFS/BFS%20Queue.cs)   |O(v + e)   | O(v)        |

### Dijkstra’s Shortest Path Algorithm

|                 | Time        | Space       |
| ----------------|:-----------:|:-----------:|
| [Shortest Path](https://github.com/RikamPalkar/DSA/blob/main/Graphs/Dijkstra%20Algorithm/Dijkstra's%20Algorithm.cs)   |O(v^2 + e)   | O(v)        |

### Topological Sort

|                 | Time        | Space       |
| ----------------|:-----------:|:-----------:|
| [Topological Sort](https://github.com/RikamPalkar/DSA-Simplified/blob/main/Graphs/Topological%20Sort/TopologicalSort.cs)   |O(v + e)   | O(v + e)  |

## Heap
|                 | Build Heap  | Insert      |    Remove   |
| ----------------|:-----------:|:-----------:|:-----------:|
| [MinHeap Iterative](https://github.com/RikamPalkar/DSA-Simplified/blob/main/Heap/MinHeap.cs)      | O(n Log(n))      | O(Log(n))      | O(Log(n))     |
| [MaxHeap Recursive](https://github.com/RikamPalkar/DSA-Simplified/blob/main/Heap/MaxHeap.cs)      | O(n Log(n))      | O(Log(n))      | O(Log(n))     |

## LeetCode
|   Leetcode Question     | Solution  | Time Complexity     |    Space Complexity |    Data Structure  |
| ----------------|:-----------:|:-----------:|:-----------:|:-----------:|
| [1. Two Sum](https://leetcode.com/problems/two-sum/)  |  [Two Sum](https://github.com/RikamPalkar/DSA-Simplified/blob/main/LeetCode/1.TwoSums.cs)      | O(n)      | O(n)      |  Array |
# Home Assistant Image Overlays
This is a working demo with some simple instructions on how to use overlays to light up rooms, or parts of a room.

Tested HA-version found in [.HA_VERSION](./.HA_VERSION)

![demo](./README-images/demo.gif?raw=true)

# Demo in Docker
The [example_docker-compose.yaml](./example_docker-compose.yaml) file can be used to create a container that only expose port 9123 with the web interface.

Copy the config-files in this repo to some path and modify the volume-mapping in the compose-file, renamed to docker-compose.yaml

Then start the container with
```bash
docker-compose up -d
```

Now you should be able to access the demo from http://ip.of.docker.host:9123/

# Sweet Home 3D
You need create you


                           "Content-Type: application/x-www-form-urlencoded",
                           "",
                           "text1=me+%26amp%3B+you&text2=Hello%0D%0Aworld%21"},
            EDGE = {"POST /foo HTTP/1.1",
                    "Host: localhost:§§PORT§§",
                    "Connection: keep-alive",
                    "sec-ch-ua: §§SEC_USER_AGENT§§",
                    "sec-ch-ua-mobile: ?0",
                    "sec-ch-ua-platform: \"Windows\"",
                    "Upgrade-Insecure-Requests: 1",
                    "User-Agent: §§USER_AGENT§§",
                    "Accept: §§ACCEPT§§",
                    "Sec-Fetch-Site: same-origin",
                    "Sec-Fetch-Mode: navigate",
                    "Sec-Fetch-User: ?1",
                    "Sec-Fetch-Dest: document",
                    "Referer: http://localhost:§§PORT§§/",
                    "Accept-Encoding: gzip, deflate, br",
                    "Accept-Language: en-US,en;q=0.9",
                    "Origin: http://localhost:§§PORT§§",
                    "Cache-Control: max-age=0",
                    "Content-Length: 48",
                    "Content-Type: application/x-www-form-urlencoded",
                    "",
                    "text1=me+%26amp%3B+you&text2=Hello%0D%0Aworld%21"},
            FF = {"POST /foo HTTP/1.1",
                  "Host: localhost:§§PORT§§",
                  "User-Agent: §§USER_AGENT§§",
                  "Accept: §§ACCEPT§§",
                  "Accept-Language: en-US,en;q=0.5",
                  "Accept-Encoding: gzip, deflate, br",
                  "Connection: keep-alive",
                  "Referer: http://localhost:§§PORT§§/",
                  "Upgrade-Insecure-Requests: 1",
                  "Sec-Fetch-Dest: document",
                  "Sec-Fetch-Mode: navigate",
                  "Sec-Fetch-Site: same-origin",
                  "Sec-Fetch-User: ?1",
                  "Priority: u=0, i",
                  "Origin: http://localhost:§§PORT§§",
                  "Content-Length: 48",
                  "Content-Type: application/x-www-form-urlencoded",
                  "",
                  "text1=me+%26amp%3B+you&text2=Hello%0D%0Aworld%21"},
            FF_ESR = {"POST /foo HTTP/1.1",
                      "Host: localhost:§§PORT§§",
                      "User-Agent: §§USER_AGENT§§",
                      "Accept: §§ACCEPT§§",
                      "Accept-Language: en-US,en;q=0.5",
                      "Accept-Encoding: gzip, deflate, br",
                      "Connection: keep-alive",
                      "Referer: http://localhost:§§PORT§§/",
                      "Upgrade-Insecure-Requests: 1",
                      "Sec-Fetch-Dest: document",
                      "Sec-Fetch-Mode: navigate",
                      "Sec-Fetch-Site: same-origin",
                      "Sec-Fetch-User: ?1",
                      "Priority: u=0, i",
                      "Origin: http://localhost:§§PORT§§",
                      "Content-Length: 48",
                      "Content-Type: application/x-www-form-urlencoded",
                      "",
                      "text1=me+%26amp%3B+you&text2=Hello%0D%0Aworld%21"})
    public void formPost() throws Exception {
        String html = DOCTYPE_HTML
            + "<html><body><form action='foo' method='post' accept-charset='iso-8859-1'>\n"
            + "<input name='text1' value='me &amp; you'>\n"
            + "<textarea name='text2'>Hello\nworld!</textarea>\n"
            + "<input type='submit' id='submit'>\n"
            +


	data1 := []byte{1, 2, 3, 4, 5}
	kbfsOps1 := config1.KBFSOps()
	aNode1, _, err := kbfsOps1.CreateFile(
		ctx, rootNode1, testPPS("a"), false, NoExcl)
	require.NoError(t, err)
	require.NoError(t, err, "Couldn't create dir: %+v", err)
	err = kbfsOps1.Write(ctx, aNode1, data1, 0)
	require.NoError(t, err, "Couldn't write file: %+v", err)
	err = kbfsOps1.SyncAll(ctx, aNode1.GetFolderBranch())
	require.NoError(t, err, "Couldn't sync file: %+v", err)

	// Make two more files that share a block, only one of which will
	// be deleted.
	otherData := []byte{5, 4, 3, 2, 1}
	for _, name := range []data.PathPartString{testPPS("b"), testPPS("c")} {
		node, _, err := kbfsOps1.CreateFile(ctx, rootNode1, name, false, NoExcl)
		require.NoError(t, err, "Couldn't create dir: %+v", err)
		err = kbfsOps1.Write(ctx, node, otherData, 0)
		require.NoError(t, err, "Couldn't write file: %+v", err)
		err = kbfsOps1.SyncAll(ctx, node.GetFolderBranch())
		require.NoError(t, err, "Couldn't sync file: %+v", err)
	}

	// u2 reads the file
	rootNode2 := GetRootNodeOrBust(ctx, t, config2, name, tlf.Private)
	kbfsOps2 := config2.KBFSOps()
	aNode2, _, err := kbfsOps2.Lookup(ctx, rootNode2, testPPS("a"))
	require.NoError(t, err, "Couldn't create dir: %+v", err)
	data2 := make([]byte, len(data1))
	_, err = kbfsOps2.Read(ctx, aNode2, data2, 0)
	require.NoError(t, err, "Couldn't read file: %+v", err)
	if !bytes.Equal(data1, data2) {
		t.Fatalf("Read bad data: %v", data2)
	}
	bNode2, _, err := kbfsOps2.Lookup(ctx, rootNode2, testPPS("b"))
	require.NoError(t, err, "Couldn't create dir: %+v", err)
	data2 = make([]byte, len(data1))
	_, err = kbfsOps2.Read(ctx, bNode2, data2, 0)
	require.NoError(t, err, "Couldn't read file: %+v", err)
	if !bytes.Equal(otherData, data2) {
		t.Fatalf("Read bad data: %v", data2)
	}

	// Remove two of the files
	err = kbfsOps1.RemoveEntry(ctx, rootNode1, testPPS("a"))
	require.NoError(t, err, "Couldn't remove file: %+v", err)
	err = kbfsOps1.RemoveEntry(ctx, rootNode1, testPPS("b"))
	require.NoError(t, err, "Couldn't remove file: %+v", err)
	err = kbfsOps1.SyncAll(ctx, rootNode1.GetFolderBranch())
	require.NoError(t, err, "Couldn't sync file: %+v", err)

	// Wait for outstanding archives
	err = kbfsOps1.SyncFromServer(ctx,
		rootNode1.GetFolderBranch(), nil)
	require.NoError(t, err, "Couldn't sync from server: %+v", err)

	// Get the current set of blocks
	bserverLocal, ok := config1.BlockServer().(blockServerLocal)
	if !ok {
		t.Fatalf("Bad block server")
	}
	preQRBlocks, err := bserverLocal.getAllRefsFor


new SignedInfo(AdfsV4Reference)
            {
                CanonicalizationMethod = "http://www.w3.org/2001/10/xml-exc-c14n#",
                Prefix = "ds"
            };
        }

        public static string X509CertificateKeyId1 { get => "6B740DD01652EECE2737E05DAE36C5D18FCB74C3"; }

        public static string X509CertificateKeyId2 { get => "CF4DFDCDDB05BA2CE905F0552B54E7DB940760ED"; }

        public static string X509CertificateKeyId3 { get => "D92E120951ACF1283D2D2E80A8B22AE83A56FA0F"; }

        public static string X509CertificateKeyIdAdfsV2 { get => "28D1BE71EBAB715A8F53CB9FD9D84C4373CD3708"; }

        public static string X509CertificateKeyIdAdfsV3 { get => "8C3B60F1C93FA3E52AFD41885E7B6C6C4A61C65A"; }

        public static string X509CertificateKeyIdAdfsV4 { get => "D5FE73910389B58BBB3B0EBB87FDF110FF79FEBB"; }

        public static string X509CertificateData1 { get => "MIIDBTCCAe2gAwIBAgIQY4RNIR0dX6dBZggnkhCRoDANBgkqhkiG9w0BAQsFADAtMSswKQYDVQQDEyJhY2NvdW50cy5hY2Nlc3Njb250cm9sLndpbmRvd3MubmV0MB4XDTE3MDIxMzAwMDAwMFoXDTE5MDIxNDAwMDAwMFowLTErMCkGA1UEAxMiYWNjb3VudHMuYWNjZXNzY29udHJvbC53aW5kb3dzLm5ldDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMBEizU1OJms31S/ry7iav/IICYVtQ2MRPhHhYknHImtU03sgVk1Xxub4GD7R15i9UWIGbzYSGKaUtGU9lP55wrfLpDjQjEgaXi4fE6mcZBwa9qc22is23B6R67KMcVyxyDWei+IP3sKmCcMX7Ibsg+ubZUpvKGxXZ27YgqFTPqCT2znD7K81YKfy+SVg3uW6epW114yZzClTQlarptYuE2mujxjZtx7ZUlwc9AhVi8CeiLwGO1wzTmpd/uctpner6oc335rvdJikNmc1cFKCK+2irew1bgUJHuN+LJA0y5iVXKvojiKZ2Ii7QKXn19Ssg1FoJ3x2NWA06wc0CnruLsCAwEAAaMhMB8wHQYDVR0OBBYEFDAr/HCMaGqmcDJa5oualVdWAEBEMA0GCSqGSIb3DQEBCwUAA4IBAQAiUke5mA86R/X4visjceUlv5jVzCn/SIq6Gm9/wCqtSxYvifR


0x294e8: LDR             R1, [SP,#0x40+format]; format\n0x294ec: BL              sprintf\n0x294f0: LDR             R3, [R7]\n0x294f4: ADD             R8, R8, #2\n0x294f8: ADD             R3, R3, #2\n0x294fc: STR             R3, [R7]\n0x29500: B               loc_2949C\n0x29504: MOV             R0, R8; s\n0x29508: MOV             R1, R9; format\n0x2950c: BL              sprintf\n0x29510: LDR             R3, [R7]\n0x29514: ADD             R8, R8, #1\n0x29518: ADD             R3, R3, #1\n0x2951c: STR             R3, [R7]\n0x29520: B               loc_2949C\n0x29524: MOV             R1, #0x3E ; '>'\n0x29528: B               loc_29404\n0x2952c: CMP             R6, #0\n0x29530: BNE             loc_294AC\n0x29534: MOV             R6, #1\n0x29538: SUB             R5, R5, #1\n0x2953c: MOV             R3, R6\n0x29540: B               loc_29428\n0x29544: MOV             R1, #0x3F ; '?'\n0x29548: B               loc_29404"]}, "sub_28044": {"pseudo_code": ["int sub_28044()\n{\n  int v0; // r4\n  int v1; // r12\n  int v2; // r1\n  int v3; // r2\n  int v4; // r3\n  int v5; // r4\n  int v6; // r12\n  int v7; // r1\n  int v8; // r2\n  int v9; // r3\n  int v10; // r4\n  int v11; // r12\n  int v12; // r1\n\n  v0 = 0;\n  sub_83E8(3, \"%s(%d):\\n\", \"ssdp_discovery_advertisement\", 568);\n  while ( 1 )\n  {\n    v1 = sub_27E70(0, v0);\n    v2 = v0;\n    v3 = v1;\n    v4 = 16;\n    ++v0;\n    if ( v1 != 1 )\n      break;\n    if ( sub_27ECC(0, v2, 1, 16) <= 0 )\n      return -11;\n  }\n  v5 = 0;\n  while ( 1 )\n  {\n    v6 = sub_27D3C(0, v5, v3, v4);\n    v7 = v5;\n    v8 = v6;\n    v9 = 17;\n    ++v5;\n    if ( v6 != 1 )\n      break;\n    if ( sub_27ECC(0, v7, 1, 17) <= 0 )\n      return -11;\n  }\n  v10 = 0;\n  do\n  {\n    v11 = sub_27BFC(0, v10, v8, v9);\n    v12 = v10++;\n    if ( v11 != 1 )\n      return 1;\n  }\n  while ( sub_27ECC(0, v12, 1, 18) > 0 );\n  return -11;\n}"], "assembly": ["0x28044: LDR             R1, =(_GLOBAL_OFFSET_TABLE_ - 0x28060)\n0x28048: MOV             R0, #3\n0x2804c: LDR             R2, =(aSsdpSchemasDis - 0x5C9A8); \"ssdp_schemas_discovery_send\"\n0x28050: MOV             R3, #0x238\n0x28054: LDR             R12, =(aSD_3 - 0x5C9A8


emulated or not.

RAMCARTfilename

String specifying the filename of the RAMCart RAM image.

RAMCARTImageWrite

Boolean, if true write back the RAMCart image file automatically, incase the RAM
contents changed, when detaching or quitting the emulator.

RAMCART_RO

Boolean, if true the RAMCart contents are read only.

RAMCARTsize

Integer specifying the size of the RAMCart in KB.
(64, 128)

RRrevision

Integer specifying the RR hardware revision.
(0: Retro Replay, 1: Nordic Replay)

RRFlashJumper

Boolean specifying whether the RR flash jumper is set or not.

RRBankJumper

Boolean specifying whether the RR bank jumper is set or not.

RRBiosWrite

Boolean, if true write back the RR Flash ROM image file automatically, incase the
contents changed, when detaching or quitting the emulator.

RRClockPort

Integer that specifies the clockport device.
(0: None, 1: ETH64-II, 2: RRNet, 3: Silver Surfer, 4: MP3@64, 5: Catweasel MkIII SID)

RRNETMK3_flashjumper

Boolean specifying whether the RRNETMK3 Flash Jumper is set.

RRNETMK3_bios_write

Boolean specifying whether to save the RRNETMK3 bios when changed.

SSRamExpansion

Boolean, if true enable the 32k addon RAM of the Supersnapshot V5

7.1.2.2  C64 cartridge command-line options

-iocollision <method>

Select the way the I/O collisions should be handled
(IOCollisionHandling).
(0: error message and detach all involved carts, 1: error message and detach last attached involved
carts, 2: warning in log and 'AND' the valid return values

+cart

Disable all cartridges (which would eventually be enabled in the config file).

-cartreset

+cartreset

Reset/Do not reset machine if a cartridge is attached or detached
(CartridgeReset=1, CartridgeReset=0).

-cart8 <name>

Attach generic 8KB cartrid


.height,
        expiration: max_voting_period.after(&current_block),
        threshold,
        allow_revoting: false,
        total_power: Uint128::new(100_000_000),
        msgs: vec![CosmosMsg::Stargate {
            type_url: "foo_type".to_string(),
            value: to_binary("foo_bin").unwrap(),
        }],
        status: Status::Open,
        votes: Votes::zero(),
        deposit_info: None,
    };

    assert_eq!(created.proposal, expected);
    assert_eq!(created.id, 1u64);
}

#[test]
fn test_vote_simple() {
    testing::test_simple_votes(do_votes_cw20_balances);
    testing::test_simple_votes(do_votes_cw4_weights);
    testing::test_simple_votes(do_votes_staked_balances)
}

#[test]
fn test_simple_vote_no_overflow() {
    testing::test_simple_vote_no_overflow(do_votes_cw20_balances);
    testing::test_simple_vote_no_overflow(do_votes_staked_balances)
}

#[test]
fn test_vote_no_overflow() {
    testing::test_vote_no_overflow(do_votes_cw20_balances);
    testing::test_vote_no_overflow(do_votes_staked_balances)
}

#[test]
fn test_simple_early_rejection() {
    testing::test_simple_early_rejection(do_votes_cw20_balances);
    testing::test_simple_early_rejection(do_votes_cw4_weights);
    testing::test_simple_early_rejection(do_votes_staked_balances)
}

#[test]
fn test_vote_abstain_only() {
    testing::test_vote_abstain_only(do_votes_cw20_balances);
    testing::test_vote_abstain_only(do_votes_cw4_weights);
    testing::test_vote_abstain_only(do_votes_staked_balances)
}

#[test]
fn test_tricky_rounding() {
    testing::test_tricky_rounding(do_votes_cw20_balances);
    testing::test_tricky_rounding(do_votes_cw4_weights);
    testing::test_tricky_rounding(do_votes_staked_balances)
}

#[test]
fn test_no_double_votes() {
    testing::test_no_double_votes(do_votes_cw20_balances);
    testing::test_no_double_votes(do_votes_cw4_weights);
    testing::test_no_double_votes(do_votes_staked_balances);
}

#[test]
fn test_votes_favor_yes() {
    testing::test_votes_favor_yes(do_votes_cw20_balances);
    testing::test_votes_favor_yes(do_votes_staked_balances);
}

#[test]
fn test_votes_low_threshold() {
    testing::test_votes_low_threshold(do_votes_cw20_balances);
    testing::test_votes_low_threshold(do_votes_cw4_weights);
    testing::test_votes_low_threshold(do_votes_staked_balances)
}

#[test]
fn test_majority_vs_half() {
    testing::test_majority_vs_half(do_votes_cw20_balances);
    testing::test_majority_vs_half(do_votes_cw4_weights);
    testing::test_majority_vs_half(do_votes_staked_balances)
}

#[test]
fn test_pass_threshold_not_quorum() {
    testing::test_pass_threshold_not_quorum(do_votes_cw20_balances);
    testing::test_pass_threshold_not_quorum(do_votes_cw4_weights);
    testing::test_pass_threshold_not_quorum


8.13+build` | `github.com/earthly/earthly:v0.8.13+build/out.bin` | `github.com/earthly/earthly:v0.8.13+COMPILE` |

### Import reference

Finally, the last form of Earthfile referencing is an import reference. Import references may only exist after an `IMPORT` command, which helps resolve the reference to a full Earthfile reference of the types above.

| Import command | Earthfile ref | Target ref | Artifact ref | Function ref |
|----|----|----|----|----|
| `IMPORT <full-earthfile-ref> AS <import-alias>` | `<import-alias>` | `<import-alias>+<target-name>` | `<import-alias>+<target-name>/<artifact-path>` | `<import-alias>+<function-name>` |
| `IMPORT github.com/earthly/earthly/buildkitd` | `buildkitd` | `buildkitd+build` | `buildkitd+build/out.bin` | `buildkitd+COMPILE` |
| `IMPORT github.com/earthly/earthly:v0.8.13` | `earthly` | `earthly+build` | `earthly+build/out.bin` | `earthly+COMPILE` |

Here is an example in an Earthfile:

```Dockerfile
IMPORT github.com/earthly/earthly/buildkitd

...

BUILD buildkitd+buildkitd
```

## Implicit Base Target Reference

All Earthfiles start with a base recipe. This is the only recipe which does not have an explicit target name - the name is always implied to be `base`. All other target implicitly inherit from `base`. You can imagine that all recipes start with an implicit `FROM +base`

```
# base recipe
FROM golang:1.15-alpine3.13
WORKDIR /go-example

build:
    # implicit FROM +base
    RUN echo "Hello World"
```

## Canonical form

Most references have a canonical form. It is essentially the remote form of the same target, with repository and tag inferred. The canonical form can be useful as a universal identifier for a target.

For example, depending on where the files are stored, the `+build` target could have the canonical form `github.com/some-user/some-project/some/deep/dir:master+build`, where `github.com/some-user/some-project` was inferred as the Git location, based on the Git remote called `origin`, and `/some/deep/dir` was inferred as the sub-directory where `+build` exists within that repository. The Earthly tag is inferred using the following algorithm:

* If the current HEAD has at least one Git tag, then use the first Git tag listed by Git, otherwise
* If the repository is not in detached HEAD mode, use the current branch, otherwise
* Use the current Git hash.

If no Git context is detected by Earthly, then the target does not have a canonical form.

# Examples

## Examples of CI integration

Examples of integrating Earthly into various CI systems can be found on the following pages:

* [Circle CI](../ci-integration/guides/circle-integration.md)
* [GitHub Actions](../ci-integration/guides/gh-actions-integration.md)
* [AWS CodeBuild](../ci-integration/guides/codebuild-integration.md)
* [Jenkins](../ci-integration/guides/jenkins.md)
* [Kubernetes](../ci-integration/guides/kubernetes.md)

For more general information on CI systems not listed above, see the [CI integration guide](../ci-integration/overview.md).

## Examples by dev environments

Examples of how Earthly can be integrated into different dev environments

* [GitHub Codespaces](https://github.com/earthly/codespaces-example) - shows how Earthly can be used in GitHub Codespaces and Devcontainers

## Example Earthfiles

In this section, yo


5;
  font-weight: 400;

  color-scheme: light dark;
  color: rgba(255, 255, 255, 0.87);
  background-color: #242424;

  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  font-weight: 500;
  color: #646cff;
  text-decoration: inherit;
}
a:hover {
  color: #535bf2;
}

body {
  margin: 0;
  /* display: flex; */
  place-items: center;
  min-width: 320px;
  min-height: 100vh;
}

h1 {
  font-size: 3.2em;
  line-height: 1.1;
}

button {
  border-radius: 8px;
  border: 1px solid transparent;
  padding: 0.6em 1.2em;
  font-size: 1em;
  font-weight: 500;
  font-family: inherit;
  background-color: #1a1a1a;
  cursor: pointer;
  transition: border-color 0.25s;
}
button:hover {
  border-color: #646cff;
}
button:focus,
button:focus-visible {
  outline: 4px auto -webkit-focus-ring-color;
}

@media (prefers-color-scheme: light) {
  :root {
    color: #213547;
    background-color: #ffffff;
  }
  a:hover {
    color: #747bff;
  }
  button {
    background-color: #f9f9f9;
  }
}

#root {
  height: 100vh;
}.galileodesign-container {
  width: 100%;
  display: flex;
  overflow: auto;
  min-height: 100vh;
  align-items: center;
  flex-direction: column;
}
.galileodesign-galileodesign {
  width: 100%;
  height: auto;
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  background-color: #051120;
  font-family: 'Roboto', sans-serif;

}
.galileodesign-depth0-frame0 {
  width: 100%;
  height: 861px;
  display: flex;
  overflow: hidden;
  align-items: flex-start;
  flex-shrink: 0;
  flex-direction: column;
  background-color: #051120;
}
.galileodesign-depth1-frame0 {
  width: 100%;
  height: 861px;
  display: flex;
  align-items: flex-start;
  flex-shrink: 0;
  flex-direction: column;
}
.galileodesign-depth2-frame0 {
  width: 100%;
  height: 65px;
  display: flex;
  padding: 12px 40px;
  align-items: center;
  flex-shrink: 0;
  border-color: #051120;
  border-style: solid;
  border-width: 0 0 1px;
  justify-content: space-between;
}
.galileodesign-depth3-frame0 {
  gap: 32px;
  width: 93.71875px;
  height: 22.5px;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.galileodesign-depth4-frame0 {
  gap: 16px;
  width: 93.71875px;
  height: 22.5px;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.galileodesign-depth5-frame0 {
  width: 16px;
  height: 16px;
  display: flex;
  align-items: flex-start;
  flex-shrink: 0;
  flex-direc


using Grand.Domain;
using Grand.Domain.Stores;

namespace Grand.Services.Stores
{
    /// <summary>
    /// Store mapping service interface
    /// </summary>
    public partial interface IStoreMappingService
    {
        /// <summary>
        /// Authorize whether entity could be accessed in the current store (mapped to this store)
        /// </summary>
        /// <typeparam name="T">Type</typeparam>
        /// <param name="entity">Wntity</param>
        /// <returns>true - authorized; otherwise, false</returns>
        boo


-> intp(0, 0, 2b)
	.word 0xb5e5e082  ! 1706: SAVE_I	save	%r23, 0x0001, %r26
hwintr_0_77:
!$EV trig_pc_d(0,expr(@VA(.MAIN.hwintr_0_77), 16, 16)) -> intp(0, 0, 24)
	.word 0xb5e5a069  ! 1708: SAVE_I	save	%r22, 0x0001, %r26
	ta	T_CHANGE_HPRIV
	.word 0x819838c3  ! 1709: WRHPR_HPSTATE_I	wrhpr	%r0, 0x18c3, %hpstate
	.word 0xb350c000  ! 1711: RDPR_TT	<illegal instruction>
	mov	0, %r12
	.word 0x8f932000  ! 1713: WRPR_TL_I	wrpr	%r12, 0x0000, %tl
hwintr_0_78:
!$EV trig_pc_d(0,expr(@VA(.MAIN.hwintr_0_78), 16, 16)) -> intp(0, 0, 35)
	.word 0xbf50c000  ! 1725: RDPR_TT	<illegal instruction>
	.word 0xbf520000  ! 1726: RDPR_PIL	<illegal instruction>
hwintr_0_79:
!$EV trig_pc_d(0,expr(@VA(.MAIN.hwintr_0_79), 16, 16)) -> intp(0, 0, 18)
	.word 0xbde4609d  ! 1728: SAVE_I	save	%r17, 0x0001, %r30
	.word 0xb3e5e019  ! 1731: SAVE_I	save	%r23, 0x0001, %r25
	.word 0x8195e1bf  ! 1733: WRPR_TPC_I	wrpr	%r23, 0x01bf, %tpc
hwintr_0_80:
!$EV trig_pc_d(0,expr(@VA(.MAIN.hwintr_0_80), 16, 16)) -> intp(0, 0, 2a)
	.word 0xb7e5a0b6  ! 1736: SAVE_I	save	%r22, 0x0001, %r27
	.word 0xb5e52180  ! 1738: SAVE_I	save	%r20, 0x0001, %r26
	.word 0xbd518000  ! 1740: RDPR_PSTATE	<illegal instruction>
	.word 0xb9e4617d  ! 1741: SAVE_I	save	%r17, 0x0001, %r28
	.word 0xb8bc6121  ! 1743: XNORcc_I	xnorcc 	%r17, 0x0121, %r28
	.word 0xbfe5e0bf  ! 1745: SAVE_I	save	%r23, 0x0001, %r31
	.word 0xb7e5e184  ! 1746: SAVE_I	save	%r23, 0x0001, %r27
	.word 0xbf520000  ! 1747: RDPR_PIL	<illegal instruction>
	.word 0x8194e0c7  ! 1748: WRPR_TPC_I	wrpr	%r19, 0x00c7, %tpc
	.word 0xbd540000  ! 1749: RDPR_GL	<illegal instruction>
	.word 0xbb540000  ! 1750: RDPR_GL	<illegal instruction>
	.word 0xb0bca10c  ! 1751: XNORcc_I	xnorcc 	%r18, 0x010c, %r24
	.word 0x9195200a  ! 1752: WRPR_PIL_I	wrpr	%r20, 0x000a, %pil
	.word 0xb9e5a144  ! 1753: SAVE


/*
 Copyright (c) 1999-2014 OPEN CASCADE SAS

 This file is part of Open CASCADE Technology software library.

 This library is free software; you can redistribute it and/or modify it under
 the terms of the GNU Lesser General Public License version 2.1 as published
 by the Free Software Foundation, with special exception defined in the file
 OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
 distribution for complete text of the license and disclaimer of any warranty.

 Alternatively, this file may be used under the terms of Open CASCADE
 commercial license or contractual agreement.
*/

/*  Grouping of "C" sources for compilation   */
#include <stdio.h>
#include "igesread.h"
#include <OSD_OpenFile.hxx>

/*
void IGESFile_Check21 (int mode,char * code, int num, char * str);
*/
void IGESFile_Check3 (int mode,char * code);
void IGESFile_Check2 (int mode,char * code, int num, char * str);

/*  #include "structiges.c"    ...  done by analiges which uses it  ...  */
void iges_initfile();
int  iges_lire (FILE* lefic, int *numsec, char ligne[100], int modefnes);
void iges_newparam(int typarg,int longval, char *parval);
void iges_param(int *Pstat,char *ligne,char c_separ,char c_fin,int lonlin);
void iges_Dsect (int *Dstat,int numsec,char* ligne);
void iges_Psect(int numsec,char ligne[80]);

/*  General reading routine for an IGES file
    Ensures the chaining of necessary calls
    Results in a set of data (struct C) queryable by
    ad hoc routines (see igesread.h which summarizes them for C++ call)

    Returns: 0 if OK, 1 if file could not be opened
  */

/* MGE 16/06/98*/
/* To use strcpy*/
/*#include <string.h>*/
/* To use Msg class */
/*#include <MoniTool_Msg.hxx>*/

static  char sects [] = " SGDPT ";

int igesread (char* nomfic, int lesect[6], int modefnes)
{
  /* MGE 16/06/98 */

  FILE* lefic; char ligne[100]; int numsec, numl;  int i; int i0;int j;
  char str[2];

  int Dstat = 0; int Pstat = 0; char c_separ = ','; char c_fin = ';';
  iges_initfile();
  lefic = stdin; i0 = numsec = 0;  numl = 0;
  if (nomfic[0] != '\0')
    lefic = OSD_OpenFile(nomfic,"r");
  if (lefic == NULL) return -1;    /*  file could not be opened  */
  for (i = 1; i < 6; i++) lesect[i] = 0;
  for (j = 0; j < 100; j++) ligne[j] = 0;
  for(;;) {
    numl ++;
    i = iges_lire(lefic,&numsec,ligne,modefnes);
    if (i <= 0 || i < i0) {
      if (i  == 0) break;
      /* Sending of message : Syntax error */
      {
        str[1] = '\0';
        str[0] = sects[i0];
        IGESFile_Check2 (0,"XSTEP_18",numl,str); /* //gka 15 Sep 98: str instead of sects[i0]); */
      }

      if (i0 == 0)
      {
        fclose(lefic);
        return -1;
      }
      lesect[i0] ++;
      continue;
    }
    lesect[i] ++;  i0 = i;
    if (numsec != lesect[i]) {
      /* Sending of message : Syntax error */
      str[1] = '\0';
      str[0] = sects[i0];
      IGESFile_Check2 (0,"XSTEP_19",numl,str); /* //gka 15 Sep 98: str instead of sects[i0]); */
    }

    if (i == 1) {                                   /* Start Section (comm.) */
      ligne[72] = '\0';
      iges_newparam (0,72,ligne);
    }
    if (i == 2) {                                   /* Header (Global sect) */
      iges_setglobal();
      for (;;) {
        if (lesect[i] == 1) {    /* Specific separation */
          int n0 = 0;
          if (ligne[0] != ',') {  c_separ = ligne[2]; n0 = 3;  }
          if (ligne[n0+1] != c_separ) { c_fin = ligne[n0+3]; }
        }
        iges_param(&Pstat,ligne,c_separ,c_fin,72);
        if (Pstat != 2) break;
      }
    }
    if (i == 3) iges_Dsect(&Dstat,numsec,ligne);    /* Directory  (Dsect) */
    if (i == 4) {                                   /* Parameters (Psect) */
      iges_Psect(numsec,ligne);
      for (;;) {
        iges_param(&Pstat,ligne,c_separ,c_fin,64);
        if (Pstat != 2) break;
      }
    }
  }

  /* Sending of message : No Terminal Section */
  if (lesect[5] == 0) {
    IGESFile_Check3 (1, "XSTEP_20");
    //return -1;
  }

  fclose (lefic);

  return 0;
}


DetectedStrawberriesIncludingUntracked = TotalStrawberriesIncludingUntracked;
            if (MapData != ParentMapData)
                ParentMapData.DetectedStrawberriesIncludingUntracked = ParentMapData.DetectedStrawberriesIncludingUntracked + TotalStrawberriesIncludingUntracked;
        }
    }
}


double yb3 = trns21*xb3d + trns22*yb3d + trns23*zb3d;
        double zb3 = trns31*xb3d + trns32*yb3d + trns33*zb3d;
        double xc3 = trns11*xc3d + trns12*yc3d + trns13*zc3d;
        double yc3 = trns21*xc3d + trns22*yc3d + trns23*zc3d;
        double zc3 = trns31*xc3d + trns32*yc3d + trns33*zc3d;

        xp0[0] = xcom + xa3;
        xp0[1] = ycom + ya3;
        xp0[2] = zcom + za3;
        xp1[0] = xcom + xb3 - xb0;
        xp1[1] = ycom + yb3 - yb0;
        xp1[2] = zcom + zb3 - zb0;
        xp2[0] = xcom + xc3 - xc0;
        xp2[1] = ycom + yc3 - yc0;
        xp2[2] = zcom + zc3 - zc0;

        // Record the new positions.

        atomCoordinatesP[atom1[index]] = xp0+apos0;
        atomCoordinatesP[atom2[index]] = xp1+apos1;
        atomCoordinatesP[atom3[index]] = xp2+apos2;
    }
}

void ReferenceSETTLEAlgorithm::applyToVelocities(vector<OpenMM::Vec3>& atomCoordinates, vector<OpenMM::Vec3>& velocities, vector<double>& inverseMasses, double tolerance) {
    for (int index = 0; index < (int) atom1.size(); ++index) {
        Vec3 apos0 = atomCoordinates[atom1[index]];
        Vec3 apos1 = atomCoordinates[atom2[index]];
        Vec3 apos2 = atomCoordinates[atom3[index]];
        Vec3 v0 = velocities[atom1[index]];
        Vec3 v1 = velocities[atom2[index]];
        Vec3 v2 = velocities[atom3[index]];

        // Compute intermediate quantities: the atom masses, the bond directions, the relative velocities,
        // and the angle cosines and sines.

        double mA = masses[atom1[index]];
        double mB = masses[atom2[index]];
        double mC = masses[atom3[index]];
        Vec3 eAB = apos1-apos0;
        Vec3 eBC = apos2-apos1;
        Vec3 eCA = apos0-apos2;
        eAB /= sqrt(eAB[0]*eAB[0] + eAB[1]*eAB[1] + eAB[2]*eAB[2]);
        eBC /= sqrt(eBC[0]*eBC[0] + eBC[1]*eBC[1] + eBC[2]*eBC[2]);
        eCA /= sqrt(eCA[0]*eCA[0] + eCA[1]*eCA[1] + eCA[2]*eCA[2]);
        double vAB = (v1[0]-v0[0])*eAB[0] + (v1[1]-v0[1])*eAB[1] + (v1[2]-v0[2])*eAB[2];
        double vBC = (v2[0]-v1[0])*eBC[0] + (v2[1]-v1[1])*eBC[1] + (v2[2]-v1[2])*eBC[2];
        double vCA = (v0[0]-v2[0])*eCA[0] + (v0[1]-v2[1])*eCA[1] + (v0[2]-v2[2])*eCA[2];
        double cA = -(eAB[0]*eCA[0] + eAB[1]*eCA[1] + eAB[2]*eCA[2]);
        double cB = -(eAB[0]*eBC[0] + eAB[1]*eBC[1] + eAB[2]*eBC[2]);
        double cC = -(eBC[0]*eCA[0] + eBC[1]*eCA[1] + eBC[2]*eCA[2]);
        double s2A = 1-cA*cA;
        double s2B = 1-cB*cB;


e useful, but WITHOUT ANY WARRANTY;
 * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 * See the GNU Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License along with DataGear.
 * If not, see <https://www.gnu.org/licenses/>.
 */

:root{
	--danger-color: #f44336; /*同p-error样式*/
}

.logo{
	background-image: url(image/logo.png);
}

/*滚动条*/
*::-webkit-scrollbar-thumb{
	background-color: var(--surface-300);
}

/*代码编辑器*/
.cm-s-custom span.cm-attribute { color: var(--indigo-600); }

/*企业版菜单项*/
.p-menuitem.enterprise-menuitem .p-menuitem-link span{
	background-color: #FBC02D;
    color: #212529;
}
.grid{display:flex;flex-wrap:wrap;margin-right:-0.5rem;margin-left:-0.5rem;margin-top:-0.5rem}.grid>.col,.grid>[class*=col]{box-sizing:border-box}.grid-nogutter{margin-right:0;margin-left:0;margin-top:0}.grid-nogutter>.col,.grid-nogutter>[class*=col-]{padding:0}.col{flex-grow:1;flex-basis:0;padding:.5rem}.col-fixed{flex:0 0 auto;padding:.5rem}.col-1{flex:0 0 auto;padding:.5rem;width:8.3333%}.col-2{flex:0 0 auto;padding:.5rem;width:16.6667%}.col-3{flex:0 0 auto;padding:.5rem;width:25%}.col-4{flex:0 0 auto;padding:.5rem;width:33.3333%}.col-5{flex:0 0 auto;padding:.5rem;width:41.6667%}.col-6{flex:0 0 auto;padding:.5rem;width:50%}.col-7{flex:0 0 auto;padding:.5rem;width:58.3333%}.col-8{flex:0 0 auto;padding:.5rem;width:66.6667%}.col-9{flex:0 0 auto;padding:.5rem;width:75%}.col-10{flex:0 0 auto;padding:.5rem;width:83.3333%}.col-11{flex:0 0 auto;padding:.5rem;width:91.6667%}.col-12{flex:0 0 auto;padding:.5rem;width:100%}@media screen and (min-width: 576px){.sm\:col{flex-grow:1;flex-basis:0;padding:.5rem}.sm\:col-fixed{flex:0 0 auto;padding:.5rem}.sm\:col-1{flex:0 0 auto;padding:.5rem;width:8.3333%}.sm\:col-2{flex:0 0 auto;padding:.5rem;width:16.6667%}.sm\:col-3{flex:0 0 auto;padding:.5rem;width:25%}.sm\:col-4{flex:0 0 auto;padding:.5rem;width:33.3333%}.sm\:col-5{flex:0 0 auto;padding:.5rem;width:41.6667%}.sm\:col-6{flex:0 0 auto;padding:.5rem;width:50%}.sm\:col-7{flex:0 0 auto;padding:.5rem;width:58.3333%}.sm\:col-8{flex:0 0 auto;padding:.5rem;width:66.6667%}.sm\:col-9{flex:0 0 auto;padding:.5rem;width:75%}.sm\:col-10{flex:0 0 auto;padding:.5rem;width:83.3333%}.sm\:col-11{flex:0 0 auto;padding:.5rem;width:91.6667%}.sm\:col-12{flex:0 0 auto;padding:.5rem;width:100%}}@media screen and (min-width: 768px){.md\:col{flex-grow:1;flex


FActPtr[0] = jnr3, 3, FACTION
	} ;;
//	INNER LOOP 3
	{	.mfi
	(pPipe[0])	ldfd	JX = [posPtr], 8
	(pPipe[1])	fsub	DZ[1] = IZ, DZ[1]
	(pPipe[0])	shladd	chargePtr = jnr, 3, CHARGE
	}
	{  	.mfi
				nop		0x0
	(pPipe[2])	fmpy	RInvErr[0] = RInv[1], RSqr[1]
				nop		0x0
	} ;;
//	INNER LOOP 4
	{	.mfi
	(pPipe[0])	ldfd	JY = [posPtr], 8
	(pPipe[3])	fmpy	RInvT[1] = fHALF, RInv[2]
				nop		0x0
	}
	{	.mfi
	(pJJNR)		ld4		jnr = [jjnrPtr], 4
	(pPipe[4])	fcvt.fx.trunc n0[0] = RT[1]
	(pPipe[0])	add	Ninner = 1, Ninner
	} ;;
//	INNER LOOP 5
	{	.mfi
	(pPipe[0])	ldfd	JZ = [posPtr], 8
	(pPipe[1])	fmpy	RSqr[0] = DX[1], DX[1]
				nop		0x0
	}
	{	.mfi
				nop		0x0
	(pPipe[3])	fnma	RInvErr[1] = RInvErr[1], RInv[2], fOne
				nop		0x0
	} ;;
//	INNER LOOP 6
	{	.mfi
	(pPipe[3])	ldfd	FActX[0] = [FActPtr[3]], 8
	(pPipe[7])	fnma	FActX[4] = F[2], DX[7], FActX[4]
	(pJJNR)     add     jjnrPtr = JJNR_PREFETCH_DISTANCE, jjnrPtr
	}
	{	.mfi
				nop		0x0
	(pPipe[7])	fnma	FActY[4] = F[2], DY[7], FActY[4]
				nop		0x0
	} ;;
//	INNER LOOP 7
	{	.mfi
	(pPipe[3])	ldfd	FActY[0] = [FActPtr[3]], 8
	(pPipe[2])	fnma	RInvErr[0] = RInvErr[0], RInv[1], fOne
				nop		0x0
	}
	{	.mfi
				nop		0x0
	(pPipe[6])	fma		G[1] = eps[1], H[1], G[1]
				nop		0x0
	} ;;

//	INNER LOOP 8
	{	.mfi
	(pPipe[3])	ldfd	FActZ[0] = [FActPtr[3]], -16
	(pPipe[7])	fnma	FActZ[4] = F[2], DZ[7], FActZ[4]
				nop		0x0
	}
	{	.mfi
	(pPipe[4])	getf.sig	nnn = n0[0]
	(pPipe[4])	fcvt.xf 	n0[0] = n0[0]
				nop			0x0
	} ;;
//	INNER LOOP 9
	{	.mfi
	(pPipe[0])	ldfd	Charge[0] = [chargePtr]


\n\t\t\t\tdiscard;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\talpha *= min(max(distToStart + 1., 0.), 1.);\n\t\t}\n\n\t\tif (enableEndMiter == 1.) {\n\t\t\tdistToEnd = distToLine(gl_FragCoord.xy, endCutoff.xy, endCutoff.zw);\n\t\t\tif (distToEnd < -1.) {\n\t\t\t\tdiscard;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\talpha *= min(max(distToEnd + 1., 0.), 1.);\n\t\t}\n\t}\n\n\t// round miter\n\telse if (miterMode == 2.) {\n\t\tif (enableStartMiter == 1.) {\n\t\t\tdistToStart = distToLine(gl_FragCoord.xy, startCutoff.xy, startCutoff.zw);\n\t\t\tif (distToStart < 0.) {\n\t\t\t\tfloat radius = length(gl_FragCoord.xy - startCoord);\n\n\t\t\t\tif(radius > cutoff + .5) {\n\t\t\t\t\tdiscard;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\talpha -= smoothstep(cutoff - .5, cutoff + .5, radius);\n\t\t\t}\n\t\t}\n\n\t\tif (enableEndMiter == 1.) {\n\t\t\tdistToEnd = distToLine(gl_FragCoord.xy, endCutoff.xy, endCutoff.zw);\n\t\t\tif (distToEnd < 0.) {\n\t\t\t\tfloat radius = length(gl_FragCoord.xy - endCoord);\n\n\t\t\t\tif(radius > cutoff + .5) {\n\t\t\t\t\tdiscard;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\talpha -= smoothstep(cutoff - .5, cutoff + .5, radius);\n\t\t\t}\n\t\t}\n\t}\n\n\tfloat t = fract(dot(tangent, gl_FragCoord.xy) / dashSize) * .5 + .25;\n\tfloat dash = texture2D(dashPattern, vec2(t, .5)).r;\n\n\tgl_FragColor = fragColor;\n\tgl_FragColor.a *= alpha * opacity * dash;\n}\n"]),attributes:{lineEnd:{buffer:r,divisor:0,stride:8,offset:0},lineTop:{buffer:r,divisor:0,stride:8,offset:4},aColor:{buffer:t.prop("colorBuffer"),stride:4,offset:0,divisor:1},bColor:{buffer:t.prop("colorBuffer"),stride:4,offset:4,divisor:1},prevCoord:{buffer:t.prop("positionBuffer"),stride:8,offset:0,divisor:1},aCoord:{buffer:t.prop("positionBuffer"),stride:8,offset:8,divisor:1},bCoord:{buffer:t.prop("positionBuffer"),stride:8,offset:16,divisor:1},nextCoord:{buffer:t.prop("positionBuffer"),stride:8,offset:24,divisor:1}}},n))}catch(t){e=i}return{fill:t({primitive:"triangle",elements:function(t,e){return e.triangles},offset:0,vert:o(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec2 position, positionFract;\n\nuniform vec4 color;\nuniform vec2 scale, scaleFract, translate, translateFract;\nuniform float pixelRatio, id;\nuniform vec4 viewport;\nuniform float opacity;\n\nvarying vec4 fragColor;\n\nconst float MAX_LINES = 256.;\n\nvoid main() {\n\tfloat depth = (MAX_LINES - 4


indirect light

HemisphereLight
Gradient indirect light

ProbeGrid
An uniform grid of light-probes

SimpleModel
A Model containing a single simple geometry

GLTFModel
A Model that has a GLTF style internal structure.

Scene
3D Object collection for rendering

Fog
Represents the particle substance in the air

GLRenderer
Manages rendering routines, including shaders

GLRenderTarget
An off-screen render target.

CubeRenderTarget
A cubemap render target.

BoundingVolumeHierarchy
Acceleration structure for ray-casting.

GamePlayer
Wrapper for the host GamePlayer object.

FileLoader
Provides a few interfaces to loading local files.

ImageLoader
Provides a few interfaces to load images.

DDSImageLoader
Provides a few interfaces to load dds-images.

HDRImageLoader
Provides a few interfaces to load HDR images.

GLTFLoader
Provides a few interfaces to load GLTF models.

ImageSaver
Provides a few interfaces to save images. (PC only)

Engine Classes (Network)

Class Name
Description

HttpClient
Provides a few interfaces to make HTTP requests.

Engine Classes (GUI)

Class Name
Description

UIManager
M


nd get attention scores
        output_text, collected_attentions = greedy_decode(input_text, model, tkn,
                                                          max_new_tokens=MAX_NEW_TOKENS_GENERATION)
        output_text = input_text + output_text

        print(f"Generated text: {output_text}")
        print(f"Number of decode steps for which attentions were collected: {len(collected_attentions)}")

        # 4. Process attention scores for each step (if any were collected)
        all_steps_processed_attns = []
        if collected_attentions:
            for step_idx, attn_map_one_step in enumerate(collected_attentions):
                print(f"  Processing attentions for decode step {step_idx + 1}:")
                # attn_map_one_step is a tuple of layer attentions for this decode step
                # Each layer_attn tensor is (batch_size, num_heads, 1, key_len_at_this_step)
                # processed_layer_attns_for_step = cumsum_attn_score_for_each_layer(attn_map_one_step)
                # all_steps_processed_attns.append(processed_layer_attns_for_step)
                #
                # # Visualize for this step
                # for layer_idx, cumsum_attn_tensor in enumerate(processed_layer_attns_for_step):
                #     print(f"    Layer {layer_idx + 1} processed cumsum attention shape: {cumsum_attn_tensor.shape}")
                #     vis_cumsum_attn_for_each_layer_each_step(
                #         step_idx, layer_idx, cumsum_attn_tensor
                #     )
                sim_cal_step += 1
                for layer_i in range(model.config.num_hidden_layers):
                    for layer_j in range(layer_i, model.config.num_hidden_layers):
                        sim_ij = cal_attn_map_similarity(attn_map_one_step[layer_i], attn_map_one_step[layer_j])
                        layers_sim[layer_i, layer_j] += sim_ij
                        # 可视化
        else:
            print("No attention scores were collected (e.g., max_new_tokens was small or EOS met early).")
        # `all_steps_processed_attns` is now a list (decode steps) of lists (layers)
        # where each inner element is a tensor of shape (batch_size, key_len_at_that_step)

    layers_sim /= sim_cal_step
    vis_layer_similarity_matrix(layers_sim)


using System;
using System.Collections.Generic;
using System.Text;

namespace Substrate.Entities
{
    using Substrate.Nbt;

    public class EntityPig : EntityAnimal
    {
        public static readonly SchemaNodeCompound PigSchema = AnimalSchema.MergeInto(new SchemaNodeCompound("")
        {
            new SchemaNodeString("id", TypeId),
            new SchemaNodeScaler("Saddle", TagType.TAG_BYTE),
        });

        public static new string TypeId
        {
            get { return "Pig"; }
        }

        private bool _saddle;

        public bool HasSaddle
        {
            get { return _saddle; }
            set { _saddle = value; }
        }

        protected EntityPig (string id)
            : base(id)
        {
        }

        public EntityPig ()
            : this(TypeId)
        {
        }

        public EntityPig (TypedEntity e)
            : base(e)
        {
            EntityPig e2 = e as EntityPig;
            if (e2 != null) {
                _


"লুক্সেমবার্গ রুপান্তযোগ্য ফ্রাঙ্ক","LUF":"লুক্সেমবার্গ ফ্রাঙ্ক","LUL":"লুক্সেমবার্গ ফাইনেনশিয়াল ফ্রাঙ্ক","LVL":"ল্যাটভিয়ান ল্যাট্‌স","LVR":"ল্যাটভিয়ান রুবল","LYD":"লিবিয়ান দিনার","MAD":"মোরোক্কান দিরহাম","MAF":"মোরোক্কান ফ্রাঙ্ক","MCF":"MCF","MDC":"MDC","MDL":"মোল্ডোভান লেয়ু","MGA":"মাদাগাস্কার আরিয়ারি","MGF":"মাদাগাস্কার ফ্রাঙ্ক","MKD":"ম্যাসেডোনিয়ান দিনার","MKN":"MKN","MLF":"মালি ফ্রাঙ্ক","MMK":"মায়ানমার কিয়াত","MNT":"মঙ্গোলিয়ান তুগরিক","MOP":"ম্যাক্যাও পাটাকা","MRO":"মৌরিতানিয়ান ওউগুইয়া (১৯৭৩–২০১৭)","MRU":"মৌরিতানিয়ান ওউগুইয়া","MTL":"মাল্টা লিরা","MTP":"মাল্টা পাউন্ড","MUR":"মৌরিতানিয়ান রুপি","MVP":"MVP","MVR":"মালদিভিয়ান রুফিয়া","MWK":"মালাউইয়ান কওয়াচ","MXN":"ম্যাক্সিকান পেসো","MXP":"ম্যাক্সিকান সিলভার পেসো (১৮৬১–১৯৯২)","MXV":"মেক্সিকান উনিদাদ দি ইনভার্সান (UDI)","MYR":"মালয়েশিয়ান রিঙ্গিৎ","MZE":"মোজাম্বিক এসকুডো","MZM":"প্রাচীন মোজাম্বিক মেটিকেল","MZN":"মোজাম্বি�


/******************************************************************************
 *
 * Copyright(c) 2019 Realtek Corporation.
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of version 2 of the GNU General Public License as
 * published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
 * more details.
 *
 *****************************************************************************/
#ifndef _PHL_CUSTOM_FB_H_
#define _PHL_CUSTOM_FB_H_

#ifdef CONFIG_PHL_CUSTOM_FEATURE_FB
#define TX_PKT_CYCLE (10)

#define	FC_QOS_BIT			BIT7
#define GET_80211_HDR_TO_DS(_hdr)	LE_BITS_TO_2BYTE(_hdr, 8, 1)
#define GET_80211_HDR_FROM_DS(_hdr)	LE_BITS_TO_2BYTE(_hdr, 9, 1)
#define GET_80211_HDR_WEP(_hdr)		LE_BITS_TO_2BYTE(_hdr, 14, 1)
#define GET_80211_HDR_ORDER(_hdr)	LE_BITS_TO_2BYTE(_hdr, 15, 1)
#define IS_DATA_FRAME(pdu)		( ((EF1Byte(pdu[0]) & 0x0C)==0x08) ? TRUE : FALSE )
#define	IS_QOS_DATA_FRAME(pdu)		(IS_DATA_FRAME(pdu) && (EF1Byte(pdu[0]) & FC_QOS_BIT) )

enum _fackbook_test_mode {
	FB_TEST_MODE_FAKE_TX_CYCLE = BIT0,
	FB_TEST_MODE_USE_STA_MAC = BIT1,
};

struct _facebook_init_param {
	u32 enable;
	u32 test_mode;
	struct rtw_wifi_role_t *wifi_role;
};

struct _facebook_bcn_param {
	u32 enable;
	u8 cus_wmode;
};
struct _custom_facebook_ctx {
	struct _facebook_init_param init;
	struct _facebook_bcn_param bcn_param;
};

enum phl_mdl_ret_code
phl_custom_hdl_fb_evt(void* dispr,
                      void* custom_ctx,
                      struct _custom_facebook_ctx* fb_ctx,
                      struct phl_msg* msg);
enum phl_mdl_ret_code
phl_custom_hdl_fb_fail_evt(void* dispr,
                           void* custom_ctx,
                           struct _custom_facebook_ctx* fb_ctx,
                           struct phl_msg* msg);

enum phl_mdl_ret_code
phl_custom_fb_update_opt_ie(void* dispr,
                            void* custom_ctx,
                            struct _custom_facebook_ctx* fb_ctx,
                            struct phl_module_op_info* info);

enum phl_mdl_ret_code
phl_custom_fb_set_role_cap(void* dispr,
                           void* custom_ctx,
                           struct _custom_facebook_ctx* fb_ctx,
                           struct phl_module_op_info* info);

enum rtw_phl_status
phl_custom_fb_init_role_cap(struct phl_info_t *phl_info,
                            u8 hw_band,
                            struct role_cap_t *role_cap);
#else
#define phl_custom_fb_update_opt_ie(_dispr, _ctx, _fb_ctx, _info) (MDL_RET_SUCCESS)
#define phl_custom_fb_set_role_cap(_dispr, _ctx, _fb_ctx, _info) (RTW_PHL_STATUS_SUCCESS)
#define phl_custom_fb_init_role_cap(_phl_info, _hw_band, _role_cap) (RTW_PHL_STATUS_SUCCESS)
#endif

#endif  /*_PHL_CUSTOMIZE_FEATURE_H_*/


panic(err)
		}
	}
	return &channel.Transaction{
		State: state,
		Sigs:  sigs,
	}
}

// ShuffleBalances shuffles the balances of the participants per asset
// and returns it. The returned `Balance` has the same `Sum()` value.
func ShuffleBalances(rng *rand.Rand, b channel.Balances) channel.Balances {
	ret := b.Clone()
	for _, a := range ret {
		rng.Shuffle(len(a), func(i, j int) {
			a[i], a[j] = a[j], a[i]
		})
	}
	return ret
}

// NewRandomTimeout creates a new random timeout object.
func NewRandomTimeout(rng *rand.Rand) channel.Timeout {
	return &channel.TimeTimeout{
		Time: time.Unix(rng.Int63(), rng.Int63()),
	}
}
package internal

import (
	"datalock/mock"
	"datalock/model"
	"datalock/pkg/logger"
	"encoding/base64"
	"encoding/json"
	"testing"

	"github.com/hyperledger/fabric-chaincode-go/shim"
	"github.com/hyperledger/fabric-chaincode-go/shimtest"
	"github.com/stretchr/testify/assert"
)

func TestE2E(t *testing.T) {
	is := assert.New(t)
	logger.NewAppLogger("DEBUG")
	emCCName := "EmissionsCC"
	emStub := shimtest.NewMockStub(emCCName, mock.MockEmissionsCC{})
	loadMockEmissions(emStub)

	txStub := shimtest.NewMockStub("dataLockCC", &DataLockChaincode{})
	txStub.Invokables[emCCName] = emStub

	// starting tx processing
	// getValidEmissionsRecord
	// put minted token
	// end processing

	// start processing
	// update tokenID of records
	// end tx processing
	const txID = "txID-1"
	const mockID = "mockID"
	// 1.
	resp := txStub.MockInvoke(mockID, stringArgsToByte([]string{"startTransitionProcess", txID}))
	is.Equal(shim.OK, int(resp.Status))

	// 2.
	input := model.StageUpdateInput{
		TxID: txID,
		Name: "GetValidEmissions",
		DataLocks: map[string]model.DataChaincodeInput{
			emCCName: {
				Keys:   []string{"uuid-1", "uuid-2", "uuid-5"},
				Params: []string{"getValidEmissions", "uuid-1", "uuid-2", "uuid-5"},
			},
		},
		IsLast: false,
	}
	raw, _ := json.Marshal(input)
	resp = txStub.MockInvoke(mockID, stringArgsToByte(
		[]string{"stageUpdate", string(raw)},
	))
	var output model.StageUpdateOutput
	err := json.Unmarshal(resp.Payload, &output)
	is.NoError(err)
	{
		// check output
		is.NotNil(resp.Payload)
		raw, err = base64.StdEncoding.DecodeString(output.DataLocks[emCCName])
		is.NoError(err)
		var dataCCOutput []mock.Emissions
		json.Unmarshal(raw, &dataCCOutput)
		is.Len(dataCCOutput, 2)
	}
	{
		// check tx details
		resp := txStub.MockInvoke(mockID, stringArgsToByte([]string{"getTxDetails", txID}))
		var tx model.Transaction
		err = json.Unmarshal(resp.Payload, &tx)
		is.NoError(err)
		is.Equal(tx.State, model.TxStatePROCESSING)
		is.Equal(input.Name, tx.CurrentStage)
		data, ok := tx.StageData[input


 que le cubre la nuca y el cuello; es carnívoro y habita en manada en desiertos y estepas de África y la India.",
    img: "assets/img/leon.jpg",
    aparicion: "1964-01-01",
    habitat: "Terrestre"
  },
  {
    nombre: "Hipopotamo",
    bio: "Mamífero paquidermo de unos 4 m de longitud, cuerpo muy voluminoso, piel gruesa negruzca y casi sin pelo, patas gruesas y cortas, cabeza con boca enorme y orejas pequeñas; nada bien, se alimenta de vegetales y vive en pequeños grupos en los grandes ríos y lagos africanos.",
    img: "assets/img/hipopotamo.jpg",
    aparicion: "1962-05-01",
    habitat:"Terrestre"
  },
  {
    nombre: "Rinoceronte",
    bio: "Mamífero paquidermo de hasta 5 metros de longitud, muy corpulento, de piel desnuda muy gruesa y rígida de color gris o castaño; tiene patas cortas y robustas con tres dedos, cabeza alargada, cola corta y uno o dos grandes cuernos curvados en la línea media de la nariz; es nocturno y solitario, y vive en Asia y África.",
    img: "assets/img/rinoceronte.jpg",
    aparicion: "1940-06-01",
    habitat: "Terrestre"
  },
  {
    nombre: "Cocodrilo",
    bio: "Crocodylidae es una familia de saurópsidos arcosaurios comúnmente conocidos como cocodrilos. Incluye a catorce especies actuales. Se trata de grandes reptiles semiacuáticos que viven en las regiones tropicales de África, Asia, América y Australia.",
    img: "assets/img/cocodrilo.jpg",
    aparicion: "1962-08-01",
    habitat: "Acuático"
  },
  {
    nombre: "Mamba Negra",
    bio: "La mamba negra (Dendroaspis polylepis) es una especie de serpiente de la familia Elapidae extremadamente venenosa que habita en diversas zonas del África subsahariana. Descrita formalmente por Albert Günther en 1864, es la segunda serpiente venenosa de mayor tamaño, después de la cobra real; aunque hay informes de ejemplares de algo más de cuatro metros, los adultos normalmente miden entre dos y tres metros. El color de su piel varía de gris a marrón oscuro; los ejemplares jóvenes tienden a ser más pálidos que los adultos y se oscurecen con la edad.",
    img: "assets/img/mamba negra.jpg",
    aparicion: "1974-11-01",
    habitat: "Terrestre"
  },
  {
    nombre: "Oso Panda",
    bio: "El panda, oso panda o panda gigante (Ailuropoda melanoleuca) es una especie de mamífero del orden de los carnívoros y aunque hay una gran controversia al respecto, los últimos estudios de su ADN lo engloban entre los miembros de la familia de los osos (Ursidae), siendo el oso de anteojos su pariente más cercano, si bien este pertenece a la subfamilia de los tremarctinos.",
    img: "assets/img/oso panda.jpg",
    aparicion: "1974-11-01",
    habitat: "Terrestre"
  },
  {
    nombre: "Tiburón Blanco",
    bio: "El tiburón blanco es una especie de pez cartilaginoso lamniforme de la familia Lamnidae. Vive en las aguas cálidas y templadas de casi todos los océanos. Esta especie es la única del género Carcharodo


AnyKey: function() {
    var h = $H({ _each: 'E', map: 'M', keys: 'K', pluck: 'P', unset: 'U' });
    this.assertEnumEqual($w('_each keys map pluck unset'), h.keys().sort());
    this.assertEqual('U', h.unset('unset'));
    this.assertHashEqual({ _each: 'E', map: 'M', keys: 'K', pluck: 'P' }, h);
  },

  testHashToTemplateReplacements: function() {
    var template = new Template("#{a} #{b}"), hash = $H({ a: "hello", b: "world" });
    this.assertEqual("hello world", template.evaluate(hash.toObject()));
    this.assertEqual("hello world", template.evaluate(hash));
    this.assertEqual("hello", "#{a}".interpolate(hash));
  },

  testPreventIterationOverShadowedProperties: function() {
    // redundant now that object is systematically cloned.
    var FooMaker = function(value) {
      this.key = value;
    };
    FooMaker.prototype.key = 'foo';
    var foo = new FooMaker('bar');
    this.assertEqual("key=bar", new Hash(foo).toQueryString());
    this.assertEqual("key=bar", new Hash(new Hash(foo)).toQueryString());
  }

});new Test.Unit.Runner({
  testInterpret: function(){
    this.assertIdentical('true', String.interpret(true));
    this.assertIdentical('123',  String.interpret(123));
    this.assertIdentical('foo bar', String.interpret('foo bar'));
    this.assertIdentical(
      'object string',
      String.interpret({ toString: function(){ return 'object string' } }));

    this.assertIdentical('0', String.interpret(0));
    this.assertIdentical('false', String.interpret(false));
    this.assertIdentical('', String.interpret(undefined));
    this.assertIdentical('', String.interpret(null));
    this.assertIdentical('', String.interpret(''));
  },

  testGsubWithReplacementFunction: function() {
    var source = 'foo boo boz';

    this.assertEqual('Foo Boo BoZ',
      source.gsub(/[^o]+/, function(match) {
        return match[0].toUpperCase()
      }));
    this.assertEqual('f2 b2 b1z',
      source.gsub(/o+/, function(match) {
        return match[0].length;
      }));
    this.assertEqual('f0 b0 b1z',
      source.gsub(/o+/, function(match) {
        return match[0].length % 2;
      }));

  },

  testGsubWithReplacementString: function() {
    var source = 'foo boo boz';

    this.assertEqual('foobooboz',
      source.gsub(/\s+/, ''));
    this.assertEqual('  z',
      source.gsub(/(.)(o+)/, ''));

    this.assertEqual('ウィメンズ2007
クルーズコレクション',
      'ウィメンズ2007\nクルーズコレクション'.gsub(/\n/,'
'));
    this.assertEqual('ウィメンズ2007
クルーズコレクション',
      'ウィメンズ2007\nクルーズコレクション'.gsub('\n','
'));

    this.assertEqual('barfbarobarobar barbbarobarobar barbbarobarzbar',
      source.gsub('', 'bar'));
    this.assertEqual('barfbarobarobar barbbarobarobar barbbarobarzbar',
      source.gsub(new RegExp(''), 'bar'));
  },

  testGsubWithReplacementTemplateString: function() {
    var source = 'foo boo boz';

    this.assertEqual('-


36  33  66  2D  66  62  34  32  2D  34  38  38  31  2D  62  37  32  65  2D  63  37  61  61  38  61  36  63  31  63  61  34  3A  10  65  38  63  37  30  35  34  64  30  32  66  33  36  33  64  30  42  0A  6E  6F  20  6D  65  73  73  61  67  65  4A  03  33  32  37

    }
}

internal fun TlvMapWriter.t124(
    osType: ByteArray = "android".toByteArray(),
    osVersion: ByteArray, // Build.VERSION.RELEASE.toByteArray()
    networkType: NetworkType,  //oicq.wlogin_sdk.tools.util#get_network_type
    simInfo: ByteArray, // oicq.wlogin_sdk.tools.util#get_sim_operator_name
    address: ByteArray, // always new byte[0]
    apn: ByteArray = "wifi".toByteArray() // oicq.wlogin_sdk.tools.util#get_apn_string
) {
    tlv(0x124) {
        writeShortLVByteArrayLimitedLength(osType, 16)
        writeShortLVByteArrayLimitedLength(osVersion, 16)
        writeShort(networkType.value.toShort())
        writeShortLVByteArrayLimitedLength(simInfo, 16)
        writeShortLVByteArrayLimitedLength(address, 32)
        writeShortLVByteArrayLimitedLength(apn, 16)
    }
}

internal fun TlvMapWriter.t128(
    isGuidFromFileNull: Boolean = false, // 保存到文件的 GUID 是否为 null
    isGuidAvailable: Boolean = true, // GUID 是否可用(计算/读取成功)
    isGuidChanged: Boolean = false, // GUID 是否有变动
    /**
     * guidFlag:
     * ```java
     * GUID_FLAG = 0;
     * GUID_FLAG |= GUID_SRC << 24 & 0xFF000000;
     * GUID_FLAG |= FLAG_MAC_ANDROIDID_GUID_CHANGE << 8 & 0xFF00;
     * ```
     *
     *
     * GUID_SRC:
     * 0: 初始值;
     * 1: 以前保存的文件;
     * 20: 以前没保存且现在生成失败;
     * 17: 以前没保存但现在生成成功;
     *
     *
     * FLAG_MAC_ANDROIDID_GUID_CHANGE:
     * ```java
     * if (!Arrays.equals(currentMac, get_last_mac)) {
     *     oicq.wlogin_sdk.request.t.FLAG_MAC_ANDROIDID_GUID_CHANGEMENT |= 0x1;
     * }
     * if (!Arrays.equals(currentAndroidId, get_last_android_id)) {
     *     oicq.wlogin_sdk.request.t.FLAG_MAC_ANDROIDID_GUID_CHANGEMENT |= 0x2;
     * }
     * if (!Arrays.equals(currentGuid, get_last_guid)) {
     *     oicq.wlogin_sdk.request.t.FLAG_MAC_ANDROIDID_GUID_CHANGEMENT |= 0x4;
     * }
     * ```
     */
    guidFlag: Long,
    buildModel: ByteArray,  // android.os.Build.MODEL
    /**
     * defaults `"%4;7t>;28<fc.5*6".toByteArray()`
     */
    guid: ByteArray,
    buildBrand: ByteArray // android.os.Build.BRAND
) {
    tlv(0x128) {
        writeShort(0)
        writeByte(isGuidFromFileNull.toByte())
        writeByte(isGuidAvailable.toByte())
        writeByte(isGuidChanged.toByte())
        writeInt(guidFlag.toInt()) // 11 00 00 00
        writeShortLVByteArrayLimitedLength(buildModel, 32)
        writeShortLVByteArrayLimitedLength


his._rgba[i] * 255);
    }
    rgba[3] = this._rgba[3];
    return rgba;
  }

  /**
   * @return {?string} nickname
   */
  nickname() {
    if (!_rgbaToNickname) {
      _rgbaToNickname = new Map();
      for (const nickname in Nicknames) {
        let rgba = Nicknames[nickname];
        if (rgba.length !== 4) {
          rgba = rgba.concat(1);
        }
        _rgbaToNickname.set(String(rgba), nickname);
      }
    }

    return _rgbaToNickname.get(String(this.canonicalRGBA())) || null;
  }

  /**
   * @return {!{r: number, g: number, b: number, a: (number|undefined)}}
   */
  toProtocolRGBA() {
    const rgba = this.canonicalRGBA();
    /** @type {!{r: number, g: number, b: number, a: (number|undefined)}} */
    const result = {r: rgba[0], g: rgba[1], b: rgba[2], a: undefined};
    if (rgba[3] !== 1) {
      result.a = rgba[3];
    }
    return result;
  }

  /**
   * @return {!Color}
   */
  invert() {
    const rgba = [];
    rgba[0] = 1 - this._rgba[0];
    rgba[1] = 1 - this._rgba[1];
    rgba[2] = 1 - this._rgba[2];
    rgba[3] = this._rgba[3];
    return new Color(rgba, Format.RGBA);
  }

  /**
   * @param {number} alpha
   * @return {!Color}
   */
  setAlpha(alpha) {
    const rgba = this._rgba.slice();
    rgba[3] = alpha;
    return new Color(rgba, Format.RGBA);
  }

  /**
   * @param {!Color} fgColor
   * @return {!Color}
   */
  blendWith(fgColor) {
    /** @type {!Array.<number>} */
    const rgba = [];
    Color.blendColors(fgColor._rgba, this._rgba, rgba);
    return new Color(rgba, Format.RGBA);
  }
}

/** @type {!RegExp} */
export const Regex = /((?:rgb|hsl)a?\([^)]+\)|#[0-9a-fA-F]{8}|#[0-9a-fA-F]{6}|#[0-9a-fA-F]{3,4}|\b[a-zA-Z]+\b(?!-))/g;

/**
 * @enum {string}
 */
export const Format = {
  Original: 'original',
  Nickname: 'nickname',
  HEX: 'hex',
  ShortHEX: 'shorthex',
  HEXA: 'hexa',
  ShortHEXA: 'shorthexa',
  RGB: 'rgb',
  RGBA: 'rgba',
  HSL: 'hsl',
  HSLA: 'hsla'
};

/** @type {!Object<string, !Array.<number>>} */
export const Nicknames = {
  'aliceblue': [240, 248, 255],
  'antiquewhite': [250, 235, 215],
  'aqua': [0, 255, 255],
  'aquamarine': [127, 255, 212],
  'azure': [240, 255, 255],
  'beige': [245, 245, 220],
  'bisque': [255, 228, 196],
  'black': [0, 0, 0],
  'blanchedalmond': [255, 235, 205],
  'blue': [0, 0, 255],
  'blueviolet': [138, 43, 226],
  'brown': [165, 42, 42],
  'burlywood': [222, 184, 135],
  'cadetblue': [95, 158, 160],
  'chartreuse': [127, 255, 0],
  'chocolate': [210, 105, 30],
  'coral': [255, 127, 80],
  'cornflowerblue': [100, 149, 237],
  'cornsilk': [255, 248, 220],
  'crimson': [237, 20, 61],
  'cyan': [


gt_i16_e64_dpp s5, v1, v2 row_shr:1
// W32: [0x05,0x00,0x34,0xd4,0xfa,0x04,0x02,0x00,0x01,0x11,0x01,0xff]
// W64-ERR: :[[@LINE-2]]:{{[0-9]+}}: error: invalid operand for instruction

v_cmp_gt_i16_e64_dpp s5, v1, v2 row_shr:15
// W32: [0x05,0x00,0x34,0xd4,0xfa,0x04,0x02,0x00,0x01,0x1f,0x01,0xff]
// W64-ERR: :[[@LINE-2]]:{{[0-9]+}}: error: invalid operand for instruction

v_cmp_gt_i16_e64_dpp s5, v1, v2 row_ror:1
// W32: [0x05,0x00,0x34,0xd4,0xfa,0x04,0x02,0x00,0x01,0x21,0x01,0xff]
// W64-ERR: :[[@LINE-2]]:{{[0-9]+}}: error: invalid operand for instruction

v_cmp_gt_i16_e64_dpp s105, v1, v2 row_ror:15
// W32: [0x69,0x00,0x34,0xd4,0xfa,0x04,0x02,0x00,0x01,0x2f,0x01,0xff]
// W64-ERR: :[[@LINE-2]]:{{[0-9]+}}: error: invalid operand for instruction

v_cmp_gt_i16_e64_dpp vcc_lo, v1, v2 row_share:0 row_mask:0xf bank_mask:0xf
// W32: [0x6a,0x00,0x34,0xd4,0xfa,0x04,0x02,0x00,0x01,0x50,0x01,0xff]
// W64-ERR: :[[@LINE-2]]:{{[0-9]+}}: error: invalid operand for instruction

v_cmp_gt_i16_e64_dpp vcc_hi, v1, v2 row_share:15 row_mask:0x0 bank_mask:0x1
// W32: [0x6b,0x00,0x34,0xd4,0xfa,0x04,0x02,0x00,0x01,0x5f,0x01,0x01]
// W64-ERR: :[[@LINE-2]]:{{[0-9]+}}: error: invalid operand for instruction

v_cmp_gt_i16_e64_dpp ttmp15, v1, v2 row_xmask:0 row_mask:0x1 bank_mask:0x3 bound_ctrl:1 fi:0
// W32: [0x7b,0x00,0x34,0xd4,0xfa,0x04,0x02,0x00,0x01,0x60,0x09,0x13]
// W64-ERR: :[[@LINE-2]]:{{[0-9]+}}: error: invalid operand for instruction

v_cmp_gt_i16_e64_dpp s[10:11], v1, v2 quad_perm:[3,2,1,0]
// W64: [0x0a,0x00,0x34,0xd4,0xfa,0x04,0x02,0x00,0x01,0x1b,0x00,0xff]
// W32-ERR: :[[@LINE-2]]:{{[0-9]+}}: error: invalid operand for instruction

v_cmp_gt_i16_e64_dpp s[10:11], v1


/* $NetBSD: t_scalbn.c,v 1.16 2018/11/07 03:59:36 riastradh Exp $ */

/*-
 * Copyright (c) 2011 The NetBSD Foundation, Inc.
 * All rights reserved.
 *
 * This code is derived from software contributed to The NetBSD Foundation
 * by Jukka Ruohonen.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
 * ``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 FOUNDATION OR CONTRIBUTORS
 * 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.
 */
#include <sys/cdefs.h>
__RCSID("$NetBSD: t_scalbn.c,v 1.16 2018/11/07 03:59:36 riastradh Exp $");

#include <math.h>
#include <limits.h>
#include <float.h>
#include <errno.h>
#include <fenv.h>

#include <atf-c.h>

static const int exps[] = { 0, 1, -1, 100, -100 };

/* tests here do not require specific precision, so we just use double */
struct testcase {
	int exp;
	double inval;
	double result;
	int error;
	int except;
};
static struct testcase test_vals[] = {
	{ 0,		1.00085,	1.00085,	0, 0 },
	{ 0,		0.99755,	0.99755,	0, 0 },
	{ 0,		-1.00085,	-1.00085,	0, 0 },
	{ 0,		-0.99755,	-0.99755,	0, 0 },
	{ 1,		1.00085,	2.0* 1.00085,	0, 0 },
	{ 1,		0.99755,	2.0* 0.99755,	0, 0 },
	{ 1,		-1.00085,	2.0* -1.00085,	0, 0 },
	{ 1,		-0.99755,	2.0* -0.99755,	0, 0 },

	/*
	 * We could add more corner test cases here, but we would have to
	 * add some ifdefs for the exact format and use a reliable
	 * generator program - bail for now and only do trivial stuff above.
	 */
};

/*
 * scalbn(3)
 */
ATF_TC(scalbn_val);
ATF_TC_HEAD(scalbn_val, tc)
{
	atf_tc_set_md_var(tc, "descr", "Test scalbn() for a few values");
}

ATF_TC_BODY(scalbn_val, tc)
{
	const struct testcase *tests = test_vals;
	const size_t tcnt = __arraycount(test_vals);
	size_t i;
	double rv;

	for (i = 0; i < tcnt; i++) {
		errno = 0;
#ifndef __vax__
		feclearexcept(FE_ALL_EXCEPT);
#endif
		rv = scalbn(tests[i].inval, tests[i].exp);
		ATF_CHECK_EQ_MSG(errno, tests[i].error,
		    "test %zu: errno %d instead of %d", i, errno,
		    tests[i].error);
#ifndef __vax__
		ATF_CHECK_EQ_MSG(errno, tests[i].error,
		    "test %zu: fetestexcept %d instead of %d", i,
		    fetestexcept(FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW),
		    tests[i].except);
#endif
		/* scalbn is always exact except for underflow or overflow.  */
		ATF_CHECK_MSG(rv == tests[i].result,
		    "test %zu: return value %.17g instead of %.17g"
		    " (error %.17g)",
		    i, rv, tests[i].result,
		    fabs((tests[i].result - rv)/tests[i].result));
	}
}

ATF_TC(scalbn_nan);
ATF_TC_HEAD(scalbn_nan, tc)
{
	atf_tc_set_md_var(tc, "descr", "Test scalbn(NaN, n) == NaN");
}

ATF_TC_BODY(scalbn_nan, tc)
{
	const double x = 0.0L / 0.0L;
	double y;
	size_t i;

	ATF_REQUIRE(isnan(x) != 0);

	for (i = 0; i < __arraycount(exps); i++) {
		y = scalbn(x, exps[i]);
		ATF_CHECK(isnan(y) != 0);
	}
}

ATF_TC(scalbn_inf_neg);
ATF_TC_HEAD(scalbn_inf_neg, tc)
{
	atf_tc_set_md_var(tc, "descr", "Test scalbn(-Inf, n) == -Inf");
}

ATF_TC_BODY(scalbn_inf_neg, tc)
{
	const double x = -1.0L / 0.0L;
	size_t i;

	for (i = 0; i < __arraycount(exps); i++)
		ATF_CHECK(scalbn(x, exps[i]) == x);
}

ATF_TC(scalbn_inf_pos);
ATF_TC_HEAD(scalbn_inf_pos, tc)
{
	atf_tc_set_md_var(tc, "descr", "Test scalbn(+Inf, n) == +Inf");
}

ATF_TC_BODY(scalbn_inf_pos, tc)
{
	const double x = 1.0L / 0.0L;
	size_t i;

	for (i = 0; i < __arraycount(exps); i++)
		ATF_CHECK(scalbn(x, exps[i]) == x);
}

ATF_TC(scalbn_ldexp);
ATF_TC_HEA