Item().equals(var1)) {
            var4 += var6.getCount();
         }
      }

      return var4;
   }

   default boolean hasAny(Set<Item> var1) {
      for (int var4 = 0; var4 < this.getSizeInventory(); var4++) {
         ItemStack var5 = this.getStackInSlot(var4);
         if (var1.contains(var5.getItem()) && var5.getCount() > 0) {
            return true;
         }
      }

      return false;
   }
}
package com.sigmundgranaas.forgero.test.attribute.tool;

import static com.sigmundgranaas.forgero.test.util.StateHelper.state;

import com.sigmundgranaas.forgero.core.property.v2.attribute.attributes.AttackDamage;
import com.sigmundgranaas.forgero.core.property.v2.attribute.attributes.AttackSpeed;
import com.sigmundgranaas.forgero.core.property.v2.attribute.attributes.Durability;
import com.sigmundgranaas.forgero.core.property.v2.attribute.attributes.MiningSpeed;
import com.sigmundgranaas.forgero.core.property.v2.attribute.attributes.Rarity;
import com.sigmundgranaas.forgero.core.state.composite.Construct;
import com.sigmundgranaas.forgero.test.util.AttributeTester;
import com.sigmundgranaas.forgero.test.util.ForgeroPackageTest;
import org.junit.jupiter.api.Test;

/**
 * All vanilla tools should stay within some distance to their minecraft counterparts
 */
public class SwordTest extends ForgeroPackageTest {

	@Test
	void testOakSword() {
		AttributeTester.tester(state("forgero:oak-sword"))
				.add(Durability.KEY, 50, 10)
				.add(MiningSpeed.KEY, 2, 1)
				.add(Rarity.KEY, 20, 5)
				.add(AttackDamage.KEY, 3.5, 0.5)
				.add(AttackSpeed.KEY, -2.1, 0.5)
				.run();
	}

	@Test
	void testIronSword() {
		AttributeTester.tester(state("forgero:iron-sword"))
				.add(Durability.KEY, 250, 50)
				.add(MiningSpeed.KEY, 6, 1)
				.add(Rarity.KEY, 40, 10)
				.add(AttackDamage.KEY, 6, 0.5)
				.add(AttackSpeed.KEY, -2.1, 0.5)
				.run();
	}

	@Test
	void testGoldSword() {
		AttributeTester.tester(state("forgero:gold-sword"))
				.add(Durability.KEY, 41, 10)
				.add(MiningSpeed.KEY, 12, 1)
				.add(Rarity.KEY, 60, 10)
				.add(AttackDamage.KEY, 4, 0.5)
				.add(AttackSpeed.KEY, -2.1, 0.5)
				.run();
	}

	@Test
	void testDiamondSword() {
		AttributeTester.tester(state("forgero:diamond-sword"))
				.add(Durability.KEY, 1500, 300)
				.add(MiningSpeed.KEY, 8, 1)
				.add(Rarity.KEY, 80, 10)
				.add(AttackDamage.KEY, 7, 0.5)
				.add(AttackSpeed.KEY, -2.1, 0.5)
				.run();
	}

	@Test
	void testNetheriteSword() {
		AttributeTester.tester(state("forgero:netherite-sword"))
				.add(Durability.KEY, 2100, 300)
				.add(MiningSpeed.KEY, 9, 1)
				.add(Rarity.KEY, 110, 10)
				.add(AttackDamage.KEY, 8, 1.5)
				.add(AttackSpeed.KEY, -2.1, 0.5)
				.run();
	}

	@Test
	void testDiamondS


codeSize = Blob.GetBufferSize();
        smci.pCode = static_cast<const uint32_t*>(Blob.GetBufferPointer());

        VkShaderModule shader_module;
        CHECK_IF_FAILED(vkCreateShaderModule(m_device, &smci, nullptr, &shader_module));

        VkDescriptorSetLayout ds_layout = CreateDescriptorSetLayout(m_device, rootSig);

        // create pipeline layout
        VkPipelineLayout layout;
        VkPipelineLayoutCreateInfo lci = { VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO };
        lci.setLayoutCount = 1;
        lci.pSetLayouts = &ds_layout;
        CHECK_IF_FAILED(vkCreatePipelineLayout(m_device, &lci, nullptr, &layout));

        std::string entrypointA = wstring_to_string(std::wstring(entrypoint));

        // create pipeline
        VkPipelineShaderStageCreateInfo pssci = { VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO };
        pssci.stage = VK_SHADER_STAGE_COMPUTE_BIT;
        pssci.module = shader_module;
        pssci.pName = entrypointA.c_str();

        VkPipeline pipeline;
        VkComputePipelineCreateInfo ci = { VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO };
        ci.stage = pssci;
        ci.layout = layout;

        CHECK_IF_FAILED(vkCreateComputePipelines(m_device, VK_NULL_HANDLE, 1, &ci, nullptr, &pipeline));

        VkDescriptorSetAllocateInfo dsai = { VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO };
        dsai.descriptorPool = m_descriptorPool;
        dsai.descriptorSetCount = 1;
        dsai.pSetLayouts = &ds_layout;

        VkDescriptorSet descriptor_set;
        CHECK_IF_FAILED(vkAllocateDescriptorSets(m_device, &dsai, &descriptor_set));

        return new ComputePipeline(pipeline, layout, descriptor_set, (uint32_t) rootSig.size(), ds_layout );
    }

    vk::Texture* Device::CreateDepthStencilBuffer(uint32_t width, uint32_t height)
    {
        VkImageCreateInfo ici = { VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO };
        ici.imageType = VK_IMAGE_TYPE_2D;
        ici.extent.width = width;
        ici.extent.height = height;
        ici.extent.depth = 1;
        ici.mipLevels = 1;
        ici.arrayLayers = 1;
        ici.format = VK_FORMAT_D32_SFLOAT;
        ici.tiling = VK_IMAGE_TILING_OPTIMAL;
        ici.initialLayout = VK_IMAGE_LAYOUT_UNDEFINED;
        ici.usage = VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT;
        ici.samples = VK_SAMPLE_COUNT_1_BIT;

        VmaAllocationCreateInfo allocCreateInfo = {};
        allocCreateInfo.usage = VMA_MEMORY_USAGE_AUTO;
        allocCreateInfo.flags = VMA_ALLOCATION_CREATE_DEDICATED_MEMORY_BIT;
        allocCreateInfo.priority = 1.0f;

        VkImage image;
        VmaAllocation alloc;
        CHECK_IF_FAILED(vmaCreateImage(m_vmaAllocator, &ici, &allocCreateInfo, &image, &alloc, nullptr));

        VkImageView image_view;

        VkImageViewCreateInfo ivci = { VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO};
        ivci.image = image;
        ivci.viewType = VK_IMAGE_VIEW_TYPE_2D;
        ivci.format = VK_FORMAT_D


   end
    end
    return holder
  end,
  onBindViewHolder=function(holder,position)
    local views=holder.view.getTag()
    local data=license_rv_adapter_data[position+1]
    views["tag_data"]=data
    views["tag_data"]["position"]=position+1

    local name=data["name"]
    local message=data["message"]
    local licenseName=data["licenseName"]

    views.title.setText(name)
    views.sub_title.setText(message)
    views.message.setText(licenseName)
  end,
}))
recyclerView.setAdapter(license_rv_adapter)
layoutManager=StaggeredGridLayoutManager(1,StaggeredGridLayoutManager.VERTICAL)
recyclerView.setLayoutManager(layoutManager)

for index,content in ipairs(licenses) do
  table.insert(license_rv_adapter_data,content)
end
license_rv_adapter.notifyDataSetChanged()


 - zoom level 1 tiles are "quarters of a sphere"
        if (tileID.z <= 0) {
            // Tile covers the entire sphere.
            return new Aabb([-1, -1, -1], [1, 1, 1]);
        }
        else if (tileID.z === 1) {
            // Tile covers a quarter of the sphere.
            // X is 1 at lng=E90°
            // Y is 1 at **north** pole
            // Z is 1 at null island
            return new Aabb([tileID.x === 0 ? -1 : 0, tileID.y === 0 ? 0 : -1, -1], [tileID.x === 0 ? 0 : 1, tileID.y === 0 ? 1 : 0, 1]);
        }
        else {
            // Compute AABB using the 4 corners.
            const corners = [
                projectTileCoordinatesToSphere(0, 0, tileID.x, tileID.y, tileID.z),
                projectTileCoordinatesToSphere(EXTENT$1, 0, tileID.x, tileID.y, tileID.z),
                projectTileCoordinatesToSphere(EXTENT$1, EXTENT$1, tileID.x, tileID.y, tileID.z),
                projectTileCoordinatesToSphere(0, EXTENT$1, tileID.x, tileID.y, tileID.z),
            ];
            const min = [1, 1, 1];
            const max = [-1, -1, -1];
            for (const c of corners) {
                for (let i = 0; i < 3; i++) {
                    min[i] = Math.min(min[i], c[i]);
                    max[i] = Math.max(max[i], c[i]);
                }
            }
            // Special handling of poles - we need to extend the tile AABB
            // to include the pole for tiles that border mercator north/south edge.
            if (tileID.y === 0 || (tileID.y === (1 << tileID.z) - 1)) {
                const pole = [0, tileID.y === 0 ? 1 : -1, 0];
                for (let i = 0; i < 3; i++) {
                    min[i] = Math.min(min[i], pole[i]);
                    max[i] = Math.max(max[i], pole[i]);
                }
            }
            return new Aabb(min, max);
        }
    }
}

class VerticalPerspectiveTransform {
    //
    // Implementation of transform getters and setters
    //
    get pixelsToClipSpaceMatrix() {
        return this._helper.pixelsToClipSpaceMatrix;
    }
    get clipSpaceToPixelsMatrix() {
        return this._helper.clipSpaceToPixelsMatrix;
    }
    get pixelsToGLUnits() {
        return this._helper.pixelsToGLUnits;
    }
    get centerOffset() {
        return this._helper.centerOffset;
    }
    get size() {
        return this._helper.size;
    }
    get rotationMatrix() {
        return this._helper.rotationMatrix;
    }
    get centerPoint() {
        return this._helper.centerPoint;
    }
    get pixelsPerMeter() {
        return this._helper.pixelsPerMeter;
    }
    setMinZoom(zoom) {
        this._helper.setMinZoom(zoom);
    }
    setMaxZoom(zoom) {
        this._helper.setMaxZoom(zoom);
    }
    setMinPitch(pitch) {
        this._helper.setMinPitch(pitch);
    }
    setMaxPitch(pitch) {
        this._helper.setMaxPitch(pitch);
    }
    setRenderWorldCopies(renderWorldCopies) {
        this._helper.setRenderWorldCopies(renderWorldCopies);
    }
    setBearing(bearing) {
        this._helper.setBearing(bearing);
    }
    setPitch(pitch) {
        this._helper.setPitch(pitch);
    }
    setRoll(roll) {
        this._helper.setRoll(roll);
    }
    setFov(fov)


上，搜索关键词“人工智能”，返回结果有多少页？ |
| 分类       | 这个电子产品的主要功能是什么？                                                                          |
| 描述        | 描述一下你最喜欢的餐厅的氛围和装修。                                                                       |
| 开放生成  | 写一篇介绍狗的文章，至少包括三个品种的描述。                                                                |
| 编辑      | 下面这段话有语法错误，请修改：他们的公司总部在加拿大，但他们也在美国开设了许多办公室。                                                     |
| 排序     | 按照价格从低到高，列出以下五款手机的价格：iPhone 13、Samsung Galaxy S21、Google Pixel 6、OnePlus 9 Pro、Xiaomi 11。                     |
| 细节概括   | 在这篇科技新闻中，提到了哪些公司的合作共同致力于推进可持续发展？                                                   |
| 建议      | 如果我想学习编程，你会给我哪些建议？                                                                    |
| 解释      | 什么是太阳黑子？                                                                                |
| 对比分析 | 科比和詹姆斯的篮球风格有哪些不同？                                                                      |
| 影响分析 | 新冠疫情对全球经济造成了怎样的影响？                                                                     |
| 分类 | 对于给定的新闻文章，请问这篇文章属于哪个分类？ |
| 比较 | 张三和李四在数学考试中分别得了多少分？他们谁的成绩更好？ |
| 描述性生成 | 请描述一下夜晚城市的景象。 |
| 编辑 | 请�


ty(node.Text))
                continue;

            if (EntryMatchesText(node.Text, text, node.IsTextRegex))
                return node;
        }

        return null;
    }

    protected override unsafe void Proceed(AtkUnitBase* atk, object? matchingNode)
    {
        if (matchingNode is not NumericsEntryNode node) return;

        var min = atk->AtkValues[2].UInt;
        var max = atk->AtkValues[3].UInt;

        Log("Selecting ok");
        var value = Math.Clamp(node.IsPercent ? (uint)Math.Ceiling(max * (node.Percentage / 100f)) : (uint)node.Quantity, min, max);
        Callback.Fire(atk, true, (int)value);
    }
}


ualIncome[0]
    res3.compareSchemas()

    return "OK"
}

import org.jetbrains.kotlinx.dataframe.annotations.*
import org.jetbrains.kotlinx.dataframe.api.*
import org.jetbrains.kotlinx.dataframe.*
import kotlin.reflect.*
import kotlin.reflect.full.*

inline fun <reified T> runtimeSchema(row: DataRow<T>) = (typeOf<T>().classifier as KClass<*>).memberProperties.associateBy { it.name }
inline fun <reified T> runtimeSchema(row: DataFrame<T>) = (typeOf<T>().classifier as KClass<*>).memberProperties.associateBy { it.name }
fun <T> Map<String, T>.col(s: String) = get(s)!!

@DataSchema
class Record(val string: String)

fun box(): String {
    val df = dataFrameOf(Record("abc"))
    val df1 = df.add("row") {
        val row = dataFrameOf(Record("")).first()
        row.takeIf { index() % 2 == 0 }
    }

    require(runtimeSchema(df1.row[0]).col("string").returnType == typeOf<String?>())

    val row = dataFrameOf(Record(""))
        .add("int") { 1 }
        .add("double") { 3.0 }
        .add("char") { 'c' }
        .group { int and double }.into("g")
        .group { g and char }.into("f")
        .first()

    val df2 = df.add("row") {
        row.takeIf { index() % 2 == 0 }
    }

    require(runtimeSchema(df2.row.f.g[0]).col("int").returnType == typeOf<Int?>())
    require(runtimeSchema(df2.row.f[0]).col("char").returnType == typeOf<Char?>())
    return "OK"
}
/*
 * Copyright 2010-2022 JetBrains s.r.o. and Kotlin Programming Language contributors.
 * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
 */

package org.jetbrains.kotlinx.dataframe.plugin

import org.jetbrains.kotlin.fir.FirSession
import org.jetbrains.kotlinx.dataframe.plugin.extensions.KotlinTypeFacade
import org.jetbrains.kotlinx.dataframe.plugin.impl.Interpreter
import org.jetbrains.kotlinx.dataframe.plugin.utils.Names.INTERPRETABLE_FQNAME
import org.jetbrains.kotlinx.dataframe.plugin.impl.api.Add
import org.jetbrains.kotlinx.dataframe.plugin.impl.api.AddWithDsl
import org.jetbrains.kotlinx.dataframe.plugin.impl.api.And0
import org.jetbrains.kotlinx.dataframe.plugin.impl.api.And10
import org.jetbrains.kotlinx.dataframe.plugin.impl.api.Convert0
import org.jetbrains.kotlinx.dataframe.plugin.impl.api.Convert2
import org.jetbrains.kotlinx.dataframe.plugin.impl.api.Convert6
import org.jetbrains.kotlinx.dataframe.plugin.impl.api.DataFrameGroupBy
import org.jetbrains.kotlinx.dataframe.plugin.impl.api.DropNulls0
import org.jetbrains.kotlinx.dataframe.plugin.impl.api.Exclude0
import org.jetbrains.kotlinx.dataframe.plugin.impl.api.Exclude1
import org.jetbrains.kotlinx.dataframe.plugin.impl.api.Explode0
import org.jetbrains.kotlinx.dataframe.plugin.impl.api.Expr0
import org.jetbrains.kotlinx.dataframe.plugin.impl.api.From
import org.jetbrains.kotlinx.


f q.NodeType == idm.NodeType_GROUP {
		wheres = append(wheres, db.Where(u.Type.Neq(int32(tree.NodeType_LEAF))))
	}

	if q.HasProfile != "" {
		q.AttributeName = idm.UserAttrProfile
		q.AttributeValue = q.HasProfile
	}

	if len(q.AttributeName) > 0 {
		txAttributes := a.WithContext(ctx).
			Select(a.Name).
			Where(a.Name.Eq(q.AttributeName)).
			Where(a.UUID.EqCol(u.Uuid))

		if !q.AttributeAnyValue {
			txAttributes = txAttributes.Where(a.Value.Like(strings.Replace(q.AttributeValue, "*", "%", -1)))
		}
		var wtx *gorm.DB
		if q.Not {
			wtx = db.Not(field.CompareSubQuery(
				field.ExistsOp,
				u.Uuid,
				txAttributes.UnderlyingDB(),
			))
		} else {
			wtx = db.Where(field.CompareSubQuery(
				field.ExistsOp,
				u.Uuid,
				txAttributes.UnderlyingDB(),
			))
		}

		if attributeOrLogin {
			wtx = wtx.Or(u.Name.Like(strings.Replace(q.AttributeValue, "*", "%", -1)))
		}
		wheres = append(wheres, wtx)
	}

	if len(q.HasRole) > 0 {
		txRoles := r.WithContext(ctx).
			Select(r.UUID).
			Where(r.Role.Eq(q.HasRole)).
			Where(r.UUID.EqCol(u.Uuid))

		if q.Not {
			wheres = append(wheres, db.Not(field.CompareSubQuery(
				field.ExistsOp,
				u.Uuid,
				txRoles.UnderlyingDB(),
			)))
		} else {
			wheres = append(wheres, db.Where(field.CompareSubQuery(
				field.ExistsOp,
				u.Uuid,
				txRoles.UnderlyingDB(),
			)))
		}
	}

	if len(q.ConnectedSince) > 0 {
		if lt, d, e := q.ParseLastConnected(); e == nil {
			ref := time.Now().Add(-d).Unix()
			if lt || q.Not {
				wheres = append(wheres, db.Where(u.MTime.Lt(ref)))
			} else {
				wheres = append(wheres, db.Where(u.MTime.Gt(ref)))
			}
		}
	}

	for _, where := range wheres {
		db = db.Where(where)
	}

	return db, len(wheres) > 0, nil
}

func userToNode(u *idm.User) *usermodel.User {

	pa := strings.TrimRight(u.GroupPath, "/") + "/" + u.Login
	pa = safeGroupPath(pa)
	n := &tree.Node{
		Path: pa,
		Uuid: u.Uuid,
		Type: tree.NodeType_LEAF,
		Size: 1,
	}
	if u.Password != "" {
		var alreadyHashed bool
		if u.Attributes != nil {
			if val, ok := u.Attributes[idm.UserAttrPassHashed]; ok {
				alreadyHashed = val == "true"
				delete(u.Attributes, idm.UserAttrPassHashed) // never store this value
			}
		}
		if alreadyHashed {
			n.Etag = u.Password
		} else {
			n.Etag = hasher.CreateHash(u.Password)
		}
	}
	n.MustSetMeta(common.MetaNamespaceNodeName, u.Login)
	return &usermodel.User{
		TreeNode: tree.TreeNode{
			Node: n,
		},
	}

}

func groupToNode(g *idm.User) *usermodel.User {
	n := &tree.Node{
		Path:      safeGroupPath(g.GroupPath),
		Uuid:      g.Uuid,
		Type:      tree.NodeType_COLLECTION,


Kqrp2+rKTQrXMWaTCn2XPgyJkLV25o3Hny4svPr3+pBQkRKlpeQVFZRVVNXUNLW0/fwNDY1MyNZj7Xgxo20+5wuiy3x+sDCIrhhJAUiSVSmZxSKFVqjbZzIJmDPtVgZW1ja2fvEMfTydnF1SuvEwR46533Pvjok891RUhJy8jKySsoKimr1JecKEVdQ1NLW0dXT9/A0MjYxNQsG2jRUD4EU3uHUkgYANOVn83h8vjxShEhiuFEJSoraxtbO3sHx3oanV1gBMVwgqRopoHuJD0sxwuiJCuqphumxWqzNzLjcLrcHq/PLw1oai85GSGDQg+AqbE7BfJJfheJoH6b8i8xRBVVSKHiaoRoSeVOYBZGVQ0ThEXU1QhBYbVWFFJVlZLfakLXb9L+3UwmUFOQgUrbjsiXgJSKpbdPyP4scTdhl4hpUwYd15rDUKFYilpehJE05iGlIlL+T9fcAk/hn95QjCr5lDBa8ajVcal6me+WKv+GZ9nojKaoFIg+QkwanlUF97LsDRlBJSJHhHPd0Dk0zok+St1dr0BpLzRiCl+NlLZ10ysi54QWsaAcXnIziiip8pfM5Uv9wKWyXlmsO6YiMQyvpqQnpjog2ZWCVjWFotVR4kbqGRCSCwow9TuiiIZe3EhhG5aKE/nJKnmJQPUA38btHpi2Iq0zortexzj3DmF4Ds9Zz89dApqOCObApwV55LjO94Qe7oVgvY9N0wPbM0d00nCE4YMyi8AHJrgNVkcNtELJr3cQgo+QosdtFIaPhZrQ45RQazJqeUEWYCQemsvjEyc91U3FWhShy/DrmeGm87qgu5tuZhXT3eIs3hZs3hbsL7AdPSeF1EhlWK2iogjjLnmvisd7nMcHfAC6e+DTc5FPaCOOM8pkEgQxxk+KpSrhGc+qMJ67cwtHWUSRCGUb+ljJS0HyEsuqUpD8ml+7r+1rfuu+5XfV7JKE60rT00nGC0puCBPWGUT6nQRvipKE+/3z8AREP4PYmdbMIfVJk9c1Ayrvf2+HfQT9yjgKJCFJFO7Drj6nAM6307+6SMj56PEu8lb/BuyDir6j1ef10AZEf5ymg5W+93nHtxoSc2dnO5o1ALwQbznpI9kob+lAHwlX45+rO6R3ny7HQ5wFAAAA)
      format("woff2");
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB,
    U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: "serif";
  font-style: normal;
  font-weight: 400;
  font-display:


Measure = rememberTextMeasurer()
        drawWithContent {
            drawContent()
            val centerOffset = Offset(size.width - 3.dp.toPx(), 3.dp.toPx())
            drawCircle(
                color = color,
                radius = 6.dp.toPx(),
                center = centerOffset
            )
            val textLayoutResult = textMeasure.measure(
                AnnotatedString(if (num < 100) "$num" else "99+"),
                TextStyle(fontSize = 7.sp, color = Color.White)
            )
            drawText(
                textLayoutResult,
                topLeft = Offset(
                    centerOffset.x - textLayoutResult.size.width / 2f,
                    centerOffset.y - textLayoutResult.size.height / 2f
                )
            )
        }
    }

/**
 * 底部导航栏文本
 */
@Composable
private fun RedBookBottomItemText(
    modifier: Modifier = Modifier,
    appNavItem: MainTopNavItem,
    isSelected: Boolean,
    messageNum: Int? = null,
    onClick: () -> Unit
) {
    Box(
        modifier = modifier
            .cancelRipperClick {
                onClick()
            }, contentAlignment = Alignment.Center
    ) {
        val fontSize by animateFloatAsState(
            targetValue = if (isSelected) 16.sp.value else 14.sp.value,
            animationSpec = tween(durationMillis = 100, easing = LinearEasing),
            label = "tabTextSize"
        )
        Text(
            modifier = if (messageNum != null) Modifier.notificationDot(messageNum) else Modifier,
            text = appNavItem.title,
            color = if (isSelected) RedBookTheme.colors.title else RedBookTheme.colors.body,
            lineHeight = 16.sp,
            fontWeight = if (isSelected) FontWeight.Bold else FontWeight.Normal,
            fontSize = fontSize.sp
        )
    }
}package com.loren.component.view.sample

import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import com.google.android.material.snackbar.Snackbar
import com.loren.component.view.sample.databinding.ActivityFixItemPositionBinding
import com.loren.component.view.widget.HorizontalRecyclerView

class NeedFixItemPositionActivity : AppCompatActivity() {

    private val mBinding by lazy { ActivityFixItemPositionBinding.inflate(layoutInflater) }
    private var stockAdapter: StockAdapter? = null

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(mBinding.root)

        val list = mutableListOf<StockModel>()
        for (index in 0 until 500) {
            val childList = mutableListOf<String>()
            for (i in 0 until 10) {
                childList.add("${index}行${i + 1}列")
            }
            list.add(StockModel("$index", childList))
        }

        stockAdapter = StockAdapter(list)
        mBinding.rvStock.adapter = stockAdapter
        mBinding.rvStock.bindHeadScrollView(mBinding.swipeHorizontalView)
        mBinding.rvStock.setOnHorizontalRecyclerViewStateListener(object : HorizontalRecyclerView.OnHorizontalRecyclerViewStateListener {
            override fun extend() {
                Snackbar.make(mBinding.rvStock, "extend", Snackbar.LENGTH_SHORT).show()
            }

            override fun fold() {
                Snackbar.make(mBinding.rvStock, "fold", Snackbar.LENGTH_SHORT).show()
            }

        })
    }

}package com.loren.component.view.widget

import android.app.Service
import android.content.Context
import android.graphics.*
import android.os.Vibrator
import android.util.AttributeSet
import android.view.*
import android.widget.OverScroller
import kotlin.math.abs
import kotlin.math.max

/**
 * Created by Loren on 2021/12/31
 * Description -> 水平滚动的scrollvie


-copy-line-height p,.nested-copy-line-height ul{line-height:1.5}.nested-headline-line-height h1,.nested-headline-line-height h2,.nested-headline-line-height h3,.nested-headline-line-height h4,.nested-headline-line-height h5,.nested-headline-line-height h6{line-height:1.25}.nested-list-reset ol,.nested-list-reset ul{padding-left:0;margin-left:0;list-style-type:none}.nested-copy-indent p+p{text-indent:1em;margin-top:0;margin-bottom:0}.nested-copy-separator p+p{margin-top:1.5em}.nested-img img{width:100%;max-width:100%;display:block}.nested-links a{color:#357edd;transition:color .15s ease-in}.nested-links a:focus,.nested-links a:hover{color:#96ccff;transition:color .15s ease-in}.debug *{outline:1px solid gold}.debug-white *{outline:1px solid #fff}.debug-black *{outline:1px solid #000}.debug-grid{background:transparent url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAAFElEQVR4AWPAC97/9x0eCsAEPgwAVLshdpENIxcAAAAASUVORK5CYII=) repeat 0 0}.debug-grid-16{background:transparent url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAMklEQVR4AWOgCLz/b0epAa6UGuBOqQHOQHLUgFEDnAbcBZ4UGwDOkiCnkIhdgNgNxAYAiYlD+8sEuo8AAAAASUVORK5CYII=) repeat 0 0}.debug-grid-8-solid{background:#fff url(data:image/gif;base64,R0lGODdhCAAIAPEAAADw/wDx/////wAAACwAAAAACAAIAAACDZQvgaeb/lxbAIKA8y0AOw==) repeat 0 0}.debug-grid-16-solid{background:#fff url(data:image/gif;base64,R0lGODdhEAAQAPEAAADw/wDx/xXy/////ywAAAAAEAAQAAACIZyPKckYDQFsb6ZqD85jZ2+BkwiRFKehhqQCQgDHcgwEBQA7) repeat 0 0}@media screen and (min-width:30em){.aspect-ratio-ns{height:0;position:relative}.aspect-ratio--16x9-ns{padding-bottom:56.25%}.aspect-ratio--9x16-ns{padding-bottom:177.77%}.aspect-ratio--4x3-ns{padding-bottom:75%}.aspect-ratio--3x4-ns{padding-bottom:133.33%}.aspect-ratio--6x4-ns{padding-bottom:66.6%}.aspect-ratio--4x6-ns{padding-bottom:150%}.aspect-ratio--8x5-ns{padding-bottom:62.5%}.aspect-ratio--5x8-ns{padding-bottom:160%}.aspect-ratio--7x5-ns{padding-bottom:71.42%}.aspect-ratio--5x7-ns{padding-bottom:140%}.aspect-ratio--1x1-ns{padding-bottom:100%}.aspect-ratio--object-ns{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;height:100%;z-index:100}.cover-ns{background-size:cover!important}.contain-ns{background-size:contain!important}.bg-center-ns{background-position:50%}.bg-center-ns,.bg-top-ns{background-repeat:


import pandas as pd
import numpy as np

# Create a DataFrame from the table
df = pd.DataFrame({
    'Brand': ['Coca-Cola', 'Pepsi', 'Mountain Dew', 'Dr Pepper'],
    'Parent Company': ['Coca-Cola Co.', 'PepsiCo', 'PepsiCo', 'Keurig Dr Pepper'],
    'Jan': [200, 180, 90, 80],
    'Feb': [190, 170, 85, 75],
    'Mar': [210, 190, 95, 85],
    'Apr': [220, 200, 100, 90],
    'May': [230, 210, 105, 95],
    'Jun': [240, 220, 110, 100],
    'Jul': [250, 230, 115, 105],
    'Aug': [240, 220, 110, 100],
    'Sep': [230, 210, 105, 95],
    'Oct': [220, 200, 100, 90],
    'Nov': [210, 190, 95, 85],
    'Dec': [200, 180, 90, 80]
})

# Calculate the mean absolute deviation for each soda
df['MAD'] = df.iloc[:, 2:].apply(lambda x: np.mean(np.abs(x - x.mean())), axis=1)

# Find the parent company with the highest median mean absolute deviation
max_mad_parent = df.groupby('Parent Company')['MAD'].median().idxmax()

print(df[["MAD", "Parent Company"]])
print(f"The parent company with the highest median mean absolute deviation is {max_mad_parent}.")


encv_videostab -lopencv_videoio -lopencv_wechat_qrcode -lopencv_xfeatures2d -lopencv_shape -lopencv_ml -lopencv_ximgproc -lopencv_video -lopencv_xobjdetect -lopencv_objdetect -lopencv_calib3d -lopencv_imgcodecs -lopencv_features2d -lopencv_dnn -lopencv_flann -lopencv_xphoto -lopencv_photo -lopencv_imgproc -lopencv_core -llibprotobuf -lade -ltbb -littnotify -llibjpeg-turbo -llibwebp -llibtiff -llibopenjp2 -lIlmImf -lquirc -lippiw -lippicv -lpng -lz -lgcc -lstdc++ -lfreetype -lharfbuzz -ldl -lm -lpthread -lrt -lavdevice -lm -latomic -lavfilter -pthread -lm -latomic -lswscale -lm -latomic -lpostproc -lm -latomic -lavformat -lm -latomic -lz -lavcodec -lvpx -lm -lvpx -lm -lvpx -lm -lvpx -lm -pthread -lm -latomic -lz -lx264 -lswresample -lm -latomic -lavutil -pthread -lm -latomic
#cgo arm64 LDFLAGS: -O2 -g -static -L/usr/local/lib -L/usr/local/lib/opencv4/3rdparty -lopencv_gapi -lopencv_stitching -lopencv_aruco -lopencv_bgsegm -lopencv_bioinspired -lopencv_ccalib -lopencv_dnn_objdetect -lopencv_dnn_superres -lopencv_dpm -lopencv_face -lopencv_freetype -lopencv_fuzzy -lopencv_hfs -lopencv_img_hash -lopencv_intensity_transform -lopencv_line_descriptor -lopencv_mcc -lopencv_quality -lopencv_rapid -lopencv_reg -lopencv_rgbd -lopencv_saliency -lopencv_signal -lopencv_stereo -lopencv_structured_light -lopencv_phase_unwrapping -lopencv_superres -lopencv_optflow -lopencv_surface_matching -lopencv_tracking -lopencv_highgui -lopencv_datasets -lopencv_text -lopencv_plot -lopencv_videostab -lopencv_videoio -lopencv_wechat_qrcode -lopencv_xfeatures2d -lopencv_shape -lopencv_ml -lopencv_ximgproc -lopencv_video -lopencv_xobjdetect -lopencv_objdetect -lopencv_calib3d -lopencv_imgcodecs -lopencv_features2d -lopencv_dnn -lopencv_flann -lopencv_xphoto -lopencv_photo -lopencv_imgproc -lopencv_core -llibprotobuf -lade -ltbb -littnotify -llibjpeg-turbo -llibwebp -llibtiff -llibopenjp2 -lIlmImf -lquirc -ltegra_hal -lpng -lz -lgcc -lstdc++ -lfreetype -lharfbuzz -ldl -lm -lpthread -lrt -lavdevice -lm -latomic -lavfilter -pthread -lm -latomic -lswscale -lm -latomic -lpostproc -lm -latomic -lavformat -lm -latomic -lz -lavcodec -lvpx -lm -lvpx -lm -lvpx -lm -lvpx -lm -pthread -lm -latomic -lz -lx264 -lswresample -lm -latomic -lavutil -pthread -lm -latomic
*/
import "C"
//go:build !customenv && opencvstatic && windows

package gocv

// Changes here should be mirrored in contrib/cgo_static_windows.go and cuda/cgo_static_windows.go.

/*
#cgo CXXFLAGS:   --std=c++11 -DNDEBUG
#cgo CPPFLAGS:   -IC:/opencv/build/inst


VertB[2].pos.y = DrawPos[2].y ;
				DrawVertB[3].pos.x = DrawPos[3].x ;
				DrawVertB[3].pos.y = DrawPos[3].y ;
				DrawVertB[4].pos.x = DrawPos[2].x ;
				DrawVertB[4].pos.y = DrawPos[2].y ;
				DrawVertB[5].pos.x = DrawPos[1].x ;
				DrawVertB[5].pos.y = DrawPos[1].y ;

				DrawVertB[0].u1 = u1[0] ;
				DrawVertB[0].v1 = v1[0] ;
				DrawVertB[1].u1 = u1[1] ;
				DrawVertB[1].v1 = v1[1] ;
				DrawVertB[2].u1 = u1[2] ;
				DrawVertB[2].v1 = v1[2] ;
				DrawVertB[3].u1 = u1[3] ;
				DrawVertB[3].v1 = v1[3] ;
				DrawVertB[4].u1 = u1[2] ;
				DrawVertB[4].v1 = v1[2] ;
				DrawVertB[5].u1 = u1[1] ;
				DrawVertB[5].v1 = v1[1] ;

				DrawVertB[0].u2 = u2[0] ;
				DrawVertB[0].v2 = v2[0] ;
				DrawVertB[1].u2 = u2[1] ;
				DrawVertB[1].v2 = v2[1] ;
				DrawVertB[2].u2 = u2[2] ;
				DrawVertB[2].v2 = v2[2] ;
				DrawVertB[3].u2 = u2[3] ;
				DrawVertB[3].v2 = v2[3] ;
				DrawVertB[4].u2 = u2[2] ;
				DrawVertB[4].v2 = v2[2] ;
				DrawVertB[5].u2 = u2[1] ;
				DrawVertB[5].v2 = v2[1] ;

				*((DWORD *)&DrawVertB[0].pos.z) = drawz ;
				*((DWORD *)&DrawVertB[1].pos.z) = drawz ;
				*((DWORD *)&DrawVertB[2].pos.z) = drawz ;
				*((DWORD *)&DrawVertB[3].pos.z) = drawz ;
				*((DWORD *)&DrawVertB[4].pos.z) = drawz ;
				*((DWORD *)&DrawVertB[5].pos.z) = drawz ;

				// テクスチャーを描画する
				ADD4VERTEX_BLENDTEX

				if( BlendGraphNoIncFlag == FALSE )
				{
					BlendDrawTex ++ ;
				}
			}
			break ;

		case VERTEXTYPE_TEX :
			// ブレンドテクスチャを使用しない

			// テクスチャーの数だけ繰り返す
			i = 0 ;
			for(;;)
			{
				VECTOR DrawPos[ 4 ] ;
				float u4[ 4 ] ;
				float v4[ 4 ] ;

				// 頂点バッファの取得
				GETVERTEX_QUAD( DrawVert )

				// 頂点データ準備
				TexVert = DrawTex->Vertex ;
				DrawVert[0].color	= DiffuseColor ;
				DrawVert[3].color	= DiffuseColor ;

				DrawPos[0].x = TexVert[0].x + xf ;
				DrawPos[0].y = TexVert[0].y + yf ;
				DrawPos[1].x = TexVert[1].x + xf ;
				DrawPos[1].y = TexVert[0].y + yf ;
				DrawPos[2].x = TexVert[0].x + xf ;
				DrawPos[2].y = TexVert[2].y + yf ;
				DrawPos[3].x = TexVert[1].x + xf ;


THE_RATE_OF_HIT_ENEMIES_INTO_AIR_INCREASES_WITH_LEVEL_WILL_DEFINITELY_HIT_ENEMIES_OF_LEVEL_#_OR_LOWER"] = "Скорость удара врагов в воздух увеличивается с ур., безусловно нанесет удар врагам # ур. или ниже",
	["SKILLGROUP.PASSIVE__INCREASE_#_STRENGTH"] = "Пассивность: Увеличивает силу на #",
	["SKILLGROUP.STRENGTH_+_#"] = "Сила +#",
	["SKILLGROUP.MELEE_ATTACK"] = "Обычная Атака ",
	["SKILLGROUP.EACH_ARROW_INCREASES_DAMAGE_BY_#"] = "Каждая стрела повышает урон на #",
	["SKILLGROUP.SILENCE_RATE_INCREASES_WITH_LEVEL_WILL_DEFINITELY_HIT_ENEMIES_OF_LEVEL_#_OR_LOWER"] = "Тихая скорость удара увеличивается с ур., безусловно нанесет удар врагам # ур. или ниже",
	["SKILLGROUP.SILENCE_LEVEL_INCREASES"] = "Увеличивается уровень тишины ",
	["SKILLGROUP.AURA__ALL_TEAMMATES_GET_#_DAMAGE_BONUS"] = "Аура: Увеличивает атаку всей команды на # ",
	["SKILLGROUP.AP_+_#"] = "Урон +#",
	["SKILLGROUP.PASSIVE__INCREASE_#_CRITICAL_STRIKE"] = "Пассивность: Увеличивает крит. физ. урон на #",
	["SKILLGROUP.PHY_CRITICAL_STRIKE_+_#"] = "Критический физ. урон +#",
	["SKILLGROUP.PASSIVE__INCREASE_#_MAGIC_POWER"] = "Пассивность: Увеличивает магическую силу на #",
	["SKILLGROUP.MAGIC_POWER_+_#"] = "Магическая сила +#",
	["SKILLGROUP.EACH_THUNDER_INCREASES_DAMAGE_BY_#"] = "Каждый болт увеличивает # силу",
	["SKILLGROUP.STEAL_ATTACK_BY_#"] = "Перехватывает # атаки ",
	["SKILLGROUP.STEAL_ATTACK_+_#"] = "Перехват атаки +#",
	["SKILLGROUP.PASSIVE__INCREASE_MAGIC_DEFENCE_BY_#"] = "Пассивность: Увеличивает магическую защиту на #",
	["SKILLGROUP.HIT_RATE_INCREASES_WITH_LEVEL_WILL_DEFINITELY_HIT_ENEMIES_OF_LEVEL_#_OR_LOWER"] = "Скорость удара увеличивается с ур., безусловно нанесет удар врагам # ур. или ниже",
	["SKILLGROUP.SORCERY_LEVEL"] = "Увеличивает ур. колдовства ",
	["SKILLGROUP.PASSIVE__INCREASES_MAGIC_CRITICAL_STRIKE_BY_#"] = "Пассивность: Увеличивает магический крит. на #",
	["SKILLGROUP.MAGIC_CRITICAL_STRIKE_+_#"] = "Магический критическ


 1.592 1.651 1.592.932 0 1.662-.7 1.662-1.592zm2.066 1.54 1.268-3.081h-.967l-.765 2.099-.765-2.1h-.966l1.268 3.081h.927zm4.449-1.54c0-.904-.725-1.593-1.65-1.593-.932 0-1.662.7-1.662 1.593 0 .903.725 1.592 1.65 1.592.932 0 1.662-.7 1.662-1.592z"/></svg>';
  static const String lens =
      '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="24" height="24" preserveAspectRatio="xMidYMid meet" viewBox="0 0 24 24"><path fill="currentColor" d="M9.255 3.5H3.5v4.255l3.75 4.715ZM3.5 8.955v7.125h5.665ZM19.545 3.5H10.02L8.87 8.635Zm-.9 17H20.5v-8.4l-4.32-2.105Zm-5.79-12.95 7.645 3.72v-7.4ZM3.5 16.825V20.5h6.88l2.875-3.675zm7.83 3.675h6.545l-1.51-6.435zM0 0h24v24H0Z"/></svg>';
  static const String lerna =
      '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="24" height="24" preserveAspectRatio="xMidYMid meet" viewBox="0 0 24 24"><path fill="currentColor" d="M18.218 20.493c-.056 0-.061-.026-.015-.128.04-.088.04-.15.005-.18-.036-.036-.103-.026-.2.026a.707.707 0 01-.231.077c-.047 0-.14-.067-.211-.144a2.643 2.643 0 00-.365-.313 1.749 1.749 0 01-.374-.38 1.636 1.636 0 00-.247-.298c-.061-.057-.195-.087-.334-.087-.143 0-.267-.036-.328-.093-.098-.087-.103-.087-.072.144l.03.231-.148-.17a.48.48 0 01-.15-.364.39.39 0 01.124-.313c.072-.067.16-.103.205-.088.057.021.083-.005.083-.097 0-.077-.031-.129-.077-.129-.052 0-.077-.05-.077-.174 0-.093-.026-.247-.057-.334-.03-.087-.077-.159-.097-.159-.026 0-.057.026-.077.051-.016.031-.057.041-.083.02-.03-.02-.036-.153-.015-.333.026-.205.015-.329-.026-.38-.036-.041-.097-.062-.143-.041-.067.026-.072 0-.047-.144.02-.097.047-.262.062-.364.026-.17.015-.195-.092-.216a4.475 4.475 0 00-.324-.056 2.61 2.61 0 01-.436-.113 3.828 3.828 0 01-.647-.36c-.226-.154-.447-.308-.483-.349-.036-.041-.082-.077-.108-.077-.026 0-.123.072-.22.16-.093.086-.19.22-.206.297-.02.077-.051.241-.072.37-.026.154-.062.23-.113.23-.041 0-.103-.081-.139-.179a1.773 1.773 0 01-.066-.436c0-.14-.052-.355-.103-.478a2.501 2.501 0 00-.21-.375.738.738 0 00-.242-.205c-.072-.026-.318-.052-.544-.057a3.849 3.849 0 0


//             question: "What is the largest planet in our solar system?",
    //             answer: "Jupiter",
    //             hint: "It's a gas giant and has a famous red spot."
    //         },
    //         {
    //             question: "Who wrote 'Romeo and Juliet'?",
    //             answer: "William Shakespeare",
    //             hint: "He’s often called England’s national poet."
    //         },
    //         {
    //             question: "What element does 'O' represent on the periodic table?",
    //             answer: "Oxygen",
    //             hint: "It's essential for breathing."
    //         },
    //         {
    //             question: "What is the boiling point of water in Celsius?",
    //             answer: "100",
    //             hint: "It's the same as the number for 'century.'"
    //         }
    //     ]
    // }
    // ];

  //   const challenges = [
  //   {
  //     _id: '1',
  //     title: 'Sunset Photography',
  //     description: 'Capture the best sunset moment in your city.',
  //     startDate: '2024-11-10T00:00:00Z',
  //     endDate: '2024-11-20T23:59:59Z',
  //   },
  //   {
  //     _id: '2',
  //     title: 'Wildlife Wonders',
  //     description: 'Photograph any wildlife species in its natural habitat.',
  //     startDate: '2024-12-01T00:00:00Z',
  //     endDate: '2024-12-10T23:59:59Z',
  //   },
  //   {
  //     _id: '3',
  //     title: 'Urban Exploration',
  //     description: 'Explore your city’s streets and capture interesting urban shots.',
  //     startDate: '2024-12-15T00:00:00Z',
  //     endDate: '2024-12-25T23:59:59Z',
  //   },
  // ];

    const Navigate = useNavigate();

  const [showPhotoChallenge, setShowPhotoChallenge] = useState(true); // Toggle between Photo Challenge and Hunt

  return (

          {/* Left buttons */}

            <button
              onClick={() => setShowPhotoChallenge(true)}
              className="text-white font-semibold py-2 px-4 rounded-md hover:bg-blue-500"
            >
              Photo Challenge
            </button>
            <button
              onClick={() => setShowPhotoChallenge(false)}
              className="text-white font-semibold py-2 px-4 rounded-md hover:bg-blue-500"
            >
              Hunt Challenge
            </button>

          {/* Right buttons */}

            <Link to="/photochallengeform" className="text-white font-semibold py-1 px-4 rounded-md bg-yellow-500">
              Create Photo Challenge
            </Link>
            <Link to="/createhunt" className="text-white font-semibold py-1 px-4 rounded-md bg-yellow-500 ">
              Create Hunt
            </Link>

        {showPhotoChallenge ? (

                    {challenge.map((challenge) => (
                        <PhotoChallengeCard key={challenge._id} challenge={challenge} />
                    ))}

        ) : (
        <div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6


able;
import java.util.concurrent.FutureTask;
import java.util.concurrent.RunnableFuture;

import org.openjdk.jmc.common.item.Aggregators;
import org.openjdk.jmc.common.item.GroupingAggregator;
import org.openjdk.jmc.common.item.IAggregator;
import org.openjdk.jmc.common.item.IItemCollection;
import org.openjdk.jmc.common.unit.IQuantity;
import org.openjdk.jmc.common.unit.UnitLookup;
import org.openjdk.jmc.common.util.IPreferenceValueProvider;
import org.openjdk.jmc.common.util.TypedPreference;
import org.openjdk.jmc.flightrecorder.jdk.JdkAggregators;
import org.openjdk.jmc.flightrecorder.jdk.JdkAttributes;
import org.openjdk.jmc.flightrecorder.jdk.JdkTypeIDs;
import org.openjdk.jmc.flightrecorder.rules.IRule;
import org.openjdk.jmc.flightrecorder.rules.Result;
import org.openjdk.jmc.flightrecorder.rules.jdk.messages.internal.Messages;
import org.openjdk.jmc.flightrecorder.rules.util.JfrRuleTopics;
import org.openjdk.jmc.flightrecorder.rules.util.RulesToolkit;
import org.openjdk.jmc.flightrecorder.rules.util.RulesToolkit.EventAvailability;

public class ContextSwitchRule implements IRule {

	public static final TypedPreference<IQuantity> CONTEXT_SWITCH_WARNING_LIMIT = new TypedPreference<>(
			"contextswitch.warning.limit", //$NON-NLS-1$
			Messages.getString(Messages.ContextSwitchRule_CONFIG_WARNING_LIMIT),
			Messages.getString(Messages.ContextSwitchRule_CONFIG_WARNING_LIMIT_LONG), NUMBER,
			NUMBER_UNITY.quantity(10000));

	private static final List<TypedPreference<?>> CONFIG_ATTRIBUTES = Arrays
			.<TypedPreference<?>> asList(CONTEXT_SWITCH_WARNING_LIMIT);

	private static final String RESULT_ID = "ContextSwitch"; //$NON-NLS-1$

	private static final IAggregator<IQuantity, ?> MAX_BLOCKS = GroupingAggregator.buildMax(
			Messages.getString(Messages.ContextSwitchRule_AGGR_MAX_BLOCKS), null, JdkAttributes.MONITOR_ADDRESS,
			JdkAggregators.TOTAL_BLOCKED_COUNT);

	@Override
	public RunnableFuture<Result> evaluate(final IItemCollection items, final IPreferenceValueProvider vp) {
		FutureTask<Result> evaluationTask = new FutureTask<>(new Callable<Result>() {
			@Override
			public Result call() throws Exception {
				return evaluate(items, vp.getPreferenceValue(CONTEXT_SWITCH_WARNING_LIMIT)
						.clampedLongValueIn(UnitLookup.NUMBER_UNITY));
			}
		});
		return evaluationTask;
	}

	private Result evaluate(IItemCollection items, long switchRateLimit) {
		EventAvailability eventAvailability = RulesToolkit.getEventAvailability(items, JdkTypeIDs.CONTEXT_SWITCH_RATE);
		if (eventAvailability != EventAvailability.AVAILABLE) {
			return RulesToolkit.getEventAvailabilityResult(this, items, eventAvailability,
					JdkTypeIDs.CONTEXT_SWITCH_RATE);
		}

		long switchRate = calculateSwitchRate(items);
		if (switchRate == -1) {
			return RulesToolkit.getTooFewEventsResult(this);
		}
		long mostBlocks = (switchRate > switchRateLimit) ? getMostBlocks(items) : 0;
		// FIXME: Configuration attribute for the warning and info limits
		int warningLimit = 100;
		int infoLimit = warningLimit / 2;
		double score = RulesToolkit.mapExp100(mostBlocks, infoLimit, warningLimit);
		String text, longText;
		if (score < 25) {
			text = Messages.getString(Messages.ContextSwitchRuleFactory_TEXT_OK);
			longText = null;
		} else {
			text = Messages.getString(Messages.ContextSwitchRuleFactory_TEXT_INFO);
			longText = Messages.getString(Messages.ContextSwitchRuleFactory_TEXT_INFO_LONG);
		}
		return new Result


表');
      throw ArgumentError('requests cannot be empty');
    }

    if (maxConcurrency <= 0) {
      NetworkLogger.framework.warning('执行并发请求: maxConcurrency 必须大于0');
      throw ArgumentError('maxConcurrency must be greater than 0');
    }

    _ensureInitialized();
    return await _executor.executeConcurrent(requests, maxConcurrency: maxConcurrency);
  }

  /// Cancel request
  void cancelRequest(BaseNetworkRequest request) {
    // 空值检查
    if (request == null) {
      NetworkLogger.framework.warning('取消请求: request 为空');
      throw ArgumentError('request cannot be null');
    }

    _executor.cancelRequest(request);
  }

  /// Cancel all requests
  void cancelAllRequests() {
    _executor.cancelAllRequests();
  }

  /// Update configuration
  void updateConfig(Map<String, dynamic> config) {
    // 空值检查
    if (config == null) {
      NetworkLogger.framework.warning('更新配置: config 为空');
      throw ArgumentError('config cannot be null');
    }

    final networkConfig = NetworkConfig.instance;

    if (config.containsKey('baseUrl')) {
      networkConfig.updateBaseUrl(config['baseUrl']);
    }

    if (config.containsKey('authToken')) {
      networkConfig.setAuthToken(config['authToken']);
    }

    if (config.containsKey('timeouts')) {
      final timeouts = config['timeouts'] as Map<String, dynamic>;
      networkConfig.updateTimeouts(
        connectTimeout: timeouts['connectTimeout'],
        receiveTimeout: timeouts['receiveTimeout'],
        sendTimeout: timeouts['sendTimeout'],
      );
    }

    if (config.containsKey('retry')) {
      final retry = config['retry'] as Map<String, dynamic>;
      networkConfig.updateRetryConfig(
        maxRetries: retry['maxRetries'],
        retryDelay: retry['retryDelay'],
      );
    }

    if (config.containsKey('cache')) {
      final cache = config['cache'] as Map<String, dynamic>;
      networkConfig.updateCacheConfig(
        enableCache: cache['enableCache'],
        defaultCacheDuration: cache['defaultCacheDuration'],
        maxCacheSize: cache['maxCacheSize'],
      );
    }

    if (config.containsKey('logging')) {
      final logging = config['logging'] as Map<String, dynamic>;
      networkConfig.updateLogConfig(
        enableLogging: logging['enableLogging'],
        logLevel: logging['logLevel'],
      );
    }

    // 重新配置执行器
    _executor.reconfigure();
  }

  /// 获取插件
  T? getPlugin<T extends NetworkPlugin>(String name) {
    return _plugins[name] as T?;
  }

  /// 获取所有插件
  List<NetworkPlugin> get plugins => _plugins.values.toList();

  /// 获取框架状态
  Map<String, dynamic> getStatus() {
    return {
      'isInitialized': _isInitialized,
      'pluginsCount': _plugins.length,
      'globalInterceptorsCount': _globalInterceptors.length,
      'executor': _executor.getStatus(),
      'config': NetworkConfig.instance.toMap(),
    };
  }

  /// 清理资源
  Future<void> dispose() async {
    // 注销所有插件
    for (fi


三个人一个桌子，四个上铺俩下铺

- A22785: 长清校区有三栋楼是八人间但是住六个人 其他的楼应该是六人间

- A22830: 部分

- A25772: 不知

- A25782: 老校区大部分八人间，空间狭小，不能同时容忍两人通过，桌子也很小，需要床上桌

- A28023: 不是

## Q: 教室和宿舍有没有空调？

- A17390: 教室宿舍都有了现在 教室空调随便开 宿舍空调交租金和电费

- A17921: 宿舍有

- A17926: 宿舍有教室无

- A19506: 都有

- A19881: 有

- A22218: 有

- A22246: 有

- A22785: 都有

- A22830: 有

- A25772: 不知

- A25782: 有，教室免费，宿舍需要交租金自付电费

- A28023: 有，但是要交租金

## Q: 有独立卫浴吗？没有独立浴室的话，澡堂离宿舍多远？

- A17390: 每个宿舍有独立凉台晾衣服 2个洗手池 和厕所。每层楼有一个浴室 大概10个位置 有柜子放东西 但是没有帘子且高层在楼下浴室人都很多的情况下会没有热水（水压供不上）

- A17921: 没有，本楼层

- A17926: 有独卫，无独浴，每一层楼有公共浴室

- A19506: 没有独立卫浴，但是宿舍楼每层都有澡堂，洗澡很方便

- A19881: 无独立卫浴，宿舍每层楼都有澡堂（长清校区）

- A22218: 没有独立浴室，很近，一楼层一个

- A22246: 宿舍楼每一层有浴室，有帘子

- A22785: 有独立卫生间 宿舍每一层都有浴室

- A22830: 无，每层都有

- A25772: 不知

- A25782: 老校区每层楼公共卫生间，澡堂得出门，距离不远近的可能不到50米，远的100米吧，因为学校本身就特别小

- A28023: 没有独立卫浴，浴室在每层楼的一头

## Q: 有早自习、晚自习吗？

- A17390: 管理学院目前没有早晚自习 也没听说别的学院有

- A17921: 无

- A17926: 无

- A19506: 没有早晚自习

- A19881: 无

- A22218: 无

- A22246: 没有

- A22785: 没有

- A22830: 无

- A25772: 不知

- A25782: 没有

- A28023: 会有晚自习和早操


commit/e03186525d38969d754ffd6005eb80499fd85673) (Robert Moore)

### TextFields

#### Changes

* [Update MaterialComponents podspec to separate extensions from component. Breaking change, please see description when sending out a new release (#2748)](https://github.com/material-components/material-components-ios/commit/6df22d2cd62e9da6e685890042e3f8748f9f6c19) (Yarden Eitan)

### Themes

#### Changes

* [[Examples/Tests] Convert @imports to imports (#2761)](https://github.com/material-components/material-components-ios/commit/e03186525d38969d754ffd6005eb80499fd85673) (Robert Moore)

### Typography

#### Changes

* [Added isPresentable to catalog files, ported over ZShadow to dragons. (#2726)](https://github.com/material-components/material-components-ios/commit/29d760c7d6cd8694cc35118ec66575f15201a636) (Yarden Eitan)

### Typography

#### Changes

* [[Tests/Catalog] Suppress partial availability warnings (#2780)](https://github.com/material-components/material-components-ios/commit/25de3728070a8681384fb22919689490d3b2f3ab) (Robert Moore)

---

# 43.1.1

## Component changes

### ActivityIndicator

#### Changes

* [Added isPresentable to catalog files, ported over ZShadow to dragons. (#2726)](https://github.com/material-components/material-components-ios/commit/29d760c7d6cd8694cc35118ec66575f15201a636) (Yarden Eitan)

### AnimationTiming

#### Changes

* [Added isPresentable to catalog files, ported over ZShadow to dragons. (#2726)](https://github.com/material-components/material-components-ios/commit/29d760c7d6cd8694cc35118ec66575f15201a636) (Yarden Eitan)

### AppBar

#### Changes

* [Added isPresentable to catalog files, ported over ZShadow to dragons. (#2726)](https://github.com/material-components/material-components-ios/commit/29d760c7d6cd8694cc35118ec66575f15201a636) (Yarden Eitan)
* [An example showing a bug when using MDCFlexibleHeaderView inside a UITableViewController (#2744)](https://github.com/material-components/material-components-ios/commit/89be8d3119c6f4907dc02cc6616a5a694da52155) (Yarden Eitan)

### BottomAppBar

#### Changes

* [Added isPresentable to catalog files, ported over ZShadow to dragons. (#2726)](https://github.com/material-components/material-components-ios/commit/29d760c7d6cd8694cc35118ec66575f15201a636) (Yarden Eitan)

### BottomNavigation

#### Changes

* [Add NSCoding tests (#2740)](https://github.com/material-components/material-components-ios/commit/86002fe84d974489949c667447c8c36d2385780a) (Robert Moore)

* [Added isPresentable to catalog files, ported over ZShadow to dragons. (#2726)](https://github.com/material-components/material-components-ios/commit/29d760c7d6cd8694cc35118ec66575f15201a636) (Yarden Eitan)

* [Correct itemTitleFont behavior (#2736)](https://github.com/material-components/material-components-ios/commit/da57f335e85d4723178774be91b7086c8a031522) (Robert Moore)

### BottomSheet

#### Changes

* [Added isPresentable to catalog files, ported over ZShadow to dragons. (#2726)](https://github.com/material-components/material-components-ios/commit


<br/>
   Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License".
  </p>
 </body>
</html>
<html>
 <head>
  <title>
   中共北京市委关于学习刘少奇同志答江渭清同志的信和检查右倾思想向中央、华北局的报告 - 1964-11-19 - CCRD 中国当代政治运动史数据库
  </title>
  <link href="../../../../Emblem_of_the_PCP-Shining_Path.svg.ico" rel="icon" type="image/x-icon"/>
 </head>
 <body>
  <meta content="中共北京市委关于学习刘少奇同志答江渭清同志的信和检查右倾思想向中央、华北局的报告" property="title"/>
  <meta content="1964-11-19" property="date"/>
  <meta content="" property="authors"/>
  <script type="application/ld+json">
   {"title": "\u4e2d\u5171\u5317\u4eac\u5e02\u59d4\u5173\u4e8e\u5b66\u4e60\u5218\u5c11\u5947\u540c\u5fd7\u7b54\u6c5f\u6e2d\u6e05\u540c\u5fd7\u7684\u4fe1\u548c\u68c0\u67e5\u53f3\u503e\u601d\u60f3\u5411\u4e2d\u592e\u3001\u534e\u5317\u5c40\u7684\u62a5\u544a", "date": "1964-11-19", "authors": [], "contents": [{"text": "\u4e2d\u5171\u5317\u4eac\u5e02\u59d4\u5173\u4e8e\u5b66\u4e60\u5218\u5c11\u5947\u540c\u5fd7\u7b54\u6c5f\u6e2d\u6e05\u540c\u5fd7\u7684\u4fe1\u548c\u68c0\u67e5\u53f3\u503e\u601d\u60f3\u5411\u4e2d\u592e\u3001\u534e\u5317\u5c40\u7684\u62a5\u544a", "type": "title"}, {"text": "\u5e02\u59d4\u63a5\u5230\u5c11\u5947\u540c\u5fd7\u7b54\u6c5f\u6e2d\u6e05\u540c\u5fd7\u76


_file: invalid_use_of_internal_member, unused_import, unnecessary_import

import '../frb_generated.dart';
import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart';

Future<VecOfPrimitivePackTwinNormal> handleVecOfPrimitiveTwinNormal(
        {required int n}) =>
    RustLib.instance.api
        .crateApiPrimitiveListMiscHandleVecOfPrimitiveTwinNormal(n: n);

class VecOfPrimitivePackTwinNormal {
  final Int8List int8List;
  final Uint8List uint8List;
  final Int16List int16List;
  final Uint16List uint16List;
  final Uint32List uint32List;
  final Int32List int32List;
  final Uint64List uint64List;
  final Int64List int64List;
  final Float32List float32List;
  final Float64List float64List;
  final List<bool> boolList;

  const VecOfPrimitivePackTwinNormal({
    required this.int8List,
    required this.uint8List,
    required this.int16List,
    required this.uint16List,
    required this.uint32List,
    required this.int32List,
    required this.uint64List,
    required this.int64List,
    required this.float32List,
    required this.float64List,
    required this.boolList,
  });

  @override
  int get hashCode =>
      int8List.hashCode ^
      uint8List.hashCode ^
      int16List.hashCode ^
      uint16List.hashCode ^
      uint32List.hashCode ^
      int32List.hashCode ^
      uint64List.hashCode ^
      int64List.hashCode ^
      float32List.hashCode ^
      float64List.hashCode ^
      boolList.hashCode;

  @override
  bool operator ==(Object other) =>
      identical(this, other) ||
      other is VecOfPrimitivePackTwinNormal &&
          runtimeType == other.runtimeType &&
          int8List == other.int8List &&
          uint8List == other.uint8List &&
          int16List == other.int16List &&
          uint16List == other.uint16List &&
          uint32List == other.uint32List &&
          int32List == other.int32List &&
          uint64List == other.uint64List &&
          int64List == other.int64List &&
          float32List == other.float32List &&
          float64List == other.float64List &&
          boolList == other.boolList;
}
// This file is automatically generated, so please do not edit it.
// @generated by `flutter_rust_bridge`@ 2.11.1.

import 'dart:io';

// ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import

import '../frb_generated.dart';
import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart';
import 'package:freezed_annotation/freezed_annotation.dart' hide protected;
import 'package:meta/meta.dart' as meta;
part 'attribute.freezed.dart';

// These types are ignored because they are neither used by any `pub` functions nor (for structs and enums) marked `#[frb(unignore)]`: `IgnoredStructTwinNormal`, `StructWithOnlyIgnoredMethodTwinNormal`
// These function are ignored because they are on traits that is not defined in current crate (put an empty `#[frb]` on it to unignore): `clone`, `fmt`
// These functions are ignored (category: IgnoreBecauseExplicitAttribute): `func_should_not_exist_in_dart_twin_normal`, `method_should_not_exist_in_dart_twin_normal`
// These functions are ignored (category: IgnoreBecauseOwnerTyShouldIgnore): `method_should_not_exist_in_dart_twin_normal`

Future<void> handleCustomizedStructTwinNormal(
        {required CustomizedTwinNormal val}) =>


        use super::NODE_SPACE;
        self.particle.drag(DRAG);
        let oldvel = self.particle.velocity();
        self.particle.advance(1.0);
        let newvel = self.particle.velocity();
        // Get force including changes from time delta
        self.oldforce = (newvel - oldvel).norm();
        self.particle.p.position = NODE_SPACE.wrap_position(self.particle.p.position);
    }

    pub fn should_split(&self) -> bool {
        self.energy >= ENERGY_THRESHOLD
    }
    pub fn should_obliterate(&self) -> bool {
        use std::num::FpCategory;
        use zoom::Position;
        let clos = |x: f64| {
            match x.classify() {
                FpCategory::Nan | FpCategory::Infinite => true,
                _ => false,
            }
        };
        self.energy <= 0 ||
        match self.particle.position() {
            Vec3 { x, y, z } => clos(x) || clos(y) || clos(z),
        }
    }

    pub fn color(&self) -> [f32; 4] {
        [1.0 - self.energy as f32 / ENERGY_THRESHOLD as f32,
         self.energy as f32 / ENERGY_THRESHOLD as f32,
         if self.bots.len() == 0 {
             0.0
         } else {
             self.moves as f32 / self.bots.len() as f32
         },
         1.0]
    }
    pub fn radius(&self) -> f32 {
        RADIUS_STATIC + BOTS_RADIUS_MULTIPLIER * (self.bots.len() as f32).sqrt()
    }
}
use crate::message::Message;

use http::{Request, Response, StatusCode, Version};

pub trait Framer<T, U> {
    fn new_sent_message(&self, message: Message<T>) -> Vec<u8>;
    fn handle_received_data(&self, received_data: Vec<u8>) -> U;
}

pub struct HttpClientFramer;

impl<T: Encode, U: Decode> Framer<T, U> for HttpClientFramer {
    fn new_sent_message(&self, message: Message<T>) -> Vec<u8> {
        return message.data.encode();
    }

    fn handle_received_data(&self, received_data: Vec<u8>) -> U {
        return U::decode(received_data);
    }
}

pub trait Encode {
    fn encode(self) -> Vec<u8>;
}

impl Encode for Request<()> {
    fn encode(self) -> Vec<u8> {
        let mut request_bytes = Vec::new();
        let (parts, _body) = self.into_parts();

        request_bytes.extend_from_slice(parts.method.as_str().as_bytes());
        request_bytes.extend_from_slice(b" / HTTP/1.1\r\n");
        request_bytes.extend_from_slice(b"\r\nHost: ");
        request_bytes.extend_from_slice(format!("{}", parts.uri).as_bytes());
        request_bytes.extend_from_slice(b"\r\n\r\n");
        return request_bytes;
    }
}

pub trait Decode {
    fn decode(data: Vec<u8>) -> Self;
}

impl Decode for Response<()> {
    fn decode(data: Vec<u8>) -> Self {
        let response_str = std::str::from_utf8(&data).unwrap();
        let mut response_lines = response_str.lines();
        let mut status_line = response_lines.next().unwrap().split_whitespace();
        let version = match status_line.next().unwrap() {
            "HTTP/0.9" => Version::HTTP_09,
            "HTTP/1.0" => Version::HTTP_10,
            "HTTP/1.1" => Version::HTTP_11,
            "HTTP/2.0" => Version::HTTP


oundingPoly `json:"fdBoundingPoly,omitempty"`
	// HeadwearLikelihood: Headwear likelihood.
	//
	// Possible values:
	//   "UNKNOWN" - Unknown likelihood.
	//   "VERY_UNLIKELY" - It is very unlikely.
	//   "UNLIKELY" - It is unlikely.
	//   "POSSIBLE" - It is possible.
	//   "LIKELY" - It is likely.
	//   "VERY_LIKELY" - It is very likely.
	HeadwearLikelihood string `json:"headwearLikelihood,omitempty"`
	// JoyLikelihood: Joy likelihood.
	//
	// Possible values:
	//   "UNKNOWN" - Unknown likelihood.
	//   "VERY_UNLIKELY" - It is very unlikely.
	//   "UNLIKELY" - It is unlikely.
	//   "POSSIBLE" - It is possible.
	//   "LIKELY" - It is likely.
	//   "VERY_LIKELY" - It is very likely.
	JoyLikelihood string `json:"joyLikelihood,omitempty"`
	// LandmarkingConfidence: Face landmarking confidence. Range [0, 1].
	LandmarkingConfidence float64 `json:"landmarkingConfidence,omitempty"`
	// Landmarks: Detected face landmarks.
	Landmarks []*GoogleCloudVisionV1p2beta1FaceAnnotationLandmark `json:"landmarks,omitempty"`
	// PanAngle: Yaw angle, which indicates the leftward/rightward angle that the
	// face is pointing relative to the vertical plane perpendicular to the image.
	// Range [-180,180].
	PanAngle float64 `json:"panAngle,omitempty"`
	// RollAngle: Roll angle, which indicates the amount of
	// clockwise/anti-clockwise rotation of the face relative to the image vertical
	// about the axis perpendicular to the face. Range [-180,180].
	RollAngle float64 `json:"rollAngle,omitempty"`
	// SorrowLikelihood: Sorrow likelihood.
	//
	// Possible values:
	//   "UNKNOWN" - Unknown likelihood.
	//   "VERY_UNLIKELY" - It is very unlikely.
	//   "UNLIKELY" - It is unlikely.
	//   "POSSIBLE" - It is possible.
	//   "LIKELY" - It is likely.
	//   "VERY_LIKELY" - It is very likely.
	SorrowLikelihood string `json:"sorrowLikelihood,omitempty"`
	// SurpriseLikelihood: Surprise likelihood.
	//
	// Possible values:
	//   "UNKNOWN" - Unknown likelihood.
	//   "VERY_UNLIKELY" - It is very unlikely.
	//   "UNLIKELY" - It is unlikely.
	//   "POSSIBLE" - It is possible.
	//   "LIKELY" - It is likely.
	//   "VERY_LIKELY" - It is very likely.
	SurpriseLikelihood string `json:"surpriseLikelihood,omitempty"`
	// TiltAngle: Pitch angle, which indicates the upwards/downwards angle that the
	// face is pointing relative to the image's horizontal plane. Range [-180,180].
	TiltAngle float64 `json:"tiltAngle,omitempty"`
	// UnderExposedLikelihood: Under-exposed likelihood.
	//
	// Possible values:
	//   "UNKNOWN" - Unknown likelihood.
	//   "VERY_UNLIKELY" - It is very unlikely.
	//   "UNLIKELY" - It is unlikely.
	//   "POSSIBLE" - It is possible.
	//   "LIKELY" - It is likely.
	//   "VERY_LIKELY" - It is very likely.
	UnderExposedLikelihood string `json:"underExposedLikelihood,omitempty"`
	// ForceSendFields is a list of field names (e.g. "AngerLikelihood") to
	// unconditionally include in API requests. By default, fields with empty or
	// default values are omitted from API requests. See
	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
	//


vity
import com.permissionx.guolindev.PermissionX
import com.shencoder.srs_rtc_android_client.R
import okhttp3.OkHttpClient
import java.net.Socket
import java.security.SecureRandom
import java.security.cert.X509Certificate
import javax.net.ssl.*

/**
 *
 * @author  ShenBen
 * @date    2022/1/18 17:52
 * @email   714081644@qq.com
 */

/**
 * okhttp忽略证书认证
 */
fun OkHttpClient.Builder.ignoreCertificate(): OkHttpClient.Builder {
    val xtm: X509TrustManager =
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
            object : X509ExtendedTrustManager() {
                override fun checkClientTrusted(
                    chain: Array<out X509Certificate>?,
                    authType: String?,
                    socket: Socket?
                ) {
                }

                override fun checkClientTrusted(
                    chain: Array<out X509Certificate>?,
                    authType: String?,
                    engine: SSLEngine?
                ) {
                }

                override fun checkClientTrusted(
                    chain: Array<out X509Certificate>?,
                    authType: String?
                ) {
                }

                override fun checkServerTrusted(
                    chain: Array<out X509Certificate>?,
                    authType: String?,
                    socket: Socket?
                ) {
                }

                override fun checkServerTrusted(
                    chain: Array<out X509Certificate>?,
                    authType: String?,
                    engine: SSLEngine?
                ) {
                }

                override fun checkServerTrusted(
                    chain: Array<out X509Certificate>?,
                    authType: String?
                ) {
                }

                override fun getAcceptedIssuers(): Array<X509Certificate> {
                    return arrayOf()
                }

            }
        } else {
            object : X509TrustManager {

                override fun checkClientTrusted(
                    chain: Array<out X509Certificate>?,
                    authType: String?
                ) {
                }

                override fun checkServerTrusted(
                    chain: Array<out X509Certificate>?,
                    authType: String?
                ) {
                }

                override fun getAcceptedIssuers(): Array<X509Certificate> {
                    return arrayOf()
                }

            }
        }
    val sslContext = SSLContext.getInstance("SSL")
    sslContext.init(null, arrayOf<TrustManager>(xtm), SecureRandom())
    val hostnameVerifier = HostnameVerifier { _, _ -> true }
    return sslSocketFactory(sslContext.socketFactory, xtm)
        .hostnameVerifier(hostnameVerifier)
}

private val avatarList = listOf(
    R.drawable.ic_avatar01,
    R.drawable.ic_avatar02,
    R.drawable.ic_avatar03,
    R.drawable.ic_avatar04,
    R.drawable.ic_avatar05,
)

@DrawableRes
fun randomAvatar(): Int {
    return avatarList[(avatarList.indices).random()]
}

/**
 * 请求通话相关权限
 */
fun FragmentActivity.requestCallPermissions(result: (allGranted: Boolean) -> Unit) {
    PermissionX.init(this)
        .permissions(
            Manifest.permission.CAMERA,
            Manifest.permission.RECORD_AUDIO
        )
        .request { allGranted, _, _ ->
            result.invoke(allGranted)
        }
}

/**
 * 请求通话相关权限
 */
fun Fragment.request


using Newtonsoft.Json.Linq;
using Nostrum;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;
using TCC.Utils;

namespace TCC.Interop;

public static class Firebase
{
    private readonly record struct Webhook(string URL, string AccountHash);

    private static readonly List<Webhook> _registeredWebhooks = [];
    public static async void RegisterWebhook(string? url, bool online, string accountHash)
    {
        if (string.IsNullOrEmpty(url) || string.IsNullOrEmpty(accountHash)) return;
        var req = new JObject
        {
            {"webhook_hash", HashUtils.GenerateHash(url)},
            {"user", accountHash},
            {"online", online }
        };
        using var c = MiscUtils.GetDefaultHttpClient();
        c.DefaultRequestHeaders.Add(HttpRequestHeader.ContentType.ToString(), "application/json");
        c.DefaultRequestHeaders.Add(HttpRequestHeader.AcceptCharset.ToString(), "utf-8");
        try
        {
            // todo: replace
            await c.PostAsync("http://us-central1-tcc-global-events.cloudfunctions.net/register_webhook",
                new StringContent(Encoding.UTF8.GetString(Encoding.UTF8.GetBytes(req.ToString())), Encoding.UTF8));
            if (online)
            {
                _registeredWebhooks.Add(new Webhook(url, accountHash));
            }
            else
            {
                var toRemove = _registeredWebhooks.FirstOrDefault(x => x.URL == url);
                if (toRemove == default) return;
                _registeredWebhooks.Remove(toRemove);
            }
        }
        catch
        {
            Log.F("Failed to register webhook.");
        }
    }
    public static async Task<bool> RequestWebhookExecution(string url, string accountHash)
    {
        bool canFire;
        var req = new JObject
        {
            { "webhook_hash"


#region License
// Copyright (c) 2007 James Newton-King
//
// 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, 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 AUTHORS OR 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.
#endregion

using System;
using System.Text.Json;
using System.Text.Json.Serialization;
using Microsoft.IdentityModel.Tokens;

namespace Microsoft.IdentityModel.TestUtils
{
    /// <summary>
    /// Custom Json converter for <see cref="SecurityKey"/>.
    /// </summary>
    public class SecurityKeyConverterWithTypeDiscriminator : JsonConverter<SecurityKey>
    {
        enum TypeDiscriminator
        {
            CustomKey = 1
        }

        /// <inheritdoc/>
        public override bool CanConvert(Type typeToConvert) =>
            typeof(SecurityKey).IsAssignableFrom(typeToConvert);

        ///


 _WebviewCookieDelegateImpl with CookieDelegate {
  final cookieManager = WebviewCookieManager();

  @override
  Future setCookie(String url, List<Cookie> cookies) {
    return cookieManager.setCookies(cookies, origin: url);
  }

  @override
  Future<List<Cookie>> getCookie(String url) {
    return cookieManager.getCookies(url);
  }
}
//
// Tencent is pleased to support the open source community by making
// Hippy available.
//
// Copyright (C) 2022 THL A29 Limited, a Tencent company.
// All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

import 'dart:io';

import 'package:device_info_plus/device_info_plus.dart';
import 'package:flutter/material.dart';
import 'package:voltron/voltron.dart';

import 'my_api_provider.dart';

enum PageStatus {
  init,
  loading,
  success,
  error,
}

class Monitor extends EngineMonitor {
  @override
  bool enableBuildTime = true;

  @override
  bool enablePerformance = true;

  @override
  bool enableCreateElementTime = true;
}

/// 自定义错误处理
class CustomExceptionHandler extends VoltronExceptionHandlerAdapter {
  final bool isDebugMode;
  final GlobalKey<State> key;

  CustomExceptionHandler(this.isDebugMode, this.key);

  void handleJsException(JsError exception) {
    LogUtils.e('Voltron3Page', exception.toString());
    var currentRootContext = key.currentContext;

    /// 只有开发模式下把js异常抛出来
    if (currentRootContext == null || !isDebugMode) return;
    showDialog(
      context: currentRootContext,
      builder: (BuildContext context) {
        return AlertDialog(
          title: Text('JS Error'),
          content: Container(
            height: 300,
            child: SingleChildScrollView(
              child: Text(
                exception.toString(),
              ),
            ),
          ),
          actions: <Widget>[
            TextButton(
              child: Text('确定'),
              onPressed: () {
                // 执行确认操作
                Navigator.of(context).pop();
              },
            ),
          ],
        );
      },
    );
  }

  void handleNativeException(Error error, bool haveCaught) {
    LogUtils.e('Voltron3Page', 'error: ${error.toString()}, haveCaught: $haveCaught');
  }

  void handleBackgroundTracing(String details) {
    LogUtils.e('Voltron3Page', details);
  }
}

class BaseVoltronPage extends StatefulWidget {
  final bool isHome;
  final bool debugMode;
  final String coreBundle;
  final String indexBundle;
  final String remoteServerUrl;

  BaseVoltronPage({
    this.isHome = false,
    this.debugMode = false,
    this.coreBundle = '',
    this.indexBundle = '',
    this.remoteServerUrl = '',
  });

  @override
  State<StatefulWidget> createState() {
    return _BaseVoltronPageState();
  }
}

class _BaseVoltronPageState extends State<BaseVoltronPage> {
  GlobalKey<State> dialogRootKey = GlobalKey();
  PageStatus engineStatus = PageStatus.init;
  PageStat


    var href = $this.attr('href');
    var lever = $this.parent('.txp-summary');

    if (href) {
        toggleDisplay.call(this, href.substr(1));
    }

    if (lever.length) {
        var vis = $(href).is(':visible');
        lever.toggleClass('expanded', vis);
        $this.attr('aria-pressed', vis.toString());
        $(href).attr('aria-expanded', vis.toString());
    }

    return false;
}

/**
 * Shows/hides matching elements.
 *
 * @param {string}  className Targeted element's class
 * @param {boolean} show      TRUE to display
 */

function setClassDisplay(className, show) {
    $('.' + className).toggle(show);
}

/**
 * Toggles panel's visibility and saves the state to a HTTP cookie.
 *
 * @param {string} classname The HTML class
 */

function toggleClassRemember(className) {
    var v = getCookie('toggle_' + className);
    v = (v == 1 ? 0 : 1);

    setCookie('toggle_' + className, v, 365);
    setClassDisplay(className, v);
    setClassDisplay(className + '_neg', 1 - v);
}

/**
 * Toggle visibility of matching elements based on a cookie value.
 *
 * @param {string}  className The HTML class
 * @param {string}  force     The value
 */

function setClassRemember(className, force) {
    if (typeof (force) != 'undefined') {
        setCookie('toggle_' + className, force, 365);
    }

    var v = getCookie('toggle_' + className);
    setClassDisplay(className, v);
    setClassDisplay(className + '_neg', 1 - v);
}

/**
 * Load data from the server using a HTTP POST request.
 *
 * @param  {object} data   POST payload
 * @param  {object} fn     Success handler
 * @param  {string} format Response data format, defaults to 'xml'
 * @return {object} this
 * @see    https://api.jquery.com/jQuery.post/
 */

function sendAsyncEvent(data, fn, format) {
    var formdata = false;
    format = format || 'xml';

    if (typeof(data) === 'string' && data.length > 0) {
        // Got serialized data.
        data = data + '&' + $.param({app_mode: 'async', _txp_token: textpattern._txp_token});
    } else if (data instanceof FormData) {
        formdata = true;
        data.append('app_mode', 'async');
        data.append('_txp_token', textpattern._txp_token);
    } else {
        data.app_mode = 'async';
        data._txp_token = textpattern._txp_token;
    }

    return formdata ? $.ajax({
        type: 'POST',
        url: 'index.php',
        data: data,
        success: fn,
        dataType: format,
        processData: false,
        contentType: false,
        headers: {} // jQuery 4 cheat, otherwise it switches to GET
    }) : $.post('index.php', data, fn, format);
}

/**
 * A pub/sub hub for client-side events.
 *
 * @since 4.5.0
 */

textpattern.Relay = {
    /**
     * Publishes an event to all registered subscribers.
     *
     * @param  {string} event The event
     * @param  {object} data  The data passed to registered subscribers
     * @return {object} The Relay object
     * @example
     * textpattern.Relay.callback('newEvent', {'name1': 'value1', 'name2': 'value2'});
     */

    callback: function (event, data, timeout) {
        clearTimeout(textpattern.Relay.timeouts[event]);
        timeout = !timeout ? 0 : parseInt(timeout, 10);

        if (!timeout || isNaN(timeout)) {
            return $(this).trigger(event, data);
        }

        textpattern.Relay.timeouts[event] = setTimeout(fu


gen::JsValue::from_str("Failed to immutably borrow group folders"));
                ConsoleService::log("Failed to immutably borrow group folders");
                return html!{};
            },
        };
        let folder = match group.get(&self.props.player_name) {
            Some(folder) => folder,
            None => return html!{},
        };

        //currently empty group folders are not shown

        /*
        if folder.len() == 0 {
            return html!{
                <span class="noselect Chip">
                    {"Their folder is empty!"}
                </span>
            }
        }
        */

        let folder_len = folder.len();
        folder.iter().zip(0..folder_len).map(|(chip, index)|{
            let battlechip = match library.library.get(&chip.name) {
                Some(chip) => chip.clone(),
                None => Rc::new(BattleChip::unknown_chip(&chip.name)),
            };
            html!{
                <GroupFolderChip
                    used={chip.used}
                    idx={index}
                    chip={battlechip}
                    on_mouse_enter={self.chip_mouseover.clone()}
                />
            }
        }).collect::<Html>()

    }

}

fn handle_mouseover_event(e: MouseEvent) -> GroupFolderComponentMsg {

    let id: Option<String> = e.current_target().as_ref().and_then(
        |target| target.dyn_ref::<web_sys::HtmlElement>()
    ).and_then(
        |div| Some(div.id())
    );

    match id {
        Some(id) => GroupFolderComponentMsg::SetHighlightedChip(id),
        None => GroupFolderComponentMsg::DoNothing,
    }
}<filename>src/mod_types/admin/users/session_types.rs
//=============================================================================
//
//                    WARNING: This file is AUTO-GENERATED
//
// Do not make changes directly to this file.
//
// If you would like to make a change to the library, please update the schema
// definitions at https://github.com/slack-rs/slack-api-schemas
//
// If you would like to make a change how the library was generated,
// please edit https://github.com/slack-rs/slack-rs-api/tree/master/codegen
//
//=============================================================================

#![allow(unused_imports)]
#![allow(clippy::match_single_binding)]
#![allow(clippy::blacklisted_name)]

use std::borrow::Cow;
use std::convert::From;
use std::error::Error;
use std::fmt;

#[derive(Clone, Default, Debug)]
pub struct InvalidateRequest<'a> {
    pub session_id: u64,
    /// ID of the team that the session belongs to
    pub team_id: Cow<'a, str>,
}

#[derive(Clone, Debug, Deserialize)]
pub struct InvalidateResponse {
    #[serde(default)]
    ok: bool,
}

impl<E: Error> Into<Result<InvalidateResponse, InvalidateError<E>>> for InvalidateResponse {
    fn into(self) -> Result<InvalidateResponse, InvalidateError<E>> {
        if self.ok {
            Ok(self)
        } else {
            Err(InvalidateError::Unknown(
                "Server failed without providing an error message.".into(),
            ))
        }
    }
}

#[derive(Debug)]
pub enum InvalidateError<E: Error> {
    /// The response was not parseable as the expected object
    MalformedResponse(String, serde_json::error::Error),
    /// The response returned an error that was unknown to the library
    Unknown(String),
    ///


	List<Relationship> rels = personService.getRelationships(relative, patient, new RelationshipType(3));
		assertTrue(!rels.isEmpty() && rels.size() == 1, "new relationship was not created");
	}

	/**
	 * @see ORUR01Handler#processMessage(Message)
	 */
	@Test
	public void processMessage_shouldFailIfQuestionDatatypeIsCodedAndABooleanIsNotAValidAnswer() throws Exception {
		GlobalProperty trueConceptGlobalProperty = new GlobalProperty(OpenmrsConstants.GLOBAL_PROPERTY_TRUE_CONCEPT, "7",
		        "Concept id of the concept defining the TRUE boolean concept");
		GlobalProperty falseConceptGlobalProperty = new GlobalProperty(OpenmrsConstants.GLOBAL_PROPERTY_FALSE_CONCEPT, "8",
		        "Concept id of the concept defining the TRUE boolean concept");
		Context.getAdministrationService().saveGlobalProperty(trueConceptGlobalProperty);
		Context.getAdministrationService().saveGlobalProperty(falseConceptGlobalProperty);
		String hl7string = "MSH|^~\\&|FORMENTRY|AMRS.ELD|HL7LISTENER|AMRS.ELD|20080226102656||ORU^R01|JqnfhKKtouEz8kzTk6Zo|P|2.5|1||||||||16^AMRS.ELD.FORMID\r"
		        + "PID|||7^^^^||Collet^Test^Chebaskwony||\r"
		        + "PV1||O|1^Unknown Location||||1^Super User (1-8)|||||||||||||||||||||||||||||||||||||20080212|||||||V\r"
		        + "ORC|RE||||||||20080226102537|1^Super User\r"
		        + "OBR|1|||1238^MEDICAL RECORD OBSERVATIONS^99DCT\r"
		        + "OBX|2|NM|4^CIVIL STATUS^99DCT||1|||||||||20080206";
		assertEquals("Coded", Context.getConceptService().getConcept(4).getDatatype().getName());
		Message hl7message = parser.parse(hl7string);
		assertThrows(ApplicationException.class, () -> router.processMessage(hl7message));
	}

	/**
	 * @see ORUR01Handler#processMessage(Message)
	 */
	@Test
	public void processMessage_shouldFailIfQuestionDatatypeIsNeitherBooleanNorNumericNorCoded() throws Exception {
		String hl7string = "MSH|^~\\&|FORMENTRY|AMRS.ELD|HL7LISTENER|AMRS.ELD|20080226102656||ORU^R01|JqnfhKKtouEz8kzTk6Zo|P|2.5|1||||||||16^AMRS.ELD.FORMID\r"
		        + "PID|||7^^^^||Collet^Test^Chebaskwony||\r"
		        + "PV1||O|1^Unknown Location||||1^Super User (1-8)|||||||||||||||||||||||||||||||||||||20080212|||||||V\r"
		        + "ORC|RE||||||||20080226102537|1^Super User\r"
		        + "OBR|1|||1238^MEDICAL RECORD OBSERVATIONS^99DCT\r"
		        + "OBX|2|NM|19^FAVORITE FOOD, NON-CODED^99DCT||1|||||||||20080206";
		assertEquals("Text", Context.getConceptService().getConcept(19).getDatatype().getName());
		Message hl7message = parser.parse(hl7string);
		assertThrows(ApplicationException.class, () -> router.processMessage(hl7message));
	}

	/**
	 * @see ORUR01Handler#processMessage(Message)
	 */
	@Test
	public void processMessage_shouldSetValueAsBooleanForObsIfTheAnswerIs0Or1AndQuestionDatatypeIsBoolean() throws Exception {
		GlobalPrope


8 4E03 0029; # (㈦; ㈦; ㈦; (七); (七); ) PARENTHESIZED IDEOGRAPH SEVEN
3227;3227;3227;0028 516B 0029;0028 516B 0029; # (㈧; ㈧; ㈧; (八); (八); ) PARENTHESIZED IDEOGRAPH EIGHT
3228;3228;3228;0028 4E5D 0029;0028 4E5D 0029; # (㈨; ㈨; ㈨; (九); (九); ) PARENTHESIZED IDEOGRAPH NINE
3229;3229;3229;0028 5341 0029;0028 5341 0029; # (㈩; ㈩; ㈩; (十); (十); ) PARENTHESIZED IDEOGRAPH TEN
322A;322A;322A;0028 6708 0029;0028 6708 0029; # (㈪; ㈪; ㈪; (月); (月); ) PARENTHESIZED IDEOGRAPH MOON
322B;322B;322B;0028 706B 0029;0028 706B 0029; # (㈫; ㈫; ㈫; (火); (火); ) PARENTHESIZED IDEOGRAPH FIRE
322C;322C;322C;0028 6C34 0029;0028 6C34 0029; # (㈬; ㈬; ㈬; (水); (水); ) PARENTHESIZED IDEOGRAPH WATER
322D;322D;322D;0028 6728 0029;0028 6728 0029; # (㈭; ㈭; ㈭; (木); (木); ) PARENTHESIZED IDEOGRAPH WOOD
322E;322E;322E;0028 91D1 0029;0028 91D1 0029; # (㈮; ㈮; ㈮; (金); (金); ) PARENTHESIZED IDEOGRAPH METAL
322F;322F;322F;0028 571F 0029;0028 571F 0029; # (㈯; ㈯; ㈯; (土); (土); ) PARENTHESIZED IDEOGRAPH EARTH
3230;3230;3230;0028 65E5 0029;0028 65E5 0029; # (㈰; ㈰; ㈰; (日); (日); ) PARENTHESIZED IDEOGRAPH SUN
3231;3231;3231;0028 682A 0029;0028 682A 0029; # (㈱; ㈱; ㈱; (株); (株); ) PARENTHESIZED IDEOGRAPH STOCK
3232;3232;3232;0028 6709 0029;0028 6709 0029; # (㈲; ㈲; ㈲; (有); (有); ) PARENTHESIZED IDEOGRAPH HAVE
3233;3233;3233;0028 793E 0029;0028 793E 0029; # (㈳; ㈳; ㈳; (社); (社); ) PARENTHESIZED IDEOGRAPH SOCIETY
3234;3234;3234;0028 540D 0029;0028 540D 0029; # (㈴; ㈴; ㈴; (名); (名); ) PARENTHESIZED IDEOGRAPH NAME
3235;3235;3235;0028 7279 0029;0028 7279 0029; # (㈵; ㈵; ㈵; (特); (特); ) PARENTHESIZED IDEOGRAPH SPECIAL
3236;3236;3236;0028 8CA1 0029;0028 8CA1 0029; # (㈶; ㈶; ㈶; (財); (財); ) PARENTHESIZED IDEOGRAPH FINANCIAL
3237;32


.lang.String body)

Description copied from class: Request

Sets the request body to be the specified String.

Overrides:
setBody in class Request

Parameters:
body - the String to use for the body. May be null.

setBody

public void setBody(byte[] body)

Description copied from class: Request

Sets the request body to be the specified array of bytes.

Overrides:
setBody in class Request

Parameters:
body - the byte array to use for the body. May be null.

setBody

public void setBody(org.w3c.dom.Document body)

Description copied from class: Request

Sets the request body to be the specified SimpleDocument.

Overrides:
setBody in class Request

Parameters:
body - the DOM document to use for the body. May be null.

setBody

public void setBody(java.io.InputStream body)

Description copied from class: Request

Sets the request body to be the specified InputStream.

Overrides:
setBody in class Request

Parameters:
body - the I


in

    @property
    def d_hard_max(self):
        return self._d_hard_max

    @d_hard_max.setter
    def d_hard_max(self, d_hard_max):
        assert (val.is_real_number_vector(d) for d in d_hard_max)
        self._d_hard_max = d_hard_max

    @property
    def N(self):
        return len(self.d_hard_min)

    @N.setter
    def N(self, N):
        pass

class TVConstraints:
    """
    Time variant constraints
    """

    @classmethod
    def create_from_params(cls, horizon: float, N: int, dT: float):
        assert N == int(round(horizon / dT))
        lon, lat = cls.set_default_constraints(N)
        return cls(lon, lat)

    @staticmethod
    def set_default_constraints(N):
        lon = LonConstraints(N)
        lat = LatConstraints(N)

        return lon, lat

    def __init__(self, c_long: LonConstraints, c_lat: LatConstraints):
        self._N = c_long.N
        assert c_long.N == c_lat.N
        self._lon = c_long
        self._lat = c_lat

    @property
    def lon(self) -> LonConstraints:
        return self._lon

    @lon.setter
    def lon(self, c: LonConstraints):
        assert isinstance(c, LonConstraints) and c.N == self.N
        self._lon = c

    @property
    def lat(self) -> LatConstraints:
        return self._lat

    @lat.setter
    def lat(self, c: LatConstraints):
        assert isinstance(c, LatConstraints) and c.N == self.N
        self._lat = c

    @property
    def N(self) -> int:
        return self._N

    @N.setter
    def N(self, N: int):
        raise Exception("You are not allowed to change the horizon of the constraints!")


TMotionInstanceNV = struct(Module.VULKAN, "VkAccelerationStructureSRTMotionInstanceNV") {
    VkSRTDataNV("transformT0")
    VkSRTDataNV("transformT1")
    uint32_t("instanceCustomIndex", bits = 24)
    uint32_t("mask", bits = 8)
    uint32_t("instanceShaderBindingTableRecordOffset", bits = 24)
    VkGeometryInstanceFlagsKHR("flags", bits = 8)
    uint64_t("accelerationStructureReference")
}

val VkAccelerationStructureMotionInstanceDataNV = union(Module.VULKAN, "VkAccelerationStructureMotionInstanceDataNV") {
    VkAccelerationStructureInstanceKHR("staticInstance")
    VkAccelerationStructureMatrixMotionInstanceNV("matrixMotionInstance")
    VkAccelerationStructureSRTMotionInstanceNV("srtMotionInstance")
}

val VkAccelerationStructureMotionInstanceNV = struct(Module.VULKAN, "VkAccelerationStructureMotionInstanceNV") {
    VkAccelerationStructureMotionInstanceTypeNV("type")
    VkAccelerationStructureMotionInstanceFlagsNV("flags")
    VkAccelerationStructureMotionInstanceDataNV("data")
}

val VkPhysicalDeviceRayTracingMotionBlurFeaturesNV = struct(Module.VULKAN, "VkPhysicalDeviceRayTracingMotionBlurFeaturesNV") {
    Expression("#STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_MOTION_BLUR_FEATURES_NV")..VkStructureType("sType")
    nullable..opaque_p("pNext")
    VkBool32("rayTracingMotionBlur")
    VkBool32("rayTracingMotionBlurPipelineTraceRaysIndirect")
}

val VkPhysicalDeviceMeshShaderFeaturesEXT = struct(Module.VULKAN, "VkPhysicalDeviceMeshShaderFeaturesEXT") {
    Expression("#STRUCTURE_TYPE_PHYSICAL_DEVICE_MESH_SHADER_FEATURES_EXT")..VkStructureType("sType")
    nullable..opaque_p("pNext")
    VkBool32("taskShader")
    VkBool32("meshShader")
    VkBool32("multiviewMeshShader")
    VkBool32("primitiveFragmentShadingRateMeshShader")
    VkBool32("meshShaderQueries")
}

val VkPhysicalDeviceMeshShaderPropertiesEXT = struct(Module.VULKAN, "VkPhysicalDeviceMeshShaderPropertiesEXT", mutable = false) {
    Expression("#STRUCTURE_TYPE_PHYSICAL_DEVICE_MESH_SHADER_PROPERTIES_EXT")..VkStructureType("sType").mutable()
    nullable..opaque_p("pNext").mutable()
    uint32_t("maxTaskWorkGroupTotalCount")
    uint32_t("maxTaskWorkGroupCount")[3]
    uint32_t("maxTaskWorkGroupInvocations")
    uint32_t("maxTaskWorkGroupSize")[3]
    uint32_t("maxTaskPayloadSize")
    uint32_t("maxTaskSharedMemorySize")
    uint32_t("maxTaskPayloadAndSharedMemorySize")
    uint32_t("maxMeshWorkGroupTotalCount")
    uint32_t("maxMeshWorkGroupCount")[3]
    uint32_t("maxMeshWorkGroupInvocations")
    uint32_t("maxMeshWorkGroupSize")[3]
    uint32_t("maxMeshSharedMemorySize")
    uint32_t("maxMeshPayloadAndSharedMemorySize")
    uint32_t("maxMeshOutputMemorySize")
    uint32_t("maxMeshPayloadAndOutputMemorySize")
    uint32_t("maxMeshOutputComponents")
    uint32_t("maxMeshOutputVertices")
    uint32_t("maxMeshOutputPrimitives")
    uint32_t("maxMeshOutputLayers")
    uint32_t("maxMeshMultiviewViewCount")
    uint32_t("meshOutputPerVertexGranularity")
    uint32_t("meshOutputPerPrimitiveGranular


e);
    }

    private static IEnumerator RunFullUpdate()
    {
        if (!MainGame.game_started) yield break;
        // if (_needScanning)
        // {
        var sw = new Stopwatch();
        sw.Start();

        //scan stockpiles

        var allObjects = CrossModFields.WorldObjects;
        _objects = allObjects!
            .Where(x => x.obj_id.Contains(Constants.ItemObjectId.Timber) || x.obj_id.Contains(Constants.ItemObjectId.Ore) ||
                        x.obj_id.Contains(Constants.ItemObjectId.Stone))
            .Where(x => x.data.inventory_size > 0)
            .ToList();

        Log($"[ALH]: Scanning world for stockpiles.");
        _objects.RemoveAll(a => a.obj_id.Contains("decor"));
        foreach (var obj in _objects)
        {
            Log($"Found stockpile: location: {GetLocation(obj)}, type: {GetStockpileType(obj)}, distance: {GetDistance(obj)}");
        }

        //update stockpiles
        Log($"[ALH]: Updating stockpiles distance, type etc and sorting by distance to player.");
        foreach (var stockpile in _objects.Where(a => a != null))
        {
            Log(AddStockpile(stockpile) ? $"Added stockpile: location: {GetLocation(stockpile)}, type: {GetStockpileType(stockpile)}, distance: {GetDistance(stockpile)}" : $"Stockpile already exists in list - updating distance from player.");
        }

        //sort them by distance from player
        SortedStockpiles.Sort((x, y) => x.GetDistanceFromPlayer().CompareTo(y.GetDistanceFromPlayer()));

        sw.Stop();
        Log($"Scanning, updating, and sorting stockpiles took {sw.ElapsedMilliseconds}ms");
    }
}


  }, {} as unknown as Constants);
}
import * as jwt from 'jsonwebtoken'
import { AuthenticationGateway } from './../../business/gateways/Auth/AuthenticationGateway';

export class JwtImplementation implements AuthenticationGateway{

    private getJwtSecretKey(): string {
        if(!process.env.JWT_SECRET){
            throw new Error("Missing JWT secret key")
        }
        return process.env.JWT_SECRET
    }

    generateToken(userId: string): string {
      return jwt.sign(
           { userId },
           this.getJwtSecretKey()
       )
    }
}import { Parser } from "../src/Parser";
import { Node } from "../src/Node";

const subruleGrammar = () => `
 NUMBER_LITERAL  = "\\d+";
 PLUS_OP         = "\\+";
 MINUS_OP        = "\\-";
 MUL_OP          = "\\*";
 DIV_OP          = "\\/";
 LPAREN         = "\\(";
 RPAREN         = "\\)";

 expression      = TERMS:(:term, :(OP:MINUS_OP, term | OP:PLUS_OP, term)*);
 term            = FACTORS:(:factor, :(OP:DIV_OP, factor | OP:MUL_OP, factor)*);
 factor          = primary | PLUS_OP, primary | MINUS_OP, primary;
 primary         = NUMBER_LITERAL | LPAREN!, expression, RPAREN!;`

describe("Pretty Print test", () => {

    let expected: string = `+- expression
   +- term
   |  +- factor
   |     +- primary
   |        +- "NUMBER_LITERAL" NUMBER_LITERAL [9]
   +- anonymous_1
      +- "OP" PLUS_OP [+]
      +- term
         +- factor
            +- primary
               +- "NUMBER_LITERAL" NUMBER_LITERAL [5]
`;

    let input = "9+5";
    let parser: Parser = new Parser(subruleGrammar(), "expression", () => { });
    let ast: Node = parser.parse(input);
    let actual: string = "";
    actual = ast.prettyPrint();

    test("prettyprint test", () => {
        expect(actual).toEqual(expected);
    })
});
export class LinkedListNode<T> {
    public value : T;
    public next? : LinkedListNode<T>;

    constructor(value : T, next?: LinkedListNode<T>) {
      this.value = value;
      this.next = next;
    }

    public toString(callback : (value: T) => void) {
      return callback ? callback(this.value) : `${this.value}`;
    }
  }import { createForm } from '../src/createForm';
import { FormTag } from '../src/FormTag';
import get from 'lodash/get';

const path = 'some.path[1].to.0';
const valueAtPath = { value: '2nd' };

const defaultValues = {
  some: {
    path: [{ to: [{ value: '1st' }] }, { to: [valueAtPath] }],
  },
};

describe('Creation', () => {
  it('should create a field entry in the form', () => {
    const [form] = createForm(defaultValues);

    form.makeFormField(path);

    expect(form.state.fields[path]).toBeDefined();
  });

  it('should pick value and defaultValue at path from form state', () => {
    const [form] = createForm(defaultValues);

    const [field] = form.makeFormField(path);

    expect(field.state.defaultValue).toBe(valueAtPath);
    expect(field.value).toBe(get(form.values, path));
  });

  it('should not add value to form field', () => {
    const [form] = createForm(defaultValues);

    form.makeFormField(path);

    // @ts-expect-error: in favor of the test
    expect(form.state.fields[path].value).toBeUndefined();
  });


/* Generated by RuntimeBrowser
   Image: /System/Library/PrivateFrameworks/SiriCore.framework/SiriCore
 */

@interface SiriCoreLocalSpeechDESRecord : NSObject <NSSecureCoding> {
    NSString * _UUIDString;
    NSMutableArray * _audioPackets;
    NSArray * _context;
    NSObject<OS_dispatch_group> * _contextualDataGroup;
    NSDictionary * _interactionSenderDisplayNames;
    NSDictionary * _keyboardLMDynamicVocabularyItems;
    NSString * _language;
    NSArray * _locationOfInterestNames;
    NSArray * _locationOfInterestSpokenNames;
    NSData * _profile;
    NSObject<OS_dispatch_queue> * _queue;
    unsigned long long  _samplingRate;
    NSString * _task;
    NSDictionary * _userData;
}

@property (nonatomic, readonly, copy) NSString *UUIDString;
@property (nonatomic, readonly, copy) NSMutableArray *audioPackets;
@property (nonatomic, readonly, copy) NSArray *context;
@property (nonatomic, readonly, copy) NSDictionary *interactionSenderDisplayNames;
@property (nonatomic, readonly, copy) NSDictionary *keyboardLMDynamicVocabularyItems;
@property (nonatomic, readonly, copy) NSString *language;
@property (nonatomic, readonly, copy) NSArray *locationOfInterestNames;
@property (nonatomic, readonly, copy) NSArray *locationOfInterestSpokenNames;
@property (nonatomic, copy) NSData *profile;
@property (nonatomic, readonly) unsigned long long samplingRate;
@property (nonatomic, readonly, copy) NSString *task;
@property (nonatomic, copy) NSDictionary *userData;

+ (void)DeleteAllRecordsWithCompletion:(id /* block */)arg1;
+ (void)fetchRecordWithLanguage:(id)arg1 completionHandler:(id /* block */)arg2;
+ (id)recordsWithLanguage:(id)arg1 error:(id*)arg2;
+ (bool)supportsSecureCoding;

- (void).cxx_destruct;
- (id)UUIDString;
- (id)_init;
- (void)addAudioPacket:(id)arg1;
- (id)audioPackets;
- (id)context;
- (id)description;
- (void)encodeWithCoder:(id)arg1;
- (void)fetchContextualData;
- (id)initWithCoder:(id)arg1;
- (id)initWithLanguage:(id)arg1 task:(id)arg2 context:(id)arg3 narrowband:(bool)arg4;
- (id)interactionSenderDisplayNames;
- (id)keyboardLMDynamicVocabularyItems;
- (id)language;
- (id)locationOfInterestNames;
- (id)locationOfInterestSpokenNames;
- (id)profile;
- (unsigned long long)samplingRate;
- (void)setProfile:(id)arg1;
- (void)setUserData:(id)arg1;
- (id)task;
- (id)userData;
- (void)writeToFileWithCompletionHandler:(id /* block */)arg1;

@end


d meet" viewBox="0 0 24 24"><path fill="currentColor" d="M21 12.5a7.5 7.5 0 01-7 7.484V18.98a6.5 6.5 0 000-12.96V5.016a7.5 7.5 0 017 7.484Zm-3 0a4.5 4.5 0 01-4 4.473v-1.008a3.501 3.501 0 000-6.93V8.027a4.5 4.5 0 014 4.473Zm-3 0a1.5 1.5 0 01-1 1.415v-2.83a1.5 1.5 0 011 1.415ZM2 9h4l4-4h2v15h-2l-4-4H2V9Zm1 6h3.414l4 4H11V6h-.586l-4 4H3v5Z"/></svg>';
  static const String volume_minus =
      '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="24" height="24" preserveAspectRatio="xMidYMid meet" viewBox="0 0 24 24"><path fill="currentColor" d="M2 9h4l4-4h2v15h-2l-4-4H2V9Zm1 6h3.414l4 4H11V6h-.586l-4 4H3v5Zm11-2v-1h7v1h-7Z"/></svg>';
  static const String volume_mute =
      '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="24" height="24" preserveAspectRatio="xMidYMid meet" viewBox="0 0 24 24"><path fill="currentColor" d="M2 9h4l4-4h2v15h-2l-4-4H2V9Zm1 6h3.414l4 4H11V6h-.586l-4 4H3v5Zm10.964.328 2.829-2.828-2.829-2.828.708-.708 2.828 2.829 2.828-2.829.707.708-2.828 2.828 2.828 2.828-.707.707-2.828-2.828-2.828 2.828-.708-.707Z"/></svg>';
  static const String volume_off =
      '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="24" height="24" preserveAspectRatio="xMidYMid meet" viewBox="0 0 24 24"><path fill="currentColor" d="M2.793 4.457 3.5 3.75 20.25 20.5l-.707.707-2.241-2.24A7.455 7.455 0 0114 19.983V18.98a6.463 6.463 0 002.568-.749l-1.51-1.51c-.335.125-.69.21-1.058.25v-1.007a4.21 4.21 0 00.254-.046L12 13.663V20h-2l-4-4H2V9h4l.668-.668-3.875-3.875ZM21 12.5c0 2.03-.806 3.87-2.115 5.22l-.707-.707A6.5 6.5 0 0014 6.02V5.016a7.5 7.5 0 017 7.484Zm-3 0c0 1.2-.47 2.292-1.237 3.099l-.707-.708A3.5 3.5 0 0014 9.035V8.027a4.5 4.5 0 014 4.473Zm-3 0c0 .372-.136.713-.36.975l-.64


 and Sobriety",
    "Bowl Full of Jelly",
    "Eye and a Twist",
    "Chubby and Plump"
  };

  // These are skills where someone would not care if they are in-run,
  // generally because they do not cost MP
  public static final String[] BREAKFAST_ALWAYS_SKILLS = {
    "Summon Annoyance", "Communism!",
  };

  public static final String[] TOME_SKILLS = {
    "Summon Snowcones",
    "Summon Stickers",
    "Summon Sugar Sheets",
    // Summon Clip Art requires extra parameters
    // "Summon Clip Art",
    "Summon Rad Libs",
    "Summon Smithsness"
  };

  public static final String[] LIBRAM_SKILLS = {
    "Summon Candy Heart",
    "Summon Party Favor",
    "Summon Love Song",
    "Summon BRICKOs",
    "Summon Dice",
    "Summon Resolutions",
    "Summon Taffy",
  };

  public static final String[] GRIMOIRE_SKILLS = {
    "Summon Hilarious Objects",
    "Summon Tasteful Items",
    "Summon Alice's Army Cards",
    "Summon Geeky Gifts",
    "Summon Confiscated Things",
  };

  public static String lastUpdate = "";
  public static int lastSkillUsed = -1;
  public static int lastSkillCount = 0;

  // The following fields are set in an "unmodified" instance
  private final int skillId;
  private final boolean isBuff;
  private final String skillName;
  private final String canonical;
  private String target;
  private long buffCount;

  // The rest of the fields are set in an instance that we actually run
  private String countFieldId;
  private boolean isRunning;
  private int lastReduction = Integer.MAX_VALUE;
  private String lastStringForm = "";

  // if the request we're running requires a certain item to be equipped, store it here
  private AdventureResult forcedItem;
  private AdventureResult forcedNonItem;

  // Tools for casting buffs. The lists are ordered from most bonus buff
  // turns provided by this tool to least.

  public static final BuffTool[] TAMER_TOOLS =
      new BuffTool[] {
        new BuffTool(ItemPool.PRIMITIVE_ALIEN_TOTEM, 25, false, null),
        new BuffTool(ItemPool.FLAIL_OF_THE_SEVEN_ASPECTS, 15, false, null),
        new BuffTool(ItemPool.CHELONIAN_MORNINGSTAR, 10, false, null),
        new BuffTool(ItemPool.MACE_OF_THE_TORTOISE, 5, false, null),
        new BuffTool(ItemPool.OUIJA_BOARD, 2, true, null),
        new BuffTool(ItemPool.TURTLE_TOTEM, 0, false, null),
      };

  public static final BuffTool[] SAUCE_TOOLS =
      new BuffTool[] {
        new BuffTool(ItemPool.WINDSOR_PAN_OF_THE_SOURCE, 15, false, null),
        new BuffTool(ItemPool.FRYING_BRAINPAN, 15, false, null),
        new BuffTool(ItemPool.SAUCEPANIC, 10, false, null),
        new BuffTool(ItemPool.SEVENTEEN_ALARM_SAUCEPAN, 10, false, null),
        new BuffTool(ItemPool.OIL_PAN, 7, true, null),
        new BuffTool(ItemPool.FIVE_ALARM_SAUCEPAN, 5, false, null),
        new BuffTool(ItemPool.SAUCEPAN, 0, false, null),
      };

  public static final BuffTool[] THIEF_TOOLS =