, from, to]) => {
         result.update = {
            head: {
               local,
               remote,
            },
            hash: {
               from,
               to,
            },
         };
      }
   ),
];

export const parsePushResult: TaskParser<string, PushResult> = (stdOut, stdErr) => {
   const pushDetail = parsePushDetail(stdOut, stdErr);
   const responseDetail = parseRemoteMessages<PushResultRemoteMessages>(stdOut, stdErr);

   return {
      ...pushDetail,
      ...responseDetail,
   };
};

export const parsePushDetail: TaskParser<string, PushDetail> = (stdOut, stdErr) => {
   return parseStringResponse({ pushed: [] }, parsers, [stdOut, stdErr]);
};
/// <reference path="./interfaces/error.d.ts" />
/// <reference path="./interfaces/find-options.d.ts" />
/// <reference path="./interfaces/permission-result.d.ts" />
/// <reference path="./interfaces/ContactX.d.ts" />

declare module 'cordova-plugin-contacts-x' {

  export default class ContactsX {

    static ErrorCodes: {
      UnsupportedAction,
      WrongJsonObject,
      PermissionDenied,
      UnknownError
    }

    /**
     * Get all contacts
     *
     * @param success
     * @param error
     * @param options
     */
    static find(success: (result: ContactX[]) => void, error: (error: ContactXError) => void, options?: FindOptions);

    /**
     * Open a contact picker
     *
     * @param success
     * @param error
     */
    static pick(success: (result: ContactX) => void, error: (error: ContactXError) => void);

    /**
     * Save or modify a contact
     *
     * @param contact
     * @param success
     * @param error
     */
    static save(contact: ContactX, success: (result: ContactX) => void, error: (error: ContactXError) => void);

    /**
     * delete a contact
     *
     * @param id
     * @param success
     * @param error
     */
    static delete(id: string, success: () => void, error: (error: ContactXError) => void);

    /**
     * Check permission is available
     *
     * @param success
     * @param error
     */
    static hasPermission(success: (result: ContactXPermissionResult) => void, error: (error: ContactXError) => void);

    /**
     * Request Permission (if not available and possible)
     *
     * @param success
     * @param error
     */
    static requestPermission(success: (result: ContactXPermissionResult) => void, error: (error: ContactXError) => void);

    /**
     * Request Write Permission (if not available and possible - android only)
     *
     * @param success
     * @param error
     */
    static requestWritePermission(success: (result: ContactXPermissionResult) => void, error: (error: ContactXError) => void);
  }

}
export class ListItem<T = string> {
    public label: string;
    public value: T;

    constructor(label: string, value: T) {
        this.label = label;
        this.value = value;
    }

    public equalTo(target: ListItem<T>): boolean {
        return this.label === target.label && this.value === target.value;
    }
}

export type ListMap<T> = { [key: string]: Array<T> };
import { Pipe, PipeTransform } from '@angular/core';

@Pipe({name: 'balanceExp


分合": [["fēn"], ["hé"]],
"分红": [["fēn"], ["hóng"]],
"分洪": [["fēn"], ["hóng"]],
"分会": [["fēn"], ["huì"]],
"分化": [["fēn"], ["huà"]],
"分机": [["fēn"], ["jī"]],
"分级": [["fēn"], ["jí"]],
"分际": [["fēn"], ["jì"]],
"分家": [["fēn"], ["jiā"]],
"分拣": [["fēn"], ["jiǎn"]],
"分节": [["fēn"], ["jié"]],
"分解": [["fēn"], ["jiě"]],
"分界": [["fēn"], ["jiè"]],
"分居": [["fēn"], ["jū"]],
"分局": [["fēn"], ["jú"]],
"分科": [["fēn"], ["kē"]],
"分开": [["fēn"], ["kāi"]],
"分类": [["fēn"], ["lèi"]],
"分厘": [["fēn"], ["lí"]],
"分离": [["fēn"], ["lí"]],
"分理": [["fēn"], ["lǐ"]],
"分立": [["fēn"], ["lì"]],
"分力": [["fēn"], ["lì"]],
"分利": [["fēn"], ["lì"]],
"分量": [["fèn"], ["liàng"]],
"分流": [["fēn"], ["liú"]],
"分裂": [["fēn"], ["liè"]],
"分列": [["fēn"], ["liè"]],
"分馏": [["fēn"], ["liú"]],
"分米": [["fēn"], ["mǐ"]],
"分路": [["fēn"], ["lù"]],
"分娩": [["fēn"], ["miǎn"]],
"分泌": [["fēn"], ["mì"]],
"分秒": [["fēn"], ["miǎo"]],
"分明": [["fēn"], ["míng"]],
"分母": [["fēn"], ["mǔ"]],
"分内": [["fèn"], ["nèi"]],
"分蘖": [["fēn"], ["niè"]],
"分派": [["fēn"], ["pài"]],
"分配": [["fēn"], ["pèi"]],
"分片": [["fēn"], ["piàn"]],
"分批": [["fēn"], ["pī"]],
"分频": [["fēn"], ["pín"]],
"分期": [["fēn"], ["qī"]],
"分岐": [["fēn"], ["qí"]],
"分歧": [["fēn"], ["qí"]],
"分清": [["fēn"], ["qīng"]],
"分区": [["fēn"], ["qū"]],
"分权": [["fēn"], ["quán"]],
"分润": [["fēn"], ["rùn"]],
"分散": [["fēn"], ["sǎn"]],
"分色": [["fēn"], ["sè"]],
"分设": [["fēn"], ["shè"]],
"分身": [["fēn"], ["shēn"]],
"分神": [["fēn"], ["shén"]],
"分时": [["fēn"], ["shí"]],
"分式": [["fēn"], ["shì"]],
"分手": [["fēn"], ["shǒu"]],


	"unicode"
)

var ErrTrailingDollarOpNotAllowed = errors.New("invalid filter syntax, found trailing $")

type CompareFunc func(x, y interface{}) (bool, error)

var cmp map[string]CompareFunc

func init() {
	cmp = map[string]CompareFunc{
		"$gte":   gte,
		"$gt":    gt,
		"$lte":   lte,
		"$lt":    lt,
		"$in":    in,
		"$nin":   nin,
		"$eq":    eq,
		"$neq":   neq,
		"$or":    or,
		"$and":   and,
		"$exist": exist,
		"$regex": regex,
	}
}

func Compare(payload map[string]interface{}, filter map[string]interface{}) (bool, error) {
	return compare(payload, filter)
}

func compare(payload map[string]interface{}, filter map[string]interface{}) (bool, error) {
	var pass []bool
	for key, filterVal := range filter {
		slen := len(key)

		// the filter ends with a trailing .$
		if key[slen-1] == '$' && key[slen-2] == '.' {
			return false, ErrTrailingDollarOpNotAllowed
		}

		if strings.Contains(key, "$.") {
			var chks []bool
			possibleKeys, err := genCombos(payload, key)
			if err != nil {
				return false, err
			}

			for _, newKey := range possibleKeys {
				if _, ok := payload[newKey]; ok {
					chk, err := compare(payload, map[string]interface{}{newKey: filterVal})
					if err != nil {
						return false, err
					}
					chks = append(chks, chk)
				}
			}

			var chkReduced bool

			if len(chks) > 0 {
				chkReduced = chks[0]
			}

			for i := range chks {
				if i == 0 {
					continue
				}
				chkReduced = chkReduced || chks[i]
			}

			pass = append(pass, chkReduced)
		}

		payloadVal, ok := payload[key]
		if !ok {
			if key == "$or" || key == "$and" {
				check, err := cmp[key](payload, filterVal)
				if err != nil {
					return false, err
				}
				pass = append(pass, check)
			}

			continue
		}

		switch v := filterVal.(type) {
		case map[string]interface{}:
			for vk, vv := range v {
				if vk == "$exist" {
					tmpFilter := map[string]interface{}{key: vv}
					check, err := cmp["$exist"](payload, tmpFilter)
					if err != nil {
						return false, err
					}
					pass = append(pass, check)

					continue
				}

				check, err := cmp[vk](payloadVal, vv)
				if err != nil {
					return false, err
				}
				pass = append(pass, check)
			}

		default:
			switch payloadVal.(type) {
			case []interface{}:
				check, err := cmp["$in"](payloadVal, filterVal)
				if err != nil {
					return false, err
				}
				pass = append(pass, check)

			case interface{}:
				check, err := cmp["$eq"](payloadVal, filterVal)
				if err != nil {
					return false, err
				}
				pass = append(pass, check)
			}

		}
	}

	passReduced := false
	if len(filter) == 0 {
		passReduced = true
	}

	if len(pass) > 0 {
		passReduced = pass[0]
	}

	for i := range pass {
		if i == 0 {
			continue
		}
		passReduced = passReduced && pass[i]
	}


ayer2[1].conv2,
                13: model.layer3[0].conv1,
                14: model.layer3[0].conv2,
                16: model.layer3[1].conv1,
                17: model.layer3[1].conv2,
            }

            if layer_index not in layer_index_to_module:
                return

            with torch.no_grad():
                module = layer_index_to_module[layer_index]
                module.weight[neuron_index] = 0
    elif dataset == "imagenet":
        def reset_function(model, layer_index, neuron_index):
            """
            Reset (and retrain) a neuron or channel by setting the weights
            of the input into the neuron/channel to zero
            """
            layer_index_to_module = {
                # original paper only resets weights in the second half
                29: model.layer3[0].conv1,
                30: model.layer3[0].conv2,
                31: model.layer3[0].conv3,
                33: model.layer3[1].conv1,
                34: model.layer3[1].conv2,
                35: model.layer3[1].conv3,
                37: model.layer3[2].conv1,
                38: model.layer3[2].conv2,
                39: model.layer3[2].conv3,
                41: model.layer3[3].conv1,
                42: model.layer3[3].conv2,
                43: model.layer3[3].conv3,
                45: model.layer3[4].conv1,
                46: model.layer3[4].conv2,
                47: model.layer3[4].conv3,
                49: model.layer3[5].conv1,
                50: model.layer3[5].conv2,
                51: model.layer3[5].conv3,
                53: model.layer4[0].conv1,
                54: model.layer4[0].conv2,
                55: model.layer4[0].conv3,
                57: model.layer4[1].conv1,
                58: model.layer4[1].conv2,
                59: model.layer4[1].conv3,
                61: model.layer4[2].conv1,
                62: model.layer4[2].conv2,
                63: model.layer4[2].conv3
            }

            if layer_index not in layer_index_to_module:
                return

            with torch.no_grad():
                module = layer_index_to_module[layer_index]
                module.weight[neuron_index] = 0
    else:
        raise ValueError

    return PartialLaundering(classifier, reset_function=reset_function, **kwargs)

@mlconfig.register
def neural_laundering_partial_removal(attack: Laundering, train_loader, config, **kwargs):
    train_loader_subset = config.subset_dataset(train=True)
    return attack, attack.remove(train_loader=train_loader, train_loader_subset=train_loader_subset, **kwargs)


				"+0.6%"
				},
				{
					"9.2%",
					"+0.8%"
				},
				{
					"10.0%"
				}
			},
			{
				{
					"4.0%",
					"+0.6%"
				},
				{
					"4.6%",
					"+0.6%"
				},
				{
					"5.2%",
					"+0.8%"
				},
				{
					"6.0%",
					"+0.6%"
				},
				{
					"6.6%",
					"+0.6%"
				},
				{
					"7.2%",
					"+0.8%"
				},
				{
					"8.0%",
					"+0.6%"
				},
				{
					"8.6%",
					"+0.6%"
				},
				{
					"9.2%",
					"+0.8%"
				},
				{
					"10.0%"
				}
			}
		}
	},
	[14300] = {
		desc_get = "",
		name = "掩护救援",
		type = 2,
		max_level = 10,
		desc = "在队伍中（存活）时，先锋舰队受到雷击伤害降低$1，主力舰队受到的航空伤害降低$2；战斗开始时，提升自身雷击属性$3，若队伍中存在{namecode:49}，额外提升自身雷击属性$4",
		id = 14300,
		system_transform = {},
		world_death_mark = {
			1
		},
		desc_get_add = {
			{
				"5.0%",
				"10.0%"
			},
			{
				"5.0%",
				"10.0%"
			},
			{
				"5.0%",
				"10.0%"
			},
			{
				"5.0%",
				"10.0%"
			}
		},
		desc_add = {
			{
				{
					"5.0%",
					"+0.5%"
				},
				{
					"5.5%",
					"+0.5%"
				},
				{
					"6.0%",
					"+0.5%"
				},
				{
					"6.5%",
					"+0.5%"
				},
				{
					"7.0%",
					"+0.5%"
				},
				{
					"7.5%",
					"+0.5%"
				},
				{
					"8.0%",
					"+0.5%"
				},
				{
					"8.5%",
					"+0.5%"
				},
				{
					"9.0%",
					"+1%"
				},
				{
					"10.0%"
				}
			},
			{
				{
					"5.0%",
					"+0.5%"
				},
				{
					"5.5%",
					"+0.5%"
				},
				{
					"6.0%",
					"+0.5%"
				},
				{
					"6.5%",
					"+0.5%"
				},
				{
					"7.0%",
					"+0.5%"
				},
				{
					"7.5%",
					"+0.5%"
				},
				{
					"8.0%",
					"+0.5%"
				},
				{
					"8.5%",
					"+0.5%"
				},
				{
					"9.0%",
					"+1%"
				},
				{
					"10.0%"
				}
			},
			{
				{
					"5.0%",
					"+0.5%"
				},
				{


")
class LogBuilderTest {

    private static final Marker MARKER = MarkerManager.getMarker("TestMarker");
    private static final CharSequence CHAR_SEQUENCE = "CharSequence";
    private static final String STRING = "String";
    private static final Message MESSAGE = new SimpleMessage();
    private static final Throwable THROWABLE = new RuntimeException();
    private static final Object[] P = {"p0", "p1", "p2", "p3", "p4", "p5", "p6", "p7", "p8", "p9"};
    private static final Object OBJECT = "Object";

    private Logger logger;
    private ListAppender appender;

    @BeforeEach
    void setupAppender(final LoggerContext context, @Named("LIST") final ListAppender appender) {
        this.logger = context.getLogger(getClass());
        this.appender = appender;
    }

    static Stream<Consumer<LogBuilder>> testMarkerFilter() {
        return Stream.of(
                logBuilder -> logBuilder.log(),
                logBuilder -> logBuilder.log(CHAR_SEQUENCE),
                logBuilder -> logBuilder.log(MESSAGE),
                logBuilder -> logBuilder.log(OBJECT),
                logBuilder -> logBuilder.log(STRING),
                logBuilder -> logBuilder.log(STRING, P[0]),
                logBuilder -> logBuilder.log(STRING, P[0], P[1]),
                logBuilder -> logBuilder.log(STRING, P[0], P[1], P[2]),
                logBuilder -> logBuilder.log(STRING, P[0], P[1], P[2], P[3]),
                logBuilder -> logBuilder.log(STRING, P[0], P[1], P[2], P[3], P[4]),
                logBuilder -> logBuilder.log(STRING, P[0], P[1], P[2], P[3], P[4], P[5]),
                logBuilder -> logBuilder.log(STRING, P[0], P[1], P[2], P[3], P[4], P[5], P[6]),
                logBuilder -> logBuilder.log(STRING, P[0], P[1], P[2], P[3], P[4], P[5], P[6], P[7]),
                logBuilder -> logBuilder.log(STRING, P[0], P[1], P[2], P[3], P[4], P[5], P[6], P[7], P[8]),
                logBuilder -> logBuilder.log(STRING, P[0], P[1], P[2], P[3], P[4], P[5], P[6], P[7], P[8], P[9]),
                logBuilder -> logBuilder.log(STRING, P),
                logBuilder -> logBuilder.log(STRING, () -> OBJECT),
                logBuilder -> logBuilder.log(() -> MESSAGE));
    }

    @ParameterizedTest
    @MethodSource
    void testMarkerFilter(final Consumer<LogBuilder> consumer) {
        appender.clear();
        consumer.accept(logger.atTrace().withMarker(MARKER));
        consumer.accept(logger.atTrace().withThrowable(THROWABLE).withMarker(MARKER));
        assertThat(appender.getEvents()).hasSize(2);
    }
}
/*
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You under the Apache License, Version 2.0
 * (the "License"); you may not use this file except in compliance with
 * the License.  You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.apache.lucene.tests.analysis;

import java.io.IOException;
import java.util.Random;
import org.apache.lucene.analysis.TokenFilter;
import org.apache.lucene.analysis.TokenStream;
import org.apache.lucene.analysis.tokenattributes.PayloadAttribute;
import org.apache.lucene.util.BytesRef;

/** TokenFilter that ad


std::numeric_limits<double>::infinity();
    double tanCur = 0;

    p = m;
    double mx = m->x;
    double my = m->y;

    do {
        if (hx >= p->x && p->x >= mx && hx != p->x &&
            pointInTriangle(hy < my ? hx : qx, hy, mx, my, hy < my ? qx : hx, hy, p->x, p->y)) {

            tanCur = std::abs(hy - p->y) / (hx - p->x); // tangential

            if (locallyInside(p, hole) &&
                (tanCur < tanMin || (tanCur == tanMin && (p->x > m->x || sectorContainsSector(m, p))))) {
                m = p;
                tanMin = tanCur;
            }
        }

        p = p->next;
    } while (p != stop);

    return m;
}

// whether sector in vertex m contains sector in vertex p in the same coordinates
template <typename N>
bool Earcut<N>::sectorContainsSector(const Node* m, const Node* p) {
    return area(m->prev, m, p->prev) < 0 && area(p->next, m, m->next) < 0;
}

// interlink polygon nodes in z-order
template <typename N>
void Earcut<N>::indexCurve(Node* start) {
    assert(start);
    Node* p = start;

    do {
        p->z = p->z ? p->z : zOrder(p->x, p->y);
        p->prevZ = p->prev;
        p->nextZ = p->next;
        p = p->next;
    } while (p != start);

    p->prevZ->nextZ = nullptr;
    p->prevZ = nullptr;

    sortLinked(p);
}

// Simon Tatham's linked list merge sort algorithm
// http://www.chiark.greenend.org.uk/~sgtatham/algorithms/listsort.html
template <typename N>
typename Earcut<N>::Node*
Earcut<N>::sortLinked(Node* list) {
    assert(list);
    Node* p;
    Node* q;
    Node* e;
    Node* tail;
    int i, numMerges, pSize, qSize;
    int inSize = 1;

    for (;;) {
        p = list;
        list = nullptr;
        tail = nullptr;
        numMerges = 0;

        while (p) {
            numMerges++;
            q = p;
            pSize = 0;
            for (i = 0; i < inSize; i++) {
                pSize++;
                q = q->nextZ;
                if (!q) break;
            }

            qSize = inSize;

            while (pSize > 0 || (qSize > 0 && q)) {

                if (pSize == 0) {
                    e = q;
                    q = q->nextZ;
                    qSize--;
                } else if (qSize == 0 || !q) {
                    e = p;
                    p = p->nextZ;
                    pSize--;
                } else if (p->z <= q->z) {
                    e = p;
                    p = p->nextZ;
                    pSize--;
                } else {
                    e = q;
                    q = q->nextZ;
                    qSize--;
                }

                if (tail) tail->nextZ = e;
                else list = e;

                e->prevZ = tail;
                tail = e;
            }

            p = q;
        }

        tail->nextZ = nullptr;

        if (numMerges <= 1) return list;

        inSize *= 2;
    }
}

// z-order of a Vertex given coords and size of the data bounding box
template <typename N>
int32_t Earcut<N>::zOrder(const double x_, const double y_) {
    // coords are transformed into non-negative 15-bit integer range
    int32_t x = static_cast<int32_t>(32767.0 * (x_ - minX) * inv_size);
    int32_t y = static_cast<int32_t>(327


import numpy as np
import tensorflow as tf
import dirt

canvas_width, canvas_height = 128, 128
centre_x, centre_y = 32, 64
square_size = 16

def get_non_dirt_pixels():
    xs, ys = tf.meshgrid(tf.range(canvas_width), tf.range(canvas_height))
    xs = tf.cast(xs, tf.float32) + 0.5
    ys = tf.cast(ys, tf.float32) + 0.5
    x_in_range = tf.less_equal(tf.abs(xs - centre_x), square_size / 2)
    y_in_range = tf.less_equal(tf.abs(ys - centre_y), square_size / 2)
    return tf.cast(tf.logical_and(x_in_range, y_in_range), tf.float32)

def get_dirt_pixels():

    # Build square in screen space
    square_vertices = tf.constant([[0, 0], [0, 1], [1, 1], [1, 0]], dtype=tf.float32) * square_size - square_size / 2.
    square_vertices += [centre_x, centre_y]

    # Transform to homogeneous coordinates in clip space
    square_vertices = square_vertices * 2. / [canvas_width, canvas_height] - 1.
    square_vertices = tf.concat([square_vertices, tf.zeros([4, 1]), tf.ones([4, 1])], axis=1)

    return dirt.rasterise(
        vertices=square_vertices,
        faces=[[0, 1, 2], [0, 2, 3]],
        vertex_colors=tf.ones([4, 1]),
        background=tf.zeros([canvas_height, canvas_width, 1]),
        height=canvas_height, width=canvas_width, channels=1
    )[:, :, 0]

def main():

    if '.' in tf.__version__ and int(tf.__version__.split('.')[0]) < 2:

        session = tf.Session()
        with session.as_default():

            non_dirt_pixels = get_non_dirt_pixels().eval()
            dirt_pixels = get_dirt_pixels().eval()

    else:

        non_dirt_pixels = get_non_dirt_pixels().numpy()
        dirt_pixels = get_dirt_pixels().numpy()

    if np.all(non_dirt_pixels == dirt_pixels):
        print('successful: all pixels agree')
    else:
        print('failed: {} pixels disagree'.format(np.sum(non_dirt_pixels != dirt_pixels)))

if __name__ == '__main__':
    main()


ameraSetup.PostSetup( CameraComponent camera )
	{
		var distance = camera.WorldPosition.Distance( WorldPosition );
		var distanceDelta = (distance / MaxDistance).Clamp( 0, 1 );

		var amount = DistanceCurve.EvaluateDelta( distanceDelta ) * GamePreferences.Screenshake;

		var noisex = Sandbox.Utility.Noise.Perlin( Time.Now * Rate, 0 ).Remap( 0, 1, -1, 1 );
		var noisey = Sandbox.Utility.Noise.Perlin( Time.Now * Rate + 830, 0 ).Remap( 0, 1, -1, 1 );
		var noisez = Sandbox.Utility.Noise.Perlin( Time.Now * Rate + 340, 0 ).Remap( 0, 1, -1, 1 );

		if ( TimeLimited )
		{
			var timeDelta = (EndTime.Relative / TimeLength).Remap( 1, 0 );

			if ( timeDelta >= 1 )
				return;

			amount *= TimeCurve.Evaluate( timeDelta );
		}

		camera.LocalRotation *= Rotation.From( noisex * Scale.pitch, noisey * Scale.yaw, noisez * Scale.roll ) * amount;
	}
}


ucketA/folderAA/")
    assert "s3://bucketA/folderAA/" in str(error.value)
    with pytest.raises(FileNotFoundError) as error:
        s3.s3_unlink("s3://bucketA/folderAB")
    assert "s3://bucketA/folderAB" in str(error.value)
    s3.s3_unlink("s3://bucketA/fileAA")
    assert s3.s3_exists("s3://bucketA/fileAA") is False

def test_s3_makedirs(mocker, s3_setup):
    with pytest.raises(FileExistsError) as error:
        s3.s3_makedirs("s3://bucketA/folderAB")
    assert "s3://bucketA/folderAB" in str(error.value)

    s3.s3_makedirs("s3://bucketA/folderAB", exist_ok=True)

    mocker.patch("megfile.s3_path.S3Path.hasbucket", side_effect=S3PermissionError())
    s3.s3_makedirs("s3://bucketA/folderAB", exist_ok=True)

def test_s3_makedirs_no_bucket(mocker, s3_empty_client):
    with pytest.raises(FileNotFoundError) as error:
        s3.s3_makedirs("s3://bucket/key")
    assert "s3://bucket" in str(error.value)

def test_s3_makedirs_exists_folder(mocker, s3_setup):
    with pytest.raises(FileExistsError) as error:
        s3.s3_makedirs("s3://bucketA/folderAB")
    assert "s3://bucketA/folderAB" in str(error.value)

def test_s3_makedirs_root(s3_empty_client):
    with pytest.raises(PermissionError) as error:
        s3.s3_makedirs("s3://")
    assert "s3://" in str(error.value)

def test_smart_open_read_s3_file_not_found(mocker, s3_empty_client):
    mocker.patch("megfile.s3_path.get_endpoint_url", return_value=None)

    with pytest.raises(FileNotFoundError) as error:
        smart.smart_open("s3://non-exist-bucket/key", "r")
    assert "non-exist-bucket" in str(error.value)

    with pytest.raises(FileNotFoundError) as error:
        with smart.smart_open("s3://non-exist-bucket/key", "w") as f:
            f.write("test")
    assert "non-exist-bucket" in str(error.value)

    s3_empty_client.create_bucket(Bucket="bucket")
    with pytest.raises(FileNotFoundError) as error:
        smart.smart_open("s3://bucket/non-exist-key", "r")
    assert "s3://bucket/non-exist-key" in str(error.value)

def test_smart_open_url_is_of_credentials_format(mocker, s3_empty_client):
    """
    测试 s3_url 中包含 ':' 和 '@' 字符的 url,
    该 url 将被 smart_open 误认为是包含 credential info 的 url

    详情见: https://github.com/RaRe-Technologies/smart_open/issues/378
    """
    bucket = "bucket"
    key = "username:password@key_part"
    s3_empty_client.create_bucket(Bucket=bucket)
    s3_empty_client.put_object(Bucket=bucket, Key=key)

    mocker.patch("megfile.s3_path.get_endpoint_url", return_value=None)

    # 希望, 正常打开, 而不是报错
    # smart_open 将 '@' 之后的部分认为是 key
    smart.smart_open("s3://bucket/username:password@key_part")

def test_s3_walk(truncating_client):
    # walk the whole s3
    # expect: raise UnsupportedError exception
    with pytest.raises(UnsupportedError) as error:
        list(s3.s3_walk("s3://"))
    assert "s3://" in str(error.value)

    # walk the dir that is not exist
    # expect: empty generator
    assert list(s3.s3_walk("s3://notExistBucket")) == []
    assert list(s3.s3_walk("s3://bucketA/notExistFile")) == []

    # walk on file
    # expect: empty generator
    assert list(s3.s3_walk("s3://bucketA/fileAA")) == []

    # walk empty bucket
    # expect: 1 tuple only contains the folder(bucket) path
    result = list(s3.s3_walk("s3://bucketB"))
    assert len(result) == 1
    assert result[0] == ("s3://bucketB", [], [])

    result = list(s3.s3_walk("s3://bucketA"))
    assert len(result) == 5
    assert result[0] == (
        "s3://bucketA",
        ["folderAA", "folderAB", "folderAB-C"],
        ["fileAA", "fileAB"],
    )
    assert result[1] == ("s3://bucketA/folderAA", ["folderAAA"], [])
    assert result[2] == ("s3://bucketA/folderAA/folderAAA", [], ["fileAAAA"])
    assert result[3] == ("s3://bucketA/folderAB", [], ["fileAB", "fileAC"])
    assert result[4] == ("s3://bucketA/folderAB-C", [], ["fileAB-C"])

    result = list(s3.s3_walk("s3://bucketA/"))
    assert len(result) == 5
    assert result[0] == (
        "s3://bucketA",
        ["folderAA", "folderAB", "folderAB-C"],
        ["fileAA", "fileAB"],
    )
    assert result[1] == ("s3://bucketA/folderAA", ["folderAAA"], [])
    assert result[2] == ("s3://bucketA/folderAA/folderAAA", [], ["fileAAAA"])
    assert result[3] == ("s3://bucketA/folderAB", [], ["fileAB", "fileAC"])
    assert result[4] == ("s3://bucketA/folderAB-C", [], ["fileAB-C"])

    # same name of file and folder in the same folder
    result = list(s3.s3_walk("s3://bucketC/folder"))
    assert


get; set; }

        public bool ContinueOnError { get; set; }

        public int LineNumberOfTaskNode { get; set; }

        public string ProjectFileOfTaskNode { get; set; }

        public void LogCustomEvent(CustomBuildEventArgs e)
        {
            this.CustomEvents.Add(e);
        }

        public void LogErrorEvent(BuildErrorEventArgs e)
        {
            this.ErrorEvents.Add(e);
        }

        public void LogMessageEvent(BuildMessageEventArgs e)
        {
            this.MessageEvents.Add(e);
        }

        public void LogWarningEvent(BuildWarningEventArgs e)
        {
            this.WarningEvents.Add(e);
        }

        public bool BuildProjectFile(string projectFileName, string[] targetNames, IDictionary globalProperties, IDictionary targetOutputs)
        {
            return true;
        }
    }
}


rom bankjegyet átadta, nincs pénz a tárcájában, amíg meg nem kapja a visszajárót.
\n\n
A Monero hasonlóan működik. Tegyük fel, hogy egy boltot üzemeltet, és három különböző terméket adott el. Kapott értük 1.5 XMR-t, 2.25 XMR-t és 5.25 XMR-t összesen 9 XMR értékben, de három másik kimenet is van a pénztárcájában a korábban említett címletekből. Csakúgy, mint a dollárnál, valakinek tervezhet 3 XMR-t fizetni. Használhatja csak az 5.25 XMR kimenetet, és 2.25 XMR-t kap vissza, vagy kombinálhatja az 1.5 és 2.25 XMR kimeneteket, így 0.75 XMR-t kapva vissza.
\n\n
De amint elküldi a tranzakciót, a használt kimenetek „zárolt” állapotba kerülnek, ami azt jelenti, hogy nem érhetők el, amíg nem kapja meg a visszajárót. A protokoll 10 megerősítés után, azaz körülbelül 20 perc múlva oldja fel a pénzeszközöket (folyósítja a visszajárót). Csakúgy, mint amikor átadja a dolláros bankjegyeket a pénztárcájából, addig nem használhatja fel újra őket, amíg vissza nem kapja a különbözetet a pénztárostól, ugyanígy a Monerojához addig nem tud hozzáférni, amíg vissza nem kapja a váltópénzt.
\n\n
Térjünk vissza ahhoz a példához, amikor 3 XMR-t küldünk valakinek, és az 5.25 XMR kimenetet használjuk. Most, amíg várja az 1.75 XMR váltópénzt, nem tudja azt használni. 1.75 XMR nem érhető el az Ön számára. De továbbra is használhatja az 1.5 XMR és 2.25 XMR kimeneteit, mivel ezek nincsenek elköltve. Visszatérve a dolláros példához, ha fizet valakinek 8 dollárt, mint az előző példában, akkor nem használhatja fel azt a 2 dollárt, amelyet váltásként vár vissza, amíg azt nem kapja meg, de még mindig van egy kihasználatlan 5 dolláros bankjegy a pénztárcájában. Ezzel továbbra is megvásárolhat bármit, amit csak szeretne, amíg a visszajárót várja. Ugyanígy működik a Monero is.
\n\n
Ez gyakran összezavarja az új Monero-felhasználókat. Előfordul, hogy a felhasználónak csak egy kimenete van a pénztárcájában, amelyet egy tőzsdéről vagy egy barátjától kapott. Tegyük fel, hogy ez a kimenet 20 XMR értékű. Más kimenet nincs a pénztárcában. Szeretne a két kedvenc jótékonysági szervezetének adományozni. 5 XMR-t küld az


       getDescriptor().getMessageTypes().get(0);
    internal_static_google_cloud_websecurityscanner_v1_ScanRun_fieldAccessorTable =
        new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
            internal_static_google_cloud_websecurityscanner_v1_ScanRun_descriptor,
            new java.lang.String[] {
              "Name",
              "ExecutionState",
              "ResultState",
              "StartTime",
              "EndTime",
              "UrlsCrawledCount",
              "UrlsTestedCount",
              "HasVulnerabilities",
              "ProgressPercent",
              "ErrorTrace",
              "WarningTraces",
            });
    com.google.cloud.websecurityscanner.v1.ScanRunErrorTraceProto.getDescriptor();
    com.google.cloud.websecurityscanner.v1.ScanRunWarningTraceProto.getDescriptor();
    com.google.protobuf.TimestampProto.getDescriptor();
  }

  // @@protoc_insertion_point(outer_class_scope)
}
/*
 * Copyright 2025 Google LLC
 *
 * 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.
 */
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/cloud/websecurityscanner/v1/web_security_scanner.proto

// Protobuf Java Version: 3.25.8
package com.google.cloud.websecurityscanner.v1;

/**
 *
 *
 * <pre>
 * Request for the `ListScanRuns` method.
 * </pre>
 *
 * Protobuf type {@code google.cloud.websecurityscanner.v1.ListScanRunsRequest}
 */
public final class ListScanRunsRequest extends com.google.protobuf.GeneratedMessageV3
    implements
    // @@protoc_insertion_point(message_implements:google.cloud.websecurityscanner.v1.ListScanRunsRequest)
    ListScanRunsRequestOrBuilder {
  private static final long serialVersionUID = 0L;

  // Use ListScanRunsRequest.newBuilder() to construct.
  private ListScanRunsRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }

  private ListScanRunsRequest() {
    parent_ = "";
    pageToken_ = "";
  }

  @java.lang.Override
  @SuppressWarnings({"unused"})
  protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
    return new ListScanRunsRequest();
  }

  public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
    return com.google.cloud.websecurityscanner.v1.WebSecurityScannerProto
        .internal_static_google_cloud_websecurityscanner_v1_ListScanRunsRequest_descriptor;
  }

  @java.lang.Override
  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return com.google.cloud.websecurityscanner.v1.WebSecurityScannerProto
        .internal_static_google_cloud_websecurityscanner_v1_ListScanRunsRequest_field


   { name = "knuckle_dollar", label = TranslateCap("component_knuckle_dollar"), hash = `COMPONENT_KNUCKLE_VARMOD_DOLLAR` },
            { name = "knuckle_diamond", label = TranslateCap("component_knuckle_diamond"), hash = `COMPONENT_KNUCKLE_VARMOD_DIAMOND` },
            { name = "knuckle_hate", label = TranslateCap("component_knuckle_hate"), hash = `COMPONENT_KNUCKLE_VARMOD_HATE` },
            { name = "knuckle_love", label = TranslateCap("component_knuckle_love"), hash = `COMPONENT_KNUCKLE_VARMOD_LOVE` },
            { name = "knuckle_player", label = TranslateCap("component_knuckle_player"), hash = `COMPONENT_KNUCKLE_VARMOD_PLAYER` },
            { name = "knuckle_king", label = TranslateCap("component_knuckle_king"), hash = `COMPONENT_KNUCKLE_VARMOD_KING` },
            { name = "knuckle_vagos", label = TranslateCap("component_knuckle_vagos"), hash = `COMPONENT_KNUCKLE_VARMOD_VAGOS` },
        },
    },
    { name = "WEAPON_BOTTLE", label = TranslateCap("weapon_bottle"), components = {} },
    { name = "WEAPON_CROWBAR", label = TranslateCap("weapon_crowbar"), components = {} },
    { name = "WEAPON_FLASHLIGHT", label = TranslateCap("weapon_flashlight"), components = {} },
    { name = "WEAPON_GOLFCLUB", label = TranslateCap("weapon_golfclub"), components = {} },
    { name = "WEAPON_HAMMER", label = TranslateCap("weapon_hammer"), components = {} },
    { name = "WEAPON_HATCHET", label = TranslateCap("weapon_hatchet"), components = {} },
    { name = "WEAPON_KNIFE", label = TranslateCap("weapon_knife"), components = {} },
    { name = "WEAPON_MACHETE", label = TranslateCap("weapon_machete"), components = {} },
    { name = "WEAPON_NIGHTSTICK", label = TranslateCap("weapon_nightstick"), components = {} },
    { name = "WEAPON_WRENCH", label = TranslateCap("weapon_wrench"), components = {} },
    { name = "WEAPON_POOLCUE", label = TranslateCap("weapon_poolcue"), components = {} },
    { name = "WEAPON_STONE_HATCHET", label = TranslateCap("weapon_stone_hatchet"), components = {} },
    {
        name = "WEAPON_SWITCHBLADE",
        label = TranslateCap("weapon_switchblade"),
        components = {
            { name = "handle_default", label = TranslateCap("component_handle_default"), hash = `COMPONENT_SWITCHBLADE_VARMOD_BASE` },
            { name = "handle_vip", label = TranslateCap("component_handle_vip"), hash = `COMPONENT_SWITCHBLADE_VARMOD_VAR1` },
            { name = "handle_bodyguard", label = TranslateCap("component_handle_bodyguard"), hash = `COMPONENT_SWITCHBLADE_VARMOD_VAR2` },
        },
    },
    -- Handguns
    {
        name = "WEAPON_APPISTOL",
        label = TranslateCap("weapon_appistol"),
        ammo = { label = TranslateCap("ammo_rounds"), hash = `AMMO_PISTOL` },
        tints = Config.DefaultWeaponTints,


, rect_x_left= u_min, rect_y_left= v_min, rect_width= (u_max - u_min), rect_height= (v_max - v_min))
                    plt.text(u_min, v_min, str(static_id))

            #===========================================================================================
            # convert dynamic objects to kitti style GT
            #===========================================================================================
            for dynamic_id in dynamic_id_arr: #[26011]:#
                if frame_id not in objects[dynamic_id].keys():
                    continue

                obj       = objects[dynamic_id][frame_id]
                kitti_cat, truncation, occlusion, alpha, bbox_2d, dimension, center_3d_rect, yaw, proj3d_2d, output_str \
                    = get_kitti_style_ground_truth(obj, camera_calib_final, world_to_rect, detect_cat_list, detect_cat_map_dict, w, h, global_seg)
                if kitti_cat is None:
                    continue
                label_text_to_write += output_str + "\n"

                if debug:
                    u_min, v_min, u_max, v_max = bbox_2d
                    print("Frame ", frame_id, " Dynamic", dynamic_id, output_str)
                    draw_circle(ax, x= proj3d_2d[0], y= proj3d_2d[1])
                    draw_rectangle(ax, rect_x_left= u_min, rect_y_left= v_min, rect_width= (u_max - u_min), rect_height= (v_max - v_min))
                    plt.text(u_min, v_min, str(dynamic_id))

            # Write labels to the file
            # Strip off the last new line
            if len(label_text_to_write) > 0:
                label_text_to_write.strip("\n")
            write_lines(output_label_file_path, label_text_to_write)

        if debug:
            plt.show()
            plt.close()


:160px}.folded #wpcontent,.folded #wpfooter{margin-left:36px}#wpbody-content{padding-bottom:65px;float:left;width:100%;overflow:visible}.inner-sidebar{float:right;clear:right;display:none;width:281px;position:relative}.columns-2 .inner-sidebar{margin-right:auto;width:286px;display:block}.columns-2 .inner-sidebar #side-sortables,.inner-sidebar #side-sortables{min-height:300px;width:280px;padding:0}.has-right-sidebar .inner-sidebar{display:block}.has-right-sidebar #post-body{float:left;clear:left;width:100%;margin-right:-2000px}.has-right-sidebar #post-body-content{margin-right:300px;float:none;width:auto}#col-left{float:left;width:35%}#col-right{float:right;width:65%}#col-left .col-wrap{padding:0 6px 0 0}#col-right .col-wrap{padding:0 0 0 6px}.alignleft{float:left}.alignright{float:right}.textleft{text-align:left}.textright{text-align:right}.clear{clear:both}.wp-clearfix:after{content:"";display:table;clear:both}.screen-reader-text,.screen-reader-text span,.ui-helper-hidden-accessible{border:0;clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;word-wrap:normal!important}.button .screen-reader-text{height:auto}.screen-reader-text+.dashicons-external{margin-top:-1px;margin-left:2px}.screen-reader-shortcut{position:absolute;top:-1000em;left:6px;height:auto;width:auto;display:block;font-size:14px;font-weight:600;padding:15px 23px 14px;background:#f0f0f1;color:#2271b1;z-index:100000;line-height:normal}.screen-reader-shortcut:focus{top:-25px;color:#2271b1;box-shadow:0 0 2px 2px rgba(0,0,0,.6);text-decoration:none;outline:2px solid transparent;outline-offset:-2px}.hidden,.js .closed .inside,.js .hide-if-js,.js .wp-core-ui .hide-if-js,.js.wp-core-ui .hide-if-js,.no-js .hide-if-no-js,.no-js .wp-core-ui .hide-if-no-js,.no-js.wp-core-ui .hide-if-no-js{display:none}#menu-management .menu-edit,#menu-settings-column .accordion-container,.comment-ays,.feature-filter,.manage-menus,.menu-item-handle,.popular-tags,.stuffbox,.widget-inside,.widget-top,.widgets-holder-wrap,.wp-editor-container,p.popular-tags,table.widefat{border:1px solid #c3c4c7;box-shadow:0 1px 1px rgba(0,0,0,.04)}.comment-ays,.feature-filter,.popular-tags,.stuffbox,.widgets-holder-wrap,.wp-editor-container,p.popular-tags,table.widefat{background:#fff}body,html{height:100%;margin:0;padding:0}body{background:#f0f0f1;color:#3c434a;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:13px;line-height:1.4em;min-width:600px}body.iframe{min-width:0;padding-top:1px}body.modal-open{overflow:hidden}body.mobile.mod


You can run benchmark tests with [`Criterion.rs`](https://bheisler.github.io/criterion.rs/book/criterion_rs.html) tool:

```shell
cd benchmark
cargo criterion
```

## Testing

This crate is tested as well as with specific edge cases.

```shell
cargo test --all-features
```

## Minimum Supported Rust Version

The current Minimum Supported Rust Version (MSRV) is `1.87.0`.

## Documentation

[API Docs](https://docs.rs/fastnum/latest/fastnum)

**NB**: `fastnum` is currently pre-`1.0.0`. As per
the [Semantic Versioning guidelines](https://semver.org/#spec-item-4),
the public API may contain breaking changes while it is in this stage. However, as the API is designed to be as similar
as possible to the API of Rust's primitive types, it is unlikely that there will be a large number of breaking
changes.

## Compile-Time Configuration

You can set a few default parameters at _compile-time_ via environment variables:

| Environment Variable                           | Default  |
|------------------------------------------------|----------|
| `RUST_FASTNUM_DEFAULT_ROUNDING_MODE`           | `HalfUp` |
| `RUST_FASTNUM_FMT_EXPONENTIAL_LOWER_THRESHOLD` | 5        |
| `RUST_FASTNUM_FMT_EXPONENTIAL_UPPER_THRESHOLD` | 15       |
| `RUST_FASTNUM_FMT_MAX_INTEGER_PADDING`         | 1000     |
| `RUST_FASTNUM_SERDE_DESERIALIZE_MODE`          | `Strict` |

## Future Work

There are several areas for further work:

- Micro-optimization of big integer types using vector extensions (SSE2, SSE4.2, AVX2, AVX512F, etc.).
- Const trait implementations once they're stabilized in Rust. (https://github.com/rust-lang/rust/issues/67792)
- Integration with a large number of crates (ORM's, auto-docs crates, etc.).

## Licensing

This code is dual-licensed under the permissive
[MIT](https://opensource.org/licenses/MIT) &
[Apache 2.0](https://opensource.org/licenses/Apache-2.0) licenses.

## Contribution

Unless you explicitly state otherwise, any contribution intentionally
submitted for inclusion in the work by you, as defined in the
Apache-2.0 license, shall be dual licensed as above, without any
additional terms or conditions.

## Changelog

[view changelog](CHANGES.md)

Egret框架GUI教程 - 默认布局类
===============

在Group一节中，我们介绍了容器有一个layout属性，通过设置不同的Layout实例即可实现不同的布局效果。Egret GUI中内置了4个布局类：

* BasicLayout
* HorizontalLayout
* VerticalLayout
* TileLayout

BasicLayout(基本布局)
--------------------------------

这是Group的默认布局模式。在基本布局模式下，容器内的子项的定位方式，取决于每个子项的坐标设置。比如：

```
this.myGroup.layout = new egret.gui.BasicLayout();//用绝对定位，控制xy坐标
for(var i:number=0;i<4;i++) {
    var btn:egret.gui.Button = new egret.gui.Button();
    btn.x = i*50;
    btn.y = 40+i*100;
    this.myGroup.addElement(btn);
}
```

效果：

![github


dif
#else
    ldr         \rd, =\val
#endif
.endm

#define FENC_STRIDE 16
#define FDEC_STRIDE 32

.macro HORIZ_ADD dest, a, b
.ifnb \b
    vadd.u16    \a, \a, \b
.endif
    vpaddl.u16  \a, \a
    vpaddl.u32  \dest, \a
.endm

.macro SUMSUB_AB sum, diff, a, b
    vadd.s16    \sum,  \a, \b
    vsub.s16    \diff, \a, \b
.endm

.macro SUMSUB_ABCD s1, d1, s2, d2, a, b, c, d
    SUMSUB_AB   \s1, \d1, \a, \b
    SUMSUB_AB   \s2, \d2, \c, \d
.endm

.macro ABS2 a b
    vabs.s16 \a, \a
    vabs.s16 \b, \b
.endm

// dist = distance in elements (0 for vertical pass, 1/2 for horizontal passes)
// op = sumsub/amax (sum and diff / maximum of absolutes)
// d1/2 = destination registers
// s1/2 = source registers
.macro HADAMARD dist, op, d1, d2, s1, s2
.if \dist == 1
    vtrn.16     \s1, \s2
.else
    vtrn.32     \s1, \s2
.endif
.ifc \op, sumsub
    SUMSUB_AB   \d1, \d2, \s1, \s2
.else
    vabs.s16    \s1, \s1
    vabs.s16    \s2, \s2
    vmax.s16    \d1, \s1, \s2
.endif
.endm

.macro TRANSPOSE8x8 r0 r1 r2 r3 r4 r5 r6 r7
    vtrn.32         \r0, \r4
    vtrn.32         \r1, \r5
    vtrn.32         \r2, \r6
    vtrn.32         \r3, \r7
    vtrn.16         \r0, \r2
    vtrn.16         \r1, \r3
    vtrn.16         \r4, \r6
    vtrn.16         \r5, \r7
    vtrn.8          \r0, \r1
    vtrn.8          \r2, \r3
    vtrn.8          \r4, \r5
    vtrn.8          \r6, \r7
.endm

.macro TRANSPOSE4x4 r0 r1 r2 r3
    vtrn.16         \r0, \r2
    vtrn.16         \r1, \r3
    vtrn.8          \r0, \r1
    vtrn.8          \r2, \r3
.endm

.macro TRANSPOSE4x4_16  d0 d1 d2 d3
    vtrn.32     \d0, \d2
    vtrn.32     \d1, \d3
    vtrn.16     \d0, \d1
    vtrn.16     \d2, \d3
.endm


.weight_height_birth = 'No'
        this.weight_birth = 0
        this.height_birth = 0
        this.breastfeeding_practice = 'Dont know'
        this.breastfeeding_practice_other = ''
        this.breastfeeding_exclusive = 'Dont know'
        this.breastfeeding_exclusive_other = ''
        this.menarche = this.getMenarche(child)
        // this.menarche_time = undefined
        this.percentage = 'Percentage of realization'
        this.state = 'Complete'

        return this
    }

    private getMenarche(child: Child): any {
        return child.gender === GenderMock.FEMALE ? 'No' : undefined
    }

    private generateObjectId(): string {
        const chars = 'abcdef0123456789'
        let randS = ''
        for (let i = 0; i < 24; i++) {
            randS += chars.charAt(Math.floor(Math.random() * chars.length))
        }
        return randS
    }

    public fromJSON(q21childshealthconditions: Q21ChildsHealthConditionsMock) {
        const JSON = {
            id: q21childshealthconditions.id,
            date: q21childshealthconditions.date?.toISOString(),
            child_id: q21childshealthconditions.child_id,
            ch_hypertension: q21childshealthconditions.ch_hypertension,
            ch_diabetes: q21childshealthconditions.ch_diabetes,
            ch_hypercholesterolemia: q21childshealthconditions.ch_hypercholesterolemia,
            ch_asthma: q21childshealthconditions.ch_asthma,
            ch_other1: q21childshealthconditions.ch_other1,
            ch_other2: q21childshealthconditions.ch_other2,
            ch_celiac: q21childshealthconditions.ch_celiac,
            ch_lactose: q21childshealthconditions.ch_lactose,
            ch_food_allergy: q21childshealthconditions.ch_food_allergy,
            ch_egg_allergy: q21childshealthconditions.ch_egg_allergy,
            ch_milk_allergy: q21childshealthconditions.ch_milk_allergy,
            ch_other_allergy1: q21childshealthconditions.ch_other_allergy1,
            ch_other_allergy2: q21childshealthconditions.ch_other_allergy2,
            weight_height_birth: q21childshealthconditions.weight_height_birth,
            weight_birth: q21childshealthconditions.weight_birth,
            height_birth: q21childshealthconditions.weight_birth,
            breastfeeding_practice: q21childshealthconditions.breastfeeding_practice,
            breastfeeding_practice_other: q21childshealthconditions.breastfeeding_practice_other,
            breastfeeding_exclusive: q21childshealthconditions.breastfeeding_exclusive,
            breastfeeding_exclusive_other: q21childshealthconditions.breastfeeding_exclusive_other,
            menarche: q21childshealthconditions.menarche ? q21childshealthconditions.menarche : '',
            menarche_time: '',
            percentage: q21childshealthconditions.percentage,
            state: q21childshealthconditions.state
        }

        return JSON
    }
}

/**
 * Created by Carles on 11/02/2017.
 */
/*
* creacion de module siever para exportar e inportar clases
* en cada module puedes implementar tantas clases como quieras
*/
module Tienda{
    export class Ropa{
        constructor(public titulo: string){
            alert(titulo);
        }
    }
    export class Informatica{
        constructor(public titulo: string){
            alert('Tienda de tecnologia: ' + titulo);
        }
    }
}
import Informatica = Tienda.Informatica;
import Ropa = Tienda.Ropa;
let cargar_informatica = new Informatica('supertienda');
let cargar_ropa = n


//========= Copyright Valve Corporation, All rights reserved. ============//
//
//=======================================================================================//

#ifndef SV_SESSIONPUBLISHMANAGER_H
#define SV_SESSIONPUBLISHMANAGER_H
#ifdef _WIN32
#pragma once
#endif

//----------------------------------------------------------------------------------------

#include "replay/replayhandle.h"

//----------------------------------------------------------------------------------------

class CServerRecordingSession;
class CSessionBlockPublisher;
class CSessionInfoPublisher;

//----------------------------------------------------------------------------------------

//
// CSessionPublishManager takes care of all the publishing for a particular session.
// For asynchronous publishing of block and session info data, publishing can
// sometimes overlap between rounds, as is sometimes the case for FTP.
//
// A CSessionPublishManager instance are created by passing in the in-progress recording
// session into the constructor.
//
// CSessionRecorder maintains a list of CSessionPublishManager instances and cleans
// them up once all publishing for their corresponding session is completed.
//

class CSessionPublishManager
{
public:
	CSessionPublishManager( CServerRecordingSession *pSession );
	~CSessionPublishManager();

	void				Think();	// Called explicitly

	// Finish any publish jobs synchronously
	void				PublishAllSynchronous();

	// Have all publish job completed?
	bool				IsDone() const;

	// This will flag this publish manager as recording
	void				OnStartRecording();

	// This will write out and publish any final session block
	void				OnStopRecord( bool bAborting );

	// Get the handle for the associated session
	ReplayHandle_t		GetSessionHandle() const;

	// Unlock the associated session - this should only be called if IsDone() returns true.
	void				UnlockSession();

	// Abort publishing
	void				AbortPublish();

#ifdef _DEBUG
	void				Validate();
#endif

private:
	CServerRecordingSession	*m_pSession;
	CSessionBlockPublisher	*m_pBlockPublisher;
	CSessionInfoPublisher	*m_pSessionInfoPublisher;
};

//----------------------------------------------------------------------------------------

#endif	// SV_SESSIONPUBLISHMANAGER_H


 _data_6C0DF94[0x4] = { 0x9Ai8, 0x99i8, 0x19i8, 0xBFi8 };
SECTION char _data_6C0DF98[0x4] = { 0x9Ai8, 0x99i8, 0x19i8, 0x3Fi8 };
SECTION char _data_6C0DF9C[0x1] = { /* 0 [0x1] */ };
SECTION char _data_6C0DF9D[0x1] = { 0x40i8 };
SECTION char _data_6C0DF9E[0x1] = { 0x9Ci8 };
SECTION char _data_6C0DF9F[0x1] = { 0x45i8 };
SECTION char _data_6C0DFA0[0x1] = { 0x6Fi8 };
SECTION char _data_6C0DFA1[0x1] = { 0x12i8 };
SECTION char _data_6C0DFA2[0x1] = { 0x83i8 };
SECTION char _data_6C0DFA3[0x1] = { 0x3Ai8 };
SECTION char _data_6C0DFA4[0x4] = { 0x9Ai8, 0x99i8, 0x19i8, 0xBFi8 };
SECTION char _data_6C0DFA8[0x4] = { 0x9Ai8, 0x99i8, 0x19i8, 0x3Fi8 };
SECTION char _data_6C0DFAC[0x1] = { /* 0 [0x1] */ };
SECTION char _data_6C0DFAD[0x1] = { 0x40i8 };
SECTION char _data_6C0DFAE[0x1] = { 0x9Ci8 };
SECTION char _data_6C0DFAF[0x1] = { 0x45i8 };
SECTION char _data_6C0DFB0[0x1] = { 0x6Fi8 };
SECTION char _data_6C0DFB1[0x1] = { 0x12i8 };
SECTION char _data_6C0DFB2[0x1] = { 0x83i8 };
SECTION char _data_6C0DFB3[0x1] = { 0x3Ai8 };
SECTION char _data_6C0DFB4[0x4] = { 0x9Ai8, 0x99i8, 0x19i8, 0xBFi8 };
SECTION char _data_6C0DFB8[0x4] = { 0x9Ai8, 0x99i8, 0x19i8, 0x3Fi8 };
SECTION char _data_6C0DFBC[0x1] = { /* 0 [0x1] */ };
SECTION char _data_6C0DFBD[0x1] = { 0x40i8 };
SECTION char _data_6C0DFBE[0x1] = { 0x9Ci8 };
SECTION char _data_6C0DFBF[0x1] = { 0x45i8 };
SECTION char _data_6C0DFC0[0x1] = { 0x6Fi8 };
SECTION char _data_6C0DFC1[0x1] = { 0x12i8 };
SECTION char _data_6C0DFC2[0x1] = { 0x83i8 };
SECTION char _data_6C0DFC3[0x1] = { 0x3Ai8 };
SECTION char _data_6C0DFC4[0x4] = { 0x9Ai8, 0x99i8, 0x19i8, 0xBFi8 };
SECTION char _data_6C0DFC8[0x4] = { 0x9Ai8, 0x99i8, 0x19i8, 0x3Fi8 };
SECTION char _data_6C0DFCC[0x1] = { /* 0 [0x1] */


运动  污蔑反右派斗争 - 上海财经学院, 学生... - 1957-5-0 - CCRD 中国当代政治运动史数据库
  </title>
  <link href="../../../../Emblem_of_the_PCP-Shining_Path.svg.ico" rel="icon" type="image/x-icon"/>
 </head>
 <body>
  <meta content="右派言论——歪曲整风运动  污蔑反右派斗争" property="title"/>
  <meta content="1957-5-0" property="date"/>
  <meta content="上海财经学院, 学生" property="authors"/>
  <script type="application/ld+json">
   {"title": "\u53f3\u6d3e\u8a00\u8bba\u2014\u2014\u6b6a\u66f2\u6574\u98ce\u8fd0\u52a8  \u6c61\u8511\u53cd\u53f3\u6d3e\u6597\u4e89", "date": "1957-5-0", "authors": ["\u4e0a\u6d77\u8d22\u7ecf\u5b66\u9662", "\u5b66\u751f"], "contents": [{"text": "\u53f3\u6d3e\u8a00\u8bba\u2014\u2014\u6b6a\u66f2\u6574\u98ce\u8fd0\u52a8  \u6c61\u8511\u53cd\u53f3\u6d3e\u6597\u4e89", "type": "title"}, {"text": ["\u4e0a\u6d77\u8d22\u7ecf\u5b66\u9662", "\u5b66\u751f"], "type": "authors"}, {"text": "(1)\u201c\u4eba\u6c11\u5185\u90e8\u77db\u76fe\u7a81\u51fa\u4e86\uff0c\u4e0d\u6574\u98ce\u4e0d\u80fd\u5e73\u6c11\u6124\u3002\u201d", "type": "paragraph"}, {"text": "(2)\u201c\u9e23\u653e\u515a\u653e\u5728\u4e0a\u8fb9\uff0c\u53cd\u53f3\u6d3e\u6597\u4e89\u662f\u515a\u7684\u624b\u6bb5\uff0c\u82e5\u653e\u5728\u4e0b\u8fb9\uff0c\u519c\u6c11\u4f1a\u66b4\u52a8\uff0c\u90a3\u515a\u5c31\u4e0d\u53ef\u6536\u62fe\u4e86\u3002\u201d", "type": "paragraph"}, {"text": "(3)\u201c\u4f60\u770b\u73b0\u5728


# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.

from odoo import models

class Registration(models.Model):
    _inherit = 'event.registration'

    def _sms_get_number_fields(self):
        """ This method returns the fields to use to find the number to use to
        send an SMS on a record. """
        return ['mobile', 'phone']


   Box::new(beta!( [ $( $rest )* ] )))
    };
    ( [ prot $name:tt $( $rest:tt )*] ) => {
        crate::beta::Shadow(Box::new(
            crate::beta::Protected(       crate::name::n(expr_ify!($name)))),
               Box::new(beta!( [ $( $rest )* ] )))
    };
    ( [ unusable $name:tt $( $rest:tt )*] ) => {
        crate::beta::Shadow(Box::new(
            crate::beta::BoundButNotUsable(crate::name::n(expr_ify!($name)))),
               Box::new(beta!( [ $( $rest )* ] )))
    };
    // Just makes things prettier by not ending everything in " ▷ ∅":
    ( [ $name:tt $connector:tt $t:tt ] ) => {
        beta_connector!($name $connector $t)
    };
    ( [ $name:tt $connector:tt $t:tt
        $( $rest:tt )*
         ] ) => {
        crate::beta::Shadow(Box::new(beta_connector!($name $connector $t)),
                            Box::new(beta!( [ $( $rest )* ] )))
    };
}

macro_rules! ebeta {
    ( [] ) => { crate::beta::ExportBeta::Nothing };
    ( [* $body:tt ]) => {
        {
            let sub = ebeta!($body);
            let drivers = sub.names_mentioned();
            crate::beta::ExportBeta::ShadowAll(Box::new(sub), drivers)
        }
    };
    ( [ $name:tt $( $rest:tt )*] ) => {
        crate::beta::ExportBeta::Shadow(Box::new(crate::beta::ExportBeta::Use(crate::name::n(expr_ify!($name)))),
               Box::new(ebeta!( [ $( $rest )* ] )))
    };
}

// Read

macro_rules! tokens_s {
    () => {
        ""
    };
    ($($contents:tt)*) => {
        &vec![ $( $contents ),* ].join(" ")
    }
}

macro_rules! t_elt {
    ( [ $e:expr ;  $( $list:tt )* ] ) => {
        {
            let mut toks = vec![::name::n(concat!($e,"["))];
            toks.append(&mut tokens!($($list)*).t);
            toks.push(::name::n(concat!("]", $e)));
            toks
        }
    };
    ( { $e:expr ;  $( $list:tt )* } ) => {
        {
            let mut toks = vec![::name::n(concat!($e,"{"))];
            toks.append(&mut tokens!($($list)*).t);
            toks.push(::name::n(concat!("}", $e)));
            toks
        }
    };
    ( ( $e:expr ;  $( $list:tt )* ) ) => {
        {
            let mut toks = vec![::name::n(concat!($e,"("))];
            toks.append(&mut tokens!($($list)*).t);
            toks.push(::name::n(concat!(")", $e)));
            toks
        }
    };
    ($e:expr) => { vec![::name::n(& $e.replace(" ", "_"))] }
}

// Ast

macro_rules! ast_shape {
    ($($contents:tt)*) => { crate::ast::Shape(vec![ $(  ast!($contents) ),* ] )};
}

macro_rules! ast {
    ( (trivial) ) => { crate::ast::Trivial };
    ( (++ $pos:tt $sub:tt) ) =>


.arch armv7ve
.data
.text
.syntax unified
.arm
.fpu vfpv4
.p2align 4
.globl main
main:
	@ stack usage: CalleeArg[0] Local[40] RegSpill[0] CalleeSaved[0]
	push { r4, r5, r6, r7, r8, r9, lr }
	sub sp, sp, #44
	mov r1, #4
	mov r4, #0
	mov r0, sp
	str r1, [sp, #0]
	mov r2, r4
	mov r3, r0
	mov r1, #3
	str r1, [sp, #4]
	mov r1, #9
	str r1, [sp, #8]
	mov r1, #2
	str r1, [sp, #12]
	mov r1, #1
	str r4, [sp, #16]
	str r1, [sp, #20]
	mov r1, #6
	str r1, [sp, #24]
	mov r1, #5
	str r1, [sp, #28]
	mov r1, #7
	str r1, [sp, #32]
	mov r1, #8
	str r1, [sp, #36]
	add r1, r4, #1
	cmp r1, #10
	blt label16
	b label47
.p2align 4
label127:
	cmp r2, r7
	beq label154
.p2align 4
label15:
	add r2, r0, r7, lsl #2
	cmp r1, #9
	ldr r5, [r2, #0]
	ldr r6, [r3, #0]
	str r6, [r2, #0]
	str r5, [r3, #0]
	bge label8
.p2align 4
label14:
	add r3, r3, #4
	mov r2, r1
	add r1, r1, #1
	cmp r1, #10
	bge label47
.p2align 4
label16:
	add r5, r2, #4
	cmp r5, #10
	bge label72
	add r5, r0, r1, lsl #2
	mov r7, r2
	mov r6, r1
	b label18
.p2align 4
label22:
	add r5, r5, #16
.p2align 4
label18:
	ldr r8, [r0, r7, lsl #2]
	ldr r9, [r5, #0


const markers: google.maps.Marker[] = places.map(
                (place: IStoreDocument) => {
                    const [placeLng, placeLat] = place.location.coordinates;
                    const position = { lat: placeLat, lng: placeLng };
                    bounds.extend(position);
                    const marker = new google.maps.Marker({
                        map,
                        position
                    });
                    (marker as any).setPlace({
                        location: {
                            lat: placeLat,
                            lng: placeLng
                        },
                        query: place.name
                    });
                    marker.setValues({
                        info: {
                            address: place.location.address,
                            name: place.name,
                            photo: place.photo,
                            slug: place.slug
                        }
                    });
                    return marker;
                }
            );

            markers.forEach(marker => {
                marker.addListener("click", function() {
                    const info = this.get("info");
                    const { address, name, photo, slug } = info;
                    const html = `

${name} - ${address}

                    `;
                    infoWindow.setContent(html);
                    infoWindow.open(map, this);
                });
            });

            map.setCenter(bounds.getCenter());
            map.fitBounds(bounds);
        });
}

export function makeMap(mapDiv: HTMLInputElement | null) {
    if (!mapDiv) {
        return;
    }
    // make our map
    const map = new google.maps.Map(mapDiv, mapOptions);
    loadPlaces(map);
    const input = $('[name="geolocate"]') as HTMLInputElement;
    if (input) {
        const autocomplete = new google.maps.places.Autocomplete(input);
        autocomplete.addListener("place_changed", () => {
            const place = autocomplete.getPlace();
            if (place && place.geometry && place.geometry.location) {
                map.setCenter({
                    lat: place.geometry!.location.lat(),
                    lng: place.geometry!.location.lng()
                });
            }
        });
    }
}
import { referenceToDepsMap, depsToCallbackMap, model as femoModel } from "./constants";
import { InnerFemo } from "./interface";
import { ReferToState } from './referToState';

const subscribe = (femo: InnerFemo, reToStateFn: ReferToState) => {
  const refToDepsMap = femo[referenceToDepsMap];
  const depsToFnMap = femo[depsToCallbackMap];
  return (...args: any[]) => {
    let callback: (...p: any[]) => void;
    let copyDeps: any[];
    if (args.length === 0) {
      throw new Error(`Error: please input some params in subscribe function!`)
    } else if (args.length === 1) {
      if (typeof args[0] !== 'function') {
        throw new Error(`Error: the only param must be function! ${args[0]}`)
      }
      // 没有写明依赖，只传了一个函数
      // 默认依赖整个state
      [callback] = args;
      copyDeps = [femo[femoModel]];
    } else {
      let deps;
      [deps,callback] = args;
      if (!(deps instanceof Array)) {
        throw new Error(`Error: the first param must be an array！${ deps }`);
      }


#ifndef Container_H
#define Container_H

#include "RevObject.h"
#include "TypeSpec.h"

#include <iostream>
#include <vector>

namespace RevLanguage {

    /**
     * @brief Generic container base class
     *
     * Container is the interface for all generic Rev containers, that is, Rev objects with a type of the
     * form element type followed by one or more pairs of square brackets marking the dimension of the
     * container. For instance, a generic Rev vector of Real elements will have type "Real[]", and a
     * vector of probabilities will have type "Probability[]". The actual generic vector types used
     * in Rev are classes deriving directly from either ModelVector (for ModelObject elements) or
     * from WorkspaceVector (for WorkspaceObject elements).
     *
     * More specialized containers derive from the generic container classes, and thus inherit all
     * of the container properties.
     *
     * Generic containers support assignment to individual elements by default, but derived classes
     * defining specialized classes typically override this behavior by appropriate modification of
     * the element access functions.
     */
    class Container {

    public:
        virtual                                    ~Container(void) {}

        // Container functions you have to override
        virtual void                                push_back(const RevObject &x) = 0;                                  //!< Append element to end
        virtual RevObject*                          getElement(size_t idx) const = 0;                                   //!< Get element variable (vector of indices)
        virtual size_t                              size(void) const = 0;                                               //!< Get number of elements in container

        virtual bool                                allowsModificationToCompositeContainer(void) const { return true;}  //!< Does an object of this type allow transformation into a composite container?

    protected:
        Container(void) {}                                                                                //!< Default constructor
      //Container&                                  operator=(const Container& x);                                      //!< Assignment operator
    };

}

#endif


value[2] = max(max_value[2], Storage[i].z);
    }
    // Select the longest dimension as division axis
    for (i = 0; i < 3; i++)
        dim_range[i] = max_value[i] - min_value[i];
    for (i = 1; i < 3; i++)
        if (dim_range[i] > dim_range[div_axis])
            div_axis = i;
    // Divide by the division axis and recursively build.

    (*root)->division_axis = div_axis;
    switch (div_axis)
    {
    case 0:
        nth_element(begin(Storage) + l, begin(Storage) + mid, begin(Storage) + r + 1, point_cmp_x);
        break;
    case 1:
        nth_element(begin(Storage) + l, begin(Storage) + mid, begin(Storage) + r + 1, point_cmp_y);
        break;
    case 2:
        nth_element(begin(Storage) + l, begin(Storage) + mid, begin(Storage) + r + 1, point_cmp_z);
        break;
    default:
        nth_element(begin(Storage) + l, begin(Storage) + mid, begin(Storage) + r + 1, point_cmp_x);
        break;
    }
    (*root)->point = Storage[mid];
    KD_TREE_NODE *left_son = nullptr, *right_son = nullptr;
    BuildTree(&left_son, l, mid - 1, Storage);
    BuildTree(&right_son, mid + 1, r, Storage);
    (*root)->left_son_ptr = left_son;
    (*root)->right_son_ptr = right_son;
    Update((*root));
    return;
}

template <typename PointType>
void KD_TREE<PointType>::Rebuild(KD_TREE_NODE **root)
{
    KD_TREE_NODE *father_ptr;
    if ((*root)->TreeSize >= Multi_Thread_Rebuild_Point_Num)
    {
        if (!pthread_mutex_trylock(&rebuild_ptr_mutex_lock))
        {
            if (Rebuild_Ptr == nullptr || ((*root)->TreeSize > (*Rebuild_Ptr)->TreeSize))
            {
                Rebuild_Ptr = root;
            }
            pthread_mutex_unlock(&rebuild_ptr_mutex_lock);
        }
    }
    else
    {
        father_ptr = (*root)->father_ptr;
        int size_rec = (*root)->TreeSize;
        PCL_Storage.clear();
        flatten(*root, PCL_Storage, DELETE_POINTS_REC);
        delete_tree_nodes(root);
        BuildTree(root, 0, PCL_Storage.size() - 1, PCL_Storage);
        if (*root != nullptr)
            (*root)->father_ptr = father_ptr;
        if (*root == Root_Node)
            STATIC_ROOT_NODE->left_son_ptr = *root;
    }
    return;
}

template <typename PointType>
int KD_TREE<PointType>::Delete_by_range(KD_TREE_NODE **root, BoxPointType boxpoint, bool allow_rebuild, bool is_downsample)
{
    if ((*root) == nullptr || (*root)->tree_deleted)
        return 0;
    (*root)->working_flag = true;
    Push_Down(*root);
    int tmp_counter = 0;
    if (boxpoint.vertex_max[0] <= (*root)->node_range_x[0] || boxpoint.vertex_min[0] > (*root)->node_range_x[1])
        return 0;
    if (boxpoint.vertex_max[1] <= (*root)->node_range_y[0] || boxpoint.vertex_min[1] > (*root)->node_range_y[1])
        return 0;
    if (boxpoint.vertex_max[2] <= (*root)->node_range_z[0] || boxpoint.vertex_min[2] > (*root)->node_range_z[1])
        return 0;
    if (boxpoint.verte


// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef BENCHMARK_UTILITIES_H
#define BENCHMARK_UTILITIES_H

#include <cassert>
#include <type_traits>

#include "benchmark/benchmark.h"

namespace UtilitiesInternal {
  template <class Container>
  auto HaveDataImpl(int) -> decltype((std::declval<Container&>().data(), std::true_type{}));
  template <class Container>
  auto HaveDataImpl(long) -> std::false_type;
  template <class T>
  using HasData = decltype(HaveDataImpl<T>(0));
} // namespace UtilitiesInternal

template <class Container, std::enable_if_t<UtilitiesInternal::HasData<Container>::value>* = nullptr>
void DoNotOptimizeData(Container &c) { benchmark::DoNotOptimize(c.data()); }
template <class Container, std::enable_if_t<!UtilitiesInternal::HasData<Container>::value>* = nullptr>
void DoNotOptimizeData(Container &c) { benchmark::DoNotOptimize(&c); }

#endif // BENCHMARK_UTILITIES_H


using System.Collections.Frozen;
using Avalonia.Platform.Storage;
using Microsoft.Win32;

namespace MuseDashModTools.Core;

internal sealed class WindowsService : IPlatformService
{
    private const string DotnetRuntimeUrl = "https://aka.ms/dotnet/6.0/dotnet-runtime-win-x64.exe";
    private const string DotnetSdkUrl = "https://aka.ms/dotnet/8.0/dotnet-sdk-win-x64.exe";

    [SupportedOSPlatform(nameof(OSPlatform.Windows))]
    private static readonly FrozenSet<string> WindowsPaths = new[]
        {
            @"Program Files\Steam\steamapps\common\Muse Dash",
            @"Program Files (x86)\Steam\steamapps\common\Muse Dash",
            @"Program Files\SteamLibrary\steamapps\common\Muse Dash",
            @"Program Files (x86)\SteamLibrary\steamapps\common\Muse Dash",
            @"Steam\steamapps\common\Muse Dash",
            @"SteamLibrary\steamapps\common\Muse Dash"
        }
        .SelectMany(path => Environment.GetLogicalDrives().Select(drive => Path.Combine(drive, path))).ToFrozenSet();

    public string OsString => "Windows";

    [SupportedOSPlatform(nameof(OSPlatform.Windows))]
    public bool GetGamePath([NotNullWhen(true)] out string? folderPath)
    {
        folderPath = WindowsPaths.FirstOrDefault(Directory.Exists);

        if (folderPath is null)
        {
            Logger.ZLogWarning($"Auto detect steam install on common path failed.");
            if (!GetPathFromRegistry(out folderPath))
            {
                Logger.ZLogWarning($"Failed to auto detect game path on Windows");
                return false;
            }

            Logger.ZLogInformation($"Detected game path from Registry: {folderPath}");
            return true;
        }

        Logger.ZLogInformation($"Auto detected game path on Windows: {folderPath}");
        return true;
    }

    [SupportedOSPlatform(nameof(OSPlatform.Windows))]
    public string GetUpdaterFilePath(string folderPath) => Path.Combine(folderPath, "Updater.exe");

    public async Task<bool> InstallDotNetRuntimeAsync()
    {
        try
        {
            var tempFilePath = Path.GetTempFileName();
            Logger.ZLogInformation($"Downloading .NET Runtime from {DotnetRuntimeUrl} to {tempFilePath}");
            await DownloadManager.DownloadFileAsync(DotnetRuntimeUrl, tempFilePath).ConfigureAwait(false);

            Logger.ZLogInformation($"Launching .NET Runtime installer: {tempFilePath}");
            using var process = Process.Start(
                new ProcessStartInfo(tempFilePath)
                {
                    UseShellExecute = false,
                    CreateNoWindow = true
                });

            if (process is null)
            {
                return false;
            }

            await process.WaitForExitAsync().ConfigureAwait(false);
            Logger.ZLogInformation($".NET Runtime installer finished with exit code: {process.ExitCode}");

            return process.ExitCode is 0;
        }
        catch (Exception ex)
        {
            Logger.ZLogError(ex, $"Failed to install .NET Runtime");
            return false;
        }
    }

    public async Task<bool> InstallDotNetSdkAsync()
    {
        try
        {
            var tempFilePath = Path.GetTempFileName();
            Logger.ZLogInformation($"Downloading .NET SDK from {DotnetSdkUrl} to {tempFilePath}");
            await DownloadManager.DownloadFileAsync(DotnetSdkUrl, tempFilePath).ConfigureAwait(fal


 LLM Judge平均分 ≥ 4.0/5.0
- Win Rate ≥ 45%
- 通过率 ≥ 80%
- 人工验证通过率 ≥ 90%

### 需要改进
- LLM Judge平均分 < 4.0/5.0
- Win Rate < 45%
- 通过率 < 80%
- 人工验证通过率 < 90%

## 下一步

根据评估结果：

1. **如果质量优秀**：
   - 可以使用生成的数据
   - 考虑生成更多数据
   - 保留评估报告作为质量证明

2. **如果质量良好**：
   - 进行人工验证
   - 筛选高质量数据
   - 调整生成提示词

3. **如果需要改进**：
   - 分析低分题目的共同问题
   - 调整生成提示词
   - 重新生成并评估

## 示例输出

### 综合报告示例

```markdown
# AIME数据生成与评估综合报告

## 1. 基本信息

- **生成时间**: 2025-01-10 12:00:00
- **生成题目数量**: 30
- **参考AIME年份**: 2025

## 2. 数据生成统计

### 主题分布

| 主题 | 数量 | 占比 |
|------|------|------|
| 代数 | 10 | 33.3% |
| 几何 | 8 | 26.7% |
| 数论 | 7 | 23.3% |
| 组合 | 3 | 10.0% |
| 概率 | 2 | 6.7% |

## 3. LLM Judge评估结果

- **平均总分**: 4.2/5.0
- **通过率**: 85.0%
- **优秀率**: 40.0%

## 4. Win Rate评估结果

- **Win Rate**: 45.0%
- **评级**: 良好

## 5. 综合结论

✅ 生成数据质量**良好**，接近AIME真题水平。
```

## 总结

完整流程：
1. 运行 `python data_generation/run_complete_evaluation.py 30 3.0`
2. 等待30-55分钟
3. 查看综合报告 `data_generation/evaluation_results/XXXXXX/comprehensive_report.md`
4. （可选）运行人工验证
5. 根据评估结果决定下一步

**说明**：
- 所有评估都使用AIME 2025年真题作为参考
- 数据集来源：math-ai/aime25（JSONL格式）

祝你使用愉快！

# BFCL评估报告

**生成时间**: 2025-10-11 01:03:43

## 📊 评估概览

- **智能体**: TestAgent
- **评估类别**: simple_python
- **总体准确率**: 100.00%
- **正确样本数**: 5/5

## 📈 详细指标

### 分类准确率

- **simple_python**: 100.00% (5/5)

## 📝 样本详情

| 样本ID | 问题 | 预测结果 | 正确答案 | 是否正确 |
|--------|------|----------|----------|----------|
| simple_python_0 | Find the area of a triangle with a base of 10 units and heig... | [{'name': 'calculate_triangle_area', 'ar... | [{'c


 "full" feature flag ([#5639])
- stream: add `StreamExt::timeout_repeating` ([#5577])
- stream: add `StreamNotifyClose` ([#4851])

[#4851]: https://github.com/tokio-rs/tokio/pull/4851
[#5577]: https://github.com/tokio-rs/tokio/pull/5577
[#5639]: https://github.com/tokio-rs/tokio/pull/5639

# 0.1.12 (January 20, 2023)

- time: remove `Unpin` bound on `Throttle` methods ([#5105])
- time: document that `throttle` operates on ms granularity ([#5101])
- sync: add `WatchStream::from_changes` ([#5432])

[#5105]: https://github.com/tokio-rs/tokio/pull/5105
[#5101]: https://github.com/tokio-rs/tokio/pull/5101
[#5432]: https://github.com/tokio-rs/tokio/pull/5432

# 0.1.11 (October 11, 2022)

- time: allow `StreamExt::chunks_timeout` outside of a runtime ([#5036])

[#5036]: https://github.com/tokio-rs/tokio/pull/5036

# 0.1.10 (Sept 18, 2022)

- time: add `StreamExt::chunks_timeout` ([#4695])
- stream: add track_caller to public APIs ([#4786])

[#4695]: https://github.com/tokio-rs/tokio/pull/4695
[#4786]: https://github.com/tokio-rs/tokio/pull/4786

# 0.1.9 (June 4, 2022)

- deps: upgrade `tokio-util` dependency to `0.7.x` ([#3762])
- stream: add `StreamExt::map_while` ([#4351])
- stream: add `StreamExt::then` ([#4355])
- stream: add cancel-safety docs to `StreamExt::next` and `try_next` ([#4715])
- stream: expose `Elapsed` error ([#4502])
- stream: expose `Timeout` ([#4601])
- stream: implement `Extend` for `StreamMap` ([#4272])
- sync: add `Clone` to `RecvError` types ([#4560])

[#3762]: https://github.com/tokio-rs/tokio/pull/3762
[#4272]: https://github.com/tokio-rs/tokio/pull/4272
[#4351]: https://github.com/tokio-rs/tokio/pull/4351
[#4355]: https://github.com/tokio-rs/tokio/pull/4355
[#4502]: https://github.com/tokio-rs/tokio/pull/4502
[#4560]: https://github.com/tokio-rs/tokio/pull/4560
[#4601]: https://github.com/tokio-rs/tokio/pull/4601
[#4715]: https://github.com/tokio-rs/tokio/pull/4715

# 0.1.8 (October 29, 2021)

- stream: add `From<Receiver<T>>` impl for receiver streams ([#4080])
- stream: impl `FromIterator` for `StreamMap` ([#4052])
- signal: make windows docs for signal module show up on unix builds ([#3770])

[#3770]: https://github.com/tokio-rs/tokio/pull/3770
[#4052]: https://github.com/tokio-rs/tokio/pull/4052
[#4080]: https://github.com/tokio-rs/tokio/pull/4080

# 0.1.7 (July 7, 2021)

### Fixed

- sync: fix watch wrapper ([#3914])
- time: fix `Timeout::size_hint` ([#3902])

[#3902]: https://github.com/tokio-rs/tokio/pull/3902
[#3914]: https://github.com/tokio-rs/tokio/pull/3914

# 0.1.6


ctionPipeline(MODEL_PATH)

# if uploaded_file:
#     # Display the uploaded image
#     image = Image.open(uploaded_file)
#     st.image(image, caption="🖼 Uploaded X-Ray Image", use_container_width=True)

#     # Centered prediction button
#     st.markdown('
', unsafe_allow_html=True)
#     if st.button("🔍 Predict"):
#         prediction = pipeline.predict(image)
#         # Conditional styling for the result box
#         if prediction == "Normal":
#             st.markdown(
#                 f"
🌟 Prediction: {prediction} - No signs of disease detected. 🌟
",
#                 unsafe_allow_html=True
#             )
#         else:
#             st.markdown(
#                 f"
⚠ Prediction: {prediction} - Consult a doctor immediately for further diagnosis. ⚠
",
#                 unsafe_allow_html=True
#             )
#     st.markdown('
', unsafe_allow_html=True)

# import os
# import numpy as np
# import streamlit as st
# from PIL import Image
# from tensorflow.keras.models import load_model
# from tensorflow.keras.utils import img_to_array

# # Streamlit page configuration
# st.set_page_config(
#     page_title="Chest Cancer Classifier",
#     page_icon="🎗",
#     layout="centered"
# )

# # Modernized CSS styling for UI/UX
# st.markdown(
#     """
#
#     """,
#     unsafe_allow_html=True
# )

# # Display a heading
# st.markdown('

🎗 Chest Cancer Classifier 🎗

', unsafe_allow_html=True)

# # File uploader
# st.markdown('

📂 Upload an X-Ray image (JPEG, PNG, JPG)

', unsafe_allow_html=True)
# uploaded_file = st.file_uploader("🚀 Choose an image...", type=["png", "jpg", "jpeg"])

# # Class for prediction pipeline
# class PredictionPipeline:
#     def __init__(self, model_path):
#         self.model = load_model(model_path)

#     def preprocess_image(self, image):
#         """
#         Preprocesses the uploaded image to ensure compatibility with the model.
#         - Converts to RGB if necessary.
#         - Resizes the image to (224, 224).
#         - Converts to a NumPy array with appropriate dimensions.
#         """
#         # Convert image to RGB if it has an alpha channel or grayscale
#         if image.mode != "RGB":
#             image = image.convert("RGB")

#         # Resize image to match the model's input shape
#         resized_image = image.resize((224, 224))

#         # Convert the image to a NumPy array
#         image_array = img_to_array(resized_image)

#         # Expand dimensions to match the model's in


Event.KEYCODE_POWER
            else -> 0 // Default to unknown.
        }
    }
}
open class base {

    var x: Int = 10
    fun displayx() {
        println("x is $x")
    }
}

open class dervied : base() { // single level inheritance can parform
    var y = 50
    fun displayy() {
        println("y is $y")
    }
}

class dervied2 : dervied() { // multilevel inheritance

    var z = 40
    fun displayz() {
        println("z is $z")
    }
}

fun main() {

    val obj1 = dervied2()
    obj1.displayx()
    obj1.displayy()
    obj1.displayz()
}
fun main() {
    println("for loop :-") // for loop in given range

    var element = arrayOf("Apple", "ball", "cat", "dog", "eye") // travarsing array in for loop
    for (i in element) {
        println(i.reversed())
        println(i)
    }

    val school = arrayOf("shark", "salmon", "minnow")
    for (element in school) {
        print(element + " ")
    }
    for ((index, element) in school.withIndex()) {
        println("Item at $index is $element\n")
    }

    // onlinear for loop
    for (i in 1..5) print(i)
    // ⇒ 12345
    println()
    for (i in 5 downTo 1) print(i)
    // ⇒ 54321
    println()
    for (i in 3..6 step 2) print(i)
    // ⇒ 35
    println()
    for (i in 'a'..'z') print(i)
    // ⇒ a to z to print

    println()

    for (i in 1..10) {
        println(i)
    }

    println()

    for (i in 10 downTo 1) {
        println(i)
    }

    println()

    for (i in 0..50 step 2) {
        println(i)
    }

    println()

    for (i in 1 until 10) {
        println(i)
    }

    println()

    println("While loop:- ")
    var i = 0
    while (i < 10) {
        println(i)
        i += 1
    }

    println("do while loop:- ")

    do {
        println(i)
        i++
    } while (i <= 20)
}
// user defind data type (class):-

class user(val name: String, val phone: Long, val addres: String) {

    fun display() {
        println("name is : $name")
        println("phone is : $phone")
        println("addres is : $addres")
    }
}

fun main() {

    // All data type are object in class in kotlin (non primtive)

    // integer number data type :-
    val number1: Int = 34 // integer tipe data store in
    val number2: Byte = 12 // byte of number can store in spaicpic range
    val number3: Short = 56 // short number can store
    val number4: Long = 3333333333333 // long interger number can store
    println("number1 is  $number1")
    println("number2 is  $number2")
    println("number3 is  $number3")
    println("number4 is  $number4")

    // typecasting in kotlin :-

    // floating number data type:-
    val float1: Float = 20.12F // you don't write a last ( F ) by defolt cansider double
    val double2: Double = 20.20200 // double can store long pointing value

    println("the flotat1 is : $float1")
    println("the double2 is : $double2")

    // charter data type :-

    val char1: Char = 'H'
    println("the char1 is : $char1")

    // Boolean dadatype :
    val bool1: Boolean = true
    println("the bool1 is : $bool1")
    val bool2: Boolean = false
    println("the bool2 is : $bool2")

    // string data type : st


:
        return null;
    }
  }

  PaymentType _getPaymentTypeByString(String? paymentMethod) {
    switch (paymentMethod) {
      case 'Bank':
        return PaymentType.bankTransfer;
      case 'Card':
        return PaymentType.creditCard;
      case 'Instant':
        return PaymentType.sepa;
      default:
        return PaymentType.unknown;
    }
  }

  double? _toDouble(dynamic value) {
    if (value is int) {
      return value.toDouble();
    } else if (value is double) {
      return value;
    }
    return null;
  }

  String _getErrorMessage(int statusCode, String body) {
    final responseBody = jsonDecode(body) as Map<String, dynamic>;
    final message = responseBody['message']?.toString() ?? '';

    if (message.contains("address must match") || message.contains("signature must match")) {
      return "The wallet type must match the selected currency";
    }

    return message.isNotEmpty ? message : "Unknown error: ${statusCode}";
  }
}
import 'package:flutter/cupertino.dart';

class NavBar extends StatelessWidget implements ObstructingPreferredSizeWidget {
  factory NavBar({Widget? leading, Widget? middle, Widget? trailing, Color? backgroundColor}) {
    return NavBar._internal(
        leading: leading,
        middle: middle,
        trailing: trailing,
        height: _height,
        backgroundColor: backgroundColor);
  }

  factory NavBar.withShadow(
      {Widget? leading, Widget? middle, Widget? trailing, Color? backgroundColor}) {
    return NavBar._internal(
      leading: leading,
      middle: middle,
      trailing: trailing,
      height: 80,
      backgroundColor: backgroundColor,
      decoration: BoxDecoration(
        color: backgroundColor,
        boxShadow: [
          BoxShadow(
            color: Color.fromRGBO(132, 141, 198, 0.11),
            blurRadius: 8,
            offset: Offset(0, 2),
          ),
        ],
      ),
    );
  }

  NavBar._internal(
      {this.leading,
      this.middle,
      this.trailing,
      this.backgroundColor,
      this.decoration,
      this.height = _height});

  static const _originalHeight = 44.0; // iOS nav bar height
  static const _height = 60.0;

  final Widget? leading;
  final Widget? middle;
  final Widget? trailing;
  final Color? backgroundColor;
  final BoxDecoration? decoration;
  final double height;

  @override
  Widget build(BuildContext context) {
    if (leading == null && middle == null && trailing == null) {
      return const SizedBox();
    }

    final pad = height - _originalHeight;
    final paddingTop = pad / 2;
    final _paddingBottom = (pad / 2);

    return Container(
      decoration: decoration ?? BoxDecoration(color: backgroundColor),
      padding: EdgeInsetsDirectional.only(bottom: _paddingBottom, top: paddingTop),
      child: CupertinoNavigationBar(
        leading: leading,
        automaticallyImplyLeading: false,
        automaticallyImplyMiddle: false,
        transitionBetweenRoutes: false,
        middle: middle,
        trailing: trailing,
        backgroundColor: backgroundColor,
        border: null,
      ),
    );
  }

  @override
  Size get preferredSize => Size.fromHeight(height);

  @override
  bool shouldFullyObstruct(BuildContext context) {
    return false;
  }
}
import 'package:cake_wallet/src/widgets/base_alert_dialog.dart';
import 'package:flutter/cupertino.dart';

class AlertWithTwoActions extends BaseAlertDialog {
  AlertWithTwoActions({
    required this.alertTitle,


00%;
	z-index: -2;
}

image.loading::after {
	content: "\e7f1";
	font-family: "cuIcon";
	position: absolute;
	top: 0;
	left: 0;
	width: 32upx;
	height: 32upx;
	line-height: 32upx;
	right: 0;
	bottom: 0;
	z-index: -1;
	font-size: 32upx;
	margin: auto;
	color: #ccc;
	-webkit-animation: cuIcon-spin 2s infinite linear;
	animation: cuIcon-spin 2s infinite linear;
	display: block;
}

.response {
	width: 100%;
}

/* ==================
         开关
 ==================== */

/* switch,
checkbox,
radio {
	position: relative;
} */

switch::after,
switch::before {
	font-family: "cuIcon";
	content: "\e645";
	position: absolute;
	color: #ffffff !important;
	top: 0%;
	left: 0upx;
	font-size: 26upx;
	line-height: 26px;
	width: 50%;
	text-align: center;
	pointer-events: none;
	transform: scale(0, 0);
	transition: all 0.3s ease-in-out 0s;
	z-index: 9;
	bottom: 0;
	height: 26px;
	margin: auto;
}

switch::before {
	content: "\e646";
	right: 0;
	transform: scale(1, 1);
	left: auto;
}

switch[checked]::after,
switch.checked::after {
	transform: scale(1, 1);
}

switch[checked]::before,
switch.checked::before {
	transform: scale(0, 0);
}

/* #ifndef MP-ALIPAY */
/* radio::before,
checkbox::before {
	font-family: "cuIcon";
	content: "\e645";
	position: absolute;
	color: #ffffff !important;
	top: 50%;
	margin-top: -8px;
	right: 5px;
	font-size: 32upx;
	line-height: 16px;
	pointer-events: none;
	transform: scale(1, 1);
	transition: all 0.3s ease-in-out 0s;
	z-index: 9;
} */

/* radio .wx-radio-input,
checkbox .wx-checkbox-input,
radio .uni-radio-input,
checkbox .uni-checkbox-input {
	margin: 0;
	width: 24px;
	height: 24px;
} */

/* checkbox.round .wx-checkbox-input,
checkbox.round .uni-checkbox-input {
	border-radius: 100upx;
} */

/* #endif */

switch[checked]::before {
	transform: scale(0, 0);
}

switch .wx-switch-input,
switch .uni-switch-input {
	border: none;
	padding: 0 24px;
	width: 48px;
	height: 26px;
	margin: 0;
	border-radius: 100upx;
}

switch .wx-switch-input:not([class*="bg-"]),
switch .uni-switch-input:not([class*="bg-"]) {
	background: #8799a3 !important;
}

switch .wx-switch-input::after,
switch .uni-switch-input::after {
	margin: auto;
	width: 26px;
	height: 26px;
	border-radius: 100upx;
	left: 0upx;
	top: 0upx;
	bottom: 0upx;
	position: absolute;
	transform: scale(0.9, 0.9);
	transition: all 0.1s ease-in-out 0s;
}


a',
  'makemake',
}

PB_UTIL.ENABLED_DECKS = {
  'paper',
  'proud',
  'silver',
  'dreamer',
  'antique',
  'passionate',
}

PB_UTIL.ENABLED_STICKERS = {
  'energized',
  'temporary'
}

-- Define a Booster object with certain shared properties for Minor Arcana packs
if PB_UTIL.config.minor_arcana_enabled then
  PB_UTIL.MinorArcanaBooster = SMODS.Booster:extend {
    group_key = 'paperback_minor_arcana_pack',
    kind = 'paperback_minor_arcana',
    draw_hand = true,

    loc_vars = function(self, info_queue, card)
      return {
        -- Removes the underscore with a digit at the end of a key if it exists,
        -- allowing us to make only one localization entry per type
        key = self.key:gsub('_%d$', ''),
        vars = {
          card.ability.choose,
          card.ability.extra
        }
      }
    end,

    create_card = function(self, card, i)
      return {
        set = 'paperback_minor_arcana',
        area = G.pack_cards,
        skip_materialize = true,
        soulable = true -- Allow creating Apostle cards
      }
    end,

    ease_background_colour = function(self)
      ease_colour(G.C.DYN_UI.MAIN, G.C.PAPERBACK_MINOR_ARCANA)
      ease_background_colour { new_colour = G.C.PAPERBACK_MINOR_ARCANA, special_colour = G.C.BLACK, contrast = 2 }
    end,
  }
end

-- Define Paperclip object
if PB_UTIL.config.paperclips_enabled then
  PB_UTIL.Paperclip = SMODS.Sticker:extend {
    prefix_config = { key = true },
    should_apply = false,
    config = {},
    rate = 0,
    sets = {
      Default = true
    },

    draw = function(self, card)
      local x_offset = (card.T.w / 71) * -4 * card.T.scale
      G.shared_stickers[self.key].role.draw_major = card
      G.shared_stickers[self.key]:draw_shader('dissolve', nil, nil, nil, card.children.center, nil, nil, x_offset)
    end,

    apply = function(self, card, val)
      card.ability[self.key] = val and copy_table(self.config) or nil
    end
  }
end

-- Define custom MinorArcana object with shared properties for handling common behavior
if PB_UTIL.config.minor_arcana_enabled then
  --- @type SMODS.Consumable
  PB_UTIL.MinorArcana = SMODS.Consumable:extend {
    set = 'paperback_minor_arcana',
    unlocked = true,
    discovered = false,

    loc_vars = function(self, info_queue, card)
      if not self.config then return end

      if card.ability.paperclip then
        info_queue[#info_queue + 1] = PB_UTIL.paperclip_tooltip(card.ability.paperclip)

        return {
          vars = {
            card.ability.max


, { alias: ['t'] });
        cli.run(['', '', 'test', '-t']);
    });

    it('Option with parameter', function (done) {
        const handler: bashr.CommandHandler = (input, output) => {
            expect(input.options['test']).to.equal('hello');
            done();
        };
        const cli = new bashr.CLI('myCLI');
        const command = cli.command('test', handler);
        command.option('test');
        cli.run(['', '', 'test', '--test', 'hello']);
    });
});import { Ref, Typegoose, getModelForClass, modelOptions, prop } from '@hasezoey/typegoose';

import { Player } from './Player';

type MatchStatus = 'pending' | 'rejected' | 'accepted' | 'cancelled' | 'completed';
const MATCH_STATUS_LABELS: Record<MatchStatus, string> = {
  pending: 'Pending',
  rejected: 'Rejected',
  accepted: 'In Progress',
  completed: 'Completed',
  cancelled: 'Cancelled'
};

const MatchStatusEnum: MatchStatus[] = [
  'accepted',
  'cancelled',
  'completed',
  'pending',
  'rejected',
];

@modelOptions({ schemaOptions: { timestamps: true }})
class Match extends Typegoose {
  _id: string;
  createdAt: Date;
  updatedAt: Date;

  @prop({
    ref: Player,
    required: true,
  })
  initiator: Ref<Player>;

  @prop({
    ref: Player,
    required: true,
  })
  target: Ref<Player>;

  @prop({
    ref: Player,
  })
  winner: Ref<Player>;

  @prop({
    ref: Player,
  })
  loser: Ref<Player>;

  @prop({
    default: 'pending',
    enum: MatchStatusEnum,
  })
  status: MatchStatus;

  @prop()
  acceptedAt: Date;

  @prop()
  rejectedAt: Date;

  @prop()
  completedAt: Date;

  @prop()
  cancelledAt: Date;
}

const MatchModel = getModelForClass(Match);

export {
  Match,
  MatchModel,
  MatchStatus,
  MATCH_STATUS_LABELS,
};
/* Copyright 2020 The TensorFlow Authors. 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

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

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/
/*
 * Common utilities used in the hparams plugin.
 */
import * as d3 from 'd3';
import * as _ from 'lodash';

// -----------------------------------------------------------------------
// Functions for dealing with HParams, Metrics, Columns,
// SessionGroups and Schema objects.
// In the following routines we use the following naming conventions for
// parameters:
//
// hparamInfo, metricInfo: A JavaScript object representation of the
//     HParamInfo proto defined in api.proto.
// schema: The object storing metadata on the metrics and hparams used
//     in the experiment. See the documentation in
//     'tf-hparams-query-pane.html'.
// visibleSchema: The object storing metadata on just the visible metrics
//     and hparams in 'schema'. This is the object stored in the property
//     'visibleSchema' of 'configuration' (see the documentation in
//     tf-hparams-query-pane.


    ): List<Node<T>> {
        val currentlySelected = selectedNodes.toMutableList()

        return when {
            isCtrlOrMetaPressed && isShiftPressed -> {
                val lastSelected = currentlySelected.lastOrNull() ?: node
                val currentIndex = nodes.indexOf(node)
                val lastIndex = nodes.indexOf(lastSelected)

                val start = minOf(currentIndex, lastIndex)
                val end = maxOf(currentIndex, lastIndex)

                for (i in start..end) {
                    val n = nodes[i]
                    if (!currentlySelected.contains(n)) {
                        currentlySelected.add(n)
                    }
                }
                currentlySelected
            }

            isShiftPressed -> {
                val firstSelected = currentlySelected.firstOrNull() ?: node
                val currentIndex = nodes.indexOf(node)
                val firstIndex = nodes.indexOf(firstSelected)
                val start = minOf(currentIndex, firstIndex)
                val end = maxOf(currentIndex, firstIndex)

                nodes.subList(start, end + 1)
            }
            isCtrlOrMetaPressed -> {
                if (currentlySelected.contains(node)) {
                    currentlySelected.remove(node)
                } else {
                    currentlySelected.add(node)
                }
                currentlySelected
            }
            else -> listOf(node)
        }
    }

    private fun Node<T>.setSelected(isSelected: Boolean) {
        when (this) {
            is LeafNode -> setSelected(isSelected)
            is BranchNode -> setSelected(isSelected)
        }
    }
}
package io.composeflow.platform

import androidx.compose.runtime.Composable
import androidx.compose.runtime.DisposableEffect
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.setValue
import androidx.compose.ui.unit.DpSize
import androidx.compose.ui.unit.dp
import kotlinx.browser.window
import org.w3c.dom.events.Event

@Composable
actual fun rememberWindowSize(): DpSize {
    var size by remember {
        mutableStateOf(
            DpSize(
                window.innerWidth.dp,
                window.innerHeight.dp,
            ),
        )
    }

    DisposableEffect(Unit) {
        val updateSize: (Event) -> Unit = {
            size =
                DpSize(
                    window.innerWidth.dp,
                    window.innerHeight.dp,
                )
        }

        window.addEventListener("resize", updateSize)

        onDispose {
            window.removeEventListener("resize", updateSize)
        }
    }

    return size
}

package io.github.composefluent.icons.filled

import androidx.compose.ui.graphics.vector.ImageVector
import io.github.composefluent.icons.Icons
import io.github.composefluent.icons.fluentIcon
import io.github.composefluent.icons.fluentPath

public val Icons.Filled.PeopleSwap: ImageVector
    get() {
        if (_peopleSwap != null) {
            return _peopleSwap!!
        }
        _peopleSwap = fluentIcon(name = "Filled.PeopleSwap") {
            fluentPath {
                moveTo(12.0f, 8.0f)
                arcTo


 '../../entity/entity.g.dart';
import '../../util/flutter/rich_text_helper.dart';

/// Is run after the v134.sql upgrade script is run.
/// Convert all rich text fields to plain text.
Future<void> postv134Upgrade(Database db) async {
  await db.transaction((transaction) async {
    final system = await DaoSystem().get(transaction);

    final removed = system.richTextRemoved;

    final daoQuote = DaoQuote();
    final daoJob = DaoJob();

    switch (removed) {
      case RichTextRemoved.notYet:
        {
          final jobs = await daoJob.getAll(transaction: transaction);

          for (final job in jobs) {
            job
              ..assumption = RichTextHelper.toPlainText(job.assumption)
              ..description = RichTextHelper.toPlainText(job.description);
            await daoJob.update(job, transaction);
          }
          await DaoSystem().update(
            system.copyWith(richTextRemoved: RichTextRemoved.job),
            transaction,
          );
        }
        continue job;

      job:
      case RichTextRemoved.job:
        {
          final quotes = await daoQuote.getAll(transaction: transaction);
          for (final quote in quotes) {
            quote.assumption = RichTextHelper.toPlainText(quote.assumption);
            await daoQuote.update(quote, transaction);
          }
          await DaoSystem().update(
            system.copyWith(richTextRemoved: RichTextRemoved.quote),
            transaction,
          );
        }
        continue quote;
      quote:
      case RichTextRemoved.quote:
        {
          // no action requried.
        }
    }
  });
}
/*
 Copyright © OnePub IP Pty Ltd. S. Brett Sutton. All Rights Reserved.

 Note: This software is licensed under the GNU General Public License,
         with the following exceptions:
   • Permitted for internal use within your own business or organization only.
   • Any external distribution, resale, or incorporation into products
      for third parties is strictly prohibited.

 See the full license on GitHub:
 https://github.com/bsutton/hmb/blob/main/LICENSE
*/

import 'package:deferred_state/deferred_state.dart';
import 'package:flutter/material.dart';
import 'package:future_builder_ex/future_builder_ex.dart';

import '../../../ui/widgets/layout/hmb_column.dart';
import '../../../ui/widgets/text/hmb_text.dart';
import '../../../util/dart/format.dart';
import 'backup.dart';
import 'backup_provider.dart';

class BackupSelectionScreen extends StatefulWidget {
  final BackupProvider backupProvider;

  const BackupSelectionScreen({required this.backupProvider, super.key});

  @override
  BackupSelectionScreenState createState() => BackupSelectionScreenState();
}

class BackupSelectionScreenState extends DeferredState<BackupSelectionScreen> {
  late Future<Backups> _backupsFuture;

  @override
  Future<void> asyncInitState() async {
    _backupsFuture = _loadBackups();
  }

  Future<Backups> _loadBackups() async {
    try {
      final backups = await widget.backupProvider.getBackups();
      backups.sort((a, b) => b.when.compareTo(a.when));
      return Backups(backups, await widget.backupProvider.backupLocation);
      // ignore: avoid_catches_without_on_clauses
    } catch (e) {
      // Handle error


flac",
    ]
)
```

`Pipelines`非常适合用于测试，因为从一个模型切换到另一个模型非常琐碎；但是，还有一些方法可以将它们优化后用于大型工作负载而不仅仅是测试。请查看以下指南，深入探讨如何迭代整个数据集或在Web服务器中使用`Pipelines`：
* [在数据集上使用流水线](#using-pipelines-on-a-dataset)
* [在Web服务器中使用流水线](./pipeline_webserver)

## 参数

[`pipeline`] 支持许多参数；有些是适用于特定任务的，而有些适用于所有`pipeline`。通常情况下，您可以在任何地方指定对应参数：

```py
transcriber = pipeline(model="openai/whisper-large-v2", my_parameter=1)

out = transcriber(...)  # This will use `my_parameter=1`.
out = transcriber(..., my_parameter=2)  # This will override and use `my_parameter=2`.
out = transcriber(...)  # This will go back to using `my_parameter=1`.
```

让我们查看其中的三个重要参数：

### 设备

如果您使用 `device=n`，`pipeline`会自动将模型放在指定的设备上。无论您使用PyTorch还是Tensorflow，这都可以工作。

```py
transcriber = pipeline(model="openai/whisper-large-v2", device=0)
```

如果模型对于单个GPU来说过于庞大，并且您正在使用PyTorch，您可以设置 `device_map="auto"` 以自动确定如何加载和存储模型权重。使用 `device_map` 参数需要安装🤗 [Accelerate](https://huggingface.co/docs/accelerate) 软件包：

```bash
pip install --upgrade accelerate
```

以下代码会自动在各个设备上加载和存储模型权重：

```py
transcriber = pipeline(model="openai/whisper-large-v2", device_map="auto")
```

请注意，如果传递了 `device_map="auto"`，在实例化您的 `pipeline` 时不需要添加 `device=device` 参数，否则可能会遇到一些意外的状况！

### 批量大小

默认情况下，`pipelines`不会进行批量推理，原因在[这里](https://huggingface.co/docs/transformers/main_classes/pipelines#pipeline-batching)详细解释。因为批处理不一定更快，实际上在某些情况下可能会更慢。

但如果在您的用例中起作用，您可以使用：

```py
transcriber = pipeline(model="openai/whisper-large-v2", device=0, batch_size=2)
audio_filenames = [f"https://huggingface.co/datasets/Narsil/asr_dummy/resolve/main/{i}.flac" for i in range(1, 5)]
texts = transcriber(audio_filenames)
```

以上代码会在提供的4个音频文件上运行`pipeline`，它会将它们以2个一组的批次传递给模型（模型在GPU上，此时批处理更有可能有所帮助），而您无需编写额外的代码。输出应始终与没有批处理时收到的结果相一致。它只是一种帮助您更快地使用`pipeline`的方式。

`pipeline`也可以减轻一些批处理的复杂性，因为对于某些`pipeline`，需要将单个项目（如长音频文件）分成多个部分以供模型处理。`pipeline`为您执行这种[*c