text:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:paddingLeft="10dp"
    android:paddingRight="10dp"
    android:paddingTop="2dp"
    android:paddingBottom="3dp"
    android:orientation="vertical"
    android:background="#ffffff">

    <TextView

        android:id="@+id/laundryroom_title"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:textColor="#000000"
        android:textSize="20sp"
        android:text="Building Title" />

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content" >

        <LinearLayout
            android:layout_width="wrap_content"
            android:layout_height="match_parent"
            android:orientation="vertical"
            android:layout_weight="25"
            android:gravity="center">

            <TextView
                android:id="@+id/availwashers_TITLE"
                android:textSize="10sp"
                android:textColor="#000000"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="Washers\nAvailable" />

            <TextView
                android:id="@+id/available_washers"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:textColor="#000000"
                android:textSize="18sp"
                android:text="6" />

        </LinearLayout>

         <LinearLayout
            android:layout_width="wrap_content"
            android:layout_height="match_parent"
            android:orientation="vertical"
            android:layout_weight="25"
            android:gravity="center">

            <TextView
                android:id="@+id/avildryers_TITLE"
                android:textSize="10sp"
                android:textColor="#000000"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:textAlignment="center"
                android:text="Dryers\nAvailable" />

            <TextView
                android:id="@+id/available_dryers"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:textColor="#000000"
                android:textSize="18sp"
                android:text="1" />

        </LinearLayout>        <LinearLayout
            android:layout_width="wrap_content"
            android:layout_height="match_parent"
            android:orientation="vertical"
            android:layout_weight="25"
            android:gravity="center">

            <TextView
                android:id="@+id/used_washers_TITLE"
                android:textSize="10sp"
                android:textColor="#000000"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="Washers\nIn Use" />

            <TextView
                android:id="@+id/used_washers"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:textColor="#000000"
                android:textSize="18sp"
                android:text="6" />

        </LinearLayout>
        <LinearLayout
            android:layout_width="wrap_content"
            android:layout_height="match_parent"
            android:orientation="vertical"
            android:layout_weight="25"
            android:gravity="center">

            <TextView
                android:id="@+id/used_dryers_TITLE"
                android:textSize="10sp"
                android:textColor="#000000"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="Dryers\nIn Use" />

            <TextView
                android:id="@+id/used_dryers"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:textColor="#000000"
                android:textSize="18sp"
                android:text="6" />

        </LinearLayout>
    </LinearLayout>

</LinearLayout>


text:
@interface SampleEntity : NSObject

@property (nonatomic, copy) NSString *title;
@property (nonatomic, copy) NSString *category;
@property (nonatomic, copy) NSString *year;

@end

redpajama_set_name: RedPajamaGithub


text:
SYNONYM

#### According to
The Catalogue of Life, 3rd January 2011

#### Published in
Can. J. Bot. 42: 1292 (1964)

#### Original name
Hantzschia phycomyces Auersw., 1862

### Remarks
null


text:
// Short comment describing what this class does needed!

#ifndef ALIJRUNTABLE_H
#define ALIJRUNTABLE_H

#include <TString.h>
#include <vector>
class AliJRunTable {
public:
  enum { kUnknownPeriod, kLHC10b, kLHC10c, kLHC10d, kLHC10e,
    kLHC10h, kLHC11a,kLHC11b , kLHC11c , kLHC11d, kLHC11e, kLHC11h, kLHC12g,kLHC12h,
    kLHC13b, kLHC13c, kLHC13d, kLHC13e, kLHC13g, kLHC15o, kLHC16g1, kLHC16q, kLHC17f,
    kJNPeriod};
  enum { kRE, kMC };
  enum { kPP, kPbPb, kPA };
  AliJRunTable();
  void Init();
  void AddGoodRun(int period, int runnumber){ fGoodRun[period].push_back(runnumber); }
  TString GetPeriodName( int period=-1 ) const;
  int GetBeamType( int period ) const { return fBeamType[period]; }
  TString GetMCPeriod( int period ) const { return fMCPeriod[period]; }
  int GetPeriodCode(TString perstr) const;
  int GetRunNumberToPeriod( int runnumber );
  void SetPeriodInformation(int period, TString name, int beamtype, int datatype, int energy, int run0, int run1, TString MCPeriod);
  int GetBeamEnergy(int period) const { return fEnergy[period]; }

  int GetRunNumberFromString( const char * tstr );
  TString GetPeriodFromString( const char * tstr ) const;
  TString GetMCPeriodFromString( const char * tstr) const;
  int GetPeriodFromMCPeriod( const char * tstr );
  const char * GetBeamStr( int ib=-1 ) const;  // Never used anywhere, should it be removed?
  const char * GetDataStr( int ib=-1 ) const;  // Never used anywhere, should it be removed?
  const char * GetEnergyStr( int ib=-1 ) const; // Never used anywhere, should it be removed?
  bool ParseString( const char * tstr );

  int GetPeriod() const { return fCPeriod; }
  TString GetPeriodMCName() const { return fCPeriodMCName; }
  int GetBeamType() const { return fBeamType[fCPeriod]; }
  TString GetBeamTypeStr() const { return IsPP()?"pp":IsPA()?"pA":IsHeavyIon()?"PbPb":""; }
  void SetRunNumber( int run ){ fCRunNumber=run;fCPeriod=GetRunNumberToPeriod(run); }
  int GetRunNumber() const { return fCRunNumber; }

  bool IsHeavyIon() const { return fBeamType[fCPeriod]==kPbPb; }
  bool IsPA() const { return fBeamType[fCPeriod]==kPA; }
  bool IsPP() const { return fBeamType[fCPeriod]==kPP; }

  AliJRunTable *  operator()( int run ){ SetRunNumber(run);return this; }
  static AliJRunTable& GetSpecialInstance();
  static const AliJRunTable& GetInstance();

private:
  int fBeamType[kJNPeriod];  // comment needed
  int fDataType[kJNPeriod];  // comment needed
  int fEnergy[kJNPeriod]; // comment needed
  long fRunRange[kJNPeriod][2]; // comment needed
  TString fMCPeriod[kJNPeriod]; // comment needed
  TString fPeriodName[kJNPeriod]; // comment needed
  std::vector<int> fGoodRun[kJNPeriod]; // comment needed

  int fCPeriod; // comment needed
  int fCRunNumber; // comment needed
  TString fCPeriodMCName; // comment needed
};

#endif


text:
from azure.identity import DefaultAzureCredential
from azure.mgmt.deploymentmanager import AzureDeploymentManager

"""
# PREREQUISITES
    pip install azure-identity
    pip install azure-mgmt-deploymentmanager
# USAGE
    python create_wait_step.py

    Before run the sample, please set the values of the client ID, tenant ID and client secret
    of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
    AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
    https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""

def main():
    client = AzureDeploymentManager(
        credential=DefaultAzureCredential(),
        subscription_id="caac1590-e859-444f-a9e0-62091c0f5929",
    )

    response = client.steps.create_or_update(
        resource_group_name="myResourceGroup",
        step_name="waitStep",
    )
    print(response)

# x-ms-original-file: specification/deploymentmanager/resource-manager/Microsoft.DeploymentManager/preview/2019-11-01-preview/examples/step_wait_createorupdate.json
if __name__ == "__main__":
    main()


text:
sudo apt-get update -y
sudo apt-get install -y cmake software-properties-common curl \
    build-essential git

sudo apt-add-repository -y "ppa:ubuntu-toolchain-r/test"
curl -sSL "http://llvm.org/apt/llvm-snapshot.gpg.key" | sudo apt-key add -
echo "deb http://llvm.org/apt/precise/ llvm-toolchain-precise-3.7 main" | sudo tee -a /etc/apt/sources.list > /dev/null
sudo apt-get -yq update &>> ~/apt-get-update.log
sudo apt-get -yq --no-install-suggests --no-install-recommends install \
    gcc-4.9 g++-4.9 valgrind

# Set build related environment variables.
export GTEST_TARGET=googletest
export SHARED_LIB=OFF
export STATIC_LIB=ON
export CMAKE_PKG=OFF
export BUILD_TYPE=debug
export VERBOSE_MAKE=true
export CXX=g++
export CC=gcc
if [ "$CXX" = "g++" ]; then export CXX="g++-4.9" CC="gcc-4.9"; fi
if [ "$CXX" = "clang++" ] && [ "$TRAVIS_OS_NAME" = "linux" ]; then export CXX="clang++-3.7" CC="clang-3.7"; fi

# Build and test googletest.
git clone https://github.com/google/googletest.git
cd googletest
mkdir build && cd build
cmake .. && make && sudo make install


text:
<!DOCTYPE html>

  <meta charset="utf-8">
  <title>JS-Interpreter Documentation</title>
  <link href="demos/style.css" rel="stylesheet" type="text/css">

JS-Interpreter Documentation

JS-Interpreter is a sandboxed JavaScript interpreter written in JavaScript.
  It allows for execution of arbitrary JavaScript code line by line.  Execution
  is completely isolated from the main JavaScript environment.  Multiple
  instances of the JS-Interpreter allow for multi-threaded concurrent JavaScript
  without the use of Web Workers.

Play with the JS-Interpreter demo.

Get the source code.

Usage

Start by including the two JavaScript source files:

    <script src="acorn.js"></script>
    <script src="interpreter.js"></script>

Alternatively, use the compressed bundle (85kb):

    <script src="acorn_interpreter.js"></script>

Next, instantiate an interpreter with the JavaScript code that needs to be
  parsed:

    var myCode = 'var a=1; for(var i=0;i<4;i++){a*=i;} a;';
    var myInterpreter = new Interpreter(myCode);

Additional JavaScript code may be added at any time (frequently used to
  interactively call previously defined functions):

    myInterpreter.appendCode('foo();');

To run the code step by step, call the step function
  repeatedly until it returns false:

    function nextStep() {
      if (myInterpreter.step()) {
        window.setTimeout(nextStep, 0);
      }
    }
    nextStep();

Alternatively, if the code is known to be safe from infinite loops, it may
  be executed to completion by calling the run function once:

    myInterpreter.run();

In cases where the code encounters asynchronous API calls (see below),
  run will return true if it is blocked and needs to be reexecuted
  at a later time.

External API

Similar to the eval function, the result of the last
  statement executed is available in myInterpreter.value:

    var myInterpreter = new Interpreter('6 * 7');
    myInterpreter.run();
    alert(myInterpreter.value);

Additionally, API calls may be added to the interpreter during creation.
  Here is the addition of alert() and a url
  variable:

    var myCode = 'alert(url);';
    var initFunc = function(interpreter, scope) {
      interpreter.setProperty(scope, 'url',
          interpreter.createPrimitive(location.toString()));

      var wrapper = function(text) {
        text = text ? text.toString() : '';
        return interpreter.createPrimitive(alert(text));
      };
      interpreter.setProperty(scope, 'alert',
          interpreter.createNativeFunction(wrapper));
    };
    var myInterpreter = new Interpreter(myCode, initFunc);

See the JSON demo for an example of
  exchanging JSON between the browser and the interpreter.
  For more complicated examples, see the initGlobalScope function
  which creates APIs for Math, Array, Function, and other globals.

Asynchronous API functions may wrapped so that they appear to be
  synchronous to interpreter.  For example, a getXhr(url) function
  that returns the contents of an XMLHttpRequest could be defined in
  initFunc like this:

    var wrapper = function(href, callback) {
      href = href ? href.toString() : '';
      var req = new XMLHttpRequest();
      req.open('GET', href, true);
      req.onreadystatechange = function() {
        if (req.readyState == 4 && req.status == 200) {
          callback(interpreter.createPrimitive(req.responseText));
        }
      };
      req.send(null);
    };
    interpreter.setProperty(scope, 'getXhr',
        interpreter.createAsyncFunction(wrapper));

This snippet uses createAsyncFunction in the same way that
  createNativeFunction was used earlier.  The difference is that
  the wrapped asynchronous function's return value is ignored.  Instead, an
  extra callback function is passed in when the wrapper is called.  When the
  wrapper is ready to return, it calls the callback function with the value it
  wishes to return.  From the point of view of the code running inside the
  JS-Interpreter, a function call was made and the result was returned
  immediately.

For a working example, see the
  async demo.

Limitations

The version of JavaScript implemented by the interpreter has a few
  differences from that which executes in a browser:

API

None of the DOM APIs are exposed.  That's kind of the point of a
    sandbox.  If you need these, write your own interfaces.

ES6

More recent additions to JavaScript such as let or
    Set aren't implemented.  Feel free to fork the project if you need more than ES5.

toString & toValue

User-created functions are not called when casting objects to primitives.

Performance

No attempt has been made to make the interpreter particularly
    efficient.

Dependency

The only dependency is Acorn,
  a beautifully written JavaScript parser by Marijn Haverbeke.  It is included
  in the JS-Interpreter package.

Compatibility

The limiting factor for browser support is the use of
  Object.create(null)
  to create hash objects in both Acorn and JS-Interpreter.
  This results in the following minimum browser requirements:

Chrome 5

Firefox 4.0

IE 9

Opera 11.6

Safari 5

Disclaimer

This project is not an official Google product.


text:
impac.widget.accounts_payable_receivable.settings.title

      <button class="btn btn-default" ng-click="initSettings()" translate>impac.widget.accounts_payable_receivable.cancel</button>
      <button class="btn btn-warning" ng-click="updateSettings()" translate>impac.widget.accounts_payable_receivable.save</button>

impac.widget.accounts_payable_receivable.receivables.title

            {{getCurrentReceivable() | mnoCurrency : getCurrency() : false}}

{{getCurrency()}}

impac.widget.accounts_payable_receivable.payables.title

            {{getCurrentPayable() | mnoCurrency : getCurrency() : false}}

{{getCurrency()}}

          impac.widget.accounts_payable_receivable.payable -
          impac.widget.accounts_payable_receivable.receivable


text:
import React, { useState, useRef, ReactElement } from 'react';
import Editor, { createEditorStateWithText } from '@draft-js-plugins/editor';
import createEmojiPlugin from '@draft-js-plugins/emoji';
import editorStyles from './editorStyles.css';

const emojiPlugin = createEmojiPlugin({
  useNativeArt: true,
});
const { EmojiSuggestions, EmojiSelect } = emojiPlugin;
const plugins = [emojiPlugin];
const text = `Cool, we can have all sorts of Emojis here. 🙌
🌿☃🎉🙈 aaaand maybe a few more here 🐲☀🗻 Quite fun!`;

const CustomEmojiEditor = (): ReactElement => {
  const [editorState, setEditorState] = useState(
    createEditorStateWithText(text)
  );
  const editor = useRef<Editor>();

  const onChange = (value): void => {
    setEditorState(value);
  };

  const focus = (): void => {
    editor.current.focus();
  };

  return (

        <Editor
          editorState={editorState}
          onChange={onChange}
          plugins={plugins}
          ref={(element) => {
            editor.current = element;
          }}
        />
        <EmojiSuggestions />

        <EmojiSelect />

  );
};

export default CustomEmojiEditor;


text:
package org.paras.turorials.tokenization.resources;

import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.core.Response;

import org.paras.turorials.tokenization.model.DataModel;

@Path("/accounts")
public class AccountResource {

	@GET
	@Path("/{account}")
	@Produces("application/json")
	public Response getTokenForAccount(@PathParam("account") String account) {
		String token = String.valueOf((Long.parseLong(account) * 2));
		DataModel model = new DataModel();
		model.setAccount(account);
		model.setToken(token);

		return Response.status(200).entity(model).build();
	}
}


text:
package com.planet_ink.coffee_mud.Common;

import com.planet_ink.coffee_mud.core.interfaces.*;
import com.planet_ink.coffee_mud.core.*;
import com.planet_ink.coffee_mud.core.collections.*;
import com.planet_ink.coffee_mud.Abilities.interfaces.*;
import com.planet_ink.coffee_mud.Areas.interfaces.*;
import com.planet_ink.coffee_mud.Behaviors.interfaces.*;
import com.planet_ink.coffee_mud.CharClasses.interfaces.*;
import com.planet_ink.coffee_mud.Commands.interfaces.*;
import com.planet_ink.coffee_mud.Common.interfaces.*;
import com.planet_ink.coffee_mud.Exits.interfaces.*;
import com.planet_ink.coffee_mud.Items.interfaces.*;
import com.planet_ink.coffee_mud.Libraries.interfaces.CatalogLibrary;
import com.planet_ink.coffee_mud.Locales.interfaces.*;
import com.planet_ink.coffee_mud.MOBS.interfaces.*;
import com.planet_ink.coffee_mud.Races.interfaces.*;

import java.util.*;

public class DefaultTattoo implements Tattoo
{
	@Override
	public String ID()
	{
		return "DefaultTattoo";
	}

	private long	expires		= 0;
	private String	tattooName	= "";

	@Override
	public String name()
	{
		return tattooName;
	}

	@Override
	public Tattoo set(final String name)
	{
		tattooName = name.toUpperCase().trim();
		return this;
	}

	@Override
	public Tattoo set(final String name, final int down)
	{
		tattooName = name.toUpperCase().trim();
		if(down == 0)
			expires = 0;
		else
			expires = System.currentTimeMillis() + (down * CMProps.getTickMillis());
		return this;
	}

	/**
	 * @param tickDown the tickDown
	 */
	@Override
	public final void setTickDown(final int tickDown)
	{
		if(tickDown == 0)
			expires = 0;
		else
			expires = System.currentTimeMillis() + (tickDown * CMProps.getTickMillis());
	}

	/**
	 * @return the tickDown
	 */
	@Override
	public final int getTickDown()
	{
		if(expires == 0)
			return 0;
		final long diff = expires - System.currentTimeMillis();
		if(diff <= 0)
			return 1;
		return (int)Math.round(Math.ceil(CMath.div(diff, CMProps.getTickMillis())));
	}

	/**
	 * @return the tattooName
	 */
	@Override
	public final String getTattooName()
	{
		return tattooName;
	}

	@Override
	public String toString()
	{
		return ((expires > 0) ? (getTickDown() + " ") : "") + tattooName;
	}

	@Override
	public Tattoo copyOf()
	{
		try
		{
			return (Tattoo) this.clone();
		}
		catch (final Exception e)
		{
			return this;
		}
	}

	@Override
	public int compareTo(final CMObject o)
	{
		if (o == null)
			return 1;
		return (this == o) ? 0 : this.ID().compareTo(o.ID());
	}

	@Override
	public CMObject newInstance()
	{
		return new DefaultTattoo();
	}

	@Override
	public void initializeClass()
	{
	}

	@Override
	public long expirationDate()
	{
		return expires;
	}

	@Override
	public void setExpirationDate(final long dateTime)
	{
		expires = dateTime;
	}

	@Override
	public boolean equals(final Object o)
	{
		if(o instanceof Tattoo)
			return this.tattooName.equals(((Tattoo)o).getTattooName());
		return false;
	}

	@Override
	public Tattoo parse(final String tattooCode)
	{
		if((tattooCode==null)
		||(tattooCode.length()==0))
			return this;
		tattooName=tattooCode;
		expires = 0;
		if(Character.isDigit(tattooName.charAt(0)))
		{
			final int x=tattooName.indexOf(' ');
			if(x>0)
			{
				final String tdstr = tattooName.substring(0,x).trim();
				if(CMath.isNumber(tdstr))
				{
					tattooName=tattooName.substring(x+1).trim();
					setTickDown(CMath.s_int(tdstr));
				}
			}
		}
		return this;
	}

	@Override
	public int hashCode()
	{
		return tattooName.hashCode();
	}
}


text:
layout: post
categories: cdh
title: kubernetes 部署cdh 通过 NASNFS)进行文件存储。
date: 2018-09-20 15:59:04 +0800
description: 在kubernetes集群部署cdh 并且部署hadoop 服务。
keywords: hadoop cdh kubernetes
---

技术验证篇,通过Kubernetes搭建一个可扩展的 CDH,并且启动hadoop。

## Quick

 * 主要用到`Kubernetes` 阿里云
 * 镜像来源 `https://github.com/windawings/spot-docker` .
 * 启动文件.`yaml`文件
 * NAS 阿里云弹性存储 NAS

##  注意
 * NAS 需要开启`VPC`网络安全组
 * 镜像需要上传到自己的私有仓库
 * Kubernetes 下载镜像需要配置`yaml << imagePullSecrets`,文章结尾会将`yaml`奉上

 * Kubernetes默认会创建一个`SLB`(用来给Ingress 使用),我们用来暴露CDH的`UI`就是需要采用 `Ingress` 来进行暴露。
 * `Ingress` 所在 `Namespace = kube-system`

![](http://112firshme11224.test.upcdn.net/demos/17612368-36b7-49c3-bcbd-6bd7848c849a.png)

*  域名解析 注意是`泛域名`

## 开始部署

```yaml
---
apiVersion: v1
kind: ServiceAccount
metadata:
  name: cloudera-sa
  namespace: cloudera
  labels:
    name: sa
    app: cloudera
automountServiceAccountToken: true
---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
  namespace: cloudera
  name: cloudera-cr
  labels:
    name: cr
    app: cloudera
rules:
- apiGroups: ["*"]
  resources: ["*"]
  verbs: ["*"]
- nonResourceURLs: ["*"]
  verbs: ["*"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
  name: cloudera-crb
  namespace: cloudera
  labels:
    name: crb
    app: cloudera
subjects:
- kind: ServiceAccount
  name: cloudera-sa
  namespace: cloudera
roleRef:
  kind: ClusterRole
  name: cloudera-cr
  apiGroup: rbac.authorization.k8s.io
---
apiVersion: v1
kind: ConfigMap
metadata:
  name: cloudera-config
  namespace: cloudera
  labels:
    name: cloudera-config
    app: cloudera
data:
  master_host: master-svc
  cron.tab: |
    */30 * * * * ntpdate master-svc && hwclock --systohc

  config.ini: |-
    [General]
    # Hostname of the CM server.
    server_host=master-svc

    # Port that the CM server is listening on.
    server_port=7182

    ## It should not normally be necessary to modify these.
    # Port that the CM agent should listen on.
    # listening_port=9000

    # IP Address that the CM agent should listen on.
    # listening_ip=

    # Hostname that the CM agent reports as its hostname. If unset, will be
    # obtained in code through something like this:
    #
    #   python -c 'import socket; \
    #              print socket.getfqdn(), \
    #                    socket.gethostbyname(socket.getfqdn())'
    #
    # listening_hostname=

    # An alternate hostname to report as the hostname for this host in CM.
    # Useful when this agent is behind a load balancer or proxy and all
    # inbound communication must connect through that proxy.
    # reported_hostname=

    # Port that supervisord should listen on.
    # NB: This only takes effect if supervisord is restarted.
    # supervisord_port=19001

    # Log file.  The supervisord log file will be placed into
    # the same directory.  Note that if the agent is being started via the
    # init.d script, /var/log/cloudera-scm-agent/cloudera-scm-agent.out will
    # also have a small amount of output (from before logging is initialized).
    # log_file=/var/log/cloudera-scm-agent/cloudera-scm-agent.log

    # Persistent state directory.  Directory to store CM agent state that
    # persists across instances of the agent process and system reboots.
    # Particularly, the agent's UUID is stored here.
    # lib_dir=/var/lib/cloudera-scm-agent

    # Parcel directory.  Unpacked parcels will be stored in this directory.
    # Downloaded parcels will be stored in <parcel_dir>/../parcel-cache
    # parcel_dir=/opt/cloudera/parcels

    # Enable supervisord event monitoring.  Used in eager heartbeating, amongst
    # other things.
    # enable_supervisord_events=true

    # Maximum time to wait (in seconds) for all metric collectors to finish
    # collecting data.
    max_collection_wait_seconds=10.0

    # Maximum time to wait (in seconds) when connecting to a local role's
    # webserver to fetch metrics.
    metrics_url_timeout_seconds=30.0

    # Maximum time to wait (in seconds) when connecting to a local TaskTracker
    # to fetch task attempt data.
    task_metrics_timeout_seconds=5.0

    # The list of non-device (nodev) filesystem types which will be monitored.
    monitored_nodev_filesystem_types=nfs,nfs4,tmpfs

    # The list of filesystem types which are considered local for monitoring purposes.
    # These filesystems are combined with the other local filesystem types found in
    # /proc/filesystems
    local_filesystem_whitelist=ext2,ext3,ext4,xfs

    # The largest size impala profile log bundle that this agent will serve to the
    # CM server. If the CM server requests more than this amount, the bundle will
    # be limited to this size. All instances of this limit being hit are logged to
    # the agent log.
    impala_profile_bundle_max_bytes=1073741824

    # The largest size stacks log bundle that this agent will serve to the CM
    # server. If the CM server requests more than this amount, the bundle will be
    # limited to this size. All instances of this limit being hit are logged to the
    # agent log.
    stacks_log_bundle_max_bytes=1073741824

    # The size to which the uncompressed portion of a stacks log can grow before it
    # is rotated. The log will then be compressed during rotation.
    stacks_log_max_uncompressed_file_size_bytes=5242880

    # The orphan process directory staleness threshold. If a diretory is more stale
    # than this amount of seconds, CM agent will remove it.
    orphan_process_dir_staleness_threshold=5184000

    # The orphan process directory refresh interval. The CM agent will check the
    # staleness of the orphan processes config directory every this amount of
    # seconds.
    orphan_process_dir_refresh_interval=3600

    # A knob to control the agent logging level. The options are listed as follows:
    # 1) DEBUG (set the agent logging level to 'logging.DEBUG')
    # 2) INFO (set the agent logging level to 'logging.INFO')
    scm_debug=INFO

    # The DNS resolution collecion interval in seconds. A java base test program
    # will be executed with at most this frequency to collect java DNS resolution
    # metrics. The test program is only executed if the associated health test,
    # Host DNS Resolution, is enabled.
    dns_resolution_collection_interval_seconds=60

    # The maximum time to wait (in seconds) for the java test program to collect
    # java DNS resolution metrics.
    dns_resolution_collection_timeout_seconds=30

    # The directory location in which the agent-wide kerberos credential cache
    # will be created.
    # agent_wide_credential_cache_location=/var/run/cloudera-scm-agent

    [Security]
    # Use TLS and certificate validation when connecting to the CM server.
    use_tls=0

    # The maximum allowed depth of the certificate chain returned by the peer.
    # The default value of 9 matches the default specified in openssl's
    # SSL_CTX_set_verify.
    max_cert_depth=9

    # A file of CA certificates in PEM format. The file can contain several CA
    # certificates identified by
    #
    # -----BEGIN CERTIFICATE-----
    # ... (CA certificate in base64 encoding) ...
    # -----END CERTIFICATE-----
    #
    # sequences. Before, between, and after the certificates text is allowed which
    # can be used e.g. for descriptions of the certificates.
    #
    # The file is loaded once, the first time an HTTPS connection is attempted. A
    # restart of the agent is required to pick up changes to the file.
    #
    # Note that if neither verify_cert_file or verify_cert_dir is set, certificate
    # verification will not be performed.
    # verify_cert_file=

    # Directory containing CA certificates in PEM format. The files each contain one
    # CA certificate. The files are looked up by the CA subject name hash value,
    # which must hence be available. If more than one CA certificate with the same
    # name hash value exist, the extension must be different (e.g. 9d66eef0.0,
    # 9d66eef0.1 etc). The search is performed in the ordering of the extension
    # number, regardless of other properties of the certificates. Use the c_rehash
    # utility to create the necessary links.
    #
    # The certificates in the directory are only looked up when required, e.g. when
    # building the certificate chain or when actually performing the verification
    # of a peer certificate. The contents of the directory can thus be changed
    # without an agent restart.
    #
    # When looking up CA certificates, the verify_cert_file is first searched, then
    # those in the directory. Certificate matching is done based on the subject name,
    # the key identifier (if present), and the serial number as taken from the
    # certificate to be verified. If these data do not match, the next certificate
    # will be tried. If a first certificate matching the parameters is found, the
    # verification process will be performed; no other certificates for the same
    # parameters will be searched in case of failure.
    #
    # Note that if neither verify_cert_file or verify_cert_dir is set, certificate
    # verification will not be performed.
    # verify_cert_dir=

    # PEM file containing client private key.
    # client_key_file=

    # A command to run which returns the client private key password on stdout
    # client_keypw_cmd=

    # If client_keypw_cmd isn't specified, instead a text file containing
    # the client private key password can be used.
    # client_keypw_file=

    # PEM file containing client certificate.
    # client_cert_file=

    ## Location of Hadoop files.  These are the CDH locations when installed by
    ## packages.  Unused when CDH is installed by parcels.
    [Hadoop]
    #cdh_crunch_home=/usr/lib/crunch
    #cdh_flume_home=/usr/lib/flume-ng
    #cdh_hadoop_bin=/usr/bin/hadoop
    #cdh_hadoop_home=/usr/lib/hadoop
    #cdh_hbase_home=/usr/lib/hbase
    #cdh_hbase_indexer_home=/usr/lib/hbase-solr
    #cdh_hcat_home=/usr/lib/hive-hcatalog
    #cdh_hdfs_home=/usr/lib/hadoop-hdfs
    #cdh_hive_home=/usr/lib/hive
    #cdh_httpfs_home=/usr/lib/hadoop-httpfs
    #cdh_hue_home=/usr/share/hue
    #cdh_hue_plugins_home=/usr/lib/hadoop
    #cdh_impala_home=/usr/lib/impala
    #cdh_llama_home=/usr/lib/llama
    #cdh_mr1_home=/usr/lib/hadoop-0.20-mapreduce
    #cdh_mr2_home=/usr/lib/hadoop-mapreduce
    #cdh_oozie_home=/usr/lib/oozie
    #cdh_parquet_home=/usr/lib/parquet
    #cdh_pig_home=/usr/lib/pig
    #cdh_solr_home=/usr/lib/solr
    #cdh_spark_home=/usr/lib/spark
    #cdh_sqoop_home=/usr/lib/sqoop
    #cdh_sqoop2_home=/usr/lib/sqoop2
    #cdh_yarn_home=/usr/lib/hadoop-yarn
    #cdh_zookeeper_home=/usr/lib/zookeeper
    #hive_default_xml=/etc/hive/conf.dist/hive-default.xml
    #webhcat_default_xml=/etc/hive-webhcat/conf.dist/webhcat-default.xml
    #jsvc_home=/usr/libexec/bigtop-utils
    #tomcat_home=/usr/lib/bigtop-tomcat
    #oracle_home=/usr/share/oracle/instantclient

    ## Location of Cloudera Management Services files.
    [Cloudera]
    #mgmt_home=/usr/share/cmf

    ## Location of JDBC Drivers.
    [JDBC]
    cloudera_mysql_connector_jar=/usr/java/latest/mysql-connector-java.jar
    #cloudera_oracle_connector_jar=/usr/share/java/oracle-connector-java.jar
    #By default, postgres jar is found dynamically in $MGMT_HOME/lib
    #cloudera_postgresql_jdbc_jar=
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: nfs-deploy
  namespace: cloudera
  labels:
    name: nfs
    app: cloudera
spec:
  replicas: 1
  revisionHistoryLimit: 2
  selector:
    matchLabels:
      name: nfs
      app: cloudera
  template:
    metadata:
      name: nfs-client
      namespace: cloudera
      labels:
        name: nfs
        app: cloudera
    spec:
      tolerations:
      - key: node-role.kubernetes.io/master
        effect: NoSchedule
      serviceAccountName: cloudera-sa
      containers:
      - image: registry.cn-hangzhou.aliyuncs.com/acs/alicloud-nas-controller:v1.8.4
#        imagePullPolicy: Never
        name: nfs-client
#        securityContext:
#          privileged: true
        volumeMounts:
        - name: nfs-client-root
          mountPath: /persistentvolumes
        env:
        - name: PROVISIONER_NAME
          value: alicloud/nas
        - name: NFS_SERVER
          value: 074ca49d80-ak47.cn-hangzhou.nas.aliyuncs.com
        - name: NFS_PATH
          value: /pv/cloudera/agent/
      volumes:
      - name: nfs-client-root
        nfs:
          server: 074ca49d80-ak47.cn-hangzhou.nas.aliyuncs.com
          path: /pv/cloudera/agent/
---
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  name: cloudera-storage
  namespace: cloudera
  labels:
    name: storage
    app: cloudera
reclaimPolicy: Delete
provisioner: alicloud/nas
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: master-deploy
  namespace: cloudera
  labels:
    name: master-deploy
    app: cloudera
spec:
  replicas: 1
  revisionHistoryLimit: 2
  selector:
    matchLabels:
      name: master
      app: cloudera
  template:
    metadata:
      name: master
      namespace: cloudera
      labels:
        name: master
        app: cloudera
    spec:
      tolerations:
      - effect: NoSchedule
        key: node-role.kubernetes.io/master
      restartPolicy: Always
      serviceAccountName: cloudera-sa
      automountServiceAccountToken: true
      hostname: master-svc
      containers:
      - name: cloudera-master
        image: registry-vpc.cn-hangzhou.aliyuncs.com/huaching_prod/cloudera-master:5.14.2
#        imagePullPolicy: IfNotPresent
        resources:
          limits:
            memory: "4096Mi"
            cpu: "1000m"
        lifecycle:
          preStop:
            exec:
              command: ["/bin/bash","-c","/cloudera-init/run/stop.sh >> /cloudera/log/stop.log 2>&1"]
        volumeMounts:
        #- name: cloudera-init
          #mountPath: /cloudera-init/run/
        - name: mysql
          mountPath: /var/lib/mysql/
        - name: repo
          mountPath: /opt/cloudera/parcel-repo/
        - name: config
          mountPath: /opt/cm/etc/cloudera-scm-agent/
        env:
        - name: HOSTNAME
          valueFrom:
            configMapKeyRef:
              name: cloudera-config
              key: master_host
        - name: POD_IP
          valueFrom:
            fieldRef:
              apiVersion: v1
              fieldPath: status.podIP
        - name: POD_NAME
          valueFrom:
            fieldRef:
              apiVersion: v1
              fieldPath: metadata.name
        ports:
        - containerPort: 7180
          name: ui
        - containerPort: 9000
          name: agent
        - containerPort: 7182
          name: server
        - containerPort: 7191
          name: parcel
        - containerPort: 4434
          name: parcel-ssl
        securityContext:
          privileged: true
      imagePullSecrets:
      - name: registrykey-vpc
      volumes:
      - name: repo
        nfs:
          server: 074ca49d80-ak47.cn-hangzhou.nas.aliyuncs.com
          path: /pv/cloudera/repo/
      - name: mysql
        nfs:
          server: 074ca49d80-ak47.cn-hangzhou.nas.aliyuncs.com
          path: /pv/cloudera/master/
      #- name: cloudera-init
        #configMap:
          #name: cloudera-config
          #defaultMode: 0751
          #items:
          #- key: master.start
            #path: start.sh
          #- key: master.stop
            #path: stop.sh
          #- key: mysql.sql
            #path: mysql.sql
      - name: config
        configMap:
          name: cloudera-config
          items:
          - key: config.ini
            path: config.ini
---
apiVersion: v1
kind: Service
metadata:
  name: master-svc
  namespace: cloudera
  labels:
    name: master-svc
    app: cloudera
spec:
    type: ClusterIP
    clusterIP: None
    ports:
    - name: agent
      port: 9000
      protocol: TCP
      targetPort: 9000
    - name: server
      port: 7182
      protocol: TCP
      targetPort: 7182
    - name: parcel
      port: 7191
      protocol: TCP
      targetPort: 7191
    - name: parcel-ssl
      port: 4434
      protocol: TCP
      targetPort: 4434
    - name: ui
      port: 7180
      protocol: TCP
      targetPort: 7180
    selector:
        name: master
        app: cloudera
---
apiVersion: v1
kind: Service
metadata:
  name: master-external
  namespace: cloudera
  labels:
    name: master-external
    app: cloudera
spec:
    type: ClusterIP
    ports:
    - name: ui
      port: 7180
      protocol: TCP
      targetPort: 7180
    selector:
        name: master
        app: cloudera
---
apiVersion: policy/v1beta1
kind: PodDisruptionBudget
metadata:
  name: agent-pdb
  namespace: cloudera
  labels:
    name: agent-pdb
    app: cloudera
spec:
  selector:
    matchLabels:
      name: agent
      app: cloudera
  maxUnavailable: 1
---
apiVersion: v1
kind: Service
metadata:
  name: agent-svc
  namespace: cloudera
  labels:
    name: agent-svc
    app: cloudera
spec:
    type: ClusterIP
    clusterIP: None
    ports:
    - name: agent
      port: 9000
      protocol: TCP
      targetPort: 9000
    - name: server
      port: 7182
      protocol: TCP
      targetPort: 7182
    - name: parcel
      port: 7191
      protocol: TCP
      targetPort: 7191
    - name: parcel-ssl
      port: 4434
      protocol: TCP
      targetPort: 4434
    - name: parcel-ssl2
      port: 4433
      protocol: TCP
      targetPort: 4433
    selector:
        name: agent
        app: cloudera
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
  name: agent
  namespace: cloudera
  labels:
    name: agent-sts
    app: cloudera
spec:
  selector:
    matchLabels:
      name: agent
      app: cloudera
  serviceName: agent-svc
  updateStrategy:
    type: RollingUpdate
  podManagementPolicy: OrderedReady
  replicas: 3
  revisionHistoryLimit: 2
  template:
    metadata:
      name: cagent
      namespace: cloudera
      labels:
        name: agent
        app: cloudera
    spec:
      tolerations:
      - effect: NoSchedule
        key: node-role.kubernetes.io/master
      restartPolicy: Always
      serviceAccountName: cloudera-sa
      automountServiceAccountToken: true
      containers:
      - name: agent
        image: registry-vpc.cn-hangzhou.aliyuncs.com/huaching_prod/cloudera-node:5.14.2
#        imagePullPolicy: IfNotPresent
        resources:
          limits:
            memory: "4096Mi"
            cpu: "1000m"
        lifecycle:
          preStop:
            exec:
              command: ["/bin/bash","-c","/cloudera-init/run/stop.sh"]
        volumeMounts:
        - name: repo
          mountPath: /opt/cloudera/parcel-repo/
        - name: lib
          mountPath: /opt/cm/lib/cloudera-scm-agent/
        - name: config
          mountPath: /opt/cm/etc/cloudera-scm-agent/
        ports:
        - containerPort: 9000
          name: agent
        - containerPort: 7182
          name: server
        - containerPort: 7191
          name: parcel
        - containerPort: 4434
          name: parcel-ssl
        - containerPort: 4433
          name: parcel-ssl2
        securityContext:
          privileged: true
      imagePullSecrets:
      - name: registrykey-vpc
      volumes:
      - name: config
        configMap:
          name: cloudera-config
          items:
          - key: config.ini
            path: config.ini
          - key: cron.tab
            path: cron.tab
      - name: repo
        nfs:
          server: 074ca49d80-ak47.cn-hangzhou.nas.aliyuncs.com
          path: /pv/cloudera/repo/
  volumeClaimTemplates:
  - metadata:
      name: lib
      namespace: cloudera
    spec:
      #volumeName: lib
      volumeMode: Filesystem
      accessModes: [ "ReadWriteOnce" ]
      storageClassName: cloudera-storage
      resources:
        requests:
          storage: 20Gi
---
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: cdh-master-ing
  namespace: cloudera
spec:
  rules:
  - host: cdh.docs.aliyun.com
    http:
      paths:
      - backend:
          serviceName: master-external
          servicePort: 7180

```

## 注意事项
* 创建`namespace cloudera`
* 镜像来源已经在上方说明了,可以自己去`rebuild`
* 默认全部不会启动`command脚本可以看出`
* 启动流程进入`Master-deploy ` 去执行`start.sh`启动,根据机器情况,启动时间不等,期间可以用`netstat -tlunp` 查看端口是否占用来验证启动成功与否.
* `CDH` 需要用到Kubernetes的`特权模式`,相关细节请查关键字 `Kubernetes securityContext`
* 部分界面如下:
![](http://112firshme11224.test.upcdn.net/demos/2f2be0a5-ef33-4458-9cd4-433b9a3ebed4.png)

* 服务界面

    ![](http://112firshme11224.test.upcdn.net/demos/3596a98d-8de0-4641-b2b6-e7904061479d.png)

* PVC 界面

    ![](http://112firshme11224.test.upcdn.net/demos/e68c1177-32c0-419b-8acd-eeecbfd702dc.png)

*  CDH 节点界面

    ![](http://112firshme11224.test.upcdn.net/demos/49f7fc4a-2f25-4895-818a-0e6d296983b0.png)

* 节点服务运行情况。
    ![](http://112firshme11224.test.upcdn.net/demos/a054ea06-ffcb-4340-bfc9-7b307d7cbc99.png)

### 感谢 https://github.com/windawings

转载请注明出处,本文采用 [CC4.0](http://creativecommons.org/licenses/by-nc-nd/4.0/) 协议授权


text:
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Joy Example: Markup</title>

  <canvas id="joy" width='800' height='600' style="border: 1px solid #666;">

      <button></button>

  </canvas>


text:
package org.apache.subversion.javahl;

import java.util.Set;
import java.io.OutputStream;
import java.io.InputStream;
import java.io.File;

import org.apache.subversion.javahl.callback.ReposNotifyCallback;
import org.apache.subversion.javahl.types.*;

/**
 * This class offers the same commands as the svnadmin commandline
 * client.
 */
public class SVNRepos implements ISVNRepos
{
    /**
     * Load the required native library.
     */
    static
    {
        NativeResources.loadNativeLibrary();
    }

    /**
     * Standard empty contructor, builds just the native peer.
     */
    public SVNRepos()
    {
        cppAddr = ctNative();
    }

    /**
     * Don't call this function!  public for backward compat purposes.
     */
    public long getCppAddr()
    {
        return cppAddr;
    }

    /**
     * Build the native peer
     * @return the adress of the peer
     */
    private native long ctNative();

    /**
     * release the native peer (should not depend on finalize)
     */
    public native void dispose();

    /**
     * release the native peer (should use dispose instead)
     * public for backward compat.  Shouldn't call this directly.
     */
    public native void finalize();

    /**
     * slot for the adress of the native peer. The JNI code is the only user
     * of this member
     */
    protected long cppAddr;

    /**
     * @return Version information about the underlying native libraries.
     */
    public Version getVersion()
    {
        return NativeResources.getVersion();
    }

    /**
     * create a subversion repository.
     * @param path                  the path where the repository will been
     *                              created.
     * @param disableFsyncCommit    disable to fsync at the commit (BDB).
     * @param keepLog               keep the log files (BDB).
     * @param configPath            optional path for user configuration files.
     * @param fstype                the type of the filesystem (BDB or FSFS)
     * @throws ClientException  throw in case of problem
     */
    public native void create(File path, boolean disableFsyncCommit,
                              boolean keepLog, File configPath,
                              String fstype) throws ClientException;

    /**
     * deltify the revisions in the repository
     * @param path              the path to the repository
     * @param start             start revision
     * @param end               end revision
     * @throws ClientException  throw in case of problem
     */
    public native void deltify(File path, Revision start, Revision end)
            throws ClientException;

    public native void dump(File path, OutputStream dataOut,
                            Revision start, Revision end, boolean incremental,
                            boolean useDeltas, ReposNotifyCallback callback)
            throws ClientException;

    /**
     * make a hot copy of the repository
     * @param path              the path to the source repository
     * @param targetPath        the path to the target repository
     * @param cleanLogs         clean the unused log files in the source
     *                          repository
     * @throws ClientException  throw in case of problem
     */
    public native void hotcopy(File path, File targetPath,
                               boolean cleanLogs) throws ClientException;

    /**
     * list all logfiles (BDB) in use or not)
     * @param path              the path to the repository
     * @param receiver          interface to receive the logfile names
     * @throws ClientException  throw in case of problem
     */
    public native void listDBLogs(File path, ISVNRepos.MessageReceiver receiver)
            throws ClientException;

    /**
     * list unused logfiles
     * @param path              the path to the repository
     * @param receiver          interface to receive the logfile names
     * @throws ClientException  throw in case of problem
     */
    public native void listUnusedDBLogs(File path, ISVNRepos.MessageReceiver receiver)
            throws ClientException;

    public native void load(File path, InputStream dataInput,
                            boolean ignoreUUID, boolean forceUUID,
                            boolean usePreCommitHook, boolean usePostCommitHook,
                            String relativePath, ReposNotifyCallback callback)
            throws ClientException;

    /**
     * list all open transactions in a repository
     * @param path              the path to the repository
     * @param receiver          receives one transaction name per call
     * @throws ClientException  throw in case of problem
     */
    public native void lstxns(File path, ISVNRepos.MessageReceiver receiver)
            throws ClientException;

    public native long recover(File path, ReposNotifyCallback callback)
            throws ClientException;

    /**
     * remove open transaction in a repository
     * @param path              the path to the repository
     * @param transactions      the transactions to be removed
     * @throws ClientException  throw in case of problem
     */
    public native void rmtxns(File path, String[] transactions)
            throws ClientException;

    /**
     * Change the value of the revision property propName
     * to propValue.  By default, does not run
     * pre-/post-revprop-change hook scripts.
     *
     * @param path The path to the repository.
     * @param rev The revision for which to change a property value.
     * @param propName The name of the property to change.
     * @param propValue The new value to set for the property.
     * @param usePreRevPropChangeHook Whether to run the
     * pre-revprop-change hook script.
     * @param usePostRevPropChangeHook Whether to run the
     * post-revprop-change hook script.
     * @throws SubversionException If a problem occurs.
     */
    public native void setRevProp(File path, Revision rev,
                                  String propName, String propValue,
                                  boolean usePreRevPropChangeHook,
                                  boolean usePostRevPropChangeHook)
            throws SubversionException;

    public native void verify(File path, Revision start, Revision end,
                              ReposNotifyCallback callback)
            throws ClientException;

    /**
     * list all locks in the repository
     * @param path              the path to the repository
     * @param depth             the depth to recurse
     * @throws ClientException  throw in case of problem
     */
    public native Set<Lock> lslocks(File path, Depth depth)
            throws ClientException;

    /**
     * remove multiple locks from the repository
     * @param path              the path to the repository
     * @param locks             the name of the locked items
     * @throws ClientException  throw in case of problem
     */
    public native void rmlocks(File path, String[] locks)
            throws ClientException;

    public native void upgrade(File path, ReposNotifyCallback callback);

    public native void pack(File path, ReposNotifyCallback callback);

    public native void cancelOperation()
            throws ClientException;
}


text:
\hypertarget{structJson_1_1CommentStyle}{}\section{Json\+:\+:Comment\+Style Struct Reference}
\label{structJson_1_1CommentStyle}\index{Json\+::\+Comment\+Style@{Json\+::\+Comment\+Style}}

Scoped enums are not available until C++11.

\subsection*{Public Types}
\begin{DoxyCompactItemize}
\item
enum \hyperlink{structJson_1_1CommentStyle_a51fc08f3518fd81eba12f340d19a3d0c}{Enum} \{ \hyperlink{structJson_1_1CommentStyle_a51fc08f3518fd81eba12f340d19a3d0cac8b32a8bae63414c8647d4919da8d437}{None},
\hyperlink{structJson_1_1CommentStyle_a51fc08f3518fd81eba12f340d19a3d0cac65238f050773c107690a456e9c05c98}{Most},
\hyperlink{structJson_1_1CommentStyle_a51fc08f3518fd81eba12f340d19a3d0ca32302c0b97190c1808b3e38f367fef01}{All}
 \}\begin{DoxyCompactList}\small\item\em Decide whether to write comments. \end{DoxyCompactList}
\end{DoxyCompactItemize}

\subsection{Detailed Description}
Scoped enums are not available until C++11.

\subsection{Member Enumeration Documentation}
\index{Json\+::\+Comment\+Style@{Json\+::\+Comment\+Style}!Enum@{Enum}}
\index{Enum@{Enum}!Json\+::\+Comment\+Style@{Json\+::\+Comment\+Style}}
\subsubsection[{\texorpdfstring{Enum}{Enum}}]{\setlength{\rightskip}{0pt plus 5cm}enum {\bf Json\+::\+Comment\+Style\+::\+Enum}}\hypertarget{structJson_1_1CommentStyle_a51fc08f3518fd81eba12f340d19a3d0c}{}\label{structJson_1_1CommentStyle_a51fc08f3518fd81eba12f340d19a3d0c}

Decide whether to write comments.

\begin{Desc}
\item[Enumerator]\par
\begin{description}
\index{None@{None}!Json\+::\+Comment\+Style@{Json\+::\+Comment\+Style}}\index{Json\+::\+Comment\+Style@{Json\+::\+Comment\+Style}!None@{None}}\item[{\em
None\hypertarget{structJson_1_1CommentStyle_a51fc08f3518fd81eba12f340d19a3d0cac8b32a8bae63414c8647d4919da8d437}{}\label{structJson_1_1CommentStyle_a51fc08f3518fd81eba12f340d19a3d0cac8b32a8bae63414c8647d4919da8d437}
}]Drop all comments. \index{Most@{Most}!Json\+::\+Comment\+Style@{Json\+::\+Comment\+Style}}\index{Json\+::\+Comment\+Style@{Json\+::\+Comment\+Style}!Most@{Most}}\item[{\em
Most\hypertarget{structJson_1_1CommentStyle_a51fc08f3518fd81eba12f340d19a3d0cac65238f050773c107690a456e9c05c98}{}\label{structJson_1_1CommentStyle_a51fc08f3518fd81eba12f340d19a3d0cac65238f050773c107690a456e9c05c98}
}]Recover odd behavior of previous versions (not implemented yet). \index{All@{All}!Json\+::\+Comment\+Style@{Json\+::\+Comment\+Style}}\index{Json\+::\+Comment\+Style@{Json\+::\+Comment\+Style}!All@{All}}\item[{\em
All\hypertarget{structJson_1_1CommentStyle_a51fc08f3518fd81eba12f340d19a3d0ca32302c0b97190c1808b3e38f367fef01}{}\label{structJson_1_1CommentStyle_a51fc08f3518fd81eba12f340d19a3d0ca32302c0b97190c1808b3e38f367fef01}
}]Keep all comments. \end{description}
\end{Desc}

The documentation for this struct was generated from the following file\+:\begin{DoxyCompactItemize}
\item
Appserver/src/external/json/jsoncpp.\+cpp\end{DoxyCompactItemize}


text:
@NonNullApi
package com.google.android.exoplayer2.device;

import com.google.android.exoplayer2.util.NonNullApi;


text:
To build the documentation locally, from the DESC directory:

.. code-block:: sh

    cd docs
    pip install sphinx
    pip install sphinx-rtd-theme
    pip install sphinx-argparse
    make html

will build the documentation in the _build/html/ folder of the docs folder.

To build the pdf, type ``make pdf`` from the docs/ directory.


text:
from .numbers import Infinity, Undefined, Number
from .base import Base

class Matrix(Number):

    name = 'Matrix'
    nargs = Infinity()

    def __init__(self, *rows):

        super(Matrix, self).__init__()
        self.value = _Matrix(rows)

        if not all(len(n) == len(rows[0]) for n in rows[1:]):
            raise ValueError('All row of a matrix must be the same length')

    @property
    def m(self):
        return self.value.m

    @property
    def n(self):
        return self.value.n

    def __call__(self, i, j):
        return self.value.array[i][j]

    def __mul__(self, other):
        """if isinstance(other, Matrix):

            if self.n != other.m:
                return Undefined()

            final = []
            for i in range(1, self.m + 1):
                row = []
                for j in range(1, other.n + 1):
                    s = sum([self(i, k) * other(k, j) for k in range(1, self.n + 1)])
                    row.append(s)
                final.append(row)

            return Matrix(*final)

        else:
            flattened = sum(self.args, [])
            rows = [[flattened[i]*other for i in range(j + self.n)] for j in range(self.m)]
            return Matrix(*rows)"""

    def __div__(self, other):
        return self * Number(other)**-1

    def __pow__(self, power, modulo=None):
        if isinstance(power, Matrix):
            raise NotImplementedError
        else:
            flattened = sum(self.args, [])
            rows = [[flattened[i]**power for i in range(j + self.n)] for j in range(self.m)]
            return Matrix(*rows)

    def __add__(self, other):
        if isinstance(other, Matrix):
            if (self.m, self.n) != (other.m, other.n):
                return Undefined()

            final = []
            for i in range(1, self.m + 1):
                row = []
                for j in range(1, self.n + 1):
                    row.append(self(i, j) + other(i, j))
                final.append(row)

            return Matrix(*final)

        else:
            flattened = sum(self.args, [])
            rows = [[flattened[i] + other for i in range(j + self.n)] for j in range(self.m)]
            return Matrix(*rows)

    def __sub__(self, other):
        return self + Number(other) * -1

    def __iter__(self):
        return iter(sum(self.args, []))  # Flattens matrix

class _Matrix(Base):

    def __init__(self, rows):
        self.array = list(rows)

        self.m = len(rows)
        self.n = len(rows[0])

    def __mul__(self, other):
        if isinstance(other, Matrix):

            if self.n != other.m:
                return Undefined()

            final = []
            for i in range(self.m):
                row = []
                for j in range(other.n):
                    s = sum([self.array[i][k] * other(k, j) for k in range(self.n)])
                    row.append(s)
                final.append(row)

            return Matrix(*final)

        else:
            flattened = sum(self.array, [])
            rows = [[flattened[i]*other for i in range(j + self.n)] for j in range(self.m)]
            return Matrix(*rows)

    def __str__(self):
        return str(self.array)

def linear_space(start, stop, n=50):
    def gen():
        if n == 1:
            yield stop
            return
        h = (stop - start) / (n - 1)
        for i in range(n):
            yield start + h*i

    l = list(gen())
    return Matrix(l)


text:
layout: post
author:
    name: Bryan Ellis
title:  "Cordova Electron 3.0.0 Released!"
categories: announcements
tags: news releases
---

We are happy to announce that we have just released `Cordova Electron 3.0.0`! This is one of Cordova's supported platforms for building Electron applications.

* [cordova-electron@3.0.0](https://www.npmjs.com/package/cordova-electron)

## Release Highlights

**To upgrade:**

```bash
cordova platform remove electron
cordova platform add electron@3.0.0
```

**To install:**

```bash
cordova platform add electron@3.0.0
```

Some of the notable breaking changes & new features in this release are:

* The **Electron** core dependencies have been updated.
  * **Electron**: 14.0.0
  * **Chromium**: 93.0.4577.58
  * **Node**: v14.17.0
  * **V8**: v9.3
* **Node.js** 10 is no longer supported. This release requires the development environment to have **Node.js** 12.x or higher. It is recommended to use the current LTS, which is `14.17.6` at the time of this release.
* **Cordova Plugin Support**

  In the earlier releases of Cordova Electron, we didn't have a proper plugin system in place.

  There was a temporary workaround solution, `nodeIntegration`, that allowed app developers and plugin developers to have access to node modules. This was meant to be temporary and is not highly recommended because it can lead to [security issues](https://www.electronjs.org/docs/latest/tutorial/security#2-do-not-enable-nodejs-integration-for-remote-content).

  With the new support, the plugin will be preloaded and runs in a separate context from the web app. This feature is known as [Context Isolation](https://www.electronjs.org/docs/latest/tutorial/context-isolation/).

  Additionally, this system follows our pre-existing plugin structure. This means the app code does not need to make any special calls for Electron vs any other platform.

For a quick start guide and in-depth configuration setup, please check out our [Cordova Electron Documentation](https://github.com/apache/cordova-electron/blob/rel/2.0.0/DOCUMENTATION.md)!

Please report any issues you find at [issues.cordova.io](http://issues.cordova.io/)!

<!--more-->
# Changes include:

#### Project Dependencies

* `cordova-common@^4.0.2`
* `electron@14.0.0`
* `electron-builder@^22.11.7`
* `electron-devtools-installer@^3.2.0`
* `execa@^5.1.1`
* `fs-extra@^10.0.0`

#### Breaking Changes

* [GH-205](https://github.com/apache/cordova-electron/pull/205) feat!(Api): remove unused locations data
* [GH-203](https://github.com/apache/cordova-electron/pull/203) feat!(electron): bump to `14.0.0`
* [GH-202](https://github.com/apache/cordova-electron/pull/202) feat!: remove old VERSION file
* [GH-199](https://github.com/apache/cordova-electron/pull/199) feat!: update node support
* [GH-198](https://github.com/apache/cordova-electron/pull/198) feat!(dependencies): update other packages
  * `execa@5.1.1`
  * `fs-extra@10.0.0`
  * `jasmine@3.9.0`
* [GH-197](https://github.com/apache/cordova-electron/pull/197) feat!(dependencies): bump **Electron** packages
  * `electron-builder@22.11.7`
  * `electron-devtools-installer@3.2.0`
* [GH-175](https://github.com/apache/cordova-electron/pull/175) breaking: add plugin support

#### Features

* [GH-200](https://github.com/apache/cordova-electron/pull/200) feat: update supported platform options
* [GH-184](https://github.com/apache/cordova-electron/pull/184) feat: forward **Electron**'s process `stdio` to terminal

#### Fixes

* [GH-183](https://github.com/apache/cordova-electron/pull/183) fix(npm): change prepack script to prepare
* [GH-180](https://github.com/apache/cordova-electron/pull/180) fix(windows): **Electron** window not displaying
* [GH-182](https://github.com/apache/cordova-electron/pull/182) fix: restrict deep merging on reserved keys
* [GH-172](https://github.com/apache/cordova-electron/pull/172) fix(pkg): typo in field "`keywords`"
* [GH-169](https://github.com/apache/cordova-electron/pull/169) fix(Api): do not depend on globals

#### Refactor Changes

* [GH-181](https://github.com/apache/cordova-electron/pull/181) refactor: use class static

#### Chores

* [GH-201](https://github.com/apache/cordova-electron/pull/201) chore(asf-license): add to header
* [GH-171](https://github.com/apache/cordova-electron/pull/171) chore: clean up `package.json`

#### Test & Other Changes

* [GH-194](https://github.com/apache/cordova-electron/pull/194) build: build `cordova.js` on `prepare`
* [GH-204](https://github.com/apache/cordova-electron/pull/204) test: cleanup and remove unneeded code
* [GH-90](https://github.com/apache/cordova-electron/pull/90) test(create): fix, clean up & extend


text:
@class PathNode;

@interface PathEdge : NSObject
    @property (assign) CGFloat cost;
    @property (nonatomic, weak) PathNode *nodeOne;
    @property (nonatomic, weak) PathNode *nodeTwo;
@end // PathEdge


text:
namespace shape_detection {

ShapeDetectionService::ShapeDetectionService(
    mojo::PendingReceiver<mojom::ShapeDetectionService> receiver)
    : receiver_(this, std::move(receiver)) {
#if defined(OS_MACOSX)
  if (__builtin_available(macOS 10.13, *)) {
    vision_framework_ =
        dlopen("/System/Library/Frameworks/Vision.framework/Vision", RTLD_LAZY);
  }
#endif
}

ShapeDetectionService::~ShapeDetectionService() {
#if defined(OS_MACOSX)
  if (__builtin_available(macOS 10.13, *)) {
    if (vision_framework_)
      dlclose(vision_framework_);
  }
#endif
}

void ShapeDetectionService::BindBarcodeDetectionProvider(
    mojo::PendingReceiver<mojom::BarcodeDetectionProvider> receiver) {
#if defined(OS_ANDROID)
  Java_InterfaceRegistrar_bindBarcodeDetectionProvider(
      base::android::AttachCurrentThread(),
      receiver.PassPipe().release().value());
#elif defined(OS_MACOSX)
  BarcodeDetectionProviderMac::Create(std::move(receiver));
#else
  BarcodeDetectionProviderImpl::Create(std::move(receiver));
#endif
}

void ShapeDetectionService::BindFaceDetectionProvider(
    mojo::PendingReceiver<mojom::FaceDetectionProvider> receiver) {
#if defined(OS_ANDROID)
  Java_InterfaceRegistrar_bindFaceDetectionProvider(
      base::android::AttachCurrentThread(),
      receiver.PassPipe().release().value());
#elif defined(OS_MACOSX)
  FaceDetectionProviderMac::Create(std::move(receiver));
#elif defined(OS_WIN)
  FaceDetectionProviderWin::Create(std::move(receiver));
#else
  FaceDetectionProviderImpl::Create(std::move(receiver));
#endif
}

void ShapeDetectionService::BindTextDetection(
    mojo::PendingReceiver<mojom::TextDetection> receiver) {
#if defined(OS_ANDROID)
  Java_InterfaceRegistrar_bindTextDetection(
      base::android::AttachCurrentThread(),
      receiver.PassPipe().release().value());
#else
  TextDetectionImpl::Create(std::move(receiver));
#endif
}

}  // namespace shape_detection


text:
/* You can add global styles to this file, and also import other style files */
@import "~@angular/material/prebuilt-themes/indigo-pink.css";
@import "https://fonts.googleapis.com/icon?family=Material+Icons";


text:
namespace RfidTool
{
    partial class BeginModifyDialog
    {
        /// <summary>
        /// Required designer variable.
        /// </summary>
        private System.ComponentModel.IContainer components = null;

        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }

        #region Windows Form Designer generated code

        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            this.button_Cancel = new System.Windows.Forms.Button();
            this.button_OK = new System.Windows.Forms.Button();
            this.tabControl1 = new System.Windows.Forms.TabControl();
            this.tabPage_action = new System.Windows.Forms.TabPage();
            this.checkBox_writeUidLog = new System.Windows.Forms.CheckBox();
            this.checkBox_oi = new System.Windows.Forms.CheckBox();
            this.textBox_rfid_oi = new System.Windows.Forms.TextBox();
            this.label_eas = new System.Windows.Forms.Label();
            this.comboBox_eas = new System.Windows.Forms.ComboBox();
            this.checkBox_uidPiiMap = new System.Windows.Forms.CheckBox();
            this.label1 = new System.Windows.Forms.Label();
            this.comboBox_filter_tu = new System.Windows.Forms.ComboBox();
            this.checkBox_aoi = new System.Windows.Forms.CheckBox();
            this.linkLabel_oiHelp = new System.Windows.Forms.LinkLabel();
            this.textBox_rfid_aoi = new System.Windows.Forms.TextBox();
            this.tabPage_other = new System.Windows.Forms.TabPage();
            this.checkBox_verifyPii = new System.Windows.Forms.CheckBox();
            this.button_modifyVerifyRule = new System.Windows.Forms.Button();
            this.tabControl1.SuspendLayout();
            this.tabPage_action.SuspendLayout();
            this.SuspendLayout();
            //
            // button_Cancel
            //
            this.button_Cancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
            this.button_Cancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
            this.button_Cancel.Location = new System.Drawing.Point(677, 523);
            this.button_Cancel.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
            this.button_Cancel.Name = "button_Cancel";
            this.button_Cancel.Size = new System.Drawing.Size(111, 40);
            this.button_Cancel.TabIndex = 4;
            this.button_Cancel.Text = "取消";
            this.button_Cancel.UseVisualStyleBackColor = true;
            this.button_Cancel.Click += new System.EventHandler(this.button_Cancel_Click);
            //
            // button_OK
            //
            this.button_OK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
            this.button_OK.Location = new System.Drawing.Point(561, 523);
            this.button_OK.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
            this.button_OK.Name = "button_OK";
            this.button_OK.Size = new System.Drawing.Size(111, 40);
            this.button_OK.TabIndex = 3;
            this.button_OK.Text = "确定";
            this.button_OK.UseVisualStyleBackColor = true;
            this.button_OK.Click += new System.EventHandler(this.button_OK_Click);
            //
            // tabControl1
            //
            this.tabControl1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
            | System.Windows.Forms.AnchorStyles.Left)
            | System.Windows.Forms.AnchorStyles.Right)));
            this.tabControl1.Controls.Add(this.tabPage_action);
            this.tabControl1.Controls.Add(this.tabPage_other);
            this.tabControl1.Location = new System.Drawing.Point(12, 11);
            this.tabControl1.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
            this.tabControl1.Name = "tabControl1";
            this.tabControl1.SelectedIndex = 0;
            this.tabControl1.Size = new System.Drawing.Size(776, 508);
            this.tabControl1.TabIndex = 5;
            //
            // tabPage_action
            //
            this.tabPage_action.AutoScroll = true;
            this.tabPage_action.Controls.Add(this.button_modifyVerifyRule);
            this.tabPage_action.Controls.Add(this.checkBox_verifyPii);
            this.tabPage_action.Controls.Add(this.checkBox_writeUidLog);
            this.tabPage_action.Controls.Add(this.checkBox_oi);
            this.tabPage_action.Controls.Add(this.textBox_rfid_oi);
            this.tabPage_action.Controls.Add(this.label_eas);
            this.tabPage_action.Controls.Add(this.comboBox_eas);
            this.tabPage_action.Controls.Add(this.checkBox_uidPiiMap);
            this.tabPage_action.Controls.Add(this.label1);
            this.tabPage_action.Controls.Add(this.comboBox_filter_tu);
            this.tabPage_action.Controls.Add(this.checkBox_aoi);
            this.tabPage_action.Controls.Add(this.linkLabel_oiHelp);
            this.tabPage_action.Controls.Add(this.textBox_rfid_aoi);
            this.tabPage_action.Location = new System.Drawing.Point(4, 31);
            this.tabPage_action.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
            this.tabPage_action.Name = "tabPage_action";
            this.tabPage_action.Padding = new System.Windows.Forms.Padding(3, 2, 3, 2);
            this.tabPage_action.Size = new System.Drawing.Size(768, 473);
            this.tabPage_action.TabIndex = 0;
            this.tabPage_action.Text = "动作参数";
            this.tabPage_action.UseVisualStyleBackColor = true;
            //
            // checkBox_writeUidLog
            //
            this.checkBox_writeUidLog.AutoSize = true;
            this.checkBox_writeUidLog.Checked = true;
            this.checkBox_writeUidLog.CheckState = System.Windows.Forms.CheckState.Checked;
            this.checkBox_writeUidLog.Enabled = false;
            this.checkBox_writeUidLog.Location = new System.Drawing.Point(10, 343);
            this.checkBox_writeUidLog.Name = "checkBox_writeUidLog";
            this.checkBox_writeUidLog.Size = new System.Drawing.Size(294, 25);
            this.checkBox_writeUidLog.TabIndex = 12;
            this.checkBox_writeUidLog.Text = "创建 UID PII 对照日志(&M)";
            this.checkBox_writeUidLog.UseVisualStyleBackColor = true;
            this.checkBox_writeUidLog.CheckedChanged += new System.EventHandler(this.checkBox_writeUidLog_CheckedChanged);
            //
            // checkBox_oi
            //
            this.checkBox_oi.Location = new System.Drawing.Point(10, 96);
            this.checkBox_oi.Name = "checkBox_oi";
            this.checkBox_oi.Size = new System.Drawing.Size(228, 25);
            this.checkBox_oi.TabIndex = 5;
            this.checkBox_oi.Text = "机构代码(&O)";
            this.checkBox_oi.UseVisualStyleBackColor = true;
            this.checkBox_oi.CheckedChanged += new System.EventHandler(this.checkBox_oi_CheckedChanged);
            //
            // textBox_rfid_oi
            //
            this.textBox_rfid_oi.Enabled = false;
            this.textBox_rfid_oi.ImeMode = System.Windows.Forms.ImeMode.Disable;
            this.textBox_rfid_oi.Location = new System.Drawing.Point(244, 94);
            this.textBox_rfid_oi.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
            this.textBox_rfid_oi.Name = "textBox_rfid_oi";
            this.textBox_rfid_oi.Size = new System.Drawing.Size(294, 31);
            this.textBox_rfid_oi.TabIndex = 1;
            //
            // label_eas
            //
            this.label_eas.Location = new System.Drawing.Point(6, 264);
            this.label_eas.Name = "label_eas";
            this.label_eas.Size = new System.Drawing.Size(232, 21);
            this.label_eas.TabIndex = 11;
            this.label_eas.Text = "EAS(&E):";
            //
            // comboBox_eas
            //
            this.comboBox_eas.FormattingEnabled = true;
            this.comboBox_eas.Items.AddRange(new object[] {
            "不修改",
            "On",
            "Off"});
            this.comboBox_eas.Location = new System.Drawing.Point(244, 261);
            this.comboBox_eas.Name = "comboBox_eas";
            this.comboBox_eas.Size = new System.Drawing.Size(294, 29);
            this.comboBox_eas.TabIndex = 10;
            this.comboBox_eas.TextChanged += new System.EventHandler(this.comboBox_eas_TextChanged);
            //
            // checkBox_uidPiiMap
            //
            this.checkBox_uidPiiMap.AutoSize = true;
            this.checkBox_uidPiiMap.Location = new System.Drawing.Point(455, 343);
            this.checkBox_uidPiiMap.Name = "checkBox_uidPiiMap";
            this.checkBox_uidPiiMap.Size = new System.Drawing.Size(294, 25);
            this.checkBox_uidPiiMap.TabIndex = 9;
            this.checkBox_uidPiiMap.Text = "建立 UID PII 对照关系(&M)";
            this.checkBox_uidPiiMap.UseVisualStyleBackColor = true;
            this.checkBox_uidPiiMap.Visible = false;
            //
            // label1
            //
            this.label1.AutoSize = true;
            this.label1.Location = new System.Drawing.Point(6, 31);
            this.label1.Name = "label1";
            this.label1.Size = new System.Drawing.Size(180, 21);
            this.label1.TabIndex = 8;
            this.label1.Text = "筛选应用类别(&T):";
            //
            // comboBox_filter_tu
            //
            this.comboBox_filter_tu.FormattingEnabled = true;
            this.comboBox_filter_tu.Items.AddRange(new object[] {
            "图书",
            "读者证",
            "层架标",
            "所有类别"});
            this.comboBox_filter_tu.Location = new System.Drawing.Point(244, 28);
            this.comboBox_filter_tu.Name = "comboBox_filter_tu";
            this.comboBox_filter_tu.Size = new System.Drawing.Size(294, 29);
            this.comboBox_filter_tu.TabIndex = 7;
            //
            // checkBox_aoi
            //
            this.checkBox_aoi.Location = new System.Drawing.Point(10, 143);
            this.checkBox_aoi.Name = "checkBox_aoi";
            this.checkBox_aoi.Size = new System.Drawing.Size(228, 25);
            this.checkBox_aoi.TabIndex = 6;
            this.checkBox_aoi.Text = "非标准机构代码(&A)";
            this.checkBox_aoi.UseVisualStyleBackColor = true;
            this.checkBox_aoi.CheckedChanged += new System.EventHandler(this.checkBox_aoi_CheckedChanged);
            //
            // linkLabel_oiHelp
            //
            this.linkLabel_oiHelp.AutoSize = true;
            this.linkLabel_oiHelp.Location = new System.Drawing.Point(6, 193);
            this.linkLabel_oiHelp.Name = "linkLabel_oiHelp";
            this.linkLabel_oiHelp.Size = new System.Drawing.Size(262, 21);
            this.linkLabel_oiHelp.TabIndex = 4;
            this.linkLabel_oiHelp.TabStop = true;
            this.linkLabel_oiHelp.Text = "帮助:如何设置机构代码?";
            //
            // textBox_rfid_aoi
            //
            this.textBox_rfid_aoi.Enabled = false;
            this.textBox_rfid_aoi.ImeMode = System.Windows.Forms.ImeMode.Disable;
            this.textBox_rfid_aoi.Location = new System.Drawing.Point(244, 141);
            this.textBox_rfid_aoi.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
            this.textBox_rfid_aoi.Name = "textBox_rfid_aoi";
            this.textBox_rfid_aoi.Size = new System.Drawing.Size(294, 31);
            this.textBox_rfid_aoi.TabIndex = 3;
            //
            // tabPage_other
            //
            this.tabPage_other.Location = new System.Drawing.Point(4, 31);
            this.tabPage_other.Name = "tabPage_other";
            this.tabPage_other.Size = new System.Drawing.Size(768, 473);
            this.tabPage_other.TabIndex = 1;
            this.tabPage_other.Text = "其它";
            this.tabPage_other.UseVisualStyleBackColor = true;
            //
            // checkBox_verifyPii
            //
            this.checkBox_verifyPii.AutoSize = true;
            this.checkBox_verifyPii.Location = new System.Drawing.Point(10, 392);
            this.checkBox_verifyPii.Name = "checkBox_verifyPii";
            this.checkBox_verifyPii.Size = new System.Drawing.Size(166, 25);
            this.checkBox_verifyPii.TabIndex = 13;
            this.checkBox_verifyPii.Text = "校验 PII (&V)";
            this.checkBox_verifyPii.UseVisualStyleBackColor = true;
            //
            // button_modifyVerifyRule
            //
            this.button_modifyVerifyRule.Location = new System.Drawing.Point(244, 384);
            this.button_modifyVerifyRule.Name = "button_modifyVerifyRule";
            this.button_modifyVerifyRule.Size = new System.Drawing.Size(294, 39);
            this.button_modifyVerifyRule.TabIndex = 14;
            this.button_modifyVerifyRule.Text = "配置校验规则 ...";
            this.button_modifyVerifyRule.UseVisualStyleBackColor = true;
            this.button_modifyVerifyRule.Click += new System.EventHandler(this.button_modifyVerifyRule_Click);
            //
            // BeginModifyDialog
            //
            this.AutoScaleDimensions = new System.Drawing.SizeF(11F, 21F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.ClientSize = new System.Drawing.Size(800, 574);
            this.Controls.Add(this.tabControl1);
            this.Controls.Add(this.button_Cancel);
            this.Controls.Add(this.button_OK);
            this.Name = "BeginModifyDialog";
            this.ShowIcon = false;
            this.ShowInTaskbar = false;
            this.Text = "开始修改";
            this.Load += new System.EventHandler(this.BeginModifyDialog_Load);
            this.tabControl1.ResumeLayout(false);
            this.tabPage_action.ResumeLayout(false);
            this.tabPage_action.PerformLayout();
            this.ResumeLayout(false);

        }

        #endregion

        private System.Windows.Forms.Button button_Cancel;
        private System.Windows.Forms.Button button_OK;
        private System.Windows.Forms.TabControl tabControl1;
        private System.Windows.Forms.TabPage tabPage_action;
        private System.Windows.Forms.LinkLabel linkLabel_oiHelp;
        private System.Windows.Forms.TextBox textBox_rfid_aoi;
        private System.Windows.Forms.TextBox textBox_rfid_oi;
        private System.Windows.Forms.TabPage tabPage_other;
        private System.Windows.Forms.CheckBox checkBox_aoi;
        private System.Windows.Forms.CheckBox checkBox_oi;
        private System.Windows.Forms.Label label1;
        private System.Windows.Forms.ComboBox comboBox_filter_tu;
        private System.Windows.Forms.CheckBox checkBox_uidPiiMap;
        private System.Windows.Forms.Label label_eas;
        private System.Windows.Forms.ComboBox comboBox_eas;
        private System.Windows.Forms.CheckBox checkBox_writeUidLog;
        private System.Windows.Forms.CheckBox checkBox_verifyPii;
        private System.Windows.Forms.Button button_modifyVerifyRule;
    }
}


text:
namespace vmml
{

class vector_test : public unit_test
{
public:
	vector_test() : unit_test( "vector (m)" ) {}
    bool run();

protected:

}; // class vector_test

} // namespace vmml

#endif


text:
/**
 *
 */
package com.wangsus.codetest.difficulty4;

/**
 * @author Su
 *
 *         Given a sorted array of integers, find the starting and ending
 *         position of a given target value.
 *
 *         Your algorithm's runtime complexity must be in the order of O(log n).
 *
 *         If the target is not found in the array, return [-1, -1].
 *
 *         For example, Given [5, 7, 7, 8, 8, 10] and target value 8, return [3,
 *         4].
 *
 */
public class Search_for_a_Range {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO Auto-generated method stub

	}

	public class Solution {
		public int[] searchRange(int[] A, int target) {
			return null;
		}
	}
}


text:
import { Skill, Intent, Launch } from '../..';
import Response from 'alexa-response';

const SPACE_FACTS = [
  'A year on Mercury is just 88 days long.',
  'Despite being farther from the Sun, Venus experiences higher temperatures than Mercury.',
  'Venus rotates counter-clockwise, possibly because of a collision in the past with an asteroid.',
  'On Mars, the Sun appears about half the size as it does on Earth.',
  'Earth is the only planet not named after a god.',
  'Jupiter has the shortest day of all the planets.',
  'The Milky Way galaxy will collide with the Andromeda Galaxy in about 5 billion years.',
  'The Sun contains 99.86% of the mass in the Solar System.',
  'The Sun is an almost perfect sphere.',
  'A total solar eclipse can happen once every 1 to 2 years. This makes them a rare event.',
  'Saturn radiates two and a half times more energy into space than it receives from the sun.',
  'The temperature inside the Sun can reach 15 million degrees Celsius.',
  'The Moon is moving approximately 3.8 cm away from our planet every year.'
];

@Skill
export default class SpaceGeek {
  @Launch
  @Intent('GetNewFactIntent')
  fact() {
    const index = Math.floor(Math.random() * SPACE_FACTS.length);
    const speech = `Here's your space fact: ${SPACE_FACTS[index]}`;
    return Response.say(speech).card({ title: 'SpaceGeek', content: speech });
  }

  @Intent('AMAZON.HelpIntent')
  help() {
    return Response.ask(
      'You can ask Space Geek tell me a space fact, or, you can say exit... What can I help you with?'
    ).reprompt('What can I help you with?');
  }

  @Intent('AMAZON.CancelIntent', 'AMAZON.StopIntent')
  stop() {
    return Response.say('Goodbye');
  }
}


text:
/*
 * 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.
 */
/*
 * This code was generated by https://github.com/googleapis/google-api-java-client-services/
 * Modify at your own risk.
 */

package com.google.api.services.trafficdirector.v2.model;

/**
 * Addresses specify either a logical or physical address and port, which are used to tell Envoy
 * where to bind/listen, connect to upstream and find management servers.
 *
 *
 This is the Java data model class that specifies how to parse/serialize into the JSON that is
 * transmitted over HTTP when working with the Traffic Director API. For a detailed explanation see:
 * https://developers.google.com/api-client-library/java/google-http-java-client/json
 *

 *
 * @author Google, Inc.
 */
@SuppressWarnings("javadoc")
public final class Address extends com.google.api.client.json.GenericJson {

  /**
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private Pipe pipe;

  /**
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private SocketAddress socketAddress;

  /**
   * @return value or {@code null} for none
   */
  public Pipe getPipe() {
    return pipe;
  }

  /**
   * @param pipe pipe or {@code null} for none
   */
  public Address setPipe(Pipe pipe) {
    this.pipe = pipe;
    return this;
  }

  /**
   * @return value or {@code null} for none
   */
  public SocketAddress getSocketAddress() {
    return socketAddress;
  }

  /**
   * @param socketAddress socketAddress or {@code null} for none
   */
  public Address setSocketAddress(SocketAddress socketAddress) {
    this.socketAddress = socketAddress;
    return this;
  }

  @Override
  public Address set(String fieldName, Object value) {
    return (Address) super.set(fieldName, value);
  }

  @Override
  public Address clone() {
    return (Address) super.clone();
  }

}


text:
package com.xsolla.android.sdk.api.model.util;

import com.xsolla.android.sdk.api.model.IParseble;

import org.json.JSONObject;

import java.util.HashMap;
import java.util.Iterator;

/**
 *
 */
enum ComponentType {
    VIRTUAL_CURRENCY, ITEMS, SUBSCRIPTIONS, COUPONS
}

/**
 *
 */
public class XProject implements IParseble {

    int     id;//"id":16184,
    int     merchantId;//"merchantId":15924,

    String  name;//"name":"Farm Fresh",
    String  nameEn;//"nameEn":"Farm Fresh",
    String  logo;//"logo":null,
    String  virtualCurrencyName;//"virtualCurrencyName":"Coins",
    String  virtualCurrencyImage;//"virtualCurrencyImage":"\/\/cdn3.xsolla.com\/img\/misc\/images\/91d3aecf770347428c8c6abdc8a260b8.png",
    String  projectUrl;//"projectUrl":"http:\/\/xsolla.com",
    String  returnUrl;//"returnUrl":"http:\/\/xsolla.com",
    String  customSupportUrl;//"customSupportUrl":null,

    boolean isDiscrete;//"isDiscrete":true,
    boolean isCanRepeatPayment;//"canRepeatPayment":true

    XEula eula;//"eula":{
    HashMap<String, XComponent> components; //"components":{

    public XProject() {
        this.eula       = new XEula();
        this.components = new HashMap<>(4);
    }

    public int getId() {
        return id;
    }

    public int getMerchantId() {
        return merchantId;
    }

    public String getName() {
        return name;
    }

    public String getNameEn() {
        return nameEn;
    }

    public String getLogo() {
        return logo;
    }

    public String getVirtualCurrencyName() {
        return virtualCurrencyName;
    }

    public String getVirtualCurrencyImage() {
        if(!"null".equals(virtualCurrencyImage))
            return virtualCurrencyImage.startsWith("http") ? virtualCurrencyImage : "https:" + virtualCurrencyImage;
        else
            return "";
    }

    public String getProjectUrl() {
        return projectUrl;
    }

    public String getReturnUrl() {
        return returnUrl;
    }

    public String getCustomSupportUrl() {
        return customSupportUrl;
    }

    public boolean isDiscrete() {
        return isDiscrete;
    }

    public boolean isCanRepeatPayment() {
        return isCanRepeatPayment;
    }

    public String getEulaLink() {
        return eula.getUrl();
    }

    public HashMap<String, XComponent> getComponents() {
        return components;
    }

    @Override
    public void parse(JSONObject jobj) {

        this.id                     = jobj.optInt("id");
        this.merchantId             = jobj.optInt("namerchantIdme");

        this.name                   = jobj.optString("name");
        this.nameEn                 = jobj.optString("nameEn");
        this.logo                   = jobj.optString("logo");
        this.virtualCurrencyName    = jobj.optString("virtualCurrencyName");
        this.virtualCurrencyImage   = jobj.optString("virtualCurrencyImage");
        this.projectUrl             = jobj.optString("projectUrl");
        this.returnUrl              = jobj.optString("returnUrl");
        this.customSupportUrl       = jobj.optString("customSupportUrl");

        this.isDiscrete             = jobj.optBoolean("isDiscrete");
        this.isCanRepeatPayment     = jobj.optBoolean("canRepeatPayment");

        JSONObject jobjEula = jobj.optJSONObject("eula");
        if(jobjEula != null)
            eula.parse(jobjEula);

        JSONObject jobjComponents = jobj.optJSONObject("components");
        if(jobjComponents != null)
            for(Iterator<String> iter = jobjComponents.keys(); iter.hasNext();) {
                String key = iter.next();
                JSONObject jobjComponent = jobjComponents.optJSONObject(key);
                XComponent component = new XComponent();
                component.parse(jobjComponent);
                components.put(key, component);
            }
    }

    @Override
    public String toString() {
        return "\n\tXProject{" +
                "id=" + id +
                ", merchantId=" + merchantId +
                ", name='" + name + '\'' +
                ", nameEn='" + nameEn + '\'' +
                ", logo='" + logo + '\'' +
                ", virtualCurrencyName='" + virtualCurrencyName + '\'' +
                ", virtualCurrencyImage='" + virtualCurrencyImage + '\'' +
                ", projectUrl='" + projectUrl + '\'' +
                ", returnUrl='" + returnUrl + '\'' +
                ", customSupportUrl='" + customSupportUrl + '\'' +
                ", isDiscrete=" + isDiscrete +
                ", isCanRepeatPayment=" + isCanRepeatPayment +
                ", eula=" + eula +
                ", components=" + components +
                '}';
    }

    /* * * * * * * * * * * * * * * * * * * * * * * * * * *
    * INNER CLASSES
    * * * * * * * * * * * * * * * * * * * * * * * * * * */
    /**
     *
     */
    class XEula implements IParseble {
        private String url;//"url":"http:\/\/xsolla.com\/termsandconditions\/?lang=en&ca=15924",
        private String label;//"label":null

        public String getUrl() {
            return url;
        }

        @Override
        public void parse(JSONObject jobj) {
            this.url    = jobj.optString("url");
            this.label  = jobj.optString("label");
        }

        @Override
        public String toString() {
            return "\n\t\tXEula{" +
                    "url='" + url + '\'' +
                    ", label='" + label + '\'' +
                    '}';
        }
    }

    /**
     *
     */
    public class XComponent implements IParseble {
        boolean isEnabled;//"enabled":true,
        String  name;//"name":null

        public boolean isEnabled() {
            return isEnabled;
        }

        public String getName() {
            return name;
        }

        @Override
        public void parse(JSONObject jobj) {
            this.isEnabled  = jobj.optBoolean("enabled");
            this.name       = jobj.optString("name");
        }

        @Override
        public String toString() {
            return "\n\t\tXComponent{" +
                    "isEnabled=" + isEnabled +
                    ", name='" + name + '\'' +
                    '}';
        }
    }
}


text:
=begin License

The MIT License (MIT)

Copyright (c) 2017 Jason White <jdwhite@menelos.com>

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.

=end License
=cut

#
# This test can be installed as a client or server test, though a server
# test makes more sense given the client we're testing is not the local host.
#
# Install in $XYMONHOME/etc/tasks.d/dropbox_monitor
#  or add to $XYMONHOME/etc/tasks.cfg

#
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# # Dropbox Monitor
# [dropboxmon]
#         ENABLED
#         ENVFILE $XYMONCLIENTHOME/etc/xymonclient.cfg
#         CMD $XYMONCLIENTHOME/ext/dropbox_monitor.pl
#         LOGFILE $XYMONCLIENTHOME/logs/dropbox_monitor.log
#         INTERVAL 5m
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

use strict;
use warnings;
use LWP::UserAgent;
use Text::Wrap;
use English;
use File::Basename qw(dirname);
use Cwd qw(abs_path);
use lib dirname(abs_path $0) . '/lib/perl5';
use lib dirname(abs_path $0) . '/../lib/perl5';
use XymonEXT;

## Globals ##
# main::URL is for the reference on the status page.
$main::URL = "http://status.dropbox.com";

#
# Fetch status page.
#
my($ua) = LWP::UserAgent->new;
my($req) = HTTP::Request->new(
	GET => $main::URL
);

# Pass request to the user agent and get a response.
my($resp) = $ua->request($req);

# Check the outcome of the response.
if ($resp->is_success) {
	$main::HTML = $resp->content;
}
else {
	print "Error reading $main::URL - ".$resp->status_line."\n";
	exit;
}

$main::HTML =~ s/\ / /go;

#
# Process each service; send status update.
#
while($main::HTML =~ /<div\s+.*?\sclass="component-inner-container\s+status-(\w+).+?\s*([^<]+)<\/span>.+?\s*([^<]+).+?<\/div>/iogsm)
{
	my($testcolor) = $1;
	my($service) = $2;
	my($status) = $3;
	my($message) = "";
	my($eventlog) = "";

	# Zorch trailing garbage.
	$testcolor =~ s/[\s\n\r]+$//o;
	$service   =~ s/[\s\n\r]+$//o;
	$status    =~ s/[\s\n\r]+$//o;

	my($testname) = $service;
	#print "color='$testcolor'  testname='$testname'   status='$status'\n"; next;

	# Xymon doesn't have an orange status.
	$testcolor =~ s/orange/yellow/;

	set_testcolor("$testcolor");

	# Machine name this test is reporting for as defined in hosts.cfg.
	set_machinename("status,dropbox,com");

	# Munge test names to deal with problematic characters.
	$testname =~ s/[\(\)]//go;
	$testname =~ s/\s/_/go;
	$testname =~ s/\./,/go;
	$testname =~ s/\&/and/go;

	set_summary($status);
	set_testname($testname);

	$message .= sprintf("&%s %s: %s\n", &get_testcolor(), $service, $status);
	$message .= "\nSource: ${main::URL}\n";

	#
	# == Report findings ==
	#
	# Note send_status() takes a hash of arguments; it's like varargs for perl. :)
	# Arguments are:
	#
	#   "lifetime" - lifetime of the report.
	#   "group"    - reporing group
	#   "hostname" - name of machine we report as
	#   "testname" - name of test
	#   "color"    - canonical test color to report
	#   "message"  - the body of the rest report (diagnostic information)
	#   "summary"  - brief text shown on first line after date and test name
	#

	send_status(
		"message"  => $message,
	);
}

exit;


text:
[Cerebro](https://github.com/lmenezes/cerebro) is a web admin tool for managing Elastic clusters.

- Estimated time for completion: 5 minutes
- Target audience: Elastic clusters administrators.
- Scope: Install and use Cerebro.

**Table of Contents**:

- [Prerequisites](#prerequisites)
- [Install Cerebro](#install-cerebro)
- [Cerebro configuration](#cerebro-configuration)
- [Using Cerebro](#using-cerebro)
- [Uninstall Elasticsearch](#uninstall-cerebro)

## Prerequisites

- A running DC/OS 1.10 cluster with least one agent with 0.5 CPU, 1.5 GB RAM and 1 GB of disk space available.

## Install Cerebro

To install Cerebro, you can either use DC/OS CLI:

```bash
$ dcos package install cerebro
```

optionally you can provide extra options:
```
$ dcos package install cerebro --options=cerebro.json
```
where `cerebro.json` would contain advanced configuration, with e.g. predefined Elastic clusters:
```
{
  "service": {
    "name": "cerebro",
    "user": "nobody",
    "cpus": 0.5,
    "mem": 1180,
    "instances": 1,
    "heap": 1024
  },
  "elastic": {
    "cluster_1": "http://master.es01.l4lb.thisdcos.directory:9200",
    "cluster_2": "http://master.es02.l4lb.thisdcos.directory:9200"
  },
  "authentication": {
    "type": "none",
  }
}
```

Or install from Cerebro from DC/OS Catalog (Universe):

![DC/OS Catalog](img/catalog.png)

If you hit the "Configure" button you can adjust Cerebro's configuration the same way as with CLI. You can define up to 5 Elastic clusters (later you can define even more):

![Cerebro DC/OS service](img/es_clusters.png)

All configuration options can be altered later, thus you don't have to worry about this now.

![Cerebro installation](img/install.png)

After pressing "Deploy" button, you should see the Cerebro service running via the `Services` tab of the DC/OS UI:

![Cerebro DC/OS service](img/services.png)

## Using Cerebro

We can use the DC/OS [Admin Router](https://dcos.io/docs/1.10/developing-services/#-a-name-adminrouter-a-admin-router-and-web-interface-integration) to provide access to the Cerebro UI: use the URL `http://$DCOS_DASHBOARD/service/cerebro/` and replace `$DCOS_DASHBOARD` with the URL of your DC/OS UI:

![Cerebro UI](img/cerebro_home.png)

Optionally you can access Cerebro via Marathon-LB, in that case it might be good idea to configure some authentication mechanism.

![Cerebro Cluster Overview](img/overview.png)

## Cerebro configuration

Cerebro offers various configuration options exposed via `ENV` variables. You can pre-define several Elastic clusters by using `ES_{n}` variables. For each cluster you can define following:

* `ES_1` URI to master node, e.g. `http://localhost:9200`
* `ES_1_NAME` human readable name of cluster (shown on Cerebro home page)
* `ES_1_USER` username
* `ES_1_PASS` password

### LDAP authentication

In order to authenticate user via LDAP set `CEREBRO_AUTH` to `ldap`. And define following variables with approprite value:

* `CEREBRO_LDAP_URL` connection URL, e.g. `ldap://host:port`
* `CEREBRO_LDAP_BASE` LDAP base `ou=active,ou=Employee`
* `CEREBRO_LDAP_METHOD` `simple`
* `CEREBRO_LDAP_DOMAIN` `example.com`

## Uninstall Cerebro

To uninstall Cerebro:

```bash
$ dcos package uninstall cerebro
```

## Further resources

1. [Cerebro project](https://github.com/lmenezes/cerebro)
1. [Cerebro DC/OS packing](https://github.com/deric/dcos-cerebro)


text:
package Jetstorm.Enterprise.Entities.Pokemon;

import Jetstorm.Enterprise.Entities.Pokemon.Moves.Move;

public class Bulbasaur extends Pokemon {

	public Bulbasaur(int startingLevel) {

		species = "BULBASAUR";
		nickname = "BULBASAUR";
		typeOne = 11;
		typeTwo = 3;
		pkmNumber = 1;
		abilityOne = 1; // Overgrow
		hiddenAbility = 1; // Chlorophyll
		friendship = 70;
		bodyStyle = 8;
		pokemonColor = 4;
		eggGroup = 1;
		secondEggGroup = 7;
		height = 0.7; // meters standard
		weight = 6.2; // kg standard
		hatchTime = 5355; // Lowest
		levelStyle = "Medium Slow";
		baseExpYield = 64;
		EVYield[0] = 0;
		EVYield[1] = 0;
		EVYield[2] = 0;
		EVYield[3] = 1;
		EVYield[4] = 0;
		EVYield[5] = 0;
		genderRatio = 0.875;
		catchRate = 45;
		baseHealth = 45;
		baseAttack = 49;
		baseDefense = 49;
		baseSpAttack = 65;
		baseSpDefense = 65;
		baseSpeed = 45;
		super.init(startingLevel);

	}

	public void init(int startingLevel) {

	}

	public void setMoveList(Move[] moves) {

		movesList = new Move[moves.length];
		movesList = moves;

	}

	public void levelUp() {

	}

	public void learnMove(int replaceMoveNumber) {

	}

	public void forgetMove(int moveNumber) {

	}

}