function SuperSync:readCloudStorageSettings()
    local cs_settings_file = DataStorage:getSettingsDir() .. "/cloudstorage.lua"
    local cs_settings = {}

    if lfs.attributes(cs_settings_file, "mode") == "file" then
        local ok, stored_settings = pcall(dofile, cs_settings_file)
        if ok and type(stored_settings) == "table" then
            cs_settings = stored_settings
        end
    end

    return cs_settings
end

function SuperSync:isConfigured()
    return self.settings.cloud_storage and self.settings.sync_folder
end

function SuperSync:showStatus()
    local status_text = _("Super Sync Status:\n\n")

    if not self.settings.enabled then
        status_text = status_text .. _("❌ Super Sync is disabled")
    elseif not self:isConfigured() then
        status_text = status_text .. _("⚠ Super Sync is enabled but not configured")
    else
        status_text = status_text .. _("✅ Super Sync is enabled and configured\n\n")
        status_text = status_text .. T(_("Cloud Storage: %1\n"), self.settings.cloud_storage)
        status_text = status_text .. T(_("Sync Folder: %1\n"), self.settings.sync_folder)
        status_text = status_text .. T(_("Auto-sync on close: %1\n"), self.settings.sync_on_close and _("Yes") or _("No"))
        if self.settings.auto_sync_hours and self.settings.auto_sync_hours > 0 then
            status_text = status_text .. T(_("Auto-sync interval: %1 hours\n"), self.settings.auto_sync_hours)
        end

        if self.last_sync_time then
            status_text = status_text .. T(_("Last sync: %1"), os.date("%c", self.last_sync_time))
        else
            status_text = status_text .. _("Never synced")
        end
    end

    UIManager:show(InfoMessage:new{
        text = status_text,
    })
end

function SuperSync:performSync()
    if not self.settings.enabled or not self:isConfigured() then
        UIManager:show(InfoMessage:new{
            text = _("Super Sync is not properly configured."),
        })
        return
    end

    if not NetworkMgr:willRerunWhenOnline(function() self:performSync() end) then
        return
    end

    logger.info("SuperSync: Starting sync operation")

    -- Create progress dialog
    local progress_widget = ProgressWidget:new{
        title = _("Super Sync"),
        text = _("Initializing sync..."),
        percentage = 0,
        width = math.floor(0.8 * require("device").scr


    = 1089
	ERCantRemoveAllFields          = 1090
	ERUpdateTableUsed              = 1093
	ERNoTablesUsed                 = 1096
	ERTooBigSet                    = 1097
	ERBlobCantHaveDefault          = 1101
	ERWrongDbName                  = 1102
	ERWrongTableName               = 1103
	ERUnknownProcedure             = 1106
	ERWrongParamCountToProcedure   = 1107
	ERWrongParametersToProcedure   = 1108
	ERFieldSpecifiedTwice          = 1110
	ERInvalidGroupFuncUse          = 1111
	ERTableMustHaveColumns         = 1113
	ERUnknownCharacterSet          = 1115
	ERTooManyTables                = 1116
	ERTooManyFields                = 1117
	ERTooBigRowSize                = 1118
	ERWrongOuterJoin               = 1120
	ERNullColumnInIndex            = 1121
	ERFunctionNotDefined           = 1128
	ERWrongValueCountOnRow         = 1136
	ERInvalidUseOfNull             = 1138
	ERRegexpError                  = 1139
	ERMixOfGroupFuncAndFields      = 1140
	ERIllegalGrantForTable         = 1144
	ERSyntaxError                  = 1149
	ERWrongColumnName              = 1166
	ERWrongKeyColumn               = 1167
	ERBlobKeyWithoutLength         = 1170
	ERPrimaryCantHaveNull          = 1171
	ERTooManyRows                  = 1172
	ERUnknownSystemVariable        = 1193
	ERSetConstantsOnly             = 1204
	ERWrongArguments               = 1210
	ERWrongUsage                   = 1221
	ERWrongNumberOfColumnsInSelect = 1222
	ERDupArgument                  = 1225
	ERLocalVariable                = 1228
	ERGlobalVariable               = 1229
	ERWrongValueForVar             = 1231
	ERWrongTypeForVar              = 1232
	ERVarCantBeRead                = 1233
	ERCantUseOptionHere            = 1234
	ERIncorrectGlobalLocalVar      = 1238
	ERWrongFKDef                   = 1239
	ERKeyRefDoNotMatchTableRef     = 1240
	ERCyclicReference              = 1245
	ERCollationCharsetMismatch     = 1253
	ERCantAggregate2Collations     = 1267
	ERCantAggregate3Collations     = 1270
	ERCantAggregateNCollations     = 1271
	ERVariableIsNotStruct          = 1272
	ERUnknownCollation             = 1273
	ERWrongNameForIndex            = 1280
	ERWrongNameForCatalog          = 1281
	ERBadFTColumn                  = 1283
	ERTruncatedWrongValue          = 1292
	ERTooMuchAutoTimestampCols     = 1293
	ERInvalidOnUpdate              = 1294
	ERUnknownTimeZone              = 1298
	ERInvalidCharacterString       = 1300
	ERIllegalReference             = 1247
	ERDerivedMustHaveAlias         = 1248
	ERTableNameNotAllowedHere      = 1250
	ERQueryInterrupted             = 1317
	ERTruncatedWrongValueForField  = 1366
	ERDataTooLong                  = 1406
	ERDataOutOfRange               = 1690
)

// Sql states for errors.
// Originally found in include/mysql/sql_state.h
const (
	// SSUnknownSQLState is ER_SIGNAL_EXCEPTION in
	// include/mysql/sql_state.h, but:
	// const char *unknown_sqlstate= "HY000"
	// in client.c. So using that one.
	SSUnknownSQLState = "HY000"

	// SSUnknownComError is ER_UNKNOWN_COM_ERROR
	SSUnknownComError = "08S01"

	// SSHandshakeError is ER_HANDSHAKE_ERROR
	SSHandshakeError = "08S01"

	// SSServerShutdown is ER_SERVER_SHUTDOWN
	SSServerShutdown = "08S01"

	// SSDataTooLong is ER_DATA_TOO_LONG
	SSDataTooLong = "22001"

	// SSDataOutOfRange is ER_DATA_OUT_OF_RANGE
	SSDataOutOfRange = "22003"

	// SSBadNullError is ER_BAD_NULL_ERROR


:	access registers translation
	.quad	0			# cr9:	tracing off
	.quad	0			# cr10: tracing off
	.quad	0			# cr11: tracing off
	.quad	0			# cr12: tracing off
	.quad	0			# cr13: home space segment table
	.quad	0xc0000000		# cr14: machine check handling off
	.quad	0			# cr15: linkage stack operations

#include "head_kdump.S"

#
# This program check is active immediately after kernel start
# and until early_pgm_check_handler is set in kernel/early.c
# It simply saves general/control registers and psw in
# the save area and does disabled wait with a faulty address.
#
SYM_CODE_START_LOCAL(startup_pgm_check_handler)
	stmg	%r8,%r15,__LC_SAVE_AREA
	la	%r8,4095
	stctg	%c0,%c15,__LC_


ES: Array<string> = {
	"connection",
	"include",
	"skip",
	"client",
	"rest",
	"export",
}

-- ROBLOX deviation: function in Lua can't have additional properties. Using callable table instead
getStoreKeyName = Object.assign(
	setmetatable({}, {
		__call = function(
			_self,
			fieldName: string,
			args: (Record<string, any> | nil)?,
			directives: Directives?
		): string
			-- ROBLOX deviation START: remove Boolean
			if
				args
				and directives
				and (directives :: Directives)["connection"]
				and (directives :: Directives)["connection"]["key"]
			then
				if
					(directives :: Directives)["connection"]["filter"]
					and #((directives :: Directives)["connection"]["filter"] :: Array<string>) > 0
				then
					local filterKeys
					if (directives :: Directives)["connection"]["filter"] then
						filterKeys = (directives :: Directives)["connection"]["filter"] :: Array<string>
					else
						filterKeys = {}
					end
					Array.sort(filterKeys, nil)

					local filteredArgs = {} :: { [string]: any }
					Array.forEach(filterKeys, function(key)
						filteredArgs[key] = (args :: Record<string, any>)[key]
					end)

					return ("%s(%s)"):format((directives :: Directives)["connection"]["key"], stringify(filteredArgs))
				else
					return (directives :: Directives)["connection"]["key"]
				end
			end
			-- ROBLOX deviation END

			local completeFieldName: string = fieldName

			-- ROBLOX deviation START: remove Boolean
			if args then
				-- ROBLOX deviation END
				-- We can't use `JSON.stringify` here since it's non-deterministic,
				-- and can lead to different store key names being created even though
				-- the `args` object used during creation has the same properties/values.
				local stringifiedArgs: string = stringify(args :: Record<string, any>)
				completeFieldName ..= ("(%s)"):format(stringifiedArgs)
			end

			-- ROBLOX deviation START: remove Boolean
			if directives then
				-- ROBLOX deviation END
				-- ROBLOX deviation START: use helper to optimize Object.keys().forEach
				objectKeysForEach(directives :: Directives, function(key)
					-- ROBLOX deviation END
					if Array.indexOf(KNOWN_DIRECTIVES, key) ~= -1 then
						return
					end
					-- ROBLOX deviation START: remove Boolean
					if (directives :: Directives)[key] and next((directives :: Directives)[key]) ~= nil then
						-- ROBLOX deviation END
						completeFieldName ..= ("@%s(%s)"):format(key, stringify((directives :: Directives)[key]))
					else
						completeFieldName ..= ("@%s"):format(key)
					end
				end)
			end

			return completeFieldName
		end,
	}) :: any,
	{
		setStringify = function(self, s: typeof(stringify))
			local previous = stringify
			stringify = s
			return previous
		end,
	}
)
exports.getStoreKeyName = getStoreKeyName

-- Default stable JSON.stringify implementation. Can be updated/replaced with
-- something better by calling getStoreKeyName.setStringify.
function stringify(value: any): string
	--[[
		ROBLOX deviation:
		HttpService:JSONEncode doesn't take second 'replacer' param
		Stringifying manuall


lifiers.add(SignalDetectorEvent.INTER_SIG_TIMEOUT_EXCEEDED);
        qualifiers.add(SignalDetectorEvent.NUM_SIGNALS_DETECTED);
        for (Qualifier q : SignalDetectorEvent.PATTERN_MATCHING) {
            qualifiers.add(q);
        }
        qualifiers.add(SignalDetectorEvent.PROMPT_FAILURE);

        //Define triggers
        Set<Trigger> triggers = new HashSet();
        triggers.add(SignalDetector.DETECTION_OF_ONE_SIGNAL);
        triggers.add(SignalDetector.FLUSHING_OF_BUFFER);
        for (Trigger t : SignalDetector.PATTERN_MATCH) {
            triggers.add(t);
        }
        triggers.add(SignalDetector.RECEIVE_SIGNALS_COMPLETION);

        //Define values
        Set<Value> values = new HashSet();

        params.put(MediaObjectImpl.ENDPOINT_NAME, "mobicents/ivr/$");

        SupportedFeaturesImpl features = new SupportedFeaturesImpl(parameters, actions, eventTypes, qualifiers, triggers, values);
        config = new MediaConfigImpl(features, params);
    }

    public MediaConfig getConfig() {
        return config;
    }
}
/*
 * TeleStax, Open Source Cloud Communications
 * Copyright 2011-2013, Telestax Inc and individual contributors
 * by the @authors tag.
 *
 * This is free software; you can redistribute it and/or modify it
 * under the terms of the GNU Lesser General Public License as
 * published by the Free Software Foundation; either version 2.1 of
 * the License, or (at your option) any later version.
 *
 * This software 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
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this software; if not, write to the Free
 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
 * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
 */

package org.restcomm.protocols.ss7.isup.impl.message.parameter;

import org.restcomm.protocols.ss7.isup.impl.message.parameter.PerformingPivotIndicatorImpl;
import org.restcomm.protocols.ss7.isup.impl.message.parameter.PivotReasonImpl;
import org.restcomm.protocols.ss7.isup.message.parameter.PivotReason;
import org.testng.Assert;
import org.testng.annotations.Test;

/**
 * @author baranowb
 *
 */
public class PerformingPivotIndicatorTest {

    /**
     *
     */
    public PerformingPivotIndicatorTest() {
        // TODO Auto-generated constructor stub
    }

    @Test(groups = { "functional.encode", "functional.decode", "parameter" })
    public void testSetEncodeDecodeGet() throws Exception {
        PerformingPivotIndicatorImpl ppi = new PerformingPivotIndicatorImpl();
        PivotReasonImpl pr1 = new PivotReasonImpl();
        pr1.setPivotReason((byte) 1);
        pr1.setPivotPossibleAtPerformingExchange((byte) 5);
        PivotReasonImpl pr2 = new PivotReasonImpl();
        pr2.setPivotReason((byte) 21);
        pr2.setPivotPossibleAtPerformingExchange((byte) 3);
        ppi.setReason(pr1, pr2);
        byte[] b = ppi.encode();
        ppi = new PerformingPivotIndicatorImpl();
        ppi.decode(b);
        PivotReason[] reasons = ppi.getReason();
        Assert.assertNotNull(reasons);
        Assert.assertEquals(reasons.length, 2);
        Assert.assertNotNull(reasons[0]);
        Assert.assertNotNull(reasons[1]);
        Assert.assertEquals(reasons[0].getPivotReason(), (byte) 1);
        Assert.assertEquals(reasons[0].getPivotPossibleAtPer


import warnings
from tqdm import tqdm
import pandas as pd
import re

warnings.filterwarnings("ignore")

instruction = 'please give at least one hashtags of the following tweet and answer with hashtags only: '
tail = '  ->'
prompt = []
user = []
completion = []
assistant = []
total_df_pronpt_completion = None
total_df_conversational_chat = None
df = pd.read_csv('tweet_tag.csv')
for tag_str in df['hashtag']:
    assistant.append(tag_str)
    tag_str = re.sub('#', '', tag_str)
    completion.append(tag_str)
for tweet in df['tweet']:
    tags = re.findall(r'#\w+', tweet)
    tweet_without_tag = re.sub(r'#\w+', '', tweet)
    user.append(tweet_without_tag)
    prompt.append(instruction + tweet_without_tag + tail)
data_prompt_completion = {'prompt': prompt, 'completion': completion}
data_conversational_chat = {'system': instruction, 'user': user, 'assistant': assistant}
df_pronpt_completion = pd.DataFrame(data_prompt_completion)
df_conversational_chat = pd.DataFrame(data_conversational_chat)
total_df_pronpt_completion = df_pronpt_completion
total_df_conversational_chat = df_conversational_chat

total_df_pronpt_completion.to_csv('pronpt_completion.csv', columns=['prompt', 'completion'])
total_df_conversational_chat.to_csv('conversational_chat.csv', columns=['system', 'user', 'assistant'])


-5.4-3.2-12.3 1-12 7.3l2.2 48c1.5 32.8-2.3 61.8-11.3 85.9-11 29.5-26.8 56.9-47 81.5a295.64 295.64 0 01-47.5 46.1 352.6 352.6 0 00-100.3 121.5A347.75 347.75 0 00160 610c0 47.2 9.3 92.9 27.7 136a349.4 349.4 0 0075.5 110.9c32.4 32 70 57.2 111.9 74.7C418.5 949.8 464.5 959 512 959s93.5-9.2 136.9-27.3A348.6 348.6 0 00760.8 857c32.4-32 57.8-69.4 75.5-110.9a344.2 344.2 0 0027.7-136c0-48.8-10-96.2-29.9-140.9zM713 808.5c-53.7 53.2-125 82.4-201 82.4s-147.3-29.2-201-82.4c-53.5-53.1-83-123.5-83-198.4 0-43.5 9.8-85.2 29.1-124 18.8-37.9 46.8-71.8 80.8-97.9a349.6 349.6 0 0058.6-56.8c25-30.5 44.6-64.5 58.2-101a240 240 0 0012.1-46.5c24.1 22.2 44.3 49 61.2 80.4 33.4 62.6 48.8 118.3 45.8 165.7a74.01 74.01 0 0024.4 59.8 73.36 73.36 0 0053.4 18.8c19.7-1 37.8-9.7 51-24.4 13.3-14.9 24.8-30.1 34.4-45.6 14 17.9 25.7 37.4 35 58.4 15.9 35.8 24 73.9 24 113.1 0 74.9-29.5 145.4-83 198.4z"}}]},name:"fire",theme:"outlined"};function AZ(){return AZ=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},AZ.apply(this,arguments)}const DZ=(e,t)=>m.createElement(mV,AZ({},e,{ref:t,icon:TZ})),OZ=m.forwardRef(DZ);var IZ={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 305H624V192c0-17.7-14.3-32-32-32H184v-40c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v784c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V640h248v113c0 17.7 14.3 32 32 32h416c17.7 0 32-14.3 32-32V337c0-17.7-14.3-32-32-32zM184 568V232h368v336H184zm656 145H504v-73h112c4.4 0 8-3.6 8-8V377h216v336z"}}]},name:"flag",theme:"outlined"};function _Z(){return _Z=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_Z.apply(this,arguments)}const jZ=(e


.kind.max_connections = max_connections;
        self
    }

    /// Set the maximum number of leaf nodes this account can have.
    pub fn max_leaf_nodes(mut self, max_leaf_nodes: i64) -> Self {
        self.kind.max_leaf_nodes = max_leaf_nodes;
        self
    }

    /// Allow exports to contain wildcards
    pub fn allow_wildcards(mut self, allow_wildcards: bool) -> Self {
        self.kind.allow_wildcards = allow_wildcards;
        self
    }
}
// Rust language amplification library providing multiple generic trait
// implementations, type wrappers, derive macros and other language enhancements
//
// Written in 2019-2020 by
//     Dr. <NAME> <<EMAIL>>
//     <NAME> <<EMAIL>>
//
// To the extent possible under law, the author(s) have dedicated all
// copyright and related and neighboring rights to this software to
// the public domain worldwide. This software is distributed without
// any warranty.
//
// You should have received a copy of the MIT License
// along with this software.
// If not, see <https://opensource.org/licenses/MIT>.

/// Used as an alternative to default for test and prototyping purposes, when a
/// type can't have a default value, but you need to generate some dumb data.
pub trait DumbDefault
where
    Self: Sized,
{
    /// Returns an object initialized with dumb data
    fn dumb_default() -> Self;
}
<reponame>RichoDemus/advent-of-code-2020<filename>src/day19_message_rules.rs
use regex::Regex;
use crate::util;
use itertools::Itertools;
use std::collections::VecDeque;
use std::iter::FromIterator;

#[derive(Debug,Eq, PartialEq, Clone)]
enum Rule {
    Char(char),
    Sequence(Vec<usize>),
    Or(Vec<usize>,Vec<usize>),
}

lazy_static! {
    // static ref RULE_REGEX: Regex = Regex::new(r"(?P<left>\d+) \+ (?P<right>\d+)").unwrap();
    static ref RULE_REGEX: Regex = Regex::new("(?P<index>\\d+): \"?(P?<value>[\\d\\w]+)\"?").unwrap();
}

fn parse(input: &str) -> (Vec<Rule>, Vec<&str>) {
    let mut iter = input.split("\n\n");
    let rules = iter.next().unwrap();

    let rules = rules.lines().map(|line|{
        let (index, data):(usize, String) = util::str_split(line, ":").unwrap();

        if data.contains("\"") {
            //it's  i: "c"
            let value = data.replace('"', "");
            let value:char = value.parse().unwrap_or_else(|_|panic!("Couldn't parse {:?}", value));
            (index,Rule::Char(value))
        } else if data.contains('|') {
            // it's i: x y | z h
            let (left, right): (Vec<usize>, Vec<usize>) = data.split('|')
                .map(|digits|digits.split_ascii_whitespace()
                    .map(|digit|digit.parse().unwrap())
                    .collect::<Vec<_>>())
                .collect_tuple().unwrap_or_else(||panic!("Couldn't parse pair of vec for {:?}", data));

            (index,Rule::Or(left, right))
        } else {
            // it's i: x y z
            let values = data.split_ascii_whitespace()
                .map(|digit|digit.parse().unwrap())
                .collect::<Vec<_>>();
            (index,Rule::Sequence(values))
        }
    }).collect::<Vec<_>>();

    let mut result_rules = vec![];
    let max = rules.iter().map(|(index,_)|index).max().unwrap();
    result_rules.resize_with(*max + 1, ||None);
    for (i,rule) in rules {
        result_rules[i] = Some(rule);
    }

    assert_eq!(result_rules.iter().filter(|rule|rule.is_none()).count(), 0);
    let result_rules


.string	"CONFIG_PPP_MPPE_SUPPORT 1"
.LASF10835:
	.string	"INT_MIN"
.LASF402:
	.string	"_GCC_SIZE_T "
.LASF2268:
	.string	"XCHAL_DTLB_SET0_E3_VPN_CONST 0x60000000"
.LASF6678:
	.string	"GPIO_FUNC163_IN_INV_SEL_S 6"
.LASF2314:
	.string	"XCHAL_NCP_SA_ALIGN 4"
.LASF8701:
	.string	"RTC_GPIO_PIN6_PAD_DRIVER_S 2"
.LASF7601:
	.string	"GPIO_FUNC234_IN_INV_SEL_S 6"
.LASF10143:
	.string	"I2S0O_WS_OUT_IDX 25"
.LASF12754:
	.string	"RTC_CNTL_SLP_REJECT_S 30"
.LASF9840:
	.string	"SLP_DRV_S 5"
.LASF13525:
	.string	"RTC_CNTL_LSLP_MEM_FORCE_PU (BIT(4))"
.LASF4416:
	.string	"GPIO_PIN34_INT_TYPE 0x00000007"
.LASF2594:
	.string	"XCHAL_CACHE_SETWIDTH_MAX XCHAL_DCACHE_SETWIDTH"
.LASF6023:
	.string	"GPIO_SIG113_IN_SEL_V 0x1"
.LASF2379:
	.ascii	"XCHAL_INT_TYPES XCHAL_INT0_TYPE XCHAL_SEP XCHAL_INT1_TYPE XC"
	.ascii	"HAL_SEP XCHAL_INT2_TYPE XCHAL_SEP XCHAL_INT3_TYPE XCHAL_SEP "
	.ascii	"XCHAL_INT4_TYPE XCHAL_SEP XCHAL_INT5_TYPE XCHAL_SEP XCHAL_IN"
	.ascii	"T6_TYPE XCHAL_SEP XCHAL_INT7_TYPE XCHAL_SEP XCHAL_INT8_TYPE "
	.ascii	"XCHAL_SEP XCHAL_INT9_TYPE XCHAL_SEP XCHAL_INT10_TYPE XCHAL_S"
	.ascii	"EP XCHAL_INT11_TYPE XCHAL_SEP XCHAL_INT12_TYPE XCHAL_SEP XCH"
	.ascii	"AL_INT13_TYPE XCHAL_SEP XCHAL_INT14_TYPE XCHAL_SEP XCHAL_INT"
	.ascii	"15_TYPE XCHAL_SEP XCHAL_INT16_TYPE XCHAL_SEP XCHAL_INT17_TYP"
	.ascii	"E XCHAL_SEP XCHAL_INT18_TYPE XCHAL_SEP XCHAL_INT19_TYPE XCHA"
	.ascii	"L_SEP XCHAL_INT20_TYPE XCHAL_SEP XCHAL_INT21_TYPE XCHAL_SEP "
	.ascii	"XCH"
	.string	"AL_INT22_TYPE XCHAL_SEP XCHAL_INT23_TYPE XCHAL_SEP XCHAL_INT24_TYPE XCHAL_SEP XCHAL_INT25_TYPE XCHAL_SEP XCHAL_INT26_TYPE XCHAL_SEP XCHAL_INT27_TYPE XCHAL_SEP XCHAL_INT28_TYPE XCHAL_SEP XCHAL_INT29_TYPE XCHAL_SEP XCHAL_INT30_TYPE XCHAL_SEP XCHAL_INT31_TYPE"
.LASF12676:
	.string	"RTC_CNTL_BBPLL_FORCE_PU_S 11"
.LASF1907:
	.string	"XTENSA_HWVERSION_T1030_1 103001"
.LASF180:
	.string	"__DBL_HAS_DENORM__ 1"


8192(%edx), %zmm5, %zmm6	 # AVX512F
	vunpckhpd	-8192(%edx), %zmm5, %zmm6	 # AVX512F Disp8
	vunpckhpd	-8256(%edx), %zmm5, %zmm6	 # AVX512F
	vunpckhpd	1016(%edx){1to8}, %zmm5, %zmm6	 # AVX512F Disp8
	vunpckhpd	1024(%edx){1to8}, %zmm5, %zmm6	 # AVX512F
	vunpckhpd	-1024(%edx){1to8}, %zmm5, %zmm6	 # AVX512F Disp8
	vunpckhpd	-1032(%edx){1to8}, %zmm5, %zmm6	 # AVX512F

	vunpckhps	%zmm4, %zmm5, %zmm6	 # AVX512F
	vunpckhps	%zmm4, %zmm5, %zmm6{%k7}	 # AVX512F
	vunpckhps	%zmm4, %zmm5, %zmm6{%k7}{z}	 # AVX512F
	vunpckhps	(%ecx), %zmm5, %zmm6	 # AVX512F
	vunpckhps	-123456(%esp,%esi,8), %zmm5, %zmm6	 # AVX512F
	vunpckhps	(%eax){1to16}, %zmm5, %zmm6	 # AVX512F
	vunpckhps	8128(%edx), %zmm5, %zmm6	 # AVX512F Disp8
	vunpckhps	8192(%edx), %zmm5, %zmm6	 # AVX512F
	vunpckhps	-8192(%edx), %zmm5, %zmm6	 # AVX512F Disp8
	vunpckhps	-8256(%edx), %zmm5, %zmm6	 # AVX512F
	vunpckhps	508(%edx){1to16}, %zmm5, %zmm6	 # AVX512F Disp8
	vunpckhps	512(%edx){1to16}, %zmm5, %zmm6	 # AVX512F
	vunpckhps	-512(%edx){1to16}, %zmm5, %zmm6	 # AVX512F Disp8
	vunpckhps	-516(%edx){1to16}, %zmm5, %zmm6	 # AVX512F

	vunpcklpd	%zmm4, %zmm5, %zmm6	 # AVX512F
	vunpcklpd	%zmm4, %zmm5, %zmm6{%k7}	 # AVX512F
	vunpcklpd	%zmm4, %zmm5, %zmm6{%k7}{z}	 # AVX512F
	vunpcklpd	(%ecx), %zmm5, %zmm6	 # AVX512F
	vunpcklpd	-123456(%esp,%esi,8), %zmm5, %zmm6	 # AVX512F
	vunpcklpd	(%eax){1to8}, %zmm5, %zmm6	 # AVX512F
	vunpcklpd	8128(%edx), %zmm5, %zmm6	 # AVX512F Disp8
	vunpcklpd	8192(%edx), %zmm5, %zmm6	 # AVX512F
	vunpcklpd	-8192(%edx), %zmm5, %zmm6	 # AVX512F Disp8
	vunpcklpd	-8256(%edx), %zmm5, %zmm6	 # AVX512F
	vunpcklpd	1016(%edx)


v11.4s,v2.4s,v3.4s
	zip1	v0.2d,v8.2d,v10.2d
	zip2	v1.2d,v8.2d,v10.2d
	zip1	v2.2d,v9.2d,v11.2d
	zip2	v3.2d,v9.2d,v11.2d
	zip1	v8.4s,v4.4s,v5.4s
	zip2	v9.4s,v4.4s,v5.4s
	zip1	v10.4s,v6.4s,v7.4s
	zip2	v11.4s,v6.4s,v7.4s
	zip1	v4.2d,v8.2d,v10.2d
	zip2	v5.2d,v8.2d,v10.2d
	zip1	v6.2d,v9.2d,v11.2d
	zip2	v7.2d,v9.2d,v11.2d
	eor	v0.16b, v0.16b, v16.16b
	eor	v1.16b, v1.16b, v17.16b
	eor	v2.16b, v2.16b, v18.16b
	eor	v3.16b, v3.16b, v19.16b
	eor	v4.16b, v4.16b, v20.16b
	eor	v5.16b, v5.16b, v21.16b
	eor	v6.16b, v6.16b, v22.16b
	eor	v7.16b, v7.16b, v23.16b

	// save the last tweak
	mov	v25.16b,v23.16b
	st1	{v0.4s,v1.4s,v2.4s,v3.4s},[x1],#64
	st1	{v4.4s,v5.4s,v6.4s,v7.4s},[x1],#64
	subs	x2,x2,#8
	b.gt	.Lxts_8_blocks_process_gb
	b	100f
.Lxts_4_blocks_process_gb:
	cmp	x2,#4
	b.lt	1f
	ld1	{v4.4s,v5.4s,v6.4s,v7.4s},[x0],#64
	rbit	v16.16b,v16.16b
	rbit	v17.16b,v17.16b
	rbit	v18.16b,v18.16b
	rbit	v19.16b,v19.16b
	eor	v4.16b, v4.16b, v16.16b
	eor	v5.16b, v5.16b, v17.16b
	eor	v6.16b, v6.16b, v18.16b
	eor	v7.16b, v7.16b, v19.16b
#ifndef __AARCH64EB__
	rev32	v4.16b,v4.16b
#endif
#ifndef __AARCH64EB__
	rev32	v5.16b,v5.16b
#endif
#ifndef __AARCH64EB__
	rev32	v6.16b,v6.16b
#endif
#ifndef __AARCH64EB__
	rev32	v7.16b,v7.16b
#endif
	zip1	v0.4s,v4.4s,v5.4s
	zip2	v1.4s,v4.4s,v5.4s
	zip1	v2.4s,v6.4s,v7.4s
	zip2	v3.4s,v6.4s,v7.4s
	zip1	v4.2d,v0.2d,v2.2


عامعام' );
			assertCaretPosition( '
Text: عامعام^
', editor );
		},

		// (#848).
		'test arabic text should be composed correctly on insertion (end, case 2)': function() {
			var editor = this.editors.enterp;

			setHtmlWithSelection( editor, '
Text: ^
' );

			editor.insertText( 'عام' );
			editor.insertText( 'عام' );
			editor.insertText( 'عام' );

			var paragraph = editor.editable().find( 'p' ).getItem( 0 );

			assertTextNormalization( paragraph, 'Text: عامعامعام' );
			assertCaretPosition( '
Text: عامعامعام^
', editor );
		},

		// (#848).
		'test arabic text should be composed correctly on insertion (enter_br, case 1)': function() {
			var editor = this.editors.enterbr;

			setHtmlWithSelection( editor, 'Text: ^' );

			editor.insertText( 'عام' );
			editor.insertText( 'عام' );

			var body = editor.editable();

			assertTextNormalization( body, 'Text: عامعام' );
			assertCaretPosition( 'Text: عامعام^', editor );
		},

		// (#848).
		'test arabic text should be composed correctly on insertion (enter_br, case 2)': function() {
			var editor = this.editors.enterbr;

			setHtmlWithSelection( editor, 'Foo Bar
Text: ^
' );

			editor.insertText( 'عام' );
			editor.insertText( 'عام' );

			var div = editor.editable().find( 'div' ).getItem( 0 );

			assertTextNormalization( div, 'Text: عامعام' );
			assertCaretPosition( 'Foo Bar
Text: عامعام^
', editor );
		},

		// (#848).
		'test regular text should be normalized': function() {
			var editor = this.editors.enterp;

			setHtmlWithSelection( editor, '
Text: ^
' );

			editor.insertText( '123' );
			editor.insertText( ' 456' );

			var paragraph = editor.editable().find( 'p' ).getItem( 0 );

			assertTextNormalization( paragraph, 'Text: 123 456' );
			assertCaretPosition( '
Text: 123 456^
', editor );
		},

		// (#848).
		'test regular text should be normalized (enter_br)': function() {
			var editor = this.editors.enterbr;

			setHtmlWithSelection( editor, 'Text: ^' );

			editor.insertText( '123' );
			editor.insertText( ' 456' );

			var paragraph = editor.editable();

			assertTextNormalization( paragraph, 'Text: 123 456' );
			assertCaretPosition( 'Text: 123 456^', editor );
		},

		// (#848).
		'test text nodes in other block elements should not be touched (before)': function() {
			var editor = this.editors.enterp;

			setHtmlWithSelection( editor, '
Foo Bar Baz

Text2: ^
' );

			var paragraph1 = editor.editable().find( 'p' ).getItem( 0 );

			// Split single text node into few separate text nodes in first paragraph.
			paragraph1.getChild( 0 ).split( 4 );

			assertTextNodes( paragraph1, [ 'Foo ', 'Bar Baz' ] );

			// Insert text which triggers normalization.
			editor.insertText( 'Bax' );
			editor.insertText( ' Bay' );

			var paragraph2 = editor.editable().find( 'p' ).getItem( 1 );

			assertTextNodes( paragraph1, [ 'Foo ', 'Bar Baz' ] );
			assertTextNormalization( paragraph2, 'Text2: Bax Bay' );
			assertCaretPosition( '
Foo Bar Baz

Text2: Bax Bay^
', editor );


 System.currentTimeMillis();
				mUniqueBooks = mTempList.getUniqueBookCount();
				long t5 = System.currentTimeMillis();
				mTotalBooks = mTempList.getBookCount();
				long t6 = System.currentTimeMillis();

				System.out.println("Build: " + (t1-t0));
				System.out.println("Position: " + (t2-t1));
				System.out.println("Select: " + (t3-t2));
				System.out.println("Count(" + count + "): " + (t4-t3) + "/" + (t5-t4) + "/" + (t6-t5));
				System.out.println("====== " );
				System.out.println("Total: " + (t6-t0));
				// Save a flag to say list was loaded at least once successfully
				mListHasBeenLoaded = true;

			} finally {
				if (taskContext.isTerminating()) {
					// onFinish() will not be called, and we can discard our
					// work...
					if (mTempList != null && mTempList != mList) {
						if (mList == null || mTempList.getBuilder() != mList.getBuilder())
							try { mTempList.getBuilder().close(); } catch (Exception e)  { /* Ignore */ };

						try { mTempList.close(); } catch (Exception e)  { /* Ignore */ };

					}
				}
			}

		}

		@Override
		public void onFinish(Exception e) {
			// If activity dead, just do a local cleanup and exit.
			if (mIsDead) {
				mTempList.close();
				return;
			}
			// Dismiss the progress dialog, if present
			if (mListDialog != null && !mTaskQueue.hasActiveTasks()) {
				mListDialog.dismiss();
				mListDialog = null;
			}
			// Update the data
			if (mTempList != null) {
				displayList(mTempList, mTargetRows);
			}
			mTempList = null;
		}

	}

	/**
	 * Queue a rebuild of the underlying cursor and data.
	 *
	 * @param isFullRebuild		Indicates whole table structure needs rebuild, vs. just do a reselect of underlying data
	 */
	private void setupList(boolean isFullRebuild) {
		isFullRebuild = true;
		mTaskQueue.enqueue(new GetListTask(isFullRebuild));
		if (mListDialog == null) {
			mListDialog = ProgressDialog.show(this, "", getString(R.string.getting_books_ellipsis), true, true, new OnCancelListener() {
				@Override
				public void onCancel(DialogInterface dialog) {
					// Cancelling the list cancels the activity.
					BooksOnBookshelf.this.finish();
					dialog.dismiss();
					mListDialog = null;
				}});
		}
	}

	/**
	 * Set the listview background based on user preferences
	 */
	private void initBackground() {
		ListView lv = getListView();
		View root = findViewById(R.id.root);
		View header = findViewById(R.id.header);

		//
		// Sanity checks as a result of user bug report that was caused by either:
		// (a) root being null
		// or
		// (b) getResources() returning null
		//
		if (root == null)
			throw new RuntimeException("Sanity Check Fail: Root view not found; isFinishing() = " + isFinishing());
		if (header == null)
			throw new RuntimeException("Sanity Check Fail: Header view not found; isFinishing() = " + isFinishing());
		if (getResources() == null)
			throw new RuntimeException("Sanity Check Fail: getResources() returned null; isFinishing() = " + isFinishing());

		Drawable d = null;
		try {
			if (!BookCatalogueApp.isBackgroundImageDisabled()) {
				d = Utils.makeTiledBackground(false);
			}
		} catch (Exception e) {
			// Ignore...if just a coat of paint
		}

		if (BooklistPreferencesActivity.isBackgroundFlat() || d == nul


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

#include <string.h>

#include <screen.h>
#include <stdlib.h>
#include <ui/ui_util.h>

#include "fake_component.h"

/********************************** Label Functions **********************************/

/**
 * Collects all component functions.
 */
static const component_functions_t FAKE_COMPONENT_FUNCTIONS = {
    .cleanup = ui_util_component_cleanup,
    .render = ui_util_component_render_subcomponents,
    .on_event = NULL};

/********************************** Create Instance **********************************/

/**
 * Creates a label with the given font either upside down or normal.
 * @param[in] text The text of the label.
 * @param[in] upside_down Whether the text should be rotated 180 degree or not.
 * @param[in] font The font of the label.
 */
component_t* fake_component_create(void)
{
    component_t* fake = malloc(sizeof(component_t));
    memset(fake, 0, sizeof(component_t));
    fake->f = &FAKE_COMPONENT_FUNCTIONS;

    fake->dimension.width = SCREEN_WIDTH;
    fake->dimension.height = SCREEN_HEIGHT;
    fake->position.left = 0;
    fake->position.top = 0;

    return fake;
}


}

  long input_frame_count = num_frames;
  long done_frames = cubeb_resampler_fill(stm->resampler, audio_data,
                                          &input_frame_count, NULL, 0);
  if (done_frames < 0 || done_frames > num_frames) {
    LOG("Error in data callback or resampler: %ld", done_frames);
    stm->state.store(stream_state::ERROR);
    return AAUDIO_CALLBACK_RESULT_STOP;
  } else if (done_frames < input_frame_count) {
    // we don't really drain an input stream, just have to
    // stop it from the state thread. That is signaled via the
    // DRAINING state.
    stm->state.store(stream_state::DRAINING);
    stm->context->state.waiting.store(true);
    stm->context->state.cond.notify_one();
  }

  return AAUDIO_CALLBACK_RESULT_CONTINUE;
}

static void
aaudio_error_cb(AAudioStream * astream, void * user_data, aaudio_result_t error)
{
  cubeb_stream * stm = static_cast<cubeb_stream *>(user_data);
  assert(stm->ostream == astream || stm->istream == astream);
  LOG("AAudio error callback: %s", WRAP(AAudio_convertResultToText)(error));
  stm->state.store(stream_state::ERROR);
}

static int
realize_stream(AAudioStreamBuilder * sb, const cubeb_stream_params * params,
               AAudioStream ** stream, unsigned * frame_size)
{
  aaudio_result_t res;
  assert(params->rate);
  assert(params->channels);

  WRAP(AAudioStreamBuilder_setSampleRate)(sb, params->rate);
  WRAP(AAudioStreamBuilder_setChannelCount)(sb, params->channels);

  aaudio_format_t fmt;
  switch (params->format) {
  case CUBEB_SAMPLE_S16NE:
    fmt = AAUDIO_FORMAT_PCM_I16;
    *frame_size = sizeof(int16_t) * params->channels;
    break;
  case CUBEB_SAMPLE_FLOAT32NE:
    fmt = AAUDIO_FORMAT_PCM_FLOAT;
    *frame_size = sizeof(float) * params->channels;
    break;
  default:
    return CUBEB_ERROR_INVALID_FORMAT;
  }

  WRAP(AAudioStreamBuilder_setFormat)(sb, fmt);
  res = WRAP(AAudioStreamBuilder_openStream)(sb, stream);
  if (res == AAUDIO_ERROR_INVALID_FORMAT) {
    LOG("AAudio device doesn't support output format %d", fmt);
    return CUBEB_ERROR_INVALID_FORMAT;
  } else if (params->rate && res == AAUDIO_ERROR_INVALID_RATE) {
    // The requested rate is not supported.
    // Just try again with default rate, we create a resampler anyways
    WRAP(AAudioStreamBuilder_setSampleRate)(sb, AAUDIO_UNSPECIFIED);
    res = WRAP(AAudioStreamBuilder_openStream)(sb, stream);
    LOG("Requested rate of %u is not supported, inserting resampler",
        params->rate);
  }

  // When the app has no permission to record audio
  // (android.permission.RECORD_AUDIO) but requested and input stream, this will
  // return INVALID_ARGUMENT.
  if (res != AAUDIO_OK) {
    LOG("AAudioStreamBuilder_openStream: %s",
        WRAP(AAudio_convertResultToText)(res));
    return CUBEB_ERROR;
  }

  return CUBEB_OK;
}

static void
aaudio_stream_destroy(cubeb_stream * stm)
{
  lock_guard lock(stm->mutex);
  assert(stm->state == stream_state::STOPPED


x203233662e6c6162,0x2b31326472255b09,0x3b356625202c5d30\n"
".quad 0x375f305f744c240a,0x6c2e090a3a323836,0x353709363109636f,0x2e726162090a3009\n"
".quad 0x3b300920636e7973,0x203170252140090a,0x744c240920617262,0x3b343931385f305f\n"
".quad 0x3109636f6c2e090a,0x090a300937370936,0x203233752e766f6d,0x25202c3132722509\n"
".quad 0x090a3b6b636f6c63,0x203233732e766f6d,0x25202c3232722509,0x7663090a3b313272\n"
".quad 0x33752e3233732e74,0x2c33327225092032,0x2e64696174632520,0x2e766f6d090a3b78\n"
".quad 0x3272250920323375,0x6174636e25202c34,0x61090a3b782e6469,0x09203233752e6464\n"
".quad 0x7225202c35327225,0x34327225202c3332,0x6c2e6c756d090a3b,0x2509203233752e6f\n"
".quad 0x327225202c363272,0x63090a3b34202c35,0x752e3436752e7476,0x3264722509203233\n"
".quad 0x3b36327225202c32,0x7261702e646c090a,0x09203436752e6d61,0x5b202c3332647225\n"
".quad 0x6170616475635f5f,0x7434315a5f5f6d72,0x7564655264656d69,0x664b506e6f697463\n"
".quad 0x6d69745f6c506650,0x6461090a3b5d7265,0x2509203436752e64,0x7225202c34326472\n"
".quad 0x647225202c323264,0x2e7473090a3b3332,0x732e6c61626f6c67,0x6472255b09203233\n"
".quad 0x25202c5d302b3432,0x744c240a3b323272,0x3a343931385f305f,0x3109636f6c2e090a\n"
".quad 0x090a300938370936,0x4c240a3b74697865,0x5a5f5f646e655744,0x5264656d69743431\n"
".quad 0x6e6f697463756465,0x3a6c506650664b50,0x5f202f2f207d090a,0x64656d697434315a\n"
".quad 0x6f69746375646552,0x6c506650664b506e,0x0000000000000a0a\n"
".text");

extern "C" {

extern const unsigned long long __deviceText_$compute_20$[687];

}

static __cudaFatPtxEntry __ptxEntries [] = {{(char*)"compute_20",(char*)__deviceText_$compute_20$},{0,0}};
static __cudaFatCubinEntry __cubinEntries[] = {{0,0}};
static __cudaFatDebugEntry __debugEntries0 = {0, 0, 0, 0} ;
static __cudaFatElfEntry __elfEntries0 = {0, 0, 0, 0} ;
static __cudaFatElfEntry __elfEntries1 = {(char*)"sm_21", (char*)__deviceText_$sm_21$, &__elfEntries0, (unsigned int)sizeof(__deviceText_$sm_21$)};

static __cudaFatCudaBinary __fatDeviceText __attribute__ ((section (".nvFatBinSegment")))= {0x1ee55a01,0x00000004,0xa14f518d,(char*)"b2f46f54e28dafca",(char*)"/home/normal/checkout/gpuocelot/te


/api/java.base/java/lang/Object.html#clone()" title="class or interface in java.lang" class="external-link">clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Details

HtmlContextMenu

public HtmlContextMenu<wbr>(HTMLElement element,
 HtmlRendererContext context)

Instantiates a new html context menu.

Parameters:

element - the element

context - the context


Pokemon({
        land: ['Geodude', 'Ponyta', 'Chansey', 'Scyther', 'Hoothoot', 'Noctowl', 'Roselia', 'Staravia', 'Kricketune', 'Bonsly', 'Mime jr.', 'Machop', 'Machoke', 'Meditite', 'Swablu', 'Bibarel'],
        water: ['Psyduck', 'Golduck', 'Magikarp', 'Barboach', 'Whiscash', 'Gyarados'],
    }),
    [new RouteKillRequirement(10, 209)]
));
Routes.add(new RegionRoute(
    GameConstants.Region.sinnoh, 211,
    new RoutePokemon({
        land: ['Zubat', 'Machop', 'Geodude', 'Ponyta', 'Hoothoot', 'Meditite', 'Bidoof', 'Machoke', 'Graveler', 'Noctowl', 'Chingling', 'Bronzor'],
    }),
    [
        new RouteKillRequirement(10, 213),
        new GymBadgeRequirement(BadgeCase.Badge.Fen),
    ]
));
Routes.add(new RegionRoute(
    GameConstants.Region.sinnoh, 212,
    new RoutePokemon({
        land: ['Ralts', 'Kirlia', 'Roselia', 'Starly', 'Staravia', 'Kricketune', 'Budew', 'Croagunk'],
        water: ['Marill', 'Psyduck', 'Golduck', 'Magikarp', 'Goldeen', 'Gyarados', 'Seaking'],
    }),
    [
        new RouteKillRequirement(10, 213),
        new GymBadgeRequirement(BadgeCase.Badge.Fen),
    ]
));
Routes.add(new RegionRoute(
    GameConstants.Region.sinnoh, 213,
    new RoutePokemon({
        land: ['Chatot'],
        water: ['Buizel', 'Floatzel', 'Tentacool', 'Tentacruel', 'Wingull', 'Pelipper', 'Shellos (east)', 'Gastrodon (east)', 'Magikarp', 'Remoraid', 'Gyarados', 'Octillery', 'Sharpedo'],
    }),
    [new RouteKillRequirement(10, 214)]
));
Routes.add(new RegionRoute(
    GameConstants.Region.sinnoh, 214,
    new RoutePokemon({
        land: ['Zubat', 'Geodude', 'Graveler', 'Ponyta', 'Rhyhorn', 'Sudowoodo', 'Girafarig', 'Houndour', 'Kricketune', 'Stunky', 'Hippopotas'],
        water: ['Psyduck', 'Golduck', 'Magikarp', 'Goldeen', 'Seaking', 'Gyarados'],
    }),
    [new RouteKillRequirement(10, 215)]
));
Routes.add(new RegionRoute(
    GameConstants.Region.sinnoh, 215,
    new RoutePokemon({
        land: ['Abra', 'Kadabra', 'Geodude', 'Ponyta', 'Lickitung', 'Scyther', 'Staravia', 'Kricketune', 'Marill'],
    }),
    [new RouteKillRequirement(10, 210)]
));
Routes.add(new RegionRoute(
    GameConstants.Region.sinnoh, 216,
    new RoutePokemon({
        land: ['Zubat', 'Machoke', 'Graveler', 'Noctowl', 'Sneasel', 'Meditite', 'Snorunt', 'Snover'],
    }),
    [
        new RouteKillRequirement(10, 218),
        new ClearDungeonRequirement(1, Statistics.getDungeonIndex('Mt. Coronet North')),
    ]
));
Routes.add(new RegionRoute(
    GameConstants.Region.sinnoh, 217,
    new RoutePokemon({
        land: ['Zubat', 'Machoke', 'Noctowl', 'Sneasel', 'Swinub', 'Meditite', 'Medicham', 'Snorunt', 'Sn


               |
                    |}
            """.trimMargin(),
            DiktatError(1, 13, ruleId, tokenWarn("(\"Text\")", 1, null, 0, null), true)
        )
    }

    @Test
    @Tag(WarningNames.WRONG_WHITESPACE)
    fun `check space on both sides of equals`() {
        lintMethod(
            """
                    |fun foo() {
                    |   val q=10
                    |   var w = 10
                    |   w=q
                    |}
            """.trimMargin(),
            DiktatError(2, 9, ruleId, tokenWarn("=", 0, 0, 1, 1), true),
            DiktatError(4, 5, ruleId, tokenWarn("=", 0, 0, 1, 1), true)
        )
    }

    @Test
    @Tag(WarningNames.WRONG_WHITESPACE)
    fun `check eq in other cases`() {
        lintMethod(
            """
                    |fun foo()=10
                    |
                    |val q =goo(text=ty)
            """.trimMargin(),
            DiktatError(1, 10, ruleId, tokenWarn("=", 0, 0, 1, 1), true),
            DiktatError(3, 7, ruleId, tokenWarn("=", null, 0, 1, 1), true),
            DiktatError(3, 16, ruleId, tokenWarn("=", 0, 0, 1, 1), true)
        )
    }

    @Test
    @Tag(WarningNames.WRONG_WHITESPACE)
    fun `singe space after open brace`() {
        lintMethod(
            """
                    |fun foo() {
                    |   "${"$"}{foo()}"
                    |}
            """.trimMargin()
        )
    }

    @Test
    @Tag(WarningNames.WRONG_WHITESPACE)
    fun `array initializers in annotations`() {
        lintMethod(
            """
                    |@RequestMapping(value =["/"], method = [RequestMethod.GET])
                    |fun foo() {
                    |   a[0]
                    |}
            """.trimMargin(),
            DiktatError(1, 23, ruleId, tokenWarn("=", null, 0, 1, 1), true),
            DiktatError(1, 24, ruleId, tokenWarn("[", 0, null, 1, 0), true)
        )
    }

    @Test
    @Tag(WarningNames.WRONG_WHITESPACE)
    fun `lambda as rigth value in arguments`() {
        lintMethod(
            """
                    |fun foo() {
                    |   Example(cb = { _, _ -> Unit })
                    |}
            """.trimMargin()
        )
    }

    @Test
    @Tag(WarningNames.WRONG_WHITESPACE)
    fun `lambdas as argument for function`() {
        lintMethod(
            """
                    |val q = foo(bar, { it.baz() })
                    |val q = foo({ it.baz() })
                    |val q = foo( { it.baz() })
            """.trimMargin(),
            DiktatError(3, 14, ruleId,
                "${WRONG_WHITESPACE.warnText()} there should be no whitespace before '{' of lambda inside argument list", true)
        )
    }

    @Test
    @Tag(WarningNames.WRONG_WHITESPACE)
    fun `regression - prefix coloncolon should be checked separately - positive example`() {
        lintMethod(
            """
                    |fun foo() {
                    |    Example(::ClassName)
                    |    bar(param1, ::ClassName)
                    |    bar(param1, param2 = ::ClassName)
                    |    list.map(::operationReference)
                    |}
            """.trimMargin()
        )
    }

    @Test
    @Tag(WarningNames.WRONG_WHITESPACE)
    fun `regression - prefix coloncolon should be checked separately`() {
        lintMethod(
            """
                    |fun foo() {
                    |    Example( :: ClassName)
                    |    bar(param


] &&
        player->readyweapon != wp_supershotgun)
        newweapon = wp_supershotgun;
      }

    // killough 2/8/98, 3/22/98 -- end of weapon selection changes

    if (player->weaponowned[newweapon] && newweapon != player->readyweapon)

      // Do not go to plasma or BFG in shareware,
      //  even if cheated.

      if ((newweapon != wp_plasma && newweapon != wp_bfg)
          || (gamemode != shareware) )
        player->pendingweapon = newweapon;
    }

  // check for use

  if (cmd->buttons & BT_USE)
    {
    if (!player->usedown)
      {
      P_UseLines (player);
      player->usedown = true;
      }
    }
  else
    player->usedown = false;

  // cycle psprites

  P_MovePsprites (player);

  // Counters, time dependent power ups.

  // Strength counts up to diminish fade.

  if (player->powers[pw_strength])
    player->powers[pw_strength]++;

  // killough 1/98: Make idbeholdx toggle:

  if (player->powers[pw_invulnerability] > 0) // killough
    player->powers[pw_invulnerability]--;

  if (player->powers[pw_invisibility] > 0)    // killough
    if (! --player->powers[pw_invisibility] )
      player->mo->flags &= ~MF_SHADOW;

  if (player->powers[pw_infrared] > 0)        // killough
    player->powers[pw_infrared]--;

  if (player->powers[pw_ironfeet] > 0)        // killough
    player->powers[pw_ironfeet]--;

  if (player->damagecount)
    player->damagecount--;

  if (player->bonuscount)
    player->bonuscount--;

  // Handling colormaps.
  // killough 3/20/98: reformat to terse C syntax
  player->fixedcolormap = palette_onpowers &&
    (player->powers[pw_invulnerability] > 4*32 ||
    player->powers[pw_invulnerability] & 8) ? INVERSECOLORMAP :
    player->powers[pw_infrared] > 4*32 || player->powers[pw_infrared] & 8;
}


次都调用优先级最高的任务执行，当任务A执行过一次后，任务A的优先级设置为最低，而其他在队列里等待的任务优先级加1，系统继续在队列选择优先级最高的任务执行。
+ 细心的童鞋会发现，”这样所有任务我没法控制具体执行周期”，这里采用的是计算每两次进入scheduler函数的时间间隔，当时间间隔刚好符合任务B执行周期的时候，任务B才会被执行。这样的处理好处是极大的提高了CPU的利用效率。具体代码实现请自行查阅Crazepony2\src\main\scheduler.c

## 初始化
+ Main函数位于Crazepony2\src\main\fc\boot.c进入main函数之后就是STM32处理器及各个部分的初始化。初始化完成后，就进入主循环while(1)之中了，主循环也就是整个程序功能实现的关键，所有子程序都在scheduler任务调度函数中被调度运行。

  ![](/assets/img/c2-process-1.jpg)

## 1000hz循环任务
+ 在Crazepony2\src\main\fc\fc_tasks.c中定义了所有子任务的执行周期。其中1000hz任务主要是读取加速度计跟陀螺仪的值，进行姿态融合，然后根据摇杆的数值，做PID控制。具体任务执行代码在Crazepony2\src\main\fc\cleanflight_fc.c中。

  ![](/assets/img/c2-process-2.jpg)

## 50hz循环任务
+ 50hz主要是检测电池电压以及接受遥控器的数据。

  ![](/assets/img/c2-process-3.jpg)

## 40hz循环任务
+ 这个子任务是负责定高算法的实现，包括高度数据融合、高度PID双环PID控制，PID控制代码具体实现如下图3。Crazepony2代的定高效果要比一代好很多，在室内悬停误差很小。代码位于Crazepony2\src\main\flight\altitudehold.c

  ![](/assets/img/c2-process-4.jpg)

  ![](/assets/img/c2-process-5.jpg)

---
layout: wiki
title: 自主悬停&高度融合
---

# {{ page.title }}

> 作者：nieyong

自主悬停是Crazepony玩家问得最多的问题，也是技术难度最高的问题。

首先我们明确什么是自主悬停？下面是一位资深航模玩家对


MTP_int(id), // offset_id
			MTP_int(0), // offset_date
			MTP_int(id ? (-kMessagesPerPage / 2) : 0), // add_offset
			MTP_int(kMessagesPerPage), // limit
			MTP_int(0), // max_id
			MTP_int(0), // min_id
			MTP_long(0) // hash
		)).done([=](const MTPmessages_Messages &result) {
			_beforeId = 0;
			_loadingAround = std::nullopt;
			finish();

			if (!id) {
				_skippedAfter = 0;
			} else {
				_skippedAfter = std::nullopt;
			}
			_skippedBefore = std::nullopt;
			_list.clear();
			if (processMessagesIsEmpty(result)) {
				_fullCount = _skippedBefore = _skippedAfter = 0;
			} else if (id) {
				Assert(!_list.empty());
				if (_list.front() <= id) {
					_skippedAfter = 0;
				} else if (_list.back() >= id) {
					_skippedBefore = 0;
				}
			}
			checkReadTillEnd();
		}).fail([=] {
			_beforeId = 0;
			_loadingAround = std::nullopt;
			finish();
		}).send();
	};
	_loadingAround = id;
	_beforeId = histories().sendRequest(
		_history,
		Histories::RequestType::History,
		send);
}

void RepliesList::loadBefore() {
	Expects(!_list.empty());

	if (_loadingAround) {
		histories().cancelRequest(base::take(_beforeId));
	} else if (_beforeId) {
		return;
	}

	const auto last = _list.back();
	const auto send = [=](Fn<void()> finish) {
		return _history->session().api().request(MTPmessages_GetReplies(
			_history->peer->input,
			MTP_int(_rootId),
			MTP_int(last), // offset_id
			MTP_int(0), // offset_date
			MTP_int(0), // add_offset
			MTP_int(kMessagesPerPage), // limit
			MTP_int(0), // min_id
			MTP_int(0), // max_id
			MTP_long(0) // hash
		)).done([=](const MTPmessages_Messages &result) {
			_beforeId = 0;
			finish();

			if (_list.empty()) {
				return;
			} else if (_list.back() != last) {
				loadBefore();
			} else if (processMessagesIsEmpty(result)) {
				_skippedBefore = 0;
				if (_skippedAfter == 0) {
					_fullCount = _list.size();
				}
			}
		}).fail([=] {
			_beforeId = 0;
			finish();
		}).send();
	};
	_beforeId = histories().sendRequest(
		_history,
		Histories::RequestType::History,
		send);
}

void RepliesList::loadAfter() {
	Expects(!_list.empty());

	if (_afterId) {
		return;
	}

	const auto first = _list.front();
	const auto send = [=](Fn<void()> finish) {
		return _history->session().api().request(MTPmessages_GetReplies(
			_history->peer->input,
			MTP_int(_rootId),
			MTP_int(first + 1), // offset_id
			MTP_int(0), // offset_date
			MTP_int(-kMessagesPerPage), // add_offset
			MTP_int(kMessagesPerPage), // limit
			MTP_int(0), // min_id
			MTP_int(0), // max_id
			MTP_long(0) // hash
		)).done([=](const MTPmessages_Messages &result) {
			_afterId = 0;
			finish();

			if (_list.empty()) {
				return;
			} else if (_list.front() != first) {
				load


督学习

作者注：机器学习系列是本人在学习机器学习相关内容时产生的笔记，希望也能对您有所帮助。值得注意的是，作者作为初学者，表述难免有误或不全面，望多批评指正。

如有任何问题，欢迎您随时与我联系：Hauyu.Chen@Gmail.com

版权声明：本文由 Hov 所有，发布于 http://chenhy.com ，转载请注明出处。

0 前言

本文要讲的逻辑回归属于分类算法，它是对线性回归的改进。

在处理二分类问题的时候，我们可将所有预测 y 映射成某个值。假设，若该值大于等于0.5，则结果为1；若该值小于0.5，则结果为0。这样，我们就将所有样本分为两类了。

若用线性回归去处理分类问题， y 的值可能远大于1或小于0，这样会造成较大的误差，所以能否让 y 的值处于0到1之间呢？

逻辑回归实现的就是这样的功能，将预测值映射到某个固定的区间，通过决策边界，实现二分类问题。

1 要点

1.1 逻辑函数（Sigmoid函数）

逻辑回归中的逻辑函数其实就是线性回归中的假设函数，只不过在假设函数的基础上进行一个函数映射。

（1）线性回归中的假设函数

（2）逻辑回归中的逻辑函数

逻辑函数对应的图像如下：

可见，逻辑函数将所有预测映射到（0，1）区间。

1.2 Decision Boundary（决策边界）

为了对输出结果进行0和1的分类，我们假设认为 hθ(x) 大于等于0.5，则结果 y=1 ；若 hθ(x) 小于0.5，则结果 y=0 ，即：

<img src="h


ow

7 hours ago

7 days from now

1 week hence

in 3 hours

1 year ago tomorrow

3 months ago saturday at 5:00 pm

7 hours before tomorrow at noon

3rd wednesday in november

3rd month next year

3rd thursday this september

4th day last week

Specific Dates

January 5

dec 25

may 27th

October 2006

jan 3 2010

March 14, 2004

March 14th, 2004

3 jan 2000

17 april 85

5/27/1979

27/5/1979

1979-05-27

Friday

5

4:00

17:00

0800

[![X Prober 預覽](screenshots/preview.webp)](screenshots/preview.webp)

# 😎 X 探針、瀏海探針

> 這是一款 PHP 環境探針程式，它不僅能直觀顯示伺服器資訊。

[![Open Collective 支持者](https://opencollective.com/x-prober/backers/badge.svg)](#支持者)
[![Open Collective 贊助商](https://opencollective.com/x-prober/sponsors/badge.svg)](#贊助)

## 開源授權

- GPL-3.0

## 線上演示

- [https://prober.inn-studio.com](https://prober.inn-studio.com)
- [https://tz.inn-studio.com](https://tz.inn-studio.com) (同上)

## 下載與使用

- 點擊 [INN 下載節點](https://api.inn-studio.com/download?id=xprober) 或 [GitHub 節點](https://github.com/kmvan/x-prober/raw/master/dist/prober.php) 下載探針檔案。
- 您將得到一個檔案，命名為 `x.php` 並上傳至您的伺服器。
- 透過瀏覽器存取 `x.php` 即可。

## 環境需求

- 編譯環境：PHP 8.4+
- 執行環境：PHP 5.4+
- 瀏覽器相容：Chrome、Firefox、Edge、Android
- 系統相容：Linux、Windows（基礎功能）

## 擴充功能

- 編寫中……

## 開發指引

- Fork 專案。
- 拉取您的儲存庫。
- 安裝 npm 模組：`$ npx pnpm i`。
- 安裝 composer：`$ composer install && composer dumpautoload -o`。
- 產生多國語言：`$ npm run lang` 重建 `./languages/lang.pot` 語言模板。
- 使用 php 監聽專案後端：`$ npx pnpm dev:php`。
- 使用 vite 監聽專案前端：`$ npx pnpm dev`。
- 存取：`http://localhost:5173/`。

## 編譯生產版本

- 編譯前端：`$ npx pnpm build`。
- 編譯檔案：`$ n


ing: var(--#{$prefix}badge-padding-y) var(--#{$prefix}badge-padding-x);
  @include font-size(var(--#{$prefix}badge-font-size));
  font-weight: var(--#{$prefix}badge-font-weight);
  line-height: 1;
  color: var(--#{$prefix}badge-color);
  text-align: center;
  white-space: nowrap;
  vertical-align: baseline;
  @include border-radius(var(--#{$prefix}badge-border-radius));
  @include gradient-bg();

  // Empty badges collapse automatically
  &:empty {
    display: none;
  }
}

// Quick fix for badges in buttons
.btn .badge {
  position: relative;
  top: -1px;
}
// Variables
//
// Variables should follow the `$component-state-property-size` formula for
// consistent naming. Ex: $nav-link-disabled-color and $modal-content-box-shadow-xs.

// Color system

// scss-docs-start gray-color-variables
$white:    #fff !default;
$gray-100: #f8f9fa !default;
$gray-200: #e9ecef !default;
$gray-300: #dee2e6 !default;
$gray-400: #ced4da !default;
$gray-500: #adb5bd !default;
$gray-600: #6c757d !default;
$gray-700: #495057 !default;
$gray-800: #343a40 !default;
$gray-900: #212529 !default;
$black:    #000 !default;
// scss-docs-end gray-color-variables

// fusv-disable
// scss-docs-start gray-colors-map
$grays: (
  "100": $gray-100,
  "200": $gray-200,
  "300": $gray-300,
  "400": $gray-400,
  "500": $gray-500,
  "600": $gray-600,
  "700": $gray-700,
  "800": $gray-800,
  "900": $gray-900
) !default;
// scss-docs-end gray-colors-map
// fusv-enable

// scss-docs-start color-variables
$blue:    #0d6efd !default;
$indigo:  #6610f2 !default;
$purple:  #6f42c1 !default;
$pink:    #d63384 !default;
$red:     #dc3545 !default;
$orange:  #fd7e14 !default;
$yellow:  #ffc107 !default;
$green:   #198754 !default;
$teal:    #20c997 !default;
$cyan:    #0dcaf0 !default;
// scss-docs-end color-variables

// scss-docs-start colors-map
$colors: (
  "blue":       $blue,
  "indigo":     $indigo,
  "purple":     $purple,
  "pink":       $pink,
  "red":        $red,
  "orange":     $orange,
  "yellow":     $yellow,
  "green":      $green,
  "teal":       $teal,
  "cyan":       $cyan,
  "black":      $black,
  "white":      $white,
  "gray":       $gray-600,
  "gray-dark":  $gray-800
) !default;
// scss-docs-end colors-map

// The contrast ratio to reach against white, to determine if color changes from "light" to "dark". Acceptable values for WCAG 2.0 are 3, 4.5 and 7.
// See https://www.w3.org/TR/WCAG20/#visual-audio-contrast-contrast
$min-contrast-ratio:   4.5 !default;

// Customize the light and dark text colors for use in our color contrast function.
$color-contrast-dark:      $black !default;
$color-contrast-light:     $white !default;

// fusv-disable
$blue-100: tint-color($blue, 80%)


.psi.LuaClassMember
//import com.tang.intellij.lua.psi.LuaElementFactory
//import com.tang.intellij.lua.psi.Visibility
//import com.tang.intellij.lua.search.SearchContext
//import com.tang.intellij.lua.ty.*
//import javax.swing.Icon
//
///**
//
// * Created by TangZX on 2016/11/24.
// */
//fun getReference(paramNameRef: LuaDocParamNameRef): PsiReference {
//    return LuaDocParamNameReference(paramNameRef)
//}
//
//fun getReference(docClassNameRef: LuaDocClassNameRef): PsiReference {
//    return LuaClassNameReference(docClassNameRef)
//}
//
//fun resolveType(nameRef: LuaDocClassNameRef): ITy {
//    return Ty.create(nameRef.text)
//}
//
//fun getName(identifierOwner: PsiNameIdentifierOwner): String? {
//    val id = identifierOwner.nameIdentifier
//    return id?.text
//}
//
//fun setName(identifierOwner: PsiNameIdentifierOwner, newName: String): PsiElement {
//    val oldId = identifierOwner.nameIdentifier
//    if (oldId != null) {
//        val newId = LuaElementFactory.createDocIdentifier(identifierOwner.project, newName)
//        oldId.replace(newId)
//        return newId
//    }
//    return identifierOwner
//}
//
//fun getTextOffset(identifierOwner: PsiNameIdentifierOwner): Int {
//    val id = identifierOwner.nameIdentifier
//    return id?.textOffset ?: identifierOwner.node.startOffset
//}
//
//fun getNameIdentifier(tagField: LuaDocTagField): PsiElement? {
//    return tagField.id
//}
//
//fun getNameIdentifier(tagClass: LuaDocTagClass): PsiElement {
//    return tagClass.id
//}
//
//fun guessType(tagField: LuaDocTagField, context: SearchContext): ITy {
//    val stub = tagField.stub
//    if (stub != null)
//        return stub.type
//    return tagField.ty?.getType() ?: Ty.UNKNOWN
//}
//
//fun guessParentType(tagField: LuaDocTagField, context: SearchContext): ITy {
//    val parent = tagField.parent
//    val classDef = PsiTreeUtil.findChildOfType(parent, LuaDocTagClass::class.java)
//    return classDef?.type ?: Ty.UNKNOWN
//}
//
//fun getVisibility(tagField: LuaDocTagField): Visibility {
//    val stub = tagField.stub
//    if (stub != null)
//        return stub.visibility
//
//    val v = tagField.accessModifier?.let { Visibility.get(it.text) }
//    return v ?: Visibility.PUBLIC
//}
//
///**
// * 猜测参数的类型
// * @param tagParamDec 参数定义
// * *
// * @return 类型集合
// */
//fun getType(tagParamDec: LuaDocTagParam): ITy {
//    val type = tagParamDec.ty?.getType()
//    if (type != null) {
//        val substitutor = LuaCommentUtil.findContainer(tagParamDec).createSubstitutor()
//        if (substitutor != null)
//            return type.substitute(substitutor)
//    }
//    return type ?: Ty.UNKNOWN
//}
//
//fun getType(vararg: LuaDocTagVararg): ITy {
//    return vararg.ty?.getType() ?: Ty.UNKNOWN
//}
//
//fun getType(vararg: LuaDocVarargParam): ITy {
//    return vararg.ty?.getType() ?: Ty.UNKNOWN
//}
//
///**
// * 获取返回类型
// * @param tagReturn 返回定义
// *
// * @return 类型集合
// */
//fun


使用される。

## バージョン
### 言語
- C++23

## 参照

- [P2278R4 `cbegin` should always return a constant iterator](https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2278r4.html)
- [LWG Issue 3948. `possibly-const-range` and `as-const-pointer` should be `noexcept`](https://cplusplus.github.io/LWG/issue3948)
# end
* ranges[meta header]
* std::ranges[meta namespace]
* cpo[meta id-type]
* cpp20[meta cpp]

```cpp
namespace std::ranges {
  inline namespace /*unspecified*/ {
    inline constexpr /*unspecified*/ end = /*unspecified*/;
  }
}
```

## 概要
Rangeから最後尾要素の次を指すイテレータもしくは番兵を取得する関数オブジェクト。

## 効果
部分式`E`の型を`T`、`t`を`E`を評価した値とする。
このとき、式`ranges::begin(E)`の効果は以下の通り。

1. `E`がrvalueかつ[`enable_borrowed_range`](enable_borrowed_range.md)`<`[`remove_cv_t`](/reference/type_traits/remove_cv.md)`<T>>`が`false`であれば、呼び出しは不適格。
2. `T`が配列型であれば、`t +` [`extent_v`](/reference/type_traits/extent.md)`<T>`に等しい(expression‑equivalent)。ただし、要素数不明の配列か、[`remove_all_extents_t`](/reference/type_traits/remove_all_extents.md)`<T>`が不完全型であれば、呼び出しは不適格(診断不要)。
3. [`decay-copy`](/reference/exposition-only/decay-copy.md)`(t.end())`が有効な式でその型が[`sentinel_for`](/reference/iterator/sentinel_for.md)`<`[`iterator_t`](iterator_t.md)`<T>>`のモデルであれば、[`decay-copy`](/reference/exposition-only/decay-copy.md)`(t.end())`と等しい。
4. `T`がクラス型または列挙体であって、`end`がADLで見つかり、[`decay-copy`](/reference/exposition-only/decay-copy.md)`(end(t))`が有効な式でその型が[`sentinel_for`](/reference/iterator/sentinel_for.md)`<`[`iterator_t`](iterator_t.md)`<T>>`のモデルであれば、[`decay-copy`](/reference/exposition-only/decay-copy.md)`(end(t))`と等しい。

どれにも当てはまらないとき、呼び出しは不適格。

## 戻り値
最後尾要素の次を指すイテレータもしくは番兵。

## カスタマイゼーションポイント
3か4の条件を満たすようにする。例えば、ユーザー定義のフリー関数`end`を定義するか、ユーザー定義のクラスにメンバ関数`end`を持たせることでカスタマイズできる。

## 備考
`ranges::end(E)`が有効な式であるとき、`ranges::end(E)`の型`S`、[`ranges::begin`](begin.md)`(E)`の型`I`は[`sentinel_for`](/reference/iterator/sentinel_for.md)`<S, I


his
    approach, we show how to "zoom in" on the optimal solution and
    tighten tolerances to improve the solution quality.
*/

import com.gurobi.gurobi.*;

public class GCPWLFunc {

   private static double f(double u) { return Math.exp(u); }
   private static double g(double u) { return Math.sqrt(u); }

   private static void printsol(GRBModel m, GRBVar x, GRBVar y, GRBVar u, GRBVar v)
     throws GRBException {

     assert(m.get(GRB.IntAttr.Status) == GRB.OPTIMAL);
     System.out.println("x = " + x.get(GRB.DoubleAttr.X) + ", u = " + u.get(GRB.DoubleAttr.X));
     System.out.println("y = " + y.get(GRB.DoubleAttr.X) + ", v = " + v.get(GRB.DoubleAttr.X));
     System.out.println("Obj = " + m.get(GRB.DoubleAttr.ObjVal));

     // Calculate violation of exp(x) + 4 sqrt(y) <= 9
     double vio = f(x.get(GRB.DoubleAttr.X)) + 4 * g(y.get(GRB.DoubleAttr.X)) - 9;
     if (vio < 0.0) vio = 0.0;
     System.out.println("Vio = " + vio);
   }

   public static void main(String[] args) {
     try {

      // Create environment

      GRBEnv env = new GRBEnv();

      // Create a new m

      GRBModel m = new GRBModel(env);

      double lb = 0.0, ub = GRB.INFINITY;

      GRBVar x = m.addVar(lb, ub, 0.0, GRB.CONTINUOUS, "x");
      GRBVar y = m.addVar(lb, ub, 0.0, GRB.CONTINUOUS, "y");
      GRBVar u = m.addVar(lb, ub, 0.0, GRB.CONTINUOUS, "u");
      GRBVar v = m.addVar(lb, ub, 0.0, GRB.CONTINUOUS, "v");

      // Set objective

      GRBLinExpr obj = new GRBLinExpr();
      obj.addTerm(2.0, x); obj.addTerm(1.0, y);
      m.setObjective(obj, GRB.MAXIMIZE);

      // Add linear constraint

      GRBLinExpr expr = new GRBLinExpr();
      expr.addTerm(1.0, u); expr.addTerm(4.0, v);
      m.addConstr(expr, GRB.LESS_EQUAL, 9.0, "l1");

   // Approach 1) PWL constraint approach

      double intv = 1e-3;
      double xmax = Math.log(9.0);
      int len = (int) Math.ceil(xmax/intv) + 1;
      double[] xpts = new double[len];
      double[] upts = new double[len];
      for (int i = 0; i < len; i++) {
        xpts[i] = i*intv;
        upts[i] = f(i*intv);
      }
      GRBGenConstr gc1 = m.addGenConstrPWL(x, u, xpts, upts, "gc1");

      double ymax = (9.0/4.0)*(9.0/4.0);
      len = (int) Math.ceil(ymax/intv) + 1;
      double[] ypts = new double[len];
      double[] vpts = new double[len];
      for (int i = 0; i < len; i++) {
        ypts[i] = i*intv;
        vpts[i] = g(i*intv);
      }
      GRBGenConstr gc2  = m.addGenConstrPWL(y, v, ypts, vpts, "gc2");

      // Optimize the model and print solution

      m.optimize();
      printsol(m, x, y, u, v);

   // Approach 2) General function constraint approach with auto PWL
   //             translation by Gurobi

      // restore unsolved state and get rid of PWL constraints
      m.reset();
      m.remove(gc1);
      m.remove(gc2);
      m.update();

      GRBGenConstr gcf1 = m.


Ready()
	}
	_, err = os.Stat(cb.filePath)
	if !isLoad {
		msg := fmt.Sprintf("init cache block(%s) to local: err %v", cb.info(), err)
		log.LogDebugf("%v", msg)
		auditlog.LogFlashNodeOp("BlockInit", msg, err)
	}
	return
}

func (cb *CacheBlock) Init(sources []*proto.DataSource, readDataNodeTimeout int) {
	var err error
	var file *os.File
	bgTime := stat.BeginStat()
	defer func() {
		if err != nil {
			if IsDiskErr(err.Error()) {
				log.LogWarnf("[checkIsDiskError] data path(%v) meet io error", cb.filePath)
				cb.cacheEngine.triggerCacheError(cb.blockKey, cb.rootPath)
			}
		}
		if value, ok := cb.cacheEngine.lruCacheMap.Load(cb.rootPath); ok {
			cacheItem := value.(*lruCacheItem)
			cacheItem.lruCache.FreePreAllocatedSize(cb.blockKey)
		}
		stat.EndStat("CacheBlock:Init", err, bgTime, 1)
	}()

	// parallel read source data
	sourceTaskCh := make(chan *proto.DataSource)
	ctx, cancel := context.WithCancel(context.Background())
	defer cancel()
	wg := sync.WaitGroup{}
	for i := 0; i < util.Min(20, len(sources)); i++ {
		wg.Add(1)
		go func() {
			if err := cb.prepareSource(ctx, sourceTaskCh, readDataNodeTimeout); err != nil {
				cancel()
			}
			wg.Done()
		}()
	}

	sb := strings.Builder{}
	for _, s := range sources {
		select {
		case sourceTaskCh <- s:
			if log.EnableInfo() {
				sb.WriteString(s.String())
			}
		case <-ctx.Done():
		}
	}
	close(sourceTaskCh)
	wg.Wait()

	if log.EnableInfo() {
		log.LogInfof("action[Init], block:%s, sources:\n%s", cb.blockKey, sb.String())
	}
	if err = ctx.Err(); err != nil {
		log.LogErrorf("action[Init], block:%s, close %v", cb.blockKey, err)
		cb.notifyClose()
		return
	}

	if file, err = cb.GetOrOpenFileHandler(); err != nil {
		log.LogErrorf("action[Init], block:%s, get file handler err:%v", cb.blockKey, err)
		cb.notifyClose()
		return
	}

	if err = cb.writeCacheBlockFileHeader(file); err != nil {
		log.LogErrorf("action[Init], block:%s, write file header err:%v", cb.blockKey, err)
		cb.notifyClose()
		return
	}

	cb.notifyReady()
}

func (cb *CacheBlock) prepareSource(ctx context.Context, sourceCh <-chan *proto.DataSource, readDataNodeTimeout int) (err error) {
	bgTime := stat.BeginStat()
	defer func() {
		stat.EndStat("CacheBlock:prepareSource", err, bgTime, 1)
	}()
	for {
		select {
		case <-ctx.Done():
			return
		case source, got := <-sourceCh:
			if !got {
				return
			}
			offset := int64(source.FileOffset) & (proto.CACHE_BLOCK_SIZE - 1)
			writeCacheAfterRead := func(data []byte, size int64) error {
				if e := cb.WriteAt(data, offset, size); e != nil {
					return e
				}
				offset += size
				return nil
			}
			logPrefix := func() string {
				return fmt.Sprintf("action[prepareSource] block(%s) source:%s offset:%d",
					cb.blockKey, source.String(), offset)
			}

			start := time.Now()
			if l


af paper.
    ///
    /// # Note
    ///
    /// This method is not public because it's just used for hashing
    /// to a point -- proper elligator support is deferred for now.
    pub fn elligator_decaf_flavour(r_0: &FieldElement) -> DecafPoint {
        // Follows Appendix C of the Decaf paper.
        // Use n = 2 as the quadratic nonresidue so that n*x = x + x.
        let minus_one = -&FieldElement::one();

        // 1. Compute r <--- nr_0^2.
        let r_0_squared = r_0.square();
        let r = &r_0_squared + &r_0_squared;

        // 2. Compute D <--- (dr + (a-d)) * (dr - (d + ar))
        let dr = &constants::d * &r;
        // D = (dr + (a-d)) * (dr - (d + ar))
        //   = (dr + (a-d)) * (dr - (d-r)) since a=-1
        // writing as
        //   = (dr + (a-d)) * dr - (dr + (a-d)) * (d - r)
        // avoids two consecutive additions (could cause overflow)
        let dr_plus_amd = &dr + &constants::a_minus_d;
        let D = &(&dr_plus_amd * &dr) - &(&dr_plus_amd * &(&constants::d - &r));

        // 3. Compute N <--- (r+1) * (a-2d)
        let N = &(&r + &FieldElement::one()) * &(&minus_one - &constants::d2);

        // 4. Compute
        //           / +1,     1 / sqrt(ND)   if ND is square
        // c, e <--- | +1, 0                  if N or D = 0
        //           \ -1,  nr_0 / sqrt(nND)  otherwise
        let ND = &N * &D;
        let nND = &ND + &ND;
        let mut c = FieldElement::one();
        let mut e = FieldElement::zero();
        let (ND_is_nonzero_square, ND_invsqrt) = ND.invsqrt();
        e.conditional_assign(&ND_invsqrt, ND_is_nonzero_square);
        let (nND_is_nonzero_square, nND_invsqrt) = nND.invsqrt();
        let nr_0_nND_invsqrt = &nND_invsqrt * &(r_0 + r_0);
        c.conditional_assign(&minus_one, nND_is_nonzero_square);
        e.conditional_assign(&nr_0_nND_invsqrt, nND_is_nonzero_square);

        // 5. Compute s <--- c*|N*e|
        let mut s = &N * &e;
        let neg = s.is_negative_decaf();
        s.conditional_negate(neg);
        s *= &c;

        // 6. Compute t <--- -c*N*(r-1)* ((a-2d)*e)^2  -1
        let a_minus_2d_e_sq = (&(&minus_one - &constants::d2) * &e).square();
        let c_N_r_minus_1 = &c * &(&N * &(&r + &minus_one));
        let t = &minus_one - &(&c_N_r_minus_1 * &a_minus_2d_e_sq);

        // 7. Apply the isogeny:
        // (x,y) = ((2s)/(1+as^2), (1-as^2)/(t))
        let as_sq = &minus_one * &s.square();
        let P = CompletedPoint{
            X: &s + &s,
            Z: &FieldElement::one() + &as_sq,
            Y: &FieldElement::one() - &as_sq,
            T: t,


# Copyright (C) 2024 KML_Style
#
# 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; either version 2 of the License, or
# (at your option) any later version.
#
# 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, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# Author: KML_Style
# Description: Script for processing biathlon competition data.

def time_conversion(time_str):
    """
    Converts a time string to an integer representing the total time in tenths of a second.

    Args:
        time_str (str): The time to convert, in the format '(hours:minutes:)seconds.tenth'.

    Returns:
        int: The total time in tenths of a second.

    Raises:
        ValueError: If the format of time_str is invalid or if the parts are not numbers.
    """
    try:
        parts = time_str.split(':')

        if len(parts) == 3:
            hours_str, minutes_str, seconds_tenth_str = parts
            hours = int(hours_str)
            minutes = int(minutes_str)
        elif len(parts) == 2:
            hours = 0
            minutes_str, seconds_tenth_str = parts
            minutes = int(minutes_str)
        elif len(parts) == 1:
            hours = 0
            minutes = 0
            seconds_tenth_str = parts[0]
        else:
            raise ValueError("Invalid time format.")

        seconds_str, tenth_str = seconds_tenth_str.split('.')
        seconds = int(seconds_str)
        tenth = int(tenth_str)

        if seconds < 0 or seconds >= 60 or tenth < 0 or tenth >= 10:
            raise ValueError("Invalid time format: seconds must be between 0 and 59, and tenths between 0 and 9.")
        if minutes < 0 or minutes >= 60:
            raise ValueError("Invalid time format: minutes must be between 0 and 59.")
        if hours < 0:
            raise ValueError("Invalid time format: hours cannot be negative.")

        total_time_in_tenth = hours * 36000 + minutes * 600 + seconds * 10 + tenth
        return total_time_in_tenth

    except ValueError:
        raise ValueError("Invalid time format. Use the format '(hours:minutes:)seconds.tenth' with numeric values.")

def time_conversion2(total_time_in_tenth):
   """
   Converts a time integer representing the time in tenth of a second to a string.

   Args:
       total_time_in_tenth (int): The time in thenth of a second.

   Returns:
       str : The time converted, in the format '(minutes:)seconds.tenth'.
   """
   minutes = int(total_time_in_tenth // 600)
   seconds = int((total_time_in_tenth % 600) // 10)
   tenth = int(total_time_in_tenth % 10)

   if minutes > 0:
       return f"{minutes}:{seconds:02d}.{tenth}"
   else:
       return f"{seconds}.{tenth}"


omain({"d", "e"})); };
  EXPECT_EQ(2, p2.size());
  p2.update(1, refine_de).update(2, refine_de);
  EXPECT_EQ(2, p2.size());
  EXPECT_TRUE(p2.get(1).is_bottom());
  EXPECT_THAT(p2.get(2).elements(), ::testing::ElementsAre("d"));
  EXPECT_THAT(p2.get(3).elements(), ::testing::UnorderedElementsAre("g", "h"));

  Partition p5({{0, Domain({"c", "d"})},
                {2, Domain::bottom()},
                {3, Domain({"a", "f", "g"})}});

  EXPECT_EQ(2, p5.size());
  p5.set(0, Domain::bottom());
  p5.set(3, Domain::bottom());
  EXPECT_TRUE(p5.is_bottom());
  EXPECT_EQ(Partition::bottom(), p5);
  EXPECT_TRUE(p5.get(4).is_bottom());

  Partition p6{Partition::top()};
  EXPECT_TRUE(p6.get(0).is_top());

  // All operations on Top are no-ops.
  p6.set(1, Domain::bottom());
  EXPECT_TRUE(p6.get(1).is_top());
  EXPECT_TRUE(p6.is_top());

  p6.update(1, make_bottom);
  EXPECT_TRUE(p6.get(1).is_top());
  EXPECT_TRUE(p6.is_top());
}

TEST(PatriciaTreeMapAbstractPartitionTest, transform) {
  Partition p1({{1, Domain({"a", "b"})}});
  bool any_changes = p1.transform([](Domain d) { return d; });
  EXPECT_FALSE(any_changes);

  any_changes = p1.transform([](Domain d) { return Domain::bottom(); });
  EXPECT_TRUE(any_changes);
  EXPECT_TRUE(p1.is_bottom());
}

TEST(PatriciaTreeMapAbstractPartitionTest, visit) {
  Partition p1({
      {1, Domain({"a", "b"})},
      {2, Domain({"a", "b"})},
      {3, Domain({"a", "b"})},
  });
  size_t sum = 0;
  p1.visit([&sum](const auto& binding) { sum += binding.first; });
  EXPECT_EQ(sum, 6);
}
/*
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */

#include <sparta/S_Expression.h>

#include <gmock/gmock.h>
#include <gtest/gtest.h>
#include <limits>
#include <sstream>
#include <string>
#include <unordered_set>

#include <boost/functional/hash.hpp>

using namespace sparta;

namespace {

void check_s_expr_istream(s_expr_istream& input) { EXPECT_TRUE(input.good()); }

s_expr parse(const std::string& str) {
  std::istringstream str_input(str);
  s_expr_istream input(str_input);
  s_expr output;
  input >> output;
  // Using an EXPECT_* in a function that returns anything other than void
  // causes a compile-time error.
  check_s_expr_istream(input);
  return output;
}

void erroneous_parse(const std::string& str, size_t count, std::string& what) {
  std::istringstream str_input(str);
  s_expr_istream input(str_input);
  s_expr expr;
  while (count-- > 0) {
    input >> expr;
  }
  EXPECT_TRUE(input.fail());
  what


Segmentation](https://arxiv.org/abs/1505.04597)

## Introduction

Official Repo

Code Snippet

## Abstract

There is large consent that successful training of deep networks requires many thousand annotated training samples. In this paper, we present a network and training strategy that relies on the strong use of data augmentation to use the available annotated samples more efficiently. The architecture consists of a contracting path to capture context and a symmetric expanding path that enables precise localization. We show that such a network can be trained end-to-end from very few images and outperforms the prior best method (a sliding-window convolutional network) on the ISBI challenge for segmentation of neuronal structures in electron microscopic stacks. Using the same network trained on transmitted light microscopy images (phase contrast and DIC) we won the ISBI cell tracking challenge 2015 in these categories by a large margin. Moreover, the network is fast. Segmentation of a 512x512 image takes less than a second on a recent GPU. The full implementation (based on Caffe) and the trained networks are available at [this http URL](https://lmb.informatik.uni-freiburg.de/people/ronneber/u-net/).

## Results and models

### Cityscapes

| Method     | Backbone    | Loss          | Crop Size | Lr schd | Mem (GB) | Inf time (fps) | Device |  mIoU | mIoU(ms+flip) | config                                                                                | download                                                                                |
| ---------- | ----------- | ------------- | --------- | ------: | -------- | -------------- | ------ | ----: | ------------: | ------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| UNet + FCN | UNet-S5-D16 | Cross Entropy | 512x1024  |  160000 | 17.91    | 3.05           | V100   | 69.10 |         71.05 | [config](https://github.com/open-mmlab/mmsegmentation/blob/main/configs/unet/unet-s5-d16_fcn_4xb4-160k_cityscapes-512x1024.py) | [model](https://download.openmmlab.com/mmsegmentation/v0.5/unet/fcn_unet_s5-d16_4x4_512x1024_160k_cityscapes/fcn_unet_s5-d16_4x4_512x1024_160k_cityscapes_20211210_145204-6860854e.pth) \| [log](https://download.openmmlab.com/mmsegmentation/v0.5/unet/fcn_unet_s5-d16_4x4_512x1024_160k_cityscapes/fcn_unet_s5-d16_4x4_512x1024_160k_cityscapes_20211210_145204.log.


if prim.n ~= 0 or text.n ~= 0 then
                lower_macro(j)
            end
            prims_by_layer[i]:clear()
            texts_by_layer[i]:clear()
        end
        if saved_prims:contains('BG'..tostring(j)) then
            local s1 = 'BG'..tostring(j)
            local s2 = 'info'..tostring(j)
            if party[j].n == 0 then
                windower.prim.delete(s1)
                windower.prim.delete(s2)
                saved_prims:remove(s1)
                saved_prims:remove(s2)
                macro[j]:remove(s1)
                misc_hold_for_up.prims:delete(s1)
                misc_hold_for_up.prims:delete(s2)
            else
                windower.prim.set_size(s1,macro_order[j].n*(w+1)+1,party[j].n*(h+1)+1)
                windower.prim.set_size(s2,152,party[j].n*(h+1)+1)
            end
        end
    end
    vacancies={0,0,0}
    define_active_regions()
end

function update_macro_data(id,t)
    for i=1,t:length() do
        windower.text.set_text(t[i]..tostring(position_lookup[id]),tostring(stat_table[id][t[i]]))
    end
end

function kick(id,n)
    local i = position_lookup[id]

    if i < 6 then
        local party = party[1]
        local last = party[party.n]

        for k = 1, 2 do
            local prim = buff_map[position_lookup[last]][k]
            for j = 1, stat_table[last].buffs[k].n do
                prim[j]:hide()
            end
        end

        for j = party.n, 8 - i, -1 do
            draw_buff_display(stat_table[party[j]].buffs[1], party[j - 1], 1)
            draw_buff_display(stat_table[party[j]].buffs[2], party[j - 1], 1)
        end
    end

    party[n]:remove(6*n+1-i)
    local j = 6*(n)-party[n].n
    vacancies[n] = vacancies[n] + 1

    while i > j do
        local m = 6*n+1-i
        local m_id = party[n][m]
        local pos_tostring = tostring(i)

        position_lookup[m_id] = position_lookup[m_id] + 1
        update_macro_data(m_id,L{'tp','hp','mp','hpp','mpp'})
        windower.text.set_text('name'..pos_tostring,prepare_names(stat_table[m_id]['name']))--shouldn't send name to update_macro... since it won't truncate
        local color=_settings.primitives.hp_bar[choose_color(stat_table[m_id].hpp)]
        windower.prim.set_color('phpp'..pos_tostring,color.a,color.r,color.g,color.b)
        windower.prim.set_size('phpp'..pos_tostring,150/100*stat_table[m_id]['hpp'],h)
        windower.prim.set_size('pmpp'..pos_tostring,150/100*stat_table[m_id]['mpp'],5)
        if out_of_range[i] and not out_of_range[i-1] then
            windower.text.set_color('name' .. tostring(i), 255, 255, 255, 255)
        end
        if out_of_range[i-1] and not out_of_range[i] then
            windower.text.set_color('name' .. tostring(i), 255, 175, 98, 177)
        end
        out_o


8117
KGNvZWZm 68118
IENsYXVz 68119
L2V4YW1wbGVz 68120
IEZhcm1z 68121
IC8vKA== 68122
U1BBTg== 68123
IGNpcmN1cw== 68124
IE1JUw== 68125
IFRyYWl0cw== 68126
LWNsZWFy 68127
IHJlZ2ltZW4= 68128
IGJhY2tncm91bmRJbWFnZQ== 68129
dXNhaGE= 68130
X01ldGFkYXRhVXNhZ2VJZA== 68131
IHJoZQ== 68132
Q2xpbg== 68133
IERvbWluaWM= 68134
Lm5leHREb3VibGU= 68135
KGRldGFpbA== 68136
VGhyZWFkUG9vbA== 68137
IENhcnBlbnRlcg== 68138
c29ydGluZw== 68139
IGdvdmVybm9ycw== 68140
IHNpbmdlcnM= 68141
dW5saW5r 68142
IHJpbmdpbmc= 68143
IHNjaGVtYXRpYw== 68144
IGVycm1zZw== 68145
IGJlYg== 68146
LiIr 68147
IEluY3JlYXNlcw== 68148
IkFsbA== 68149
IGFjb250ZQ== 68150
emlh 68151
LlRleHRDaGFuZ2Vk 68152
IFRvRG8= 68153
LDopOwo= 68154
bmFnZQ== 68155
Y2hs 68156
b3dlbA== 68157
IGdlcmFkZQ== 68158
X2ZmdA== 68159
IGVzdGFtb3M= 68160
U1RBUg== 68161
IGRpc2d1c3Q= 68162
Z3Jhbg== 68163
cG9ydHVuaXR5 68164
IGF1dG9iaQ== 68165
e317Cg== 68166
IENvdXBvbnM= 68167
X0dBSU4= 68168
IFRDSEFS 68169
L3Bhc3M= 68170
55Sx 68171
IGZvb3R3ZWFy 68172
KGJvdW5kcw== 68173
YXB1cw== 68174
Y2l0ZQ== 68175
Qk9PVA== 68176
IENvZGVj 68177
bG9ndWU= 68178
LXByb3BlcnRpZXM= 68179
YXV0b21hdGlvbg== 68180
IFNob2U= 68181
c3BlY3Q= 68182
KG1t 68183
IEtldA== 68184
W3BhcmFt 68185
IGJhc2ls 68186
IEFuZ3VsYXJGaXJl 68187
IGFkdmVudHVyb3Vz 68188
X1VDbGFzcw== 68189
IGluZHVsZ2U= 68190
CWN1ZGE= 68191
IGluc3VsdGluZw== 68192
LkV4cHJlc3Npb25z 68193
IG9uQ3JlYXRlT3B0aW9uc01lbnU= 68194
VUVM 68195
IGJpdGluZw== 68196
KCFf 68197
IEVuY3ljbG9wZWRpYQ== 68198
IGJlcnQ= 68199
IFZlcmE= 68200
IEJpYmxpY2Fs 68201
aW5zaWNz 68202
X1NJTVBMRQ== 68203
IHNhbGlkYQ== 68204
cmVxdWVzdGVk 68205
IENvbXBvc2l0aW9u 68206
LkF0b2k= 68207
KEtleUV2ZW50 68208
ZXJlYQ== 68209
IGRlcG9ydGVk 68210


}z,}{,c}', ['', 'c', 'az', 'azc', 'abz', 'abzc', '', 'c']);
      equal('{,a{,b},}{,c}', ['', 'c', 'a', 'ac', 'ab', 'abc', '', 'c']);
      equal('{,a{,b}}{,c}', ['', 'c', 'a', 'ac', 'ab', 'abc']);
      equal('{,b}{,d}', ['', 'd', 'b', 'bd']);
      equal('{a,b}{,d}', ['a', 'ad', 'b', 'bd']);
      equal('{,a}{z,c}', ['z', 'c', 'az', 'ac']);
      equal('{,{a,}}{z,c}', ['z', 'c', 'az', 'ac', 'z', 'c']);
      equal('{,{,a}}{z,c}', ['z', 'c', 'z', 'c', 'az', 'ac']);
      equal('{,{,a},}{z,c}', ['z', 'c', 'z', 'c', 'az', 'ac', 'z', 'c']);
      equal('{{,,a}}{z,c}', ['{}z', '{}c', '{}z', '{}c', '{a}z', '{a}c']);
      equal('{{,a},}{z,c}', ['z', 'c', 'az', 'ac', 'z', 'c']);
      equal('{,,a}{z,c}', ['z', 'c', 'z', 'c', 'az', 'ac']);
      equal('{,{,}}{z,c}', ['z', 'c', 'z', 'c', 'z', 'c']);
      equal('{,{a,b}}{,c}', ['', 'c', 'a', 'ac', 'b', 'bc']);
      equal('{,{a,}}{,c}', ['', 'c', 'a', 'ac', '', 'c']);
      equal('{,{,b}}{,c}', ['', 'c', '', 'c', 'b', 'bc']);
      equal('{,{,}}{,c}', ['', 'c', '', 'c', '', 'c']);
      equal('{,a}{,c}', ['', 'c', 'a', 'ac']);
      equal('{,{,a}b}', ['', 'b', 'ab']);
      equal('{,b}', ['', 'b']);
      equal('{,b{,a}}', ['', 'b', 'ba']);
      equal('{b,{,a}}', ['b', '', 'a']);
      equal('{,b}{,d}', ['', 'd', 'b', 'bd']);
      equal('{a,b}{,d}', ['a', 'ad', 'b', 'bd']);
    });
  });

  /**
   * The following unit tests are from brace-expansion v1.1.6
   * https://github.com/juliangruber/brace-expansion
   */

  describe('brace expansion unit tests from brace-expand', () => {
    describe('sequences', () => {
      it('numeric sequences', () => {
        equal('a{1..2}b{2..3}c', ['a1b2c', 'a1b3c', 'a2b2c', 'a2b3c']);
        equal('{1..2}{2..3}', ['12', '13', '22', '23']);
      });

      it('numeric sequences with step count', () => {
        equal('{0..8..2}', ['0', '2', '4', '6', '8']);
        equal('{1..8..2}', ['1', '3', '5', '7']);
      });

      it('numeric sequence with negative x / y', () => {
        equal('{3..-2}', ['3', '2', '1', '0', '-1', '-2']);
      });

      it('alphabetic sequences', () => {
        equal('1{a..b}2{b..c}3', ['1a2b3', '1a2c3', '1b2b3', '1b2c3']);
        equal('{a..b}{b..c}', ['ab', 'ac', 'bb', 'bc']);
      });

      it('alphabetic sequences with step count', () => {
        equal('{a..k..2}', ['a', 'c', 'e', 'g', 'i', 'k']);
        equal('{b..k..2}', ['b', 'd', 'f', 'h', 'j


}
._1k3A1XRFaK1VgxC0EKqAI4 {
  display: flex;
  width: 100%;
}
._1k3A1XRFaK1VgxC0EKqAI4 ._1AHcGiSAvA6Q1QmgwFONeb {
  width: 2ch;
  height: 100%;
  flex-shrink: 0;
  margin-right: 1ch;
}
._1k3A1XRFaK1VgxC0EKqAI4 .DFX7bTjfFQdDvyOY9-Ziu {
  flex-grow: 1;
}
._2gvqWTjhOIKPPE4C371wws {
  --controls-list-spacing: 0px;
  --controls-child-max-width: 250px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-bottom: calc(-1 * var(--controls-list-spacing));
}
._2gvqWTjhOIKPPE4C371wws.O4hskuF6Zf2d2xgdaaXbc {
  --controls-list-spacing: 10px;
}
._2gvqWTjhOIKPPE4C371wws._1HW3SctFEqyHfpRNqSwa7R {
  --controls-list-spacing: 16px;
}
._2gvqWTjhOIKPPE4C371wws.djR4MW1l6nmi2jvK_IYIc {
  --controls-child-max-width: 200px;
  gap: 20px;
  flex-grow: 1;
}
._2gvqWTjhOIKPPE4C371wws.VIdb7fIstL7ku5yhYotI5 {
  margin-right: calc(-1 * var(--controls-list-spacing));
}
._2gvqWTjhOIKPPE4C371wws._3CV61OOGM2FcrBs-nM_wkL {
  margin-left: calc(-1 * var(--controls-list-spacing));
  justify-content: start;
}
._2gvqWTjhOIKPPE4C371wws._2v0iq5b2-zawRaXY-MsRXr {
  margin-left: calc(-0.5 * var(--controls-list-spacing));
  margin-right: calc(-0.5 * var(--controls-list-spacing));
  justify-content: center;
}
._2gvqWTjhOIKPPE4C371wws._3vhQTWLQOA-Xg8ncmZ_dWO {
  flex: 1;
}
._2gvqWTjhOIKPPE4C371wws ._3LMLFOgwq5ZX33jyc8mgld {
  max-width: var(--controls-child-max-width);
  flex-grow: 1;
  margin-bottom: var(--controls-list-spacing);
}
#_3DHognIYDn8vCUrag7BQ9F ._2gvqWTjhOIKPPE4C371wws ._3LMLFOgwq5ZX33jyc8mgld {
  max-width: 270px;
}
._2gvqWTjhOIKPPE4C371wws ._3LMLFOgwq5ZX33jyc8mgld.DesktopUI,
.DesktopUI ._2gvqWTjhOIKPPE4C371wws ._3LMLFOgwq5ZX33jyc8mgld {
  display: flex;
}
._2gvqWTjhOIKPPE4C371wws._3CV61OOGM2FcrBs-nM_wkL ._3LMLFOgwq5ZX33jyc8mgld {
  margin-left: var(--controls-list-spacing);
}
._2gvqWTjhOIKPPE4C371wws.VIdb7fIstL7ku5yhYotI5 ._3LMLFOgwq5ZX33jyc8mgld {
  margin-right: var(--controls-


/* SPDX-License-Identifier: GPL-2.0-or-later */

#ifndef SOC_INTEL_COMMON_IRQ_H
#define SOC_INTEL_COMMON_IRQ_H

#include <southbridge/intel/common/acpi_pirq_gen.h>
#include <types.h>

#define MAX_FNS		8
#define INVALID_IRQ	-1

#define ANY_PIRQ(x)			[PCI_FUNC(x)] = { .fixed_int_pin = PCI_INT_NONE,\
							  .fixed_pirq = PIRQ_INVALID,	\
							  .irq_route = IRQ_PIRQ, }
#define DIRECT_IRQ(x)			[PCI_FUNC(x)] = { .fixed_int_pin = PCI_INT_NONE,\
							  .fixed_pirq = PIRQ_INVALID,	\
							  .irq_route = IRQ_DIRECT,}
#define FIXED_INT_ANY_PIRQ(x, pin)	[PCI_FUNC(x)] = { .fixed_int_pin = pin,		\
							  .fixed_pirq = PIRQ_INVALID,	\
							  .irq_route = IRQ_PIRQ,}
#define FIXED_INT_PIRQ(x, pin, pirq)	[PCI_FUNC(x)] = { .fixed_int_pin = pin,		\
							  .fixed_pirq = pirq,		\
							  .irq_route = IRQ_PIRQ,}

struct slot_irq_constraints {
	unsigned int slot;
	struct {
		enum pci_pin fixed_int_pin;
		enum pirq fixed_pirq;
		enum {
			IRQ_NONE = 0,	/* Empty function */
			IRQ_PIRQ = 1,	/* PIRQ routing, i.e. IRQs 16 - 23 */
			IRQ_DIRECT = 2,	/* No PIRQ routing, i.e., IRQs > 23 */
		} irq_route;
	} fns[MAX_FNS];
};

struct pci_irq_entry {
	unsigned int devfn;
	enum pci_pin pin;
	unsigned int irq;
	struct pci_irq_entry *next;
};

/*
 * This functions applies rules from FSP, BWG and SoC to come up with a set of
 * PCI slot/function --> IRQ pin/IRQ number entries.
 *
 * The results of this calculation are cached within this module for usage
 * by the other API functions.
 */
bool assign_pci_irqs(const struct slot_irq_constraints *constraints, size_t num_slots);

/* Generate an ACPI PCI IRQ routing table (_PRT) in the \_SB.PCI0 scope, using
   the cached results. */
bool generate_pin_irq_map(void);

/* Typically the FSP can accept a list of the mappings provided above, and
   program them, but for PCH devices only. This function provides the same
   function for non-PCH devices. */
bool irq_program_non_pch(void);

const struct pci_irq_entry *get_cached_pci_irqs(void);

/* Search the cached PCI IRQ assignment results for the matching devfn and
   return the corresponding IRQ, or INVALID_IRQ if not found. */
int get_pci_devfn_irq(unsigned int devfn);

/* Check if a given slot is a PCH slot.
 * Note: For PCH less SoC platforms, like MeteorLake and onwards, this function
 * can be utilized to check if a slot belongs to the SoC or IOE die.
 */
bool is_pch_slot(unsigned int devfn);

#endif /* SOC_INTEL_COMMON_IRQ_H */


humb_func_start ov05_021EFB50
ov05_021EFB50: ; 0x021EFB50
	push {r4, r5, r6, lr}
	add r5, r0, #0
	ldr r0, [r5, #0xc]
	bl Save_Poketch_Get
	add r4, r0, #0
	ldr r0, [r5, #0xc]
	bl Save_VarsFlags_Get
	add r6, r0, #0
	add r0, r4, #0
	bl Save_Poketch_IsGiven
	cmp r0, #0
	beq _021EFB94
	add r0, r6, #0
	bl sub_0205F1E4
	cmp r0, #0
	bne _021EFB94
	ldr r0, [r5, #4]
	ldr r0, [r0, #0x14]
	bl ov20_022524D0
	cmp r0, #0
	beq _021EFBA8
	ldr r0, [r5, #4]
	mov r1, #0
	str r1, [r0, #0x14]
	ldr r0, _021EFBAC ; =SDK_OVERLAY_OVERLAY_20_ID
	bl UnloadOverlayByID
	mov r0, #1
	pop {r4, r5, r6, pc}
_021EFB94:
	ldr r0, [r5, #8]
	bl ov19_02252504
	cmp r0, #0
	beq _021EFBA8
	ldr r0, _021EFBB0 ; =SDK_OVERLAY_OVERLAY_19_ID
	bl UnloadOverlayByID
	mov r0, #1
	pop {r4, r5, r6, pc}
_021EFBA8:
	mov r0, #0
	pop {r4, r5, r6, pc}
	.balign 4, 0
_021EFBAC: .word SDK_OVERLAY_OVERLAY_20_ID
_021EFBB0: .word SDK_OVERLAY_OVERLAY_19_ID

	thumb_func_start ov05_021EFBB4
ov05_021EFBB4: ; 0x021EFBB4
	push {r4, lr}
	add r4, r0, #0
	ldr r0, _021EFBC8 ; =SDK_OVERLAY_OVERLAY_19_ID
	mov r1, #2
	bl HandleLoadOverlay
	ldr r0, [r4, #8]
	bl ov19_02252440
	pop {r4, pc}
	.balign 4, 0
_021EFBC8: .word SDK_OVERLAY_OVERLAY_19_ID

	thumb_func_start ov05_021EFBCC
ov05_021EFBCC: ; 0x021EFBCC
	ldr r3, _021EFBD4 ; =ov19_022524F4
	ldr r0, [r0, #8]
	bx r3
	nop
_021EFBD4: .word ov19_022524F4

	thumb_func_start ov05_021EFBD8
ov05_021EFBD8: ; 0x021EFBD8
	push {r3, lr}
	ldr r0, [r0, #8]
	bl ov19_02252504
	cmp r0, #0
	beq _021EFBEE
	ldr r0, _021EFBF4 ; =SDK_OVERLAY_OVERLAY_19_ID
	bl UnloadOverlayByID
	mov r0, #1
	pop {r3, pc}
_021EFBEE:
	mov r0, #0
	pop {r3, pc}
	nop
_021EFBF4: .word SDK_OVERLAY_OVERLAY_19_ID


=1;
						}
						if(midiActiveFloat[31]==1){
							p_lock[31][p_lock_increment]=(message.value-MIDI_MAGIC)/MIDI_MAGIC;
						}
                    }

                    if(osc_m_rate_switch==2){
						midiActiveFloat[15]=0;
						midiActiveFloat[31]=0;
						midiActiveFloat[30]=0;
						if(abs(message.value/127.0f-p_lock[14][p_lock_increment])<CONTROL_THRESHOLD ){
							midiActiveFloat[14]=1;
						}
						if(midiActiveFloat[14]==1){
							p_lock[14][p_lock_increment]=message.value/127.0f;
						}
                    }
                    if(osc_m_rate_switch==3){
						midiActiveFloat[15]=0;
						midiActiveFloat[31]=0;
						midiActiveFloat[14]=0;
						if(abs(message.value/127.0f-p_lock[30][p_lock_increment])<CONTROL_THRESHOLD ){
							midiActiveFloat[30]=1;
						}
						if(midiActiveFloat[30]==1){
							p_lock[30][p_lock_increment]=message.value/127.0f;
						}
                    }

                }
				if(message.control==58){
					if(message.value==127){
						for(int i=0;i<p_lock_number;i++){
							midiActiveFloat[i]=0;
							for(int j=0;j<p_lock_size;j++){
								p_lock[i][j]=0;

								p_lock[1][j]=.5;
								p_lock[8][j]=1.0;

								p_lock[17][j]=.5;
								p_lock[24][j]=1.0;

								p_lock[4][j]=.5;
								p_lock[11][j]=1.0;

								p_lock[20][j]=.5;
								p_lock[27][j]=1.0;
							}
						}
					}
				}
            }
        }
    }
}

//add the midi info
//fix up the reset switch and parameter locks to include everything

#include "ofApp.h"
#include <iostream>
#define MIDI_MAGIC 63.50f
#define CONTROL_THRESHOLD .04f

//0 is picapture, 1 is usbinput
//this is only relevant for folks with the now discontinued capture editions
//or their own picapture sd1s.  most people can just ignore this switch!
bool inputswitch=1;

int hdmi_aspect_ratio_switch=0;

float rescale=1;

float theta=0;

float x_lfo=0;
float x_lfo_arg=0;
float y_lfo=0;
float y_lfo_arg=0;
float z_lfo=0;
float z_lfo_arg=0;

int width=640;
int height=480;

bool wireframe_switch=0;
bool bright_switch=0;

bool invert_switch=0;
bool stroke_weight_switch=0;

int scale=100;

int scale_key=0;

int yLfoShape=0;
int xLfoShape=0;
int zLfoShape=0;

bool y_freq0=FALSE;
bool y_ringmod_switch=FALSE;
bool y_phasemod_switch=FALSE;

bool x_freq0=FALSE;
bool x_ringmod_switch=FALSE;
bool x_phasemod_switch=FALSE;

bool z_freq0=FALSE;
bool z_ringmod_switch=FALSE;
bool z_phasemod_switch=FALSE;

float global_x_displace=0.0;
float global_y_displace=0.0;

float center_x_displace=0.0;
float rotate_x=0.0;
float rotate_capture_


://www.gnu.org/licenses/>.

package queryapi

import (
	"testing"

	"github.com/stretchr/testify/assert"
	"github.com/stretchr/testify/require"
)

func TestTranslateToLogQL_EqOperator(t *testing.T) {
	baseExpr := BaseExpression{
		Dataset: "logs",
		Limit:   100,
		Order:   "DESC",
		Filter: Filter{
			K:  "resource.service.name",
			V:  []string{"my-service"},
			Op: "eq",
		},
	}

	logql, ctx, err := TranslateToLogQL(baseExpr)
	require.NoError(t, err)
	assert.Equal(t, `{resource_service_name="my-service"}`, logql)
	assert.Equal(t, "resource.service.name", ctx.QueryLabels["resource_service_name"])
}

func TestTranslateToLogQL_InOperator(t *testing.T) {
	baseExpr := BaseExpression{
		Dataset: "logs",
		Filter: Filter{
			K:  "log.level",
			V:  []string{"error", "warn", "fatal"},
			Op: "in",
		},
	}

	logql, _, err := TranslateToLogQL(baseExpr)
	require.NoError(t, err)
	assert.Equal(t, `{log_level=~"^(error|warn|fatal)$"}`, logql)
}

func TestTranslateToLogQL_ContainsOperator(t *testing.T) {
	baseExpr := BaseExpression{
		Dataset: "logs",
		Filter: Filter{
			K:  "_cardinalhq.message",
			V:  []string{"error occurred"},
			Op: "contains",
		},
	}

	logql, _, err := TranslateToLogQL(baseExpr)
	require.NoError(t, err)
	// Contains creates a line filter for text search in log messages
	// Note: empty {} because contains is a pipeline operation, not a stream selector
	assert.Equal(t, `{} |~ "error occurred"`, logql)
}

func TestTranslateToLogQL_RegexOperator(t *testing.T) {
	baseExpr := BaseExpression{
		Dataset: "logs",
		Filter: Filter{
			K:  "resource.pod.name",
			V:  []string{"^api-.*"},
			Op: "regex",
		},
	}

	logql, _, err := TranslateToLogQL(baseExpr)
	require.NoError(t, err)
	assert.Equal(t, `{resource_pod_name=~"^api-.*"}`, logql)
}

func TestTranslateToLogQL_AndOperator(t *testing.T) {
	baseExpr := BaseExpression{
		Dataset: "logs",
		Filter: BinaryClause{
			Op: "and",
			Q1: Filter{
				K:  "resource.service.name",
				V:  []string{"my-service"},
				Op: "eq",
			},
			Q2: Filter{
				K:  "log.level",
				V:  []string{"error"},
				Op: "eq",
			},
		},
	}

	logql, _, err := TranslateToLogQL(baseExpr)
	require.NoError(t, err)
	assert.Equal(t, `{resource_service_name="my-service",log_level="error"}`, logql)
}

func TestTranslateToLogQL_InvalidDataset(t *testing.T) {
	baseExpr := BaseExpression{
		Dataset: "metrics",
		Filter: Filter{
			K:  "test",
			V:  []string{"value"},
			Op: "eq",
		},
	}

	_, _, err := TranslateToLogQL(baseExpr)
	require.Error(t, err)
	assert.Contains(t, err.Error(), "only 'logs' dataset is


tate': 'MN'
  },
  {
    '_id': '55367',
    'city': 'NEW GERMANY',
    'loc': [-93.97013099999999, 44.899431],
    'pop': 1136,
    'state': 'MN'
  },
  {
    '_id': '55368',
    'city': 'NORWOOD',
    'loc': [-93.93006699999999, 44.766786],
    'pop': 1761,
    'state': 'MN'
  },
  {
    '_id': '55369',
    'city': 'MAPLE GROVE',
    'loc': [-93.43987, 45.108636],
    'pop': 41581,
    'state': 'MN'
  },
  {
    '_id': '55370',
    'city': 'PLATO',
    'loc': [-94.050583, 44.765728],
    'pop': 990,
    'state': 'MN'
  },
  {
    '_id': '55371',
    'city': 'PRINCETON',
    'loc': [-93.596143, 45.585115],
    'pop': 8975,
    'state': 'MN'
  },
  {
    '_id': '55372',
    'city': 'PRIOR LAKE',
    'loc': [-93.41005699999999, 44.710694],
    'pop': 18539,
    'state': 'MN'
  },
  {
    '_id': '55373',
    'city': 'ROCKFORD',
    'loc': [-93.765832, 45.103074],
    'pop': 6268,
    'state': 'MN'
  },
  {
    '_id': '55374',
    'city': 'ROGERS',
    'loc': [-93.581445, 45.171484],
    'pop': 4957,
    'state': 'MN'
  },
  {
    '_id': '55376',
    'city': 'SAINT MICHAEL',
    'loc': [-93.65925300000001, 45.206409],
    'pop': 5441,
    'state': 'MN'
  },
  {
    '_id': '55378',
    'city': 'SAVAGE',
    'loc': [-93.343445, 44.761547],
    'pop': 7764,
    'state': 'MN'
  },
  {
    '_id': '55379',
    'city': 'SHAKOPEE',
    'loc': [-93.51974800000001, 44.7793],
    'pop': 14755,
    'state': 'MN'
  },
  {
    '_id': '55380',
    'city': 'SILVER CREEK',
    'loc': [-93.94962200000001, 45.326474],
    'pop': 1835,
    'state': 'MN'
  },
  {
    '_id': '55381',
    'city': 'SILVER LAKE',
    'loc': [-94.197383, 44.913945],
    'pop': 2012,
    'state': 'MN'
  },
  {
    '_id': '55382',
    'city': 'SOUTH HAVEN',
    'loc': [-94.162768, 45.346008],
    'pop': 4377,
    'state': 'MN'
  },
  {
    '_id': '55384',
    'city': 'SPRING PARK',
    'loc': [-93.63410399999999, 44.935566],
    'pop': 1571,
    'state': 'MN'
  },
  {
    '_id': '55385',
    'city': 'STEWART',
    'loc': [-94.451572, 44.725928],
    'pop': 1410,
    'state': 'MN'
  },
  {
    '_id': '55386',
    'city': 'VICTORIA


ion:setAnimation(target:getID(), animationId)
        end
    end

    local power = action:getAnimation(target:getID()) - 163

    -- Only have an effect if target's level is divisible by die roll
    if target:getMainLvl() % power == 0 then
        damage = math.floor(pet:getMainLvl() * power + (pet:getStat(xi.mod.MND) - target:getStat(xi.mod.MND)) * 1.5)

        damage = xi.mobskills.mobMagicalMove(pet, target, petskill, damage, xi.element.LIGHT, 1, xi.mobskills.magicalTpBonus.NO_EFFECT, 10)
        damage = xi.mobskills.mobAddBonuses(pet, target, damage, xi.element.LIGHT, petskill)
        damage = xi.summon.avatarFinalAdjustments(damage, pet, petskill, target, xi.attackType.MAGICAL, xi.damageType.LIGHT, 1)

        -- TODO: Magic burst?

        target:takeDamage(damage, pet, xi.attackType.MAGICAL, xi.element.LIGHT)
        target:updateEnmityFromDamage(pet, damage)
    else
        petskill:setMsg(xi.msg.basic.JA_NO_EFFECT_2)
    end

    return damage
end

return abilityObject