/*
 * DO NOT EDIT.  THIS FILE IS GENERATED FROM e:/builds/moz2_slave/rel-m-beta-xr_w32_bld-00000000/build/editor/txtsvc/public/nsITextServicesFilter.idl
 */

#ifndef __gen_nsITextServicesFilter_h__
#define __gen_nsITextServicesFilter_h__

#ifndef __gen_nsISupports_h__
#include "nsISupports.h"
#endif

/* For IDL files that don't want to include root IDL files. */
#ifndef NS_NO_VTABLE
#define NS_NO_VTABLE
#endif
class nsIDOMNode; /* forward declaration */

/* starting interface:    nsITextServicesFilter */
#define NS_ITEXTSERVICESFILTER_IID_STR "5bec321f-59ac-413a-a4ad-8a8d7c50a0d0"

#define NS_ITEXTSERVICESFILTER_IID \
  {0x5bec321f, 0x59ac, 0x413a, \
    { 0xa4, 0xad, 0x8a, 0x8d, 0x7c, 0x50, 0xa0, 0xd0 }}

class NS_NO_VTABLE nsITextServicesFilter : public nsISupports {
 public:

  NS_DECLARE_STATIC_IID_ACCESSOR(NS_ITEXTSERVICESFILTER_IID)

  /* boolean skip (in nsIDOMNode aNode); */
  NS_IMETHOD Skip(nsIDOMNode *aNode, bool *_retval) = 0;

};

  NS_DEFINE_STATIC_IID_ACCESSOR(nsITextServicesFilter, NS_ITEXTSERVICESFILTER_IID)

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSITEXTSERVICESFILTER \
  NS_IMETHOD Skip(nsIDOMNode *aNode, bool *_retval);

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSITEXTSERVICESFILTER(_to) \
  NS_IMETHOD Skip(nsIDOMNode *aNode, bool *_retval) { return _to Skip(aNode, _retval); }

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSITEXTSERVICESFILTER(_to) \
  NS_IMETHOD Skip(nsIDOMNode *aNode, bool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->Skip(aNode, _retval); }

#if 0
/* Use the code below as a template for the implementation class for this interface. */

/* Header file */
class nsTextServicesFilter : public nsITextServicesFilter
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSITEXTSERVICESFILTER

  nsTextServicesFilter();

private:
  ~nsTextServicesFilter();

protected:
  /* additional members */
};

/* Implementation file */
NS_IMPL_ISUPPORTS1(nsTextServicesFilter, nsITextServicesFilter)

nsTextServicesFilter::nsTextServicesFilter()
{
  /* member initializers and constructor code */
}

nsTextServicesFilter::~nsTextServicesFilter()
{
  /* destructor code */
}

/* boolean skip (in nsIDOMNode aNode); */
NS_IMETHODIMP nsTextServicesFilter::Skip(nsIDOMNode *aNode, bool *_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* End of implementation class template. */
#endif

#endif /* __gen_nsITextServicesFilter_h__ */


arr=[3,2,-1,3,2,0,-1]

st=int(input())

def trace(now):

    if now==5:
        print(f'{now}번')
        return

    trace(arr[now]+now)
    print(f'{now}번')

trace(st)


.include "asm/macros.inc"
	.include "main_02010FC4.inc"

	.text

	arm_func_start IsExclusiveItemIdForMonster
IsExclusiveItemIdForMonster: ; 0x02010FC4
	stmdb sp!, {r3, r4, r5, r6, r7, r8, sb, lr}
	mov sb, r0
	mov r8, r1
	mov r7, r2
	mov r6, r3
	bl GetItemCategory
	cmp r0, #0xf
	movne r0, #0
	ldmneia sp!, {r3, r4, r5, r6, r7, r8, sb, pc}
	cmp r8, #0x258
	mov r5, #0
	ble _02011000
	mov r0, r8
	bl FemaleToMaleForm
	mov r8, r0
_02011000:
	mov r0, sb
	bl GetExclusiveItemType
	movs r4, r0
	moveq r5, #0
	beq _0201108C
	sub r0, r4, #1
	mov r0, r0, lsl #0x10
	mov r0, r0, asr #0x10
	mov r0, r0, lsl #0x10
	mov r0, r0, lsr #0x10
	cmp r0, #3
	mov r0, sb
	bhi _0201104C
	bl GetExclusiveItemParameter
	and r0, r0, #0xff
	cmp r7, r0
	cmpne r6, r0
	moveq r5, #1
	b _0201108C
_0201104C:
	bl GetExclusiveItemParameter
	mov r6, r0
	cmp r4, #9
	bne _02011068
	cmp r8, r6
	moveq r5, #1
	b _0201108C
_02011068:
	cmp r4, #0xa
	bne _0201107C
	cmp r8, r6
	moveq r5, #1
	b _0201108C
_0201107C:
	mov r0, r8
	bl GetFamilyIndex
	cmp r6, r0
	moveq r5, #1
_0201108C:
	mov r0, r5
	ldmia sp!, {r3, r4, r5, r6, r7, r8, sb, pc}
	arm_func_end IsExclusiveItemIdForMonster

	arm_func_start IsExclusiveItemForMonster
IsExclusiveItemForMonster: ; 0x02011094
	stmdb sp!, {r3, lr}
	ldrb ip, [r0]
	tst ip, #1
	movne lr, #1
	moveq lr, #0
	tst lr, #0xff
	moveq r0, #0
	ldmeqia sp!, {r3, pc}
	tst ip, #8
	movne ip, #1
	moveq ip, #0
	tst ip, #0xff
	movne r0, #0
	ldmneia sp!, {r3, pc}
	ldrsh r0, [r0, #4]
	bl IsExclusiveItemIdForMonster
	ldmia sp!, {r3, pc}
	arm_func_end IsExclusiveItemForMonster

	arm_func_start BagHasExclusiveItemTypeForMonster
BagHasExclusiveItemTypeForMonster: ; 0x020110D8
	stmdb sp!, {r3, r4, r5, r6, r7, r8, sb, sl, fp, lr}
	mov sl, r0
	mov sb, r1
	mov r8, r2
	mov r7, r3
	bl GetCurrentBagCap


 &e%price%",
            "&9Owner: &e%owner%",
            "&9Members: &e%members%",
            "&9Max. number of members: &e%maxmembers%",
            "&9Regionkind: &e%regionkinddisplay% &7%regionkindregionkindgroupsdisplaywithbrackets%",
            "&9FlagGroup: &e%flaggroup%",
            "&9Landlord: &e%landlord% &7(Gets the money)",
            "&9EntityLimitGroup: &e%entitylimitgroup% &9isHotel: &e%ishotel%",
            "&9UserRestorable: &e%isuserrestorable% &9InactivityResetEnabled: &e%isinactivityreset%",
            "&9Owners last login: &e%lastownerlogin%",
            "&9InactivityReset in: &e%inactivityresetin-countdown-short%",
            "&9TakeOver possible in: &e%takeoverin-countdown-short%",
            "&9AutoRestore: &e%isautorestore% &9Autoprice: &e%autoprice%",
            "&9PaybackPercentage in %: &e%paypackpercentage%",
            "&9Protection of Continuance: &e%isprotectionofcontinuance%",
            "&9Allowed Subregions: &e%subregionlimit%",
            "&9Subregions: &e&e%subregions%"})
    public static List<String> REGION_INFO_SELLREGION;
    @Message(name = "RegionInfoRentregionUser", version = 5, message = {"&6=========[Region Info]=========",
            "&9ID: &e%regionid% &7(Type: &r%selltype%&7)",
            "&9Sold: &e%issold%",
            "&9Price: &e%price% &7per &e%extendtime-writtenout% &7max.: &e%maxextendtime-writtenout%",
            "&9Remaining time: &e%remainingtime-countdown-short%",
            "&9Owner: &e%owner%",
            "&9Members: &e%members%",
            "&9Max. number of members: &e%maxmembers%",
            "&9Regionkind: &e%regionkinddisplay% &7%regionkindregionkindgroupsdisplaywithbrackets%",
            "&9FlagGroup: &e%flaggroup%",
            "&9Landlord: &e%landlord% &7(Gets the money)",
            "&9EntityLimitGroup: &e%entitylimitgroup% &9isHotel: &e%ishotel%",
            "&9UserRestorable: &e%isuserrestorable% &9InactivityResetEnabled: &e%isinactivityreset%",
            "&9Owners last login: &e%lastownerlogin%",
            "&9InactivityReset in: &e%inactivityresetin-countdown-short%",
            "&9TakeOver possible in: &e%takeoverin-countdown-short%",
            "&9AutoRestore: &e%isautorestore% &9Autoprice: &e%autoprice%",
            "&9PaybackPercentage in %: &e%paypackpercentage%",
            "&9Protection of Continuance: &e%isprotectionofcontinuance%",
            "&9Allowed Subregions: &e%subregionlimit%",
            "&9Subregions: &e%subregions%"})
    public static List<String> REGION_INFO_RENTREGION;
    @Message(name = "RegionInfoContractregionUser", version = 5, message = {"&6=========[Region Info]=========",
            "&9ID: &e%regionid% &7(Type: &r%selltype%&7)",
            "&9Sold: &e%issold%",
            "&9Price: &e%price% &7per &e%extendtime-writtenout% &7(auto extend)",
            "&9Next extend in: &e%remainingtime-countdown-short%",
            "&9Owner: &e%owner%",


key")
    fun deleteByProjectSyncId(key: Long): Int

    @Query("DELETE FROM project_syncs_table")
    fun clear()
}package name.lmj0011.jetpackreleasetracker.helpers

import android.util.Xml
import com.vdurmont.semver4j.Semver
import com.vdurmont.semver4j.Semver.SemverType
import org.xmlpull.v1.XmlPullParser
import org.xmlpull.v1.XmlPullParserException
import java.io.IOException
import java.io.InputStream
import java.net.HttpURLConnection
import java.net.URL

class AndroidXReleasePuller {
    private lateinit var xLibrary: AndroidXLibrary
    private val ns: String? = null

    // Given a string representation of a URL, sets up a connection and gets
    // an input stream.
    @Throws(IOException::class)
    private fun downloadUrl(urlString: String): InputStream? {
        val url = URL(urlString)
        return (url.openConnection() as? HttpURLConnection)?.run {
            readTimeout = 10000
            connectTimeout = 15000
            requestMethod = "GET"
            doInput = true
            // Starts the query
            connect()
            inputStream
        }
    }

    @Throws(XmlPullParserException::class, IOException::class)
    fun parse(inputStream: InputStream): MutableMap<String, Map<String,String>> {
        inputStream.use { inputStream ->
            val parser: XmlPullParser = Xml.newPullParser()
            parser.setFeature(XmlPullParser.FEATURE_PROCESS_NAMESPACES, false)
            parser.setInput(inputStream, null)
            parser.nextTag()
            return readFeed(parser)
        }
    }

    @Throws(XmlPullParserException::class, IOException::class)
    private fun readFeed(parser: XmlPullParser): MutableMap<String, Map<String,String>> {
        var allArtifactsMap = mutableMapOf<String, Map<String,String>>() //sorry. :(

        parser.require(XmlPullParser.START_TAG, ns, xLibrary.packageName)
        while (parser.next() != XmlPullParser.END_TAG) {
            if (parser.eventType != XmlPullParser.START_TAG) {
                continue
            }
            // Starts by looking for the packageName tag
            when (parser.name) {
                in xLibrary.artifactNames -> {
                    val verMap = readArtifact(parser)
                    allArtifactsMap.put("${xLibrary.packageName}:${parser.name}", verMap)
                }
                else -> {
                    skip(parser)
                }
            }
        }

        return allArtifactsMap
    }

    @Throws(XmlPullParserException::class, IOException::class)
    private fun readArtifact(parser: XmlPullParser): Map<String, String> {
        parser.require(XmlPullParser.START_TAG, ns, parser.name)

        var versions = parser.getAttributeValue(null, "versions").split(',').toTypedArray()
        parser.next()
        return sortVersions(versions)
    }

    // skips tags we're not interested in
    @Throws(XmlPullParserException::class, IOException::class)
    private fun skip(parser: XmlPullParser) {
        if (parser.eventType != XmlPullParser.START_TAG) {
            throw IllegalStateException()
        }
        var depth = 1
        while (depth != 0) {
            when (parser.next()) {
                XmlPullParser.END_TAG -> depth--
                XmlPullParser.START_TAG -> depth++
            }
        }
    }

    // returns a Map of the latest version and "Stable" version
    private fun sortVersions(versions: Array<String>): Map<String, String> {
        val stableVersions = versions.filter {
            Semver(it, SemverType.LOOSE).isStable
        }.toTypedArray()

        val allVersions = versions.clone()

        stableVersions.sortWith(Comparator { s1, s2 ->
            when {


 Tag2 >
        , aux::cast1st_impl< shift_left_impl< Tag2,Tag2 >,Tag1, Tag2 >
        >::type
{
};

/// for Digital Mars C++/compilers with no CTPS/TTP support
template<> struct shift_left_impl< na,na >
{
    template< typename U1, typename U2 > struct apply
    {
        typedef apply type;
        BOOST_STATIC_CONSTANT(int, value  = 0);
    };
};

template< typename Tag > struct shift_left_impl< na,Tag >
{
    template< typename U1, typename U2 > struct apply
    {
        typedef apply type;
        BOOST_STATIC_CONSTANT(int, value  = 0);
    };
};

template< typename Tag > struct shift_left_impl< Tag,na >
{
    template< typename U1, typename U2 > struct apply
    {
        typedef apply type;
        BOOST_STATIC_CONSTANT(int, value  = 0);
    };
};

template< typename T > struct shift_left_tag
{
    typedef typename T::tag type;
};

template<
      typename BOOST_MPL_AUX_NA_PARAM(N1)
    , typename BOOST_MPL_AUX_NA_PARAM(N2)
    >
struct shift_left

    : shift_left_impl<
          typename shift_left_tag<N1>::type
        , typename shift_left_tag<N2>::type
        >::template apply< N1,N2 >::type
{
};

BOOST_MPL_AUX_NA_SPEC2(2, 2, shift_left)

}}

namespace boost { namespace mpl {
template<>
struct shift_left_impl< integral_c_tag,integral_c_tag >
{
    template< typename N, typename S > struct apply

        : integral_c<
              typename N::value_type
            , ( BOOST_MPL_AUX_VALUE_WKND(N)::value
                  << BOOST_MPL_AUX_VALUE_WKND(S)::value
                )
            >
    {
    };
};

}}

// Copyright Aleksey Gurtovoy 2000-2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//

// Preprocessed version of "boost/mpl/list_c.hpp" header
// -- DO NOT modify by hand!

namespace boost { namespace mpl {

template<
      typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX
    , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX
    , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX
    , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX
    , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX
    , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX
    , long C18 = LONG_MAX, long C19 = LONG_MAX
    >
struct list_c;

template<
      typename T
    >
struct list_c<
          T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
        >
    : list0_c<T>
{
    typedef typename list0_c<T>::type type;
};

template<
      typename T, long C0
    >
struct list_c<
          T, C0, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX
        , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX


d_actions':
          _$TweetLegacyLimitedActionsEnumMap[instance.limitedActions],
      'place': instance.place,
      'possibly_sensitive': instance.possiblySensitive,
      'possibly_sensitive_editable': instance.possiblySensitiveEditable,
      'quote_count': instance.quoteCount,
      'quoted_status_id_str': instance.quotedStatusIdStr,
      'quoted_status_permalink': instance.quotedStatusPermalink,
      'reply_count': instance.replyCount,
      'retweet_count': instance.retweetCount,
      'retweeted': instance.retweeted,
      'retweeted_status_result': instance.retweetedStatusResult,
      'scopes': instance.scopes,
      'self_thread': instance.selfThread,
      'user_id_str': instance.userIdStr,
    };

const _$TweetLegacyLimitedActionsEnumMap = {
  TweetLegacyLimitedActions.limitedReplies: 'limited_replies',
  TweetLegacyLimitedActions.nonCompliant: 'non_compliant',
  TweetLegacyLimitedActions.dynamicProductAd: 'dynamic_product_ad',
  TweetLegacyLimitedActions.staleTweet: 'stale_tweet',
  TweetLegacyLimitedActions.communityTweetNonMemberPublicCommunity:
      'community_tweet_non_member_public_community',
  TweetLegacyLimitedActions.communityTweetNonMemberClosedCommunity:
      'community_tweet_non_member_closed_community',
  TweetLegacyLimitedActions.$unknown: r'$unknown',
};
// GENERATED CODE - DO NOT MODIFY BY HAND

part of 'timeline_clear_cache.dart';

// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************

TimelineClearCache _$TimelineClearCacheFromJson(Map<String, dynamic> json) =>
    TimelineClearCache(
      type: InstructionType.fromJson(json['type'] as String),
    );

Map<String, dynamic> _$TimelineClearCacheToJson(TimelineClearCache instance) =>
    <String, dynamic>{
      'type': _$InstructionTypeEnumMap[instance.type]!,
    };

const _$InstructionTypeEnumMap = {
  InstructionType.timelineAddEntries: 'TimelineAddEntries',
  InstructionType.timelineAddToModule: 'TimelineAddToModule',
  InstructionType.timelineClearCache: 'TimelineClearCache',
  InstructionType.timelinePinEntry: 'TimelinePinEntry',
  InstructionType.timelineReplaceEntry: 'TimelineReplaceEntry',
  InstructionType.timelineShowAlert: 'TimelineShowAlert',
  InstructionType.timelineTerminateTimeline: 'TimelineTerminateTimeline',
  InstructionType.timelineShowCover: 'TimelineShowCover',
  InstructionType.$unknown: r'$unknown',
};
// GENERATED CODE - DO NOT MODIFY BY HAND

part of 'tweet_client.dart';

// **************************************************************************
// RetrofitGenerator
// **************************************************************************

// ignore_for_file: unnecessary_brace_in_string_interps,no_leading_underscores_for_local_identifiers,unused_element

class _TweetClient implements TweetClient {
  _TweetClient(
    this._dio, {
    this.baseUrl,
    this.errorLogger,
  });

  final Dio _dio;

  String? baseUrl;

  final ParseErrorLogger? errorLogger;

  @override
  Future<dynamic> getBookmarks({
    required dynamic variables,
    required dynamic features,
    String pathQueryId = 'QUjXply7fA7fk05FRyajEg',
  }) async {
    final _extra = <String, dynamic>{};
    final queryParameters = <String, dynamic>{
      r'variables': variables.toJson(),
      r'features': features.toJson(),


from typing import List

import streamlit as st

from .. import extra

@extra
def format_word_importances(words: List[str], importances: List[float]) -> str:
    """Adds a background color to each word based on its importance (float from -1 to 1)

    Args:
        words (list): List of words
        importances (list): List of importances (scores from -1 to 1)

    Returns:
        html (str): HTML string with formatted word

    """
    if importances is None or len(importances) == 0:
        return "	"
    assert len(words) == len(importances), "Words and importances but be of same length"

    tags = [""]
    for word, importance in zip(words, importances[: len(words)]):
        color = _get_color(importance)
        unwrapped_tag = (
            ' {word}            '
            "        ".format(color=color, word=word)
        )
        tags.append(unwrapped_tag)
    tags.append("	")
    return "".join(tags)

def _get_color(importance: float) -> str:
    # clip values to prevent CSS errors (Values should be from [-1,1])
    importance = max(-1, min(1, importance))
    if importance > 0:
        hue = 120
        sat = 75
        lig = 100 - int(50 * importance)
    else:
        hue = 0
        sat = 75
        lig = 100 - int(-40 * importance)
    return "hsl({}, {}%, {}%)".format(hue, sat, lig)

def example():
    text = (
        "Streamlit Extras is a library to help you discover, learn, share and"
        " use Streamlit bits of code!"
    )
    html = format_word_importances(
        words=text.split(),
        importances=(
            0.1,
            0.2,
            0,
            -1,
            0.1,
            0,
            0,
            0.2,
            0.3,
            0.8,
            0.9,
            0.6,
            0.3,
            0.1,
            0,
            0,
            0,
        ),  # fmt: skip
    )
    st.write(html, unsafe_allow_html=True)

__title__ = "Word importances"
__desc__ = "Highlight words based on their importances. Inspired from captum library."
__icon__ = "❗"
__examples__ = [example]
__author__ = "Arnaud Miribel"
__playground__ = True


int i = 0; i < stmt_num; i++) {
                //     if (status_queue[i] != 1)
                //         unexecuted_stmt_txn[tid_queue[i]]++;
                //     last_stmt_idx_txn[tid_queue[i]] = i;
                // }
                // // get the txn that has least unexecuted stmts
                // int least_stmt_txn = 0;
                // int least_stmt = -1;
                // for (int i = 0; i < trans_num; i++) {
                //     // some txn has executed all stmts, we only focus on that not executed all
                //     if (unexecuted_stmt_txn[i] <= 1) // if only commit (or abort) stmt not executed, do not target on them
                //         continue;
                //     if (least_stmt == -1 || unexecuted_stmt_txn[i] < least_stmt) {
                //         least_stmt = unexecuted_stmt_txn[i];
                //         least_stmt_txn = i;
                //     }
                // }
                // // replace the unexecuted stmt with SPACE_HOLDER_STMT
                // cerr << RED << "target txn: " << least_stmt_txn << " stmt_num: " << least_stmt << RESET << endl;
                // int replace_num = 0;
                // for (int i = 0; i < stmt_num; i++) {
                //     if (tid_queue[i] != least_stmt_txn)
                //         continue;
                //     if (status_queue[i] == 1) // do not change the executed stmt
                //         continue;
                //     if (last_stmt_idx_txn[least_stmt_txn] == i) // do not change commit or abort
                //         continue;
                //     stmt_queue[i] = make_shared<txn_string_stmt>((prod *)0, SPACE_HOLDER_STMT);
                //     stmt_use[i].stmt_type = INIT_TYPE;
                //     replace_num++;
                // }
                // cerr << "replace " << replace_num << " stmts" << endl;
            }
        }
        executed = new_executed;
    }

    for (int i = 0; i < stmt_num; i++) {
        if (status_queue[i] == 1)
            continue;

        cerr << RED << "something error, some stmt is still not executed" << RESET << endl;
        throw runtime_error("some stmt is still not executed");
    }

    if (real_stmt_queue.size() != stmt_num) {
        cerr << "real_stmt_queue size: " << real_stmt_queue.size() << endl;
        cerr << "stmt_num: " << stmt_num << endl;
        cerr << "real_stmt_queue size is not equal to stmt_queue size, something wrong" << endl;
        throw runtime_error("real_stmt_queue size is not equal to stmt_queue size, something wrong");
    }

    // collect database information
    dut_get_content(test_dbms_info, trans_db_content);
}

void transaction_test::save_test_case(string dir_name,
                                        string prefix,
                                        vector<shared_ptr<prod>>& tar_stmt_queue,
                                        vector<int>& tar_tid_queue,
                                        vector<stmt_usage>& tar_usage_queue)
{
    cerr << RED << "Saving test cases..." << RESET;
    // save stmt queue
    string stmts_file = dir_name + prefix + "_stmts.sql";
    ofstream stmt_output(stmts_file);
    int queue_lengtgh = tar_stmt_queue.size();
    for (int


:auto}[dir=rtl] .side-by-side__right{direction:rtl;flex:1 1 auto;overflow:auto}[dir=rtl] .tree__ctrl{overflow:hidden}.gutter{background:#eceff1 no-repeat 50%}.gutter:hover{cursor:ew-resize}.gutter-horizontal{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAeCAYAAADkftS9AAAAIklEQVQoU2M4c+bMfxAGAgYYmwGrIIiDjrELjpo5aiZeMwF+yNnOs5KSvgAAAABJRU5ErkJggg==)}.tree__ctrl{background:hsla(0,0%,94%,.2);border-top:1px solid #eceff1;display:flex;flex-wrap:wrap}.tree__filter,.tree__filter-marks,.tree__sorter{padding:0 16px;position:relative;white-space:nowrap}.tree__strut{flex:1}.tree__empty{border-top:1px solid #eceff1;padding:8px 0 0 15px}.tree .pane__controls{display:flex}.tree__download,.tree__info{color:#000;cursor:pointer;opacity:.7;padding:7px}.tree__download:hover,.tree__info:hover{opacity:1}.marks-toggle__items{display:block;-webkit-user-select:none;-ms-user-select:none;user-select:none;word-break:break-word}.marks-toggle__item{cursor:pointer;display:inline-block;padding:5px 0;white-space:nowrap}.y-label-mark{background:#97cc64;color:#fff;padding:2px 4px 2px 5px}.n-label-mark,.y-label-mark{border-radius:3px;letter-spacing:1px;vertical-align:baseline}.n-label-mark{border:1px solid;font-weight:700;padding:1px 3px 1px 4px}.search__container{float:right;max-width:350px;width:100%}.search__input{background:no-repeat right 8px center;border:1px solid #e5e5e5;display:inline-block;font-size:.8em;height:32px;line-height:20px;padding:0 30px 0 10px;width:100%}.search__input:hover{border-color:#888}.search__input:focus{border-color:#51a7e8;box-shadow:inset 0 1px 2px rgba(0,0,0,.075),0 0 5px rgba(81,167,232,.5);outline:none}.sorter{color:#999;overflow:hidden;-webkit-user-select:none;-ms-user-select:none;user-select:none}.sorter_enabled{color:#000}.sorter__item{cursor:pointer;display:inline-block;padding-right:16px}.status-toggle__items{display:block;-webkit-user-select:none;-ms-user-select:none;user-select:none;word-break:break-word}.status-toggle__item{cursor:pointer;display:inline-block;padding:5px 0;white-space:nowrap}.y-label{border-radius:3px;color:#fff;letter-spacing:1px;padding:2px 4px 2px 5px;vertical-align:baseline}.y-label_status_failed{background:#fd5a3e}.y-label_status_broken{background:#ffd050}.y-label_status_passed{background:#97cc64}.y-label_status_skipped{background:#aaa}.y-label_status_unknown{background:#d35ebe}.n-label{border:1px solid;border-radius:3px;font-weight:700;letter-spacing:1px;padding:1px 3px 1px 4px;vertical-align:baseline}.n-label_status_failed{color:#fd5a3e}.n-label_status_broken{color:#ffd050}.n-label_status_passed{color:#97cc64}.n-label_status_skipped{color:#aaa}.n-label_status_unknown{color:#d35ebe}.n-label_status_failed{border-color:#fd5a3e


assign Player Team" message, this behavior means we'll stubbornly wait for a response to
          the team message before acknowledging any players, allowing the GC to easily resolve the race (in this case,
          by canceling or retrying any attempted add-player-match actions)

   == Gameserver Crashes
      - If GC is available, it handles it, otherwise, match is lost.  Gameservers don't currently try to persist this
        state.

   == Match empties out
      - If the match is still going, it should reach ended as everyone in it gets timed out as an abandon.
      - If the GC is around, it will revoke the lobby once we inform it everyone has dropped.
      - Once the match is marked ended, and the GC concurs and deletes the lobby, we delete MatchInfo
        - If the GC is not around, we hang out on the completed match state until it is.  We can't exactly take new
          matches in the mean time. (but, see k_InvalidState_Timeout_With_Match)

\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\////////////////////////////////////////////////////////////
***********************************************************************************************************************/

static const char g_pszIdleKickString[] = "#TF_Idle_kicked";

//ConVar dota_force_upload_match_stats( "dota_force_upload_match_stats", "0", FCVAR_CHEAT, "If enabled, server will upload match stats even when there aren't human players on each side" );
//extern ConVar dota_force_bot_cycle;
extern CServerGameDLL g_ServerGameDLL;

// How long a player can be missing from a MM match before they are dropped and given an abandon. Set to -1 to disable.
ConVar tf_mm_player_disconnect_time_before_abandon( "tf_mm_player_disconnect_time_before_abandon", "180", FCVAR_DEVELOPMENTONLY );
// How quickly we should forgive a match player's disconnected time after they return. At a ratio of 10, 30 minutes of
// connected time would cancel out 3 minutes of disconnected type. Set to 0 to disable.
ConVar tf_mm_player_disconnect_time_forgive_ratio( "tf_mm_player_disconnect_time_forgive_ratio", "10", FCVAR_DEVELOPMENTONLY );
// Any disconnect, no matter for how long, should count as this many seconds of disconnected time. This is because the
// act of reconnecting can be more disruptive than just the absense -- ready-up timers reset, the game may
// pause/unpause, etc..
//
// Currently at 90 -- two rapid rejoins in a row, even with instant loading, will eat up your DC allowance.  Note that
// if you take at least 90s to rejoin/load anyway, this would have no effect.
ConVar tf_mm_player_disconnect_time_minimum_penalty( "tf_mm_player_disconnect_time_minimum_penalty", "90", FCVAR_DEVELOPMENTONLY );

ConVar tf_mm_next_map_result_hold_time( "tf_mm_next_map_result_hold_time", "7" );

ConVar tf_mvm_allow_abandon_after_seconds( "tf_mvm_allow_abandon_after_seconds", "600", FCVAR_DEVELOPMENTONLY );
ConVar tf_mvm_allow_abandon_below_players( "tf_mvm_allow_abandon_below_players", "5", FCVAR_DEVELOPMENTONLY );

ConVar tf_allow_server_hibernation( "tf_allow_server_hibernation", "1", FCVAR_NONE, "Allow the server to hibernate when empty." );

#ifdef STAGING_ONLY
ConVar tf_debug_xp_changes( "tf_debug_xp_changes", "0" );
#endif

//DEFINE_LOGGING_CHANNEL_NO_TAGS( LOG_CONSOLE, "Console" );

static CTFGCServerSystem s_TFGCServerSystem;
CTFGCServerSystem *GTFGCClientSystem() { return &s_TFGCServerSystem; }

//bool g_bServerReceivedGCWelcome = false;
int g_gcServerVersion = 0; // Version from the GC

static boo


07

###

他的女人就该与他，顶天同立，执手同行，比肩而坐，相守以共。 c:243

###

得流芳千古，臣何惧遗臭万年……愿只愿——吾皇万岁！万岁！万万岁！”
  c:102

### 番外三

从前的事情她没有办法能够改变重来，她唯一能够做的，便是忘记心头的伤恨，握紧手中的挚爱，一生一世为了她所爱的人们去好好地活着。 c:38

### 番外四

淡至极致，情至浓时。    她只愿待她年老之时，亦能与他白首相望、 c:39

但真正令她动容的，却不仅仅是他这藏了许久的心意，而是二位老人竟然允让了他的这一念头。    抛去国仇家恨，这江山天下浸染了二人的鲜血汗水，而二人竟能够如此坦然地重割疆土与前朝敌国皇嗣，若非是深知他对她的爱，又怎会如此豁达和包容？ c:20

### 番外五

从懂事开始，她便被严澈教导不可轻信长得好看的男人，尤其是长得好看却没什么本事的男人，因其十之八九定是为了骗她家财的——严澈可是打算将严氏家业尽数传给这个有着精明头脑的宝贝女儿的，作为一个白手起家的商人，他决不能容忍自己半辈子的心血和基业毁于贪色 c:20

一个男人面对一个女人，身后是要有多深厚的家学与底气，才能做出此等反应？ c:30

他从不去琢磨对方中意什么而曲意逢迎，更不屑以死缠烂打令对方屈从。他向来要的是女人对他的由衷爱慕，要的是为他此人所折服，要的是心甘情愿一往情深。 c:26

“不知北地雪大若此。” c:36

“世间难得两全之事，全在取舍之间。” c:106

而她对他的一片心意，亦是被埋藏于那轻描淡写的轻而易举之中，不曾令人深觉。 c:21

至是方知，那本以为是说易行难的一个词，落在有情之人心间，亦非什么了不得的事情。 c:92

### 番外六

上林苑间的苍翠高木之下，宽宽马道上满是斑驳枝影。春风和煦，鸟儿轻鸣，天空湛蓝无云。 c:27

等你多久，都不要紧。哪怕是一辈子，


Note: this frequency must be less than a quarter of the active target clock
	W	2 bytes

AVR8_PHY_XM_JTAG_CLK
JTAG clock frequency (kHz) for programming and debugging AVR XMEGA

Note: this frequency is limited by the target silicon itself
	W	2 bytes

AVR8_PHY_XM_PDI_CLK
PDI clock frequency (kHz) for programming and debugging AVR XMEGA

Note: this frequency is limited by the target silicon itself
	W	2 bytes

AVR8_CTXT_DEVICE	 	see tables below for family specific contexts	W

AVR8_CTXT_OPTIONS	AVR8_OPT_RUN_TIMERS	Run timers in stopped mode.
                                    This option allows timers to continue to run even when the device has entered stopped mode.
                                    This is especially useful for maintaining PWM output values for example in motor control applications.
                                    Note that timer interrupts will NOT be serviced until RUN mode is entered.  (Not available in AVR XMEGA)
                                	W	1 byte

AVR8_OPT_DISABLE_DBP	Disables data breaks when resetting.
                                    Used internally to prevent variable initialisation routines from triggerring data breakpoints.	W	1 byte

AVR8_OPT_ENABLE_IDR	Enables messages from the target core.
                                IDR messages can be sent from some target types by writing to the OCD data register during RUN mode.
                                When this option is enabled, these data values will be routed to USB EVENT messages.	W	1byte

AVR8_OPT_POLL_INT	Adjusts how often the debugger polls the target's state. Value
                                    given as polling interval in ms. Possible values: 1, 5, 10, 20, 50
                                    and 100.	W	1byte

AVR8_CTXT_SESSION	AVR8_SESS_MAIN_PC (deprecated)	Program counter value [word address] of main() function	W	4 bytes

AVR8_CTXT_TEST	AVR8_TEST_TGT_RUNNING
Actively polls the targets RUN/STOP state.

0x00 = STOPPED

0x01 = RUNNING
	R	1 byte

Device context: debugWIRE targets

<div xmlns="http://www.w3.org/199


ring content =
                  'alipay: ${await AlipayKitPlatform.instance.isInstalled()}';
              _showTips('环境检查', content);
            },
          ),
          ListTile(
            title: Text('支付'),
            onTap: () {
              final Map<String, dynamic> bizContent = <String, dynamic>{
                'timeout_express': '30m',
                'product_code': 'QUICK_MSECURITY_PAY',
                'total_amount': '0.01',
                'subject': '1',
                'body': '我是测试数据',
                'out_trade_no': '123456789',
              };
              final Map<String, dynamic> orderInfo = <String, dynamic>{
                'app_id': _ALIPAY_APPID,
                'biz_content': json.encode(bizContent),
                'charset': 'utf-8',
                'method': 'alipay.trade.app.pay',
                'timestamp': '2016-07-29 16:55:53',
                'version': '1.0',
              };
              AlipayKitPlatform.instance.unsafePay(
                orderInfo: orderInfo,
                signType: _ALIPAY_USE_RSA2
                    ? UnsafeAlipayKitPlatform.SIGNTYPE_RSA2
                    : UnsafeAlipayKitPlatform.SIGNTYPE_RSA,
                privateKey: _ALIPAY_PRIVATEKEY,
              );
            },
          ),
          ListTile(
            title: Text('授权'),
            onTap: () {
              AlipayKitPlatform.instance.unsafeAuth(
                appId: _ALIPAY_APPID,
                pid: _ALIPAY_PID,
                targetId: _ALIPAY_TARGETID,
                signType: _ALIPAY_USE_RSA2
                    ? UnsafeAlipayKitPlatform.SIGNTYPE_RSA2
                    : UnsafeAlipayKitPlatform.SIGNTYPE_RSA,
                privateKey: _ALIPAY_PRIVATEKEY,
              );
            },
          ),
        ],
      ),
    );
  }

  void _showTips(String title, String content) {
    showDialog<void>(
      context: context,
      builder: (BuildContext context) {
        return AlertDialog(
          title: Text(title),
          content: Text(content),
        );
      },
    );
  }
}
import 'package:flutter/material.dart';
import 'package:flutter_hooks/flutter_hooks.dart';
import 'package:hooks_riverpod/hooks_riverpod.dart';
import 'package:reactor_wallet/dialogs/insufficient_funds.dart';
import 'package:reactor_wallet/dialogs/transaction_error.dart';
import 'package:reactor_wallet/dialogs/transaction_sent.dart';
import 'package:reactor_wallet/utils/accounts/base_account.dart';
import 'package:reactor_wallet/utils/state/account.dart';
import 'package:reactor_wallet/utils/state/providers.dart';

import 'package:reactor_wallet/utils/theme.dart';
import 'package:reactor_wallet/utils/accounts/wallet_account.dart';

/*
 * Ask the user to confirm the transactio
 */
Future<void> confirmTransactionDialog(
  BuildContext context,
  Transaction transaction,
  WalletAccount walletAccount,
) async {
  return showDialog<void>(
    context: context,
    builder: (BuildContext context) {
      return HookConsumer(


te.ui.equip_window[env][characterName].reduce((p,x)=>(p + getters.getUserItem(x).effectValueOf(paramName)), 0)
      const defaultParameter = Constants.character.defaultParameters[characterName][paramName];
      return equipParameter + defaultParameter;
    },
    getCharacterStrength: (state, getters) => (characterId, paramName, isCurrent) => {
      const sourceParamNames = paramName == 'atk' ? ['str', 'dex'] : ['def', 'agi'];
      const params = sourceParamNames.map(p=>getters.getCharacterParameter(characterId, p, isCurrent));
      return Math.floor((params[0] + params[1]) / 2) + Math.min(params[0], params[1]);
    },
    getCharacterStrengthDiff: (state, getters) => (characterId, paramName) => {
      return getters.getCharacterStrength(characterId, paramName, true) - getters.getCharacterStrength(characterId, paramName, false);
    },
    getCurrentDungeon: (state) => {
      //このスタブもnull安全演算子があれば回避できるんだけどなあ
      return state.masterdata.dungeons[state.user.status.current_dungeon_id] || {};
    }
  },
  mutations: {
    // ui系
    moveCharacter(state, payload) {
      state.ui.position[payload.characterName] += payload.delta * state.ui.direction[payload.characterName];
    },
    reflectCharacter(state, payload) {
      state.ui.direction[payload.characterName] *= -1;
    },
    updateWindowShowState(state, payload){
      state.ui.window[payload.windowName] = payload.state;
    },
    //こいつは簡便化のためにpayloadを直接代入
    updateGuide(state, payload){
      state.ui.guide = payload;
    },
    updateSelectingItemId(state, payload){
      state.ui.equip_window.selecting_item_id = payload;
    },
    initializeEquipWindow(state){
      ["spica", "tirol"].forEach(characterName=>{
        state.ui.equip_window.draft[characterName] = state.user.equips[characterName];
        state.ui.equip_window.initial[characterName] = state.user.equips[characterName];
      });
    },
    changePage(state, payload){
      let page = state.ui.equip_window.current_page;
      page += payload;
      const maxPage = Math.ceil(Object.keys(state.user.items).length / Constants.itemsPerPage);
      if(page > maxPage){
        page = maxPage;
      }
      if(page < 1){
        page = 1;
      }
      state.ui.equip_window.current_page = page;
    },
    syncEquipDraft(state){
      ["spica", "tirol"].forEach(characterName=>{
        state.user.equips[characterName] = state.ui.equip_window.draft[characterName];
      });
    },
    removeEquip(state, payload){
      const characterName = [null, "spica", "tirol"][payload.characterId];
      state.ui.equip_window.draft[characterName] = state.ui.equip_window.draft[characterName].filter(i=>i!==payload.itemId)
    },
    attachEquip(state, payload){
      const characterName = [null, "spica", "tirol"][payload.characterId];
      if(state.ui.equip_window.draft[characterName].length >= Constants.maxEquipCount){
        return;
      }
      state.ui.equip_window.draft[characterName] = state.ui.equip_window.draft[characterName].concat(payload.


绿化、桥梁道路、照明亮化、体育卫生、经营服务设施和其他相关设施。

第四十六条 本条例自2018年10月1日起施行。# 洛阳市人民代表大会及其常务委员会地方立法程序规定

2001年3月１日 洛阳市第十一届人民代表大会第三次会议通过

2001年3月30日 河南省第九届人民代表大会常务委员会第二十一次会议批准

<!-- INFO END -->

## 第一章　总则

第一条 为了规范地方立法活动，保障和发展社会主义民主，维护社会主义法制统一，根据《中华人民共和国地方各级人民代表大会和地方各级人民政府组织法》和《中华人民共和国立法法》，结合本市实际，制定本规定。

第二条 本规定所称地方性法规，是指市人民代表大会及其常务委员会依照法定权限和程序通过并报经省人民代表大会常务委员会批准后公布施行、在本行政区域内具有法律效力的条例、规定、办法等规范性文件。

第三条 地方性法规的制定、修改和废止，适用本规定。

第四条 地方立法应当从本行政区域的具体情况和实际需要出发，并遵循不与宪法、法律、行政法规和本省的地方性法规相抵触的原则。

地方立法应当充分发扬民主，深入调查研究，广泛听取各方面的意见和建议。

第五条 规定本行政区域特别重大事项的地方性法规，应当由市人民代表大会通过。

第六条 市人民代表大会常务委员会应当编制本届地方立法规划和年度地方立法计划，经常务委员会主任会议同意，并报省人民代表大会常务委员会。

因特殊情况确需变更地方立法项目的，应当说明理由，经常务委员会主任会议同意，报省人民代表大会常务委员会。

## 第二章　地方性法规案的提出

第七条 市人民代表大会主席团可以向市人民代表大会提出地方性法规案，由市人民代表大会会议审议。

市人民代表大会常务委员会、市人民政府、市中级人民法院、市人民检察院、市人民代


;
  margin-top: 6px;
}

/* @end */

/* @end */

/* @group Lists */

.horizontal > * + * {
  margin-left: 9px; /* LTR */
  padding-left: 9px; /* LTR */
}

.views-ui-view-title {
  font-weight: bold;
}

/* @end */

/* @group Messages */

.view-changed {
  margin-bottom: 21px;
}

/* @end */

/* @group Headings */

/* Intentionally targeting h1 */
.views-admin h1.unit-title {
  font-size: 15px;
  line-height: 1.6154;
  margin-bottom: 0;
  margin-top: 18px;
}

/* @end */

/* @group Tables */

table td,
table th {
  vertical-align: top;
}

/* @end */

/* @group List views */

/* These header classes are ambiguous and should be scoped to th elements */

th.views-ui-name {
  width: 18%;
}

th.views-ui-description {
  width: 26%;
}

th.views-ui-tag {
  width: 8%;
}

th.views-ui-path {
  width: auto;
}

th.views-ui-operations {
  width: 24%;
}

/* @end */

/* @group Add view */

/**
 * Drupal core forces AJAX triggering elements to float left when they are
 * disabled due to AJAX processing. On the add view page, we have inline
 * containers where we don't want that behavior; it causes the select dropdown
 * which is triggered to jump to the left while the AJAX throbber is active.
 *
 * See also http://drupal.org/node/769936 (Drupal core issue); when that is
 * fixed it may no longer be necessary to do this.
 */
.views-admin .container-inline .progress-disabled {
  float: none;
}

/**
 * I wish this didn't have to be so specific
 */
.form-item-description-enable + .form-item-description {
  margin-top: 0;
}

.form-item-description-enable label {
  font-weight: bold;
}

.form-item-page-create,
.form-item-block-create {
  margin-top: 13px;
}

.form-item-page-create label,
.form-item-block-create label {
  font-weight: bold;
}

/* This makes the form elements after the "Display Format" label flow underneath the label */
.form-item-page-style-style-plugin > label,
.form-item-block-style-style-plugin > label {
  display: block;
}

.views-attachment .options-set label {
  font-weight: normal;
}

/* @end */

/* @group Rearrange filters
 *
 * Styling for the form that allows views filters to be rearranged.
 */

.group-populated {
  display: none;
}

td.group-title {
  font-weight: bold;
}

.views-ui-dialog td.group-title {
  margin: 0;
  padding: 0;
}

.views-ui-dialog td.group-title span {
  display: block;
  height: 1px;
  overflow: hidden;
}

.group-message .form-submit,
.views-remove-group-link,
#views-add-group {
  float: right;
  clear: both;
}

.views-operator-label {
  font-style: italic;
  font-weight: bold;
  padding-left: 0.5em; /* LTR */
  text-transform: uppercase;
}

.grouped-description,
.exposed-description {
  float: left;
  padding-top: 3px;
  padding-right: 10px;
}

/* This keeps the collapsible fieldsets of op


	p {
		font-family: var(--quote--font-family);
		font-size: var(--quote--font-size);
		font-style: var(--quote--font-style);
		font-weight: var(--quote--font-weight);
		line-height: var(--quote--line-height);
	}

	strong {
		font-weight: var(--quote--font-weight-strong);
	}

	&:before {
		content: "\201C";
		font-size: var(--quote--font-size);
		line-height: var(--quote--line-height);
		left: calc(-0.5 * var(--global--spacing-horizontal));
	}

	.wp-block-quote__citation {
		color: var(--global--color-primary);
		font-size: var(--global--font-size-xs);
		font-style: var(--quote--font-style-cite);

		.has-background &,
		[class*="background-color"] &,
		[style*="background-color"] &,
		.wp-block-cover[style*="background-image"] & {
			color: currentColor;
		}
	}

	&.has-text-align-right {
		margin: var(--global--spacing-vertical) var(--global--spacing-horizontal) var(--global--spacing-vertical) auto;
		padding-right: 0;
		border-right: none;

		// Hide the left aligned quote.
		&:before {
			display: none;
		}

		// Align the quote left of the text.
		p:before {
			content: "\201D";
			font-size: var(--quote--font-size);
			font-weight: normal;
			line-height: var(--quote--line-height);
			margin-right: 5px;
		}
	}

	&.has-text-align-center {
		margin: var(--global--spacing-vertical) auto;

		&:before {
			display: none;
		}
	}

	&.is-large,
	&.is-style-large {
		padding-left: 0;

		/* Resetting margins to match _block-container.scss */
		margin-top: var(--global--spacing-vertical);
		margin-bottom: var(--global--spacing-vertical);

		p {
			font-size: var(--quote--font-size-large);
			font-style: var(--quote--font-style-large);
			line-height: var(--quote--line-height-large);
		}

		&:before {
			font-size: var(--quote--font-size-large);
			line-height: var(--quote--line-height-large);
			left: calc(-1 * var(--global--spacing-horizontal));
		}

		&.has-text-align-right {

			// Hide the left aligned quote.
			&:before {
				display: none;
			}

			// Align the quote left of the text.
			p:before {
				content: "\201D";
				font-size: var(--quote--font-size-large);
				font-weight: normal;
				line-height: var(--quote--line-height-large);
				margin-right: 10px;
			}
		}

		@include media(mobile-only) {
			padding-left: var(--global--spacing-horizontal);

			&:before {
				left: 0;
			}

			&.has-text-align-right {
				padding-left: 0;
				padding-right: var(--global--spacing-horizontal);

				&:before {
					right: 0;
				}
			}
		}
	}

	@include media(mobile-only) {
		padding-left: calc(0.5 * var(--global--spacing-horizontal));

		&:before {
			left: 0;
		}

		&.has-text-align-right {
			padding-left: 0;


iv .e-gallerycontent,.e-ribbon .e-resizediv .e-gallexpandcontent{background:#fff;border-color:#cecece}.e-ribbon.e-rtl .e-groupdiv .e-gallerycontent{border-right-color:#cecece}.e-ribbon .e-groupdiv .e-gallscrollcontent .e-content,.e-ribbon .e-resizediv .e-gallscrollcontent .e-content{background:#fff}.e-ribbon .e-groupdiv .e-gallerymovediv,.e-ribbon .e-resizediv .e-gallerymovediv,.e-ribbon .e-groupdiv .e-gallexpandcontent,.e-ribbon .e-resizediv .e-gallexpandcontent{background:#fff}.e-ribbon .e-groupdiv .e-extracontent,.e-ribbon .e-resizediv .e-extracontent{border-top-color:#cecece}.e-ribbon .e-groupdiv .e-moveupdiv,.e-ribbon .e-groupdiv .e-movedowndiv,.e-ribbon .e-groupdiv .e-expgallerydiv,.e-ribbon .e-resizediv .e-moveupdiv,.e-ribbon .e-resizediv .e-movedowndiv,.e-ribbon .e-resizediv .e-expgallerydiv{border-color:#cecece}.e-ribbon.e-js .e-groupdiv .e-rbn-button.e-gallerybtn,.e-ribbon.e-js .e-resizediv .e-rbn-button.e-gallerybtn{background:#fff !important;border-color:#fff}.e-ribbon .e-groupdiv .e-rbn-button.e-galleryextrabtn,.e-ribbon .e-resizediv .e-rbn-button.e-galleryextrabtn,.e-ribbon.e-js .e-groupdiv .e-extracontent .e-menu,.e-ribbon.e-js .e-resizediv .e-extracontent .e-menu{background:#fff;color:#333}.e-ribbon.e-js .e-gallerymenu a{color:#333}.e-ribbon .e-groupdiv .e-rbn-button.e-galleryextrabtn:hover,.e-ribbon .e-resizediv .e-rbn-button.e-galleryextrabtn:hover{background:#f4f4f4;background:-moz-linear-gradient(top,#f4f4f4,#e9e9e9);background:-webkit-gradient(linear,left top,left bottom,color-stop(0%,#f4f4f4),color-stop(100%,#e9e9e9));background:-webkit-linear-gradient(top,#f4f4f4,#e9e9e9);background:-o-linear-gradient(top,#f4f4f4,#e9e9e9);background:-ms-linear-gradient(top,#f4f4f4,#e9e9e9);background:linear-gradient(to bottom,#f4f4f4,#e9e9e9);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#f4f4f4',endColorstr='#e9e9e9',GradientType=0)}.e-ribbon.e-js .e-groupdiv .e-rbn-button.e-galleryselect,.e-ribbon.e-js .e-resizediv .e-rbn-button.e-galleryselect{box-shadow:none;border-color:#3277b2}.e-ribbon.e-js .e-groupdiv .e-rbn-button.e-gallerybtn:hover,.e-ribbon.e-js .e-resizediv .e-rbn-button.e-gallerybtn:hover{border-color:#f4f4f4;color:#333;background:#fff}.e-ribbon .e-groupdiv .e-gallerymovediv>div:hover,.e-ribbon .e-resizediv .e-gallerymovediv>div:hover{border-color:#3277b2}.e-ribbon .e-groupdiv .e-gallerymovediv>div:ho


b mod FPU CPACR;
    0xE000_ED88 0x20 0x0000_0000
    RReg WReg;
    /// Access privileges for coprocessor 11.
    CP11 { 22 2 RRRegField WWRegField }
    /// Access privileges for coprocessor 10.
    CP10 { 20 2 RRRegField WWRegField }
}

reg! {
    /// Floating-point context control register.
    pub mod FPU FPCCR;
    0xE000_EF34 0x20 0xC000_0000
    RReg WReg;
    /// When this bit is set to 1, execution of a floating-point instruction
    /// sets the CONTROL.FPCA bit to 1.
    ASPEN { 31 1 RRRegField WWRegField }
    /// Enables lazy context save of FP state.
    LSPEN { 30 1 RRRegField WWRegField }
    /// Indicates whether the software executing when the processor allocated
    /// the FP stack frame was able to set the DebugMonitor exception to
    /// pending.
    MONRDY { 8 1 RRRegField }
    /// Indicates whether the software executing when the processor allocated
    /// the FP stack frame was able to set the BusFault exception to pending.
    BFRDY { 6 1 RRRegField }
    /// Indicates whether the software executing when the processor allocated
    /// the FP stack frame was able to set the MemManage exception to pending.
    MMRDY { 5 1 RRRegField }
    /// Indicates whether the software executing when the processor allocated
    /// the FP stack frame was able to set the HardFault exception to pending.
    HFRDY { 4 1 RRRegField }
    /// Indicates the processor mode when it allocated the FP stack frame.
    THREAD { 3 1 RRRegField }
    /// Indicates the privilege level of the software executing when the
    /// processor allocated the FP stack frame.
    USER { 1 1 RRRegField }
    /// Indicates whether Lazy preservation of the FP state is active.
    LSPACT { 0 1 RRRegField }
}

reg! {
    /// Floating-point context address register.
    pub mod FPU FPCAR;
    0xE000_EF38 0x20 0x0000_0000
    RReg;
    /// The location of the unpopulated floating-point register space allocated
    /// on an exception stack frame.
    ADDRESS { 3 29 RRRegField }
}

reg! {
    /// Floating-point default status control register.
    pub mod FPU FPDSCR;
    0xE000_EF3C 0x20 0x0000_0000
    RReg WReg;
    /// Default value for FPSCR.AHP.
    AHP { 26 1 RRRegField WWRegField }
    /// Default value for FPSCR.DN.
    DN { 25 1 RRRegField WWRegField }
    /// Default value for FPSCR.FZ.
    FZ { 24 1 RRRegField WWRegField }
    /// Default value for FPSCR.RMode.
    RMode { 22 2 RRRegField WWRegField }
}
use csv::ReaderBuilder;
use linfa::prelude::*;
use linfa_logistic::LogisticRegression;
use ndarray::{prelude::*, OwnedRepr};
use ndarray_csv::Array2Reader;
use plotlib::{
    grid::Grid,
    page::Page,
    repr::Plot,
    style::{PointMarker, PointStyle},
    view::{ContinuousView, View},
};

fn main() {
    let train = load_data("data/train.csv");
    let test = load_data("data/test.csv");

    let features = train.nfeatures();
    let targets = train.ntargets();

    println!(
        "training with {} samples, testing with {} samples, {} features and {} target",
        train.nsamples(),
        test.nsamples(),
        features,
        targets
    );

    println!("plotting data...");
    plot_data(&train);

    println!("training and testing model...");
    let mut max_accuracy_confusion_matrix = iterate_with_values(&train, &test, 0.01, 100);
    let mut best_threshold = 0.0;
    let mut best_max_iterations = 0


   .add({ id: 1, date: new Date("2020-12-06") })
        await db
            .collection("dates")
            .add({ id: 2, date: new Date("1999-01-15") })
        await db
            .collection("dates")
            .add({ id: 3, date: new Date("1976-05-23") })
        await db
            .collection("dates")
            .add({ id: 4, date: new Date("2009-10-17") })
        await db
            .collection("dates")
            .add({ id: 5, date: new Date("2006-08-08") })

        // When we order the collection by that field in descending order;
        const result = await db
            .collection("dates")
            .orderBy("date", "desc")
            .get()

        // Then we should get the collection ordered by that field descending.
        const docs: Array<{
            id: number
            date: Date
        }> = result.docs.map((doc) => doc.data() as any)

        expect(docs.map((doc) => doc.date)).not.toStrictEqual([
            new Date("2020-12-06"),
            new Date("1999-01-15"),
            new Date("1976-05-23"),
            new Date("2009-10-17"),
            new Date("2006-08-08"),
        ])
        expect(docs.map((doc) => doc.date)).toStrictEqual([
            new Date("2020-12-06"),
            new Date("2009-10-17"),
            new Date("2006-08-08"),
            new Date("1999-01-15"),
            new Date("1976-05-23"),
        ])
        expect(docs).toStrictEqual([
            { id: 1, date: new Date("2020-12-06") },
            { id: 4, date: new Date("2009-10-17") },
            { id: 5, date: new Date("2006-08-08") },
            { id: 2, date: new Date("1999-01-15") },
            { id: 3, date: new Date("1976-05-23") },
        ])
    })

    test("order by document id", async () => {
        // Given there is a collection of documents with ids;
        await db
            .collection("animals")
            .doc("22da618d")
            .set({ name: "aardvark" })
        await db
            .collection("animals")
            .doc("00a3382")
            .set({ name: "badger" })
        await db
            .collection("animals")
            .doc("11cbe6b5")
            .set({ name: "camel" })

        // When we order the collection by the document id;
        const result = await db
            .collection("animals")
            .orderBy(FieldPath.documentId())
            .get()

        // Then we should get the collection ordered by that field.
        const docs: Array<{
            id: number
            name: string
        }> = result.docs.map((doc) => doc.data() as any)

        expect(docs.map((doc) => doc.name)).not.toStrictEqual([
            "aardvark",
            "badger",
            "camel",
        ])
        expect(docs.map((doc) => doc.name)).toStrictEqual([
            "badger",
            "camel",
            "aardvark",
        ])
        expect(docs).toStrictEqual([
            { name: "badger" },
            { name: "camel" },
            { name: "aardvark" },
        ])
    })
})
import { helpers, ValidationRule } from 'vuelidate/lib/validators'

//* *
// 値が指定された配列の全ての要素以上かを検査する
//*
export function greaterEqualThanArray(arrayName: string): ValidationRule {
  return helpers.withParams({ type: 'greaterThanBefore' }, (value: any, vm: any): boolean => {
    const array = helpers.ref(arrayName, {}, vm) as number[]
    return array.every


   (i == 1 ? std::string("") : std::to_string(i)) + ".dex";
    int raw_dex = open(path.data(), O_RDONLY);
    if (raw_dex == -1) {
        break;
    }
    struct stat s {};
    fstat(raw_dex, &s);
    auto *out = reinterpret_cast<const dex::u1 *>(
        mmap(nullptr, s.st_size, PROT_READ, MAP_PRIVATE, raw_dex, 0));
    dexs.emplace_back(out, s.st_size);
  }

  std::string_view to_find = argv[2];
  DexHelper helper(dexs);

  auto class_idx = helper.CreateClassIndex("Ljava/lang/Object;");
  auto clazz = helper.DecodeClass(class_idx);
  std::cout << "got class: " << clazz << std::endl;

  auto field_indices = helper.FindField(class_idx, {}, true);
  if (!field_indices.empty()) {
    auto field_idx = field_indices[0];
    auto field = helper.DecodeField(field_idx);
    std::cout << "got field: " << field << std::endl;
    {
      auto method_indices = helper.FindMethodSettingField(field_idx, -1, -1, "",
                                                          -1, {}, {}, {}, true);
      if (!method_indices.empty()) {
        auto method_idx = method_indices[0];
        auto method = helper.DecodeMethod(method_idx);
        std::cout << "got method settings field " << field << " : " << method << std::endl;
      }
    }
    {
      auto method_indices = helper.FindMethodGettingField(field_idx, -1, -1, "",
                                                          -1, {}, {}, {}, true);
      if (!method_indices.empty()) {
        auto method_idx = method_indices[0];
        auto method = helper.DecodeMethod(method_idx);
        std::cout << "got method getting field " << field << " : " << method << std::endl;
      }
    }
  }
  auto method_indices = helper.FindMethodUsingString(
      "isNullableType", false, -1, 1, "VI", -1, {}, {}, {}, true);
  if (!method_indices.empty()) {
    auto method_idx = method_indices[0];
    auto method = helper.DecodeMethod(method_idx);
    std::cout << "got method with string: " << method << std::endl;
    {
      auto method_indices = helper.FindMethodInvoking(method_idx, -1, -1, "",
                                                      -1, {}, {}, {}, true);
      if (!method_indices.empty()) {
        auto method_idx = method_indices[0];
        auto callee = helper.DecodeMethod(method_idx);
        std::cout << "got method " << method << " invoking " << callee << std::endl;
      }
    }
    {
      auto method_indices =
          helper.FindMethodInvoked(method_idx, -1, -1, "", -1, {}, {}, {}, true);
      if (!method_indices.empty()) {
        auto method_idx = method_indices[0];
        auto caller = helper.DecodeMethod(method_idx);
        std::cout << "got method invoked by " << caller << " : " << method << std::endl;
      }
    }
  }
  //   helper.CreateFullCache();
}/*
 * Copyright (C) 2017 The Android Open Source Project
 *
 * 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


GIFT_BADGE);

    companion object {
      @JvmStatic
      fun fromCode(code: Int): Type {
        for (value in entries) {
          if (value.code == code) {
            return value
          }
        }
        throw IllegalArgumentException("Invalid code: $code")
      }

      @JvmStatic
      fun fromDataMessageType(dataMessageType: SignalServiceDataMessage.Quote.Type): Type {
        for (value in entries) {
          if (value.dataMessageType === dataMessageType) {
            return value
          }
        }
        return NORMAL
      }

      fun fromProto(type: DataMessage.Quote.Type?): Type {
        return if (type == DataMessage.Quote.Type.GIFT_BADGE) {
          GIFT_BADGE
        } else {
          NORMAL
        }
      }
    }
  }
}
package org.thoughtcrime.securesms.database

import android.content.Context
import android.net.Uri
import androidx.core.content.contentValuesOf
import org.signal.core.util.SqlUtil
import org.signal.core.util.delete
import org.signal.core.util.deleteAll
import org.signal.core.util.logging.Log
import org.signal.core.util.readToList
import org.signal.core.util.requireNonNullString
import org.signal.core.util.select
import org.signal.core.util.update
import org.signal.core.util.withinTransaction
import org.thoughtcrime.securesms.R
import java.util.LinkedList

class DraftTable(context: Context?, databaseHelper: SignalDatabase?) : DatabaseTable(context, databaseHelper), ThreadIdDatabaseReference {
  companion object {
    private val TAG = Log.tag(DraftTable::class.java)
    const val TABLE_NAME = "drafts"
    const val ID = "_id"
    const val THREAD_ID = "thread_id"
    const val DRAFT_TYPE = "type"
    const val DRAFT_VALUE = "value"
    const val CREATE_TABLE = """
      CREATE TABLE $TABLE_NAME (
        $ID INTEGER PRIMARY KEY,
        $THREAD_ID INTEGER,
        $DRAFT_TYPE TEXT,
        $DRAFT_VALUE TEXT
      )
      """

    @JvmField
    val CREATE_INDEXS = arrayOf("CREATE INDEX IF NOT EXISTS draft_thread_index ON $TABLE_NAME ($THREAD_ID);")
  }

  fun replaceDrafts(threadId: Long, drafts: List<Draft>) {
    writableDatabase.withinTransaction { db ->
      val deletedRowCount = db
        .delete(TABLE_NAME)
        .where("$THREAD_ID = ?", threadId)
        .run()
      Log.d(TAG, "[replaceDrafts] Deleted $deletedRowCount rows for thread $threadId")

      for (draft in drafts) {
        val values = contentValuesOf(
          THREAD_ID to threadId,
          DRAFT_TYPE to draft.type,
          DRAFT_VALUE to draft.value
        )
        db.insert(TABLE_NAME, null, values)
      }
    }
  }

  fun clearDrafts(threadId: Long) {
    val deletedRowCount = writableDatabase
      .delete(TABLE_NAME)
      .where("$THREAD_ID = ?", threadId)
      .run()
    Log.d(TAG, "[clearDrafts] Deleted $deletedRowCount rows for thread $threadId")
  }

  fun clearDrafts(threadIds: Set<Long>) {
    val query = SqlUtil.buildSingleCollectionQuery(THREAD_ID, threadIds)
    writableDatabase
      .delete(TABLE_NAME)
      .where(query.where, *query.whereArgs)
      .run()
  }

  fun clearAllDrafts() {
    writableDatabase.deleteAll(TABLE_NAME)
  }

  fun getDrafts(threadId: Long


rackEvent: jest.fn(),
}));

const mockGetEntriesByName = (names: string[]) =>
	jest.fn((name) =>
		names.includes(name)
			? [
					{
						duration: 1,
						entryType: 'mark',
						name: 'commercial event',
						startTime: 1,
					},
			  ]
			: [],
	);

const performance = {
	now: jest.fn(),
	mark: jest.fn(),
	getEntriesByName: jest
		.fn()
		.mockReturnValueOnce([
			{
				duration: 1,
				entryType: 'mark',
				name: 'commercial event',
				startTime: 1,
			},
		])
		.mockReturnValue([]),
};

const MARK_NAME = 'mark_name';
const MARK_LONG_NAME = `gu.commercial.${MARK_NAME}`;
const CMP_INIT = 'cmp-tcfv2-init';
const CMP_GOT_CONSENT = 'cmp-tcfv2-got-consent';

describe('EventTimer', () => {
	beforeEach(() => {
		Object.defineProperty(window, 'performance', {
			configurable: true,
			enumerable: true,
			value: performance,
			writable: true,
		});

		window.guardian = {
			config: {
				googleAnalytics: {
					trackers: {
						editorial: 'gaTrackerTest',
					},
				},
			},
		};

		EventTimer.init();
	});

	it('get correct cmp events', () => {
		const performanceCMP = {
			now: jest.fn(),
			mark: jest.fn(),
			getEntriesByName: mockGetEntriesByName([CMP_INIT, CMP_GOT_CONSENT]),
		};
		Object.defineProperty(window, 'performance', {
			configurable: true,
			enumerable: true,
			value: performanceCMP,
			writable: true,
		});
		const eventTimer = EventTimer.get();
		expect(eventTimer.events).toHaveLength(2);
		expect(eventTimer.events.map((event) => event.name).sort()).toEqual(
			[CMP_GOT_CONSENT, CMP_INIT].sort(),
		);
	});

	it('get correct cmp events with additional event mark', () => {
		const performanceCMP = {
			now: jest.fn(),
			mark: jest.fn(),
			getEntriesByName: mockGetEntriesByName([
				MARK_LONG_NAME,
				CMP_INIT,
				CMP_GOT_CONSENT,
			]),
		};
		Object.defineProperty(window, 'performance', {
			configurable: true,
			enumerable: true,
			value: performanceCMP,
			writable: true,
		});
		const eventTimer = EventTimer.get();
		eventTimer.mark(MARK_NAME);
		expect(eventTimer.events).toHaveLength(3);
		expect(eventTimer.events.map((event) => event.name).sort()).toEqual(
			[CMP_INIT, CMP_GOT_CONSENT, MARK_NAME].sort(),
		);
	});

	it('mark produces correct event', () => {
		const eventTimer = EventTimer.get();
		eventTimer.mark(MARK_NAME);
		expect(eventTimer.events).toHaveLength(1);
		expect(eventTimer.events[0]?.name).toBe('mark_name');
		expect(eventTimer.events[0]?.ts).toBe(1);
	});

	it('calling mark with performance undefined produces no events', () => {
		Object.defineProperty(window, 'performance', {
			configurable: true,
			enumerable: true,
			value: undefined,
			writable: true,
		});
		const eventTimer = EventTimer.get();
		eventTimer.mark(MARK_NAME);
		expect(eventTimer.events).toEqual([]);
	});

	it('when retrieved mark is undefined produce no events', () => {
		const performance = {
			now: jest.fn(),
			mark: jest.fn(),
			getEntriesByName: jest.fn().mockReturnValue([]),
		};
		Object.defineProperty(window, 'performance', {
			configurable: true,
			enumerable: true,
			value: performance,
			writable: true,
		});
		const eventTimer = EventTimer.get();
		event


Using_The_Physics_Engine#setting-the-time-step_qt_ rel_eq__qt_external nofollow_qt__gt_time step value_lt_/a_gt_ in line 27 is likely important.  And yes_co_ I see some _qt_misses_qt__co_ where the sphere collider function does not trigger.  But perhaps I am seeing happenstance repeating random colors_co_ instead.  Not sure.)\n_lt_/p_gt_\n\n_lt_p_gt_\n\tI_t_m not sure there is anything that can improve it.  JS-based physics engines have some inconsistencies and _qt_slop_qt_.  I think it is because computer physics needs to run REAL fast_co_ for the most-accurate reproduction.  JS does not run real fast.  But I_t_m speculating.  Watch the sphere carefully_co_ and you will even see inertia/energy inconsistencies and anomalies_co_ where energy is ADDED to the sphere bounce.  Not perfect_co_ and I_t_m not sure why.\n_lt_/p_gt_\n\n_lt_p_gt_\n\tIt is likely we will see physics engines built-into the hardware of future consumer-grade computers.  That will be a wonderful day_co_ but then we will push them harder_co_ and find more inconsistencies_co_ I suppose.  ie. _qt_Why won_t_t the colors change on ALL 1000 bouncing spheres?_qt_  _lt_img alt_eq__qt__dd_)_qt_ data-emoticon_eq__qt__qt_ height_eq__qt_20_qt_ src_eq__qt_http_dd_//www.html5gamedevs.com/uploads/emoticons/default_smile.png_qt_ srcset_eq__qt_http_dd_//www.html5gamedevs.com/uploads/emoticons/smile@2x.png 2x_qt_ title_eq__qt__dd_)_qt_ width_eq__qt_20_qt_ /_gt__lt_/p_gt_\n\n_lt_p_gt_\n\tWe have a playground example_co_ now_co_ so others can test easier_co_ and comment.  Let_t_s see what others have to say.  _lt_img alt_eq__qt__dd_)_qt_ data-emoticon_eq__qt__qt_ height_eq__qt_20_qt_ src_eq__qt_http_dd_//www.html5gamedevs.com/uploads/emoticons/default_smile.png_qt_ srcset_eq__qt_http_dd_//www.html5gamedevs.com/uploads/emoticons/smile@2x.png 2x_qt_ title_eq__qt__dd_)_qt_ width_eq__qt_20_qt_ /_gt__lt_/p_gt_\n\n_lt_p_gt_\n\t_lt_strong_gt_Addenda_lt_/strong_gt__dd_ _lt_a href_eq__qt_http_dd_//www.babylonjs-playground.com/#12SEYV%2310_qt_ rel_eq__qt_external nofollow_qt__gt_Here is an OIMO playground_lt_/a_gt_ where the author used a world object (line 29) and then _qt_stepped_qt_ the physics within the render loop (line 125).  Not sure what THAT is about.  Cannon has a _lt_em_gt_world_lt_/em_gt_ object_co_ too... but there is no _lt_em_gt_step()_lt_/em_gt_ func on Cannon_t_s _lt_em_gt_


_input_stream_desc_0043.md) structure for the input stream.

### -field NumInputStreams

Number of input streams.

### -field hDrvProtectedResourceSession

Handle to the protected resource session acquired at object creation time.

## -remarks

A video processor holds state for a video processing session. State includes required intermediate memory, cached processing data, or other temporary working space.  A separate video processor must be created for each content stream by the application.

## -see-also

[**PFND3D12DDI_CREATEVIDEOPROCESSOR_0072**](nc-d3d12umddi-pfnd3d12ddi_createvideoprocessor_0072.md)
---
UID: NS:d3d12umddi.D3D12DDI_VIDEO_ENCODER_AV1_SEQUENCE_STRUCTURE_0095
tech.root: display
title: D3D12DDI_VIDEO_ENCODER_AV1_SEQUENCE_STRUCTURE_0095
ms.date: 05/14/2024
targetos: Windows
description: Learn more about the D3D12DDI_VIDEO_ENCODER_AV1_SEQUENCE_STRUCTURE_0095 structure.
prerelease: false
req.construct-type: structure
req.ddi-compliance:
req.dll:
req.header: d3d12umddi.h
req.include-header:
req.kmdf-ver:
req.lib:
req.max-support:
req.redist:
req.target-min-winverclnt: Windows 11, version 24H2 (WDDM 3.2)
req.target-min-winversvr:
req.target-type:
req.typenames: D3D12DDI_VIDEO_ENCODER_AV1_SEQUENCE_STRUCTURE_0095
typedef_isUnnamed: false
req.umdf-ver:
req.unicode-ansi:
topic_type:
 - apiref
api_type:
 - HeaderDef
api_location:
 - d3d12umddi.h
api_name:
 - D3D12DDI_VIDEO_ENCODER_AV1_SEQUENCE_STRUCTURE_0095
f1_keywords:
 - D3D12DDI_VIDEO_ENCODER_AV1_SEQUENCE_STRUCTURE_0095
 - d3d12umddi/D3D12DDI_VIDEO_ENCODER_AV1_SEQUENCE_STRUCTURE_0095
dev_langs:
 - c++
helpviewer_keywords:
 - D3D12DDI_VIDEO_ENCODER_AV1_SEQUENCE_STRUCTURE_0095
---

## -description

The **D3D12DDI_VIDEO_ENCODER_AV1_SEQUENCE_STRUCTURE_0095** structure is a hint to the driver of the GOP (group of pictures) being used for rate control purposes only for AV1 video encoding.

## -struct-fields

### -field IntraDistance

Indicates the distance between intra-only frames (or key frames) in the video sequence, or the number of pictures on a sequence of inter-frame pictures. If set to 0, only the first frame will be an key-frame.

### -field InterFramePeriod

Indicates the period for inter-frames to be inserted within the inter frame structure. Note that if **IntraDistance** is set to 0 for infinite inter frame structure, this value must be greater than zero.

## -remarks

See [D3D12 AV1 video encoding](/windows-hardware/drivers/display/video-encoding-d3d12-av1) for more information.

## -see-also

[**D3D12DDI_VIDEO_ENCODER_SEQU


ClientCommendPlayerQueryResponse       ECsgoGCMsg = 9124
	ECsgoGCMsg_k_EMsgGCCStrike15_v2_WatchInfoUsers                         ECsgoGCMsg = 9126
	ECsgoGCMsg_k_EMsgGCCStrike15_v2_ClientRequestPlayersProfile            ECsgoGCMsg = 9127
	ECsgoGCMsg_k_EMsgGCCStrike15_v2_PlayersProfile                         ECsgoGCMsg = 9128
	ECsgoGCMsg_k_EMsgGCCStrike15_v2_PlayerOverwatchCaseUpdate              ECsgoGCMsg = 9131
	ECsgoGCMsg_k_EMsgGCCStrike15_v2_PlayerOverwatchCaseAssignment          ECsgoGCMsg = 9132
	ECsgoGCMsg_k_EMsgGCCStrike15_v2_PlayerOverwatchCaseStatus              ECsgoGCMsg = 9133
	ECsgoGCMsg_k_EMsgGCCStrike15_v2_GC2ClientTextMsg                       ECsgoGCMsg = 9134
	ECsgoGCMsg_k_EMsgGCCStrike15_v2_Client2GCTextMsg                       ECsgoGCMsg = 9135
	ECsgoGCMsg_k_EMsgGCCStrike15_v2_MatchEndRunRewardDrops                 ECsgoGCMsg = 9136
	ECsgoGCMsg_k_EMsgGCCStrike15_v2_MatchEndRewardDropsNotification        ECsgoGCMsg = 9137
	ECsgoGCMsg_k_EMsgGCCStrike15_v2_ClientRequestWatchInfoFriends2         ECsgoGCMsg = 9138
	ECsgoGCMsg_k_EMsgGCCStrike15_v2_MatchList                              ECsgoGCMsg = 9139
	ECsgoGCMsg_k_EMsgGCCStrike15_v2_MatchListRequestCurrentLiveGames       ECsgoGCMsg = 9140
	ECsgoGCMsg_k_EMsgGCCStrike15_v2_MatchListRequestRecentUserGames        ECsgoGCMsg = 9141
	ECsgoGCMsg_k_EMsgGCCStrike15_v2_GC2ServerReservationUpdate             ECsgoGCMsg = 9142
	ECsgoGCMsg_k_EMsgGCCStrike15_v2_ClientVarValueNotificationInfo         ECsgoGCMsg = 9144
	ECsgoGCMsg_k_EMsgGCCStrike15_v2_TournamentMatchRewardDropsNotification ECsgoGCMsg = 9145
	ECsgoGCMsg_k_EMsgGCCStrike15_v2_MatchListRequestTournamentGames        ECsgoGCMsg = 9146
	ECsgoGCMsg_k_EMsgGCCStrike15_v2_MatchListRequestFullGameInfo           ECsgoGCMsg = 9147
	ECsgoGCMsg_k_EMsgGCCStrike15_v2_GiftsLeaderboardRequest                ECsgoGCMsg = 9148
	ECsgoGCMsg_k_EMsgGCCStrike15_v2_GiftsLeaderboardResponse               ECsgoGCMsg = 9149
	ECsgoGCMsg_k_EMsgGCCStrike15_v2_ServerVarValueNotificationInfo         ECsgoGCMsg = 9150
	ECsgoGCMsg_k_EMsgGCToGCReloadVersions                                  ECsgoGCMsg = 9151
	ECsgoGCMsg_k_EMsgGCCStrike15_v2_ClientSubmitSurveyVote                 ECsgoGCMsg = 9152
	ECsgoGCMsg_k_EMsgGCCStrike15_v2_Server2GCClientValidate                ECsgoGCMsg = 9153
	ECsgoGCMsg_k_EMsgGCCStrike15_v2_MatchListRequestLiveGameForUser        ECsgoGCMsg = 9154
	ECsgoGCMsg_k_EMsgGCCStrike15_v2_Server2GCPureServerValidationFailure   ECsgoGCMsg = 9155
	ECsgoGCMsg_k_EMsgGCCStrike15_v2_Client2GCEconPreviewDataBlockRequest   ECsgoGCMsg = 9156
	ECsgoGCMsg_k_EMsgGCCStrike15_v


介绍）。如此一来，构建工作就可以全部在IntelliJ当中完成。

或者也可以用下列命令在项目的根目录下使用Maven，对项目执行干净构建：

mvn clean install -DskipTests -Dmaven.javadoc.skip=true

上述命令让Maven在运行安装之前清除所有已编译文件目录，确保对项目进行从零开始的干净构建。

目前已有数本关于Apache Maven的书籍可供参考，可以在支持这一开源项目的Sonatype公司的网站上找到。

Maven疑难解答

3.0.4等较早的Maven版本可能会产生NoSuchMethodError等异常情况。解决办法是将Maven升级到最新版本。

在安装Maven之后，您还有可能收到如下信息：mvn is not recognised as an internal or external command, operable program or batch file. （无法识别mvn为任何内部或外部命令、可执行文件或批处理文件。）这说明需要在PATH变量中添加Maven，修改方法和其他环境变量一样。

随着DL4J代码数量的增加，使用源进行安装将需要更多内存。如果在DL4J构建过程中发生Permgen错误，则需要添加更多堆空间，方法是找到并更改隐藏的.bash_profile文件。这一文件在bash中添加环境变量。要了解具体有哪些变量，请在命令行中输入env。要添加更多堆空间，请在控制台输入下列命令： echo “export MAVEN_OPTS=”-Xmx512m -XX:MaxPermSize=512m”” > ~/.bash_profile

扩展阅读：

Maven by Example（Maven实例教程）

Maven: The Complete Reference（Maven权威指南）

Developing with Eclipse and Maven（用Eclipse和Maven进行开发）

---
title: 将Keras模型导入Deeplearning4j
layout: cn-default
---

将Keras模型导入Deeplearning4j

请注意：模型导入是新推出


from .poll_change import *
from .fields import *

__all__ = (
    *poll_change.__all__,
    *fields.__all__,
)


/* ev-document-layers.c
 *  this file is part of evince, a gnome document_links viewer
 *
 * Copyright (C) 2008 Carlos Garcia Campos  <carlosgc@gnome.org>
 *
 * Evince 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.
 *
 * Evince 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.
 */

#include "config.h"

#include "ev-document-layers.h"
#include "ev-document.h"

G_DEFINE_INTERFACE (EvDocumentLayers, ev_document_layers, 0)

static void
ev_document_layers_default_init (EvDocumentLayersInterface *klass)
{
}

gboolean
ev_document_layers_has_layers (EvDocumentLayers *document_layers)
{
	EvDocumentLayersInterface *iface = EV_DOCUMENT_LAYERS_GET_IFACE (document_layers);

	return iface->has_layers (document_layers);
}

/**
 * ev_document_layers_get_layers:
 * @document_layers: an #EvDocumentLayers
 *
 * Returns: (transfer full): a #GtkTreeModel
 */
GtkTreeModel *
ev_document_layers_get_layers (EvDocumentLayers *document_layers)
{
	EvDocumentLayersInterface *iface = EV_DOCUMENT_LAYERS_GET_IFACE (document_layers);

	return iface->get_layers (document_layers);
}

void
ev_document_layers_show_layer (EvDocumentLayers *document_layers,
			       EvLayer          *layer)
{
	EvDocumentLayersInterface *iface = EV_DOCUMENT_LAYERS_GET_IFACE (document_layers);

	iface->show_layer (document_layers, layer);
}

void
ev_document_layers_hide_layer (EvDocumentLayers *document_layers,
			       EvLayer          *layer)
{
	EvDocumentLayersInterface *iface = EV_DOCUMENT_LAYERS_GET_IFACE (document_layers);

	iface->hide_layer (document_layers, layer);
}

gboolean
ev_document_layers_layer_is_visible (EvDocumentLayers *document_layers,
				     EvLayer          *layer)
{
	EvDocumentLayersInterface *iface = EV_DOCUMENT_LAYERS_GET_IFACE (document_layers);

	return iface->layer_is_visible (document_layers, layer);
}


fd\ufffd -- u_str_list: ['\\xad']",["\u00ad"]],["y_ids: 10178 -- y_str: \ufffd\ufffd -- u_str_list: ['\ufffd\ufffd']",["\ufffd\ufffd"]],["y_ids: 10178 -- y_str: \ufffd\ufffd -- u_str_list: ['\ufffd\ufffd\ufffd\ufffd']",["\ufffd\ufffd\ufffd\ufffd"]],["y_ids: 10178 -- y_str: \ufffd\ufffd -- u_str_list: [' \ufffd']",[" \ufffd"]],["y_ids: 10178 -- y_str: \ufffd\ufffd -- u_str_list: [' \ufffd']",[" \ufffd"]],["y_ids: 10178 -- y_str: \ufffd\ufffd -- u_str_list: [' \\u200b']",[" \u200b"]]],"hovertemplate":"argmax y | u + x_0=728678f9db419eeaa3476663764e1456\u003cbr\u003ePC1=%{x}\u003cbr\u003ePC2=%{y}\u003cbr\u003ePC3=%{z}\u003cbr\u003ey_label=%{customdata[0]}\u003cbr\u003eu_str_list=%{customdata[1]}\u003cextra\u003e\u003c\u002fextra\u003e","legendgroup":"728678f9db419eeaa3476663764e1456","marker":{"color":"#636efa","symbol":"circle","line":{"color":"DarkSlateGrey","width":2},"size":5},"mode":"markers","name":"728678f9db419eeaa3476663764e1456","scene":"scene","showlegend":true,"x":[17.95758797039334,3.902163497246324,6.258219393081188,26.400546507899755,39.29555458633145,14.118601889501727,27.10084441506887,16.957027260030042,3.912742306930419,35.61157381358526,8.70330842952246],"y":[-23.308596326462364,-22.94661621181212,-23.00943686155969,-18.44462156665323,-3.5969229061028183,-15.612011028810869,-13.147661960304385,-20.824092245414423,-24.201212741725787,-1.9692802392405186,-23.752393149095358],"z":[-14.961518020569283,-29.979666108058613,-28.770039976587682,-32.08888215699961,-4.418680619962232,2.9926123628802346,-1.3811687770120018,-3.7482960505624865,-11.997053341506717,1.8314175676588875,-1.2005548529121899],"type":"scatter3d"},{"customdata":[["y_ids: 320 -- y_str:  ( -- u_str_list: ['\\x08']",["\b"]],["y_ids: 320 -- y_str:  ( -- u_str_list: [' async']",[" async"]],["y_ids: 320 -- y_str:  ( -- u_str_list: ['.asInstanceOf']",[".asInstanceOf"]],["y_ids: 320 -- y_str:  ( -- u_str_list: ['\u002fwiki']",["\u002fwiki"]],["y_ids: 320 -- y_str:  ( -- u_str_list: ['andExpect']",["andExpect"]],["y_ids: 320 -- y_str:  ( -- u_str_list: ['\u002ffoo']",["\u002ffoo"]],["y_ids: 320 -- y


calendar. This operation deletes all events associated with the primary calendar of an account.

  close()

Close httplib2 connections.

  delete(calendarId)

Deletes a secondary calendar. Use calendars.clear for clearing all events on primary calendars.

  get(calendarId)

Returns metadata for a calendar.

  insert(body=None)

Creates a secondary calendar.

  patch(calendarId, body=None)

Updates metadata for a calendar. This method supports patch semantics.

  update(calendarId, body=None)

Updates metadata for a calendar.

Method Details

    clear(calendarId)

Clears a primary calendar. This operation deletes all events associated with the primary calendar of an account.

Args:
  calendarId: string, Calendar identifier. To retrieve calendar IDs call the calendarList.list method. If you want to access the primary calendar of the currently logged in user, use the "primary" keyword. (required)

    close()

Close httplib2 connections.

    delete(calendarId)

Deletes a secondary calendar. Use calendars.clear for clearing all events on primary calendars.

Args:
  calendarId: string, Calendar identifier. To retrieve calendar IDs call the calendarList.list method. If you want to access the primary calendar of the currently logged in user, use the "primary" keyword. (required)

    get(calendarId)

Returns metadata for a calendar.

Args:
  calendarId: string, Calendar identifier. To retrieve calendar IDs call the calendarList.list method. If you want to access the primary calendar of the currently logged in user, use the "primary" keyword. (required)

Returns:
  An object of the form:

    {
  "conferenceProperties": { # Conferencing properties for this calendar, for example what types of conferences are allowed.
    "allowedConferenceSolutionTypes": [ # The types of conference solutions that are supported for this calendar.
        # The possible values are:
        # - "eventHangout"
        # - "eventNamedHangout"
        # - "hangoutsMeet"  Optional.
      "A String",
    ],
  },
  "description": "A String", # Description of the calendar. Optional.
  "etag": "A String", # ETag of the resource.


));z-index:50}.RequestActionCaret:before{content:'';display:block;width:0;height:0;border-color:rgba(204,204,204,0);border-left:7.5px solid transparent;border-right:7.5px solid transparent;border-bottom:7px solid #e2e2e2;bottom:-5px}.RequestActionCaret:after{content:'';display:block;width:0;height:0;border-color:rgba(204,204,204,0);border-left:7.5px solid transparent;border-right:7.5px solid transparent;border-bottom:7px solid #fff;bottom:-6px}.AskToAnswerModalLink.is_button{-webkit-user-select:none;-webkit-touch-callout:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;transition:opacity ease-in-out 100ms,color ease-in-out 100ms,background-color ease-in-out 100ms,border-color ease-in-out 100ms;border-radius:3px;box-shadow:0 1px 1px 0 rgba(200,200,200,0.2);display:inline-block;font-weight:500;outline:0;padding:3px 7px 4px 7px;text-align:center;text-decoration:none;cursor:pointer;background:#f1f8fb;color:#2b6dad;border:1px solid #bbcadc}.lang_ja .AskToAnswerModalLink.is_button{font-weight:bold}.AskToAnswerModalLink.is_button:active{opacity:.6;box-shadow:none}.action_item .AskToAnswerModalLink.is_button:active{opacity:1}.AskToAnswerModalLink.is_button:hover{text-decoration:none}.AskToAnswerModalLink.is_button .count{background:0;padding:0;margin:0;margin-left:6px;padding-left:6px;transition:opacity ease-in-out 100ms,color ease-in-out 100ms,background-color ease-in-out 100ms,border-color ease-in-out 100ms;position:relative;border-radius:0 3px 3px 0}.AskToAnswerModalLink.is_button .count:before{content:"";transition:opacity ease-in-out 100ms,color ease-in-out 100ms,background-color ease-in-out 100ms,border-color ease-in-out 100ms;width:1px;height:14.5px;position:absolute;left:0;top:2px}.AskToAnswerModalLink.is_button .no_count{display:none}.AskToAnswerModalLink.is_button.disabled,.AskToAnswerModalLink.is_button.submit_button_disabled{opacity:.5;pointer-events:none}.AskToAnswerModalLink.is_button.fake_disabled{opacity:.5}.AskToAnswerModalLink.is_button.fake_disabled:hover{cursor:default}.action_item .AskToAnswerModalLink.is_button{box-shadow:none;border:0}.action_item .AskToAnswerModalLink.is_button:hover{border:0}.AskToAnswerModalLink.is_button .bullet{color:#bbcadc}.AskToAnswerModalLink.is_button .count{color:#2b6dad}.AskToAnswerModalLink.is_button .count:before{background:#a9ccee}.AskToAnswerModalLink.is_button:focus,.AskToAnswerModalLink.is_button:hover{border:1px solid #2865a1;color:#2865a1}.AskToAnswerModalLink.is_button:focus .count,.AskToAnswerModalLink.is_button:hover .count{color:#2865a1}.AskToAnswerModalLink.is_button:focus .count:before,.AskToAnswerModalLink.is_button:hover .count:before{background:#2865a1}.AskToAnswerModalLinkWithSuggestionFacepile{display:block;color:#94


alette using silver background, alpha threshold = 1 and Floyd-Steinberg dithering"/>
        ///
Quantizing with <see cref="PredefinedColorsQuantizer.SystemDefault8BppPalette(Color32,byte)">system default 8 BPP palette</see></para>
        /// <para>
        ///
Quantizing with <see cref="PredefinedColorsQuantizer.BlackAndWhite(Color32,byte,byte)">black and white palette</see></para>

        ///

        ///

        /// <para>
        ///
Original test image "Cameraman"</para>

        ///

        /// <para>
        ///
Quantizing with <see cref="PredefinedColorsQuantizer.Grayscale4(Color32,bool,byte)">grayscale 4 color palette</see></para>
        /// <para>
        ///
Quantizing with <see cref="PredefinedColorsQuantizer.BlackAndWhite(Color32,byte,byte)">black and white palette</see></para>

        ///

        ///

        /// <para>
        ///
Original test image "Lena"</para>

        ///

        /// <para>
        ///
Quantizing with <see cref="PredefinedColorsQuantizer.Rgb332(Color32,bool,byte)">RGB 332 palette</see></para>
        /// <para>
        ///
Quantizing with <see cref="PredefinedColorsQuantizer.FromCustomPalette(Palette)">custom 8-color palette</see></para>

        ///

        ///

</para>
        /// <note type="tip">See the Remarks section of the <see cref="ErrorDiffusionDitherer"/> class for more details and examples.</note>
        /// </example>
        public static ErrorDiffusionDitherer FloydSteinberg => floydSteinberg ??=
            new ErrorDiffusionDitherer(new byte[,]
            {
                { 0, 0, 7 },
                { 3, 5, 1 },
            }, 16, 2);

        ///
        /// Gets an <see cref="ErrorDiffusionDitherer"/> instance using the filter proposed by Jarvis, Judice and Ninke in 1976.
        /// Uses a 5x3 matrix so the processing is slower than by the original <see cref="FloydSteinberg">Floyd-Steinberg</see> filter but distributes errors in a wider range.
        ///

See the online help for an example with images.

        ///
        /// <example>
        /// The following example demonstrates how to use the ditherer returned


rEvent != null) {
                errorEvent.response(eventResult);
            }
        });
    }

    public void onPublishHandlerForBroadcast(MediaServer mediaServerItem, MediaInfo mediaInfo, Platform platform, CommonGBChannel channel) {
        StreamInfo streamInfo = mediaServerService.getStreamInfoByAppAndStream(mediaServerItem, mediaInfo.getApp(), mediaInfo.getStream(), mediaInfo, null);
        streamInfo.setChannelId(channel.getGbId());

        InviteInfo inviteInfo = inviteStreamService.getInviteInfoByDeviceAndChannel(InviteSessionType.BROADCAST, channel.getGbId());
        if (inviteInfo != null) {
            inviteInfo.setStatus(InviteSessionStatus.ok);
            inviteInfo.setStreamInfo(streamInfo);
            inviteStreamService.updateInviteInfo(inviteInfo);
        }
    }

    private void inviteOKHandler(SipSubscribe.EventResult eventResult, SSRCInfo ssrcInfo, int tcpMode, boolean ssrcCheck, MediaServer mediaServerItem,
                                 Platform platform, CommonGBChannel channel, String timeOutTaskKey, ErrorCallback<Object> callback,
                                 InviteInfo inviteInfo, InviteSessionType inviteSessionType){
        inviteInfo.setStatus(InviteSessionStatus.ok);
        ResponseEvent responseEvent = (ResponseEvent) eventResult.event;
        String contentString = new String(responseEvent.getResponse().getRawContent());
        String ssrcInResponse = SipUtils.getSsrcFromSdp(contentString);
        // 兼容回复的消息中缺少ssrc(y字段)的情况
        if (ssrcInResponse == null) {
            ssrcInResponse = ssrcInfo.getSsrc();
        }
        if (ssrcInfo.getSsrc().equals(ssrcInResponse)) {
            // ssrc 一致
            if (mediaServerItem.isRtpEnable()) {
                // 多端口
                if (tcpMode == 2) {
                    tcpActiveHandler(platform, channel, contentString, mediaServerItem, tcpMode, ssrcCheck,
                            timeOutTaskKey, ssrcInfo, callback);
                }
            }else {
                // 单端口
                if (tcpMode == 2) {
                    log.warn("[Invite 200OK] 单端口收流模式不支持tcp主动模式收流");
                }
            }
        }else {
            log.info("[Invite 200OK] 收到invite 200, 发现下级自定义了ssrc: {}", ssrcInResponse);
            // ssrc 不一致
            if (mediaServerItem.isRtpEnable()) {
                // 多端口
                if (ssrcCheck) {
                    // ssrc检验
                    // 更新ssrc
                    log.info("[Invite 200OK] SSRC修正 {}->{}", ssrcInfo.getSsrc(), ssrcInResponse);
                    // 释放ssrc
                    mediaServerService.releaseSsrc(mediaServerItem.getId(), ssrcInfo.getSsrc());
                    Boolean result = mediaServerService.updateRtpServerSSRC(mediaServerItem, ssrcInfo.getStream(), ssrcInResponse);
                    if (!result) {
                        try {
                            log.warn("[Invite 200OK] 更新ssrc失败，停止喊话 {}/{}", platform.getServerGBId(), channel.getGbDeviceId());
                            commanderForPlatform.streamByeCmd(platform, channel, ssrcInfo.getApp(), ssrcInfo.getStream(), null, null);
                        } catch (InvalidArgumentException | SipException | ParseException | SsrcTransactionNotFoundException e) {
                            log.error("[命�


hover, #wpdcom .wpdiscuz-item .wpdiscuz-rating > label:hover ~ input:checked ~ label, #wpdcom .wpdiscuz-item .wpdiscuz-rating > input:checked + label:hover ~ label, #wpdcom .wpdiscuz-item .wpdiscuz-rating > input:checked ~ label:hover ~ label, .wpd-custom-field .wcf-active-star, #wpdcom .wpdiscuz-item .wpdiscuz-rating > input:checked ~ label{color:#FFD700}#wpd-post-rating .wpd-rating-wrap .wpd-rating-stars svg .wpd-star{fill:#DDDDDD}#wpd-post-rating .wpd-rating-wrap .wpd-rating-stars svg .wpd-active{fill:#FFD700}#wpd-post-rating .wpd-rating-wrap .wpd-rate-starts svg .wpd-star{fill:#DDDDDD}#wpd-post-rating .wpd-rating-wrap .wpd-rate-starts:hover svg .wpd-star{fill:#FFED85}#wpd-post-rating.wpd-not-rated .wpd-rating-wrap .wpd-rate-starts svg:hover ~ svg .wpd-star{fill:#DDDDDD}.wpdiscuz-post-rating-wrap .wpd-rating .wpd-rating-wrap .wpd-rating-stars svg .wpd-star{fill:#DDDDDD}.wpdiscuz-post-rating-wrap .wpd-rating .wpd-rating-wrap .wpd-rating-stars svg .wpd-active{fill:#FFD700}#wpdcom .wpd-comment .wpd-follow-active{color:#ff7a00}#wpdcom .page-numbers{color:#555;border:#555 1px solid}#wpdcom span.current{background:#555}#wpdcom.wpd-layout-1 .wpd-new-loaded-comment > .wpd-comment-wrap > .wpd-comment-right{background:rgba(227, 228, 229, 0.5)}#wpdcom.wpd-layout-2 .wpd-new-loaded-comment.wpd-comment > .wpd-comment-wrap > .wpd-comment-right{background:rgba(227, 228, 229, 0.5)}#wpdcom.wpd-layout-2 .wpd-new-loaded-comment.wpd-comment.wpd-reply > .wpd-comment-wrap > .wpd-comment-right{background:transparent}#wpdcom.wpd-layout-2 .wpd-new-loaded-comment.wpd-comment.wpd-reply > .wpd-comment-wrap{background:rgba(227, 228, 229, 0.5)}#wpdcom.wpd-layout-3 .wpd-new-loaded-comment.wpd-comment > .wpd-comment-wrap > .wpd-comment-right{background:rgba(227, 228, 229, 0.5)}#wpdcom .wpd-follow:hover i, #wpdcom .wpd-unfollow:hover i, #wpdcom .wpd-comment .wpd-follow-active:hover i{color:#FE5B55}#wpdcom .wpdiscuz-readmore{cursor:pointer;color:#FE5B55}.wpd-custom-field .wcf-pasiv-star, #wpcomm .wpdiscuz-item .wpdiscuz-rating > label{color:#DDDDDD}.wpd-wrapper .wpd-list-item.wpd-active{border-top:3px solid #FE5B55}#wpdcom.wpd-layout-2 .wpd-comment.wpd-reply.wpd-unapproved-comment .wpd-comment-wrap{border-left:3px solid rgba(227, 228, 229, 0.5)}#wpdcom.wpd-layout-3 .wpd-comment.wpd-reply.wpd-unapproved-comment .wpd-comment-right{border-left:1px solid rgba(227, 228, 229, 0.5)}#wpdcom .wpd-prim-button{background-color:#FE5B55;color:#FFFFFF}#wpdcom .wpd_lab


(*user_fn)(void *method, void *arg),
                        void *user_arg,
                        void *(*new_method)(int name_id,
                                            const OSSL_ALGORITHM *algodef,
                                            OSSL_PROVIDER *prov),
                        int (*up_ref_method)(void *),
                        void (*free_method)(void *))
{
    struct evp_method_data_st methdata;
    struct filter_data_st data;

    methdata.libctx = libctx;
    methdata.tmp_store = NULL;
    (void)inner_evp_generic_fetch(&methdata, NULL, operation_id, NULL, NULL,
                                  new_method, up_ref_method, free_method);

    data.operation_id = operation_id;
    data.user_fn = user_fn;
    data.user_arg = user_arg;
    if (methdata.tmp_store != NULL)
        ossl_method_store_do_all(methdata.tmp_store, &filter_on_operation_id,
                                 &data);
    ossl_method_store_do_all(get_evp_method_store(libctx),
                             &filter_on_operation_id, &data);
    dealloc_tmp_evp_method_store(methdata.tmp_store);
}

int evp_is_a(OSSL_PROVIDER *prov, int number,
             const char *legacy_name, const char *name)
{
    /*
     * For a |prov| that is NULL, the library context will be NULL
     */
    OSSL_LIB_CTX *libctx = ossl_provider_libctx(prov);
    OSSL_NAMEMAP *namemap = ossl_namemap_stored(libctx);

    if (prov == NULL)
        number = ossl_namemap_name2num(namemap, legacy_name);
    return ossl_namemap_name2num(namemap, name) == number;
}

int evp_names_do_all(OSSL_PROVIDER *prov, int number,
                     void (*fn)(const char *name, void *data),
                     void *data)
{
    OSSL_LIB_CTX *libctx = ossl_provider_libctx(prov);
    OSSL_NAMEMAP *namemap = ossl_namemap_stored(libctx);

    return ossl_namemap_doall_names(namemap, number, fn, data);
}


o raise
	 * from user space.
	 */
	sig = get_Imm16_X0(bundle) & 0x3f;
	switch (sig) {
	case SIGILL:
		maxcode = NSIGILL;
		break;
	case SIGFPE:
		maxcode = NSIGFPE;
		break;
	case SIGSEGV:
		maxcode = NSIGSEGV;
		break;
	case SIGBUS:
		maxcode = NSIGBUS;
		break;
	case SIGTRAP:
		maxcode = NSIGTRAP;
		break;
	default:
		return 0;
	}
	code = (get_Imm16_X0(bundle) >> 6) & 0xf;
	if (code <= 0 || code > maxcode)
		return 0;

	/* Make it the requested signal. */
	*sigp = sig;
	*codep = code | __SI_FAULT;
	return 1;
}

void __kprobes do_trap(struct pt_regs *regs, int fault_num,
		       unsigned long reason)
{
	siginfo_t info = { 0 };
	int signo, code;
	unsigned long address;
	bundle_bits instr;

	/* Re-enable interrupts. */
	local_irq_enable();

	/*
	 * If it hits in kernel mode and we can't fix it up, just exit the
	 * current process and hope for the best.
	 */
	if (!user_mode(regs)) {
		if (fixup_exception(regs))  /* only UNALIGN_DATA in practice */
			return;
		pr_alert("Kernel took bad trap %d at PC %#lx\n",
		       fault_num, regs->pc);
		if (fault_num == INT_GPV)
			pr_alert("GPV_REASON is %#lx\n", reason);
		show_regs(regs);
		do_exit(SIGKILL);  /* FIXME: implement i386 die() */
		return;
	}

	switch (fault_num) {
	case INT_ILL:
		if (copy_from_user(&instr, (void __user *)regs->pc,
				   sizeof(instr))) {
			pr_err("Unreadable instruction for INT_ILL:"
			       " %#lx\n", regs->pc);
			do_exit(SIGKILL);
			return;
		}
		if (!special_ill(instr, &signo, &code)) {
			signo = SIGILL;
			code = ILL_ILLOPC;
		}
		address = regs->pc;
		break;
	case INT_GPV:
#if CHIP_HAS_TILE_DMA()
		if (retry_gpv(reason))
			return;
#endif
		/*FALLTHROUGH*/
	case INT_UDN_ACCESS:
	case INT_IDN_ACCESS:
#if CHIP_HAS_SN()
	case INT_SN_ACCESS:
#endif
		signo = SIGILL;
		code = ILL_PRVREG;
		address = regs->pc;
		break;
	case INT_SWINT_3:
	case INT_SWINT_2:
	case INT_SWINT_0:
		signo = SIGILL;
		code = ILL_ILLTRP;
		address = regs->pc;
		break;
	case INT_UNALIGN_DATA:
#ifndef __tilegx__  /* Emulated support for single step debugging */
		if (unaligned_fixup >= 0) {
			struct single_step_state *state =
				current_thread_info()->step_state;
			if (!state ||
			    (void __user *)(regs->pc) != state->buffer) {
				single_step_once(regs);
				return;
			}
		}
#endif
		signo = SIGBUS;
		code = BUS_ADRALN;
		address = 0;
		break;
	case INT_DOUBLE_FAULT:
		/*
		 * For double fault, "reason" is actually passed as
		 * SYSTEM_SAVE_K_2, the hypervisor's double-fault info, so
		 * we can provide the original fault number rather than
		 * the uninteresting "INT_DOUBLE_FAULT" so the user can
		 * learn what actually struck while PL0 ICS was set.
		 */
		fault_num = reason;
		signo = SIGILL;
		code = ILL_DBLFLT;
		address = regs->pc;
		break;
#ifdef __tilegx__
	case INT_ILL_TRANS:
		signo = SIGSEGV;
		code = SEGV_MAPERR;
		if (reason & SPR_ILL_TRANS_REASON__I_STREAM_VA_RMASK)
			address = regs->pc;
		else
			address = 0;  /* FIXME: GX: single-step for address */
		break;
#endif
	default:
		panic("Unexpected do_trap interrupt number %d", fault_num);
		return;
	}

	info.si_signo = signo;
	info.si_code = code;
	info.si_addr = (void __user *)address;
	if (signo == SIGILL)
		info.si_trapno = fault_num;
	trace_unhandled_signal("trap", regs, address, signo);
	force_sig_info(signo, &info, current);
}

void kernel_double_fault(int dummy, ulong pc, ulong lr, ulong sp, ulong r52)
{
	_dump_stack(dummy, pc, lr, sp, r52);
	pr_emerg("Double fault: exiting\n");
	machine_halt();
}


INITIAL_BUCSR
	mtspr	FSL_EIS_BUCSR, r0
	isync
#endif

#if defined(QORIQ_INITIAL_HID0) && !defined(QORIQ_IS_HYPERVISOR_GUEST)
	/* HID0 initialization */
	LWI	r0, QORIQ_INITIAL_HID0
	mtspr	HID0, r0
#endif

#ifdef __powerpc64__
	LA32	r2, .TOC.
#else
	/* Invalidate TLS anchor */
	li	r2, 0

	/* Set small-data anchor */
	LA	r13, _SDA_BASE_
#endif

	SET_SELF_CPU_CONTROL	CPU_SELF, r5

	blr

.Linitmore:
	mflr	SAVED_LINK_REGISTER

	/* Invalidate all TS1 MMU entries */
	li	r3, 1
	bl	qoriq_tlb1_invalidate_all_by_ts
	PPC64_NOP_FOR_LINKER_TOC_POINTER_RESTORE

	/* Add TS1 entry for the first 4GiB of RAM */
	li	r3, SCRATCH_TLB
	li	r4, FSL_EIS_MAS1_TS
	li	r5, FSL_EIS_MAS2_M
	li	r6, FSL_EIS_MAS3_SR | FSL_EIS_MAS3_SW | FSL_EIS_MAS3_SX
	li	r7, 0
	li	r8, 0
	li	r9, 11
	bl	qoriq_tlb1_write
	PPC64_NOP_FOR_LINKER_TOC_POINTER_RESTORE

	/* MSR initialization and use TS1 for address translation */
	LWI	INITIAL_MSR, QORIQ_INITIAL_MSR
	ori	r0, INITIAL_MSR, MSR_IS | MSR_DS
#ifdef QORIQ_IS_HYPERVISOR_GUEST
	oris	r0, r0, MSR_GS >> 16
#endif
	mtmsr	r0
	isync

	/*
	 * Initialize start stack.  The stacks are statically allocated and
	 * properly aligned.
	 */
	subi	r1, START_STACK, PPC_DEFAULT_CACHE_LINE_SIZE
	li	r0, 0
	PPC_REG_STORE	r0, 0(r1)

#ifdef INITIALIZE_FPU
	bl	.Linitfpu
#endif

	mtlr	SAVED_LINK_REGISTER
	blr

.Linitmmu:
	mflr	SAVED_LINK_REGISTER

	/* Configure MMU */
	li	r4, FIRST_TLB
	li	r5, SCRATCH_TLB
	bl	qoriq_mmu_config
	PPC64_NOP_FOR_LINKER_TOC_POINTER_RESTORE
	mtmsr	INITIAL_MSR
	isync
	li	r3, SCRATCH_TLB
	bl	qoriq_tlb1_invalidate
	PPC64_NOP_FOR_LINKER_TOC_POINTER_RESTORE

	mtlr	SAVED_LINK_REGISTER
	blr

#ifdef INITIALIZE_FPU
	/*
	 * Write a value to the FPRs to initialize the hidden tag bits.  See
	 * also "Core Software Initialization Requirements" of the e500mc
	 * reference manual for example.
	 */
.Linitfpu:
	li	r0, 0
	stw	r0, 0(r1)
	stw	r0, 4(r1)
	lfd	f0, 0(r1)
	fm


 may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.embabel.agent.mcpserver.sync.support

import com.embabel.agent.api.common.autonomy.Autonomy
import com.embabel.agent.core.Goal
import com.embabel.agent.mcpserver.sync.McpPromptFactory
import com.embabel.agent.mcpserver.sync.McpPromptPublisher
import com.embabel.common.util.indent
import io.modelcontextprotocol.server.McpServerFeatures
import org.springframework.stereotype.Service

/**
 * Publish MCP prompts for each goal's starting input types, if specified.
 * This allows the MCP server to provide prompts based on the specific input types required by each goal.
 */
@Service
class PerGoalStartingInputTypesPromptPublisher(
    private val autonomy: Autonomy,
) : McpPromptPublisher {

    override fun prompts(): List<McpServerFeatures.SyncPromptSpecification> {
        return autonomy.agentPlatform.goals.flatMap { goal ->
            promptsForGoal(goal)
        }
    }

    fun promptsForGoal(goal: Goal): List<McpServerFeatures.SyncPromptSpecification> {
        val mcpPromptFactory = McpPromptFactory()
        return goal.export.startingInputTypes.map { inputType ->
            mcpPromptFactory.syncPromptSpecificationForType(
                goal = goal,
                inputType,
            )
        }
    }

    override fun infoString(
        verbose: Boolean?,
        indent: Int,
    ): String = "${javaClass.simpleName}(prompts=${prompts().size})".indent(indent)

}
package com.embabel.tripper.util

import com.embabel.common.util.StringTransformer
import kotlinx.coroutines.*
import org.slf4j.LoggerFactory
import java.net.HttpURLConnection
import java.net.URL

/**
 * Checks the validity of image links in HTML content.
 */
object ImageChecker {

    private val logger = LoggerFactory.getLogger(ImageChecker::class.java)

    private val IMG_REX = "<img[^>]*>".toRegex()
    private val SRC_REX = "src=[\"']([^\"']*)[\"']".toRegex()

    val removeInvalidImageLinks = StringTransformer { html ->
        runBlocking {
            val imgTags = IMG_REX.findAll(html).toList()
            val validationResults = imgTags.map { matchResult ->
                async(Dispatchers.IO) {
                    val imgTag = matchResult.value
                    val srcMatch = SRC_REX.find(imgTag)
                    val src = srcMatch?.groupValues?.get(1)

                    val isValid = src?.let { isImageUrlValid(it) } ?: false
                    matchResult to isValid
                }
            }.awaitAll()

            var result = html
            validationResults.forEach { (matchResult, isValid) ->
                if (!isValid) {
                    logger.info("Removing invalid image link: {}", matchResult.value)
                    result = result.replace(matchResult.value, "")
                }
            }
            result
        }
    }

    private suspend fun isImageUrlValid(url: String): Boolean = withContext(Dispatchers.IO) {
        try {
            val connection = URL(url).openConnection() as HttpURLConnection
            connection.requestMethod = "HEAD"
            connection.connectTimeout = 5000
            connection.readTimeout = 5000
            connection.setRequestProperty("User-Agent", "Mozilla/5.0")

            val responseCode = connection.responseCode
            val contentType = connection.contentType

            connection.disconnect()