ra Ltd.
 *
 *     This program is free software: you can redistribute it and/or modify
 *     it under the terms of the GNU General Public License as published by
 *     the Free Software Foundation, version 3 of the License.
 *
 *     This program is distributed in the hope that it will be useful,
 *     but WITHOUT ANY WARRANTY; without even the implied warranty of
 *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *     GNU General Public License for more details.
 *
 *     You should have received a copy of the GNU General Public License
 *     along with this program.  If not, see <https://www.gnu.org/licenses/>.
 */

package analysis.alloc

import analysis.*
import utils.*
import vc.data.CoreTACProgram
import vc.data.TACCmd
import vc.data.TACExpr
import vc.data.TACKeyword
import java.util.stream.Collectors
import java.util.stream.Stream

/*
  When solidity wants the return size, it will sometimes compute:

  v = (fp + RETURN_SIZE) - fp

  This is just a very specialized case of the ConstantComputationInliner pass.

  I HATE IT.
 */
object ReturnSizeCalculationSimplifer {
    private data class ReturnSizeCalc(
            val firstFpRead: CmdPointer,
            val secondFpRead: CmdPointer,
            val returnSizeRead: CmdPointer
    )

    private val returnDataBufferPatt = PatternDSL.build {
        val fpMatcher = Var { v, w ->
            if(v == TACKeyword.MEM64.toVar()) {
                PatternMatcher.VariableMatch.Match(w.ptr)
            } else {
                PatternMatcher.VariableMatch.Continue
            }
        }
        val returnSizeMatcher = Var { v, w ->
            if(v == TACKeyword.RETURN_SIZE.toVar()) {
                PatternMatcher.VariableMatch.Match(w.ptr)
            } else {
                PatternMatcher.VariableMatch.Continue
            }
        }
        ((fpMatcher + returnSizeMatcher) - fpMatcher).withAction { _: LTACCmd, (firstRead, returnRead), secondRead: CmdPointer ->
            ReturnSizeCalc(
                firstFpRead = firstRead,
                secondFpRead = secondRead,
                returnSizeRead = returnRead
            )
        }
    }

    fun rewriteReturnSizeCalc(p: CoreTACProgram) : CoreTACProgram {
        val graph = p.analysisCache.graph
        val bufMatcher = PatternMatcher.compilePattern(graph = graph, patt = returnDataBufferPatt)

        val toRewrite = p.code.entries.parallelStream().flatMap { (b, where) ->
            // quick short circuiting: skip blocks that either havoc return size, or do NOT touch tacM0x40
            if(where.none {
                        it is TACCmd.Simple.AssigningCmd && it.lhs == TACKeyword.MEM64.toVar()
                    } || where.any { it is TACCmd.Simple.AssigningCmd && it.lhs == TACKeyword.RETURN_SIZE.toVar() }) {
                return@flatMap Stream.empty<Pair<LTACCmd, ReturnSizeCalc>>()
            }
            where.mapIndexedNotNull { index, simple ->
                if(simple is TACCmd.Simple.AssigningCmd.AssignExpCmd && simple.rhs is TACExpr.BinOp.Sub) {
                    val ltac = LTACCmd(ptr = CmdPointer(b, index), cmd = simple)
                    bufMatcher.queryFrom(ltac.narrow()).toNullableResult()?.let {
                        ltac to it
                    }
                } else {
                    null
                }
            }.stream()
        }.filter { (_, b) ->
            b.firstFpRead.block == b.secondFpRead.block && b.returnSizeRead.block == b.firstFpRead.block
        }.filter { (_, b) ->
            b.firstFpRead == b.secondFpRead
        }.map { (l, _) ->
            l.narrow<TACCmd.Simple.AssigningCmd>()
        }.collect(Collectors.toList())
        if(toRewrite.isEmpty()) {
            return p


       }
                    break;
                }
                case 2: {
                    if (test.length() > 0) {
                        int index = r.nextInt(test.length());
                        buff.append("remove " + index + "\n");
                        x.remove(index);
                        test = test.remove(index);
                    }
                    break;
                }
                }
                assertEquals(x.size(), test.length());
                assertEquals(toString(x.iterator()), toString(test.iterator()));
            }
        }
    }

    private static <T> String toString(Iterator<T> it) {
        StringBuilder buff = new StringBuilder();
        while (it.hasNext()) {
            buff.append(' ').append(it.next());
        }
        return buff.toString();
    }

}
/*
 * Copyright 2004-2019 H2 Group. Multiple-Licensed under the MPL 2.0,
 * and the EPL 1.0 (http://h2database.com/html/license.html).
 * Initial Developer: H2 Group
 */
package org.gridgain.internal.h2.test.store;

import java.util.Random;
import java.util.concurrent.TimeUnit;

import org.gridgain.internal.h2.mvstore.FreeSpaceBitSet;
import org.gridgain.internal.h2.test.TestBase;
import org.gridgain.internal.h2.util.Utils;

/**
 * Tests the free space list.
 */
public class TestFreeSpace extends TestBase {

    /**
     * Run just this test.
     *
     * @param a ignored
     */
    public static void main(String... a) throws Exception {
        TestBase.createCaller().init().test();
        testMemoryUsage();
        testPerformance();
    }

    @Override
    public void test() throws Exception {
        testSimple();
        testRandomized();
    }

    private static void testPerformance() {
        for (int i = 0; i < 10; i++) {
            long t = System.nanoTime();

            FreeSpaceBitSet f = new FreeSpaceBitSet(0, 4096);
            // 75 ms

            // FreeSpaceList f = new FreeSpaceList(0, 4096);
            // 13868 ms

            // FreeSpaceTree f = new FreeSpaceTree(0, 4096);
            // 56 ms

            for (int j = 0; j < 100000; j++) {
                f.markUsed(j * 2 * 4096, 4096);
            }
            for (int j = 0; j < 100000; j++) {
                f.free(j * 2 * 4096, 4096);
            }
            for (int j = 0; j < 100000; j++) {
                f.allocate(4096 * 2);
            }
            System.out.println(TimeUnit.NANOSECONDS.toMillis(System.nanoTime() - t));
        }
    }

    private static void testMemoryUsage() {

        // 16 GB file size
        long size = 16L * 1024 * 1024 * 1024;
        System.gc();
        System.gc();
        long first = Utils.getMemoryUsed();

        FreeSpaceBitSet f = new FreeSpaceBitSet(0, 4096);
        // 512 KB

        // FreeSpaceTree f = new FreeSpaceTree(0, 4096);
        // 64 MB

        // FreeSpaceList f = new FreeSpaceList(0, 4096);
        // too slow

        for (long j = size; j > 0; j -= 4 * 4096) {
            f.markUsed(j, 4096);
        }

        System.gc();
        System.gc();
        long mem = Utils.getMemoryUsed() - first;
        System.out.println("Memory used: " + mem);
        System.out.println("f: " + f.toString().length());

    }

    private void testSimple() {
        FreeSpaceBitSet f1 = new FreeSpaceBitSet(2, 1024);
        FreeSpaceList f2 = new FreeSpaceList(2, 1024);
        FreeSpaceTree f3 = new FreeSpaceTree(2, 1024);
        assertEquals(f1.toString(), f2.toString());
        assertEquals(f1.toString(), f3.toString());
        assertEquals(2 * 1024, f1.allocate(10240));
        assertEquals(2 * 1024, f2.allocate(10240));
        assertEquals(2 * 1024, f3.allocate(10240));


st.addAll(latestList)

                    // used to save path
                    val spForSave = StoragePathsMan.get()

                    // add to list
                    val (indexOfStoragePath, existedStoragePath) = findStoragePathItemByPath(newPath)

                    if(indexOfStoragePath != -1) { // contains, only need update last selected
                        storagePathSelectedPath.value = existedStoragePath!!
                        storagePathSelectedIndex.intValue = indexOfStoragePath

                        spForSave.storagePathLastSelected = newPath
                    }else { // not contains, need add to config
                        val newItem = NameAndPath.genByPath(newPath, NameAndPathType.REPOS_STORAGE_PATH, activityContext)
                        storagePathList.add(newItem)
                        val newItemIndex = storagePathList.size - 1
                        // select new added
                        storagePathSelectedIndex.intValue = newItemIndex
                        storagePathSelectedPath.value = newItem

                        // update settings
                        spForSave.storagePaths.add(newPath)
                        spForSave.storagePathLastSelected = newPath
                    }

                    StoragePathsMan.save(spForSave)
                }catch (e: Exception) {
                    Msg.requireShowLongDuration("err: ${e.localizedMessage}")
                    MyLog.e(TAG, "add storage path at `$TAG` err: ${e.stackTraceToString()}")
                }
            }

        }
    }

    val indexForDeleteStoragePathDialog = rememberSaveable { mutableStateOf(-1) }
    val showDeleteStoragePathListDialog = rememberSaveable { mutableStateOf(false) }
    val initDeleteStoragePathListDialog = { index:Int ->
        indexForDeleteStoragePathDialog.value = index
        showDeleteStoragePathListDialog.value = true
    }

    if(showDeleteStoragePathListDialog.value) {
        val targetPath = storagePathList.value.getOrNull(indexForDeleteStoragePathDialog.value)?.path ?: ""

        val closeDialog = { showDeleteStoragePathListDialog.value = false }

        val deleteStoragePath = j@{ index:Int ->
            if(storagePathList.value.getOrNull(index)?.type != NameAndPathType.REPOS_STORAGE_PATH) {
                Msg.requireShowLongDuration("can't remove item")
                return@j
            }

            storagePathList.value.removeAt(index)
            val spForSave = StoragePathsMan.get()
            val removedCurrent = index == storagePathSelectedIndex.intValue
            if(removedCurrent) {
                val newCurrentIndex = 0
                storagePathSelectedIndex.intValue = newCurrentIndex
                val newCurrent = storagePathList.value[newCurrentIndex]
                storagePathSelectedPath.value = newCurrent
                spForSave.storagePathLastSelected = newCurrent.path
            }

            spForSave.storagePaths.clear()
            val list = storagePathList.value.filterAndMap({ it.type == NameAndPathType.REPOS_STORAGE_PATH }) { it.path }
            if(list.isNotEmpty()) {
                spForSave.storagePaths.addAll(list)
            }

            StoragePathsMan.save(spForSave)
        }

        ConfirmDialog2(
            title = stringResource(R.string.delete),
            requireShowTextCompose = true,
            textCompose = {
                CopyScrollableColumn {
                    Text(targetPath)
                }
            },
            okBtnText = stringResource(R.string.delete),
            okTextColor = MyStyleKt.TextColor.danger(),
            onCancel = closeDialog
        ) {
            closeDialog()

            val targetIndex = indexForDeleteStoragePathDialog.value
            doJobThenOffLoading {
                deleteStoragePath(targetIndex)
            }
        }
    }

    val showLoadingDialog = rememberSaveable { mutableStateOf(false)}

    val doSave:()->Unit = {
        /*查询repo名以及repo在仓库存储目录是否已经存在，若存在，设 isReadyForClone为假，调用setRepoNameExistAndFocus()提示用户改名
            查询credentialName是否已经存在，若存在，设 isReadyForClone为假，


ert.ToHexString([.. app.Hash]))
            };
            serializer.Serialize(stream, kv);
        }

        Console.WriteLine($"Saved to {stream.Name}");
    }

    private static void DumpPackageInfo(FileStream inputStream)
    {
        Console.WriteLine($"Reading {inputStream.Name}");

        var packageInfo = new PackageInfo();
        packageInfo.Read(inputStream);
        Console.WriteLine($"{packageInfo.Packages.Count} packages");

        using var stream = File.OpenWrite("packageinfo_text.vdf");

        var serializer = KVSerializer.Create(KVSerializationFormat.KeyValues1Text);

        foreach (var app in packageInfo.Packages)
        {
            var kv = new KVObject($"package_{app.SubID}", app.Data.Value)
            {
                new KVObject("_token", app.Token),
                new KVObject("_changenumber", (long)app.ChangeNumber),
                new KVObject("_hash", Convert.ToHexString([.. app.Hash]))
            };
            serializer.Serialize(stream, kv);
        }

        Console.WriteLine($"Saved to {stream.Name}");
    }

    private static string GetSteamPath()
    {
        if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
        {
            var key = Registry.CurrentUser.OpenSubKey("SOFTWARE\\Valve\\Steam") ??
                      RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, RegistryView.Registry64)
                          .OpenSubKey("SOFTWARE\\Valve\\Steam");

            if (key != null && key.GetValue("SteamPath") is string steamPath)
            {
                return steamPath;
            }
        }
        else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
        {
            var home = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile);
            var paths = new[] { ".steam", ".steam/steam", ".steam/root", ".local/share/Steam" };

            return paths
                .Select(path => Path.Join(home, path))
                .FirstOrDefault(steamPath => Directory.Exists(Path.Join(steamPath, "appcache")));
        }
        else if (OperatingSystem.IsMacOS())
        {
            var home = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData);
            return Path.Join(home, "Steam");
        }

        throw new PlatformNotSupportedException();
    }
}


client configuration yaml at " + clientConfigFile + `
Please ensure config file contains valid yaml.'\n
Try setting your config with 'unik target --host HOST_URL'`)
		return err
	}
	return nil
}

type imageSlice []*types.Image

func (p imageSlice) Len() int           { return len(p) }
func (p imageSlice) Less(i, j int) bool { return p[i].Name < p[j].Name }
func (p imageSlice) Swap(i, j int)      { p[i], p[j] = p[j], p[i] }

// Sort is a convenience method.
func (p imageSlice) Sort() { sort.Sort(p) }

func printImages(images ...*types.Image) {
	sortedImages := make(imageSlice, len(images))
	for i, image := range images {
		sortedImages[i] = image
	}
	sortedImages.Sort()
	fmt.Printf("%-20s %-20s %-15s %-30s %-6s %-20s\n", "NAME", "ID", "INFRASTRUCTURE", "CREATED", "SIZE(MB)", "MOUNTPOINTS")
	for _, image := range sortedImages {
		printImage(image)
	}
}

func printImage(image *types.Image) {
	for i, deviceMapping := range image.RunSpec.DeviceMappings {
		//ignore root device mount point
		if deviceMapping.MountPoint == "/" {
			image.RunSpec.DeviceMappings = append(image.RunSpec.DeviceMappings[:i], image.RunSpec.DeviceMappings[i+1:]...)
		}
	}
	if len(image.RunSpec.DeviceMappings) == 0 {
		fmt.Printf("%-20.20s %-20.20s %-15.15s %-30.30s %-8.0d \n", image.Name, image.Id, image.Infrastructure, image.Created.String(), image.SizeMb)
	} else if len(image.RunSpec.DeviceMappings) > 0 {
		fmt.Printf("%-20.20s %-20.20s %-15.15s %-30.30s %-8.0d %-20.20s\n", image.Name, image.Id, image.Infrastructure, image.Created.String(), image.SizeMb, image.RunSpec.DeviceMappings[0].MountPoint)
		if len(image.RunSpec.DeviceMappings) > 1 {
			for i := 1; i < len(image.RunSpec.DeviceMappings); i++ {
				fmt.Printf("%102s\n", image.RunSpec.DeviceMappings[i].MountPoint)
			}
		}
	}
}

type userImageSlice []*types.UserImage

func (p userImageSlice) Len() int           { return len(p) }
func (p userImageSlice) Less(i, j int) bool { return p[i].Name < p[j].Name }
func (p userImageSlice) Swap(i, j int)      { p[i], p[j] = p[j], p[i] }

// Sort is a convenience method.
func (p userImageSlice) Sort() { sort.Sort(p) }

func printUserImages(images ...*types.UserImage) {
	sortedImages := make(userImageSlice, len(images))
	for i, image := range images {
		sortedImages[i] = image
	}
	sortedImages.Sort()
	fmt.Printf("%-20s %-20s %-15s %-30s %-6s %-20s\n", "NAME", "OWNER", "INFRASTRUCTURE", "CREATED", "SIZE(MB)", "MOUNTPOINTS")
	for _, image := range sortedImages {
		printUserImage(image)
	}
}

func printUserImage(image *types.UserImage) {
	for i, deviceMapping := range image.RunSpec.DeviceMappings {
		//ignore root device mount point
		if deviceMapping.MountPoint == "/" {
			image.RunSpec.DeviceMappings = append(image.RunSpec.DeviceMappings[:i], image.RunSpec.DeviceMappings[i+1:]...)
		}
	}
	if len(image.RunSpec.DeviceMappings) ==


:20px}.dx-rtl .dx-datagrid .dx-datagrid-headers .dx-row td.dx-pointer-events-none,.dx-rtl .dx-datagrid .dx-datagrid-rowsview .dx-data-row td.dx-pointer-events-none,.dx-rtl .dx-datagrid .dx-datagrid-rowsview .dx-freespace-row td.dx-pointer-events-none,.dx-rtl .dx-datagrid .dx-datagrid-rowsview .dx-header-row td.dx-pointer-events-none,.dx-rtl .dx-datagrid .dx-datagrid-rowsview .dx-virtual-row td.dx-pointer-events-none{border-left:2px solid #596980;border-right:2px solid #596980}.dx-rtl .dx-datagrid .dx-datagrid-headers .dx-row td.dx-pointer-events-none.dx-first-cell,.dx-rtl .dx-datagrid .dx-datagrid-rowsview .dx-data-row td.dx-pointer-events-none.dx-first-cell,.dx-rtl .dx-datagrid .dx-datagrid-rowsview .dx-freespace-row td.dx-pointer-events-none.dx-first-cell,.dx-rtl .dx-datagrid .dx-datagrid-rowsview .dx-header-row td.dx-pointer-events-none.dx-first-cell,.dx-rtl .dx-datagrid .dx-datagrid-rowsview .dx-virtual-row td.dx-pointer-events-none.dx-first-cell{border-right:none}.dx-rtl .dx-datagrid .dx-datagrid-headers .dx-row td.dx-pointer-events-none.dx-last-cell,.dx-rtl .dx-datagrid .dx-datagrid-rowsview .dx-data-row td.dx-pointer-events-none.dx-last-cell,.dx-rtl .dx-datagrid .dx-datagrid-rowsview .dx-freespace-row td.dx-pointer-events-none.dx-last-cell,.dx-rtl .dx-datagrid .dx-datagrid-rowsview .dx-header-row td.dx-pointer-events-none.dx-last-cell,.dx-rtl .dx-datagrid .dx-datagrid-rowsview .dx-virtual-row td.dx-pointer-events-none.dx-last-cell{border-left:none}.dx-rtl .dx-datagrid .dx-datagrid-rowsview .dx-virtual-row>td::before{transform:scaleX(-1)}.dx-rtl .dx-datagrid .dx-datagrid-rowsview .dx-virtual-row>td[style*="text-align: left"]::before{transform:scale(1)}.dx-rtl .dx-datagrid .dx-column-lines>td:first-child{border-right:none;border-left:1px solid #596980}.dx-rtl .dx-datagrid .dx-column-lines>td:last-child,.dx-rtl .dx-datagrid .dx-datagrid-sticky-columns .dx-column-lines>td{border-left:none}.dx-rtl .dx-datagrid .dx-datagrid-sticky-columns .dx-column-lines:not(.dx-datagrid-group-footer)>td{border-right:1px solid #596980}.dx-rtl .dx-datagrid .dx-datagrid-sticky-columns .dx-column-lines:not(.dx-datagrid-group-footer)>td:first-child,.dx-rtl .dx-datagrid .dx-datagrid-sticky-columns .dx-datagrid-content .dx-datagrid-table .dx-row .dx-datagrid-column-no-border,.dx-rtl .dx-datagrid .dx-datagrid-sticky-columns .dx-datagrid-content .dx-datagrid-table .dx-row.dx-


avarski', 'sv': 'avariska', 'sw': 'Kiavari', 'ta': 'அவேரிக்', 'te': 'అవారిక్', 'th': 'อาวาร์', 'ti': 'ኣቫር', 'tk': 'awar dili', 'to': 'lea fakaʻavaliki', 'tr': 'Avar dili', 'ug': 'ئاۋارچە', 'uk': 'аварська', 'ur': 'اواری', 'uz': 'avar', 'uz-Cyrl': 'аварча', 'uz-Latn': 'avar', 'vec': 'avàrego', 'vi': 'Tiếng Avaric', 'xnr': 'अवेरिक', 'yo': 'Èdè Afariki', 'yrl': 'awariku', 'yue': '阿瓦爾文', 'yue-Hans': '阿瓦尔文', 'yue-Hant': '阿瓦爾文', 'zh': '阿瓦尔语', 'zh-Hans': '阿瓦尔语', 'zh-Hant': '阿瓦爾文', 'zu': 'isi-Avaric'},
    'avb': {'en': 'Avau'},
    'avd': {'en': 'Alviri-Vidari'},
    'avi': {'en': 'Avikam'},
    'avk': {'ast': 'kotava', 'cs': 'kotava', 'de': 'Kotava', 'en': 'Kotava', 'fi': 'kotava', 'fr': 'kotava', 'gd': 'Kotava', 'hi-Latn': 'Kotava', 'it': 'kotava', 'ja': 'コタヴァ', 'lb': 'Kotava', 'lt': 'kotava', 'mk': 'котава', 'nb': 'kotava', 'ne': 'कोटावा', 'nl': 'Kotava', 'nn': 'kotava', 'no': 'kotava', 'pl': 'kotava', 'sv': 'kotava', 'th': 'โคตาวา', 'to': 'lea fakakotava', 'tr': 'Kotava', 'yue': '科塔瓦文', 'yue-Hans': '科塔瓦文', 'yue-Hant': '科塔瓦文', 'zh-Hant': '科塔瓦文'},
    'avl': {'en': 'Eastern Egyptian Bedawi Arabic'},
    'avm': {'en': 'Angkamuthi'},
    'avn': {'en': 'Avatime'},
    'avo': {'en': 'Agavotaguerra'},
    'avs': {'en': 'Aushiri'},
    'avt': {'en': 'Au'},
    'avu': {'en': 'Avokaya'},
    'avv': {'en': 'Avá-Canoeiro'},
    'awa': {'af': 'Awadhi', 'am': 'አዋድሂ', 'ar': 'الأوادية', 'as': 'অৱধী', 'ast': 'awadhi', 'az': 'avadhi', 'az-Cyrl': 'авадһи', 'az-Latn': 'avadhi', 'be': 'авадхі', 'be-tarask': 'авадхі', 'bg': 'авади', 'bgn': 'آوادی', 'bn': 'আওয়াধি', 'br': 'awadhi', 'brx': 'अवधी', 'bs': 'avadhi', 'bs-Cyrl': 'авадхи', 'bs-Latn': 'avadhi', 'ca': 'awadhi', 'ca-ES-valencia': 'awadhi', 'ccp': '𑄃𑄤𑄙𑄨', 'ce': 'авадхи', 'chr': 'ᎠᏩᏗ', 'ckb': 'ئاوادهی', 'cs': 'awadhština', 'cy': 'Awadhi', 'da': 'awadhi', 'de': 'Awadhi', 'dsb': 'awandhišćina', 'el': 'Αγουαντί', 'el-polyton': 'Αγουαντί', 'en': 'Awadhi', 'es': 'avadhi', 'et': 'avadhi', 'eu': 'awadhiera', 'fa': 'اودهی', 'ff-Adlm': '𞤀𞤱𞤢𞤣𞤭𞥅𞤪𞤫', 'fi': 'awadhi', 'fil': 'Awadhi', 'fo': 'awadhi', 'fr': 'awadhi', 'fy': 'Awadhi', 'ga': 'Avaidis', 'gd': 'Awadhi', 'gl': 'awadhi', 'gsw': 'Awadhi', 'gu': 'અવધી', 'ha': 'Awadhi', 'he': 'אוואדית', 'hi': 'अवधी', 'hi-Latn': 'Awadhi', 'hr': 'awadhi', 'hsb': 'awandhišćina', 'hu': 'awádi', 'hy': 'ավադհի', 'ia': 'awadhi', 'id': 'Awadhi', 'ig': 'Awadị', 'is': 'avadí', 'it': 'awadhi', 'ja': 'アワディー語', 'jv': 'Awadhi', 'ka': 'ავადი', 'kgp': 'avanhi', 'kk': 'авадхи тілі', 'km': 'អាវ៉ាឌី', 'kn': 'ಅವಧಿ', 'ko': '아와히어', 'kok': 'अवधी', 'ks': 'اَوَدی', 'ks-Arab': 'اَوَدی', 'ksh': 'Awahdesch', 'ku': 'awadhî', 'ky': 'авадхиче', 'lb': 'Awadhi', 'lo': 'ອາວາຮິ', 'lt': 'avadhi', 'lv': 'avadhu', 'mai': 'अवधी', 'mi': 'Awāti', 'mk': 'авади', 'ml': 'അവാധി', 'mn': 'авадхи', 'mr': 'अवधी', 'ms': 'Awadhi', 'mt': 'Awadhi', 'my': 'အာဝါဒီ', 'nb': 'avadhi', 'ne': 'अवधी', 'nl': 'Awadhi', 'nn': 'avadhi', 'no': 'avadhi', 'or': 'ଆୱାଧି', 'pa': 'ਅਵਧੀ', 'pa-Guru': 'ਅਵਧੀ', 'pcm': 'Awadhí', 'pl': 'awadhi', 'ps': 'اوادي', 'pt': 'awadhi', 'qu': 'Awadhi', 'rm': 'awadhi', 'ro': 'awadhi', 'ru': 'авадхи', 'sc': 'awadhi', 'sd': 'اواڌي', 'sd-Arab': 'اواڌي', 'si': 'අවදි', 'sk': 'awadhi', 'sl': 'avadščina', 'smn': 'awadhikielâ', 'sq': 'auadhisht', 'sr': 'авади', 'sr-Cyrl': 'авади', 'sr-Latn': 'avadi', 'sv': 'awadhi', 'sw': 'Kiawadhi', 'ta': 'அவதி', 'te': 'అవధి', 'th': 'อวธี', 'ti': 'ኣዋዲ', 'tk': 'awadhi dili', 'to': 'lea fakaʻauati', 'tr': 'Awadhi', 'ug': 'ئاۋادىچە', 'uk': 'авадхі', 'ur': 'اوادھی', 'uz': 'avadxi', 'uz-Cyrl': 'авадхи', 'uz-Latn': 'avadxi', 'vec': 'awadi', 'vi': 'Tiếng Awadhi', 'xnr': 'अवधी', 'yo': 'Èdè Awadi', 'yrl': 'awadi', 'yue': '阿瓦文', 'yue-Hans': '阿瓦文', 'yue-Hant': '阿瓦文', 'zh': '阿瓦德语', 'zh-Hans': '阿瓦德语', 'zh-Hant': '阿瓦文', 'zu': 'isi-Awadhi'},
    'awb': {'en': 'Awa (Papua New Guinea)'},
    'awc': {'en': 'Cicipu'},
    'awd': {'en': 'Arawakan languages'},
    'awd-mpr': {'en': 'Maypure'},
    'awd-pro': {'en': 'Proto-Arawakan'},
    'awd-taa-pro': {'en': 'Proto-Ta-Arawakan'},
    'awe': {'en': 'Awetí'},
    'awg': {'en': 'Anguthimri'},
    'awh': {'en': 'Awbono'},
    'awi': {'en': 'Aekyom'},
    'awk': {'en': 'Awabakal'},
    'awm': {'en': 'Arawum'},
    'awn': {'en': 'Awngi'},
    'awo': {'en': 'Awak'},
    'awr': {'en': 'Awera'},
    'aws': {'en': 'South Awyu'},
    'awt': {'en': 'Araweté'},
    'awu': {'en': 'Central Awyu'},
    'awv': {'en': 'Jair Awyu'},
    'aww': {'en': 'Awun'},
    'awx': {'en': 'Awara'},
    'awy': {'en': 'Edera Awyu'},
    'axb': {'en': 'Abipon'},
    'axe': {'en


 PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
 * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
 * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
 * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 */

package com.tencent.devops.auth.service

import com.tencent.devops.auth.dao.AuthUserBlackListDao
import com.tencent.devops.common.api.util.DateTimeUtil
import com.tencent.devops.common.redis.RedisOperation
import org.jooq.DSLContext
import org.slf4j.LoggerFactory
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.stereotype.Service

@Service
class AuthUserBlackListService @Autowired constructor(
    val dslContext: DSLContext,
    val authUserBlackListDao: AuthUserBlackListDao,
    val redisOperation: RedisOperation
) {

    fun createBlackListUser(
        userId: String,
        remark: String?
    ): Boolean {
        logger.info("create blackList : userId = $userId | remark = $remark")
        if (authUserBlackListDao.get(dslContext, userId) != null) {
            logger.warn("user $userId is blackList user")
            return true
        }

        redisOperation.delete(BLACKLIST_REDIS_KEY + userId)
        return authUserBlackListDao.create(
            dslContext = dslContext,
            userId = userId,
            remark = remark ?: "system create"
        ) == 1
    }

    fun removeBlackListUser(
        userId: String
    ): Boolean {
        logger.info("remove $userId blackList")
        return authUserBlackListDao.delete(dslContext, userId) == 1
    }

    fun blackList(): Set<String> {
        val blackList = mutableSetOf<String>()
        authUserBlackListDao.list(dslContext)?.map { blackList.add(it.userId) }
        return blackList
    }

    fun checkBlackListUser(
        userId: String
    ): Boolean {
        // 优先从缓存中取数据
        redisOperation.get(BLACKLIST_REDIS_KEY + userId)
        val userInfo = authUserBlackListDao.get(dslContext, userId)
        if (userInfo == null) {
            // 只缓存非名单内的用户
            redisOperation.set(BLACKLIST_REDIS_KEY + userId, "", DateTimeUtil.minuteToSecond(5).toLong())
            return false
        }
        return true
    }

    companion object {
        val logger = LoggerFactory.getLogger(AuthUserBlackListService::class.java)
        const val BLACKLIST_REDIS_KEY = "bkci:auth:blackList:"
    }
}
package com.tencent.devops.auth.service

import com.tencent.devops.auth.dao.AuthVerifyRecordDao
import com.tencent.devops.auth.pojo.dto.VerifyRecordDTO
import com.tencent.devops.auth.pojo.dto.VerifyResourceRecordDTO
import org.jooq.DSLContext
import org.slf4j.LoggerFactory
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.stereotype.Service

@Service
class AuthVerifyRecordService @Autowired constructor(
    val dslContext: DSLContext,
    val authVerifyRecordDao: AuthVerifyRecordDao
) {
    fun createOrUpdateVerifyRecord(verifyRecordDTO: VerifyRecordDTO) {
        authVerifyRecordDao.createOrUpdate(
            dslContext = dslContext,
            verifyRecordDTO = verifyRecordDTO
        )
    }

    fun list(
        projectCode: String,
        resourceType: String,
        offset: Int,
        limit: Int
    ): List<VerifyRecordDTO> {
        return authVerifyRecordDao.list(
            dslContext = dslC


nClass(F);
    // Otherwise, be conservative.
    return ARCInstKind::CallOrUser;
  }

  // Otherwise, be conservative.
  return isa<InvokeInst>(V) ? ARCInstKind::CallOrUser : ARCInstKind::User;
}

/// Map V to its ARCInstKind equivalence class.
ARCInstKind GetARCInstKind(const Value *V);

/// Returns false if conservatively we can prove that any instruction mapped to
/// this kind can not decrement ref counts. Returns true otherwise.
bool CanDecrementRefCount(ARCInstKind Kind);

} // end namespace objcarc
} // end namespace llvm

#endif


using Serilog;
using System;
using System.IO;

namespace Pizza.KeyboardAndMouseAdapter.Backend
{
    public class RewasdDetector
    {
        // this has to be the before PATHS, or PATHs will be incomplete
        private static readonly string REWASD_SUBPATH = @"\reWASD\reWASD.exe";

        public static readonly string[] PATHS = new string[] {
            // Environment.SpecialFolder.ProgramFiles depends on the projects target platform
            // https://stackoverflow.com/questions/23304823/environment-specialfolder-programfiles-returns-the-wrong-directory
            Path.GetFullPath(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFilesX86) + @"\..\..\Program Files" + REWASD_SUBPATH),
            Environ


ace::HideSacrificeItemBox()
{
	ZIDLResource* pResource = ZApplication::GetGameInterface()->GetIDLResource();

	MButton* pButton = (MButton*)pResource->FindWidget( "Stage_SacrificeItemBoxClose");
	if ( pButton)
		pButton->Show( false);
	pButton = (MButton*)pResource->FindWidget( "Stage_SacrificeItemBoxOpen");
	if ( pButton)
		pButton->Show( true);

	MWidget* pWidget = pResource->FindWidget( "Stage_CharacterInfo");
	if ( pWidget)
		pWidget->Enable( true);

	m_nStateSacrificeItemBox = 0;
	GetSacrificeItemBoxPos();
}

void ZStageInterface::GetSacrificeItemBoxPos()
{
	MWidget* pWidget = ZApplication::GetGameInterface()->GetIDLResource()->FindWidget( "Stage_ItemListView");
	if ( pWidget)
	{
		MRECT rect;

		switch ( m_nStateSacrificeItemBox)
		{
			case 0 :		// Hide
				rect = pWidget->GetRect();
				m_nListFramePos = -rect.w;
				break;

			case 1 :		// Close
				rect = pWidget->GetRect();
				m_nListFramePos = -rect.w + ( rect.w * 0.14);
				break;

			case 2 :		// Open
				m_nListFramePos = 0;
				break;
		}
	}
}

void ZStageInterface::OnSacrificeItem0()
{
}

void ZStageInterface::OnSacrificeItem1()
{
}

void ZStageInterface::UpdateSacrificeItem()
{
	ZIDLResource* pResource = ZApplication::GetGameInterface()->GetIDLResource();

	for ( int i = SACRIFICEITEM_SLOT0;  i <= SACRIFICEITEM_SLOT1;  i++)
	{
		char szWidgetNameItem[ 128];
		sprintf_safe( szWidgetNameItem, "Stage_SacrificeItemImage%d", i);
		MPicture* pPicture = (MPicture*)pResource->FindWidget( szWidgetNameItem);
		if ( pPicture)
		{
			if ( m_SacrificeItem[ i].IsExist())
			{
				pPicture->SetBitmap( m_SacrificeItem[ i].GetIconBitmap());
				char szMsg[ 128];
				MMatchObjCache* pObjCache = ZGetGameClient()->FindObjCache( m_SacrificeItem[ i].GetUID());
				if ( pObjCache)
					sprintf_safe( szMsg, "%s (%s)", m_SacrificeItem[ i].GetName(), pObjCache->GetName());
				else
					strcpy_safe( szMsg, m_SacrificeItem[ i].GetName());
				pPicture->AttachToolTip( szMsg);
			}
			else
			{
				pPicture->SetBitmap( NULL);
				pPicture->DetachToolTip();
			}
		}
	}
}

void ZStageInterface::SerializeSacrificeItemListBox()
{
	ZIDLResource* pResource = ZApplication::GetGameInterface()->GetIDLResource();

	MListBox* pListBox = (MListBox*)pResource->FindWidget( "Stage_SacrificeItemListbox");
	if ( !pListBox)
		return;

	int nStartIndex  = pListBox->GetStartItem();
	int nSelectIndex = pListBox->GetSelIndex();
	pListBox->RemoveAll();

	for ( MQUESTITEMNODEMAP::iterator questitem_itor = ZGetMyInfo()->GetItemList()->GetQuestItemMap().begin();
		  questitem_itor != ZGetMyInfo()->GetItemList()->GetQuestItemMap().end();
		  questitem_itor++)
	{
		ZMyQuestItemNode* pItemNode = (*questitem_itor).second;
		MQuestItemDesc* pItemDesc = GetQuestItemDescMgr().FindQItemDesc( pItemNode->GetItemID());
		if ( pItemDesc)
		{
			int nCount = pItemNode->m_nCount;
			if ( m_SacrificeItem[ SACRIFICEITEM_SLOT0].IsExist() &&
				 (m_SacrificeItem[ SACRIFICEITEM_SLOT0].


.md-filter_hdr:after {
  content: '\e274';
}

.md-filter_list:after {
  content: '\e276';
}

.md-filter_none:after {
  content: '\e277';
}

.md-filter_tilt_shift:after {
  content: '\e279';
}

.md-filter_vintage:after {
  content: '\e27a';
}

.md-find_in_page:after {
  content: '\e27c';
}

.md-find_replace:after {
  content: '\e27e';
}

.md-fingerprint:after {
  content: '\e27f';
}

.md-fireplace:after {
  content: '\e280';
}

.md-first_page:after {
  content: '\e282';
}

.md-fitness_center:after {
  content: '\e283';
}

.md-flag:after {
  content: '\e284';
}

.md-flare:after {
  content: '\e286';
}

.md-flash_auto:after {
  content: '\e287';
}

.md-flash_off:after {
  content: '\e288';
}

.md-flash_on:after {
  content: '\e289';
}

.md-flight:after {
  content: '\e28a';
}

.md-flight_land:after {
  content: '\e28b';
}

.md-flight_takeoff:after {
  content: '\e28c';
}

.md-flip:after {
  content: '\e28d';
}

.md-flip_camera_android:after {
  content: '\e28e';
}

.md-flip_camera_ios:after {
  content: '\e290';
}

.md-flip_to_back:after {
  content: '\e292';
}

.md-flip_to_front:after {
  content: '\e293';
}

.md-folder:after {
  content: '\e294';
}

.md-folder_open:after {
  content: '\e296';
}

.md-folder_shared:after {
  content: '\e298';
}

.md-folder_special:after {
  content: '\e29a';
}

.md-font_download:after {
  content: '\e29c';
}

.md-format_align_center:after {
  content: '\e29e';
}

.md-format_align_justify:after {
  content: '\e29f';
}

.md-format_align_left:after {
  content: '\e2a0';
}

.md-format_align_right:after {
  content: '\e2a1';
}

.md-format_bold:after {
  content: '\e2a2';
}

.md-format_clear:after {
  content: '\e2a3';
}

.md-format_color_fill:after {
  content: '\e2a4';
}

.md-format_color_fill:before {
  content: '\e2a5';
}

.md-format_color_reset:after {
  content: '\e2a6';
}

.md-format_color_text:after {
  content: '\e2a8';
}

.md-format_color_text:before {
  content: '\e2a9';
}

.md-format_indent_decrease:after {
  content: '\e2aa';
}

.md-format_indent_increase:after {
  content: '\e2ab';
}

.md-format_italic:after {
  content: '\e2ac';
}

.md-format_line_spacing:after {
  content: '\e2ad';
}


),
			new Opcode(0x9C, "SBC A,H"),
			new Opcode(0x9D, "SBC A,L"),
			new Opcode(0x9E, "SBC A,(HL)"),
			new Opcode(0x9F, "SBC A,A"),
			new Opcode(0xA0, "AND B"),
			new Opcode(0xA1, "AND C"),
			new Opcode(0xA2, "AND D"),
			new Opcode(0xA3, "AND E"),
			new Opcode(0xA4, "AND H"),
			new Opcode(0xA5, "AND L"),
			new Opcode(0xA6, "AND (HL)"),
			new Opcode(0xA7, "AND A"),
			new Opcode(0xA8, "XOR B"),
			new Opcode(0xA9, "XOR C"),
			new Opcode(0xAA, "XOR D"),
			new Opcode(0xAB, "XOR E"),
			new Opcode(0xAC, "XOR H"),
			new Opcode(0xAD, "XOR L"),
			new Opcode(0xAE, "XOR (HL)"),
			new Opcode(0xAF, "XOR A"),
			new Opcode(0xB0, "OR B"),
			new Opcode(0xB1, "OR C"),
			new Opcode(0xB2, "OR D"),
			new Opcode(0xB3, "OR E"),
			new Opcode(0xB4, "OR H"),
			new Opcode(0xB5, "OR L"),
			new Opcode(0xB6, "OR (HL)"),
			new Opcode(0xB7, "OR A"),
			new Opcode(0xB8, "CP B"),
			new Opcode(0xB9, "CP C"),
			new Opcode(0xBA, "CP D"),
			new Opcode(0xBB, "CP E"),
			new Opcode(0xBC, "CP H"),
			new Opcode(0xBD, "CP L"),
			new Opcode(0xBE, "CP (HL)"),
			new Opcode(0xBF, "CP A"),
			new Opcode(0xC0, "RET NZ"),
			new Opcode(0xC1, "POP BC"),
			new Opcode(0xC2, "JP NZ,#nn"),
			new Opcode(0xC3, "JP #nn"),
			new Opcode(0xC4, "CALL NZ,#nn"),
			new Opcode(0xC5, "PUSH BC"),
			new Opcode(0xC6, "ADD A,#n"),
			new Opcode(0xC7, "RST %s"),
			new Opcode(0xC8, "RET Z"),
			new Opcode(0xC9, "RET"),
			new Opcode(0xCA, "JP Z,#nn"),
			new OpcodeExtended(0xCB, Opcode.OpcodesCB),
			new Opcode(0xCC, "CALL Z,#nn"),
			new Opcode(0xCD, "CALL #nn"),
			new Opcode(0xCE, "ADC A,#n"),
			new Opcode(0xCF, "RST %s"),
			new Opcode(0xD0, "RET NC"),
			new Opcode(0xD1, "POP DE"),
			new Opcode(0xD2, "JP NC,#nn"),
			new Opcode(0xD3, "OUT (#n),A"),
			new Opcode(0xD4, "CALL NC,#nn"),
			new Opcode(0xD5, "PUSH DE"),
			new Opcode(0xD6, "SUB #n"),
			new Opcode(0xD7, "RST %s"),
			new Opcode(0xD8, "RET C"),
			new Opcode(0xD9, "EXX"),
			new Opcode(0xDA, "JP C,#nn"),
			new Opcode(0xDB, "IN A,(#n


CORE_UNCAUGHT_EXCEPTIONS_HPP_INCLUDED_)  // libc++: prototype from \
                                                              // Boost?
#if defined(__FreeBSD__) || defined(__OpenBSD__)
namespace __cxxabiv1 {
struct __cxa_eh_globals;
extern "C" __cxa_eh_globals *__cxa_get_globals();
}  // namespace __cxxabiv1
#else
namespace __cxxabiv1 {
struct __cxa_eh_globals;
extern "C" __cxa_eh_globals *__cxa_get_globals() gsl_noexcept;
}  // namespace __cxxabiv1
#endif
#endif
namespace gsl {
namespace detail {
using ::__cxxabiv1::__cxa_get_globals;
}
}  // namespace gsl
#endif
#endif  // ! gsl_HAVE( UNCAUGHT_EXCEPTIONS )
#endif  // gsl_FEATURE( EXPERIMENTAL_RETURN_GUARD )

// MSVC warning suppression macros:

#if gsl_COMPILER_MSVC_VERSION >= 140 && !gsl_COMPILER_NVCC_VERSION
#define gsl_SUPPRESS_MSGSL_WARNING(expr) /* Pimm: note disabled for intel [[gsl::suppress(expr)]]*/
#define gsl_SUPPRESS_MSVC_WARNING(code, descr) __pragma(warning(suppress : code))
#define gsl_DISABLE_MSVC_WARNINGS(codes) __pragma(warning(push)) __pragma(warning(disable : codes))
#define gsl_RESTORE_MSVC_WARNINGS() __pragma(warning(pop))
#else
// TODO: define for Clang
#define gsl_SUPPRESS_MSGSL_WARNING(expr)
#define gsl_SUPPRESS_MSVC_WARNING(code, descr)
#define gsl_DISABLE_MSVC_WARNINGS(codes)
#define gsl_RESTORE_MSVC_WARNINGS()
#endif

// Suppress the following MSVC GSL warnings:
// - C26432: gsl::c.21 : if you define or delete any default operation in the
// type '...', define or delete them all
// - C26410: gsl::r.32 : the parameter 'ptr' is a reference to const unique
// pointer, use const T* or const T& instead
// - C26415: gsl::r.30 : smart pointer parameter 'ptr' is used only to access
// contained pointer. Use T* or T& instead
// - C26418: gsl::r.36 : shared pointer parameter 'ptr' is not copied or moved.
// Use T* or T& instead
// - C26472: gsl::t.1  : don't use a static_cast for arithmetic conversions;
//                       use brace initialization, gsl::narrow_cast or
//                       gsl::narrow
// - C26439: gsl::f.6  : special function 'function' can be declared 'noexcept'
// - C26440: gsl::f.6  : function 'function' can be declared 'noexcept'
// - C26455: gsl::f.6  : default constructor may not throw. Declare it
// 'noexcept'
// - C26473: gsl::t.1  : don't cast between pointer types where the source type
// and the target type are the same
// - C26481: gsl::b.1  : don't use pointer arithmetic. Use span instead
// - C26482: gsl::b.2  : only index into arrays using constant expressions
// - C26446: gdl::b.4  : prefer to use gsl::at() instead of unchecked subscript
// operator
// - C26490: gsl::t.1  : don't use reinterpret_cast
// - C26487: gsl::l.4  : don't return a pointer '(<some number>'s result)' that
// may be invalid
// - C26457: es.48     : (void) should not be used to ignore return values, use
// 'std::ignore =' instead

gsl_DISABLE


nki 包`: 勾選後，如果輸出目錄中已存在同名檔案，會直接覆蓋。

3. **產生與預覽**:
    - **預覽前 5 張卡片**: 在不產生完整包的情況下，快速產生一個 HTML 檔案，在瀏覽器中預覽前 5 張卡片的效果。預覽中不包含音訊和預覽圖。
    - **產生 Anki 包**: 點擊開始最終的產生過程。

### 可選：從 CSV 檔案產生
如果您已經有整理好的雙語對照文字，可以使用此功能快速製卡。

1. **準備 CSV 檔案**: 建立一個 `.csv` 檔案，**第一欄**為卡片正面文字，**第二欄**為卡片背面文字。必須使用 UTF-8 編碼。如果需要 tts 產生語音，請不要新增注音等內容。
2. **CSV 檔案**: 在軟體中選擇您準備好的 CSV 檔案。
3. **設定選項**: 與「產生 Anki 包」選項卡類似，您可以設定輸出目錄、包名稱、TTS 引擎和注音選項。請保證選中的正面和背面語言與 CSV 檔案保持一致，否則會導致發音不正確。
4. **產生 Anki 包**: 點擊按鈕開始產生。此模式下不會有音訊提取和截圖功能，音訊將完全依賴 TTS 產生。

## 設定選項卡
在這裡您可以自訂軟體的預設行為和卡片外觀。

- **預設正面/背面字幕語言**: 設定您最常用的語言，軟體會在「下載」和「自動填入」時優先使用它們。
- **Anki 範本和樣式**:
    - **正面/背面範本**: 使用 Anki 的範本語法（如 `{{Question}}`, `{{Audio_Answer}}`）自訂卡片正反面的佈局。
    - **樣式表**: 使用 CSS 程式碼自訂卡片的字型、顏色、背景等外觀。
- **預覽 HTML 範本**: 自訂點擊「預覽」按鈕時產生的 HTML 檔案的基礎結構。一般不建議修改。
- **儲存與恢復**:
    - `儲存設定`: 儲存您對以上所有設定的更改。
    - `恢復設定`: 撤銷更改，恢復到上次儲存的狀態。

## 常見問題 (FAQ)
1. **問：軟體提示 "FFmpeg not found" (未找到 FFmpeg) 怎麼辦？**
    答：您


solver depends on libmambapy, the only difference between Miniforge and Mambaforge was the presence of the mamba Python package. To minimize surprises, we decided to add mamba to Miniforge too.
>
> 在之前的版本中，Miniforge 仅提供 conda，而 Mambaforge 在此基础上增加了 mamba。自 2023 年 7 月 Miniconda 开始提供 conda-libmamba-solver 以来，Miniforge 也紧随其后，于 8 月开始提供此功能。那时，由于 conda-libmamba-solver 依赖于libmambapy，Miniforge 和 Mambaforge 之间的唯一区别就是是否包含 mamba Python 包。为了尽量减少意外情况，我们决定也在 Miniforge 中添加 mamba。
>
> **Should I choose one or another going forward at the risk of one of them gettting deprecated?**
> Given its wide usage, there are no plans to deprecate Mambaforge. If at some point we decide to deprecate Mambaforge, it will be appropriately announced and communicated with sufficient time in advance.
>
> 鉴于 Mambaforge 的广泛使用，目前没有计划将其弃用。如果未来我们决定弃用 Mambaforge，我们会提前充分公告并通知相关用户。
>
> That said, if you had to start using one today, we recommend to stick to Miniforge.
>
> 不过，如果你今天需要开始使用其中一个，我们建议你坚持使用 Miniforge。

## Miniforge 和 Miniconda

参考：[What’s the difference between Anaconda, conda, Miniconda, mamba, Mambaforge, micromamba?](https://bioconda.github.io/faqs.html#what-s-the-difference-between-anaconda-conda-miniconda-mamba-mambaforge-micromamba) - bioconda#Faqs

Miniforge 是社区 (conda-forge) 驱动的简约 conda 安装程序。Miniforge 与 Miniconda 类似，但预配置了 `conda-forge` 通道，并且所有包都来自 conda-forge 而不是 `defaults` 通道。现在它还包含了 mamba 和 libmamba。

Miniconda 是公司 (Anaconda) 驱动的简约 conda 安装程序。随后的软件包安装来自 anaconda 频道（默认或其他）。

## 一句话

总的一句话来说，Mambaforge 类似于 Miniforge，但将 mamba 安装到基础环境中。虽然没有严格弃用，但从 **2023 年 9 月**起不鼓励使用它（请参阅 miniforge 自述 [README](https://github.com/conda-forge/miniforge) 文件）。

## 版本选择

Miniforge3 的 [Release 24.5.0-0](https://github.com/conda-forge/miniforge/releases/tag/24.5.0-0) 要求 **Linux-x86_64: glibc >= 2.17**，也就是对于 CentOS/RHEL 6.x (glibc = 2.12) 的旧服务器将无法正常安装使用。

```bash
$ lsb_release -a
LSB Version:    :core-4.1-amd64:core-4.1-noarch
Distributor ID: CentOS
Description:    CentOS Linux release 7.7.1908 (Core)
Release:


;
        height += 1;
        Grid { d, width, height }
    }
    fn part1(&self) -> usize {
        let mut c = 0;
        let m = self.width * self.height;
        for i in 0..m {
            for j in i + 1..m {
                let n1 = self.d.get(&(i % self.width, i / self.width)).unwrap();
                let n2 = self.d.get(&(j % self.width, j / self.width)).unwrap();
                if (n1.used != 0 && n1.used <= n2.free)
                    || (n2.used != 0 && n2.used <= n1.free)
                {
                    c += 1;
                }
            }
        }
        c
    }
    fn part2(&self) -> usize {
        let mut empty = (0, 0);
        let mut full = 0;
        for y in 0..self.height {
            for x in 0..self.width {
                let used = self.d.get(&(x, y)).unwrap().used;
                if used == 0 {
                    empty = (x, y);
                } else if used > 150 {
                    full += 1;
                }
            }
        }
        // steps to go around the full spaces
        let n = 1 + full - (self.width - empty.0) + full;
        // plus height plus steps to move across
        n + empty.1 + (self.width - 2) * 5
    }
}

fn main() {
    let lines = aoc::input_lines();
    aoc::benchme(|bench: bool| {
        let g = Grid::new(&lines);
        let p1 = g.part1();
        let p2 = g.part2();
        if !bench {
            println!("Part 1: {}", p1);
            println!("Part 2: {}", p2);
        }
    });
}
use crate::bindings::*;

use std::slice;
use std::str::{self, Utf8Error};
use std::borrow::Cow;

/// Static string initializer for [`ngx_str_t`].
///
/// The resulting byte string is always nul-terminated (just like a C string).
///
/// [`ngx_str_t`]: https://nginx.org/en/docs/dev/development_guide.html#string_overview
#[macro_export]
macro_rules! ngx_string {
    ($s:expr) => {
        {
            ngx_str_t { len: $s.len(), data: concat!($s, "\0").as_ptr() as *mut u8 }
        }
    };
}

/// Static empty string initializer for [`ngx_str_t`].
///
/// [`ngx_str_t`]: https://nginx.org/en/docs/dev/development_guide.html#string_overview
#[macro_export]
macro_rules! ngx_null_string {
    () => {
        ngx_str_t { len: 0, data: ::std::ptr::null_mut() }
    };
}

/// Representation of a borrowed [Nginx string].
///
/// [Nginx string]: https://nginx.org/en/docs/dev/development_guide.html#string_overview
pub struct NgxStr([u_char]);

impl NgxStr {
    /// Create an [`NgxStr`] from an [`ngx_str_t`].
    ///
    /// [`ngx_str_t`]: https://nginx.org/en/docs/dev/development_guide.html#string_overview
    pub unsafe fn from_ngx_str<'a>(str: ngx_str_t) -> &'a NgxStr {
        // SAFETY: The caller has provided a


8.decode(data.sublist(offset, offset + interfaceLength - 1));
          offset +=
              interfaceLength; // Skip the string bytes and null terminator
          while (offset % 4 != 0) {
            offset++;
          } // Padding
          final version =
              ByteData.view(data.buffer).getUint32(offset, Endian.little);
          offset += 4;
          var event = RegistryGlobalEvent(
            name,
            interface,
            version,
          );
          _globalHandler!(event);
        }
        break;
      case 1:
        if (_globalRemoveHandler != null) {
          var offset = 0;
          final name =
              ByteData.view(data.buffer).getUint32(offset, Endian.little);
          offset += 4;
          var event = RegistryGlobalRemoveEvent(
            name,
          );
          _globalRemoveHandler!(event);
        }
        break;
    }
  }
}

/// done event
///
/// Notify the client when the related request is done.
///
class CallbackDoneEvent {
  /// request-specific data for the callback
  final int callbackData;

  CallbackDoneEvent(
    this.callbackData,
  );

  @override
  toString() {
    return "CallbackDoneEvent (callbackData: $callbackData)";
  }
}

typedef CallbackDoneEventHandler = void Function(CallbackDoneEvent);

/// callback object
///
/// Clients can handle the 'done' event to get notified when
/// the related request is done.
///
/// Note, because wl_callback objects are created from multiple independent
/// factory interfaces, the wl_callback interface is frozen at version 1.
///
class Callback extends Proxy implements Dispatcher {
  final Context innerContext;
  final version = 1;

  Callback(this.innerContext) : super(innerContext.allocateClientId()) {
    innerContext.register(this);
  }

  @override
  toString() {
    return "Callback {name: 'wl_callback', id: '$objectId', version: '1',}";
  }

  /// done event
  ///
  /// Notify the client when the related request is done.
  ///
  /// Event handler for Done
  /// - [callback_data]: request-specific data for the callback
  void onDone(CallbackDoneEventHandler handler) {
    _doneHandler = handler;
  }

  CallbackDoneEventHandler? _doneHandler;

  @override
  void dispatch(int opcode, int fd, Uint8List data) {
    logLn("Callback.dispatch($opcode, $fd, $data)");
    switch (opcode) {
      case 0:
        if (_doneHandler != null) {
          var offset = 0;
          final callbackData =
              ByteData.view(data.buffer).getUint32(offset, Endian.little);
          offset += 4;
          var event = CallbackDoneEvent(
            callbackData,
          );
          _doneHandler!(event);
        }
        break;
    }
  }
}

/// the compositor singleton
///
/// A compositor.  This object is a singleton global.  The
/// compositor is in charge of combining the contents of multiple
/// surfaces into one displayable output.
///
class Compositor extends Proxy {
  final Context innerContext;
  final version = 6;

  Compositor(this.innerContext) : super(innerContext.allocateClientId()) {
    innerContext.register(this);
  }

  @override
  toString() {
    return "Compositor {name: 'wl_compositor', id: '$objectId', version: '6',}";
  }

  /// create new surface
  ///
  /// Ask the compositor to create a new surface.
  ///
  /// [id]: the new surface
  Result<Surface, Object> createSurface() {
    var id = Surface(innerContext);
    logLn("Compositor::createSurface  id: $id");
    var arguments = [id];
    var argTypes = <WaylandType>[WaylandType.newId];
    var calclulat


 0 01-2.652 2.895c-.15.009-.942.08-.906.569.03.34.03.47.03.47a.369.369 0 00-.15.47c.072.132.165.251.275.353l.279-.378a.39.39 0 00.189.1h.037a.38.38 0 00.21-.028.37.37 0 00.162-.16.41.41 0 00.018-.35l-.1-.264.29-.4a.23.23 0 01.062-.059.219.219 0 01.078-.03.2.2 0 01.085 0c.027.007.053.02.076.036l.72.53a.229.229 0 01.05.3l-.9 1.215a.436.436 0 00.155-.035c.21-.187.38-.414.5-.668l.03-.052Zm5.44 11.173-.237-6.007-.03-.986 2.11-3.54a1.744 1.744 0 00.2-.484c.064-.262.067-.536.01-.8l-.044-.185-.07-.328h-4.77l-.22 4.29c.012.8.12 1.596.32 2.37l1.12 5.01.083.039 1.528.621Zm5.25-1.872v-.014l1.6-.72-3.765-5.094a.678.678 0 01-.13-.27l-.426-1.788-1.8 3.027.015.416c.232.244.492.497.78.773l.095.091 3.63 3.579Z"/></g></svg>';
  static const String woman_wrestling =
      '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="32" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><g fill="currentColor"><path d="M18.828 7.185h-.819a.135.135 0 110-.27h.819a.135.135 0 110 .27Zm-.911.695a.066.066 0 01-.055-.034.313.313 0 00-.025.124c0 .057.017.113.05.16h.3a.277.277 0 00.05-.16.24.24 0 00-.2-.26.157.157 0 00-.07.017.1.1 0 01.02.063.08.08 0 01-.07.09Zm.71 1.394h-.71a.126.126 0 100 .252h.71a.126.126 0 100-.252Z"/><path d="M18.328 7.42a.615.615 0 00-.42.169.3.3 0 01.2-.08c.314 0 .389.376.34.62h.33a.148.148 0 00.129-.16v-.01a.56.56 0 00-.579-.54Zm-5.27-.235h.82a.135.135 0 100-.27h-.82a.135.135 0 100 .27Zm.189 2.089h.72a.126.126 0 110 .252h-.72a.126.126 0 010-.252Zm.642-1.736Zm.246.409a.035.035 0 01-.003-.013.07.07 0 00.003.018.07.07 0 01.003.018v-.01a.025.025 0 00-.003-.013Zm-.632-.282a.415.415 0 00-.086.305c0 .054.008.107.02.16h-.33a.148.148 0 01-.13-.16v-.01a.558.558 0 01.58-.54.59.59 0 01.332.118.253.253 0 00-.111-.028.415.415 0 00-.275.155Z"/><path d="M13.847 7.71a.238.238 0 00-.2.26c0 .057.017.113.05.16H14


_owned (),
					debug: debug,
				}),

			state: Arc::new (
				Mutex::new (
					ChunkCacheState {

				uncompressed_memory_items:
					LruCache::new (
						uncompressed_memory_cache_size),

				compressed_memory_items:
					LruCache::new (
						compressed_memory_cache_size),

				live_filesystem_items:
					LruCache::new (
						live_filesystem_cache_size),

				dead_filesystem_items:
					LruCache::new (
						dead_filesystem_cache_size),

				uncompressed_memory_hits: 0,
				compressed_memory_hits: 0,
				live_filesystem_hits: 0,
				dead_filesystem_hits: 0,
				misses: 0,

			})),

			cpu_pool:
				CpuPool::new (
					num_threads),

		})

	}

	pub fn insert (
		& self,
		key: Key,
		uncompressed_data: Arc <Vec <u8>>,
		live: bool,
	) -> Result <(), String> {

		let entry_filename =
			rand::thread_rng ()
				.gen_ascii_chars ()
				.take (16)
				.collect ();

		let entry_path =
			self.data.path.join (
				& entry_filename);

		let mut self_state =
			self.state.lock ().unwrap ();

		// store in uncompressed memory cache

		if ! self_state.uncompressed_memory_items.contains_key (
			& key,
		) {

			self_state.uncompressed_memory_items.insert (
				key.clone (),
				uncompressed_data.clone ());

		}

		// check if it is compressed

		let in_live_filesystem_cache =
			self_state.live_filesystem_items.contains_key (
				& key);

		let in_dead_filesystem_cache =
			self_state.live_filesystem_items.contains_key (
				& key);

		if (
			! in_live_filesystem_cache
			&& ! in_dead_filesystem_cache
		) {

			// try and compress the data

			let (compressed, stored_data) =
				match (

				minilzo::compress (
					& uncompressed_data)

			) {

				Ok (compressed_data) =>
					(true, Arc::new (compressed_data)),

				Err (minilzo::Error::NotCompressible) =>
					(false, uncompressed_data.clone ()),

				Err (error) =>
					return Err (
						format! (
							"Error during compression: {:?}",
							error)),

			};

			// store in compressed memory cache

			if live {

				self_state.compressed_memory_items.insert (
					key.clone (),
					if compressed {

						MemoryCacheItem::Compressed (
							stored_data.clone (),
							uncompressed_data.len ())

					} else {

						MemoryCacheItem::Uncompressed (
							stored_data.clone ())

					}
				);

			}

			// store in compressed filesystem cache

			if ! in_live_filesystem_cache && ! in_dead_filesystem_cache {

				let mut output =
					File::create (
						& entry_path,
					).unwrap_or_else (
						|error|

						panic! (
							"Unable to create {}: {}",
							entry_path.to_string_lossy (),
							error.description ())

					);

				output.write (
					& stored_data,
				).unwrap_or_else (
					|error|

					panic! (
						"Error writing to {}: {}",
						entry_path.to_string_lossy (),
						error.description ())

				);

				// create and store the filesystem item

				let filesystem_item =
					FilesystemItem {

					storage_manager: self.data.clone (),
					filename: entry_filenam


big>本同人社团词条缺乏作品</big>
此同人社团并未满足同人社团收录要求，请尽快补充此社团制作的符合东方同人作品收录要求的作品，否则将被删除。

## 目录

- [1 社团信息](#社团信息)
- [2 社团简介](#社团简介)
- [3 成员名单](#成员名单)
- [4 作品列表](#作品列表)
- [5 参展信息](#参展信息)

## 社团信息
[](./文件-Hansong_LOGO.png.md)  [](./文件-Hansong_LOGO.png.md)logo

社团名称	 한송사

中文名称	寒松社

主要作品类型	周边

成立时间	2022年

当前状态	活动

主催	 键山家的逸仙号
 近藤莉子
 长谷川米沙

地区	中国大陆

官网页面	https://twitter.com/hansongs


只映射该对象中值不为null的属性

selectMapper

java.lang.String selectMapper(java.lang.String tableName,
                              java.lang.Object[] selectFields)

根据传入的表名生成一个select语句，如select user_name from user

参数:

tableName - 表名

selectFields - select字段

返回:

java.lang.String

data

2019/4/13

name

selectMapper

notice

请注意本方法产生的语句不带有预编译参数

whereMapper

java.lang.String whereMapper(java.lang.Object[] whereFields,
                             java.lang.String conj,
                             java.lang.String condition)

生成一个where语句，如where id = ?

参数:

whereFields - where条件的字段名数组,比如where id = 1,应该传入 {id}

conj - 逻辑连接词：and , or , not

返回:

java.lang.String 返回映射之后的预编译where语句,如where id = ? and user_name = ?

data

2019/4/13

name

whereMapper

notice

请注意此语句只用于追加where语句，不能单独用来查询

likeMapper

java.lang.String likeMapper(java.lang.Object[] likeFields,
                            java.lang.String conj)

生成一个where like 语句，如where id like ?

参数:

likeFields - where条件的字段名数组,比如where id


e.value.textContent;
	}
	return node;
};

const mapTypeToElement = (type: string): string => {
	switch (type) {
		case 'root':
			return 'main';
		default:
			return type;
	}
};

export default HTMLNode;
import {Pipe, PipeTransform  } from '@angular/core';

export class Type {
    id: number;
    title: string;
}

@Pipe({
    name: 'typeSwitch'
})

export class TypeSwitchPipe implements PipeTransform {
    transform(v: any, types: Type[]): string {
        let name = "--";
        types.forEach((e) => { if (e.id == v) name = e.title; })
        return name;
    }
}

@Pipe({
    name: 'join'
})
export class JoinPipe implements PipeTransform {
    transform(vv: any[], s?: string): string {
        if (s == undefined) {
            return vv.toString();
        }
        var str = "";
        if (s == '\n') { s = '<br/>'; }
        let ll = vv.length-1;
        vv.forEach((v, i) => {
            if (ll == i) {
                s = '';
            }
            str += v + s;

        });

        return str;
    }
}import React from "react";
import { textType } from "./parse";

const emoji = {
  id: 0,
  cn: "[微笑]",
  hk: "[微笑]",
  us: "[Smile]",
  code: "/::)",
  web_code: "/微笑",
  style: "smiley_0",
};

type EmojiProps = {
  /**
   * 高度
   */
  height?: number;
  /**
   * 点击表情的回调，参数一是点击的 emoji text，参数二是最近使用表情（如果有开启最近使用功能的话）
   */
  insertEmoji?: (emojiText: string, recentUsed?: Array<typeof emoji>) => void;
  /**
   * Emoji 雪碧图地址，强烈建议使用自己的 CDN 地址，默认是 bilibili 图床地址，稳定性未知
   */
  source?: string;
  /**
   * 最近使用表情，参数仅用作初始化，无初始值传空数组；想关闭此功能则不传此参数
   */
  recentUsed?: Array<typeof emoji>;
};

type EmojiContentType = {
  type: typeof textType.normal | typeof textType.emoji;
  content: string;
  imageClass: string;
};

type ContentWithEmojiProps = {
  /**
   * 内容
   */
  content?: string | EmojiContentType[];
  /**
   * 外层样式
   */
  bodyStyle?: React.CSSProperties;
  /**
   * 文本样式
   */
  textStyle?: React.CSSProperties;
  /**
   * 表情的显示大小，默认 0.5
   */
  emojiScale?: number;
  /**
   * Emoji 雪碧图地址
   */
  source?: string;
};

export function parseEmoji(content: string): EmojiContentType[];
export const ContentWithEmoji: React.FC<ContentWithEmojiProps>;
export const Emoji: React.FC<EmojiProps>;
import { Component} from '@angular/core';
import { FormArray, FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms';

@Component({
  selector: 'app-dynamics',
  templateUrl: './dynamics.component.html',
  styles: [
  ]
})
export class DynamicsComponent{

  myForm:FormGroup=this.fb.group({
    name: ['', [Validators.required, Validators.minLength(3)]],
    favoriteGame: this.fb.array([
      ['FIFA 22'], ['Fortnite']
    ], Validators.required)
  })

  newGame:FormControl=this.fb.control('', Validators.required)

  get favoriteArray(){
       return this.myForm.get('favoriteGame') as FormArray;
  }

  constructor(private fb: FormBuilder) { }

  validateField(field:string){


/**
 * @file
 *
 * @brief Source for email plugin
 *
 * @copyright BSD License (see doc/LICENSE.md or https://www.libelektra.org)
 *
 */

#include <kdberrors.h>
#include <regex.h>
#include <stdio.h>

#include "email.h"

static int validateEmail (Key * key, Key * parentKey)
{
	const Key * meta = keyGetMeta (key, "check/email");
	if (!meta) return 1;

	const char * addr = keyString (key);
	if (!addr) return 0;
	const char * regexString = // regex based on information from wikipedia and RFC5321 built in regex101.com
		"^[a-zA-Z0-9!#$%&'*+\\/=?^_`{|}~-]+([a-zA-Z0-9!#$%&'*+\\/=?^_`{|}~.-][a-zA-Z0-9!#$%&'*+\\/=?^_`{|}~-])*"
		"[a-zA-Z0-9!#$%&'*+\\/=?^_`{|}~-]?"
		"@([a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)(\\.[a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$";
	regex_t regex;
	regmatch_t offsets;
	int ret = regcomp (&regex, regexString, REG_NOSUB | REG_EXTENDED | REG_NEWLINE);
	if (ret)
	{
		ELEKTRA_SET_INTERNAL_ERRORF (parentKey, "Failed to compile regex for email validation on %s", keyString (key));
		return 0;
	}

	ret = regexec (&regex, addr, 1, &offsets, 0);
	regfree (&regex);
	if (!ret)
	{
		return 1;
	}

	ELEKTRA_SET_VALIDATION_SEMANTIC_ERRORF (parentKey, "Value %s of key %s was not a valid email", keyString (key), keyName (key));
	return 0;
}

int elektraEmailGet (Plugin * handle ELEKTRA_UNUSED, KeySet * returned ELEKTRA_UNUSED, Key * parentKey ELEKTRA_UNUSED)
{
	if (!elektraStrCmp (keyName (parentKey), "system:/elektra/modules/email"))
	{
		KeySet * contract =
			ksNew (30, keyNew ("system:/elektra/modules/email", KEY_VALUE, "email plugin waits for your orders", KEY_END),
			       keyNew ("system:/elektra/modules/email/exports", KEY_END),
			       keyNew ("system:/elektra/modules/email/exports/get", KEY_FUNC, elektraEmailGet, KEY_END),
			       keyNew ("system:/elektra/modules/email/exports/set", KEY_FUNC, elektraEmailSet, KEY_END),
#include ELEKTRA_README
			       keyNew ("system:/elektra/modules/email/infos/version", KEY_VALUE, PLUGINVERSION, KEY_END), KS_END);
		ksAppend (returned, contract);
		ksDel (contract);
		return ELEKTRA_PLUGIN_STATUS_SUCCESS;
	}
	return ELEKTRA_PLUGIN_STATUS_NO_UPDATE;
}

int elektraEmailSet (Plugin * handle ELEKTRA_UNUSED, KeySet * returned ELEKTRA_UNUSED, Key * parentKey ELEKTRA_UNUSED)
{
	// set all keys
	// this function is optional

	for (elektraCursor it = 0; it < ksGetSize (returned); ++it)
	{
		Key * cur = ksAtCursor (returned, it);
		int rc = validateEmail (cur, parentKey);
		if (!rc) return ELEKTRA_PLUGIN_STATUS_ERROR;
	}
	return ELEKTRA_PLUGIN_STATUS_SUCCESS;
}

Plugin * ELEKTRA_PLUGIN_EXPORT
{
	// clang-format off
	return elektraPluginExport ("email",
		ELEKTRA_PLUGIN_GET,	&elektraEmailGet,
		ELEKTRA_PLUGIN_SET,	&elektraEmailSet,
		ELEKTRA_PLUGIN_END);
}


ing>,
        urls: Set<String>,
        emojis: Map<String, String>,
        tags: ImmutableListOfLists<String>,
    ): Segment {
        if (word.isEmpty()) return RegularTextSegment(word)

        if (images.contains(word)) return ImageSegment(word)

        if (urls.contains(word)) return LinkSegment(word)

        if (Nip30CustomEmoji.fastMightContainEmoji(word, emojis) && emojis.any { word.contains(it.key) }) return EmojiSegment(word)

        if (word.startsWith("lnbc", true)) return InvoiceSegment(word)

        if (word.startsWith("lnurl", true)) return WithdrawSegment(word)

        if (word.startsWith("cashuA", true)) return CashuSegment(word)

        if (startsWithNIP19Scheme(word)) return BechSegment(word)

        if (word.startsWith("#")) return parseHash(word, tags)

        if (word.contains("@")) {
            if (Patterns.EMAIL_ADDRESS.matcher(word).matches()) return EmailSegment(word)
        }

        if (isPotentialPhoneNumber(word) && !isDate(word)) {
            if (Patterns.PHONE.matcher(word).matches()) return PhoneSegment(word)
        }

        val indexOfPeriod = word.indexOf(".")
        if (indexOfPeriod > 0 && indexOfPeriod < word.length - 1) { // periods cannot be the last one
            val schemelessMatcher = noProtocolUrlValidator.matcher(word)
            if (schemelessMatcher.find()) {
                val url = schemelessMatcher.group(1) // url
                val additionalChars = schemelessMatcher.group(4).ifEmpty { null } // additional chars
                val pattern =
                    """^([A-Za-z0-9-_]+(\.[A-Za-z0-9-_]+)+)(:[0-9]+)?(/[^?#]*)?(\?[^#]*)?(#.*)?"""
                        .toRegex(RegexOption.IGNORE_CASE)
                if (pattern.find(word) != null && url != null) {
                    return SchemelessUrlSegment(word, url, additionalChars)
                }
            }
        }

        return RegularTextSegment(word)
    }

    private fun parseHash(
        word: String,
        tags: ImmutableListOfLists<String>,
    ): Segment {
        // First #[n]

        val matcher = tagIndex.matcher(word)
        try {
            if (matcher.find()) {
                val index = matcher.group(1)?.toInt()
                val suffix = matcher.group(2)

                if (index != null && index >= 0 && index < tags.lists.size) {
                    val tag = tags.lists[index]

                    if (tag.size > 1) {
                        if (tag[0] == "p") {
                            return HashIndexUserSegment(word, tag[1], suffix)
                        } else if (tag[0] == "e" || tag[0] == "a") {
                            return HashIndexEventSegment(word, tag[1], suffix)
                        }
                    }
                }
            }
        } catch (e: Exception) {
            if (e is CancellationException) throw e
            Log.w("Tag Parser", "Couldn't link tag $word", e)
        }

        // Second #Amethyst
        val hashtagMatcher = hashTagsPattern.matcher(word)

        try {
            if (hashtagMatcher.find()) {
                val hashtag = hashtagMatcher.group(1)
                if (hashtag != null) {
                    return HashTagSegment(word, hashtag, hashtagMatcher.group(2).ifEmpty { null })
                }
            }
        } catch (e: Exception) {
            if (e is CancellationException) throw e
            Log.e("Hashtag Parser", "Couldn't link hashtag $word", e)
        }

        return RegularTextSegment(word)
    }

    companion object {
        val longDatePattern: Pattern = Pattern.compile("^\\d{4}-\\d{2}-\\d{2}$")
        val shortDatePattern: Pattern =


efault processing of a System packet
//-------------------------------------------------------------------
Err 			SlkSysPktDefaultResponse(SlkPktHeaderPtr headerP, void *bodyP)
					SYS_TRAP(sysTrapSlkSysPktDefaultResponse);

//-------------------------------------------------------------------
// Do RPC call
//-------------------------------------------------------------------
Err 			SlkProcessRPC(SlkPktHeaderPtr headerP, void *bodyP)
					SYS_TRAP(sysTrapSlkProcessRPC);

#ifdef __cplusplus
}
#endif
#endif

#endif	//__SERIAL_LINK_H


pth) \| [log](https://download.openmmlab.com/mmsegmentation/v0.5/unet/deeplabv3_unet_s5-d16_ce-1.0-dice-3.0_64x64_40k_drive/deeplabv3_unet_s5-d16_ce-1.0-dice-3.0_64x64_40k_drive_20211210_201825.log.json) |

### STARE

| Method           | Backbone    | Loss                 | Image Size | Crop Size | Stride | Lr schd | Mem (GB) | Inf time (fps) | Device | mDice |  Dice | config                                                                                | download                                                                                |
| ---------------- | ----------- | -------------------- | ---------- | --------- | -----: | ------- | -------- | -------------: | ------ | ----: | ----: | --------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| UNet + FCN       | UNet-S5-D16 | Cross Entropy        | 605x700    | 128x128   |  85x85 | 40000   | 0.968    |              - | V100   | 89.78 | 81.02 | [config](https://github.com/open-mmlab/mmsegmentation/blob/main/configs/unet/unet-s5-d16_fcn_4xb4-40k_stare-128x128.py)                       | [model](https://download.openmmlab.com/mmsegmentation/v0.5/unet/fcn_unet_s5-d16_128x128_40k_stare/fcn_unet_s5-d16_128x128_40k_stare_20201223_191051-7d77e78b.pth) \| [log](https://download.openmmlab.com/mmsegmentation/v0.5/unet/unet_s5-d16_128x128_40k_stare/unet_s5-d16_128x128_40k_stare-20201223_191051.log.json)                                                                                |
| UNet + FCN       | UNet-S5-D16 | Cross Entropy + Dice | 605x700    | 128x128   |  85x85 | 40000   | 0.986    |              - | V100   | 90.65 | 82.70 | [config](https://github.com/open-mmlab/mmsegmentation/blob/main/configs/unet/unet-s5-d16_fcn_4xb4-ce-1.0-dice-3.0-40k_stare-128x128.py)       | [model](https://download.openmmlab.com/mmsegmentation/v0.5/unet/fcn_unet_s5-d16_ce-1.0-


s a parameter as used.
    pub fn mark_as_used(&self) {
        self.used.store(true, Ordering::Relaxed);
    }

    /// Writes parameter name.
    pub fn write_name<W: Write>(&self, w: &mut W) -> Result<(), Error> {
        if !self.used.load(Ordering::Relaxed) {
            w.write_str("_")?;
        }
        w.write_str("arg")?;

        if self.index != 0 {
            write!(w, "{}", self.index)?;
        }
        Ok(())
    }
}

impl<'a> Encode for Param<'a> {
    fn encode<W: Write>(&self, w: &mut W, indent: usize) -> Result<(), Error> {
        self.write_name(w)?;
        w.write_str(": ")?;
        self.f_type.encode(w, indent)
    }
}
<filename>dmbc/tests/wallet.rs
extern crate dmbc;
extern crate exonum;
extern crate exonum_testkit;
extern crate hyper;
extern crate iron;
extern crate iron_test;
extern crate serde_json;
extern crate mount;

pub mod dmbc_testkit;

use std::collections::HashMap;

use hyper::status::StatusCode;
use exonum::crypto;
use dmbc_testkit::{DmbcTestKit, DmbcTestApiBuilder, DmbcTestKitApi};

use dmbc::currency::api::wallet::{self, ExtendedAsset, WalletAssetsResponse, WalletAssetsResponseBody,
                                  WalletInfo, WalletResponse, WalletsResponse, WalletsResponseBody,
                                  WalletAssetResponse};
use dmbc::currency::wallet::Wallet;
use dmbc::currency::assets::AssetId;
use dmbc::currency::api::error::ApiError;

#[test]
fn wallet() {
    let fixed = 10;
    let units = 2;
    let balance = 1000;
    let meta_data = "asset";

    let (pub_key, _) = crypto::gen_keypair();
    let (asset, info) = dmbc_testkit::create_asset(meta_data, units, dmbc_testkit::asset_fees(fixed, "0.0".parse().unwrap()), &pub_key);

    let testkit = DmbcTestApiBuilder::new()
        .add_wallet_value(&pub_key, Wallet::new(balance, vec![]))
        .add_asset_to_wallet(&pub_key, (asset.clone(), info))
        .create();
    let api = testkit.api();

    let (status, response): (StatusCode, WalletResponse) = api.get_with_status(
        &format!("/v1/wallets/{}", pub_key.to_string())
    );

    let wallet = Wallet::new(balance, vec![asset]);

    assert_eq!(status, StatusCode::Ok);
    assert_eq!(response, Ok(WalletInfo::from(wallet)));
}

#[test]
fn wallets() {
    let fixed = 10;
    let units = 2;
    let balance = 1000;
    let meta_data = "asset";

    let (pub_key1, _) = crypto::gen_keypair();
    let (pub_key2, _) = crypto::gen_keypair();

    let asset1 = dmbc_testkit::create_asset(meta_data, units, dmbc_testkit::asset_fees(fixed, "0.0".parse().unwrap()), &pub_key1);
    let asset2 = dmbc_testkit::create_asset(meta_data, units, dmbc_testkit::asset_fees(fixed, "0.0".parse().unwrap()), &pub_key2);

    let mut testkit = DmbcTestApiBuilder::new()
        .add_wallet_value(&pub_key1, Wallet::new(balance, vec![]))
        .add_wallet_value(&pub_key2, Wallet::new(balance, vec![]))
        .add_asset_to_wallet(&pub_key1, asset1)
        .add_asset_to_wallet(&pub_key2, asset2


 eip-7702
		code := evmKeeper.GetCode(ctx, common.BytesToHash(account.CodeHash))
		_, delegated := ethtypes.ParseDelegation(code)
		if len(code) > 0 && !delegated {
			return errorsmod.Wrapf(
				errortypes.ErrInvalidType,
				"the sender is not EOA: address %s", from,
			)
		}
	}
	if account == nil {
		acc := accountKeeper.NewAccountWithAddress(ctx, from.Bytes())
		accountKeeper.SetAccount(ctx, acc)
		account = statedb.NewEmptyAccount()
	}

	if err := keeper.CheckSenderBalance(sdkmath.NewIntFromBigInt(account.Balance.ToBig()), ethTx); err != nil {
		return errorsmod.Wrap(err, "failed to check sender balance")
	}

	return nil
}
package cosmos

import (
	"fmt"
	"math/big"
	"slices"

	feemarkettypes "github.com/cosmos/evm/x/feemarket/types"
	evmtypes "github.com/cosmos/evm/x/vm/types"

	errorsmod "cosmossdk.io/errors"
	"cosmossdk.io/math"

	sdk "github.com/cosmos/cosmos-sdk/types"
	errortypes "github.com/cosmos/cosmos-sdk/types/errors"
)

// MinGasPriceDecorator will check if the transaction's fee is at least as large
// as the MinGasPrices param. If fee is too low, decorator returns error and tx
// is rejected. This applies for both CheckTx and DeliverTx
// If fee is high enough, then call next AnteHandler
// CONTRACT: Tx must implement FeeTx to use MinGasPriceDecorator
type MinGasPriceDecorator struct {
	feemarketParams *feemarkettypes.Params
}

// NewMinGasPriceDecorator creates a new MinGasPriceDecorator instance used only for
// Cosmos transactions.
func NewMinGasPriceDecorator(feemarketParams *feemarkettypes.Params) MinGasPriceDecorator {
	return MinGasPriceDecorator{feemarketParams}
}

func (mpd MinGasPriceDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, next sdk.AnteHandler) (newCtx sdk.Context, err error) {
	feeTx, ok := tx.(sdk.FeeTx)
	if !ok {
		return ctx, errorsmod.Wrapf(errortypes.ErrInvalidType, "invalid transaction type %T, expected sdk.FeeTx", tx)
	}

	minGasPrice := mpd.feemarketParams.MinGasPrice

	feeCoins := feeTx.GetFee()
	evmDenom := evmtypes.GetEVMCoinDenom()

	// only allow user to pass in aatom and stake native token as transaction fees
	// allow use stake native tokens for fees is just for unit tests to pass
	//
	// TODO: is the handling of stake necessary here? Why not adjust the tests to contain the correct denom?
	validFees := len(feeCoins) == 0 || (len(feeCoins) == 1 && slices.Contains([]string{evmDenom, sdk.DefaultBondDenom}, feeCoins.GetDenomByIndex(0)))
	if !validFees && !simulate {
		return ctx, fmt.Errorf("expected only native token %s for fee, but got %s", evmDenom, feeCoins.String())
	}

	// Short-circuit if min gas price is 0 or if simulating
	if minGasPrice.IsZero() || simulate {
		return next(ctx, tx, simulate)
	}

	minGasPrices := sdk.DecCoins{
		{
			Denom:  evmDenom,
			Amount: minGasPrice,
		},
	}

	gas := feeTx.GetGas()

	requiredFees :=


ove.l	a4,a0
	add	(a6,d7.w),a0
	jsr	(a5)
	endm
goto	macro
	ext	d7
	move.l	a4,a0
	add	(a6,d7.w),a0
	jmp	(a5)
	endm

mode0
mode1
	beq.s	space
	move.l	a4,a0
	add	(a6,d7.w),a0
	jmp	(a5)
mode2
	beq.s	sp2
	add	(a6,d7.w),a4
	move.l	a4,a0
	jsr	(a5)
	iny
	move.l	a4,a0
	jmp	(a5)
mode3
	beq.s	sp2
	add	(a6,d7.w),a4
	move.l	a4,a0
	jsr	(a5)
	iny
	move.l	a4,a0
	jsr	(a5)
	iny
	move.l	a4,a0
	jmp	(a5)
mode4
	beq.s	sp2
	add	(a6,d7.w),a4
	move.l	a4,a0
	jsr	(a5)
	iny
	move.l	a4,a0
	jsr	(a5)
	iny
	move.l	a4,a0
	jsr	(a5)
	iny
	move.l	a4,a0
	jmp	(a5)
space
sp2	rts
mode5
	beq.s	sp2
	add	(a6,d7.w),a4
	move.l	a4,a0
	jsr	(a5)
	iny
	move.l	a4,a0
	jsr	(a5)
	iny
	move.l	a4,a0
	jsr	(a5)
	iny
	move.l	a4,a0
	jsr	(a5)
	iny
	move.l	a4,a0
	jmp	(a5)

mode6
	beq.s	sp2
	add	(a6,d7.w),a4
	move.l	a4,a0
	jsr	(a5)
	iny
	move.l	a4,a0
	jsr	(a5)
	iny
	move.l	a4,a0
	jsr	(a5)
	iny
	move.l	a4,a0
	jsr	(a5)
	iny
	move.l	a4,a0
	jsr	(a5)
	iny
	move.l	a4,a0
	jmp	(a5)

mode7
	beq.s	sp4
	add	(a6,d7.w),a4
	move.l	a4,a0
	jsr	(a5)
	iny
	move.l	a4,a0
	jsr	(a5)
	iny
	move.l	a4,a0
	jsr	(a5)
	iny
	move.l	a4,a0
	jsr	(a5)
	iny
	move.l	a4,a0
	jsr	(a5)
	iny
	move.l	a4,a0
	jsr	(a5)
	iny
	move.l	a4,a0
	jmp	(a5)

sp4	rts
mode8
	beq.s	sp4
	add	(a6,d7.w),a4
	move.l	a4,a0
	jsr	(a5)
	iny
	move.l	a4,a0
	jsr	(a5)
	iny
	move.l	a4,a0
	jsr	(a5)
	iny
	move.l	a4,a0
	jsr	(a5)
	iny
	move.l	a4,a0
	jsr	(a5)
	iny
	move.l	a4,a0
	jsr	(a5)
	iny
	move.l	a4,a0
	jsr	(a5)
	iny
	move.l	a4,a0
	jmp	(a5)


simple-timer');
const TEST_ALBUM_ONE = 'RNPF-test-1';
const TEST_ALBUM_TWO = 'RNPF-test-2';

export default class LibraryTest {

  addTestImagesToAlbumOne(album) {
    return RNPhotosFramework.createAssets({
      album: album,
      images: [
        {
          uri: 'https://c1.staticflickr.com/6/5337/8940995208_5da979c52f.jpg'
        }, {
          uri: 'https://upload.wikimedia.org/wikipedia/commons/d/db/Patern_test.jpg'
        }
      ]
    });
  }

  addTestImagesToAlbumTwo(album) {
    return RNPhotosFramework.createAssets({
      album: album,
      includeMetadata: true,
      images: [
        {
          uri: 'https://c1.staticflickr.com/6/5337/8940995208_5da979c52f.jpg'
        }, {
          uri: 'https://upload.wikimedia.org/wikipedia/commons/d/db/Patern_test.jpg'
        }
      ]
    }).then((assets) => {
      return assets;
    });
  }

  _componentWillMount() {
    RNPhotosFramework
      .requestAuthorization()
      .then((status) => {
        if (status.isAuthorized) {
          this
            .cleanUp()
            .then(() => {
              this
                .readd()
                .then(() => {});
            });
        } else {
          alert('Application is not authorized to use Photos Framework! Pleade check settings.');
        }
      });
  }

  readd() {
    return this
      .testAlbumsExist()
      .then((albums) => {
        return Promise.all([
          this.addTestImagesToAlbumOne(albums[0]),
          this.addTestImagesToAlbumTwo(albums[1])
        ]).then((assets) => {}, (li) => {
          //ProgressCallback
        }).then(() => {
          //Complete
        });
      });
  }

  removeAlbums(albums) {
    return RNPhotosFramework.deleteAlbums(albums);
  }

  cleanUp() {
    console.debug('Will search for test-albums');
    return RNPhotosFramework
      .getAlbumsByTitles([TEST_ALBUM_ONE, TEST_ALBUM_TWO])
      .then((fetchResult) => {
        console.debug(`Found ${fetchResult.albums.length} test albums`);
        const albums = fetchResult
          .albums
          .filter(album => [TEST_ALBUM_ONE, TEST_ALBUM_TWO].some(testAlbum => testAlbum === album.title));
        const promises = albums.map(album => {
          console.debug(`Fetching album ${album.title}'s assets`);
          return album
            .getAssets()
            .then((assetResultObj) => {
              console.debug(`Deleting album ${album.title}'s assets: ${assetResultObj.assets.length} assets`);
              return RNPhotosFramework.deleteAssets(assetResultObj.assets);
            });
        });
        return Promise
          .all(promises)
          .then(() => {
            console.debug(`Deleting albums ${albums.length}`);
            return RNPhotosFramework
              .deleteAlbums(albums)
              .then((result) => {
                console.debug('Cleanup comlete');
                return result;
              });
          });
      });
  }

  testAlbumsExist() {
    return RNPhotosFramework
      .getAlbumsByTitles([TEST_ALBUM_ONE, TEST_ALBUM_TWO])
      .then((fetchResult) => {
        const albumsThatDoExit = [TEST_ALBUM_ONE, TEST_ALBUM_TWO].filter(testAlbumTitle => fetchResult.albums.some(album => album.title === testAlbumTitle));
        const albumsThatDontExit = [TEST_ALBUM_ONE, TEST_ALBUM_TWO].filter(testAlbumTitle => !fetchResult.albums.some(album => album.title === testAlbumTitle));
        if (albumsThatDontExit.length) {
          return RNPhotosFramework
            .createAlbums(albumsThatDontExit)
            .then((newAlbums) => {
              return albumsThatDoExit.concat(newAlbums);
            });
        }


env)
    env.user_words = require("user_words") or {}
    -- seq_words_dict 为 user_words 的变形，其结构如下
    -- {
    --     ["fsss"] = { "一步步", "正步" },
    --     ["drjd"] = { "中国人民" },
    --     ["dgrn"] = { "中国" },
    --     ["yymg"] = { "小小狗" },
    -- }
    env.seq_words_dict = reverse_seq_words(env.user_words)
    -- logger.info('FFF ➭ ' .. table_len(env.seq_words_dict))
end

function F.func(input, env)
    local input_code = env.engine.context.input
    local code_len = #input_code

    local is_in_table = hasKey(env.seq_words_dict, input_code)
    local old_candidates = {}
    local new_candidates = {}
    -- logger.info(tostring(is_in_table))

    -- 如果没有匹配的简码或输入长度不符，直接返回原始候选
    if not is_in_table then
        for cand in input:iter() do
            yield(cand)
        end
        return
    end
    -- logger.info('--- in table ---')
    -- 循环遍历 user_words 创建新的候选
    for code, phrases in pairs(env.seq_words_dict) do
        -- logger.info("键:" .. code)
        -- 遍历当前键对应的词组列表
        for _, phrase in ipairs(phrases) do
            -- logger.info("值:" .. phrase)
            -- if code == input_code then
            -- if #input_code == 4 and string.find(code, input_code) then
            if string.find(code, input_code) then
                -- 过滤掉 - 输入码长度为 3 且候选项长为 2 或大于 3 的情况
                -- 如，实施、事实 → uiu[i] ，以此与转换到词典后是使用体验保持一致
                -- 实际上，我们只为三字词语追加了三简
                if not (#input_code == 3 and (utf8.len(phrase) == 2 or utf8.len(phrase) > 3)) then
                    local new_cand = Candidate("word", 1, 4, phrase, "*")
                    -- table.insert(new_candidates, new_cand)
                    table.insert(new_candidates, new_cand)
                end
            end
        end
    end
    -- 整理已有候选（用于后续排序）
    for cand in input:iter() do
        table.insert(old_candidates, cand)
    end

    table.sort(new_candidates, function(a, b)
        -- 自定义排序逻辑
        return a.text < b.text  -- 按候选词文本升序排序
    end)

    local _cands = {}
    if keep_user_words_top then
        -- ^¹ 自造词排在前面
        _cands = new_candidates
        for i = 1, #old_candidates do
            _cands[#new_candidates + 1] = old_candidates[i]
        end
    else
        -- ^² 自造词排在后面
        _cands = old_candidates
        for i = 1, #new_candidates do
            _cands[#old_candidates + 1] = new_candidates[i]
        end


禅密功
藏独
踩江
北美巡回讲法
北京政坛清华名人
北京市委黑幕
北京黑幕
北京帮
爱国者同盟网站
爱国运动正名
www.cipfg.org
wenjiabao
VOA采访热比娅
tuidang
Seven Years in Tibet
Red Corner
Power to the Falun Gong
m功学
minghui
lihongzhi
huzhuxi
http://www.ZhUiChaGuOji.org/cn/
global human rights torch relay
Fa轮功
fanhua
fangong
falungong
falundafa
FaLun
bjork
89学潮血腥屠杀
89学潮大屠杀
70天大事记
64大屠杀
3退
322攻台作战计划
《中国民主》
《争鸣》
《动向》
脏独
脏毒
西藏国家民主党
反共
藏青会
自由西藏学生运动
九十三运动
藏妇会
摇头丸
出售假币
监听王
昏药
侦探设备
升达毕业证
手机复制
佳静安定片
蒙汗药粉
古方迷香
强效失忆药
迷奸药
透视眼睛
子女任职名
催情药
拍肩神
身份证生成器
三唑仑
麻醉乙醚
最后圆满
作弊器
治疗肿瘤
治疗乙肝
治疗性病
治疗红斑狼疮
针孔摄像机
债务公司
游戏机破解
隐形摄像机
隐形耳机
隐蔽式摄像机
银行卡复制设备
一卡多号
遥控信号拦截器
信用卡套现
消防枪
消防灭火枪
香港生子
土炮
胎盘
手机窃听器
手机魔卡
手机卡复制器
手机监听器
手机跟踪定位器
容弹量
窃听器
枪模
铅弹
汽枪
汽狗
汽车走表器
气枪
气狗
普提功
女伟哥
纽扣摄像机
免电灯
迷药
迷魂药
迷昏药
迷幻药
蒙


$59
                        0x75, 0x11); // ADC $11,X
        cpu.step(3);
        assertEquals(0x49, cpu.getAccumulator());
        assertFalse(cpu.getNegativeFlag());
        assertFalse(cpu.getOverflowFlag());
        assertFalse(cpu.getZeroFlag());
        assertTrue(cpu.getCarryFlag());
    }

    /* ROR - Rotate Right - $76 */

    public void test_ROR() throws MemoryAccessException {

        bus.write(0x40, 0x00);
        bus.write(0x41, 0x10);

        bus.loadProgram(0x76, 0x10,  // ROR $00 (m=%00000000, c=0)
                        0x76, 0x11,  // ROR $01 (m=%00001000, c=0)
                        0x76, 0x11,  // ROR $01 (m=%00000100, c=0)
                        0x76, 0x11,  // ROR $01 (m=%00000010, c=0)
                        0x76, 0x11,  // ROR $01 (m=%00000001, c=0)
                        0x76, 0x11,  // ROR $01 (m=%00000000, c=1)
                        0x76, 0x11,  // ROR $01 (m=%10000000, c=0)
                        0x76, 0x11,  // ROR $01 (m=%01000000, c=0)
                        0x76, 0x11,  // ROR $01 (m=%00100000, c=0)
                        0x76, 0x11); // ROR $01 (m=%00010000, c=0)

        cpu.setXRegister(0x30);

        cpu.step();
        assertEquals(0x00, bus.read(0x40, true));
        assertTrue(cpu.getZeroFlag());
        assertFalse(cpu.getNegativeFlag());
        assertFalse(cpu.getCarryFlag());

        cpu.step();
        assertEquals(0x08, bus.read(0x41, true));
        assertFalse(cpu.getZeroFlag());
        assertFalse(cpu.getNegativeFlag());
        assertFalse(cpu.getCarryFlag());

        cpu.step();
        assertEquals(0x04, bus.read(0x41, true));
        assertFalse(cpu.getZeroFlag());
        assertFalse(cpu.getNegativeFlag());
        assertFalse(cpu.getCarryFlag());

        cpu.step();
        assertEquals(0x02, bus.read(0x41, true));
        assertFalse(cpu.getZeroFlag());
        assertFalse(cpu.getNegativeFlag());
        assertFalse(cpu.getCarryFlag());

        cpu.step();
        assertEquals(0x01, bus.read(0x41, true));
        assertFalse(cpu.getZeroFlag());
        assertFalse(cpu.getNegativeFlag());
        assertFalse(cpu.getCarryFlag());

        cpu.step();
        assertEquals(0x00, bus.read(0x41, true));
        assertTrue(cpu.getZeroFlag());
        assertFalse(cpu.getNegativeFlag());
        assertTrue(cpu.getCarryFlag());

        cpu.step();
        assertEquals(0x80, bus.read(0x41, true));
        assertFalse(cpu.getZeroFlag());
        assertTrue(cpu.getNegativeFlag());
        assertFalse(cpu.getCarryFlag());

        cpu.step();
        assertEquals(0x40, bus.read(0x41, true));
        assertFalse(cpu.getZeroFlag());
        assertFalse(cpu.getNegativeFlag());
        assertFalse(cpu.getCarryFlag());

        cpu.step();
        assertEquals(0x20, bus.read(0x41, true));
        assertFalse(cpu.getZeroFlag());
        assertFalse(cpu.getNegativeFlag());
        assertFalse(cpu.getCarryFlag());

        cpu.step();
        assertEquals(0x10, bus.read(0x41, true));
        assertFalse(cpu.getZeroFlag());
        assertFalse(cpu.getNegativeFlag()


1_2(*Pixels,*SubScreen);\
		   	    else *Screen=*Pixels;\
		   	    *ZB=index_spr;} \
   		    Screen -= 640; SubScreen -= 640; Pixels+=2; ZB  -= 640;
   		FN
   		FN
   		FN
   		FN
   		#undef FN
}

/********************************/

#if 1
__inline void NORMAL8_T (uint32 Offset,uint8 *Pixels,uint32 solid)
{
   	    uint8 *Screen = (uint8 *) GFX.S + Offset;

   	    #define FN(N) \
   	    	if (!(solid&(1<<(7-N)))) *Screen = *Pixels; \
   	    	Screen--; Pixels++;
   	    FN(0)
   	    FN(1)
   	    FN(2)
   	    FN(3)
   	    FN(4)
   	    FN(5)
   	    FN(6)
   	    FN(7)
   	    #undef FN
}
__inline void NORMAL8_O (uint32 Offset,uint8 *Pixels)
{
   	    uint8 *Screen = (uint8 *) GFX.S + Offset;

   	    *Screen=*Pixels;
   	    Screen--; Pixels++;
   	    *Screen=*Pixels;
   	    Screen--; Pixels++;
   	    *Screen=*Pixels;
   	    Screen--; Pixels++;
   	    *Screen=*Pixels;
   	    Screen--; Pixels++;
   	    *Screen=*Pixels;
   	    Screen--; Pixels++;
   	    *Screen=*Pixels;
   	    Screen--; Pixels++;
   	    *Screen=*Pixels;
   	    Screen--; Pixels++;
   	    *Screen=*Pixels;

}

__inline void FLIPPED8_T (uint32 Offset,uint8 *Pixels,uint32 solid)
{
   	    uint8 *Screen = (uint8 *) GFX.S + Offset;

   	    Screen -= 7;
   	    #define FN(N) \
   	    	if (!(solid&(1<<(7-N)))) *Screen = *Pixels; \
   	    	Screen++; Pixels++;
   	    FN(0)
   	    FN(1)
   	    FN(2)
   	    FN(3)
   	    FN(4)
   	    FN(5)
   	    FN(6)
   	    FN(7)
   	    #undef FN
}

__inline void FLIPPED8_O (uint32 Offset,uint8 *Pixels)
{
   	    uint8 *Screen = (uint8 *) GFX.S + Offset;

   	    Screen -= 7;

    	*Screen=*Pixels;
   	    Screen++; Pixels++;
   	    *Screen=*Pixels;
   	    Screen++; Pixels++;
   	    *Screen=*Pixels;
   	    Screen++; Pixels++;
   	    *Screen=*Pixels;
   	    Screen++; Pixels++;
   	    *Screen=*Pixels;
   	    Screen++; Pixels++;
   	    *Screen=*Pixels;
   	    Screen++; Pixels++;
   	    *Screen=*Pixels;
   	    Screen++; Pixels++;
   	    *Screen=*Pixels;
}

__inline void NORMAL8_SPR_T (uint32 Offset,uint8 *Pixels,uint32 solid,uint32 index_spr)
{
   	    uint8 *Screen = (uint8 *) GFX.S + Offset;
   	    uint8 *ZB = (uint8 *)GFX.ZBuffer + Offset;

   	    #define FN(N) \
   	    	if ((!(solid&(1<<(7-N))))&&(*ZB>index_spr)) { *S


Object_);
    checkLub(C, B, B);
    checkLub(C, C, C);
    checkLub(C, D, C);
    checkLub(C, I, C);
    checkLub(C, I2, C);
    checkLub(C, J, C);

    checkLub(D, Object_, Object_);
    checkLub(D, A, Object_);
    checkLub(D, B, B);
    checkLub(D, C, C);
    checkLub(D, D, D);
    checkLub(D, I, D);
    checkLub(D, I2, D);
    checkLub(D, J, D);

    checkLub(I, Object_, Object_);
    checkLub(I, A, A);
    checkLub(I, B, B);
    checkLub(I, C, C);
    checkLub(I, D, D);
    checkLub(I, I, I);
    checkLub(I, I2, D);
    checkLub(I, J, D);

    checkLub(I2, Object_, Object_);
    checkLub(I2, A, A);
    checkLub(I2, B, B);
    checkLub(I2, C, C);
    checkLub(I2, D, D);
    checkLub(I2, I, D);
    checkLub(I2, I2, I2);
    checkLub(I2, J, D);

    checkLub(J, Object_, Object_);
    checkLub(J, A, A);
    checkLub(J, B, B);
    checkLub(J, C, C);
    checkLub(J, D, D);
    checkLub(J, I, D);
    checkLub(J, I2, D);
    checkLub(J, J, J);
  }));
}

void testFunction() {
  asyncTest(() => TypeEnvironment.create(r"""
      class A {}
      class B {}
      class C extends B {}

      typedef dynamic__();
      typedef void void__();
      typedef A A__();
      typedef B B__();
      typedef C C__();

      typedef void void__A_B(A a, B b);
      typedef void void__A_C(A a, C b);
      typedef void void__B_A(B a, A b);
      typedef void void__B_C(B a, C b);

      typedef void void___B([B a]);
      typedef void void___B_C([B a, C b]);
      typedef void void___C_C([C a, C b]);

      typedef void void____B({B a});
      typedef void void____B_C({B a, C b});
      typedef void void____C_C({C a, C b});
      """).then((env) {

    DartType Object_ = env['Object'];
    DartType Function_ = env['Function'];
    DartType dynamic__ = env['dynamic__'];
    DartType void__ = env['void__'];
    DartType A__ = env['A__'];
    DartType B__ = env['B__'];
    DartType C__ = env['C__'];
    DartType void__A_B = env['void__A_B'];
    DartType void__A_C = env['void__A_C'];
    DartType void__B_A = env['void__B_A'];
    DartType void__B_C = env['void__B_C'];
    DartType void___B = env['void___B'];
    DartType void___B_C = env['void___B_C'];
    DartType void___C_C = env['void___C_C'];
    DartType void____B = env['void____B'];
    DartType void____B_C = env['void____B_C'];
    DartType void____C_C = env['void____C_C'];

    // Types used only for checking results.
    DartType void_ = env['void'];
    DartType B = env['B'];


r[0]*t.values[j][bottomr];
		t.values[j][bottomr] =
		    sinr[0]*vtemp + cosr[0]*t.values[j][bottomr];
	    }
	}

	System.out.println("topr    =" + topr);
	System.out.println("bottomr =" + bottomr);
	System.out.println("cosr =" + cosr[0]);
	System.out.println("sinr =" + sinr[0]);
	System.out.println("\nm =");
	checkMatrix(m);
	System.out.println("\nv =");
	checkMatrix(t);
	m.mul(m,t);
	System.out.println("\nt*m =");
	checkMatrix(m);
    }

    private static void update_u_split(int topr, int bottomr, GMatrix u,
				       double[] cosl, double[] sinl,
				       GMatrix t, GMatrix m) {
	int j;
	double utemp;

	for (j = 0; j < u.nCol; j++) {
	    utemp = u.values[topr][j];
	    u.values[topr][j]    = cosl[0]*utemp - sinl[0]*u.values[bottomr][j];
	    u.values[bottomr][j] = sinl[0]*utemp + cosl[0]*u.values[bottomr][j];
	}

	if(debug) {
	    t.setIdentity();
	    for (j = 0;j < u.nCol; j++) {
		utemp = t.values[topr][j];
		t.values[topr][j] =
		    cosl[0]*utemp - sinl[0]*t.values[bottomr][j];
		t.values[bottomr][j] =
		    sinl[0]*utemp + cosl[0]*t.values[bottomr][j];
	    }
	}
	System.out.println("\nm=");
	checkMatrix(m);
	System.out.println("\nu=");
	checkMatrix(t);
	m.mul(t,m);
	System.out.println("\nt*m=");
	checkMatrix(m);
    }

    private static void update_u(int index, GMatrix u,
				 double[] cosl, double[] sinl) {
	int j;
	double utemp;

	for (j = 0; j < u.nCol; j++) {
	    utemp = u.values[index][j];
	    u.values[index][j] =
		cosl[0]*utemp + sinl[0]*u.values[index+1][j];
	    u.values[index+1][j] =
	       -sinl[0]*utemp + cosl[0]*u.values[index+1][j];
	}
    }

    private static void print_m(GMatrix m, GMatrix u, GMatrix v) {
	GMatrix mtmp = new GMatrix(m.nCol, m.nRow);

	mtmp.mul(u, mtmp);
	mtmp.mul(mtmp, v);
	System.out.println("\n m = \n" + mtmp.toString(mtmp));

    }

    private static String toString(GMatrix m)
    {
	StringBuffer buffer = new StringBuffer(m.nRow * m.nCol * 8);
	int i, j;

	for (i = 0; i < m.nRow; i++) {
	    for(j = 0; j < m.nCol; j++) {
		if (Math.abs(m.values[i][j]) < .000000001) {
		    buffer.append("0.0000 ");
		} else {
		    buffer.append(m.values[i][j]).append(" ");
		}
	    }
	    buffer.append("\n");
	}
	return buffer.toString();
    }

    private static void print_svd(double[]


        )
        .collect();

    let mut enemy_params: HashMap<i32, &NormalQuestDataForEnemyParam> = pedia
        .normal_quest_data_for_enemy
        .param
        .iter()
        .map(|param| (param.quest_no, param))
        .collect();

    pedia
        .normal_quest_data
        .param
        .iter()
        .filter(|param| param.quest_no != 0)
        .map(|param| {
            let name_msg_name = format!("QN{:06}_01", param.quest_no);
            let target_msg_name = format!("QN{:06}_04", param.quest_no);
            let condition_msg_name = format!("QN{:06}_05", param.quest_no);
            Ok(Quest {
                param: &param,
                enemy_param: enemy_params.remove(&param.quest_no),
                name: all_msg.remove(&name_msg_name),
                target: all_msg.remove(&target_msg_name),
                condition: all_msg.remove(&condition_msg_name),
            })
        })
        .collect::<Result<Vec<_>>>()
}

fn prepare_discoveries(pedia: &Pedia) -> Result<HashMap<EmTypes, &DiscoverEmSetDataParam>> {
    let mut result = HashMap::new();
    for discovery in &pedia.discover_em_set_data.param {
        if discovery.em_type == EmTypes::Em(0) {
            continue;
        }
        ensure!(discovery.param.route_no.len() == 5);
        ensure!(discovery.param.init_set_name.len() == 5);
        ensure!(discovery.param.sub_type.len() == 3);
        ensure!(discovery.param.vital_tbl.len() == 3);
        ensure!(discovery.param.attack_tbl.len() == 3);
        ensure!(discovery.param.parts_tbl.len() == 3);
        ensure!(discovery.param.other_tbl.len() == 3);
        ensure!(discovery.param.stamina_tbl.len() == 3);
        ensure!(discovery.param.scale.len() == 3);
        ensure!(discovery.param.scale_tbl.len() == 3);
        ensure!(discovery.param.difficulty.len() == 3);
        ensure!(discovery.param.boss_multi.len() == 3);

        if result.insert(discovery.em_type, discovery).is_some() {
            bail!("Duplicated discovery data for {:?}", discovery.em_type)
        }
    }

    Ok(result)
}

fn prepare_skills(pedia: &Pedia) -> Result<BTreeMap<PlEquipSkillId, Skill<'_>>> {
    let mut result = BTreeMap::new();

    let mut name_msg: HashMap<&String, &MsgEntry> = pedia.player_skill_name_msg.get_name_map();

    let mut explain_msg: HashMap<&String, &MsgEntry> =
        pedia.player_skill_explain_msg.get_name_map();

    let mut detail_msg: HashMap<&String, &MsgEntry> = pedia.player_skill_detail_msg.get_name_map();

    for skill in &pedia.equip_skill.param {
        let id = match skill.id {
            PlEquipSkillId::None => continue,
            PlEquipSkillId::Skill(id) => id,
        };
        if result.contains_key(&skill.id) {
            bail!("Multiple definition for skill {}", id);
        }

        let name = name_msg
            .remove(&format!("PlayerSkill_{:03}_Name", id))
            .with_context(|| format!("Name for skill {}", id))?;

        let explain = explain_msg
            .remove(&format!("PlayerSkill_{:03}_Explain", id))
            .with_context(|| format!("Explain for skill {}", id))?;

        let levels = (0..(skill.max_leve


	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`
	// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.readWriteEndpointFailoverPolicy) || (has(self.initProvider) && has(self.initProvider.readWriteEndpointFailoverPolicy))",message="spec.forProvider.readWriteEndpointFailoverPolicy is a required parameter"
	Spec   MSSQLManagedInstanceFailoverGroupSpec   `json:"spec"`
	Status MSSQLManagedInstanceFailoverGroupStatus `json:"status,omitempty"`
}

// +kubebuilder:object:root=true

// MSSQLManagedInstanceFailoverGroupList contains a list of MSSQLManagedInstanceFailoverGroups
type MSSQLManagedInstanceFailoverGroupList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []MSSQLManagedInstanceFailoverGroup `json:"items"`
}

// Repository type metadata.
var (
	MSSQLManagedInstanceFailoverGroup_Kind             = "MSSQLManagedInstanceFailoverGroup"
	MSSQLManagedInstanceFailoverGroup_GroupKind        = schema.GroupKind{Group: CRDGroup, Kind: MSSQLManagedInstanceFailoverGroup_Kind}.String()
	MSSQLManagedInstanceFailoverGroup_KindAPIVersion   = MSSQLManagedInstanceFailoverGroup_Kind + "." + CRDGroupVersion.String()
	MSSQLManagedInstanceFailoverGroup_GroupVersionKind = CRDGroupVersion.WithKind(MSSQLManagedInstanceFailoverGroup_Kind)
)

func init() {
	SchemeBuilder.Register(&MSSQLManagedInstanceFailoverGroup{}, &MSSQLManagedInstanceFailoverGroupList{})
}
// SPDX-FileCopyrightText: 2024 The Crossplane Authors <https://crossplane.io>
//
// SPDX-License-Identifier: Apache-2.0
// Code generated by angryjet. DO NOT EDIT.

package v1beta1

import resource "github.com/crossplane/crossplane-runtime/v2/pkg/resource"

// GetItems of this ACLList.
func (l *ACLList) GetItems() []resource.Managed {
	items := make([]resource.Managed, len(l.Items))
	for i := range l.Items {
		items[i] = &l.Items[i]
	}
	return items
}

// GetItems of this ClusterList.
func (l *ClusterList) GetItems() []resource.Managed {
	items := make([]resource.Managed, len(l.Items))
	for i := range l.Items {
		items[i] = &l.Items[i]
	}
	return items
}

// GetItems of this ParameterGroupList.
func (l *ParameterGroupList) GetItems() []resource.Managed {
	items := make([]resource.Managed, len(l.Items))
	for i := range l.Items {
		items[i] = &l.Items[i]
	}
	return items
}

// GetItems of this SnapshotList.
func (l *SnapshotList) GetItems() []resource.Managed {
	items := make([]resource.Managed, len(l.Items))
	for i := range l.Items {
		items[i] = &l.Items[i]
	}
	return items
}

// GetItems of this SubnetGroupList.
func (l *SubnetGroupList) GetItems() []resource.Managed {
	items := make([]resource.Managed, len(l.Items))
	for i := range l.Items {
		items[i] = &l.Items[i]
	}
	return items
}

// GetItems of this UserList.
func (l *UserList) GetItems() []resource.Managed {
	items := make([]resource.Managed, len(l.Items))
	for i := range l.Items {
		items[i] = &l.Items[i]
	}
	return items
}
//go:build !ignore_autogenerated

// SP


}
.md-modal .md-modal__header .md-modal__title {
  width: 100%;
  padding: 0 2rem;
  overflow: hidden;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.md-modal .md-modal__header .md-modal__message {
  display: flex;
  justify-content: center;
  align-content: center;
  align-items: center;
  flex-flow: column nowrap;
  width: 100%;
  padding: 0.75rem 0 0 0;
  font-family: "CiscoSansTT Regular", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 0.875rem;
  line-height: 1.5rem;
  color: #545454;
  color: var(--md-textColor-secondary, #545454);
  text-align: center;
  flex-flow: row wrap;
}
.md-modal .md-modal__header .md-modal__close {
  position: absolute;
  display: flex;
  justify-content: center;
  align-content: center;
  align-items: center;
  flex-flow: row nowrap;
  border: none;
}
.md-modal .md-modal__content {
  display: flex;
  flex-direction: column;
  background-color: #fff;
  background-color: var(--md-background-primary, #fff);
  color: #000;
  color: var(--md-textColor-primary, #000);
  background-color: #fff;
  background-color: var(--md-background-primary, #fff);
  border-color: #fff;
  border-color: var(--md-separator-primary, #fff);
}
.md-modal .md-modal__flex-container {
  display: flex;
  width: 100%;
  max-height: inherit;
  flex-direction: column;
  flex: 1 1 0%;
}
.md-modal .md-modal__body {
  display: flex;
  margin: 0;
  overflow-x: hidden;
  overflow-y: auto;
  flex-direction: column;
  flex: 1 1 auto;
  align-self: stretch;
  align-items: stretch;
}
.md-modal .md-modal__body--padding {
  padding: 0 2rem;
}
.md-modal .md-modal__footer {
  width: 100%;
  padding: 1rem;
  flex-shrink: 0;
  display: flex;
  justify-content: flex-end;
  align-content: center;
  align-items: center;
  flex-flow: row nowrap;
}
.md-modal .md-modal__footer .md-button:not(:first-of-type) {
  margin-left: 0.75rem;
}
.md-modal.md-modal--full {
  width: 100vw;
  top: auto;
  max-height: none;
}
.md-modal.md-modal--full .md-modal__content {
  height: 100vh;
  min-height: 0;
  border-radius: 0;
  max-height: none;
  border-style: solid;
  border-width: 0;
}
.md-modal.md-modal--full .md-modal__header {
  display: flex;
  justify-content: center;
  align-content: center;
  align-items: center;
  flex-flow: column nowrap;
  width: 100%;
  padding: 2rem 1rem 1rem 1rem;
  font-family: "CiscoSansTT Regular", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 2.25rem;
  line-height: 3rem;
}
.md-modal.md-modal--full .md-modal__heade