F6EF,
    "message-settings-variant": F6F0,
    "message-text": F369,
    "message-text-outline": F36A,
    "message-video": F36B,
    "meteor": F629,
    "metronome": F7D9,
    "metronome-tick": F7DA,
    "micro-sd": F7DB,
    "microphone": F36C,
    "microphone-minus": F8B2,
    "microphone-off": F36D,
    "microphone-outline": F36E,
    "microphone-plus": F8B3,
    "microphone-settings": F36F,
    "microphone-variant": F370,
    "microphone-variant-off": F371,
    "microscope": F654,
    "microsoft": F372,
    "microsoft-dynamics": F987,
    "microwave": FC75,
    "midi": F8F0,
    "midi-port": F8F1,
    "mine": FDB6,
    "minecraft": F373,
    "mini-sd": FA04,
    "minidisc": FA05,
    "minus": F374,
    "minus-box": F375,
    "minus-box-outline": F6F1,
    "minus-circle": F376,
    "minus-circle-outline": F377,
    "minus-network": F378,
    "minus-network-outline": FC76,
    "mixcloud": F62A,
    "mixed-martial-arts": FD6B,
    "mixed-reality": F87E,
    "mixer": F7DC,
    "molecule": FB88,
    "monitor": F379,
    "monitor-cellphone": F988,
    "monitor-cellphone-star": F989,
    "monitor-dashboard": FA06,
    "monitor-lock": FDB7,
    "monitor-multiple": F37A,
    "monitor-off": FD6C,
    "monitor-star": FDB8,
    "more": F37B,
    "mother-nurse": FCFD,
    "motion-sensor": FD6D,
    "motorbike": F37C,
    "mouse": F37D,
    "mouse-bluetooth": F98A,
    "mouse-off": F37E,
    "mouse-variant": F37F,
    "mouse-variant-off": F380,
    "move-resize": F655,
    "move-resize-variant": F656,
    "movie": F381,
    "movie-outline": FDB9,
    "movie-roll": F7DD,
    "muffin": F98B,
    "multiplication": F382,
    "multiplication-box": F383,
    "mushroom": F7DE,
    "mushroom-outline": F7DF,
    "music": F759,
    "music-box": F384,
    "music-box-outline": F385,
    "music-circle": F386,
    "music-circle-outline": FAD3,
    "music-note": F387,
    "music-note-bluetooth": F5FE,
    "music-note-bluetooth-off": F5FF,
    "music-note-eighth": F388,
    "music-note-half": F389,
    "music-note-off": F38A,
    "music-note-plus": FDBA,
    "music-note-quarter": F38B,
    "music-note-sixteenth": F38C,
    "music-note-whole": F38D,
    "music-off": F75A,
    "nail": FDBB,
    "nas": F8F2,
    "nativescript": F87F,
    "nature": F38E,
    "nature-people": F38F,
    "navigation": F390,
    "near-me": F5CD,
    "need


   binding?.apply {
            webview.loadUrlFrogoExt("https://www.google.com")
        }
    }

}package com.frogobox.appkeyboard.data.local.db

import android.content.Context
import androidx.room.Database
import androidx.room.Room
import androidx.room.RoomDatabase
import com.frogobox.appkeyboard.BuildConfig
import com.frogobox.appkeyboard.data.local.autotext.AutoTextDao
import com.frogobox.appkeyboard.model.AutoTextEntity

/**
 * Created by Faisal Amir on 06/01/23
 * -----------------------------------------
 * E-mail   : faisalamircs@gmail.com
 * Github   : github.com/amirisback
 * -----------------------------------------
 * Copyright (C) Frogobox ID / amirisback
 * All rights reserved
 */

@Database(
    entities = [
        AutoTextEntity::class
    ], version = 1,
    exportSchema = true
)
abstract class AppDatabase : RoomDatabase() {

    abstract fun autoTextDao(): AutoTextDao

    companion object {

        private const val DATABASE_NAME = BuildConfig.DATABASE_NAME

        fun newInstance(context: Context): AppDatabase {
            return buildDatabase(context)
        }

        private fun buildDatabase(context: Context): AppDatabase {
            return if (BuildConfig.DEBUG) {
                Room.databaseBuilder(context.applicationContext, AppDatabase::class.java, DATABASE_NAME)
                    .fallbackToDestructiveMigration() // FOR DEVELOPMENT ONLY !!!!
                    .build()
            } else {
                Room.databaseBuilder(context.applicationContext, AppDatabase::class.java, DATABASE_NAME)
                    .build()
            }
        }

    }
}package com.frogobox.libkeyboard.ui.main

import android.annotation.SuppressLint
import android.content.Context
import android.graphics.*
import android.graphics.Paint.Align
import android.graphics.drawable.LayerDrawable
import android.os.Build
import android.os.Handler
import android.os.Message
import android.util.AttributeSet
import android.util.TypedValue
import android.view.*
import android.view.accessibility.AccessibilityEvent
import android.view.accessibility.AccessibilityManager
import android.widget.*
import androidx.annotation.RequiresApi
import androidx.core.content.res.ResourcesCompat
import com.frogobox.libkeyboard.R
import com.frogobox.libkeyboard.common.ext.adjustAlpha
import com.frogobox.libkeyboard.common.ext.applyColorFilter
import com.frogobox.libkeyboard.ui.main.ItemMainKeyboard.Companion.KEYCODE_DELETE
import com.frogobox.libkeyboard.ui.main.ItemMainKeyboard.Companion.KEYCODE_EMOJI
import com.frogobox.libkeyboard.ui.main.ItemMainKeyboard.Companion.KEYCODE_ENTER
import com.frogobox.libkeyboard.ui.main.ItemMainKeyboard.Companion.KEYCODE_MODE_CHANGE
import com.frogobox.libkeyboard.ui.main.ItemMainKeyboard.Companion.KEYCODE_SHIFT
import com.frogobox.libkeyboard.ui.main.ItemMainKeyboard.Companion.KEYCODE_SPACE
import com.frogobox.libkeyboard.ui.main.ItemMainKeyboard.Companion.MAX_KEYS_PER_MINI_ROW
import com.frogobox.libkeyboard.ui.main.ItemMainKeyboard.Companion.SHIFT_OFF
import com.frogobox.libkeyboard.ui.main.ItemMainKeyboard.Companion.SHIFT_ON_ONE_CHAR
import com.frogobox.libkeyboard.ui.main.ItemMainKeyboard.Companion.SHIFT_ON_PERMANENT
import com.frogobox.sdk.ext.getColorExt
import java.util.*
import kotlin.math.floor
import kotlin.math.max
import kotlin.math.min

@SuppressLint("UseCompatLoadingForDrawables", "ClickableViewAccessibility")
class MainKeyboard @JvmOverloads


.FIELD_BUILD_IN)
                        .where(Role.FIELD_ID));
    }

    @Override
    public Role selectRoleSimpleByCode(String roleCode) {
        List<Role> roles = selectOptional(new Role().setCode(roleCode),
                new Criteria().select(Role.FIELD_ID, Role.FIELD_CODE, Role.FIELD_NAME, Role.FIELD_TENANT_ID, Role.FIELD_LEVEL)
                        .where(Role.FIELD_CODE));
        if (CollectionUtils.isEmpty(roles)) {
            return null;
        }
        if (roles.size() > 1) {
            throw new CommonException("hiam.warn.overOneRoleByCode");
        }
        return roles.get(0);
    }

    @Override
    public Role selectOneRoleByCode(String roleCode) {
        List<Role> list = select(Role.FIELD_CODE, roleCode);
        if (CollectionUtils.isEmpty(list)) {
            return null;
        }
        if (list.size() > 1) {
            throw new CommonException("hiam.warn.overOneRoleByCode");
        }
        return list.get(0);
    }

    @Override
    public Role selectRoleSimpleByLevelPath(String levelPath) {
        return selectOneOptional(new Role().setLevelPath(levelPath),
                new Criteria().select(Role.FIELD_ID, Role.FIELD_CODE, Role.FIELD_TENANT_ID, Role.FIELD_IS_ENABLED, Role.FIELD_LEVEL)
                        .where(Role.FIELD_LEVEL_PATH));
    }

    @Override
    public List<Role> selectBuiltInRoles(boolean includeSuperAdmin) {
        if (includeSuperAdmin) {
            return selectByCondition(Condition.builder(Role.class)
                    .andWhere(Sqls.custom().andEqualTo(Role.FIELD_BUILD_IN, BaseConstants.Flag.YES)).build());
        } else {
            return selectByCondition(Condition.builder(Role.class)
                    .andWhere(Sqls.custom().andEqualTo(Role.FIELD_BUILD_IN, BaseConstants.Flag.YES)
                            .andNotEqualTo(Role.FIELD_PARENT_ROLE_ID, Role.ROOT_ID))
                    .build());
        }
    }

    @Override
    @ProcessLovValue
    public Page<RoleVO> selectMemberRoles(Long memberId, HiamMemberType memberType, MemberRoleSearchDTO memberRoleSearchDTO, PageRequest pageRequest) {
        CustomUserDetails self = UserUtils.getUserDetails();

        // 成员角色
        Future<Page<RoleVO>> main = executor.submit(() -> {
            DetailsHelper.setCustomUserDetails(self);
            return PageHelper.doPage(pageRequest, () -> selectMemberRoles(memberId, memberType, memberRoleSearchDTO));
        });
        // 可管理的角色ID
        Future<List<Long>> f1 = executor.submit(() -> selectAllManageableRoleIds(null, self));
        // 查询已分配的角色
        Future<List<MemberRole>> f2 = executor.submit(() -> {
            if (!HiamMemberType.USER.equals(memberType)) {
                return new ArrayList<>();
            }
            return selectCantRemoveAssignedRoles(Lists.newArrayList(memberId), self);
        });

        Page<RoleVO> page;
        List<Long> allManageRoleIds;
        List<MemberRole> cantRemoveRoles;
        try {
            page = main.get();
            allManageRoleIds = f1.get();
            cantRemoveRoles = f2.get();
        } catch (Exception e) {
            LOGGER.warn("Query executor error", e);
            throw new CommonException(BaseConstants.ErrorCode.ERROR);
        }

        Role.setupRoleControlFlag(page, allManageRoleIds, cantRemoveRoles, memberId, self);

        return page;
    }

    @Override
    public List<MemberR


= NULL) || (*a != ret)))
		M_ASN1_GENERALIZEDTIME_free(ret);
	return(NULL);
	}

#endif

int ASN1_GENERALIZEDTIME_check(ASN1_GENERALIZEDTIME *d)
	{
	static const int min[9]={ 0, 0, 1, 1, 0, 0, 0, 0, 0};
	static const int max[9]={99, 99,12,31,23,59,59,12,59};
	char *a;
	int n,i,l,o;

	if (d->type != V_ASN1_GENERALIZEDTIME) return(0);
	l=d->length;
	a=(char *)d->data;
	o=0;
	/* GENERALIZEDTIME is similar to UTCTIME except the year is
         * represented as YYYY. This stuff treats everything as a two digit
         * field so make first two fields 00 to 99
         */
	if (l < 13) goto err;
	for (i=0; i<7; i++)
		{
		if ((i == 6) && ((a[o] == 'Z') ||
			(a[o] == '+') || (a[o] == '-')))
			{ i++; break; }
		if ((a[o] < '0') || (a[o] > '9')) goto err;
		n= a[o]-'0';
		if (++o > l) goto err;

		if ((a[o] < '0') || (a[o] > '9')) goto err;
		n=(n*10)+ a[o]-'0';
		if (++o > l) goto err;

		if ((n < min[i]) || (n > max[i])) goto err;
		}
	/* Optional fractional seconds: decimal point followed by one
	 * or more digits.
	 */
	if (a[o] == '.')
		{
		if (++o > l) goto err;
		i = o;
		while ((a[o] >= '0') && (a[o] <= '9') && (o <= l))
			o++;
		/* Must have at least one digit after decimal point */
		if (i == o) goto err;
		}

	if (a[o] == 'Z')
		o++;
	else if ((a[o] == '+') || (a[o] == '-'))
		{
		o++;
		if (o+4 > l) goto err;
		for (i=7; i<9; i++)
			{
			if ((a[o] < '0') || (a[o] > '9')) goto err;
			n= a[o]-'0';
			o++;
			if ((a[o] < '0') || (a[o] > '9')) goto err;
			n=(n*10)+ a[o]-'0';
			if ((n < min[i]) || (n > max[i])) goto err;
			o++;
			}
		}
	else
		{
		/* Missing time zone information. */
		goto err;
		}
	return(o == l);
err:
	return(0);
	}

int ASN1_GENERALIZEDTIME_set_string(ASN1_GENERALIZEDTIME *s, const char *str)
	{
	ASN1_GENERALIZEDTIME t;

	t.type=V_ASN1_GENERALIZEDTIME;
	t.length=strlen(str);
	t.data=(unsigned char *)str;
	if (ASN1_GENERALIZEDTIME_check(&t))
		{
		if (s != NULL)
			{
			if (!ASN1_STRING_set((ASN1_STRING *)s,
				(unsigned char *)str,t.length))
				return 0;
			s->type=V_ASN1_GENERALIZEDTIME;
			}
		return(1);
		}
	else
		return(0);
	}

ASN1_GENERALIZEDTIME *ASN1_GENERALIZEDTIME_set(ASN1_GENERALIZEDTIME *s,
	     time_t t)
	{
		return ASN1_GENERALIZEDTIME_adj(s, t, 0, 0);
	}

ASN1_GENERALIZEDTIME *ASN1_GENERALIZEDTIME_adj(ASN1_GENERALIZEDTIME *s,
	     time_t t, int offset_day, long offset_sec)
	{
	char *p;
	struct tm *ts;
	struct tm data;
	size_t len = 20;

	if (s == NULL)
		s=M_ASN1_GENERALIZEDTIME_new();
	if (s == NULL)
		return(NULL);

	ts=OPENSSL_gmtime(&t, &data);
	if (ts == NULL)
		return(NULL);

	if (offset_day || offset_sec)
		{
		if (!OPENSSL_gmtime_adj(ts, offset_day, offset_sec))
			return NULL;
		}

	p=(char *)s->data;
	if ((p == NULL) || ((size_t)s->length < len))
		{
		p=OPENSSL_malloc(len);
		if (p == NULL)
			{
			ASN1err(ASN1_F_ASN1_GENERALIZEDTIME_ADJ,
				ERR_R_MALLOC_FAILURE);
			return(NULL);
			}
		if (s->data != NULL)
			OPENSSL_free(s->data);
		s->data=(unsigned char *)p;
		}

	BIO_snprintf(p,len,"%04d%02d%02d%02d%02d%02dZ",ts->tm_year + 1900,
		     ts->tm_mon+1,ts->tm_mday,ts->tm_hour,ts->tm_min,ts->tm_sec);
	s->length=strlen(p);
	s->type=V_ASN1_GENERALIZEDTIME;
#ifdef CHARSET_EBCDIC_not
	ebcdic2ascii(s->data, s->data, s->length);
#endif
	return(s);
	}


ight
  ];

  this.drawingContext.globalCompositeOperation = 'destination-in';
  this.copy.apply(this, copyArgs);
  this.drawingContext.globalCompositeOperation = currBlend;
};

/**
 * Applies an image filter to a p5.Image
 *
 * @method filter
 * @param {String} operation one of threshold, gray, invert, posterize and
 *                           opaque see Filters.js for docs on each available
 *                           filter
 * @param {Number|undefined} value
 * @example
 *

 * var photo1;
 * var photo2;
 *
 * function preload() {
 *   photo1 = loadImage("assets/rockies.jpg");
 *   photo2 = loadImage("assets/rockies.jpg");
 * }
 *
 * function setup() {
 *   photo2.filter("gray");
 *   image(photo1, 0, 0);
 *   image(photo2, width/2, 0);
 * }
 *

 */
p5.Image.prototype.filter = function(operation, value) {
  Filters.apply(this.canvas, Filters[operation.toLowerCase()], value);
};

/**
 * Copies a region of pixels from one image to another, using a specified
 * blend mode to do the operation.
 *
 * @method blend
 * @param  {p5.Image|undefined} srcImage source image
 * @param  {Integer} sx X coordinate of the source's upper left corner
 * @param  {Integer} sy Y coordinate of the source's upper left corner
 * @param  {Integer} sw source image width
 * @param  {Integer} sh source image height
 * @param  {Integer} dx X coordinate of the destination's upper left corner
 * @param  {Integer} dy Y coordinate of the destination's upper left corner
 * @param  {Integer} dw destination image width
 * @param  {Integer} dh destination image height
 * @param  {Integer} blendMode the blend mode
 *
 * Available blend modes are: normal | multiply | screen | overlay |
 *            darken | lighten | color-dodge | color-burn | hard-light |
 *            soft-light | difference | exclusion | hue | saturation |
 *            color | luminosity
 *
 *
 * http://blogs.adobe.com/webplatform/2013/01/28/blending-features-in-canvas/
 * @example
 *

 * var mountains;
 * var bricks;
 *
 * function preload() {
 *   mountains = loadImage("assets/rockies.jpg");
 *   bricks = loadImage("assets/bricks_third.jpg");
 * }
 *
 * function setup() {
 *   mountains.blend(bricks, 0, 0, 33, 100, 67, 0, 33, 100, ADD);
 *   image(mountains, 0, 0);
 *   image(bricks, 0, 0);
 * }
 *

 *

 * var mountains;
 * var bricks;
 *
 * function preload() {
 *   mountains = loadImage("assets/rockies.jpg");
 *   bricks = loadImage("assets/bricks_third.jpg");
 * }
 *
 * function setup() {
 *   mountains.blend(bricks, 0, 0, 33, 100, 67, 0, 33, 100, DARKEST);
 *   image(mountains, 0, 0);
 *   image(bricks, 0, 0);
 * }
 *

 *

 * var mountains;
 * var bricks;
 *
 * function preload() {
 *   mountains = loadImage("assets/rockies.jpg");
 *   bricks = loadImage("assets/bricks_third.jpg");
 * }
 *
 * function setup() {
 *   mountains.blend(bricks, 0, 0, 33, 100, 67, 0, 33, 100, LIGHTEST);
 *   image(mountains, 0, 0);
 *   image(bricks, 0, 0);
 * }
 *

 */
p5.Image.prototype.blend = function() {
  p5.prototype.blend.


h zeros in all dimensions, we don't need to do
			anything fancy yet; just set eta[l] = quadrature.eta[eta_count[l]], etc. Same goes
			for the weighting w.
		*/

		w = 1.0 ;

		for (int l = 0 ; l < spacedim ; ++l) {

			eta[l]  = quadrature.eta[eta_count[l]] ;
			w      *= quadrature.w[eta_count[l]] ;

		}

		J_mat = J (eta) ;
		J_inv = J_mat.inverse() ;

		/*
			Build the B matrix at this gauss point:
		*/

		for (int j = 0 ; j < spacedim * pow(2, spacedim) ; ++j) {

			shape_grad_j      = J_inv * linear_shape_function.GetShapeFunctionGradientsVector(shape_j, eta) ;
			shape_grad_j_full = linear_shape_function.GetShapeFunctionGradientsFullVector(shape_grad_j, dim_j) ;

			B_mat.col(j)      = shape_grad_j_full ;

			if (dim_j < spacedim-1) {
				dim_j = dim_j + 1 ;
			}

			else {
				dim_j = 0 ;
				shape_j = shape_j + 1 ;
			}

		} // for j (columns in B).

		eta_count = quadrature.UpdateEtaCounter(eta_count) ;

		/*
			Add to the K matrix:
		*/

		f_thermal += B_mat.transpose() * C * epsilon * alphaT * DeltaT * w * J_mat.determinant() ;

	} // for k (gauss points).

	return f_thermal ;

}

MatrixXd SolidElement :: FThermalExpansion (VectorXd deltaT_vector) {

	MatrixXd J_mat, J_inv, f_thermal = MatrixXd::Zero (pow(2, spacedim) * spacedim, 1) ;
	MatrixXd C = mesh.solid_materials[material_id].C ;
	VectorXd shape_grad_j, shape_grad_j_full ;
	VectorXd epsilon = VectorXd::Zero(4);
	epsilon[0] = 1;
	epsilon[3] = 1;

	double alphaT = mesh.solid_materials[material_id].alphaT ;

	double w ;
	vector<double> eta (spacedim, 0), eta_count (spacedim, 0) ;

	/*
		grad(u(x)) = [B] * {u}
	*/

	MatrixXd B_mat = MatrixXd::Zero (spacedim * spacedim, pow(2, spacedim) * spacedim) ;

	int n_gauss = pow (order, spacedim) ;

	for (int k = 0 ; k < n_gauss ; ++k) {

		int shape_j = 0, dim_j = 0 ;

		/*
			The first gauss point is located at eta = [quadrature.eta[0], quadrature.eta[0], ...].
			Since eta_count was initialized with zeros in all dimensions, we don't need to do
			anything fancy yet; just set eta[l] = quadrature.eta[eta_count[l]], etc. Same goes
			for the weighting w.
		*/

		w = 1.0 ;

		for (int l = 0 ; l < spacedim ; ++l) {

			eta[l]  = quadrature.eta[eta_count[l]] ;
			w      *= quadrature.w[eta_count[l]] ;

		}

		VectorXd lsfvals =  linear_shape_function.GetShapeFunctionValuesVector(eta);

		double DeltaT = deltaT_vector.dot(lsfvals);

		J_mat = J (eta) ;
		J_inv = J_mat.inverse() ;

		/*
			Build the B matrix at this gauss point:
		*/

		for (int j =


getcapstyle() != CapButt)
			// MM-2013-11-21: [[ Bug 11395 ]] Pass single point to draw lines, indicating we want to draw a dot.
			dc -> drawlines(&pts[i], 1, false);

		i += count + 1;
	}
}

void MCGraphic::fill_polygons(MCDC *dc, MCPoint *pts, uint2 npts)
{
	if (getfillrule() == kMCFillRuleNone || !getflag(F_G_ANTI_ALIASED))
	{
		uint2 i = 0;
		while (i < npts)
		{
			uint2 count = 0;
			Boolean vx = False;
			Boolean vy = False;
			while (i + count < npts && pts[count + i].x != MININT2)
			{
				if (pts[count + i].x != pts[i].x)
					vx = True;
				if (pts[count + i].y != pts[i].y)
					vy = True;
				count++;
			}
			if (vx && vy && count > 2) // mac crashes on print if !vx || !vy
				dc->fillpolygon(&pts[i], count);
			i += count + 1;
		}
	}
	else
	{
		MCPath *t_path;
		t_path = MCPath::create_polypolygon(pts, npts, true);
		dc -> fillpath(t_path, getfillrule() == kMCFillRuleEvenOdd);
		t_path -> release();
	}
}

void MCGraphic::compute_extents(MCPoint *pts, uint2 npts, int2 &minx,
                                int2 &miny, int2 &maxx, int2 &maxy)
{
	minx = miny = MAXINT2;
	maxx = maxy = MININT2;
	uint2 i;
	for (i = 0 ; i < npts ; i++)
		if (pts[i].x != MININT2)
		{
			if (pts[i].x > maxx)
				maxx = pts[i].x;
			if (pts[i].x < minx)
				minx = pts[i].x;
			if (pts[i].y > maxy)
				maxy = pts[i].y;
			if (pts[i].y < miny)
				miny = pts[i].y;
		}
}

MCRectangle MCGraphic::expand_minrect(const MCRectangle &srect)
{
	MCRectangle trect;
	if (flags & F_DONT_RESIZE)
		return srect;
	if (linesize)
	{
		uint2 t_linesize = linesize;
		switch (getstyleint(flags))
		{
		case F_POLYGON:
		case F_CURVE:
			if (getjoinstyle() == JoinMiter && m_stroke_miter_limit > 1)
				t_linesize = (uint2)ceil(t_linesize * m_stroke_miter_limit);
		case F_LINE:
			if (getcapstyle() == CapProjecting)
				t_linesize = MCU_max(t_linesize, (uint2)ceil(t_linesize * 1.414213562));
		case F_REGULAR:
			if (flags & (F_START_ARROW | F_END_ARROW))
				trect = MCU_reduce_rect(srect, -get_arrow_size());
			else
				trect = MCU_reduce_rect(srect, (int2)-((t_linesize >> 1) + 1));
			break;
		default:
			trect = MCU_reduce_rect(srect, -((t_linesize >> 1) + 1));
			break;
		}
	}
	else
		trect = rect;
	if (getstyleint(flags) == F_POLYGON)
	{
		if (flags & F_MARKER_DRAWN)
		{
			int2 minx


_rail_rovly_02',
	[-1572972656] = 'id2_rail_rovly_03',
	[-730743818] = 'id2_rail_rovly_04',
	[-1230864296] = 'id2_rail_rovly_05',
	[-402889973] = 'id2_rail_rovly_06',
	[-647379482] = 'id2_rail_rovly_07',
	[1874962896] = 'id2_rd_154',
	[251596710] = 'id2_rd_b02_o',
	[-550526110] = 'id2_rd_b02',
	[806316173] = 'id2_rd_b03_o',
	[823248677] = 'id2_rd_b03',
	[456179218] = 'id2_rd_b03c',
	[705183184] = 'id2_rd_b04_o',
	[-224478057] = 'id2_rd_bridgea_hi',
	[-2084693801] = 'id2_rd_bridgeb_hi',
	[2143580863] = 'id2_rd_britdec003',
	[224321795] = 'id2_rd_britun01',
	[1722053367] = 'id2_rd_dtown01',
	[586366980] = 'id2_rd_fizza_00',
	[882828123] = 'id2_rd_fizza_01',
	[576569049] = 'id2_rd_fizza_02',
	[1883724459] = 'id2_rd_fizza_03',
	[2122151703] = 'id2_rd_fizza_04',
	[1287230352] = 'id2_rd_fizza_05',
	[1459136526] = 'id2_rd_fizza_06',
	[1251086213] = 'id2_rd_fizza_07',
	[1414275833] = 'id2_rd_fizza_08',
	[-1548271218] = 'id2_rd_fizza_09',
	[55902704] = 'id2_rd_fizza_10',
	[327852635] = 'id2_rd_fizza_11',
	[69075846] = 'id2_rd_fizza_12',
	[368027433] = 'id2_rd_fizza_13',
	[1858296015] = 'id2_rd_fizza_14',
	[-2140013524] = 'id2_rd_fizza_15',
	[1282380840] = 'id2_rd_fizza_16',
	[-1494202072] = 'id2_rd_fizza_17',
	[-1188106843] = 'id2_rd_fizza_18',
	[1280135776] = 'id2_rd_glue00',
	[1525444510] = 'id2_rd_glue01',
	[-374141651] = 'id2_rd_glue02',
	[-160094543] = 'id2_rd_glue03',
	[89638006] = 'id2_rd_glue04',
	[335700427] = 'id2_rd_glue05',
	[-1022902313] = 'id2_rd_glue06',
	[394546791] = 'id2_rd_id2_tel_00',
	[572416923] = 'id2_rd_id2_tel_01',
	[1015191651] = 'id2_rd_id2_tel_02',
	[1539135192] = 'id2_rd_id2_tel_04',
	[1963362666] = 'id2_rd_id2_tel_05',
	[-2011549807] = 'id2_rd_id2_tel_06',
	[-1855176139] = 'id2_rd_id2_tel_07',
	[-1564023574] = 'id2_rd_id2_tel_08',
	[1320439230] = 'id2_rd_id2_tel_13',


PopupArea .emojiPopupArea-editor .emojioneemoji,.emojiPopupArea .emojiPopupArea-editor [class*=emojione-] {
font-size:inherit;
height:2ex;
width:2.1ex;
min-height:18px;
min-width:18px;
display:inline-block;
margin:-.2ex .15em .2ex;
line-height:normal;
vertical-align:middle;
max-width:100%;
top:0
}

.emojiPopupArea.emojiPopupArea-inline {
height:34px
}

.emojiPopupArea.emojiPopupArea-inline>.emojiPopupArea-editor {
height:32px;
min-height:20px;
overflow:hidden;
white-space:nowrap;
position:absolute;
top:0;
left:12px;
right:24px;
padding:6px 0
}

.emojiPopupArea.emojiPopupArea-inline>.emojiPopupArea-button {
top:4px
}

.emojiPopupArea .emojiPopupArea-button {
display:none;
z-index:5;
position:absolute;
right:3px;
top:3px;
width:36px;
height:36px;
opacity:.6;
cursor:pointer;
-moz-transition:opacity .3s ease-in-out;
-o-transition:opacity .3s ease-in-out;
-webkit-transition:opacity .3s ease-in-out;
transition:opacity .3s ease-in-out
}

.emojiPopupArea .emojiPopupArea-button:hover {
opacity:1
}

.emojiPopupArea .emojiPopupArea-button>div {
display:block;
width:36px;
height:36px;
position:absolute;
-moz-transition:all .4s ease-in-out;
-o-transition:all .4s ease-in-out;
-webkit-transition:all .4s ease-in-out;
transition:all .4s ease-in-out
}

.emojiPopupArea .emojiPopupArea-button>div.emojiPopupArea-button-open {
background-position:0 -24px;
filter:alpha(enabled=false);
opacity:1
}

.emojiPopupArea .emojiPopupArea-button>div.emojiPopupArea-button-close {
background-position:0 0;
-webkit-transform:rotate(-45deg);
-o-transform:rotate(-45deg);
transform:rotate(-45deg);
filter:alpha(Opacity=0);
opacity:0
}

.emojiPopupArea .emojiPopupArea-button.active>div.emojiPopupArea-button-open {
-webkit-transform:rotate(45deg);
-o-transform:rotate(45deg);
transform:rotate(45deg);
filter:alpha(Opacity=0);
opacity:0
}

.emojiPopupArea .emojiPopupArea-button.active>div.emojiPopupArea-button-close {
-webkit-transform:rotate(0);
-o-transform:rotate(0);
transform:rotate(0);
filter:alpha(enabled=false);
opacity:1
}

.emojiPopupArea .emojiPopupArea-picker {
background:#fff;
position:absolute;
-moz-box-shadow:0 1px 5px rgba(0,0,0,.32);
-webkit-box-shadow:0 1px 5px rgba(0,0,0,.32);
box-shadow:0 1px 5px rgba(0,0,0,.32);
height:236px;
width:444px;
top:-15px;
right:-15px;
z-index:90;
-moz-transition:all .25s ease-in-out;
-o-transition:all .25s ease-in-out;
-webkit-transition:all .25s ease-in-out;
transition:all .25s ease-in-out;
filter:alpha(Opacity=0);
opacity


		s7x.SetOptionRange( "Weapons", true );
						s7x.SetOption( "Weapons", "Runics", false );
						s7x.SetOptionRange( "Armor", true );

						s7x.SetOption( "Potions", "Refresh", true );
						s7x.SetOption( "Items", "Bandages", true );
						s7x.SetOption( "Items", "Trapped Containers", true );
						#endregion

						m_Root.Defaults = new Ruleset[] { m5x, m7x, s7x };
					}
					else
					{
						#region Standard All Skills

						Ruleset all = new Ruleset( m_Root );

						all.Title = "Standard All Skills";

						all.SetOptionRange( "Spells", true );

						all.SetOption( "Spells", "Wall of Stone", false );
						all.SetOption( "Spells", "Fire Field", false );
						all.SetOption( "Spells", "Poison Field", false );
						all.SetOption( "Spells", "Energy Field", false );
						all.SetOption( "Spells", "Teleport", false );
						all.SetOption( "Spells", "Wall of Stone", false );
						all.SetOption( "Spells", "Arch Protection", false );
						all.SetOption( "Spells", "Recall", false );
						all.SetOption( "Spells", "Blade Spirits", false );
						all.SetOption( "Spells", "Incognito", false );
						all.SetOption( "Spells", "Magic Reflection", false );
						all.SetOption( "Spells", "Paralyze", false );
						all.SetOption( "Spells", "Summon Creature", false );
						all.SetOption( "Spells", "Invisibility", false );
						all.SetOption( "Spells", "Mark", false );
						all.SetOption( "Spells", "Paralyze Field", false );
						all.SetOption( "Spells", "Energy Field", false );
						all.SetOption( "Spells", "Gate Travel", false );
						all.SetOption( "Spells", "Polymorph", false );
						all.SetOption( "Spells", "Energy Vortex", false );
						all.SetOption( "Spells", "Air Elemental", false );
						all.SetOption( "Spells", "Summon Daemon", false );
						all.SetOption( "Spells", "Earth Elemental", false );
						all.SetOption( "Spells", "Fire Elemental", false );
						all.SetOption( "Spells", "Water Elemental", false );
						all.SetOption( "Spells", "Earthquake", false );
						all.SetOption( "Spells", "Meteor Swarm", false );
						all.SetOption( "Spells", "Chain Lightning", false );
						all.SetOption( "Spells", "Resurrection", false );

						all.SetOptionRange( "Necromancy", true );
						all.SetOption( "Necromancy", "Summon Familiar", false );
						all.SetOption( "Necromancy", "Vengeful Spirit", false );
						all.SetOption( "Necromancy", "Animate Dead", false );
						all.SetOption( "Necromancy", "Wither", false );
						all.SetOption( "Necromancy", "Poison Strike", false );

						all.SetOptionRange( "Chivalry", true );
						all.SetOption( "Chivalry", "Sacred Journey", false );
						all.SetOption( "Chivalry", "Enemy of One", false );
						all.SetOption( "Chivalry", "Noble Sacrifice", false );

						all.SetOptionRange( "Combat Abilities", true );
						all.SetOption( "Combat Abilities", "Paralyzing Blow", false );
						all.SetOption( "Combat Abilities", "Shadow Strike",


# Copyright © 2021 United States Government as represented by the Administrator of the National Aeronautics and Space Administration.  All Rights Reserved.

from os.path import dirname, join
import sys
import unittest
from testbook import testbook

sys.path.append(join(dirname(__file__), ".."))

class TestTutorialsPartTwo(unittest.TestCase):
    def run_notebook_test(self, notebook_path):
        with testbook(notebook_path, execute=True, timeout=1200) as tb:
            self.assertEqual(tb.__class__.__name__, "TestbookNotebookClient")

    def test_notebook_tutorials(self):
        notebook_paths = [
            "./examples/07_State Estimation.ipynb",
            "./examples/08_Prediction.ipynb",
            "./examples/09_Prognostic Example.ipynb",
            "./examples/10_Prognostics Server.ipynb",
        ]
        for notebook_path in notebook_paths:
            self.run_notebook_test(notebook_path)

def main():
    load_test = unittest.TestLoader()
    runner = unittest.TextTestRunner()
    print("\n\nTesting Tutorials - Part 3")
    result = runner.run(
        load_test.loadTestsFromTestCase(TestTutorialsPartTwo)
    ).wasSuccessful()

    if not result:
        raise Exception("Failed test")

if __name__ == "__main__":
    main()


, df_key, NULL, 1))
            return 0;

        drbg->min_entropylen = ctr->keylen;
        drbg->max_entropylen = DRBG_MAX_LENGTH;
        drbg->min_noncelen = drbg->min_entropylen / 2;
        drbg->max_noncelen = DRBG_MAX_LENGTH;
        drbg->max_perslen = DRBG_MAX_LENGTH;
        drbg->max_adinlen = DRBG_MAX_LENGTH;
    } else {
        drbg->min_entropylen = drbg->seedlen;
        drbg->max_entropylen = drbg->seedlen;
        /* Nonce not used */
        drbg->min_noncelen = 0;
        drbg->max_noncelen = 0;
        drbg->max_perslen = drbg->seedlen;
        drbg->max_adinlen = drbg->seedlen;
    }

    drbg->max_request = 1 << 16;

    return 1;
}


й русск',
    'en_gb': 'Английский (Великобритания)',
    'en_us': 'Английский (США)',
    'my_live': 'Моя прямая трансляция',
    'version': 'Версия',
    'now_new_version': 'Новые версии не найдены',
    'check_for_updates': 'Проверить обновления',
    'switch_account': 'Переключиться на другой аккаунт',
    'log_out': 'Выход',
    'used_space': 'Использованное пространство',
    'device_used_space': 'Использованное пространство на устройстве',
    'device_available_space': 'Доступное пространство на устройстве',
    'cache': 'Кэш',
    'user_data': 'Данные пользователя',
    'app_size': 'Размер приложения',
    'cache_tips':
        'Кэш — это временная информация, полученная при использовании APP, и очистка кэша не влияет на нормальное использование.',
    'user_data_tips':
        'содержит файлы, необходимые для выполнения приложения во время выполнения приложения, а также сообщения в чате, хорошие связи и т.д. ',
    'app_size_tips':
        'необходимые файлы, содержащие работу APK, включают в себя файлы APK, оптимизированный выход компилятора и библиотеку прототипа для разблокировки',
    'go_clean': 'Перейти к очистке',
    'clean': 'Очистить',
    'chat_history': 'История чата',
    'manage': 'Управление',
    'forward_to_friend': 'Переслать другу',
    'details': 'Подробности',
    'from': 'От',
    'file_size': 'Размер файла',
    'favorite_group_tags_etc': 'Избранные имена, названия групп, метки и т.д.',
    'recently_used': 'Последние использованные',
    'text': 'Текст',
    'image': 'Изображение',
    'location_message': 'Сообщение о местоположении',
    'voice': 'Голос',
    'type': 'Тип',
    'device_details': 'Подробности устройства',
    'device_name': 'Имя устройства',
    'device_type': 'Тип устройства',
    'last_active_time': 'Последнее время активности',
    'last_active_tips':
        'Когда устройство находится в безопасном состоянии, время сеанса автоматически продлевается для своевременного приема и отправки сообщений друзьями, в этом случае обновляется время последней активности.',
    'delete_this_device': 'Удалить это устройство',
    'delete_this_device_tips':
        'После удаления при следующем входе на этом устройстве


]*\\(\\d*\\|\\*\\|\\*\\d\\+\\$\\)\\(\\.\\(\\d*\\|\\*\\|\\*\\d\\+\\$\\)\\)\\=\\([hlLjzt]\\|ll\\|hh\\)\\=\\([aAbdiuoxXDOUfFeEgGcCsSpn?]\\|\\[\\^\\=.[^]]*\\]\\)\"");

    assert_eq!(r"newline:'
', tab:'	', unicode:'●', null:''",
        "newline:'\n', tab:'\t', unicode:'\u{25cf}', null:'\0'");
}
<gh_stars>0
// Copyright 2015-2019 Parity Technologies (UK) Ltd.
// This file is part of Parity Ethereum.

// Parity Ethereum 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 3 of the License, or
// (at your option) any later version.

// Parity Ethereum 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 Parity Ethereum.  If not, see <http://www.gnu.org/licenses/>.

use std::sync::Arc;
use bytes::Bytes;
use ethereum_types::Address;
use ethkey::Public;
use listener::service_contract::ServiceContract;
use listener::service_contract_listener::ServiceTask;
use {ServerKeyId};

/// Aggregated on-chain service contract.
pub struct OnChainServiceContractAggregate {
	/// All hosted service contracts.
	contracts: Vec<Arc<ServiceContract>>,
}

impl OnChainServiceContractAggregate {
	/// Create new aggregated service contract listener.
	pub fn new(contracts: Vec<Arc<ServiceContract>>) -> Self {
		debug_assert!(contracts.len() > 1);
		OnChainServiceContractAggregate {
			contracts: contracts,
		}
	}
}

impl ServiceContract for OnChainServiceContractAggregate {
	fn update(&self) -> bool {
		let mut result = false;
		for contract in &self.contracts {
			result = contract.update() || result;
		}
		result
	}

	fn read_logs(&self) -> Box<Iterator<Item=ServiceTask>> {
		self.contracts.iter()
			.fold(Box::new(::std::iter::empty()) as Box<Iterator<Item=ServiceTask>>, |i, c|
				Box::new(i.chain(c.read_logs())))
	}

	fn read_pending_requests(&self) -> Box<Iterator<Item=(bool, ServiceTask)>> {
		self.contracts.iter()
			.fold(Box::new(::std::iter::empty()) as Box<Iterator<Item=(bool, ServiceTask)>>, |i, c|
				Box::new(i.chain(c.read_pending_requests())))
	}

	// in current implementation all publish methods are independent of actual contract adddress
	// (tx is sent to origin) => we do not care which contract to use for publish data in methods below

	fn publish_generated_server_key(&self, origin: &Address, server_key_id: &ServerKeyId, server_key: Public) -> Result<(), String> {
		self.contracts[0].publish_generated_server_key(origin, server_key_id, server_key)
	}

	fn publish_server_key_generation_error(&self, origin: &Address, server_key_id: &ServerKeyId) -> Result<(), String> {
		self.contracts[0].publish_server_key_generation_error(origin, server_key_id)
	}

	fn publish_retrieved_server_key(&self, origin: &Address, server_key_id: &ServerKeyId, server_key: Public, threshold: usize) -> Result<(), S


 +
	"updaterAci\x88\x01\x01\x12'\n" +
	"\fnewGroupName\x18\x02 \x01(\tH\x01R\fnewGroupName\x88\x01\x01B\r\n" +
	"\v_updaterAciB\x0f\n" +
	"\r_newGroupName\"g\n" +
	"\x11GroupAvatarUpdate\x12#\n" +
	"\n" +
	"updaterAci\x18\x01 \x01(\fH\x00R\n" +
	"updaterAci\x88\x01\x01\x12\x1e\n" +
	"\n" +
	"wasRemoved\x18\x02 \x01(\bR\n" +
	"wasRemovedB\r\n" +
	"\v_updaterAci\"\x8c\x01\n" +
	"\x16GroupDescriptionUpdate\x12#\n" +
	"\n" +
	"updaterAci\x18\x01 \x01(\fH\x00R\n" +
	"updaterAci\x88\x01\x01\x12+\n" +
	"\x0enewDescription\x18\x02 \x01(\tH\x01R\x0enewDescription\x88\x01\x01B\r\n" +
	"\v_updaterAciB\x11\n" +
	"\x0f_newDescription\"\xa1\x01\n" +
	"&GroupMembershipAccessLevelChangeUpdate\x12#\n" +
	"\n" +
	"updaterAci\x18\x01 \x01(\fH\x00R\n" +
	"updaterAci\x88\x01\x01\x12C\n" +
	"\vaccessLevel\x18\x02 \x01(\x0e2!.signal.backup.GroupV2AccessLevelR\vaccessLevelB\r\n" +
	"\v_updaterAci\"\xa1\x01\n" +
	"&GroupAttributesAccessLevelChangeUpdate\x12#\n" +
	"\n" +
	"updaterAci\x18\x01 \x01(\fH\x00R\n" +
	"updaterAci\x88\x01\x01\x12C\n" +
	"\vaccessLevel\x18\x02 \x01(\x0e2!.signal.backup.GroupV2AccessLevelR\vaccessLevelB\r\n" +
	"\v_updaterAci\"\x87\x01\n" +
	"!GroupAnnouncementOnlyChangeUpdate\x12#\n" +
	"\n" +
	"updaterAci\x18\x01 \x01(\fH\x00R\n" +
	"updaterAci\x88\x01\x01\x12.\n" +
	"\x12isAnnouncementOnly\x18\x02 \x01(\bR\x12isAnnouncementOnlyB\r\n" +
	"\v_updaterAci\"\xa0\x01\n" +
	"\x16GroupAdminStatusUpdate\x12#\n" +
	"\n" +
	"updaterAci\x18\x01 \x01(\fH\x00R\n" +
	"updaterAci\x88\x01\x01\x12\x1c\n" +
	"\tmemberAci\x18\x02 \x01(\fR\tmemberAci\x124\n" +
	"\x15wasAdminStatusGranted\x18\x03 \x01(\bR\x15wasAdminStatusGrantedB\r\n" +
	"\v_updaterAci\")\n" +
	"\x15GroupMemberLeftUp


gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ffffff), color-stop(100%, rgba(255,255,255,0)));background-image:-webkit-linear-gradient(#ffffff,rgba(255,255,255,0));background-image:-moz-linear-gradient(#ffffff,rgba(255,255,255,0));background-image:-o-linear-gradient(#ffffff,rgba(255,255,255,0));background-image:linear-gradient(#ffffff,rgba(255,255,255,0))}.syno-ux-treepanel.syno-ux-treepanel-gradient .x-panel-bwrap:after{background-image:url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0icmdiYSgyNTUsMjU1LDI1NSwwKSIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI2ZmZmZmZiIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');background-size:100%;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, rgba(255,255,255,0)), color-stop(100%, #ffffff));background-image:-webkit-linear-gradient(rgba(255,255,255,0),#ffffff);background-image:-moz-linear-gradient(rgba(255,255,255,0),#ffffff);background-image:-o-linear-gradient(rgba(255,255,255,0),#ffffff);background-image:linear-gradient(rgba(255,255,255,0),#ffffff)}
body {
    font-family: 'Bebas Neue', sans-serif;
font-family: 'Fjalla One', sans-serif;
font-family: 'Merriweather', serif;
font-family: 'Montserrat', sans-serif;
font-family: 'Oswald', sans-serif;
font-family: 'Signika', sans-serif;
background-image: url('https://static.vecteezy.com/system/resources/previews/009/626/037/large_2x/silhouette-landscape-with-fog-forest-pine-trees-mountains-illustration-of-national-park-view-mist-black-and-white-good-for-wallpaper-background-banner-cover-poster-free-vector.jpg');
    background-color: #f0f0f0;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
}

.container {

    background


ta.observeAsState()

    LaunchedEffect(state) {
        if (state is SimpleState.Success) {
            mainController.popBackStack()
            mainController.snackbar("举报成功")
            vm.stateLiveData.value = null
        } else {
            if (state is SimpleState.Fail) {
                mainController.snackbar("举报失败（Tips: 不要举报自己哦！）")
                vm.stateLiveData.value = null
            }
        }
    }

    val text by vm.textFlow.collectAsState()

    LaunchedEffect(loadReportTypeState) {
        if(loadReportTypeState == null) {
            vm.loadReportType()
        }
    }

    val selectedReportType by vm.selectedReportTypeLiveData.observeAsState()

    when(loadReportTypeState) {
        is SimpleDataState.Loading, null -> {
            Column(
                modifier = Modifier
                    .fillMaxSize()
                    .wrapContentSize(Alignment.Center)
                    .width(64.dp)
            ) {
                CircularProgressIndicator(
                    modifier = Modifier.width(64.dp),
                    color = MaterialTheme.colorScheme.primary
                )
            }
        }
        is SimpleDataState.Success -> {
            val reportTypes = (loadReportTypeState as SimpleDataState.Success<List<ReportType>>).data

            LaunchedEffect(selectedReportType) {
                if(selectedReportType == null) {
                    vm.setSelectedReportType(reportTypes[0])
                }
            }

            if(selectedReportType != null) {
                val reportType = selectedReportType!!
                ReportScreenContent(
                    mainController = mainController,
                    objType = objType,
                    id = id,
                    reportTypes = reportTypes,

                    selectReportType = reportType,
                    text = text,
                    reportState = state,

                    onSelectReportType = vm::setSelectedReportType,
                    onSetText = vm::setText,
                    onReport = {
                        when(objType) {
                            ObjTypes.POSTER -> vm.reportPoster(id, reportType.id.toLong(), text)
                            ObjTypes.COMMENT -> vm.reportComment(id, reportType.id.toLong(), text)
                            else -> { vm.stateLiveData.value = SimpleState.Fail }
                        }
                    },
                )
            }
        }
        is SimpleDataState.Fail -> {

        }
    }
}package cn.bit101.android.features.common.component.bottomsheet

import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.Shape

/**
 * by [dokar3](https://github.com/dokar3/sheets)
 *
 * A bottom sheet will be displayed in a dialog window.
 *
 * @param state The bottom sheet state. Call [rememberBottomSheetState] to create one.
 * @param modifier Modifier for bottom sheet content.
 * @param skipPeeked Skip the peeked state if set to true. Defaults to false.
 * @param peekHeight Peek height, could be a dp, px, or fraction value.
 * @param backgroundColor Background color for sheet content.
 * @param dimColor Dim color. Defaults to [Color.Black].
 * @param maxDimAmount Maximum dim amount. Defaults to 0.45f.
 * @param behaviors Dialog sheet behaviors. Including system bars, clicking, window input mode, etc.
 * @param contentAlignment The alignment of the content. Only works when the content width is
 * smaller than the screen width.
 * @param showAboveKeyboard Controls whether the whole bottom sheet should show above the soft
 * keyboard when the keyboard is shown. Defaults to false.
 * @param dragHandle Bottom sheet drag handle. A round bar was displayed by default.
 * @param content Sheet content.
 */
@Composable
fun BottomSheet(
    state: BottomSheetState,
    modifier: Modifier = Modifier,
    skipPeeked: Boolean = false,
    allowNestedScroll: Boolean = true,
    peekHeight: PeekHeight = PeekHeight.fraction(0.5f),
    shape: Shape = BottomSheetDefaults.shape,
    backgroundColor: Color = BottomSheetDefaults.backgroundColor,
    dimColor: Color = Color.Black,
    maxDimAmount: Float =


 next!.head;
      return val as T;
    });
    return reversed.reversed;
  }();
}
// Copyright (c) 2025, the Dart project authors.  Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

/// Script to update the `../doc/media_types.md` file from
/// [defaultExtensionMap].
library;

import 'dart:io';

import 'package:mime/mime.dart';
import 'package:mime/src/default_extension_map.dart' show defaultExtensionMap;

void main() {
  // Find all the mime types and extensions.
  final mimeToExts = <String, List<String>>{};

  for (final entry in defaultExtensionMap.entries) {
    final ext = entry.key;
    final mime = entry.value;

    (mimeToExts[mime] ??= []).add(ext);
  }

  final mimeTypes = [...mimeToExts.keys]..sort();

  // Emit the table.
  const startMarker = '<!-- start table -->\n';
  const endMarker = '<!-- end table -->\n';

  final file = File.fromUri(Platform.script.resolve('../doc/media_types.md'));
  final contents = file.readAsStringSync();
  final prefix =
      contents.substring(0, contents.indexOf(startMarker) + startMarker.length);
  final suffix = contents.substring(contents.lastIndexOf(endMarker));

  final buf = StringBuffer(prefix);
  buf.writeln();
  buf.write('''
| MIME type                                | Default     | Additional          |
| ---------------------------------------- | ----------- | ------------------- |
''');

  for (final mime in mimeTypes) {
    final defaultExt = extensionFromMime(mime)!;
    final exts = mimeToExts[mime]!.toList();

    exts.remove(defaultExt);
    exts.sort();

    final additional = exts.join(', ');

    buf.writeln('| ${markdownEscape(mime).padRight(40)} | '
        '${markdownEscape(defaultExt).padRight(11)} | '
        '${markdownEscape(additional).padRight(19)} |');
  }

  buf.writeln();
  buf.write(suffix);

  file.writeAsStringSync('${buf.toString().trim()}\n');
}

String markdownEscape(String markdown) {
  // See https://www.markdownguide.org/basic-syntax/#escaping-characters.

  // Escape the escape character.
  markdown = markdown.replaceAll(r'\', r'\\');

  // Escape other special characters.
  markdown = markdown.replaceAll('_', r'\_');

  return markdown;
}
// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

const Map<String, String> defaultExtensionMap = <String, String>{
  '123': 'application/vnd.lotus-1-2-3',
  '3dml': 'text/vnd.in3d.3dml',
  '3ds': 'image/x-3ds',
  '3g2': 'video/3gpp2',
  '3gp': 'video/3gpp',
  '7z': 'application/x-


_0207DB74 ; =0x00010200
	mov r1, #0x0
	str r0, [sp, #0x8]
	str r1, [sp, #0xc]
	lsl r2, r2, #0x6
	ldr r2, [r4, r2]
	ldr r3, [sp, #0x18]
	add r0, r5, r7
	bl AddTextPrinterParameterized2
	add sp, #0x20
	pop {r3-r7, pc}
	.balign 4
_0207DB70: .word 0x00000674
_0207DB74: .word 0x00010200

	thumb_func_start sub_0207DB78
sub_0207DB78: ; 0x0207DB78
	push {r4, lr}
	sub sp, #0x10
	ldr r3, _0207DD7C ; =0x000F0E00
	mov r1, #0x0
	mov r2, #0x7
	add r4, r0, #0x0
	str r1, [sp, #0x0]
	bl sub_0207DA1C
	mov r0, #0x0
	str r0, [sp, #0x0]
	ldr r3, _0207DD7C ; =0x000F0E00
	add r0, r4, #0x0
	mov r1, #0x1
	mov r2, #0x17
	bl sub_0207DA1C
	mov r0, #0x0
	str r0, [sp, #0x0]
	ldr r3, _0207DD7C ; =0x000F0E00
	add r0, r4, #0x0
	mov r1, #0x2
	mov r2, #0x6d
	bl sub_0207DA1C
	mov r0, #0x0
	str r0, [sp, #0x0]
	ldr r3, _0207DD7C ; =0x000F0E00
	add r0, r4, #0x0
	mov r1, #0x3
	mov r2, #0x7e
	bl sub_0207DA1C
	mov r0, #0x0
	str r0, [sp, #0x0]
	ldr r3, _0207DD7C ; =0x000F0E00
	add r0, r4, #0x0
	mov r1, #0x4
	mov r2, #0x80
	bl sub_0207DA1C
	mov r0, #0x0
	str r0, [sp, #0x0]
	ldr r3, _0207DD7C ; =0x000F0E00
	add r0, r4, #0x0
	mov r1, #0x5
	mov r2, #0x9d
	bl sub_0207DA1C
	mov r0, #0x0
	str r0, [sp, #0x0]
	ldr r3, _0207DD7C ; =0x000F0E00
	add r0, r4, #0x0
	mov r1, #0x6
	mov r2, #0x4
	bl sub_0207DA1C
	mov r0, #0x0
	str r0, [sp, #0x0]
	ldr r3, _0207DD7C ; =0x000F0E00
	add r0, r4, #0x0
	mov r1, #0x7
	mov r2, #0x8
	bl sub_0207DA1C
	mov r0, #0x0
	str r0, [sp, #0x0]
	ldr r3, _0207DD7C ; =0x000F0E00
	add r0, r4, #0x0
	mov r1, #0x8


ocal NewCharacterName = nil;
local SelectedDestinationRealm = nil;
local DestinationRealmMapping = nil;
local StoreDropdownLists = {};

------------------------------------------
function StoreConfirmationFrame_OnLoad(self)
	self.ProductName:SetTextColor(0, 0, 0);
	self.ProductName:SetShadowColor(0, 0, 0, 0);

	self.Title:SetText(BLIZZARD_STORE_CONFIRMATION_TITLE);
	self.NoticeFrame.TotalLabel:SetText(BLIZZARD_STORE_FINAL_PRICE_LABEL);

	self.LicenseAcceptText:SetTextColor(0.8, 0.8, 0.8);

	self.NoticeFrame.Notice:SetSpacing(6);

	self:RegisterEvent("STORE_CONFIRM_PURCHASE");
end

function StoreConfirmationFrame_SetNotice(self, icon, name, dollars, cents, walletName, upgrade, vasService, expansion)
	local currency = C_PurchaseAPI.GetCurrencyID();

	SetPortraitToTexture(self.Icon, icon);

	name = name:gsub("|n", " ");
	self.ProductName:SetText(name);
	local info = currencyInfo();
	local format = info.formatLong;
	local notice;

	if (upgrade) then
		notice = info.servicesConfirmationNotice;
	elseif (expansion) then
		notice = info.expansionConfirmationNotice;
	elseif (vasService) then
		local characters = C_PurchaseAPI.GetCharactersForRealm(SelectedRealm);
		local character = characters[SelectedCharacter];
		local confirmationNotice;
		if (VASServiceType == LE_VAS_SERVICE_NAME_CHANGE) then
			notice = string.format(VAS_NAME_CHANGE_CONFIRMATION, character.name, NewCharacterName);
			confirmationNotice = info.vasNameChangeConfirmationNotice;
		elseif (VASServiceType == LE_VAS_SERVICE_FACTION_CHANGE) then
			local newFaction;
			if (character.faction == 0) then
				newFaction = FACTION_ALLIANCE;
			elseif (character.faction == 1) then
				newFaction = FACTION_HORDE;
			end
			notice = string.format(VAS_FACTION_CHANGE_CONFIRMATION, character.name, SelectedRealm, newFaction);
			confirmationNotice = info.servicesConfirmationNotice;
		elseif (VASServiceType == LE_VAS_SERVICE_RACE_CHANGE) then
			notice = string.format(VAS_RACE_CHANGE_CONFIRMATION, character.name, SelectedRealm);
			confirmationNotice = info.servicesConfirmationNotice;
		elseif (VASServiceType == LE_VAS_SERVICE_APPEARANCE_CHANGE) then
			notice = string.format(VAS_APPEARANCE_CHANGE_CONFIRMATION, character.name, SelectedRealm);
			confirmationNotice = info.servicesConfirmationNotice;
		elseif (VASServiceType == LE_VAS_SERVICE_CHARACTER_TRANSFER) then
			notice = string.format(VAS_CHARACTER_TRANSFER_CONFIRMATION, character.name, SelectedRealm, DestinationRealmMapping[SelectedDestinationRealm]);
			confirmationNotice = info.servicesConfirmationNotice;
		end
		notice = notice .. "|n|n" .. confirmationNotice;
	else
		notice = info.confirmationNotice;
	end

	if (not walletName or walletName == "") then
		walletName = BLIZZARD_STORE_BATTLE_NET_BALANCE;
	end
	if (walletName) then
		notice = notice .. "\n\n" .. string.format(BLIZZARD_STORE_WALLET_INFO, walletName);
	end
	if (upgrade) then
		self.UpgradeArrow:Show();
	else
		self.UpgradeArrow:Hide();
	end
	self.NoticeFrame.Notice:SetText(notice);
	self.NoticeFrame:Show();
	self.NoticeFrame.Price:SetText(


  String package,
  String version, {
  required bool isLatest,
}) async {
  await Future.wait([
    cache.scoreCardData(package, version).purge(),
    cache.uiPackagePage(package, version).purge(),
    if (isLatest) cache.uiPackagePage(package, null).purge(),
    if (isLatest) cache.packageView(package).purge(),
  ]);
}

class PackageStatus {
  final bool exists;
  final DateTime? publishDate;
  final Duration? age;
  final bool isLatestStable;
  final bool isDiscontinued;
  final bool isObsolete;
  final bool isLegacy;
  final bool isDart3Incompatible;
  final bool usesFlutter;
  final bool usesPreviewAnalysisSdk;
  final bool isPublishedByDartDev;

  PackageStatus._({
    required this.exists,
    this.publishDate,
    this.age,
    this.isLatestStable = false,
    this.isDiscontinued = false,
    this.isObsolete = false,
    this.isLegacy = false,
    this.isDart3Incompatible = false,
    this.usesFlutter = false,
    this.usesPreviewAnalysisSdk = false,
    this.isPublishedByDartDev = false,
  });

  factory PackageStatus.fromModels(Package? p, PackageVersion? pv) {
    if (p == null || pv == null || p.isNotVisible) {
      return PackageStatus._(exists: false);
    }
    final publishDate = pv.created!;
    final isLatestStable = p.latestVersion == pv.version;
    final now = clock.now().toUtc();
    final age = now.difference(publishDate).abs();
    final isObsolete = age > twoYears && !isLatestStable;
    return PackageStatus._(
      exists: true,
      publishDate: publishDate,
      age: age,
      isLatestStable: isLatestStable,
      isDiscontinued: p.isDiscontinued,
      isObsolete: isObsolete,
      isLegacy: pv.pubspec!.supportsOnlyLegacySdk,
      isDart3Incompatible: pv.pubspec!.isDart3Incompatible,
      usesFlutter: pv.pubspec!.usesFlutter,
      usesPreviewAnalysisSdk: pv.pubspec!.usesPreviewAnalysisSdk(),
      isPublishedByDartDev:
          p.publisherId != null && isDartDevPublisher(p.publisherId),
    );
  }
}
// GENERATED CODE - DO NOT MODIFY BY HAND

part of 'models.dart';

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

PackageVersionStateInfo _$PackageVersionStateInfoFromJson(
  Map<String, dynamic> json,
) => PackageVersionStateInfo(
  scheduled: DateTime.parse(json['scheduled'] as String),
  attempts: (json['attempts'] as num).toInt(),
  secretToken: json['secretToken'] as String?,
  zone: json['zone'] as String?,
  instance: json['instance'] as String?,
  docs: json['docs'] as bool? ?? false,
  pana: json['pana'] as bool? ?? false,
  finished: json['finished'] as bool? ?? false,
);

Map<String, dynamic> _$PackageVersionStateInfoToJson(
  PackageVersionStateInfo instance,
) => <String, dynamic>{
  'docs': instance.docs,
  'pana': instance.pana,
  'finished': instance.finished,
  'scheduled': instance.scheduled.toIso8601String(),
  'attempts': instance.attempts,
  'zone': instance.zone,
  'instance': instance.instance,
  'secretToken': instance.secretToken,
};

PackageStateInfo _$PackageStateInfoFromJson(Map<String, dynamic> json) =>
    PackageStateInfo(
      runtimeVersion: json['runtimeVersion'] as String,
      package: json['packag


/*
 * virtio ccw 9p implementation
 *
 * Copyright 2012, 2015 IBM Corp.
 * Author(s): Pierre Morel <pmorel@linux.vnet.ibm.com>
 *
 * This work is licensed under the terms of the GNU GPL, version 2 or (at
 * your option) any later version. See the COPYING file in the top-level
 * directory.
 */

#include "qemu/osdep.h"
#include "hw/qdev-properties.h"
#include "hw/virtio/virtio.h"
#include "qapi/error.h"
#include "qemu/module.h"
#include "virtio-ccw.h"

static void virtio_ccw_9p_realize(VirtioCcwDevice *ccw_dev, Error **errp)
{
    V9fsCCWState *dev = VIRTIO_9P_CCW(ccw_dev);
    DeviceState *vdev = DEVICE(&dev->vdev);

    qdev_realize(vdev, BUS(&ccw_dev->bus), errp);
}

static void virtio_ccw_9p_instance_init(Object *obj)
{
    V9fsCCWState *dev = VIRTIO_9P_CCW(obj);

    virtio_instance_init_common(obj, &dev->vdev, sizeof(dev->vdev),
                                TYPE_VIRTIO_9P);
}

static Property virtio_ccw_9p_properties[] = {
    DEFINE_PROP_BIT("ioeventfd", VirtioCcwDevice, flags,
            VIRTIO_CCW_FLAG_USE_IOEVENTFD_BIT, true),
    DEFINE_PROP_UINT32("max_revision", VirtioCcwDevice, max_rev,
                       VIRTIO_CCW_MAX_REV),
    DEFINE_PROP_END_OF_LIST(),
};

static void virtio_ccw_9p_class_init(ObjectClass *klass, void *data)
{
    DeviceClass *dc = DEVICE_CLASS(klass);
    VirtIOCCWDeviceClass *k = VIRTIO_CCW_DEVICE_CLASS(klass);

    k->realize = virtio_ccw_9p_realize;
    device_class_set_props(dc, virtio_ccw_9p_properties);
    set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
}

static const TypeInfo virtio_ccw_9p_info = {
    .name          = TYPE_VIRTIO_9P_CCW,
    .parent        = TYPE_VIRTIO_CCW_DEVICE,
    .instance_size = sizeof(V9fsCCWState),
    .instance_init = virtio_ccw_9p_instance_init,
    .class_init    = virtio_ccw_9p_class_init,
};

static void virtio_ccw_9p_register(void)
{
    type_register_static(&virtio_ccw_9p_info);
}

type_init(virtio_ccw_9p_register)


orce:len()

    -- Apply them
    p1.t_old:add(f1 * self.tick_period)
    p2.t_old:add(f2 * self.tick_period)
end

function World:set_transform(object, transform)
    local body = self.bodies[object]
    assert(body.type == 'kinematic', 'ERROR (World.set_transform): body type must be kinematic.')
    if body.shape == 'plane' then
        body.points[1].t:set((transform * vec3(-.5, .5, 0):mul(body.scale))) -- bottom left
        body.points[2].t:set((transform * vec3(-.5, -.5, 0):mul(body.scale))) -- top left
        body.points[3].t:set((transform * vec3(.5, -.5, 0):mul(body.scale))) -- top right
        body.points[4].t:set((transform * vec3(.5, .5, 0):mul(body.scale))) -- bottom right
    end
end

function World:remove_body(object)
    self.bodies[object] = nil
end

function World:reset(object)
    local body = self.bodies[object]
    for _, p in ipairs(body.points) do
        p.t_old:set(p.t)
        p.water_vel:set(0, 0, 0)
        p.water_gravity:set(0, 0, 0)
        p.in_water = false
    end
end

function World:set_translation(object, x, y, z)
    local body = self.bodies[object]
    for _, p in ipairs(body.points) do
        p.t:set(x, y, z)
    end
end

function World:activate(object)
    self.bodies[object].active = true
end

function World:deactivate(object)
    self.bodies[object].active = false
end

return World


r;" to 8592,
"↞" to 8606,
"⇐" to 8656,
"⤝" to 10525,
"↩" to 8617,
"↫" to 8619,
"⤹" to 10553,
"⥳" to 10611,
"↢" to 8610,
"⤙" to 10521,
"⤛" to 10523,
"⪫" to 10923,
"⪭" to 10925,
"⪭" to 10925,
"⤌" to 10508,
"⤎" to 10510,
"❲" to 10098,
"{" to 123,
"[" to 91,
"⦋" to 10635,
"⦏" to 10639,
"⦍" to 10637,
"Ľ" to 317,
"ľ" to 318,
"Ļ" to 315,
"ļ" to 316,
"⌈" to 8968,
"{" to 123,
"Л" to 1051,
"л" to 1083,
"⤶" to 10550,
"“" to 8220,
"„" to 8222,
"⥧" to 10599,
"⥋" to 10571,
"↲" to 8626,
"≤" to 8804,
"≦" to 8806,
"⟨" to 10216,
"⇤" to 8676,
"←" to 8592,
"←" to 8592,
"⇐" to 8656,
"⇆" to 8646,
"↢" to 8610,
"⌈" to 8968,
"⟦" to 10214,
"⥡" to 10593,
"⥙" to 10585,
"⇃" to 8643,
"⌊" to 8970,
"↽" to 8637,
"↼" to 8636,
"⇇" to 8647,
"↔" to 8596,
"↔" to 8596,
"⇔" to 8660,
"⇆" to 8646,
"⇋" to 8651,
"↭" to 8621,
"⥎" to 10574,
"↤" to 8612,
"⊣" to 8867,
"⥚" to 10586,
"⋋" to 8907,
"⧏" to 10703,
"⊲" to 8882,
"⊴" to 8884,
"⥑" to 10577,
"⥠" to 10592,
"⥘" to 10584,
"↿" to 8639,
"⥒" to 10578,
"↼" to 8636,
"⪋" to 10891,
"⋚" to 8922,
"≤" to 8804,
"≦" to 8806,
"⩽" to 10877,
"⪨" to 10920,
"⩽" to 10877,
"⩿" to 10879,
"⪁" to 10881,
"⪃" to 10883,
"⋚" to 8922,
"⪓" to 10899,
"⪅" to 10885,
"⋖" to 8918,
"&lesseqgtr


String, dynamic>?)?.map(
            (k, e) => MapEntry(k, e as String),
          ) ??
          const {},
    );

Map<String, dynamic> _$$ClashConfigImplToJson(_$ClashConfigImpl instance) =>
    <String, dynamic>{
      'mixed-port': instance.mixedPort,
      'mode': _$ModeEnumMap[instance.mode]!,
      'allow-lan': instance.allowLan,
      'log-level': _$LogLevelEnumMap[instance.logLevel]!,
      'ipv6': instance.ipv6,
      'find-process-mode': _$FindProcessModeEnumMap[instance.findProcessMode]!,
      'keep-alive-interval': instance.keepAliveInterval,
      'unified-delay': instance.unifiedDelay,
      'tcp-concurrent': instance.tcpConcurrent,
      'tun': instance.tun,
      'dns': instance.dns,
      'geox-url': instance.geoXUrl,
      'geodata-loader': _$GeodataLoaderEnumMap[instance.geodataLoader]!,
      'proxy-groups': instance.proxyGroups,
      'rule': instance.rule,
      'global-ua': instance.globalUa,
      'external-controller':
          _$ExternalControllerStatusEnumMap[instance.externalController]!,
      'hosts': instance.hosts,
    };

const _$ModeEnumMap = {
  Mode.rule: 'rule',
  Mode.global: 'global',
  Mode.direct: 'direct',
};

const _$LogLevelEnumMap = {
  LogLevel.debug: 'debug',
  LogLevel.info: 'info',
  LogLevel.warning: 'warning',
  LogLevel.error: 'error',
  LogLevel.silent: 'silent',
  LogLevel.app: 'app',
};

const _$FindProcessModeEnumMap = {
  FindProcessMode.always: 'always',
  FindProcessMode.off: 'off',
};

const _$GeodataLoaderEnumMap = {
  GeodataLoader.standard: 'standard',
  GeodataLoader.memconservative: 'memconservative',
};

const _$ExternalControllerStatusEnumMap = {
  ExternalControllerStatus.close: '',
  ExternalControllerStatus.open: '127.0.0.1:9090',
};
// coverage:ignore-file
// GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: type=lint
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark

part of '../selector.dart';

// **************************************************************************
// FreezedGenerator
// **************************************************************************

T _$identity<T>(T value) => value;

final _privateConstructorUsedError = UnsupportedError(
    'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');

/// @nodoc
mixin _$VM2<A, B> {
  A get a => throw _privateConstructorUsedError;
  B get b => throw _privateConstructorUsedError;

  /// Create a copy of VM2
  /// with the given fields replaced by the non-null parameter values.


// SPDX-License-Identifier: (GPL-2.0 OR MIT)
/*
 * Copyright (c) 2019 BayLibre, SAS.
 * Author: Neil Armstrong <narmstrong@baylibre.com>
 */

#include <linux/clk-provider.h>
#include <linux/module.h>

#include "clk-regmap.h"
#include "clk-cpu-dyndiv.h"

static inline struct meson_clk_cpu_dyndiv_data *
meson_clk_cpu_dyndiv_data(struct clk_regmap *clk)
{
	return (struct meson_clk_cpu_dyndiv_data *)clk->data;
}

static unsigned long meson_clk_cpu_dyndiv_recalc_rate(struct clk_hw *hw,
						      unsigned long prate)
{
	struct clk_regmap *clk = to_clk_regmap(hw);
	struct meson_clk_cpu_dyndiv_data *data = meson_clk_cpu_dyndiv_data(clk);

	return divider_recalc_rate(hw, prate,
				   meson_parm_read(clk->map, &data->div),
				   NULL, 0, data->div.width);
}

static long meson_clk_cpu_dyndiv_round_rate(struct clk_hw *hw,
					    unsigned long rate,
					    unsigned long *prate)
{
	struct clk_regmap *clk = to_clk_regmap(hw);
	struct meson_clk_cpu_dyndiv_data *data = meson_clk_cpu_dyndiv_data(clk);

	return divider_round_rate(hw, rate, prate, NULL, data->div.width, 0);
}

static int meson_clk_cpu_dyndiv_set_rate(struct clk_hw *hw, unsigned long rate,
					  unsigned long parent_rate)
{
	struct clk_regmap *clk = to_clk_regmap(hw);
	struct meson_clk_cpu_dyndiv_data *data = meson_clk_cpu_dyndiv_data(clk);
	unsigned int val;
	int ret;

	ret = divider_get_val(rate, parent_rate, NULL, data->div.width, 0);
	if (ret < 0)
		return ret;

	val = (unsigned int)ret << data->div.shift;

	/* Write the SYS_CPU_DYN_ENABLE bit before changing the divider */
	meson_parm_write(clk->map, &data->dyn, 1);

	/* Update the divider while removing the SYS_CPU_DYN_ENABLE bit */
	return regmap_update_bits(clk->map, data->div.reg_off,
				  SETPMASK(data->div.width, data->div.shift) |
				  SETPMASK(data->dyn.width, data->dyn.shift),
				  val);
};

const struct clk_ops meson_clk_cpu_dyndiv_ops = {
	.recalc_rate = meson_clk_cpu_dyndiv_recalc_rate,
	.round_rate = meson_clk_cpu_dyndiv_round_rate,
	.set_rate = meson_clk_cpu_dyndiv_set_rate,
};
EXPORT_SYMBOL_GPL(meson_clk_cpu_dyndiv_ops);

MODULE_DESCRIPTION("Amlogic CPU Dynamic Clock divider");
MODULE_AUTHOR("Neil Armstrong <narmstrong@baylibre.com>");
MODULE_LICENSE("GPL v2");


{
				"Name", "bar",
				"Namespace", "foo",
				"Selector", "blah=heh",
				"Type", "LoadBalancer",
				"IP", "1.2.3.4",
				"Port", "port-tcp", "8080/TCP",
				"TargetPort", "9527/TCP",
				"NodePort", "port-tcp", "31111/TCP",
				"Session Affinity", "None",
				"External Traffic Policy", "Local",
				"HealthCheck NodePort", "32222",
			},
		},
		{
			name: "test2",
			service: &corev1.Service{
				ObjectMeta: metav1.ObjectMeta{
					Name:      "bar",
					Namespace: "foo",
					Tenant:    metav1.TenantSystem,
				},
				Spec: corev1.ServiceSpec{
					Type: corev1.ServiceTypeLoadBalancer,
					Ports: []corev1.ServicePort{{
						Name:       "port-tcp",
						Port:       8080,
						Protocol:   corev1.ProtocolTCP,
						TargetPort: intstr.FromString("targetPort"),
						NodePort:   31111,
					}},
					Selector:              map[string]string{"blah": "heh"},
					ClusterIP:             "1.2.3.4",
					LoadBalancerIP:        "5.6.7.8",
					SessionAffinity:       "None",
					ExternalTrafficPolicy: "Local",
					HealthCheckNodePort:   32222,
				},
			},
			expect: []string{
				"Name", "bar",
				"Namespace", "foo",
				"Selector", "blah=heh",
				"Type", "LoadBalancer",
				"IP", "1.2.3.4",
				"Port", "port-tcp", "8080/TCP",
				"TargetPort", "targetPort/TCP",
				"NodePort", "port-tcp", "31111/TCP",
				"Session Affinity", "None",
				"External Traffic Policy", "Local",
				"HealthCheck NodePort", "32222",
			},
		},
	}
	for _, testCase := range testCases {
		t.Run(testCase.name, func(t *testing.T) {
			fake := fake.NewSimpleClientset(testCase.service)
			c := &describeClient{T: t, Namespace: "foo", Interface: fake}
			d := ServiceDescriber{c}
			out, err := d.Describe(metav1.TenantSystem, "foo", "bar", describe.DescriberSettings{ShowEvents: true})
			if err != nil {
				t.Errorf("unexpected error: %v", err)
			}
			for _, expected := range testCase.expect {
				if !strings.Contains(out, expected) {
					t.Errorf("expected to find %q in output: %q", expected, out)
				}
			}
		})
	}
}

func TestPodDescribeResultsSorted(t *testing.T) {
	// Arrange
	fake := fake.NewSimpleClientset(
		&corev1.EventList{
			Items: []corev1.Event{
				{
					ObjectMeta:     metav1.ObjectMeta{Name: "one"},
					Source:         corev1.EventSource{Component: "kubelet"},
					Message:        "Item 1",
					FirstTimestamp: metav1.NewTime(time.Date(2014, time.January, 15, 0, 0, 0, 0, time.UTC)),
					LastTimestamp:  metav1.NewTime(time.Date(2014, time.January, 15, 0, 0, 0, 0, time.UTC)),
					Count:          1,
					Type:           corev1.EventTypeNormal,
				},
				{
					ObjectMeta:     metav1.ObjectMeta{Name: "two"},
					Source:         corev1.EventSource{Component: "scheduler"},
					Message:        "Item 2",
					FirstTimestamp: metav1.NewTime(time.Date(1987, time.June, 17, 0, 0, 0, 0, time.UTC)),
					LastTimestamp:  metav1.


ize> = 25..32;
const IMM_RANGE: Range<usize> = 20..32;
const UPPER_IMM_RANGE: Range<usize> = 12..32;

/// Enumerates instructions.
/// Each entry have a struct holding parameters such as register index.
#[derive(Debug, PartialEq, Eq)]
pub enum Instruction {
    // R-Type
    Add(RType),
    Sub(RType),
    Sll(RType),
    Slt(RType),
    Sltu(RType),
    Xor(RType),
    Srl(RType),
    Sra(RType),
    Or(RType),
    And(RType),

    // I-Type
    Jalr(IType),
    Addi(IType),
    Slli(IType),
    Slti(IType),
    Sltiu(IType),
    Xori(IType),
    Srli(IType),
    Srai(IType),
    Ori(IType),
    Andi(IType),
    Lb(IType),
    Lh(IType),
    Lw(IType),
    Lbu(IType),
    Lhu(IType),
    Csrrw(IType),
    Csrrs(IType),
    Csrrc(IType),
    Csrrwi(IType),
    Csrrsi(IType),
    Csrrci(IType),

    // S-Type
    Sb(SType),
    Sh(SType),
    Sw(SType),

    // B-Type*
    Beq(BType),
    Bne(BType),
    Blt(BType),
    Bge(BType),
    Bltu(BType),
    Bgeu(BType),

    // J-Type
    Jal(JType),

    // U-Type
    Lui(UType),
    Auipc(UType),
}

/// Parameters common to R-Type instructions.
/// This is the same for structs below.
#[derive(Debug, PartialEq, Eq)]
pub struct RType {
    pub rd: usize,
    pub rs1: usize,
    pub rs2: usize,
}

#[derive(Debug, PartialEq, Eq)]
pub struct IType {
    pub rd: usize,
    pub rs1: usize,
    pub imm: u16,
}

#[derive(Debug, PartialEq, Eq)]
pub struct SType {
    pub rs1: usize,
    pub rs2: usize,
    pub imm: u16,
}

#[derive(Debug, PartialEq, Eq)]
pub struct BType {
    pub rs1: usize,
    pub rs2: usize,
    pub imm: u16,
}

#[derive(Debug, PartialEq, Eq)]
pub struct UType {
    pub rd: usize,
    pub imm: u32,
}

#[derive(Debug, PartialEq, Eq)]
pub struct JType {
    pub rd: usize,
    pub imm: u32,
}

impl RType {
    fn new(instruction: u32) -> Self {
        Self {
            rd: instruction.get_bits(RD_RANGE) as usize,
            rs1: instruction.get_bits(RS1_RANGE) as usize,
            rs2: instruction.get_bits(RS2_RANGE) as usize,
        }
    }
}

impl IType {
    fn new(instruction: u32) -> Self {
        Self {
            rd: instruction.get_bits(RD_RANGE) as usize,
            rs1: instruction.get_bits(RS1_RANGE) as usize,
            imm: instruction.get_bits(IMM_RANGE) as u16,
        }
    }
}

impl SType {
    fn new(instruction: u32) -> Self {
        let imm = instruction.get_bits(7..12) + (instruction.get_bits(25..32) << 5);
        Self {
            rs1: instruction.get_bits(RS1_RANGE) as usize,
            rs2: instruction.get_bits(RS2_RANGE) as usize,
            imm: imm as u16,
        }
    }
}

impl BType {
    fn new(instruction: u32) -> Self {
        let imm = (instruction.get_bits(8..12)
            + (instruction.get_bits(25..31) << 4)
            + (instruction.get_bits(7..


as the window - make sure it's the same when re-opening
  is(toolbox.hostType, WINDOW, "host remembered");

  let win = Services.wm.getMostRecentWindow("devtools:toolbox");
  ok(win, "toolbox separate window exists");
}

function* testPreviousHost() {
  // last host was the window - make sure it's the same when re-opening
  is(toolbox.hostType, WINDOW, "host remembered");

  info("Switching to side");
  yield toolbox.switchHost(SIDE);
  checkHostType(toolbox, SIDE, WINDOW);

  info("Switching to bottom");
  yield toolbox.switchHost(BOTTOM);
  checkHostType(toolbox, BOTTOM, SIDE);

  info("Switching from bottom to side");
  yield toolbox.switchToPreviousHost();
  checkHostType(toolbox, SIDE, BOTTOM);

  info("Switching from side to bottom");
  yield toolbox.switchToPreviousHost();
  checkHostType(toolbox, BOTTOM, SIDE);

  info("Switching to window");
  yield toolbox.switchHost(WINDOW);
  checkHostType(toolbox, WINDOW, BOTTOM);

  info("Switching from window to bottom");
  yield toolbox.switchToPreviousHost();
  checkHostType(toolbox, BOTTOM, WINDOW);

  info("Forcing the previous host to match the current (bottom)");
  Services.prefs.setCharPref("devtools.toolbox.previousHost", BOTTOM);

  info("Switching from bottom to side (since previous=current=bottom");
  yield toolbox.switchToPreviousHost();
  checkHostType(toolbox, SIDE, BOTTOM);

  info("Forcing the previous host to match the current (side)");
  Services.prefs.setCharPref("devtools.toolbox.previousHost", SIDE);
  info("Switching from side to bottom (since previous=current=side");
  yield toolbox.switchToPreviousHost();
  checkHostType(toolbox, BOTTOM, SIDE);
}

function checkToolboxLoaded(iframe) {
  let tabs = iframe.contentDocument.getElementById("toolbox-tabs");
  ok(tabs, "toolbox UI has been loaded into iframe");
}
/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* Any copyright is dedicated to the Public Domain.
 * http://creativecommons.org/publicdomain/zero/1.0/ */

const URL = "data:text/html;charset=utf8,test for textbox context menu";

add_task(function* () {
  let toolbox = yield openNewTabAndToolbox(URL, "inspector");
  let textboxContextMenu = toolbox.textBoxContextMenuPopup;

  emptyClipboard();

  // Make sure the focus is predictable.
  let inspector = toolbox.getPanel("inspector");
  let onFocus = once(inspector.searchBox, "focus");
  inspector.searchBox.focus();
  yield onFocus;

  ok(textboxContextMenu, "The textbox context menu is loaded in the toolbox");

  let cmdUndo = textboxContextMenu.querySelector("[command=cmd_undo]");
  let cmdDelete = textboxContextMenu.querySelector("[command=cmd_delete]");
  let cmdSelectAll = textboxContextMenu.querySelector("[command=cmd_selectAll]");
  let cmdCut = textboxContextMenu.querySelector("[command=cmd_cut]");
  let cmdCopy = textboxContextMenu.querySelector("[command=cmd_copy]");
  let cmdPaste = textboxContextMenu.querySelector("[command=cmd_paste]");

  info("Opening context menu");

  let onContextMenuPopup = once(textboxContextMenu, "popupshowing");
  textboxContextMenu.openPopupAtScreen(0, 0, true);
  yield onContextMenuPopup;

  is(cmdUndo.getAttribute("disabled"), "true", "cmdUndo is disabled");
  is(cmdDelete


 valid CIDR`,
	}, {
		about:     "empty CIDR, strict=true",
		input:     "",
		strict:    true,
		expectErr: `"" is not a valid CIDR`,
	}} {
		c.Logf("test #%d: %s -> %s", i, test.about, test.expectErr)
		validated, err := s.baseCmd.ValidateCIDR(test.input, test.strict)
		if test.expectErr != "" {
			c.Check(err, tc.ErrorMatches, test.expectErr)
		} else {
			c.Check(err, tc.ErrorIsNil)
		}
		c.Check(validated, tc.Equals, test.output)
	}
}

func (s *SubnetCommandBaseSuite) TestValidateSpace(c *tc.C) {
	// We only validate a few more common invalid cases as
	// names.IsValidSpace() is separately and more extensively tested.
	for i, test := range []struct {
		about     string
		input     string
		expectErr string
	}{{
		about: "valid space - only lowercase letters",
		input: "space",
	}, {
		about: "valid space - only numbers",
		input: "42",
	}, {
		about: "valid space - only lowercase letters and numbers",
		input: "over9000",
	}, {
		about: "valid space - with dashes",
		input: "my-new-99space",
	}, {
		about:     "invalid space - with symbols",
		input:     "%in$valid",
		expectErr: `"%in\$valid" is not a valid space name`,
	}, {
		about:     "invalid space - with underscores",
		input:     "42_foo",
		expectErr: `"42_foo" is not a valid space name`,
	}, {
		about:     "invalid space - with uppercase letters",
		input:     "Not-Good",
		expectErr: `"Not-Good" is not a valid space name`,
	}, {
		about:     "empty space name",
		input:     "",
		expectErr: `"" is not a valid space name`,
	}} {
		c.Logf("test #%d: %s -> %s", i, test.about, test.expectErr)
		validated, err := s.baseCmd.ValidateSpace(test.input)
		if test.expectErr != "" {
			c.Check(err, tc.ErrorMatches, test.expectErr)
			c.Check(validated.Id(), tc.Equals, "")
		} else {
			c.Check(err, tc.ErrorIsNil)
			// When the input is valid it should stay the same.
			c.Check(validated.Id(), tc.Equals, test.input)
		}
	}
}
// Copyright 2022 Canonical Ltd.
// Licensed under the AGPLv3, see LICENCE file for details.

package config

import (
	"bytes"
	"io"
	"io/fs"
	"os"
	"path"
	"testing"

	"github.com/juju/gnuflag"
	"github.com/juju/tc"

	jujucmd "github.com/juju/juju/internal/cmd"
)

type suite struct{}

func TestSuite(t *testing.T) {
	tc.Run(t, &suite{})
}

func (s *suite) TestSetFlags(c *tc.C) {
	for _, resettable := range []bool{true, false} {
		cmd := ConfigCommandBase{Resettable: resettable}
		f := flagSetForTest(c)
		cmd.SetFlags(f)

		// Collect all flags
		expectedFlags := []string{"color", "file", "no-color"}
		if resettable {
			expectedFlags = append(expectedFlags, "reset


/*
 *  Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
 *
 *  Use of this source code is governed by a BSD-style license
 *  that can be found in the LICENSE file in the root of the source
 *  tree. An additional intellectual property rights grant can be found
 *  in the file PATENTS.  All contributing project authors may
 *  be found in the AUTHORS file in the root of the source tree.
 */

#ifndef MEDIA_ENGINE_VIDEODECODERSOFTWAREFALLBACKWRAPPER_H_
#define MEDIA_ENGINE_VIDEODECODERSOFTWAREFALLBACKWRAPPER_H_

#include <memory>
#include <string>

#include "api/video_codecs/video_decoder.h"

namespace webrtc {

// Class used to wrap external VideoDecoders to provide a fallback option on
// software decoding when a hardware decoder fails to decode a stream due to
// hardware restrictions, such as max resolution.
class VideoDecoderSoftwareFallbackWrapper : public VideoDecoder {
 public:
  VideoDecoderSoftwareFallbackWrapper(
      std::unique_ptr<VideoDecoder> sw_fallback_decoder,
      std::unique_ptr<VideoDecoder> hw_decoder);
  ~VideoDecoderSoftwareFallbackWrapper() override;

  int32_t InitDecode(const VideoCodec* codec_settings,
                     int32_t number_of_cores) override;

  int32_t Decode(const EncodedImage& input_image,
                 bool missing_frames,
                 const CodecSpecificInfo* codec_specific_info,
                 int64_t render_time_ms) override;

  int32_t RegisterDecodeCompleteCallback(
      DecodedImageCallback* callback) override;

  int32_t Release() override;
  bool PrefersLateDecoding() const override;

  const char* ImplementationName() const override;

 private:
  bool InitFallbackDecoder();
  int32_t InitHwDecoder();

  VideoDecoder& active_decoder() const;

  // Determines if we are trying to use the HW or SW decoder.
  enum class DecoderType {
    kNone,
    kHardware,
    kFallback,
  } decoder_type_;
  std::unique_ptr<VideoDecoder> hw_decoder_;

  VideoCodec codec_settings_;
  int32_t number_of_cores_;
  const std::unique_ptr<VideoDecoder> fallback_decoder_;
  const std::string fallback_implementation_name_;
  DecodedImageCallback* callback_;
};

}  // namespace webrtc

#endif  // MEDIA_ENGINE_VIDEODECODERSOFTWAREFALLBACKWRAPPER_H_


em[i1]);}}void gen_alnum(HBitWriter *out,alnum * val){h_bit_writer_put(out,val[0],8);}void gen_domain(HBitWriter *out,domain * val){for(int i2=0;i2<val->count;i2++){if(i2!= 0){h_bit_writer_put(out,'.',8);
}for(int i3=0;i3<val->elem[i2].count;i3++){gen_alnum(out,&val->elem[i2].elem[i3]);}}}void gen_definition(HBitWriter *out,definition * val){gen_domain(out,&val->hostname);switch(val->rr.N_type){
case NX:
h_bit_writer_put(out,':',8);
h_bit_writer_put(out,'N',8);
h_bit_writer_put(out,'X',8);
h_bit_writer_put(out,':',8);
gen_domain(out,&val->rr.NX);break;
case CNAME:
h_bit_writer_put(out,':',8);
h_bit_writer_put(out,'C',8);
h_bit_writer_put(out,'N',8);
h_bit_writer_put(out,'A',8);
h_bit_writer_put(out,'M',8);
h_bit_writer_put(out,'E',8);
h_bit_writer_put(out,':',8);
gen_domain(out,&val->rr.CNAME);break;
case MX:
h_bit_writer_put(out,':',8);
h_bit_writer_put(out,'M',8);
h_bit_writer_put(out,'X',8);
h_bit_writer_put(out,':',8);
gen_domain(out,&val->rr.MX);break;
case A:
h_bit_writer_put(out,':',8);
h_bit_writer_put(out,'A',8);
h_bit_writer_put(out,':',8);
gen_domain(out,&val->rr.A);break;
}{/*Context-rewind*/
 HBitWriter end_of_struct= *out;
out->index = end_of_struct.index;
out->bit_offset = end_of_struct.bit_offset;
}}void gen_zone(HBitWriter *out,zone * val){for(int i4=0;i4<val->count;i4++){gen_definition(out,&val->elem[i4]);}}


 Fields.H8_ID; ++squareID2)
	              if (squareID1 != squareID2) {
	                  SquareDistance[squareID1][squareID2] = Math.max(distanceFile(squareID1, squareID2), distanceRank(squareID1, squareID2));
	                  DistanceRingBB[squareID1][SquareDistance[squareID1][squareID2]] |= SquareBB[squareID2];

	                  //System.out.println("DistanceRingBB[" + squareID1 + "][" + SquareDistance[squareID1][squareID2] + "] = " + DistanceRingBB[squareID1][SquareDistance[squareID1][squareID2]]);
	              }

	      int steps[][] = { {}, { 7, 9 }, { 6, 10, 15, 17 }, {}, {}, {}, { 1, 7, 8, 9 } };//For pawns, knight and king only
	      for (int colour = Constants.COLOUR_WHITE; colour <= Constants.COLOUR_BLACK; ++colour) {
	    	  for (int squareID = Fields.A1_ID; squareID <= Fields.H8_ID; ++squareID) {

	    		  for (int i = 0; i < steps[Constants.TYPE_PAWN].length; ++i) {

	    			  int squareID_to = squareID + (colour == Constants.COLOUR_WHITE ? steps[Constants.TYPE_PAWN][i] : -steps[Constants.TYPE_PAWN][i]);

	                  if (is_ok(squareID_to) && distance(squareID, squareID_to) < 3) {
	                       PawnAttacks[colour][squareID] |= SquareBB[squareID_to];
	                  }
	    		  }

	    		  for (int i = 0; i < steps[Constants.TYPE_KNIGHT].length; ++i) {

	    			  int squareID_to = squareID + (colour == Constants.COLOUR_WHITE ? steps[Constants.TYPE_KNIGHT][i] : -steps[Constants.TYPE_KNIGHT][i]);

	                  if (is_ok(squareID_to) && distance(squareID, squareID_to) < 3) {
	                	  PseudoAttacks[Constants.TYPE_KNIGHT][squareID] |= SquareBB[squareID_to];
	                  }
	    		  }

	    		  for (int i = 0; i < steps[Constants.TYPE_KING].length; ++i) {

	    			  int squareID_to = squareID + (colour == Constants.COLOUR_WHITE ? steps[Constants.TYPE_KING][i] : -steps[Constants.TYPE_KING][i]);

	                  if (is_ok(squareID_to) && distance(squareID, squareID_to) < 3) {
	                	  PseudoAttacks[Constants.TYPE_KING][squareID] |= SquareBB[squareID_to];
	                  }
	    		  }
	    	  }
	      }

	      for (int squareID = Fields.A1_ID; squareID <= Fields.H8_ID; ++squareID) {
	    	  PseudoAttacks[Constants.TYPE_ROOK][squareID] = Magics.getRookMoves(squareID, 0);
	      }

	      for (int squareID = Fields.A1_ID; squareID <= Fields.H8_ID; ++squareID) {
	    	  PseudoAttacks[Constants.TYPE_BISHOP][squareID] = Magics.getBishopMoves(squareID, 0);
	      }

	      for (int squareID = Fields.A1_ID; squareID <= Fields.H8_ID; ++squareID) {
	    	  PseudoAttacks[Constants.TYPE_QUEEN][squareID] = PseudoAttacks[Constants.TYPE_ROOK][squareID] | PseudoAttacks[Constants.TYPE_BISHOP][squareID];
	      }
	}

	public static final long shiftBB(final long b, final int direction)
	{
		switch (direction) {
			case Direction_NORTH:
				return b << 8;
			case Direction_SOUTH:
				return b


g2, %g1

	bne,pt		%xcc, 2f
	 nop
	stxa		%g0, [%g3] ASI_DCACHE_TAG
	membar		#Sync
2:	cmp		%g3, 0
	bne,pt		%xcc, 1b
	 sub		%g3, (1 << 5), %g3

	brz,pn		%g5, 2f
#endif /* DCACHE_ALIASING_POSSIBLE */
	 sethi		%hi(PAGE_SIZE), %g3

1:	flush		%g7
	subcc		%g3, (1 << 5), %g3
	bne,pt		%icc, 1b
	 add		%g7, (1 << 5), %g7

2:	retry
	nop
	nop

	/* %g5:	error
	 * %g6:	tlb op
	 */
__hypervisor_tlb_xcall_error:
	mov	%g5, %g4
	mov	%g6, %g5
	ba,pt	%xcc, etrap
	 rd	%pc, %g7
	mov	%l4, %o0
	call	hypervisor_tlbop_error_xcall
	 mov	%l5, %o1
	ba,a,pt	%xcc, rtrap

	.globl		__hypervisor_xcall_flush_tlb_mm
__hypervisor_xcall_flush_tlb_mm: /* 24 insns */
	/* %g5=ctx, g1,g2,g3,g4,g7=scratch, %g6=unusable */
	mov		%o0, %g2
	mov		%o1, %g3
	mov		%o2, %g4
	mov		%o3, %g1
	mov		%o5, %g7
	clr		%o0		/* ARG0: CPU lists unimplemented */
	clr		%o1		/* ARG1: CPU lists unimplemented */
	mov		%g5, %o2	/* ARG2: mmu context */
	mov		HV_MMU_ALL, %o3	/* ARG3: flags */
	mov		HV_FAST_MMU_DEMAP_CTX, %o5
	ta		HV_FAST_TRAP
	mov		HV_FAST_MMU_DEMAP_CTX, %g6
	brnz,pn		%o0, 1f
	 mov		%o0, %g5
	mov		%g2, %o0
	mov		%g3, %o1
	mov		%g4, %o2
	mov		%g1, %o3
	mov		%g7, %o5
	membar		#Sync
	retry
1:	sethi		%hi(__hypervisor_tlb_xcall_error), %g4
	jmpl		%g4 + %lo(__hypervisor_tlb_xcall_error), %g0
	 nop

	.globl		__hypervisor_xcall_flush_tlb_page
__hypervisor_xcall_flush_tlb_page: /* 20 insns */
	/* %g5=ctx, %g1=vaddr */
	mov		%o0, %g2
	mov		%o1, %g3
	mov		%o2, %g4
	mov		%g1, %o0	        /* ARG0: virtual address */
	mov		%g5, %o1		/* ARG1: mmu context */
	mov		HV_MMU_ALL, %o2		/* ARG2: flags */
	srlx		%o0, PAGE_SHIFT, %o0
	sllx		%o0, PAGE_SHIFT, %o0
	ta		HV_MMU_UNMAP_ADDR_TRAP
	mov		HV_MMU_UNMAP_ADDR_TRAP, %g6
	brnz


local UI = Z.UI
local super = require("ui.ui_subview_base")
local Union_device_buff_subView = class("Union_device_buff_subView", super)
local loopListView = require("ui.component.loop_list_view")
local union_loop_buff_item = require("ui.component.union.union_loop_buff_item")
local unionBuffitem = require("ui.component.union.union_buff_item")
local MAX_BUFF_COUNT = Z.ConstValue.UnionConstValue.MAX_BUFF_COUNT

function Union_device_buff_subView:ctor(parent)
  self.uiBinder = nil
  super.ctor(self, "union_device_buff_sub", "union_2/union_device_buff_sub", UI.ECacheLv.None)
  self.unionVM_ = Z.VMMgr.GetVM("union")
  self.commonVM = Z.VMMgr.GetVM("common")
  self.itemsVM_ = Z.VMMgr.GetVM("items")
  self.unionData_ = Z.DataMgr.Get("union_data")
end

function Union_device_buff_subView:OnActive()
  self.uiBinder.Trans:SetOffsetMin(0, 0)
  self.uiBinder.Trans:SetOffsetMax(0, 0)
  self:bindEvents()
  self:initData()
  self:initComponent()
  self:initLoopListView()
  self:initQuery()
end

function Union_device_buff_subView:OnDeActive()
  self:clearBuffTimer()
  self:unBindEvents()
  self:unInitBuffItem()
  self:unInitLoopListView()
  self:closeItemTips()
end

function Union_device_buff_subView:OnRefresh()
end

function Union_device_buff_subView:initData()
  self.itemTableMgr_ = Z.TableMgr.GetTable("ItemTableMgr")
  self.unionTimelinessBuffTableMgr_ = Z.TableMgr.GetTable("UnionTimelinessBuffTableMgr")
  self.buildConfig_ = self.unionVM_:GetUnionBuildConfig(E.UnionBuildId.Buff)
  self.allBuffConfigList_ = {}
  self.curSelectedBuffId_ = nil
  self.curBuffSlotIndex_ = nil
  self.curEquipBuffDict_ = self.unionVM_:GetEquipBuffInfoDict()
  local configDict = self.unionTimelinessBuffTableMgr_:GetDatas()
  for _, config in pairs(configDict) do
    table.insert(self.allBuffConfigList_, config)
  end
  self.buffItemDict_ = {}
  self.isSetBySelf_ = false
  self.updateSlotDict_ = {}
end

function Union_device_buff_subView:initComponent()
  self:AddAsyncClick(self.uiBinder.btn_confirm, function()
    self:onConfirmBtnClick()
  end)
  self:AddAsyncClick(self.uiBinder.btn_cancel, function()
    self:onCancelBtnClick()
  end)
  self:AddClick(self.uiBinder.btn_cost, function()
    self:onCostBtnClick()
  end)
end

function Union_device_buff_subView:initQuery()
  Z.CoroUtil.create_coro_xpcall(function()
    local reply = self.unionVM_:AsyncReqUnionInfo(self.unionVM_:GetPlayerUnionId(), self.cancelSource:CreateToken())
    if reply.errCode and reply.errCode == 0 then
      self:resetData()
      self:refreshTotalInfo()
    end
  end)()
end

function Union_device_buff_subView:bindEvents()
  Z.EventMgr:Add(Z.ConstValue.UnionActionEvt.UnionResourceChange, self.onUnionResourceChange, self)
  Z.EventMgr:Add(Z.ConstValue.UnionActionEvt.UnionBuildBuffInfoChange, self.onUnionBuildBuffInfoChange, self)
end

function Union_device_buff_subView:unBindEvents()
  Z.EventMgr:Remove(Z.ConstValue.UnionActionEvt.UnionResourceChange, self.onUnionResourceChange, self)
  Z.EventMgr:Remove(Z.Co


tState.hide()
		} catch (_: CancellationException) {
			// We catch but ignore possible cancellation exceptions as we don't want
			// them to bubble up and cancel the whole produceState coroutine
		} finally {
			value = targetBackStackEntry
		}
	}

	BottomSheetHost(
		navigator = navigator,
		modifier = modifier,
		sheetMaxWidth = sheetMaxWidth,
		shape = shape,
		containerColor = containerColor,
		contentColor = contentColor,
		tonalElevation = tonalElevation,
		scrimColor = scrimColor,
		dragHandle = dragHandle,
		sheetState = sheetState,
		contentWindowInsets = contentWindowInsets,
		saveableStateHolder = saveableStateHolder,
		backStackEntry = backStackEntry ?: return,
	)
}

@OptIn(ExperimentalMaterial3Api::class)
@Composable
private fun BottomSheetHost(
	navigator: BottomSheetNavigator,
	modifier: Modifier = Modifier,
	sheetMaxWidth: Dp,
	shape: Shape,
	containerColor: Color,
	contentColor: Color,
	tonalElevation: Dp,
	scrimColor: Color,
	dragHandle: @Composable (() -> Unit)?,
	contentWindowInsets: @Composable () -> WindowInsets,
	sheetState: SheetState,
	saveableStateHolder: SaveableStateHolder,
	backStackEntry: NavBackStackEntry,
) {
	LaunchedEffect(backStackEntry) {
		sheetState.show()
	}

	backStackEntry.LocalOwnersProvider(saveableStateHolder) {
		val destination = backStackEntry.destination as BottomSheetNavigator.Destination

		ModalBottomSheet(
			onDismissRequest = { navigator.dismiss(backStackEntry) },
			modifier = modifier,
			sheetState = sheetState,
			sheetMaxWidth = sheetMaxWidth,
			shape = shape,
			containerColor = containerColor,
			contentColor = contentColor,
			tonalElevation = tonalElevation,
			scrimColor = scrimColor,
			dragHandle = dragHandle,
			contentWindowInsets = contentWindowInsets,
			properties = ModalBottomSheetProperties(securePolicy = destination.securePolicy),
		) {
			LaunchedEffect(backStackEntry) {
				navigator.onTransitionComplete(backStackEntry)
			}
			DisposableEffect(backStackEntry) {
				onDispose {
					navigator.onTransitionComplete(backStackEntry)
				}
			}
			destination.content(backStackEntry)
		}
	}
}
package com.hsicen.daggersample

import android.annotation.SuppressLint
import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import com.hsicen.daggersample.data.User
import com.hsicen.daggersample.databinding.ActivityMainBinding
import java.util.concurrent.ExecutorService
import java.util.logging.Logger
import javax.inject.Inject

/**
 * 作者：hsicen  2020/8/16 13:31
 * 邮箱：codinghuang@163.com
 * 功能：
 * 描述：Dagger2依赖注入
 */
class MainActivity : AppCompatActivity() {
    lateinit var mBinding: ActivityMainBinding

    @Inject
    lateinit var mUser: User

    @Inject
    lateinit var mExecutorService: ExecutorService

    @SuppressLint("SetTextI18n")
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        mBinding = ActivityMainBinding.inflate(layoutInflater)
        setContentView(mBinding.root)

        //手动加入依赖图
        (application as DaggerApp).coreComponent.inject(this)

        //mBinding.tvUser.text = "${mUser.name}使用Dagger的心情是：${mUser.mood}"
        mUser.mood = "难受"

        mExecutorService.execute {
            Logger.getGlobal().info("Msg from ${Thread.currentThread().name}")


clone(),
                params!(Float64, Float64) => func.clone(),
                params!(Date, Date) => func.clone(),
                params!(Time, Time) => func.clone(),
                params!(Timestamp, Timestamp) => func.clone(),
                params!(TimestampTz, TimestampTz) => func.clone(),
                params!(Interval, Interval) => func.clone(),
                params!(Bytes, Bytes) => func.clone(),
                params!(String, String) => func.clone(),
                params!(Jsonb, Jsonb) => func.clone()
            );
        }

        m
    };
}

/// Rescales two decimals to have the same scale.
fn rescale_decimals_to_same(
    ecx: &ExprContext,
    lhs: ScalarExpr,
    rhs: ScalarExpr,
) -> (ScalarExpr, ScalarExpr) {
    let (_, s1) = ecx.scalar_type(&lhs).unwrap_decimal_parts();
    let (_, s2) = ecx.scalar_type(&rhs).unwrap_decimal_parts();
    let so = std::cmp::max(s1, s2);
    let lexpr = rescale_decimal(lhs, s1, so);
    let rexpr = rescale_decimal(rhs, s2, so);
    (lexpr, rexpr)
}

fn binary_op_err_string(ident: &str, types: &[Option<ScalarType>], hint: String) -> String {
    format!(
        "no overload for {} {} {}: {}",
        stringify_opt_scalartype(&types[0]),
        ident,
        stringify_opt_scalartype(&types[1]),
        hint,
    )
}

/// Plans a function compatible with the `BinaryOperator`.
pub fn plan_binary_op<'a>(
    ecx: &ExprContext,
    op: &'a BinaryOperator,
    left: &'a Expr,
    right: &'a Expr,
) -> Result<ScalarExpr, anyhow::Error> {
    let impls = match BINARY_OP_IMPLS.get(&op) {
        Some(i) => i,
        // TODO: these require sql arrays
        // JsonContainsAnyFields
        // JsonContainsAllFields
        // TODO: these require json paths
        // JsonGetPath
        // JsonGetPathAsText
        // JsonDeletePath
        // JsonContainsPath
        // JsonApplyPathPredicate
        None => unsupported!(op),
    };

    let cexprs = vec![query::plan_expr(ecx, left)?, query::plan_expr(ecx, right)?];

    ArgImplementationMatcher::select_implementation(
        &op.to_string(),
        binary_op_err_string,
        ecx,
        impls,
        cexprs,
    )
}

lazy_static! {
    /// Correlates a `UnaryOperator` with all of its implementations.
    static ref UNARY_OP_IMPLS: HashMap<UnaryOperator, Vec<FuncImpl<ScalarExpr>>> = {
        use ParamType::*;
        use ScalarType::*;
        use UnaryOperator::*;
        impls! {
            Not => {
                params!(Bool) => UnaryFunc::Not
            },

            Plus => {
                params!(Any) => identity_op()
            },

            Minus => {
                params!(Int32) => UnaryFunc::NegInt32,
                params!(Int64) => UnaryFunc::NegInt64,
                params!(Float32) => UnaryFunc::NegFloat32,
                params!(Float64) => UnaryFunc::NegFloat64,
                params!(ScalarType::Decimal(0, 0)) => UnaryFunc::NegDecimal,
                params!(Interval) => UnaryFunc::NegInterval
            }
        }
    };
}

fn unary_op_err_string(ident: &str, types: &[Option<ScalarType>], hint: String) -> String {
    format!(
        "no overload for {} {}: {}",
        ident,
        stringify_opt_scalartype(&types[0]),
        hint,
    )
}

/// Plans a function compatible with the `UnaryOperator`.
pub fn plan_unary_op<'a>(
    ecx: &ExprContext,
    op: &'a UnaryOperator,
    expr: &'a Expr,
) -> Result<ScalarExpr, anyhow::Error> {
    let impls = match UNARY_OP_IMPL


_8
import java.io.ByteArrayInputStream
import java.io.File
import java.util.concurrent.ConcurrentHashMap

class ClassFileUtils {
    companion object{
        var reflectInvokeMethod = false
        var reflectInvokeMethodStatic = false
        var debugMode = false
        private const val INVOKE_METHOD = "invoke"
        private const val INVOKE_DESCRIPTOR = "(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;"
        private const val INVOKE_CLASS = "com.flyjingfish.android_aop_annotation.utils.InvokeMethod"
        private const val INVOKE_CLASSES = "com.flyjingfish.android_aop_annotation.utils.InvokeMethods"
        private val instanceMap = ConcurrentHashMap<String,ClassFileUtils>()

        fun get(project: RuntimeProject):ClassFileUtils{
            val key = project.layoutBuildDirectory.absolutePath
            return instanceMap.computeIfAbsent(key) { ClassFileUtils() }
        }

    }

    // 这个文件夹下的文件在 debugMode = true 时不可随意删除
    lateinit var outputDir:File
    var outputCacheDir:File ?= null
    lateinit var outputDebugModeCacheDir:File
    private val invokeClasses = ConcurrentHashMap<String,MutableList<InvokeClass>>()
    private val invokeCache = ConcurrentHashMap<String,String?>()

    fun clear(){
        invokeClasses.clear()
    }

    private fun saveInvokeCache(path:String,classData:String){
        invokeCache[path] = classData
    }

    private fun hasInvokeCache(path:String,classData:String):Boolean{
        return File(path).exists() && invokeCache[path] == classData
    }

    fun wovenInfoInvokeClass(newClasses: MutableList<ByteArray>) :MutableList<String> = runBlocking{
        val cacheFiles = mutableListOf<String>()
        if (reflectInvokeMethod && !reflectInvokeMethodStatic){
            return@runBlocking cacheFiles
        }

        if (reflectInvokeMethod && reflectInvokeMethodStatic){
            for (invokeClasses in invokeClasses) {
                val value = invokeClasses.value
                val path = outputDir.absolutePath + File.separatorChar +Utils.dotToSlash(invokeClasses.key).adapterOSPath()+".class"
                val outFile = File(path)
//                if (outFile.exists()){
//                    outFile.delete()
//                }
                val cp = ClassPoolUtils.getNewClassPool()
                outputCacheDir?.let {
                    cp.appendClassPath(it.absolutePath)
                }
                newClasses.forEach {
                    cp.makeClass(ByteArrayInputStream(it))
                }
                cp.importPackage(CONVERSIONS_CLASS)
                val ctClass = cp.get(invokeClasses.key)

                for (invokeClass in value) {
                    val className = invokeClass.packageName
                    val invokeBody = invokeClass.invokeBody

                    try {
                        val methodName = className.replace(".","_")
                        val ctMethod =
                            WovenIntoCode.getCtMethod(ctClass, methodName, INVOKE_DESCRIPTOR)
                        if (ctMethod != null){
                            ctMethod.setBody(invokeBody)
                        }else{
                            val methodBody =
                                "public static final Object $methodName(Object target,Object[] vars)  " +
                                        invokeBody
                            val newMethod = CtNewMethod.make(methodBody, ctClass)
                            ctClass.addMethod(newMethod);
                        }

                    } catch (e: NotFoundException) {
                        throw RuntimeException(e)
                    } catch (e: CannotCompileException) {
                        printLog("invokeBody=$invokeBody")
                        throw RuntimeException(e)
                    }
                }
                val classByteData = ctClass.toBytecode()
                outFile.checkExist()
                classByteData.saveFile(outFile)
                synchronized(cacheFiles){
                    cacheFiles.add(path)
                }
//            ctClass.detach()
            }
        }else{
            val invokeJobs = mutableListOf<Deferred<Unit>>()
            val needDeleteFiles = mutableListOf<String>()
            if (!debugMode){
                outputDir.walk().filter { it.isFile }.forEach { file ->
                    needDeleteFiles.add(file.absolutePath)
                }
            }
            for (invokeClasses in inv


 target(LogicalType::kTimestamp);
        EXPECT_THROW_WITHOUT_STACKTRACE(BindFloatCast<DoubleT>(source, target), UnrecoverableException);
    }
}
// Copyright(C) 2023 InfiniFlow, Inc. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

module;

#include "unit_test/gtest_expand.h"

module infinity_core:ut.blob_type;

import :ut.base_test;
import :infinity_exception;
import third_party;
import :logger;
import :infinity_context;

import global_resource_usage;

#if 0

using namespace infinity;
class BlobTypeTest : public BaseTest {};

TEST_F(BlobTypeTest, blob1) {
    using namespace infinity;

    constexpr i64 SIZE = 27;

    auto blob_ptr = new char[SIZE]{0};

    for (i64 i = 0; i < SIZE; ++i) {
        blob_ptr[i] = 'a' + static_cast<char_t>(i);
    }
    blob_ptr[SIZE - 1] = 0;

    EXPECT_STREQ(blob_ptr, "abcdefghijklmnopqrstuvwxyz");

    // Constructor from ptr and size
    BlobT b1(blob_ptr, SIZE);
    EXPECT_STREQ(b1.ptr, "abcdefghijklmnopqrstuvwxyz");
    EXPECT_EQ(b1.size, SIZE);

    // Copy constructor
    BlobT b2(b1);
    EXPECT_STREQ(b2.ptr, "abcdefghijklmnopqrstuvwxyz");
    EXPECT_EQ(b2.size, SIZE);

    EXPECT_EQ(b1, b2);
    EXPECT_FALSE(b1 != b2);

    // std::move constructor
    BlobT b3(std::move(b1));
    EXPECT_STREQ(b2.ptr, "abcdefghijklmnopqrstuvwxyz");
    EXPECT_EQ(b2.size, SIZE);

    EXPECT_EQ(b1.ptr, nullptr);
    EXPECT_EQ(b1.size, 0);

    // Copy assignment
    BlobT b4;
    b4 = b2;
    EXPECT_STREQ(b4.ptr, "abcdefghijklmnopqrstuvwxyz");
    EXPECT_EQ(b4.size, SIZE);

    // std::move assignment
    BlobT b5;
    b5 = std::move(b2);
    EXPECT_STREQ(b5.ptr, "abcdefghijklmnopqrstuvwxyz");
    EXPECT_EQ(b5.size, SIZE);

    EXPECT_EQ(b2.ptr, nullptr);
    EXPECT_EQ(b2.size, 0);

    // Reset;
    b5.Reset();
    EXPECT_EQ(b5.ptr, nullptr);
    EXPECT_EQ(b5.size, 0);

    // std::move from ptr;
    blob_ptr = new char[SIZE]{0};

    for (i64 i = 0; i < SIZE; ++i) {
        blob_ptr[i] = 'a' + static_cast<char_t>(i);
    }
    blob_ptr[SIZE - 1] = 0;
    BlobT b6;
    b6.std::move(blob_ptr, SIZE);
    EXPECT_STREQ(b6.ptr, "abcdefghijklmnopqrstuvwxyz");
    EXPECT_EQ(b6.size, SIZE);

    // Copy from ptr;
    BlobT b7;
    b7.Copy(blob_ptr, SIZE);
    EXPECT_STREQ(b7.ptr, "abcdefghijklmnopqrstuvwxyz");
    EXPECT_EQ(b7.size, SIZE);
}
#endif
// Copyright(C) 2023 InfiniFlow, Inc. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not