it('Returns empty data if no valid requests are passed', function () {
      const serverRequests = spec.buildRequests([])
      expect(serverRequests).to.be.an('array').that.is.empty
    })
    it('Returns request with page field value from ortb2 object if ortb2 has page field', function () {
      bidderRequest.ortb2.site = {
        page: 'testSitePage'
      }
      const serverRequests = spec.buildRequests([bid1], bidderRequest)
      expect(serverRequests).to.have.lengthOf(1)
      serverRequests.forEach(serverRequest => {
        expect(serverRequest.data.page).to.be.a('string');
        expect(serverRequest.data.page).to.be.equal('testSitePage');
      })
    })
  })
  describe('interpretBannerResponse', function () {
    const resObject = {
      body: [ {
        requestId: '123',
        cpm: 0.3,
        width: 320,
        height: 50,
        ad: '
Hello ad
',
        ttl: 1000,
        creativeId: '123asd',
        netRevenue: true,
        currency: 'USD',
        meta: {
          advertiserDomains: ['example.com'],
          mediaType: 'banner'
        }
      } ]
    };
    let serverResponses = spec.interpretResponse(resObject);
    it('Returns an array of valid server responses if response object is valid', function () {
      expect(serverResponses).to.be.an('array').that.is.not.empty;
      for (let i = 0; i < serverResponses.length; i++) {
        const dataItem = serverResponses[i];
        expect(dataItem).to.have.all.keys('requestId', 'cpm', 'width', 'height', 'ad', 'ttl', 'creativeId',
          'netRevenue', 'currency', 'meta');
        expect(dataItem.requestId).to.be.a('string');
        expect(dataItem.cpm).to.be.a('number');
        expect(dataItem.width).to.be.a('number');
        expect(dataItem.height).to.be.a('number');
        expect(dataItem.ad).to.be.a('string');
        expect(dataItem.ttl).to.be.a('number');
        expect(dataItem.creativeId).to.be.a('string');
        expect(dataItem.netRevenue).to.be.a('boolean');
        expect(dataItem.currency).to.be.a('string');
        expect(dataItem.meta.advertiserDomains).to.be.an('array');
        expect(dataItem.meta.mediaType).to.be.a('string');
      }
      it('Returns an empty array if invalid response is passed', function () {
        serverResponses = spec.interpretResponse('invalid_response');
        expect(serverResponses).to.be.an('array').that.is.empty;
      });
    });
  });
  describe('interpretVideoResponse', function () {
    const resObject = {
      body: [ {
        requestId: '123',
        cpm: 0.3,
        width: 320,
        height: 50,
        vastXml: '<VAST></VAST>',
        ttl: 1000,
        creativeId: '123asd',
        netRevenue: true,
        currency: 'USD',
        meta: {
          advertiserDomains: ['example.com'],
          mediaType: 'video'
        }
      } ]
    };
    let serverResponses = spec.interpretResponse(resObject);
    it('Returns an array of valid server responses if response object is valid', function () {
      expect(serverResponses).to.be.an('array')


/variables_utilities.hpp"
#include "includes/variables.h"
#include "tests/cpp_tests/geo_mechanics_fast_suite.h"

namespace Kratos::Testing
{

KRATOS_TEST_CASE_IN_SUITE(TestVariablesUtilitiesGetsCorrectComponents, KratosGeoMechanicsFastSuiteWithoutKernel)
{
    const auto& component = VariablesUtilities::GetComponentFromVectorVariable(ACCELERATION.Name(), "X");

    KRATOS_EXPECT_EQ(component, ACCELERATION_X);
}

KRATOS_TEST_CASE_IN_SUITE(TestVariablesUtilitiesThrowsWhenComponentDoesNotExist, KratosGeoMechanicsFastSuiteWithoutKernel)
{
    KRATOS_EXPECT_EXCEPTION_IS_THROWN(
        VariablesUtilities::GetComponentFromVectorVariable(ACCELERATION.Name(), "?"),
        "Error: The component \"ACCELERATION_?\" is not registered!")
}

} // namespace Kratos::Testing
// KRATOS___
//     //   ) )
//    //         ___      ___
//   //  ____  //___) ) //   ) )
//  //    / / //       //   / /
// ((____/ / ((____   ((___/ /  MECHANICS
//
//  License:         geo_mechanics_application/license.txt
//
//  Main authors:    Wijtze Pieter Kikstra
//                   Gennady Markelov
//

#include "custom_utilities/math_utilities.h"
#include "custom_utilities/stress_strain_utilities.h"
#include "tests/cpp_tests/geo_mechanics_fast_suite.h"
#include "tests/cpp_tests/test_utilities.h"
#include "utilities/math_utils.h"
#include <boost/numeric/ublas/assignment.hpp>

using namespace Kratos;

namespace Kratos::Testing
{

KRATOS_TEST_CASE_IN_SUITE(CheckCalculateTrace, KratosGeoMechanicsFastSuiteWithoutKernel)
{
    const Vector eye = MathUtils<double>::StressTensorToVector(IdentityMatrix(3));
    KRATOS_EXPECT_DOUBLE_EQ(3.0, StressStrainUtilities::CalculateTrace(eye));
}

KRATOS_TEST_CASE_IN_SUITE(CheckCalculateMeanStress, KratosGeoMechanicsFastSuiteWithoutKernel)
{
    const Vector eye = MathUtils<double>::StressTensorToVector(IdentityMatrix(3));
    KRATOS_EXPECT_DOUBLE_EQ(1.0, StressStrainUtilities::CalculateMeanStress(eye));
}

KRATOS_TEST_CASE_IN_SUITE(CheckGreenLagrangeStrainTensor, KratosGeoMechanicsFastSuiteWithoutKernel)
{
    const Matrix eye =
        StressStrainUtilities::CalculateGreenLagrangeStrainTensor(std::sqrt(3.) * IdentityMatrix(3));
    KRATOS_EXPECT_MATRIX_NEAR(eye, IdentityMatrix(3), Defaults::absolute_tolerance)
}

KRATOS_TEST_CASE_IN_SUITE(CheckCalculateVonMisesStressHydrostatic, KratosGeoMechanicsFastSuiteWithoutKernel)
{
    Vector stress_vector(4);
    stress_vector <<= -2.0, -2.0, -2.0, 0.0;
    KRATOS_EXPECT_DOUBLE_EQ(0.0, StressStrainUtilities::CalculateVonMisesStress(stress_vector));
}

KRATOS_TEST_CASE_IN_SUITE(CheckCalculateVonMisesStressPureShear, KratosGeoMechanicsFastSuiteWithoutKernel)
{
    Vector stress_vector(4);


local XUiGridSuitPrefabEquip = require("XUi/XUiEquipAwarenessReplace/XUiGridSuitPrefabEquip")

local XUiEquipSuitPrefabConflict = XLuaUiManager.Register(XLuaUi, "UiEquipSuitPrefabConflict")

function XUiEquipSuitPrefabConflict:OnAwake()
    self:AutoAddListener()
end

function XUiEquipSuitPrefabConflict:OnStart(conflictInfoList, confirmCb)
    self.ConflictInfoList = conflictInfoList
    self.ConfirmCb = confirmCb
    self:InitGrids()
end

function XUiEquipSuitPrefabConflict:InitGrids()
    self.GridSuitPrefabEquip.gameObject:SetActiveEx(false)
    for _, conflictInfo in pairs(self.ConflictInfoList) do
        local


\
    --ClusterId 251005746bc987bojjue8 \
    --GroupId 1
```

Output:
```
{
    "Response": {
        "List": [
            {
                "BlockHash": "0xb30403facf6f7a65150fadc00cdfe2d27d1b7b672b382175af26bcd52b552ef8",
                "BlockNumber": 1,
                "BlockTimestamp": "2019-10-04 10:17:28",
                "CreateTime": "2019-10-04 10:20:16",
                "ModifyTime": "2019-10-04 10:20:16",
                "Sealer": "8c4affffccda617e4e16274df0e550012e94f8dcf34b2e138313bd965d08215807a90766690f6a4606f180447601d433b77a7783cfcc43b20eea7b4b5cd31eb3",
                "SealerIndex": 2,
                "TransCount": 1
            },
            {
                "BlockHash": "0x6ae08948b5c0385a0393f688271291b5806edce462eb67a8382528a6d757e525",
                "BlockNumber": 0,
                "BlockTimestamp": "2019-10-03 22:31:52",
                "CreateTime": "2019-10-03 22:34:57",
                "ModifyTime": "2019-10-03 22:34:57",
                "Sealer": "388a58a628c3dbb2aba593c7dc557ac36d386e931f15049ad8c5a3b2ea253e3edf25ccc80ac3012b6b78534889255cee2ac6f9b2dac80b47f75b52be0e4e8bb3",
                "SealerIndex": 0,
                "TransCount": 0
            }
        ],
        "RequestId": "d124dbd0-b0e5-4762-9ca1-37a99bd63a0f",
        "TotalCount": 2
    }
}
```

**Example 1: 查询物模型定义**

Input:

```
tccli iotvideo DescribeIotModel --cli-unfold-argument  \
    --ProductId 12345678910 \
    --Revision 1
```

Output:
```
{
    "Response": {
        "RequestId": "2444e6d7-1e3b-4a0e-9be5-202c4afdd228",
        "Data": "{\"properties\":[{\"id\":\"_productInfo\",\"name\":\"产品信息\",\"mode\":\"r\",\"define\":{\"id\":\"_ProductInfo\",\"name\":\"产品信息\",\"type\":[{\"name\":\"产品型号\",\"id\":\"productModel\",\"type\":\"string32\"},{\"name\":\"产品ID\",\"id\":\"productID\",\"type\":\"string32\"},{\"name\":\"产品可选功能码\",\"id\":\"funcCode\",\"type\":\"uint32\"},{\"name\":\"物模型修订版本\",\"id\":\"revision\",\"type\":\"uint32\"},{\"name\":\"物模型修订时间\",\"id\":\"revisionUtc\",\"type\":\"uint32\"}]}},{\"id\":\"_versionInfo\",\"name\":\"固件信息\",\"mode\":\"r\",\"define\":{\"id\":\"_VersionInfo\",\"name\":\"固件信息\",\"type\":[{\"name\":\"SDK版本号\",\"id\":\"sdkVer\",\"type\":\"uint32\"},{\"name\":\"应用软件版本号\",\"id\":\"swVer\",\"type\":\"uint32\"},{\"name\":\"硬件版本号\",\"id\":\"hwVer\",\"type\":\"uint32\"}]}},{\"id\":\"_otaMode\",\"name\":\"OTA升级


Constraint_serialize)(void*,void*,void*);
void*(btGjkPairDetector_new)(const void*,const void*,void*,void*);
void(btSoftBody_RContact_setC4)(void*,float);
void(btTypedConstraint_internalSetAppliedImpulse)(void*,float);
void(btGeneric6DofConstraint_getAngularUpperLimit)(void*,void*);
void(btGjkPairDetector_getClosestPointsNonVirtual)(void*,const void*,void*,void*);
float(btCylinderShape_getRadius)(void*);
void*(btVoronoiSimplexSolver_getCachedBC)(void*);
void*(btCollisionWorld_LocalConvexResult_new)(const void*,void*,const void*,const void*,float);
bool(btCollisionWorld_ConvexResultCallbackWrapper_needsCollision)(void*,void*);
void*(btTypedConstraint_getRigidBodyB)(void*);
void(btStridingMeshInterface_getLockedReadOnlyVertexIndexBase)(void*,const unsigned char**,int*,int*,int*,const unsigned char**,int*,int*,int*,int);
void(btJointFeedback_setAppliedForceBodyA)(void*,const void*);
float(btTypedConstraint_getParam2)(void*,int,int);
void(btMultiBody_getLinkInertia)(void*,int,void*);
bool(btDispatcherInfo_getEnableSPU)(void*);
float(btTypedConstraint_getParam)(void*,int);
void(btMultiBodySolverConstraint_setLinkA)(void*,int);
void(btSoftBody_setTotalDensity)(void*,float);
void*(btSoftBody_Pose_getPos)(void*);
void*(btTypedConstraint_getJointFeedback)(void*);
bool*(btTranslationalLimitMotor_getEnableMotor)(void*);
void(btMultiBody_addJointTorqueMultiDof2)(void*,int,int,float);
void(btAABB_merge)(void*,const void*);
void*(btSoftBody_Tetra_getLeaf)(void*);
float(btSoftBody_Tetra_getRv)(void*);
float(btSoftBody_Material_getKLST)(void*);
void*(btConeShapeX_new)(float,float);
void(btRigidBody_getGravity)(void*,void*);
void(btTypedConstraint_getInfo2)(void*,void*);
void(btTypedConstraint_getInfo1)(void*,void*);
float(btRotationalLimitMotor_getMaxLimitForce)(void*);
void(btConstraintSetting_setImpulseClamp)(void*,float);
int(btTypedConstraint_getConstraintType)(void*);
void*(btSoftBody_sRayCast_getBody)(void*);
float(btTypedConstraint_getBreakingImpulseThreshold)(void*);
void(btMultiBody_setBaseVel)(void*,const void*);
float(btTypedConstraint_getAppliedImpulse)(void*);
void(btDbvt_sStkNN_delete)(void*);
int(btTypedConstraint_calculateSerializeBufferSize)(void*);
void(btConeShape_setRadius)(void*,float);
void(btTypedConstraint_buildJacobian)(void*);
void*(btCollisionObject_getBroadphaseHandle)(void*);
void(btTypedConstraint_btConstraintInfo2_delete)(void*);
void(btTypedConstraint_btConstraintInfo2_setUpperLimit)(void*,float*);
void*(btAlignedObjectArray_btIndexedMesh_at)(void*,int);
void*(btWorldImporter_createScaledTrangleMeshShape)(void*,void*,const void*);
void(btTypedConstraint_btConstraintInfo2_setNumIterations)(void*,int);
void(btTypedConstraint_btConstraintInfo2_setLowerLimit)(void*,float*);
bool(btCollisionShape_isSoftBody)(void*);
void(btConvexPointCloudShape_getScaledPoint)(void*,int,void*);
float(btMultiBodyConstraint_getMaxAppliedImpulse)(void*);
void(btTypedConstraint_btConstraintInfo2_setJ2linearAxis)(void*,float*);
void(btTypedConstraint_btConstraintInfo


就没有前途 c:34

我终于认识到，真正的正义不是惩罚，而是恢复，不一定是恢复原来面目，而是恢复本应该具有的状态。 c:66

达到如此平静的精神状态，绝非一般人之所为。我想他们该是某种圣人，不是那些被美化、被册封的圣徒，而是与他们在一起我们可以感到上帝就在身边的那种人，因为无论他们身处何处，都有上帝相伴。上帝不是他们的保镖，也不会像苏联坦克一样为他们开道。他的陪伴就如同女高音的纯净声音与妙曲相伴，如同露滴与玫瑰相依。 c:12

上帝相信我们。上帝依靠我们帮助他把这个世界变成他所希望的样子。 c:31

### 第八章 “我感到如重见光明一般”

我们最好还是夹起尾巴做人，而更为重要的是，我们要宽以待人，因为我们无论如何也不能完全了解他人的处境。 c:47

我们必须站起来维护善、真和爱，而不是向强权低头 c:18

只有心怀慈悲，才能放弃一个给自己带来如此多的特权、优惠和好处的制度。 c:42

据说计划中有一个项目，是要找到一种专门针对黑人的细菌，以降低黑人的生殖能力。 c:17

### 第九章 我为什么做这份吃力不讨好的工作？

我们的人性和其他人的缠绕在一起。我们之所以为人，是因为我们有所归属。我们为群体、为归属、为家庭而生，并生活在微妙的相互依存的网络中。 c:46

由于自我憎恨和自我蔑视作怪，受害者的内心形成极为负面的自我形象。这种形象侵蚀着自爱和自信，蚕食着他们的自我。这也是美国黑人相互残杀、自我毁灭的祸根。 c:47

抢先把自己的消息发出去实为上策，因为这样常常会削弱后续消息的力量。如果让人首先抓住把柄，不得不申辩解释，那就再狼狈不过了。一旦需要申辩，就等于已经输了这个回合。 c:30

《旧约》中说，一次，先知以利沙和仆人被一群敌人包围。先知出奇地镇静，泰然处之，而仆人却越来越不安。先知请上帝打开仆人的眼睛，于是他看到自己一边的人远远多于敌人 c:14

这几乎是我们正视各自的过去、


: &HashMap<LineNumber, HashSet<LineNumber>>,
) -> Vec<(Option<LineNumber>, Option<LineNumber>)> {
    let mut lines = before_lines.to_vec();
    lines.reverse();

    let mut prev_opposite: Option<LineNumber> = None;
    let mut res = vec![];

    for line in lines {
        let current_opposite: Option<LineNumber> = match prev_opposite {
            Some(prev_opposite) => {
                if prev_opposite.0 > 0 {
                    Some((prev_opposite.0 - 1).into())
                } else {
                    None
                }
            }
            None => match opposite_lines.get(&line) {
                Some(all_opposites) => {
                    let mut all_opposites: Vec<LineNumber> =
                        all_opposites.iter().copied().collect();
                    all_opposites.sort();

                    all_opposites.last().copied()
                }
                None => None,
            },
        };

        res.push((Some(line), current_opposite));
        if current_opposite.is_some() {
            prev_opposite = current_opposite;
        }
    }

    res.reverse();
    res
}

fn pad_before(ln: LineNumber) -> Vec<LineNumber> {
    let mut res = vec![];

    let mut current = ln;
    for _ in 0..MAX_PADDING {
        if current.0 == 0 {
            break;
        }

        current = (current.0 - 1).into();
        res.push(current);
    }

    res.reverse();
    res
}

fn pad_after(ln: LineNumber, max_line: LineNumber) -> Vec<LineNumber> {
    let mut res = vec![];

    let mut current = ln;
    for _ in 0..MAX_PADDING {
        if current == max_line {
            break;
        }

        current = (current.0 + 1).into();
        res.push(current);
    }

    res
}

fn flip_tuples<Tx: Copy, Ty: Copy>(items: &[(Tx, Ty)]) -> Vec<(Ty, Tx)> {
    items.iter().map(|(x, y)| (*y, *x)).collect()
}

/// Before:
/// 120    -- (novel)
/// 121    --
/// 122    --
///
/// After:
/// 120    90 (novel)
/// 121    --
/// 122    91 (closest match)
fn after_with_opposites(
    after_lines: &[LineNumber],
    opposite_lines: HashMap<LineNumber, HashSet<LineNumber>>,
    prev_max_opposite: Option<LineNumber>,
    max_opposite: LineNumber,
) -> Vec<(Option<LineNumber>, Option<LineNumber>)> {
    let mut prev_opposite: Option<LineNumber> = None;
    let mut res: Vec<(Option<LineNumber>, Option<LineNumber>)> = vec![];

    for line in after_lines {
        let current_opposite: Option<LineNumber> = match prev_opposite {
            Some(prev_opposite) => {
                if prev_opposite < max_opposite {
                    Some((prev_opposite.0 + 1).into())
                } else {
                    None
                }
            }
            None => match opposite_lines.get(line) {
                Some(all_opposites) => {
                    let mut all_opposites: Vec<LineNumber> =
                        all_opposites.iter().copied().collect();
                    all_opposites.sort();

                    if let Some(prev_max_opposite) = prev_max_opposite {
                        all_opposites = all_opposites
                            .into_iter()
                            .filter(|x| *x > prev_max_opposite)
                            .collect()
                    }

                    all_oppos


mand> {
    private String target;

    /**
     * Constructs a tag message command.
     *
     * @param client the client on which this command is executing
     * @throws IllegalArgumentException if null parameters
     */
    public TagMessageCommand(@NonNull Client client) {
        super(client);
    }

    /**
     * Sets the target of this message.
     *
     * @param target target
     * @return this command
     * @throws IllegalArgumentException if target is null or contains invalid characters
     */
    public @NonNull TagMessageCommand target(@NonNull String target) {
        this.target = Sanity.safeMessageCheck(target, "Target");
        return this;
    }

    public @NonNull TagMessageCommand target(@NonNull MessageReceiver target) {
        this.target = Sanity.nullCheck(target, "Target").getMessagingName();
        return this;
    }

    /**
     * Executes the command.
     *
     * @throws IllegalStateException if target or message is not defined
     */
    @Override
    public void execute() {
        if (this.target == null) {
            throw new IllegalStateException("Target not defined");
        }
        this.sendCommandLine("TAGMSG " + this.target);
    }

    @Override
    protected @NonNull ToStringer toStringer() {
        return super.toStringer().add("target", this.target);
    }
}
/*
 * * Copyright (C) 2013-2025 Matt Baxter https://kitteh.org
 *
 * 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.
 */
package org.kitteh.irc.client.library.feature;

import org.jspecify.annotations.NonNull;
import org.jspecify.annotations.NullMarked;
import org.jspecify.annotations.Nullable;
import org.kitteh.irc.client.library.util.Sanity;

import java.util.Locale;
import java.util.Optional;

/**
 * ISUPPORT CASEMAPPING.
 */
@NullMarked
public interface CaseMapping {
    record Ranged(char upperbound) implements CaseMapping {
        @Override
        public String toLowerCase(String input) {
            Sanity.nullCheck(input, "Input");
            char[] arr = input.toCharArray();
            for (int i = 0; i < arr.length; i++) {
                char c = arr[i];
                if ((c >= 'A') && (c <= this.upperbound)) {
                    arr[i] += (char) 32;
                }
            }
            return new String(arr);
        }
    }

    /**
     * A-Z become a-z
     */
    CaseMapping.Ranged ASCII = new CaseMapping.Ranged('Z');
    /**
     * A-Z become a-z, []^ become {}~
     */
    CaseMapping.Ranged RFC1459 = new CaseMapping.Ranged('^');
    /**
     * A-Z become a-z, [] become {}
     */
    CaseMapping.Ranged STRICT_RFC1459 = new CaseMapping.Ranged(']');

    default boolean areEqualIgnoringCase(String one,String two) {
        return this.toLowerCase(one).equals(this.toLowerCase(two));
    }

    /**


 const user = await User.findById(userId).select('-password')
  if (user) {
    res.json(user)
  } else {
    res.statusCode = 404
    throw new Error('User not found')
  }
}

async function updateUser(
  req: NextApiRequestWithUser,
  res: NextApiResponse<IUserWithId>
): Promise<void> {
  const userId = req.query.id
  console.info('update user', userId)

  const { name, email, isAdmin } = req.body
  await connectDB()

  const user = await User.findById(userId)

  if (!user) {
    res.statusCode = 404
    throw new Error('user not found')
  }

  if (email && user.email !== email) {
    const userExists = await User.findOne({ email })

    if (userExists) {
      res.statusCode = 400
      throw new Error('this email already exists')
    }
  }

  user.email = email ?? user.email
  user.name = name ?? user.name
  if (isAdmin !== undefined) {
    user.isAdmin = isAdmin
  }

  const updatedUser = await user.save()
  if (updatedUser) {
    res.statusCode = 200
    res.json({
      _id: updatedUser._id,
      name: updatedUser.name,
      email: updatedUser.email,
      isAdmin: updatedUser.isAdmin,
    })
  } else {
    res.statusCode = 400
    throw new Error('invalid user data')
  }
}
const handler = nc({ onError: onError })
  .get(protect, isAdmin, getUserById)
  .delete(protect, isAdmin, deleteUser)
  .put(protect, isAdmin, updateUser)
export default handler
import { TRow } from "../typings";

export function isValidRegex(v: string): boolean {
  try {
    RegExp(v);
    return true;
  } catch (e) {
    return false;
  }
}

export function jsonPathToPathKey(jsonPath: any[]) {
  const ret = [...jsonPath]
    .map(v => {
      if (typeof v === 'number') {
        return `[${v}]`;
      }
      return v;
    })
    .join('->');
  // console.log('jsonPath', jsonPath, ret);

  return ret;
}

export function isJsonPathsMatch(jsonPath: any[], diffConfigPath: any[]) {
  return jsonPathToPathKey(jsonPath) === jsonPathToPathKey(diffConfigPath);
}

export function pathKeyToJsonPath(pathKey: string): any[] {
  return pathKey.split('->').map(v => {
    const matchResults = v.match(/\[(\d+)\]/g);
    if (matchResults !== null) {
      return parseInt(matchResults[0].replace(/[[\]]/g, ''), 10);
    }
    return v;
  });
}

export function isRealObject(obj: any) {
  return typeof obj === 'object' && obj !== null;
}

export function iterateJSON(
  obj: any,
  jsonPath: any[],
  rows: TRow[],
  key: string | undefined = undefined,
  needComma = false,
) {
  // 对于大数的处理
  if (obj?._isBigNumber) {
    // 这是一个大整数
    rows.push({
      jsonPath: [...jsonPath],
      content: obj,
      key,
      needComma,
    });
    return;
  }

  if (Array.isArray(obj)) {
    rows.push({
      jsonPath: [...jsonPath],
      content: '[',
      key,
      special: true,
      specialOpen: true,
    });
    const sPairIndex = rows.length - 1;

    obj.forEach((v, i) =>
      iterateJSON(v, [...jsonPath, i], rows, undefined, i !== obj.length - 1),
    );

    rows.push({
      jsonPath: [...jsonPath],
      content:


facetQuery)
                || StringUtils.containsIgnoreCase(facetQuery, s.getLeft().getName()))
            .collect(Collectors.toMap(Pair::getLeft, Pair::getRight, (t1, t2) -> t1 == 0 ? t2 : t1));
    }

    @Override
    public Mono<Map<SearchFilterId, Long>> getOwnerFacetForDataEntity(final String facetQuery,
                                                                      final int page,
                                                                      final int size,
                                                                      final FacetStateDto state) {
        final var select = DSL.select(OWNER.ID, OWNER.NAME, countDistinct(SEARCH_ENTRYPOINT.DATA_ENTITY_ID))
            .from(OWNER)
            .leftJoin(OWNERSHIP).on(OWNERSHIP.OWNER_ID.eq(OWNER.ID))
            .leftJoin(SEARCH_ENTRYPOINT).on(SEARCH_ENTRYPOINT.DATA_ENTITY_ID.eq(OWNERSHIP.DATA_ENTITY_ID))
            .leftJoin(DATA_ENTITY).on(SEARCH_ENTRYPOINT.DATA_ENTITY_ID.eq(DATA_ENTITY.ID));

        final List<Condition> conditions = getDataEntityDefaultConditions();

        final Set<Long> dataSourceIds = state.getFacetEntitiesIds(FacetType.DATA_SOURCES);
        if (!dataSourceIds.isEmpty()) {
            select.join(DATA_SOURCE).on(DATA_SOURCE.ID.eq(DATA_ENTITY.DATA_SOURCE_ID));
            conditions.add(DATA_SOURCE.ID.in(dataSourceIds));
        }

        conditions.addAll(getQueryAndEntityClassConditions(state));
        if (StringUtils.isNotEmpty(facetQuery)) {
            conditions.add(OWNER.NAME.containsIgnoreCase(facetQuery));
        }
        conditions.add(OWNER.DELETED_AT.isNull());

        select
            .where(conditions)
            .groupBy(OWNER.ID, OWNER.NAME)
            .orderBy(countDistinct(SEARCH_ENTRYPOINT.DATA_ENTITY_ID).desc())
            .limit(size)
            .offset((page - 1) * size);
        return jooqReactiveOperations.flux(select)
            .collect(FACET_COLLECTOR);
    }

    @Override
    public Mono<Map<SearchFilterId, Long>> getTagFacetForDataEntity(final String facetQuery,
                                                                    final int page,
                                                                    final int size,
                                                                    final FacetStateDto state) {
        final var select = DSL.select(TAG.ID, TAG.NAME, countDistinct(SEARCH_ENTRYPOINT.DATA_ENTITY_ID))
            .from(TAG)
            .leftJoin(TAG_TO_DATA_ENTITY).on(TAG_TO_DATA_ENTITY.TAG_ID.eq(TAG.ID))
            .leftJoin(SEARCH_ENTRYPOINT).on(SEARCH_ENTRYPOINT.DATA_ENTITY_ID.eq(TAG_TO_DATA_ENTITY.DATA_ENTITY_ID))
            .leftJoin(DATA_ENTITY).on(SEARCH_ENTRYPOINT.DATA_ENTITY_ID.eq(DATA_ENTITY.ID));

        final List<Condition> conditions = getDataEntityDefaultConditions();

        final Set<Long> dataSourceIds = state.getFacetEntitiesIds(FacetType.DATA_SOURCES);
        if (!dataSourceIds.isEmpty()) {
            select.join(DATA_SOURCE).on(DATA_SOURCE.ID.eq(DATA_ENTITY.DATA_SOURCE_ID));
            conditions.add(DATA_SOURCE.ID.in(dataSourceIds));
        }

        conditions.addAll(getQueryAndEntityClassConditions(state));
        if (StringUtils.isNotEmpty(facetQuery)) {
            conditions.add(TAG.NAME.containsIgnoreCase(facetQuery));
        }
        conditions.add(TAG.DELETED_AT.isNull());

        select
            .where(


  expect(Period.differenceBetweenDates(dt1.calendarDate, dt1.calendarDate).hasDateComponent, isFalse);

  // Case 4: Period contains date and time units, and some date units are non-zero
  expect(Period.differenceBetweenDateTime(dt1, dt2).hasDateComponent, isTrue);

  // Case 5: Entire period is date-based, and some time units are non-zero
  expect(Period.differenceBetweenDates(dt1.calendarDate, dt2.calendarDate).hasDateComponent, isTrue);
}

@Test()
void ToString_Positive()
{
  Period period = const Period(days: 1) +  const Period(hours: 2);
  expect('P1DT2H', period.toString());
}

@Test()
void ToString_AllUnits()
{
  // Period({this.Years: 0, this.Months: 0, this.Weeks: 0, this.Days: 0,
  //    this.Hours: 0, this.Minutes: 0, this.Seconds: 0,
  //    this.Milliseconds: 0, this.Ticks: 0, this.Nanoseconds: 0});
  Period period = IPeriod.period(years: 1, months: 2, weeks: 3, days: 4,
      hours: 5, minutes: 6, seconds: 7, milliseconds: 8, microseconds: 9, nanoseconds: 10);
  expect('P1Y2M3W4DT5H6M7S8s9t10n', period.toString());
}

@Test()
void ToString_Negative()
{
  Period period = const Period(days: -1) + const Period(hours: -2);
  expect('P-1DT-2H', period.toString());
}

@Test()
void ToString_Mixed()
{
  Period period = const Period(days: -1) + const Period(hours: 2);
  expect('P-1DT2H', period.toString());
}

@Test()
void ToString_Zero()
{
  expect('P', Period.zero.toString());
}

@Test()
void ToBuilder_SingleUnit()
{
  var builder = const Period(hours: 5).toBuilder();
  var expected = (PeriodBuilder()..hours = 5).build();
  expect(expected, builder.build());
}

@Test()
void ToBuilder_MultipleUnits()
{
  var builder = (const Period(hours: 5) + const Period(weeks: 2)).toBuilder();
  var expected = (PeriodBuilder()..hours = 5..weeks = 2).build();
  expect(expected, builder.build());
}

@Test()
void Normalize_Weeks()
{
  var original = (PeriodBuilder()..weeks = 2..days = 5).build();
  var normalized = original.normalize();
  var expected = (PeriodBuilder()..days = 19).build();
  expect(expected, normalized);
}

@Test()
void Normalize_Hours()
{
  var original = (PeriodBuilder()..hours = 25..days = 1).build();
  var normalized = original.normalize();
  var expected = (PeriodBuilder()..hours = 1..days = 2).build();
  expect(expected, normalized);
}

@Test()
void Normalize_Minutes()
{
  var original = (PeriodBuilder()..hours = 1..minutes = 150).build();
  var normalized = original.normalize();
  var expected = (PeriodBuilder()..hours = 3..minutes = 30).build();
  expect(expected, normalized);
}

@Test()
void Normalize_Seconds()
{
  var original = (PeriodBuilder()..minutes = 1..seconds= 150).build();
  var normalized = original.normalize();
  var expected = (PeriodBuilder()..minutes = 3..seconds= 30).build();
  expect(expected, normalized);
}

@Test()
void Normalize_Milliseconds()
{
  var original = (PeriodBuilder()..seconds = 1..milliseconds = 1500).build();
  var normalized = original.normalize();
  var expected = (PeriodBuilder()..seconds = 2..milliseconds = 500).build();
  expect(expected, normalized);
}

@Test()
void Normalize_Microseconds()
{
  var original = (PeriodBuilder()..milliseconds = 1..microse


he bottom bordering row */
    for (cnt = 0; cnt < sizeX; cnt++) {
        connectTile(xMap + cnt, yMap + sizeY, CONNECT_TILE_FIX, effects);
    }

    /* this will do the right bordering row */
    for (cnt = 0; cnt < sizeY; cnt++) {
        connectTile(xMap + sizeX, yMap + cnt, CONNECT_TILE_FIX, effects);
    }
}

/**
 * Put down a building, starting at (\a leftX, \a topY) with size
 * (\a sizeX, \a sizeY).
 * @param leftX    Position of left column of tiles of the building.
 * @param topY     Position of top row of tiles of the building.
 * @param sizeX    Horizontal size of the building.
 * @param sizeY    Vertical size of the building.
 * @param baseTile Tile value to use at the top-left position. Tiles are laid
 *                 in column major mode.
 * @param aniFlag  Set animation flag at relative position (1, 2)
 * @param effects  Storage of the effects.
 *
 * @pre All tiles are within world boundaries.
 *
 * @todo We should ask the buildings themselves how they should be drawn.
 */
void Micropolis::putBuilding(int leftX, int topY, int sizeX, int sizeY,
                             MapTile baseTile, bool aniFlag,
                             ToolEffects *effects)
{
    for (int dy = 0; dy < sizeY; dy++) {
        int posY = topY + dy;

        for (int dx = 0; dx < sizeX; dx++) {
            int posX = leftX + dx;

            MapValue tileValue = baseTile | BNCNBIT;
            if (dx == 1) {
                if (dy == 1) {
                    tileValue |= ZONEBIT;
                } else if (dy == 2 && aniFlag) {
                    tileValue |= ANIMBIT;
                }
            }

            effects->setMapValue(posX, posY, tileValue);

            baseTile++;
        }
    }
}

/**
 * Prepare the site where a building is about to be put down.
 *
 * This function performs some basic sanity checks, and implements the
 * auto-bulldoze functionality to prepare the site.
 * All effects are stored in the \a effects object.
 *
 * @param leftX    Position of left column of tiles of the building.
 * @param topY     Position of top row of tiles of the building.
 * @param sizeX    Horizontal size of the building.
 * @param sizeY    Vertical size of the building.
 * @param effects  Storage of effects of preparing the site.
 * @return: Result of preparation.
 */
ToolResult Micropolis::prepareBuildingSite(int leftX, int topY,
                                           int sizeX, int sizeY,
                                           ToolEffects *effects)
{
    // Check that the entire site is on the map
    if (leftX < 0 || leftX + sizeX > WORLD_W) {
        return TOOLRESULT_FAILED;
    }
    if (topY < 0 || topY + sizeY > WORLD_H) {
        return TOOLRESULT_FAILED;
    }

    // Check whether the tiles are clear
    for (int dy = 0; dy < sizeY; dy++) {
        int posY = topY + dy;

        for (int dx = 0; dx < sizeX; dx++) {
            int posX = leftX + dx;

            unsigned short tileValue = effects->getMapTile(posX, posY);

            if (tileValue == DIRT) { // DIRT tile is buidable
                continue;
            }

            if (!autoBulldoze) {
                // No DIRT and no bull-dozer => not buildable
                return TOOLRESULT_NEED_B


DECLARE_YCgCo_TO_PX_HWY(RGB, 8, YCgCo422)

DECLARE_YCgCo_TO_PX_HWY(RGBA, 8, YCgCo444)
DECLARE_YCgCo_TO_PX_HWY(RGB, 8, YCgCo444)

#if SPARKYUV_FULL_CHANNELS
DECLARE_YCgCo_TO_PX_HWY(BGRA, 10, YCgCo444)
DECLARE_YCgCo_TO_PX_HWY(ABGR, 10, YCgCo444)
DECLARE_YCgCo_TO_PX_HWY(ARGB, 10, YCgCo444)
DECLARE_YCgCo_TO_PX_HWY(BGR, 10, YCgCo444)
DECLARE_YCgCo_TO_PX_HWY(BGRA, 10, YCgCo422)
DECLARE_YCgCo_TO_PX_HWY(ABGR, 10, YCgCo422)
DECLARE_YCgCo_TO_PX_HWY(ARGB, 10, YCgCo422)
DECLARE_YCgCo_TO_PX_HWY(BGR, 10, YCgCo422)
DECLARE_YCgCo_TO_PX_HWY(BGRA, 10, YCgCo420)
DECLARE_YCgCo_TO_PX_HWY(ABGR, 10, YCgCo420)
DECLARE_YCgCo_TO_PX_HWY(ARGB, 10, YCgCo420)
DECLARE_YCgCo_TO_PX_HWY(BGR, 10, YCgCo420)
#endif

#if SPARKYUV_FULL_CHANNELS
DECLARE_YCgCo_TO_PX_HWY(BGRA, 8, YCgCo444)
DECLARE_YCgCo_TO_PX_HWY(ABGR, 8, YCgCo444)
DECLARE_YCgCo_TO_PX_HWY(ARGB, 8, YCgCo444)
DECLARE_YCgCo_TO_PX_HWY(BGR, 8, YCgCo444)
DECLARE_YCgCo_TO_PX_HWY(BGRA, 8, YCgCo422)
DECLARE_YCgCo_TO_PX_HWY(ABGR, 8, YCgCo422)
DECLARE_YCgCo_TO_PX_HWY(ARGB, 8, YCgCo422)
DECLARE_YCgCo_TO_PX_HWY(BGR, 8, YCgCo422)
DECLARE_YCgCo_TO_PX_HWY(BGRA, 8, YCgCo420)
DECLARE_YCgCo_TO_PX_HWY(ABGR, 8, YCgCo420)
DECLARE_YCgCo_TO_PX_HWY(ARGB, 8, YCgCo420)
DECLARE_YCgCo_TO_PX_HWY(BGR, 8, YCgCo420)
#endif

#if SPARKYUV_FULL_CHANNELS
DECLARE_YCgCo_TO_PX_HWY(BGRA, 12, YCgCo444)
DECLARE_YCgCo_TO_PX_HWY(ABGR, 12, YCgCo444)
DECLARE_YCgCo_TO_PX_HWY(ARGB, 12, YCgCo444)
DECLARE_YCgCo_TO_PX_HWY(BGR, 12, YCgCo444)
DECLARE_YCgCo_TO_PX_HWY(BGRA, 12, YCgCo422)
DECLARE_YCgCo_TO_PX_HWY(ABGR, 12, YCgCo422)
DECLARE_YCgCo_TO_PX_HWY(ARGB, 12, YCgCo422)
DECLARE_YCgCo_TO_PX_HWY(BGR, 12, YCgCo422)
DECLARE_YCgCo_TO_PX_HWY(BGRA, 12, YCgCo420)
DECLARE_YCgCo_TO_PX_HWY(ABGR, 12, YCgCo420)
DECLARE_YCgCo_TO_PX_HWY(ARGB, 12, YCgCo420)
DECLARE_YCgCo_TO_PX_HWY(BGR, 12, YCgCo420)
#endif

#undef DECLARE_YCgCo_TO_PX_HWY

#define YCgCo_TO_PX_DECLARATION_E(T, pixel, bit, yuv) \
    void yuv##P


_base_paddr[num_scatter_bufs-1])
								>> 32)) |
		HAL_SM(HWIO_WBM_R0_SCATTERED_LINK_DESC_PTR_HEAD_INFO_IX1,
		HEAD_POINTER_OFFSET, last_buf_end_offset >> 2));

	HAL_REG_WRITE(soc,
		HWIO_WBM_R0_SCATTERED_LINK_DESC_PTR_HEAD_INFO_IX0_ADDR(
		SEQ_WCSS_UMAC_WBM_REG_OFFSET),
		scatter_bufs_base_paddr[0] & 0xffffffff);

	HAL_REG_WRITE(soc,
		HWIO_WBM_R0_SCATTERED_LINK_DESC_PTR_TAIL_INFO_IX0_ADDR(
		SEQ_WCSS_UMAC_WBM_REG_OFFSET),
		scatter_bufs_base_paddr[0] & 0xffffffff);
	HAL_REG_WRITE(soc,
		HWIO_WBM_R0_SCATTERED_LINK_DESC_PTR_TAIL_INFO_IX1_ADDR(
		SEQ_WCSS_UMAC_WBM_REG_OFFSET),
		HAL_SM(HWIO_WBM_R0_SCATTERED_LINK_DESC_PTR_TAIL_INFO_IX1,
		BUFFER_ADDRESS_39_32,
		((uint64_t)(scatter_bufs_base_paddr[0]) >>
		32)) | HAL_SM(HWIO_WBM_R0_SCATTERED_LINK_DESC_PTR_TAIL_INFO_IX1,
		TAIL_POINTER_OFFSET, 0));

	HAL_REG_WRITE(soc,
		HWIO_WBM_R0_SCATTERED_LINK_DESC_PTR_HP_ADDR(
		SEQ_WCSS_UMAC_WBM_REG_OFFSET),
		2*num_entries);

	/* Set RING_ID_DISABLE */
	val = HAL_SM(HWIO_WBM_R0_WBM_IDLE_LINK_RING_MISC, RING_ID_DISABLE, 1);

	/*
	 * SRNG_ENABLE bit is not available in HWK v1 (QCA8074v1). Hence
	 * check the presence of the bit before toggling it.
	 */
#ifdef HWIO_WBM_R0_WBM_IDLE_LINK_RING_MISC_SRNG_ENABLE_BMSK
	val |= HAL_SM(HWIO_WBM_R0_WBM_IDLE_LINK_RING_MISC, SRNG_ENABLE, 1);
#endif
	HAL_REG_WRITE(soc,
		      HWIO_WBM_R0_WBM_IDLE_LINK_RING_MISC_ADDR(SEQ_WCSS_UMAC_WBM_REG_OFFSET),
		      val);
}


import functools
import uuid

from domain.exceptions.UserWithNoInfosException import UserWithNoInfosException
from domain.models.session import Session
from infrastructure.repositories.administradores_repository import AdministradoresRepository
from infrastructure.repositories.user_identity_repository import UserIdentityRepository

class SessionController:
    session: Session | None = None
    def __init__(self):
        self.__session_repository = UserIdentityRepository()
        pass

    def get_new_session(self, id) -> None:
        user_identity_infos = self.__session_repository.get_user_identity_by_id(id)

        role = self.__session_repository.check_user_table(id)

        if role == None:
            raise UserWithNoInfosException()

        is_root = False
        is_admin = False

        if role == "Administrador":
            is_admin = True
            is_root = AdministradoresRepository().is_root(id)

        SessionController.session = Session(user_id=id,
                                    user_email=user_identity_infos.email,
                                    user_role=role,
                                    is_root=is_root,
                                    is_admin=is_admin,
                                    is_valid=True,
                                    session_id=uuid.uuid4())

    def autheticate(self, email, password):
        return self.__session_repository.get_user_identity_by_login_infos(email, password)

    def get_current_user(self):
        return SessionController.session

    def inject_session_data(func):
        @functools.wraps(func)
        def wrapper(*args, **kwargs):
            kwargs['session'] = SessionController.session

            result = func(*args, **kwargs)

            return result

        return wrapper


sessi(a5)
	beq.b	.return
	jsr	sulje_info
	move.b	oli_infoa(a5),d0
	st	oli_infoa(a5)
	push	d0
	jsr	start_info
	pop	d0
	move.b	d0,oli_infoa(a5)
.return
	moveq	#1,d0
	rts
;;	bra	returnmsg

.noewp
	move.l	d7,d0
	rts

.closeAndReopenWindow
	* Is a window open? If not, just open
	tst.b	win(a5)
	beq.b	.av2
	* Window was open. Small or big?
	tst.b	kokolippu(a5)
	bne.b	.iso2
	* Small, close
	bsr	sulje_ikkuna
	clr.b	win(a5)
.av2
	* Just open, a different method?
	bsr.b	openw
	bne.b	.error
	rts
.iso2
	* This closes and reopens the window
	bsr	avaa_ikkuna2
	bne.b	.error
.bar2

	rts

.error
	moveq	#-1,d0
	rts

openw:
	tst.b	win(a5)
	bne.b	.x
	st	win(a5)
	clr.b	kokolippu(a5)		* pieni -> iso
	bsr	avaa_ikkuna
	bne.b	.x
	jsr	whatgadgets2
	moveq	#0,d0
.x	rts

plx1	equr	d4
ply1	equr	d5
plx2	equr	d6
ply2	equr	d7

*** Painettiin Zoom-gadgettia

*** Pivitetn ikkunan sislt

zipwindow:
	DPRINT	"ZipWindow refresh"
	tst.b	win(a5)
	bne.b	.onw
	rts
.onw
	pushm	all
	move.l	windowbase(a5),a0
	move	wd_Height(a0),d0
 if DEBUG
 	ext.l	d0
 	moveq	#0,d1
 	move	windowZippedSize+2(a5),d1
	DPRINT	"height=%ld zipped=%ld"
 endif
    DPRINTBYTE "=== prev kokolippu=%ld",kokolippu(a5)

	cmp	windowZippedSize+2(a5),d0
	bne.b	.biggified

	* Zipped to small size
	tst.b	kokolippu(a5)
	beq.b	.x * Safety: already small?
	clr.b	kokolippu(a5)
	* Store zipped position
	move.l	4(a0),windowZippedPos(a5)
** pieni ikkuna!
	;move.l	windowbase(a5),a0
	lea	gadgets,a1
	moveq	#-1,d0
	moveq	#-1,d1
	sub.l	a2,a2
	lore	Intui,RemoveGList

    jsr     switchToNormalLayoutNoRefresh
	DPRINT	"small"

	bra.b	.x

.biggified
	tst.b	kokolippu(a5)
	bne.b	.x * Already big?
	st	kokolippu(a5)
	DPRINT	"big"
	* Store window position
	move.l	4(a0),windowpos(a5)
	bsr	wrender

.x
    DPRINTBYTE "=== new kokolippu=%ld",kokolippu(a5)

    popm	all
	rts

* Close and reopen window
avaa_ikkuna2:
	bsr	sulje_ikkuna
	not.b	kokolippu(a5)

* Open window
avaa_ikkuna:
	DPRINT	"Open window"
	bsr	getscreeninfo
	bne	.opener

	tst		infoBoxOrigTopEdge


    *	Get the index number for the primary key index on this catalog.
     *
     *	@return	a 0-based number
     *
     */
    public	int	getPrimaryKeyIndexNumber() {
        return SYSCOLUMNS_INDEX1_ID;
    }

    /**
     * Builds a list of columns suitable for creating this Catalog.
     *
     *
     * @return array of SystemColumn suitable for making this catalog.
     */
    public SystemColumn[]	buildColumnList() throws StandardException {

        return new SystemColumn[] {
                SystemColumnImpl.getUUIDColumn("REFERENCEID", false),
                SystemColumnImpl.getIdentifierColumn("COLUMNNAME", false),
                SystemColumnImpl.getColumn("COLUMNNUMBER", Types.INTEGER, false),
                SystemColumnImpl.getColumn("STORAGENUMBER", Types.INTEGER, false),
                SystemColumnImpl.getJavaColumn("COLUMNDATATYPE",
                        "com.splicemachine.db.catalog.TypeDescriptor", false),
                SystemColumnImpl.getJavaColumn("COLUMNDEFAULT",
                        "java.io.Serializable", true),
                SystemColumnImpl.getUUIDColumn("COLUMNDEFAULTID", true),
                SystemColumnImpl.getColumn("AUTOINCREMENTVALUE", Types.BIGINT, true),
                SystemColumnImpl.getColumn("AUTOINCREMENTSTART", Types.BIGINT, true),
                SystemColumnImpl.getColumn("AUTOINCREMENTINC", Types.BIGINT, true),
                SystemColumnImpl.getColumn("COLLECTSTATS", Types.BOOLEAN, true),
                SystemColumnImpl.getColumn("PARTITIONPOSITION", Types.INTEGER, true),
                SystemColumnImpl.getColumn("USEEXTRAPOLATION", Types.TINYINT, true)
        };
    }

    public List<ColumnDescriptor[]> getViewColumns(TableDescriptor view, UUID viewId) throws StandardException {
        List<ColumnDescriptor[]> cdsl = new ArrayList<>();
        cdsl.add(
            new ColumnDescriptor[]{
                new ColumnDescriptor("REFERENCEID",1,1,DataTypeDescriptor.getBuiltInDataTypeDescriptor(Types.CHAR, false, 36),
                        null,null,view,viewId,0,0,0),
                new ColumnDescriptor("COLUMNNAME"               ,2,2,
                        DataTypeDescriptor.getBuiltInDataTypeDescriptor(Types.VARCHAR, false, 128),
                        null,null,view,viewId,0,0,0),
                new ColumnDescriptor("COLUMNNUMBER"               ,3,3,
                        DataTypeDescriptor.getBuiltInDataTypeDescriptor(Types.INTEGER, false),
                        null,null,view,viewId,0,0,0),
                new ColumnDescriptor("STORAGENUMBER"               ,4,4,
                        DataTypeDescriptor.getBuiltInDataTypeDescriptor(Types.INTEGER, false),
                        null,null,view,viewId,0,0,0),
                new ColumnDescriptor("COLUMNDATATYPE"               ,5,5,
                        DataTypeDescriptor.getBuiltInDataTypeDescriptor(Types.VARCHAR, false, 128),
                        null,null,view,viewId,0,0,0),
                new ColumnDescriptor("COLUMNDEFAULT"               ,6,6,
                        DataTypeDescriptor.getBuiltInDataTypeDescriptor(Types.LONGVARCHAR, true),
                        null,null,view,viewId,0,0,0),
                new ColumnDescriptor("COLUMNDEFAULTID"               ,7,7,
                        DataTypeDescriptor.getBuiltInDataTypeDescriptor(Types.CHAR, false, 36),
                        null,null,view,viewId,0,0,0),
                new ColumnDescriptor("AUTOINCREMENTVALUE"               ,8,8,
                        DataTypeDescriptor.getBuiltInDataTypeDescriptor(Types.BIGINT, true),
                        null,null,view,viewId,0,0,0),
                new ColumnDescriptor("AUTOINCREMENTSTART"               ,9,9,
                        DataTypeDescriptor.getBuiltInDataType


inder, findsOneWidget);
    expect(header01Finder, findsNothing);
    expect(header02Finder, findsNothing);
    expect(stickyHeaderController.stickyHeaderScrollOffset, equals(0));

    // We scroll just after the Header #1 so that it is visible.
    await gesture.moveBy(Offset(0, 80));
    await tester.pump();

    expect(header00Finder, findsOneWidget);
    expect(header01Finder, findsOneWidget);
    expect(header02Finder, findsNothing);
    expect(stickyHeaderController.stickyHeaderScrollOffset, equals(0));

    // We scroll in a way that Headers 0 and 1 are side by side.
    await gesture.moveBy(Offset(0, 640));
    await tester.pump();

    expect(header00Finder, findsOneWidget);
    expect(header01Finder, findsOneWidget);
    expect(header02Finder, findsNothing);
    expect(stickyHeaderController.stickyHeaderScrollOffset, equals(0));

    // We scroll in a way that Header #1 is at the top of the screen.
    await gesture.moveBy(Offset(0, 80));
    await tester.pump();

    expect(header00Finder, findsNothing);
    expect(header01Finder, findsOneWidget);
    expect(header02Finder, findsNothing);
    expect(stickyHeaderController.stickyHeaderScrollOffset, equals(880));

    // We scroll in a way that Header #1 is no longer visible.
    await gesture.moveBy(Offset(0, 80));
    await tester.pump();

    expect(header00Finder, findsNothing);
    expect(header01Finder, findsOneWidget);
    expect(header02Finder, findsNothing);
    expect(stickyHeaderController.stickyHeaderScrollOffset, equals(880));
  });
}

class _Header extends StatelessWidget {
  const _Header({
    Key? key,
    required this.index,
  }) : super(key: key);

  final int index;

  @override
  Widget build(BuildContext context) {
    return Container(
      color: Colors.blue,
      child: Text('Header #$index'),
      height: 80,
    );
  }
}

class _Sliver extends StatelessWidget {
  const _Sliver({
    Key? key,
  }) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return SliverList(
      delegate: SliverChildBuilderDelegate(
        (context, i) => const _SliverItem(),
        childCount: 20,
      ),
    );
  }
}

class _SliverItem extends StatelessWidget {
  const _SliverItem({
    Key? key,
  }) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return SizedBox(height: 40);
  }
}
import 'package:flutter/material.dart';
import 'package:flutter_sticky_header/flutter_sticky_header.dart';

import '../common.dart';

class MixSliversExample extends StatelessWidget {
  const MixSliversExample({
    Key? key,
  }) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return AppScaffold(
      title: 'List Example',
      slivers: [
        SliverAppBar(
          backgroundColor: Colors.orange,
          title: Text('SliverAppBar'),
          automaticallyImplyLeading: false,
          pinned: true,
        ),
        SliverToBoxAdapter(
          child: Container(
            height: 50,
            color: Colors.red,
          ),
        ),
        _StickyHeaderList(index: 0),
        _StickyHeaderList(index: 1),
        _StickyHeaderList(index: 2),
        _StickyHeaderList(ind


 toute-puissante",
  [38549] = "Rubis orné brillant",
  [38550] = "Pierre d\'aube ornée lisse",
  [38576] = "Grand ours de bataille",
  [38577] = "E.N.G.I.N. festif",
  [38578] = "The Flag of Ownership",
  [38579] = "Venomous Tome",
  [38582] = "Unk Item #258 - Miscellaneous - Other (Summon Disco Ball)",
  [38587] = "Bock de la fête des Brasseurs vide",
  [38626] = "Bouteille de bière vide",
  [38628] = "Frai du Néant",
  [39149] = "\"Fred\"",
  [39476] = "Houblon gobelin frais de la fête des Brasseurs",
  [39477] = "Houblon nain frais de la fête des Brasseurs",
  [39656] = "Garde de Tyraël",
}


a1
	rts

	cnop	0,4

c2p_data
c2p_screen dc.l	0
c2p_scroffs dc.l 0
c2p_pixels dc.l 0
	ds.l	16


le dtl = MaterialManage.GetMaterial(MaterialGuid);
            if (dtl.Rows.Count > 0)
            {
                txtMaterialName.Text = dtl.Rows[0]["MaterialName"].ToString();
                txtBarNo.Text = dtl.Rows[0]["BarNo"].ToString();
                txtSpec.Text = dtl.Rows[0]["Spec"].ToString();
                txtUnit.Text = dtl.Rows[0]["Unit"].ToString();
            }

            BillManage BillManage = new BillManage();
             dtl = BillManage.sp_GetMaterialSumByDepot(MaterialGuid);
            this.gridControl2.DataSource = dtl;

            this.Show(ifrm);
        }

        private void exit_Click(object sender, EventArgs e)
        {
            this.Close();
        }
    }
}


"rpoplpush")),
		)
		mustDo(t, c,
			"RPOPLPUSH", "too", "many", "arguments",
			proto.Error(errWrongNumber("rpoplpush")),
		)

		s.Set("str", "string!")
		mustDo(t, c,
			"RPOPLPUSH", "str", "src",
			proto.Error(msgWrongType),
		)
		mustDo(t, c,
			"RPOPLPUSH", "src", "str",
			proto.Error(msgWrongType),
		)
	})
}*/

func TestRpushx(t *testing.T) {
	server.Clear()
	c, err := proto.Dial(server.Addr())
	ok(t, err)
	defer c.Close()
	s := server.Direct()
	// Simple cases
	{
		// No key key
		must0(t, c,
			"RPUSHX", "l", "value",
		)
		assert(t, !s.Exists("l"), "l doesn't exist")

		s.Push("l", "aap", "noot")
		mustDo(t, c,
			"RPUSHX", "l", "mies",
			proto.Int(3),
		)

		s.CheckList(t, "l", "aap", "noot", "mies")
	}

	// Push more.
	{
		must1(t, c,
			"LPUSH", "l2", "aap1",
		)
		mustDo(t, c,
			"RPUSHX", "l2", "aap2", "noot2", "mies2",
			proto.Int(4),
		)

		mustDo(t, c,
			"LRANGE", "l2", "0", "0",
			proto.Strings("aap1"),
		)

		mustDo(t, c,
			"LRANGE", "l2", "-1", "-1",
			proto.Strings("mies2"),
		)
	}

	t.Run("errors", func(t *testing.T) {
		s.Push("src", "aap", "noot", "mies")
		mustDo(t, c,
			"RPUSHX",
			proto.Error(errWrongNumber("rpushx")),
		)
		mustDo(t, c,
			"RPUSHX", "l",
			proto.Error(errWrongNumber("rpushx")),
		)
		s.Set("str", "string!")
		mustDo(t, c,
			"RPUSHX", "str", "value",
			proto.Error(msgWrongType),
		)
	})
}

/*
func TestBrpop(t *testing.T) {
	server.Clear()
	c, err := proto.Dial(server.Addr())
	ok(t, err)
	defer c.Close()
	s := server.Direct()
	// Simple cases
	{
		s.Push("ll", "aap", "noot", "mies")
		mustDo(t, c,
			"BRPOP", "ll", "1",
			proto.Strings("ll", "mies"),
		)
	}

	t.Run("errors", func(t *testing.T) {
		mustDo(t, c,
			"BRPOP",
			proto.Error(errWrongNumber("brpop")),
		)
		mustDo(t, c,
			"BRPOP", "key",
			proto.Error(errWrongNumber("brpop")),
		)
		mustDo(t, c,
			"BRPOP", "key", "-1",
			proto.Error("ERR timeout is negative"),
		)
		mustDo(t, c,
			"BRPOP", "key", "inf",
			proto.Error("ERR timeout is not a float or out of range"),
		)
	})
}

func TestBrpopSimple(t *testing.T) {
	server.Clear()
	c, err := proto.Dial(server.Addr())
	ok(


vnode->minor = minor;

	media_interface_init(mdev, &devnode->intf, MEDIA_GRAPH_INTF_DEVNODE,
			     type, flags);

	return devnode;
}
EXPORT_SYMBOL_GPL(media_devnode_create);

void media_devnode_remove(struct media_intf_devnode *devnode)
{
	media_remove_intf_links(&devnode->intf);
	media_gobj_destroy(&devnode->intf.graph_obj);
	kfree(devnode);
}
EXPORT_SYMBOL_GPL(media_devnode_remove);

struct media_link *media_create_intf_link(struct media_entity *entity,
					    struct media_interface *intf,
					    u32 flags)
{
	struct media_link *link;

	link = media_add_link(&intf->links);
	if (link == NULL)
		return NULL;

	link->intf = intf;
	link->entity = entity;
	link->flags = flags | MEDIA_LNK_FL_INTERFACE_LINK;

	/* Initialize graph object embedded at the new link */
	media_gobj_create(intf->graph_obj.mdev, MEDIA_GRAPH_LINK,
			&link->graph_obj);

	return link;
}
EXPORT_SYMBOL_GPL(media_create_intf_link);

void __media_remove_intf_link(struct media_link *link)
{
	list_del(&link->list);
	media_gobj_destroy(&link->graph_obj);
	kfree(link);
}
EXPORT_SYMBOL_GPL(__media_remove_intf_link);

void media_remove_intf_link(struct media_link *link)
{
	struct media_device *mdev = link->graph_obj.mdev;

	/* Do nothing if the intf is not registered. */
	if (mdev == NULL)
		return;

	mutex_lock(&mdev->graph_mutex);
	__media_remove_intf_link(link);
	mutex_unlock(&mdev->graph_mutex);
}
EXPORT_SYMBOL_GPL(media_remove_intf_link);

void __media_remove_intf_links(struct media_interface *intf)
{
	struct media_link *link, *tmp;

	list_for_each_entry_safe(link, tmp, &intf->links, list)
		__media_remove_intf_link(link);

}
EXPORT_SYMBOL_GPL(__media_remove_intf_links);

void media_remove_intf_links(struct media_interface *intf)
{
	struct media_device *mdev = intf->graph_obj.mdev;

	/* Do nothing if the intf is not registered. */
	if (mdev == NULL)
		return;

	mutex_lock(&mdev->graph_mutex);
	__media_remove_intf_links(intf);
	mutex_unlock(&mdev->graph_mutex);
}
EXPORT_SYMBOL_GPL(media_remove_intf_links);


  {
    b1 = Edge1.Bot.X - Edge1.Bot.Y * Edge1.Dx;
    b2 = Edge2.Bot.X - Edge2.Bot.Y * Edge2.Dx;
    double q = (b2-b1) / (Edge1.Dx - Edge2.Dx);
    ip.Y = Round(q);
    if (std::fabs(Edge1.Dx) < std::fabs(Edge2.Dx))
      ip.X = Round(Edge1.Dx * q + b1);
    else
      ip.X = Round(Edge2.Dx * q + b2);
  }

  if (ip.Y < Edge1.Top.Y || ip.Y < Edge2.Top.Y)
  {
    if (Edge1.Top.Y > Edge2.Top.Y)
      ip.Y = Edge1.Top.Y;
    else
      ip.Y = Edge2.Top.Y;
    if (std::fabs(Edge1.Dx) < std::fabs(Edge2.Dx))
      ip.X = TopX(Edge1, ip.Y);
    else
      ip.X = TopX(Edge2, ip.Y);
  }
  //finally, don't allow 'ip' to be BELOW curr.Y (ie bottom of scanbeam) ...
  if (ip.Y > Edge1.Curr.Y)
  {
    ip.Y = Edge1.Curr.Y;
    //use the more vertical edge to derive X ...
    if (std::fabs(Edge1.Dx) > std::fabs(Edge2.Dx))
      ip.X = TopX(Edge2, ip.Y); else
      ip.X = TopX(Edge1, ip.Y);
  }
}
//------------------------------------------------------------------------------

void ReversePolyPtLinks(OutPt *pp)
{
  if (!pp) return;
  OutPt *pp1, *pp2;
  pp1 = pp;
  do {
  pp2 = pp1->Next;
  pp1->Next = pp1->Prev;
  pp1->Prev = pp2;
  pp1 = pp2;
  } while( pp1 != pp );
}
//------------------------------------------------------------------------------

void DisposeOutPts(OutPt*& pp)
{
  if (pp == 0) return;
    pp->Prev->Next = 0;
  while( pp )
  {
    OutPt *tmpPp = pp;
    pp = pp->Next;
    delete tmpPp;
  }
}
//------------------------------------------------------------------------------

inline void InitEdge(TEdge* e, TEdge* eNext, TEdge* ePrev, const IntPoint& Pt)
{
  std::memset(e, 0, sizeof(TEdge));
  e->Next = eNext;
  e->Prev = ePrev;
  e->Curr = Pt;
  e->OutIdx = Unassigned;
}
//------------------------------------------------------------------------------

void InitEdge2(TEdge& e, PolyType Pt)
{
  if (e.Curr.Y >= e.Next->Curr.Y)
  {
    e.Bot = e.Curr;
    e.Top = e.Next->Curr;
  } else
  {
    e.Top = e.Curr;
    e.Bot = e.Next->Curr;
  }
  SetDx(e);
  e.PolyTyp = Pt;
}
//------------------------------------------------------------------------------

TEdge* RemoveEdge(TEdge* e)
{
  //removes e from double_linked_list (but without removing from memory)
  e->Prev->Next = e->Next;
  e->Next->Prev = e->Prev;
  TEdge* result = e->Next;
  e->Prev = 0; //flag as removed (see ClipperBase.Clear)
  return result;
}
//------------------------------------------------------------------------------

inline void ReverseHorizontal(TEdge &e)
{
  //swap hori


er-radius:2px;box-shadow:1px 1px 3px rgba(0,0,0,.2);background-color:#000;color:#fff}.layui-layer-tips .layui-layer-close{right:-2px;top:-1px}.layui-layer-tips i.layui-layer-TipsG{position:absolute;width:0;height:0;border-width:8px;border-color:transparent;border-style:dashed;*overflow:hidden}.layui-layer-tips i.layui-layer-TipsB,.layui-layer-tips i.layui-layer-TipsT{left:5px;border-right-style:solid;border-right-color:#000}.layui-layer-tips i.layui-layer-TipsT{bottom:-8px}.layui-layer-tips i.layui-layer-TipsB{top:-8px}.layui-layer-tips i.layui-layer-TipsL,.layui-layer-tips i.layui-layer-TipsR{top:5px;border-bottom-style:solid;border-bottom-color:#000}.layui-layer-tips i.layui-layer-TipsR{left:-8px}.layui-layer-tips i.layui-layer-TipsL{right:-8px}.layui-layer-lan[type=dialog]{min-width:280px}.layui-layer-lan .layui-layer-title{background:#4476A7;color:#fff;border:none}.layui-layer-lan .layui-layer-btn{padding:5px 10px 10px;text-align:right;border-top:1px solid #E9E7E7}.layui-layer-lan .layui-layer-btn a{background:#fff;border-color:#E9E7E7;color:#333}.layui-layer-lan .layui-layer-btn .layui-layer-btn1{background:#C9C5C5}.layui-layer-molv .layui-layer-title{background:#009f95;color:#fff;border:none}.layui-layer-molv .layui-layer-btn a{background:#009f95;border-color:#009f95}.layui-layer-molv .layui-layer-btn .layui-layer-btn1{background:#92B8B1}.layui-layer-iconext{background:url(icon-ext.png) no-repeat}.layui-layer-prompt .layui-layer-input{display:block;width:230px;height:36px;margin:0 auto;line-height:30px;padding-left:10px;border:1px solid #e6e6e6;color:#333}.layui-layer-prompt textarea.layui-layer-input{width:300px;height:100px;line-height:20px;padding:6px 10px}.layui-layer-prompt .layui-layer-content{padding:20px}.layui-layer-prompt .layui-layer-btn{padding-top:0}.layui-layer-tab{box-shadow:1px 1px 50px rgba(0,0,0,.4)}.layui-layer-tab .layui-layer-title{padding-left:0;overflow:visible}.layui-layer-tab .layui-layer-title span{position:relative;float:left;min-width:80px;max-width:260px;padding:0 20px;text-align:center;overflow:hidden;cursor:pointer}.layui-layer-tab .layui-layer-title span.layui-this{height:43px;border-left:1px solid #eee;border-right:1px solid #eee;background-color:#fff;z-index:10}.layui-layer-tab .layui-layer-title span:first-child{border-left:none}.layui-layer-tabmain{line-height:24px;clear:both}.layui-layer-tabmain .layui-layer-tabli{display:none}.layui-layer-tabmain .layui-layer-tabli.layui-this{display:block}.layui-layer-photos{-webkit-animation-duration:.8s;animation-duration:.8s}.layui-layer-photos .layui-layer-content{overflow:hidden


static bool TryGetEntryPoint(Assembly assembly, IServiceProvider serviceProvider, out object instance, out MethodInfo entryPoint)
        {
            string name = assembly.GetName().Name;

            instance = null;

            // Add support for console apps
            // This allows us to boot any existing console application
            // under the runtime
            entryPoint = GetEntryPoint(assembly);
            if (entryPoint != null)
            {
                return true;
            }

            var programType = assembly.GetType("Program") ?? assembly.GetType(name + ".Program");

            if (programType == null)
            {
                var programTypeInfo = assembly.DefinedTypes.FirstOrDefault(t => t.Name == "Program");

                if (programTypeInfo == null)
                {

                    System.Console.WriteLine("'{0}' does not contain a 'Program' type suitable for an entry point", name);
                    return false;
                }

                programType = programTypeInfo.AsType();
            }

            entryPoint = programType.GetTypeInfo().GetDeclaredMethods("Main").FirstOrDefault();

            if (entryPoint == null)
            {
                System.Console.WriteLine("'{0}' does not contain a 'Main' method suitable for an entry point", name);
                return false;
            }

            instance = programType.GetTypeInfo().IsAbstract ? null : ActivatorUtilities.CreateInstance(serviceProvider, programType);
            return true;
        }

        private static MethodInfo GetEntryPoint(Assembly assembly)
        {
#if DNX451
            return assembly.EntryPoint;
#else
            // Temporary until https://github.com/dotnet/corefx/issues/3336 is fully merged and built
            return assembly.GetType().GetRuntimeProperty("EntryPoint").GetValue(assembly) as MethodInfo;
#endif
        }
    }
}


 Self::Output {
        debug_assert_bounds_check!(n, 8);
        match rhs {
            true => self ^ msb_ones(n),
            false => self,
        }
    }
}

impl BitwiseMsb<u8> for u8 {
    type Output = u8;
    #[inline(always)]
    fn and_msb(self, n: u8, rhs: u8) -> Self::Output {
        debug_assert_bounds_check!(n, 8);
        return self & (rhs | lsb_ones(8 - n));
    }
    #[inline(always)]
    fn or_msb(self, n: u8, rhs: u8) -> Self::Output {
        debug_assert_bounds_check!(n, 8);
        return self | (rhs & msb_ones(n));
    }
    #[inline(always)]
    fn xor_msb(self, n: u8, rhs: u8) -> Self::Output {
        debug_assert_bounds_check!(n, 8);
        return self ^ (rhs & msb_ones(n));
    }
}

impl NotMsb for u8 {
    type Output = u8;
    #[inline(always)]
    fn not_msb(self, n: u8) -> Self::Output {
        debug_assert_bounds_check!(n, 8);
        return !(self ^ lsb_ones(8 - n));
    }
}

impl BitwiseMsbAssign<bool> for u8 {
    #[inline(always)]
    fn and_msb_assign(&mut self, n: u8, rhs: bool) {
        debug_assert_bounds_check!(n, 8);
        match rhs {
            true => {}
            false => *self &= lsb_ones(8 - n),
        }
    }
    #[inline(always)]
    fn or_msb_assign(&mut self, n: u8, rhs: bool) {
        debug_assert_bounds_check!(n, 8);
        match rhs {
            true => *self |= msb_ones(n),
            false => {}
        }
    }

    #[inline(always)]
    fn xor_msb_assign(&mut self, n: u8, rhs: bool) {
        debug_assert_bounds_check!(n, 8);
        match rhs {
            true => *self ^= msb_ones(n),
            false => {}
        }
    }
}

impl BitwiseMsbAssign<u8> for u8 {
    #[inline(always)]
    fn and_msb_assign(&mut self, n: u8, rhs: u8) {
        debug_assert_bounds_check!(n, 8);
        *self &= rhs | lsb_ones(8 - n);
    }
    #[inline(always)]
    fn or_msb_assign(&mut self, n: u8, rhs: u8) {
        debug_assert_bounds_check!(n, 8);
        *self |= rhs & msb_ones(n);
    }
    #[inline(always)]
    fn xor_msb_assign(&mut self, n: u8, rhs: u8) {
        debug_assert_bounds_check!(n, 8);
        *self ^= rhs & msb_ones(n);
    }
}

impl NotMsbAssign for u8 {
    #[inline(always)]
    fn not_msb_assign(&mut self, n: u8) {
        debug_assert_bounds_check!(n, 8);
        *self = !(*self ^ lsb_ones(8 - n));
    }
}

impl BitwisePartial<bool> for u8 {
    type Output = u8;
    #[inline(always)]
    // `start` starts from MSB
    fn and_partial(self, start: u8, len: u8, rhs: bool) -> Self::Output {
        debug_assert_bounds_check!(start, 7);
        debug_assert_bounds_check!(len, 8 - start);
        match rhs {
            true => self,
            false => self & (lsb_ones(8 - start) ^ msb_ones(start + len)),
        }
    }

    #[inline(always)]
    fn or


3.195-1.414.586a2 2 0 000 2.828l3 3a2 2 0 001.414.586l.277-.02a2.001 2.001 0 001.471-1.01L17 11.031V16c0 .551-.448 1-1 1z"/></svg>';
  static const String key =
      '<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="M8.5 11c0 .732.166 1.424.449 2.051L5 17v1.5S5.896 20 7 20h2v-2h2v-2h2.5c2.762 0 5-2.238 5-5s-2.238-5-5-5-5 2.238-5 5zm5 2a2 2 0 11.001-4.001A2 2 0 0113.5 13z"/></svg>';
  static const String key_outline =
      '<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="M10 21H4v-4.414l3.783-3.783A5.927 5.927 0 017.5 11c0-3.309 2.691-6 6-6s6 2.691 6 6-2.691 6-6 6H12v2h-2v2zm-4-2h2v-2h2v-2h3.5c2.206 0 4-1.794 4-4s-1.794-4-4-4-4 1.794-4 4c0 .559.121 1.109.359 1.639l.285.631L6 17.414V19zm7.5-9.002a1.002 1.002 0 010 2.002 1.001 1.001 0 010-2.002m0-1A2.001 2.001 0 1013.502 13a2.001 2.001 0 00-.002-4.002z"/></svg>';
  static const String keyboard =
      '<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="M8 13h7v2H8zm-3 0h2v2H5zm0-4h2v1H5zm3 3v-1H5v1h2zm0-3h1v1H8zm1 2h1v1H9zm1-2h1v1h-1zm1 2h1v1h-1zm1-2h1v1h-1zm1 2h1v1h-1zm1-2h1v1h-1zm1 2h1v1h-1zm1-2h1v1h-1zm1 3h2V9h-1v2h-1zm1 1h-1v1h-1v1h3v-1h-1zm2-7H4c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm0 10H4V8h16v8z"/></svg>';
  static const String leaf =
      '<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="M20 11c0-4.9-3


odules: %d\r\n", meta->excluded_modules);
  return true;
}

bool handle_mqttClientProxyMessage_tag(meshtastic_MqttClientProxyMessage *mqtt) {
  d("mqttClientProxyMessage:Topic: %s\r\n", mqtt->topic);
  switch (mqtt->which_payload_variant) {
    case meshtastic_MqttClientProxyMessage_data_tag:
      // TODO - INVALID d("mqttClientProxyMessage:data: %s\r\n", mqtt->payload_variant.data);
      break;
    case meshtastic_MqttClientProxyMessage_text_tag:
      d("mqttClientProxyMessage:text %s\r\n", mqtt->payload_variant.text);
      break;
  }
  d("mqttClientProxyMessage:retained: %d\r\n", mqtt->retained);
  return true;
}

bool handle_fileInfo_tag(meshtastic_FileInfo *fInfo) {
  d("fileInfo:fileName: %s\r\n", fInfo->file_name);
  d("fileInfo:sizeBytes: %d\r\n", fInfo->size_bytes);
  return true;
}

bool handle_my_info(meshtastic_MyNodeInfo *myNodeInfo) {
  my_node_num = myNodeInfo->my_node_num;
  return true;
}

bool handle_node_info(meshtastic_NodeInfo *nodeInfo) {
  if (node_report_callback == NULL) {
    d("Got a node report, but we don't have a callback");
    return false;
  }
  node.node_num = nodeInfo->num;
  node.is_mine = nodeInfo->num == my_node_num;
  node.last_heard_from = nodeInfo->last_heard;
  node.has_user = nodeInfo->has_user;
  if (node.has_user) {
    memcpy(node.user_id, nodeInfo->user.id, MAX_USER_ID_LEN);
    memcpy(node.long_name, nodeInfo->user.long_name, MAX_LONG_NAME_LEN);
    memcpy(node.short_name, nodeInfo->user.short_name, MAX_SHORT_NAME_LEN);
  }

  if (nodeInfo->has_position) {
    node.latitude = nodeInfo->position.latitude_i / 1e7;
    node.longitude = nodeInfo->position.longitude_i / 1e7;
    node.altitude = nodeInfo->position.altitude;
    node.ground_speed = nodeInfo->position.ground_speed;
    node.last_heard_position = nodeInfo->position.time;
    node.time_of_last_position = nodeInfo->position.timestamp;
  } else {
    node.latitude = NAN;
    node.longitude = NAN;
    node.altitude = 0;
    node.ground_speed = 0;
    node.battery_level = 0;
    node.last_heard_position = 0;
    node.time_of_last_position = 0;
  }
  if (nodeInfo->has_device_metrics) {
    node.battery_level = nodeInfo->device_metrics.battery_level;
    node.voltage = nodeInfo->device_metrics.voltage;
    node.channel_utilization = nodeInfo->device_metrics.channel_utilization;
    node.air_util_tx = nodeInfo->device_metrics.air_util_tx;
  } else {
    node.battery_level = 0;
    node.voltage = NAN;
    node.channel_utilization = NAN;
    node.air_util_tx = NAN;
  }

  node_report_callback(&node, MT_NR_IN_PROGRESS);
  return true;
}

bool handle_config_complete_id(uint32_t now, uint32_t config_complete_id) {
  if (config_complete_id == want_config_id) {


.irp idx, 0, 1, 2, 4, 7
vmov_qidx_r .16, \idx
.endr

.irp idx, 0, 1, 2, 3
vmov_qidx_r .32, \idx
.endr

.macro vmov_r_qidx size, idx
.irp op1, r0, r1, r2, r4, r7, r8, r10, r12, r14
.irp op2, q0, q1, q2, q4, q7
vmov\size \op1, \op2[\idx]
.endr
.endr
.endm

.irp data, .u8, .s8
.irp idx, 0, 1, 2, 4, 8, 15, 13, 6
vmov_r_qidx \data, \idx
.endr
.endr

.irp data, .u16, .s16
.irp idx, 0, 1, 2, 4, 7
vmov_r_qidx \data, \idx
.endr
.endr

.irp idx, 0, 1, 2, 3
vmov_r_qidx .32, \idx
.endr

vmov.i32 q0, #0
vmov.i32 q0, #255        @ 0x000000FF 000000FF
vmov.i32 q0, #65280      @ 0x0000FF00 0000FF00
vmov.i32 q0, #4278190080 @ 0xFF000000 FF000000
vmov.i32 q0, #16711680   @ 0x00FF0000 00FF0000

vmov.i16 q0, #0
vmov.i16 q0, #255      @ 0x00FF 00FF 00FF 00FF
vmov.i16 q0, #65280    @ 0xFF00 FF00 FF00 FF00

vmov.i8 q0, #0
vmov.i8 q0, #255      @ 0xFF FF FF FF FF FF FF FF

vmov.i64 q0, #18374686479671623680 @ 0xFF00000000000000
vmov.i64 q0, #71776119061217280 @ 0x00FF000000000000
vmov.i64 q0, #280375465082880 @ 0x0000FF0000000000
vmov.i64 q0, #1095216660480 @ 0x000000FF00000000
vmov.i64 q0, #4278190080 @ 0x00000000FF000000
vmov.i64 q0, #16711680 @ 0x00000000000FF0000
vmov.i64 q0, #65280 @ 0x0000000000000FF00
vmov.i64 q0, #255 @ 0x000000000000000FF

.irp op1, q0, q1, q2, q4, q7
.irp op2, q0, q1, q2, q4, q7
vmov \op1, \op2
.endr
.endr

.irp op1, d0, d1, d2, d4, d8, d15
.irp op2, d0, d1, d2, d4, d8, d15
vmov \op1, \op2
vmov.f64 \op1, \op2
.endr
.endr


          self.PlayList_Box.selection_set(0)
                    self.Music_play(If_Play=True)

            # 按的是上一首按钮
            if order == 'Last':
                self.PlayList_Box.selection_clear(0, len(self.Music_File))  # 清空列表选项

                # 如果切换前的歌曲不是列表中第一首
                if self.Music_Playing[1]:
                    self.PlayList_Box.selection_set(self.Music_Playing[1] - 1)  # 基于前一播放音乐序号决定下一首歌而非所选项，避免不必要的麻烦
                    self.Music_play(If_Play=True)  # 播放音乐

                # 否则直接切换到列表最后一首
                else:
                    self.PlayList_Box.selection_set(len(self.Music_File) - 1)
                    self.Music_play(If_Play=True)

        # 如果列表音乐个数大于1并且有播放过音乐，同时播放模式为随机模式
        elif len(self.Music_File) > 1 and self.Music_Playing[1] != 'number' and self.PlayMode == 'random-Circle':

            # 此处是为循环产生一个不等于上一首歌序号的随机整数
            while True:
                random_order = random.randint(0, len(self.Music_File) - 1)
                if random_order != self.Music_Playing[1]:
                    break

            self.PlayList_Box.selection_clear(0, len(self.Music_File))  # 清空列表选项
            self.PlayList_Box.selection_set(random_order)  # 设置播放音乐序号为所给随机数
            self.Music_play(If_Play=True)  # 播放音乐

        # 如果音乐播放列表中只有一首歌，播放过音乐并且播放模式为单曲循环
        elif self.Music_Playing[1] != 'number' and len(self.Music_File) == 1 or self.PlayMode == 'single_Circle':
            self.Music_play(If_Play=True, Replay=True)  # 直接告诉播放音乐方法单曲循环即可

    def Play_Mode(self):
        # 切换播放模式
        if self.PlayMode == 'single_Circle':
            self.PlayMode = 'random-Circle'
            self.PlayModeB.config(image=self.__photo_random_circle)
        elif self.PlayMode == 'list-Circle':
            self.PlayMode = 'single_Circle'
            self.PlayModeB.config(image=self.__photo_single_circle)
        elif self.PlayMode == 'random-Circle':
            self.PlayMode = 'list-Circle'
            self.PlayModeB.config(image=self.__photo_list_circle)

    def Time_Edit(self, state: str):

        # 如果为进度条拖动，直接相当于对时间的编辑
        # 对滚动条调节时间提供支持，同时其就是另外一种编辑时间方式，很好的避免了自动移动也会执行该命令的问题，因为时间与改变时一致则无效
        if state == 'Scrollbar Edit':
            self.Music_Time.set(
                f"{int(self.Schedule_Bar.get() // 60)}:{int(self.Schedule_Bar.get() % 60):02d}")

        # 如果为点击时间编辑处编辑，并且有播放过音乐
        elif state == 'Edit' and self.Music_Playing[1] != 'number':
            self.Previous_Time = self.Music_Time.get()  # 先保存点击时显示的时间，用来判断有没有修改时间
            self.IfTime_Counting = False  # 让计时线程中断
            self.Playing_TimeST.config(bg='#ffffff')  # 将编辑框背景改为白色

        # 如果回车确认编辑框中可能修改过的时间
        elif state == 'Confirm' and self.Music_Playing[1] != 'number':

            # 如果音乐当前没有在播放，则让音乐进行重新播放
            # 这样如果是在暂停播放时编辑时间可以直接跳到对应时间点播放。如果编辑时间时音乐播放完毕（此时不会跳到下一首）,确认编辑后可以跳到对应时间点播放
            if not mx.music.get_busy():
                self.Music_play(If_Play=True, Replay=True)

            self.PlayList_Box.focus_set()  # 在确认后让焦点回到播放列表上
            self.Playing_TimeST.config(bg='#f0f0f0')  # 将编辑框背景颜色恢复

            Time_Whole = None  # 如果输入时间是符合格式的，则将原封不动放入该变量中
            Time_Second = None  # 如果输入时间是符合格式的，其秒位上的数字会被放入该变量中

            # 判断输入数据是否符合格式
            if re.findall(r"^\d+:\d{1,2}$", self.Music_Time.get()):
                Time_Whole = re.findall(r"^\d+:\d{1,2}$", self.Music_Time.get())[0]  # 保存输入数据
                Time_Second = int(re.findall(r"\d{1,2}$", self.Music_Time.get())[0])  # 保存秒数

            # 如果符合输入格式
            if Time_Whole:

                # 同时输入的秒数必须小于60
                if Time_Second < 60:
                    set_time = int(re.findall(r"^\d{1,2}", self.Music_Time.get())[0]) * 60 + int(
                        re.findall(r"\d{1,2}$", self.Music_Time.get())[0])  # 将输入的时间转化为对应的秒数

                    # 如果音乐播放总时长大于设置的秒数，并且不等于在输入编辑时保存的时间(重要！！！！)，则有效
                    if int(self.Music_Info.info.length) >= set_time and self.Music_Time.get() != self.Previous_Time:
                        mx.music.set_pos(set_time)  # 将时间跳转到设置的时间点
                        # 计算偏移量，实际时间为设置的时间减去pygame已经记录的播放时长,+200是为了弥补误差，单位为毫秒
                        self.Time_Offset = set_time * 1000 - mx.music.get_pos() + 100

            self.IfTime_Counting = True
            myThread(self.Auto_play, 'Second', True).perform()  # 恢复计时线程

    def Auto_play(self):  # 自动播放功能中嵌入计时功能

        # 由于线程不能强制中断，故用self.IfTime_Counting来充当开关
        while self.IfTime_Counting:

            # 每循环一次就让self.Music_Time设置为pygame记录到的播放时间加上偏


package:share_plus/share_plus.dart';

class PaymentFilterSliver extends StatefulWidget {
  final ScrollController _controller;
  final double _minSize;
  final double _maxSize;
  final AccountBloc _accountBloc;
  final PaymentsModel _paymentsModel;

  const PaymentFilterSliver(
    this._controller,
    this._minSize,
    this._maxSize,
    this._accountBloc,
    this._paymentsModel,
  );

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

class PaymentFilterSliverState extends State<PaymentFilterSliver> {
  bool _hasNoFilter;
  bool _hasNoTypeFilter;
  bool _hasNoDateFilter;

  @override
  void initState() {
    super.initState();
    widget._controller.addListener(onScroll);
  }

  @override
  void dispose() {
    widget._controller.removeListener(onScroll);
    super.dispose();
  }

  void onScroll() {
    setState(() {});
  }

  @override
  Widget build(BuildContext context) {
    final scrollOffset = widget._controller.position.pixels;
    final filter = widget._paymentsModel.filter;
    final paymentType = filter.paymentType;

    _hasNoTypeFilter = (paymentType.contains(PaymentType.SENT) &&
        paymentType.contains(PaymentType.DEPOSIT) &&
        paymentType.contains(PaymentType.WITHDRAWAL) &&
        paymentType.contains(PaymentType.RECEIVED));
    _hasNoDateFilter = (filter.startDate == null || filter.endDate == null);
    _hasNoFilter = _hasNoTypeFilter && _hasNoDateFilter;

    return SliverPersistentHeader(
      pinned: true,
      delegate: FixedSliverDelegate(
        !_hasNoFilter
            ? widget._maxSize
            : scrollOffset.clamp(
                widget._minSize,
                widget._maxSize,
              ),
        builder: (context, shrinkedHeight, overlapContent) {
          return AnimatedOpacity(
            duration: const Duration(milliseconds: 100),
            opacity: !_hasNoFilter ? 1.0 : (scrollOffset - widget._maxSize / 2).clamp(0.0, 1.0),
            child: Container(
              color: theme.customData[theme.themeId].dashboardBgColor,
              child: Padding(
                padding: const EdgeInsets.only(left: 8, right: 8, bottom: 8),
                child: ClipRRect(
                  borderRadius: BorderRadius.circular(5),
                  child: Container(
                    color: theme.customData[theme.themeId].paymentListBgColor,
                    height: widget._maxSize,
                    child: PaymentsFilter(
                      widget._accountBloc,
                      widget._paymentsModel,
                    ),
                  ),
                ),
              ),
            ),
          );
        },
      ),
    );
  }
}

class PaymentsFilter extends StatefulWidget {
  final AccountBloc _accountBloc;
  final PaymentsModel _paymentsModel;

  const PaymentsFilter(
    this._accountBloc,
    this._paymentsModel,
  );

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

class PaymentsFilterState extends State<PaymentsFilter> {
  String _filter;
  Map<String, List<PaymentType>> _filterMap;

  DateTime formattedStartDate;
  DateTime formattedEndDate;

  @override
  void initState() {
    super.initState();
    final today = DateTime.now();
    formattedStartDate = DateTime(widget._paymentsModel.firstDate.year, widget._paymentsModel.firstDate.month,
        widget._paymentsModel.firstDate.day, 0, 0, 0);
    formattedEndDate = DateTime(today.year, today.month, today.day, 23, 59, 59,


fr01::DnsXfr01Error>;

	fn new() -> io::Result<(Self::Receiver, Self::Forwarder)>;
}

pub struct UdpReceiver {
	socket: UdpSocket,
}

impl Receiver for UdpReceiver {
	fn receive<W: Write>(&mut self, writer: &mut W) {
		let mut buf = vec![0u8; 4096];
		self.socket.set_read_timeout(Some(Duration::from_millis(100))).unwrap();
		let (size, _) = match self.socket.recv_from(&mut buf) {
			Err(_) => { writeln!(writer, "dnslogger-forward: debug: No data received.").unwrap(); return; },
			Ok(r) => r,
		};
		writeln!(writer, "dnslogger-forward: Received data: {:x}", HexSlice(&buf[0..size])).unwrap();
	}
}

impl DnsXfr01Protocol for UdpReceiver {
	type Receiver = UdpReceiver;
	type Forwarder = dnsxfr01::UdpForwarder;

	fn new() -> io::Result<(Self::Receiver, Self::Forwarder)> {
		let udp_server = try!(UdpSocket::bind(localhost_any_port_addr()));
		let udp_client = try!(UdpSocket::bind(localhost_any_port_addr()));
		let server_addr = try!(udp_server.local_addr());

		Ok((
			UdpReceiver{
				socket: udp_server,
			},
			dnsxfr01::UdpForwarder::new(udp_client, server_addr, 512),
		))
	}
}

pub struct TcpReceiver {
	socket: TcpStream,
}

impl Receiver for TcpReceiver {
	fn receive<W: Write>(&mut self, writer: &mut W) {
		let mut buf = vec![0u8; 4096];
		self.socket.set_read_timeout(Some(Duration::from_millis(100))).unwrap();

		let mut total_size = 0;

		while total_size < buf.len() {
			let size = match self.socket.read(&mut buf[total_size..]) {
				Err(_) => break,
				Ok(r) => r,
			};
			total_size += size;
		}

		if 0 == total_size {
			writeln!(writer, "dnslogger-forward: debug: No data received.").unwrap();
		} else {
			writeln!(writer, "dnslogger-forward: Received data: {:x}", HexSlice(&buf[0..total_size])).unwrap();
		}
	}
}

impl DnsXfr01Protocol for TcpReceiver {
	type Receiver = TcpReceiver;
	type Forwarder = dnsxfr01::TcpForwarder;

	fn new() -> io::Result<(Self::Receiver, Self::Forwarder)> {
		let tcp_server = try!(TcpListener::bind(localhost_any_port_addr()));
		let tcp_client = try!(TcpStream::connect(try!(tcp_server.local_addr())));
		let (tcp_server_conn, _) = try!(tcp_server.accept());

		Ok((
			TcpReceiver{
				socket: tcp_server_conn,
			},
			dnsxfr01::TcpForwarder::new(tcp_client, 512),
		))
	}
}
// This file contains tests for `cap_fs_ext::FileTypeExt`.

#![cfg_attr(all(windows, windows_by_handle), feature(windows_by_handle))]

#[macro_use]
mod sys_common;

use sys_common::io::tmpdir;

#[test]
fn test_dir_entry_ext() {
    let tmpdir = tmpdir();
    check!(tmpdir.create("a"));

    // First try with the regular `metadata()`. All nones.
    #[cfg(all(windows, windows_by_handle))]
    for entry in check!(tmpdir.entries()) {
        use std::os::windows::fs::MetadataExt;
        let entry = check!(entry);
        assert!(check!(entry.metadata()).volume_serial_number().is_none());
        assert!(check!(entry.metadata()).number_of_links().is_none());
        assert!(check!(entry.metadata()).file_index().is_none());
    }

    // Now try with `full_metadata()`.
    for entry in check!(tmpdir.entries()) {
        use cap_fs_ext::{DirEntryExt, Metadata


using System.Runtime.Serialization;
using StardewModdingAPI;
using StardewModdingAPI.Utilities;

namespace LocationCompass.Framework;

/// The mod configuration model.
internal class ModConfig
{
    /*********
    ** Accessors
    *********/
    /// Whether you need to hold the button to show icons (else the button toggles them).
    public bool HoldToToggle { get; set; } = true;

    /// The key binding to show/hide the locator icons.
    public KeybindList ToggleKeyCode { get; set; } = new(SButton.LeftAlt);

    /// Whether the game HUD is hidden when the locator icons are shown.
    public bool HideHud { get; set; } = true;

    /// Whether to only show locations in the current location. If `false`, characters in neighboring locations will be shown in gray.
    public bool SameLocationOnly { get; set; } = true;

    /// The key binding to toggle <see cref="SameLocationOnly"/>.
    public KeybindList SameLocationToggleKey { get; set; } = new(SButton.H);

    /// Whether to only show characters with a quest or birthday today.
    public bool ShowQuestsAndBirthdaysOnly { get; set; } = false;

    /


101
// CHECK: [0x65,0x0a,0x85,0xbe]

s_bcnt0_i32_b32 s5, flat_scratch_lo
// CHECK: [0x66,0x0a,0x85,0xbe]

s_bcnt0_i32_b32 s5, flat_scratch_hi
// CHECK: [0x67,0x0a,0x85,0xbe]

s_bcnt0_i32_b32 s5, vcc_lo
// CHECK: [0x6a,0x0a,0x85,0xbe]

s_bcnt0_i32_b32 s5, vcc_hi
// CHECK: [0x6b,0x0a,0x85,0xbe]

s_bcnt0_i32_b32 s5, m0
// CHECK: [0x7c,0x0a,0x85,0xbe]

s_bcnt0_i32_b32 s5, exec_lo
// CHECK: [0x7e,0x0a,0x85,0xbe]

s_bcnt0_i32_b32 s5, exec_hi
// CHECK: [0x7f,0x0a,0x85,0xbe]

s_bcnt0_i32_b32 s5, 0
// CHECK: [0x80,0x0a,0x85,0xbe]

s_bcnt0_i32_b32 s5, -1
// CHECK: [0xc1,0x0a,0x85,0xbe]

s_bcnt0_i32_b32 s5, 0.5
// CHECK: [0xf0,0x0a,0x85,0xbe]

s_bcnt0_i32_b32 s5, -4.0
// CHECK: [0xf7,0x0a,0x85,0xbe]

s_bcnt0_i32_b32 s5, 0xaf123456
// CHECK: [0xff,0x0a,0x85,0xbe,0x56,0x34,0x12,0xaf]

s_bcnt0_i32_b32 s5, 0x3f717273
// CHECK: [0xff,0x0a,0x85,0xbe,0x73,0x72,0x71,0x3f]

s_bcnt0_i32_b64 s5, s[2:3]
// CHECK: [0x02,0x0b,0x85,0xbe]

s_bcnt0_i32_b64 s101, s[2:3]
// CHECK: [0x02,0x0b,0xe5,0xbe]

s_bcnt0_i32_b64 flat_scratch_lo, s[2:3]
// CHECK: [0x02,0x0b,0xe6,0xbe]

s_bcnt0_i32_b64 flat_scratch_hi, s[2:3]
// CHECK: [0x02,0x0b,0xe7,0xbe]

s_bcnt0_i32_b64 vcc_lo, s[2:3]
// CHECK: [0x02,0x0b,0xea,0xbe]

s_bcnt0_i32_b64 vcc_hi, s[2:3]
// CHECK: [0x02,0x0b,0xeb,0xbe]

s_bcnt0_i32_b64 m0, s[2:3]
// CHECK: [0x02,0x0b,0xfc,0xbe]

s_bcnt0_i32_b64 exec_lo, s[2:3]
// CHECK: [0x02,0x0b,0xfe,0xbe]

s_bcnt0_i32_b64 exec_hi, s[2:3]
// CHECK: [0x02,0x0b,0xff,0xbe]

s_bcnt0_i32_b


ortant; // Hide the separator if it is the last list item
}

// Footer scrolltop button
@if o-website-value('footer-scrolltop') {
    #o_footer_scrolltop_wrapper {
        position: relative;
        z-index: 1;
    }
    #o_footer_scrolltop {
        $-footer-color: o-color('footer-custom') or o-color('footer') or rgba(0, 0, 0, 0);
        $-footer-color: mix(rgba($-footer-color, 1.0), $body-bg, percentage(alpha($-footer-color)));
        $-copyright-color: o-color('copyright-custom') or o-color('copyright') or rgba(0, 0, 0, 0);
        $-copyright-color: mix(rgba($-copyright-color, 1.0), $-footer-color, percentage(alpha($-copyright-color)));

        box-sizing: content-box;
        width: 3rem;
        height: 3rem;
        border: 0;
        padding: 0;
        @include o-apply-colors($-footer-color, $with-extras: false, $background: $-footer-color);
        text-decoration: none;

        @if $-footer-color == $-copyright-color {
            color: rgba(color-contrast($-footer-color), 0.5);
        }

        &:hover, &:focus {
            @include o-apply-colors($-copyright-color, $with-extras: false, $background: $-footer-color);
            text-decoration: none;
        }
    }
}

// Figure with special style
.o_figure_relative_layout {
    position: relative;

    .figure-img {
        margin-bottom: 0;
    }
    .figure-caption {
        @include o-position-absolute(auto, 0, 0, 0);
        @include o-bg-color(rgba(map-get($theme-colors, 'dark'), $o-theme-figcaption-opacity));
        padding: $tooltip-padding-y $tooltip-padding-x;
        font-weight: $font-weight-bold;
        a {
            color: inherit;
        }
    }
}

@each $color, $value in $theme-colors {
    .bg-#{$color}-light {
        background-color: rgba($value, 0.1);
    }
}

@each $media, $color in $o-social-colors {
    @include text-emphasis-variant(".text-#{$media}", $color);
}

// TODO: Will be handled properly in master/saas-12.2, temp fix for website_event.registration_attendee_details
.modal-footer > .float-start {
    margin-right: auto;
}

// CoverProperties
.o_record_cover_container {
    position: relative;

    .o_record_cover_component {
        @include o-position-absolute(0, 0, 0, 0);

        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
    }
}

// Scroll down button
.o_scroll_button {
    @include o-position-absolute(auto, 0, 0, 0);
    display: flex;
    width: 50px;
    height: 50px;
    animation: o-anim-heartbeat 2.6s ease-in-out 1s infinite;

    &, &:hover {
        text-decoration: none;
    }
    &:focus {
        outline: none;
    }
    &:hover {
        animation-iteration-count: 1;
    }
}

// Attention keeper for the "scroll down" top-banner button
@keyframes o-anim-heartbeat {
    0%, 14%, 35% {
        transform: scale(1);
    }
    7%, 21% {
        transform: scale(1.3);
        background-color: rgba(map-get($theme-colors, 'primary'), 0.8);
    }
}

// Ribbons
$ribbon-padding: 100px;
.o_ribbon {
    margin: 0;
    @include font-size(1rem);
    font-weight: bold;
    white-space: nowrap;
    text-align: center;
    pointer-events: none;
}

.o_ribbon_right


#if HAVE_GD_BUNDLED
# include "gd.h"
#else
# include <gd.h>
#endif

#include "gd_intern.h"

/**
 * Integer Ellipse functions (gdImageEllipse and gdImageFilledEllipse)
 * Function added by Pierre-Alain Joye 02/08/2003 (paj@pearfr.org)
 * See the ellipse function simplification for the equation
 * as well as the midpoint algorithm.
 */

void gdImageEllipse(gdImagePtr im, int mx, int my, int w, int h, int c)
{
	int x=0,mx1=0,mx2=0,my1=0,my2=0;
	long aq,bq,dx,dy,r,rx,ry,a,b;

	a=w>>1;
	b=h>>1;
	gdImageSetPixel(im,mx+a, my, c);
	gdImageSetPixel(im,mx-a, my, c);
	mx1 = mx-a;my1 = my;
	mx2 = mx+a;my2 = my;

	aq = a * a;
	bq = b * b;
	dx = aq << 1;
	dy = bq << 1;
	r  = a * bq;
	rx = r << 1;
	ry = 0;
	x = a;
	while (x > 0){
		if (r > 0) {
			my1++;my2--;
			ry +=dx;
			r  -=ry;
		}
		if (r <= 0){
			x--;
			mx1++;mx2--;
			rx -=dy;
			r  +=rx;
		}
		gdImageSetPixel(im,mx1, my1, c);
		gdImageSetPixel(im,mx1, my2, c);
		gdImageSetPixel(im,mx2, my1, c);
		gdImageSetPixel(im,mx2, my2, c);
	}
}

void gdImageFilledEllipse (gdImagePtr im, int mx, int my, int w, int h, int c)
{
	int x=0,mx1=0,mx2=0,my1=0,my2=0;
	long aq,bq,dx,dy,r,rx,ry,a,b;
	int i;
	int old_y2;

	a=w>>1;
	b=h>>1;

	for (x = mx-a; x <= mx+a; x++) {
		gdImageSetPixel(im, x, my, c);
	}

	mx1 = mx-a;my1 = my;
	mx2 = mx+a;my2 = my;

	aq = a * a;
	bq = b * b;
	dx = aq << 1;
	dy = bq << 1;
	r  = a * bq;
	rx = r << 1;
	ry = 0;
	x = a;
	old_y2=-2;
	while (x > 0){
		if (r > 0) {
			my1++;my2--;
			ry +=dx;
			r  -=ry;
		}
		if (r <= 0){
			x--;
			mx1++;mx2--;
			rx -=dy;
			r  +=rx;
		}
		if(old_y2!=my2){
			for(i=mx1;i<=mx2;i++){
				gdImageSetPixel(im,i,my1,c);
				gdImageSetPixel(im,i,my2,c);
			}
		}
		old_y2 = my2;
	}
}


ey = '/ls' },
    { name = 'AskMode', key = '/ask' },
    { name = 'ArchMode', key = '/architect' },
    { name = 'CodeMode', key = '/code' },
    { name = 'ContextMode', key = '/context' },
}

for _, shortcut in ipairs(shortcuts) do
    vim.api.nvim_create_user_command('AiderSend' .. shortcut.name, function(opts)
        local id = opts.count
        util.send_to_repl_raw('aider', id, shortcut.key .. '\r')
    end, { count = true })

    keymap('n', string.format('<Plug>(AiderSend%s)', shortcut.name), '', {
        noremap = true,
        callback = function()
            util.run_cmd_with_count('AiderSend' .. shortcut.name)
        end,
    })
end

vim.api.nvim_create_user_command('AiderExec', function(opts)
    local id = opts.count
    local command = opts.args
    util.send_to_repl_raw('aider', id, command .. '\r')
end, {
    count = true,
    nargs = '*',
    complete = function()
        return prefixes
    end,
})

keymap('n', '<Plug>(AiderExec)', '', {
    noremap = true,
    callback = function()
        return util.partial_cmd_with_count_expr 'AiderExec'
    end,
    expr = true,
})

return M


im
	scrim = Neutral10.copy(alpha = 0.32f),

	// Date Picker
	dateBoxSelectedBackground = Primary40,
	dateBoxSelectedText = Neutral10,
	dateBoxUnselectedText = Neutral70,
	dateBoxTodayText = Neutral10,
	dateBoxSundayText = Error10,
	dayOfWeekText = Neutral20,
	datePickerHeader = Neutral10,
	datePickerRequest = Neutral10,
	datePickerDismiss = Error20,
	datePickerBackground = Neutral90,
	datePickerBorder = Neutral70,

	// Menu
	menuBackground = Neutral110,
	menuStroke = Neutral20,
	menuItemBackground = Neutral110,

	// Tab
	tabBackground = Neutral110,
	tabItemBackground = Neutral110,
	tabItemTextSelected = Neutral10,
	tabItemTextUnselected = Neutral90,
	tabItemIcon = Neutral40,
	tabIndicator = Primary30,

	// Button
	filledButtonEnableBackground = Primary50,
	filledButtonDisableBackground = Neutral80,
	filledButtonContent = Neutral40,
	outlineButtonBackground = Neutral110,
	outlineButtonStroke = Neutral40,
	outlineButtonContent = Neutral40,

	// Chip
	chipSelectedBackground = Neutral70,
	chipUnselectedBackground = Neutral100,
	chipText = Neutral10,
	chipSelectedStroke = Primary30,
	chipUnselectedStroke = Neutral40,

	// Text Field
	textFieldBackground = Color.Unspecified,
	textFieldContent = Neutral70,
	textFieldStroke = Neutral70,

	// Tag
	tagFieldBackground = Neutral110,
	tagBorder = Neutral70,
	tagBackground = Primary40,
	tagText = Neutral10,

	// Dialog
	dialogBackground = Neutral100,
	dialogStroke = Color.Unspecified,
	dialogDismiss = Error20,
	dialogConfirm = Primary20,

	// Toast
	toastBackground = Neutral100,
	toastStroke = Color.Unspecified,
	toastContent = Neutral10,

	// Icon Button
	iconButtonBackground = Neutral110,
	iconButtonEnabled = Neutral10,
	iconButtonDisabled = Neutral50,

	// Icon
	iconColor = Neutral10,
	eatIconColor = Tertiary10,
	seeIconColor = Error10,
	otherIconColor = Primary20,

	// Surface
	surfaceBackground = Neutral110,

	// Divider
	dividerThinColor = Neutral40,
	dividerThickColor = Color.Transparent,

	// Text
	textBackground = Color.Unspecified,
	textContent = Neutral10,
	textStroke = Color.Transparent,

	// FAB
	fabBackground = Primary60,
	fabContent = Primary30,

	// System Bar
	systemBarTransparent = Color.Transparent,
	systemBarColored = Primary90,

	// Checkbox
	checkboxBackground = Primary20.copy(alpha = 0.6f),
	checkboxStroke = Neutral40,

	// EpisodeCard
	episodeBoxBackground = Neutral50,
	episodeBoxStroke = Neutral40,
)
package com.boostcamp.mapisode.convention.extension

import com.android.build.api.dsl.CommonExtension
import org.gradle.api.JavaVersion
import org.gradle.api.Project
import org.gradle.kotlin.dsl.provideDelegate
import org.gradle.kotlin.dsl.withType
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

internal fun Project.configureKotlinAndroid(commonExtension: CommonExtension<*, *, *, *, *, *>) {
	pluginManager.apply("org.jetbrains.kotlin.android")

	commonExtension.apply {
		compileSdk = libs.getVersion("compileSdk").requiredVersion.toInt()

		defaultConfig {
			minSdk = libs.getVersion("minSdk").requiredVersion


y: #1e293b;
        --arc-success: #10b981;
        --arc-background: #0f172a;
        --arc-surface: #1e293b;
        --arc-border: #334155;
        --arc-text-primary: #f1f5f9;
        --arc-text-secondary: #cbd5e1;
        --arc-text-muted: #64748b;
        --arc-shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.3);
        --arc-shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.3);
        --arc-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.3);
    }

    /* 自动暗色模式下的主题色覆盖 */
    :root:not([data-theme])[data-color="blue"] {
        --arc-primary: #60a5fa;
        --arc-primary-hover: #3b82f6;
        --glow-light: rgba(96, 165, 250, 0.2);
        --glow-medium: rgba(96, 165, 250, 0.4);
    }

    :root:not([data-theme])[data-color="green"] {
        --arc-primary: #10b981;
        --arc-primary-hover: #059669;
        --glow-light: rgba(16, 185, 129, 0.2);
        --glow-medium: rgba(16, 185, 129, 0.4);
    }

    :root:not([data-theme])[data-color="orange"] {
        --arc-primary: #fb923c;
        --arc-primary-hover: #f97316;
        --glow-light: rgba(251, 146, 60, 0.2);
        --glow-medium: rgba(251, 146, 60, 0.4);
    }

    :root:not([data-theme])[data-color="yellow"] {
        --arc-primary: #fbbf24;
        --arc-primary-hover: #f59e0b;
        --glow-light: rgba(251, 191, 36, 0.2);
        --glow-medium: rgba(251, 191, 36, 0.4);
    }

    :root:not([data-theme])[data-color="purple"] {
        --arc-primary: #a78bfa;
        --arc-primary-hover: #8b5cf6;
        --glow-light: rgba(167, 139, 250, 0.2);
        --glow-medium: rgba(167, 139, 250, 0.4);
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 20px 16px;
    }

    .settings-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .settings-group {
        gap: 16px;
    }

    .format-options {
        flex-direction: column;
    }

    .bulk-actions,
    .main-actions {
        flex-direction: column;
    }

    .action-btn {
        justify-content: center;
    }

    .tabs-container {
        max-height: 400px;
    }

    .modal-content {
        width: 95vw;
        margin: 20px;
    }
}
@import url('https://fonts.googleapis.com/css?family=Roboto:300,400,500');

html,
body {
  margin: 0;
  padding: 0;
}

button {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  font-size: 100%;
  vertical-align: baseline;
  font-family: inherit;
  font-weight: inherit;
  color: inherit;
  appearance: none;
  font-smoothing: antialiased;
}

body {
  font: 14px 'Helvetica Neue', Helvetica, Arial, sans-serif;
  line-height: 1.4em;


(2), false);
				break;

			case IGET: {
				FieldInfo fieldInfo = (FieldInfo) ((IndexInsnNode) insn).getIndex();
				instanceField(code, fieldInfo, insn.getArg(0));
				break;
			}
			case IPUT: {
				FieldInfo fieldInfo = (FieldInfo) ((IndexInsnNode) insn).getIndex();
				instanceField(code, fieldInfo, insn.getArg(1));
				code.add(" = ");
				addArg(code, insn.getArg(0), false);
				break;
			}

			case SGET:
				staticField(code, (FieldInfo) ((IndexInsnNode) insn).getIndex());
				break;
			case SPUT:
				FieldInfo field = (FieldInfo) ((IndexInsnNode) insn).getIndex();
				staticField(code, field);
				code.add(" = ");
				addArg(code, insn.getArg(0), false);
				break;

			case STR_CONCAT:
				boolean wrap = state.contains(Flags.BODY_ONLY);
				if (wrap) {
					code.add('(');
				}
				for (Iterator<InsnArg> it = insn.getArguments().iterator(); it.hasNext();) {
					addArg(code, it.next());
					if (it.hasNext()) {
						code.add(" + ");
					}
				}
				if (wrap) {
					code.add(')');
				}
				break;

			case MONITOR_ENTER:
				if (isFallback()) {
					code.add("monitor-enter(");
					addArg(code, insn.getArg(0));
					code.add(')');
				}
				break;

			case MONITOR_EXIT:
				if (isFallback()) {
					code.add("monitor-exit(");
					if (insn.getArgsCount() == 1) {
						addArg(code, insn.getArg(0));
					}
					code.add(')');
				}
				break;

			case TERNARY:
				makeTernary((TernaryInsn) insn, code, state);
				break;

			case ONE_ARG:
				addArg(code, insn.getArg(0), state);
				break;

			/* fallback mode instructions */
			case IF:
				fallbackOnlyInsn(insn);
				IfNode ifInsn = (IfNode) insn;
				code.add("if (");
				addArg(code, insn.getArg(0));
				code.add(' ');
				code.add(ifInsn.getOp().getSymbol()).add(' ');
				addArg(code, insn.getArg(1));
				code.add(") goto ").add(MethodGen.getLabelName(ifInsn));
				break;

			case GOTO:
				fallbackOnlyInsn(insn);
				code.add("goto ").add(MethodGen.getLabelName(((GotoNode) insn).getTarget()));
				break;

			case MOVE_EXCEPTION:
				fallbackOnlyInsn(insn);
				code.add("move-exception");
				break;

			case SWITCH:
				fallbackOnlyInsn(insn);
				SwitchInsn sw = (SwitchInsn) insn;
				code.add("switch(");
				addArg(code, insn.getArg(0));
				code.add(") {");
				code.incIndent();
				int[] keys = sw.getKeys();
				int size = keys.length;
				BlockNode[] targetBlocks = sw.getTargetBlocks();
				if (targetBlocks != null) {
					for (int i = 0; i < size; i++) {
						code.startLine("case ").add(Integer.toString(keys[i])).add(": goto ");
						code.add(MethodGen.getLabelName(targetBlocks[i])).add(';');
					}
					code.startLine("default: goto ");
					code.add(MethodGen.get


vfp16out4x01234567 = vfp16out4x89ABCDEF;
     }
     float16x4_t vfp16out0x0123 = vget_low_f16(vfp16out0x01234567);
     float16x4_t vfp16out1x0123 = vget_low_f16(vfp16out1x01234567);
     float16x4_t vfp16out2x0123 = vget_low_f16(vfp16out2x01234567);
     float16x4_t vfp16out3x0123 = vget_low_f16(vfp16out3x01234567);
     float16x4_t vfp16out4x0123 = vget_low_f16(vfp16out4x01234567);
     if (nc & 4) {
       vst1_u16(c0, vreinterpret_u16_f16(vfp16out0x0123)); c0 += 4;
       vst1_u16(c1, vreinterpret_u16_f16(vfp16out1x0123)); c1 += 4;
       vst1_u16(c2, vreinterpret_u16_f16(vfp16out2x0123)); c2 += 4;
       vst1_u16(c3, vreinterpret_u16_f16(vfp16out3x0123)); c3 += 4;
       vst1_u16(c4, vreinterpret_u16_f16(vfp16out4x0123)); c4 += 4;
       vfp16out0x0123 = vget_high_f16(vfp16out0x01234567);
       vfp16out1x0123 = vget_high_f16(vfp16out1x01234567);
       vfp16out2x0123 = vget_high_f16(vfp16out2x01234567);
       vfp16out3x0123 = vget_high_f16(vfp16out3x01234567);
       vfp16out4x0123 = vget_high_f16(vfp16out4x01234567);
     }
     if (nc & 2) {
       vst1_lane_u32((void*) c0, vreinterpret_u32_f16(vfp16out0x0123), 0); c0 += 2;
       vst1_lane_u32((void*) c1, vreinterpret_u32_f16(vfp16out1x0123), 0); c1 += 2;
       vst1_lane_u32((void*) c2, vreinterpret_u32_f16(vfp16out2x0123), 0); c2 += 2;
       vst1_lane_u32((void*) c3, vreinterpret_u32_f16(vfp16out3x0123), 0); c3 += 2;
       vst1_lane_u32((void*) c4, vreinterpret_u32_f16(vfp16out4x0123), 0); c4 += 2;
       vfp16out0x0123 = vext_f16(vfp16out0x0123, vfp16out0x0123, 2);
       vfp16out1x0123 = vext_f16(vfp16out1x0123, vfp16out1x0123, 2);
       vfp16out2x0123 = vext_f16(vfp16out2x0123, vfp16out2x0123, 2);
       vfp16out3x0123 = vext_f16(vfp16out3x0123, vfp16out3x0123, 2);
       vfp16out4x0123 = vext_f16(vfp16out4x0123, vfp16out4x0123, 2);
     }
     if (nc & 1) {
       vst1_lane_u16(c0, vreinterpret_u16_f16(vfp16out0x0123), 0);
       vst1_lane_u16(c1, vreinterpret_u16_f16(vfp16out1x0123), 0);
       vst1_lane_u16(c2, vreinterpret_u16_f16(vfp16out2x0123), 0);
       vst1_lane_u16(c3, vreinterpret_u16_f16(vfp16out3x0123), 0);
       vst1_lane_u16(c4, vreinterpret_u16_f16(vfp16out4x0123), 0);
     }
      nc = 0;
    }
  } while (nc != 0);
}