"""Django settings for core project.

For more information on this file, see
https://docs.djangoproject.com/en/4.2/topics/settings/

For the full list of settings and their values, see
https://docs.djangoproject.com/en/4.2/ref/settings/
"""

from pathlib import Path

# Build paths inside the project like this: BASE_DIR / 'subdir'.

BASE_DIR = Path(__file__).resolve().parent.parent

# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/4.2/howto/deployment/checklist/

# SECURITY WARNING: keep the secret key used in production secret!

SECRET_KEY = "django-insecure-r88%=*g)x(&-&67duelz$=8mat90+aq^wo+6niu!rd2v4(#f#t"  # nosec

# SECURITY WARNING: don't run with debug turned on in production!

DEBUG = True

ALLOWED_HOSTS = ["*"]  # nosec

# Application definition

INSTALLED_APPS = [
    "django.contrib.admin",
    "django.contrib.auth",
    "django.contrib.contenttypes",
    "django.contrib.sessions",
    "django.contrib.messages",
    "django.contrib.staticfiles",
    "crispy_forms",
    "crispy_bootstrap5",
    "example_project.example",
    "example_project.users",
    "django_tenant_options",
]

MIDDLEWARE = [
    "django.middleware.security.SecurityMiddleware",
    "django.contrib.sessions.middleware.SessionMiddleware",
    "django.middleware.common.CommonMiddleware",
    "django.middleware.csrf.CsrfViewMiddleware",
    "django.contrib.auth.middleware.AuthenticationMiddleware",
    "django.contrib.messages.middleware.MessageMiddleware",
    "django.middleware.clickjacking.XFrameOptionsMiddleware",
]

ROOT_URLCONF = "example_project.urls"

TEMPLATES = [
    {
        "BACKEND": "django.template.backends.django.DjangoTemplates",
        "DIRS": [],
        "APP_DIRS": True,
        "OPTIONS": {
            "context_processors": [
                "django.template.context_processors.debug",
                "django.template.context_processors.request",
                "django.contrib.auth.context_processors.auth",
                "django.contrib.messages.context_processors.messages",
            ],
        },
    },
]

WSGI_APPLICATION = "example_project.wsgi.application"
ASGI_APPLICATION = "example_project.asgi.application"

# Database
# https://docs.djangoproject.com/en/4.2/ref/settings/#databases

DATABASES = {
    "default": {
        "ENGINE": "django.db.backends.sqlite3",
        "NAME": BASE_DIR / "db.sqlite3",
    }
}

# Password validation
# https://docs.djangoproject.com/en/4.2/ref/settings/#auth-password-validators

AUTH_PASSWORD_VALIDATORS = [
    {
        "NAME": "django.contrib.auth.password_validation.UserAttributeSimilarityValidator",
    },
    {
        "NAME": "django.contrib.auth.password_validation.MinimumLengthValidator",
    },
    {
        "NAME": "django.contrib.auth.password_validation.CommonPasswordValidator",
    },
    {
        "NAME": "django.contrib.auth.password_validation.NumericPasswordValidator",
    },
]

AUTH_USER_MODEL = "users.User"

# Internationalization
# https://docs.djangoproject.com/en/4.2/topics/i18n/

LANGUAGE_CODE = "en-us"

TIME_ZONE = "UTC"

USE_I18N = True

USE_TZ = True

# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/4.2/howto/static-files/

STATIC_URL = "static/"

# Default primary key field type
# https://docs.djangoproject.com/en/4.2/ref/settings/#default-auto-field

DEFAULT_AUTO_FIELD = "django.db.models.BigAutoField"

# Tenant settings
DJANGO_TENANT_OPTIONS = {
    "TENANT_MODEL": "example.Tenant",
}

DJANGO_LOG_LEVEL = "DEBUG"
LOGGING = {
    "version": 1,
    "disable_existing_loggers": False,
    "handlers": {
        "console": {
            "class": "logging.StreamHandler",
        },
    },
    "loggers": {
        "django_tenant_options": {
            "handlers": ["console"],
            "level": DJANGO_LOG_LEVEL,
        },
    },
}

# Crispy Forms Settings
CRISPY_ALLOWED_TEMPLATE_PACKS = "bootstrap5"
CRISPY_TEMPLATE_PACK = "bootstrap5"


地址',
        url: '../address/list.html'
    }
    ,{
        name: '货物订单',
        url: '../huowuOrder/list.html'
    }

]

var indexNav = [

    {
        name: '公告',
        url: './pages/gonggao/list.html'
    },
    {
        name: '货物',
        url: './pages/huowu/list.html'
    },
    {
        name: '留言板',
        url: './pages/liuyan/list.html'
    },
    {
        name: '网点信息',
        url: './pages/wangdian/list.html'
    },

]

// 已废弃,不用了
var adminurl =  "http://localhost:8080/lenglianwuliuxitong/admin/dist/index.html#/login";

// 后期要改
var menu = [
{"backMenu":[{"child":[{"buttons":["新增","查看","修改","删除"],"menu":"用户","menuJump":"列表","tableName":"yonghu"}],"menu":"用户管理"},{"child":[{"buttons":["新增","查看","修改","删除","查看评论"],"menu":"歌曲信息","menuJump":"列表","tableName":"gequxinxi"}],"menu":"歌曲信息管理"},{"child":[{"buttons":["查看","删除","查看评论"],"menu":"推荐信息","menuJump":"列表","tableName":"tuijianxinxi"}],"menu":"推荐信息管理"},{"child":[{"buttons":["新增","查看","修改","删除"],"menu":"我的收藏管理","tableName":"storeup"}],"menu":"我的收藏管理"},{"child":[{"buttons":["新增","查看","修改","删除"],"menu":"管理员","tableName":"users"}],"menu":"管理员管理"},{"child":[{"buttons":["新增","查看","修改","删除"],"menu":"轮播图管理","tableName":"config"}],"menu":"系统管理"}],"frontMenu":[{"child":[{"buttons":["查看","歌曲推荐","查看评论"],"menu":"歌曲信息列表","menuJump":"列表","tableName":"gequxinxi"}],"menu":"歌曲信息模块"},{"child":[{"buttons":["查看","查看评论"],"menu":"推荐信息列表","menuJump":"列表","tableName":"tuijianxinxi"}],"menu":"推荐信息模块"}],"hasBackLogin":"是","hasBackRegister":"否","hasFrontLogin":"否","hasFrontRegister":"否","roleName":"管理员","tableName":"users"},{"backMenu":[{"child":[{"buttons":["查看","歌曲推荐"],"menu":"歌曲信息","menuJump":"列表","tableName":"gequxinxi"}],"menu":"歌曲信息管理"},{"child":[{"buttons":["查看"],"menu":"推荐信息","menuJump":"列表","tableName":"tuijianxinxi"}],"menu":"推荐信息管理"},{"child":[{"buttons":["查看"],"menu":"我的收藏管理","tableName":"storeup"}],"menu":"我的收藏管理"}],"frontMenu":[{"child":[{"buttons":["查看","歌曲推荐","查看评论"],"menu":"歌曲信息列表","menuJump":"列表","tableName":"gequxinxi"}],"menu":"歌曲信息模块"},{"child":[{"buttons":["查看","查看评论"],"menu":"推荐信息列表","menuJump":"列表","tableName":"tuijianxinxi"}],"menu":"推荐信息模块"}],"hasBackLogin":"是","hasBackRegister":"否","hasFrontLogin":"是","hasFrontRegister":"是","roleName":"用户","tableName":"yonghu"}
]

var isAuth = function (tableName,key) {
    let role = localStorage.getItem("userTable");


_Client,
    rustArcDecrementStrongCount:
        RustLib.instance.api.rust_arc_decrement_strong_count_Client,
    rustArcDecrementStrongCountPtr:
        RustLib.instance.api.rust_arc_decrement_strong_count_ClientPtr,
  );

  Future<List<String>> audioUrls(
          {required String bvid, required PlatformInt64 cid}) =>
      RustLib.instance.api.crateApiBilibiliBilibiliClientAudioUrls(
          that: this, bvid: bvid, cid: cid);

  Future<void> download(
          {required String url,
          required String filePath,
          SenderProgressData? channel}) =>
      RustLib.instance.api.crateApiBilibiliBilibiliClientDownload(
          that: this, url: url, filePath: filePath, channel: channel);

  Future<List<String>> fetchIds(
          {required String keyword, required BigInt maxIdCount}) =>
      RustLib.instance.api.crateApiBilibiliBilibiliClientFetchIds(
          that: this, keyword: keyword, maxIdCount: maxIdCount);

  Future<BvInfo> info({required String bvid}) => RustLib.instance.api
      .crateApiBilibiliBilibiliClientInfo(that: this, bvid: bvid);

  Future<Uint8List> requestPic({required String url}) => RustLib.instance.api
      .crateApiBilibiliBilibiliClientRequestPic(that: this, url: url);

  Future<VideoUrl> videoUrl(
          {required String bvid,
          required PlatformInt64 cid,
          required PlatformInt64 fnval,
          required VideoQuality videoQuality}) =>
      RustLib.instance.api.crateApiBilibiliBilibiliClientVideoUrl(
          that: this,
          bvid: bvid,
          cid: cid,
          fnval: fnval,
          videoQuality: videoQuality);
}

@sealed
class SenderProgressDataImpl extends RustOpaque implements SenderProgressData {
  // Not to be used by end users
  SenderProgressDataImpl.frbInternalDcoDecode(List<dynamic> wire)
      : super.frbInternalDcoDecode(wire, _kStaticData);

  // Not to be used by end users
  SenderProgressDataImpl.frbInternalSseDecode(
      BigInt ptr, int externalSizeOnNative)
      : super.frbInternalSseDecode(ptr, externalSizeOnNative, _kStaticData);

  static final _kStaticData = RustArcStaticData(
    rustArcIncrementStrongCount:
        RustLib.instance.api.rust_arc_increment_strong_count_SenderProgressData,
    rustArcDecrementStrongCount:
        RustLib.instance.api.rust_arc_decrement_strong_count_SenderProgressData,
    rustArcDecrementStrongCountPtr: RustLib
        .instance.api.rust_arc_decrement_strong_count_SenderProgressDataPtr,
  );
}
final da = {
  "locale_string": "da",
  "language": "Sprog",
  // ---
  "get_started": "Kom i gang",
  "pay_yearly": "Betal årligt",
  "pay_yearly_sub": "Spar op til 30% RABAT",
  "premium": "Premium",
  "premium_desc_1": "Ubeg


  R14, R11
	ADCQ  $0x00, R12
	ADDQ  R15, R10
	ADCQ  R8, R11
	ADCQ  $0x00, R12
	ADDQ  16(DI), R10
	ADCQ  24(DI), R11
	ADCQ  $0x01, R12
	MOVQ  (BP), DX
	MOVQ  DX, R15
	MULXQ R10, R13, R14
	IMULQ R12, R15
	MULXQ R11, AX, DX
	ADDQ  AX, R14
	ADCQ  DX, R15
	MOVQ  8(BP), DX
	MULXQ R10, R10, AX
	ADDQ  R10, R14
	MULXQ R11, R11, R8
	ADCQ  R11, R15
	ADCQ  $0x00, R8
	IMULQ R12, DX
	ADDQ  AX, R15
	ADCQ  DX, R8
	MOVQ  R13, R10
	MOVQ  R14, R11
	MOVQ  R15, R12
	ANDQ  $0x03, R12
	MOVQ  R15, R13
	ANDQ  $-4, R13
	MOVQ  R8, R14
	SHRQ  $0x02, R8, R15
	SHRQ  $0x02, R8
	ADDQ  R13, R10
	ADCQ  R14, R11
	ADCQ  $0x00, R12
	ADDQ  R15, R10
	ADCQ  R8, R11
	ADCQ  $0x00, R12
	LEAQ  32(DI), DI

	// Shift stream left
	VMOVDQA Y14, Y0
	VMOVDQA Y12, Y14
	VMOVDQA Y4, Y12
	VMOVDQA Y5, Y4
	VMOVDQA Y9, Y5
	VMOVDQA Y13, Y9
	VMOVDQA Y1, Y13
	VMOVDQA Y6, Y1
	VMOVDQA Y10, Y6
	JMP     sealAVX2ShortSealLoop

sealAVX2ShortTail32:
	CMPQ    BX, $0x10
	VMOVDQA X0, X1
	JB      sealAVX2ShortDone
	SUBQ    $0x10, BX

	// Load for encryption
	VPXOR   (SI), X0, X12
	VMOVDQU X12, (DI)
	LEAQ    16(SI), SI

	// Hash
	ADDQ       (DI), R10
	ADCQ       8(DI), R11
	ADCQ       $0x01, R12
	MOVQ       (BP), DX
	MOVQ       DX, R15
	MULXQ      R10, R13, R14
	IMULQ      R12, R15
	MULXQ      R11, AX, DX
	ADDQ       AX, R14
	ADCQ       DX, R15
	MOVQ       8(BP), DX
	MULXQ      R10, R10, AX
	ADDQ       R10, R14
	MULXQ      R11, R11, R8
	ADCQ       R11, R15
	ADCQ       $0x00, R8
	IMULQ      R12, DX
	ADDQ       AX, R15
	ADCQ       DX, R8
	MOVQ       R13, R10
	MOVQ       R14, R11
	MOVQ       R15, R12
	ANDQ       $0x03, R12
	MOVQ       R15, R13
	ANDQ       $-4, R13
	MOVQ       R8, R14
	SHRQ       $0x02, R8, R15
	SHRQ       $0x02, R8
	ADDQ       R13, R10
	ADCQ       R


twork bubble as sender
				ExpansionVehicle vehicle;
				if (ExpansionVehicle.Get(vehicle, g_Game.GetPlayer(), false, true) && vehicle.GetEntity() == target)
					break;
				else
					return;

			break;

#ifdef EXPANSIONMODGROUPS
			case ExpansionChatChannels.CCTeam:
				int partyID;
				if (!ctx.Read(partyID))
					return;

				if (partyID == ExpansionPartyModule.s_Instance.GetPartyID())
					break;
				else
					return;

			break;
#endif
		}

		GetGame().GetMission().OnEvent(ChatMessageEventTypeID, data);
	}

	bool CanSendInChannel(ExpansionChatChannels channel, PlayerIdentity sender)
	{
		PlayerBase player = PlayerBase.Cast(sender.GetPlayer());

		switch (channel)
		{
			case ExpansionChatChannels.CCAdmin:
			{
				if (GetPermissionsManager().HasPermission("Admin.Chat", sender))
				{
					return true;
				}

				break;
			}
			case ExpansionChatChannels.CCGlobal:
			{
				if (GetExpansionSettings().GetChat().EnableGlobalChat)
				{
					return true;
				}

				break;
			}
#ifdef EXPANSIONMODGROUPS
			case ExpansionChatChannels.CCTeam:
			{
				if (!player)
				{
					break;
				}

				int partyID = player.Expansion_GetPartyID();
				if (partyID >= 0 && GetExpansionSettings().GetChat().EnablePartyChat)
				{
					return true;
				}

				break;
			}
#endif
			case ExpansionChatChannels.CCTransport:
			{
				if (!player)
				{
					break;
				}

				if (ExpansionVehicle.Get(player, false, true) && GetExpansionSettings().GetChat().EnableTransportChat)
				{
					return true;
				}

				break;
			}
			default:
			{
				return true;
			}
		}

		return false;
	}

	static string GetChannelName(ExpansionChatChannels channel)
	{
		switch (channel)
		{
			case ExpansionChatChannels.CCLocal:
			case ExpansionChatChannels.CCDirect: return "Direct";
			case ExpansionChatChannels.CCSystem: return "System";
			case ExpansionChatChannels.CCAdmin: return "Admin";
			case ExpansionChatChannels.CCMegaphone: return "Megaphone";
			case ExpansionChatChannels.CCTransmitter: return "Radio";
			case ExpansionChatChannels.CCPublicAddressSystem: return "PAS";
			case ExpansionChatChannels.CCBattlEye: return "BattlEye";
			case ExpansionChatChannels.CCTransport: return "Transport";
			case ExpansionChatChannels.CCGlobal: return "Global";
			case ExpansionChatChannels.CCTeam: return "Team";
		}

		return "Unknown";
	}
};


Options, logMap map[string]any) bool {
	for _, label := range filter.MatchKeys {
		if matchPathFilterLabel(label, filter, logMap) {
			return true
		}
	}

	return false
}

func matchPathFilterLabel(label string, filter types.EnricherFilterOptions, logMap map[string]any) bool {
	subLabels := strings.SplitN(label, "/", 2)

	if len(subLabels) == 2 {
		if subMap, ok := logMap[subLabels[0]].(map[string]any); ok {
			// Recursive search for the filter label with path.
			// For example resource/pod.
			return matchPathFilterLabel(subLabels[1], filter, subMap)
		}

		return false
	}

	if logValue, exists := logMap[label]; exists {
		return matchAnyFilterValue(logValue, filter)
	}

	return false
}

func matchAnyFilterValue(logValue any, filter types.EnricherFilterOptions) bool {
	if filter.MatchValues == nil || len(*filter.MatchValues) == 0 {
		return true
	}

	for _, value := range *filter.MatchValues {
		if reflect.DeepEqual(value, logValue) {
			return true
		}

		// Support int values for syscallids.
		// `any` can't be used due to json restrictions.
		valueInt, errValue := strconv.Atoi(value)
		if errValue == nil {
			if retrievedInt, ok := convertToInt(logValue); ok {
				return valueInt == retrievedInt
			}
		}
	}

	return false
}

func convertToInt(val any) (int, bool) {
	switch v := val.(type) {
	case int:
		return v, true
	case int8:
		return int(v), true
	case int16:
		return int(v), true
	case int32:
		return int(v), true
	case int64:
		if v < int64(int(v)) || v > int64(int(v)) {
			// Outside int32 range
			return 0, false
		}

		return int(v), true
	default:
		return 0, false
	}
}
/*
Copyright 2025 The Kubernetes Authors.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package enricher

import (
	"testing"
	"time"

	"github.com/go-logr/logr"
	"github.com/jellydator/ttlcache/v3"
	"github.com/stretchr/testify/require"
	"golang.org/x/sync/errgroup"
	v1 "k8s.io/api/core/v1"
	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"

	"sigs.k8s.io/security-profiles-operator/internal/pkg/daemon/enricher/types"
)

func Test_populateCacheEntryForContainer(t *testing.T) {
	t.Parallel()

	falsely, truly := false, true

	type args struct {
		pod *v1.Pod
	}

	tests := []struct {
		name        string
		args        args
		want        int
		expectError bool
	}{
		{
			name:        "Empty containerID test",
			want:        1,
			expectError: true,
			args: args{
				pod: &v1.Pod{
					Status: v1.PodStatus{
						ContainerStatuses: []v1.ContainerStatu


org%2F2000%2Fsvg%22 viewBox=%220 0 1 1%22><clipPath id=%22backbutton%22 clipPathUnits=%22objectBoundingBox%22><path fill=%22black%22 d=%22M8.7,1c0,0-8,0-8,0C0,1,0.2,1,0,0.5 C0.2-0,0,0,0.5,0H9V1z%22%2F><%2FclipPath><%2Fsvg>#backbutton')}.k-ff .km-ios .km-back:after{display:block;left:0}.km-ios .km-badge{border-radius:3em;box-shadow:inset 0 0 0 .16rem #fff,0 1px 3px rgba(0,0,0,.5)}.km-ios .km-detail{border-radius:3em;box-shadow:inset 0 0 0 .16rem #fff,0 1px 3px rgba(0,0,0,.5);border:0}.km-ios .km-buttongroup{border:none;background:0 0;padding:0 1px 1px 0}.km-ios .km-buttongroup .km-button,.km-tablet .km-ios .km-buttongroup .km-button{border-radius:0;border-width:1px;border-right-width:0}.km-ios .km-navbar .km-buttongroup .km-button:not(.km-state-active){background-color:transparent}.km-ios .km-view .km-buttongroup .km-button:first-child{border-radius:5pt 0 0 5pt}.km-ios .km-view .km-buttongroup .km-button:last-child{border-radius:0 5pt 5pt 0}.km-ios .k-toolbar .km-buttongroup{border-radius:6pt}.km-ios .km-buttongroup .km-button:last-child{border-right-width:1px}.km-ios .km-buttongroup .km-state-active{text-shadow:none;border-width:1px 0 1px 1px}.km-ios .km-buttongroup .km-state-active:last-child{margin-left:-1px}.km-ios .km-dialog-title,.km-ios .km-view-title{position:relative;visibility:visible;text-align:center;font-size:1.4em;line-height:2.3em;font-weight:700;margin-left:auto;margin-right:auto}.km-ios.km-horizontal .km-view-title{line-height:2em}.km-ios .km-navbar,.km-ios .km-toolbar{overflow:visible}.km-ios .k-toolbar .k-split-button,.km-ios .k-toolbar .k-split-button>.km-button,.km-ios .k-toolbar .km-buttongroup,.km-ios .k-toolbar>.km-button{padding-top:0;padding-bottom:1px;font-size:1em}.km-ios .k-toolbar .km-buttongroup .km-button{padding:0 .8em}.km-ios .k-split-button .km-arrowdown,.km-ios .k-toolbar .k-button-icon .km-icon,.km-ios .k-toolbar .k-button-icontext .km-icon{width:1em;height:1em;font-size:1.2em;margin-top:-8px;margin-bottom:-5px;vertical-align:middle}.km-ios .k-split-button .km-arrowdown{margin-left:2px;margin-right:1px}.km-ios .k-split-button .km-button:first-child{border-top-right-radius:0;border-bottom-right-radius:0}.km-ios .k-split-button-arrow{border-top-left-radius:0;border-bottom-left-radius:0}.km-ios .km-actionsheet.k-overflow-container>li>.km-button,.km-ios .km-actionsheet.k-split-container>li>.km-button{min-width:10em;text-align:center;font-size:1.1em;border-radius:5px;margin:.4em 0;padding:.35em .6em;text-shadow:none}.km-ios .


iner.
         *
         * @param widget the Widget to move.
         */
        virtual void moveToBottom(Widget* widget) = 0;

        /**
         * Gets the drawing space size a Widget has in the BasicContainer.
         * It may not be the same size as the Widgets width and height.
         *
         * NOTE: Size is not checked recursively all the way back to the
         *       top Widget. If the BasicContainer itself is clipped,
         *       the size may be inaccurate.
         *
         * @param width the width the Widget's draw space has.
         * @param height the height the Widget's draw space has.
         * @param widget the Widget calling the function.
         */
        virtual void getDrawSize(int& width, int& height, Widget* widget) = 0;

        /**
         * Called when a child of the BasicContainer gets destroyed.
         *
         * @param widget the destroyed Widget.
         */
        virtual void _announceDeath(Widget *widget) = 0;

        /**
         * Function to check if a widget regards this container as parent. This
         * avoids using function calls so it can work with garbage collected widgets
         * from Lua.
         *
         * @param widget
         * @return true if the parent pointer of the widget points to this container
         * @return false if the parent pointer of the widget points to something else
         */
        bool isParentOfWidget(Widget *widget) {
            return widget->mParent == this;
        }

    };
}

#endif // end GCN_BASICCONTAINER_HPP


+ #to_add > 80 then
				line_pos = #internal_indent + #to_add
				to_add = separator .. "\n" .. internal_indent .. to_add
			else
				to_add = separator .. to_add
				line_pos = line_pos + #to_add
			end
		end
		ret = ret .. to_add
		separator = ", "
	end
	-- do the integer indices from 0 to n first, in order.
	do_value_for_key(0, t[0], true)
	for n = 1, #t do
		do_value_for_key(n, t[n], false)
	end
	for k, v in pairs(t) do
		local is_integer_key = (type(k) == "number") and (k == math.floor(k)) and k >= 0 and k <= #t
		if not is_integer_key then
			do_value_for_key(k, v, true)
		end
	end
	ret = ret .. "}"
	return ret
end

local slot_conversion = {
	[PLAYER_1] = "ProfileSlot_Player1",
	[PLAYER_2] = "ProfileSlot_Player2"
}
function pn_to_profile_slot(pn)
	return slot_conversion[pn] or "ProfileSlot_Invalid"
end


강제로 내보내는 것
밴 | Ban | 계정 정지
신고 | Report | 부정행위나 욕설 신고
채팅 | Chat | 텍스트로 대화하는 것
음성 채팅 | Voice Chat | 음성으로 대화하는 것
친구 추가 | Add Friend | 친구 목록에 추가

# 모바일 게임 용어
가챠 | Gacha | 랜덤 뽑기 시스템
뽑기 | Draw/Pull | 랜덤으로 아이템이나 캐릭터 획득
과금 | In-app Purchase | 게임 내 결제
무과금 | Free-to-play | 돈을 쓰지 않고 게임하는 것
소과금 | Light Spender | 적은 금액만 결제하는 것
중과금 | Medium Spender | 중간 정도 금액을 결제하는 것
고과금 | Heavy Spender | 많은 금액을 결제하는 것
일일 미션 | Daily Mission | 매일 수행할 수 있는 임무
주간 미션 | Weekly Mission | 매주 수행할 수 있는 임무
출석 체크 | Daily Check-in | 매일 접속 보상
스태미나 | Stamina | 게임 플레이를 위한 에너지

# CS 관련 용어
고객 지원 | Customer Support | 고객 서비스
문의 | Inquiry | 질문이나 요청
신고 | Report | 문제 상황 알림
환불 | Refund | 결제 취소 및 돈 돌려받기
계정 복구 | Account Recovery | 잃어버린 계정 되찾기
비밀번호 재설정 | Password Reset | 비밀번호 변경
로그인 문제 | Login Issue | 접속 관련 문제
결제 문제 | Payment Issue | 결제 관련 문제
게임 오류 | Game Error | 게임 실행 중 발생하는 문제
연결 문제 | Connection Issue | 네트워크 연결 문제"""

# 싱글톤 인스턴스 생성
_glossary_manager_instance: Optional[GlossaryManager] = None

def get_glossary_manager() -> GlossaryManager:
    """GlossaryManager 싱글톤 인스턴스를 반환합니다.

    Returns:
        GlossaryManager: 싱글톤 인스턴스
    """
    global _glossary_manager_instance
    if _glossary_manager_instance is None:
        _glossary_manager_instance = GlossaryManager()
    return _glossary_manager_instance


要从 0 开始学，这个时候不要着急，给自己尽量多的学习和试错，尽量不要给自己加难度。

**我的解法是，1 次只学 1 个技能点，用到熟练，再学下一个。**

比如做小红书，有的同学一上来就纠结图文和视频哪个流量好，但没有考虑到，视频所需的技能点，比图文要多一个量级。

这种导致数量上不去，新手花了巨多的时间做了一篇笔记，大概率不会火，特别容易被打击到。

![](img/82f9ca5406b9e4619b9e5bc04b3217d6.png)

（我早期的视频作品，也花了一段时间才定型）

这时不妨从相对容易的图文开始，图文里从有固定模版的“干货合集类”开始，先学会做这一类图文笔记，用到熟练，

再换另一种形式测试，又学一个技能，这样你的技能越攒越多。**就像武器库一样，可能最终的爆款，是 2-3 个技能的组合，也是一种降维打击的形式。**

**2、与家人充分沟通，但不要拉家人/朋友入伙**

前面说了，副业做自媒体必然会牺牲休息、娱乐和社交时间。但你的家人可能会不理解，因为你看起来忙忙碌碌还没啥成果，又减少了陪家人的时间。

这个时候就要做好充分沟通，让 TA 给你一段时间，去全力探索。

我那个时候就跟家人说，我的预期就是一年，预期一年能达到 XXX 成果，这是为了未来实现 XXX 的目标，就是需要投入业余这些时间来做。

这个阶段，我不建议拉家人入伙一起搞。有学员跟我说，自从搞了自媒体，对伴侣的耐心都下降了，想让他帮忙一起搞。

我建议不要，因为你自己都还没拿到结果，对方也没有你现在的认知，而自媒体本身的不确定性就很高，两个人一起干活意见不合，就容易吵架。

**所以不用拉着 TA 进步，先自己做出成果，吸引 TA 主动想要了解学习。这跟做私域经营一样，我们只吸引，不强求。**

另外在职场中，要尽量低调。可以用小号来做副业，这样可以大胆放心做，不必担心遭小人妒忌。

**3、坚持不下去时，重新回顾你的“北极星”**

北极星指标，就是我们


;
            //can be INOUT
            if (inout.Contains("OUT")) argument.Out = true;
        }

        private static DatabaseArgument AddArgumentToList(List<DatabaseArgument> list, string argName)
        {
            var existing = list.Find(delegate(DatabaseArgument arg) { return arg.Name == argName; });
            if (existing == null)
            {
                DatabaseArgument argument = new DatabaseArgument();
                argument.Name = argName;
                list.Add(argument);
                return argument;
            }
            return existing;
        }

        public static List<DatabasePackage> Packages(DataTable dt)
        {
            List<DatabasePackage> list = new List<DatabasePackage>();
            if (dt.Rows.Count == 0) return list;

            //oracle and ODP
            string key = "OBJECT_NAME";
            string ownerKey = "OWNER";
            //Devart.Data.Oracle
            if (!dt.Columns.Contains(key)) key = "NAM


s afirmações a seguir, referentes às pessoas reunidas, a única necessariamente verdadeira é:
    `,
    topic: 'Lógica Matemática',
    answers: [
      { id: 'A', text: 'pelo menos duas delas fazem aniversário no mesmo mês.', correct: true, },
      { id: 'B', text: 'pelo menos uma delas nasceu num dia par.', correct: false, },
      { id: 'C', text: 'pelo menos duas delas são do sexo feminino.', correct: false, },
      { id: 'D', text: 'pelo menos uma delas nasceu em janeiro ou fevereiro.', correct: false, },
      { id: 'E', text: 'pelo menos uma delas tem altura superior a 1,90m.', correct: false, },
    ],
  },
  {
    id: 'LM0404',
    question: `Durante a Segunda Guerra Mundial, para decifrarem as mensagens secretas, foi utilizada a técnica de decomposição em fatores primos. Um número N é dado pela expressão 2x 5y 72  na qual x, y e z são números inteiros não negativos. Sabe-se que N é múltiplo de 10 e não é múltiplo de 7. O número de divisores de N, diferentes de N, é:
    `,
    topic: 'Lógica Matemática',
    answers: [
      { id: 'A', text: 'x . y . z', correct: false, },
      { id: 'B', text: '(x + 1) . (y + 1) . z', correct: false, },
      { id: 'C', text: 'x . y . z - 1', correct: false, },
      { id: 'D', text: '(x + 1) . (y + 1) . (z + 1) -1', correct: true, },
      { id: 'E', text: '(x +1) . (y + 1)', correct: false, },
    ],
  },
  {
    id: 'LM0405',
    question: `Qual o número de linhas da tabela–verdade das seguintes fórmulas?

    I) (((p v q ) → ~p )  ® ( q ^ p))

    II) (x ^ (w →(( p ^ q) v (s ↔ t))

    III) (p ^ (p → ((p ^ p) v ( p → p) )))

    Marque a alternativa que corresponde ao número de linhas da I, II e III fórmulas respectivamente:
    `,
    topic: 'Lógica Matemática',
    answers: [
      { id: 'A', text: '4, 64 e 2.', correct: true, },
      { id: 'B', text: '8, 64 e 4.', correct: false, },
      { id: 'C', text: '4, 8 e 2.', correct: false, },
      { id: 'D', text: '2, 4 e 8.', correct: false, },
      { id: 'E', text: '4, 12 e 2.', correct: false, },
    ],
  },
  {
    id: 'IA0101',
    question: `Sobre o chamado inverno da IA, é correto afirmar que:
    `,
    topic: 'Inteligência Artificial',
    answers: [
      { id: 'A', text: 'o inverno da IA ocorreu em decorrência do desempenho dos hardwares da época não era compatível com as necessidades da IA', correct: false, },
      { id: 'B', text: 'o inverno da IA ocorreu em decorrência de que não haviam linguagens de programação suficiente boas para lidar com algoritimos de IA', correct: false, },
      { id: 'C', text: 'o inverno da IA ocorreu em decorrência do descrédito em empresas que não entregavam aquilo que prometiam em termos de IA.', correct: true, },
      { id: 'D',


  # skip blank lines
            if not line.strip():
                continue

            # Look for parent line if glob or -R is used
            if not re.match(r'[-dclpsbDCMnP?]([-r][-w][-xsS]){2}([-r][-w][-xtT])[+]?', line) \
                and line.strip().endswith(':'):
                parent = line.strip()[:-1]
                continue

            if not re.match(r'[-dclpsbDCMnP?]([-r][-w][-xsS]){2}([-r][-w][-xtT])[+]?', line):
                raise ParseError('Not ls -l data')

            parsed_line = line.strip().split(maxsplit=8)
            output_line = {}

            # split filenames and links
            if len(parsed_line) == 9:
                filename_field = parsed_line[8].split(' -> ')
            else:
                # in case of filenames starting with a newline character
                filename_field = ['']

            # create output object
            output_line['filename'] = filename_field[0]

            if len(filename_field) > 1:
                output_line['link_to'] = filename_field[1]

            if parent:
                output_line['parent'] = parent

            output_line['flags'] = parsed_line[0]
            output_line['links'] = parsed_line[1]
            output_line['owner'] = parsed_line[2]
            output_line['group'] = parsed_line[3]
            output_line['size'] = parsed_line[4]
            output_line['date'] = ' '.join(parsed_line[5:8])

            yield output_line if raw else _process(output_line)

        except Exception as e:
            yield raise_or_yield(ignore_exceptions, e, line)


L3) then
        (R[t2], R[t]) = (TTBR0_NS<63:32>, TTBR0_NS<31:0>);
    else
        (R[t2], R[t]) = (TTBR0<63:32>, TTBR0<31:0>);
elsif PSTATE.EL == EL2 then
    if HaveEL(EL3) && ELUsingAArch32(EL3) then
        (R[t2], R[t]) = (TTBR0_NS<63:32>, TTBR0_NS<31:0>);
    else
        (R[t2], R[t]) = (TTBR0<63:32>, TTBR0<31:0>);
elsif PSTATE.EL == EL3 then
    if SCR.NS == '0' then
        (R[t2], R[t]) = (TTBR0_S<63:32>, TTBR0_S<31:0>);
    else
        (R[t2], R[t]) = (TTBR0_NS<63:32>, TTBR0_NS<31:0>);

MCRR{<c>}{<q>} <coproc>, {#}<opc1>, <Rt>, <Rt2>, <CRm>

coproc	CRm	opc1

0b1111	0b0010	0b0000

if PSTATE.EL == EL0 then
    UNDEFINED;
elsif PSTATE.EL == EL1 then
    if EL2Enabled() && !ELUsingAArch32(EL2) && HSTR_EL2.T2 == '1' then
        AArch64.AArch32SystemAccessTrap(EL2, 0x04);
    elsif EL2Enabled() && ELUsingAArch32(EL2) && HSTR.T2 == '1' then
        AArch32.TakeHypTrapException(0x04);
    elsif EL2Enabled() && !ELUsingAArch32(EL2) && HCR_EL2.TVM == '1' then
        AArch64.AArch32SystemAccessTrap(EL2, 0x04);
    elsif EL2Enabled() && ELUsingAArch32(EL2) && HCR.TVM == '1' then
        AArch32.TakeHypTrapException(0x04);
    elsif HaveEL(EL3) && ELUsingAArch32(EL3) then
        TTBR0_NS = R[t2]:R[t];
    else
        TTBR0 = R[t2]:R[t];
elsif PSTATE.EL == EL2 then
    if HaveEL(EL3) && ELUsingAArch32(EL3) then
        TTBR0_NS = R[t2]:R[t];
    else
        TTBR0 = R[t2]:R[t];
elsif PSTATE.EL == EL3 then
    if SCR.NS == '0' && CP15SDISABLE == Signal_High then
        UNDEFINED;
    else
        if SCR.NS == '0' then
            TTBR0_S = R[t2]:R[t];
        else
            TTBR0_NS = R[t2]:R[t];

AArch32 Registers
</


restarted */
#define ESTRPIPE 86		   /* Streams pipe error */
#define EUSERS 87		   /* Too many users */
#define ENOTSOCK 88		   /* Socket operation on non-socket */
#define EDESTADDRREQ 89	   /* Destination address required */
#define EMSGSIZE 90		   /* Message too long */
#define EPROTOTYPE 91	   /* Protocol wrong type for socket */
#define ENOPROTOOPT 92	   /* Protocol not available */
#define EPROTONOSUPPORT 93 /* Protocol not supported */
#define ESOCKTNOSUPPORT 94 /* Socket type not supported */
#define EOPNOTSUPP 95	   /* Operation not supported on transport endpoint */
#define EPFNOSUPPORT 96	   /* Protocol family not supported */
#define EAFNOSUPPORT 97	   /* Address family not supported by protocol */
#define EADDRINUSE 98	   /* Address already in use */
#define EADDRNOTAVAIL 99   /* Cannot assign requested address */
#define ENETDOWN 100	   /* Network is down */
#define ENETUNREACH 101	   /* Network is unreachable */
#define ENETRESET 102	   /* Network dropped connection because of reset */
#define ECONNABORTED 103   /* Software caused connection abort */
#define ECONNRESET 104	   /* Connection reset by peer */
#define ENOBUFS 105		   /* No buffer space available */
#define EISCONN 106		   /* Transport endpoint is already connected */
#define ENOTCONN 107	   /* Transport endpoint is not connected */
#define ESHUTDOWN 108	   /* Cannot send after transport endpoint shutdown */
#define ETOOMANYREFS 109   /* Too many references: cannot splice */
#define ETIMEDOUT 110	   /* Connection timed out */
#define ECONNREFUSED 111   /* Connection refused */
#define EHOSTDOWN 112	   /* Host is down */
#define EHOSTUNREACH 113   /* No route to host */
#define EALREADY 114	   /* Operation already in progress */
#define EINPROGRESS 115	   /* Operation now in progress */
#define ESTALE 116		   /* Stale file handle */
#define EUCLEAN 117		   /* Structure needs cleaning */
#define ENOTNAM 118		   /* Not a XENIX named type file */
#define ENAVAIL 119		   /* No XENIX semaphores available */
#define EISNAM 120		   /* Is a named type file */
#define EREMOTEIO 121	   /* Remote I/O error */
#define EDQUOT 122		   /* Quota exceeded */

#define ENOMEDIUM 123	 /* No medium found */
#define EMEDIUMTYPE 124	 /* Wrong medium type */
#define ECANCELED 125	 /* Operation Canceled */
#define ENOKEY 126		 /* Required key not available */
#define EKEYEXPIRED 127	 /* Key has expired */
#define EKEYREVOKED 128	 /* Key has been revoked */
#define EKEYREJECTED 129 /* Key was rejected by service */

/* for robust mutexes */
#define EOWNERDEAD 130		/* Owner died */
#define ENOTRECOVERABLE 131 /* State not recoverable */

#define ERFKILL 132 /* Operation not possible due to RF-kill */

#define EHWPOISON 133 /* Memory page has hardware error */

extern int errno;
extern char *program_invocation_name;
extern char *program_invocation_short_name;

#endif


l, {"Consigue emanaciones de ápices de una reliquia de ápices."}},
[11081] = {"La gran revuelta Sangreoscura", nil, {"Lleva los planes de fuga de los Sangreoscura a la Maestra de las minas."}},
[11082] = {"En busca de la verdad", nil, {"Encuentra a un sobrestante Sangreoscura e interrógalo. Regresa junto a la maestra de las minas con la información sobre los Sangreoscura y la mano del sobrestante."}},
[11083] = {"Locura y confusión", nil, {"Ronag el Explotador de las Minas del Ala Abisal del Valle Sombraluna quiere que mates al supervisor Sangreoscura enloquecido y a los 5 mineros Sangreoscura enloquecidos."}},
[11084] = {"¡La cabeza bien alta, Capitán!", nil, {"Habla con el señor supremo Mor'ghor en el Campamento Faucedraco en el Valle Sombraluna."}},
[11085] = {"Fuga de Skettis", nil, {"Escolta al prisionero de la Guardia del cielo hasta un lugar seguro e informa al sargento del cielo Doryn."}},
[11086] = {"Perturbar el Portal Crepuscular", nil, {"El señor supremo Mor'ghor del Campamento Faucedraco en el Valle Sombraluna quiere que mates a 20 agentes Sombra de Muerte."}},
[11088] = {"<DEPRECATED>Unravelling Your Training", nil, {"Llévale a Jonathan LeCraft 10 trozos de paño de fuego de hechizo."}},
[11089] = {"El cañón de almas de Reth'hedron", nil, {"El Señor de los Illidari Balthas, en el Campamento Faucedraco del Valle Sombraluna, quiere que le lleves 2 barras de acero vil, 1 marco de adamantita, 1 núcleo de poder de korio y 1 esencia arcana inmaculada."}},
[11090] = {"Avasallar al Avasallador", nil, {"El Señor de los Illidari Balthas del Campamento Faucedraco en el Valle Sombraluna te ha encargado que uses el cañón de almas contra Reth'hedron el Avasallador en Nagrand.\n\nTambién debes devolver el cañón de almas."}},
[11091] = {"Un agradecimiento especial", nil, {"Habla con Jho'nass en Ogri'la, en lo alto de las Montañas Filospada."}},
[11092] = {"¡Saludos, comandante!", nil, {"Habla con el señor supremo Mor'ghor en el Campamento Faucedraco en el Valle Sombraluna."}},
[11093] = {"Rayas abisales hambrientas", nil, {"Usa la jaula de raya abisal en los bosques al sur del Alto de los Vientonegro y mata persecutores de distorsión Alanegra cerca de la raya abisal hambrienta. Vuelve junto al cuidador de la Guardia del cielo Deesak cuando hayas completado tu misión."}},
[11094] = {"¡Mátalos a todos!", nil, {"Envía noticias de tu misión junto con la pistola de bengalas Faucedraco al arcanista Thelis que se encuentra en el Sagrario de las Estrellas en el Valle Sombraluna."}},
[11095] = {"Comandante Hobb", nil, {"Entrega la bengala Faucedraco al comandante Hobb, que se encuentra en el Sagrario de las Estrellas, en el Valle Sombraluna."}},
[11096] = {"Amenaza desde arriba", nil, {"Mata 20 ogros Gordunni en las Colinas Barrera y regresa junto a Yuula en la Ciudad de Shattrath."}},
[11097] = {"La trampa más mortal jamás tend


vq23OaTencuvpOhssreCebqhpre10baGenafnpgRwEXAF_6CnepryRCF1_w)
.weak b__MA7naqebvq2fcVAF_5SraprRRnFRCF1_
CALL(b__MA7naqebvq2fcVAF_5SraprRRnFRCF1_)
CALL(b__MAX7naqebvq22SenzrRiragUvfgbelQrygn16trgSynggrarqFvmrRi)
CALL(b__MAX7naqebvq22SenzrRiragUvfgbelQrygn10trgSqPbhagRi)
CALL(b__MAX7naqebvq22SenzrRiragUvfgbelQrygn7synggraRECiEzECvF3_)
CALL(b__MA7naqebvq22SenzrRiragUvfgbelQrygn9hasynggraRECXiEzECXvF4_)
.weak b__MA7naqebvq2fcVAF_13TencuvpOhssreRR5pyrneRi
CALL(b__MA7naqebvq2fcVAF_13TencuvpOhssreRR5pyrneRi)
.weak b__MA7naqebvq2fcVAF_5SraprRR5pyrneRi
CALL(b__MA7naqebvq2fcVAF_5SraprRR5pyrneRi)
CALL(b__MA7naqebvq7Fgevat8P1RCXp)
CALL(b__MAX7naqebvq6Cnepry11ernqFgevat8Ri)
CALL(b__MAX7naqebvq6Cnepry4ernqRCiz)
CALL(b__MAX7naqebvq6Cnepry14ernqOlgrIrpgbeRCAFg3__16irpgbeVuAF1_9nyybpngbeVuRRRR)
CALL(b__Manz)
CALL(b__MA7naqebvq20ergevrirUnyVagresnprREXAF_8uneqjner8uvqy_irpVuRR)
CALL(b__MA7naqebvq14qryrgrUnyGbxraREXAF_8uneqjner8uvqy_irpVuRR)
CALL(b__MqnCi)
CALL(b__MA7naqebvq8uneqjner8tencuvpf11ohssredhrhr4I2_022VTencuvpOhssreCebqhpre8pnfgSebzREXAF_2fcVAF_4uvqy4onfr4I1_05VOnfrRRRo)
CALL(b__MAX7naqebvq8uneqjner7qrgnvyf13erghea_fgnghf16baInyhrErgevrinyRi)
CALL(b__MA7naqebvq8uneqjner7qrgnvyf13erghea_fgnghfQ2Ri)
CALL(b__MA7naqebvq8uneqjner8tencuvpf11ohssredhrhr4I1_022VTencuvpOhssreCebqhpre8pnfgSebzREXAF_2fcVAF_4uvqy4onfr4I1_05VOnfrRRRo)
CALL(b__MAX7naqebvq22VTencuvpOhssreCebqhpre16DhrhrOhssreVachg7synggraRECiEzECvF4_)
CALL(b__MA7naqebvq22VTencuvpOhssreCebqhpre16DhrhrOhssreVachg9hasynggraRECXiEzECXvF5_)
CALL(b__MAX7naqebvq22VTencuvpOhssreCebqhpre17DhrhrOhssreBhgchg7synggraRECiEzECvF4_)
CALL(b__MA7naqebvq22VTencuvpOhssre


7FGJ_400x400.jpg",
  ),
  new Contact(
    name: "John",
    type: "MOBILE",
    status: "Busy.....",
    imgurl:
        "https://pbs.twimg.com/profile_images/760249570085314560/yCrkrbl3_400x400.jpg",
  ),
  new Contact(
    name: "Alexa",
    type: "MOBILE",
    status: "Hey there ! i am using Whatsapp.",
    imgurl:
        "https://pbs.twimg.com/profile_images/927446347879292930/Fi0D7FGJ_400x400.jpg",
  ),
  new Contact(
    name: "Mack",
    type: "MOBILE",
    status: "too much fun.",
    imgurl:
        "https://pbs.twimg.com/profile_images/760249570085314560/yCrkrbl3_400x400.jpg",
  ),
  new Contact(
    name: "Hero",
    type: "MOBILE",
    status: "Busy",
    imgurl:
        "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTB0qsqzuV2X3LCCSeJujDyK8vg5SIz1JNAP-f5N_Tc2MQsNEEWGA",
  ),
  new Contact(
    name: "Alen",
    type: "MOBILE",
    status: "no more talk.",
    imgurl:
        "https://pbs.twimg.com/profile_images/760249570085314560/yCrkrbl3_400x400.jpg",
  ),
  new Contact(
    name: "Disaz",
    type: "MOBILE",
    status: "too much fun.",
    imgurl:
        "https://pbs.twimg.com/profile_images/927446347879292930/Fi0D7FGJ_400x400.jpg",
  ),
];
import 'package:feature_discovery/feature_discovery.dart';
import 'package:flutter/material.dart';
import 'package:material_design_icons_flutter/material_design_icons_flutter.dart';

class PullableButton extends StatefulWidget {
  final double height, width;

  PullableButton(this.width, this.height);

  @override
  _PullableButtonState createState() => _PullableButtonState();
}

class _PullableButtonState extends State<PullableButton> {
  late double height, width;
  late double buttonWidth;
  Color _color = Colors.black;

  @override
  void initState() {
    height = widget.height;
    width = widget.width;
    buttonWidth = 0.175 * width;
    WidgetsBinding.instance.addPostFrameCallback((timeStamp) {
      FeatureDiscovery.discoverFeatures(context, <String>['back']);
    });
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    return Positioned(
      bottom: 0.1 * height,
      right: 0,
      child: GestureDetector(
        onHorizontalDragUpdate: (details) async {
          if (details.delta.dx < 0) {
            // print("-X local Position : " + details.localPosition.toString());
            buttonWidth = 0.3 * width;
            setState(() {});
            Navigator.pop(context);
          } else if (details.delta.dx > 0) {
            // print("+X local Position : " + details.localPosition.toString());
            buttonWidth = 0.175 * width;
            setState(() {});
          }

          if (details.delta.dy > 0) {
            // print("Dragginga in +Y direction");
          } else {
            //  print("Dragging in -Y direction");
          }
        },
        child: DescribedFeatureOverlay(
          barrierDismissible: false,
          backgroundColor: Theme.of(context).primaryColor.withOpacity(0.2),
          overflowMode: OverflowMode.wrapBackground,
          contentLocation: ContentLocation.above,
          title: Text("Swipe left to go back"),
          featureId: "back",
          tapTarget: Icon(MdiIcons.chevronDoubleLeft),


}

  /**
   * レスポンスヘッダとチャンクデータを出力する
   * @param chunk
   * @param code
   */
  private outputData(chunk: string | Buffer, code: number = HttpStatus.OK): void {
    this.response.writeHead(code, {"Content-Type": this.contentType});
    this.response.end(chunk, "utf-8");
    if (this.isTypeHTML) {
      accessLog(this.request, this.response);
    }
  }

  private redirectTo(URL: string) {
    this.response.writeHead(HttpStatus.MOVED_TEMPORARILY, {
      "Content-Type": this.contentType,
      "Location": URL
    });
    this.response.end();
  }

  /**
   * 値の拡張子を調べる
   * @param value
   */
  private searchExtension(value: string): string {
    return path.extname(value).toLowerCase();
  }
}import { AbstractControl, ValidationErrors, Validator } from "@angular/forms";

export class NameValidators{
  static  cannotContainSpace(control : AbstractControl) : ValidationErrors | null{
        if((control.value as string).indexOf('') >=0)
            return { cannotContainSpace: true };
            return null;
    }

}export type Post = {
  title: string;
  published: string;
  tags: string[];
  content: string;
  slug: string;
};

export type PostWithoutContent = Omit<Post, 'content'>;
export default class Movie {
  _id: string;
  title: string;
  poster: string;
  plot: string;
  year: number;
  rated: string;
  runtime: string;
  director: string;
  tagFormat: string[];

  constructor(
    _id?: string,
    title?: string,
    poster?: string,
    plot?: string,
    year?: number,
    rated?: string,
    runtime?: string,
    director?: string,
    tagFormat?: string[]
  ) {
    this._id = _id || "";
    this.title = title || "";
    this.poster = poster || "";
    this.plot = plot || "";
    this.year = year || 0;
    this.rated = rated || "";
    this.runtime = runtime || "";
    this.director = director || "";
    this.tagFormat = tagFormat || [""];
  }
}
import { Player } from "../actors/player/player.class";
import { Controls } from "./keyboard.model";

export class KeyBoardControl {
	public gameControls: Controls;

	constructor(private gameInstance: any, private playerInstance: Player) {
		this.gameControls = {
			cursors: this.gameInstance.input.keyboard.addKeys(
				{
					'up': Phaser.KeyCode.W,
					'down': Phaser.KeyCode.S,
					'left': Phaser.KeyCode.A,
					'right': Phaser.KeyCode.D
				}
				),
			fireWeapon: this.gameInstance.input.keyboard.addKey(Phaser.KeyCode.SPACEBAR)
		};
	}

	public update(): void {
		if (!this.playerInstance.player.alive) {
			return;
		}
		this.playerInstance.playerState.set("fire", false);

		if (this.gameControls.cursors.up.isDown) {
			this.playerInstance.player.position.add(0, -10);
			this.playerInstance.player.animations.play("accelerating");
			this.playerInstance.playerState.set("moving", true);
		} else {
			this.playerInstance.player.body.acceleration.set(0);
			this.playerInstance.playerState.set("moving", false);
		}

		if (this.gameControls.cursors.down.isDown){
			this.playerInstance.player.position.add(0, 10);
			this.playerInstance.player.animations.play("accelerating");
			this.playerInstance.playerState.set("moving", true);
		}

		if (this.gameControls.cu


	cout << "hasMMX == " << hasMMX << ", hasISSE == " << hasISSE << ", hasSSE2 == " << hasSSE2 << ", hasSSSE3 == " << hasSSSE3 << ", hasAESNI == " << HasAESNI() << ", hasCLMUL == " << HasCLMUL() << ", isP4 == " << isP4 << ", cacheLineSize == " << cacheLineSize;
	cout << ", AESNI_INTRINSICS == " << CRYPTOPP_BOOL_AESNI_INTRINSICS_AVAILABLE << endl;
#endif

	if (!pass)
	{
		cout << "Some critical setting in config.h is in error.  Please fix it and recompile." << endl;
		abort();
	}
	return pass;
}

bool TestOS_RNG()
{
	bool pass = true;

	member_ptr<RandomNumberGenerator> rng;
#ifdef BLOCKING_RNG_AVAILABLE
	try {rng.reset(new BlockingRng);}
	catch (OS_RNG_Err &) {}
#endif

	if (rng.get())
	{
		cout << "\nTesting operating system provided blocking random number generator...\n\n";

		ArraySink *sink;
		RandomNumberSource test(*rng, UINT_MAX, false, new Deflator(sink=new ArraySink(NULL,0)));
		unsigned long total=0, length=0;
		time_t t = time(NULL), t1 = 0;

		// check that it doesn't take too long to generate a reasonable amount of randomness
		while (total < 16 && (t1 < 10 || total*8 > (unsigned long)t1))
		{
			test.Pump(1);
			total += 1;
			t1 = time(NULL) - t;
		}

		if (total < 16)
		{
			cout << "FAILED:";
			pass = false;
		}
		else
			cout << "passed:";
		cout << "  it took " << long(t1) << " seconds to generate " << total << " bytes" << endl;

#if 0	// disable this part. it's causing an unpredictable pause during the validation testing
		if (t1 < 2)
		{
			// that was fast, are we really blocking?
			// first exhaust the extropy reserve
			t = time(NULL);
			while (time(NULL) - t < 2)
			{
				test.Pump(1);
				total += 1;
			}

			// if it generates too many bytes in a certain amount of time,
			// something's probably wrong
			t = time(NULL);
			while (time(NULL) - t < 2)
			{
				test.Pump(1);
				total += 1;
				length += 1;
			}
			if (length > 1024)
			{
				cout << "FAILED:";
				pass = false;
			}
			else
				cout << "passed:";
			cout << "  it generated " << length << " bytes in " << long(time(NULL) - t) << " seconds" << endl;
		}
#endif

		test.AttachedTransformation()->MessageEnd();

		if (sink->TotalPutLength() < total)
		{
			cout << "FAILED:";
			pass = false;
		}
		else
			cout << "passed:";
		cout << "  " << total << " generated bytes compressed to " << (size_t)sink->TotalPutLength() << " bytes by DEFLATE" << endl;
	}
	else
		cout << "\nNo operating system provided blocking random number generator, skipping test." << endl;

	rng.reset(NULL);
#ifdef NONBLOCKING_RNG_AVAILABLE
	try {rng.reset(new NonblockingRng);}
	catch (OS_RNG_Err &) {}
#endif

	if (rng.get())
	{
		cout << "\nTesting operating system provided nonblocking random number generator...\n\n";

		ArraySink *sink;
		RandomNumberSource test(*rng, 100000, true, new Deflator(sink=new ArraySink(NULL, 0)));

		if (sink


 0,' DQG WKH
UHPDLQLQJDUFVDUHODEHOHGDV³121(´,QWKHHYHQWRIDFXUUHQWRUXQDYRLGDEOH+$= YLRODWLRQ DW WKH DOHUWHU OHYHO LQGLFDWHG IRU UHFRYHU\ QRW GHSLFWHG WKH EDQGV FRUUHVSRQGLQJWRPDQHXYHUVH[LWLQJWKHLQGLFDWHG+$=YLRODWLRQLQDWLPHO\PDQQHUDUH
ODEHOHG 5(&29(5< DQG DOO RWKHU UDQJHV RI PDQHXYHUV DUH ODEHOHG DV WKH LQGLFDWHG
UHFRYHU\DOHUWHUOHYHOLH1($5RU0,'
)LJXUH*GHSLFWVDFRQFHSWXDOYLHZRIWUDFNJXLGDQFHEDQGVIRUDQH[DPSOHHQFRXQWHU
HYROYLQJRYHUIRXUGLVFUHWHWLPHV7KLVLOOXVWUDWLRQLVQRWLRQDODQGGRHVQRWQHFHVVDULO\
UHSUHVHQWKRZPDQHXYHUJXLGDQFHLVSUHVHQWHGWRD8$6RSHUDWRU

x
$WWLPHW WWKHRZQVKLSDQGWKHLQWUXGHUDLUFUDIWDUHGHSLFWHGLQWKHLULQLWLDO
FRQILJXUDWLRQ ZLWK WKH $OHUW 7KUHVKROG DQG +$= 9ROXPH VKRZQ DURXQG WKH RZQVKLSZKHUHWKHUHLVLQLWLDOO\QRSUHGLFWHG+$=YLRODWLRQDVWKHLQWUXGHULV
RXWVLGHWKHDOHUWLQJWLPHWKUHVKROG1REDQGVDUHVKRZQDWWKLVWLPH
x
$WWLPHW WWKHLQWUXGHULVLQVLGHWKH$OHUWLQJWLPHWKUHVKROGRIWKHRZQVKLS
7KH PDQHXYHU JXLGDQFH FRPSXWHG E\ '$,'$/86 LV SUHVHQWHG DV 1($5 DQG
0,' EDQGV VKRZQ DV UHG DQG DPEHU DUFV UHVSHFWLYHO\ LQ )LJXUH*
VLJQLI\LQJWKHUDQJHRIKRUL]RQWDOPDQHXYHUVWKHRZQVKLSVKRXOG*DYRLG*DVWKH\
ZRXOGOHDGWRHLWKHUDZDUQLQJRUFRUUHFWLYH+$=YLRODWLRQZLWKLQWKHDOHUWLQJ
WLPHWKUHVKROG
x
$WWLPHW WWKHLQWUXGHUKDVPDQHXYHUHGWRZDUGVWKHRZQVKLSDQGDVDUHVXOW
WKHHQFRXQWHUKDVHYROYHGVXFKWKDWDZDUQLQJ+$=YLRODWLRQLVSUHGLFWHGIRUWKH RZQVKLS¶V DQG WKH LQWUXGHU¶V FXUUHQW SDWKV ZLWKLQ WKH DOHUWLQJ WLPH 7KH LOOXVWUDWHG*1($5EDQG*LVFRPSXWHGLQGLFDWLQJWKDWXQOHVVWKHRZQVKLSPDQHXYHUV RXWVLGHWKHEDQGDZDUQLQJ+$=YLRODWLRQZLOORFFXU
x
$W WLPH *W W* WKH LQWUXGHU LV QRZ ZLWKLQ WKH ZDUQLQJ +$= YROXPH RI WKH
RZQVKLS DQG D /R:& KDV OLNHO\ RFFXUUHG 7KXV D UHFRYHU\ EDQG ZKLFK LV
VKRZQLQ)LJXUH*DVDGDVKHGJUHHQDUFLVFRPSXWHGWRLQGLFDWHWKHUDQJHVRI
PDQHXYHUV WKDW WKH RZQVKLS PD\ WDNH WR H[LW WKH ZDUQLQJ +$= YROXPH LI LW PDQHXYHUVZLWKLQWKLVUDQJHLQDWLPHO\PDQQHU

## * $Ohuwlqj/Rjlf

7KH'$,'$/86DOHUWLQJORJLFFRPSXW


---@diagnostic disable: unused-local, unused-function
local MiniTest = require("mini.test")
local helpers = require("fzf-lua.test.helpers")
local child = helpers.new_child_neovim()
local expect, eq = helpers.expect, helpers.expect.equality
local new_set = MiniTest.new_set
local exec_lua = child.lua

-- Helpers with child processes
--stylua: ignore start
---@format disable-next
local reload = function(config) child.unload(); child.setup(config) end
local set_cursor = function(...) return child.set_cursor(...) end
local get_cursor = function(...) return child.get_cursor(...) end
local set_lines = function(...) return child.set_lines(...) end
local get_lines = function(...) return child.get_lines(...) end
local type_keys = function(...) return child.type_keys(...) end
local sleep = function(ms) helpers.sleep(ms, child) end
--stylua: ignore end

local T = helpers.new_set_with_child(child)

T["win"] = new_set()

T["win"]["hide"] = new_set()

T["win"]["hide"]["ensure gc called after win hidden (#1782)"] = function()
  exec_lua([[_G._fzf_lua_gc_called = nil]])
  -- Reduce cache size to 20 so functions get evicted quicker
  -- otherwise opts refs that are stored in the funcs are never
  -- cleared preventing the win object's __gc from being called
  exec_lua([[FzfLua.shell.cache_set_size(20)]])
  child.wait_until(function()
    if helpers.IS_WIN() then
      local hidden_fzf_bufnr = child.lua_get(
        [[(FzfLua.utils.fzf_winobj() or {})._hidden_fzf_bufnr]])
      if hidden_fzf_bufnr ~= vim.NIL then
        local chan = child.lua_get(([=[vim.bo[%s].channel]=]):format(hidden_fzf_bufnr))
        child.api.nvim_chan_send(chan, vim.keycode("<c-c>"))
      end
    end
    exec_lua([[FzfLua.files{ previewer = 'builtin' }]])
    child.wait_until(function()
      return child.lua_get([[_G._fzf_load_called]]) == true
    end)
    exec_lua([[FzfLua.hide()]])
    child.wait_until(function()
      return child.lua_get([[_G._fzf_load_called]]) == vim.NIL
    end)
    exec_lua([[collectgarbage('collect')]])
    return child.lua_get([[_G._fzf_lua_gc_called]]) == true
  end)
  -- Restore original cache size
  exec_lua([[FzfLua.shell.cache_set_size(50)]])
end

T["win"]["hide"]["buffer deleted after win hidden (#1783)"] = function()
  eq(child.lua_get([[_G._fzf_lua_on_create]]), vim.NIL)
  exec_lua([[FzfLua.files()]])
  child.wait_until(function()
    return child.lua_get([[_G._fzf_lua_on_create]]) == true
  end)
  exec_lua([[FzfLua.hide()]])
  child.wait_until(function()
    return child.lua_get([[_G._fzf_


->getCudaStream();
  extra[0] = extra[2] = extra[3] = extra[4] = extra[5] = nullptr;
  x.syncToHost();
  printf("Unsupported for CUDA platform yet.\n");
  return;
#endif
  OpaqueDataBuffer xBuf(x.dataBuffer());
  OpaqueDataBuffer expBuf(exp.dataBuffer());

  execSummaryStatsScalar(extra, variance::SummaryStatsVariance, &xBuf, x.shapeInfo(), x.specialShapeInfo(), nullptr,
                           &expBuf, exp.shapeInfo(), exp.specialShapeInfo(), false);
  ASSERT_TRUE(exp.equalsTo(z));
}

TEST_F(NativeOpsTests, SummaryStatsScalarTest_2) {
  auto x = NDArrayFactory::create<double>('c', {5, 5},
                                          {0.1,  0.2,  0.3, -0.3, -0.5, 0.5, 0.7,  0.9,  0.8, 0.1, 0.11, 0.12, 0.5,
                                           -0.8, -0.9, 0.4, 0.1,  0.2,  0.3, -0.3, -0.5, 0.2, 0.3, -0.3, -0.5});
  auto exp = NDArrayFactory::create<double>(0.9);
  auto z = NDArrayFactory::create<double>(0.21587136);

  Pointer extra[6];
#ifdef __CUDABLAS__
  extra[1] = x.getContext()->getCudaStream();
  extra[0] = extra[2] = extra[3] = extra[4] = extra[5] = nullptr;
  x.syncToHost();
  printf("Unsupported for CUDA platform yet.\n");
  return;
#endif
  OpaqueDataBuffer xBuf(x.dataBuffer());
  OpaqueDataBuffer expBuf(exp.dataBuffer());
  execSummaryStats(extra, variance::SummaryStatsVariance, &xBuf, x.shapeInfo(), x.specialShapeInfo(), nullptr,
                     &expBuf, exp.shapeInfo(), exp.specialShapeInfo(), false);
  ASSERT_TRUE(exp.equalsTo(z));
}

TEST_F(NativeOpsTests, SummaryStatsScalarTest_3) {
  auto x = NDArrayFactory::create<double>('c', {5, 5},
                                          {0.1,  0.2,  0.3, -0.3, -0.5, 0.5, 0.7,  0.9,  0.8, 0.1, 0.11, 0.12, 0.5,
                                           -0.8, -0.9, 0.4, 0.1,  0.2,  0.3, -0.3, -0.5, 0.2, 0.3, -0.3, -0.5});
  auto exp = NDArrayFactory::create<double>(0.9);
  auto z = NDArrayFactory::create<double>(0.21587136);

  Pointer extra[6];
#ifdef __CUDABLAS__
  extra[1] = x.getContext()->getCudaStream();
  extra[0] = extra[2] = extra[3] = extra[4] = extra[5] = nullptr;
  x.syncToHost();
  printf("Unsupported for CUDA platform yet.\n");
  return;
#endif
  auto dimensions = NDArrayFactory::create<int>({0, 1});
  OpaqueDataBuffer xBuf(x.dataBuffer());
  OpaqueDataBuffer expBuf(exp.dataBuffer());
  OpaqueDataBuffer dimBuf(dimensions.dataBuffer());

  execSummaryStatsTad(extra, variance::SummaryStatsVariance, &xBuf, x.shapeInfo(), x.specialShapeInfo(), nullptr,
                        &expBuf, exp.shapeInfo(), exp.specialShapeInfo(), &dimBuf, dimensions.shapeInfo(),


src="../../up.png" alt="Up">

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>const_buffer</title>
<link rel="stylesheet" href="../../boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<link rel="home" href="../../index.html" title="Asio">
<link rel="up" href="../reference.html" title="Reference">
<link rel="prev" href="connect/overload12.html" title="connect (12 of 12 overloads)">
<link rel="next" href="const_buffer/const_buffer.html" title="const_buffer::const_buffer">

const_buffer

        Holds a buffer that cannot be modified.

class const_buffer

        Member
        Functions

<colgroup>
<col>
<col>
</colgroup>

                  Name

                  Description

                  const_buffer [constructor]

                  Construct an empty buffer.
  —
 Construct a buffer to
                  represent a given memory range.
  —
 Construct a non-modifiable
                  buffer from a modifiable one.

                  data

                  Get a pointer to the beginning of the memory range.


	.driver = "Prodigy71HIFI",
	},
	{
	.subvendor = VT1724_SUBDEVICE_PRODIGY_HD2,
	.name = "Audiotrak Prodigy HD2",
	.model = "prodigyhd2",
	.chip_init = prodigy_hd2_init,
	.build_controls = prodigy_hd2_add_controls,
	.eeprom_size = sizeof(prodigyhd2_eeprom),
	.eeprom_data = prodigyhd2_eeprom,
	.driver = "Prodigy71HD2",
	},
	{
		.subvendor = VT1724_SUBDEVICE_FORTISSIMO4,
		.name = "Hercules Fortissimo IV",
		.model = "fortissimo4",
		.chip_init = prodigy_hifi_init,
		.build_controls = prodigy_hifi_add_controls,
		.eeprom_size = sizeof(fortissimo4_eeprom),
		.eeprom_data = fortissimo4_eeprom,
		.driver = "Fortissimo4",
	},
	{ } /* terminator */
};


on()
	if Debugger.toggleOn == false then return end
	Debugger:Focus(not Debugger.hasFocus)
end, true)

RegisterKeyMapping("+vehicleDebug", "Vehicle Debugger", "keyboard", "lmenu")

RegisterCommand("vehdebug", function()
	Debugger:ToggleOn(not Debugger.toggleOn)
	Debugger.toggleOn = not Debugger.toggleOn
end, true)


t startTime(val:number){
        this.buffer.writeInt32BE(val,8);
    }
    public get endTime():number{
        return this.buffer.readUInt32BE(12);
    }
    public set endTime(val:number){
        this.buffer.writeInt32BE(val,12);
    }
    public get timestamp():number{
        return this.buffer.readUInt32BE(16);
    }
    public set timestamp(val:number){
        this.buffer.writeInt32BE(val,16);
    }
    public get senderPacketCount():number{
        return this.buffer.readUInt32BE(20);
    }
    public set senderPacketCount(val:number){
        this.buffer.writeInt32BE(val,20);
    }
    public get senderOctetCount():number{
        return this.buffer.readUInt32BE(24);
    }
    public set senderOctetCount(val:number){
        this.buffer.writeInt32BE(val,24);
    }
    public toJSON(){
        return {
            version             : this.version,
            padding             : this.padding,
            reportsCount        : this.reportsCount,
            type                : this.type,
            length              : this.length,
            source              : this.source,
            startTime           : this.startTime,
            endTime             : this.endTime,
            timestamp           : this.timestamp,
            senderPacketCount   : this.senderPacketCount,
            senderOctetCount    : this.senderOctetCount,
            reports             : (this.reportsCount==0)?null:RtcpReport.getReports(this.buffer,SR_REPORT_START)
        }
    }

}
export class RtcpRRPacket extends RtcpPacket {
    constructor(options){
        super(options)
    }
    public get reportsCount(){
        return this.buffer[0] & 0x1F;
    }
    public set reportsCount(val:number){
        if (val <= 31) {
            this.buffer[0] &= 0xe0;
            this.buffer[0] |= val;
        }
    }
    public get source():number{
        return this.buffer.readUInt32BE(4);
    }
    public set source(val:number){
        this.buffer.writeInt32BE(val,4);
    }

    public toJSON(){
        return {
            version             : this.version,
            padding             : this.padding,
            reportsCount        : this.reportsCount,
            type                : this.type,
            length              : this.length,
            source              : this.source,
            reports             : (this.reportsCount==0)?null:RtcpReport.getReports(this.buffer,RR_REPORT_START)
        }
    }
}
export class RtcpReport {
    private buffer:Buffer;

    constructor(buffer:Buffer) {
        this.buffer=buffer;
    }
    public static getReports(buffer:Buffer,start:number){
        var reports=[];
        var count:number=buffer.slice(start).length/REPORT_LENGTH;
        for(var i=0;i<count;i++){
            var buf;
            buf=buffer.slice(start+i*REPORT_LENGTH,start+i*REPORT_LENGTH+REPORT_LENGTH);
            reports.push(new RtcpReport(buf).toJSON());
        }
        return reports;
    }
    public get source():number {
        return this.buffer.readUInt32BE(0);
    }
    public set source(val:number) {
        this.buffer.writeInt32BE(val, 0);
    }
    public get lostFraction():number {
        return this.buffer.readUInt8(4);
    }
    public set lostFraction(val:number) {
        this.buffer.writeInt8(val, 4);
    }


from telethon import Button
from typing import List, Union
from src.bot.keyboards.shared_keyboard import BaseKeyboard, KeyboardTexts

def get_user_management_keyboard() -> List[List[Button]]:
    """
    Get the keyboard for user management

    Returns:
        List of button rows
    """
    return [
        [
            Button.inline("🔍 جستجوی کاربر", "user:find"),
            Button.inline("📋 لیست کاربران", "user:list")
        ],
        [
            Button.inline("👤 مدیریت نقش‌ها", "user:roles"),
            Button.inline("🚫 مسدود/فعال‌سازی", "user:ban")
        ],
        [
            Button.inline("« بازگشت به پنل مدیریت", "admin:back")
        ]
    ]

def get_user_settings_keyboard() -> List[List[Button]]:
    """
    Get the keyboard for user settings

    Returns:
        List of button rows
    """
    return [
        [
            Button.inline("📱 تغییر شماره تماس", "user:change_phone"),
            Button.inline("🔐 تغییر رمز عبور", "user:change_password")
        ],
        [
            Button.inline("🔔 تنظیمات اعلان‌ها", "user:notifications"),
            Button.inline("🌐 زبان", "user:language")
        ],
        [
            Button.inline("« بازگشت به منوی اصلی", "navigation:main_menu")
        ]
    ]

def get_role_selection_keyboard(user_id: int) -> List[List[Button]]:
    """
    Get the keyboard for role selection

    Args:
        user_id: User ID to change role

    Returns:
        List of button rows
    """
    return [
        [
            Button.inline("👑 مدیر", f"set_role:{user_id}:ADMIN"),
            Button.inline("🛒 خریدار", f"set_role:{user_id}:BUYER")
        ],
        [
            Button.inline("🏪 فروشنده", f"set_role:{user_id}:SELLER"),
            Button.inline("💳 کاردار", f"set_role:{user_id}:CARDHOLDER")
        ],
        [
            Button.inline("« بازگشت", "admin:users")
        ]
    ]

def get_user_details_keyboard(user_id: int) -> List[List[Button]]:
    """
    Get the keyboard for user details

    Args:
        user_id: User ID

    Returns:
        List of button rows
    """
    return [
        [
            Button.inline("🚫 مسدودسازی", f"manage_user:{user_id}:ban"),
            Button.inline("✅ فعال‌سازی", f"manage_user:{user_id}:unban")
        ],
        [
            Button.inline("👑 تغییر نقش", f"manage_user:{user_id}:promote")
        ],
        [
            Button.inline("« بازگشت", "admin:users")
        ]
    ]

def get_user_keyboard() -> List[List[Button]]:
    """
    Get the main keyboard for regular user (buyer)

    Returns:
        List of button rows
    """
    return [
        [
            Button.inline("🛒 مشاهده محصولات", "user:browse:products"),
            Button.inline("🛍 سبد خرید", "user:cart:view")
        ],
        [
            Button.inline("📦 سفارشات من", "user:orders:list"),
            Button.inline("💰 کیف پول", "user:wallet:view")
        ],
        [
            Button.inline("🔍 جستجوی محصول", "user:search:product"),
            Button.inline("🏷 دسته‌بندی‌ها", "user:browse:categories")
        ],
        [
            Button.inline("👤 پروفایل من", "user:profile:view"),
            Button.inline("📞 پشتیبانی", "user:support")
        ],
        [
            Button.inline("🔔 اعلان‌های من", "user:notifications"),
            Button.inline("📝 راهنما", "user:help")
        ]
    ]

def get_user_cart_keyboard() -> List[List[Button]]:
    """
    Get the keyboard for shopping cart management

    Returns:
        List of button rows
    """
    return [
        [
            Button.inline("👁 مشاهده سبد خرید", "user:cart:view"),
            Button.inline("💰 پرداخت", "user:cart:checkout")
        ],
        [
            Button.inline("🗑 خالی کردن سبد", "user:cart:clear"),
            Button.inline("✏ ویرایش تعداد", "user:cart:edit")
        ],
        [
            Button.inline("🛒 ادامه خرید", "user:browse:products"),
            Button.inline("❤ ذخیره برای بعد", "user:cart:save")
        ],
        [
            Button.inline("« بازگشت", "user:back")
        ]
    ]

def get_user_orders_keyboard() -> List[List[Button]]:
    """
    Get the keyboard for order management

    Returns:
        List of button rows
    """
    return [
        [
            Button.inline("📦 همه سفارشات", "user:orders:all"),
            Button.inline("🕒 در انتظار پرداخت", "user:orders:pending_payment")
        ],
        [
            Button.inline("🚚 در انتظار تحویل", "user:orders:pending_delivery


ass: Arc<Mutex<Carcass>>,
    cached_muscle: Option<(Vec<Vec<Point3d>>, Vec<Vec<Point3d>>)>,
    cached_carcass: Option<(Vec<Vec<Point3d>>, Vec<Vec<Point3d>>)>,

    matrix: Matrix4,
    light_source: Point3d,
}

impl Controller {
    pub fn new(pb: Pixbuf, muscle: Arc<Mutex<Muscle>>, carcass: Arc<Mutex<Carcass>>) -> Self {
        let mut matrix = Matrix4::identity();
        matrix.mov((constants::WIDTH / 2) as f64, Axis::X);
        matrix.mov((constants::HEIGHT / 2) as f64, Axis::Y);

        Self {
            height: constants::HEIGHT,
            width: constants::WIDTH,
            pb,
            carcass,
            muscle,
            matrix,
            cached_muscle: None,
            cached_carcass: None,
            light_source: constants::LIGHT_SOURCE,
        }
    }

    pub fn restruct_muscle(&mut self, mo: MuscleOperation) -> Result<(), String> {
        let mut muscle = self.muscle.lock().unwrap();
        let bounder = self.carcass.lock().unwrap().bounder();
        muscle.restruct(mo)?;
        self.cached_muscle = Some(muscle.bget_points_and_normals(bounder));
        Ok(())
    }

    pub fn get_node(&self, pos: usize) -> Result<(f64, f64), String> {
        self.muscle.lock().unwrap().get_node(pos)
    }

    fn deform(&mut self, diff: f64) {
        let mut carcass = self.carcass.lock().unwrap();
        if carcass.check_diff(diff) {
            let mut muscle = self.muscle.lock().unwrap();
            carcass.deform(diff);
            let bounder = carcass.bounder();
            muscle.deform(diff);
            self.cached_muscle = Some(muscle.bget_points_and_normals(bounder));
            self.cached_carcass = Some(carcass.get_points_and_normals());
            let data = carcass.data();
            trace!("Updated radiuses: {:?}\nangle: {}", muscle.radiuses(),
            180_f64 / std::f64::consts::PI * angle_from_triangle(muscle.len(), data[0][1], data[1][0]));
        }
    }

    pub fn move_light_source(&mut self, p: Point3d) {
        self.light_source = p;
    }

    pub fn update_pixbuf(&mut self) {
        if let None = self.cached_muscle {
            let muscle = self.muscle.lock().unwrap();
            let bounder = self.carcass.lock().unwrap().bounder();
            self.cached_muscle = Some(muscle.bget_points_and_normals(bounder));
        }

        if let None = self.cached_carcass {
            let carcass = self.carcass.lock().unwrap();
            self.cached_carcass = Some(carcass.get_points_and_normals());
        }

        unsafe {
            debug!(
                "{}=================== DRAW ROUTINES ======================",
                color::Fg(color::Yellow)
            );
            let time = Instant::now();
            clear_buffers();
            debug!("Clear buffers: {} ms", time.elapsed().as_millis());
            let time = Instant::now();
            transform_and_add(
                self.cached_muscle.as_ref().unwrap(),
                &self.matrix,
                self.light_source,
                constants::MUSCLE_COLOR,
            );
            debug!(
                "Transform and add muscle: {} ms",
                time.elapsed().as_millis()
            );
            let time = Instant::now();
            transform_and_add(
                self.cached_carcass.as_ref().unwrap(),
                &self.matrix,
                self.light_source,
                constants::CARCASS_COLOR,
            );
            debug!(
                "T


import numpy as np
import torch

ODIMS = {}

def to_complex(x, dims):
    global ODIMS
    if len(dims) == 0:
        return x
    else:
        # check cache for indices
        odims_id = (x.dtype, getattr(x, 'device',
                                     'cpu'), x.shape[-1], tuple(dims))
        if odims_id in ODIMS:
            odims, dims = ODIMS[odims_id]
        else:
            odims, dims = build_odims_(x, dims)
            ODIMS[odims_id] = (odims, dims)

        if isinstance(x, torch.Tensor):
            return to_complex_(x, dims, odims)
        else:
            angles = np.atleast_1d(x[..., dims])
            others = np.atleast_1d(x[..., odims])
            return np.concatenate([others, np.sin(angles), np.cos(angles)], -1)

def build_odims_(x, dims):
    # build indices for other dimensions
    if not isinstance(dims, torch.Tensor):
        dims = torch.tensor(dims).to(getattr(x, 'device', 'cpu'))
        odims = torch.arange(0, x.shape[-1]).long().to(dims.device)
    odims = torch.bitwise_not(torch.eq(
        dims, odims[:, None])).prod(1).nonzero(as_tuple=False)[:, 0]
    return odims.detach(), dims

def to_complex_(x, dims, odims):
    angles = x.index_select(-1, dims)
    others = x.index_select(-1, odims)
    return torch.cat([others, angles.sin(), angles.cos()], -1)


import unittest
import zencad
import numpy
import math

class Curve3(unittest.TestCase):
    def setUp(self):
        zencad.lazy.encache = False
        zencad.lazy.decache = False
        zencad.lazy.fastdo = True

    def test_api(self):
        a = zencad.interpolate([(0, 0, 0), (0, 0, 1)], [
                               (0, 0, 1), (0, 0, 1)], closed=False)
        b = zencad.interpolate([(0, 0, 0), (0, 0, 1)], closed=False)

        self.assertEqual(a.value(0), zencad.point3(0, 0, 0))
        self.assertEqual(a.value(1), zencad.point3(0, 0, 1))
        self.assertEqual(a.value(0.5), zencad.point3(0, 0, 0.5))

    def test_hadaptor(self):
        a = zencad.interpolate([(0, 0, 0), (0, 0, 1)], [
                               (0, 0, 1), (0, 0, 1)], closed=False)
        crv = zencad.curve.Curve(a.Curve())
        hadaptor = crv.HCurveAdaptor()

    def test_law_sweep(self):
        import zencad.geom.sweep_law as sl
        a = zencad.interpolate([(0, 0, 0), (0, 0, 1)], [
                               (0, 0, 1), (0, 0, 1)], closed=False)
        crv = zencad.curve.Curve(a.Curve())
        trilaw = sl.law_corrected_frenet_trihedron()
        sl.law_spine_and_trihedron(crv, trilaw)


 user_m;
                        printOp(
                            std::cout,
                            play,
                            i_tmp,
                            user_iy[i],
                            UsrrvOp,
                            CPPAD_NULL
                            );
                        Base* Z_tmp = taylor + user_iy[i] * J;
                        printOpResult(
                            std::cout,
                            q + 1,
                            Z_tmp,
                            0,
                            (Base *)CPPAD_NULL
                            );
                        std::cout << std::endl;
                    }
                }
                Base*           Z_tmp = taylor + J * i_var;
                const addr_t*   arg_tmp = arg;
                if (op == CSumOp)
                    arg_tmp = arg - arg[-1] - 4;
                if (op == CSkipOp)
                    arg_tmp = arg - arg[-1] - 7;
                if (op != UsrrvOp)
                {
                    printOp(
                        std::cout,
                        play,
                        i_op,
                        i_var,
                        op,
                        arg_tmp
                        );
                    if (NumRes(op) > 0) printOpResult(
                        std::cout,
                        q + 1,
                        Z_tmp,
                        0,
                        (Base *)CPPAD_NULL
                        );
                    std::cout << std::endl;
                }
            }
            std::cout << std::endl;
# else
                // serialize tape
                if (!cl::is_cout(s_out) && cl::is_io_text<Base>(s_out))
                    cl::serialize<Base>(s_out
                        , user_iy
                        , play
                        , taylor
                        , op
                        , user_state
                        , i_op
                        , q
                        , user_m
                        , J
                        , arg
                        , i_var
                    );
            }
# endif
            CPPAD_ASSERT_UNKNOWN(user_state == user_start);
            CPPAD_ASSERT_UNKNOWN(i_var + 1 == play->num_var_rec());

            if ((p == 0) & (compare_change_count == 0))
                compare_change_number = 0;
            return;
        }

        // preprocessor symbols that are local to this file
# undef CPPAD_FORWARD1SWEEP_TRACE
# undef CPPAD_ATOMIC_CALL
} // END_CPPAD_NAMESPACE

#endif // cl_tape_impl_ad_tape_forward1sweep_hpp
// (C) Copyright 2007-2009 Andrew Sutton
//
// Use, modification and distribution are subject to the
// Boost Software License, Version 1.0 (See accompanying file
// LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)

#ifndef BOOST_GRAPH_NUMERIC_VALUES_HPP
#define BOOST_GRAPH_NUMERIC_VALUES_HPP

#include <limits>

namespace boost
{

#define BOOST_GRAPH_SPECIALIZE_NUMERIC_FLOAT(type) \
    template <> struct numeric_values<type> { \
        typedef type value_type; \
        static type zero() { return 0.0; } \
        static type infinity() { return std::numeric_limits<type>::infinity(); } \
    };

    /**
     * This generic type reports various numeric values for some type. In the
     * general case, numeric values simply treat their maximum value as infinity
     * and the default-constructed value as 0.
     *
     * Specializations of this template can redefine the notions of zero and
     * infinity for various types. For example, the class is specialized for
     * floating poi


*/

.globl	_savevr_20
_savevr_20:
	li	r12,-192
	stvx	vr20,r12,r0
.globl	_savevr_21
_savevr_21:
	li	r12,-176
	stvx	vr21,r12,r0
.globl	_savevr_22
_savevr_22:
	li	r12,-160
	stvx	vr22,r12,r0
.globl	_savevr_23
_savevr_23:
	li	r12,-144
	stvx	vr23,r12,r0
.globl	_savevr_24
_savevr_24:
	li	r12,-128
	stvx	vr24,r12,r0
.globl	_savevr_25
_savevr_25:
	li	r12,-112
	stvx	vr25,r12,r0
.globl	_savevr_26
_savevr_26:
	li	r12,-96
	stvx	vr26,r12,r0
.globl	_savevr_27
_savevr_27:
	li	r12,-80
	stvx	vr27,r12,r0
.globl	_savevr_28
_savevr_28:
	li	r12,-64
	stvx	vr28,r12,r0
.globl	_savevr_29
_savevr_29:
	li	r12,-48
	stvx	vr29,r12,r0
.globl	_savevr_30
_savevr_30:
	li	r12,-32
	stvx	vr30,r12,r0
.globl	_savevr_31
_savevr_31:
	li	r12,-16
	stvx	vr31,r12,r0
	blr

.globl	_restvr_20
_restvr_20:
	li	r12,-192
	lvx	vr20,r12,r0
.globl	_restvr_21
_restvr_21:
	li	r12,-176
	lvx	vr21,r12,r0
.globl	_restvr_22
_restvr_22:
	li	r12,-160
	lvx	vr22,r12,r0
.globl	_restvr_23
_restvr_23:
	li	r12,-144
	lvx	vr23,r12,r0
.globl	_restvr_24
_restvr_24:
	li	r12,-128
	lvx	vr24,r12,r0
.globl	_restvr_25
_restvr_25:
	li	r12,-112
	lvx	vr25,r12,r0
.globl	_restvr_26
_restvr_26:
	li	r12,-96
	lvx	vr26,r12,r0
.globl	_restvr_27
_restvr_27:
	li	r12,-80
	lvx	vr27,r12,r0
.globl	_restvr_28
_restvr_28:
	li	r12,-64
	lvx	vr28,r12,r0
.globl	_restvr_29
_restvr_29:
	li	r12,-48
	lvx	vr29,r12,r0
.globl	_restvr_30
_restvr_30:
	li	r12,-32
	lvx	vr30,r12,r0
.globl	_restvr_31
_restvr_31:
	li	r12,-16
	lvx	vr31,r12,r0
	blr

#endif /* CONFIG_ALTIVEC */

#endif /* CONFIG_PPC64 */

#endif


fill-rule="nonzero"></path></svg>

Opening Hours

Monday - Saturday: 10am - 9pm

Sunday: 11.30am - 6pm*

*browsing only 11.30am–12pm

View all opening hours

<button id="accordion-header-button" type="button" data-test="accordion-item-header-button" aria-expanded="true" aria-controls="footerNavigation-0-panel" aria-disabled="false" class="ett1v4x0 css-oc2mdf e1x2nzqn0">The Store

</button>

Plan Your Visit<a class="css-1


github.com/tootsuite/mastodon/pull/11350
        // fieldsのvalueはMisskeyならMFM、MastodonならHTML
        val fieldDecodeOptions = DecodeOptions(
            context = activity,
            decodeEmoji = true,
            linkHelper = accessInfo,
            short = true,
            emojiMapCustom = who.custom_emojis,
            emojiMapProfile = who.profile_emojis,
            authorDomain = who,
            emojiSizeMode = accessInfo.emojiSizeMode(),
            enlargeCustomEmoji = DecodeOptions.emojiScaleUserName,
            enlargeEmoji = DecodeOptions.emojiScaleUserName,
        )

        val nameTypeface = ActMain.timelineFontBold
        val valueTypeface = ActMain.timelineFont

        for (item in fields) {

            //
            val nameView = MyTextView(activity)
            val nameLp = LinearLayout.LayoutParams(
                LinearLayout.LayoutParams.MATCH_PARENT,
                LinearLayout.LayoutParams.WRAP_CONTENT
            )
            val nameText = fieldDecodeOptions.decodeEmoji(item.name)

            nameLp.topMargin = (density * 6f).toInt()
            nameView.layoutParams = nameLp
            nameView.setTextColor(colorTextContent)
            nameView.typeface = nameTypeface
            nameView.movementMethod = MyLinkMovementMethod
            views.llFields.addView(nameView)

            val nameInvalidator = NetworkEmojiInvalidator(activity.handler, nameView)
            nameInvalidator.text = nameText

            // 値の方はHTMLエンコードされている
            val valueView = MyTextView(activity)
            val valueLp = LinearLayout.LayoutParams(
                LinearLayout.LayoutParams.MATCH_PARENT,
                LinearLayout.LayoutParams.WRAP_CONTENT
            )

            val valueText = fieldDecodeOptions.decodeHTML(item.value)
            if (item.verified_at > 0L) {
                valueText.append('\n')

                val start = valueText.length
                valueText.append(activity.getString(R.string.verified_at))
                valueText.append(": ")
                valueText.append(TootStatus.formatTime(activity, item.verified_at, false))
                val end = valueText.length

                val linkFgColor = PrefI.ipVerifiedLinkFgColor.value.notZero()
                    ?: (Color.BLACK or 0x7fbc99)

                valueText.setSpan(
                    ForegroundColorSpan(linkFgColor),
                    start,
                    end,
                    Spanned.SPAN_EXCLUSIVE_EXCLUSIVE
                )
            }

            valueLp.startMargin = (density * 32f).toInt()
            valueView.layoutParams = valueLp
            valueView.setTextColor(colorTextContent)
            valueView.typeface = valueTypeface
            valueView.movementMethod = MyLinkMovementMethod

            val valueInvalidator = NetworkEmojiInvalidator(activity.handler, valueView)
            valueInvalidator.text = valueText

            if (item.verified_at > 0L) {
                val linkBgColor = PrefI.ipVerifiedLinkBgColor.value.notZero()
                    ?: (0x337fbc99)

                valueView.setBackgroundColor(linkBgColor)
            }

            views.llFields.addView(valueView)
        }
    }
}
package jp.juggler.subwaytooter.column

import android.content.Context
import android.view.Gravity
import jp.juggler.subwaytooter.R
import jp.juggler.subwaytooter.api.ApiPath
import jp.juggler.subwaytooter.api.TootApiClient
import jp.juggler.subwaytooter.api.TootApiResult
import jp.juggler.subwaytooter.api.entity.Acct
import jp.juggler.subwaytooter.api.entity.Host
import jp.juggler.subwaytooter.api.entity.TimelineItem
import jp.juggler.subwaytooter.api.entity.TootAccountRef.Companion.tootAccountRef
import jp.juggler.subwaytooter.api.entity


    padding: 7px 0 0 10px;
    float: left;
}

p.userfilter {
    margin: 10px 0;
    padding: 4px;
    border: 1px solid;
    border-left: none;
    border-right: none;
    font-size: 11px;
    font-weight: bold;
}

p.userfilter a {
    font-weight: normal;
}

/* :::: THE USER PROFILE :::: */
p.sideavatar {
    margin: 0 0 10px 10px;
    float: right;
}

p.reputation {
    margin: -5px 0 10px 10px;
    font-size: 30px;
    font-weight: bold;
}

dl.profiledetails {
    margin: 10px 0;
}

dl.profiledetails dt {
    font-weight: bold;
}

div.votecomp {
    height: 80px;
}

div.votecomp div.votebox_up,
div.votecomp div.votebox_down {
    float: left;
}

ul.replylist {
    margin: 10px;
    padding: 0;
    list-style: none;
}

ul.replylist li {
    margin: 5px 0;
    line-height: 28px;
}

ul.replylist li span.votes {
    display: block;
    float: left;
    width: 30px;
    border: 1px solid;
    text-align: center;
    margin: 0 10px 0 0;
    font-weight: bold;
}

ul.replylist li a {
    font-weight: bold;
    text-decoration: none;
}

ul.replylist li a:hover {
    text-decoration: underline;
}

div.this_is_you {
    font-weight: bold;
    margin: -10px -10px 10px -10px;
    height: 25px;
    border-bottom: 1px solid;
}

div.this_is_you p.text {
    line-height: 25px;
    float: left;
    padding: 0 10px;
}

div.this_is_you p.meta {
    line-height: 25px;
    float: right;
    padding: 0 10px;
}

div.this_is_you p {
    margin: 0;
}

div.this_is_you p.meta {
    font-size: 11px;
}

/* :::: DEDICATED BADGE LIST :::: */

div.badgedisplay {
    margin: 10px 0;
    padding: 10px 8px;
    border: 1px solid;
    border-left: none;
    border-right: none;
}

div.badgedisplay div.badge {
    float: left;
    padding: 0 10px 0 0;
}

ul.badges {
    margin: 10px;
    padding: 0;
    list-style: none;
}

ul.badges li {
    margin: 11px 0;
    padding: 0;
    line-height: 18px;
}

ul.badges li span.badge,
div.badgedisplay div.badge span.badge {
    font-size: 13px;
    padding: 4px 8px;
}

ul.badges span.description {
    font-weight: bold;
}

ul.badges span.count {
    padding: 0 3px 0 7px;
    font-weight: bold;
    font-size: 14px;
}

ul.badges small.multibadge,
div.badgedisplay small.multibadge {
    padding-left: 7px;
    font-weight: normal;
}

/* :::: USERLINK RENDERING :::: */
span.user img.avatar {
    margin: 0 3px -3px 0;
}

span.user span.badge {
    color: #777;
    font-size: 11px;
    font


local L = LibStub("AceLocale-3.0"):GetLocale("Carbonite")

Nx.BuggedSubZones = {
	[0] = "null",
	[1] = "Caverns of Time",
	[2] = "Cleft of Shadow",
	[3] = "Temple of Earth",
	[4] = "Terrace of Light"
}

Nx.BuggedAreas = {
	[0] = "null",
	[1] = 125,
	[2] = 126,
	[3] = 103,
	[4] = 87,
	[5] = 90,
}

	-- Can anyone expand/corect this (from dratr https://github.com/dratr/Carbonite/commits/map-zonesdocs)
	-- Fields: name, minLvl, maxLvl, faction, cont, entryId, ex, ey, ??
	-- entryId, ex, ey only for instances.
	-- entryId is map id of zone that has dungeon entrance; ex, ey is loc in zone
	-- Faction:
	-- 0 Alliance
	-- 1 Horde
	-- 2 Contested
	-- 3 Instance
	-- 4 Unknown
Nx.Zones = {
    [0] = L["Unknown Zone"] .. "|0|0|4|0||",
    [1] = L["Durotar"] .. "|1|12|1|1||",
    [7] = L["Mulgore"] .. "|1|12|1|1||",
    [10] = L["The Barrens"] .. "|10|25|1|1||",
    [12] = L["Kalimdor"] .. "|1|60|2|1||",
    [13] = L["Eastern Kingdoms"] .. "|1|60|2|2||",
    [14] = L["Arathi Highlands"] .. "|25|30|2|2||",
    [15] = L["Badlands"] .. "|35|45|2|2||",
    [17] = L["Blasted Lands"] .. "|47|55|2|2||",
    [18] = L["Tirisfal Glades"] .. "|1|12|1|2||",
    [21] = L["Silverpine Forest"] .. "|10|20|1|2||",
    [22] = L["Western Plaguelands"] .. "|35|40|2|2||",
    [23] = L["Eastern Plaguelands"] .. "|40|45|2|2||",
    [25] = L["Hillsbrad Foothills"] .. "|20|25|2|2||",
    [26] = L["The Hinterlands"] .. "|30|35|2|2||",
    [27] = L["Dun Morogh"] .. "|1|10|0|2||",
    [32] = L["Searing Gorge"] .. "|47|51|2|2||",
    [36] = L["Burning Steppes"] .. "|50|52|2|2||",
    [37] = L["Elwynn Forest"] .. "|1|10|0|2||",
    [42] = L["Deadwind Pass"] .. "|55|56|2|2||",
    [47] = L["Duskwood"] .. "|20|25|2|2||",
    [48] = L["Loch Modan"] .. "|10|20|0|2||",
    [49] = L["Redridge Mountains"] .. "|15|20|2|2||",
    [50] = L["Stranglethorn Vale"] .. "|25|30|2|2||",
    [51] = L["Swamp of Sorrows"] .. "|52|54|2|2||",
    [52] = L["Westfall"] .. "|10|15|0|2||",
    [56] = L["Wetlands"] .. "|


        "Ji ", // 0x4d
        "He ", // 0x4e
        "Ting ", // 0x4f
        "Mai ", // 0x50
        "Xu ", // 0x51
        "Mian ", // 0x52
        "Yu ", // 0x53
        "Jie ", // 0x54
        "Shi ", // 0x55
        "Xuan ", // 0x56
        "Huang ", // 0x57
        "Yan ", // 0x58
        "Bian ", // 0x59
        "Rou ", // 0x5a
        "Wei ", // 0x5b
        "Fu ", // 0x5c
        "Yuan ", // 0x5d
        "Mei ", // 0x5e
        "Wei ", // 0x5f
        "Fu ", // 0x60
        "Ruan ", // 0x61
        "Xie ", // 0x62
        "You ", // 0x63
        "Qiu ", // 0x64
        "Mao ", // 0x65
        "Xia ", // 0x66
        "Ying ", // 0x67
        "Shi ", // 0x68
        "Chong ", // 0x69
        "Tang ", // 0x6a
        "Zhu ", // 0x6b
        "Zong ", // 0x6c
        "Ti ", // 0x6d
        "Fu ", // 0x6e
        "Yuan ", // 0x6f
        "Hui ", // 0x70
        "Meng ", // 0x71
        "La ", // 0x72
        "Du ", // 0x73
        "Hu ", // 0x74
        "Qiu ", // 0x75
        "Die ", // 0x76
        "Li ", // 0x77
        "Gua ", // 0x78
        "Yun ", // 0x79
        "Ju ", // 0x7a
        "Nan ", // 0x7b
        "Lou ", // 0x7c
        "Qun ", // 0x7d
        "Rong ", // 0x7e
        "Ying ", // 0x7f
        "Jiang ", // 0x80
        "[?] ", // 0x81
        "Lang ", // 0x82
        "Pang ", // 0x83
        "Si ", // 0x84
        "Xi ", // 0x85
        "Ci ", // 0x86
        "Xi ", // 0x87
        "Yuan ", // 0x88
        "Weng ", // 0x89
        "Lian ", // 0x8a
        "Sou ", // 0x8b
        "Ban ", // 0x8c
        "Rong ", // 0x8d
        "Rong ", // 0x8e
        "Ji ", // 0x8f
        "Wu ", // 0x90
        "Qiu ", // 0x91
        "Han ", // 0x92
        "Qin ", // 0x93
        "Yi ", // 0x94
        "Bi ", // 0x95
        "Hua ", // 0x96
        "Tang ", // 0x97
        "Yi ", // 0x98
        "Du ", // 0x99
        "Nai ", // 0x9a
        "He ", // 0x9b
        "Hu ", // 0x9c
        "Hui ", // 0x9d
        "Ma ", // 0x9e
        "Ming ", // 0x9f
        "Yi ", // 0xa0
        "Wen ", // 0xa1
        "Ying ", // 0xa2
        "Teng ", // 0xa3
        "Yu ", // 0xa4
        "Cang ", // 0xa5
        "So ", // 0xa6
        "Ebi ", // 0xa7
        "Man ", // 0xa8
        "[?] ", // 0xa9
        "Shang ", // 0xaa
        "Zhe ", // 0xab
        "Cao ", // 0xac
        "Chi ", // 0xad
        "Di ", // 0xae
        "Ao ", // 0xaf
        "Lu ", // 0xb0
        "Wei ", // 0xb1
        "Zhi ", // 0xb2
        "Tang ", // 0xb3
        "Chen ", // 0xb4
        "Piao ", // 0xb5
        "Qu ", // 0xb6
        "Pi ", // 0xb7
        "Yu ", // 0xb8


draoConst() { Nome = "ULTRACRED", Tipo = "DEBITO", Codigo = "20176"},
                new BandeiraPadraoConst() { Nome = "PILARCRED", Tipo = "CREDITO", Codigo = "00260"},
                new BandeiraPadraoConst() { Nome = "PILARCRED", Tipo = "DEBITO", Codigo = "20177"},
                new BandeiraPadraoConst() { Nome = "SAMERICA", Tipo = "CREDITO", Codigo = "00261"},
                new BandeiraPadraoConst() { Nome = "SAMERICA", Tipo = "DEBITO", Codigo = "20178"},
                new BandeiraPadraoConst() { Nome = "CIELO QR CODE", Tipo = "CREDITO", Codigo = "00263"},
                new BandeiraPadraoConst() { Nome = "CIELO QR CODE", Tipo = "DEBITO", Codigo = "20179"},
                new BandeiraPadraoConst() { Nome = "CROSCARD", Tipo = "CREDITO", Codigo = "00264"},
                new BandeiraPadraoConst() { Nome = "SANCARD", Tipo = "CREDITO", Codigo = "00268"},
                new BandeiraPadraoConst() { Nome = "SANCARD", Tipo = "DEBITO", Codigo = "20186"},
                new BandeiraPadraoConst() { Nome = "BAMEX", Tipo = "VOUCHER", Codigo = "10329"},
                new BandeiraPadraoConst() { Nome = "BAMEX", Tipo = "COMBUSTIVEL FROTA", Codigo = "10330"},
                new BandeiraPadraoConst() { Nome = "VIASOFTPAY", Tipo = "VOUCHER", Codigo = "10331"},
                new BandeiraPadraoConst() { Nome = "VIASOFTPAY", Tipo = "CREDITO", Codigo = "00477"},
                new BandeiraPadraoConst() { Nome = "DIBS", Tipo = "CREDITO PRIVATE LABEL", Codigo = "00409"},
                new BandeiraPadraoConst() { Nome = "KALLAN", Tipo = "CREDITO PRIVATE LABEL", Codigo = "00410"},
                new BandeiraPadraoConst() { Nome = "ED", Tipo = "CREDITO PRIVATE LABEL", Codigo = "00411"},
                new BandeiraPadraoConst() { Nome = "SHOEBIZ", Tipo = "CREDITO PRIVATE LABEL", Codigo = "00412"},
                new BandeiraPadraoConst() { Nome = "KHELF", Tipo = "CREDITO PRIVATE LABEL", Codigo = "00414"},
                new BandeiraPadraoConst() { Nome = "MUITO", Tipo = "CREDITO PRIVATE LABEL", Codigo = "00415"},
                new BandeiraPadraoConst() { Nome = "DI GASPI", Tipo = "CREDITO PRIVATE LABEL", Codigo = "00416"},
                new BandeiraPadraoConst() { Nome = "PONTAL CARD", Tipo = "CREDITO PRIVATE LABEL", Codigo = "00417"},
                new BandeiraPadraoConst() { Nome = "HUMANITARIAN", Tipo = "CREDITO PRIVATE LABEL", Codigo = "00418"},
                new BandeiraPadraoConst() { Nome = "NOVO MUNDO", Tipo = "CREDITO PRIVATE LABEL", Codigo = "00419"},
                new BandeiraPadraoConst() { Nome = "TENNISBAR", Tipo = "CREDITO PRIVATE LABEL", Codigo = "00420"},
                new BandeiraPadraoConst() { Nome = "MAIS MEGA LOJA", Tipo = "CREDITO PRIVATE LABEL", Codigo = "00421"},
                new BandeiraPadraoConst() { N


/****************************************************************************
 * Copyright (c) 1998 Free Software Foundation, Inc.                        *
 *                                                                          *
 * Permission is hereby granted, free of charge, to any person obtaining a  *
 * copy of this software and associated documentation files (the            *
 * "Software"), to deal in the Software without restriction, including      *
 * without limitation the rights to use, copy, modify, merge, publish,      *
 * distribute, distribute with modifications, sublicense, and/or sell       *
 * copies of the Software, and to permit persons to whom the Software is    *
 * furnished to do so, subject to the following conditions:                 *
 *                                                                          *
 * The above copyright notice and this permission notice shall be included  *
 * in all copies or substantial portions of the Software.                   *
 *                                                                          *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  *
 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               *
 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   *
 * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   *
 * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    *
 * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    *
 * THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               *
 *                                                                          *
 * Except as contained in this notice, the name(s) of the above copyright   *
 * holders shall not be used in advertising or otherwise to promote the     *
 * sale, use or other dealings in this Software without prior written       *
 * authorization.                                                           *
 ****************************************************************************/

/****************************************************************************
 *   Author: Juergen Pfeifer <juergen.pfeifer@gmx.net> 1995,1997            *
 ****************************************************************************/
#include "form.priv.h"

MODULE_ID("$Id$")

/*---------------------------------------------------------------------------
|   Facility      :  libnform
|   Function      :  int set_field_pad(FIELD *field, int ch)
|
|   Description   :  Set the pad character used to fill the field. This must
|                    be a printable character.
|
|   Return Values :  E_OK           - success
|                    E_BAD_ARGUMENT - invalid field pointer or pad character
|                    E_SYSTEM_ERROR - system error
+--------------------------------------------------------------------------*/
int set_field_pad(FIELD  * field, int ch)
{
  int res = E_BAD_ARGUMENT;

  Normalize_Field( field );
  if (isprint((unsigned char)ch))
    {
      if (field->pad != ch)
	{
	  field->pad = ch;
	  res = _nc_Synchronize_Attributes( field );
	}
      else
	res = E_OK;
    }
  RETURN(res);
}

/*---------------------------------------------------------------------------
|   Facility      :  libnform
|   Function      :  int field_pad(const FIELD *field)
|
|   Description   :  Retrieve the fields pad character.
|
|   Return Values :  The pad character.
+--------------------------------------------------------------------------*/
int field_pad(const FIELD * field)
{
  return Normalize_Field( field )->pad;
}

/* fld_pad.c ends here */


t dimension is the bin dimension.
    `mass` corresponds to `tau` in the paper.
    """
    if mass > 0.999: return logprobs
    # see: https://arxiv.org/abs/2202.00666
    # calculate entropy
    # normalized = logprobs #torch.nn.functional.log_softmax(scores, dim=-1)
    normalized = torch.nn.functional.log_softmax(logprobs, dim=-1)
    p = torch.exp(normalized)
    ent = -(normalized * p).nansum(-1, keepdim=True)

    # shift and sort
    shifted_scores = torch.abs((-normalized) - ent)
    sorted_scores, sorted_indices = torch.sort(shifted_scores, descending=False)
    sorted_logits = logprobs.gather(-1, sorted_indices)
    cumulative_probs = sorted_logits.softmax(dim=-1).cumsum(dim=-1)

    # Remove tokens with cumulative mass above the threshold
    last_ind = (cumulative_probs < mass).sum(dim=1)
    last_ind[last_ind < 0] = 0
    sorted_indices_to_remove = sorted_scores > sorted_scores.gather(1, last_ind.view(-1, 1))

    indices_to_remove = sorted_indices_to_remove.scatter(1, sorted_indices, sorted_indices_to_remove)

    scores = logprobs.masked_fill(indices_to_remove, -float('Inf'))
    return scores


01\x98\xce\x05\xe6\
QI\x92 i%H\xd3\x0ci\xab\x858I\x90\xa5\
-\xa4Y\x8e$\x8e\x91\xa4-dY\xb6\x93\x0c\xcer\
\xe4\xcd\x9c\x0a\x83\x96[i\x9a\x86d\xf0\xc4\xa3\xb3\x9e\
\xfb[?\xa7\xfdk\x07\xd6\xd6\xd6\xf0\x9f\xbe\xf8\xc5\xb1\
^\x9beY\x98 qLa\xe2\xb1j\xd2_\xe9\x0f\
\xee\xf6z\xff\x82\x7fA4\x0e&m\x89\xa6}\xf0V\
\xb9rhE\x97\x08\x04\x02#\x02\x7f\xc8\x81\xecw\x7f\
\xe7w\xd0\xbb\x7f\x1f\x7f\xed'\x7f\x02\x9f\xfd\xee\xefF\
\xb7\xd3\xc5\xd6\xd63,//c\xa1\xb7\x80[\xef\xbd\
\x87[\xef\xdd\xc2\xc3\x87\x1f]\xa8j\xcc<\xcf\xd1n\
\x17H\xb3\x90hJ\xd3\x14Y\x966W\xb0\xb3&9\
\x1b\x1eo\xa5)Z\xad\x16\x928\xd9\x95\x04\x85\xea\xf0\
\xca\xef\x91ow%cO\x96\x8d\x22XX\xc4q\x82\
\xc9\x12\xc4\xcf\xdf\x86e\xe0\xd5\xa3*\x9b\xc4ns[\
U!\xb1[\x8f&x\x9b\xdb\xaa\x0a\x8f\xd7\xaeF]\
U\xa8\xeaz\xe2\xab\xcat:\xb6\xb6\xb6\xb0\xb5\xb5\x85\
\xe5\xe5\x83\xdb3Xk\x915-\x19\xf2,G\xd1\x0e\
\x09\xdd\xa2\xddF\x9egh\xb7;M\x028\x1f'L\
\x1f\x09\xd8'\x0e\xf1\x87\xf7\xde\xfb\xce{x6\xe6\x0c\
\xdaz\xc0\xceW\xcc\x84\xa9\x05\xcf\xa4-\x11\xd1~n\
\xdc\xb81+\x8a\xe2\xb8\x9f\xf3k_\xfc\x22\xae\x5c\xbe\
\x8c\xef\xff\x81\x1f\x18\xffM\x22\xe8oocqq\x11\
\xcb\xcb\xcbXZZ\xc2\xca\xd2\x12\x16\x17\x97\xb0\xb4\xb4\
\x88\xe5\xa5e,..\xa2,K\xae(:\xb7\xca\xb2\
DY\x96S\x99k\xc4Z\x8b4\x0b\x89\xdc\xa2(\x86\
\x09\xdd0\xc7B\xde\xc4|\xed0z\xab\x18\xc4}\xcd\
\xedH\x1b\x8a\x89\xa3\xb93pn\xaa\xaa\xf8\xe2\x7f\xf8\
\x8f\xd8\xd88|9\xa6i:\xfe<\x0a\x00\xd4{\xf4\
\xfb\xdb\x07N\x84\xbb\x87w%\x8e\xbe\x80C\xcb\xb7\x88\
\x02&m\x89\xa6LD/\x1fVi;\xc8+\x18k\
\xe1\xc7\xb8\xc2\xff\xce;\xef\xe0\x9dw\xde\x09\xef1f\
\xa2\xd9d\xcf\x9b4MQ\xb4\xdbh\xb7\x0b\xb4;\x1d\
t\xdam\xb4;]t;\x1d\xb4\xbb\x1d\xa4\xad\x16f\
ff\x86\xfd<\xc7\xaaX\xc5N\xe5*\x8dn\x87\xa1\
\x8dC\x9c\xc4\xc8s<\x97\xd0\x1e\xef\xd6;\x8f\xb2*\
Q\x97\x15\xcaA\xd2\xb7\x1cI\xf2\xba\x0aUY\xa1\xdf\
\xef\xa3_6\xd5\xbfe\xc9v\x0fg\x94s\x0e\x1b\x1b\
\x1b\x87\x06\xb6\xc6\x18dM\x127\xf4\xdd\xed \xcf\xb3\
\x91\xe4n{\x98\xdc=N\xc2vaa\x01_\xfb\xda\
\xd7\xc6~\xa79\xe8\x8a\xd9\xa4\xe5`\x02NDFD\
\xb4\xdfI\xa4\xf7\x9fV1\xc7\xfe\x9c\xed\xadm\xfc\xd2\
/\xfc\x22\xde\xfc\xc1\x1f\xc4O\xcdH4\x00\x00\x1b\x8e\
IDAT\x0f\xff\xc8\xe7\xf1\xfa\xeb\xdf\x85n\xa7\x8d\
\xaa\xaa\xf0lk\x0bK\x8bKx\xfc\xe41\x96>n\
\x12\xb4\x8b\x1fcyye\xac\x04\x0c\x11\xed\xc4w\x9b\
\x1b\x1b\xd8\xdc\xd8\xc0\xd2\xe2\xe2\xc4\xefO\xd34\x8c\xcc\
\x1a&s\x0b\x14y\x81\xa2(\xd0\xe9\xb4Q\xb4;h\
\xb7\x0bt:]t\xba\x1d\xb4\xdb\xedcW\xf7N\xcb\
o\xff\xd6o\xe1\xdd\x9b7\x0f\xdf\xa7E\x16I\x92\x8c\
}\x8e\xa2Pl\xf7\xfb\x13\x9e\xd3\xe8\x927\xe6'\xee\
\xdf\xbd\xfb\x94[%\x8d}\xbc\xe5\x22 \x9a2\x95+\
\xe3&\x07\x8c\xb5\x10\xe7&\xda\xd9\x9f\xe7\x84\xad\xb5\x16\
\x9dN\x07\x9dn\x17\xddn\x17\xdd\x99\x19\xcct\xc3\xcf\
\x9dv\x17E\xa7@\x14E\x10\x11\x18c\xf6\xbc}>\
\x19K\xa7\xcb\x18\x83V\xab\x85V\xd2B>H\xe6\x1e\
\x98@\x0f\x15\xbfu]\xa1\xecW\xa8\xeb\x12e\x15*\
w\xcbr\xf7\xcfUU\xefT\xf9\xd6\x15\xdb}\x9c!\
\xde{lnlbsc\xf3\xd0\xed#\x1b\xa9\xd0m\
?W\xb9Q\x14\x05ZM\xa5|\x14EP\xef\xb1\xbe\
\xb9\x81\xc5'\x1f\xe3\xf6\xad\xf7\xb0\xb0\xf0`\xa2\xbf\xf5\
\x83*A&\x9f\xcc\x8c=m\x89\x88\xf6\xe3`?e\
\xa6t5\xdc{\x8f\xb7\xdfz\x0bo\xbf\xf5\x16\x17,\
\xd1\x194\x98P\x17c\xb6\xab\x02B{\x87v\xbb\x8d\
\xeeL\x17\xed\xa2\x8d\xa2\xd3F\xbbh\xa3\xd3\xed\x84\xf3\
\xc1v\x07\xdd\x99.ff\xe7\xd0\xedv&\xaap\x1d\
\xd7\x1f\xff\xd1\xff\xc2\x1f\xfd\xe1\x1f\x8d\x11\xf2\x01\xad4\
\x9b\xe8\xb3\xcb\xedr\xd2\xf3r\xe7\xd5\xfc\xcd\xfb\xf7\xef\
/p\x8b\xa2I0iK4m\x82\xd7\x0e9&\xec\
\xbao\xadA]\xbf\x1a\xa3#Dd8\xb4\xba\xd3\xe9\
\xec\xfc\xebv\xd1\xedvP\x14m\x18k`\x8c\x81\x11\
\x81\xec\xba5\x93\x0f_\xa6\xf3{\xf0\x89\x22X\x1b\x01\
H\xc7n\xeb\xe0\xbd\xa2*KTu\x93\xe4\xadB\x15\
oH\xec\xd6\xa1\xe2\xb7\xaaP\xd7\x0euU\xa2\x9e\xf0\
\x82\x08M\xdf\xb8\xc9]`:\xa3\x08\xe2(:t\x1f\
5~\x05\x05f\xb9\x06\x89\x88\xf6\xdbg\xeb\xa78\x82\
\x89\x88\xf6S\x96%VVV\xb0\xb2\xb22\xd6\xeb\xdb\
\x9d6\xba\x9d.ffg\xd0\x9d\x99A\xb7\xdb\xc5\xec\
\xec,\xda\x9d\x0e\xe6fg\x87\x05?\xe3\xb4\xe8z\xfa\
\xf4)\xfe\xebW\xfe\xcbX\x13\x8f\x01@+i\xedL\
\x888\x860\x9ap\xb2~\xd8\x22\xf8\xf9\xfb\x0b\xf7\xff\
\x98[\x06M|\xde\xccE@4mze\x92q\xb8\
\x91\x8d\xe1jw\xae\xe2^\x11A\xd1n\x87\x83g\xb7\
\x83\x99\xe6@:;;\x0bk#\x18#\x101\xe1v\
$1+\xc2\xa4,\x1do\xbb\x0b\xed\x1c\x92\xb1\xfb\x0e\
\x0f']\xabCR\xd7U5\xca\xba\x86\xabCrw\
\x10t\xb9\xaaF\xe5j\xb6\xd08E\xd3\x18E\x10'\
\xc9!\xdb\x90\x81\xea\xb8\x17\xc9<+m\x89\x88\xf6\xdd\
E\xe2*\x18\xd6\x9dJ,\xd4j\xb5\x86\xcd\xe2\xe3V\
kw|\xad\x801\xb2kh\xfa \xb4\x89\xa2\xa8I\
L\xe9\xae\xc7\x07\x5c\xedv&\xa9\x1d\xb9\xc09\xb8\xa7\
\xde\xa3\xaa\xea]\xef\xafF\xfa\x06\xb3\x870\x1d\xc7\xc6\
\xfa\x066\xd67\xf0\xf0\xe1\xc3\x83c\xbd8\xc6\xa5K\
\x97