.nav-menu{font-size:.88235rem;line-height:1.26667;font-weight:400;letter-spacing:-.014em;font-family:Helvetica Neue,Helvetica,Arial,sans-serif}@media only screen and (max-width:1023px){[data-v-324c15b2] .nav-menu{font-size:.82353rem;line-height:1.5;font-weight:400;letter-spacing:-.01em;font-family:Helvetica Neue,Helvetica,Arial,sans-serif}}@media only screen and (min-width:1024px){[data-v-324c15b2] .nav-menu{padding-top:0}}.documentation-nav[data-v-324c15b2] .nav-title{font-size:.88235rem;line-height:1.26667;font-weight:400;letter-spacing:-.014em;font-family:Helvetica Neue,Helvetica,Arial,sans-serif}@media only screen and (max-width:1023px){.documentation-nav[data-v-324c15b2] .nav-title{font-size:.82353rem;line-height:1.5;font-weight:400;letter-spacing:-.01em;font-family:Helvetica Neue,Helvetica,Arial,sans-serif}}@media only screen and (max-width:767px){.documentation-nav[data-v-324c15b2] .nav-title{padding-top:0}}.documentation-nav[data-v-324c15b2] .nav-title .nav-title-link.inactive{height:auto;color:var(--color-figure-gray-secondary-alt)}.theme-dark.documentation-nav .nav-title .nav-title-link.inactive[data-v-324c15b2]{color:#b0b0b0}.betainfo[data-v-4edf30f4]{font-size:.94118rem;padding:3rem 0;background-color:var(--color-fill-secondary)}.betainfo-container[data-v-4edf30f4]{margin-left:auto;margin-right:auto;width:980px}@media only screen and (max-width:1068px){.betainfo-container[data-v-4edf30f4]{width:692px}}@media only screen and (max-width:735px){.betainfo-container[data-v-4edf30f4]{width:87.5%}}.betainfo-label[data-v-4edf30f4]{font-weight:600;font-size:.94118rem}.betainfo-content[data-v-4edf30f4] p{margin-bottom:10px}.contenttable+.betainfo[data-v-4edf30f4]{background-color:var(--color-fill)}.summary-section[data-v-6185a550]{margin:0 0 1.5rem}.summary-section[data-v-6185a550]:last-of-type{margin-bottom:0}.title[data-v-b903be56]{color:var(--colors-text,var(--color-text));font-size:1.11765rem;line-height:1.21053;font-weight:400;letter-spacing:.012em;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:.82353rem;margin-bottom:.5rem;text-rendering:optimizeLegibility}.language[data-v-0836085b]{font-size:14px}.language-option[data-v-0836085b]{display:inline}@media only screen and (max-width:735px){.language-option[data-v-0836085b]{display:block;margin-bottom:.25rem}}.language-option.active[data-v-0836085b],.language-option.router-link-exact-active[data-v-0836085b]{color:var(--colors-secondary-label,var(--color-secondary-label))}@media only screen and


pecial tag names
	// should be applied to revert to legacy behaviour.
	if len(t.ClusterID) == 0 {
		if len(filters) == 0 {
			// We can't pass a zero-length Filters to AWS (it's an error)
			// So if we end up with no filters; just return nil
			return nil
		}
		return filters
	}

	f := newEc2Filter(fmt.Sprintf("tag:%s", TagNameKubernetesClusterLegacy), t.ClusterID)

	// We can't pass a zero-length Filters to AWS (it's an error)
	// So if we end up with no filters; we need to return nil
	filters = append(filters, f)
	return filters
}

func (t *awsTagging) buildTags(lifecycle ResourceLifecycle, additionalTags map[string]string) map[string]string {
	tags := make(map[string]string)
	for k, v := range additionalTags {
		tags[k] = v
	}

	// no clusterID is a sign of misconfigured cluster, but we can't be tagging the resources with empty
	// strings
	if len(t.ClusterID) == 0 {
		return tags
	}

	// We only create legacy tags if we are using legacy tags, i.e. if we have seen a legacy tag on our instance
	if t.usesLegacyTags {
		tags[TagNameKubernetesClusterLegacy] = t.ClusterID
	}
	tags[t.clusterTagKey()] = string(lifecycle)

	return tags
}

func (t *awsTagging) clusterID() string {
	return t.ClusterID
}
/*
Copyright 2014 The Kubernetes Authors.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

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

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package aws

import (
	"context"
	"fmt"
	"io"
	"reflect"
	"sort"
	"strings"
	"testing"

	"github.com/aws/aws-sdk-go/aws"
	"github.com/aws/aws-sdk-go/service/ec2"
	"github.com/aws/aws-sdk-go/service/elb"
	"github.com/stretchr/testify/assert"
	"github.com/stretchr/testify/mock"
	"github.com/stretchr/testify/require"

	"k8s.io/api/core/v1"
	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
	"k8s.io/apimachinery/pkg/types"
	"k8s.io/apimachinery/pkg/util/sets"
	cloudvolume "k8s.io/cloud-provider/volume"
)

const TestClusterID = "clusterid.test"
const TestClusterName = "testCluster"

type MockedFakeEC2 struct {
	*FakeEC2Impl
	mock.Mock
}

func (m *MockedFakeEC2) expectDescribeSecurityGroups(clusterID, groupName string) {
	tags := []*ec2.Tag{
		{Key: aws.String(TagNameKubernetesClusterLegacy), Value: aws.String(clusterID)},
		{Key: aws.String(fmt.Sprintf("%s%s", TagNameKubernetesClusterPrefix, clusterID)), Value: aws.String(ResourceLifecycleOwned)},
	}

	m.On("DescribeSecurityGroups", &ec2.DescribeSecurityGroupsInput{Filters: []*ec2.Filter{
		newEc2Filter("group-name", groupName),
		newEc2Filter("vpc-id", ""),
	}}).Return([]*ec2.SecurityGroup{{Tags: tags}})
}

func (m *MockedFakeEC2) DescribeVolumes(request *ec2.DescribeVolumesInput) ([]*ec2.Volume, error) {


Globals.myFlag!;

      const enemiesLT15 = Globals.enemyCreeps
        .filter(i => getDistance(i, tower) < 15)
        .sort((a, b) => getDistance(a, myFlag) - getDistance(b, myFlag));

      if (enemiesLT15.length > 0) {
        tower.attack(enemiesLT15[0]);
      } else if (flagGuard.hits < flagGuard.hitsMax - 400) {
        tower.heal(flagGuard);
      } else if (tower.store.energy === 50) {
        const enemies = Globals.enemyCreeps.sort((a, b) => getDistance(a, myFlag) - getDistance(b, myFlag));

        tower.attack(enemies[0]);
      }
    }
  }
}
// class Product {
//     marca: string
//     preco: number
//     validade: string
//     valido: boolean

//     show():void{
//         let mensage:string = 'As propriedades do prudoto são'
//             mensage += '\nMarca: '+ this.marca
//             mensage += '\nPreco: '+ this.preco
//             mensage += '\nValidade: '+ this.validade
//             mensage += '\nValido: '+ this.valido
//             console.log(mensage)
//     }
// }import { Router, Request, Response } from 'express';
import { TrainingPathService } from './TrainingService';

// Dependencies
const trainingSrv: TrainingPathService = new TrainingPathService();

// Assign router to the express.Router() instance
const tpRouter: Router = Router();

/**
 * Method:
 * Verb:
 * Route:
 */
tpRouter.post('/', async(req: Request, res: Response) => {
    let { topic, name, description } = req.body;
    // { created: newTP }
    await trainingSrv.createNewTrainingPath(topic, name, description)
        .then((newTrainingPath) => res.status(200).send(newTrainingPath))
        .catch((err) => res.status(400).send('KO'))
});

/**
 * Method:
 * Verb:
 * Route:
 */
tpRouter.get('/', async(req: Request, res: Response) => {
    // { trainingPaths: trainingPaths }
    await trainingSrv.getTrainingPathsWithoutKatas()
        .then((trainingPaths) => res.status(200).send(trainingPaths))
        .catch((err) => res.status(400).send('KO'));
});

/**
 * Method:
 * Verb:
 * Route:
 */
tpRouter.get('/grid', async(req: Request, res: Response) => {
    // { trainingPaths: trainingPaths }
    await trainingSrv.getTrainingPathsForGrid()
        .then((trainingPaths) => res.status(200).send(trainingPaths))
        .catch((err) => res.status(400).send('KO'));
});

/**
 * Method:
 * Verb:
 * Route:
 */
tpRouter.get('/topic/:topic', async(req: Request, res: Response) => {
    // { tPath: tPath }
    await trainingSrv.getTrainingPathByTopic(req.params.topic)
        .then((trainingPath) => res.status(200).send(trainingPath))
        .catch((err) => res.status(400).send('KO'));
});

/**
 * Method:
 * Verb:
 * Route:
 */
tpRouter.get('/:topic/katas', async(req: Request, res: Response) => {
    // { trainingPath: katas }
    await trainingSrv.getKatasOfTrainingPathByTopic(req.params.topic)
        .then((katas) => res.status(200).send(katas))
        .catch((err) => res.status(400).send('KO'));
});

/**
 * Method:
 * Verb:
 * Route:
 */
tpRouter.get('/id/katas/:pathId', async(req: Request, res: Response)


currentRead;
					offset += currentRead;
					shouldRead -= currentRead;
				}
				catch (IOException)
				{
					this.isAlive = false;
					throw;
				}
			}
		}

		public void Write(byte[] data, int offset, int length)
		{
			this.CheckDisposed();

			SocketError status;

			this.socket.Send(data, offset, length, SocketFlags.None, out status);

			if (status != SocketError.Success)
			{
				this.isAlive = false;

				ThrowHelper.ThrowSocketWriteError(this.endpoint, status);
			}
		}

		public void Write(IList<ArraySegment<byte>> buffers)
		{
			this.CheckDisposed();

			SocketError status;

#if DEBUG
			int total = 0;
			for (int i = 0, C = buffers.Count; i < C; i++)
				total += buffers[i].Count;

			if (this.socket.Send(buffers, SocketFlags.None, out status) != total)
				System.Diagnostics.Debugger.Break();
#else
			this.socket.Send(buffers, SocketFlags.None, out status);
#endif

			if (status != SocketError.Success)
			{
				this.isAlive = false;

				ThrowHelper.ThrowSocketWriteError(this.endpoint, status);
			}
		}

		/// <summary>
		/// Receives data asynchronously. Returns true if the IO is pending. Returns false if the socket already failed or the data was available in


, %xmm1
  vpslldq $4, %xmm1, %xmm3
  pxor %xmm3, %xmm1
  pxor %xmm2, %xmm1
  movdqu %xmm1, 112(%rdx)
  aeskeygenassist $128, %xmm1, %xmm2
  pshufd $255, %xmm2, %xmm2
  vpslldq $4, %xmm1, %xmm3
  pxor %xmm3, %xmm1
  vpslldq $4, %xmm1, %xmm3
  pxor %xmm3, %xmm1
  vpslldq $4, %xmm1, %xmm3
  pxor %xmm3, %xmm1
  pxor %xmm2, %xmm1
  movdqu %xmm1, 128(%rdx)
  aeskeygenassist $27, %xmm1, %xmm2
  pshufd $255, %xmm2, %xmm2
  vpslldq $4, %xmm1, %xmm3
  pxor %xmm3, %xmm1
  vpslldq $4, %xmm1, %xmm3
  pxor %xmm3, %xmm1
  vpslldq $4, %xmm1, %xmm3
  pxor %xmm3, %xmm1
  pxor %xmm2, %xmm1
  movdqu %xmm1, 144(%rdx)
  aeskeygenassist $54, %xmm1, %xmm2
  pshufd $255, %xmm2, %xmm2
  vpslldq $4, %xmm1, %xmm3
  pxor %xmm3, %xmm1
  vpslldq $4, %xmm1, %xmm3
  pxor %xmm3, %xmm1
  vpslldq $4, %xmm1, %xmm3
  pxor %xmm3, %xmm1
  pxor %xmm2, %xmm1
  movdqu %xmm1, 160(%rdx)
  pxor %xmm1, %xmm1
  pxor %xmm2, %xmm2
  pxor %xmm3, %xmm3
  ret

.global _old_aes256_key_expansion
_old_aes256_key_expansion:
  movdqu 0(%rdi), %xmm1
  movdqu 16(%rdi), %xmm3
  mov %rsi, %rdx
  movdqu %xmm1, 0(%rdx)
  movdqu %xmm3, 16(%rdx)
  aeskeygenassist $1, %xmm3, %xmm2
  pshufd $255, %xmm2, %xmm2
  vpslldq $4, %xmm1, %xmm4
  pxor %xmm4, %xmm1
  vpslldq $4, %xmm1, %xmm4
  pxor %xmm4, %xmm1
  vpslldq $4, %xmm1, %xmm4
  pxor %xmm4, %xmm1
  pxor %xmm2, %xmm1
  movdqu %xmm1, 32(%rdx)
  aeskeygenassist $0, %xmm1, %xmm2
  pshufd $170, %xmm2, %xmm2
  vpslldq $4, %xmm3, %xmm4
  pxor %xmm4, %xmm3
  vpslldq $4, %xmm3, %xmm4
  pxor %xmm4, %xmm3
  vpslldq $4, %xmm3, %xmm4
  pxor %xmm4, %xmm3
  pxor %xmm2, %xmm3
  movdqu %xmm3, 48(%rdx)
  aeskeygenassist $2, %xmm3, %xmm2
  pshufd $255, %xmm2, %xmm2
  vpslldq $4, %xmm1, %xmm4
  pxor %xmm4, %xmm1
  vpslldq $4, %xmm1, %xmm4
  pxor %xmm4, %xmm1
  vpslldq $4, %xmm1, %xmm4


EXTRACT_AND_VERIFY_DIMENSIONS("DepthwiseConv2DBackpropFilter");
    Tensor* filter_backprop = nullptr;
    OP_REQUIRES_OK(context,
                   context->allocate_output(0, filter_shape, &filter_backprop));

    auto out_backprop_ptr = out_backprop.template flat<T>().data();
    auto input_ptr = input.template flat<T>().data();
    auto filter_backprop_ptr = filter_backprop->template flat<T>().data();
    // If there is nothing to compute, return.
    if (filter_shape.num_elements() == 0) {
      return;
    }
    LaunchDepthwiseConvBackpropFilterOp<Device, T>::launch(
        context, args, out_backprop_ptr, input_ptr, filter_backprop_ptr);
  }

 private:
  std::vector<int32> strides_;
  Padding padding_;

  TF_DISALLOW_COPY_AND_ASSIGN(DepthwiseConv2dNativeBackpropFilterOp);
};

#define REGISTER_CPU_KERNEL(T)                    \
  REGISTER_KERNEL_BUILDER(                        \
      Name("DepthwiseConv2dNativeBackpropFilter") \
          .Device(DEVICE_CPU)                     \
          .TypeConstraint<T>("T"),                \
      DepthwiseConv2dNativeBackpropFilterOp<CPUDevice, T>);
TF_CALL_float(REGISTER_CPU_KERNEL);
TF_CALL_double(REGISTER_CPU_KERNEL);
#undef REGISTER_CPU_KERNEL

#if GOOGLE_CUDA
REGISTER_KERNEL_BUILDER(
    Name("DepthwiseConv2dNativeBackpropFilter")
        .Device(DEVICE_GPU)
        .TypeConstraint<float>("T")
        .HostMemory("filter_sizes"),
    DepthwiseConv2dNativeBackpropFilterOp<GPUDevice, float>);

REGISTER_KERNEL_BUILDER(
    Name("DepthwiseConv2dNativeBackpropFilter")
        .Device(DEVICE_GPU)
        .TypeConstraint<double>("T")
        .HostMemory("filter_sizes"),
    DepthwiseConv2dNativeBackpropFilterOp<GPUDevice, double>);
#endif  // GOOGLE_CUDA

}  // namespace tensorflow
/* Copyright 2015 The TensorFlow Authors. All Rights Reserved.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

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

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/

#include "tensorflow/core/kernels/sparse_matmul_op.h"
#include "tensorflow/core/common_runtime/kernel_benchmark_testlib.h"
#include "tensorflow/core/framework/bfloat16.h"
#include "tensorflow/core/framework/tensor.h"
#include "tensorflow/core/framework/types.pb.h"
#include "tensorflow/core/graph/node_builder.h"
#include "tensorflow/core/lib/random/simple_philox.h"
#include "tensorflow/core/lib/strings/stringprintf.h"
#include "tensorflow/core/platform/test.h"
#include "tensorflow/core/platform/test_benchmark.h"

namespace tensorflow {
random::PhiloxRandom philox(1, 1);
random::SimplePhilox rnd(&philox);
using Eigen::operator==;

template <typename T>
void Sparsify(Tensor* t, float sparsity) {
  const int64 N = t->NumElements();
  CHECK_LE(sparsity


{
      if (value == null) { throw new NullPointerException(); }
      catalogName_ = value;
      bitField0_ |= 0x00000001;
      onChanged();
      return this;
    }
    /**
     *

     * Name of the catalog to modify.
     *

     *
     * string catalogName = 1;
     * @return This builder for chaining.
     */
    public Builder clearCatalogName() {
      catalogName_ = getDefaultInstance().getCatalogName();
      bitField0_ = (bitField0_ & ~0x00000001);
      onChanged();
      return this;
    }
    /**
     *

     * Name of the catalog to modify.
     *

     *
     * string catalogName = 1;
     * @param value The bytes for catalogName to set.
     * @return This builder for chaining.
     */
    public Builder setCatalogNameBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) { throw new NullPointerException(); }
      checkByteStringIsUtf8(value);
      catalogName_ = value;
      bitField0_ |= 0x00000001;
      onChanged();
      return this;
    }

    private boolean mutable_ ;
    /**
     *

     * Whether the catalog should be mutable (read-write) or immutable (read-only).
     *

     *
     * bool mutable = 2;
     * @return The mutable.
     */
    @java.lang.Override
    public boolean getMutable() {
      return mutable_;
    }
    /**
     *

     * Whether the catalog should be mutable (read-write) or immutable (read-only).
     *

     *
     * bool mutable = 2;
     * @param value The mutable to set.
     * @return This builder for chaining.
     */
    public Builder setMutable(boolean value) {

      mutable_ = value;
      bitField0_ |= 0x00000002;
      onChanged();
      return this;
    }
    /**
     *

     * Whether the catalog should be mutable (read-write) or immutable (read-only).
     *

     *
     * bool mutable = 2;
     * @return This builder for chaining.
     */
    public Builder clearMutable() {
      bitField0_ = (bitField0_ & ~0x00000002);
      mutable_ = false;
      onChanged();
      return this;
    }
    @java.lang.Override
    public final Builder setUnknownFields(
        final com.google.protobuf.UnknownFieldSet unknownFields) {
      return super.setUnknownFields(unknownFields);
    }

    @java.lang.Override
    public final Builder mergeUnknownFields(
        final com.google.protobuf.UnknownFieldSet unknownFields) {
      return super.mergeUnknownFields(unknownFields);
    }

    // @@protoc_insertion_point(builder_scope:io.evitadb.externalApi.grpc.generated.GrpcSetCatalogMutabilityMutation)
  }

  // @@protoc_insertion_point(class_scope:io.evitadb.externalApi.grpc.generated.GrpcSetCatalogMutabilityMutation)
  private static final io.evitadb.externalApi.grpc.generated.GrpcSetCatalogMutabilityMutation DEFAULT_INSTANCE;
  static {
    DEFAULT_INSTANCE = new io.evitadb.externalApi.grpc.generated.GrpcSetCatalogMutabilityMutation();
  }

  public static io.evitadb.externalApi.grpc.generated.GrpcSetCatalogMutabilityMutation getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

  private static final com.google.protobuf.Parser<GrpcSetCatalogMutabilityMutation>
      PARSER = new com.google.protobuf.AbstractParser<GrpcSetCatalogM


age of nodeMediatedDeviceTypes.mediatedDevicesTypes", func(shouldWarn bool, conf *v1.MediatedDevicesConfiguration) {
			kvObject := v1.KubeVirt{
				ObjectMeta: metav1.ObjectMeta{
					Name: "test",
				},
				Spec: v1.KubeVirtSpec{
					Configuration: v1.KubeVirtConfiguration{
						MediatedDevicesConfiguration: conf,
					},
				},
			}

			response := admit(context.Background(), kvObject)
			Expect(response).NotTo(BeNil())
			if shouldWarn {
				Expect(response.Warnings).NotTo(BeEmpty())
				Expect(response.Warnings).To(ContainElement("spec.configuration.mediatedDevicesConfiguration.nodeMediatedDeviceTypes[0].mediatedDevicesTypes is deprecated, use mediatedDeviceTypes"))
			} else {
				Expect(response.Warnings).To(BeEmpty())
			}
		}, Entry("should warn if used", warn, &v1.MediatedDevicesConfiguration{
			NodeMediatedDeviceTypes: []v1.NodeMediatedDeviceTypesConfig{
				{
					NodeSelector:         map[string]string{},
					MediatedDevicesTypes: []string{"test1", "test2"},
					MediatedDeviceTypes:  []string{},
				},
			},
		}),
			Entry("should not warn if empty", warnNotExpected, &v1.MediatedDevicesConfiguration{
				NodeMediatedDeviceTypes: []v1.NodeMediatedDeviceTypesConfig{
					{
						NodeSelector:         map[string]string{},
						MediatedDevicesTypes: []string{},
						MediatedDeviceTypes:  []string{},
					},
				},
			}),
			Entry("should not warn if nil", warnNotExpected, &v1.MediatedDevicesConfiguration{
				NodeMediatedDeviceTypes: []v1.NodeMediatedDeviceTypesConfig{
					{
						NodeSelector:         map[string]string{},
						MediatedDevicesTypes: nil,
						MediatedDeviceTypes:  []string{},
					},
				},
			}),

			Entry("should not warn if configuration nil", warnNotExpected, nil),
		)

		DescribeTable("should raise warning when a deprecated feature-gate is enabled", func(featureGate, expectedWarning string) {
			kv := v1.KubeVirt{}
			kvBytes, err := json.Marshal(kv)
			Expect(err).ToNot(HaveOccurred())

			kv.Spec.Configuration.DeveloperConfiguration = &v1.DeveloperConfiguration{FeatureGates: []string{featureGate}}
			kvUpdatedBytes, err := json.Marshal(kv)
			Expect(err).ToNot(HaveOccurred())

			request := &admissionv1.AdmissionReview{
				Request: &admissionv1.AdmissionRequest{
					Resource:  KubeVirtGroupVersionResource,
					Operation: admissionv1.Update,
					OldObject: runtime.RawExtension{Raw: kvBytes},
					Object:    runtime.RawExtension{Raw: kvUpdatedBytes},
				},
			}

			Expect(admitter.Admit(context.Background(), request)).To(Equal(&admissionv1.AdmissionResponse{
				Allowed: true,
				Warnings: []string{
					expectedWarning,
				},
			}))
		},
			Entry("with LiveMigration", featuregate.LiveMigrationGate, fmt.Sprintf(featuregate.WarningPattern, featuregate.LiveMigrationGate, featuregate.GA)),
			Entry("with SRIOVLiveMigration", featuregate.SRIOVLiveMigrationGate, fmt.Sprintf(featuregate.WarningPattern, featuregate.SRIOVLiveMigrationGate, featuregate.GA)),
			Entry("with NonRoot", featuregate.NonRoot, fmt.Sprintf(featuregate.WarningPattern, featuregate.NonRoot, featuregate.GA)),
			Entry("with PSA", featuregate.PSA, fmt.Sprintf(featuregate.WarningPattern, featuregate.PSA, featuregate.GA)),
			Entry("with CPUNodeDiscoveryGate", featuregate.CP


", " bar");
        line_comment_test("/\n bar", " bar");
    }

    #[test]
    fn test_string_scan() {
        use StrKind::*;
        assert_eq!(check_raw_str(r#" "" "#, 1), Some(Normal));
        assert_eq!(check_raw_str(r#" r#"" "#, 3), Some(RawStr { hashes: 1 }));
        assert_eq!(check_raw_str(r#" r##"" "#, 4), Some(RawStr { hashes: 2 }));
        assert_eq!(check_raw_str(r#""" "#, 0), Some(Normal));
        // Error cases.
        assert_eq!(check_raw_str(r#" ##"" "#, 3), None);
        assert_eq!(check_raw_str(r#"##"" "#, 2), None);
    }

    fn char_scan_test(test: &str, after: &str, res: Option<EatCharRes>) {
        let mut i = test.char_indices().peekable();

        assert_eq!(i.next().unwrap(), (0, '\''));
        let actual = eat_char(&mut i);
        // Make sure we ended up where we said we would.
        let next_idx = i.next().map_or(test.len(), |t| t.0);
        assert_eq!(&test[next_idx..], after);
        assert_eq!(actual, res, "bad result for {}", test);
    }
    #[test]
    fn test_char_scan() {
        use EatCharRes::*;
        char_scan_test("'static", "static", Some(SawLifetime));
        char_scan_test("'s'abc", "abc", Some(AteChar));
        char_scan_test("'a ", "a ", Some(SawLifetime));
        char_scan_test("'\\\\' foo", " foo", Some(AteChar));
        char_scan_test("'\\\'' foo", " foo", Some(AteChar));
        char_scan_test("'\\u{1234}' foo", " foo", Some(AteChar));
        char_scan_test("'ü' abc", " abc", Some(AteChar));
        char_scan_test("'😀'foo", "foo", Some(AteChar));
        char_scan_test("'😀", "", None);

        char_scan_test("'\\\\'", "", Some(AteChar));
        char_scan_test("'\\\''", "", Some(AteChar));
        char_scan_test("'\\u{1234}", "", None);
        char_scan_test("'\\n'", "", Some(AteChar));

        char_scan_test("'a", "", None);
        char_scan_test("'", "", None);
        char_scan_test("'\n'", "\n'", Some(SawInvalid));
        char_scan_test("') ", ") ", Some(SawInvalid));
        char_scan_test("'\\\n ", "\\\n ", Some(SawInvalid));
        char_scan_test("'\\u{1234} \n\n'", "\\u{1234} \n\n'", Some(SawInvalid));
    }

    fn test_validity(frag: &str, expect: FragmentValidity) {
        assert_eq!(
            validate_source_fragment(frag),
            expect,
            "for source fragment: `{}`",
            frag
        );
        if expect == FragmentValidity::Invalid {
            return;
        }
        // Ensure that for valid/incomplete source strings, all prefixes are
        // either valid or incomplete. It seems like in the finished version of
        // the rustyline validation features we don't get called except on
        // newlines, so this is a bit more aggressive than we actually need.
        // Still, at the moment it doesn't hurt.
        for (i, _) in frag.char_indices() {
            assert_ne!(
                validate_source_fragment(&frag[..i]),
                Fragme


。

# 三．填空（20 分，每题 2 分）

1. 目标串长是 n，模式串长是 m，朴素模式匹配算法思想为：从目标串第一个字符开始，依次与模式串字符匹配；若匹配失败，则尝试匹配的目标串起始字符位置往后移一位，重新开始依次和模式串字符匹配；……. ；直到匹配成功或遍历完整个目标串为止。则该算法中字符的最多比较次数是 _ _ _ _ （使用大 O 表示法）。

2. 在一棵含有 n 个结点的树中，只有度（树节点的度指子节点数量）为 k 的分支结点和度为 0 的终端（叶子）结点，则该树中含有的终端（叶子）结点的数目为： _ _ _ _ 。

3. 对一组记录进行非递减排序，其关键码为[46，70，56，38，40，80]，则利用快速排序的方法，以第一个记录为基准得到的第一次划分结果为 _ _ _ _

4. 对长度为 3 的顺序表进行查找，若查找第一个元素的概率为 1/2，查找第二个元素的概率为 1/4，查找第三个元素的概率为 1/8，则执行任意查找需要比较元素的平均个数为 _ _ _ _ 。

5. 设有一组记录的关键字为{19，14，23，1，68，20，84，27，55，11，10，79}，用链地址法（拉链法）构造散列表，散列函数为 H(key)=key MOD 13, 散列地址为 1 的链中有 _ _ _ _  个记录。

6. 删除长度为 n 的顺序表的第 i 个数据元素需要移动表中的  _ _ _ _ 个数据元素。（1<=i<=n）

7. 已知以数组表示的小根堆为[8，15，10，21，34，16，12]，删除关键字 8 之后需要重新建堆，在此过程中，关键字的比较次数是 _ _ _ _ _ 。

8. 在广度优先遍历、拓扑排序、求最短路径三种算法中，可以判断出一个有向图是否有环（回路）的是 _ _ _ _ 。

9. 有 n（n>=2）个顶点的有向强连通图最少有 _ _ _ _ _ 条边。

10. 若栈 S1 中保存整数，栈 S2 中保存运算符，函数 F() 依次执行下述各步操作：
    ①从 S1 中依次弹出两个操作数 a 和 b (先弹出 a，再弹出 b)；
    ②从 S2 中弹出一个运算符 op;
    ③执行相应的运算 b op a;
    ④将运算结果压入 S1 中。
    假定 S1 中的操作数依次是 5，8，3，2（2 在栈顶），S2 中的运算符依次是*，-，//（//在栈顶）。调用三次 F() 后，S1 栈顶保存的值是 _ _ _ _ 。

# 四．简答（3题，共20分）

1. （7 分）试用 Dijkstra 算法求出下图中顶点 1 到其余各顶点的最短路径，写出算法执行过程中各步的状态，填入下表。

   ```mermaid
   graph LR
       1((1)) --> |30|2((2)); 1--> |10|5((5)); 1 --> |60|4((4))
       2((2)) --> |20|3((3))
       3((3)) --> |15|4((4))
       5((5)) --> |15|2; 5 --> |7|6((6))
       6((6)) --> |3|2; 6 --> |16|3; 6 --> |8|7
       7((7)) --> |6|3; 7 --> |3|4; 7 --> |10|8((8))
       8 --> |6|4
   ``


",
						args: {
							sre_list: data.sr_entries.map((item) => item.sre),
						},
						freeze: true,
						freeze_message: __("Unreserving Stock..."),
						callback: (r) => {
							frm.doc.__onload.has_reserved_stock = false;
							frm.reload_doc();
						},
					});

					dialog.hide();
				} else {
					frappe.msgprint(__("Please select items to unreserve."));
				}
			},
		});

		frappe
			.call({
				method: "erpnext.stock.doctype.stock_reservation_entry.stock_reservation_entry.get_stock_reservation_entries_for_voucher",
				args: {
					voucher_type: frm.doctype,
					voucher_no: frm.docname,
				},
				callback: (r) => {
					if (!r.exc && r.message) {
						r.message.forEach((sre) => {
							if (flt(sre.reserved_qty) > flt(sre.delivered_qty)) {
								dialog.fields_dict.sr_entries.df.data.push({
									sre: sre.name,
									item_code: sre.item_code,
									warehouse: sre.warehouse,
									qty: flt(sre.reserved_qty) - flt(sre.delivered_qty),
								});
							}
						});
					}
				},
			})
			.then((r) => {
				dialog.fields_dict.sr_entries.grid.refresh();
				dialog.show();
			});
	},

	show_reserved_stock(frm) {
		// Get the latest modified date from the items table.
		var to_date = moment(new Date(Math.max(...frm.doc.items.map((e) => new Date(e.modified))))).format(
			"YYYY-MM-DD"
		);

		frappe.route_options = {
			company: frm.doc.company,
			from_date: frm.doc.transaction_date,
			to_date: to_date,
			voucher_type: frm.doc.doctype,
			voucher_no: frm.doc.name,
		};
		frappe.set_route("query-report", "Reserved Stock");
	},
});

frappe.ui.form.on("Sales Order Item", {
	item_code: function (frm, cdt, cdn) {
		var row = locals[cdt][cdn];
		if (frm.doc.delivery_date) {
			row.delivery_date = frm.doc.delivery_date;
			refresh_field("delivery_date", cdn, "items");
		} else {
			frm.script_manager.copy_from_first_row("items", row, ["delivery_date"]);
		}
	},
	delivery_date: function (frm, cdt, cdn) {
		if (!frm.doc.delivery_date) {
			erpnext.utils.copy_value_in_all_rows(frm.doc, cdt, cdn, "items", "delivery_date");
		}
	},
});

erpnext.selling.SalesOrderController = class SalesOrderController extends erpnext.selling.SellingController {
	onload(doc, dt, dn) {
		super.onload(doc, dt, dn);
	}

	refresh(doc, dt, dn) {
		var me = this;
		super.refresh();
		let allow_delivery = false;

		if (doc.docstatus == 1) {
			if (this.frm.has_perm("submit")) {
				if (doc.status === "On Hold") {
					// un-hold
					this.frm.add_custom_button(
						__("Resume"),
						function () {
							me.frm.cscript.update_status("Resume", "Draft");
						},
						__("Status")
					);

					if (flt(doc.per_delivered, 2) < 100 || flt(doc.per_billed, 2) < 100) {
						// close


/***************************************************************************
 *
 * Copyright (c) 2015 Baidu, Inc. All Rights Reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 **************************************************************************/
/**
* @created:     2015/06/18
* @filename:    python_args.h
* @author:      bigflow-opensource@baidu.com
* @brief:       python args implementation
*/

#ifndef PYTHON_ARGS_H_
#define PYTHON_ARGS_H_

namespace baidu {
namespace bigflow {
namespace python {

#include "boost/python.hpp"

struct PythonArgs {
    PythonArgs() : args(NULL), kargs(NULL) {}
    PythonArgs(boost::python::tuple* tuple,
               boost::python::dict* dict)
        :args(tuple), kargs(dict) {}
    boost::python::tuple* args;
    boost::python::dict* kargs;
};

} // namespace python
} // namespace bigflow
} // namespace baidu

#endif // PYTHON_ARGS_H_


genic variant in BRCA1.
  - Rebbeck et al., 2015: Discussed the clinical management of BRCA1 mutation carriers.
  - [PubMed search for rs121918719](https://pubmed.ncbi.nlm.nih.gov/?term=rs121918719)

---

#### 4. Allele Frequency Comparison:
- **Japanese population**: Rare; this mutation is not commonly observed in Japanese individuals.
- **Non-Japanese populations**: More frequent in individuals of Ashkenazi Jewish descent, where it is considered a founder mutation.
- **Source**: [gnomAD database](https://gnomad.broadinstitute.org/)

---

#### 5. GWAS Findings:
- No GWAS studies have directly linked rs121918719 to phenotypes beyond its established role in HBOC.

---

### Japanese Version:

**rs121918719**は、遺伝性乳がんおよび卵巣がん症候群（HBOC）に関連する**BRCA1**遺伝子の病原性変異としてよく知られています。以下に詳細情報を示します。

---

#### 1. 変異の識別情報:
- **rs番号**: rs121918719
- **HGVS表記**: NM_007294.4(BRCA1):c.5266dupC (p.Gln1756ProfsTer25)
- **遺伝子名**: BRCA1
- **転写産物名**: NM_007294.4
- **リンク**:
  - [ClinVarエントリー rs121918719](https://www.ncbi.nlm.nih.gov/clinvar/variation/17661/)
  - [dbSNPエントリー rs121918719](https://www.ncbi.nlm.nih.gov/snp/rs121918719)

この変異は、5266番目の位置でシトシンが重複することによるフレームシフト変異であり、早期終止コドンを引き起こし、タンパク質が短縮されます。

---

#### 2. 疾患との関連性:
- **臨床的意義**: 病原性
- **関連疾患**:
  - 遺伝性乳がんおよび卵巣がん症候群（HBOC）
  - 乳がんおよび卵巣がんのリスク増加。
- **予測モデル**: フレームシフト変異には適用されません。通常、タンパク質機能の喪失を引き起こします。

---

#### 3. 文献証拠:
- この変異は広く研究されており、BRCA1の病原性変異の中で最も一般的なものの1つです。
- 主な研究:
  - Easton et al., 2007: BRCA1の再発性病原性変異としてこの変異を特定。
  - Rebbeck et al., 2015: BRCA1変異保有者の臨床管理について議論。
  - [PubMed検索 rs121918719](https://pubmed.ncbi.nlm.nih.gov/?term=rs121918719)

---

#### 4. 対立遺伝子頻度の比較:
- **日本人集団**: 稀; この変異は日本人では一般的に観察されません。
- **非日本人集団**: アシュケナージ系ユダヤ人において頻度が高く、創始者変異と考えられています。
- **ソース**: [gnomADデータベース](https://gnomad.broadinstitute.org/)

---

#### 5. GWASの発見:
- rs121918719に関連するGWAS研究は、HBOC以外の表現型に直接リンクしていません。

---

If you need further clarification or additional details, feel free to ask!
追加の情報が必要な


 Style v8
------------------------------------*/
.navbar .u-main-nav-v8 .nav-link {
  color: #333;
  padding: 0.78571rem 2.14286rem;
}

.navbar .u-main-nav-v8 .nav-item.hs-has-sub-menu > a, .navbar .u-main-nav-v8 .nav-item.hs-has-mega-menu > a, .navbar .u-main-nav-v8 .nav-item.dropdown > a {
  padding-right: 3.21429rem;
}

.navbar .u-main-nav-v8 .nav-item.hs-has-sub-menu > a::after, .navbar .u-main-nav-v8 .nav-item.hs-has-mega-menu > a::after, .navbar .u-main-nav-v8 .nav-item.dropdown > a::after {
  right: 1.78571rem;
}

.navbar .u-main-nav-v8 .nav-item.active > .nav-link,
.navbar .u-main-nav-v8 .nav-item:hover > .nav-link,
.navbar .u-main-nav-v8 .nav-item:focus > .nav-link,
.navbar .u-main-nav-v8 .nav-item.show > .nav-link,
.navbar .u-main-nav-v8 .nav-item.hs-sub-menu-opened > .nav-link,
.navbar .u-main-nav-v8 .nav-item .nav-link:focus {
  color: #fff;
  background-color: #72c02c;
}

@media all and (max-width: 1199px) {
  .navbar .u-main-nav-v8 .nav-link {
    padding: 0.64286rem 1.42857rem;
  }
  .navbar .u-main-nav-v8 .nav-item.hs-has-sub-menu > a, .navbar .u-main-nav-v8 .nav-item.hs-has-mega-menu > a, .navbar .u-main-nav-v8 .nav-item.dropdown > a {
    padding-right: 2.14286rem;
  }
  .navbar .u-main-nav-v8 .nav-item.hs-has-sub-menu > a::after, .navbar .u-main-nav-v8 .nav-item.hs-has-mega-menu > a::after, .navbar .u-main-nav-v8 .nav-item.dropdown > a::after {
    right: 1.07143rem;
  }
}

/*------------------------------------
  Navigation Style v9
------------------------------------*/
.navbar .u-main-nav-v9 .nav-link {
  color: #777;
  padding: 0 1.42857rem 0 0;
}

.navbar .u-main-nav-v9 .nav-item > a {
  padding: 1.42857rem 0;
}

.navbar .u-main-nav-v9 .nav-item.hs-has-sub-menu > a::after, .navbar .u-main-nav-v9 .nav-item.hs-has-mega-menu > a::after {
  font-size: 1.28571rem;
  right: 0;
}

.navbar .u-main-nav-v9 .nav-item.active > .nav-link,
.navbar .u-main-nav-v9 .nav-item:hover > .nav-link,
.navbar .u-main-nav-v9 .nav-item:focus > .nav-link,
.navbar .u-main-nav-v9 .nav-item .nav-link:focus {
  color: #000;
}

.navbar .u-main-nav-v9 .nav-item.active > .nav-link::after,
.navbar .u-main-nav-v9 .nav-item:hover > .nav-link::after,
.navbar .u-main-nav-v9 .nav-item:focus > .nav-link::after,
.navbar .u-main-nav-v9 .nav-item .nav-link:focus::after {
  color:


b,tex)
	-- slab.ping:GetTexture():draw(t,w,h)
	--lch:draw(t,w,h,{clip={tex}})
	--ut.ClearDepth()
	lch:process(tex)
end
GL:start()
--]=]
return M


entry.text] or entry.text);
						end
					end
					control.tooltipRequirement = entry.tooltipRequirement;

					control.gameRestart = entry.gameRestart;
					control.logout = entry.logout;

					control.event = entry.event or entry.text;

					if ( control.cvar ) then
						if ( control.type == CONTROLTYPE_CHECKBOX ) then
							control.defaultValue = control.defaultValue or GetCVarDefault(control.cvar);
						else
							control.defaultValue = BlizzardOptionsPanel_GetCVarDefaultSafe(control.cvar);
							minValue = entry.minValue;
							maxValue = entry.maxValue;
						end
					else
						control.defaultValue = control.defaultValue or entry.default;
						minValue = entry.minValue;
						maxValue = entry.maxValue;
					end

					if ( control.type == CONTROLTYPE_SLIDER ) then
						BlizzardOptionsPanel_Slider_Enable(control);
						control:SetMinMaxValues(minValue, maxValue);
						control:SetValueStep(entry.valueStep);
					end

					securecall(BlizzardOptionsPanel_SetupControl, control);
				end
			end
		end
		if ( not frame.keepPEWRegistered ) then
			frame:UnregisterEvent(event);
		end
	end
end

function BlizzardOptionsPanel_RegisterControl (control, parentFrame)
	if ( ( not parentFrame ) or ( not control ) ) then
		return;
	end

	parentFrame.controls = parentFrame.controls or {};

	tinsert(parentFrame.controls, control);

	-- Use the panel's OnEvent handler to wait and setup the control after game data is loaded
end

function BlizzardOptionsPanel_SetupControl (control)
	if ( control.type == CONTROLTYPE_CHECKBOX ) then
		if ( control.cvar ) then
			local value = GetCVar(control.cvar);
			control.value = value;

			if ( control.uvar ) then
				_G[control.uvar] = value;
			end

			control.GetValue = function(self) return GetCVar(self.cvar); end
			control.SetValue = function(self, value) self.value = value; BlizzardOptionsPanel_SetCVarSafe(self.cvar, value, self.event); if ( self.uvar ) then _G[self.uvar] = value end end
			control.Disable = function (self) getmetatable(self).__index.Disable(self) _G[self:GetName().."Text"]:SetTextColor(GRAY_FONT_COLOR.r, GRAY_FONT_COLOR.g, GRAY_FONT_COLOR.b) end;
			control.Enable = function (self)
				getmetatable(self).__index.Enable(self);
				local text = _G[self:GetName().."Text"];
				local fontObject = text:GetFontObject();
				_G[self:GetName().."Text"]:SetTextColor(fontObject:GetTextColor());
			end
		elseif ( control.GetValue ) then
			if ( control.type == CONTROLTYPE_CHECKBOX ) then
				local value = control:GetValue();
				if ( value ) then
					control.value = tostring(value);
				else
					control.value = "0";
				end
				if ( control.uvar ) then
					_G[control.uvar] = value;
				end

				control.SetValue = function(self, value) self.value = value; if ( self.uvar ) then _G[self.uvar] = value; end end;
				control.Disable = function (self) getmetatable(self).__index.Disable(self) _G[self:GetName().."Text"]:SetTextColor(GRAY_FONT_COLOR.r, GRAY_FONT_COLOR.g, GRAY_FONT_COLOR.b) end;
				control.Enable = function (self)
					getmetatable(self).__index.Enable(self);
					local text = _G[self:GetName().."Text"];
					local fontObject = text:GetFontObject();
					_G[self:GetName().."Text"]:SetTextColor(fontObject:GetTextColor());
				end
			end


 it again.
      */
      !((*item)->data_type() == field_item->data_type() &&
        (*item)->basic_const_item())) {
    TABLE *table = field->table;
    sql_mode_t orig_sql_mode = thd->variables.sql_mode;
    enum_check_fields orig_check_for_truncated_fields =
        thd->check_for_truncated_fields;
    my_bitmap_map *old_maps[2];
    ulonglong orig_field_val = 0; /* original field value if valid */

    old_maps[0] = nullptr;
    old_maps[1] = nullptr;

    if (table)
      dbug_tmp_use_all_columns(table, old_maps, table->read_set,
                               table->write_set);
    /* For comparison purposes allow invalid dates like 2000-01-32 */
    thd->variables.sql_mode =
        (orig_sql_mode & ~MODE_NO_ZERO_DATE) | MODE_INVALID_DATES;
    thd->check_for_truncated_fields = CHECK_FIELD_IGNORE;

    /*
      Store the value of the field/constant if it references an outer field
      because the call to save_in_field below overrides that value.
      Don't save field value if no data has been read yet.
      Outer constant values are always saved.
    */
    bool save_field_value =
        field_item->depended_from &&
        (field_item->const_item() || field->table->has_row());
    if (save_field_value) orig_field_val = field->val_int();
    int rc;
    if (!(*item)->is_null() &&
        (((rc = (*item)->save_in_field(field, true)) == TYPE_OK) ||
         rc == TYPE_NOTE_TIME_TRUNCATED))  // TS-TODO
    {
      int field_cmp = 0;
      /*
        If item is a decimal value, we must reject it if it was truncated.
        TODO: consider doing the same for MYSQL_TYPE_YEAR,.
        However: we have tests which assume that things '1999' and
        '1991-01-01 01:01:01' can be converted to year.
        Testing for MYSQL_TYPE_YEAR here, would treat such literals
        as 'incorrect DOUBLE value'.
        See Bug#13580652 YEAR COLUMN CAN BE EQUAL TO 1999.1
      */
      if (field->type() == MYSQL_TYPE_LONGLONG) {
        field_cmp = stored_field_cmp_to_item(thd, field, *item);
        DBUG_PRINT("info", ("convert_constant_item %d", field_cmp));
      }

      if (0 == field_cmp) {
        Item *tmp =
            field->type() == MYSQL_TYPE_TIME
                ?
#define OLD_CMP
#ifdef OLD_CMP
                new Item_time_with_ref(field->decimals(),
                                       field->val_time_temporal(), *item)
                :
#else
                new Item_time_with_ref(
                    max((*item)->time_precision(), field->decimals()),
                    (*item)->val_time_temporal(), *item)
                :
#endif
                is_temporal_type_with_date(field->type())
                    ?
#ifdef OLD_CMP
                    new Item_datetime_with_ref(field->type(), field->decimals(),
                                               field->val_date_temporal(),
                                               *item)
                    :
#else
                    new Item_datetime_with_ref(
                        field->type(),
                        max((*item)->datetime_precision(), field->decimals()),
                        (*item)->val_date_temporal(), *item)
                    :
#endif
                    field->type() == MYSQL_TYPE_YEAR
                        ? make_year_constant(field)


4 17.4-65.1 24.3-90 26.9l20.9 20.6 76.3 76.3c27.9 28.6-17.5 73.3-45.7 45.7-19.1-19.4-47.1-47.4-76.3-76.6L84 503.4c-28.2 27.5-73.6-17.6-45.4-45.7 19.4-19.4 47.1-47.4 76.3-76.3l20.6-20.6c-24.6-2.6-62.9-9.1-90.6-26.9-32.6-21-46.9-33.3-34.3-59 7.4-14.6 27.7-26.9 54.6-5.7 0 0 36.3 28.9 94.9 28.9s94.9-28.9 94.9-28.9c26.9-21.1 47.1-8.9 54.6 5.7 12.4 25.7-1.9 38-34.5 59.1zM30.3 129.7C30.3 58 88.6 0 160 0s129.7 58 129.7 129.7c0 71.4-58.3 129.4-129.7 129.4s-129.7-58-129.7-129.4zm66 0c0 35.1 28.6 63.7 63.7 63.7s63.7-28.6 63.7-63.7c0-35.4-28.6-64-63.7-64s-63.7 28.6-63.7 64z"/></svg>';
  static const String old_republic =
      '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="496" height="512" preserveAspectRatio="xMidYMid meet" viewBox="0 0 496 512"><path fill="currentColor" d="M235.76 10.23c7.5-.31 15-.28 22.5-.09 3.61.14 7.2.4 10.79.73 4.92.27 9.79 1.03 14.67 1.62 2.93.43 5.83.98 8.75 1.46 7.9 1.33 15.67 3.28 23.39 5.4 12.24 3.47 24.19 7.92 35.76 13.21 26.56 12.24 50.94 29.21 71.63 49.88 20.03 20.09 36.72 43.55 48.89 69.19 1.13 2.59 2.44 5.1 3.47 7.74 2.81 6.43 5.39 12.97 7.58 19.63 4.14 12.33 7.34 24.99 9.42 37.83.57 3.14 1.04 6.3 1.4 9.47.55 3.83.94 7.69 1.18 11.56.83 8.34.84 16.73.77 25.1-.07 4.97-.26 9.94-.75 14.89-.24 3.38-.51 6.76-.98 10.12-.39 2.72-.63 5.46-1.11 8.17-.9 5.15-1.7 10.31-2.87 15.41-4.1 18.5-10.3 36.55-18.51 53.63-15.77 32.83-38.83 62.17-67.12 85.12a246.503 246.503 0 01-56.91 34.86c-6.21 2.68-12.46 5.25-18.87 7.41-3.51 1.16-7.01 2.38-10.57 3.39-6.62 1.88-13.29 3.64-20.04 5-4.66.91-9.34 1.73-14.03 2.48-5.25.66-10.5 1.44-15.79 1.74-6.69.66-13.41.84-20.12.81-6.82.03-13.65-.12-20.45-.79-3.29-.23-6.57-.5-9.83-.95-2.72-.39-5.46-.63-8.17-1.11-4.12-.72-8.25-1.37-12.35-2.22-4.25-.94-8.49-1.89-12.69-3.02-8.63-2.17-17.08


earch term
vim.opt.ignorecase = true
vim.opt.smartcase = true

-- Keep signcolumn on by default
vim.opt.signcolumn = 'yes'

-- Decrease update time
vim.opt.updatetime = 250

-- Decrease mapped sequence wait time
-- Displays which-key popup sooner
vim.opt.timeoutlen = 300

-- Configure how new splits should be opened
vim.opt.splitright = true
vim.opt.splitbelow = true

-- Sets how neovim will display certain whitespace characters in the editor.
vim.opt.list = true
vim.opt.listchars = { tab = '» ', trail = '·', nbsp = '␣' }

-- Preview substitutions live, as you type!
vim.opt.inccommand = 'split'

-- Show which line your cursor is on
vim.opt.cursorline = true

-- Minimal number of screen lines to keep above and below the cursor.
vim.opt.scrolloff = 10


   ..sort()
      ..add(code.length);

    final blocks = new Map<int, BB>();
    for (var i = 0; i < entries.length - 1; i++) {
      blocks[entries[i]] = new BB(i, code.getRange(entries[i], entries[i + 1]));
    }

    addSuccessor(block, succ) {
      if (succ is int) {
        assert(blocks.containsKey(succ));
        block.edge(blocks[succ]);
      } else {
        assert(succ is CallTarget);
      }
    }

    var next = 0;
    for (var block in blocks.values) {
      next++;

      final last = block.asm.last;
      final opcode = last.opcode;
      if (opcode == "jmp") {
        addSuccessor(block, last.operands[0]);
      } else if (opcode.startsWith("j")) {
        addSuccessor(block, entries[next]);
        addSuccessor(block, last.operands[0]);
      } else if (opcode == "retq" || (opcode == "callq" && last.operands[0].attributes.contains(CallTargetAttribute.NORETURN))) {
        // No successors.
      } else if (next < entries.length - 1) {
        addSuccessor(block, entries[next]);
      }
    }

    return new Ir(new Map.fromIterable(blocks.values, key: (block) => block.name, value: (block) => block), blocks);
  }

  final _changesController = new StreamController.broadcast();
  get changes => _changesController.stream;
}

parse(String text) => new ParsedCode(text);

final instructionSeq = (commentSeq.optional() & instruction.trim().plus()).end();

final instruction = ((hexValue & p.char(':')).pick(0) & (trim(prefixes) & trim(p.word().plus().flatten())).pick(1) & operandSeq.optional() & commentSeq).map((matches) {
  final addr = matches[0];
  final opcode = matches[1];
  final operands = matches[2] == null ? const [] : matches[2];
  final comments = matches[3];
  return new Instruction(addr, opcode, operands, comments);
});

final ws = p.anyOf("\t ");
final trim = (p) => p.trim(ws, ws);

final commentSeq = (p.anyOf(";#") & p.noneOf('\n').star() & p.char('\n')).flatten().trim().star().map((matches) => matches.join(''));

final prefixes = p.string("data32").optional();

final regName = (p.char("%") & p.lowercase().or(p.digit()).plus()).flatten().map(Reg.from);

final aComma = p.char(",");

final aScale = p.anyOf("1248");

final addrMode = (p.char("(") &
    regName.optional() & (aComma & regName & (aComma & aScale).pick(1).optional()).optional() &
    p.char(")")).map((am) {
    final base = am[1];
    final index = am[2] != null ? am[2][1] : null;
    final scale = am[2] != null ? am[2][2] : null;
    return new Addr(base, index, scale, null);
  });

final hexValue = (p.char("-").optional() & p.string("0x") & p.anyOf("0123456789abcdef").plus()).flatten();
final immValue = (p.char(r"$") & hexValue).flatten();

final anOperand = regName
                | immValue.map((value) => new Imm(value))
                | (hexValue & addrMode.optional()).map((addr) {
                    final offset = addr[0];
                    final base = addr[1];

                    return new Addr.withOffset(base, offset);
                  })
                |


// Copyright © Microsoft Corporation.
// This source file is subject to the Microsoft Permissive License.
// See http://www.microsoft.com/resources/sharedsource/licensingbasics/sharedsourcelicenses.mspx.
// All other rights reserved.

// Change History
// 03/09/2013 - EFW - Moved the class into the Snippets namespace and made it public

namespace Sandcastle.Tools.BuildComponents.Snippets
{
    /// <summary>
    /// This represents a stored snippet
    /// </summary>
    public class StoredSnippet
    {
        #region Properties
        //=====================================================================

        /// <summary>
        /// This read-only property returns the snippet text


Code(peek));
      case chars.$QUESTION:
        return this.scanQuestion(start);
      case chars.$LT:
      case chars.$GT:
        return this.scanComplexOperator(start, String.fromCharCode(peek), chars.$EQ, '=');
      case chars.$BANG:
      case chars.$EQ:
        return this.scanComplexOperator(
            start, String.fromCharCode(peek), chars.$EQ, '=', chars.$EQ, '=');
      case chars.$AMPERSAND:
        return this.scanComplexOperator(start, '&', chars.$AMPERSAND, '&');
      case chars.$BAR:
        return this.scanComplexOperator(start, '|', chars.$BAR, '|');
      case chars.$NBSP:
        while (chars.isWhitespace(this.peek)) this.advance();
        return this.scanToken();
    }

    this.advance();
    return this.error(`Unexpected character [${String.fromCharCode(peek)}]`, 0);
  }

  scanCharacter(start: number, code: number): Token {
    this.advance();
    return newCharacterToken(start, this.index, code);
  }

  scanOperator(start: number, str: string): Token {
    this.advance();
    return newOperatorToken(start, this.index, str);
  }

  /**
   * Tokenize a 2/3 char long operator
   *
   * @param start start index in the expression
   * @param one first symbol (always part of the operator)
   * @param twoCode code point for the second symbol
   * @param two second symbol (part of the operator when the second code point matches)
   * @param threeCode code point for the third symbol
   * @param three third symbol (part of the operator when provided and matches source expression)
   */
  scanComplexOperator(
      start: number, one: string, twoCode: number, two: string, threeCode?: number,
      three?: string): Token {
    this.advance();
    let str: string = one;
    if (this.peek == twoCode) {
      this.advance();
      str += two;
    }
    if (threeCode != null && this.peek == threeCode) {
      this.advance();
      str += three;
    }
    return newOperatorToken(start, this.index, str);
  }

  scanIdentifier(): Token {
    const start: number = this.index;
    this.advance();
    while (isIdentifierPart(this.peek)) this.advance();
    const str: string = this.input.substring(start, this.index);
    return KEYWORDS.indexOf(str) > -1 ? newKeywordToken(start, this.index, str) :
                                        newIdentifierToken(start, this.index, str);
  }

  /** Scans an ECMAScript private identifier. */
  scanPrivateIdentifier(): Token {
    const start: number = this.index;
    this.advance();
    if (!isIdentifierStart(this.peek)) {
      return this.error('Invalid character [#]', -1);
    }
    while (isIdentifierPart(this.peek)) this.advance();
    const identifierName: string = this.input.substring(start, this.index);
    return newPrivateIdentifierToken(start, this.index, identifierName);
  }

  scanNumber(start: number): Token {
    let simple = (this.index === start);
    let hasSeparators = false;
    this.advance();  // Skip initial digit.
    while (true) {
      if (chars.isDigit(this.peek)) {
        // Do nothing.
      } else if (this.peek === chars.$_) {
        // Separators are only valid when they're surrounded by digits. E.g. `1_0_1` is
        // valid while `_101` and `101_` are not. The separator can't be next to the decimal
        // point or another separator either. Note that it's unlikely that we'll hit a c


 provide extra credentials to generate seed, default to null
    * @returns {BTCWallet}
    * @memberof BTCWallet
    */
    public static generate(strength: number, network: NETWORK, lang: LANGUAGE, passphrase?: string): BTCWallet {
        const mn = new Mnemonic(lang);
        passphrase = passphrase || '';
        strength = strength || 128;

        const mnemonics = mn.generate(strength);
        if (!mn.check(mnemonics)) {
            throw new Error('Invalid Mnemonic words!');
        }
        const seed = mn.toSeed(mnemonics, passphrase);
        const hdpriv = bitcore.HDPrivateKey.fromSeed(seed, network);

        const btcwallet = new BTCWallet();
        btcwallet.rootXpriv = hdpriv.toString();

        // TODO: encrypt
        btcwallet.mnemonics = mnemonics;

        return btcwallet;
    }

    /**
     * Build HD wallet from mnemonic words
     *
     * @static
     * @param {string} mnemonic Mnemonic words
     * @param {("mainnet" | "testnet")} network Which network to use
     * @param {("english" | "chinese_simplified" | "chinese_traditional")} lang Language
     * @param {string} [passphrase] Passphrase used as salt, don't recommand to use
     * @returns {BTCWallet}
     * @memberof BTCWallet
     */
    public static fromMnemonic(mnemonic: string, network: NETWORK, lang: LANGUAGE, passphrase?: string): BTCWallet {
        const mn = new Mnemonic(lang);
        passphrase = passphrase || '';

        if (!mn.check(mnemonic)) {
            throw new Error('Invalid Mnemonic words!');
        }
        const seed = mn.toSeed(mnemonic, passphrase);

        const hdpriv = bitcore.HDPrivateKey.fromSeed(seed, network);
        const btcwallt = new BTCWallet();

        btcwallt.rootXpriv = hdpriv.toString();
        btcwallt.mnemonics = mnemonic;
        btcwallt.rootSeed = seed;
        btcwallt.network = network;
        btcwallt.language = lang;

        btcwallt.lock();

        return btcwallt;
    }

    public static fromSeed(seed: string, network: NETWORK, lang: LANGUAGE): BTCWallet {
        // TODO: check seed ?
        const hdpriv = bitcore.HDPrivateKey.fromSeed(seed, network);
        const btcwallt = new BTCWallet();

        btcwallt.rootXpriv = hdpriv.toString();
        btcwallt.rootSeed = seed;
        btcwallt.network = network;
        btcwallt.language = lang;

        btcwallt.lock();

        return btcwallt;
    }

    /**
     * Restore wallet from previously exported json string
     *
     * @static
     * @param {string} json
     * @param {string} passphrase
     * @returns {BTCWallet}
     * @memberof BTCWallet
     */
    public static fromJSON(json: string, passphrase?: string): BTCWallet {
        const obj = JSON.parse(json);
        const rootseed = obj.rootseed;
        const network = obj.network;
        const language = obj.language;

        return BTCWallet.fromSeed(rootseed, network, language);
    }

    public getTotalBlance(): number {
        return this.totalBalance;
    }
    public setTotalBlance(totalBalance: number): void {
        this.totalBalance = totalBalance;
    }

    public lock(): void {
        if (this.isLocked === false) {
            this.isLocked = true;
        }
    }

    public unlock(): void {
        if (this.isLocked === true) {
            this.isLocked = false;
        }
    }

    public exportMnemonics(): string {
        if (this.isLoc


Accessor {
	/** Get the specified Datum from the passed DataManager and bundle */
	public Object get(DataManager data, Datum datum, Bundle rawData);
	/** Set the specified Datum in the passed DataManager and bundle */
	public void set(DataManager data, Datum datum, Bundle rawData, Object value);
	/** Check if the specified Datum is present in the passed DataManager and bundle */
	public boolean isPresent(DataManager data, Datum datum, Bundle rawData);
}/*
 * @copyright 2013 Philip Warner
 * @license GNU General Public License
 *
 * This file is part of Book Catalogue.
 *
 * Book Catalogue 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.
 *
 * Book Catalogue 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 Book Catalogue.  If not, see <http://www.gnu.org/licenses/>.
 */
package com.eleybourn.bookcatalogue.datamanager;

import com.eleybourn.bookcatalogue.R;

/**
 * Validator to apply a default String value to empty fields.
 *
 * @author Philip Warner
 *
 */
public class DefaultFieldValidator implements DataValidator {
	protected String mDefault;
	/**
	 * Allow for no default value.
	 */
	DefaultFieldValidator() {
		this("");
	}
	/**
	 * Constructor with default value
	 * @param defaultValue Default to apply
	 */
	DefaultFieldValidator(String defaultValue) {
		mDefault = defaultValue;
	}

	@Override
	public void validate(DataManager data, Datum datum, boolean crossValidating) {
		if (! datum.isVisible()) {
			// No validation required for invisible fields
			return;
		}
		Object value = data.get(datum);
		// Default validator does not cross-validate
		if (crossValidating)
			return;

		try {
			if (value.toString().trim().equals("")) {
				data.putString(datum, mDefault);
			}
			return;
		} catch (Exception e) {
			throw new ValidatorException(R.string.vldt_unable_to_get_value, new Object[]{datum.getKey()});
		}
	}
}package com.eleybourn.bookcatalogue.filechooser;

import java.io.File;
import java.text.DateFormat;
import java.util.Date;

import android.content.Context;
import android.content.res.Resources;
import android.os.Parcel;
import android.os.Parcelable;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.eleybourn.bookcatalogue.BookCatalogueApp;
import com.eleybourn.bookcatalogue.R;
import com.eleybourn.bookcatalogue.backup.BackupInfo;
import com.eleybourn.bookcatalogue.filechooser.FileChooserFragment.FileDetails;
import com.eleybourn.bookcatalogue.utils.Logger;
import com.eleybourn.bookcatalogue.utils.Utils;

/**
 * Implementation of FileDetails that record data about backup files in a background thread.
 *
 * @author pjw
 */
public class BackupFileDetails implements FileDetails {
	// IMPORTANT NOTE: If fields are added, then writeToParcelable and the parcelable constructor
	// must also be modified.

	/**


      if (err) {
        (*err) = "Invalid type for chunk1 data.";
      }
      return false;
    }

    //std::cout << "chunk1_length = " << chunk1_length << "\n";

    bin_data_ = bytes + header_and_json_size +
                8;  // 4 bytes (bin_buffer_length) + 4 bytes(bin_buffer_format)

    bin_size_ = size_t(chunk1_length);
  }

  // Extract JSON string.
  std::string jsonString(reinterpret_cast<const char *>(&bytes[20]),
                         chunk0_length);

  is_binary_ = true;

  bool ret = LoadFromString(model, err, warn,
                            reinterpret_cast<const char *>(&bytes[20]),
                            chunk0_length, base_dir, check_sections);
  if (!ret) {
    return ret;
  }

  return true;
}

bool TinyGLTF::LoadBinaryFromFile(Model *model, std::string *err,
                                  std::string *warn,
                                  const std::string &filename,
                                  unsigned int check_sections) {
  std::stringstream ss;

  if (fs.ReadWholeFile == nullptr) {
    // Programmer error, assert() ?
    ss << "Failed to read file: " << filename
       << ": one or more FS callback not set" << std::endl;
    if (err) {
      (*err) = ss.str();
    }
    return false;
  }

  std::vector<unsigned char> data;
  std::string fileerr;
  bool fileread = fs.ReadWholeFile(&data, &fileerr, filename, fs.user_data);
  if (!fileread) {
    ss << "Failed to read file: " << filename << ": " << fileerr << std::endl;
    if (err) {
      (*err) = ss.str();
    }
    return false;
  }

  std::string basedir = GetBaseDir(filename);

  bool ret = LoadBinaryFromMemory(model, err, warn, &data.at(0),
                                  static_cast<unsigned int>(data.size()),
                                  basedir, check_sections);

  return ret;
}

///////////////////////
// GLTF Serialization
///////////////////////
namespace detail {
detail::json JsonFromString(const char *s) {
#ifdef TINYGLTF_USE_RAPIDJSON
  return detail::json(s, detail::GetAllocator());
#else
  return detail::json(s);
#endif
}

void JsonAssign(detail::json &dest, const detail::json &src) {
#ifdef TINYGLTF_USE_RAPIDJSON
  dest.CopyFrom(src, detail::GetAllocator());
#else
  dest = src;
#endif
}

void JsonAddMember(detail::json &o, const char *key, detail::json &&value) {
#ifdef TINYGLTF_USE_RAPIDJSON
  if (!o.IsObject()) {
    o.SetObject();
  }
  o.AddMember(detail::json(key, detail::GetAllocator()), std::move(value), detail::GetAllocator());
#else
  o[key] = std::move(value);
#endif
}

void JsonPushBack(detail::json &o, detail::json &&value) {
#ifdef TINYGLTF_USE_RAPIDJSON
  o.PushBack(std::move(value), detail::GetAllocator());
#else
  o.push_back(std::move(value));
#endif
}

bool JsonIsNull(const detail::json &o) {
#ifdef TINYGLTF_USE_RAPIDJSON
  return o.IsNull();
#else
  return o.is_null();
#endif
}

void JsonSetObject(detail::json &o) {
#ifdef TINYGLTF_USE_RAPIDJSON
  o.SetObject();
#else
  o = o.object({});
#endif
}

void JsonReserveArray(detail::json &o, size_t s) {
#ifdef TINYGLTF_USE_RAPIDJSON
  o.SetArray();
  o.Reserve(st


dioName = file.name;
          pegg = (duration.inMinutes + 1) * 2;
          audioDuration = formatDuration(duration);
        });
      }
    } else {
      // User canceled the picker
    }
  }

  ///获取组装剧本的数据
  Future<TaskResult<AiSceneGood?>> getAiSceneGood() async {
    String content;
    if (inputType == 0) {
      ///AI自动写分镜文字内容
      return await AiWriteKey.currentState?.aiWriteArticle() ??
          TaskResult(data: null, success: false, msg: "出错了！");
    } else if (inputType == 1) {
      _textEditingController.text = "";
      return await getSrtSentences();
    } else {
      content = _textEditingController.text;
      if (content.isEmpty) {
        return TaskResult(data: null, success: false, msg: "请输入文案内容！");
      }
      //分句+获取角色列表
      List<SrtModel> srtModelList =
          await widget.httpAiConfigRepository.loadSentence(content);
      RolesAndScenes? rolesAndScenes = await HttpAiConfigRepository()
          .aiAnalyseRolesAndScenes(prompt: content);
      audioPath = "";
      srtPath = "";
      return TaskResult(
        data: AiSceneGood(
            srtModelList: srtModelList,
            rolesAndScenes: rolesAndScenes,
            audioPath: audioPath),
        success: true,
      );
    }
  }

  ///走上传音频和srt逻辑
  Future<TaskResult<AiSceneGood?>> getSrtSentences() async {
    if (audioPath.isEmpty) {
      return TaskResult(data: null, success: false, msg: "请先上传音频文件");
    }
    List<SrtModel> srtModelList;
    if (srtPath.isEmpty) {
      //通过ART识别接口
      srtModelList = await transAudioToSentence();
    } else {
      srtModelList = transSrtToSentence();
    }
    String content = "";
    List<SrtModel> newSrtModels = [];
    for (int i = 0; i < srtModelList.length; i++) {
      SrtModel srtModel = srtModelList[i];
      content += srtModel.sentence;
      //25个字到45个之间
      if (srtModel.sentence.length >= 25) {
        newSrtModels.add(srtModel);
        // debugPrint("不用合并分句：" + srtModel.toString());
      } else {
        while ((i + 1) < srtModelList.length &&
            (srtModel.sentence.length + srtModelList[i + 1].sentence.length) <=
                40) {
          RegExp regExp = RegExp(
              r'[\p{P}\p{S}\u0020-\u002F\u003A-\u0040\u005B-\u0060\u007B-\u007E\u3000-\u303F\uFF00-\uFF60\uFFE0-\uFFE6]$');
          bool endsWithPunctuation = regExp.hasMatch(srtModel.sentence);
          // 标点结尾以及如果是ASR识别都不主动加标点而直接合并
          if (endsWithPunctuation || srtPath.isEmpty) {
            // debugPrint("是标点结尾:" + srtModel.toString());
            srtModel.sentence += srtModelList[i + 1].sentence;
          } else {
            srtModel.sentence += "，";
            srtModel.sentence += srtModelList[i + 1].sentence;
          }
          i++;
        }
        //这里再指定这个新的分句的时间为下一个的起始时间
        if (i == srtModelList.length - 1)
          srtModel.end = srtModelList[i].end;
        else
          srtModel.end = srtModelList[i + 1].start;
        // debugPrint("最终合并后的分句：" + srtModel.toString());
        newSrtModels.add(srtModel);
      }
    }
    RolesAndScenes? rolesAndScenes =
        await HttpAiConfigRepository().aiAnalyseRolesAndScenes(prompt: content);


      // If the slot found is equal to 0.
            if (toUint(charInfo(k, 1)) == 0)
            {
                // Find the new slot number to assign.
                for (int l = 0; l < characterNumber; ++l)
                {
                    if (toUint(charInfo(l, 1)) == currentSlot)
                        currentSlot++;
                }
                slotsToUpdate.insert(std::make_pair(toUint(charInfo(k, 0)),
                                                    currentSlot));
            }
        }

        if (!slotsToUpdate.empty())
        {
            dal::PerformTransaction transaction(mDb);

            // Update the slots in database.
            for (std::map<unsigned, unsigned>::iterator i =
                                                          slotsToUpdate.begin(),
                i_end = slotsToUpdate.end(); i != i_end; ++i)
            {
                // Update the character slot.
                sql.clear();
                sql.str("");
                sql << "UPDATE " << CHARACTERS_TBL_NAME
                    << " SET slot = " << i->second
                    << " where id = " << i->first;
                mDb->execSql(sql.str());
            }

            transaction.commit();
        }
    }
    catch (const dal::DbSqlQueryExecFailure &e)
    {
        utils::throwError("(DALStorage::fixCharactersSlots) "
                          "SQL query failure: ", e);
    }
}

Account *Storage::getAccount(const std::string &userName)
{
    std::ostringstream sql;
    sql << "SELECT * FROM " << ACCOUNTS_TBL_NAME << " WHERE username = ?";
    if (mDb->prepareSql(sql.str()))
    {
        mDb->bindValue(1, userName);
        return getAccountBySQL();
    }
    return 0;
}

Account *Storage::getAccount(int accountID)
{
    std::ostringstream sql;
    sql << "SELECT * FROM " << ACCOUNTS_TBL_NAME << " WHERE id = ?";
    if (mDb->prepareSql(sql.str()))
    {
        mDb->bindValue(1, accountID);
        return getAccountBySQL();
    }
    return 0;
}

CharacterData *Storage::getCharacterBySQL(Account *owner)
{
    CharacterData *character = 0;

    string_to< unsigned > toUint;
    string_to< int > toInt;

    try
    {
        const dal::RecordSet &charInfo = mDb->processSql();

        // If the character is not even in the database then
        // we have no choice but to return nothing.
        if (charInfo.isEmpty())
            return 0;

        string_to< unsigned short > toUshort;
        string_to< double > toDouble;

        character = new CharacterData(charInfo(0, 2), toUint(charInfo(0, 0)));
        character->setGender(toUshort(charInfo(0, 3)));
        character->setHairStyle(toUshort(charInfo(0, 4)));
        character->setHairColor(toUshort(charInfo(0, 5)));
        character->setAttributePoints(toUshort(charInfo(0, 6)));
        character->setCorrectionPoints(toUshort(charInfo(0, 7)));
        Point pos(toInt(charInfo(0, 8)), toInt(charInfo(0, 9)));
        character->setPosition(pos);

        int mapId = toUint(charInfo(0, 10));
        if (mapId > 0)
        {
            character->setMapId(mapId);
        }
        else
        {
            // Set character to default map and one of the default location
            // Default map is to be 1, as not found return value will be 0.
            character->setMapId(Configuration::getValue("char_defaultMap", 1));
        }

        character->setCharacterSlot(toUint(charInfo(0, 11)));

        // Fill the account-related fields. Last step, as it may require a new
        // SQL query.
        if (owner)
        {
            character->setAccount(owner);
        }
        else
        {
            int id = toUint(charInfo(0, 1));


 Message msg) {
            if (msg.what == SUCCESS) {
                mRecyclerView.setVisibility(View.VISIBLE);
                mTvNoData.setVisibility(View.INVISIBLE);
                showRecyclerView();
            } else if (msg.what == NO_DATA) {
                mRecyclerView.setVisibility(View.INVISIBLE);
                mTvNoData.setVisibility(View.VISIBLE);
            } else if (msg.what == NO_RESPONSE) {
                mRecyclerView.setVisibility(View.INVISIBLE);
                mTvNoData.setVisibility(View.INVISIBLE);
            }
            return false;
        }
    });

    private BroadcastReceiver mRefreshBroadcastReceiver = new BroadcastReceiver() {
        @SuppressLint("SetTextI18n")
        @Override
        public void onReceive(Context context, Intent intent) {
            String action = intent.getAction();
            if (action.equals("action.refreshHerWindowUI")) {
                Bundle bundle = intent.getBundleExtra("msg");
                int selectedItemPosition = bundle.getInt("windowSelectedItemPosition");
                View view = mRecyclerView.getLayoutManager().findViewByPosition(selectedItemPosition);
                if (view != null) {
                    TextView tv_focus = view.findViewById(R.id.item_tv_herAllFansInfo_focus);
                    TextView tv_cancelFocus = view.findViewById(R.id.item_tv_herAllFansInfo_cancelFocus);
                    tv_focus.setVisibility(View.INVISIBLE);
                    tv_cancelFocus.setVisibility(View.VISIBLE);
                }
            }
        }
    };

    /**
     * View结束后关闭广播
     */
    @Override
    protected void onDestroy() {
        super.onDestroy();
        unregisterReceiver(mRefreshBroadcastReceiver);
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.iv_herAllFansInfo_finish:
                finish();
                break;
        }
    }

    /**
     * 本机自带返回键
     */
    @Override
    public boolean dispatchKeyEvent(KeyEvent event) {
        if (event.getKeyCode() == KeyEvent.KEYCODE_BACK) {
            finish();
            return true;
        } else {
            return super.dispatchKeyEvent(event);
        }
    }
}
package com.maskview.mainView.shoppingCart.entity;

import android.view.MotionEvent;
import android.view.View;
import android.view.View.OnTouchListener;
import android.widget.ListView;

import androidx.core.view.MotionEventCompat;

import com.nineoldandroids.animation.Animator;
import com.nineoldandroids.animation.AnimatorListenerAdapter;

import static com.nineoldandroids.view.ViewHelper.setTranslationX;
import static com.nineoldandroids.view.ViewPropertyAnimator.animate;

public class FrontViewToMove {

    private View frontView;// 所要滑动的视图
    private int downX;// 手指按下时的x坐标
    private boolean hasMoved = false;// 判断视图是否被移动
    private int xToMove = 100;// 视图所要被移动的距离，默认200
    private ListView listView;// 如果所需移动的视图为ListView或其子类的item项，传入视图容器，限制其上下滚动

    /**
     * @param frontView 所要滑动的视图
     */
    public FrontViewToMove(View frontView) {
        this.frontView = frontView;
        moveListener();
    }

    /**
     * @param frontView 所要滑动的视图
     * @param xToMove   视图所要被移动的距离
     */
    public FrontViewToMove(View frontView, int xToMove) {
        this.frontView = frontView;
        this.xToMove = xToMove;
        moveListener();
    }

    /**
     * @param frontView 所要滑动的视图
     * @param listView  所要滑动的视图的容器
     */
    public FrontViewToMove(View fro


#!/usr/bin/env python
# coding: utf-8

# __buildin__ modules
import os
import cgi
import shutil
import difflib
import tempfile

# thirdparty modules
import chardet
import patoolib

# monitor modules
from monitor.core.exception import MonitorDiffError
from monitor.core.settings import DIFF_FILTER_EXT, CONTENT_REPLACE
from monitor.utils.common import get_config

def remove_dir(dirpath):
    """
    删除文件目录
    """
    if os.path.isdir(dirpath):
        try:
            shutil.rmtree(dirpath)
        except Exception, ex:
            err = 'unable remove directory "%s" ("%s")' % (dirpath, ex)
            raise MonitorDiffError(err)

def quiet_remove_dirs(*args):
    """
    删除多个文件目录
    """
    for d in args:
        try:
            remove_dir(d)
        except Exception:
            pass

def unpack_package(p_path, d_dir=None):
    """
    使用第三方库 patoolib 解压应用包至指定路径
    """
    tempdir = tempfile.mkdtemp(prefix='wam_') if not d_dir else d_dir
    try:
        patoolib.extract_archive(p_path, verbosity=-1, outdir=tempdir, interactive=False)
        #add interactive=False 解决解压文件卡住的问题
    except Exception, ex:
        remove_dir(tempdir)

        err = 'unable to extract package "%s" ("%s")' % (p_path, ex)
        raise MonitorDiffError(err)

    return tempdir

def unpack_two_package(s_package_path, d_package_path):
    """
    解压两个应用包, 必须 s_package_path 和 d_package_path 都解压正确
    """
    s_unpack_dir = unpack_package(s_package_path)

    try:
        d_unpack_dir = unpack_package(d_package_path)
    except MonitorDiffError:
        remove_dir(s_unpack_dir)
        raise

    return s_unpack_dir, d_unpack_dir

def walk_dir(d_path, filter_ext=None):
    """
    遍历文件夹下所有文件，得到过滤后的文件列表
    """
    p_dir = os.path.dirname(os.path.realpath(d_path) + '/')
    filelist = []
    for root, dirs, files in os.walk(d_path):
        for f in files:
            # 基于监控文件的扩展名进行过滤
            if f.split('.')[-1].lower() not in filter_ext:
                continue
            f_path = os.path.realpath(os.path.join(root, f)).replace(p_dir, '').lstrip('/')
            filelist.append(f_path)

    return p_dir, filelist

def compare_list(s_list, d_list):
    """
    比较两个数组列表差别，返回相同部分，增加部分，删除部分的列表
    """
    same = list(set(s_list).intersection(set(d_list)))
    add = list(set(d_list).difference(set(s_list)))
    delete = list(set(s_list).difference(set(d_list)))

    return same, add, delete

def patch_line(l):
    """
    将原始 Diff 输出结果的每一行重新使用 utf-8 编码
    若转码失败，使用预先设置的替代问题替换该行内容
    """
    encoding = chardet.detect(l)['encoding']
    if encoding:
        if encoding == 'utf-8':
            return l
        else:
            try:
                l = l.decode(encoding, 'replace').encode('utf-8')
            except Exception, ex:
                l = l[0] + CONTENT_REPLACE
    else:
        l = l[0] + CONTENT_REPLACE
    return l

def get_hunks_generator(lines):
    """
    解析原始 Diff 输出结果，以文件比较为单位返回块数据
    """
    hunk = {'old_path': None, 'new_path': None, 'lines': []}
    for line in lines:
        if line.startswith('---'):
            if hunk['old_path'] and hunk['new_path'] and hunk['lines']:
                yield hunk
            hunk = {'old_path': line, 'new_path': None, 'lines': []}
        elif line.startswith('+++') and hunk['old_path']:
            hunk['new_path'] = line
        elif line.startswith('@@') \
                or (line.startswith('+') and not line.startswith('+++')) \
                or (line.startswith('-') and not line.startswith('---')) \
                or line.startswith(' '):
            hunk['lines'].append(line)
        else:
            hunk['lines'].append(line)

    if hunk['old_path'] and hunk['new_path']:
        if len(hunk['lines']) > 0:
            yield hunk

def render_raw_content(raw):
    """
    使用特定的 HTML 格式对原始 Diff 输出结果进行渲染，返回最终渲染结果
    """
    lines = raw.split('\n')
    hunks = get_hunks_generator(lines)
    r_content = ''
    for hunk in hunks:
        r_hunk = ''
        r_hunk += '
\n
' \
                  + cgi.escape(hunk['old_path'][4:]) + '
\n
\n'
        for line in hunk['lines']:
            line = cgi.escape(line)
            if line.startswith('@@'):
                r_hunk += '  ' + line + '\n'
            elif line.startswith('+'):


                    let mut writer = BufWriter::new(&*another_peer);
                    write!(writer, "[{:?} said] {}", peer, line);
                    match writer.flush() {
                        Err(e) => println!("Error - flush error. {:?}", e),
                        _ => {}
                    };
                }

                line.clear();
            }

            println!("[{:?} event] disconnected.", thread_client.peer_addr().unwrap());
        });

        // IO 쓰레드는 전체 쓰레드 핸들 목록에 추가해줌..
        threads.push(handle);
    }

    // 종료할 땐 다 잘 닫아주자..
    for each in threads {
        match each.join() {
            Err(e) => { println!("Error - thread join error. {:?}", e) },
            _ => {}
        }
    }
}
*/

fn main() {
    // 리스너 바인딩.
    let listener : TcpListener = match TcpListener::bind("127.0.0.1:8888") {
        Ok(v) => { println!("bound on 127.0.0.1:8888"); v },
        Err(e) => { panic!("binding failed. {:?}", e) }
    };

    for stream in listener.incoming() {
        let mut client : TcpStream = match stream {
            Ok(v) => {
                println!("new client accept! {:?}", v.peer_addr().unwrap());
                v
            },
            Err(e) => { panic!("accepting failed. {:?}", e) }
        };

        // 잘 안돌아감~ 공부 좀더 해야 할 듯..

        match client.set_nonblocking(true) {
            Ok(_) => {}
            Err(e) => { panic!("set nonblocking error. {:?}", e) }
        }

        loop {
            client.take()
            let mut s = String::new();
            match client.read_to_string(&mut s) {
                Ok(read_size) => { println!("{}", s); },
                Ok(read_size) if read_size <= 0 => { println!("disconnected"); break; },
                Err(ref e) if e.kind() == ErrorKind::WouldBlock => (),
                Err(ref e)  => { panic!("read to string error. {:?}", e) }
            }
        }
    }
}
mod engine;

pub use engine::types;<filename>src/instruction.rs
use std::iter;

use anyhow::{anyhow, Result};
use capstone::{
    arch::{x86, BuildsCapstone, DetailsArchInsn},
    Capstone,
};
use memchr::memmem::Finder;
use rayon::iter::{IntoParallelIterator, ParallelIterator};

pub struct Instruction {
    pub human_readable: String,
    pub address: u64,
    pub bytes: Vec<u8>,
    pub mnemonic: x86::X86Insn,
    pub operands: Vec<x86::X86Operand>,
}

fn disassemble(code: &[u8], addr: u64, pointer_size: usize) -> Result<Vec<Instruction>> {
    let mut cs = Capstone::new()
        .x86()
        .mode(if pointer_size == 4 {
            x86::ArchMode::Mode32
        } else {
            x86::ArchMode::Mode64
        })
        .detail(true)
        .build()
        .map_err(|x| anyhow!(x))?;

    cs.set_skipdata(true).map_err(|x| anyhow!(x))?;

    let insns = cs.disasm_all(code, addr).map_err(|x| anyhow!(x))?;

    Ok(insns
        .iter()
        .filter_map(|x| {
            let mnemonic = x86::X86I


	.byte		        c_v-14
	.byte	W01
	.byte		        c_v-18
	.byte	W01
	.byte		VOL   , 108*se_m_belly_drum_mvl/mxv
	.byte		BEND  , c_v-20
	.byte	W01
	.byte		        c_v-22
	.byte	W01
	.byte		VOL   , 94*se_m_belly_drum_mvl/mxv
	.byte	W03
	.byte		        78*se_m_belly_drum_mvl/mxv
	.byte	W01
	.byte		        62*se_m_belly_drum_mvl/mxv
	.byte	W01
	.byte		        40*se_m_belly_drum_mvl/mxv
	.byte	W01
	.byte		        27*se_m_belly_drum_mvl/mxv
	.byte	W02
	.byte		        12*se_m_belly_drum_mvl/mxv
	.byte	W06
	.byte	FINE

@******************************************************@
	.align	2

se_m_belly_drum:
	.byte	1	@ NumTrks
	.byte	0	@ NumBlks
	.byte	se_m_belly_drum_pri	@ Priority
	.byte	se_m_belly_drum_rev	@ Reverb.

	.word	se_m_belly_drum_grp

	.word	se_m_belly_drum_1

	.end


ult, sizeof(result), format, val);

        if (justprint) {
            if (i == 0)
                printf("    /*  %d%d */ { \"%s\"", test, sub, result);
            else
                printf(", \"%s\"", result);
        } else if (!TEST_str_eq(fpexpected[test][sub][i], result)) {
            TEST_info("test %d format=|%s| exp=|%s|, ret=|%s|",
                    test, format, fpexpected[test][sub][i], result);
            ret = 0;
        }
    }
    if (justprint)
        printf(" },\n");
    return ret;
}

static int test_fp(int i)
{
    int t = 0, r;
    const double frac = 2.0 / 3.0;
    const pw *pwp = &pw_params[i];

    if (justprint)
        printf("    {\n");
    r = TEST_true(dofptest(i, t++, 0.0, pwp->w, pwp->p))
        && TEST_true(dofptest(i, t++, 0.67, pwp->w, pwp->p))
        && TEST_true(dofptest(i, t++, frac, pwp->w, pwp->p))
        && TEST_true(dofptest(i, t++, frac / 1000, pwp->w, pwp->p))
        && TEST_true(dofptest(i, t++, frac / 10000, pwp->w, pwp->p))
        && TEST_true(dofptest(i, t++, 6.0 + frac, pwp->w, pwp->p))
        && TEST_true(dofptest(i, t++, 66.0 + frac, pwp->w, pwp->p))
        && TEST_true(dofptest(i, t++, 666.0 + frac, pwp->w, pwp->p))
        && TEST_true(dofptest(i, t++, 6666.0 + frac, pwp->w, pwp->p))
        && TEST_true(dofptest(i, t++, 66666.0 + frac, pwp->w, pwp->p));
    if (justprint)
        printf("    },\n");
    return r;
}

static int test_big(void)
{
    char buf[80];

    /* Test excessively big number. Should fail */
    if (!TEST_int_eq(BIO_snprintf(buf, sizeof(buf),
                                  "%f\n", 2 * (double)ULONG_MAX), -1))
        return 0;
    return 1;
}

typedef enum OPTION_choice {
    OPT_ERR = -1,
    OPT_EOF = 0,
    OPT_PRINT,
    OPT_TEST_ENUM
} OPTION_CHOICE;

const OPTIONS *test_get_options(void)
{
    static const OPTIONS options[] = {
        OPT_TEST_OPTIONS_DEFAULT_USAGE,
        { "expected", OPT_PRINT, '-', "Output values" },
        { NULL }
    };
    return options;
}

int setup_tests(void)
{
    OPTION_CHOICE o;

    while ((o = opt_next()) != OPT_EOF) {
        switch (o) {
        case OPT_PRINT:
            justprint = 1;
            break;
        case OPT_TEST_CASES:
            break;
        default:
            return 0;
        }
    }

    ADD_TEST(test_big);
    ADD_ALL_TESTS(test_fp, nelem(pw_params));
    ADD_ALL_TESTS(test_zu, nelem(zu_data));
    ADD_ALL_TESTS(test_j, nelem(jf_data));
    return 1;
}

/*
 * Replace testutil output routines.  We do this to eliminate possible sources
 * of BIO error
 */
void test_open_streams(void)
{
}

void test_close_streams(void)
{
}

/*
 * This works out as long as caller doesn't use any "fancy" formats.
 * But we are caller's caller, and test_str_eq is the only one called,
 * and it uses only "%s", which is not "fancy"...
 */
int test_vprintf_stdout(const char *fmt, va_list ap)
{
    return vfprintf(stdout, fmt, ap);
}

int test_vprintf_stderr(const char *fmt, va_list ap)
{
    return vfprintf(stderr, fmt, ap);
}

int test_flush_stdout(void)
{
    return fflush(stdout);
}

int test_flush_stderr(void)
{
    return fflush(stderr);
}


# %%
print("Olá Mundo!")

# %%
print("Que dia bom!")
print("Meu nome é Adria!")
# %%


" + sendResult.toString());
            }
        });
    }
}
```

测试结果：

```yaml
# 主要看每次发送结果中的 partition 属性，代表四次消息分别发送到了主题的0,1,2,3分区
发送结果:SendResult [producerRecord=ProducerRecord(topic=spring.boot.kafka.newGroup, partition=1, headers=RecordHeaders(headers = [], isReadOnly = true), key=key, value=hello group 1, timestamp=null), recordMetadata=spring.boot.kafka.newGroup-1@13]
发送结果:SendResult [producerRecord=ProducerRecord(topic=spring.boot.kafka.newGroup, partition=0, headers=RecordHeaders(headers = [], isReadOnly = true), key=key, value=hello group 0, timestamp=null), recordMetadata=spring.boot.kafka.newGroup-0@19]
发送结果:SendResult [producerRecord=ProducerRecord(topic=spring.boot.kafka.newGroup, partition=3, headers=RecordHeaders(headers = [], isReadOnly = true), key=key, value=hello group 3, timestamp=null), recordMetadata=spring.boot.kafka.newGroup-3@13]
发送结果:SendResult [producerRecord=ProducerRecord(topic=spring.boot.kafka.newGroup, partition=2, headers=RecordHeaders(headers = [], isReadOnly = true), key=key, value=hello group 2, timestamp=null), recordMetadata=spring.boot.kafka.newGroup-2@13]
# 消费者组2 接收情况
consumer2-1 收到消息:hello group 1
consumer2-1 收到消息:hello group 0
consumer2-1 收到消息:hello group 2
consumer2-1 收到消息:hello group 3
# 消费者1-1接收情况
consumer1-1 收到消息:hello group 1
consumer1-1 收到消息:hello group 0
# 消费者1-3接收情况
consumer1-3 收到消息:hello group 1
consumer1-3 收到消息:hello group 0
# 消费者1-2接收情况
consumer1-2 收到消息:hello group 3
consumer1-2 收到消息:hello group 2
```

### 3.4 测试结果

- 和 Kafka 原本的机制一样，多消费者组之间对于同一个主题的消费彼此之间互不影响；
- 和 Kafka 原本机制不一样的是，这里我们消费者 1-1 和消费 1-3 共同属于同一个消费者组，并且监听同样的分区，按照 Kafka 原本的机制，群组保证每个分区只能被同一个消费者组的一个消费者使用，但是按照 Spring 的方式实现消息监听后，被两个消费者都监听到了。

## 四、序列化与反序列化

用例采用的是第三方 fastjson 将实体类序列化为 Json 后发送。实现如下：

```java
/***
 * 发送消息体为 bean 的消息
 */
@GetMapping("sendBean")
public void sendBean() {
    Programmer programmer = new Programmer("xiaoming", 12, 21212.33f, new Date());
    producer.sendMessage(Topic.BEAN, JSON.toJSON(programmer).toString());
}

```

```java
@Component
@Slf4j
public class KafkaBeanConsumer {

    @KafkaListener(groupId = "beanGroup",topics = Topic.BEAN)
    public void consumer(ConsumerRecord<String, Object> record) {
        System.out.println("消费者收到消息:" + JSON.parseObject(record


PickerViewAccessibility_super
_OBJC_METACLASS_$___MPPadFullScreenTransportControlsAccessibility_super
_OBJC_METACLASS_$___MPPlaybackControlsViewAccessibility_super
_OBJC_METACLASS_$___MPPlaybackTitlesViewAccessibility_super
_OBJC_METACLASS_$___MPReflectionImageViewAccessibility_super
_OBJC_METACLASS_$___MPSwipableViewAccessibility_super
_OBJC_METACLASS_$___MPTransportButtonAccessibility_super
_OBJC_METACLASS_$___MPTransportControlsAccessibility_super
_OBJC_METACLASS_$___MPUITableViewCellAccessibility_super
_OBJC_METACLASS_$___MPVideoBackgroundViewAccessibility_super
_OBJC_METACLASS_$___MPVideoPlaybackOverlayViewAccessibility_super
_OBJC_METACLASS_$___MPVideoViewAccessibility_super
_OBJC_METACLASS_$___MPVideoViewControllerAccessibility_super
_OBJC_METACLASS_$___MPVolumeSliderAccessibility_super
_OBJC_METACLASS_$___MPVolumeViewAccessibility_super
_OBJC_METACLASS_$___MediaPlayerUINavigationButtonAccessibility_super
__Failover
_accessibilityLocalizedString
_rdioLocalizedString


, Hao Jiang, Yujun Cai, Jianing Chen, Baolong Bi, Shuqin Gao, Honglong Zhao, Yiwei Wang .etc.|<http://arxiv.org/pdf/2505.22400v1>|提出STDR模块，通过时空解耦提高动态场景重建的时空一致性。|
|🆕 发布|Real-Time Blind Defocus Deblurring for Earth Observation: The IMAGIN-e Mission Approach|实时地球观测盲去焦去模糊：IMAGIN-e任务方法|Alejandro D. Mousist|<http://arxiv.org/pdf/2505.22128v1>|针对地球观测图像的盲去模糊，提出了一种适应空间边缘计算的实时去模糊方法。|
|🆕 发布|Balanced Token Pruning: Accelerating Vision Language Models Beyond Local Optimization|平衡Token剪枝：超越局部优化的视觉语言模型加速|Kaiyuan Li, Xiaoyue Chen, Chen Gao, Yong Li, Xinlei Chen|<http://arxiv.org/pdf/2505.22038v1>|提出Balanced Token Pruning方法，有效平衡剪枝对局部和全局输出的影响，加速视觉语...|

### 神经架构优化 (Neural Architecture Optimization)

|状态|英文标题|中文标题|作者|PDF链接|代码/贡献|
|---|---|---|---|---|---|
|🆕 发布|PS4PRO: Pixel-to-pixel Supervision for Photorealistic Rendering and Optimization|PS4PRO：用于逼真渲染和优化的像素级监督|Yezhi Shen, Qiuchen Zhai, Fengqing Zhu|<http://arxiv.org/pdf/2505.22616v1>|提出PS4PRO模型，通过视频帧插值增强数据，提升神经渲染在复杂场景下的重建质量。|
|📝 更新|SynWorld: Virtual Scenario Synthesis for Agentic Action Knowledge Refinement|SynWorld：用于代理行动知识精炼的虚拟场景合成|Runnan Fang, Xiaobin Wang, Yuan Liang, Shuofei Qiao, Jialong Wu, Zekun Xi, Ningyu Zhang, Yong Jiang .etc.|<http://arxiv.org/pdf/2504.03561v2>|[代码](https://github.com/zjunlp/SynWorld.); SynWorld通过合成虚拟场景和MCTS探索，帮助智能体在未知环境中优化行动知识。|
|🆕 发布|NFR: Neural Feature-Guided Non-Rigid Shape Registration|神经特征引导的非刚性形状配准|Puhua Jiang, Zhangquan Chen, Mingze Sun, Ruqi Huang|<http://arxiv.org/pdf/2505.22445v1>|提出了一种结合神经网络特征的非刚性形状配准方法，无需对应标注即可实现高精度配准。|
|📝 更新|Variational Positive-incentive Noise: How Noise Benefits Models|变分正激励噪声：噪声如何使模型受益|Hongyuan Zhang, Sida Huang, Yubin Guo, Xuelong Li|<http://arxiv.org/pdf/2306


Id = 0,
					pos = 2,
					fleetId = uv2,
					callback = slot0
				})
			else
				slot0()
			end
		end,
		function (slot0)
			if uv0:getCommanderByPos(1) then
				uv1:sendNotification(GAME.SELECT_FLEET_COMMANDER, {
					pos = 1,
					fleetId = uv2,
					commanderId = slot1.id,
					callback = slot0
				})
			else
				slot0()
			end
		end,
		function (slot0)
			if uv0:getCommanderByPos(2) then
				uv1:sendNotification(GAME.SELECT_FLEET_COMMANDER, {
					pos = 2,
					fleetId = uv2,
					commanderId = slot1.id,
					callback = slot0
				})
			else
				slot0()
			end
		end
	}, function ()
		uv0:sendNotification(GAME.USE_COMMANDER_PREFBA_DONE)
	end)
end

return slot0


.LastSeenReleaseNotes) > 0)
            {
                MessagePanel panel = PanelManager.ShowPanel<MessagePanel>();
                if (panel)
                {
                    panel.DisplayReleaseNotes();
                    CSM.Settings.LastSeenReleaseNotes.value = strVersion;
                }
            }
        }

        private void ResetData()
        {
            // Pause simulation on game load and reset cached speed and pause states
            SpeedPauseHelper.ResetSpeedAndPauseState();

            // Reset waiting id as the last speed/pause request is no longer valid
            SpeedPauseResponseHandler.ResetWaitingId();

            // Don't handle dropped frames from before the map was loaded
            SlowdownHelper.ClearDropFrames();
            SlowdownHelper.ClearLocalDropFrames();

            // TODO: Check if we need to reset more caches
        }

        public override void OnLevelUnloading()
        {
            base.OnLevelUnloading();

            ModSupport.Instance.OnLevelUnloading();

            //Code below destroys any created UI from the screen.
            try
            {
                UIComponent _getui = UIView.GetAView().FindUIComponent<UIComponent>("ChatLogPanel");
                UIComponent[] children = _getui.GetComponentsInChildren<UIComponent>();

                foreach (UIComponent child in children)
                {
                    Object.Destroy(child);
                }

                // Destroy duplicated multiplayer button
                UIComponent temp = UIView.GetAView().FindUIComponent("MPConnectionPanel");
                if (temp)
                    Object.Destroy(temp);

                // Destroy multiplayer join panel
                UIComponent clientJoinPanel = UIView.GetAView().FindUIComponent("MPClientJoinPanel");
                if (clientJoinPanel)
                    Object.Destroy(clientJoinPanel);
            }
            catch (NullReferenceException)
            {
                // Ignore, because it sometimes throws them... (Not caused by us)
                // TODO: Rework this to be more stable
            }
        }
    }
}


jquery@2.2.3/dist/jquery.min.js></script><!doctype html><meta charset=UTF-8><meta http-equiv=X-UA-Compatible content="IE=edge, chrome=1"><meta name=viewport content="width=device-width,initial-scale=1"><meta name=theme-color content="#f9f9f9"><meta name=author content="萌哩（moely）"><meta name=copyright content="萌哩（moely）"><title>水色カフェメイド (ID: 128253185) | 萌哩 - 萌萌的二次元美图</title>
<meta name=description content="由 @はるひるり 创作的插画 - 水色カフェメイド (ID: 128253185)，发布于Pixiv。萌哩 - 萌萌的二次元美图，收藏美图，收获美好。"><meta name=image content="https://www.moely.link/assets/img/favicon.png"><link rel=icon type=image/png href=https://www.moely.link/assets/img/favicon.png><link href='//fonts.cat.net/css?family=Abel|Source+Sans+Pro:400,300,300italic,400italic,600,600italic,700,700italic,900,900italic,200italic,200' rel=stylesheet type=text/css><link rel=manifest href=/manifest.json><link rel=stylesheet href=https://cdnjs.cloudflare.com/ajax/libs/social-share.js/1.0.16/css/share.min.css crossorigin=anonymous><link href=https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/all.min.css type=text/css rel=stylesheet><link href=https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.0/css/bootstrap.min.css type=text/css rel=styleshee


. */
.pricing-header {
    max-width: 700px;
}

button.accept-policy {
    font-size: 1rem;
    line-height: inherit;
}

/* Sticky footer styles. */
html {
    position: relative;
    min-height: 100%;
    font-size: 14px;
}

body {
    margin: 0;
    padding: 0;
    color: #FFFFFF;
}

@media only screen and (max-width: 767px) {
    body {
        color: #3f3e3e;
    }

    body::before {
        display: none;
    }
}

.header {
    z-index: 1;
    color: #FFFFFF;
}

@media only screen and (max-width: 767px) {
    .header {
        color: #3f3e3e;
    }
}

main {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

main::before, main::after {
    flex-grow: 1;
    content: "";
    display: block;
}

main::before {
    min-height: 100px;
}

main::after {
    min-height: 92px;
}

@media only screen and (max-width: 767px) {
    main::before, main::after {
        flex-grow: 0;
    }
}

.footer {
    position: absolute;
    bottom: 0;
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    pointer-events: auto;
    height: 52px;
}

.footer .links {
    display: flex;
    justify-content: space-between;
    padding-left: 0.5rem;
}

.footer .links .software-verson {
    display: none;
}

.footer .links a {
    pointer-events: all;
    padding: 0 1rem;
    border-right: 2px solid #FFFFFF;
}

.footer .links a:last-of-type {
    border-right: none;
}

.footer .links a:hover {
    text-decoration: none;
}

@media only screen and (max-width: 767px) {
    .footer .links a {
        border-right: none;
    }
}

@media only screen and (max-width: 767px) {
    .footer {
        justify-content: center;
    }

    .footer .links a {
        padding: 0;
        padding-right: 0.5rem;
    }
}

.footer {
    font-size: 12px;
    line-height: 1.4;
}

.footer .language {
    display: inline-flex;
}

.footer .copyright {
    text-transform: uppercase;
}

.footer .links a {
    font-size: 1em;
    font-weight: bold;
}

.footer .language .dropdown-toggle {
    color: inherit;
}

@media only screen and (max-width: 767px) {
    .footer .language .dropdown-toggle {
        color: #3f3e3e;
    }
}

.anonymous .footer .copyright {
    color: #FFFFFF;
}

.anonymous .footer .links a {
    color: #FFFFFF;
}

.anonymous .footer .links a:hover {
    font-weight: bold;
}

@media only screen and (max-width: 767px) {
    .anonymous .footer {
        color: inherit;
    }

    .anonymous .footer .language {
        color: #256aba;
    }

    .anonymous .footer .copyright {
        color: #3f3e3e;
    }

    .anonymous .


// Copyright (c) 2022-present, Trail of Bits, Inc.
//
// This source code is licensed in accordance with the terms specified in
// the LICENSE file found in the root directory of this source tree.

// Auto-generated file; do not modify!

#pragma once

#include <multiplier/AST/TypeAttr.h>

namespace mx {
class EntityProvider;
class Fragment;
class Index;
class Attr;
class File;
class Ptr32Attr;
class Token;
class TypeAttr;
namespace ir {
class Operation;
class Value;
}  // namespace ir

#if !defined(MX_DISABLE_API) || defined(MX_ENABLE_API)
class MX_EXPORT Ptr32Attr : public TypeAttr {
 private:
  friend class FragmentImpl;
  friend class TypeAttr;
  friend class Attr;
 public:
  static gap::generator<Ptr32Attr> in(const Index &index);
  static gap::generator<Ptr32Attr> in(const Fragment &frag);
  static gap::generator<Ptr32Attr> in(const File &file);
  static gap::generator<Ptr32Attr> containing(const Token &tok);
  bool contains(const Token &tok) const;

  inline static constexpr AttrKind static_kind(void) {
    return AttrKind::PTR32;
  }

  static std::optional<Ptr32Attr> by_id(const Index &, EntityId);

  static std::optional<Ptr32Attr> from_base(const Attr &parent);
  inline static std::optional<Ptr32Attr> from(const Attr &parent) {
    return from_base(parent);
  }
  static std::optional<Ptr32Attr> from(const std::optional<Attr> &parent);
  static std::optional<Ptr32Attr> from(const Reference &r);
  static std::optional<Ptr32Attr> from(const VariantEntity &e);
  static std::optional<Ptr32Attr> from(const TokenContext &t);

};

static_assert(sizeof(Ptr32Attr) == sizeof(TypeAttr));

#endif
} // namespace mx


# Test class to boot aspeed machines
#
# SPDX-License-Identifier: GPL-2.0-or-later

from qemu_test import exec_command_and_wait_for_pattern
from qemu_test import LinuxKernelTest

class AspeedTest(LinuxKernelTest):

    def do_test_arm_aspeed_openbmc(self, machine, image, uboot='2019.04',
                                   cpu_id='0x0', soc='AST2500 rev A1',
                                   image_hostname=None):
        # Allow for the image hostname to not end in "-bmc"
        if image_hostname is not None:
            hostname = image_hostname
        else:
            hostname = machine.removesuffix('-bmc')

        self.set_machine(machine)
        self.vm.set_console()
        self.vm.add_args('-drive', f'file={image},if=mtd,format=raw',
                         '-snapshot')
        self.vm.launch()

        self.wait_for_console_pattern(f'U-Boot {uboot}')
        self.wait_for_console_pattern('## Loading kernel from FIT Image')
        self.wait_for_console_pattern('Starting kernel ...')
        self.wait_for_console_pattern(f'Booting Linux on physical CPU {cpu_id}')
        self.wait_for_console_pattern(f'ASPEED {soc}')
        self.wait_for_console_pattern('/init as init process')
        self.wait_for_console_pattern(f'systemd[1]: Hostname set to <{hostname}>.')

    def do_test_arm_aspeed_buildroot_start(self, image, cpu_id, pattern='Aspeed EVB'):
        self.require_netdev('user')
        self.vm.set_console()
        self.vm.add_args('-drive', 'file=' + image + ',if=mtd,format=raw,read-only=true',
                         '-net', 'nic', '-net', 'user')
        self.vm.launch()

        self.wait_for_console_pattern('U-Boot 2019.04')
        self.wait_for_console_pattern('## Loading kernel from FIT Image')
        self.wait_for_console_pattern('Starting kernel ...')
        self.wait_for_console_pattern('Booting Linux on physical CPU ' + cpu_id)
        self.wait_for_console_pattern('lease of 10.0.2.15')
        # the line before login:
        self.wait_for_console_pattern(pattern)
        exec_command_and_wait_for_pattern(self, 'root', 'Password:')
        exec_command_and_wait_for_pattern(self, 'passw0rd', '#')

    def do_test_arm_aspeed_buildroot_poweroff(self):
        exec_command_and_wait_for_pattern(self, 'poweroff',
                                          'System halted')

    def do_test_arm_aspeed_sdk_start(self, image):
        self.require_netdev('user')
        self.vm.set_console()
        self.vm.add_args('-drive', 'file=' + image + ',if=mtd,format=raw',
                         '-net', 'nic', '-net', 'user', '-snapshot')
        self.vm.launch()

        self.wait_for_console_pattern('U-Boot 2019.04')
        self.wait_for_console_pattern('## Loading kernel from FIT Image')
        self.wait_for_console_pattern('Starting kernel ...')

    def generate_otpmem_image(self):
        path = self.scratch_file("otpmem.img")
        pattern = b'\x00\x00\x00\x00\xff\xff\xff\xff' * (16 * 1024 // 8)
        with open(path, "wb") as f:
            f.write(pattern)
        return path