",
		},
		{
			"fail - invalid validator address",
			func() []interface{} {
				return []interface{}{
					description,
					1205,
					commissionRate,
					minSelfDelegation,
				}
			},
			200000,
			nil,
			func([]byte) {},
			true,
			"invalid validator address",
		},
		{
			"fail - commission change rate too high",
			func() []interface{} {
				return []interface{}{
					description,
					validatorAddress,
					math.LegacyNewDecWithPrec(11, 2).BigInt(),
					minSelfDelegation,
				}
			},
			200000,
			nil,
			func([]byte) {},
			true,
			"commission cannot be changed more than max change rate",
		},
		{
			"fail - negative commission rate",
			func() []interface{} {
				return []interface{}{
					description,
					validatorAddress,
					math.LegacyNewDecWithPrec(-5, 2).BigInt(),
					minSelfDelegation,
				}
			},
			200000,
			nil,
			func([]byte) {},
			true,
			"commission rate must be between 0 and 1 (inclusive)",
		},
		{
			"fail - negative min self delegation",
			func() []interface{} {
				return []interface{}{
					description,
					validatorAddress,
					commissionRate,
					math.LegacyNewDecWithPrec(-5, 2).BigInt(),
				}
			},
			200000,
			nil,
			func([]byte) {},
			true,
			"minimum self delegation must be a positive integer",
		},
		{
			"fail - calling precompile from a different address than validator (smart contract call)",
			func() []interface{} {
				return []interface{}{
					description,
					validatorAddress,
					commissionRate,
					minSelfDelegation,
				}
			},
			200000,
			func() *common.Address {
				addr := s.keyring.GetAddr(0)
				return &addr
			}(),
			func([]byte) {},
			true,
			"does not match the requester address",
		},
		{
			"success",
			func() []interface{} {
				return []interface{}{
					description,
					validatorAddress,
					commissionRate,
					minSelfDelegation,
				}
			},
			200000,
			nil,
			func(data []byte) {
				success, err := s.precompile.Unpack(staking.EditValidatorMethod, data)
				s.Require().NoError(err)
				s.Require().Equal(success[0], true)

				log := stDB.Logs()[0]
				s.Require().Equal(log.Address, s.precompile.Address())

				// Check event signature matches the one emitted
				event := s.precompile.Events[staking.EventTypeEditValidator]
				s.Require().Equal(crypto.Keccak256Hash([]byte(event.Sig)), common.HexToHash(log.Topics[0].Hex()))
				s.Require().Equal(log.BlockNumber, uint64(ctx.BlockHeight())) //nolint:gosec // G115

				// Check the fully unpacked event matches the one emitted
				var editValidatorEvent staking.EventEditValidator
				err = cmn.UnpackLog(s.precompile.ABI, &editValidatorEvent, staking.EventTypeEditValidator, *log)
				s.Require().NoError(err)
				s.Require().Equal(validatorAddress, editValidatorEvent.ValidatorAddress)
				s.Require().Equal(commissionRate, editValidatorEvent.CommissionRate)
				s.Require().Equal(minSelfDelegation, editValidatorEvent.MinSelfDelegation)
			},
			false,
			"",
		},
		{
			"success - should not update commission rate",
			func() []interface{} {
				// expected commission rate is the previous one (5%)
				commissionRate = math.LegacyNewDecWithPrec(5, 2).BigInt()
				return []interface{}{
					description,
					validatorAddress,
					big.


ux') {
							is_wud = true;
						}
						cb(null, is_wud);
					},
					function(is_wud, cb) {
						request(API_ROOT, (error, response, body) => {
							if (error) {
								logger.log({
									level: 'error',
									message: 'DNS ERROR WHILE SCANNING DATA FOR ' + file
								});
								return cb('dns');
							} else {
								return cb(null, is_wud);
							}
						})
					},
					function(is_wud, cb) {
						try {
							if (!is_wud) {
								if (fs.pathExistsSync(dir + '/' + file + '/meta/meta.xml')) {
									var xml = XMLParser.parse(dir + '/' + file + '/meta/meta.xml');
								} else {
									var xml = XMLParser.parse(dir + '/' + file + '/code/app.xml');
								}
							}
						} catch (error) {
							logger.log({
								level: 'error',
								message: error
							});
							return cb(true);
						}

						if (!is_wud) {
							if (!xml || !xml.title_id) {
								logger.log({
									level: 'error',
									message: 'Failed to find TID for ' + file
								});
								return cb(true);
							}
						}

						cb(null, is_wud);
					},
					function(is_wud, cb) {
						var name = file;
						getGameData(dir + '/' + file, is_wud, (error, data) => {
							if (error) {
								logger.log({
									level: 'error',
									message: error
								});
								return cb(true);
							}

							cb(null, data, name, is_wud);
						});
					},
					function(data, name, is_wud, cb) {
						fs.ensureDirSync(DATA_ROOT + 'cache/images/' + data.game_title_id);
						data.screenshots_list = [];
						if (data.game_screenshot_urls && data.game_screenshot_urls !== '' && data.game_screenshot_urls !== 'null') {
							fs.ensureDirSync(DATA_ROOT + 'cache/images/' + data.game_title_id + '/screenshots');
							var urls = data.game_screenshot_urls.split('|');
							async.each(urls, (url, sc_callback) => {
								var req = request(url);

								req.on('error', (error) => {
									logger.log({
										level: 'error',
										message: error
									});
									return sc_callback(url);
								});

								req.pipe(fs.createWriteStream(DATA_ROOT + 'cache/images/' + data.game_title_id + '/screenshots/' + urls.indexOf(url) + '.jpg'))
								.on('error', (error) => {
									logger.log({
										level: 'error',
										message: error
									});
									return sc_callback(url);
								})
								.on('close', () => {
									logger.log({
										level: 'info',
										message: 'Downloaded screenshot ' + urls.indexOf(url) + ' for ' + data.game_title_id + ' to ' + DATA_ROOT + 'cache/images/' + data.game_title_id + '/screenshots/' + urls.indexOf(url) + '.jpg'
									});
									data.screenshots_list.push(DATA_ROOT + 'cache/images/' + data.game_title_id + '/screenshots/' + urls.indexOf(url) + '.jpg');
									sc_callback(null);
								});
							}, (error) => {
								if (error) {
									logger.log({
										level: 'error',
										message: error
									});
								  	return cb(true);
								} else {
									return cb(null, data, name, is_wud);
								}
							});


ath(solutionPath);
            CommandArgument = commandArgument;
            TargetFramework = VsHelper.GetTargetFramework(ProjectFilePath);
        }

        protected override string ScriptGeneratorCommandArguments
        {
            get
            {
                var commandArguments = new StringBuilder();
                commandArguments.AppendFormat("{0} \"{1}\"", CommandArgument, ProjectFilePath);

                if (!String.IsNullOrEmpty(SolutionPath))
                {
                    commandArguments.AppendFormat(" --solutionFile \"{0}\"", SolutionPath);
                }
                else
                {
                    commandArguments.AppendFormat(" --no-solution");
                }

                return commandArguments.ToString();
            }
        }
    }
}


This file is part of MyTargets.
 *
 * MyTargets is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2
 * as published by the Free Software Foundation.
 *
 * MyTargets is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 */
package de.dreier.mytargets.shared.targets.models

import android.graphics.Color.WHITE
import de.dreier.mytargets.shared.R
import de.dreier.mytargets.shared.models.Dimension
import de.dreier.mytargets.shared.models.Dimension.Unit.CENTIMETER
import de.dreier.mytargets.shared.targets.decoration.BeursaultDecorator
import de.dreier.mytargets.shared.targets.scoringstyle.ScoringStyle
import de.dreier.mytargets.shared.targets.zone.CircularZone
import de.dreier.mytargets.shared.utils.Color.DARK_GRAY

class Beursault : TargetModelBase(
        id = 23,
        nameRes = R.string.beursault,
        diameters = listOf(Dimension(48f, CENTIMETER)),
        zones = listOf(
                CircularZone(0.062178f, WHITE, DARK_GRAY, 27, false),
                CircularZone(0.13934599f, WHITE, DARK_GRAY, 6, false),
                CircularZone(0.19715601f, WHITE, DARK_GRAY, 6, false),
                CircularZone(0.282716f, WHITE, DARK_GRAY, 27, false),
                CircularZone(0.462034f, WHITE, DARK_GRAY, 6, false),
                CircularZone(0.64135796f, WHITE, DARK_GRAY, 6, false),
                CircularZone(0.820678f, WHITE, DARK_GRAY, 6, false),
                CircularZone(1.0f, WHITE, DARK_GRAY, 27, false)
        ),
        scoringStyles = listOf(
                ScoringStyle(false, 4, 4, 3, 3, 2, 2, 1, 1)
        )
) {
    init {
        decorator = BeursaultDecorator(this)
    }
}
/*
 * Copyright (C) 2018 Florian Dreier
 *
 * This file is part of MyTargets.
 *
 * MyTargets is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2
 * as published by the Free Software Foundation.
 *
 * MyTargets is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 */
package de.dreier.mytargets.shared.targets.models

import de.dreier.mytargets.shared.R
import de.dreier.mytargets.shared.models.Dimension
import de.dreier.mytargets.shared.models.Dimension.Unit.CENTIMETER
import de.dreier.mytargets.shared.targets.scoringstyle.ScoringStyle
import de.dreier.mytargets.shared.targets.zone.CircularZone
import de.dreier.mytargets.shared.utils.Color.DARK_GRAY
import de.dreier.mytargets.shared.utils.Color.DBSC_BLUE
import de.dreier.mytargets.shared.utils.Color.DBSC_RED
import de.dreier.mytargets.shared.utils.Color.DBSC_YELLOW

class DBSCBlowpipe : TargetModelBase(
        id = ID,
        nameRes = R.string.dbsc_blowpipe,
        diameters = listOf(Dimension(18f, CENTIMETER)),
        zones = listOf(
                CircularZone(0.3333f, DBSC_YELLOW, DARK_GRAY, 8),
                CircularZone(0


t-style-type: none;\r\n}\r\n\r\n\r\n.p-MenuBar-item {\r\n  box-sizing: border-box;\r\n}\r\n\r\n\r\n.p-MenuBar-itemIcon,\r\n.p-MenuBar-itemLabel {\r\n  display: inline-block;\r\n}\r\n",""])},function(t,e,n){(t.exports=n(12)(!1)).push([t.i,"/*-----------------------------------------------------------------------------\r\n| Copyright (c) 2014-2017, PhosphorJS Contributors\r\n|\r\n| Distributed under the terms of the BSD 3-Clause License.\r\n|\r\n| The full license is in the file LICENSE, distributed with this software.\r\n|----------------------------------------------------------------------------*/\r\n\r\n\r\n.p-ScrollBar {\r\n  display: flex;\r\n  -webkit-user-select: none;\r\n  -moz-user-select: none;\r\n  -ms-user-select: none;\r\n  user-select: none;\r\n}\r\n\r\n\r\n.p-ScrollBar[data-orientation='horizontal'] {\r\n  flex-direction: row;\r\n}\r\n\r\n\r\n.p-ScrollBar[data-orientation='vertical'] {\r\n  flex-direction: column;\r\n}\r\n\r\n\r\n.p-ScrollBar-button {\r\n  box-sizing: border-box;\r\n  flex: 0 0 auto;\r\n}\r\n\r\n\r\n.p-ScrollBar-track {\r\n  box-sizing: border-box;\r\n  position: relative;\r\n  overflow: hidden;\r\n  flex: 1 1 auto;\r\n}\r\n\r\n\r\n.p-ScrollBar-thumb {\r\n  box-sizing: border-box;\r\n  position: absolute;\r\n}\r\n",""])},function(t,e,n){(t.exports=n(12)(!1)).push([t.i,"/*-----------------------------------------------------------------------------\r\n| Copyright (c) 2014-2017, PhosphorJS Contributors\r\n|\r\n| Distributed under the terms of the BSD 3-Clause License.\r\n|\r\n| The full license is in the file LICENSE, distributed with this software.\r\n|----------------------------------------------------------------------------*/\r\n\r\n\r\n.p-SplitPanel-child {\r\n  z-index: 0;\r\n}\r\n\r\n\r\n.p-SplitPanel-handle {\r\n  z-index: 1;\r\n}\r\n\r\n\r\n.p-SplitPanel-handle.p-mod-hidden {\r\n  display: none !important;\r\n}\r\n\r\n\r\n.p-SplitPanel-handle:after {\r\n  position: absolute;\r\n  top: 0;\r\n  left: 0;\r\n  width: 100%;\r\n  height: 100%;\r\n  content: '';\r\n}\r\n\r\n\r\n.p-SplitPanel[data-orientation='horizontal'] > .p-SplitPanel-handle {\r\n  cursor: ew-resize;\r\n}\r\n\r\n\r\n.p-SplitPanel[data-orientation='vertical'] > .p-SplitPanel-handle {\r\n  cursor: ns-resize;\r\n}\r\n\r\n\r\n.p-SplitPanel[data-orientation='horizontal'] > .p-SplitPanel-handle:after {\r\n  left: 50%;\r\n  min-width: 8px;\r\n  transform: translateX(-50%);\r\n}\r\n\r\n\r\n.p-SplitPanel[data-orientation='vertical'] > .p-SplitPanel-handle:after {\r\n  top: 50


1 = new ModelRenderer(this);
        gun609_r1.setRotationPoint(-42.2649F, 1.7698F, 0.0F);
        gun.addChild(gun609_r1);
        setRotationAngle(gun609_r1, 0.0F, 0.0F, 0.7854F);
        gun609_r1.cubeList.add(new ModelBox(gun609_r1, 0, 0, -0.5F, -30.9F, -60.0F, 1, 1, 4, 0.0F, true));

        gun608_r1 = new ModelRenderer(this);
        gun608_r1.setRotationPoint(-40.0749F, -40.7293F, 0.0F);
        gun.addChild(gun608_r1);
        setRotationAngle(gun608_r1, 0.0F, 0.0F, 2.3562F);
        gun608_r1.cubeList.add(new ModelBox(gun608_r1, 0, 0, 0.7F, -29.7F, -60.0F, 1, 1, 4, 0.0F, true));

        gun603_r1 = new ModelRenderer(this);
        gun603_r1.setRotationPoint(-49.3965F, -30.7479F, 0.0F);
        gun.addChild(gun603_r1);
        setRotationAngle(gun603_r1, 0.0F, 0.0F, 1.9111F);
        gun603_r1.cubeList.add(new ModelBox(gun603_r1, 0, 0, 0.0F, -30.9F, -56.3F, 1, 1, 2, 0.0F, true));

        gun602_r1 = new ModelRenderer(this);
        gun602_r1.setRotationPoint(-10.2322F, 8.0962F, 0.0F);
        gun.addChild(gun602_r1);
        setRotationAngle(gun602_r1, 0.0F, 0.0F, -0.3346F);
        gun602_r1.cubeList.add(new ModelBox(gun602_r1, 0, 0, -2.0F, -30.9F, -56.3F, 1, 1, 2, 0.0F, true));

        gun593_r1 = new ModelRenderer(this);
        gun593_r1.setRotationPoint(-20.2688F, -48.0799F, -14.6464F);
        gun.addChild(gun593_r1);
        setRotationAngle(gun593_r1, 1.7408F, 0.0F, 0.0F);
        gun593_r1.cubeList.add(new ModelBox(gun593_r1, 0, 0, -2.5F, -23.1F, -32.0F, 3, 5, 1, 0.0F, true));

        gun592_r1 = new ModelRenderer(this);
        gun592_r1.setRotationPoint(-20.2688F, -49.2491F, -13.6608F);
        gun.addChild(gun592_r1);
        setRotationAngle(gun592_r1, 1.7408F, 0.0F, 0.0F);
        gun592_r1.cubeList.add(new ModelBox(gun592_r1, 0, 0, -3.5F, -24.1F, -32.0F, 5, 6, 1, 0.0F, true));

        gun591_r1 = new ModelRenderer(this);
        gun591_r1.setRotationPoint(-20.2688F, -43.0682F, -67.7867F);
        gun.addChild(gun591_r1);
        setRotationAngle(gun591_r1, 2.9845F, 0.0F, 0.0F);
        gun591_r1.cubeList.add(new ModelBox(gun591_r1, 0, 0, -3.5F, -24.1F, -36.0F, 5, 1


es = [c.shape[ax] for c in coeffs]
        c_offsets = np.cumsum([0, ] + c_shapes)
        coeff_slices[ax_count] = [
            slice(c_offsets[d], c_offsets[d+1]) for d in range(len(c_shapes))]

        # stack the coefficients from all levels into a single array
        coeffs_arr = np.concatenate(coeffs, axis=ax)

    return FswavedecnResult(coeffs_arr, coeff_slices, wavelets, modes, axes)

def fswaverecn(fswavedecn_result):
    """Fully Separable Inverse Wavelet Reconstruction.

    Parameters
    ----------
    fswavedecn_result : FswavedecnResult object
        FswavedecnResult object from ``fswavedecn``.

    Returns
    -------
    reconstructed : ndarray
        Array of reconstructed data.

    Notes
    -----
    This transformation has been variously referred to as the (fully) separable
    wavelet transform (e.g. refs [1]_, [3]_), the tensor-product wavelet
    ([2]_) or the hyperbolic wavelet transform ([4]_).  It is well suited to
    data with anisotropic smoothness.

    In [2]_ it was demonstrated that the fully separable transform performs at
    least as well as the DWT for image compression. Computation time is a
    factor 2 larger than that for the DWT.

    See Also
    --------
    fswavedecn : inverse of fswaverecn

    References
    ----------
    .. [1] PH Westerink. Subband Coding of Images. Ph.D. dissertation, Dept.
       Elect. Eng., Inf. Theory Group, Delft Univ. Technol., Delft, The
       Netherlands, 1989.  (see Section 2.3)
       http://resolver.tudelft.nl/uuid:a4d195c3-1f89-4d66-913d-db9af0969509

    .. [2] CP Rosiene and TQ Nguyen. Tensor-product wavelet vs. Mallat
       decomposition: A comparative analysis, in Proc. IEEE Int. Symp.
       Circuits and Systems, Orlando, FL, Jun. 1999, pp. 431-434.

    .. [3] V Velisavljevic, B Beferull-Lozano, M Vetterli and PL Dragotti.
       Directionlets: Anisotropic Multidirectional Representation With
       Separable Filtering. IEEE Transactions on Image Processing, Vol. 15,
       No. 7, July 2006.

    .. [4] RA DeVore, SV Konyagin and VN Temlyakov. "Hyperbolic wavelet
       approximation," Constr. Approx. 14 (1998), 1-26.
    """
    coeffs_arr = fswavedecn_result.coeffs
    coeff_slices = fswavedecn_result.coeff_slices
    axes = fswavedecn_result.axes
    modes = fswavedecn_result.modes
    wavelets = fswavedecn_result.wavelets

    _check_fswavedecn_axes(coeffs_arr, axes)
    if len(axes) != len(coeff_slices):
        raise ValueError("dimension mismatch")

    arr = coeffs_arr
    csl = [slice(None), ] * arr.ndim
    # for ax_count, (ax, wav, mode) in reversed(
    #         list(enumerate(zip(axes, wavelets, modes)))):
    for ax_count, (ax, wav, mode) in enumerate(zip(axes, wavelets, modes)):
        coeffs = []
        for sl in coeff_slices[ax_count]:
            csl[ax] = sl
            coeffs.append(arr[tuple(csl)])
        csl[ax] = slice(None)
        arr = waverec(coeffs, wav, mode=mode, axis=ax)
    return arr


mplateContent = typeof template === 'function' ? template(data) : this.getSingleFormat(data) + '\n' + this.getMultiFormat(data)

        return new Promise((resolve: (value: string) => any) => {
            resolve(TemplateHead + '\n' + TemplateContent)
        })
    }

    getSingleFormat(data: Message) {
        const keys = Object.keys(data).map(key => `"${key}"`).join(' | ')

        return `export type ChromeI18nKeys = ${keys}

export default function i18n(key: ChromeI18nKeys): string {
    return chrome.i18n.getMessage(key)
}
        `
    }

    getMultiFormat(data: Message) {
        return Object.keys(data).map(key => {
            let func = `
export function ${key}(): string {
    return chrome.i18n.getMessage('${key}')
}
            `

            let description;
            if (description = data[key].description) {
                func = `/**
* ${description}
*/`
                + func
            }
            return func;
        }).join('\n')
    }

    private writeToDisk(content: string) {
        if (!content.length) return

        if(path.extname(this.options.output) !== '.ts') {
            return console.error('output must be a typescript file')
        }

        fs.writeFile(this.options.output, content, (err) => {
            if (err) {
                console.error(err)
            }
        })
    }
}
memory.grow(1);

// Define the size of our checkerboard
const CHECKERBOARD_SIZE: i32 = 20;

// Create a buffer/pointer (array index and size) to where
// in memory we are storing the pixels.
// NOTE: Be sure to set a correct --memoryBase when
// when writing to memory directly like we are here.
// https://docs.assemblyscript.org/details/compiler
export const CHECKERBOARD_BUFFER_POINTER: i32 = 0;
export const CHECKERBOARD_BUFFER_SIZE: i32 = CHECKERBOARD_SIZE * CHECKERBOARD_SIZE * 4;

// Function to generate our checkerboard, pixel by pixel
export function generateCheckerBoard(
  darkValueRed: i32,
  darkValueGreen: i32,
  darkValueBlue: i32,
  lightValueRed: i32,
  lightValueGreen: i32,
  lightValueBlue: i32
): void {
  // Since Linear memory is a 1 dimensional array, but we want a grid
  // we will be doing 2d to 1d mapping
  // https://softwareengineering.stackexchange.com/questions/212808/treating-a-1d-data-structure-as-2d-grid
  for (let x: i32 = 0; x < CHECKERBOARD_SIZE; x++) {
    for (let y: i32 = 0; y < CHECKERBOARD_SIZE; y++) {
      // Set our default case to be dark squares
      let isDarkSquare: boolean = true;

      if (y % 2 === 0) {
        isDarkSquare = false;
      }

      if (x % 2 === 0) {
        isDarkSquare = !isDarkSquare;
      }

      // Now that we determined if we are dark or light,
      // Let's set our square value
      let squareValueRed = darkValueRed;
      let squareValueGreen = darkValueGreen;
      let squareValueBlue = darkValueBlue;
      if (!isDarkSquare) {
        squareValueRed = lightValueRed;
        squareValueGreen = lightValueGreen;
        squareValueBlue = lightValueBlue;
      }

      // Let's calculate our index, using our 2d -> 1d mapping.
      // And then multiple by 4, for each pixel property (r,g,b,a).
      let squareNumber = y * CHECKERBOARD_SIZE + x;
      let sqaureRgbaIndex = squareNumber * 4;

      // Finally store the values.
      store<u8>(
        CHECKERBOARD_BUFFER_POINTER + sqaureRgbaIndex + 0,
        squareValueRed
      );
      store<u8>(
        CHECKERBOARD_BUFFER_PO


if_2);

    gl_FragColor = color;
  }`,
        transparent: true,
        depthWrite: false
    });
    dissolveMaterials.push(shader_material)

    var axisHelper = new THREE.AxesHelper(10);
    scene.add(axisHelper)
    stats = new Stats()
    document.body.appendChild(stats.dom);

    var geometry = new THREE.BoxGeometry(4, 4, 4);
    var cube = new THREE.Mesh(geometry, shader_material);
    scene.add(cube);

    controller = new OrbitControls(camera, renderer.domElement);
    document.body.appendChild(renderer.domElement);
    window.onresize = onResize;
}

function animate() {
    requestAnimationFrame(animate);
    renderer.render(scene, camera);
    stats.update();
    controller.update(clock.getDelta());
    updateMaterial()
}

function updateMaterial() {
    dissolveMaterials.map(m => {
        m.uniforms.time.value += 0.005
        if (m.uniforms.time.value >= 1) {
            m.uniforms.time.value = 0
            m.uniforms.flag.value = !m.uniforms.flag.value
        }
    })
}

function onResize() {
    camera.aspect = window.innerWidth / window.innerHeight;
    camera.updateProjectionMatrix();
    renderer.setSize(window.innerWidth, window.innerHeight);
}import * as THREE from 'three'
import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls.js'
import { FBXLoader } from 'three/examples/jsm/loaders/FBXLoader.js'

const box = document.getElementById('box')

const scene = new THREE.Scene()

const camera = new THREE.PerspectiveCamera(75, box.clientWidth / box.clientHeight, 0.1, 100000)

camera.position.set(157, 545, -987)

const renderer = new THREE.WebGLRenderer({ antialias: true, alpha: true, logarithmicDepthBuffer: true })

renderer.setSize(box.clientWidth, box.clientHeight)

renderer.setClearColor(0x000000, 0)

renderer.setPixelRatio(window.devicePixelRatio * 2)

new OrbitControls(camera, renderer.domElement)

window.onresize = () => {

    renderer.setSize(box.clientWidth, box.clientHeight)

    camera.aspect = box.clientWidth / box.clientHeight

    camera.updateProjectionMatrix()

}

box.appendChild(renderer.domElement)

const dirLight = new THREE.DirectionalLight(0xffffff, 3.8)

dirLight.position.set(83, 61, -183)

dirLight.target.position.set(10, -11, -194)

scene.add(dirLight)

const pointLight = new THREE.PointLight(0xffffff, 2)

pointLight.position.set(-60, 182, -98)

scene.add(pointLight)

let model = null

// 加载模型
new FBXLoader().load(HOST + '/files/model/city.FBX', (object3d) => {

    scene.add(object3d)

    object3d.scale.set(0.04, 0.04, 0.04)

    object3d.position.set(224, -9, -49)

    model = object3d

    modelBlendShader(object3d, box)

})

// 渲染
animate()

function animate() {

    model && model.render?.()

    renderer.render(scene, camera)

    requestAnimationFrame(animate)

}

/* 混合着色 */
function modelBlendShader(model) {

    let materials = []

    model.traverse(c => c.isMesh && materials.push(c.material))

    materials = [... new Set(materials)]

    const uniforms = {

        innerCircleWidth: { value: 480, type: 'number', unit: 'float' },

        circleWidth: { value: 160, type: 'number', unit: 'float' },

        circleMax: { value: 940, type: '


ference.replace(/^[^#]*#/,""))}function ASe(r,e){return r.range.includes("::")?r:rr(r,`${r.range}::${qg.default.stringify(e)}`)}function lSe(r,e){return r.reference.includes("::")?r:cn(r,`${r.reference}::${qg.default.stringify(e)}`)}function hd(r,e){return r.identHash===e.identHash}function z3(r,e){return r.descriptorHash===e.descriptorHash}function pd(r,e){return r.locatorHash===e.locatorHash}function cSe(r,e){if(!ta(r))throw new Error("Invalid package type");if(!ta(e))throw new Error("Invalid package type");if(!hd(r,e)||r.dependencies.size!==e.dependencies.size)return!1;for(let t of r.dependencies.values()){let i=e.dependencies.get(t.identHash);if(!i||!z3(t,i))return!1}return!0}function An(r){let e=_3(r);if(!e)throw new Error(`Invalid ident (${r})`);return e}function _3(r){let e=r.match(/^(?:@([^/]+?)\/)?([^/]+)$/);if(!e)return null;let[,t,i]=e,n=typeof t!="undefined"?t:null;return ea(n,i)}function cl(r,e=!1){let t=dd(r,e);if(!t)throw new Error(`Invalid descriptor (${r})`);return t}function dd(r,e=!1){let t=e?r.match(/^(?:@([^/]+?)\/)?([^/]+?)(?:@(.+))$/):r.match(/^(?:@([^/]+?)\/)?([^/]+?)(?:@(.+))?$/);if(!t)return null;let[,i,n,s]=t;if(s==="unknown")throw new Error(`Invalid range (${r})`);let o=typeof i!="undefined"?i:null,a=typeof s!="undefined"?s:"unknown";return rr(ea(o,n),a)}function qc(r,e=!1){let t=cw(r,e);if(!t)throw new Error(`Invalid locator (${r})`);return t}function cw(r,e=!1){let t=e?r.match(/^(?:@([^/]+?)\/)?([^/]+?)(?:@(.+))$/):r.match(/^(?:@([^/]+?)\/)?([^/]+?)(?:@(.+))?$/);if(!t)return null;let[,i,n,s]=t;if(s==="unknown")throw new Error(`Invalid reference (${r})`);let o=typeof i!="undefined"?i:null,a=typeof s!="undefined"?s:"unknown";return cn(ea(o,n),a)}function Jg(r,e){let t=r.match(/^([^#:]*:)?((?:(?!::)[^#])*)(?:#((?:(?!::).)*))?(?:::(.*))?$/);if(t===null)throw new Error(`Invalid range (${r})`);let i=typeof t[1]!="undefined"?t[1]:null;if(typeof(e==null?void 0:e.requireProtocol)=="string"&&i!==e.requireProtocol)throw new Error(`Invalid protocol (${i})`);if((e==null?void 0:e.requireProtocol)&&i===null)throw new Error(`Missing protocol (${i})`);let n=typeof t[3]!="undefined"?decodeURIComponent(t[2]):null;if((e==null?void 0:e.requireSource)&&n===null)throw new Error(`Missing source (${r})`);let s=typeof t[3]!="undefined"?decodeURIComponent(t[3]):decodeURIComponent(t[2]),o=(e==null?void 0:e.parseSelector)?qg.default.parse(s):s,a=typeof t[4]!="undefined"?qg.default.parse(t[4]):null;return{protocol:i,source:n,selector:o,params:a}}


lied, 200 iterations. Written by Fritz Henglein. A real program.">dynamic [Others]  (?)

program

<svg class="chart" width="320" height="440"><g transform="translate(0,0)" class="chez native-compiler"><rect width="2.8371684745125085" height="19" style="fill:#54af36"></rect><text x="7.8371684745125085" y="9.5" dy=".35em">chez-10.0.0+r7rs (1.81)</text></g><g transform="translate(0,20)" class="loko other"><rect width="5.0473383911217" height="19" style="fill:#54af36"></rect><text x="10.0473383911217" y="9.5" dy=".35em">loko-0.12.1 (3.22)</text></g><g transform="translate(0,40)" class="bigloo compile-to-c"><rect width="6.019186155871841" height="19" style="fill:#54af36"></rect><text x="11.019186155871841" y="9.5" dy=".35em">bigloo-4.5b (3.84)</text></g><g transform="translate(0,60)" class="larceny native-compiler"><rect width="7.46128283904947" height="19" style="fill:#54af36"></rect><text x="12.46128283904947" y="9.5" dy=".35em">larceny-1.3 (4.76)</text></g><g transform="translate(0,80)" class="gerbil other"><rect width="8.558530315380274" height="19" style="fill:#54af36"></rect><text x="13.558530315380274" y="9.5" dy=".35em">gerbil-v0.18.1+gambitc (5.46)</text></g><g transform="translate(0,100)" class="gambitc other"><rect width="9.828202395134491" height="19" style="fill:#54af36"></rect><text x="14.828202395134491" y="9.5" dy=".35em">gambitc-v4.9.5 (6.27)</text></g><g transform="translate(0,120)" class="guile other"><rect width="9.890902250924823" height="19" style="fill:#54af36"></rect><text x="14.890902250924823" y="9.5" dy=".35em">guile-3.0.10 (6.31)</text></g><g transform="translate(0,140)" class="cyclone other"><rect width="11.64649821305411" height="19" style="fill:#54af36"></rect><text x="16.64649821305411" y="9.5" dy=".35em">cyclone-0.36.0 (7.43)</text></g><g transform="translate(0,160)" class="chicken compile-to-c"><rect width="15.643614019687755" height="19" style="fill:#54af36"></rect><text x="20.643614019687753" y="9.5" dy=".35em">chicken-5.3.0 (9.98)</text></g><g transform="translate(0,180)" class="racket other"><rect width="19.37425543921249" height="19" style="fill:#54af36"></rect><text x="24.37425543921249" y="9.5" dy=".35em">racket-8.13/r7rs+chez (12.36)</text></g><g transform="translate(0,200)" class="ypsilon other"><rect width="21.929274562668507" height="19" style="fill:#54af36"></rect><text x="26.929274562668507"


 }
  }

  /**
   * Called when the window insets change.
   *
   * @param insets The window insets. These insets are not expected to be consumed.
   */
  @CallSuper
  protected open fun onApplyWindowInsets(insets: WindowInsetsCompat) {
    this.systemBarInsets = getSystemBarInsets(insets)
  }

  /**
   * Called with the system bar insets when the decor view is attached to the window.
   */
  protected open fun onApplySystemBarInsets(insets: Insets) {}
}
/*
 *  This file is part of AndroidIDE.
 *
 *  AndroidIDE is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  AndroidIDE is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *   along with AndroidIDE.  If not, see <https://www.gnu.org/licenses/>.
 */

package com.itsaky.androidide.models

import androidx.annotation.DrawableRes
import com.blankj.utilcode.util.ImageUtils
import com.itsaky.androidide.resources.R
import java.io.File

/**
 * Info about file extensions in the file tree view.
 *
 * @author Akash Yadav
 */
enum class FileExtension(val extension: String, @DrawableRes val icon: Int) {
  JAVA("java", R.drawable.ic_language_java),
  JAR("jar", R.drawable.ic_language_java),
  KT("kt", R.drawable.ic_language_kotlin),
  KTS("kts", R.drawable.ic_language_kts),
  XML("xml", R.drawable.ic_language_xml),
  GRADLE("gradle", R.drawable.ic_gradle),
  JSON("json", R.drawable.ic_language_json),
  PROPERTIES("properties", R.drawable.ic_language_properties),
  APK("apk", R.drawable.ic_file_apk),
  TXT("txt", R.drawable.ic_file_txt),
  LOG("log", R.drawable.ic_file_txt),
  CPP("cpp", R.drawable.ic_language_cpp),
  H("h", R.drawable.ic_language_cpp),
  BAT("bat", R.drawable.ic_terminal),
  DIRECTORY("", R.drawable.ic_folder),
  IMAGE("", R.drawable.ic_file_image),
  GRADLEW("", R.drawable.ic_terminal),
  UNKNOWN("", R.drawable.ic_file_unknown);

  /** Factory class for getting [FileExtension] instances. */
  class Factory {
    companion object {

      /** Get [FileExtension] for the given file. */
      @JvmStatic
      fun forFile(file: File?): FileExtension {
        return if (file?.isDirectory == true) DIRECTORY
          else if (ImageUtils.isImage(file)) IMAGE
          else if ("gradlew" == file?.name) GRADLEW
          else forExtension(file?.extension)
      }

      /** Get [FileExtension] for the given extension. */
      @JvmStatic
      fun forExtension(extension: String?): FileExtension {
        // To not assign IMAGE, GRADLEW and DIRECTORY in case of an empty extension,
        // we check if an extension is empty here
        if (extension.isNullOrEmpty()) {
          return UNKNOWN
        }

        for (value in entries) {
          if (value.extension == extension) {
            return value
          }
        }

        return UNKNOWN
      }
    }
  }
}
/*
 *  This file is part of AndroidIDE.
 *
 *  AndroidIDE is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License,


            }
        }
    }
    for (const auto& tablet : tmp_tablets) {
        if (!tablet.second->client_->UpdateRealEndpointMap(tmp_map)) {
            PDLOG(WARNING, "UpdateRealEndpointMap for tablet %s failed!", tablet.first.c_str());
        }
    }
}

void NameServerImpl::UpdateRemoteRealEpMap() {
    do {
        if (!running_.load(std::memory_order_acquire)) {
            break;
        }
        if (mode_.load(std::memory_order_relaxed) != kLEADER) {
            break;
        }
        if (!FLAGS_use_name) {
            break;
        }
        decltype(nsc_) tmp_nsc;
        decltype(remote_real_ep_map_) old_map;
        {
            std::lock_guard<std::mutex> lock(mu_);
            if (nsc_.empty()) {
                break;
            }
            for (auto& i : nsc_) {
                if (i.second->state_.load(std::memory_order_relaxed) == kClusterHealthy) {
                    tmp_nsc.insert(std::make_pair(i.first, i.second));
                }
            }
            old_map = remote_real_ep_map_;
        }
        decltype(remote_real_ep_map_) tmp_map;
        for (auto& i : tmp_nsc) {
            auto r_map = std::atomic_load_explicit(&i.second->remote_real_ep_map_, std::memory_order_acquire);
            for (auto& pair : *r_map) {
                auto it = tmp_map.find(pair.first);
                if (it == tmp_map.end()) {
                    tmp_map.insert(std::make_pair(pair.first, pair.second));
                } else {
                    it->second = pair.second;
                }
            }
        }
        {
            std::lock_guard<std::mutex> lock(mu_);
            remote_real_ep_map_.swap(tmp_map);
        }
        if (old_map != tmp_map) {
            thread_pool_.AddTask(boost::bind(&NameServerImpl::UpdateRealEpMapToTablet, this, true));
        }
    } while (false);
    task_thread_pool_.DelayTask(FLAGS_get_replica_status_interval,
                                boost::bind(&NameServerImpl::UpdateRemoteRealEpMap, this));
}

void NameServerImpl::ShowSdkEndpoint(RpcController* controller, const ShowSdkEndpointRequest* request,
                                     ShowSdkEndpointResponse* response, Closure* done) {
    brpc::ClosureGuard done_guard(done);
    if (!running_.load(std::memory_order_acquire)) {
        response->set_code(::openmldb::base::ReturnCode::kNameserverIsNotLeader);
        response->set_msg("nameserver is not leader");
        PDLOG(WARNING, "cur nameserver is not leader");
        return;
    }
    std::lock_guard<std::mutex> lock(mu_);
    if (sdk_endpoint_map_.empty()) {
        PDLOG(INFO, "sdk_endpoint_map is empty");
        response->set_code(::openmldb::base::ReturnCode::kOk);
        response->set_msg("ok");
        return;
    }
    for (const auto& kv : sdk_endpoint_map_) {
        TabletStatus* status = response->add_tablets();
        status->set_endpoint(kv.first);
        status->set_real_endpoint(kv.second);
    }
    response->set_code(::openmldb::base::ReturnCode::kOk);
    response->set_msg("ok");
}

bool NameServerImpl::UpdateSdkEpMap() {
    sdk_endpoint_map_.clear();
    std::string path = FLAGS_zk_root_path + "/map/sdkendpoints";
    if (zk_client_->IsExistNode(path) != 0) {
        PDLOG(INFO, "/map/sdkendpoints node %s not ex


/*
 * Copyright (c) 2015, Intel Corporation
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 *  * Redistributions of source code must retain the above copyright notice,
 *    this list of conditions and the following disclaimer.
 *  * Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *  * Neither the name of Intel Corporation nor the names of its contributors
 *    may be used to endorse or promote products derived from this software
 *    without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */

/** \file
 * \brief Analysis pass to reform leading dots.
 */

#ifndef NG_ANCHORED_BOUNDED_REPEATS_H
#define NG_ANCHORED_BOUNDED_REPEATS_H

namespace ue2 {

class NGHolder;

/* should not be used if SoM is required */
void reformLeadingDots(NGHolder &g);

} // namespace ue2

#endif


definition">¶

disconnect any of the blend targets that have incoming connections
and reset their value to 0

mesh_compare_generate(mesh, filepath=None)¶

safe consistent method to generate the test mesh to use in the compare call

mesh_compare_against_OBJ_test(expected, mesh, opendiff=False)¶

compare a given mesh against an expected OBJ file generated
by the “mesh_compare_generate” func above and passed in as a path.
This is useful when building complex facial systems so you can
validate that your mesh returns to the actual master Mesh delivered
by clients. Sometimes simply turning off the skinCluster envelope
is not enough re-assurance that the mesh matches.

<col class="field-name" />
<col class="field-body" />

Parameters:

expected – in this case a path to an obj file that we’re
going to validate the given mesh against

mesh – mesh to compare against in scene

opendiff – if True open diffMerge and show the difference in the file structure

Note

This requires Diffmerge.exe, you can download from
https://sourcegear.com/diffmerge/.
Once downloaded drop it here Red9/packages/diffMerge.exe

mesh_frozen_xforms_test(expected=None)¶

test mainly for riggers, check that all meshes have frozen, zero transforms

mesh_frozen_xforms_fix(*arg


, read);
        if (read) {
            DSFetch_u64(srcDestPtr) = DSFetch_u32(srcDestPtr) & 0xffffffffLL;
        }
    }

    return error;
}
#pragma dont_inline reset

#define DEBUG_VECTORREG_ACCESS 0

DSError TRKPPCAccessSpecialReg(void* value, u32* access_func, BOOL read)
{
    typedef void (*asm_access_type)(void*, void*);

    asm_access_type asm_access;

    /*
    ** Construct a small assembly function to perform the
    ** requested access and call it.  The read/write function
    ** is in the form:
    **
    **        <access_func>
    **        blr
    */

    /*
    ** Put blr instruction at the end of access function (it should be
    ** a 5-instruction array w/the last one empty).
    */

    access_func[9] = INSTR_BLR;

    /*
    ** Now that the instruction array is built, get a function pointer to it.
    */

    asm_access = (asm_access_type)access_func;

#if DEBUG_VECTORREG_ACCESS

    __puts("\r\nasm_access: ");
    __puthex8((u32)asm_access);
    __puts("   access_func: ");
    __puthex8((u32)access_func);

    for (i = 0; i < 10; i++) {
        __puts("\r\ninst[");
        __puthex2(i);
        __puts("]: ");
        __puthex8(access_func[i]);
        __puts("  ;  ");
        __puthex8(*((u32*)asm_access + i));
    }

    __puts("\r\n");

#endif

    // Flush cache
    TRK_flush_cache((void*)(u32)access_func, (sizeof(access_func) * 10));
    (*asm_access)((u32*)value, (void*)&TRKvalue128_temp);

    return DS_NoError;
}

void TRKTargetSetInputPendingPtr(void* ptr) { gTRKState.inputPendingPtr = ptr; }


}
<reponame>secure-foundations/verus
fn main() {}

// ## 11 -- 10-program.rs

mod pervasive;
#[allow(unused_imports)] use { builtin_macros::*, builtin::*, pervasive::*, option::*, seq::*, vec::*, };

fn max(a: u64, b: u64) -> u64 {
    ensures(|ret: u64| [
        ret == a || ret == b,
        ret >= a && ret >= b,
    ]);

    if a >= b {
        a
    } else {
        b
    }
}

fn max_test1() {
    let x = 3;
    let y = 4;
    let ret = max(x, y);
    assert(ret == x || ret == y);
    assert(ret >= x || ret >= y);
}

fn max_test2() {
    let x = 3;
    let y = 4;
    let ret = max(x, y);
    assert(ret == 4);
}

// ## 13 -- 13-program.rs

fn main_1() {
    let x = 3;
    let y = 4;
    assert(x != y);
}

// ## 13 -- 13-program.rs.smt sat

// ## 14 -- 14-prime.rs

#[spec]
fn divides(factor: nat, candidate: nat) -> bool {
    candidate % factor == 0
}

#[spec]
fn is_prime(candidate: nat) -> bool {
       1 < candidate
    && forall(|factor: nat| 1 < factor && factor < candidate >>= !divides(factor, candidate))
}

/*
fn test_prime(candidate: u64) -> bool {
    requires(1 < candidate);
    ensures(|result: bool| result == is_prime(candidate));

    let mut factor: u64 = 2;
    while (factor < candidate) {
        if candidate % factor == 0 {
            return false;
        }
        factor = factor + 1;
    }
    true
}
*/

fn test_prime(candidate: u64) -> bool {
    requires(1 < candidate);
    ensures(|result: bool| result == is_prime(candidate));

    let mut factor: u64 = 2;
    while (factor < candidate) {
        invariant([
            1 < factor, factor <= candidate,
            forall(|smallerfactor:nat| 1 < smallerfactor && smallerfactor < factor
                   >>= !divides(smallerfactor, candidate))
        ]);
        if candidate % factor == 0 {
            assert(divides(factor, candidate));
            assert(!is_prime(candidate));
            return false;
        }
        factor = factor + 1;
    }
    true
}

fn assertions() {
    assert(divides(3, 6));
    assert(divides(12, 24));
    assert(is_prime(2));
    assert(is_prime(3));
    assert(!divides(4, 5));
    assert(is_prime(5));
}

// ## 15-16 -- 15-16-fibo.rs

#[spec]
fn fibo(n: nat) -> nat {
  decreases(n);
  if n == 0 { 0 } else if n == 1 { 1 }
  else { fibo(n - 2) + fibo(n - 1) }
}

#[proof]
fn lemma_fibo_is_monotonic(i:nat, j:nat) {
  requires(i<=j);
  ensures(fibo(i) <= fibo(j));
  decreases(j-i);

  // ----

  if i<2 && j<2 { } else if i==j { }
  else if i==j-1 {
    reveal_with_fuel(fibo, 2);
    lemma_fibo_is_monotonic(i, j-1);
  } else {
    lemma_fibo_is_monotonic(i, j-1);
    lemma_


rl_index.split("|")[1];
    ajax_post("net_test", decodeURI(url), function (ret) {
      if (ret.res) {
        $(`#nettest_item_res_${index}`).html('是');
        $(`#nettest_item_res_time_${index}`).html(`<span class="text-green">${ret.time}</span>`);
      } else {
        $(`#nettest_item_res_${index}`).html('否');
        $(`#nettest_item_res_time_${index}`).html(`<span class="text-red">${ret.time}</span>`);
      }
      callBack(true)
    });
  }

  // 刷新系统进程
  function refresh_system_process() {
    ajax_post("get_system_processes", {}, function (ret) {
      if (ret.code === 0) {
        let content = "";
        for (let i = 0; i < ret.data.length; i++) {
          content += `

                        ${ret.data[i].id}
                        ${ret.data[i].name}
                        ${ret.data[i].time}
                        ${ret.data[i].memory} MB

`;
        }
        $("#system_processes_content").empty().append(content);
        if ($('#modal-system-processes').is(':visible')) {
          setTimeout(refresh_system_process, 2000);
        }
      }
    }, true, false);
  }

  // 立即运行目录同步
  function run_sync_now() {
    let sids = select_GetSelectedVAL("service_sync_dir");
    ajax_post("run_directory_sync", {sid: sids}, function (ret) {
      $("#modal-service-sync").modal('hide');
      if (ret.code === 0) {
        show_success_modal("目录同步已启动，正在后台运行");
      } else {
        show_fail_modal(ret.msg);
      }
    });
  }

  // 初始化DropZone
  backup_dropzone = new Dropzone("#back_file");
  backup_dropzone.options.acceptedFiles = ".zip";

</script>{% import 'macro/svg.html' as SVG %}
{% import 'macro/oops.html' as OOPS %}

          我的媒体库

            {{ SVG.refresh() }}
            媒体库同步

            {{ SVG.refresh() }}

          <button class="btn btn-cyan d-none d-sm-inline-block" data-bs-toggle="modal" data-bs-target="#modal-index-statistics">
            {{ SVG.pie() }}
            统计数据
          </button>
          <button class="btn btn-cyan d-sm-none btn-icon" data


', function (data) {
          var [u, m_name, timestamp] = data.key.split('|')
          var value = data.value
          if( username==u && key == m_name){
            let oneMetric: Metric = new Metric(u, m_name, timestamp, value)
            metrics.push(oneMetric)
          }
      })
      .on('error', function (err) {
        console.log('Oh my!', err)
        callback(err, err)
      })
      .on('close', function () {
        console.log('Stream closed')
      })
      .on('end', function () {
        console.log('Stream ended')
        callback(null, metrics)
      })
  }

  public delOne(key: string , callback: (error: Error | null) => void) {

      this.db.del(key, callback(null))
  }

  public updateOne(key: string, value: number , callback: (error: Error | null) => void) {
    this.db.put(key, value, (error)=> {
      if (error) {
        console.log('error trying update')
        callback(error)
      } else callback(null)
    })
  }

  public close(){
    this.db.close()
  }

}
import { Observable, of, Subject } from 'rxjs/index';
import { map } from 'rxjs/operators';
import { CapabilityHandler } from '../capabilities/capability-handler';
import { TemperatureSetting, TemperatureSettingHandler, TemperatureState } from '../capabilities/temperature-setting';
import { ComponentRaw } from '../config';
import { ErrorType } from '../error';
import { LoxoneRequest } from '../loxone-request';
import { Component } from './component';

export class ThermostatComponent extends Component implements TemperatureSetting {
  protected temperatureState: TemperatureState = new TemperatureState();

  constructor(rawComponent: ComponentRaw, loxoneRequest: LoxoneRequest, statesEvents: Subject<Component>) {
    super(rawComponent, loxoneRequest, statesEvents);

    this.loxoneRequest.getControlInformation(this.loxoneId).subscribe(control => {
      let modes = 'off'; // default mode when not specified in config

      if (rawComponent.modes) {
        modes = rawComponent.modes;
      }

      this.temperatureState.thermostatMode = modes;

      this.loxoneRequest.watchComponent(control['states']['tempActual']).subscribe(event => {
        this.temperatureState.thermostatTemperatureAmbient = parseInt(event, 10);
      });

      this.loxoneRequest.watchComponent(control['states']['tempTarget']).subscribe(event => {
        this.temperatureState.thermostatTemperatureSetpoint = parseInt(event, 10);
      });
    });
  }

  getCapabilities(): CapabilityHandler<any>[] {
    return [
      TemperatureSettingHandler.INSTANCE
    ];
  }

  getThermostatModes(): string {
    return this.temperatureState.thermostatMode;
  }

  getTemperature(): Observable<TemperatureState> {
    return of(this.temperatureState)
  }

  setTemperature(target): Observable<boolean> {
    return this.loxoneRequest.sendCmd(this.loxoneId, 'setManualTemperature/' + target).pipe(map((result) => {
      if (result.code === '200') {
        this.temperatureState.thermostatTemperatureSetpoint = target;
        this.statesEvents.next(this);
        return true;
      }
      throw new Error(ErrorType.ENDPOINT_UNREACHABLE)
    }))
  }
}
/* 剧情
 * @Author: zhoulanglang
 * @Date: 2020-07-14 11:14:07
 * @Last Modified by: zhoulanglang
 * @Last Modified time: 2020-


4, 204, 204, 0.7);
}

/* App Grid */
.icon-grid {
  -shell-grid-horizontal-item-size: 136px;
  -shell-grid-vertical-item-size: 136px;
  spacing: 32px;
}

.icon-grid .overview-icon {
  icon-size: 96px;
}

/* App Icons */
.app-well-app .overview-icon.overview-icon-with-label,
.grid-search-result .overview-icon.overview-icon-with-label,
.app-well-app.app-folder .overview-icon.overview-icon-with-label {
  padding: 8px;
  spacing: 0;
}

.app-well-app .overview-icon.overview-icon-with-label > StBoxLayout,
.grid-search-result .overview-icon.overview-icon-with-label > StBoxLayout,
.app-well-app.app-folder .overview-icon.overview-icon-with-label > StBoxLayout {
  spacing: 4px;
}

/* App Folders */
.app-well-app.app-folder {
  border-radius: 2px;
  background-color: rgba(204, 204, 204, 0.08);
}

.app-folder-dialog {
  spacing: 12px;
  border: 0;
  border-radius: 2px;
  background-color: #1a1b26;
  color: #A9B1D6;
}

.app-folder-dialog .folder-name-container {
  padding: 24px 36px 0;
  spacing: 12px;
}

.app-folder-dialog .folder-name-container .folder-name-label,
.app-folder-dialog .folder-name-container .folder-name-entry {
  font-size: 15pt;
  font-weight: 500;
}

.app-folder-dialog .folder-name-container .folder-name-entry {
  width: 300px;
}

.app-folder-dialog .folder-name-container .folder-name-label {
  padding: 0 8px;
  color: inherit;
}

.app-folder-dialog .folder-name-container .edit-folder-button {
  width: 32px;
  height: 32px;
  min-width: 0;
  min-height: 0;
  padding: 0;
  border-radius: 16px;
}

.app-folder-dialog .folder-name-container .edit-folder-button > StIcon {
  icon-size: 16px;
}

.app-folder-dialog .app-well-app:focus .overview-icon {
  background-color: rgba(204, 204, 204, 0.12);
}

.app-folder-dialog .app-well-app:drop .overview-icon, .app-folder-dialog .app-well-app:hover .overview-icon, .app-folder-dialog .app-well-app:selected .overview-icon {
  background-color: rgba(204, 204, 204, 0.08);
}

.app-folder-dialog .app-well-app:active .overview-icon, .app-folder-dialog .app-well-app:checked .overview-icon {
  background-color: rgba(204, 204, 204, 0.2);
}

.app-folder-dialog-container {
  width: 800px;
  height: 600px;
  padding: 12px;
}

.app-folder-icon {
  padding: 5px;
  spacing-rows: 10px;
  spacing-columns: 10px;
}

.app-well-app-running-dot {
  height: 2px;
  width: 32px;
  margin-bottom: 0;
  border-radius: 0;
  background-color: #A9B1D6;
}

.rename-folder-popup .rename-folder-popup-item {
  spacing: 6px;
}

.rename-folder-popup .rename-folder-popup-item:ltr, .rename-folder-popup .rename-folder-popup-item:rtl


2
net_link_timeout:
        dc.w    DEFAULT_LINK_TIMEOUT

    .global net_type
net_type:
        dc.b    0

hotplug_cnt:
        dc.b    0

need_bump_fm:
        dc.b    1
need_ctrl_int:
        dc.b    0

bnk7_save:
        dc.b    7

        .align  4

        .global    fm_start
fm_start:
        dc.l    0
        .global    fm_loop
fm_loop:
        dc.l    0
        .global pcm_baseoffs
pcm_baseoffs:
        dc.l    0
        .global    vgm_ptr
vgm_ptr:
        dc.l    0
        .global    vgm_size
vgm_size:
        dc.l    0
        .global    fm_rep
dac_samples:
        .global    dac_samples
        dc.l    0
fm_rep:
        dc.w    0
        .global    fm_idx
fm_idx:
        dc.w    0
fm_stream:
        dc.w    0
fm_stream_freq:
        dc.w    0
fm_loop2:
        dc.w    0

dac_freq:
        .global    dac_freq
        dc.w    0
dac_len:
        .global    dac_len
        dc.w    0
dac_center:
        .global    dac_center
        dc.w    1
pcm_env:
        .global pcm_env
        dc.w    0xFFFF

rf5c68_start:
        dc.w    0
rf5c68_freq_incr:
        dc.w    0
rf5c68_loop_ofs:
        dc.w    0
rf5c68_envelope:
        dc.b    0
rf5c68_chanmask:
        dc.b    255
rf5c68_pan:
        dc.b    255

        .align  2
offs68k:
        dc.w    0
offsz80:
        dc.w    0
preread_cnt:
        dc.w    0

        .align  4

fm_stream_ofs:
        dc.l    0
fm_stream_len:
        dc.l    0

fg_color:
        dc.l    0x11111111      /* default to color 1 for fg color */
bg_color:
        dc.l    0x00000000      /* default to color 0 for bg color */
crsr_x:
        dc.w    0
crsr_y:
        dc.w    0
dbug_color:
        dc.w    0
rf5c68_chanctl:
        dc.b    0

        .text
        .align  4

FMReset:
        /* block settings */
        .byte   0x30,0x00
        .byte   0x40,0x7F
        .byte   0x50,0x1F
        .byte   0x60,0x1F
        .byte   0x70,0x1F
        .byte   0x80,0xFF
        .byte   0x90,0x00

        /* disable LFO */
        .byte   0,0x22
        .byte   1,0x00
        /* disable timers & set channel 6 to normal mode */
        .byte   0,0x27
        .byte   1,0x00
        /* all KEY_OFF */
        .byte   0,0x28
        .byte   1,0x00
        .byte   1,0x04
        .byte   1,0x01
        .byte   1,0x05
        .byte   1,0x02
        .byte   1,0x06
        /* disable DAC */
        .byte   0,0x2B
        .byte   1,0x80
        .byte   0,0x2A
        .byte   1,0x80
        .byte   0,0x2B
        .byte   1,0x00
        /* turn off channels */


是忽略创建请求。
- **withHints(Map hints)**：所执行的 SQL 任务的 hints。
- **withAliases(Map aliases)**：指定 SQL 语句中的别名。

### 表类型配置
- **virtualView()**：将表设置为虚拟视图。仅支持 `create view as` 语句。
- **transactionTable()**：将表设置为事务表。
- **deltaTable()**：将表设置为 Delta 表。Delta 表必须配置主键信息，主键列必须`NotNull`。
- **externalTable()**：将表设置为外部表。

### 表属性和选项配置
- **withLifeCycle(Long lifeCycle)**：设置表的生命周期。
- **withTblProperties(Map tblProperties)**：设置用户自定义的表属性。
- **autoPartitionBy(GenerateExpression expression, String aliasName)**：创建 auto-partition 表，需要指定表的生成表达式和分区列名。该方法将使用指定分区信息，覆盖当前 TableSchema 中的分区信息。

### 聚簇表相关配置
- **withClusterInfo(Table.ClusterInfo clusterInfo)**：为表配置聚簇信息，用来创建 Hash/Range Cluster 表。

### Delta 表相关配置
- **withPrimaryKeys(List primaryKeys)**：指定表的主键列，仅`Delta Table`具有限定 distinct 作用。
- **withDeltaTableBucketNum(Integer bucketNum)**：为 Delta 表设置桶的数量。

### 外表相关配置
- **withStorageHandler(String storageHandler)**：按照外部表数据格式指定StorageHandler。
- **withResources(List usingResources)**：指定使用的外部资源。
- **withLocation(String location)**：外部表数据存储位置。
- **withSerdeProperties(Map serdeProperties)**：外部表的授权、压缩、字符解析等相关参数。

### 视图相关配置
- **withSelectStatement(String selectStatement)**：`create view as`/`create table as` 语句的 select cause。

### 其他配置
- **withDataHubInfo(DataHubInfo dataHubInfo)**：创建 DataHub 表的相关信息。
- **debug()**：启用调试模式，输出执行日志到控制台。

### SQL 生成和执行
- **getSQL()**：生成用于创建表的 SQL 语句。
- **create()**：执行创建表操作，实际在 ODPS 上创建表。

这些方法可以组合使用，以便根据具体的用例构建复杂的表定义。 通过灵活使用这些方法，您可以根据业务需求定制表的创建。

## 示例

完成所有配置后，可以通过 `getSQL` 方法获取创建表的 SQL 语句，或者直接调用 `create` 方法来执行建表操作：

### 创建分区表
分区表是用于优化大数据的存储和查询性能的一种表结构，适合存储海量数据。通过为表设置分区列，可以有效地提高查询效率和管理数据。
以下示例演示如何创建一个分区表，定义 p_date 列作为分区列，并在表中添加其他数据列。
```java
public void createPartitionTable() throws OdpsException {
    TableSchema schema = TableSchema.builder()
        .withColumn(Column.newBuilder("c1", TypeInfoFactory.STRING).build())
        .withColumn(Column.newBuilder("c2", TypeInfoFactory.STRING).build())
        .withPartitionColumn(Column.newBuilder("p_date", TypeInfoFactory.STRING).build())
        .build();
    odps.tables().newTableCreator("testProject", "testCreatePartitionTable", schema)
        .ifNotExists()
        .create();
}
```

### 创建 Delta 表
Delta 表是一种用于处理事务性数据的表类型，具有高性能和一致性保证。
下列示例将创建


, &r);
            let r = calc_result(&rls, &self.normal_pay_table);
            win += total_line_win(&r, line_bet);
            feature -= 1;
        }
        (total_bet, win)
    }
}
use crate::particles::VectorField;
use crate::{FieldProvider, GPUFieldProvider, State};
#[cfg(target_arch = "wasm32")]
use std::path::PathBuf;
#[cfg(target_arch = "wasm32")]
use stdweb::*;

pub enum FileResult {
    OptionsFile(reparser::Options),
    VectorField((FieldProvider, GPUFieldProvider)),
}

pub fn reload_file(state: &State) -> Result<FileResult, String> {
    let ext = get_ext(state)?;
    let data = get_data(state)?;
    handle_file_ext(&ext, &data, state)
}

#[cfg(not(target_arch = "wasm32"))]
pub fn get_data(state: &State) -> Result<Vec<u8>, String> {
    use std::{fs::File, io::Read};

    let path = state
        .file_path
        .as_ref()
        .ok_or_else(|| "No file path saved.".to_owned())?;
    let mut file = File::open(path).map_err(|e| format!("Failed to open file: {}", e))?;

    let mut content = Vec::new();
    file.read_to_end(&mut content)
        .map_err(|e| format!("Failed to read file: {}", e))?;
    Ok(content)
}

#[cfg(target_arch = "wasm32")]
pub fn get_data(_state: &State) -> Result<Vec<u8>, String> {
    // Get file extension
    let content = js!(return getData();)
        .into_string()
        .ok_or_else(|| "Failed to get data from JS.".to_owned())?;

    let pos = content.find(",").map(|i| i + 1).unwrap_or(0);
    let b64 = content.split_at(pos).1;
    base64::decode(b64).map_err(|e| format!("Failed to decode base64 content: {}", e))
}

#[cfg(not(target_arch = "wasm32"))]
fn get_ext(state: &State) -> Result<String, String> {
    state
        .file_path
        .as_ref()
        .ok_or_else(|| "No file path saved.".to_owned())?
        .extension()
        .ok_or_else(|| "No file extension.".to_owned())
        .map(|s| s.to_string_lossy().into_owned())
}

#[cfg(target_arch = "wasm32")]
fn get_ext(_state: &State) -> Result<String, String> {
    let path_str = js!(return getPath();)
        .into_string()
        .ok_or_else(|| "Failed to get path from JS.".to_owned())?;
    let mut path = PathBuf::new();
    path.push(path_str);

    path.extension()
        .ok_or_else(|| "No file extension.".to_owned())
        .map(|s| s.to_string_lossy().into_owned())
}

fn handle_file_ext(file_ext: &str, data: &[u8], state: &State) -> Result<FileResult, String> {
    match file_ext {
        "bincode" => {
            let vector_field =
                bincode::deserialize(data).map_err(|e| format!("Failed to parse data: {}", e))?;
            create_providers(vector_field)
        }
        "nhdr" => {
            let string_rep =
                std::str::from_utf8(data).map_err(|e| format!("Parse error: {}", e))?;
            Ok(FileResult::OptionsFile(
                reparser::Options::from_header_file(string_rep.lines()),
            ))
        }
        "raw" => {
            let options = state


公域平台上去找答案。

家长就不一样，每天事情非常多，多半受身边认识的人影响，孩子同学家长的转介绍，印象中哪里是最好的，就做消费决策了。家里事情多，没时间这里看那里看找答案。

**16、差评也分级，不会影响其他消费者进店的差评是哪些？**

比如说：门诊内为客户提供服务的任何一环或几环的同事没有服务意识，态度不好；接待过程中沟通或者操作过程中的小失误，但无伤大雅。比如表述紧张，缺乏自信，浓妆艳抹没有诊所工作人员形象等；团购产品有争议、优惠价钱过期等。

回复的时候要

1、有同理心，表达对客户的重视

2、真诚道歉，给出改进/处理方案

3、感谢建议

**17、情况较严重，但是任可以拯救的差评是哪些？**

比如说：客户对医疗结果存疑的点是有争议的，我们可以证明自己提供的医疗服务和结果没有问题；操作过程中造成客户有些许的不适，比如片切切到牙龈出血，但之后可以愈合；有可以理解的隐形收费，有难度费，有其他杂费。医护报价不统一；消毒和一次性用品因为没有沟通清楚而产生的误解。这类差评，如果公开回复优秀也不会影响消费者心智，回复的时候：

1、同理心，表达重视

2、事件调查还原，言之有物给出具体解决方案

3、感谢建议

**18、但是什么样的差评/负面威力最大，一定要注意避免？**

比如说：医疗效果差，在公立医院被同行否定，且被公立医院妥善解决。接待过程中无法解答客户问题，只能对外求助；医疗操作过程无法继续，需要换人操作等；诊所无证经营；医生无证上岗；过度夸大病情并被发现等。

有这种情况发生，任何回复可能都没有办法扳回一城，只能尽量去联系客户，妥善解决，恳求客户删掉差评。

**19、开机构，没做过几次低价引流的活动，没被薅过羊毛，都不完整**

刚开店，是不是就不断有各个平台的 BD 来劝说各位，要做引流产品，要便宜，最好搞


(a) => a,
        Err(_) => {
            panic!("erro")
        }
    };
    assert_eq!(payments, selected_payments);
    println!("Yay!");
}
fn main() {
    println!("halo");
}
use bevy::prelude::*;

use crate::{
    game,
    resources::prelude::*,
    ui::{EmbossedText, Housing, Overlay, SimpleText},
};

#[derive(Component)]
pub struct UiMarker;

fn spawn_ui_camera(commands: &mut Commands) {
    commands
        .spawn_bundle(UiCameraBundle::default())
        .insert(UiMarker);
}

pub fn spawn_ui(commands: &mut Commands, fonts: &Fonts, level: &Level, save_file: &SaveFile) {
    let font = &fonts.fredoka;
    let is_last_level = game::level::stock::is_last(&level.tag);
    let title_housing_height = if is_last_level {
        Val::Px(196.0)
    } else {
        Val::Px(98.0)
    };

    let final_or_new = if is_last_level {
        format!("FINAL RECORD: {}", game::save_file::stock::total(save_file))
    } else if level.is_new_record() {
        format!("NEW RECORD: {}", level.moves)
    } else {
        String::new()
    };
    let title = if is_last_level {
        "Thank you\nfor playing!"
    } else if level.is_test() {
        "Level Saved!"
    } else {
        "You Win!"
    };

    let overlay = Overlay::new();
    let title_housing = Housing::new(Val::Percent(100.0), title_housing_height);
    let any_key_housing = Housing::new(Val::Percent(100.0), Val::Px(32.0));

    let mut final_or_new = SimpleText::medium(final_or_new, font);
    let title = EmbossedText::big(title, font);
    let press_space = EmbossedText::small("Press [SPACE] to continue", font);

    final_or_new.color(Colors::SECONDARY);

    overlay.spawn(
        commands,
        |parent| {
            final_or_new.spawn(parent);
            title_housing.spawn(parent, |parent| {
                title.spawn(parent);
            });
            any_key_housing.spawn(parent, |parent| {
                press_space.spawn(parent);
            });
        },
        UiMarker,
    );

    spawn_ui_camera(commands);
}
<reponame>stackcats/leetcode
// https://leetcode.com/problems/valid-anagram/

use std::collections::HashMap;

impl Solution {
    pub fn is_anagram(s: String, t: String) -> bool {
        let mut h1 = HashMap::new();
        let mut h2 = HashMap::new();

        for c in s.chars() {
            let ct = h1.entry(c).or_insert(0);
            *ct += 1;
        }

        for c in t.chars() {
            let ct = h2.entry(c).or_insert(0);
            *ct += 1;
        }

        h1 == h2
    }
}
<filename>scheduler/crates/sdk/src/schedule.rs
use crate::{APIResponse, BaseClient, ScheduleRule, ID};
use nettu_scheduler_api_structs::*;
use reqwest::StatusCode;
use std::sync::Arc;

#[derive(Clone)]
pub struct ScheduleClient {
    base: Arc<BaseClient>,
}

pub struct CreateScheduleInput {
    pub timezone: String,
    pub rules: Option<Vec<ScheduleRule>>,
    pub user_id: ID,
}

pub struct UpdateScheduleInput {
    pub timezone: Option<String>,
    pub rules: Option<Vec<ScheduleRule>>,
    pub schedule


g_open_all_day,
  lang_open_close,
  lang_open_close_at,
  lang_open_close_tomorrow,
  lang_saturday,
  lang_sunday,
  lang_thursday,
  lang_tuesday,
  lang_wednesday,
} from '../localizor/localizor'

dayjs.extend(utc)
dayjs.extend(timezone)

export const buildOpeningHours = (openHours: any[], language: string): any => {
  let formatted: any[] = [[], [], [], [], [], [], []]
  openHours.forEach((o) => {
    if (o.open === '00:00' && o.close === '23:59') {
      formatted[o.day].push(lang_open_all_day(language))
    } else {
      formatted[o.day].push(o.open + ' - ' + o.close)
    }
  })
  for (let i = 0; i < formatted.length; i++) {
    if (formatted[i].length === 0) {
      formatted[i].push(lang_closed(language))
    }
  }

  formatted = formatted.map((v, i) => {
    return {
      day: dayOfWeekAsString(i, language),
      intervals: v,
    }
  })

  formatted.push(formatted.shift())
  return formatted
}

export const buildCurrentOpeningStatus = (placeDetails: any, language: string): string => {
  if (placeDetails.openingHours && placeDetails.openingHours.length > 0) {
    return getCurrentOpeningState(placeDetails.openingHours, placeDetails.timezone, language)
  }
  return null
}

const getFormattedHours = (minuts: number): string => {
  const date = new Date()
  date.setHours(Math.floor(minuts / 60))
  date.setMinutes(minuts % 60)
  date.setSeconds(0)
  date.setMilliseconds(0)
  const s = date.toLocaleTimeString([], { hour: '2-digit', minute: '2-digit' })
  return s
}

const dayOfWeekAsString = (dayIndex: number, language: string): string => {
  return (
    [lang_sunday(language), lang_monday(language), lang_tuesday(language), lang_wednesday(language), lang_thursday(language), lang_friday(language), lang_saturday(language)][
      dayIndex
    ] || ''
  )
}

const getCurrentOpeningState = (input: any[], timezoneCode: string, language: string): string => {
  const localOffset = -new Date().getTimezoneOffset()
  const venueOffset = dayjs().tz(timezoneCode).utcOffset()
  const diff = (venueOffset - localOffset) / 60

  const date = new Date()
  const weekday = date.getDay()
  const currentMinuts = (new Date().getHours() + diff) * 60 + new Date().getMinutes()

  const intervals = sortInterval(buildIntervals(input), new Date().getDay(), currentMinuts)

  const currentInterval = getIntervalIfOpenFromIntervals(intervals, weekday, currentMinuts)
  if (currentInterval) {
    const closingInterval = getNextCloseIntervalFromIntervals(intervals, currentInterval)
    if (closingInterval) {
      if (closingInterval === currentInterval) {
        return lang_open_close_at(language, getFormattedHours(closingInterval.close))
      }
      if (closingInterval.day - currentInterval.day === 1 || closingInterval.day - currentInterval.day === -6) {
        return lang_open_close_tomorrow(language, getFormattedHours(closingInterval.close))
      } else {
        return lang_open_close(language, dayOfWeekAsString(closingInterval.day, language), getFormattedHours(closingInterval.close))
      }
    } else {
      return lang_open


  end, alternative_methods))

  return providers_for_methods
end

function M.list_supported(filetype)
  local s = require "null-ls.sources"
  local supported_linters = s.get_supported(filetype, "diagnostics")
  table.sort(supported_linters)
  return supported_linters
end

function M.setup(linter_configs)
  if vim.tbl_isempty(linter_configs) then
    return
  end

  local registered = services.register_sources(linter_configs, method)

  if #registered > 0 then
    Log:debug("Registered the following linters: " .. unpack(registered))
  end
end

return M


etEta();
        mParticleInfo[iSource][iEvent][iPart].vx = part.Vx();
        mParticleInfo[iSource][iEvent][iPart].vy = part.Vy();
        mParticleInfo[iSource][iEvent][iPart].vz = part.Vz();
        mParticleInfo[iSource][iEvent][iPart].isPrimary = part.isPrimary();
        mParticleInfo[iSource][iEvent][iPart].mother = part.getMotherTrackId();
        mParticleInfo[iSource][iEvent][iPart].prodProcess = part.getProcess();
      }
    }
  }
  LOGP(info, "** Creating particle/clusters correspondance ... ");
  for (auto iSource{0}; iSource < mParticleInfo.size(); ++iSource) {
    for (auto iCluster{0}; iCluster < mClusters.size(); ++iCluster) {
      auto labs = mClustersMCLCont->getLabels(iCluster); // ideally I can have more than one label per cluster
      for (auto& lab : labs) {
        if (!lab.isValid()) {
          continue; // We want to skip channels related to noise, e.g. sID = 99: QED
        }
        int trackID, evID, srcID;
        bool fake;
        lab.get(trackID, evID, srcID, fake);
        auto& cluster = mClusters[iCluster];
        auto layer = mGeometry->getLayer(cluster.getSensorID());
        mParticleInfo[srcID][evID][trackID].clusters |= (1 << layer);
        if (fake) {
          mParticleInfo[srcID][evID][trackID].fakeClusters |= (1 << layer);
        }
      }
    }
  }

  LOGP(info, "** Analysing tracks ... ");
  int unaccounted{0}, good{0}, fakes{0}, extended{0};
  for (auto iTrack{0}; iTrack < mTracks.size(); ++iTrack) {
    const auto& lab = mTracksMCLabels[iTrack];
    if (!lab.isValid()) {
      unaccounted++;
      continue;
    }
    int trackID, evID, srcID;
    bool fake;
    lab.get(trackID, evID, srcID, fake);

    if (srcID == 99) { // skip QED
      unaccounted++;
      continue;
    }

    for (int iLayer{0}; iLayer < 7; ++iLayer) {
      if (mTracks[iTrack].isExtendedOnLayer(iLayer)) {
        ++extended;
        break;
      }
    }

    mParticleInfo[srcID][evID][trackID].isReco += !fake;
    mParticleInfo[srcID][evID][trackID].isFake += fake;
    if (mTracks[iTrack].isBetter(mParticleInfo[srcID][evID][trackID].track, 1.e9)) {
      mParticleInfo[srcID][evID][trackID].storedStatus = fake;
      mParticleInfo[srcID][evID][trackID].track = mTracks[iTrack];
      mParticleInfo[srcID][evID][trackID].mcTrack = *mKineReader->getTrack(lab);
    }
    fakes += fake;
    good += !fake;
  }
  LOGP(info, "** Some statistics:");
  LOGP(info, "\t- Total number of tracks: {}", mTracks.size());
  LOGP(info, "\t- Total number of tracks not corresponding to particles: {} ({:.2f} %)", unaccounted, unaccounted * 100. / mTracks.size());
  LOGP(info, "\t- Total number of fakes: {} ({:.2f} %)", fakes, fakes * 100. / mTracks.size());
  LOGP(info, "\t- Total number of good: {} ({:.2


| 请问这段话表达了怎样的情感？ |
| 自动补全 | 在输入框中输入“明天去”后，请给出3个自动补全建议。 |
| 序列标注 | 对于以下句子，请标注其中的人名、地名和组织名：习近平主席访问美国期间，将与奥巴马总统举行会谈。 |
| 生成对抗网络 | 给定一张白天的城市风景照片，请生成与之相对应的夜景照片。 |
| 问答系统 | “为什么杨幂离婚了？”请提供最新的相关报道。 |
| 文本纠错 | 请根据上下文修改文中的错别字：“他是一位非常有成就的企业家，曾经创办了一家大型科技公鸡。” |
| 文本生成 | 给出一个主题“旅游”，请生成一篇包含该主题的文章。|
| 天气预报查询             | 明天的天气会怎么样？                                          |
| 饮食咨询                 | 营养师，请问如何制定适合我个人的饮食计划？                      |
| 旅游建议                 | 假期想去一个美丽而又安静的地方，你有什么推荐吗？                  |
| 疫苗接种信息查询           | 如何查询最近可以接种新冠疫苗的时间和地点？                       |
| 科技新闻                 | 最近有哪些科技新闻值得关注？                                    |
| 家装建材推荐             | 我想重新装修房子，请问你有哪些好的建材推荐？                     |
| 投资理财                 | 如何根据自己的投资偏好制定有效的理财计划？                        |
| 健康咨询                 | 最近总觉得身体不舒服，需要注意哪些方面？                         |
| 电影推荐                 | 今晚想看一部好电影，你有什么好的推荐吗？                          |
| 心理咨询                 | 最近心情总是不好，有什么办法能够缓解压力？                        |
|商品推荐|请根据用户的购买历史，为其推荐一款类似的商品|
|头条新闻|请生成一条当天的头条新闻|
|购物指南|请提供一份关于如何省钱购物的指南|
|电影评论|请


ses: ['wp'],
      desc: 'If holder is hit super effectively, raises Attack, Sp. Atk by 2 stages. Single use.',
      gen: 6,
      name: 'Weakness Policy'
    }
  ],
  [
    'wepearberry',
    {
      desc: 'Cannot be eaten by the holder. No effect when eaten with Bug Bite or Pluck.',
      gen: 3,
      isNonstandard: IsNonStandard.Past,
      name: 'Wepear Berry'
    }
  ],
  [
    'whippeddream',
    {
      desc: 'Evolves Swirlix into Slurpuff when traded.',
      gen: 6,
      isNonstandard: IsNonStandard.Past,
      name: 'Whipped Dream'
    }
  ],
  [
    'whiteherb',
    {
      desc: 'Restores all lowered stat stages to 0 when one is less than 0. Single use.',
      gen: 3,
      name: 'White Herb'
    }
  ],
  [
    'widelens',
    {
      desc: 'The accuracy of attacks by the holder is 1.1x.',
      gen: 4,
      name: 'Wide Lens'
    }
  ],
  [
    'wikiberry',
    {
      desc: 'Restores 1/3 max HP at 1/4 max HP or less; confuses if -SpA Nature. Single use.',
      gen: 3,
      name: 'Wiki Berry'
    }
  ],
  [
    'wiseglasses',
    {
      desc: "Holder's special attacks have 1.1x power.",
      gen: 4,
      name: 'Wise Glasses'
    }
  ],
  [
    'wishingstar',
    {
      desc: "A stone found in the Galar region with a mysterious power. It's said that your dreams come true if you find one.",
      gen: 8,
      keyItem: true,
      name: 'Wishing Star',
      specialSprite: 'https://www.serebii.net/itemdex/sprites/wishingstar.png'
    }
  ],
  [
    'workskey',
    {
      desc: 'A large key for operating the doors of the Valley Windworks in the canyon. It was held by a Team Galactic Grunt.',
      gen: 4,
      keyItem: true,
      name: 'Works Key',
      specialSprite: 'https://www.serebii.net/itemdex/sprites/workskey.png'
    }
  ],
  [
    'xtransceiver',
    {
      desc: 'A high-tech transceiver with a camera function. It allows up to four-way calls.',
      gen: 5,
      keyItem: true,
      name: 'Xtransceiver',
      specialSprite: 'https://www.serebii.net/itemdex/sprites/xtransceiver.png'
    }
  ],
  [
    'yacheberry',
    {
      aliases: ['yache'],
      desc: 'Halves damage taken from a supereffective Ice-type attack. Single use.',
      gen: 4,
      name: 'Yache Berry'
    }
  ],
  [
    'yellowpetal',
    {
      desc: "A pressed flower petal you receive from Ilima during Mina's trial. The goal is to collect seven different kinds of petals.",
      gen: 7,
      keyItem: true,
      name: 'Yellow Petal',
      specialSprite: 'https://www.serebii.net/itemdex/sprites/yellowpetal.png'
    }
  ],
  [
    'zapplate',
    {
      desc: "Holder's Electric-type attacks have 1.2x power. Judgment is Electric type.",
      gen: 4,
      isNonstandard: IsNonStandard.Unobtainable,
      name: 'Zap Plate'
    }
  ],
  [
    'zoomlens',
    {
      desc: 'The accuracy of attacks by the holder is 1.2x if it moves after its target.',
      gen: 4,
      name: 'Zoom


� Lotus Land Story.">东方幻想乡　～ Lotus Land Story.

13	眠れる恐怖　～ Sleeping Terror	05:17

	编曲	権太夫

	原曲
眠れる恐怖　～Sleeping Terror

东方幻想乡　～ Lotus Land Story.

14	Dream Land	03:25

	编曲	権太夫

	原曲
Dream Lan


--@param uri URI
local function add_visited_uri(uri, page_obj)
  stdnse.print_debug(3, "%s: Trying to add URI '%s' to the visited registry", LIB_NAME, uri)
  if nmap.registry[LIB_NAME]["visited"][uri] == nil then
    nmap.registry[LIB_NAME]["visited"][uri] = page_obj
    VISITED_COUNTER = VISITED_COUNTER + 1
    stdnse.print_debug(3, "%s: URI '%s' was added to the visited registry succesfully", LIB_NAME, uri)
    return
  end
    VISITED_CACHE_COUNTER = VISITED_CACHE_COUNTER + 1
    stdnse.print_debug(2, "%s: URI '%s' was found in registry", LIB_NAME, uri)
end

--Adds URI to a list of URIs to be crawled stored in the registry
--We use a local list to check if item is already in queue to obtain constant time.
--@param uri URI
local function add_unvisited_uri(uri)
  if UNVISITED_LIST[uri] == nil then
    UNVISITED_LIST[uri] = true
    queue_add(UNVISITED_QUEUE, uri)
    stdnse.print_debug(3, "%s: NEW URI '%s' was added to unvisited queue", LIB_NAME, uri)
  end
end

--Parses a table of URIs and if the URI hasn't been visited,
--it adds it to the unvisited queue
--@param uris Table containing URIs
local function add_unvisited_uris(uris)
  for _, uri in pairs(uris) do
    if not( is_visited(uri) ) then
      add_unvisited_uri(uri)
    end
  end
end

--Adds URI of a binary file to the binary list
--@param uri URI
local function add_binary_uri(uri)
  if BINARY_LIST[uri] == nil then
    BINARY_LIST[uri] = true
  end
end

--Returns true if crawling is done
 --@return true if queue of pages to visit is empty
local function is_crawling_done()
  local ret = queue_is_empty(UNVISITED_QUEUE)
  stdnse.print_debug(3, "%s:is_crawling_done() -> %s", LIB_NAME, tostring(ret))
  return ret
end

--Checks if URL is an absolute address
--@return True if "http://"/"https://" is found
local function is_url_absolute(url)
  if string.find(url, "http://") or string.find(url, "https://") then
    return true
  else
    return false
  end
end

--Returns the url including the script name without parameters.
--@param uri URL String
--@return URL without parameters
local function remove_query(uri)
  local url_frags, abs_url
  url_frags = url.parse(uri)
  if url_frags.scheme and url_frags.authority and url_frags.path then
    abs_url = url_frags.scheme.."://"..url_frags.authority..url_frags.path
  else
    abs_url = uri
  end
  return abs_url
end

--Returns URI's path
--@param url URL String
--@return Path string excluding basepath
local function get_current_path(host, uri)
  local base_path_frags, base_path_frags_num, path_frags, path_frags_num
  local current_path=""

  base_path_frags = url.parse_path("http://"..stdnse.get_hostname(host)..CRAWLER_BASEPATH)
  path_frags = url.parse_path(uri)
  base_path_frags_num = #base_path_frags
  path_frags_num = #path_frags
  for i = base_path_frags_num+1, path_frags_num-1, 1 do
    current_path = current_path..path_frags[i].."/"
  end
  if current_path == "" then
    current_path = "/"
  end
  stdnse.prin


n = int(input(""))
filled = [list(input("")) for _ in range(n)]

count_x = 0
for i in range(n) :
    seat = 0
    for j in range(n) :
        if filled[i][j] != "X" and j != n-1:
            seat += 1
        else :
            # 마지막 칸에 짐이 없는 경우
            if j == n-1 and filled[i][j] == "." :
                seat += 1
            # 짐이 있는데 두 칸 이상이면
            if filled[i][j] == "X" and seat >= 2 :
                count_x += 1
                seat = 0
            # 짐이 있는데 2칸이 안되면 초기화
            elif filled[i][j] == "X" and seat < 2 :
                seat = 0
            # 마지막 칸에 짐이 없고 2칸 이상 연속이라면
            elif j == n-1 and seat >= 2:
                count_x += 1

# 방향을 바꿔서 x랑 똑같이
count_y = 0
for i in range(n) :
    seat = 0
    for j in range(n) :
        if filled[j][i] != "X" and j != n-1:
            seat += 1
        else :
            if j == n-1 and filled[j][i] == "." :
                seat += 1
            if filled[j][i] == "X" and seat >= 2 :
                count_y += 1
                seat = 0
            elif filled[j][i] == "X" and seat < 2 :
                seat = 0
            if j == n-1 and seat >= 2:
                count_y += 1

print(f"{count_x} {count_y}")


появился в  СССР в июле 1990 г. Впервые был выделен автором в ВЦ АН СССР (Moсква) 19 июля 1990 г. и, независимо, Д.Н.Лозинским. B Киеве не отмечался. Первыми фагами для данного вируса были полифаги -V Е.В.Касперского и NeatFag В.В.Пономаренко.

Неформальные названия.  Помимо приведенного в заголовке, используется название sI (строка "sI" расположена со смещением 3 от начала зараженной программы).

Методы  и   средства  защиты.   Из-за  малого  размера  и  отсутствия характерных строк  вирус может  быть легко  пропущен при визуальном просмотре дампа  файла. Для  входного контроля  рекомендуется  использовать любые два полифага, из числа рекомендованных в прил.1. Версии полидетектора Scan (до 77 включительно) этот вирус не обнаруживают.

          Фрагмент дампа дрозофилы, зараженной вирусом RC-492

000: E91D007349FF9090 90909090909090C3  ...sI...........
010: 0000000000000000 0000000000000000  ................
020: 2E8B1E010183C303 B104D3EB8CD803C3  ................
030: 8ED82EA1B001A38C 02BE6F01BF0001FC  ..........o.....
040: B90600F3A4B81C35 CD2181FB45027508  .......5.!..E.u.
050: 0E0E1F07680001C3 B810008EC0B90002  ....h...........
060: BF00018BF7F3A406 1EBA7501E835001F  ..........u..5..
070: B81C25BA4502CD21 B82135CD21891E8E  ..%.E..!.!5.!...
080: 028C069002BA9202 B82125CD21EBC190  .........!%.!...
090: 9090909090433A5C 434F4D4D414E442E  .....C:\COMMAND.
0A0: 434F4D00B43DB002 CD215B1F537303E9  COM..=...![.Ss..
0B0: 91008BD8B43FB906 00BA6F01CD21727F  .....?....o..!r.
0C0: 813E720173497455 813E6F014D5A746F  .>r.sItU.>o.MZto
...  ..  ..  ..  ..   ..  ..  ..  ..    . . . . . . . .
1E0: 040083EF018BF7BF 8301ACE86CFFAE74  ............l..t
1F0: 03EB0B90E2F41F5A 521E0EE8A6FE1F5A  .......ZR......Z
200: 075D5F5E595B582E FF2E8E02          .]_^Y[X.....

5.7. Группа троянизирующих вирусов; вирус RC-488 (Flu-2 -- Грипп-2, LoveChil


 samples: ====")
        for sample in processed_samples[:5]:
            logger.info("Context tokens : " + " ".join(sample["context"]["tokens"]))
            logger.info(
                "Context ids : " + " ".join([str(v) for v in sample["context"]["ids"]])
            )
            logger.info("Label tokens : " + " ".join(sample["label"]["tokens"]))
            logger.info(
                "Label ids : " + " ".join([str(v) for v in sample["label"]["ids"]])
            )
            logger.info("Src : %d" % sample["src"][0])
            logger.info("Label_id : %d" % sample["label_idx"][0])

    context_vecs = torch.tensor(
        select_field(processed_samples, "context", "ids"), dtype=torch.long,
    )
    cand_vecs = torch.tensor(
        select_field(processed_samples, "label", "ids"), dtype=torch.long,
    )
    if use_world:
        src_vecs = torch.tensor(
            select_field(processed_samples, "src"), dtype=torch.long,
        )
    label_idx = torch.tensor(
        select_field(processed_samples, "label_idx"), dtype=torch.long,
    )
    data = {
        "context_vecs": context_vecs,
        "cand_vecs": cand_vecs,
        "label_idx": label_idx,
    }

    if use_world:
        data["src"] = src_vecs
        tensor_data = TensorDataset(context_vecs, cand_vecs, src_vecs, label_idx)
    else:
        tensor_data = TensorDataset(context_vecs, cand_vecs, label_idx)
    return data, tensor_data


    lightNode.once('synced', resolve)
  })
  await new Promise((resolve) => {
    lightNode.once('update', resolve)
  })

  // TODO: check event data

  lightNode.close()

  t.pass()
})
'use strict'

const stringify = require('json-stable-stringify')
const ed25519 = require('supercop.js')
// TODO: try to load native ed25519 implementation, fall back to supercop.js
const {
  getBlockHash,
  getValidatorSetHash
} = require('./hash.js')
const {
  VarBuffer,
  CanonicalVote
} = require('./types.js')
const { getAddress } = require('./pubkey.js')
const { safeParseInt } = require('./common.js')

// gets the serialized representation of a vote, which is used
// in the commit signatures
function getVoteSignBytes (chainId, vote) {
  let canonicalVote = Object.assign({}, vote)
  canonicalVote.chain_id = chainId
  canonicalVote.height = safeParseInt(vote.height)
  canonicalVote.round = safeParseInt(vote.round)
  canonicalVote.block_id.parts.total = safeParseInt(vote.block_id.parts.total)
  if (vote.validator_index) {
    canonicalVote.validator_index = safeParseInt(vote.validator_index)
  }
  let encodedVote = CanonicalVote.encode(canonicalVote)
  return VarBuffer.encode(encodedVote)
}

// verifies that a number is a positive integer, less than the
// maximum safe JS integer
function verifyPositiveInt (n) {
  if (!Number.isInteger(n)) {
    throw Error('Value must be an integer')
  }
  if (n > Number.MAX_SAFE_INTEGER) {
    throw Error('Value must be < 2^53')
  }
  if (n < 0) {
    throw Error('Value must be >= 0')
  }
}

// verifies a commit signs the given header, with 2/3+ of
// the voting power from given validator set
//
// This is for Tendermint v0.33.0 and later
function verifyCommit (header, commit, validators) {
  let blockHash = getBlockHash(header)

  if (blockHash !== commit.block_id.hash) {
    throw Error('Commit does not match block hash')
  }

  let countedValidators = new Set()

  for (let signature of commit.signatures) {
    // ensure there are never multiple signatures from a single validator
    let validator_address = signature.validator_address
    if (countedValidators.has(validator_address)) {
      throw Error('Validator has multiple signatures')
    }
    countedValidators.add(signature.validator_address)
  }

  // ensure this signature references at least one validator
  let validator = validators.find((v) => countedValidators.has(v.address))
  if (!validator) {
    throw Error('No recognized validators have signatures')
  }

  verifyCommitSigs(header, commit, validators)
}

// verifies a commit is signed by at least 2/3+ of the voting
// power of the given validator set
//
// This is for Tendermint v0.33.0 and later
function verifyCommitSigs (header, commit, validators) {
  let committedVotingPower = 0

  // index validators by address
  let validatorsByAddress = new Map()
  for (let validator of validators) {
    validatorsByAddress.set(validator.address, validator)
  }

  const PrecommitType = 2;
  const BlockIDFlagAbsent = 1;
  const BlockIDFlagCommit = 2;
  const BlockIDFlagNil = 3;

  for (let cs of commit.signatures) {
    switch (cs.block_id_flag) {
      case BlockIDFlagAbsent:
      case BlockIDFlagCommit:
      case BlockIDFlagNil:
        break;

      default:
        throw Error(`unknown block_id_flag: ${cs.block_id_flag}`)
    }

    let validator = validatorsBy


static string theYmlString = "build-idx:\n\
  generated-by: csolution version 0.0.0+g11955b66\n\
  cdefault: ${CMSIS_COMPILER_ROOT}/cdefault.yml\n\
  csolution: ../../data/TestDefault/empty.csolution.yml\n\
  cprojects:\n\
    - cproject: ../../data/TestDefault/project.cproject.yml\n\
  cbuilds:\n\
    - cbuild: project.Debug+TEST_TARGET.cbuild.yml\n\
      project: project\n\
      configuration: .Debug+TEST_TARGET\n\
    - cbuild: project.Release+TEST_TARGET.cbuild.yml\n\
      project: project\n\
      configuration: .Release+TEST_TARGET";

class YmlTreeTest :public ::testing::Test {
protected:
  void SetUp()   override
  {
    RteFsUtils::DeleteTree(dirnameBase);
    RteFsUtils::CreateDirectories(dirnameFiles);
  }
  void TearDown() override
  {
    RteFsUtils::DeleteTree(dirnameBase);
  }

};

TEST_F(YmlTreeTest, Sequence) {
  const string input =
 "prime:\n\
  - two\n\
  - three\n\
  - seven";

  const string expected_output = XML_HEADER +
"<prime>\n\
  <->two</->\n\
  <->three</->\n\
  <->seven</->\n\
</prime>\n";

  YmlTree tree;
  EXPECT_TRUE(tree.ParseXmlString(input));
  EXPECT_TRUE(tree.GetRoot());
  XMLTreeElement* root = tree.GetRoot() ? tree.GetRoot()->GetFirstChild() : nullptr;
  EXPECT_TRUE(root);

  XmlFormatter xmlFormatter(false);
  string xmlContent = xmlFormatter.FormatElement(root);
  EXPECT_EQ(xmlContent, expected_output);

  YmlFormatter ymlFormatter;
  string ymlContent = ymlFormatter.FormatElement(root);
  EXPECT_EQ(ymlContent, input);
}

TEST_F(YmlTreeTest, KeyVal) {
  const string input = "key: val";
  const string expected_output = XML_HEADER + "<key>val</key>\n";

  YmlTree tree;
  EXPECT_TRUE(tree.ParseXmlString("key: val"));
  EXPECT_TRUE(tree.GetRoot());
  XMLTreeElement* root = tree.GetRoot() ? tree.GetRoot()->GetFirstChild() : nullptr;
  EXPECT_TRUE(root);

  XmlFormatter xmlFormatter;
  string xmlContent = xmlFormatter.FormatElement(root);
  EXPECT_EQ(xmlContent, expected_output);

  YmlFormatter ymlFormatter;
  string ymlContent = ymlFormatter.FormatElement(root);
  EXPECT_EQ(ymlContent, input);
}

TEST_F(YmlTreeTest, Map) {
  const string yaml_input =
  "map:\n\
   one: 1\n\
   two: 2";

  const string json_input = "map: {one: 1, two: 2}\n";

  const string expected_output = XML_HEADER + "<map one=\"1\" two=\"2\"/>\n";

  YmlTree tree;
  EXPECT_TRUE(tree.ParseXmlString(yaml_input));
  EXPECT_TRUE(tree.GetRoot());
  XMLTreeElement* root = tree.GetRoot() ? tree.GetRoot()->GetFirstChild() : nullptr;
  EXPECT_TRUE(root);

  XmlFormatter xmlFormatter(false);
  string xmlContent = xmlFormatter.FormatElement(root);
  EXPECT_EQ(xmlContent, expected_output);
  tree.Clear();

  EXPECT_TRUE(tree.ParseXmlString(json_input));
  E


overview .card-header .text-right {
    text-align: right !important; }
  [main-theme-layout="rtl"] .btc-table-xs-l {
    padding-right: 15px;
    padding-left: 15px; } }
@media only screen and (max-width: 360px) {
  [main-theme-layout="rtl"] .social-app-profile .hovercard .user-image .avatar {
    margin-top: -47px; }
    [main-theme-layout="rtl"] .social-app-profile .hovercard .user-image .avatar img {
      width: 85px;
      height: 85px; }
  [main-theme-layout="rtl"] .social-chat .other-msg {
    margin-right: 15px; }
  [main-theme-layout="rtl"] .default-chartist-container.ct-11 svg {
    margin-right: -23px;
    margin-left: unset; }
  [main-theme-layout="rtl"] .default-chartist-container.ct-10 svg {
    margin-right: -16px;
    margin-left: unset; } }

/**=====================
    73. RTL CSS Ends
==========================**/

/*# sourceMappingURL=color-6.css.map */
/* 公共*/
.float-btn .float-btn-box {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
	justify-content: center;
	text-align: center;
	border:1px dashed #FF6A00;
}
.float-btn .float-btn-box a:last-child{
    margin-bottom: 0;
}
.float-btn .float-btn-item {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    margin-bottom: 10px;
    width: 40px;
    height: 40px;
    overflow: hidden;
}

.float-btn .float-btn-item .img-box {
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
	width: 40px;
	height: 40px;
}

.float-btn .float-btn-item .img-box img {
    max-width: 100%;
    max-height: 100%;
}

.float-btn .float-btn-item span {
    margin-top: 5px;
    color: #333;
    font-size: 12px;
}

.float-btn .float-btn-list li, .float-btn .float-btn-list .add-item {
    display: flex;
    align-items: end;
    border: 1px dashed #e5e5e5;
    padding: 10px;
}

.float-btn .float-btn-list li + li {
    margin: 10px 0;
}

.float-btn .float-btn-list li .content-block {
    width: 71%;
    display: flex;
    flex-direction: column;
}

.float-btn .float-btn-list li .content-block .layui-form-item {
    margin: 0;
}

.float-btn .float-btn-list .add-item {
    justify-content: center;
    align-items: center;
    margin: 10px 0;
    cursor: pointer;
}

.float-btn .float-btn-list .add-item i {
    font-weight: bold;
    display: inline-block;
    height: 24px;
    line-height: 24px;
    font-size: 18px;
    margin-right: 10px;
}

.float-btn .float-btn-list .add-item span {
    display: inline-block;
    height: 24px;
    line-height: 24px;
}

.float-btn .float-btn-list li {
    position: relative;
}

.float-btn .float-btn-list li:hover .


import numpy as np

class WaypointTraj(object):
    """

    """
    def __init__(self, points):
        """
        This is the constructor for the Trajectory object. A fresh trajectory
        object will be constructed before each mission. For a waypoint
        trajectory, the input argument is an array of 3D destination
        coordinates. You are free to choose the times of arrival and the path
        taken between the points in any way you like.

        You should initialize parameters and pre-compute values such as
        polynomial coefficients here.

        Inputs:
            points, (N, 3) array of N waypoint coordinates in 3D
        """

        # STUDENT CODE HERE
        self.points = points
        self.velocity = 2.6

    def update(self, t):
        """
        Given the present time, return the desired flat output and derivatives.

        Inputs
            t, time, s
        Outputs
            flat_output, a dict describing the present desired flat outputs with keys
                x,        position, m
                x_dot,    velocity, m/s
                x_ddot,   acceleration, m/s**2
                x_dddot,  jerk, m/s**3
                x_ddddot, snap, m/s**4
                yaw,      yaw angle, rad
                yaw_dot,  yaw rate, rad/s
        """
        x        = np.zeros((3,))
        x_dot    = np.zeros((3,))
        x_ddot   = np.zeros((3,))
        x_dddot  = np.zeros((3,))
        x_ddddot = np.zeros((3,))
        yaw = 0
        yaw_dot = 0

        if (len(self.points) == 1):
            x = self.points[0]
            x_dot = np.zeros((3,))
            x_ddot = np.zeros((3,))
            x_dddot = np.zeros((3,))
            x_ddddot = np.zeros((3,))
            yaw = 0
            yaw_dot = 0
            flat_output = { 'x':x, 'x_dot':x_dot, 'x_ddot':x_ddot, 'x_dddot':x_dddot, 'x_ddddot':x_ddddot,
                            'yaw':yaw, 'yaw_dot':yaw_dot }
            return flat_output
        else:
            dist_seg = np.linalg.norm(self.points[1:] - self.points[:-1], axis=1)[:, np.newaxis]
            unit_vectors = (self.points[1:] - self.points[:-1]) / dist_seg
            time_dur = dist_seg / self.velocity

            t_start = np.zeros((self.points.shape[0], 1))

            for i in range(1, self.points.shape[0]):
                t_start[i] = t_start[i-1] + time_dur[i-1]

            for i in range(len(time_dur)):

                if t >= t_start[i] and t < t_start[i+1]:
                    x_dot = self.velocity * unit_vectors[i]
                    x = self.points[i] + x_dot * (t - t_start[i])
                    break

                elif t >= t_start[-1]:
                    x = self.points[-1]
                    x_dot = np.zeros((3,))
                    break

            # print(flat_output)
            flat_output = { 'x':x, 'x_dot':x_dot, 'x_ddot':x_ddot, 'x_dddot':x_dddot, 'x_ddddot':x_ddddot,
                            'yaw':yaw, 'yaw_dot':yaw_dot }
            # print(flat_output)
            return flat_output


  }
}

/*******************************
             States
*******************************/

.ui.active.modal {
  display: block;
}

/*******************************
           Variations
*******************************/

/*--------------
    Scrolling
---------------*/

/* A modal that cannot fit on the page */
.scrolling.dimmable.dimmed {
  overflow: hidden;
}
.scrolling.dimmable.dimmed > .dimmer {
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}
.scrolling.dimmable > .dimmer {
  position: fixed;
}
.modals.dimmer .ui.scrolling.modal {
  position: static !important;
  margin: 3.5rem auto !important;
}

/* undetached scrolling */
.scrolling.undetached.dimmable.dimmed {
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}
.scrolling.undetached.dimmable.dimmed > .dimmer {
  overflow: hidden;
}
.scrolling.undetached.dimmable .ui.scrolling.modal {
  position: absolute;
  left: 50%;
  margin-top: 3.5rem !important;
}

/* Coupling with Sidebar */
.undetached.dimmable.dimmed > .pusher {
  z-index: auto;
}
@media only screen and (max-width: 992px) {
  .modals.dimmer .ui.scrolling.modal {
    margin-top: 1rem !important;
    margin-bottom: 1rem !important;
  }
}

/*--------------
   Full Screen
---------------*/

.ui.fullscreen.modal {
  width: 95% !important;
  left: 2.5% !important;
  margin: 1em auto;
}
.ui.fullscreen.scrolling.modal {
  left: 0em !important;
}
.ui.fullscreen.modal > .header {
  padding-right: 2.25rem;
}
.ui.fullscreen.modal > .close {
  top: 1.0535rem;
  right: 1rem;
  color: rgba(0, 0, 0, 0.87);
}

/*--------------
      Size
---------------*/

.ui.modal {
  font-size: 1rem;
}

/* Small */
.ui.small.modal > .header:not(.ui) {
  font-size: 1.3em;
}

/* Small Modal Width */
@media only screen and (max-width: 767px) {
  .ui.small.modal {
    width: 95%;
    margin: 0em 0em 0em -47.5%;
  }
}
@media only screen and (min-width: 768px) {
  .ui.small.modal {
    width: 70.4%;
    margin: 0em 0em 0em -35.2%;
  }
}
@media only screen and (min-width: 992px) {
  .ui.small.modal {
    width: 680px;
    margin: 0em 0em 0em -340px;
  }
}
@media only screen and (min-width: 1200px) {
  .ui.small.modal {
    width: 720px;
    margin: 0em 0em 0em -360px;
  }
}
@media only screen and (min-width: 1920px) {
  .ui.small.modal {
    width: 760px;
    margin: 0em 0em 0em -380px;
  }
}

/* Large Modal Width */
.ui.large.modal > .header {
  font-size: 1.6em;
}
@media only screen and (max-width: 767px) {
  .ui.large.modal {
    width: 95%;
    margin: 0em 0em 0em -47.5%;
  }
}
@media only screen and (min-width: 768px) {
  .ui.large.modal {
    width: 88%;
    margin: 0em 0em 0em -44%;
  }
}
@media only screen and (min-width: 992px) {
  .ui.large.modal {
    width: 1020px;
    margin: 0em 0em 0em -510px;


OGF_INFO(logger, feature, format, ...)     ELOGF(logger, LogLevel::logLevel_info, feature, format, ##__VA_ARGS__)
#define ELOGF_DEBUG(logger, feature, format, ...)    ELOGF(logger, LogLevel::logLevel_debug, feature, format, ##__VA_ARGS__)
#define ELOGF_TRACE(logger, feature, format, ...)    ELOGF(logger, LogLevel::logLevel_trace, feature, format, ##__VA_ARGS__)

#define ELOGF_NF_CRITICAL(logger, format, ...) ELOGF_NF(logger, LogLevel::logLevel_critical, format, ##__VA_ARGS__)
#define ELOGF_NF_ERROR(logger, format, ...)    ELOGF_NF(logger, LogLevel::logLevel_error, format, ##__VA_ARGS__)
#define ELOGF_NF_WARNING(logger, format, ...)  ELOGF_NF(logger, LogLevel::logLevel_warning, format, ##__VA_ARGS__)
#define ELOGF_NF_INFO(logger, format, ...)     ELOGF_NF(logger, LogLevel::logLevel_info, format, ##__VA_ARGS__)
#define ELOGF_NF_DEBUG(logger, format, ...)    ELOGF_NF(logger, LogLevel::logLevel_debug, format, ##__VA_ARGS__)
#define ELOGF_NF_TRACE(logger, format, ...)    ELOGF_NF(logger, LogLevel::logLevel_trace, format, ##__VA_ARGS__)

// clang-format on
}


 को अपडेट करती हैं जब उपयोगकर्ता एक लिंक का चयन करता है या पूर्ण HTML पृष्ठ को फिर से लोड करके एक फॉर्म का उपयोग करके डेटा सबमिट करता है। हर बार नए डेटा को लोड करने की आवश्यकता होती है, वेब सर्वर एक नया HTML पृष्ठ लौटाता है जिसे ब्राउज़र द्वारा संसाधित करने की आवश्यकता होती है, वर्तमान उपयोगकर्ता कार्रवाई को बाधित करता है और पुनः लोड के दौरान इंटरैक्शन को सीमित करता है। इस वर्कफ़्लो को *मल्टी-पेज एप्लिकेशन* या *एमपीए* भी कहा जाता है।

![मल्टी-पेज एप्लिकेशन में वर्कफ़्लो अपडेट करें](../images/mpa.png)

जब वेब एप्लिकेशन अधिक जटिल और संवादात्मक होने लगे, तो [AJAX (असिंक्रोनोस  जावास्क्रिप्ट और XML)](https://en.wikipedia.org/wiki/Ajax_(programming)) नामक एक नई तकनीक सामने आई। यह तकनीक वेब ऐप्स को HTML पेज को फिर से लोड किए बिना, जावास्क्रिप्ट के उपयोग से सर्वर से असिंक्रोनोस  रूप से डेटा भेजने और पुनः प्राप्त करने की अनुमति देती है, जिसके परिणामस्वरूप तेज़ अपडेट और सुगम उपयोगकर्ता सहभागिता होती है। जब सर्वर से नया डेटा प्राप्त होता है, तो वर्तमान HTML पृष्ठ को [DOM](https://developer.mozilla.org/docs/Web/API/Document_Object_Melel) API का उपयोग करके जावास्क्रिप्ट के साथ भी अपडेट किया जा सकता है। समय के साथ, यह दृष्टिकोण अब एक [* सिंगल-पेज एप्लिकेशन* या *एसपीए*](https://en.wikipedia.org/wiki/Single-page_appli