// Copyright 2015 The etcd 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 wal

import (
	"bufio"
	"encoding/binary"
	"hash"
	"io"
	"sync"

	"go.etcd.io/etcd/pkg/crc"
	"go.etcd.io/etcd/pkg/pbutil"
	"go.etcd.io/etcd/raft/raftpb"
	"go.etcd.io/etcd/wal/walpb"
)

const minSectorSize = 512

// frameSizeBytes is frame size in bytes, including record size and padding size.
const frameSizeBytes = 8

type decoder struct {
	mu  sync.Mutex
	brs []*bufio.Reader

	// lastValidOff file offset following the last valid decoded record
	lastValidOff int64
	crc          hash.Hash32
}

func newDecoder(r ...io.Reader) *decoder {
	readers := make([]*bufio.Reader, len(r))
	for i := range r {
		readers[i] = bufio.NewReader(r[i])
	}
	return &decoder{
		brs: readers,
		crc: crc.New(0, crcTable),
	}
}

func (d *decoder) decode(rec *walpb.Record) error {
	rec.Reset()
	d.mu.Lock()
	defer d.mu.Unlock()
	return d.decodeRecord(rec)
}

func (d *decoder) decodeRecord(rec *walpb.Record) error {
	if len(d.brs) == 0 {
		return io.EOF
	}

	l, err := readInt64(d.brs[0])
	if err == io.EOF || (err == nil && l == 0) {
		// hit end of file or preallocated space
		d.brs = d.brs[1:]
		if len(d.brs) == 0 {
			return io.EOF
		}
		d.lastValidOff = 0
		return d.decodeRecord(rec)
	}
	if err != nil {
		return err
	}

	recBytes, padBytes := decodeFrameSize(l)

	data := make([]byte, recBytes+padBytes)
	if _, err = io.ReadFull(d.brs[0], data); err != nil {
		// ReadFull returns io.EOF only if no bytes were read
		// the decoder should treat this as an ErrUnexpectedEOF instead.
		if err == io.EOF {
			err = io.ErrUnexpectedEOF
		}
		return err
	}
	if err := rec.Unmarshal(data[:recBytes]); err != nil {
		if d.isTornEntry(data) {
			return io.ErrUnexpectedEOF
		}
		return err
	}

	// skip crc checking if the record type is crcType
	if rec.Type != crcType {
		d.crc.Write(rec.Data)
		if err := rec.Validate(d.crc.Sum32()); err != nil {
			if d.isTornEntry(data) {
				return io.ErrUnexpectedEOF
			}
			return err
		}
	}
	// record decoded as valid; point last valid offset to end of record
	d.lastValidOff += frameSizeBytes + recBytes + padBytes
	return nil
}

func decodeFrameSize(lenField int64) (recBytes int64, padBytes int64) {
	// the record size is stored in the lower 56 bits of the 64-bit length
	recBytes = int64(uint64(lenField) & ^(uint64(0xff) << 56))
	// non-zero padding is indicated by set MSb / a negative length
	if lenField < 0 {
		// padding is stored in lower 3 bits of length MSB
		padBytes = int64((uint64(lenField) >> 56) & 0x7)
	}
	return recBytes, padBytes
}

// isTornEntry determines whether the last entry of the WAL was partially written
// and corrupted because of a torn write.
func (d *decoder) isTornEntry(data []byte) bool {
	if len(d.brs) != 1 {
		return false
	}

	fileOff := d.lastValidOff + frameSizeBytes
	curOff := 0
	chunks := [][]byte{}
	// split data on sector boundaries
	for curOff < len(data) {
		chunkLen := int(minSectorSize - (fileOff % minSectorSize))
		if chunkLen > len(data)-curOff {
			chunkLen = len(data) - curOff
		}
		chunks = append(chunks, data[curOff:curOff+chunkLen])
		fileOff += int64(chunkLen)
		curOff += chunkLen
	}

	// if any data for a sector chunk is all 0, it's a torn write
	for _, sect := range chunks {
		isZero := true
		for _, v := range sect {
			if v != 0 {
				isZero = false
				break
			}
		}
		if isZero {
			return true
		}
	}
	return false
}

func (d *decoder) updateCRC(prevCrc uint32) {
	d.crc = crc.New(prevCrc, crcTable)
}

func (d *decoder) lastCRC() uint32 {
	return d.crc.Sum32()
}

func (d *decoder) lastOffset() int64 { return d.lastValidOff }

func mustUnmarshalEntry(d []byte) raftpb.Entry {
	var e raftpb.Entry
	pbutil.MustUnmarshal(&e, d)
	return e
}

func mustUnmarshalState(d []byte) raftpb.HardState {
	var s raftpb.HardState
	pbutil.MustUnmarshal(&s, d)
	return s
}

func readInt64(r io.Reader) (int64, error) {
	var n int64
	err := binary.Read(r, binary.LittleEndian, &n)
	return n, err
}


require('../../modules/es6.string.raw');
module.exports = require('../../modules/$.core').String.raw;


package leetcode

func minCut(s string) int {
	if s == "" {
		return 0
	}
	result := len(s)
	current := make([]string, 0, len(s))
	dfs132(s, 0, current, &result)
	return result
}

func dfs132(s string, idx int, cur []string, result *int) {
	start, end := idx, len(s)
	if start == end {
		*result = min(*result, len(cur)-1)
		return
	}
	for i := start; i < end; i++ {
		if isPal(s, start, i) {
			dfs132(s, i+1, append(cur, s[start:i+1]), result)
		}
	}
}

func min(a int, b int) int {
	if a > b {
		return b
	}
	return a
}

func isPal(str string, s, e int) bool {
	for s < e {
		if str[s] != str[e] {
			return false
		}
		s++
		e--
	}
	return true
}


@inject('helper', 'App\Services\Helper')

@extends('layouts.app')

@section('title', '用户中心')
@section('keywords', '用户中心')
@section('description', '用户中心')

@section('content')

用户中心

                用户中心
                个人资料
                我的订单
                我的消息
                我的评论
                账户安全
                账号绑定
                收货地址

                            你好，{{ $user->name }} 欢迎回来！

                                余额：{{ $user->money }}
                                积分：{{ $user->point }}

账户安全

                        <form>

                                用户名

                                <input type="text" readonly class="form-control-plaintext" value="{{ $user->name }}">修改

                                密码

                                <input type="text" readonly class="form-control-plaintext" value="********">修改

                                邮箱

                                <input type="text" readonly class="form-control-plaintext" value="{{ $user->email }}">修改

                                手机号

                                <input type="text" readonly class="form-control-plaintext" value="{{ $user->phone }}">修改

                        </form>

@endsection

@section('script')

</script>
@endsection


//
//   SubSonic - http://subsonicproject.com
//
//   The contents of this file are subject to the New BSD
//   License (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.opensource.org/licenses/bsd-license.php
//
//   Software distributed under the License is distributed on an
//   "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
//   implied. See the License for the specific language governing
//   rights and limitations under the License.
//
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.Common;
using System.IO;
using System.Reflection;
using SubSonic.DataProviders.Log;
using SubSonic.Query;
using SubSonic.Schema;
using SubSonic.SqlGeneration.Schema;

using SubSonic.Linq.Structure;

namespace SubSonic.DataProviders
{
    public interface IDataProvider
    {

        //execution
        string DbDataProviderName { get; }
        string Name { get; }
        [Obsolete("Use SetLogger method instead")]
        TextWriter Log { get; set; }

        void SetLogger(ILogAdapter logger);
        void SetLogger(Action<String> logger);

        /// <summary>
        /// Holds list of tables, views, stored procedures, etc.
        /// </summary>
        IDatabaseSchema Schema { get; }
        ISchemaGenerator SchemaGenerator { get; }
        ISqlFragment SqlFragment { get; }
        IQueryLanguage QueryLanguage { get; }
        ISqlGenerator GetSqlGenerator(SqlQuery query);

        string ParameterPrefix { get; }
        DbConnection CurrentSharedConnection { get; }
        string ConnectionString { get; }
        DbProviderFactory Factory { get; }
        ITable GetTableFromDB(string tableName);
        DbDataReader ExecuteReader(QueryCommand cmd);
        DataSet ExecuteDataSet(QueryCommand cmd);
        IList<T> ToList<T>(QueryCommand cmd) where T : new();
        IEnumerable<T> ToEnumerable<T>(QueryCommand<T> cmd, object[] paramValues);
        object ExecuteScalar(QueryCommand cmd);
        T ExecuteSingle<T>(QueryCommand cmd) where T : new();
        int ExecuteQuery(QueryCommand cmd);
        ITable FindTable(string tableName);
        ITable FindOrCreateTable<T>() where T : new();
        ITable FindOrCreateTable(Type type);
        DbCommand CreateCommand();
        //SQL formatting
        string QualifyTableName(ITable tbl);
        string QualifyColumnName(IColumn column);
        string QualifySPName(IStoredProcedure sp);
        string InsertionIdentityFetchString {get;}
        //connection bits
        DbConnection InitializeSharedConnection(string connectionString);
        DbConnection InitializeSharedConnection();
        void ResetSharedConnection();
        DbConnection CreateConnection();
        void MigrateToDatabase<T>(Assembly assembly);
        void MigrateNamespaceToDatabase(string modelNamespace, Assembly assembly);
    }
}


var DEMO = {
	ms_Canvas: null,
	ms_Renderer: null,
	ms_Camera: null,
	ms_Scene: null,
	ms_Controls: null,
	ms_Water: null,

    enable: (function enable() {
        try {
            var aCanvas = document.createElement('canvas');
            return !! window.WebGLRenderingContext && (aCanvas.getContext('webgl') || aCanvas.getContext('experimental-webgl'));
        }
        catch(e) {
            return false;
        }
    })(),

	initialize: function initialize(inIdCanvas) {
		this.ms_Canvas = $('#'+inIdCanvas);

		// Initialize Renderer, Camera and Scene
		this.ms_Renderer = this.enable? new THREE.WebGLRenderer() : new THREE.CanvasRenderer();
		this.ms_Canvas.html(this.ms_Renderer.domElement);
		this.ms_Scene = new THREE.Scene();

		this.ms_Camera = new THREE.PerspectiveCamera(55.0, WINDOW.ms_Width / WINDOW.ms_Height, 0.5, 3000000);
		this.ms_Camera.position.set(1000, 500, -1500);
		this.ms_Camera.lookAt(new THREE.Vector3(0, 0, 0));

		// Initialize Orbit control
		this.ms_Controls = new THREE.OrbitControls(this.ms_Camera, this.ms_Renderer.domElement);

		// Add light
		var directionalLight = new THREE.DirectionalLight(0xffff55, 1);
		directionalLight.position.set(-600, 300, 600);
		this.ms_Scene.add(directionalLight);

		// Load textures
		var waterNormals = new THREE.ImageUtils.loadTexture('../assets/img/waternormals.jpg');
		waterNormals.wrapS = waterNormals.wrapT = THREE.RepeatWrapping;

		// Create the water effect
		this.ms_Water = new THREE.Water(this.ms_Renderer, this.ms_Camera, this.ms_Scene, {
			textureWidth: 256,
			textureHeight: 256,
			waterNormals: waterNormals,
			alpha: 	1.0,
			sunDirection: directionalLight.position.normalize(),
			sunColor: 0xffffff,
			waterColor: 0x001e0f,
			betaVersion: 0,
			side: THREE.DoubleSide
		});
		var aMeshMirror = new THREE.Mesh(
			new THREE.PlaneBufferGeometry(2000, 2000, 10, 10),
			this.ms_Water.material
		);
		aMeshMirror.add(this.ms_Water);
		aMeshMirror.rotation.x = - Math.PI * 0.5;

		this.ms_Scene.add(aMeshMirror);

		this.loadSkyBox();
	},

	loadSkyBox: function loadSkyBox() {
		var aCubeMap = THREE.ImageUtils.loadTextureCube([
		  '../demo/assets/img/px.jpg',
		  '../demo/assets/img/nx.jpg',
		  '../demo/assets/img/py.jpg',
		  '../demo/assets/img/ny.jpg',
		  '../demo/assets/img/pz.jpg',
		  '../demo/assets/img/nz.jpg'
		]);
		aCubeMap.format = THREE.RGBFormat;

		var aShader = THREE.ShaderLib['cube'];
		aShader.uniforms['tCube'].value = aCubeMap;

		var aSkyBoxMaterial = new THREE.ShaderMaterial({
		  fragmentShader: aShader.fragmentShader,
		  vertexShader: aShader.vertexShader,
		  uniforms: aShader.uniforms,
		  depthWrite: false,
		  side: THREE.BackSide
		});

		var aSkybox = new THREE.Mesh(
		  new THREE.BoxGeometry(1000000, 1000000, 1000000),
		  aSkyBoxMaterial
		);

		this.ms_Scene.add(aSkybox);
	},

    display: function display() {
		this.ms_Water.render();
		this.ms_Renderer.render(this.ms_Scene, this.ms_Camera);
	},

	update: function update() {
		this.ms_Water.material.uniforms.time.value += 1.0 / 60.0;
		this.ms_Controls.update();
		this.display();
	},

	resize: function resize(inWidth, inHeight) {
		this.ms_Camera.aspect =  inWidth / inHeight;
		this.ms_Camera.updateProjectionMatrix();
		this.ms_Renderer.setSize(inWidth, inHeight);
		this.ms_Canvas.html(this.ms_Renderer.domElement);
		this.display();
	}
};


package com.alibaba.alink.pipeline.dataproc.vector;

import org.apache.flink.ml.api.misc.param.Params;

import com.alibaba.alink.operator.common.dataproc.vector.VectorElementwiseProductMapper;
import com.alibaba.alink.params.dataproc.vector.VectorElementwiseProductParams;
import com.alibaba.alink.pipeline.MapTransformer;

/**
 * VectorEleWiseProduct multiplies each input vector by a provided “scaling” vector.
 * In other words, it scales each column of the data set by a scalar multiplier. This represents the Hadamard product
 * between the input vector, v and transforming vector, w, to yield a result vector.
 */
public class VectorElementwiseProduct extends MapTransformer<VectorElementwiseProduct>
	implements VectorElementwiseProductParams <VectorElementwiseProduct> {

	public VectorElementwiseProduct() {
		this(null);
	}

	public VectorElementwiseProduct(Params params) {
		super(VectorElementwiseProductMapper::new, params);
	}
}


using System;
using System.Collections.Generic;
using System.Linq;
using CoreAnimation;
using Foundation;

namespace Windows.UI.Xaml.Media
{
	public  partial class CompositionTarget
	{
		private static List<EventHandler<object>> _handlers = new List<EventHandler<object>>();
		private static CADisplayLink _displayLink;

		public static event EventHandler<object> Rendering
		{
			add
			{
				_handlers.Add(value);

				if(_displayLink == null)
				{
					_displayLink = CADisplayLink.Create(OnFrame);
					// Default == normal UI updates
					_displayLink.AddToRunLoop(NSRunLoop.Main, NSRunLoopMode.Default);
					// UITracking == updates during scrolling
					_displayLink.AddToRunLoop(NSRunLoop.Main, NSRunLoopMode.UITracking);
				}
			}
			remove
			{
				_handlers.Remove(value);

				if(_handlers.Count == 0)
				{
					_displayLink.RemoveFromRunLoop(NSRunLoop.Main, NSRunLoop.NSDefaultRunLoopMode);
					_displayLink.RemoveFromRunLoop(NSRunLoop.Main, NSRunLoop.UITrackingRunLoopMode);
					_displayLink = null;
				}
			}
		}

		private static void OnFrame()
		{
			var handlers = _handlers.ToList();
			foreach (var handler in handlers)
			{
				handler(null, null);
			}

		}
	}
}


<Project Sdk="Microsoft.DotNet.Helix.Sdk" DefaultTargets="Test">

  <PropertyGroup Condition="'$(AGENT_OS)' == 'Windows_NT'">
    <WorkItemCommand>%HELIX_CORRELATION_PAYLOAD%\performance\scripts\benchmarks_ci.py --csproj %HELIX_CORRELATION_PAYLOAD%\performance\$(TargetCsproj)</WorkItemCommand>
    <CliArguments>--dotnet-versions %DOTNET_VERSION% --cli-source-info args --cli-branch %PERFLAB_BRANCH% --cli-commit-sha %PERFLAB_HASH% --cli-repository https://github.com/%PERFLAB_REPO% --cli-source-timestamp %PERFLAB_BUILDTIMESTAMP%</CliArguments>
    <Python>py -3</Python>
    <CoreRun>%HELIX_CORRELATION_PAYLOAD%\Core_Root\CoreRun.exe</CoreRun>
    <BaselineCoreRun>%HELIX_CORRELATION_PAYLOAD%\Baseline_Core_Root\CoreRun.exe</BaselineCoreRun>

    <HelixPreCommands>$(HelixPreCommands);call %HELIX_CORRELATION_PAYLOAD%\performance\tools\machine-setup.cmd;set PYTHONPATH=%HELIX_WORKITEM_PAYLOAD%\scripts%3B%HELIX_WORKITEM_PAYLOAD%</HelixPreCommands>
    <ArtifactsDirectory>%HELIX_CORRELATION_PAYLOAD%\artifacts\BenchmarkDotNet.Artifacts</ArtifactsDirectory>
    <BaselineArtifactsDirectory>%HELIX_CORRELATION_PAYLOAD%\artifacts\BenchmarkDotNet.Artifacts_Baseline</BaselineArtifactsDirectory>
    <ResultsComparer>%HELIX_CORRELATION_PAYLOAD%\performance\src\tools\ResultsComparer\ResultsComparer.csproj</ResultsComparer>
    <DotnetExe>%HELIX_CORRELATION_PAYLOAD%\performance\tools\dotnet\$(Architecture)\dotnet.exe</DotnetExe>
    <Percent>%25%25</Percent>
    <XMLResults>%HELIX_WORKITEM_ROOT%\testResults.xml</XMLResults>
  </PropertyGroup>

  <PropertyGroup Condition="'$(AGENT_OS)' != 'Windows_NT' and '$(RunFromPerfRepo)' == 'false'">
    <BaseDirectory>$HELIX_CORRELATION_PAYLOAD</BaseDirectory>
    <PerformanceDirectory>$(BaseDirectory)/performance</PerformanceDirectory>
  </PropertyGroup>

  <PropertyGroup Condition="'$(AGENT_OS)' != 'Windows_NT' and '$(RunFromPerfRepo)' == 'true'">
    <BaseDirectory>$HELIX_WORKITEM_PAYLOAD</BaseDirectory>
    <PerformanceDirectory>$(BaseDirectory)</PerformanceDirectory>
  </PropertyGroup>

  <PropertyGroup Condition="'$(AGENT_OS)' != 'Windows_NT'">
    <WorkItemCommand>$(PerformanceDirectory)/scripts/benchmarks_ci.py --csproj $(PerformanceDirectory)/$(TargetCsproj)</WorkItemCommand>
    <CliArguments>--dotnet-versions $DOTNET_VERSION --cli-source-info args --cli-branch $PERFLAB_BRANCH --cli-commit-sha $PERFLAB_HASH --cli-repository https://github.com/$PERFLAB_REPO --cli-source-timestamp $PERFLAB_BUILDTIMESTAMP</CliArguments>
    <Python>python3</Python>
    <CoreRun>$(BaseDirectory)/Core_Root/corerun</CoreRun>
    <BaselineCoreRun>$(BaseDirectory)/Baseline_Core_Root/corerun</BaselineCoreRun>
    <HelixPreCommands>$(HelixPreCommands);chmod +x $(PerformanceDirectory)/tools/machine-setup.sh;. $(PerformanceDirectory)/tools/machine-setup.sh</HelixPreCommands>
    <ArtifactsDirectory>$(BaseDirectory)/artifacts/BenchmarkDotNet.Artifacts</ArtifactsDirectory>
    <BaselineArtifactsDirectory>$(BaseDirectory)/artifacts/BenchmarkDotNet.Artifacts_Baseline</BaselineArtifactsDirectory>
    <ResultsComparer>$(PerformanceDirectory)/src/tools/ResultsComparer/ResultsComparer.csproj</ResultsComparer>
    <DotnetExe>$(PerformanceDirectory)/tools/dotnet/$(Architecture)/dotnet</DotnetExe>
    <Percent>%25</Percent>
    <XMLResults>$HELIX_WORKITEM_ROOT/testResults.xml</XMLResults>
  </PropertyGroup>

  <PropertyGroup Condition="'$(MonoDotnet)' == 'true' and '$(AGENT_OS)' == 'Windows_NT'">
    <CoreRunArgument>--corerun %HELIX_CORRELATION_PAYLOAD%\dotnet-mono\shared\Microsoft.NETCore.App\5.0.0\corerun.exe</CoreRunArgument>
  </PropertyGroup>
  <PropertyGroup Condition="'$(MonoDotnet)' == 'true' and '$(AGENT_OS)' != 'Windows_NT'">
    <CoreRunArgument>--corerun $(BaseDirectory)/dotnet-mono/shared/Microsoft.NETCore.App/5.0.0/corerun</CoreRunArgument>
  </PropertyGroup>

  <PropertyGroup Condition="'$(UseCoreRun)' == 'true'">
    <CoreRunArgument>--corerun $(CoreRun)</CoreRunArgument>
  </PropertyGroup>

  <PropertyGroup Condition="'$(UseBaselineCoreRun)' == 'true'">
    <BaselineCoreRunArgument>--corerun $(BaselineCoreRun)</BaselineCoreRunArgument>
  </PropertyGroup>

  <PropertyGroup Condition="'$(WorkItemCommand)' != ''">
    <WorkItemCommand>$(Python) $(WorkItemCommand) --incremental no --architecture $(Architecture) -f $(_Framework) $(PerfLabArguments)</WorkItemCommand>
  </PropertyGroup>

  <PropertyGroup Condition="'$(_Framework)' != 'net461'">
    <WorkItemCommand>$(WorkItemCommand) $(CliArguments)</WorkItemCommand>
  </PropertyGroup>

  <PropertyGroup>
    <WorkItemTimeout>2:30</WorkItemTimeout>
    <WorkItemTimeout Condition="'$(HelixSourcePrefix)' != 'official'">0:15</WorkItemTimeout>
  </PropertyGroup>

  <ItemGroup>
    <HelixCorrelationPayload Include="$(CorrelationPayloadDirectory)">
      <PayloadDirectory>%(Identity)</PayloadDirectory>
    </HelixCorrelationPayload>
  </ItemGroup>

  <PropertyGroup>
    <PartitionCount>30</PartitionCount>
  </PropertyGroup>
  <ItemGroup>
    <Partition Include="$(BuildConfig).Partition0" Index="0" />
    <Partition Include="$(BuildConfig).Partition1" Index="1" />
    <Partition Include="$(BuildConfig).Partition2" Index="2" />
    <Partition Include="$(BuildConfig).Partition3" Index="3" />
    <Partition Include="$(BuildConfig).Partition4" Index="4" />
    <Partition Include="$(BuildConfig).Partition5" Index="5" />
    <Partition Include="$(BuildConfig).Partition6" Index="6" />
    <Partition Include="$(BuildConfig).Partition7" Index="7" />
    <Partition Include="$(BuildConfig).Partition8" Index="8" />
    <Partition Include="$(BuildConfig).Partition9" Index="9" />
    <Partition Include="$(BuildConfig).Partition10" Index="10" />
    <Partition Include="$(BuildConfig).Partition11" Index="11" />
    <Partition Include="$(BuildConfig).Partition12" Index="12" />
    <Partition Include="$(BuildConfig).Partition13" Index="13" />
    <Partition Include="$(BuildConfig).Partition14" Index="14" />
    <Partition Include="$(BuildConfig).Partition15" Index="15" />
    <Partition Include="$(BuildConfig).Partition16" Index="16" />
    <Partition Include="$(BuildConfig).Partition17" Index="17" />
    <Partition Include="$(BuildConfig).Partition18" Index="18" />
    <Partition Include="$(BuildConfig).Partition19" Index="19" />
    <Partition Include="$(BuildConfig).Partition20" Index="20" />
    <Partition Include="$(BuildConfig).Partition21" Index="21" />
    <Partition Include="$(BuildConfig).Partition22" Index="22" />
    <Partition Include="$(BuildConfig).Partition23" Index="23" />
    <Partition Include="$(BuildConfig).Partition24" Index="24" />
    <Partition Include="$(BuildConfig).Partition25" Index="25" />
    <Partition Include="$(BuildConfig).Partition26" Index="26" />
    <Partition Include="$(BuildConfig).Partition27" Index="27" />
    <Partition Include="$(BuildConfig).Partition28" Index="28" />
    <Partition Include="$(BuildConfig).Partition29" Index="29" />
  </ItemGroup>

  <PropertyGroup Condition="'$(Compare)' == 'true'">
    <FailOnTestFailure>false</FailOnTestFailure>
  </PropertyGroup>

  <!--
    Partition the Microbenchmarks project, but nothing else
  -->
  <ItemGroup Condition="$(TargetCsproj.Contains('MicroBenchmarks.csproj'))">
    <HelixWorkItem Include="@(Partition)">
      <PayloadDirectory>$(WorkItemDirectory)</PayloadDirectory>
      <PreCommands Condition="'$(Compare)' == 'true'">$(WorkItemCommand) --bdn-artifacts $(BaselineArtifactsDirectory) --bdn-arguments="--anyCategories $(BDNCategories) $(ExtraBenchmarkDotNetArguments) $(BaselineCoreRunArgument) --partition-count $(PartitionCount) --partition-index %(HelixWorkItem.Index)"</PreCommands>
      <Command>$(WorkItemCommand) --bdn-artifacts $(ArtifactsDirectory) --bdn-arguments="--anyCategories $(BDNCategories) $(ExtraBenchmarkDotNetArguments) $(CoreRunArgument) --partition-count $(PartitionCount) --partition-index %(HelixWorkItem.Index)"</Command>
      <PostCommands Condition="'$(Compare)' == 'true'">$(DotnetExe) run -f $(_Framework) -p $(ResultsComparer) --base $(BaselineArtifactsDirectory) --diff $(ArtifactsDirectory) --threshold 2$(Percent) --xml $(XMLResults);$(FinalCommand)</PostCommands>
      <Timeout>$(WorkItemTimeout)</Timeout>
    </HelixWorkItem>
  </ItemGroup>

  <ItemGroup Condition="!$(TargetCsproj.Contains('MicroBenchmarks.csproj'))">
    <HelixWorkItem Include="$(BuildConfig).WorkItem">
      <PayloadDirectory>$(WorkItemDirectory)</PayloadDirectory>
      <PreCommands Condition="'$(Compare)' == 'true'">$(WorkItemCommand) --bdn-artifacts $(BaselineArtifactsDirectory) --bdn-arguments="--anyCategories $(BDNCategories) $(ExtraBenchmarkDotNetArguments) $(BaselineCoreRunArgument)"</PreCommands>
      <Command>$(WorkItemCommand) --bdn-artifacts $(ArtifactsDirectory) --bdn-arguments="--anyCategories $(BDNCategories) $(ExtraBenchmarkDotNetArguments) $(CoreRunArgument)"</Command>
      <PostCommands Condition="'$(Compare)' == 'true'">$(DotnetExe) run -f $(_Framework) -p $(ResultsComparer) --base $(BaselineArtifactsDirectory) --diff $(ArtifactsDirectory) --threshold 2$(Percent) --xml $(XMLResults)</PostCommands>
      <Timeout>4:00</Timeout>
    </HelixWorkItem>
  </ItemGroup>

  <ItemGroup Condition="'$(AGENT_OS)' == 'Windows_NT'">
    <HelixWorkItem Include="Crossgen System.Private.Xml.dll">
      <PayloadDirectory>$(WorkItemDirectory)\ScenarioCorrelation</PayloadDirectory>
      <Command>$(Python) %HELIX_CORRELATION_PAYLOAD%\performance\src\scenarios\crossgen\test.py crossgen --test-name System.Private.Xml.dll --core-root %HELIX_CORRELATION_PAYLOAD%\Core_Root</Command>
    </HelixWorkItem>
    <HelixWorkItem Include="Crossgen System.Linq.Expressions.dll">
      <PayloadDirectory>$(WorkItemDirectory)\ScenarioCorrelation</PayloadDirectory>
      <Command>$(Python) %HELIX_CORRELATION_PAYLOAD%\performance\src\scenarios\crossgen\test.py crossgen --test-name System.Linq.Expressions.dll --core-root %HELIX_CORRELATION_PAYLOAD%\Core_Root</Command>
    </HelixWorkItem>
    <HelixWorkItem Include="Crossgen Microsoft.CodeAnalysis.VisualBasic.dll">
      <PayloadDirectory>$(WorkItemDirectory)\ScenarioCorrelation</PayloadDirectory>
      <Command>$(Python) %HELIX_CORRELATION_PAYLOAD%\performance\src\scenarios\crossgen\test.py crossgen --test-name Microsoft.CodeAnalysis.VisualBasic.dll --core-root %HELIX_CORRELATION_PAYLOAD%\Core_Root</Command>
    </HelixWorkItem>
    <HelixWorkItem Include="Crossgen Microsoft.CodeAnalysis.CSharp.dll">
      <PayloadDirectory>$(WorkItemDirectory)\ScenarioCorrelation</PayloadDirectory>
      <Command>$(Python) %HELIX_CORRELATION_PAYLOAD%\performance\src\scenarios\crossgen\test.py crossgen --test-name Microsoft.CodeAnalysis.CSharp.dll --core-root %HELIX_CORRELATION_PAYLOAD%\Core_Root</Command>
    </HelixWorkItem>
    <HelixWorkItem Include="Crossgen System.Private.CoreLib.dll">
      <PayloadDirectory>$(WorkItemDirectory)\ScenarioCorrelation</PayloadDirectory>
      <Command>$(Python) %HELIX_CORRELATION_PAYLOAD%\performance\src\scenarios\crossgen\test.py crossgen --test-name System.Private.CoreLib.dll --core-root %HELIX_CORRELATION_PAYLOAD%\Core_Root</Command>
    </HelixWorkItem>
  </ItemGroup>

  <ItemGroup Condition="'$(AGENT_OS)' == 'Windows_NT' and '$(Architecture)' == 'x64'">
    <HelixWorkItem Include="Crossgen2 System.Private.Xml.dll">
      <PayloadDirectory>$(WorkItemDirectory)\ScenarioCorrelation</PayloadDirectory>
      <Command>$(Python) %HELIX_CORRELATION_PAYLOAD%\performance\src\scenarios\crossgen2\test.py crossgen2 --single System.Private.Xml.dll --core-root %HELIX_CORRELATION_PAYLOAD%\Core_Root</Command>
    </HelixWorkItem>
    <HelixWorkItem Include="Crossgen2 System.Linq.Expressions.dll">
      <PayloadDirectory>$(WorkItemDirectory)\ScenarioCorrelation</PayloadDirectory>
      <Command>$(Python) %HELIX_CORRELATION_PAYLOAD%\performance\src\scenarios\crossgen2\test.py crossgen2 --single System.Linq.Expressions.dll --core-root %HELIX_CORRELATION_PAYLOAD%\Core_Root</Command>
    </HelixWorkItem>
    <HelixWorkItem Include="Crossgen2 Microsoft.CodeAnalysis.VisualBasic.dll">
      <PayloadDirectory>$(WorkItemDirectory)\ScenarioCorrelation</PayloadDirectory>
      <Command>$(Python) %HELIX_CORRELATION_PAYLOAD%\performance\src\scenarios\crossgen2\test.py crossgen2 --single Microsoft.CodeAnalysis.VisualBasic.dll --core-root %HELIX_CORRELATION_PAYLOAD%\Core_Root</Command>
    </HelixWorkItem>
    <HelixWorkItem Include="Crossgen2 Microsoft.CodeAnalysis.CSharp.dll">
      <PayloadDirectory>$(WorkItemDirectory)\ScenarioCorrelation</PayloadDirectory>
      <Command>$(Python) %HELIX_CORRELATION_PAYLOAD%\performance\src\scenarios\crossgen2\test.py crossgen2 --single Microsoft.CodeAnalysis.CSharp.dll --core-root %HELIX_CORRELATION_PAYLOAD%\Core_Root</Command>
    </HelixWorkItem>
    <HelixWorkItem Include="Crossgen2 System.Private.CoreLib.dll">
      <PayloadDirectory>$(WorkItemDirectory)\ScenarioCorrelation</PayloadDirectory>
      <Command>$(Python) %HELIX_CORRELATION_PAYLOAD%\performance\src\scenarios\crossgen2\test.py crossgen2 --single System.Private.CoreLib.dll --core-root %HELIX_CORRELATION_PAYLOAD%\Core_Root</Command>
    </HelixWorkItem>
    <HelixWorkItem Include="Crossgen2 Composite Framework R2R">
      <PayloadDirectory>$(WorkItemDirectory)\ScenarioCorrelation</PayloadDirectory>
      <Command>$(Python) %HELIX_CORRELATION_PAYLOAD%\performance\src\scenarios\crossgen2\test.py crossgen2 --composite %HELIX_CORRELATION_PAYLOAD%\performance\src\scenarios\crossgen2\framework-r2r.dll.rsp --core-root %HELIX_CORRELATION_PAYLOAD%\Core_Root</Command>
      <Timeout>1:00</Timeout>
    </HelixWorkItem>

  </ItemGroup>
</Project>


/********************************************************************\
 * This program is free software; you can redistribute it and/or    *
 * modify it under the terms of the GNU General Public License as   *
 * published by the Free Software Foundation; either version 2 of   *
 * the License, or (at your option) any later version.              *
 *                                                                  *
 * This program is distributed in the hope that it will be useful,  *
 * but WITHOUT ANY WARRANTY; without even the implied warranty of   *
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the    *
 * GNU General Public License for more details.                     *
 *                                                                  *
 * You should have received a copy of the GNU General Public License*
 * along with this program; if not, contact:                        *
 *                                                                  *
 * Free Software Foundation           Voice:  +1-617-542-5942       *
 * 51 Franklin Street, Fifth Floor    Fax:    +1-617-542-2652       *
 * Boston, MA  02110-1301,  USA       gnu@gnu.org                   *
 *                                                                  *
\********************************************************************/

#ifndef GNUCASH_HEADER_H
#define GNUCASH_HEADER_H

#include <gtk/gtk.h>

/** @ingroup Register
 * @addtogroup Gnome
 * @{
 */
/** @file gnucash-header.h
 * @brief Public declarations for GnucashHeader class
 */
#define GNC_TYPE_HEADER     (gnc_header_get_type ())
#define GNC_HEADER(o)       (G_TYPE_CHECK_INSTANCE_CAST((o), GNC_TYPE_HEADER, GncHeader))
#define GNC_HEADER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), GNC_TYPE_HEADER, GncHeaderClass))
#define GNC_IS_HEADER(o)    (G_TYPE_CHECK_INSTANCE_TYPE((o), GNC_TYPE_HEADER))

GType    gnc_header_get_type (void);

typedef struct
{
    GtkLayout parent;

    GnucashSheet *sheet;
    SheetBlockStyle *style;

    char *cursor_name;

    int num_phys_rows;

    int in_resize;
    int resize_col_width;
    int resize_x;
    int resize_col;

    int height;
    int width;

    cairo_surface_t *surface;
    GdkCursor *normal_cursor;
    GdkCursor *resize_cursor;
} GncHeader;

typedef struct
{
    GtkLayoutClass parent_class;
} GncHeaderClass;

GtkWidget *gnc_header_new (GnucashSheet *sheet);
void gnc_header_reconfigure (GncHeader *header);
void gnc_header_request_redraw (GncHeader *header);

void gnc_header_set_header_rows (GncHeader *header,
                                 int num_phys_rows);
/** @} */
#endif /* GNUCASH_HEADER_H */


package com.commafeed.frontend.servlet;

import java.io.IOException;
import java.util.Optional;

import javax.inject.Inject;
import javax.inject.Singleton;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.hibernate.SessionFactory;

import com.commafeed.backend.dao.UnitOfWork;
import com.commafeed.backend.dao.UserSettingsDAO;
import com.commafeed.backend.model.User;
import com.commafeed.backend.model.UserSettings;
import com.commafeed.frontend.session.SessionHelper;

import lombok.RequiredArgsConstructor;

@SuppressWarnings("serial")
@RequiredArgsConstructor(onConstructor = @__({ @Inject }) )
@Singleton
public class CustomCssServlet extends HttpServlet {

	private final SessionFactory sessionFactory;
	private final UserSettingsDAO userSettingsDAO;

	@Override
	protected void doGet(final HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
		resp.setContentType("text/css");

		final Optional<User> user = new SessionHelper(req).getLoggedInUser();
		if (!user.isPresent()) {
			return;
		}

		UserSettings settings = UnitOfWork.call(sessionFactory, () -> userSettingsDAO.findByUser(user.get()));
		if (settings == null || settings.getCustomCss() == null) {
			return;
		}

		resp.getWriter().write(settings.getCustomCss());
	}
}


/*
 * Exchange Web Services Managed API
 *
 * Copyright (c) Microsoft Corporation
 * All rights reserved.
 *
 * MIT License
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy of this
 * software and associated documentation files (the "Software"), to deal in the Software
 * without restriction, including without limitation the rights to use, copy, modify, merge,
 * publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
 * to whom the Software is furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all copies or
 * substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
 * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
 * PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
 * FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
 * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 * DEALINGS IN THE SOFTWARE.
 */

namespace Microsoft.Exchange.WebServices.Data
{
    using System;
    using System.Collections.Generic;

    /// <summary>
    /// Represents a collection of persona e-mail addresses.
    /// </summary>
    public sealed class PersonaEmailAddressCollection : ComplexPropertyCollection<PersonaEmailAddress>
    {
        /// <summary>
        /// XML element name
        /// </summary>
        private readonly string collectionItemXmlElementName;

        /// <summary>
        /// Creates a new instance of the <see cref="PersonaEmailAddressCollection"/> class.
        /// </summary>
        /// <remarks>
        /// MSDN example incorrectly shows root element as EmailAddress. In fact, it is Address.
        /// </remarks>
        internal PersonaEmailAddressCollection()
            : this(XmlElementNames.Address)
        {
        }

        /// <summary>
        /// Creates a new instance of the <see cref="PersonaEmailAddressCollection"/> class.
        /// </summary>
        /// <param name="collectionItemXmlElementName">Name of the collection item XML element.</param>
        internal PersonaEmailAddressCollection(string collectionItemXmlElementName)
            : base()
        {
            this.collectionItemXmlElementName = collectionItemXmlElementName;
        }

        /// <summary>
        /// Adds a persona e-mail address to the collection.
        /// </summary>
        /// <param name="emailAddress">The persona e-mail address to add.</param>
        public void Add(PersonaEmailAddress emailAddress)
        {
            this.InternalAdd(emailAddress);
        }

        /// <summary>
        /// Adds multiple persona e-mail addresses to the collection.
        /// </summary>
        /// <param name="emailAddresses">The collection of persona e-mail addresses to add.</param>
        public void AddRange(IEnumerable<PersonaEmailAddress> emailAddresses)
        {
            if (emailAddresses != null)
            {
                foreach (PersonaEmailAddress emailAddress in emailAddresses)
                {
                    this.Add(emailAddress);
                }
            }
        }

        /// <summary>
        /// Adds a persona e-mail address to the collection.
        /// </summary>
        /// <param name="smtpAddress">The SMTP address used to initialize the persona e-mail address.</param>
        /// <returns>An PersonaEmailAddress object initialized with the provided SMTP address.</returns>
        public PersonaEmailAddress Add(string smtpAddress)
        {
            PersonaEmailAddress emailAddress = new PersonaEmailAddress(smtpAddress);

            this.Add(emailAddress);

            return emailAddress;
        }

        /// <summary>
        /// Adds multiple e-mail addresses to the collection.
        /// </summary>
        /// <param name="smtpAddresses">The SMTP addresses to be added as persona email addresses</param>
        public void AddRange(IEnumerable<string> smtpAddresses)
        {
            if (smtpAddresses != null)
            {
                foreach (string smtpAddress in smtpAddresses)
                {
                    this.Add(smtpAddress);
                }
            }
        }

        /// <summary>
        /// Adds an e-mail address to the collection.
        /// </summary>
        /// <param name="name">The name used to initialize the persona e-mail address.</param>
        /// <param name="smtpAddress">The SMTP address used to initialize the persona e-mail address.</param>
        /// <returns>An PersonaEmailAddress object initialized with the provided SMTP address.</returns>
        public PersonaEmailAddress Add(string name, string smtpAddress)
        {
            PersonaEmailAddress emailAddress = new PersonaEmailAddress(name, smtpAddress);

            this.Add(emailAddress);

            return emailAddress;
        }

        /// <summary>
        /// Clears the collection.
        /// </summary>
        public void Clear()
        {
            this.InternalClear();
        }

        /// <summary>
        /// Removes a persona e-mail address from the collection.
        /// </summary>
        /// <param name="index">The index of the e-mail address to remove.</param>
        public void RemoveAt(int index)
        {
            if (index < 0 || index >= this.Count)
            {
                throw new ArgumentOutOfRangeException("index", Strings.IndexIsOutOfRange);
            }

            this.InternalRemoveAt(index);
        }

        /// <summary>
        /// Removes a persona e-mail address from the collection.
        /// </summary>
        /// <param name="personaEmailAddress">The e-mail address to remove.</param>
        /// <returns>Whether removed from the collection</returns>
        public bool Remove(PersonaEmailAddress personaEmailAddress)
        {
            EwsUtilities.ValidateParam(personaEmailAddress, "personaEmailAddress");

            return this.InternalRemove(personaEmailAddress);
        }

        /// <summary>
        /// Creates a PersonaEmailAddress object from an XML element name.
        /// </summary>
        /// <param name="xmlElementName">The XML element name from which to create the persona e-mail address.</param>
        /// <returns>A PersonaEmailAddress object.</returns>
        internal override PersonaEmailAddress CreateComplexProperty(string xmlElementName)
        {
            if (xmlElementName == this.collectionItemXmlElementName)
            {
                return new PersonaEmailAddress();
            }
            else
            {
                return null;
            }
        }

        /// <summary>
        /// Retrieves the XML element name corresponding to the provided PersonaEmailAddress object.
        /// </summary>
        /// <param name="personaEmailAddress">The PersonaEmailAddress object from which to determine the XML element name.</param>
        /// <returns>The XML element name corresponding to the provided PersonaEmailAddress object.</returns>
        internal override string GetCollectionItemXmlElementName(PersonaEmailAddress personaEmailAddress)
        {
            return this.collectionItemXmlElementName;
        }

        /// <summary>
        /// Determine whether we should write collection to XML or not.
        /// </summary>
        /// <returns>Always true, even if the collection is empty.</returns>
        internal override bool ShouldWriteToRequest()
        {
            return true;
        }
    }
}


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

import json
import re
import time
from bs4 import BeautifulSoup

# https://github.com/openlabs/Microsoft-Translator-Python-API
# Also, yes, my API key is public
from microsofttranslator import Translator

def translate(text, language):
	global translator

	for i in range(5):
		try:
			translation	= translator.translate(text, language)

			if 'ArgumentException' in translation:
				raise Exception(translation)

			return re.sub(u'peer.fm', u'Peer.fm', translation, flags = re.IGNORECASE)

		except Exception, e:
			f	= open('translate.log', 'w+')
			f.write(str(e))
			f.close()
			time.sleep(20)
			translator	= Translator('peerfm', 'bJHtNJK4zTLAGtaoyxnO5wI1N3XHN8Fygz2pEn11WTQ=')

	return text

def swapStringWithChild(elem, s, child):
	newElem	= BeautifulSoup(unicode(elem).replace(unicode(s), unicode(child))).find_all()[2]
	elem.replace_with(newElem)
	return newElem

codec		= 'utf8'
placeholder	= u'FUCKMAINE'

f			= open('languages.json', 'r')
languages	= json.loads(f.read())
f.close()

f			= open('index.html', 'r')
baseHtml	= f.read()
f.close()

for language in languages:
	f		= open(language + '.html', 'w')
	html	= BeautifulSoup(baseHtml)

	for elem in html.find_all():
		descendants		= elem.find_all()

		shouldTranslate	= True
		shouldTranslate	= shouldTranslate and elem.get('notranslate') is None
		shouldTranslate	= shouldTranslate and (not descendants or unicode(elem.parent.get('hash-location')) == u'#about')
		shouldTranslate	= shouldTranslate and (elem.parent is None or elem.parent.parent is None or unicode(elem.parent.parent.get('hash-location')) != u'#about')

		if not shouldTranslate:
			continue

		content		= elem.get('content')

		if content is not None and elem.get('name') in ['description', 'keywords', 'author']:
			elem['content']	= translate(unicode(content), language)

		# Swap out children with placeholders
		for i in range(len(descendants)):
			descendants[i].string	= translate(unicode(descendants[i].string), language)
			descendants[i].replace_with(placeholder + unicode(i))

		if descendants:
			elem.string	= elem.text

		text		= unicode(elem.string)

		if elem.string is None or text.strip() == u'':
			continue

		bindings	= re.findall('\\{\\{.*?\\}\\}', text)

		# Swap out Angular bindings with placeholders
		for i in range(len(bindings)):
			text	= text.replace(bindings[i], placeholder + str(i))

		text		= translate(text, language)

		# Swap out placeholders with Angular bindings
		for i in range(len(bindings)):
			text	= text.replace(placeholder + str(i), bindings[i])

		print(text)
		elem.string	= text

		# Swap out placeholders with children
		for i in range(len(descendants)):
			elem	= swapStringWithChild(elem, placeholder + unicode(i), descendants[i])

	f.write(unicode(html).encode(codec))
	f.close()


/**
 @file  protocol.h
 @brief ENet protocol
*/
#ifndef __ENET_PROTOCOL_H__
#define __ENET_PROTOCOL_H__

#include "enet/types.h"

enum
{
   ENET_PROTOCOL_MINIMUM_MTU             = 576,
   ENET_PROTOCOL_MAXIMUM_MTU             = 4096,
   ENET_PROTOCOL_MAXIMUM_PACKET_COMMANDS = 32,
   ENET_PROTOCOL_MINIMUM_WINDOW_SIZE     = 4096,
   ENET_PROTOCOL_MAXIMUM_WINDOW_SIZE     = 65536,
   ENET_PROTOCOL_MINIMUM_CHANNEL_COUNT   = 1,
   ENET_PROTOCOL_MAXIMUM_CHANNEL_COUNT   = 255,
   ENET_PROTOCOL_MAXIMUM_PEER_ID         = 0xFFF,
   ENET_PROTOCOL_MAXIMUM_FRAGMENT_COUNT  = 1024 * 1024
};

typedef enum _ENetProtocolCommand
{
   ENET_PROTOCOL_COMMAND_NONE               = 0,
   ENET_PROTOCOL_COMMAND_ACKNOWLEDGE        = 1,
   ENET_PROTOCOL_COMMAND_CONNECT            = 2,
   ENET_PROTOCOL_COMMAND_VERIFY_CONNECT     = 3,
   ENET_PROTOCOL_COMMAND_DISCONNECT         = 4,
   ENET_PROTOCOL_COMMAND_PING               = 5,
   ENET_PROTOCOL_COMMAND_SEND_RELIABLE      = 6,
   ENET_PROTOCOL_COMMAND_SEND_UNRELIABLE    = 7,
   ENET_PROTOCOL_COMMAND_SEND_FRAGMENT      = 8,
   ENET_PROTOCOL_COMMAND_SEND_UNSEQUENCED   = 9,
   ENET_PROTOCOL_COMMAND_BANDWIDTH_LIMIT    = 10,
   ENET_PROTOCOL_COMMAND_THROTTLE_CONFIGURE = 11,
   ENET_PROTOCOL_COMMAND_SEND_UNRELIABLE_FRAGMENT = 12,
   ENET_PROTOCOL_COMMAND_COUNT              = 13,

   ENET_PROTOCOL_COMMAND_MASK               = 0x0F
} ENetProtocolCommand;

typedef enum _ENetProtocolFlag
{
   ENET_PROTOCOL_COMMAND_FLAG_ACKNOWLEDGE = (1 << 7),
   ENET_PROTOCOL_COMMAND_FLAG_UNSEQUENCED = (1 << 6),

   ENET_PROTOCOL_HEADER_FLAG_COMPRESSED = (1 << 14),
   ENET_PROTOCOL_HEADER_FLAG_SENT_TIME  = (1 << 15),
   ENET_PROTOCOL_HEADER_FLAG_MASK       = ENET_PROTOCOL_HEADER_FLAG_COMPRESSED | ENET_PROTOCOL_HEADER_FLAG_SENT_TIME,

   ENET_PROTOCOL_HEADER_SESSION_MASK    = (3 << 12),
   ENET_PROTOCOL_HEADER_SESSION_SHIFT   = 12
} ENetProtocolFlag;

#ifdef _MSC_VER
#pragma pack(push, 1)
#define ENET_PACKED
#elif defined(__GNUC__) || defined(__clang__)
#define ENET_PACKED __attribute__ ((packed))
#else
#define ENET_PACKED
#endif

typedef struct _ENetProtocolHeader
{
   enet_uint16 peerID;
   enet_uint16 sentTime;
} ENET_PACKED ENetProtocolHeader;

typedef struct _ENetProtocolCommandHeader
{
   enet_uint8 command;
   enet_uint8 channelID;
   enet_uint16 reliableSequenceNumber;
} ENET_PACKED ENetProtocolCommandHeader;

typedef struct _ENetProtocolAcknowledge
{
   ENetProtocolCommandHeader header;
   enet_uint16 receivedReliableSequenceNumber;
   enet_uint16 receivedSentTime;
} ENET_PACKED ENetProtocolAcknowledge;

typedef struct _ENetProtocolConnect
{
   ENetProtocolCommandHeader header;
   enet_uint16 outgoingPeerID;
   enet_uint8  incomingSessionID;
   enet_uint8  outgoingSessionID;
   enet_uint32 mtu;
   enet_uint32 windowSize;
   enet_uint32 channelCount;
   enet_uint32 incomingBandwidth;
   enet_uint32 outgoingBandwidth;
   enet_uint32 packetThrottleInterval;
   enet_uint32 packetThrottleAcceleration;
   enet_uint32 packetThrottleDeceleration;
   enet_uint32 connectID;
   enet_uint32 data;
} ENET_PACKED ENetProtocolConnect;

typedef struct _ENetProtocolVerifyConnect
{
   ENetProtocolCommandHeader header;
   enet_uint16 outgoingPeerID;
   enet_uint8  incomingSessionID;
   enet_uint8  outgoingSessionID;
   enet_uint32 mtu;
   enet_uint32 windowSize;
   enet_uint32 channelCount;
   enet_uint32 incomingBandwidth;
   enet_uint32 outgoingBandwidth;
   enet_uint32 packetThrottleInterval;
   enet_uint32 packetThrottleAcceleration;
   enet_uint32 packetThrottleDeceleration;
   enet_uint32 connectID;
} ENET_PACKED ENetProtocolVerifyConnect;

typedef struct _ENetProtocolBandwidthLimit
{
   ENetProtocolCommandHeader header;
   enet_uint32 incomingBandwidth;
   enet_uint32 outgoingBandwidth;
} ENET_PACKED ENetProtocolBandwidthLimit;

typedef struct _ENetProtocolThrottleConfigure
{
   ENetProtocolCommandHeader header;
   enet_uint32 packetThrottleInterval;
   enet_uint32 packetThrottleAcceleration;
   enet_uint32 packetThrottleDeceleration;
} ENET_PACKED ENetProtocolThrottleConfigure;

typedef struct _ENetProtocolDisconnect
{
   ENetProtocolCommandHeader header;
   enet_uint32 data;
} ENET_PACKED ENetProtocolDisconnect;

typedef struct _ENetProtocolPing
{
   ENetProtocolCommandHeader header;
} ENET_PACKED ENetProtocolPing;

typedef struct _ENetProtocolSendReliable
{
   ENetProtocolCommandHeader header;
   enet_uint16 dataLength;
} ENET_PACKED ENetProtocolSendReliable;

typedef struct _ENetProtocolSendUnreliable
{
   ENetProtocolCommandHeader header;
   enet_uint16 unreliableSequenceNumber;
   enet_uint16 dataLength;
} ENET_PACKED ENetProtocolSendUnreliable;

typedef struct _ENetProtocolSendUnsequenced
{
   ENetProtocolCommandHeader header;
   enet_uint16 unsequencedGroup;
   enet_uint16 dataLength;
} ENET_PACKED ENetProtocolSendUnsequenced;

typedef struct _ENetProtocolSendFragment
{
   ENetProtocolCommandHeader header;
   enet_uint16 startSequenceNumber;
   enet_uint16 dataLength;
   enet_uint32 fragmentCount;
   enet_uint32 fragmentNumber;
   enet_uint32 totalLength;
   enet_uint32 fragmentOffset;
} ENET_PACKED ENetProtocolSendFragment;

typedef union _ENetProtocol
{
   ENetProtocolCommandHeader header;
   ENetProtocolAcknowledge acknowledge;
   ENetProtocolConnect connect;
   ENetProtocolVerifyConnect verifyConnect;
   ENetProtocolDisconnect disconnect;
   ENetProtocolPing ping;
   ENetProtocolSendReliable sendReliable;
   ENetProtocolSendUnreliable sendUnreliable;
   ENetProtocolSendUnsequenced sendUnsequenced;
   ENetProtocolSendFragment sendFragment;
   ENetProtocolBandwidthLimit bandwidthLimit;
   ENetProtocolThrottleConfigure throttleConfigure;
} ENET_PACKED ENetProtocol;

#ifdef _MSC_VER
#pragma pack(pop)
#endif

#endif /* __ENET_PROTOCOL_H__ */


/*
Copyright 2015 Google 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.
*/

#include "stdafx.h"

BOOL APIENTRY DllMain( HMODULE hModule,
                       DWORD  ul_reason_for_call,
                       LPVOID lpReserved
					 )
{
	switch (ul_reason_for_call)
	{
	case DLL_PROCESS_ATTACH:
	case DLL_THREAD_ATTACH:
	case DLL_THREAD_DETACH:
	case DLL_PROCESS_DETACH:
		break;
	}
	return TRUE;
}


<app-header name="PoE Overlay - Launcher">

             {{message$ | async}}

</app-header>


;; Constraint definitions for Blackfin
;; Copyright (C) 2008-2019 Free Software Foundation, Inc.
;; Contributed by Analog Devices

;; This file is part of GCC.

;; GCC 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, or (at your
;; option) any later version.

;; GCC 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 GCC; see the file COPYING3.  If not see
;; <http://www.gnu.org/licenses/>.

(define_register_constraint "a" "PREGS"
  "A Pn register.")

(define_register_constraint "d" "DREGS"
  "A Rn register.")

(define_register_constraint "z" "PREGS_CLOBBERED"
  "A call clobbered Pn register.")

(define_register_constraint "D" "EVEN_DREGS"
  "An even-numbered Rn register.")

(define_register_constraint "W" "ODD_DREGS"
  "An odd-numbered Rn register.")

(define_register_constraint "e" "AREGS"
  "An accumulator register.")

(define_register_constraint "A" "EVEN_AREGS"
  "An even-numbered accumulator; A0.")

(define_register_constraint "B" "ODD_AREGS"
  "An odd-numbered accumulator; A1.")

(define_register_constraint "b" "IREGS"
  "An I register.")

(define_register_constraint "v" "BREGS"
  "A B register.")

(define_register_constraint "f" "MREGS"
  "An M register.")

(define_register_constraint "c" "CIRCREGS"
  "A register used for circular buffering, i.e. I, B, or L registers.")

(define_register_constraint "C" "CCREGS"
  "The CC register.")

(define_register_constraint "t" "LT_REGS"
  "LT0 or LT1.")

(define_register_constraint "u" "LB_REGS"
  "LB0 or LB1.")

(define_register_constraint "k" "LC_REGS"
  "LC0 or LC1.")

(define_register_constraint "x" "MOST_REGS"
  "Any R, P, B, M, I or L register.")

(define_register_constraint "y" "PROLOGUE_REGS"
  "Additional registers typically used only in prologues and epilogues:
   RETS, RETN, RETI, RETX, RETE, ASTAT, SEQSTAT and USP.")

(define_register_constraint "w" "NON_A_CC_REGS"
  "Any register except accumulators or CC.")

(define_register_constraint "Z" "FDPIC_REGS"
  "@internal The FD-PIC GOT pointer; P3.")

(define_register_constraint "Y" "FDPIC_FPTR_REGS"
  "@internal The FD-PIC function pointer register; P1.")

(define_register_constraint "q0" "D0REGS"
  "The register R0.")

(define_register_constraint "q1" "D1REGS"
  "The register R1.")

(define_register_constraint "q2" "D2REGS"
  "The register R2.")

(define_register_constraint "q3" "D3REGS"
  "The register R3.")

(define_register_constraint "q4" "D4REGS"
  "The register R4.")

(define_register_constraint "q5" "D5REGS"
  "The register R5.")

(define_register_constraint "q6" "D6REGS"
  "The register R6.")

(define_register_constraint "q7" "D7REGS"
  "The register R7.")

(define_register_constraint "qA" "P0REGS"
  "The register P0.")

;; Constant constraints.

(define_constraint "J"
  "A constant value of the form 2**N, where N 5-bit wide."
  (and (match_code "const_int")
       (match_test "log2constp (ival)")))

(define_constraint "Ks3"
  "A signed 3 bit immediate."
  (and (match_code "const_int")
       (match_test "ival >= -4 && ival <= 3")))

(define_constraint "Ku3"
  "An unsigned 3 bit immediate."
  (and (match_code "const_int")
       (match_test "ival >= 0 && ival <= 7")))

(define_constraint "Ks4"
  "A signed 4 bit immediate."
  (and (match_code "const_int")
       (match_test "ival >= -8 && ival <= 7")))

(define_constraint "Ku4"
  "An unsigned 4 bit immediate."
  (and (match_code "const_int")
       (match_test "ival >= 0 && ival <= 15")))

(define_constraint "Ks5"
  "A signed 5 bit immediate."
  (and (match_code "const_int")
       (match_test "ival >= -16 && ival <= 15")))

(define_constraint "Ku5"
  "An unsigned 5 bit immediate."
  (and (match_code "const_int")
       (match_test "ival >= 0 && ival <= 31")))

(define_constraint "Ks7"
  "A signed 7 bit immediate."
  (and (match_code "const_int")
       (match_test "ival >= -64 && ival <= 63")))

(define_constraint "KN7"
  "A constant that when negated is a signed 7 bit immediate."
  (and (match_code "const_int")
       (match_test "ival >= -63 && ival <= 64")))

(define_constraint "Ksh"
  "A signed 16 bit immediate."
  (and (match_code "const_int")
       (match_test "ival >= -32768 && ival <= 32767")))

(define_constraint "Kuh"
  "An unsigned 16 bit immediate."
  (and (match_code "const_int")
       (match_test "ival >= 0 && ival <= 65535")))

(define_constraint "L"
  "A constant value of the form ~(2**N)."
  (and (match_code "const_int")
       (match_test "log2constp (~ival)")))

(define_constraint "M1"
  "An integer with the value 255."
  (and (match_code "const_int")
       (match_test "ival == 255")))

(define_constraint "M2"
  "An integer with the value 65535."
  (and (match_code "const_int")
       (match_test "ival == 65535")))

(define_constraint "P0"
  "An integer with the value 0."
  (and (match_code "const_int")
       (match_test "ival == 0")))

(define_constraint "P1"
  "An integer with the value 1."
  (and (match_code "const_int")
       (match_test "ival == 1")))

(define_constraint "P2"
  "An integer with the value 2."
  (and (match_code "const_int")
       (match_test "ival == 2")))

(define_constraint "P3"
  "An integer with the value 3."
  (and (match_code "const_int")
       (match_test "ival == 3")))

(define_constraint "P4"
  "An integer with the value 4."
  (and (match_code "const_int")
       (match_test "ival == 4")))

(define_constraint "PA"
  "An integer constant describing any macflag except variants involving M."
  (and (match_code "const_int")
       (match_test "ival != MACFLAG_M && ival != MACFLAG_IS_M")))

(define_constraint "PB"
  "An integer constant describing any macflag involving M."
  (and (match_code "const_int")
       (match_test "ival == MACFLAG_M || ival == MACFLAG_IS_M")))

;; Extra constraints

(define_constraint "Q"
  "A SYMBOL_REF."
  (match_code "symbol_ref"))


html, body {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

.main {
    width: 100%;
    overflow: hidden;
}

.table-view {
    height: 100%;
    float: left;
    margin: 20px;
    width: 40%;
}

.table-view .table-container {
    width: 100%;
    margin-bottom: 50px;
    overflow: scroll;
}

.table-view th {
    padding: 5px 10px;
    background-color: #F7F7F7;
}

.table-view td {
    width: 50px;
    text-align: center;
    padding:0;
}

.table-container input {
    width: 40px;
    padding: 5px;
    border: none;
    outline: none;
}

.table-view caption {
    font-size: 18px;
    text-align: left;
}

.charts-view {
    /*margin-left: 49%!important;*/
    width: 50%;
    margin-left: 49%;
    height: 400px;
}

.charts-container {
    border-left: 1px solid #c3c3c3;
}

.charts-format fieldset {
    padding-left: 20px;
    margin-bottom: 50px;
}

.charts-format legend {
    padding-left: 10px;
    padding-right: 10px;
}

.format-item-container {
    padding: 20px;
}

.format-item-container label {
    display: block;
    margin: 10px 0;
}

.charts-format .data-item {
    border: 1px solid black;
    outline: none;
    padding: 2px 3px;
}

/* 图表类型 */

.charts-type {
    margin-top: 50px;
    height: 300px;
}

.scroll-view {
    border: 1px solid #c3c3c3;
    border-left: none;
    border-right: none;
    overflow: hidden;
}

.scroll-container {
    margin: 20px;
    width: 100%;
    overflow: hidden;
}

.scroll-bed {
    width: 10000px;
    _margin-top: 20px;
    -webkit-transition: margin-left .5s ease;
    -moz-transition: margin-left .5s ease;
    transition: margin-left .5s ease;
}

.view-box {
    display: inline-block;
    *display: inline;
    *zoom: 1;
    margin-right: 20px;
    border: 2px solid white;
    line-height: 0;
    overflow: hidden;
    cursor: pointer;
}

.view-box img {
    border: 1px solid #cecece;
}

.view-box.selected {
    border-color: #7274A7;
}

.button-container {
    margin-bottom: 20px;
    text-align: center;
}

.button-container a {
    display: inline-block;
    width: 100px;
    height: 25px;
    line-height: 25px;
    border: 1px solid #c2ccd1;
    margin-right: 30px;
    text-decoration: none;
    color: black;
    -webkit-border-radius: 2px;
    -moz-border-radius: 2px;
    border-radius: 2px;
}

.button-container a:HOVER {
    background: #fcfcfc;
}

.button-container a:ACTIVE {
    border-top-color: #c2ccd1;
    box-shadow:inset 0 5px 4px -4px rgba(49, 49, 64, 0.1);
}

.edui-charts-not-data {
    height: 100px;
    line-height: 100px;
    text-align: center;
}


{{target: component-legend}}

# legend(Object)

图例组件。

图例组件展现了不同系列的标记(symbol)，颜色和名字。可以通过点击图例控制哪些系列不显示。

ECharts 3 中单个 echarts 实例中可以存在多个图例组件，会方便多个图例的布局。

当图例数量过多时，可以使用 [滚动图例（垂直）](${galleryEditorPath}pie-legend&edit=1&reset=1) 或 [滚动图例（水平）](${galleryEditorPath}radar2&edit=1&reset=1)，参见：[legend.type](~legend.type)

<ExampleBaseOption name="legend" title="基础图例" title-en="Basic Legend">

option = {
    color: ['#003366', '#006699', '#4cabce', '#e5323e'],
    dataset: {
        source: [
            ['type', '2012', '2013', '2014', '2015', '2016'],
            ['Forest', 320, 332, 301, 334, 390],
            ['Steppe', 220, 182, 191, 234, 290],
            ['Desert', 150, 232, 201, 154, 190],
            ['Wetland', 98, 77, 101, 99, 40]
        ]
    },
    legend: {
    },
    xAxis: {
        type: 'category',
        axisTick: {show: false}
    },
    yAxis: {},
    series: [
        {
            type: 'bar',
            seriesLayoutBy: 'row'
        },
        {
            type: 'bar',
            seriesLayoutBy: 'row'
        },
        {
            type: 'bar',
            seriesLayoutBy: 'row'
        },
        {
            type: 'bar',
            seriesLayoutBy: 'row'
        }
    ]
};
</ExampleBaseOption>

<ExampleBaseOption name="legend-more" title="多源图例" title-en="Legend on Multiple Source">
const option = {
    legend: {
        width: 350,
        left: 0
    },
    tooltip: {},
    dataset: {
        source: [
            ['product', '2012', '2013', '2014', '2015'],
            ['Matcha Latte', 41.1, 30.4, 65.1, 53.3],
            ['Milk Tea', 86.5, 92.1, 85.7, 83.1],
            ['Cheese Cocoa', 24.1, 67.2, 79.5, 86.4]
        ]
    },
    xAxis: [
        {type: 'category', gridIndex: 0},
        {type: 'category', gridIndex: 1}
    ],
    yAxis: [
        {gridIndex: 0},
        {gridIndex: 1}
    ],
    grid: [
        {bottom: '55%'},
        {top: '55%'}
    ],
    series: [
        // These series are in the first grid.
        {type: 'bar', seriesLayoutBy: 'row'},
        {type: 'bar', seriesLayoutBy: 'row'},
        {type: 'bar', seriesLayoutBy: 'row'},
        // These series are in the second grid.
        {type: 'bar', xAxisIndex: 1, yAxisIndex: 1},
        {type: 'bar', xAxisIndex: 1, yAxisIndex: 1},
        {type: 'bar', xAxisIndex: 1, yAxisIndex: 1},
        {type: 'bar', xAxisIndex: 1, yAxisIndex: 1}
    ]
};

</ExampleBaseOption>

## type(string)

<ExampleUIControlEnum options="plain,scroll" />

图例的类型。可选值：

+ `'plain'`：普通图例。缺省就是普通图例。
+ `'scroll'`：可滚动翻页的图例。当图例数量较多时可以使用。

参见 [滚动图例（垂直）](${galleryEditorPath}pie-legend&edit=1&reset=1) 或 [滚动图例（水平）](${galleryEditorPath}radar2&edit=1&reset=1)。

当使用 `'scroll'` 时，使用这些设置进行细节配置：
+ [legend.scrollDataIndex](~legend.scrollDataIndex)
+ [legend.pageButtonItemGap](~legend.pageButtonItemGap)
+ [legend.pageButtonGap](~legend.pageButtonGap)
+ [legend.pageButtonPosition](~legend.pageButtonPosition)
+ [legend.pageFormatter](~legend.pageFormatter)
+ [legend.pageIcons](~legend.pageIcons)
+ [legend.pageIconColor](~legend.pageIconColor)
+ [legend.pageIconInactiveColor](~legend.pageIconInactiveColor)
+ [legend.pageIconSize](~legend.pageIconSize)
+ [legend.pageTextStyle](~legend.pageTextStyle)
+ [legend.animation](~legend.animation)
+ [legend.animationDurationUpdate](~legend.animationDurationUpdate)

{{use: partial-component-id(prefix="#")}}

## show(boolean) = true

<ExampleUIControlBoolean default="true" />

{{use: partial-rect-layout-width-height(componentName="图例")}}

## orient(string) = 'horizontal'

<ExampleUIControlEnum options="vertical,horizontal" default="horizontal" />

图例列表的布局朝向。

可选：
+ `'horizontal'`
+ `'vertical'`

## align(string) = 'auto'

<ExampleUIControlEnum options="auto,left,right" default="auto" />

图例标记和文本的对齐。默认自动，根据组件的位置和 orient 决定，当组件的 [left](~legend.left) 值为 `'right'` 以及纵向布局（[orient](~legend.orient) 为 `'vertical'`）的时候为右对齐，即为 `'right'`。

可选：
+ `'auto'`
+ `'left'`
+ `'right'`

## padding(number|Array) = 5

<ExampleUIControlVector dims="T,R,B,L" default="5" min="0" step="0.5" />

{{ use: partial-padding(componentName="图例")}}

## itemGap(number) = 10

<ExampleUIControlNumber default="10" min="0" step="0.5" />

图例每项之间的间隔。横向布局时为水平间隔，纵向布局时为纵向间隔。

## itemWidth(number) = 25

<ExampleUIControlNumber default="25" min="0" step="0.5" />

图例标记的图形宽度。

## itemHeight(number) = 14

<ExampleUIControlNumber default="14" min="0" step="0.5" />

图例标记的图形高度。

## symbolKeepAspect(boolean) = true

<ExampleUIControlBoolean />

如果图标（可能来自系列的 `symbol` 或用户自定义的 `legend.data.icon`）是 `path://` 的形式，是否在缩放时保持该图形的长宽比。

## formatter(string|Function) = null

用来格式化图例文本，支持字符串模板和回调函数两种形式。

示例：
```js
// 使用字符串模板，模板变量为图例名称 {name}
formatter: 'Legend {name}'
// 使用回调函数
formatter: function (name) {
    return 'Legend ' + name;
}
```

## selectedMode(string|boolean) = true

<ExampleUIControlBoolean options="true,false,single,multiple" />

图例选择的模式，控制是否可以通过点击图例改变系列的显示状态。默认开启图例选择，可以设成 `false` 关闭。

除此之外也可以设成 `'single'` 或者  `'multiple'` 使用单选或者多选模式。

## inactiveColor(Color) = '#ccc'

<ExampleUIControlColor default="#ccc" />

图例关闭时的颜色。

## selected(Object)

图例选中状态表。

示例：
```
selected: {
    // 选中'系列1'
    '系列1': true,
    // 不选中'系列2'
    '系列2': false
}
```

## textStyle(Object)

图例的公用文本样式。

{{ use: partial-text-style(
    componentName='图例',
    prefix='##',
    defaultColor="#333",
    noAlign=true,
    noVerticalAlign=true
) }}

## tooltip(Object)

图例的 tooltip 配置，配置项同 [tooltip](~tooltip)。默认不显示，可以在 legend 文字很多的时候对文字做裁剪并且开启 tooltip，如下示例：

```js
legend: {
    formatter: function (name) {
        return echarts.format.truncateText(name, 40, '14px Microsoft Yahei', '…');
    },
    tooltip: {
        show: true
    }
}
```

## icon(string)

<ExampleUIControlIcon />

图例项的 icon。

{{ use: partial-icon }}

## data(Array)

图例的数据数组。数组项通常为一个字符串，每一项代表一个系列的 `name`（如果是[饼图](~series-pie)，也可以是饼图单个数据的 `name`）。图例组件会自动根据对应系列的图形标记（symbol）来绘制自己的颜色和标记，特殊字符串 `''`（空字符串）或者 `'\n'`（换行字符串）用于图例的换行。

如果 `data` 没有被指定，会自动从当前系列中获取。多数系列会取自 [series.name](~series.name) 或者 [series.encode](~series.encode) 的 `seriesName` 所指定的维度。如 [饼图](~series-pie) and [漏斗图](~series-funnel) 等会取自 series.data 中的 name。

如果要设置单独一项的样式，也可以把该项写成配置项对象。此时必须使用 `name` 属性对应表示系列的 `name`。

示例
```
data: [{
    name: '系列1',
    // 强制设置图形为圆。
    icon: 'circle',
    // 设置文本为红色
    textStyle: {
        color: 'red'
    }
}]
```

### name(string)
图例项的名称，应等于某系列的`name`值（如果是饼图，也可以是饼图单个数据的 `name`）。

### icon(string)

图例项的 icon。

{{ use: partial-icon }}

### textStyle(Object)

图例项的文本样式。

{{ use: partial-component-common-style(
    componentName='图例',
    prefix='#',
    defaultBorderColor="'#ccc'",
    hasBorderRadius=true
) }}

## scrollDataIndex(number) = 0

[legend.type](~legend.type) 为 `'scroll'` 时有效。

图例当前最左上显示项的 `dataIndex`。

`setOption` 时指定此项的话，可决定当前图例滚动到哪里。

但是，如果仅仅想改变图例翻页，一般并不调用 `setOption`（因为这太重量了），仅仅使用 action [legendScroll](api.html#action.legend.legendScroll) 即可。

参见 [滚动图例（垂直）](${galleryEditorPath}pie-legend&edit=1&reset=1) 或 [滚动图例（水平）](${galleryEditorPath}radar2&edit=1&reset=1)。

## pageButtonItemGap(number) = 5

[legend.type](~legend.type) 为 `'scroll'` 时有效。

图例控制块中，按钮和页信息之间的间隔。

参见 [滚动图例（垂直）](${galleryEditorPath}pie-legend&edit=1&reset=1) 或 [滚动图例（水平）](${galleryEditorPath}radar2&edit=1&reset=1)。

## pageButtonGap(number) = null

[legend.type](~legend.type) 为 `'scroll'` 时有效。

图例控制块和图例项之间的间隔。

参见 [滚动图例（垂直）](${galleryEditorPath}pie-legend&edit=1&reset=1) 或 [滚动图例（水平）](${galleryEditorPath}radar2&edit=1&reset=1)。

## pageButtonPosition(string) = 'end'

[legend.type](~legend.type) 为 `'scroll'` 时有效。

图例控制块的位置。可选值为：

+ `'start'`：控制块在左或上。
+ `'end'`：控制块在右或下。

参见 [滚动图例（垂直）](${galleryEditorPath}pie-legend&edit=1&reset=1) 或 [滚动图例（水平）](${galleryEditorPath}radar2&edit=1&reset=1)。

## pageFormatter(string|Function) = '{current}/{total}'

[legend.type](~legend.type) 为 `'scroll'` 时有效。

图例控制块中，页信息的显示格式。默认为 `'{current}/{total}'`，其中 `{current}` 是当前页号（从 1 开始计数），`{total}` 是总页数。

如果 `pageFormatter` 使用函数，须返回字符串，参数为：
```js
{
    current: number
    total: number
}
```

参见 [滚动图例（垂直）](${galleryEditorPath}pie-legend&edit=1&reset=1) 或 [滚动图例（水平）](${galleryEditorPath}radar2&edit=1&reset=1)。

## pageIcons(Object)

[legend.type](~legend.type) 为 `'scroll'` 时有效。

图例控制块的图标。

### horizontal(Array)

[legend.orient](~legend.orient) 为 `'horizontal'` 时的翻页按钮图标。

是一个数组，表示 `[previous page button, next page button]`。默认值为 `['M0,0L12,-10L12,10z', 'M0,0L-12,-10L-12,10z']`，。

数组中每项，

{{ use: partial-icon-image-path }}

参见 [滚动图例（垂直）](${galleryEditorPath}pie-legend&edit=1&reset=1) 或 [滚动图例（水平）](${galleryEditorPath}radar2&edit=1&reset=1)。

### vertical(Array)

[legend.orient](~legend.orient) 为 `'vertical'` 时的翻页按钮图标。

是一个数组，表示 `[previous page button, next page button]`。默认值为 `['M0,0L20,0L10,-20z', 'M0,0L20,0L10,20z']`，。

数组中每项，

{{ use: partial-icon-image-path }}

参见 [滚动图例（垂直）](${galleryEditorPath}pie-legend&edit=1&reset=1) 或 [滚动图例（水平）](${galleryEditorPath}radar2&edit=1&reset=1)。

## pageIconColor(string) = '#2f4554'

<ExampleUIControlColor default="#2f4554" />

[legend.type](~legend.type) 为 `'scroll'` 时有效。

翻页按钮的颜色。

参见 [滚动图例（垂直）](${galleryEditorPath}pie-legend&edit=1&reset=1) 或 [滚动图例（水平）](${galleryEditorPath}radar2&edit=1&reset=1)。

## pageIconInactiveColor(string) = '#aaa'

<ExampleUIControlColor default="#aaa" />

[legend.type](~legend.type) 为 `'scroll'` 时有效。

翻页按钮不激活时（即翻页到头时）的颜色。

参见 [滚动图例（垂直）](${galleryEditorPath}pie-legend&edit=1&reset=1) 或 [滚动图例（水平）](${galleryEditorPath}radar2&edit=1&reset=1)。

## pageIconSize(number|Array) = 15

<ExampleUIControlVector default="15,15" dims="w,h" />

[legend.type](~legend.type) 为 `'scroll'` 时有效。

翻页按钮的大小。可以是数字，也可以是数组，如 `[10, 3]`，表示 `[宽，高]`。

参见 [滚动图例（垂直）](${galleryEditorPath}pie-legend&edit=1&reset=1) 或 [滚动图例（水平）](${galleryEditorPath}radar2&edit=1&reset=1)。

## pageTextStyle(Object)

[legend.type](~legend.type) 为 `'scroll'` 时有效。

图例页信息的文字样式。

{{ use: partial-simple-text-style(componentName='图例页信息', prefix='##', defaultColor="#333") }}

## animation(boolean)

<ExampleUIControlBoolean default="true" />

图例翻页是否使用动画。

## animationDurationUpdate(number) = 800

<ExampleUIControlNumber min="0" default="800" step="20" />

图例翻页时的动画时长。

## emphasis(Object)

### selectorLabel(Object)

{{ use: partial-version(version = "4.4.0") }}

{{use:partial-label(
    prefix='###',
    defaultShowLabel=true,
    noPosition=true,
    formatter=false,
    formatter1d=false
)}}

## selector(boolean|Array) = false

{{ use: partial-version(version = "4.4.0") }}

图例组件中的选择器按钮，目前包括全选和反选两种功能。默认不显示，用户可手动开启，也可以手动配置每个按钮的标题。

使用方式如下：

```js
selector: [
    {
        type: 'all or inverse',
        // 可以是任意你喜欢的 title
        title: '全选'
    },
    {
        type: 'inverse',
        title: '反选'
    }
]

// 或
selector: true

// 或
selector: ['all', 'inverse']
```

## selectorLabel(Object)

{{ use: partial-version(version = "4.4.0") }}

选择器按钮的文本标签样式，默认显示。

{{use:partial-label(
    prefix='##',
    defaultShowLabel=true,
    noPosition=true,
    formatter=false,
    formatter1d=false
)}}

## selectorPosition(string) = 'auto'

<ExampleUIControlEnum options="auto,start,end" />

{{ use: partial-version(version = "4.4.0") }}

选择器的位置，可以放在图例的尾部或者头部，对应的值分别为 `'end'` 和 `'start'`。默认情况下，图例横向布局的时候，选择器放在图例的尾部；图例纵向布局的时候，选择器放在图例的头部。

## selectorItemGap(number) = 7

<ExampleUIControlNumber min="0" default="7" step="0.5" />

{{ use: partial-version(version = "4.4.0") }}

选择器按钮之间的间隔。

## selectorButtonGap(number) = 10

<ExampleUIControlNumber min="0" default="10" step="0.5" />

{{ use: partial-version(version = "4.4.0") }}

选择器按钮与图例组件之间的间隔。