text:
//===----------------------------------------------------------------------===//
//
//                         Peloton
//
// types.h
//
// Identification: src/include/type/types.h
//
// Copyright (c) 2015-16, Carnegie Mellon University Database Group
//
//===----------------------------------------------------------------------===//

#pragma once

#include <bitset>
#include <climits>
#include <cstdint>
#include <functional>
#include <limits>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <vector>

#include "type/type.h"

namespace peloton {

// For all of the enums defined in this header, we will
// use this value to indicate that it is an invalid value
// I don't think it matters whether this is 0 or -1
#define INVALID_TYPE_ID 0

// forward declare
// class Value;

//===--------------------------------------------------------------------===//
// NULL-related Constants
//===--------------------------------------------------------------------===//

#define VALUE_COMPARE_LESSTHAN -1
#define VALUE_COMPARE_EQUAL 0
#define VALUE_COMPARE_GREATERTHAN 1
#define VALUE_COMPARE_INVALID -2
#define VALUE_COMPARE_NO_EQUAL \
  -3  // assigned when comparing array list and no element matching.

#define INVALID_RATIO -1

#define DEFAULT_DB_ID 12345
#define DEFAULT_DB_NAME "default_database"

extern int DEFAULT_TUPLES_PER_TILEGROUP;
extern int TEST_TUPLES_PER_TILEGROUP;

// TODO: Use ThreadLocalPool ?
// This needs to be >= the VoltType.MAX_VALUE_LENGTH defined in java, currently
// 1048576.
// The rationale for making it any larger would be to allow calculating wider
// "temp" values
// for use in situations where they are not being stored as column values
#define POOLED_MAX_VALUE_LENGTH 1048576

//===--------------------------------------------------------------------===//
// Other Constants
//===--------------------------------------------------------------------===//

#define VARCHAR_LENGTH_SHORT 16
#define VARCHAR_LENGTH_MID 256
#define VARCHAR_LENGTH_LONG 4096

//===--------------------------------------------------------------------===//
// Port to OSX
//===---------------------------
#ifdef __APPLE__
#define off64_t off_t
#define MAP_ANONYMOUS MAP_ANON
#endif

//===--------------------------------------------------------------------===//
// GUC Variables
//===--------------------------------------------------------------------===//

enum class GarbageCollectionType {
  INVALID = INVALID_TYPE_ID,
  OFF = 1,  // turn off GC
  ON = 2    // turn on GC
};

//===--------------------------------------------------------------------===//
// Value types
// This file defines all the types that we will support
// We do not allow for user-defined types, nor do we try to do anything dynamic.
//===--------------------------------------------------------------------===//

enum class PostgresValueType {
  INVALID = INVALID_TYPE_ID,
  BOOLEAN = 16,
  SMALLINT = 21,
  INTEGER = 23,
  VARBINARY = 17,
  BIGINT = 20,
  REAL = 700,
  DOUBLE = 701,
  TEXT = 25,
  BPCHAR = 1042,
  BPCHAR2 = 1014,
  VARCHAR = 1015,
  VARCHAR2 = 1043,
  DATE = 1082,
  TIMESTAMPS = 1114,
  TIMESTAMPS2 = 1184,
  TEXT_ARRAY = 1009,     // TEXTARRAYOID in postgres code
  INT2_ARRAY = 1005,     // INT2ARRAYOID in postgres code
  INT4_ARRAY = 1007,     // INT4ARRAYOID in postgres code
  OID_ARRAY = 1028,      // OIDARRAYOID in postgres code
  FLOADT4_ARRAY = 1021,  // FLOADT4ARRAYOID in postgres code
  DECIMAL = 1700
};

//===--------------------------------------------------------------------===//
// Predicate Expression Operation Types
//===--------------------------------------------------------------------===//

enum class ExpressionType {
  INVALID = INVALID_TYPE_ID,

  // -----------------------------
  // Arithmetic Operators
  // Implicit Numeric Casting: Trying to implement SQL-92.
  // Implicit Character Casting: Trying to implement SQL-92, but not easy...
  // Anyway, use explicit OPERATOR_CAST if you could.
  // -----------------------------

  // left + right (both must be number. implicitly casted)
  OPERATOR_PLUS = 1,
  // left - right (both must be number. implicitly casted)
  OPERATOR_MINUS = 2,
  // left * right (both must be number. implicitly casted)
  OPERATOR_MULTIPLY = 3,
  // left / right (both must be number. implicitly casted)
  OPERATOR_DIVIDE = 4,
  // left || right (both must be char/varchar)
  OPERATOR_CONCAT = 5,
  // left % right (both must be integer)
  OPERATOR_MOD = 6,
  // explicitly cast left as right (right is integer in ValueType enum)
  OPERATOR_CAST = 7,
  // logical not operator
  OPERATOR_NOT = 8,
  // is null test.
  OPERATOR_IS_NULL = 9,
  // exists test.
  OPERATOR_EXISTS = 18,
  OPERATOR_UNARY_MINUS = 50,

  // -----------------------------
  // Comparison Operators
  // -----------------------------
  // equal operator between left and right
  COMPARE_EQUAL = 10,
  // inequal operator between left and right
  COMPARE_NOTEQUAL = 11,
  // less than operator between left and right
  COMPARE_LESSTHAN = 12,
  // greater than operator between left and right
  COMPARE_GREATERTHAN = 13,
  // less than equal operator between left and right
  COMPARE_LESSTHANOREQUALTO = 14,
  // greater than equal operator between left and right
  COMPARE_GREATERTHANOREQUALTO = 15,
  // LIKE operator (left LIKE right). Both children must be string.
  COMPARE_LIKE = 16,
  // NOT LIKE operator (left NOT LIKE right). Both children must be string.
  COMPARE_NOTLIKE = 17,
  // IN operator [left IN (right1, right2, ...)]
  COMPARE_IN = 19,

  // -----------------------------
  // Conjunction Operators
  // -----------------------------
  CONJUNCTION_AND = 20,
  CONJUNCTION_OR = 21,

  // -----------------------------
  // Values
  // -----------------------------
  VALUE_CONSTANT = 30,
  VALUE_PARAMETER = 31,
  VALUE_TUPLE = 32,
  VALUE_TUPLE_ADDRESS = 33,
  VALUE_NULL = 34,
  VALUE_VECTOR = 35,
  VALUE_SCALAR = 36,

  // -----------------------------
  // Aggregates
  // -----------------------------
  AGGREGATE_COUNT = 40,
  AGGREGATE_COUNT_STAR = 41,
  AGGREGATE_SUM = 42,
  AGGREGATE_MIN = 43,
  AGGREGATE_MAX = 44,
  AGGREGATE_AVG = 45,

  // -----------------------------
  // Functions
  // -----------------------------
  FUNCTION = 100,

  // -----------------------------
  // Internals added for Elastic
  // -----------------------------
  HASH_RANGE = 200,

  // -----------------------------
  // Internals added for Case When
  // -----------------------------
  OPERATOR_CASE_EXPR = 302,

  // -----------------------------
  // Internals added for NULLIF
  // -----------------------------
  OPERATOR_NULLIF = 304,

  // -----------------------------
  // Internals added for COALESCE
  // -----------------------------
  OPERATOR_COALESCE = 305,

  // -----------------------------
  // Subquery IN/EXISTS
  // -----------------------------
  ROW_SUBQUERY = 400,
  SELECT_SUBQUERY = 401,

  // -----------------------------
  // String operators
  // -----------------------------
  SUBSTR = 500,
  ASCII = 501,
  OCTET_LEN = 502,
  CHAR = 503,
  CHAR_LEN = 504,
  SPACE = 505,
  REPEAT = 506,
  POSITION = 507,
  LEFT = 508,
  RIGHT = 509,
  CONCAT = 510,
  LTRIM = 511,
  RTRIM = 512,
  BTRIM = 513,
  REPLACE = 514,
  OVERLAY = 515,

  // -----------------------------
  // Date operators
  // -----------------------------
  EXTRACT = 600,
  DATE_TO_TIMESTAMP = 601,

  //===--------------------------------------------------------------------===//
  // Parser
  //===--------------------------------------------------------------------===//
  STAR = 700,
  PLACEHOLDER = 701,
  COLUMN_REF = 702,
  FUNCTION_REF = 703,
  TABLE_REF = 704,

  //===--------------------------------------------------------------------===//
  // Misc
  //===--------------------------------------------------------------------===//
  CAST = 900
};
std::string ExpressionTypeToString(ExpressionType type);
ExpressionType StringToExpressionType(const std::string &str);
std::ostream &operator<<(std::ostream &os, const ExpressionType &type);
ExpressionType ParserExpressionNameToExpressionType(const std::string &str);

// Note that we have some duplicate DatePartTypes with the 's' suffix
// They have to have the same value in order for it to work.
enum class DatePartType {
  INVALID = INVALID_TYPE_ID,
  CENTURY = 1,
  DAY = 2,
  DAYS = 2,
  DECADE = 3,
  DECADES = 3,
  DOW = 4,
  DOY = 5,
  HOUR = 7,
  HOURS = 7,
  MICROSECOND = 10,
  MICROSECONDS = 10,
  MILLENNIUM = 11,
  MILLISECOND = 12,
  MILLISECONDS = 12,
  MINUTE = 13,
  MINUTES = 13,
  MONTH = 14,
  MONTHS = 14,
  QUARTER = 15,
  QUARTERS = 15,
  SECOND = 16,
  SECONDS = 16,
  WEEK = 20,
  WEEKS = 20,
  YEAR = 21,
  YEARS = 21,
};
std::string DatePartTypeToString(DatePartType type);
DatePartType StringToDatePartType(const std::string &str);
std::ostream &operator<<(std::ostream &os, const DatePartType &type);

// PAVLO: 2017-01-18
// I removed these DatePartTypes because I don't think that
// it's something we can easily support right now. Things get
// weird with timezones
//   EPOCH = 6,
//   ISODOW = 8,
//   ISOYEAR = 9,
//   TIMEZONE = 17,
//   TIMEZONE_HOUR = 18,
//   TIMEZONE_HOURS = 18,
//   TIMEZONE_MINUTE = 19,
//   TIMEZONE_MINUTES = 19,

//===--------------------------------------------------------------------===//
// Network Message Types
//===--------------------------------------------------------------------===//

enum class NetworkMessageType : unsigned char {
  // Important: The character '0' is treated as a null message
  // That means we cannot have an invalid type
  NULL_COMMAND = '0',

  // Responses
  PARSE_COMPLETE = '1',
  BIND_COMPLETE = '2',
  CLOSE_COMPLETE = '3',
  COMMAND_COMPLETE = 'C',
  PARAMETER_STATUS = 'S',
  AUTHENTICATION_REQUEST = 'R',
  ERROR_RESPONSE = 'E',
  EMPTY_QUERY_RESPONSE = 'I',
  NO_DATA_RESPONSE = 'n',
  READY_FOR_QUERY = 'Z',
  ROW_DESCRIPTION = 'T',
  DATA_ROW = 'D',
  // Errors
  HUMAN_READABLE_ERROR = 'M',
  SQLSTATE_CODE_ERROR = 'C',
  // Commands
  EXECUTE_COMMAND = 'E',
  SYNC_COMMAND = 'S',
  TERMINATE_COMMAND = 'X',
  DESCRIBE_COMMAND = 'D',
  BIND_COMMAND = 'B',
  PARSE_COMMAND = 'P',
  SIMPLE_QUERY_COMMAND = 'Q',
  CLOSE_COMMAND = 'C',
};

enum class NetworkTransactionStateType : unsigned char {
  INVALID = static_cast<unsigned char>(INVALID_TYPE_ID),
  IDLE = 'I',
  BLOCK = 'T',
  FAIL = 'E',
};

enum SqlStateErrorCode {
  SERIALIZATION_ERROR = '1',
};

//===--------------------------------------------------------------------===//
// Concurrency Control Types
//===--------------------------------------------------------------------===//

enum class ConcurrencyType {
  INVALID = INVALID_TYPE_ID,
  TIMESTAMP_ORDERING = 1  // timestamp ordering
};

//===--------------------------------------------------------------------===//
// Epoch Types
//===--------------------------------------------------------------------===//

enum class EpochType {
  INVALID = INVALID_TYPE_ID,
  DECENTRALIZED_EPOCH = 1  // decentralized epoch manager
};

//===--------------------------------------------------------------------===//
// Visibility Types
//===--------------------------------------------------------------------===//

enum class VisibilityType {
  INVALID = INVALID_TYPE_ID,
  INVISIBLE = 1,
  DELETED = 2,
  OK = 3
};

//===--------------------------------------------------------------------===//
// Isolation Levels
//===--------------------------------------------------------------------===//

enum class IsolationLevelType {
  INVALID = INVALID_TYPE_ID,
  FULL = 1,            // full serializability
  SNAPSHOT = 2,        // snapshot isolation
  REPEATABLE_READ = 3  // repeatable read
};

//===--------------------------------------------------------------------===//
// Garbage Collection Types
//===--------------------------------------------------------------------===//

enum class BackendType {
  INVALID = INVALID_TYPE_ID,  // invalid backend type
  MM = 1,                     // on volatile memory
  NVM = 2,                    // on non-volatile memory
  SSD = 3,                    // on ssd
  HDD = 4                     // on hdd
};
std::string BackendTypeToString(BackendType type);
BackendType StringToBackendType(const std::string &str);
std::ostream &operator<<(std::ostream &os, const BackendType &type);

//===--------------------------------------------------------------------===//
// Index Types
//===--------------------------------------------------------------------===//

enum class IndexType {
  INVALID = INVALID_TYPE_ID,  // invalid index type
  BWTREE = 1,                 // bwtree
  HASH = 2,                   // hash
  SKIPLIST = 3                // skiplist
};
std::string IndexTypeToString(IndexType type);
IndexType StringToIndexType(const std::string &str);
std::ostream &operator<<(std::ostream &os, const IndexType &type);

enum class IndexConstraintType {
  // invalid index constraint type
  INVALID = INVALID_TYPE_ID,
  // default type - not used to enforce constraints
  DEFAULT = 1,
  // used to enforce primary key constraint
  PRIMARY_KEY = 2,
  // used for unique constraint
  UNIQUE = 3
};
std::string IndexConstraintTypeToString(IndexConstraintType type);
IndexConstraintType StringToIndexConstraintType(const std::string &str);
std::ostream &operator<<(std::ostream &os, const IndexConstraintType &type);

//===--------------------------------------------------------------------===//
// Hybrid Scan Types
//===--------------------------------------------------------------------===//

enum class HybridScanType {
  INVALID = INVALID_TYPE_ID,
  SEQUENTIAL = 1,
  INDEX = 2,
  HYBRID = 3
};
std::string HybridScanTypeToString(HybridScanType type);
HybridScanType StringToHybridScanType(const std::string &str);
std::ostream &operator<<(std::ostream &os, const HybridScanType &type);

//===--------------------------------------------------------------------===//
// Parse Node Types
//===--------------------------------------------------------------------===//

enum class ParseNodeType {
  INVALID = INVALID_TYPE_ID,  // invalid parse node type

  // Scan Nodes
  SCAN = 10,

  // DDL Nodes
  CREATE = 20,
  DROP = 21,

  // Mutator Nodes
  UPDATE = 30,
  INSERT = 31,
  DELETE = 32,

  // Prepared Nodes
  PREPARE = 40,
  EXECUTE = 41,

  // Select Nodes
  SELECT = 50,
  JOIN_EXPR = 51,  // a join tree
  TABLE = 52,      // a single table

  // Test
  MOCK = 80
};
std::string ParseNodeTypeToString(ParseNodeType type);
ParseNodeType StringToParseNodeType(const std::string &str);
std::ostream &operator<<(std::ostream &os, const ParseNodeType &type);

//===--------------------------------------------------------------------===//
// Plan Node Types
//===--------------------------------------------------------------------===//

enum class PlanNodeType {
  INVALID = INVALID_TYPE_ID,  // invalid plan node type

  // Scan Nodes
  ABSTRACT_SCAN = 10,
  SEQSCAN = 11,
  INDEXSCAN = 12,

  // Join Nodes
  NESTLOOP = 20,
  NESTLOOPINDEX = 21,
  MERGEJOIN = 22,
  HASHJOIN = 23,

  // Mutator Nodes
  UPDATE = 30,
  INSERT = 31,
  DELETE = 32,

  // DDL Nodes
  DROP = 33,
  CREATE = 34,
  POPULATE_INDEX = 35,

  // Communication Nodes
  SEND = 40,
  RECEIVE = 41,
  PRINT = 42,

  // Algebra Nodes
  AGGREGATE = 50,
  UNION = 52,
  ORDERBY = 53,
  PROJECTION = 54,
  MATERIALIZE = 55,
  LIMIT = 56,
  DISTINCT = 57,
  SETOP = 58,   // set operation
  APPEND = 59,  // append
  AGGREGATE_V2 = 61,
  HASH = 62,

  // Utility
  RESULT = 70,
  COPY = 71,

  // Test
  MOCK = 80
};
std::string PlanNodeTypeToString(PlanNodeType type);
PlanNodeType StringToPlanNodeType(const std::string &str);
std::ostream &operator<<(std::ostream &os, const PlanNodeType &type);

//===--------------------------------------------------------------------===//
// Create Types
//===--------------------------------------------------------------------===//

enum class CreateType {
  INVALID = INVALID_TYPE_ID,  // invalid create type
  DB = 1,                     // db create type
  TABLE = 2,                  // table create type
  INDEX = 3,                  // index create type
  CONSTRAINT = 4              // constraint create type
};

//===--------------------------------------------------------------------===//
// Statement Types
//===--------------------------------------------------------------------===//

enum class StatementType {
  INVALID = INVALID_TYPE_ID,  // invalid statement type
  SELECT = 1,                 // select statement type
  INSERT = 3,                 // insert statement type
  UPDATE = 4,                 // update statement type
  DELETE = 5,                 // delete statement type
  CREATE = 6,                 // create statement type
  DROP = 7,                   // drop statement type
  PREPARE = 8,                // prepare statement type
  EXECUTE = 9,                // execute statement type
  RENAME = 11,                // rename statement type
  ALTER = 12,                 // alter statement type
  TRANSACTION = 13,           // transaction statement type,
  COPY = 14                   // copy type
};
std::string StatementTypeToString(StatementType type);
StatementType StringToStatementType(const std::string &str);
std::ostream &operator<<(std::ostream &os, const StatementType &type);

//===--------------------------------------------------------------------===//
// Scan Direction Types
//===--------------------------------------------------------------------===//

enum class ScanDirectionType {
  INVALID = INVALID_TYPE_ID,  // invalid scan direction
  FORWARD = 1,                // forward
  BACKWARD = 2                // backward
};

//===--------------------------------------------------------------------===//
// Join Types
//===--------------------------------------------------------------------===//

enum class JoinType {
  INVALID = INVALID_TYPE_ID,  // invalid join type
  LEFT = 1,                   // left
  RIGHT = 2,                  // right
  INNER = 3,                  // inner
  OUTER = 4,                  // outer
  SEMI = 5                    // IN+Subquery is SEMI
};
std::string JoinTypeToString(JoinType type);
JoinType StringToJoinType(const std::string &str);
std::ostream &operator<<(std::ostream &os, const JoinType &type);

//===--------------------------------------------------------------------===//
// Aggregate Types
//===--------------------------------------------------------------------===//

enum class AggregateType {
  INVALID = INVALID_TYPE_ID,
  SORTED = 1,
  HASH = 2,
  PLAIN = 3  // no group-by
};
std::string AggregateTypeToString(AggregateType type);
AggregateType StringToAggregateType(const std::string &str);
std::ostream &operator<<(std::ostream &os, const AggregateType &type);

// ------------------------------------------------------------------
// Expression Quantifier Types
// ------------------------------------------------------------------
enum class QuantifierType {
  NONE = 0,
  ANY = 1,
  ALL = 2,
};
std::string QuantifierTypeToString(QuantifierType type);
QuantifierType StringToQuantifierType(const std::string &str);
std::ostream &operator<<(std::ostream &os, const QuantifierType &type);

//===--------------------------------------------------------------------===//
// Table Reference Types
//===--------------------------------------------------------------------===//

enum class TableReferenceType {
  INVALID = INVALID_TYPE_ID,  // invalid table reference type
  NAME = 1,                   // table name
  SELECT = 2,                 // output of select
  JOIN = 3,                   // output of join
  CROSS_PRODUCT = 4           // out of cartesian product
};
std::string TableReferenceTypeToString(TableReferenceType type);
TableReferenceType StringToTableReferenceType(const std::string &str);
std::ostream &operator<<(std::ostream &os, const TableReferenceType &type);

//===--------------------------------------------------------------------===//
// Insert Types
//===--------------------------------------------------------------------===//

enum class InsertType {
  INVALID = INVALID_TYPE_ID,  // invalid insert type
  VALUES = 1,                 // values
  SELECT = 2                  // select
};
std::string InsertTypeToString(InsertType type);
InsertType StringToInsertType(const std::string &str);
std::ostream &operator<<(std::ostream &os, const InsertType &type);

//===--------------------------------------------------------------------===//
// Copy Types
//===--------------------------------------------------------------------===//

enum class CopyType {
  IMPORT_CSV,     // Import csv data to database
  IMPORT_TSV,     // Import tsv data to database
  EXPORT_CSV,     // Export data to csv file
  EXPORT_STDOUT,  // Export data to std out
  EXPORT_OTHER,   // Export data to other file format
};

//===--------------------------------------------------------------------===//
// Payload Types
//===--------------------------------------------------------------------===//

enum class PayloadType {
  INVALID = INVALID_TYPE_ID,  // invalid message type
  CLIENT_REQUEST = 1,         // request
  CLIENT_RESPONSE = 2,        // response
  STOP = 3                    // stop loop
};
std::string PayloadTypeToString(PayloadType type);
PayloadType StringToPayloadType(const std::string &str);
std::ostream &operator<<(std::ostream &os, const PayloadType &type);

//===--------------------------------------------------------------------===//
// Task Priority Types
//===--------------------------------------------------------------------===//

enum class TaskPriorityType {
  INVALID = INVALID_TYPE_ID,  // invalid priority
  LOW = 10,
  NORMAL = 11,
  HIGH = 12
};
std::string TaskPriorityTypeToString(TaskPriorityType type);
TaskPriorityType StringToTaskPriorityType(const std::string &str);
std::ostream &operator<<(std::ostream &os, const TaskPriorityType &type);

//===--------------------------------------------------------------------===//
// Result Types
//===--------------------------------------------------------------------===//

enum class ResultType {
  INVALID = INVALID_TYPE_ID,  // invalid result type
  SUCCESS = 1,
  FAILURE = 2,
  ABORTED = 3,  // aborted
  NOOP = 4,     // no op
  UNKNOWN = 5
};
std::string ResultTypeToString(ResultType type);
ResultType StringToResultType(const std::string &str);
std::ostream &operator<<(std::ostream &os, const ResultType &type);

//===--------------------------------------------------------------------===//
// Constraint Types
//===--------------------------------------------------------------------===//

enum class PostgresConstraintType {
  NOT_NULL, /* not standard SQL, but a lot of people * expect it */
  NOTNULL,
  DEFAULT,
  CHECK,
  PRIMARY,
  UNIQUE,
  EXCLUSION,
  FOREIGN,
  ATTR_DEFERRABLE, /* attributes for previous constraint node */
  ATTR_NOT_DEFERRABLE,
  ATTR_DEFERRED,
  ATTR_IMMEDIATE
};

enum class ConstraintType {
  INVALID = INVALID_TYPE_ID,  // invalid
  NOT_NULL = 1,              // notnull
  NOTNULL = 2,                // notnull
  DEFAULT = 3,                // default
  CHECK = 4,                  // check
  PRIMARY = 5,                // primary key
  UNIQUE = 6,                 // unique
  FOREIGN = 7,                // foreign key
  EXCLUSION = 8               // foreign key
};
std::string ConstraintTypeToString(ConstraintType type);
ConstraintType StringToConstraintType(const std::string &str);
std::ostream &operator<<(std::ostream &os, const ConstraintType &type);

//===--------------------------------------------------------------------===//
// Set Operation Types
//===--------------------------------------------------------------------===//
enum class SetOpType {
  INVALID = INVALID_TYPE_ID,
  INTERSECT = 1,
  INTERSECT_ALL = 2,
  EXCEPT = 3,
  EXCEPT_ALL = 4
};
std::string SetOpTypeToString(SetOpType type);
SetOpType StringToSetOpType(const std::string &str);
std::ostream &operator<<(std::ostream &os, const SetOpType &type);

//===--------------------------------------------------------------------===//
// Logging + Recovery Types
//===--------------------------------------------------------------------===//

// AAA_BBB
// Data stored in AAA
// Log stored in BBB
enum class LoggingType {
  INVALID = INVALID_TYPE_ID,

  // Based on write behind logging
  NVM_WBL = 1,
  SSD_WBL = 2,
  HDD_WBL = 3,

  // Based on write ahead logging
  NVM_WAL = 4,
  SSD_WAL = 5,
  HDD_WAL = 6,
};
std::string LoggingTypeToString(LoggingType type);
LoggingType StringToLoggingType(const std::string &str);
std::ostream &operator<<(std::ostream &os, const LoggingType &type);

/* Possible values for peloton_tilegroup_layout GUC */
typedef enum LayoutType {
  LAYOUT_TYPE_INVALID = INVALID_TYPE_ID,
  LAYOUT_TYPE_ROW = 1,    /* Pure row layout */
  LAYOUT_TYPE_COLUMN = 2, /* Pure column layout */
  LAYOUT_TYPE_HYBRID = 3  /* Hybrid layout */
} LayoutType;

enum class LoggerMappingStrategyType {
  INVALID = INVALID_TYPE_ID,
  ROUND_ROBIN = 1,
  AFFINITY = 2,
  MANUAL = 3
};
std::string LoggerMappingStrategyTypeToString(LoggerMappingStrategyType type);
LoggerMappingStrategyType StringToLoggerMappingStrategyType(const std::string &str);
std::ostream &operator<<(std::ostream &os, const LoggerMappingStrategyType &type);

enum class CheckpointType {
  INVALID = INVALID_TYPE_ID,
  NORMAL = 1,
};
std::string CheckpointTypeToString(CheckpointType type);
CheckpointType StringToCheckpointType(const std::string &str);
std::ostream &operator<<(std::ostream &os, const CheckpointType &type);

enum ReplicationType {
  ASYNC_REPLICATION,
  SYNC_REPLICATION,
  SEMISYNC_REPLICATION
};

enum class LoggingStatusType {
  INVALID = INVALID_TYPE_ID,
  STANDBY = 1,
  RECOVERY = 2,
  LOGGING = 3,
  TERMINATE = 4,
  SLEEP = 5
};
std::string LoggingStatusTypeToString(LoggingStatusType type);
LoggingStatusType StringToLoggingStatusType(const std::string &str);
std::ostream& operator<<(std::ostream& os, const LoggingStatusType& type);

enum class LoggerType {
  INVALID = INVALID_TYPE_ID,
  FRONTEND = 1,
  BACKEND = 2
};
std::string LoggerTypeToString(LoggerType type);
LoggerType StringToLoggerType(const std::string &str);
std::ostream& operator<<(std::ostream& os, const LoggerType& type);

enum LogRecordType {
  LOGRECORD_TYPE_INVALID = INVALID_TYPE_ID,

  // Transaction-related records
  LOGRECORD_TYPE_TRANSACTION_BEGIN = 1,
  LOGRECORD_TYPE_TRANSACTION_COMMIT = 2,
  LOGRECORD_TYPE_TRANSACTION_END = 3,
  LOGRECORD_TYPE_TRANSACTION_ABORT = 4,
  LOGRECORD_TYPE_TRANSACTION_DONE = 5,

  // Generic dml records
  LOGRECORD_TYPE_TUPLE_INSERT = 11,
  LOGRECORD_TYPE_TUPLE_DELETE = 12,
  LOGRECORD_TYPE_TUPLE_UPDATE = 13,

  // DML records for Write ahead logging
  LOGRECORD_TYPE_WAL_TUPLE_INSERT = 21,
  LOGRECORD_TYPE_WAL_TUPLE_DELETE = 22,
  LOGRECORD_TYPE_WAL_TUPLE_UPDATE = 23,

  // DML records for Write behind logging
  LOGRECORD_TYPE_WBL_TUPLE_INSERT = 31,
  LOGRECORD_TYPE_WBL_TUPLE_DELETE = 32,
  LOGRECORD_TYPE_WBL_TUPLE_UPDATE = 33,

  // Record for delimiting transactions
  // includes max persistent commit_id
  LOGRECORD_TYPE_ITERATION_DELIMITER = 41,
};
std::string LogRecordTypeToString(LogRecordType type);
LogRecordType StringToLogRecordType(const std::string &str);

enum class CheckpointStatus {
  INVALID = INVALID_TYPE_ID,
  STANDBY = 1,
  RECOVERY = 2,
  DONE_RECOVERY = 3,
  CHECKPOINTING = 4,
};
std::string CheckpointStatusToString(CheckpointStatus type);
CheckpointStatus StringToCheckpointStatus(const std::string &str);
std::ostream &operator<<(std::ostream &os, const CheckpointStatus &type);

//===--------------------------------------------------------------------===//
// Statistics Types
//===--------------------------------------------------------------------===//

// Statistics Collection Type
// Disable or enable
enum StatsType {
  // Disable statistics collection
  STATS_TYPE_INVALID = INVALID_TYPE_ID,
  // Enable statistics collection
  STATS_TYPE_ENABLE = 1,
};

enum MetricType {
  // Metric type is invalid
  INVALID_METRIC = INVALID_TYPE_ID,
  // Metric to count a number
  COUNTER_METRIC = 1,
  // Access information, e.g., # tuples read, inserted, updated, deleted
  ACCESS_METRIC = 2,
  // Life time of a object
  LIFETIME_METRIC = 3,
  // Statistics for a specific database
  DATABASE_METRIC = 4,
  // Statistics for a specific table
  TABLE_METRIC = 5,
  // Statistics for a specific index
  INDEX_METRIC = 6,
  // Latency of transactions
  LATENCY_METRIC = 7,
  // Timestamp, e.g., creation time of a table/index
  TEMPORAL_METRIC = 8,
  // Statistics for a specific table
  QUERY_METRIC = 9,
  // Statistics for CPU
  PROCESSOR_METRIC = 10,
};

static const int INVALID_FILE_DESCRIPTOR = -1;

// ------------------------------------------------------------------
// Tuple serialization formats
// ------------------------------------------------------------------

enum class TupleSerializationFormat {
  NATIVE = 0,
  DR = 1
};

// ------------------------------------------------------------------
// Entity types
// ------------------------------------------------------------------

enum class EntityType {
  INVALID = INVALID_TYPE_ID,
  TABLE = 1,
  SCHEMA = 2,
  INDEX = 3,
  VIEW = 4,
  PREPARED_STATEMENT = 5,
};
std::string EntityTypeToString(EntityType type);
EntityType StringToEntityType(const std::string &str);
std::ostream &operator<<(std::ostream &os, const EntityType &type);

// ------------------------------------------------------------------
// Endianess
// ------------------------------------------------------------------

enum Endianess { BYTE_ORDER_BIG_ENDIAN = 0, BYTE_ORDER_LITTLE_ENDIAN = 1 };

//===--------------------------------------------------------------------===//
// Type definitions.
//===--------------------------------------------------------------------===//

typedef uint32_t oid_t;

static const oid_t START_OID = 0;

static const oid_t INVALID_OID = std::numeric_limits<oid_t>::max();

static const oid_t MAX_OID = std::numeric_limits<oid_t>::max() - 1;

#define NULL_OID MAX_OID

// For transaction id

typedef uint64_t txn_id_t;

static const txn_id_t INVALID_TXN_ID = 0;

static const txn_id_t INITIAL_TXN_ID = 1;

static const txn_id_t READONLY_TXN_ID = 2;

static const txn_id_t START_TXN_ID = 3;

static const txn_id_t MAX_TXN_ID = std::numeric_limits<txn_id_t>::max();

// For commit id

typedef uint64_t cid_t;

static const cid_t INVALID_CID = 0;

static const cid_t READ_ONLY_START_CID = 1;

static const cid_t START_CID = 2;

static const cid_t MAX_CID = std::numeric_limits<cid_t>::max();

// For epoch
static const size_t EPOCH_LENGTH = 40;

// For threads
extern size_t CONNECTION_THREAD_COUNT;
extern size_t LOGGING_THREAD_COUNT;
extern size_t GC_THREAD_COUNT;
extern size_t EPOCH_THREAD_COUNT;
extern size_t MAX_CONCURRENCY;

//===--------------------------------------------------------------------===//
// TupleMetadata
//===--------------------------------------------------------------------===//
struct TupleMetadata {
  oid_t table_id = 0;
  oid_t tile_group_id = 0;
  oid_t tuple_slot_id = 0;
  cid_t tuple_end_cid = 0;
};

//===--------------------------------------------------------------------===//
// Column Bitmap
//===--------------------------------------------------------------------===//
static const size_t max_col_count = 128;
typedef std::bitset<max_col_count> ColBitmap;

//===--------------------------------------------------------------------===//
// read-write set
//===--------------------------------------------------------------------===//

enum class RWType {
  INVALID,
  READ,
  READ_OWN,  // select for update
  UPDATE,
  INSERT,
  DELETE,
  INS_DEL,  // delete after insert.
};
std::string RWTypeToString(RWType type);
RWType StringToRWType(const std::string &str);
std::ostream &operator<<(std::ostream &os, const RWType &type);

enum class GCSetType { COMMITTED, ABORTED };

// block -> offset -> type
typedef std::unordered_map<oid_t, std::unordered_map<oid_t, RWType>>
    ReadWriteSet;

// block -> offset -> is_index_deletion
typedef std::unordered_map<oid_t, std::unordered_map<oid_t, bool>>
    GCSet;

//===--------------------------------------------------------------------===//
// File Handle
//===--------------------------------------------------------------------===//
struct FileHandle {
  // FILE pointer
  FILE *file = nullptr;

  // File descriptor
  int fd;

  // Size of the file
  size_t size;

  FileHandle() : file(nullptr), fd(INVALID_FILE_DESCRIPTOR), size(0) {}

  FileHandle(FILE *file, int fd, size_t size)
      : file(file), fd(fd), size(size) {}
};
extern FileHandle INVALID_FILE_HANDLE;

//===--------------------------------------------------------------------===//
// Utilities
//===--------------------------------------------------------------------===//

bool HexDecodeToBinary(unsigned char *bufferdst, const char *hexString);

//===--------------------------------------------------------------------===//
// Transformers
//===--------------------------------------------------------------------===//

std::string TypeIdToString(type::Type::TypeId type);
type::Type::TypeId StringToTypeId(const std::string &str);

type::Type::TypeId PostgresValueTypeToPelotonValueType(PostgresValueType type);
ConstraintType PostgresConstraintTypeToPelotonConstraintType(
    PostgresConstraintType type);

std::string SqlStateErrorCodeToString(SqlStateErrorCode code);

namespace expression {
class AbstractExpression;
}

/**
 * @brief Generic specification of a projection target:
 *        < DEST_column_id , expression >
 */
typedef std::pair<oid_t, const expression::AbstractExpression *> Target;

typedef std::vector<Target> TargetList;

/**
 * @brief Generic specification of a direct map:
 *        < NEW_col_id , <tuple_index (left or right tuple), OLD_col_id>    >
 */
typedef std::pair<oid_t, std::pair<oid_t, oid_t>> DirectMap;

typedef std::vector<DirectMap> DirectMapList;

//===--------------------------------------------------------------------===//
// Wire protocol typedefs
//===--------------------------------------------------------------------===//
#define SOCKET_BUFFER_SIZE 8192

/* byte type */
typedef unsigned char uchar;

/* type for buffer of bytes */
typedef std::vector<uchar> ByteBuf;

}  // End peloton namespace


text:
package org.teknux.jettybootstrap.keystore;

public class JettyKeystoreException extends Exception {

    private static final long serialVersionUID = 1L;

    public static final int ERROR_LOAD_KEYSTORE = 0;
    public static final int ERROR_LOAD_PKCS8 = 1;
    public static final int ERROR_LOAD_PKCS12 = 2;
    public static final int ERROR_LOAD_PRIVATE_KEY_PKCS8 = 3;
    public static final int ERROR_LOAD_PRIVATE_KEY_PKCS12 = 4;
    public static final int ERROR_LOAD_CERTIFICATE_PKCS8 = 5;
    public static final int ERROR_LOAD_CERTIFICATE_PKCS12 = 6;
    public static final int ERROR_CREATE_KEYS = 7;
    public static final int ERROR_CREATE_CERTIFICATE = 8;
    public static final int ERROR_CREATE_KEYSTORE = 9;
    public static final int ERROR_SAVE_KEYSTORE = 10;
    public static final int ERROR_UNREACHABLE_PRIVATE_KEY_ENTRY = 11;
    public static final int ERROR_INVALID_KEYSTORE = 12;

    private final int type;

    public JettyKeystoreException(int type, String s) {
        super(s);

        this.type = type;
    }

    public JettyKeystoreException(int type, Throwable throwable) {
        super(throwable);

        this.type = type;
    }

    public JettyKeystoreException(int type, String s, Throwable throwable) {
        super(s, throwable);

        this.type = type;
    }

    public int getType() {
        return type;
    }
}

redpajama_set_name: RedPajamaGithub


text:
**Namespace:** [OfficeDevPnP.Core.UPAWebService](OfficeDevPnP.Core.UPAWebService.md)
**Assembly:** OfficeDevPnP.Core.dll
## Syntax
```C#
public Guid SourceInternal { get; set; }
```

### Property Value
Type: System.Guid

## See also
- [MemberGroupData](OfficeDevPnP.Core.UPAWebService.MemberGroupData.md)
- [OfficeDevPnP.Core.UPAWebService](OfficeDevPnP.Core.UPAWebService.md)


text: DROP TABLE movie, constr;


text:
<?php

defined('WEKIT_VERSION') || exit('Forbidden');

abstract class PwBaseMapDbCache
{
    protected $index;
    protected $daoMap = [];
    protected $vkey;
    protected $keys = [];

    public function __construct()
    {
        Wekit::cache()->mergeKeys($this->keys);
    }

    public function setIndex($index)
    {
        $this->index = $index;

        return $this;
    }

    public function setDaoMap($daoMap)
    {
        $this->daoMap = $daoMap;

        return $this;
    }

    public function setVkey($vkey)
    {
        $this->vkey = $vkey;

        return $this;
    }

    public function __call($methodName, $args)
    {
        return call_user_func_array([$this->_getDao(), $methodName], $args);
    }

    protected function _getDao()
    {
        return PwLoader::loadDaoFromMap($this->index, $this->daoMap, $this->vkey, false);
    }
}


text:
package internalversion

import (
	authorization "github.com/openshift/origin/pkg/authorization/apis/authorization"
	internalinterfaces "github.com/openshift/origin/pkg/authorization/generated/informers/internalversion/internalinterfaces"
	internalclientset "github.com/openshift/origin/pkg/authorization/generated/internalclientset"
	internalversion "github.com/openshift/origin/pkg/authorization/generated/listers/authorization/internalversion"
	v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
	runtime "k8s.io/apimachinery/pkg/runtime"
	watch "k8s.io/apimachinery/pkg/watch"
	cache "k8s.io/client-go/tools/cache"
	time "time"
)

// ClusterPolicyBindingInformer provides access to a shared informer and lister for
// ClusterPolicyBindings.
type ClusterPolicyBindingInformer interface {
	Informer() cache.SharedIndexInformer
	Lister() internalversion.ClusterPolicyBindingLister
}

type clusterPolicyBindingInformer struct {
	factory internalinterfaces.SharedInformerFactory
}

// NewClusterPolicyBindingInformer constructs a new informer for ClusterPolicyBinding type.
// Always prefer using an informer factory to get a shared informer instead of getting an independent
// one. This reduces memory footprint and number of connections to the server.
func NewClusterPolicyBindingInformer(client internalclientset.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
	return cache.NewSharedIndexInformer(
		&cache.ListWatch{
			ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
				return client.Authorization().ClusterPolicyBindings().List(options)
			},
			WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
				return client.Authorization().ClusterPolicyBindings().Watch(options)
			},
		},
		&authorization.ClusterPolicyBinding{},
		resyncPeriod,
		indexers,
	)
}

func defaultClusterPolicyBindingInformer(client internalclientset.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
	return NewClusterPolicyBindingInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc})
}

func (f *clusterPolicyBindingInformer) Informer() cache.SharedIndexInformer {
	return f.factory.InformerFor(&authorization.ClusterPolicyBinding{}, defaultClusterPolicyBindingInformer)
}

func (f *clusterPolicyBindingInformer) Lister() internalversion.ClusterPolicyBindingLister {
	return internalversion.NewClusterPolicyBindingLister(f.Informer().GetIndexer())
}


text:
(function() {
  var AJSON, asyncJSON, es, resumer;

  asyncJSON = require("async-json");

  resumer = require("resumer");

  es = require("event-stream");

  AJSON = (function() {
    function AJSON() {}

    AJSON.stringify = function(data, cb) {
      return asyncJSON.stringify(data, function(err, result) {
        return cb(err, result);
      });
    };

    AJSON.parse = function(s, cb) {
      var stream;
      stream = resumer();
      stream.queue(s);
      return stream.pipe(es.parse({
        error: true
      })).on("error", function(theErr) {
        var err;
        err = new Error("Invalid JSON string provided");
        return cb(err, null);
      }).pipe(es.map(function(data, callback) {
        callback(null, data);
        return cb(null, data);
      }));
    };

    return AJSON;

  })();

  module.exports = AJSON;

}).call(this);


text:
=======================
conda-smithy Change Log
=======================

.. current developments

v3.1.2
====================

**Added:**

None

* Require ``conda-forge-pinnings`` to run
None

* Update conda-build in the docker build script

**Changed:**

None

* Included package badges in a table


text:
@interface SPCoreAudioController ()

// Core Audio
-(BOOL)setupCoreAudioWithInputFormat:(AudioStreamBasicDescription)inputFormat error:(NSError **)err;
-(void)teardownCoreAudio;
-(void)startAudioQueue;
-(void)stopAudioQueue;
-(void)applyVolumeToMixerAudioUnit:(double)vol;
-(void)applyAudioStreamDescriptionToInputUnit:(AudioStreamBasicDescription)newInputDescription;

@property (readwrite, nonatomic) AudioStreamBasicDescription inputAudioDescription;

static OSStatus AudioUnitRenderDelegateCallback(void *inRefCon,
												AudioUnitRenderActionFlags *ioActionFlags,
												const AudioTimeStamp *inTimeStamp,
												UInt32 inBusNumber,
												UInt32 inNumberFrames,
												AudioBufferList *ioData);

@property (readwrite, strong, nonatomic) SPCircularBuffer *audioBuffer;

@end

static NSTimeInterval const kTargetBufferLength = 0.5;

@implementation SPCoreAudioController {

	AUGraph audioProcessingGraph;
	AudioUnit outputUnit;
	AudioUnit mixerUnit;
	AudioUnit inputConverterUnit;

	AUNode outputNode;
	AUNode inputConverterNode;
	AUNode mixerNode;

	UInt32 framesSinceLastTimeUpdate;

	NSMethodSignature *incrementTrackPositionMethodSignature;
	NSInvocation *incrementTrackPositionInvocation;
}

-(id)init {
	self = [super init];

	if (self) {
		self.volume = 1.0;
		self.audioOutputEnabled = NO; // Don't start audio playback until we're told.

		SEL incrementTrackPositionSelector = @selector(incrementTrackPositionWithFrameCount:);
		incrementTrackPositionMethodSignature = [SPCoreAudioController instanceMethodSignatureForSelector:incrementTrackPositionSelector];
		incrementTrackPositionInvocation = [NSInvocation invocationWithMethodSignature:incrementTrackPositionMethodSignature];
		[incrementTrackPositionInvocation setSelector:incrementTrackPositionSelector];
		[incrementTrackPositionInvocation setTarget:self];

		[self addObserver:self forKeyPath:@"volume" options:0 context:nil];
		[self addObserver:self forKeyPath:@"audioOutputEnabled" options:0 context:nil];
        [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(routeChange:) name:AVAudioSessionRouteChangeNotification object:nil];
        [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(servicesReset:) name:AVAudioSessionMediaServicesWereResetNotification object:nil];
	}
	return self;
}

-(void)dealloc {

	[self removeObserver:self forKeyPath:@"volume"];
	[self removeObserver:self forKeyPath:@"audioOutputEnabled"];

	[self clearAudioBuffers];
	self.audioOutputEnabled = NO;
	[self teardownCoreAudio];
}

-(void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context {

	if ([keyPath isEqualToString:@"volume"]) {
		[self applyVolumeToMixerAudioUnit:self.volume];

	} else if ([keyPath isEqualToString:@"audioOutputEnabled"]) {
		if (self.audioOutputEnabled)
			[self startAudioQueue];
		else
			[self stopAudioQueue];
	} else {
        [super observeValueForKeyPath:keyPath ofObject:object change:change context:context];
    }
}

@synthesize volume;
@synthesize audioOutputEnabled;
@synthesize audioBuffer;
@synthesize inputAudioDescription;
@synthesize delegate;

#pragma mark -
#pragma mark CocoaLS Audio Delivery

-(NSInteger)session:(id <SPSessionPlaybackProvider>)aSession shouldDeliverAudioFrames:(const void *)audioFrames ofCount:(NSInteger)frameCount streamDescription:(AudioStreamBasicDescription)audioDescription {

	if (frameCount == 0) {
		[self clearAudioBuffers];
		return 0; // Audio discontinuity!
	}

    if (audioProcessingGraph == NULL) {
        NSError *error = nil;
        if (![self setupCoreAudioWithInputFormat:audioDescription error:&error]) {
            NSLog(@"[%@ %@]: %@", NSStringFromClass([self class]), NSStringFromSelector(_cmd), error);
            return 0;
        }
    }

	AudioStreamBasicDescription currentAudioInputDescription = self.inputAudioDescription;

	if (audioDescription.mBitsPerChannel != currentAudioInputDescription.mBitsPerChannel ||
		audioDescription.mBytesPerFrame != currentAudioInputDescription.mBytesPerFrame ||
		audioDescription.mChannelsPerFrame != currentAudioInputDescription.mChannelsPerFrame ||
		audioDescription.mFormatFlags != currentAudioInputDescription.mFormatFlags ||
		audioDescription.mFormatID != currentAudioInputDescription.mFormatID ||
		audioDescription.mSampleRate != currentAudioInputDescription.mSampleRate) {
		// New format. Panic!! I mean, calmly tell Core Audio that a new audio format is incoming.
		[self clearAudioBuffers];
		[self applyAudioStreamDescriptionToInputUnit:audioDescription];
	}

	NSUInteger bytesToAdd = frameCount * audioDescription.mBytesPerPacket;
	NSUInteger bytesAdded = [self.audioBuffer attemptAppendData:audioFrames
													   ofLength:bytesToAdd
													  chunkSize:audioDescription.mBytesPerPacket];

	NSUInteger framesAdded = bytesAdded / audioDescription.mBytesPerPacket;
	return framesAdded;
}

#pragma mark -
#pragma mark Audio Unit Properties

-(void)applyVolumeToMixerAudioUnit:(double)vol {

    if (audioProcessingGraph == NULL || mixerUnit == NULL)
        return;

	OSErr status = AudioUnitSetParameter(mixerUnit,
										 kMultiChannelMixerParam_Volume,
										 kAudioUnitScope_Output,
										 0,
										 vol,
										 0);

	if (status != noErr) {
		NSError *error;
        fillWithError(&error, @"Couldn't set input format", status);
		NSLog(@"[%@ %@]: %@", NSStringFromClass([self class]), NSStringFromSelector(_cmd), error);
    }
}

-(void)applyAudioStreamDescriptionToInputUnit:(AudioStreamBasicDescription)newInputDescription {

	if (audioProcessingGraph == NULL || inputConverterUnit == NULL)
		return;

	OSStatus status = AudioUnitSetProperty(inputConverterUnit,
								  kAudioUnitProperty_StreamFormat,
								  kAudioUnitScope_Input,
								  0,
								  &newInputDescription,
								  sizeof(newInputDescription));
	if (status != noErr) {
		NSError *error;
        fillWithError(&error, @"Couldn't set input format", status);
		NSLog(@"[%@ %@]: %@", NSStringFromClass([self class]), NSStringFromSelector(_cmd), error);
    } else {
		self.inputAudioDescription = newInputDescription;
		[self clearAudioBuffers];
		self.audioBuffer = [[SPCircularBuffer alloc] initWithMaximumLength:(newInputDescription.mBytesPerFrame * newInputDescription.mSampleRate) * kTargetBufferLength];
	}
}

#pragma mark -
#pragma mark Queue Control

-(void)startAudioQueue {
    if (audioProcessingGraph == NULL)
        return;

	Boolean isRunning = NO;
	AUGraphIsRunning(audioProcessingGraph, &isRunning);
	if (isRunning)
		return;

    AUGraphStart(audioProcessingGraph);
	if (outputUnit != NULL)
		AudioOutputUnitStart(outputUnit);
}

-(void)stopAudioQueue {
    if (audioProcessingGraph == NULL)
        return;

	Boolean isRunning = NO;
	AUGraphIsRunning(audioProcessingGraph, &isRunning);

	if (!isRunning)
		return;

	AUGraphStop(audioProcessingGraph);
}

-(void)clearAudioBuffers {
	[self.audioBuffer clear];
}

#pragma mark -
#pragma mark Setup and Teardown

-(void)teardownCoreAudio {
    if (audioProcessingGraph == NULL)
        return;

    [self stopAudioQueue];
	[self disposeOfCustomNodesInGraph:audioProcessingGraph];

	AUGraphUninitialize(audioProcessingGraph);
	DisposeAUGraph(audioProcessingGraph);

#if TARGET_OS_IPHONE
	[[AVAudioSession sharedInstance] setActive:NO error:nil];
#endif

	audioProcessingGraph = NULL;
	outputUnit = NULL;
	mixerUnit = NULL;
	inputConverterUnit = NULL;
}

-(void)disposeOfCustomNodesInGraph:(AUGraph)graph {
	// Empty implementation — for subclasses to override.
}

-(BOOL)setupCoreAudioWithInputFormat:(AudioStreamBasicDescription)inputFormat error:(NSError **)err {
    //check if the user has disabled multiroute
    if ([[NSUserDefaults standardUserDefaults] boolForKey:@"multirouteDisabled"]){
        return [self setupCoreAudioWithInputFormat:inputFormat routeCategory:AVAudioSessionCategoryPlayback error:err];
    }
    else{
        return [self setupCoreAudioWithInputFormat:inputFormat routeCategory:AVAudioSessionCategoryMultiRoute error:err];
    }
}

-(BOOL)setupCoreAudioWithInputFormat:(AudioStreamBasicDescription)inputFormat routeCategory:(NSString*)category error:(NSError **)err {

    if (audioProcessingGraph != NULL)
        [self teardownCoreAudio];

#if TARGET_OS_IPHONE
	NSError *error = nil;
	BOOL success = YES;
	success &= [[AVAudioSession sharedInstance] setCategory:category error:&error];
	success &= [[AVAudioSession sharedInstance] setActive:YES error:&error];

	if (!success && err != NULL) {
		*err = error;
        NSLog(@"failed to create audio session with error %@", error);
		return NO;
	}
#endif

    // A description of the output device we're looking for.
    AudioComponentDescription outputDescription;
	outputDescription.componentType = kAudioUnitType_Output;
#if TARGET_OS_IPHONE
	outputDescription.componentSubType = kAudioUnitSubType_RemoteIO;
#else
    outputDescription.componentSubType = kAudioUnitSubType_DefaultOutput;
#endif
    outputDescription.componentManufacturer = kAudioUnitManufacturer_Apple;
    outputDescription.componentFlags = 0;
    outputDescription.componentFlagsMask = 0;

	// A description of the mixer unit
	AudioComponentDescription mixerDescription;
	mixerDescription.componentType = kAudioUnitType_Mixer;
	mixerDescription.componentSubType = kAudioUnitSubType_MultiChannelMixer;
	mixerDescription.componentManufacturer = kAudioUnitManufacturer_Apple;
	mixerDescription.componentFlags = 0;
	mixerDescription.componentFlagsMask = 0;

	// A description for the libspotify -> standard PCM device
	AudioComponentDescription converterDescription;
	converterDescription.componentType = kAudioUnitType_FormatConverter;
	converterDescription.componentSubType = kAudioUnitSubType_AUConverter;
	converterDescription.componentManufacturer = kAudioUnitManufacturer_Apple;
	converterDescription.componentFlags = 0;
	converterDescription.componentFlagsMask = 0;

	// Create an AUGraph
	OSErr status = NewAUGraph(&audioProcessingGraph);
	if (status != noErr) {
        fillWithError(err, @"Couldn't init graph", status);
        return NO;
    }

	// Open the graph. AudioUnits are open but not initialized (no resource allocation occurs here)
	AUGraphOpen(audioProcessingGraph);
	if (status != noErr) {
        fillWithError(err, @"Couldn't open graph", status);
        return NO;
    }

	// Add audio output...
	status = AUGraphAddNode(audioProcessingGraph, &outputDescription, &outputNode);
	if (status != noErr) {
        fillWithError(err, @"Couldn't add output node", status);
        return NO;
    }

	// Get output unit
	status = AUGraphNodeInfo(audioProcessingGraph, outputNode, NULL, &outputUnit);
	if (status != noErr) {
        fillWithError(err, @"Couldn't get output unit", status);
        return NO;
    }

	// Add mixer
	status = AUGraphAddNode(audioProcessingGraph, &mixerDescription, &mixerNode);
	if (status != noErr) {
        fillWithError(err, @"Couldn't add mixer node", status);
        return NO;
    }

	// Get mixer unit so we can change volume etc
	status = AUGraphNodeInfo(audioProcessingGraph, mixerNode, NULL, &mixerUnit);
	if (status != noErr) {
        fillWithError(err, @"Couldn't get mixer unit", status);
        return NO;
    }

	// Set mixer bus count
	UInt32 busCount = 1;
	status = AudioUnitSetProperty(mixerUnit, kAudioUnitProperty_ElementCount, kAudioUnitScope_Input, 0, &busCount, sizeof(busCount));
	if (status != noErr) {
        fillWithError(err, @"Couldn't set mixer bus count", status);
        return NO;
    }

	// Set mixer input volume
	status = AudioUnitSetParameter(mixerUnit, kMultiChannelMixerParam_Volume, kAudioUnitScope_Input, 0, 1.0, 0);
	if (status != noErr) {
        fillWithError(err, @"Couldn't set mixer volume", status);
        return NO;
    }

	// Create PCM converter
	status = AUGraphAddNode(audioProcessingGraph, &converterDescription, &inputConverterNode);
	if (status != noErr) {
        fillWithError(err, @"Couldn't add converter node", status);
        return NO;
    }

	status = AUGraphNodeInfo(audioProcessingGraph, inputConverterNode, NULL, &inputConverterUnit);
	if (status != noErr) {
        fillWithError(err, @"Couldn't get input unit", status);
        return NO;
    }

	// Connect mixer to output
	status = AUGraphConnectNodeInput(audioProcessingGraph, mixerNode, 0, outputNode, 0);
	if (status != noErr) {
        fillWithError(err, @"Couldn't connect mixer to output", status);
        return NO;
    }

	if (![self connectOutputBus:0 ofNode:inputConverterNode toInputBus:0 ofNode:mixerNode inGraph:audioProcessingGraph error:err])
		return NO;

	// Set render callback
	AURenderCallbackStruct rcbs;
	rcbs.inputProc = AudioUnitRenderDelegateCallback;
	rcbs.inputProcRefCon = (__bridge void *)(self);

	status = AUGraphSetNodeInputCallback(audioProcessingGraph, inputConverterNode, 0, &rcbs);
	if (status != noErr) {
        fillWithError(err, @"Couldn't add render callback", status);
        return NO;
    }

	// Finally, set the kAudioUnitProperty_MaximumFramesPerSlice of each unit
	// to 4096, to allow playback on iOS when the screen is locked.
	// Code based on http://developer.apple.com/library/ios/#qa/qa1606/_index.html

	UInt32 maxFramesPerSlice = 4096;
	status = AudioUnitSetProperty(inputConverterUnit, kAudioUnitProperty_MaximumFramesPerSlice, kAudioUnitScope_Global, 0, &maxFramesPerSlice, sizeof(maxFramesPerSlice));
	if (status != noErr) {
		fillWithError(err, @"Couldn't set max frames per slice on input converter", status);
        return NO;
	}

	status = AudioUnitSetProperty(mixerUnit, kAudioUnitProperty_MaximumFramesPerSlice, kAudioUnitScope_Global, 0, &maxFramesPerSlice, sizeof(maxFramesPerSlice));
	if (status != noErr) {
		fillWithError(err, @"Couldn't set max frames per slice on mixer", status);
        return NO;
	}

	status = AudioUnitSetProperty(outputUnit, kAudioUnitProperty_MaximumFramesPerSlice, kAudioUnitScope_Global, 0, &maxFramesPerSlice, sizeof(maxFramesPerSlice));
	if (status != noErr) {
		fillWithError(err, @"Couldn't set max frames per slice on output", status);
        return NO;
	}

	// Init Queue
	status = AUGraphInitialize(audioProcessingGraph);
	if (status != noErr) {
		fillWithError(err, @"Couldn't initialize graph", status);
        return NO;
	}

	AUGraphUpdate(audioProcessingGraph, NULL);

	// Apply properties and let's get going!
    [self startAudioQueue];
	[self applyAudioStreamDescriptionToInputUnit:inputFormat];
    [self applyVolumeToMixerAudioUnit:self.volume];

    return YES;
}

-(BOOL)connectOutputBus:(UInt32)sourceOutputBusNumber ofNode:(AUNode)sourceNode toInputBus:(UInt32)destinationInputBusNumber ofNode:(AUNode)destinationNode inGraph:(AUGraph)graph error:(NSError **)error {

	// Connect converter to mixer
	OSStatus status = AUGraphConnectNodeInput(graph, sourceNode, sourceOutputBusNumber, destinationNode, destinationInputBusNumber);
	if (status != noErr) {
		fillWithError(error, @"Couldn't connect converter to mixer", status);
		return NO;
    }

	return YES;
}

static void fillWithError(NSError **mayBeAnError, NSString *localizedDescription, int code) {
    if (mayBeAnError == NULL)
        return;

    *mayBeAnError = [NSError errorWithDomain:@"com.CocoaLibSpotify.SPCoreAudioController"
                                        code:code
                                    userInfo:localizedDescription ? [NSDictionary dictionaryWithObject:localizedDescription
                                                                                forKey:NSLocalizedDescriptionKey]
                                            : nil];

}

static OSStatus AudioUnitRenderDelegateCallback(void *inRefCon,
												AudioUnitRenderActionFlags *ioActionFlags,
												const AudioTimeStamp *inTimeStamp,
												UInt32 inBusNumber,
												UInt32 inNumberFrames,
												AudioBufferList *ioData) {

    SPCoreAudioController *self = (__bridge SPCoreAudioController *)inRefCon;

	AudioBuffer *buffer = &(ioData->mBuffers[0]);
	UInt32 bytesRequired = buffer->mDataByteSize;

	NSUInteger availableData = [self.audioBuffer length];
	if (availableData < bytesRequired) {
		buffer->mDataByteSize = 0;
		*ioActionFlags |= kAudioUnitRenderAction_OutputIsSilence;
		return noErr;
    }

    buffer->mDataByteSize = (UInt32)[self.audioBuffer readDataOfLength:bytesRequired intoAllocatedBuffer:&buffer->mData];

	self->framesSinceLastTimeUpdate += inNumberFrames;

	if (self->framesSinceLastTimeUpdate >= 8820) {
        // Update 5 times per second

		@autoreleasepool {

			[self->incrementTrackPositionInvocation setArgument:&self->framesSinceLastTimeUpdate atIndex:2];
			[self->incrementTrackPositionInvocation performSelectorOnMainThread:@selector(invoke)
																	 withObject:nil
																  waitUntilDone:NO];
			self->framesSinceLastTimeUpdate = 0;

		}
	}

    return noErr;
}

-(void)incrementTrackPositionWithFrameCount:(UInt32)framesToAppend {
	[self.delegate coreAudioController:self didOutputAudioOfDuration:framesToAppend/self.inputAudioDescription.mSampleRate];
}

- (void)servicesReset:(NSNotification*)notification {
    //media server crashed, saw this with an LG tv that would not recognize 2 devices for multiroute
    //just switch the session back to playback from multiroute
   [self setupCoreAudioWithInputFormat:self.inputAudioDescription routeCategory:AVAudioSessionCategoryPlayback error:nil];
}

- (void)routeChange:(NSNotification*)notification {

    NSDictionary *interuptionDict = notification.userInfo;

    NSInteger routeChangeReason = [[interuptionDict valueForKey:AVAudioSessionRouteChangeReasonKey] integerValue];
    switch (routeChangeReason) {
        case AVAudioSessionRouteChangeReasonUnknown:
            //NSLog(@"routeChangeReason : AVAudioSessionRouteChangeReasonUnknown");
            break;

        case AVAudioSessionRouteChangeReasonNewDeviceAvailable:
            // a headset was added or removed
            // we should check to see if hdmi and headphones are present, and use multiroute if so
            //NSLog(@"routeChangeReason : AVAudioSessionRouteChangeReasonNewDeviceAvailable");
            break;

        case AVAudioSessionRouteChangeReasonOldDeviceUnavailable:
            // a headset was added or removed
            //NSLog(@"routeChangeReason : AVAudioSessionRouteChangeReasonOldDeviceUnavailable");
            break;

        case AVAudioSessionRouteChangeReasonCategoryChange:
            // called at start - also when other audio wants to play
            //NSLog(@"routeChangeReason : AVAudioSessionRouteChangeReasonCategoryChange");//AVAudioSessionRouteChangeReasonCategoryChange
            break;

        case AVAudioSessionRouteChangeReasonOverride:
            //NSLog(@"routeChangeReason : AVAudioSessionRouteChangeReasonOverride");
            break;

        case AVAudioSessionRouteChangeReasonWakeFromSleep:
           //NSLog(@"routeChangeReason : AVAudioSessionRouteChangeReasonWakeFromSleep");
            break;

        case AVAudioSessionRouteChangeReasonNoSuitableRouteForCategory:
            //NSLog(@"routeChangeReason : AVAudioSessionRouteChangeReasonNoSuitableRouteForCategory");
            break;

        default:
            break;
    }
}

@end


text:
/* eslint-disable */

'use strict';

/*::
import type { Fragment, ReaderFragment } from 'relay-runtime';
import type { FragmentType } from "relay-runtime";
declare export opaque type AstrologicalSignSelfResolver$fragmentType: FragmentType;
export type AstrologicalSignSelfResolver$data = {|
  +id: string,
  +$fragmentType: AstrologicalSignSelfResolver$fragmentType,
|};
export type AstrologicalSignSelfResolver$key = {
  +$data?: AstrologicalSignSelfResolver$data,
  +$fragmentSpreads: AstrologicalSignSelfResolver$fragmentType,
  ...
};
*/

var node/*: ReaderFragment*/ = {
  "argumentDefinitions": [],
  "kind": "Fragment",
  "metadata": null,
  "name": "AstrologicalSignSelfResolver",
  "selections": [
    {
      "kind": "ClientExtension",
      "selections": [
        {
          "kind": "RequiredField",
          "field": {
            "alias": null,
            "args": null,
            "kind": "ScalarField",
            "name": "id",
            "storageKey": null
          },
          "action": "THROW",
          "path": "id"
        }
      ]
    }
  ],
  "type": "AstrologicalSign",
  "abstractKey": null
};

if (__DEV__) {
  (node/*: any*/).hash = "74a38e68f3b424a003615942ca82e107";
}

module.exports = ((node/*: any*/)/*: Fragment<
  AstrologicalSignSelfResolver$fragmentType,
  AstrologicalSignSelfResolver$data,
>*/);


text:
<?php
// No direct access to this file
defined('_JEXEC') or die('Restricted access');

// import Joomla modelitem library
jimport('joomla.application.component.modelitem');
jimport('joomla.factory');
jimport('joomla.utilities.xmlelement');

/**
 * Inventory Model
 */
class InventoryModeldetails extends JModelItem {
	/**
	* @var obj item
	*/
    protected $item;

	public function getInventoryItem(){
        $inventoryModel = JModelLegacy::getInstance( 'inventory', 'InventoryModel' );
        $inventory = $inventoryModel->getFullInventory();
        $itemId = JFactory::getApplication()->input->get('itemId', '', 'filter');
        foreach ($inventory as $item) {
        	if(strcasecmp($itemId, $item->numb) == 0){
        		$this->item = $item;
        		break;
        	}
        }
        return $this->item;
	}
}


text:
"""
Django settings for traveler_pal project.

Generated by 'django-admin startproject' using Django 1.8.4.

For more information on this file, see
https://docs.djangoproject.com/en/1.8/topics/settings/

For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.8/ref/settings/
"""

# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
import os

ON_MYSQL = False

if os.environ['COMPUTERNAME'] == 'RCCODER-PC':
    ON_MYSQL = True

BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))

# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/1.8/howto/deployment/checklist/

# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = '$*vas1a_vxje-=lh4pp!ll)qzu*1_j)d3+#-2q(ssbr&bpp=cq'

# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True

ALLOWED_HOSTS = []

# Application definition

INSTALLED_APPS = (
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    'app',
    'DjangoUeditor',
    'duoshuo',
)

MIDDLEWARE_CLASSES = (
    'django.contrib.sessions.middleware.SessionMiddleware',
    'django.middleware.common.CommonMiddleware',
    'django.middleware.csrf.CsrfViewMiddleware',
    'django.contrib.auth.middleware.AuthenticationMiddleware',
    'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
    'django.contrib.messages.middleware.MessageMiddleware',
    'django.middleware.clickjacking.XFrameOptionsMiddleware',
    'django.middleware.security.SecurityMiddleware',
)

ROOT_URLCONF = 'traveler_pal.urls'

TEMPLATES = [
    {
        'BACKEND': 'django.template.backends.django.DjangoTemplates',
        'DIRS': [os.path.join(BASE_DIR, 'templates')],
        'APP_DIRS': True,
        'OPTIONS': {
            'context_processors': [
                'django.template.context_processors.debug',
                'django.template.context_processors.request',
                'django.contrib.auth.context_processors.auth',
                'django.contrib.messages.context_processors.messages',
            ],
        },
    },
]

WSGI_APPLICATION = 'traveler_pal.wsgi.application'

# SMTP setting
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
EMAIL_HOST = 'smtp.qq.com'                   #SMTP地址
EMAIL_PORT = 587                                 #SMTP端口
EMAIL_HOST_USER = 'ysbinang@qq.com'           #自己的邮箱名
EMAIL_HOST_PASSWORD = '***********'           #自己的邮箱密码(测试的时候改成自己能够使用的或者申请一个公用的邮箱)
EMAIL_SUBJECT_PREFIX = 'Traveler_Pal'            #为邮件Subject-line前缀,默认是'[django]'
EMAIL_USE_TLS = True                             #与SMTP服务器通信时,是否启动TLS链接(安全链接)。默认是false

# duoshuo setting
DUOSHUO_SECRET = '530990f912b04020f8fe5bdb58959a5c'

DUOSHUO_SHORT_NAME = 'traveler-pal'
# Database
# https://docs.djangoproject.com/en/1.8/ref/settings/#databases

if ON_MYSQL:
    DATABASES = {
        'default': {
             'ENGINE': 'django.db.backends.mysql',
             'NAME': 'traveler_pal',
             'USER': 'root',
             'PASSWORD': '',
             'HOST': 'localhost',
             'PORT': '3306',
        }
    }
else:
    DATABASES = {
        'default': {
            'ENGINE': 'django.db.backends.sqlite3',
            'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
        }
    }

# Internationalization
# https://docs.djangoproject.com/en/1.8/topics/i18n/

LANGUAGE_CODE = 'zh-hans'

TIME_ZONE = 'Asia/Shanghai'

USE_I18N = True

USE_L10N = True

USE_TZ = True

# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/1.8/howto/static-files/

STATIC_URL = '/static/'

STATIC_ROOT = os.path.join(BASE_DIR, 'static').replace('\\', '/')

MEDIA_URL = '/media/'

MEDIA_ROOT = os.path.join(BASE_DIR, 'media').replace('\\', '/')


text:
package sse.ngts.ezexpress.app.heart;

import org.apache.log4j.Logger;
import org.apache.mina.core.session.IoSession;
import org.apache.mina.filter.keepalive.KeepAliveMessageFactory;

import sse.ngts.common.plugin.step.Message;
import sse.ngts.common.plugin.step.STEPParser;
import sse.ngts.common.plugin.step.business.Heartbeat;
import sse.ngts.ezexpress.app.config.ParserConfig;
import sse.ngts.ezexpress.util.StepMessage;

/**
 * ÐÄÌøʵÏÖÀà
 */
public class KeepAliveMessageFactoryImpl implements KeepAliveMessageFactory {
	private static Logger log = Logger.getLogger(KeepAliveMessageFactoryImpl.class);

	/**
	 * ÇëÇóÔ¤ÉèÐÅÏ¢ ·µ»ØÔ¤ÉèÓï¾ä
	 */
	@Override
	public Object getRequest(IoSession session) {
		log.info("·¢ËÍÐÄÌøÏûÏ¢:");
		STEPParser app = ParserConfig.getInstance().getStep();
		Message heartbeat = StepMessage.getSocketHeartbeatMessage(app);
		return heartbeat;
	}

	/**
	 * ÏìÓ¦Ô¤ÉèÐÅÏ¢ ·µ»ØÔ¤ÉèÓï¾ä
	 */
	@Override
	public Object getResponse(IoSession session, Object message) {
		return message;
	}

	/**
	 * ÊÇ·ñÏìÓ¦ÐÄÌø°ü
	 */
	@Override
	public boolean isRequest(IoSession session, Object message) {
		return false;
	}

	/**
	 * ÊÇ·ñ»ØÓ¦ÐÄÌø°ü
	 */
	@Override
	public boolean isResponse(IoSession session, Object message) {
		if (message instanceof Heartbeat) {
			return true;
		}
		return false;
	}
}


text:
package com.tradeaway.model;

import javax.persistence.*;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.util.Date;
import java.util.Set;

@Entity
public class Item {

    @Id
    @GeneratedValue(strategy= GenerationType.AUTO)
    private long id;
    @NotNull
    private String name;
    @NotNull
    private Category category;
    private String imgUrl;
    @NotNull
    private String shortDesc;

    //@OneToMany(cascade = CascadeType.ALL, orphanRemoval = true)
    //@JoinColumn(name="item_id")
    //private Set<Inventory> inventories;

    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Category getCategory() {
        return category;
    }

    public void setCategory(Category category) {
        this.category = category;
    }

    public String getImgUrl() {
        return imgUrl;
    }

    public void setImgUrl(String imgUrl) {
        this.imgUrl = imgUrl;
    }

    public String getShortDesc() {
        return shortDesc;
    }

    public void setShortDesc(String shortDesc) {
        this.shortDesc = shortDesc;
    }

    //public Set<Inventory> getInventories()
    //{
    //    return this.inventories;
    //}

    //public void setInventories(Set<Inventory> inventories)
    //{
    //    this.inventories = inventories;
    //}
}


text:
This directory contains several examples of Bokeh usage.

plotting
========

This directory contains example using the high level plotting interface, and is the interface most users should want to start with.
There are three subdirectories illustrating output in three different modes:

* file - output static HTML file
* notebook - output inline in IPython notebooks
* server - out put using the Bokeh server

Note that the server examples require the Bokeh server to be running (execute 'bokeh-server')

glyphs
======

This directory contains lower level or more advanced examples that mirror the bokehjs browser library interface.
These exmaples are also still in the process of being improved and cleaned up.

Notes
=====

* Windows has received the least amount of attention and support for Windows is being improved for the next 0.2 release.

* All tools must be selected in the toolbar before they are active. Some common tools:
 - zoom: this is a scroll wheel zoom
 - pan: left click drag to pan
 - resize left click drag to resize


text:
struct _cef_browser_host_t* CEF_CALLBACK browser_get_host(
    struct _cef_browser_t* self) {
  // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING

  DCHECK(self);
  if (!self)
    return NULL;

  // Execute
  CefRefPtr<CefBrowserHost> _retval = CefBrowserCppToC::Get(self)->GetHost();

  // Return type: refptr_same
  return CefBrowserHostCppToC::Wrap(_retval);
}

int CEF_CALLBACK browser_can_go_back(struct _cef_browser_t* self) {
  // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING

  DCHECK(self);
  if (!self)
    return 0;

  // Execute
  bool _retval = CefBrowserCppToC::Get(self)->CanGoBack();

  // Return type: bool
  return _retval;
}

void CEF_CALLBACK browser_go_back(struct _cef_browser_t* self) {
  // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING

  DCHECK(self);
  if (!self)
    return;

  // Execute
  CefBrowserCppToC::Get(self)->GoBack();
}

int CEF_CALLBACK browser_can_go_forward(struct _cef_browser_t* self) {
  // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING

  DCHECK(self);
  if (!self)
    return 0;

  // Execute
  bool _retval = CefBrowserCppToC::Get(self)->CanGoForward();

  // Return type: bool
  return _retval;
}

void CEF_CALLBACK browser_go_forward(struct _cef_browser_t* self) {
  // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING

  DCHECK(self);
  if (!self)
    return;

  // Execute
  CefBrowserCppToC::Get(self)->GoForward();
}

int CEF_CALLBACK browser_is_loading(struct _cef_browser_t* self) {
  // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING

  DCHECK(self);
  if (!self)
    return 0;

  // Execute
  bool _retval = CefBrowserCppToC::Get(self)->IsLoading();

  // Return type: bool
  return _retval;
}

void CEF_CALLBACK browser_reload(struct _cef_browser_t* self) {
  // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING

  DCHECK(self);
  if (!self)
    return;

  // Execute
  CefBrowserCppToC::Get(self)->Reload();
}

void CEF_CALLBACK browser_reload_ignore_cache(struct _cef_browser_t* self) {
  // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING

  DCHECK(self);
  if (!self)
    return;

  // Execute
  CefBrowserCppToC::Get(self)->ReloadIgnoreCache();
}

void CEF_CALLBACK browser_stop_load(struct _cef_browser_t* self) {
  // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING

  DCHECK(self);
  if (!self)
    return;

  // Execute
  CefBrowserCppToC::Get(self)->StopLoad();
}

int CEF_CALLBACK browser_get_identifier(struct _cef_browser_t* self) {
  // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING

  DCHECK(self);
  if (!self)
    return 0;

  // Execute
  int _retval = CefBrowserCppToC::Get(self)->GetIdentifier();

  // Return type: simple
  return _retval;
}

int CEF_CALLBACK browser_is_same(struct _cef_browser_t* self,
    struct _cef_browser_t* that) {
  // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING

  DCHECK(self);
  if (!self)
    return 0;
  // Verify param: that; type: refptr_same
  DCHECK(that);
  if (!that)
    return 0;

  // Execute
  bool _retval = CefBrowserCppToC::Get(self)->IsSame(
      CefBrowserCppToC::Unwrap(that));

  // Return type: bool
  return _retval;
}

int CEF_CALLBACK browser_is_popup(struct _cef_browser_t* self) {
  // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING

  DCHECK(self);
  if (!self)
    return 0;

  // Execute
  bool _retval = CefBrowserCppToC::Get(self)->IsPopup();

  // Return type: bool
  return _retval;
}

int CEF_CALLBACK browser_has_document(struct _cef_browser_t* self) {
  // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING

  DCHECK(self);
  if (!self)
    return 0;

  // Execute
  bool _retval = CefBrowserCppToC::Get(self)->HasDocument();

  // Return type: bool
  return _retval;
}

struct _cef_frame_t* CEF_CALLBACK browser_get_main_frame(
    struct _cef_browser_t* self) {
  // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING

  DCHECK(self);
  if (!self)
    return NULL;

  // Execute
  CefRefPtr<CefFrame> _retval = CefBrowserCppToC::Get(self)->GetMainFrame();

  // Return type: refptr_same
  return CefFrameCppToC::Wrap(_retval);
}

struct _cef_frame_t* CEF_CALLBACK browser_get_focused_frame(
    struct _cef_browser_t* self) {
  // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING

  DCHECK(self);
  if (!self)
    return NULL;

  // Execute
  CefRefPtr<CefFrame> _retval = CefBrowserCppToC::Get(self)->GetFocusedFrame();

  // Return type: refptr_same
  return CefFrameCppToC::Wrap(_retval);
}

struct _cef_frame_t* CEF_CALLBACK browser_get_frame_byident(
    struct _cef_browser_t* self, int64 identifier) {
  // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING

  DCHECK(self);
  if (!self)
    return NULL;

  // Execute
  CefRefPtr<CefFrame> _retval = CefBrowserCppToC::Get(self)->GetFrame(
      identifier);

  // Return type: refptr_same
  return CefFrameCppToC::Wrap(_retval);
}

struct _cef_frame_t* CEF_CALLBACK browser_get_frame(struct _cef_browser_t* self,
    const cef_string_t* name) {
  // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING

  DCHECK(self);
  if (!self)
    return NULL;
  // Unverified params: name

  // Execute
  CefRefPtr<CefFrame> _retval = CefBrowserCppToC::Get(self)->GetFrame(
      CefString(name));

  // Return type: refptr_same
  return CefFrameCppToC::Wrap(_retval);
}

size_t CEF_CALLBACK browser_get_frame_count(struct _cef_browser_t* self) {
  // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING

  DCHECK(self);
  if (!self)
    return 0;

  // Execute
  size_t _retval = CefBrowserCppToC::Get(self)->GetFrameCount();

  // Return type: simple
  return _retval;
}

void CEF_CALLBACK browser_get_frame_identifiers(struct _cef_browser_t* self,
    size_t* identifiersCount, int64* identifiers) {
  // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING

  DCHECK(self);
  if (!self)
    return;
  // Verify param: identifiers; type: simple_vec_byref
  DCHECK(identifiersCount && (*identifiersCount == 0 || identifiers));
  if (!identifiersCount || (*identifiersCount > 0 && !identifiers))
    return;

  // Translate param: identifiers; type: simple_vec_byref
  std::vector<int64 > identifiersList;
  if (identifiersCount && *identifiersCount > 0 && identifiers) {
    for (size_t i = 0; i < *identifiersCount; ++i) {
      identifiersList.push_back(identifiers[i]);
    }
  }

  // Execute
  CefBrowserCppToC::Get(self)->GetFrameIdentifiers(
      identifiersList);

  // Restore param: identifiers; type: simple_vec_byref
  if (identifiersCount && identifiers) {
    *identifiersCount = std::min(identifiersList.size(), *identifiersCount);
    if (*identifiersCount > 0) {
      for (size_t i = 0; i < *identifiersCount; ++i) {
        identifiers[i] = identifiersList[i];
      }
    }
  }
}

void CEF_CALLBACK browser_get_frame_names(struct _cef_browser_t* self,
    cef_string_list_t names) {
  // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING

  DCHECK(self);
  if (!self)
    return;
  // Verify param: names; type: string_vec_byref
  DCHECK(names);
  if (!names)
    return;

  // Translate param: names; type: string_vec_byref
  std::vector<CefString> namesList;
  transfer_string_list_contents(names, namesList);

  // Execute
  CefBrowserCppToC::Get(self)->GetFrameNames(
      namesList);

  // Restore param: names; type: string_vec_byref
  cef_string_list_clear(names);
  transfer_string_list_contents(namesList, names);
}

int CEF_CALLBACK browser_send_process_message(struct _cef_browser_t* self,
    cef_process_id_t target_process, struct _cef_process_message_t* message) {
  // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING

  DCHECK(self);
  if (!self)
    return 0;
  // Verify param: message; type: refptr_same
  DCHECK(message);
  if (!message)
    return 0;

  // Execute
  bool _retval = CefBrowserCppToC::Get(self)->SendProcessMessage(
      target_process,
      CefProcessMessageCppToC::Unwrap(message));

  // Return type: bool
  return _retval;
}

// CONSTRUCTOR - Do not edit by hand.

CefBrowserCppToC::CefBrowserCppToC(CefBrowser* cls)
    : CefCppToC<CefBrowserCppToC, CefBrowser, cef_browser_t>(cls) {
  struct_.struct_.get_host = browser_get_host;
  struct_.struct_.can_go_back = browser_can_go_back;
  struct_.struct_.go_back = browser_go_back;
  struct_.struct_.can_go_forward = browser_can_go_forward;
  struct_.struct_.go_forward = browser_go_forward;
  struct_.struct_.is_loading = browser_is_loading;
  struct_.struct_.reload = browser_reload;
  struct_.struct_.reload_ignore_cache = browser_reload_ignore_cache;
  struct_.struct_.stop_load = browser_stop_load;
  struct_.struct_.get_identifier = browser_get_identifier;
  struct_.struct_.is_same = browser_is_same;
  struct_.struct_.is_popup = browser_is_popup;
  struct_.struct_.has_document = browser_has_document;
  struct_.struct_.get_main_frame = browser_get_main_frame;
  struct_.struct_.get_focused_frame = browser_get_focused_frame;
  struct_.struct_.get_frame_byident = browser_get_frame_byident;
  struct_.struct_.get_frame = browser_get_frame;
  struct_.struct_.get_frame_count = browser_get_frame_count;
  struct_.struct_.get_frame_identifiers = browser_get_frame_identifiers;
  struct_.struct_.get_frame_names = browser_get_frame_names;
  struct_.struct_.send_process_message = browser_send_process_message;
}

#ifndef NDEBUG
template<> base::AtomicRefCount CefCppToC<CefBrowserCppToC, CefBrowser,
    cef_browser_t>::DebugObjCt = 0;
#endif


text:
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Circle extends CI_Controller {

	function __construct()  {
		parent::__construct();
		$this->load->model('circle_model');
		$this->load->helper('date');
		// $this->db_fields = $this->circle_model->get_fields();
	}

	public function index()
	{
		echo anchor(site_url('circle/get_circle_list')).'
';
		echo anchor(site_url('circle/get_circle_info/1')).'
';
		echo anchor(site_url('circle/get_circle_comments/1')).'
';
		echo anchor(site_url('circle/get_circle_images/1')).'
';
	}

	/**
	 * Get circles list information
	 * @author fanz <2513273451@qq.com>
	 * @param GET 	int 	offset
	 * @param GET 	int 	limit
	 * @param GET 	string 	order
	 * @param GET 	boolean	desc
	 * @return NULL
	 * @access public
	 * @todo
	 */
	public function get_circle_list($offset = 0, $limit = 10, $order_by = "", $order = "desc")
	{
		$this->load->model('circle_model', 'circle');
		$res = $this->circle->get_circle_list($offset, $limit, $order_by, $order);

		// header($this->config->item("header_json_utf8"));
		echo json_encode($res);
	}

	/**
	 * Get a circle information
	 * @author fanz <2513273451@qq.com>
	 * @param GET 	int 	circle id
	 * @return NULL
	 * @access public
	 * @todo
	 */
	public function get_circle_info($circle_id = 0)
	{
		$this->load->model('circle_model', 'circle');
		$res = $this->circle->get_circle_info($circle_id);

		echo json_encode($res);
	}

	/**
	 * Get a circle information
	 * @author fanz <2513273451@qq.com>
	 * @param GET 	int 	circle id
	 * @return NULL
	 * @access public
	 * @todo
	 */
	function get_circle_images($circle_id = 0)
	{
		$this->load->model('circle_model');
		$res = $this->circle_image_model->get_circle_images($circle_id);
		echo json_encode($res);
	}

	/**
	 * Get a circle comments information
	 * @author fanz <2513273451@qq.com>
	 * @param GET 	int 	circle_id
	 * @param GET 	int 	offset
	 * @param GET 	int 	limit
	 * @param GET 	string 	order
	 * @param GET 	boolean	desc
	 * @return NULL
	 * @access public
	 * @todo
	 */
	public function get_circle_comments($circle_id = 0, $offset = 0, $limit = 10, $order_by = "", $order = "desc")
	{
		$this->load->model('circle_comment_model', 'comment');
		$res = $this->comment->get_circle_comments($circle_id, $offset, $limit, $order_by, $order);

		echo json_encode($res);
	}

}

/* End of file circle.php */
/* Location: ./application/controllers/circle.php */


text:
module Freightrain
  module Toolkit

    module DialogHelper

      def open_file_dialog(description = "Open file...")
        raise "not implemented"
      end

      def yes_no_dialog(description, title = "Warning!", secondary_text = "It will not be possible to recover the deleted item")
        raise "not implemented"
      end

    end

  end
end


text:
package com.prolificinteractive.parallaxpager;

import android.content.Context;
import android.support.v4.view.ViewPager;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.FrameLayout;
import java.util.ArrayList;
import java.util.List;

import static android.view.ViewGroup.LayoutParams.MATCH_PARENT;

@SuppressWarnings("UnusedDeclaration")
public class ParallaxContainer extends FrameLayout implements ViewPager.OnPageChangeListener {

  private List<View> parallaxViews = new ArrayList<>();
  private ViewPager viewPager;
  private int pageCount = 0;
  private int containerWidth;
  private boolean isLooping = false;
  private final ParallaxPagerAdapter adapter;
  private ViewPager.OnPageChangeListener pageChangeListener;

  public ParallaxContainer(Context context) {
    super(context);
    adapter = new ParallaxPagerAdapter(context);
  }

  public ParallaxContainer(Context context, AttributeSet attrs) {
    super(context, attrs);
    adapter = new ParallaxPagerAdapter(context);
  }

  public ParallaxContainer(Context context, AttributeSet attrs, int defStyle) {
    super(context, attrs, defStyle);
    adapter = new ParallaxPagerAdapter(context);
  }

  @Override protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
    super.onMeasure(widthMeasureSpec, heightMeasureSpec);
    containerWidth = getMeasuredWidth();
  }

  public void setLooping(boolean looping) {
    isLooping = looping;
    updateAdapterCount();
  }

  private void updateAdapterCount() {
    adapter.setCount(isLooping ? Integer.MAX_VALUE : pageCount);
  }

  public void setupChildren(int... childIds) {
    setupChildren(LayoutInflater.from(getContext()), childIds);
  }

  public void setupChildren(LayoutInflater inflater, int... childIds) {
    if (getChildCount() > 0) {
      throw new RuntimeException(
          "setupChildren should only be called once when ParallaxContainer is empty");
    }

    if (childIds.length == 1) {
      int id = childIds[0];
      childIds = new int[2];
      childIds[0] = id;
      childIds[1] = id;
    }

    for (int childId : childIds) {
      inflater.inflate(childId, this);
    }

    // hold pageCount because it will change after we add viewpager
    pageCount = getChildCount();
    for (int i = 0; i < pageCount; i++) {
      View view = getChildAt(i);
      addParallaxView(view, i);
    }

    updateAdapterCount();

    // make view pager with same attributes as container
    viewPager = new ViewPager(getContext());
    viewPager.setLayoutParams(new LayoutParams(MATCH_PARENT, MATCH_PARENT));
    viewPager.setId(R.id.parallax_pager);
    viewPager.setAdapter(adapter);
    attachOnPageChangeListener(viewPager, this);

    addView(viewPager, 0);
  }

  /**
   * Sets the {@link ViewPager.OnPageChangeListener} to the embedded {@link ViewPager}
   * created by the container.
   *
   * This method can be overridden to add an page indicator to the parallax view. If
   * this method is overriden, make sure that the listener methods are called on this
   * class as well.
   */
  protected void attachOnPageChangeListener(ViewPager viewPager,
      ViewPager.OnPageChangeListener listener) {
    viewPager.setOnPageChangeListener(listener);
  }

  // attach attributes in tag
  private void addParallaxView(View view, int pageIndex) {
    if (view instanceof ViewGroup) {
      // recurse children
      ViewGroup viewGroup = (ViewGroup) view;
      for (int i = 0, childCount = viewGroup.getChildCount(); i < childCount; i++) {
        addParallaxView(viewGroup.getChildAt(i), pageIndex);
      }
    }

    ParallaxViewTag tag = (ParallaxViewTag) view.getTag(R.id.parallax_view_tag);
    if (tag != null) {
      // only track view if it has a parallax tag
      tag.index = pageIndex;
      parallaxViews.add(view);
    }
  }

  @Override public void onPageScrolled(int pageIndex, float offset, int offsetPixels) {
    if (pageCount > 0) {
      pageIndex = pageIndex % pageCount;
    }

    ParallaxViewTag tag;
    for (View view : parallaxViews) {
      tag = (ParallaxViewTag) view.getTag(R.id.parallax_view_tag);
      if (tag == null) { continue; }

      if ((pageIndex == tag.index - 1
          || (isLooping && (pageIndex == tag.index - 1 + pageCount)))
          && containerWidth != 0) {
        // make visible
        view.setVisibility(VISIBLE);

        // slide in from right
        view.setTranslationX((containerWidth - offsetPixels) * tag.xIn);

        // slide in from top
        view.setTranslationY(0 - (containerWidth - offsetPixels) * tag.yIn);

        // fade in
        view.setAlpha(1.0f - (containerWidth - offsetPixels) * tag.alphaIn / containerWidth);
      } else if (pageIndex == tag.index) {
        // make visible
        view.setVisibility(VISIBLE);

        // slide out to left
        view.setTranslationX(0 - offsetPixels * tag.xOut);

        // slide out to top
        view.setTranslationY(0 - offsetPixels * tag.yOut);

        // fade out
        view.setAlpha(1.0f - offsetPixels * tag.alphaOut / containerWidth);
      } else {
        view.setVisibility(GONE);
      }
    }
  }

  @Override public void onPageSelected(int position) {}

  @Override public void onPageScrollStateChanged(int i) {}
}


text:
Overlay carrying contextual, non-interactive content.

## Features

## Usage

The content of a tooltip can be just text like in the basic example.
The arrow pointer is optional and can be placed on any side using
a corresponding modifier.

[basic example](/demo/example-basic.html)

The content can also be made up of other components.

[basic example](/demo/example-rich.html)

## Classes

- `vclTooltip`
- `vclTooltipContent`

- `vclArrowPointer`
- `vclArrowPointerBottom`
- `vclArrowPointerRight`
- `vclArrowPointerLeft`
- `vclArrowPointerTop`

## Modifiers

## Variables

- `--tooltip-color`
- `--tooltip-bg-color`
- `--tooltip-border-color`
- `--tooltip-shadow-color`

## Demo

[example.html](/demo/example.html) on GH-pages.


text:
import EnumFieldView from '../View/Field/Enum'
import Field from '../Field'

/**
 * Enum field
 */
export default class EnumField extends Field {
  /**
   * Constructor
   * @param {string} name Field name
   * @param {Object} spec Field spec
   * @param {mixed[]} spec.elements Possible enum values
   * @param {string[]} [spec.labels] Value labels
   * @param {string[]} [spec.descriptions] Value descriptions
   * @param {string} [spec.style="default"] Field appearance
   */
  constructor (name, spec) {
    super(name, spec)
    this._viewPrototype = EnumFieldView

    this._elements = []
    this._labels = []
    this._descriptions = []
    this._style = spec.style || 'default'

    this.setElements(
      spec.elements,
      spec.labels || null,
      spec.descriptions || null,
      false
    )
  }

  /**
   * Returns possible values.
   * @return {mixed[]} Possible values
   */
  getElements () {
    return this._elements
  }

  /**
   * Returns value labels.
   * @return {string[]} Value labels
   */
  getElementLabels () {
    return this._labels
  }

  /**
   * Returns value descriptions.
   * @return {string[]} Value descriptions
   */
  getElementDescriptions () {
    return this._descriptions
  }

  /**
   * Sets possible values and labels.
   * @param {string[]} elements
   * @param {string[]} [labels=elements]
   * @param {string[]} [descriptions]
   * @param {boolean} [revalidate=true] Wether to revalidate current value
   * @throws If given array of elements is empty.
   * @throws If element and label arrays have different lengths.
   * @return {EnumField} Fluent interface
   */
  setElements (
    elements, labels = null, descriptions = null, revalidate = true
  ) {
    if (elements.length === 0) {
      throw new Error(`Array of elements can't be empty.`)
    }

    if (labels !== null && elements.length !== labels.length) {
      throw new Error(`Element and label arrays require the same length.`)
    }

    if (descriptions !== null && elements.length !== descriptions.length) {
      throw new Error(`Element and description arrays require the same length.`)
    }

    this._elements = elements
    this._labels = labels !== null ? labels : elements
    this._descriptions =
      descriptions !== null
        ? descriptions
        : elements.map(() => null)

    // if no value is selected, select first element
    if (this._value === null) {
      this._value = this._elements[0]
    }

    // refresh view
    this.hasView() && this.getView().refresh()

    return revalidate ? this.revalidateValue() : this
  }

  /**
   * Returns element at given index.
   * @param {number} index Element index
   * @return {?EnumField}
   */
  getElementAt (index) {
    return index < this._elements.length
      ? this._elements[index]
      : null
  }

  /**
   * Returns the selected element index.
   * @return {number}
   */
  getSelectedIndex () {
    return this._elements.indexOf(this.getValue())
  }

  /**
   * Sets the selected element index.
   * Triggers {@link Field.setValue} internally.
   * @param {number} index Element index
   * @return {EnumField} Fluent interface
   */
  setSelectedIndex (index) {
    const value = this._elements[index]
    return this.setValue(value)
  }

  /**
   * Returns the field appearance.
   * @return {string}
   */
  getStyle () {
    return this._style
  }

  /**
   * Sets the field appearance.
   * @param {string} style
   * @return {EnumField} Fluent interface
   */
  setStyle (style) {
    this._style = style
    this.hasView() && this.getView().setStyle(style)
    return this
  }

  /**
   * Validates given raw value.
   * @param {mixed} rawValue Value to be validated
   * @return {boolean|object} True if valid, message object or false if invalid
   */
  validateValue (rawValue) {
    if (this._elements.indexOf(rawValue) === -1) {
      return {
        key: 'enumNotInHaystack',
        message: `The value must be occur in the list of elements`
      }
    }
    return super.validateValue(rawValue)
  }

  /**
   * Returns a randomly chosen value or null if not applicable.
   * @param {Random} random Random number generator
   * @return {mixed} Randomly chosen value
   */
  randomizeValue (random) {
    const value = super.randomizeValue(random)
    if (value !== null) {
      return value
    }
    return random.nextChoice(this._elements)
  }

  /**
   * Triggered when value has been changed inside the view.
   * @protected
   * @param {EnumFieldView} view
   * @param {mixed} value
   */
  viewValueDidChange (view, value) {
    this.setValue(value, view)
  }

  /**
   * Triggered when view has been created.
   * @protected
   * @param {View} view
   */
  didCreateView (view) {
    super.didCreateView(view)
    this.getView().setStyle(this.getStyle())
  }
}