Return value:

String value containing the bytecode of the given data

imatch (val)

Return a matching iterator for the given value.

The iterator will return one token per invocation, the tokens are separated by
whitespace. If the input value is a table, it is transformed into a string first.
A nil value will result in a valid interator which aborts with the first invocation.

Parameters

	  val: The value to scan (table, string or nil)

Return value:

Iterator which returns one token per call

instanceof (object, class)

Test whether the given object is an instance of the given class.

Parameters

	  object: Object instance

	  class: Class object to test against

Return value:

Boolean indicating whether the object is an instance

See also:

		class

		clone

keys (t)

Retrieve all keys of given associative table.

Parameters

	  t: Table to extract keys from

Return value:

Sorted table containing the keys

kspairs (t)

Return a key, value iterator for the given table.

The table pairs are sorted by key.

Parameters

	  t: The table to iterate

Return value:

Function value containing the corresponding iterator

libpath ()

Returns the absolute path to LuCI base directory.

Return value:

String containing the directory path

parse_units (ustr)

Parse certain units from the given string and return the canonical integer
value or 0 if the unit is unknown.

Upper- or lower case is irrelevant.
Recognized units are:

	o "y"	- one year   (60*60*24*366)
 o "m"	- one month  (60*60*24*31)
 o "w"	- one week   (60*60*24*7)
 o "d"	- one day    (60*60*24)
 o "h"	- one hour	 (60*60)
 o "min"	- one minute (60)
 o "kb"  - one kilobyte (1024)
 o "mb"	- one megabyte (1024*1024)
 o "gb"	- one gigabyte (1024*1024*1024)
 o "kib" - one si kilobyte (1000)
 o "mib"	- one si megabyte (1000*1000)
 o "gib"	- one si gigabyte (1000*1000*1000)

Parameters

	  ustr: String containing a numerical value with trailing unit

Return value


         .load(logo[scc.clgName1])
                    .error(R.drawable.group)
                    .thumbnail(0.1f)
                    .diskCacheStrategy(DiskCacheStrategy.AUTOMATIC)
                    .into(footHolder.img1)
                Glide.with(footHolder.itemView.context)
                    .load(logo[scc.clgName2])
                    .thumbnail(0.1f)
                    .diskCacheStrategy(DiskCacheStrategy.AUTOMATIC)
                    .error(R.drawable.group)
                    .into(footHolder.img2)
            }
            ATHELETE -> {
                val atHolder = holder as AtheleteViewHolder
                atHolder.name.text = scc.matchName
                atHolder.date.text = scc.date
                atHolder.play1.text = scc.play1
                atHolder.play2.text = scc.play2
                atHolder.play3.text = scc.play3
                atHolder.grpStage.text = scc.time
            }
            else -> throw IllegalArgumentException("Invalid view type")
        }
        if(boolean){
            holder.itemView.setOnClickListener {
                resClickListener.onResClick()
            }
        }

    }
    class CricketViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView){
        val name: TextView = itemView.findViewById(R.id.matchName)
        val date: TextView = itemView.findViewById(R.id.date)
        val grpStage: TextView = itemView.findViewById(R.id.time)
        val clg1: TextView = itemView.findViewById(R.id.clgName1)
        val clg2: TextView = itemView.findViewById(R.id.clgName2)
        val sc1: TextView = itemView.findViewById(R.id.poi1)
        val sc2: TextView = itemView.findViewById(R.id.poi2)
        val ov1: TextView = itemView.findViewById(R.id.ov1)
        val ov2: TextView = itemView.findViewById(R.id.ov2)
        val img1: ImageView = itemView.findViewById(R.id.clgImg1)
        val img2: ImageView = itemView.findViewById(R.id.clgImg2)
    }
    class FootballViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView){
        val name: TextView = itemView.findViewById(R.id.matchName)
        val date: TextView = itemView.findViewById(R.id.date)
        val grpStage: TextView = itemView.findViewById(R.id.time)
        val clg1: TextView = itemView.findViewById(R.id.clgName1)
        val clg2: TextView = itemView.findViewById(R.id.clgName2)
        val point: TextView = itemView.findViewById(R.id.points)
        val img1: ImageView = itemView.findViewById(R.id.clgImg1)
        val img2: ImageView = itemView.findViewById(R.id.clgImg2)
    }
    class AtheleteViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView){
        val name: TextView = itemView.findViewById(R.id.matchName)
        val date: TextView = itemView.findViewById(R.id.date)
        val grpStage: TextView = itemView.findViewById(R.id.time)
        val play1: TextView = itemView.findViewById(R.id.play1)
        val play2: TextView = itemView.findViewById(R.id.play2)
        val play3: TextView = itemView.findViewById(R.id.play3)
    }
}package dev.inmo.krontab.internal

import korlibs.time.DateTime
import korlibs.time.TimezoneOffset
import dev.inmo.krontab.KronScheduler

/**
 * @param daysOfWeek 0-6
 * @param years any int
 * @param months 0-11
 * @param daysOfMonth 0-30
 * @param hours 0-23
 * @param minutes 0-59
 * @param seconds 0-59
 */
internal data class CronDateTime(
    val daysOfWeek: Array<Byte>? = null,
    val years: Array<Int>? = null


    A[i] = A[i] + C[i];
  }
  // Calculate the inverse of B
  invert_1d_2x2_matrix(B, IB);
}

//------------------------------------------------------------------------------
// documentation is inherited
void TemperatureComponent::run(const double runToDate) {
  H_LOG(logger, Logger::DEBUG) << "temperature run " << runToDate << std::endl;

  // Commented section below is for case of user-specified temperature record.
  // Temperature component can't handle that at the moment!

  //// We track total radiative forcing using internal variable `internal_Ftot`
  //// Need to do this because if we're subject to a user constraint (being
  /// forced / to match a temperature record), need to track the Ftot that
  ///*would* have / produced the observed temperature record. This way there's a
  /// smooth / transition when we exit the constraint period, after which
  /// internal_Ftot / will rise in parallel with the value reported by
  /// ForcingComponent.

  // If we never had any temperature constraint, `internal_Ftot` will match
  // `Ftot`.

  // Some needed inputs
  int tstep = runToDate - core->getStartDate();

  // Calculate the total aresol forcing from aerosol-radiation interactions and
  // the aerosol-cloud interactions so that that total aerosol forcing can be
  // adjusted by the aerosol forcing scaling factor.
  double aero_forcing =
      core->sendMessage(M_GETDATA, D_RF_BC, message_data(runToDate))
          .value(U_W_M2) +
      core->sendMessage(M_GETDATA, D_RF_OC, message_data(runToDate))
          .value(U_W_M2) +
      core->sendMessage(M_GETDATA, D_RF_NH3, message_data(runToDate))
          .value(U_W_M2) +
      core->sendMessage(M_GETDATA, D_RF_SO2, message_data(runToDate))
          .value(U_W_M2) +
      core->sendMessage(M_GETDATA, D_RF_ACI, message_data(runToDate))
          .value(U_W_M2);

  double volcanic_forcing =
      double(core->sendMessage(M_GETDATA, D_RF_VOL, message_data(runToDate)));

  // Adjust total forcing to account for the aerosol and volcanic forcing
  // scaling factor
  const double ftot = core->sendMessage(M_GETDATA, D_RF_TOTAL, message_data(runToDate)).value(U_W_M2);
  forcing[tstep] =
      double(ftot) -
      (1.0 - alpha) * aero_forcing - (1.0 - volscl) * volcanic_forcing;

  // Initialize variables for time-stepping through the model
  double DQ1 = 0.0;
  double DQ2 = 0.0;
  double QC1 = 0.0;
  double QC2 = 0.0;
  double DelQL = 0.0;
  double DelQO = 0.0;
  double DPAST1 = 0.0;
  double DPAST2 = 0.0;
  double DTEAUX1 = 0.0;
  double DTEAUX2 = 0.0;

  // Reset the endogenous varibales for this time


id=OIP.hV56BStUlqvaNDFoDwo5kAHaFj&pid=Api&P=0&h=180',
    duration: '10:20',
    timestamp: DateTime(2021, 3, 20),
    viewCount: '10M',
    likes: '2M',
    dislikes: '4',
  ),
  Video(
    id: 'x606y4QWrxo',
    author: currentUser,
    title: 'Chhota Bheem | Cartoons for Kids | Funny Kids Video',
    thumbnailUrl:
        'https://www.newszii.com/wp-content/uploads/2016/09/Science-Fiction-Movies_v29.jpg',
    duration: '8:20',
    timestamp: DateTime(2021, 3, 20),
    viewCount: '100K',
    likes: '95K',
    dislikes: '4',
  ),
  Video(
    id: 'x606y4QWrxo',
    author: currentUser,
    title: 'Chhota Bheem | Cartoons for Kids | Funny Kids Video',
    thumbnailUrl:
        'https://www.newszii.com/wp-content/uploads/2016/09/Science-Fiction-Movies_v24.jpg',
    duration: '6:20',
    timestamp: DateTime(2021, 3, 20),
    viewCount: '5K',
    likes: '58',
    dislikes: '4',
  ),
];

final List<Video> suggestedVideos = [
  Video(
    id: 'rJKN_880b-M',
    author: currentUser,
    title: 'Flutter Netflix Clone Responsive UI Tutorial | Web and Mobile',
    thumbnailUrl: 'https://i.ytimg.com/vi/rJKN_880b-M/0.jpg',
    duration: '1:13:15',
    timestamp: DateTime(2020, 8, 22),
    viewCount: '312K',
    likes: '8.9k',
    dislikes: '7',
  ),
  Video(
    id: 'HvLb5gdUfDE',
    author: currentUser,
    title: 'Flutter Facebook Clone Responsive UI Tutorial | Web and Mobile',
    thumbnailUrl: 'https://i.ytimg.com/vi/HvLb5gdUfDE/0.jpg',
    duration: '1:52:12',
    timestamp: DateTime(2020, 8, 7),
    viewCount: '290K',
    likes: '9.3K',
    dislikes: '45',
  ),
  Video(
    id: 'h-igXZCCrrc',
    author: currentUser,
    title: 'Flutter Chat UI Tutorial | Apps From Scratch',
    thumbnailUrl: 'https://i.ytimg.com/vi/h-igXZCCrrc/0.jpg',
    duration: '1:03:58',
    timestamp: DateTime(2019, 10, 17),
    viewCount: '1.5M',
    likes: '200k',
    dislikes: '8',
  ),
];

final List<String> ids = [
  'nPt8bK2gbaU',
  'gQDByCdjUXw',
  'iLnmTe5Q2Qw',
  '_WoCV4c6XOE',
  'KmzdUe0RSJo',
  '6jZDSSZZxjQ',
  'p2lYr3vM_1w',
  '7QUtEmBT_-w',
  '34_PXCzGw1M',
];
//

import 'package:country_picker/country_picker.dart';
import 'package:flutter/material.dart';

ScaffoldFeatureController<SnackBar, SnackBarClosedReason> showSnackbar({
  required BuildContext context,
  required String title,
  Duration duration = const Duration(milliseconds: 2000),
  SnackBarAction? action,
}) {
  ScaffoldMessenger.of(context).clearSn


process.Id.ToString());
                if (p.WaitForExit(msWait) && p.ExitCode != 0) return process;

                for (var i = 0; i < times && !process.GetHasExited(); i++)
                {
                    Thread.Sleep(interval);
                }
            }
            else if (Runtime.Windows)
            {
                var p = Process.Start("taskkill", $"-pid {process.Id}");
                if (p.WaitForExit(msWait) && p.ExitCode != 0) return process;

                for (var i = 0; i < times && !process.GetHasExited(); i++)
                {
                    Thread.Sleep(interval);
                }
            }
        }
        catch (Exception ex)
        {
            span?.AppendTag(ex.Message);
        }

        //if (!process.GetHasExited()) process.Kill();

        return process;
    }

    /// 强制结束进程树，包含子进程
    /// <param name="process">目标进程</param>
    /// <param name="msWait">等待退出的时间。默认5000毫秒</param>
    /// <returns></returns>
    public static Process? ForceKill(this Process process, Int32 msWait = 5_000)
    {
        if (process?.GetHasExited() != false) return process;

        var span = DefaultSpan.Current;
        //XTrace.WriteLine("强杀，大力出奇迹！PID={0}/{1}", process.Id, process.ProcessName);
        span?.AppendTag($"ForceKill，大力出奇迹！PID={process.Id}/{process.ProcessName}");

        // 终止指定的进程及启动的子进程,如nginx等
        // 在Core 3.0, Core 3.1, 5, 6, 7, 8, 9 中支持此重载
        // https://learn.microsoft.com/zh-cn/dotnet/api/system.diagnostics.process.kill?view=net-8.0#system-diagnostics-process-kill(system-boolean)
        try
        {
#if NETCOREAPP
            process.Kill(true);
#else
            process.Kill();
#endif
        }
        catch (Exception ex)
        {
            span?.AppendTag(ex.Message);
        }

        if (process.GetHasExited()) return process;

        try
        {
            if (Runtime.Linux)
            {
                //-9 SIGKILL 强制终止信号
                Process.Start("kill", $"-9 {process.Id}").WaitForExit(msWait);
            }
            else if (Runtime.Windows)
            {
                // /f 指定强制终止进程，有子进程时只能强制
                // /t 终止指定的进程和由它启用的子进程
                Process.Start("taskkill", $"/t /f /pid {process.Id}").WaitForExit(msWait);
            }
        }
        catch (Exception ex)
        {
            span?.AppendTag(ex.Message);
        }

        // 兜底再来一次
        if (!process.GetHasExited())
        {
            try
            {
#if NETCOREAPP
                process.Kill(true);
#else
                process.Kill();
#endif
            }
            catch (Exception ex)
            {
                span?.AppendTag(ex.Message);
            }
        }

        return process;
    }

    /// 获取进程是否终止
    public static Boolean GetHasExited(this Process process)
    {
        try
        {
            return process.HasExited;
        }
        catch (Win32Exception)
        {


if (zone.done())
            comp.emplace();
        else
            comp.emplace(zone);
    }

    bool done() const { return zone.done(); }

    void next() {
        JS_ASSERT(!done());
        JS_ASSERT(!comp.ref().done());
        comp->next();
        if (comp->done()) {
            comp.reset();
            zone.next();
            if (!zone.done())
                comp.emplace(zone);
        }
    }

    JSCompartment *get() const {
        JS_ASSERT(!done());
        return *comp;
    }

    operator JSCompartment *() const { return get(); }
    JSCompartment *operator->() const { return get(); }
};

typedef CompartmentsIterT<ZonesIter> CompartmentsIter;

// Return the Zone* of a Value. Asserts if the Value is not a GC thing.
Zone *
ZoneOfValue(const JS::Value &value);

} // namespace js

#endif // gc_Zone_h


from sklearn import linear_model
from sklearn.model_selection import train_test_split
from sklearn.metrics import accuracy_score, classification_report, ConfusionMatrixDisplay
from Preprocessing import *

ridge_model = linear_model.RidgeClassifier()

# Train the model on the training data
ridge_model.fit(X_train, y_train)

# Make predictions on the test data
y_pred_test = ridge_model.predict(X_test)
y_pred_train = ridge_model.predict(X_train)

# Evaluate Train Model
accuracy_train = accuracy_score(y_train, y_pred_train)
classification_rep_train = classification_report(y_train, y_pred_train)
print(f'Train Accuracy: {accuracy_train:.2f}')
print('Train Classification Report:\n', classification_rep_train)
confusion_matrix_train = ConfusionMatrixDisplay.from_predictions(y_train, y_pred_train, display_labels=le.classes_)

# Evaluate Test Model
accuracy_test = accuracy_score(y_test, y_pred_test)
classification_rep_test = classification_report(y_test, y_pred_test)
print(f'Test Accuracy: {accuracy_test:.2f}')
print('Test Classification Report:\n', classification_rep_test)
confusion_matrix_test = ConfusionMatrixDisplay.from_predictions(y_test, y_pred_test, display_labels=le.classes_)


�响应
        assertNotNull(response);
        assertNotNull(response.getDocument());
        assertNotNull(response.getDocument().getId());
        assertEquals(request.getName(), response.getDocument().getName());

        System.out.println("使用自定义处理规则创建文档成功，ID: " + response.getDocument().getId());
        System.out.println("文档名称: " + response.getDocument().getName());
        System.out.println("处理规则模式: custom");
    }

    /**
     * 测试不同处理模式的效果对比
     */
    @Test
    public void testDifferentProcessModes() throws IOException, DifyApiException {
        // 跳过测试如果没有测试知识库
        if (testDatasetId == null) {
            System.out.println("跳过测试，因为没有测试知识库");
            return;
        }

        String testText = "这是一个长文档的示例内容。\n\n" +
                         "第一段：介绍部分，这里描述了文档的基本信息和背景。\n" +
                         "第二段：详细内容，这里包含了具体的技术细节和实现方案。\n" +
                         "第三段：总结部分，这里总结了主要观点和结论。\n\n" +
                         "更多内容会继续展开...";

        // 测试自动模式
        ProcessRule automaticRule = ProcessRule.builder()
                .mode("automatic")
                .build();

        CreateDocumentByTextRequest automaticRequest = CreateDocumentByTextRequest.builder()
                .name("自动模式文档-" + System.currentTimeMillis())
                .text(testText)
                .indexingTechnique("economy")
                .docForm("text_model")
                .docLanguage("Chinese")
                .processRule(automaticRule)
                .build();

        DocumentResponse automaticResponse = datasetsClient.createDocumentByText(testDatasetId, automaticRequest);
        System.out.println("自动模式文档创建成功，ID: " + automaticResponse.getDocument().getId());

        // 测试自定义模式
        ProcessRule.Segmentation customSegmentation = ProcessRule.Segmentation.builder()
                .separator("\n\n")  // 使用双换行符作为分隔符
                .maxTokens(200)     // 较小的分段大小
                .build();

        ProcessRule.Rules customRules = ProcessRule.Rules.builder()
                .preProcessingRules(Arrays.asList(
                    ProcessRule.PreProcessingRule.builder()
                        .id("remove_extra_spaces")
                        .enabled(true)
                        .build()
                ))
                .segmentation(customSegmentation)
                .build();

        ProcessRule customRule = ProcessRule.builder()
                .mode("custom")
                .rules(customRules)
                .build();

        CreateDocumentByTextRequest customRequest = CreateDocumentByTextRequest.builder()
                .name("自定义模式文档-" + System.currentTimeMillis())
                .text(testText)
                .indexingTechnique("economy")
                .docForm("text_model")
                .docLanguage("Chinese")
                .processRule(customRule)
                .build();

        DocumentResponse cus


 CatalogService

    @Autowired
    private lateinit var transactionManager: PlatformTransactionManager

    override fun exec() {
        log.info("Update acls for groups.")

        ClosableTransaction(transactionManager).use {
            try {
                setAdminAuthentication("Migration", "Task")
                catalogService.getCatalogs().forEach { catalog: Catalog ->
                    log.info("Update Catalog: " + catalog.name)
                    saveAllGroupsOfCatalog(catalog.identifier)
                }
            } catch (e: NotFoundException) {
                log.debug("Cannot update acl entries to include BasePermission.ADMINISTRATION")
            }
        }
    }

    private fun saveAllGroupsOfCatalog(catalogIdentifier: String) {
        groupService
            .getAll(catalogIdentifier)
            .forEach { group ->
                groupService.update(catalogIdentifier, group.id!!, group, true)
            }
    }
}
/**
 * ==================================================
 * Copyright (C) 2024-2025 wemove digital solutions GmbH
 * ==================================================
 * Licensed under the EUPL, Version 1.2 or – as soon they will be
 * approved by the European Commission - subsequent versions of the
 * EUPL (the "Licence");
 *
 * You may not use this work except in compliance with the Licence.
 * You may obtain a copy of the Licence at:
 *
 * https://joinup.ec.europa.eu/software/page/eupl
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the Licence is distributed on an "AS IS" basis,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the Licence for the specific language governing permissions and
 * limitations under the Licence.
 */
package de.ingrid.igeserver.features.ogc_api_records.profiles.ingrid

import de.ingrid.igeserver.features.ogc_api_records.services.research_query.OgcApiResearchQuery
import de.ingrid.igeserver.features.ogc_api_records.services.research_query.OgcFilterParameter
import de.ingrid.igeserver.model.BoolFilter
import org.intellij.lang.annotations.Language
import org.springframework.context.annotation.Profile
import org.springframework.stereotype.Component

@Profile("ingrid | ingrid-hmdk")
@Component
class OgcApiResearchQueryIngrid : OgcApiResearchQuery() {
    override val profiles = listOf("ingrid", "ingrid-hmdk")

    override fun profileSpecificClauses(ogcParameter: OgcFilterParameter): MutableList<BoolFilter>? {
        val clausesList: MutableList<BoolFilter> = mutableListOf()

        ogcParameter.bbox?.let { bbox ->
            val boundingBox = bbox.map { coordinate -> coordinate.toString() }
            clausesList.add(BoolFilter("OR", listOf("ingridSelectSpatial"), null, boundingBox, true))
        }

        ogcParameter.q?.let { qParameter ->
            clausesList.add(BoolFilter("OR", listOf(qParameterSQL(qParameter)), null, null, false))
        }

        return clausesList
    }

    @Language("PostgreSQL")
    private fun qParameterSQL(qParameter: List<String>): String {
        val titleCondition = qParameter.joinToString(" OR ") { "title ILIKE '%$it%'" }
        val descriptionCondition = qParameter.joinToString(" OR ") { "data ->> 'description' ILIKE '%$it%'" }
        val alternateTitleCondition = qParameter.joinToString(" OR ") { "data ->> 'alternateTitle' ILIKE '%$it%'" }
        val freeKeywordsCondition = qParameter.joinToString(" OR ") { "EXISTS (SELECT 1 FROM jsonb_array_elements(data -> 'keywords' -> 'free') AS keyword WHERE keyword ->> 'label' ILIKE '%$it%')" }

        return """
            ($titleCondition)
            OR ($descriptionCondition)
            OR ($alternateTitleCondition)
            OR ($freeKeywordsCondition)
        """
    }
}
/**
 * ==================================================
 * Copyright (C) 2025 wemove digital solutions GmbH
 * ==================================================
 * Licensed u


pma_navigation_tree .list_container{border-left:1px solid #666;margin-left:.75em;padding-left:.75em}#pma_navigation_tree .list_container li.last.database{margin-bottom:0 !important}#pma_navigation_tree .last>.list_container{border-left:0 solid #666}li.fast_filter{padding-left:.75em;margin-left:.75em;padding-right:35px;border-left:1px solid #666;list-style:none}li.fast_filter input{font-size:.7em}li.fast_filter .searchClauseClear{font-weight:bold;color:#800;font-size:.7em}li.fast_filter.db_fast_filter{border:0;margin-left:0}#navigation_controls_outer{min-height:21px !important}#navigation_controls_outer.activePointer{background-color:rgba(0,0,0,0) !important}#navigation_controls{float:right;padding-right:23px}#pma_navigation_resizer{width:1px !important;height:100%;background-color:rgba(0,0,0,.125);cursor:col-resize;position:fixed;top:0;left:240px;z-index:801}#pma_navigation_collapser{width:20px;height:22px;line-height:22px;background:#eee;color:#555;font-weight:bold;position:fixed;top:0;left:240px;text-align:center;cursor:pointer;z-index:800;text-shadow:0 1px 0 #fff;filter:dropshadow(color=#fff, offx=0, offy=1);border:1px solid rgba(0,0,0,.125)}.pma_quick_warp{margin-top:5px;margin-left:2px;position:relative}.pma_quick_warp .drop_list{float:left;margin-left:3px;padding:2px 0}.pma_quick_warp .drop_list:hover .drop_button{background:#fff}.pma_quick_warp .drop_list:hover ul{display:block}.pma_quick_warp .drop_list ul{position:absolute;margin:0;padding:0;overflow:hidden;overflow-y:auto;list-style:none;background:#fff;border:1px solid #ddd;border-radius:.3em;border-top-right-radius:0;border-bottom-right-radius:0;box-shadow:0 0 5px #ccc;top:100%;left:3px;right:0;display:none;z-index:802}.pma_quick_warp .drop_list li{white-space:nowrap;padding:0;border-radius:0}.pma_quick_warp .drop_list li img{vertical-align:sub}.pma_quick_warp .drop_list li:hover{background:#f2f2f2}.pma_quick_warp .drop_list a{display:block;padding:.2em .3em}.pma_quick_warp .drop_list a.favorite_table_anchor{clear:left;float:left;padding:.1em .3em 0}.pma_quick_warp .drop_button{padding:.3em;border:1px solid #ddd;border-radius:.3em;background:#f2f2f2;cursor:pointer}.input_tab{background-color:#a6c7e1;color:#000}.content_fullscreen{position:relative;overflow:auto}#canvas_outer{position:relative;width:100%;display:block}#canvas{background-color:#fff;color:#000}canvas.designer{display:inline-block;overflow:hidden;text-align:left}canvas.designer *{behavior:url(#default#VML)}.designer_tab{background-color:#fff;color:#000;border-collapse:collapse;border:1px solid #aaa;z-index:1;-webkit-user-select:none;-moz-user-select:none;user-select:none}.designer_tab .header{background:linear-gradient(#b8e6fa, #b8e6fa 6%, #cdf5fd


 {
  if (display.cachedPaddingH) return display.cachedPaddingH;
  var e = removeChildrenAndAdd(display.measure, elt("pre", "x"));
  var style = window.getComputedStyle ? window.getComputedStyle(e) : e.currentStyle;
  var data = {left: parseInt(style.paddingLeft), right: parseInt(style.paddingRight)};
  if (!isNaN(data.left) && !isNaN(data.right)) display.cachedPaddingH = data;
  return data;
}

function scrollGap(cm: CodeMirror) { return scrollerGap - cm.display.nativeBarWidth; }
function displayWidth(cm: CodeMirror) {
  return cm.display.scroller.clientWidth - scrollGap(cm) - cm.display.barWidth;
}
function displayHeight(cm: CodeMirror) {
  return cm.display.scroller.clientHeight - scrollGap(cm) - cm.display.barHeight;
}

/**
 * Ensure the lineView.wrapping.heights array is populated. This is
 * an array of bottom offsets for the lines that make up a drawn
 * line. When lineWrapping is on, there might be more than one
 * height.
 */
function ensureLineHeights(cm: CodeMirror, lineView: LineView, rect: Rect) {
  var wrapping = cm.options.lineWrapping;
  var curWidth = wrapping && displayWidth(cm);
  if (!lineView.measure.heights || wrapping && lineView.measure.width != curWidth) {
    var heights = lineView.measure.heights = [];
    if (wrapping) {
      lineView.measure.width = curWidth;
      var rects = lineView.text.firstChild.getClientRects();
      for (var i = 0; i < rects.length - 1; i++) {
        var cur = rects[i], next = rects[i + 1];
        if (Math.abs(cur.bottom - next.bottom) > 2)
          heights.push((cur.bottom + next.top) / 2 - rect.top);
      }
    }
    heights.push(rect.bottom - rect.top);
  }
}

/**
 * Find a line map (mapping character offsets to text nodes) and a
 * measurement cache for the given line number. (A line view might
 * contain multiple lines when collapsed ranges are present.)
 */
function mapFromLineView(lineView: LineView, line: Line, lineN: number) {
  if (lineView.line == line)
    return {map: lineView.measure.map, cache: lineView.measure.cache};
  for (var i = 0; i < lineView.rest.length; i++)
    if (lineView.rest[i] == line)
      return {map: lineView.measure.maps[i], cache: lineView.measure.caches[i]};
  for (var i = 0; i < lineView.rest.length; i++)
    if (lineNo(lineView.rest[i]) > lineN)
      return {map: lineView.measure.maps[i], cache: lineView.measure.caches[i], before: true};
}

/**
 * Render a line into the hidden node display.externalMeasured. Used
 * when measurement is needed for a line that's not in the viewport.
 */
function updateExternalMeasurement(cm: CodeMirror, line: Line) {
  line = visualLine(line);
  var lineN = lineNo(line);
  var view = cm.display.externalMeasured = new LineView(cm.doc, line, lineN);
  view.lineN = lineN;
  var built = view.built = buildLineContent(cm, view);
  view.text = built.pre;
  removeChildrenAndAdd(cm.display.lineMeasure, built.pre);
  return view;
}

/**
 * Get a {top, bottom, left, right} box (in line-local coordinates)
 * for a given character.
 */
function measureChar(cm: CodeMirror, line: number, ch: number, bias) {
  retu


fferSend
        #define xStreamBufferReceive                   MPU_xStreamBufferReceive
        #define xStreamBufferNextMessageLengthBytes    MPU_xStreamBufferNextMessageLengthBytes
        #define vStreamBufferDelete                    MPU_vStreamBufferDelete
        #define xStreamBufferIsFull                    MPU_xStreamBufferIsFull
        #define xStreamBufferIsEmpty                   MPU_xStreamBufferIsEmpty
        #define xStreamBufferReset                     MPU_xStreamBufferReset
        #define xStreamBufferSpacesAvailable           MPU_xStreamBufferSpacesAvailable
        #define xStreamBufferBytesAvailable            MPU_xStreamBufferBytesAvailable
        #define xStreamBufferSetTriggerLevel           MPU_xStreamBufferSetTriggerLevel
        #define xStreamBufferGenericCreate             MPU_xStreamBufferGenericCreate
        #define xStreamBufferGenericCreateStatic       MPU_xStreamBufferGenericCreateStatic

/* Remove the privileged function macro, but keep the PRIVILEGED_DATA
 * macro so applications can place data in privileged access sections
 * (useful when using statically allocated objects). */
        #define PRIVILEGED_FUNCTION
        #define PRIVILEGED_DATA    __attribute__( ( section( "privileged_data" ) ) )
        #define FREERTOS_SYSTEM_CALL

    #else /* MPU_WRAPPERS_INCLUDED_FROM_API_FILE */

/* Ensure API functions go in the privileged execution section. */
        #define PRIVILEGED_FUNCTION     __attribute__( ( section( "privileged_functions" ) ) )
        #define PRIVILEGED_DATA         __attribute__( ( section( "privileged_data" ) ) )
        #define FREERTOS_SYSTEM_CALL    __attribute__( ( section( "freertos_system_calls" ) ) )

    #endif /* MPU_WRAPPERS_INCLUDED_FROM_API_FILE */

#else /* portUSING_MPU_WRAPPERS */

    #define PRIVILEGED_FUNCTION
    #define PRIVILEGED_DATA
    #define FREERTOS_SYSTEM_CALL

#endif /* portUSING_MPU_WRAPPERS */

#endif /* MPU_WRAPPERS_H */


"state_id": "2444"
	},
	{
		"id": "28566",
		"name": "La Joya",
		"state_id": "2444"
	},
	{
		"id": "28567",
		"name": "Los Arcos",
		"state_id": "2444"
	},
	{
		"id": "28568",
		"name": "Mazatepec",
		"state_id": "2444"
	},
	{
		"id": "28569",
		"name": "Miacatlan",
		"state_id": "2444"
	},
	{
		"id": "28570",
		"name": "Oaxtepec",
		"state_id": "2444"
	},
	{
		"id": "28571",
		"name": "Ocuituco",
		"state_id": "2444"
	},
	{
		"id": "28572",
		"name": "Pedro Amaro",
		"state_id": "2444"
	},
	{
		"id": "28573",
		"name": "Progreso",
		"state_id": "2444"
	},
	{
		"id": "28574",
		"name": "Puente de Ixtla",
		"state_id": "2444"
	},
	{
		"id": "28575",
		"name": "San Jose Vista Hermosa",
		"state_id": "2444"
	},
	{
		"id": "28576",
		"name": "San Nicolas Galeana",
		"state_id": "2444"
	},
	{
		"id": "28577",
		"name": "Santa Catarina",
		"state_id": "2444"
	},
	{
		"id": "28578",
		"name": "Santa Rosa Treinta",
		"state_id": "2444"
	},
	{
		"id": "28579",
		"name": "Tehuixtla",
		"state_id": "2444"
	},
	{
		"id": "28580",
		"name": "Telixtac",
		"state_id": "2444"
	},
	{
		"id": "28581",
		"name": "Temixco",
		"state_id": "2444"
	},
	{
		"id": "28582",
		"name": "Temoac",
		"state_id": "2444"
	},
	{
		"id": "28583",
		"name": "Tenextepango",
		"state_id": "2444"
	},
	{
		"id": "28584",
		"name": "Tepalcingo",
		"state_id": "2444"
	},
	{
		"id": "28585",
		"name": "Tepoztlan",
		"state_id": "2444"
	},
	{
		"id": "28586",
		"name": "Tetecala",
		"state_id": "2444"
	},
	{
		"id": "28587",
		"name": "Tetela del Volcan",
		"state_id": "2444"
	},
	{
		"id": "28588",
		"name": "Tilzapotla",
		"state_id": "2444"
	},
	{
		"id": "28589",
		"name": "Tlacotepec",
		"state_id": "2444"
	},
	{
		"id": "28590",
		"name": "Tlalnepantla",
		"state_id": "2444"
	},
	{
		"id": "28591",
		"name": "Tlaltizapan",
		"state_id": "2444"
	},
	{
		"id":


regime.type.GROUNDS)
    tpz.regime.checkRegime(player, mob, 815, 1, tpz.regime.type.GROUNDS)
    tpz.regime.checkRegime(player, mob, 816, 2, tpz.regime.type.GROUNDS)
    tpz.regime.checkRegime(player, mob, 817, 2, tpz.regime.type.GROUNDS)
    tpz.regime.checkRegime(player, mob, 818, 2, tpz.regime.type.GROUNDS)
    tpz.regime.checkRegime(player, mob, 819, 2, tpz.regime.type.GROUNDS)
end

function onMobDespawn(mob)
    tpz.mob.phOnDespawn(mob, ID.mob.CENTURIO_X_I_PH, 10, 9000) -- 2.5 hours
    tpz.mob.phOnDespawn(mob, ID.mob.ANTICAN_PROCONSUL_PH, 10, 3600) -- 1 hour
end


vote = "",
		detail = "皇家海軍的榮耀，請您盡情欣賞吧",
		couple_encourage = {
			{
				{
					20401
				},
				1,
				"聲望，可不要又分心了",
				0
			},
			{
				{
					20402
				},
				1,
				"保持禮儀，反擊",
				0
			},
			{
				{
					20501
				},
				1,
				"為您效勞，陛下",
				0
			},
			{
				{
					2
				},
				5,
				"前進吧，我們是皇家的榮耀",
				3
			}
		}
	},
	[204031] = {
		touch = "沙灘排球比賽馬上就要開始了。指揮官，一起來欣賞吧",
		feeling3 = "",
		upgrade = "",
		expedition = "",
		win_mvp = "",
		home = "",
		mission = "",
		touch2 = "指揮官，威爾斯就是因為總是這樣，才成為不了國王的",
		feeling1 = "",
		skill = "",
		drop_descrip = "呼呼…大飽眼福，心情大好~果然度假就應該在海邊！小天鵝，用你的排球去給Sis.Sara一點顏色看看！",
		mail = "",
		lose = "",
		propose = "",
		hp_warning = "",
		id = 204031,
		voice_key = 0,
		feeling5 = "",
		main = "沙灘排球得分最少的我方隊員要接受一個小小的懲罰遊戲~|從山頂向下眺望，整個港區都能盡收眼底，正是觀賞煙火的最佳席位|時刻保持優雅正是淑女的禮儀",
		voice_key_2 = -1,
		profile = "",
		mission_complete = "",
		headtouch = "",
		feeling2 = "",
		feeling4 = "",
		unlock = "呼呼…大飽眼福，心情大好~果然度假就應該在海邊！小天鵝，用你的排球去給Sis.Sara一點顏色看看！",
		battle = "",
		login = "貴安，指揮官，不要讓外界的燥熱影響你的內心。時刻保持冷靜才能做出正確的判斷",
		vote = "",
		detail = "我照耀著太陽？心情大好~這份讚美我就收下了",
		couple_encourage = {}
	},
	[204038] = {
		touch = "指揮官，我來教你與淑女相處的禮儀吧",
		feeling3 = "",
		upgrade = "",
		expedition = "",
		win_mvp = "",
		home = "每當你的容顏


        cls = np.array(result.boxes.cls.cpu(), dtype="int")
        conf = np.array(result.boxes.conf.cpu(), dtype="float")
        data = []

        # 遍历每个目标框
        for box, cls, conf in zip(box, cls, conf):
            # 获取目标框左上角和右下角的坐标
            x, y, w, h = box
            label = result.names.get(cls)
            # 获取目标框对应的类别标签和置信度得分
            confidence = float(conf)
            # 将目标框信息添加到列表中
            data.append({
                "x": int(x),
                "y": int(y),
                "w": int(w),
                "h": int(h),
                "label": label,
                "confidence": confidence
            })

        print('----------')
        json_data = json.dumps(data)
        print(json_data)

        return JsonResponse(json_data, safe=False)

    json_data = [
        {
            "x": 100,
            "y": 150,
            "w": 50,
            "h": 80,
            "label": "person",
            "confidence": 0.85
        },
        {
            "x": 250,
            "y": 100,
            "w": 80,
            "h": 60,
            "label": "car",
            "confidence": 0.92
        }
    ]

    return JsonResponse("", safe=False)

# 轮廓检测
def line(request):
    if request.method == 'POST':
        # 处理接收的值
        image = request.FILES.get('file')
        threshold_value = int(request.POST.get('threshold_value', 128))
        max_value = int(request.POST.get('max_value', 255))
        threshold_type = int(request.POST.get('threshold_type', cv2.THRESH_BINARY))
        model = int(request.POST.get('model', cv2.RETR_EXTERNAL))
        method = int(request.POST.get('method', cv2.CHAIN_APPROX_SIMPLE))

        # 读取图像数据
        # print(image)
        image_data = image.read()
        image_array = np.fromstring(image_data, np.uint8)
        img = cv2.imdecode(image_array, cv2.IMREAD_COLOR)

        # show(img)

        # 对图像进行处理
        # 将图像转换为灰度图像
        gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)

        # 进行阈值处理
        ret, thresh = cv2.threshold(gray, threshold_value, max_value, threshold_type)

        # 寻找轮廓
        contours, hierarchy = cv2.findContours(thresh, model, method)

        # 创建一个空白图像作为结果
        result = np.zeros_like(img)

        # 绘制轮廓
        cv2.drawContours(result, contours, -1, (0, 255, 0), 2)

        # 将原始图像和轮廓图像合并
        merged = cv2.addWeighted(img, 1, result, 0.5, 0)

        # 将处理后的图像转换为多种格式的字节流
        retval, buffer = cv2.imencode('.jpeg', merged)
        image_data = buffer.tobytes()
        image_base64 = base64.b64encode(image_data).decode('utf-8')

        image.close()
        return JsonResponse({'image_base64': image_base64})
    else:
        return JsonResponse({'error': 'Invalid request method'})

# 直线
def zline(request):
    if request.method == 'POST':
        # 处理接收的值
        image = request.FILES.get('file')

        # 读取图像数据
        # print(image)
        image_data = image.read()
        image_array = np.fromstring(image_data, np.uint8)
        img = cv2.imdecode(image_array, cv2.IMREAD_COLOR)
        rho = int(request.POST.get('rho', 1))
        theta = float(request.POST.get('theta', np.pi / 180))
        threshold = int(request.POST.get('threshold', 100))
        threshold1 = int(request.POST.get('threshold1', 100))
        threshold2 = int(request.POST.get('threshold2', 200))
        edges = request.POST.get('edges', None)
        apertureSize = int(request.POST.get('apertureSize', 3))
        L2gradient = request.POST.get('L2gradient', False) == 'true'
        # 将图像转换为灰度图像
        gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)

        # 进行边缘检测
        edges = cv2.Canny(gray, threshold1, threshold2, apertureSize=apertureSize, L2gradient=L2gradient)

        # 进行直线检测
        lines = cv2.HoughLines(edges, rho, theta, threshold=threshold)

        # 创建一个空白图像作为结果
        result = np.zeros_like(img)

        # 绘制检测到的直线
        if lines is not None:
            for rho, theta in lines[:, 0]:
                a = np.cos(theta)
                b = np.sin(theta)
                x0 = a * rho
                y0 = b * rho
                x1 = int(x0 + 1000 * (-b))
                y1 = int(y0 + 1000 * (a))
                x2 = int(x0 - 1000 * (-b))
                y2 = int(y0 - 1000 * (a))
                cv2.line(img, (x1, y1), (x2, y2), (0, 0, 255), 2)

        # 将原始图像和直线检测结果合并
        merged = cv2.addWeighted(img, 1, result, 0.5, 0)

        # 将处理后的图像转换为多种格式的字节流
        retval, buffer = cv2.imencode('.jpeg', merged)
        image_data = buf


WM9Af/NNsEg0XqxAcD3AGzjQVOW/AoqioKWlKOKamuAmfb+lLeqYuK8ASVwX6Hv6FTdmv463Vn8CuOp9ss1nSsKeoEa94a9F1/xezeAhPiVzrfXSlGvtWH8cWT425aO4f6ULciKPQVW5eoXQMtuPkjUZeC0+X2+FuqBYNLdcO4cXcvXgpbz+KXBvNbTdCl8wmIwF5MyFBvvUfRuWKXbg8dAoXBn/CH/dO8m7MTBIY6xXrwF4wvB9IQAISkIBzEodY1lQ418KtutiFk9dXsF4vwWZXKZ7Ti2FTHj1dz9gtnA/9i86wH6PxKAGnZk1aAapc67DJ+Sx0cek23XZZe42t6Bzx48JIN/4J9y5vQK8tG88LtBfSy5I+TOWMlNCygrEwOh5eFXUlpQDlJ1SNjKJydoNZRH5ClV2YyxgCEpCADAEJSEACMgQkIAEJyBCQgAQkIENAAhKQgExSgAEjNkGJGeaxWUACtkSGAyDizPCkmUir/MP6h9HQoCZqn/jeS56kMiDqe1GNCv8RN5sIAQlIQIaABFya+U+AAQBLjB3QxtGdmwAAAABJRU5ErkJggg==")
}

.fileList .ico-access,
.fileList .ico-mdb,
.fileList .ico-accdb,
.fileList .ico-sql,
.fileList .ico-db {
    background-image: url("../img/ico/ico-access.png")
}

.fileList .ico-c {
    background-image: url("../img/ico/ico-c.png")
}

.fileList .ico-cpp {
    background-image: url("../img/ico/ico-cpp.png")
}

.fileList .ico-cs {
    background-image: url("../img/ico/ico-cs.png")
}

.fileList .ico-js {
    background-image: url("../img/ico/ico-js.png")
}

.fileList .ico-fla,
.fileList .ico-flv {
    background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAABQCAYAAACOEfKtAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAz5JREFUeNrsnL1vEmEcxx8OOE1LEUyKthATgqYJ6eKEM8QRZ1+WmrropJs6mLjof6CJL9HFl7nMJY7SmLg0JIaBRBKrkBhDW2Io3Hm/B69eT6D3Qjm4+36TJwcctL1Pvr+3p+F8siwzyLoEIABARxUYdrJcLovK4YGyVpQVd8tFxxOJp8rhltH3nwiHrQFU9DASidyNRqMsEAi4Al6lUmGNev3mfCzGzEC0CnCV4AmCwCRJck3YnV5YYN+3tkYC8bAcOE/w


 governing permissions and
 * limitations under the License.
 */

package com.mayakapps.compose.windowstyler

import java.awt.AlphaComposite
import java.awt.Graphics
import java.awt.Graphics2D
import javax.swing.JPanel

internal class HackedContentPane : JPanel() {

    override fun paint(g: Graphics) {
        if (background.alpha != 255) {
            val gg = g.create()
            try {
                if (gg is Graphics2D) {
                    gg.setColor(background)
                    gg.composite = AlphaComposite.getInstance(AlphaComposite.SRC)
                    gg.fillRect(0, 0, width, height)
                }
            } finally {
                gg.dispose()
            }
        }

        super.paint(g)
    }
}/*
 * Copyright 2022-2025 MayakaApps
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.mayakapps.compose.windowstyler.windows.jna

import com.mayakapps.compose.windowstyler.windows.jna.enums.AccentFlag
import com.mayakapps.compose.windowstyler.windows.jna.enums.AccentState
import com.mayakapps.compose.windowstyler.windows.jna.enums.WindowCompositionAttribute
import com.mayakapps.compose.windowstyler.windows.jna.structs.AccentPolicy
import com.mayakapps.compose.windowstyler.windows.jna.structs.WindowCompositionAttributeData
import com.sun.jna.Native
import com.sun.jna.platform.win32.WinDef
import com.sun.jna.win32.StdCallLibrary
import com.sun.jna.win32.W32APIOptions

internal object User32 {
    fun setAccentPolicy(
        hwnd: WinDef.HWND,
        accentState: AccentState = AccentState.ACCENT_DISABLED,
        accentFlags: Set<AccentFlag> = emptySet(),
        color: Int = 0,
        animationId: Int = 0,
    ): Boolean {
        val data = WindowCompositionAttributeData(
            WindowCompositionAttribute.WCA_ACCENT_POLICY,
            AccentPolicy(accentState, accentFlags, color, animationId),
        )

        val isSuccess = setWindowCompositionAttribute(hwnd, data)

        data.dispose()
        return isSuccess
    }

    private fun setWindowCompositionAttribute(
        hwnd: WinDef.HWND,
        attributeData: WindowCompositionAttributeData
    ): Boolean {
        Native.setLastError(0)

        val isSuccess = User32Impl.SetWindowCompositionAttribute(hwnd, attributeData)

        if (!isSuccess) println("SetWindowCompositionAttribute(${attributeData.attribute}) failed with last error ${Native.getLastError()}")
        return isSuccess
    }
}

private object User32Impl : User32Api by Native.load("user32", User32Api::class.java, W32APIOptions.DEFAULT_OPTIONS)

@Suppress("FunctionName")
private interface User32Api : StdCallLibrary {
    fun SetWindowCompositionAttribute(hwnd: WinDef.HWND, attributeData: WindowCompositionAttributeData): Boolean
}/*
 * Copyright 2023-2024 MayakaApps
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under


 true;
    if (runtimeType != other.runtimeType) return false;
    return other is ARAnchor &&
        arPose == other.arPose &&
        trackingState == other.trackingState;
  }

  ARAnchor._({
    this.trackingState,
    this.arPose,
  });

  factory ARAnchor.fromMap(Map<String, dynamic> jsonMap) {
    return ARAnchor._(
      arPose: jsonMap['arPose'],
      trackingState: jsonMap['trackingState'] != null
          ? TrackingState.values[jsonMap['trackingState']]
          : null,
    );
  }

  Map<String, dynamic> toMap() {
    return <String, dynamic>{
      'arPose': arPose.toString(),
      'trackingState': trackingState,
    };
  }

  @override
  int get hashCode {
    return Object.hash(
      arPose,
      trackingState,
    );
  }

  @override
  String toString() {
    return toMap().toString();
  }
}
/*
    Copyright 2020-2023. Huawei Technologies Co., Ltd. All rights reserved.

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

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

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

part of huawei_ar;

class AREngine {
  /// Common method channel for handling common methods.
  static const MethodChannel _commonChannel =
      MethodChannel(COMMON_METHOD_CHANNEL);

  /// Checks if the AREngineService APK is installed
  static Future<bool> isArEngineServiceApkReady() async {
    bool exists = await _commonChannel.invokeMethod(
      'isArEngineServiceApkReady',
    );
    return exists;
  }

  /// Navigates to AREngine AppGallery Page for downloading the AREngine
  /// Service APK
  static Future<void> navigateToAppMarketPage() async {
    await _commonChannel.invokeMethod(
      'navigateToAppMarketPage',
    );
  }

  /// Enables HMS Plugin Method Analytics.
  static Future<void> enableLogger() async {
    await _commonChannel.invokeMethod(
      'enableLogger',
    );
  }

  /// Disables HMS Plugin Method Analytics.
  static Future<void> disableLogger() async {
    await _commonChannel.invokeMethod(
      'disableLogger',
    );
  }
}
/*
    Copyright 2020-2023. Huawei Technologies Co., Ltd. All rights reserved.

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

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

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

import 'package:flutter/material.dart';
import 'package:huawei_ar/huawei_ar.dart';

class ArFaceScreen extends StatefulWidget {
  const ArFaceScreen({Key? key}) : super(key: key);

  @override
  State<ArFaceScreen> createState() => _ArFaceScreenState();
}

class _ArFaceScreenState extends State<ArFaceScreen> {
  late ARSceneController arSceneController;

  void _onSceneCreated(ARSceneController controller) {
    debugPrint('ARScene created');
    arSceneController = controller;
    arSceneController.onDetectTrackable = (dynamic arFace) {
      _faceDetectCallba


        absVal1.getScalars().setScalarValue(Value.Reg(SbfRegister.R1_ARG), ScalarValue(sbfTypesFac.toNum(4)))
        absVal1.getPTAGraph().forget(Value.Reg(SbfRegister.R1_ARG))

        val absVal2 = MemoryDomain(nodeAllocator, sbfTypesFac, true)
        val stack2 = absVal2.getRegCell(r10, newGlobalVariableMap())
        check(stack2 != null) { "memory domain cannot find the stack node" }
        stack2.getNode().setRead()
        stack2.getNode().mkLink(4040, 4, stack2.getNode().createCell(4036))
        // R1 points to (stack, 4040)
        absVal2.getPTAGraph().setRegCell(Value.Reg(SbfRegister.R1_ARG), stack2.getNode().createSymCell(4040))

        sbfLogger.warn{"\nAbsVal1=$absVal1\nAbsVal2=$absVal2"}
        ConfigScope(SolanaConfig.OptimisticPTAJoin, false).use {
            val absVal3 = absVal1.join(absVal2)
            sbfLogger.warn{"absVal3 := join(absVal1, absVal2) --> \n$absVal3"}
            // We should lose track of R1
            Assertions.assertEquals(true, absVal3.getRegCell(Value.Reg(SbfRegister.R1_ARG), newGlobalVariableMap()) == null)
        }
    }

    @Test
    fun test14() {
        println("====== TEST 14 (JOIN) =======")
        /**
         *  If OptimisticPTAJoin is enabled then join(X,Y) = X if X is a pointer and Y looks a dangling pointer.
         *  Using the scalar domain can know that Y is 4 (a small power-of-two)
         */
        val r10 = Value.Reg(SbfRegister.R10_STACK_POINTER)

        val absVal1 = MemoryDomain(nodeAllocator, sbfTypesFac, true)
        val stack1 = absVal1.getRegCell(r10, newGlobalVariableMap())
        check(stack1 != null) { "memory domain cannot find the stack node" }
        stack1.getNode().setRead()
        stack1.getNode().mkLink(4040, 4, stack1.getNode().createCell(4036))
        absVal1.getPTAGraph().forget(Value.Reg(SbfRegister.R1_ARG))
        absVal1.getScalars().setScalarValue(Value.Reg(SbfRegister.R1_ARG), ScalarValue(sbfTypesFac.toNum(4)))

        val absVal2 = MemoryDomain(nodeAllocator, sbfTypesFac, true)
        val stack2 = absVal2.getRegCell(r10, newGlobalVariableMap())
        check(stack2 != null) { "memory domain cannot find the stack node" }
        stack2.getNode().setRead()
        stack2.getNode().mkLink(4040, 4, stack2.getNode().createCell(4036))
        // R1 points to (stack, 4040)
        absVal2.getPTAGraph().setRegCell(Value.Reg(SbfRegister.R1_ARG), stack2.getNode().createSymCell(4040))
        absVal2.getScalars().setScalarValue(Value.Reg(SbfRegister.R1_ARG), ScalarValue(SbfType.PointerType.Stack(Constant(4040))))

        sbfLogger.warn{"\nAbsVal1=$absVal1\nAbsVal2=$absVal2"}
        ConfigScope(SolanaConfig.OptimisticPTAJoin, true).use {
            val absVal3 = absVal1.join(absVal2)
            sbfLogger.warn{"absVal3 := join(absVal1, absVal2) --> \n$absVal3"}
            val absVal4 = absVal2.join(absVal1)
            sbfLogger.warn{"absVal4 := join(absVal2, absVal1) --> \n$absVal4"}
            Assertions.assertEquals(


 to multiply.
     * @param y      The second number to multiply.
     */
    private fun mul(result: IntArray, x: IntArray, y: IntArray) {
        // Multiply the two numbers to create the intermediate result.
        var v = x[0].toLong()
        for (i in 0 until NUM_LIMBS_255BIT) {
            t1[i] = v * y[i]
        }
        for (i in 1 until NUM_LIMBS_255BIT) {
            v = x[i].toLong()
            for (j in 0 until NUM_LIMBS_255BIT - 1) {
                t1[i + j] += v * y[j]
            }
            t1[i + NUM_LIMBS_255BIT - 1] = v * y[NUM_LIMBS_255BIT - 1]
        }

        // Propagate carries and convert back into 26-bit words.
        v = t1[0]
        t2[0] = v.toInt() and 0x03FFFFFF
        for (i in 1 until NUM_LIMBS_510BIT) {
            v = (v shr 26) + t1[i]
            t2[i] = v.toInt() and 0x03FFFFFF
        }

        // Reduce the result modulo 2^255 - 19.
        reduce(result, t2, NUM_LIMBS_255BIT)
    }

    /**
     * Multiplies a number by the a24 constant, modulo 2^255 - 19.
     *
     * @param result The result.
     * @param x      The number to multiply by a24.
     */
    private fun mulA24(result: IntArray, x: IntArray) {
        val a24: Long = 121665
        var carry: Long = 0
        for (index in 0 until NUM_LIMBS_255BIT) {
            carry += a24 * x[index]
            t2[index] = carry.toInt() and 0x03FFFFFF
            carry = carry shr 26
        }
        t2[NUM_LIMBS_255BIT] = carry.toInt() and 0x03FFFFFF
        reduce(result, t2, 1)
    }

    /**
     * Raise x to the power of (2^250 - 1).
     *
     * @param result The result.  Must not overlap with x.
     * @param x      The argument.
     */
    private fun pow250(result: IntArray, x: IntArray) {
        // The big-endian hexadecimal expansion of (2^250 - 1) is:
        // 03FFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF
        //
        // The naive implementation needs to do 2 multiplications per 1 bit and
        // 1 multiplication per 0 bit.  We can improve upon this by creating a
        // pattern 0000000001 ... 0000000001.  If we square and multiply the
        // pattern by itself we can turn the pattern into the partial results
        // 0000000011 ... 0000000011, 0000000111 ... 0000000111, etc.
        // This averages out to about 1.1 multiplications per 1 bit instead of 2.

        // Build a pattern of 250 bits in length of repeated copies of 0000000001.
        square(A, x)
        for (j in 0..8) square(A, A)
        mul(result, A, x)
        for (i in 0..22) {
            for (j in 0..9) square(A, A)
            mul(result, result, A)
        }

        // Multiply bit-shifted versions of the 0000000001 pattern into
        // the result to "fill in" the gaps in the pattern.
        square(A, result)
        mul(result, result, A)
        for (j in 0..7) {
            square(A, A)
            mul(result, result, A)
        }
    }

    /**
     * Computes the reciprocal of a number modulo 2^255 - 19.
     *
     * @param result The result.  Must not overlap with x.
     * @param x      The argument.
     */
    private fun recip(result: IntArray, x: IntArray) {
        // The reciprocal is the same as x ^ (p - 2) where p = 2^255 - 19.
        // The big-endian hexadecimal exp


lapsed / (ANIMATION_DURATION_MS / 100f));

			// If we're not running anymore, that means we're running through
			// the finish animation.
			if (!mRunning) {
				// If the finish animation is done, don't draw anything, and
				// don't repost.
				if ((now - mFinishTime) >= FINISH_ANIMATION_DURATION_MS) {
					mFinishTime = 0;
					return;
				}

				// Otherwise, use a 0 opacity alpha layer to clear the animation
				// from the inside out. This layer will prevent the circles from
				// drawing within its bounds.
				long finishElapsed = (now - mFinishTime) % FINISH_ANIMATION_DURATION_MS;
				float finishProgress = (finishElapsed / (FINISH_ANIMATION_DURATION_MS / 100f));
				float pct = (finishProgress / 100f);
				// Radius of the circle is half of the screen.
				float clearRadius = width / 2 * INTERPOLATOR.getInterpolation(pct);
				mClipRect.set(cx - clearRadius, 0, cx + clearRadius, height);
				canvas.saveLayerAlpha(mClipRect, 0, 0);
				// Only draw the trigger if there is a space in the center of
				// this refreshing view that needs to be filled in by the
				// trigger. If the progress view is just still animating, let it
				// continue animating.
				drawTriggerWhileFinishing = true;
			}

			// First fill in with the last color that would have finished drawing.
			if (iterations == 0) {
				canvas.drawColor(mColor1);
			} else {
				if (rawProgress >= 0 && rawProgress < 25) {
					canvas.drawColor(mColor4);
				} else if (rawProgress >= 25 && rawProgress < 50) {
					canvas.drawColor(mColor1);
				} else if (rawProgress >= 50 && rawProgress < 75) {
					canvas.drawColor(mColor2);
				} else {
					canvas.drawColor(mColor3);
				}
			}

			// Then draw up to 4 overlapping concentric circles of varying radii, based on how far
			// along we are in the cycle.
			// progress 0-50 draw mColor2
			// progress 25-75 draw mColor3
			// progress 50-100 draw mColor4
			// progress 75 (wrap to 25) draw mColor1
			if ((rawProgress >= 0 && rawProgress <= 25)) {
				float pct = (((rawProgress + 25) * 2) / 100f);
				drawCircle(canvas, cx, cy, mColor1, pct);
			}
			if (rawProgress >= 0 && rawProgress <= 50) {
				float pct = ((rawProgress * 2) / 100f);
				drawCircle(canvas, cx, cy, mColor2, pct);
			}
			if (rawProgress >= 25 && rawProgress <= 75) {
				float pct = (((rawProgress - 25) * 2) / 100f);
				drawCircle(canvas, cx, cy, mColor3, pct);
			}
			if (rawProgress >= 50 && rawProgress <= 100) {
				float pct = (((rawProgress - 50) * 2) / 100f);
				drawCircle(canvas, cx, cy, mColor4, pct);
			}
			if ((rawProgress >= 75 && rawProgress <= 100)) {
				float pct = (((rawProgress - 75) * 2) / 100f);
				drawCircle(canvas, cx, cy, mColor1, pct);
			}
			if (mTriggerPercentage > 0 && drawTriggerWhileFinishing) {
				// There is some portion of trigger to draw. Restore the canvas,
				// then draw the trigger. Otherwise, the trigger does not appear
				// until after the bar has finished animating and appears to
				// just jump in at a larger width than expected.
				canvas.restoreToCount(restoreCount);
				restoreCount = canvas.save();
				canvas.clipRect(mBounds);
				drawTrigger(canvas, cx, cy);
			}
			// Keep running until we finish out the last cycle.
			ViewCompat.postInvalidateOnAnimation(mParent);
		} else {
			// Otherwise


Y(node)) * alpha;
            }
        }
    }, updateYOfLinks = function(tree, links) {
        for (var i = 0, len = tree.length; i < len; i++) {
            var node = tree[i], sy = 0, ty = 0;
            node.targetLinks.sort(function(a, b) {
                return tree[links[a].target].y - tree[links[b].target].y;
            }), node.sourceLinks.sort(function(a, b) {
                return tree[links[a].source].y - tree[links[b].source].y;
            });
            for (var j = 0, tLen = node.targetLinks.length; j < tLen; j++) {
                var link = links[node.targetLinks[j]];
                link && (link.sy = sy, sy += link.dy);
            }
            for (var _j2 = 0, sLen = node.sourceLinks.length; _j2 < sLen; _j2++) {
                var _link = links[node.sourceLinks[_j2]];
                _link && (_link.ty = ty, ty += _link.dy);
            }
        }
    }, computeData = function(_ref2) {
        var data = _ref2.data, width = _ref2.width, height = _ref2.height, iterations = _ref2.iterations, nodeWidth = _ref2.nodeWidth, nodePadding = _ref2.nodePadding, links = data.links, _getNodesTree = getNodesTree(data, width, nodeWidth), tree = _getNodesTree.tree, depthTree = getDepthTree(tree), newLinks = updateYOfTree(depthTree, height, nodePadding, links);
        resolveCollisions(depthTree, height, nodePadding);
        for (var alpha = 1, i = 1; i <= iterations; i++) relaxRightToLeft(tree, depthTree, newLinks, alpha *= .99),
        resolveCollisions(depthTree, height, nodePadding), relaxLeftToRight(tree, depthTree, newLinks, alpha),
        resolveCollisions(depthTree, height, nodePadding);
        return updateYOfLinks(tree, newLinks), {
            nodes: tree,
            links: newLinks
        };
    }, getCoordinateOfTooltip = function(el, type) {
        return "node" === type ? {
            x: el.x + el.width / 2,
            y: el.y + el.height / 2
        } : {
            x: (el.sourceX + el.targetX) / 2,
            y: (el.sourceY + el.targetY) / 2
        };
    }, getPayloadOfTooltip = function(el, type, nameKey) {
        var payload = el.payload;
        if ("node" === type) return [ {
            payload: el,
            name: Object(__WEBPACK_IMPORTED_MODULE_13__util_ChartUtils__.w)(payload, nameKey, ""),
            value: Object(__WEBPACK_IMPORTED_MODULE_13__util_ChartUtils__.w)(payload, "value")
        } ];
        if (payload.source && payload.target) {
            return [ {
                payload: el,
                name: Object(__WEBPACK_IMPORTED_MODULE_13__util_ChartUtils__.w)(payload.source, nameKey, "") + " - " + Object(__WEBPACK_IMPORTED_MODULE_13__util_ChartUtils__.w)(payload.target, nameKey, ""),
                value: Object(__WEBPACK_IMPORTED_MODULE_13__util_ChartUtils__.w)(payload, "value")
            } ];
        }
        return [];
    }, Sankey = Object(__WEBPACK_IMPORTED_MODULE_11__util_PureRender__.a)((_temp = _class2 = function(_Component) {
        function Sankey(props) {
            _classCallCheck(this, Sankey);
            var _this = _possibleConstructorReturn(this, (Sankey.__proto__ || Object.getPrototypeOf(Sankey)).call(this, props));
            return _this.state = _this.createDefaultState(props), _this;
        }
        return _inherits(Sankey, _Component), _createClass(Sankey, [ {
            key: "componentWillReceiveProps",
            value: function(nextProps) {
                var _props = this.props, data = _props.data, width = _props.width, height = _props.height, margin = _props.margin, itera


0.3 * sqrt(v - v0);
            if (diameter[i] > longest + EPSILON)
                longest = diameter[i];
        }

        int cnt = 0, disc = 0;
        for (int i = 1; i <= k; i++)
        {
            if (fabs(longest - diameter[i]) <= EPSILON)
            {
                cnt++;
                disc = i;
            }
            if (cnt > 1) break;
        }

        if (cnt == 1) cout << disc << '\n';
        else cout << "0\n";
    }

    return 0;
}
// End up with More Teams
// UVa ID: 11088
// Verdict: Accepted
// Submission Date: 2018-09-12
// UVa Run Time: 0.010s
//
// 版权所有（C）2018，邱秋。metaphysis # yeah dot net

#include <bits/stdc++.h>

using namespace std;

int main(int argc, char *argv[])
{
    cin.tie(0), cout.tie(0), ios::sync_with_stdio(false);

    int n, cases = 0, ability[16], cache[1 << 15];
    while (cin >> n, n > 0)
    {
        for (int i = 0; i < n; i++)
            cin >> ability[i];
        sort(ability, ability + n, greater<int>());
        n -= (n % 3);
        memset(cache, 0, sizeof(cache));
        for (int i = 1, j, k, l, bit; i < (1 << n); i++)
        {
            if ((bit = __builtin_popcount(i)) % 3 != 0) continue;
            bit /= 3;
            for (j = 0; j < n; j++) if (i & (1 << j)) break;
            for (k = j + 1; k < n; k++)
            {
                if (cache[i] == bit) break;
                if (i & (1 << k))
                {
                    for (l = k + 1; l < n; l++)
                    {
                        if (i & (1 << l))
                        {
                            if (ability[j] + ability[k] + ability[l] < 20) continue;
                            cache[i] = max(cache[i], cache[i ^ (1 << j) ^ (1 << k) ^ (1 << l)] + 1);
                        }
                    }
                }
            }
        }
        cout << "Case " << ++cases << ": " << cache[(1 << n) - 1] << '\n';
    }

    return 0;
}
// 05-2 Rendezvous
// UVa ID: 11015
// Verdict: Accepted
// Submission Date: 2018-02-17
// UVa Run Time: 0.000s
//
// 版权所有（C）2018，邱秋。metaphysis # yeah dot net

#include <bits/stdc++.h>

using namespace std;

int main(int argc, char *argv[])
{
    cin.tie(0), cout.tie(0), ios::sync_with_stdio(false);

    int cases = 0;
    int n, m, u, v, w;
    string names[110];
    int cost[110][110];

    while (cin >> n >> m, n > 0)
    {
        for (int i = 1; i <= n; i++) cin >> names[i];

        memset(cost, 0x3f, sizeof(cost));
        for (int i = 1; i <= m; i++)
        {
            cin >> u >> v >> w;
            cost[u][v] = cost[v][u] = w;
        }
        for (int i = 1; i <= n; i++) cost[i][i] = 0;

        for (int k = 1; k <= n; k++)
            for (int i = 1; i <= n; i++)
                for (int j = 1; j <= n; j++)
                    cost[i][j] = min(cost[i][j], cost[i][k] + cost[k][j]);

        int minCost = 0x3f3f3f3f, selectedI = -1;


DD.L #OBRECS,D2
 MOVE.L D2,A4

 TST OB_SEL(A4)
 BEQ DES207

 TST DESFLAG
 BNE DES208
 CLR OB_SEL(A4)

DES208 TST OB_TYPE(A4)
 BNE DES207

 MOVE.L OB_TEREC(A4),A0
 CLR SELSTART(A0)
 CLR SELEND(A0)
 MOVE CARETIME(A0),CARETTOG(A0)
 CLR CARETVAL(A0)
 JSR TEUPDATE

DES207 TST COUNT
 BEQ DES102
 SUB #1,COUNT
 JMP DES200

DES102 RTS

*------------STORE RECTANGLES---------

STOREM MOVE.L A4,-(A7)
 TST OBJCNT
 BEQ DRAG601
 CLR COUNT
DRAG600 CLR.L D2
 MOVE COUNT,D2
 MULU #OBRECSZ,D2
 ADD.L #OBRECS,D2
 MOVE.L D2,A4
 MOVE OB_RECT(A4),OB_ORECT(A4)
 MOVE OB_RECT+2(A4),OB_ORECT+2(A4)
 MOVE OB_RECT+4(A4),OB_ORECT+4(A4)
 MOVE OB_RECT+6(A4),OB_ORECT+6(A4)
 ADD #1,COUNT
 MOVE COUNT,D0
 CMP OBJCNT,D0
 BNE DRAG600
DRAG601 MOVE.L (A7)+,A4
 RTS

*---------CLIPPED REDRAW----------

UPDATE DC $A00A

 TST OBJCNT
 BEQ TREK19

 CLR TREKCNT2
TREK10 CLR.L D2
 MOVE TREKCNT2,D2
 MULU #OBRECSZ,D2
 ADD.L #OBRECS,D2
 MOVE.L D2,A4
 MOVE.L A4,TREKADR

 TST CUTFLAG
 BNE TREK11
 TST OB_SEL(A4)
 BEQ TREK14
 MOVE PAGENUM,D0
 CMP OB_PAGE(A4),D0
 BNE TREK14

TREK11 JSR NOCLIP
 JSR TRANSOFF
 CLR D0
 JSR SETCOLOR
 MOVE #1,D0
 JSR SETFILL
 CLR D0
 JSR FILLPERI

 MOVE OB_ORECT(A4),D0
 MOVE D0,D2
 MOVE OB_ORECT+2(A4),D1
 MOVE D1,D3
 ADD OB_ORECT+4(A4),D2
 ADD OB_ORECT+6(A4),D3
 JSR RECTANGLE

 MOVE OB_ORECT(A4),D0
 MOVE D0,D2
 MOVE OB_ORECT+2(A4),D1
 MOVE D1,D3
 ADD OB_ORECT+4(A4),D2
 ADD OB_ORECT+6(A4),D3
 JSR SETCLIP

 CLR TREKCNT
TREK12 CLR.L D2
 MOVE TREKCNT,D2
 MULU #OBRECSZ,D2
 ADD.L #OBRECS,D2
 MOVE.L D2,A3

 MOVE TREKCNT2,D2
 CMP TREKCNT,D2
 BEQ TREK21

 MOVE PAGENUM,D0
 CMP OB_PAGE(A3),D0
 BNE TREK21

 MOVE.L TREKADR,A4

 MOVE OB_RECT(A3),D1
 ADD OB_RECT+4(A3),D1
 MOVE OB_ORECT(A4),D0
 CMP D1,D0
 BGT TREK21

 MOVE OB_ORECT(A4),D0
 ADD OB_ORECT+4(A4),D0
 CMP D1,D0
 BGT TREK22

 CMP OB_RECT(A3),D0
 BLT TREK21

TREK22 MOVE OB_RECT+2(A3),D1


 { return is_equal_to(0, false); }
  bool is_one() const { return is_equal_to(1, false); }
  bool is_positive_constant() const
  {
    uint64 v;
    return is_constant(&v, true) && int64(v) > 0;
  }
  bool is_negative_constant() const
  {
    uint64 v;
    return is_constant(&v, true) && int64(v) < 0;
  }

  //-----------------------------------------------------------------------
  // Working with mop_S operands
  //-----------------------------------------------------------------------
  /// Retrieve the referenced stack variable.
  /// \param[out] udm  stkvar, may be nullptr
  /// \param p_idaoff if specified, will hold IDA stkoff after the call.
  /// \return index of stkvar in the frame or -1
  ssize_t get_stkvar(udm_t *udm=nullptr, uval_t *p_idaoff=nullptr) const
  {
    return s->get_stkvar(udm, p_idaoff);
  }

  /// Get the referenced stack offset.
  /// This function can also handle mop_sc if it is entirely mapped into
  /// a continuous stack region.
  /// \param p_vdoff the output buffer
  /// \return success
  bool hexapi get_stkoff(sval_t *p_vdoff) const;

  //-----------------------------------------------------------------------
  // Working with mop_d operands
  //-----------------------------------------------------------------------
  /// Get subinstruction of the operand.
  /// If the operand has a subinstruction with the specified opcode, return it.
  /// \param code desired opcode
  /// \return pointer to the instruction or nullptr
  const minsn_t *get_insn(mcode_t code) const;
        minsn_t *get_insn(mcode_t code);

  //-----------------------------------------------------------------------
  // Transforming operands
  //-----------------------------------------------------------------------
  /// Make the low part of the operand.
  /// This function takes into account the memory endianness (byte sex)
  /// \param width the desired size of the operand part in bytes
  /// \return success
  bool hexapi make_low_half(int width);

  /// Make the high part of the operand.
  /// This function takes into account the memory endianness (byte sex)
  /// \param width the desired size of the operand part in bytes
  /// \return success
  bool hexapi make_high_half(int width);

  /// Make the first part of the operand.
  /// This function does not care about the memory endianness
  /// \param width the desired size of the operand part in bytes
  /// \return success
  bool hexapi make_first_half(int width);

  /// Make the second part of the operand.
  /// This function does not care about the memory endianness
  /// \param width the desired size of the operand part in bytes
  /// \return success
  bool hexapi make_second_half(int width);

  /// Shift the operand.
  /// This function shifts only the beginning of the operand.
  /// The operand size will be changed.
  /// Examples: shift_mop(AH.1, -1) -> AX.2
  ///           shift_mop(qword_00000008.8, 4) -> dword_0000000C.4
  ///           shift_mop(xdu.8(op.4), 4) -> #0.4
  ///           shift_mop(#0x12345678.4, 3) -> #12.1
  /// \param offset shift count (the number of bytes to shift)
  /// \return success
  bool hexapi shift_mop(int offset);

  /// Change the operand size.
  /// Examples: change_size(AL.1, 2) -> AX.2
  ///           change_size(qword_00000008.8, 4) -> dword_00000008.4
  ///           change_size(xdu.8(op.4), 4) -> op.4
  ///           change_size(#0x12345678.4, 1) -> #0x78.1
  /// \param nsize  new operand size
  /// \param sideff may modify the database because of the size change?
  /// \return


formtion信息对operands进行变换
  handle(opcode, operands) // 解释该指令
  key <- 对key进行变换

```

如果要分析这个解释器，建议先完整分析未加密指令的编码和指令的语义，会事半功倍。

效果展示
----

下面几个是还原的 VM 函数，sub_538 是执行 10401 命令第一个运行的函数

```
//----- (00000538) ----------------------------------------------------
x24_1 = x8;
x25_1 = x9;
if (x24_1 != 0x0 && x25_1 != 0x0) {
  x26_2 = [x24_1]:8;
  if (x26_2 != 0x0 && [x26_2 + 0x8]:4 != 0x0 && [x24_1 + 0x18]:4 u< 0x15) {
    x26_5 = sub_12ba0 ();
    if (x26_5 != 0x0) {
      [x25_1]:4 = wzr;
      var_30:8 = [x24_1]:8;
      var_28:8 = x26_5;
      var_20:8 = x25_1;
      var_18:8 = [x24_1 + 0x8]:8;
      var_10:8 = [x24_1 + 0x10]:8;
      var_8:4 = [x24_1 + 0x1c]:4;
      x27_9 = [0x730fa29ce8 + (zx.64([x24_1 + 0x18]:4) << 0x3)]:8;
      if (x27_9 == 0x0) {
        [x25_1]:4 = 0x62;
        x27_2 = 0x0;
        goto @LABEL_5880:0;
      }
      x27_9 ( &var_30:8 );
      x27_2 = 0x0;
      if ([x25_1]:4 == 0x0) {
        if ([x26_5 + 0x8]:4 == 0x0) {
          [x25_1]:4 = 0x63;
          goto @LABEL_5880:0;
        }
        x8_5 = sub_15f80 ( x26_5 );
        if (x8_5 == 0x0) {
          [x25_1]:4 = 0x2;
          goto @LABEL_5880:0;
        }
        [x25_1]:4 = 0x63;
        x27_2 = x8_5;
        if ([x8_5 + 0x8]:4 == 0x0) {
          goto @LABEL_5880:0;
        }
      } else {
LABEL_5880:0:
        var_38:8 = xzr;
        var_40:8 = xzr;
        sub_1a8d0 ( &var_40:8, 0x730fa29d90, zx.64([x24_1 + 0x18]:4) );
        var_80:4 = 0x1;
        var_7c:4 = [x25_1]:4;
        var_78:8 = 0x186a1;
        var_70:4 = 0x0;
        var_68:4 = 0x73;
        var_6c:4 =


h2>

WMImplant是基于PowerShell的工具，利用WMI来对目标机器执行操作，也可以作为发出命令和接收结果的C2通道。WMImplant利用WMI命令和控制通道，在目标系统上执行动作（采集数据，发出命令等）和数据存储的手段。它被设计为交互式和非交互式运行。当交互使用WMImplant时，它的设计有点像Meterpreter的命令菜单，如下图所示。<img class="alignnone size-full wp-image-99129 j-lazy" src="http://www.mottoin.com/wp-content/themes/JustNews/themer/assets/images/lazy.png" data-original="http://www.mottoin.com/wp-content/uploads/2017/03/Fig1.png" alt="Fig1" width="828" height="1200" data-srcset="http://www.mottoin.com/wp-content/uploads/2017/03/Fig1.png 828w, http://www.mottoin.com/wp-content/uploads/2017/03/Fig1-207x300.png 207w, http://www.mottoin.com/wp-content/uploads/2017/03/Fig1-768x1113.png 768w, http://www.mottoin.com/wp-content/uploads/2017/03/Fig1-707x1024.png 707w" sizes="(max-width: 828px) 100vw, 828px" />

WMImplant主菜单

WMImplant命令

基础功能

change_user                - 更改要执行WMI命令的用户环境
exit                       - 退出WMImplant
gen_cli                    - 生成命令行命令，以非交互方式使用
set_default                - 将目标系统的WMI属性设置为其默认值
help                       - 查看命令和说明列表

文件操作

cat                        - 读取文件的内容
download                   - 从目标机器下载文件
ls                         - 特定目录的文件/目录列表
search                     - 在用户指定的驱动器上搜索文件
upload                     - 将文件上传到目标机器

过程功能

command_exec               - 运行命令行命令并接收输出
disable_wdigest            - 删除注册表值UseLogonCredential
disable_winrm              - 禁用目标系统上的WinRM
enable_wdigest             - 增加注册表值UseLo


_flags == 0 && is_autocommit && thd_sql_command(thd) == SQLCOM_SELECT) {
            txn_begin_flags = DB_TXN_SNAPSHOT;
        }
        if (is_autocommit && thd_sql_command(thd) == SQLCOM_SELECT && !thd->in_sub_stmt && lock.type <= TL_READ_NO_INSERT && !thd->lex->uses_stored_routines()) {
            txn_begin_flags |= DB_TXN_READ_ONLY;
        }
    }
    else {
        txn_begin_flags = DB_INHERIT_ISOLATION;
    }
    if ((error = txn_begin(db_env, trx->sp_level, &trx->stmt, txn_begin_flags, thd))) {
        /* We leave the possible master transaction open */
        goto cleanup;
    }
    trx->sub_sp_level = trx->stmt;
    if (tokudb_debug & TOKUDB_DEBUG_TXN) {
        TOKUDB_HANDLER_TRACE("created stmt %p sp_level %p", trx->sp_level, trx->stmt);
    }
    reset_stmt_progress(&trx->stmt_progress);
    trans_register_ha(thd, false, tokudb_hton);
cleanup:
    return error;
}

static const char *lock_type_str(int lock_type) {
    if (lock_type == F_RDLCK) return "F_RDLCK";
    if (lock_type == F_WRLCK) return "F_WRLCK";
    if (lock_type == F_UNLCK) return "F_UNLCK";
    return "?";
}

/*
  As MySQL will execute an external lock for every new table it uses
  we can use this to start the transactions.
  If we are in auto_commit mode we just need to start a transaction
  for the statement to be able to rollback the statement.
  If not, we have to start a master transaction if there doesn't exist
  one from before.
*/
//
// Parameters:
//      [in]    thd - handle to the user thread
//              lock_type - the type of lock
// Returns:
//      0 on success
//      error otherwise
//
int ha_tokudb::external_lock(THD * thd, int lock_type) {
    TOKUDB_HANDLER_DBUG_ENTER("cmd %d lock %d %s %s", thd_sql_command(thd), lock_type, lock_type_str(lock_type), share->table_name);
    if (!(tokudb_debug & TOKUDB_DEBUG_ENTER) && (tokudb_debug & TOKUDB_DEBUG_LOCK)) {
        TOKUDB_HANDLER_TRACE("cmd %d lock %d %s %s", thd_sql_command(thd), lock_type, lock_type_str(lock_type), share->table_name);
    }
    if (tokudb_debug & TOKUDB_DEBUG_LOCK) {
        TOKUDB_HANDLER_TRACE("q %s", thd->query());
    }

    int error = 0;
    tokudb_trx_data *trx = (tokudb_trx_data *) thd_get_ha_data(thd, tokudb_hton);
    if (!trx) {
        error = create_tokudb_trx_data_instance(&trx);
        if (error) { goto cleanup; }
        thd_set_ha_data(thd, tokudb_hton, trx);
    }

    if (tokudb_debug & TOKUDB_DEBUG_TXN) {
        TOKUDB_HANDLER_TRACE("trx %p %p %p %p %u %u", trx->all, trx->stmt, trx->sp_level, trx->sub_sp_level,
                             trx->tokudb_lock_count, trx->create_lock_count);
    }

    if (trx->all == NULL) {
        trx->sp_level = NULL;


  .hive_12 .pre_8, .hive_16 .pre_8 { padding-left: 0; }
  .hive_12 .pre_9, .hive_16 .pre_9 { padding-left: 0; }
  .hive_12 .pre_10, .hive_16 .pre_10 { padding-left: 0; }
  .hive_12 .pre_11, .hive_16 .pre_11 { padding-left: 0; }
  .hive_12 .pre_12, .hive_16 .pre_12 { padding-left: 0; }
  .hive_12 .post_1, .hive_16 .post_1 { padding-right: 0; }
  .hive_12 .post_2, .hive_16 .post_2 { padding-right: 0; }
  .hive_12 .post_3, .hive_16 .post_3 { padding-right: 0; }
  .hive_12 .post_4, .hive_16 .post_4 { padding-right: 0; }
  .hive_12 .post_5, .hive_16 .post_5 { padding-right: 0; }
  .hive_12 .post_6, .hive_16 .post_6 { padding-right: 0; }
  .hive_12 .post_7, .hive_16 .post_7 { padding-right: 0; }
  .hive_12 .post_8, .hive_16 .post_8 { padding-right: 0; }
  .hive_12 .post_9, .hive_16 .post_9 { padding-right: 0; }
  .hive_12 .post_10, .hive_16 .post_10 { padding-right: 0; }
  .hive_12 .post_11, .hive_16 .post_11 { padding-right: 0; }
  .hive_12 .post_12, .hive_16 .post_12 { padding-right: 0; } }
/* SMARTPHONE PORTRAIT */
@media only screen and (max-width: 320px) { .hive_12, .hive_16 { padding: 0; width: 100%; margin: 0; }
  .hive_12 .cell_16, .hive_12 .cell_15, .hive_12 .cell_14, .hive_12 .cell_13, .hive_12 .cell_12, .hive_12 .tryptich, .hive_12 .cell_10, .hive_12 .cell_11, .hive_12 .cell_9, .hive_12 .cell_8, .hive_12 .cell_7, .hive_12 .cell_6, .hive_12 .cell_5, .hive_12 .cell_4, .hive_12 .cell_3, .hive_12 .cell_2, .hive_12 .cell_1, .hive_16 .cell_16, .hive_16 .cell_15, .hive_16 .cell_14, .hive_16 .cell_13, .hive_16 .cell_12, .hive_16 .hive_12 .tryptich, .hive_12 .hive_16 .tryptich, .hive_16 .cell_10, .hive_16 .cell_11, .hive_16 .cell_9, .hive_16 .cell_8, .hive_16 .cell_7, .hive_16 .cell_6, .hive_16 .cell_5, .hive_16 .cell_4, .hive_16 .cell_3, .hive_16 .cell_2, .hive_16 .cell_1 { width: 100%; margin: 0; }
  .hive_12 .pre_1, .hive_16 .pre_1 { padding-left: 0; }
  .hive_12 .pre_2, .hive_16 .pre_2 { padding-left: 0; }
  .hive_12 .pre_3, .hive_16 .pre_3 { padding-left: 0; }
  .hive_12 .pre_4, .hive_16 .pre_4 { padding-left: 0; }
  .hive_12 .pre_5


   ''' LXMERT visual branch (no language processing during navigation) '''
            text_embeds = input_ids
            text_mask = extended_attention_mask

            # img_embedding_output = self.vision_encoder(img_feats)
            img_embedding_output = img_feats
            img_seq_len = img_feats.shape[1]
            batch_size = text_embeds.size(0)

            img_seq_mask = vis_mask

            extended_img_mask = img_seq_mask.unsqueeze(1).unsqueeze(2)
            extended_img_mask = extended_img_mask.to(dtype=next(self.parameters()).dtype)  # fp16 compatibility
            extended_img_mask = (1.0 - extended_img_mask) * -10000.0
            img_mask = extended_img_mask

            lang_output = text_embeds
            visn_output = img_embedding_output

            for tdx, layer_module in enumerate(self.addlayer):
                lang_output, visn_output, language_attention_scores, visual_attention_scores = layer_module(lang_output, text_mask, visn_output, img_mask, tdx)

            sequence_output = lang_output
            pooled_output = self.pooler(sequence_output)

            visual_action_scores = visual_attention_scores.mean(dim=1)

            return pooled_output, visual_action_scores


 xpos;
  $done(monitor);
}
;
var CENTER_EDGE_LABEL_PROCESSING_ADDITIONS_0, END_EDGE_LABEL_PROCESSING_ADDITIONS_0, INVERTED_PORT_PROCESSING_ADDITIONS_0, NORTH_SOUTH_PORT_PROCESSING_ADDITIONS_0, PRED_EXTERNAL_WEST_OR_EAST_PORT;
var Lde_cau_cs_kieler_klay_layered_p5edges_PolylineEdgeRouter_2_classLit = createForClass('de.cau.cs.kieler.klay.layered.p5edges', 'PolylineEdgeRouter', 535);
function $apply_10(node){
  var extPortSide;
  extPortSide = castTo($getProperty(node, ($clinit_InternalProperties() , EXT_PORT_SIDE)), 32);
  return node.type_0 == ($clinit_LNode$NodeType() , EXTERNAL_PORT) && (extPortSide == ($clinit_PortSide() , WEST) || extPortSide == EAST);
}

function PolylineEdgeRouter$1(){
}

defineClass(536, 1, $intern_52, PolylineEdgeRouter$1);
_.apply_1 = function apply_51(node){
  return $apply_10(castTo(node, 9));
}
;
var Lde_cau_cs_kieler_klay_layered_p5edges_PolylineEdgeRouter$1_2_classLit = createForClass('de.cau.cs.kieler.klay.layered.p5edges', 'PolylineEdgeRouter/1', 536);
function $addPort(this$static, port){
  if ($hasNonLoopEdge(this$static, port)) {
    $add_18(this$static.portsWithNonLoopEdge, port);
    return true;
  }
  port.side != ($clinit_PortSide() , UNDEFINED_4) && $add_18(this$static.portsWithPortSide, port);
  port.outgoingEdges.array.length == 0?$add_18(this$static.exclusiveLoopTargetPorts, port):$add_18(this$static.exclusiveLoopSourcePorts, port);
  return false;
}

function $calculateNewTextSize(this$static, edge){
  var edgeMaxTextWidth, edgeTextHeight, label_0, label$iterator;
  edgeMaxTextWidth = 0;
  edgeTextHeight = 0;
  for (label$iterator = new ArrayList$1(edge.labels); label$iterator.i < label$iterator.this$01.array.length;) {
    label_0 = castTo($next_8(label$iterator), 33);
    edgeMaxTextWidth = max_1(edgeMaxTextWidth, label_0.size_0.x_0);
    edgeTextHeight += label_0.size_0.y_0;
  }
  $setProperty(edge, ($clinit_InternalProperties() , SPLINE_LABEL_SIZE), new KVector_1(edgeMaxTextWidth, edgeTextHeight));
  this$static.textWidth < edgeMaxTextWidth && (this$static.textWidth = edgeMaxTextWidth);
  this$static.textHeight += edgeTextHeight;
}

function $getHidablePorts(this$static){
  var allPorts;
  allPorts = newLinkedList(this$static.exclusiveLoopSourcePorts);
  $addAll(allPorts, this$static.exclusiveLoopTargetPorts);
  $addAll(allPorts, this$static.portsWithPortSide);
  return allPorts;
}

function $getTargetLoopPortsReversed(this$static){
  var list, port, port$iterator, retVal;
  retVal = new LinkedHashSet;
  list = new ArrayList_1(this$static.exclusiveLoopTargetPorts);
  reverse_3(list);
  for (port$iterator = new ArrayList$1(list); port$iterator.i < port$iterator.this$01.array.length;) {
    port = castTo($next_8(port$iterator), 7);
    retVal.map_0.put(port, retVal);
  }
  return


E:
	mov r0, #0
	pop {r3, r4, r5, pc}
	nop
_021E6F14: .word 0x000003D1
	thumb_func_end ov96_021E6E38

	thumb_func_start ov96_021E6F18
ov96_021E6F18: ; 0x021E6F18
	push {r4, lr}
	add r4, r0, #0
	bl ov96_021E5F5C
	add r0, r4, #0
	mov r1, #0x14
	bl ov96_021E5FC8
	mov r0, #0
	pop {r4, pc}
	thumb_func_end ov96_021E6F18

	thumb_func_start ov96_021E6F2C
ov96_021E6F2C: ; 0x021E6F2C
	push {r3, r4, r5, r6, r7, lr}
	sub sp, #8
	mov r1, #0x1e
	add r7, r0, #0
	lsl r1, r1, #4
	ldr r2, [r7, r1]
	ldr r2, [r2, #0x10]
	cmp r2, #0
	beq _021E6FD0
	add r1, #0xac
	add r0, r7, r1
	bl ov96_021E8A20
	add r4, r0, #0
	add r0, r7, #0
	bl ov96_021E5F24
	lsl r0, r0, #2
	add r2, r7, r0
	mov r0, #0x5e
	lsl r0, r0, #4
	ldrh r1, [r2, r0]
	add r0, r0, #2
	strh r1, [r4]
	ldrh r0, [r2, r0]
	strh r0, [r4, #2]
	bl ov96_021E9A14
	mov r3, #0xa3
	lsl r3, r3, #2
	add r1, r7, r3
	sub r3, r3, #4
	add r2, r0, #0
	ldr r3, [r7, r3]
	mov r0, #0x1d
	bl ov96_021E87B4
	str r0, [sp, #4]
	cmp r0, #0
	beq _021E6FE6
	add r0, r7, #0
	bl ov96_021E5F24
	cmp r0, #0
	bne _021E6FE6
	add r0, r7, #0
	bl ov96_021E5FAC
	add r6, r0, #0
	add r0, r7, #0
	bl ov96_021E5D34
	str r0, [sp]
	cmp r0, #4
	bge _021E6FE6
	mov r0, #0x5e
	lsl r0, r0, #4
	add r1, r7, r0
	ldr r0, [sp]
	lsl r0, r0, #2
	add r4, r1, r0
	ldr r0, [sp]
	add r5, r0, #0
	mul r5, r6
_021E6FAC:
	mov r0, #0xad
	lsl r0, r0, #2
	add r0, r7, r0
	bl ov96_021E8A20
	add r0, r0, r5
	add r1, r4, #0
	add r2, r6, #0
	bl memcpy
	ldr r0, [sp]
	add r4, r4, #4
	add r0, r0, #1
	add r5, r5, r6
	str r0, [sp]


(
					ignoring: disabled,
					child: Opacity(
						opacity: disabled ? 0.5 : 1.0,
						child: Padding(
							padding: padding,
							child: Builder(
								builder: buildImpl
							)
						)
					)
				);
			}
		);
	}
}

class _IndentedGroup extends SettingWidget {
	final List<SettingWidget> settings;

	const _IndentedGroup({
		required this.settings
	});

	@override
	Iterable<SettingWidget> search(BuildContext context, List<String> query) => throw UnsupportedError('_IndentedGroup is only returned from search results');

	@override
	Widget buildImpl(BuildContext context) => Padding(
		padding: const EdgeInsets.only(left: 16),
		child: Column(
			crossAxisAlignment: CrossAxisAlignment.stretch,
			mainAxisSize: MainAxisSize.min,
			children: settings.map((s) => s.build()).toList()
		)
	);

	@override
	bool operator == (Object other) =>
		identical(this, other) ||
		other is _IndentedGroup &&
		listEquals(other.settings, settings);

	@override
	int get hashCode => Object.hashAll(settings);
}

class CustomMutableSettingWidget<T> extends SettingWidget {
	final String description;
	final MutableSetting<T> setting;
	final Widget Function(T, VoidCallback) builder;

	const CustomMutableSettingWidget({
		required this.description,
		required this.setting,
		required this.builder
	});

	@override
	Iterable<SettingWidget> search(BuildContext context, List<String> query) sync* {
		final desc = description.toLowerCase();
		if (query.every((q) => desc.contains(q))) {
			yield this;
		}
	}

	@override
	Widget buildImpl(BuildContext context) => builder(setting.watch(context), Settings.instance.didEdit);

	@override
	bool operator == (Object other) =>
		identical(this, other) ||
		other is CustomMutableSettingWidget &&
		other.description == description &&
		other.setting == setting &&
		other.builder == builder;

	@override
	int get hashCode => Object.hash(description, setting, builder);
}

abstract class StandardSettingWidget extends SettingWidget {
	final String description;
	final IconData? icon;
	final Widget Function(Color?)? iconBuilder;
	final String? helpText;
	final String Function(BuildContext)? helpTextBuilder;
	final MutableSetting<Color?>? color;
	final List<String> keywords;

	const StandardSettingWidget({
		this.icon,
		this.iconBuilder,
		required this.description,
		this.helpText,
		this.helpTextBuilder,
		this.color,
		super.disabled,
		this.keywords = const [],
		super.subsetting
	});

	@override
	Iterable<SettingWidget> search(BuildContext context, List<String> query) sync* {
		final desc = description.toLowerCase();
		final help = helpText?.toLowerCase() ?? '';
		if (query.every((q) {
			return desc.contains(q) || keywords.any((k) => k.contains(q)) || help.contains(q);
		})) {
			yield this;
		}
	}

	Widget _makeIcon([Color? color]) => (iconBuilder != null || icon != null) ? Padding(
		padding: const EdgeInsets.only(right: 8),
		child: iconBuilder?.call(color) ?? Icon(icon, color: color)
	) : const SizedBox.shrink();

	Widget _makeHelpButton(BuildContext context) {
		final text = helpTextBuilder?.call(context) ?? helpText;
		if (text != null) {
			return _SettingsHelpButton(
				helpText: text
			);
		}
		return const SizedBox.shrink();
	}

	Widget _makeSyncButton(List<String> syncPaths) {
		return const SizedBox.shrink();
		/*if (syncPaths.isEmpty) {
			ret


  getSingleIssue(issueId:number) {
    return this.httpclient.get(`${ISSUE_LIST}/?id=${issueId}`).pipe(
      retry(1),
      timeout(1000),
      catchError(this.handleError)
    )
  }

  addIssue(issue:any) {
    return this.httpclient.post(`${ISSUE_LIST}`, issue).pipe(
      timeout(1000),
      catchError(this.handleError)
    )
  }
}
'use strict'

import { Teacher } from './10-teacher';

// Student
// learn() -> prints the student is learning something new
// question(teacher) -> calls the teachers answer method

class Student {
    learn(): void {
        console.log("Student is learning");
    }

    question(teacher: Teacher): void {
        teacher.answer();
    }
}

export { Student };import { Card } from '../../../interfaces'
import Set from '../Celestial Storm'

const card: Card = {
	name: {
		en: "Energy Recycle System",
		fr: "Recyclage d’Énergie",
		es: "Sistema de Reciclaje de Energía",
		it: "Sistema di Riciclo dell’Energia",
		pt: "Sistema de Reciclagem de Energias",
		de: "Energie-Wiederverwertung"
	},
	illustrator: "Zu-Ka",
	rarity: "Uncommon",
	category: "Trainer",

	set: Set,

	effect: {
		fr: "Choisissez l’une de ces options :\n\n• Ajoutez une carte Énergie de base de votre pile de défausse à votre main.\n• Mélangez 3 cartes Énergie de base de votre pile de défausse avec votre deck.",
		en: "Choose 1:\n\n•Put a basic Energy card from your discard pile into your hand.\n•Shuffle 3 basic Energy cards from your discard pile into your deck.",
		es: "Elige 1 opción:\n\n• Pon 1 carta de Energía Básica de tu pila de descartes en tu mano.\n• Pon 3 cartas de Energía Básica de tu pila de descartes en tu baraja y barájalas todas.",
		it: "Scegli:\n\n• Prendi una carta Energia base dalla tua pila degli scarti e aggiungila alle carte che hai in mano.\n• Rimischia tre carte Energia base dalla tua pila degli scarti nel tuo mazzo.",
		pt: "Escolha 1:\n\n• Coloque 1 carta de Energia básica da sua pilha de descarte na sua mão.\n• Embaralhe 3 cartas de Energia básica da sua pilha de descarte no seu baralho.",
		de: "Wähle 1 aus:\n\n•Nimm 1 Basis-Energiekarte aus deinem Ablagestapel auf deine Hand.\n•Mische 3 Basis-Energiekarten aus deinem Ablagestapel in dein Deck."
	},
	trainerType: "Item",

}

export default card
import { Injectable, OnDestroy } from '@angular/core';

export enum ArsTimeUnit{
  YEAR,
  MONTH,
  WEEK,
  DAY,
  HOUR,
  MINUTE,
  SECOND
}

enum ArsTimeSecConversion {
  YEAR = 31536000,
  MONTH = 2592000,
  DAY = 86400,
  HOUR = 3600,
  MINUTE = 60,
  SECOND = 1
}

type ArsTimeSecConversionKey = keyof typeof ArsTimeSecConversion;

export const arsTimeTranslation = {
  de:{
    time:{
      year:
        '&1:letztes Jahr DATE;' +
        'vor ? Jahr%en DATE',
      month:
        '&1:letzten Monat DATE;' +
        '


return tostring(airlineNameCache[id])
			end
		end
		if airlinesCache then
			for k,v in ipairs(airlinesCache) do
				if v[1] == id then
					if not airlineNameCache then airlineNameCache = {} end
					airlineNameCache[id] = v[2]
					return tostring(v[2])
				end
			end
		end
	elseif code then
		code = tostring(code)
		if airlinesCache then
			for k,v in ipairs(airlinesCache) do
				if v[3] == code then
					return tostring(v[2])
				end
			end
		end
	end
	return false
end

function www_ippc_sa_scripts_refreshAirlinePage()
	if tonumber(currentlySelectedAirline) then
		if airlinesCache then
			guiGridListClear(airlineMembersGrid)
			for k,v in ipairs(airlinesCache) do
				if tonumber(v[1]) == currentlySelectedAirline then
					guiSetVisible(airlineMembersGrid, true)
					guiSetText(airlinePara, "Airline Name: "..tostring(v[2]).."\nAirline Code: "..tostring(v[3]).."\n")
					for k2,v2 in ipairs(v[4]) do
						local row = guiGridListAddRow(airlineMembersGrid)
						guiGridListSetItemText(airlineMembersGrid, row, 1, tostring(v2[2]), false, false)
						guiGridListSetItemText(airlineMembersGrid, row, 2, v2[3] and "Yes" or "", false, false)
					end
					if isFAALeader or airlineLeader[currentlySelectedAirline] then
						guiSetVisible(airlineAddMemEdit, true)
						guiSetVisible(airlineAddMemBtn, true)
						guiSetVisible(airlineTogLeaderBtn, true)
						guiSetVisible(airlineRemoveSelBtn, true)
					else
						guiSetVisible(airlineAddMemEdit, false)
						guiSetVisible(airlineAddMemBtn, false)
						guiSetVisible(airlineTogLeaderBtn, false)
						guiSetVisible(airlineRemoveSelBtn, false)
					end
					return
				end
			end
		end
	end
end

function www_ippc_sa_scripts_addFlightToGrid(flight, etd, adep, ades, airline, eta, id)
	--outputDebugString("added")
	if www_ippc_sa_scripts_isdatetime(eta) then
		eta = exports.global:split(eta, " ")
		eta = exports.global:split(eta[2], ":")
		eta = eta[1]..":"..eta[2]
	else
		eta = ""
	end
	etd = exports.global:split(etd, ":")
	etd = etd[1]..":"..etd[2]
	local row = guiGridListAddRow(flightsGrid)
		guiGridListSetItemText(flightsGrid, row, 1, tostring(flight), false, false)
		guiGridListSetItemText(flightsGrid, row, 2, tostring(etd), false, false)
		guiGridListSetItemText(flightsGrid, row, 3, tostring(adep), false, false)
		guiGridListSetItemText(flightsGrid, row, 4, tostring(ades), false, false)
		guiGridListSetItemText(flightsGrid, row, 5, tostring(airline), false, false)
		guiGridListSetItemText(flightsGrid, row, 6, tostring(eta), false, false)
		guiGridListSetItemData(flightsGrid, row, 1, id)
	return row
end

function www_ippc_sa_scripts_isFutureFlight(eta, etd, now)
	if not now then
		now = exports.datetime:now()
	end
	if eta and string.len(eta) == 19 then
		if exports.datetime:datetimeToTimestamp(eta) <= now then
			--ou


from torch import nn

import os
from loss import SoftIoULoss, ISNetLoss
from model import *

os.environ['KMP_DUPLICATE_LIB_OK'] = 'TRUE'

class Net(nn.Module):
    def __init__(self, model_name, mode='test',size=256):
        super(Net, self).__init__()

        self.model_name = model_name
        self.cal_loss = SoftIoULoss()

        if model_name == 'DNANet':
            if mode == 'train':
                self.model = DNANet(mode='train')
            else:
                self.model = DNANet(mode='test')
        elif model_name == 'ACM':
            self.model = ACM()
        elif model_name == 'ALCNet':
            self.model = ALCNet()
        elif model_name == 'AGPCNet':
            self.model = AGPCNet()
        # elif model_name == 'ISNet':
        #     if mode == 'train':
        #         self.model = ISNet(mode='train')
        #     else:
        #         self.model = ISNet(mode='test')
        #     self.cal_loss = ISNetLoss()
        # elif model_name == 'RISTDnet':
        #     self.model = RISTDnet()
        elif model_name == 'UIUNet':
            if mode == 'train':
                self.model = UIUNet(mode='train')
            else:
                self.model = UIUNet(mode='test')
        elif model_name == 'ISTDU-Net':
            self.model = ISTDU_Net()
        elif model_name == 'RDIAN':
            self.model = RDIAN()
        elif model_name == 'ISTDU_Net':
            self.model = ISTDU_Net()
        elif model_name == 'DATransNet':
            self.model = DATransNet(img_size=size)
        elif model_name == 'res_UNet':
            self.model = res_UNet()
    def forward(self, img):
        return self.model(img)

    def loss(self, pred, gt_mask):
        loss = self.cal_loss(pred, gt_mask)
        return loss


                copy(
                    currentPage = if (state is Success) currentPage.plus(1) else currentPage,
                    goodsListResponse = state,
                    goodsList = (state()?.data?.dataList ?: emptyList()),
                    totalPage = (state()?.data?.totalPageCount ?: 0)
                )
            }
        }
    }

    fun loadMoreMaybeLikeList() {
        withState {
            if (it.goodsListResponse is Loading) return@withState

            suspend {
                apiService.queryMaybeLikeListByPage(QueryMaybeLikeListParams(it.currentPage, it.pageSize))
            }.execute(Dispatchers.IO) { state ->
                copy(
                    goodsListResponse = state,
                    goodsList = goodsList + (state()?.data?.dataList ?: arrayListOf()),
                    nextPageGoodsList = (state()?.data?.dataList ?: arrayListOf()),
                    currentPage = if (state is Success) currentPage.plus(1) else currentPage,
                    totalPage = (state()?.data?.totalPageCount ?: 0)
                )
            }
        }
    }
}package com.th3rdwave.safeareacontext

import com.facebook.react.bridge.Arguments
import com.facebook.react.bridge.WritableMap
import com.facebook.react.uimanager.PixelUtil

fun edgeInsetsToJsMap(insets: EdgeInsets): WritableMap {
  val insetsMap = Arguments.createMap()
  insetsMap.putDouble("top", PixelUtil.toDIPFromPixel(insets.top).toDouble())
  insetsMap.putDouble("right", PixelUtil.toDIPFromPixel(insets.right).toDouble())
  insetsMap.putDouble("bottom", PixelUtil.toDIPFromPixel(insets.bottom).toDouble())
  insetsMap.putDouble("left", PixelUtil.toDIPFromPixel(insets.left).toDouble())
  return insetsMap
}

fun edgeInsetsToJavaMap(insets: EdgeInsets): Map<String, Float> {
  return mapOf(
      "top" to PixelUtil.toDIPFromPixel(insets.top),
      "right" to PixelUtil.toDIPFromPixel(insets.right),
      "bottom" to PixelUtil.toDIPFromPixel(insets.bottom),
      "left" to PixelUtil.toDIPFromPixel(insets.left))
}

fun rectToJsMap(rect: Rect): WritableMap {
  val rectMap = Arguments.createMap()
  rectMap.putDouble("x", PixelUtil.toDIPFromPixel(rect.x).toDouble())
  rectMap.putDouble("y", PixelUtil.toDIPFromPixel(rect.y).toDouble())
  rectMap.putDouble("width", PixelUtil.toDIPFromPixel(rect.width).toDouble())
  rectMap.putDouble("height", PixelUtil.toDIPFromPixel(rect.height).toDouble())
  return rectMap
}

fun rectToJavaMap(rect: Rect): Map<String, Float> {
  return mapOf(
      "x" to PixelUtil.toDIPFromPixel(rect.x),
      "y" to PixelUtil.toDIPFromPixel(rect.y),
      "width" to PixelUtil.toDIPFromPixel(rect.width),
      "height" to PixelUtil.toDIPFromPixel(rect.height))
}
package com.swmansion.gesturehandler

import android.graphics.Matrix
import android.graphics.PointF
import android.view.MotionEvent
import android.view.View
import android.view.ViewGroup
import android.widget.EditText
import java.util.*

class GestureHandlerOrchestrator(
  private val wrapperView: ViewGroup,
  private val handlerRegistry: GestureHandlerRegistry,
  private val viewConfigHelper: ViewConfigurationHelper,
) {
  /**
   * Minimum alpha (value from 0 to 1) that should be set to a view so that it can be treated as a
   * gesture target. E.g. if set to 0.1 then views that less than 10% opaque will be ignored when
   * traversing view h


  ],
          ),
          SizedBox(height: 16),
          Expanded(
            child: ListView.builder(
              itemCount: isFavoritesView
                  ? widget.viewModel.getFavorites().length
                  : widget.viewModel.getAudioFiles().length,
              itemBuilder: (context, index) {
                final filePath = isFavoritesView
                    ? widget.viewModel.getFavorites()[index]
                    : widget.viewModel.getAudioFiles()[index];
                // 提取歌曲名
                String songName = filePath.split('/').last.split('.').first;

                // 下载 krc 文件
                downloadKrcFile(songName);

                return Dismissible(
                  key: Key(filePath),
                  direction: DismissDirection.endToStart,
                  background: Container(
                    color: Colors.red,
                    alignment: Alignment.centerRight,
                    padding: EdgeInsets.symmetric(horizontal: 20),
                    child: Icon(
                      Icons.delete,
                      color: Colors.white,
                    ),
                  ),
                  onDismissed: (direction) async {
                    // 调用删除歌曲的方法
                    await widget.viewModel.deleteSong(filePath);
                    ScaffoldMessenger.of(context).showSnackBar(
                      SnackBar(content: Text("已删除: ${filePath.split('/').last}")),
                    );
                  },
                  child: ListTile(
                    title: Text(filePath.split('/').last), // 显示文件名
                    subtitle: Text('本地歌曲'), // 可以根据需要显示更多信息
                    trailing: Row(
                      mainAxisSize: MainAxisSize.min,
                      children: [
                        PlayPauseButton(
                          filePath: filePath,
                        ),
                        FavoriteButton(
                          filePath: filePath,
                        ),
                      ],
                    ),
                    onTap: () {
                      // 通知主页选择的歌曲
                      widget.onSongSelected(filePath);
                      Navigator.pop(context); // 关闭底部菜单
                    },
                  ),
                );
              },
            ),
          ),
        ],
      ),
    );
  }
}

void showMusicListBottomSheet(BuildContext context, {required Function(String) onSongSelected, required MenuViewModel viewModel}) {
  showModalBottomSheet(
    context: context,
    isScrollControlled: true,
    shape: RoundedRectangleBorder(
      borderRadius: BorderRadius.vertical(top: Radius.circular(20)),
    ),
    builder: (BuildContext context) {
      return MusicListBottomSheet(
        onSongSelected: onSongSelected,
        viewModel: viewModel, // 传递 viewModel
      );
    },
  );
}import 'package:masiro/data/repository/model/volume.dart';

Chapter? getChapterFromVolumes(List<Volume> volumes, int chapterId) {
  for (final v in volumes) {
    final index = v.chapters.indexWhere((c) => c.id == chapterId);
    if (index != -1) {
      return v.chapters[index];
    }
  }
  return null;
}

Chapter? getPreviousChapter(List<Volume> volumes, int chapterId) {
  for (var vIndex = 0; vIndex < volumes.length; vIndex++) {
    final v = volumes[vIndex];
    final cIndex = v.chapters.indexWhere((c) => c.id == chapterId);
    if (cIndex != -1) {
      if (cIndex == 0) {
        final prevVolumeIndex = vIndex - 1;
        if (prevVolumeIndex < 0) {
          return null;
        }