text:
  #include <TargetConditionals.h>
#endif

ASMJIT_BEGIN_NAMESPACE

//! \addtogroup asmjit_core
//! \{

// ============================================================================
// [asmjit::Environment]
// ============================================================================

//! Represents an environment, which is usually related to a \ref Target.
//!
//! Environment has usually an 'arch-subarch-vendor-os-abi' format, which is
//! sometimes called "Triple" (historically it used to be 3 only parts) or
//! "Tuple", which is a convention used by Debian Linux.
//!
//! AsmJit doesn't support all possible combinations or architectures and ABIs,
//! however, it models the environment similarly to other compilers for future
//! extensibility.
class Environment {
public:
  //! Architecture type, see \ref Arch.
  uint8_t _arch;
  //! Sub-architecture type, see \ref SubArch.
  uint8_t _subArch;
  //! Vendor type, see \ref Vendor.
  uint8_t _vendor;
  //! Platform type, see \ref Platform.
  uint8_t _platform;
  //! ABI type, see \ref Abi.
  uint8_t _abi;
  //! Object format, see \ref Format.
  uint8_t _format;
  //! Reserved for future use, must be zero.
  uint16_t _reserved;

  //! Architecture.
  enum Arch : uint32_t {
    //! Unknown or uninitialized architecture.
    kArchUnknown = 0,

    //! Mask used by 32-bit architectures (odd are 32-bit, even are 64-bit).
    kArch32BitMask = 0x01,
    //! Mask used by big-endian architectures.
    kArchBigEndianMask = 0x80u,

    //! 32-bit X86 architecture.
    kArchX86 = 1,
    //! 64-bit X86 architecture also known as X86_64 and AMD64.
    kArchX64 = 2,

    //! 32-bit RISC-V architecture.
    kArchRISCV32 = 3,
    //! 64-bit RISC-V architecture.
    kArchRISCV64 = 4,

    //! 32-bit ARM architecture (little endian).
    kArchARM = 5,
    //! 32-bit ARM architecture (big endian).
    kArchARM_BE = kArchARM | kArchBigEndianMask,
    //! 64-bit ARM architecture in (little endian).
    kArchAArch64 = 6,
    //! 64-bit ARM architecture in (big endian).
    kArchAArch64_BE = kArchAArch64 | kArchBigEndianMask,
    //! 32-bit ARM in Thumb mode (little endian).
    kArchThumb = 7,
    //! 32-bit ARM in Thumb mode (big endian).
    kArchThumb_BE = kArchThumb | kArchBigEndianMask,

    // 8 is not used, even numbers are 64-bit architectures.

    //! 32-bit MIPS architecture in (little endian).
    kArchMIPS_LE = 9,
    //! 32-bit MIPS architecture in (big endian).
    kArchMIPS_BE = kArchMIPS_LE | kArchBigEndianMask,
    //! 64-bit MIPS architecture in (little endian).
    kArchMIPS64_LE = 10,
    //! 64-bit MIPS architecture in (big endian).
    kArchMIPS64_BE = kArchMIPS64_LE | kArchBigEndianMask,

    //! Count of architectures.
    kArchCount
  };

  //! Sub-architecture.
  enum SubArch : uint32_t {
    //! Unknown or uninitialized architecture sub-type.
    kSubArchUnknown = 0,

    //! Count of sub-architectures.
    kSubArchCount
  };

  //! Vendor.
  //!
  //! \note AsmJit doesn't use vendor information at the moment. It's provided
  //! for future use, if required.
  enum Vendor : uint32_t {
    //! Unknown or uninitialized vendor.
    kVendorUnknown = 0,

    //! Count of vendor identifiers.
    kVendorCount
  };

  //! Platform / OS.
  enum Platform : uint32_t {
    //! Unknown or uninitialized platform.
    kPlatformUnknown = 0,

    //! Windows OS.
    kPlatformWindows,

    //! Other platform, most likely POSIX based.
    kPlatformOther,

    //! Linux OS.
    kPlatformLinux,
    //! GNU/Hurd OS.
    kPlatformHurd,

    //! FreeBSD OS.
    kPlatformFreeBSD,
    //! OpenBSD OS.
    kPlatformOpenBSD,
    //! NetBSD OS.
    kPlatformNetBSD,
    //! DragonFly BSD OS.
    kPlatformDragonFlyBSD,

    //! Haiku OS.
    kPlatformHaiku,

    //! Apple OSX.
    kPlatformOSX,
    //! Apple iOS.
    kPlatformIOS,
    //! Apple TVOS.
    kPlatformTVOS,
    //! Apple WatchOS.
    kPlatformWatchOS,

    //! Emscripten platform.
    kPlatformEmscripten,

    //! Count of platform identifiers.
    kPlatformCount
  };

  //! ABI.
  enum Abi : uint32_t {
    //! Unknown or uninitialied environment.
    kAbiUnknown = 0,
    //! Microsoft ABI.
    kAbiMSVC,
    //! GNU ABI.
    kAbiGNU,
    //! Android Environment / ABI.
    kAbiAndroid,
    //! Cygwin ABI.
    kAbiCygwin,

    //! Count of known ABI types.
    kAbiCount
  };

  //! Object format.
  //!
  //! \note AsmJit doesn't really use anything except \ref kFormatUnknown and
  //! \ref kFormatJIT at the moment. Object file formats are provided for
  //! future extensibility and a possibility to generate object files at some
  //! point.
  enum Format : uint32_t {
    //! Unknown or uninitialized object format.
    kFormatUnknown = 0,

    //! JIT code generation object, most likely \ref JitRuntime or a custom
    //! \ref Target implementation.
    kFormatJIT,

    //! Executable and linkable format (ELF).
    kFormatELF,
    //! Common object file format.
    kFormatCOFF,
    //! Extended COFF object format.
    kFormatXCOFF,
    //! Mach object file format.
    kFormatMachO,

    //! Count of object format types.
    kFormatCount
  };

  //! \name Environment Detection
  //! \{

#ifdef _DOXYGEN
  //! Architecture detected at compile-time (architecture of the host).
  static constexpr Arch kArchHost = DETECTED_AT_COMPILE_TIME;
  //! Sub-architecture detected at compile-time (sub-architecture of the host).
  static constexpr SubArch kSubArchHost = DETECTED_AT_COMPILE_TIME;
  //! Vendor detected at compile-time (vendor of the host).
  static constexpr Vendor kVendorHost = DETECTED_AT_COMPILE_TIME;
  //! Platform detected at compile-time (platform of the host).
  static constexpr Platform kPlatformHost = DETECTED_AT_COMPILE_TIME;
  //! ABI detected at compile-time (ABI of the host).
  static constexpr Abi kAbiHost = DETECTED_AT_COMPILE_TIME;
#else
  static constexpr Arch kArchHost =
    ASMJIT_ARCH_X86 == 32 ? kArchX86 :
    ASMJIT_ARCH_X86 == 64 ? kArchX64 :

    ASMJIT_ARCH_ARM == 32 && ASMJIT_ARCH_LE ? kArchARM :
    ASMJIT_ARCH_ARM == 32 && ASMJIT_ARCH_BE ? kArchARM_BE :
    ASMJIT_ARCH_ARM == 64 && ASMJIT_ARCH_LE ? kArchAArch64 :
    ASMJIT_ARCH_ARM == 64 && ASMJIT_ARCH_BE ? kArchAArch64_BE :

    ASMJIT_ARCH_MIPS == 32 && ASMJIT_ARCH_LE ? kArchMIPS_LE :
    ASMJIT_ARCH_MIPS == 32 && ASMJIT_ARCH_BE ? kArchMIPS_BE :
    ASMJIT_ARCH_MIPS == 64 && ASMJIT_ARCH_LE ? kArchMIPS64_LE :
    ASMJIT_ARCH_MIPS == 64 && ASMJIT_ARCH_BE ? kArchMIPS64_BE :

    kArchUnknown;

  static constexpr SubArch kSubArchHost =
    kSubArchUnknown;

  static constexpr Vendor kVendorHost =
    kVendorUnknown;

  static constexpr Platform kPlatformHost =
#if defined(__EMSCRIPTEN__)
    kPlatformEmscripten
#elif defined(_WIN32)
    kPlatformWindows
#elif defined(__linux__)
    kPlatformLinux
#elif defined(__gnu_hurd__)
    kPlatformHurd
#elif defined(__FreeBSD__)
    kPlatformFreeBSD
#elif defined(__OpenBSD__)
    kPlatformOpenBSD
#elif defined(__NetBSD__)
    kPlatformNetBSD
#elif defined(__DragonFly__)
    kPlatformDragonFlyBSD
#elif defined(__HAIKU__)
    kPlatformHaiku
#elif defined(__APPLE__) && TARGET_OS_OSX
    kPlatformOSX
#elif defined(__APPLE__) && TARGET_OS_TV
    kPlatformTVOS
#elif defined(__APPLE__) && TARGET_OS_WATCH
    kPlatformWatchOS
#elif defined(__APPLE__) && TARGET_OS_IPHONE
    kPlatformIOS
#else
    kPlatformOther
#endif
    ;

  static constexpr Abi kAbiHost =
#if defined(_MSC_VER)
    kAbiMSVC
#elif defined(__CYGWIN__)
    kAbiCygwin
#elif defined(__MINGW32__) || defined(__GLIBC__)
    kAbiGNU
#elif defined(__ANDROID__)
    kAbiAndroid
#else
    kAbiUnknown
#endif
    ;

#endif

  //! \}

  //! \name Construction / Destruction
  //! \{

  inline Environment() noexcept :
    _arch(uint8_t(kArchUnknown)),
    _subArch(uint8_t(kSubArchUnknown)),
    _vendor(uint8_t(kVendorUnknown)),
    _platform(uint8_t(kPlatformUnknown)),
    _abi(uint8_t(kAbiUnknown)),
    _format(uint8_t(kFormatUnknown)),
    _reserved(0) {}

  inline Environment(const Environment& other) noexcept = default;

  inline explicit Environment(uint32_t arch,
                              uint32_t subArch = kSubArchUnknown,
                              uint32_t vendor = kVendorUnknown,
                              uint32_t platform = kPlatformUnknown,
                              uint32_t abi = kAbiUnknown,
                              uint32_t format = kFormatUnknown) noexcept {
    init(arch, subArch, vendor, platform, abi, format);
  }

  //! \}

  //! \name Overloaded Operators
  //! \{

  inline Environment& operator=(const Environment& other) noexcept = default;

  inline bool operator==(const Environment& other) const noexcept { return  equals(other); }
  inline bool operator!=(const Environment& other) const noexcept { return !equals(other); }

  //! \}

  //! \name Accessors
  //! \{

  //! Tests whether the environment is not set up.
  //!
  //! Returns true if all members are zero, and thus unknown.
  inline bool empty() const noexcept {
    // Unfortunately compilers won't optimize fields are checked one by one...
    return _packed() == 0;
  }

  //! Tests whether the environment is intialized, which means it must have
  //! a valid architecture.
  inline bool isInitialized() const noexcept {
    return _arch != kArchUnknown;
  }

  inline uint64_t _packed() const noexcept {
    uint64_t x;
    memcpy(&x, this, 8);
    return x;
  }

  //! Resets all members of the environment to zero / unknown.
  inline void reset() noexcept {
    _arch = uint8_t(kArchUnknown);
    _subArch = uint8_t(kSubArchUnknown);
    _vendor = uint8_t(kVendorUnknown);
    _platform = uint8_t(kPlatformUnknown);
    _abi = uint8_t(kAbiUnknown);
    _format = uint8_t(kFormatUnknown);
    _reserved = 0;
  }

  inline bool equals(const Environment& other) const noexcept {
    return _packed() == other._packed();
  }

  //! Returns the architecture, see \ref Arch.
  inline uint32_t arch() const noexcept { return _arch; }
  //! Returns the sub-architecture, see \ref SubArch.
  inline uint32_t subArch() const noexcept { return _subArch; }
  //! Returns vendor, see \ref Vendor.
  inline uint32_t vendor() const noexcept { return _vendor; }
  //! Returns target's platform or operating system, see \ref Platform.
  inline uint32_t platform() const noexcept { return _platform; }
  //! Returns target's ABI, see \ref Abi.
  inline uint32_t abi() const noexcept { return _abi; }
  //! Returns target's object format, see \ref Format.
  inline uint32_t format() const noexcept { return _format; }

  inline void init(uint32_t arch,
                   uint32_t subArch = kSubArchUnknown,
                   uint32_t vendor = kVendorUnknown,
                   uint32_t platform = kPlatformUnknown,
                   uint32_t abi = kAbiUnknown,
                   uint32_t format = kFormatUnknown) noexcept {
    _arch = uint8_t(arch);
    _subArch = uint8_t(subArch);
    _vendor = uint8_t(vendor);
    _platform = uint8_t(platform);
    _abi = uint8_t(abi);
    _format = uint8_t(format);
    _reserved = 0;
  }

  //! Tests whether the architecture is 32-bit.
  inline bool is32Bit() const noexcept { return is32Bit(_arch); }
  //! Tests whether the architecture is 64-bit.
  inline bool is64Bit() const noexcept { return is64Bit(_arch); }

  //! Tests whether the architecture is little endian.
  inline bool isLittleEndian() const noexcept { return isLittleEndian(_arch); }
  //! Tests whether the architecture is big endian.
  inline bool isBigEndian() const noexcept { return isBigEndian(_arch); }

  //! Tests whether this architecture is of X86 family.
  inline bool isFamilyX86() const noexcept { return isFamilyX86(_arch); }
  //! Tests whether this architecture is of ARM family.
  inline bool isFamilyRISCV() const noexcept { return isFamilyRISCV(_arch); }
  //! Tests whether this architecture is of ARM family.
  inline bool isFamilyARM() const noexcept { return isFamilyARM(_arch); }
  //! Tests whether this architecture is of ARM family.
  inline bool isFamilyMIPS() const noexcept { return isFamilyMIPS(_arch); }

  //! Tests whether the environment platform is Windows.
  inline bool isPlatformWindows() const noexcept { return _platform == kPlatformWindows; }

  //! Tests whether the environment platform is Linux.
  inline bool isPlatformLinux() const noexcept { return _platform == kPlatformLinux; }

  //! Tests whether the environment platform is Hurd.
  inline bool isPlatformHurd() const noexcept { return _platform == kPlatformHurd; }

  //! Tests whether the environment platform is Haiku.
  inline bool isPlatformHaiku() const noexcept { return _platform == kPlatformHaiku; }

  //! Tests whether the environment platform is any BSD.
  inline bool isPlatformBSD() const noexcept {
    return _platform == kPlatformFreeBSD ||
           _platform == kPlatformOpenBSD ||
           _platform == kPlatformNetBSD ||
           _platform == kPlatformDragonFlyBSD;
  }

  //! Tests whether the environment platform is any Apple platform (OSX, iOS, TVOS, WatchOS).
  inline bool isPlatformApple() const noexcept {
    return _platform == kPlatformOSX ||
           _platform == kPlatformIOS ||
           _platform == kPlatformTVOS ||
           _platform == kPlatformWatchOS;
  }

  //! Tests whether the ABI is MSVC.
  inline bool isAbiMSVC() const noexcept { return _abi == kAbiMSVC; }
  //! Tests whether the ABI is GNU.
  inline bool isAbiGNU() const noexcept { return _abi == kAbiGNU; }

  //! Returns a calculated stack alignment for this environment.
  ASMJIT_API uint32_t stackAlignment() const noexcept;

  //! Returns a native register size of this architecture.
  uint32_t registerSize() const noexcept { return registerSizeFromArch(_arch); }

  //! Sets the architecture to `arch`.
  inline void setArch(uint32_t arch) noexcept { _arch = uint8_t(arch); }
  //! Sets the sub-architecture to `subArch`.
  inline void setSubArch(uint32_t subArch) noexcept { _subArch = uint8_t(subArch); }
  //! Sets the vendor to `vendor`.
  inline void setVendor(uint32_t vendor) noexcept { _vendor = uint8_t(vendor); }
  //! Sets the platform to `platform`.
  inline void setPlatform(uint32_t platform) noexcept { _platform = uint8_t(platform); }
  //! Sets the ABI to `abi`.
  inline void setAbi(uint32_t abi) noexcept { _abi = uint8_t(abi); }
  //! Sets the object format to `format`.
  inline void setFormat(uint32_t format) noexcept { _format = uint8_t(format); }

  //! \}

  //! \name Static Utilities
  //! \{

  //! Tests whether the given architecture `arch` is 32-bit.
  static inline bool is32Bit(uint32_t arch) noexcept {
    return (arch & kArch32BitMask) == kArch32BitMask;
  }

  //! Tests whether the given architecture `arch` is 64-bit.
  static inline bool is64Bit(uint32_t arch) noexcept {
    return (arch & kArch32BitMask) == 0;
  }

  //! Tests whether the given architecture `arch` is little endian.
  static inline bool isLittleEndian(uint32_t arch) noexcept {
    return (arch & kArchBigEndianMask) == 0;
  }

  //! Tests whether the given architecture `arch` is big endian.
  static inline bool isBigEndian(uint32_t arch) noexcept {
    return (arch & kArchBigEndianMask) == kArchBigEndianMask;
  }

  //! Tests whether the given architecture family is X86 or X64.
  static inline bool isFamilyX86(uint32_t arch) noexcept {
    return arch == kArchX86 ||
           arch == kArchX64;
  }

  //! Tests whether the given architecture family is RISC-V (both 32-bit and 64-bit).
  static inline bool isFamilyRISCV(uint32_t arch) noexcept {
    return arch == kArchRISCV32 ||
           arch == kArchRISCV64;
  }

  //! Tests whether the given architecture family is ARM, Thumb, or AArch64.
  static inline bool isFamilyARM(uint32_t arch) noexcept {
    arch &= ~kArchBigEndianMask;
    return arch == kArchARM ||
           arch == kArchAArch64 ||
           arch == kArchThumb;
  }

  //! Tests whether the given architecture family is MISP or MIPS64.
  static inline bool isFamilyMIPS(uint32_t arch) noexcept {
    arch &= ~kArchBigEndianMask;
    return arch == kArchMIPS_LE ||
           arch == kArchMIPS64_LE;
  }

  //! Returns a native general purpose register size from the given architecture.
  static uint32_t registerSizeFromArch(uint32_t arch) noexcept {
    return is32Bit(arch) ? 4u : 8u;
  }

  //! \}
};

//! Returns the host environment constructed from preprocessor macros defined
//! by the compiler.
//!
//! The returned environment should precisely match the target host architecture,
//! sub-architecture, platform, and ABI.
static ASMJIT_INLINE Environment hostEnvironment() noexcept {
  return Environment(Environment::kArchHost,
                     Environment::kSubArchHost,
                     Environment::kVendorHost,
                     Environment::kPlatformHost,
                     Environment::kAbiHost,
                     Environment::kFormatUnknown);
}

static_assert(sizeof(Environment) == 8,
              "Environment must occupy exactly 8 bytes.");

//! \}

#ifndef ASMJIT_NO_DEPRECATED
class ASMJIT_DEPRECATED_STRUCT("Use Environment instead") ArchInfo : public Environment {
public:
  inline ArchInfo() noexcept : Environment() {}

  inline ArchInfo(const Environment& other) noexcept : Environment(other) {}
  inline explicit ArchInfo(uint32_t arch, uint32_t subArch = kSubArchUnknown) noexcept
    : Environment(arch, subArch) {}

  enum Id : uint32_t {
    kIdNone = Environment::kArchUnknown,
    kIdX86 = Environment::kArchX86,
    kIdX64 = Environment::kArchX64,
    kIdA32 = Environment::kArchARM,
    kIdA64 = Environment::kArchAArch64,
    kIdHost = Environment::kArchHost
  };

  enum SubType : uint32_t {
    kSubIdNone = Environment::kSubArchUnknown
  };

  static inline ArchInfo host() noexcept { return ArchInfo(hostEnvironment()); }
};
#endif // !ASMJIT_NO_DEPRECATED

ASMJIT_END_NAMESPACE

#endif // ASMJIT_CORE_ENVIRONMENT_H_INCLUDED


text:
"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;

var _index = _interopRequireDefault(require("../../isExists/index.js"));

var _index2 = _interopRequireDefault(require("../_lib/convertToFP/index.js"));

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

// This file is generated automatically by `scripts/build/fp.js`. Please, don't change it.
var isExists = (0, _index2.default)(_index.default, 3);
var _default = isExists;
exports.default = _default;
module.exports = exports.default;

redpajama_set_name: RedPajamaGithub


text:
namespace redi {
namespace world {

struct ChunkSerializer {
  const Chunk& chunk;
  nbt::tag_compound& root;

  ChunkSerializer(nbt::root_tag& root, const Chunk& chunk);

  void operator()();

private:
  static nbt::tag_compound& resolve(nbt::root_tag& root);

  void writeMisc();

  void writeSections();
  void writeSection(nbt::tag_list& list, std::uint8_t y);
  bool writeBlocks(byte* bytes, std::int16_t yy);
  //  void writeAdd(const std::vector<std::int8_t>& buffer, std::int16_t yy);
  void writeData(byte* bytes, std::int16_t yy);
  void writeBlockLight(byte* bytes, std::int16_t yy);
  void writeSkyLight(byte* bytes, std::int16_t yy);
};

} // namespace world
} // namespace redi


text:
<?php

/************************************************************************
*																		*
*	Functions used to remove WP versions from scripts, stylesheets		*
*																		*
************************************************************************/

// remove WP versions from scripts and stylesheets
function tsm_head_cleanup() {

	// use it for development to
	add_filter( 'style_loader_src', 'tsm_change_wp_ver', 9999 );

	// use it for production to make css and js cacheable
	add_filter( 'style_loader_src', 'tsm_remove_wp_ver_css_js', 9999 );
	add_filter( 'script_loader_src', 'tsm_remove_wp_ver_css_js', 9999 );

}

add_action( 'init', 'tsm_head_cleanup' );

function tsm_change_wp_ver( $src ) {
    // save original src
	$temp_src = $src;

    // remove ver arg from query
	$src = remove_query_arg( 'ver', $src );

	$pos = strpos( $src, 'wp-content' );
	if ( $pos ) {
		$file = substr( $src, $pos);
	} else {
		$file = NULL;
	}

	if ( file_exists($file) ) {
    // change ver value for last file time modification
		$src = add_query_arg( 'ver', filemtime($file), $src);
	} else {
		$src = $temp_src;
	}
	return $src;
}

function tsm_remove_wp_ver_css_js( $src ) {
  // keep just customs scripts with ver in query
	// if ( strpos( $src, 'scripts.min.js' ) || strpos( $src, 'scripts.js' ) ) { return tsm_change_wp_ver($src); }
  // remove ver in query from all other script tags
	if ( strpos( $src, 'ver=' ) ) { $src = remove_query_arg( 'ver', $src ); }
	return $src;
}
?>


text:
var _ = require('underscore');
var $ = require('jquery');
var Ps = require('perfect-scrollbar');
var CoreView = require('backbone/core-view');
var CategoryContentView = require('./widgets/category/content-view');
var FormulaContentView = require('./widgets/formula/content-view');
var HistogramContentView = require('./widgets/histogram/content-view');
var WidgetViewFactory = require('./widgets/widget-view-factory');
var template = require('./dashboard-sidebar.tpl');
var matchMedia = window.matchMedia;

module.exports = CoreView.extend({
  className: 'CDB-Widget-canvas',

  initialize: function (options) {
    this._widgetViewFactory = new WidgetViewFactory([
      {
        type: 'formula',
        createContentView: function (widgetModel) {
          return new FormulaContentView({
            model: widgetModel
          });
        }
      }, {
        type: 'histogram',
        createContentView: function (widgetModel) {
          return new HistogramContentView({
            model: widgetModel
          });
        }
      }, {
        type: 'category',
        createContentView: function (widgetModel) {
          return new CategoryContentView({
            model: widgetModel
          });
        }
      }
    ]);

    this._widgets = options.widgets;

    this._widgets.bind('add', this._maybeRenderWidgetView, this);
    this._widgets.bind('reset', this.render, this);
    this._widgets.bind('orderChanged', this.render, this);
    this._widgets.bind('change:collapsed', this._onWidgetUpdate, this);
    this._widgets.bind('add remove reset', this._onWidgetsChange, this);
    this.add_related_model(this._widgets);

    this._resizeHandler = this._onResize.bind(this);
  },

  render: function () {
    this._cleanScroll();
    this._observer && this._observer.disconnect();
    this.clearSubViews();

    this.$el.html(template());
    this.$el.toggleClass('CDB-Widget-canvas--withMenu', this.model.get('renderMenu'));
    this._widgets.each(this._maybeRenderWidgetView, this);
    this._toggleVisiblity();

    this._renderScroll();
    this._renderShadows();
    this._bindScroll();
    this._initResize();

    return this;
  },

  _initResize: function () {
    var breakpoints = ['(max-width: 1600px)', '(max-width: 1280px)', '(max-width: 759px)'];
    breakpoints.forEach(function (breakpoint) {
      var mq = matchMedia(breakpoint);
      mq.addListener(this._resizeHandler);
    }, this);
  },

  _updateScrollCss: function () {
    this._onWidgetUpdate();

    var element = this._container();
    if (!element) return;

    var containerWidth = element.clientWidth;
    var containerHeight = element.clientHeight;
    var contentWidth = element.scrollWidth;
    var contentHeight = element.scrollHeight;
    var xScroll = containerWidth < contentWidth;
    var yScroll = containerHeight < contentHeight;

    this._$container().toggleClass('hasXScroll', xScroll);
    this._$container().toggleClass('hasYScroll', yScroll);
  },

  _$container: function () {
    return $(this._container());
  },

  _container: function () {
    return this.el.querySelector('.js-container');
  },

  _maybeRenderWidgetView: function (widgetModel) {
    var view = this._widgetViewFactory.createWidgetView(widgetModel);

    if (view) {
      this.addView(view);
      this._$container().append(view.render().el);
    }
  },

  _bindScroll: function () {
    this._$container()
      .on('ps-y-reach-start', _.bind(this._onScrollTop, this))
      .on('ps-y-reach-end', _.bind(this._onScrollBottom, this))
      .on('ps-scroll-y', _.bind(this._onScroll, this));
  },

  _renderScroll: function () {
    Ps.initialize(this._container(), {
      wheelSpeed: 1,
      wheelPropagation: false,
      swipePropagation: true,
      stopPropagationOnClick: false,
      minScrollbarLength: 20,
      useBothWheelAxes: false,
      suppressScrollX: true
    });
  },

  _onWidgetUpdate: function () {
    Ps.update(this._container());
  },

  _renderShadows: function () {
    this.$shadowTop = $('<div>').addClass('CDB-Widget-canvasShadow CDB-Widget-canvasShadow--top');
    this.$shadowBottom = $('<div>').addClass('CDB-Widget-canvasShadow CDB-Widget-canvasShadow--bottom');
    this.$el.append(this.$shadowTop);
    this.$el.append(this.$shadowBottom);
  },

  _onScrollTop: function () {
    this.$shadowTop.removeClass('is-visible');
  },

  _onScroll: function () {
    var $el = this._$container();
    var currentPos = $el.scrollTop();
    var max = $el.get(0).scrollHeight;
    var height = $el.outerHeight();
    var maxPos = max - height;

    this.$shadowTop.toggleClass('is-visible', currentPos > 0);
    this.$shadowBottom.toggleClass('is-visible', currentPos < maxPos);
  },

  _updateScroll: function () {
    this._$container().scrollLeft = 0;
    this._$container().scrollTop = 0;
  },

  _onResize: function (mediaQuery) {
    // we don't use mediaQuery.matches
    // trigger actions always if breakpoints changes
    this._updateScroll();
    this._onScroll();
  },

  _onScrollBottom: function () {
    this.$shadowBottom.removeClass('is-visible');
  },

  _cleanScroll: function () {
    $(window).off('resize', this._resizeHandler);
    if (this._container()) {
      this._$container().off('ps-scroll-y');
      Ps.destroy(this._container());
    }
  },

  _toggleVisiblity: function () {
    this.$el.toggle(!_.isEmpty(this._subviews));
  },

  _onWidgetsChange: function () {
    this._toggleVisiblity();
    this.render();
  },

  clean: function () {
    this._cleanScroll();
    this._observer && this._observer.disconnect();
    CoreView.prototype.clean.call(this);
  }

});


text:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.jaxrs.json</groupId>
  <artifactId>JaxRsJSON</artifactId>
  <packaging>war</packaging>
  <version>1.0-SNAPSHOT</version>
  <name>JaxRsJSON Maven Webapp</name>
  <url>http://maven.apache.org</url>

    <repositories>
        <repository>
            <id>JBoss repository</id>
            <url>https://repository.jboss.org/nexus/content/groups/public-jboss</url>
        </repository>
    </repositories>

    <dependencies>

        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>3.8.1</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.jboss.resteasy</groupId>
            <artifactId>resteasy-jaxrs</artifactId>
            <version>2.3.7.Final</version>
        </dependency>

<!--        <dependency>
            <groupId>org.jboss.resteasy</groupId>
            <artifactId>jaxrs-api</artifactId>
            <version>2.2.1.GA</version>
        </dependency>-->

        <dependency>
            <groupId>org.jboss.resteasy</groupId>
            <artifactId>resteasy-jackson-provider</artifactId>
            <version>2.3.2.Final</version>
        </dependency>

    </dependencies>

  <build>
    <finalName>JaxRsJSON</finalName>

      <plugins>

      <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-compiler-plugin</artifactId>
          <configuration>
              <source>1.6</source>
              <target>1.6</target>
          </configuration>
      </plugin>

      <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-war-plugin</artifactId>
          <version>2.1.1</version>
          <configuration>
              <failOnMissingWebXml>false</failOnMissingWebXml>
          </configuration>
      </plugin>
      <plugin>
          <groupId>org.apache.tomcat.maven</groupId>
          <artifactId>tomcat7-maven-plugin</artifactId>
          <version>2.1</version>
          <configuration>
              <url>http://localhost:8080/manager/text</url>
              <server>my-tomcat</server>
              <path>/JaxRsJSON</path>
          </configuration>
      </plugin>

      </plugins>

  </build>

</project>


text:
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <title>Henrique Sá</title>
        <link rel="stylesheet" type="text/css" href="//cdnjs.cloudflare.com/ajax/libs/font-awesome/4.1.0/css/font-awesome.min.css">
        <link rel="stylesheet" type="text/css" href="//maxcdn.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css">
        <link rel="stylesheet" type="text/css" href="css/style.css">

                          <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar-collapse">
                            Toggle navigation

                          </button>

Blog

Who am I

Projects

Get in touch

                                Hi! I'm Henrique Pinheiro Sá, 18, born and raised in Minas Gerais, Brazil. I graduated in 2014 from CEFET-MG, a technical high school, where I studied Informatics, mainly Computer Science. I'm an intern as a front-end developer at a software company called Teknisa, where I also work with infrastucture and some server management.

                                Currently I'm working on an automation project where I use genetic algorithms to figure out when to, for example, turn on the lights. I've coded many other things over the years, from C++ projects to entire systems based solely on Javascript, and much more, some of which you can check out on my GitHub page.

                                I also like to write. About development on a recently coined blog, about shallow topics sporadically on Twitter (in Portuguese), technical articles on DigitalOcean, and I've written a couple of reviews on a local tech blog. You can contact me through email.

My Projects

PasswordJS

                                As an advocate of internet security, I've always liked to have unique passwords for all my accounts. To help me remember them, I needed an online password manager, but my options were limited to bloatware filled websites with additions I didn't care for. I decided to fix that by developing PasswordJS, focused on simplicity and security, developed with NodeJS on the back end, a MongoDB database and an AngularJS-based front end. Check it out.

Automation

                                A constant work-in-progress, this automation project is a collection of my knowledge in electronics and programming, and much of it just manual labor getting the wires in the right place. Recently I've began implementing my web skills in it, and decided I'd do an overhaul that would allow everything to be controlled through a NodeJS server. You can watch me build it here.

                “Always code as if the guy who ends up maintaining your work will be a violent psychopath who knows where you live.”

Martin Golding


text:
body {
    /*font-family: "Trebuchet MS", "Myriad Pro", Arial, sans-serif;*/
    font-family: helvetica, arial;
}

.navbar-default .navbar-nav > li > a{
    color: white;
}

/*.navbar-static-top {*/
  /*margin-bottom: 19px;*/
/*}*/

.navbar-fixed-top{
    /*background: #32647f;*/
    background: #2a2a2a; border-bottom: #427c83 solid 3px;
    color: white;
}

.navbar-static-top{
    background: #32647f;
    color: white;
}
.navbar-default .navbar-brand{
    color: white!important;
}

.navbar-default .navbar-nav > .open > a,
.navbar-default .navbar-nav > .open > a:hover,
.navbar-default .navbar-nav > .open > a:focus{
    background: #78bcaf;
    color: white;
}

.navbar-default .navbar-nav > li > a:hover,
.navbar-default .navbar-nav > li > a:focus {
    color: floralwhite;
    background-color: transparent;
}

.dropdown-menu > li > a {
    color: #494949;
    font-family: "Trebuchet MS", "Myriad Pro", Arial, sans-serif;
}

/*icon color design*/
.fa-tasks{
    color: #f17a72;
    /*border: solid 1px white;*/
    border: solid 1px white;
    padding: 3px;
}

.fa-dashcube{
    color: #ecc34f;
    border: solid 1px white;
    padding: 3px;
}
/*.badge*/

/*h4*/


text:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE eSummaryResult PUBLIC "-//NLM//DTD esummary v1 20041029//EN" "http://eutils.ncbi.nlm.nih.gov/eutils/dtd/20041029/esummary-v1.dtd">
<eSummaryResult>
<DocSum>
	<Id>10239</Id>
	<Item Name="Status" Type="String">active</Item>
	<Item Name="Rank" Type="String">superkingdom</Item>
	<Item Name="Division" Type="String">viruses</Item>
	<Item Name="ScientificName" Type="String">Viruses</Item>
	<Item Name="CommonName" Type="String"></Item>
	<Item Name="TaxId" Type="Integer">10239</Item>
	<Item Name="AkaTaxId" Type="Integer">0</Item>
	<Item Name="Genus" Type="String"></Item>
	<Item Name="Species" Type="String"></Item>
	<Item Name="Subsp" Type="String"></Item>
	<Item Name="ModificationDate" Type="Date">2010/11/23 00:00</Item>
</DocSum>

</eSummaryResult>


text:
<!doctype html>

  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1" />
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">

  <title>vaadin-grid – Other</title>

  <link rel="import" href="common.html">

    <demo-navigation class="vertical-section"></demo-navigation>

Scrolling

      <demo-snippet>
        <template>

          <button class="demo-button" id="scrollToStart">scrollToStart()</button>
          <button class="demo-button" id="scrollToEnd">scrollToEnd()</button>
          <button class="demo-button" id="scrollToRow">scrollToRow(100)</button>

          <vaadin-grid id="grid-scrolling">

              <colgroup>
                <col>
                <col>
                <col>
                <col>
              </colgroup>

                  #
                  Name
                  Surname
                  Activity

          </vaadin-grid>

        </template>
      </demo-snippet>

Row details

      <demo-snippet>
        <template>
          <x-grid-details></x-grid-details>

          <dom-module id="x-grid-details">
            <template>

                  Name

[[user.name.first]]

                  Surname

[[user.name.last]]

                  Title

Designer

                  Hire date

10th August 2015

                  City

[[user.location.city]]

                  Street

[[user.location.street]]

                  Phone

[[user.phone]]

                    <button class="demo-button">MESSAGE</button>
                    <button class="demo-button whitebutton">EDIT</button>

              <vaadin-grid id="grid">

                  <colgroup>
                    <col name="user.name.first">
                    <col name="user.name.last">
                    <col name="user.email" flex>
                  </colgroup>

              </vaadin-grid>

            </template>

          </dom-module>
        </template>
      </demo-snippet>

Polymer Integration (Light DOM data source)

      <demo-snippet>
        <template>

            <template is="dom-bind" id="my-template">
              <vaadin-grid>

                  <colgroup>
                    <col width="64">
                    <col width="100">
                    <col>
                    <col>
                    <col>
                  </colgroup>

                      #

                      First Name
                      Last Name
                      Email

                    <template is="dom-repeat" items="[[users]]">

                        [[index]]

                        [[item.user.name.first]]
                        [[item.user.name.last]]
                        [[item.user.email]]

                    </template>

              </vaadin-grid>
            </template>

        </template>
      </demo-snippet>


text:
using System.Collections.Generic;

namespace ReMi.Plugin.QaStats.Entities
{
    public class QaReleaseCriteriaList : List<QaReleaseCriteria>
    {
    }
}


text:
SYNONYM

#### According to
Index Fungorum

#### Published in
null

#### Original name
Lecanora brevilobata Nyl.

### Remarks
null


text:
/**
 * @constructor
 */
gecui.node.Styles = function(config) {
    gecui.node.Styles.superclass.constructor.call(this, Ext.apply( {
        text : 'Styles',
        expanded : false,
        xtype: 'gecui-styles',
        iconCls : 'gecui-styles',
        id : 'styles',
        loader : new gecui.treeloader.Styles({
            url : gecui.url,
            restful : true
        })
    }, config));
};

Ext.extend(gecui.node.Styles, Ext.tree.AsyncTreeNode, {});


text:
#ifndef _WESTON_TEST_RUNNER_H_
#define _WESTON_TEST_RUNNER_H_

#include "config.h"

#include <stdlib.h>

#include "shared/helpers.h"

#ifdef NDEBUG
#error "Tests must not be built with NDEBUG defined, they rely on assert()."
#endif

struct weston_test {
	const char *name;
	void (*run)(void *);
	const void *table_data;
	size_t element_size;
	int n_elements;
	int must_fail;
} __attribute__ ((aligned (32)));

#define TEST_BEGIN(name, arg)						\
	static void name(arg)

#define TEST_COMMON(func, name, ret, data, size, n_elem)		\
	static void func(void *);					\
									\
	const struct weston_test test##name				\
		__attribute__ ((used, section ("test_section"))) =	\
	{								\
		#name, func, data, size, n_elem, ret			\
	};

#define NO_ARG_TEST(name, ret)						\
	TEST_COMMON(wrap##name, name, ret, NULL, 0, 1)			\
	static void name(void);						\
	static void wrap##name(void *data)				\
	{								\
		(void) data;						\
		name();							\
	}								\
									\
	TEST_BEGIN(name, void)

#define ARG_TEST(name, ret, test_data)					\
	TEST_COMMON(name, name, ret, test_data,				\
		    sizeof(test_data[0]),				\
		    ARRAY_LENGTH(test_data))				\
	TEST_BEGIN(name, void *data)					\

#define TEST(name) NO_ARG_TEST(name, 0)
#define FAIL_TEST(name) NO_ARG_TEST(name, 1)
#define TEST_P(name, data) ARG_TEST(name, 0, data)
#define FAIL_TEST_P(name, data) ARG_TEST(name, 1, data)

/**
 * Get the test name string with counter
 *
 * \return The test name. For an iterated test, e.g. defined with TEST_P(),
 * the name has a '[%d]' suffix to indicate the iteration.
 *
 * This is only usable from code paths inside TEST(), TEST_P(), etc.
 * defined functions.
 */
const char *
get_test_name(void);

#endif


text:
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android"
    android:zAdjustment="top">
  <translate
      android:duration="250"
      android:fromXDelta="100.0%p"
      android:interpolator="@anim/decelerate_cubic"
      android:toXDelta="0.0%p"/>
</set>


text:
/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/*
 * pkix_pl_infoaccess.c
 *
 * InfoAccess Object Definitions
 *
 */

#include "pkix_pl_infoaccess.h"

/* --Private-InfoAccess-Functions----------------------------------*/

/*
 * FUNCTION: pkix_pl_InfoAccess_Create
 * DESCRIPTION:
 *
 *  This function creates an InfoAccess from the method provided in "method" and
 *  the GeneralName provided in "generalName" and stores the result at
 *  "pInfoAccess".
 *
 * PARAMETERS
 *  "method"
 *      The UInt32 value to be stored as the method field of the InfoAccess.
 *  "generalName"
 *      The GeneralName to be stored as the generalName field of the InfoAccess.
 *      Must be non-NULL.
 *  "pInfoAccess"
 *      Address where the result is stored. Must be non-NULL.
 *  "plContext"
 *      Platform-specific context pointer.
 * THREAD SAFETY:
 *  Thread Safe (see Thread Safety Definitions in Programmer's Guide)
 * RETURNS:
 *  Returns NULL if the function succeeds.
 *  Returns a Fatal Error if the function fails in an unrecoverable way.
 */
static PKIX_Error *
pkix_pl_InfoAccess_Create(
        PKIX_UInt32 method,
        PKIX_PL_GeneralName *generalName,
        PKIX_PL_InfoAccess **pInfoAccess,
        void *plContext)
{

        PKIX_PL_InfoAccess *infoAccess = NULL;

        PKIX_ENTER(INFOACCESS, "pkix_pl_InfoAccess_Create");
        PKIX_NULLCHECK_TWO(generalName, pInfoAccess);

        PKIX_CHECK(PKIX_PL_Object_Alloc
                (PKIX_INFOACCESS_TYPE,
                sizeof (PKIX_PL_InfoAccess),
                (PKIX_PL_Object **)&infoAccess,
                plContext),
                PKIX_COULDNOTCREATEINFOACCESSOBJECT);

        infoAccess->method = method;

        PKIX_INCREF(generalName);
        infoAccess->location = generalName;

        *pInfoAccess = infoAccess;
        infoAccess = NULL;

cleanup:
        PKIX_DECREF(infoAccess);

        PKIX_RETURN(INFOACCESS);
}

/*
 * FUNCTION: pkix_pl_InfoAccess_Destroy
 * (see comments for PKIX_PL_DestructorCallback in pkix_pl_pki.h)
 */
static PKIX_Error *
pkix_pl_InfoAccess_Destroy(
        PKIX_PL_Object *object,
        void *plContext)
{
        PKIX_PL_InfoAccess *infoAccess = NULL;

        PKIX_ENTER(INFOACCESS, "pkix_pl_InfoAccess_Destroy");
        PKIX_NULLCHECK_ONE(object);

        PKIX_CHECK(pkix_CheckType(object, PKIX_INFOACCESS_TYPE, plContext),
                PKIX_OBJECTNOTANINFOACCESS);

        infoAccess = (PKIX_PL_InfoAccess *)object;

        PKIX_DECREF(infoAccess->location);

cleanup:

        PKIX_RETURN(INFOACCESS);
}

/*
 * FUNCTION: pkix_pl_InfoAccess_ToString
 * (see comments for PKIX_PL_ToStringCallback in pkix_pl_pki.h)
 */
static PKIX_Error *
pkix_pl_InfoAccess_ToString(
        PKIX_PL_Object *object,
        PKIX_PL_String **pString,
        void *plContext)
{
        PKIX_PL_InfoAccess *infoAccess;
        PKIX_PL_String *infoAccessString = NULL;
        char *asciiFormat = NULL;
        char *asciiMethod = NULL;
        PKIX_PL_String *formatString = NULL;
        PKIX_PL_String *methodString = NULL;
        PKIX_PL_String *locationString = NULL;

        PKIX_ENTER(INFOACCESS, "pkix_pl_InfoAccess_ToString");
        PKIX_NULLCHECK_TWO(object, pString);

        PKIX_CHECK(pkix_CheckType
                    (object, PKIX_INFOACCESS_TYPE, plContext),
                    PKIX_OBJECTNOTINFOACCESS);

        infoAccess = (PKIX_PL_InfoAccess *)object;

        asciiFormat =
                "["
                "method:%s, "
                "location:%s"
                "]";

        PKIX_CHECK(PKIX_PL_String_Create
                    (PKIX_ESCASCII,
                    asciiFormat,
                    0,
                    &formatString,
                    plContext),
                    PKIX_STRINGCREATEFAILED);

        switch(infoAccess->method) {
            case PKIX_INFOACCESS_CA_ISSUERS:
                    asciiMethod = "caIssuers";
                    break;
            case PKIX_INFOACCESS_OCSP:
                    asciiMethod = "ocsp";
                    break;
            case PKIX_INFOACCESS_TIMESTAMPING:
                    asciiMethod = "timestamping";
                    break;
            case PKIX_INFOACCESS_CA_REPOSITORY:
                    asciiMethod = "caRepository";
                    break;
            default:
                    asciiMethod = "unknown";
        }

        PKIX_CHECK(PKIX_PL_String_Create
                    (PKIX_ESCASCII,
                    asciiMethod,
                    0,
                    &methodString,
                    plContext),
                    PKIX_STRINGCREATEFAILED);

        PKIX_TOSTRING(infoAccess->location, &locationString, plContext,
                    PKIX_GENERALNAMETOSTRINGFAILED);

        PKIX_CHECK(PKIX_PL_Sprintf
                    (&infoAccessString,
                    plContext,
                    formatString,
                    methodString,
                    locationString),
                    PKIX_SPRINTFFAILED);

        *pString = infoAccessString;

cleanup:

        PKIX_DECREF(formatString);
        PKIX_DECREF(methodString);
        PKIX_DECREF(locationString);

        PKIX_RETURN(INFOACCESS);
}

/*
 * FUNCTION: pkix_pl_InfoAccess_Hashcode
 * (see comments for PKIX_PL_HashcodeCallback in pkix_pl_pki.h)
 */
static PKIX_Error *
pkix_pl_InfoAccess_Hashcode(
        PKIX_PL_Object *object,
        PKIX_UInt32 *pHashcode,
        void *plContext)
{
        PKIX_PL_InfoAccess *infoAccess = NULL;
        PKIX_UInt32 infoAccessHash;

        PKIX_ENTER(INFOACCESS, "pkix_pl_InfoAccess_Hashcode");
        PKIX_NULLCHECK_TWO(object, pHashcode);

        PKIX_CHECK(pkix_CheckType
                    (object, PKIX_INFOACCESS_TYPE, plContext),
                    PKIX_OBJECTNOTINFOACCESS);

        infoAccess = (PKIX_PL_InfoAccess *)object;

        PKIX_HASHCODE(infoAccess->location, &infoAccessHash, plContext,
                    PKIX_OBJECTHASHCODEFAILED);

        infoAccessHash += (infoAccess->method << 7);

        *pHashcode = infoAccessHash;

cleanup:

        PKIX_RETURN(INFOACCESS);

}

/*
 * FUNCTION: pkix_pl_InfoAccess_Equals
 * (see comments for PKIX_PL_Equals_Callback in pkix_pl_pki.h)
 */
static PKIX_Error *
pkix_pl_InfoAccess_Equals(
        PKIX_PL_Object *firstObject,
        PKIX_PL_Object *secondObject,
        PKIX_Boolean *pResult,
        void *plContext)
{
        PKIX_PL_InfoAccess *firstInfoAccess = NULL;
        PKIX_PL_InfoAccess *secondInfoAccess = NULL;
        PKIX_UInt32 secondType;
        PKIX_Boolean cmpResult;

        PKIX_ENTER(INFOACCESS, "pkix_pl_InfoAccess_Equals");
        PKIX_NULLCHECK_THREE(firstObject, secondObject, pResult);

        /* test that firstObject is a InfoAccess */
        PKIX_CHECK(pkix_CheckType
                (firstObject, PKIX_INFOACCESS_TYPE, plContext),
                PKIX_FIRSTOBJECTNOTINFOACCESS);

        /*
         * Since we know firstObject is a InfoAccess, if both references are
         * identical, they must be equal
         */
        if (firstObject == secondObject){
                *pResult = PKIX_TRUE;
                goto cleanup;
        }

        /*
         * If secondObject isn't a InfoAccess, we don't throw an error.
         * We simply return a Boolean result of FALSE
         */
        *pResult = PKIX_FALSE;
        PKIX_CHECK(PKIX_PL_Object_GetType
                    (secondObject, &secondType, plContext),
                    PKIX_COULDNOTGETTYPEOFSECONDARGUMENT);
        if (secondType != PKIX_INFOACCESS_TYPE) goto cleanup;

        firstInfoAccess = (PKIX_PL_InfoAccess *)firstObject;
        secondInfoAccess = (PKIX_PL_InfoAccess *)secondObject;

        *pResult = PKIX_FALSE;

        if (firstInfoAccess->method != secondInfoAccess->method) {
                goto cleanup;
        }

        PKIX_EQUALS(firstInfoAccess, secondInfoAccess, &cmpResult, plContext,
                PKIX_OBJECTEQUALSFAILED);

        *pResult = cmpResult;

cleanup:

        PKIX_RETURN(INFOACCESS);
}

/*
 * FUNCTION: pkix_pl_InfoAccess_RegisterSelf
 * DESCRIPTION:
 *  Registers PKIX_INFOACCESS_TYPE and its related functions with systemClasses[]
 * THREAD SAFETY:
 *  Not Thread Safe - for performance and complexity reasons
 *
 *  Since this function is only called by PKIX_PL_Initialize, which should
 *  only be called once, it is acceptable that this function is not
 *  thread-safe.
 */
PKIX_Error *
pkix_pl_InfoAccess_RegisterSelf(void *plContext)
{
        extern pkix_ClassTable_Entry systemClasses[PKIX_NUMTYPES];
        pkix_ClassTable_Entry entry;

        PKIX_ENTER(INFOACCESS,
                "pkix_pl_InfoAccess_RegisterSelf");

        entry.description = "InfoAccess";
        entry.objCounter = 0;
        entry.typeObjectSize = sizeof(PKIX_PL_InfoAccess);
        entry.destructor = pkix_pl_InfoAccess_Destroy;
        entry.equalsFunction = pkix_pl_InfoAccess_Equals;
        entry.hashcodeFunction = pkix_pl_InfoAccess_Hashcode;
        entry.toStringFunction = pkix_pl_InfoAccess_ToString;
        entry.comparator = NULL;
        entry.duplicateFunction = pkix_duplicateImmutable;

        systemClasses[PKIX_INFOACCESS_TYPE] = entry;

        PKIX_RETURN(INFOACCESS);
}

/*
 * FUNCTION: pkix_pl_InfoAccess_CreateList
 * DESCRIPTION:
 *
 *  Based on data in CERTAuthInfoAccess array "nssInfoAccess", this function
 *  creates and returns a PKIX_List of PKIX_PL_InfoAccess at "pInfoAccessList".
 *
 * PARAMETERS
 *  "nssInfoAccess"
 *      The pointer array of CERTAuthInfoAccess that contains access data.
 *      May be NULL.
 *  "pInfoAccessList"
 *      Address where a list of PKIX_PL_InfoAccess is returned.
 *      Must be non-NULL.
 *  "plContext"
 *      Platform-specific context pointer.
 * THREAD SAFETY:
 *  Thread Safe (see Thread Safety Definitions in Programmer's Guide)
 * RETURNS:
 *  Returns NULL if the function succeeds.
 *  Returns a Fatal Error if the function fails in an unrecoverable way.
 */
PKIX_Error *
pkix_pl_InfoAccess_CreateList(
        CERTAuthInfoAccess **nssInfoAccess,
        PKIX_List **pInfoAccessList, /* of PKIX_PL_InfoAccess */
        void *plContext)
{
        PKIX_List *infoAccessList = NULL;
        PKIX_PL_InfoAccess *infoAccess = NULL;
        PKIX_PL_GeneralName *location = NULL;
        PKIX_UInt32 method;
        int i;

        PKIX_ENTER(INFOACCESS, "PKIX_PL_InfoAccess_CreateList");
        PKIX_NULLCHECK_ONE(pInfoAccessList);

        PKIX_CHECK(PKIX_List_Create(&infoAccessList, plContext),
                PKIX_LISTCREATEFAILED);

        if (nssInfoAccess == NULL) {
                goto cleanup;
        }

        for (i = 0; nssInfoAccess[i] != NULL; i++) {

                if (nssInfoAccess[i]->location == NULL) {
                    continue;
                }

                PKIX_CHECK(pkix_pl_GeneralName_Create
                        (nssInfoAccess[i]->location, &location, plContext),
                        PKIX_GENERALNAMECREATEFAILED);

                PKIX_CERT_DEBUG("\t\tCalling SECOID_FindOIDTag).\n");
                method = SECOID_FindOIDTag(&nssInfoAccess[i]->method);
                /* Map NSS access method value into PKIX constant */
                switch(method) {
                        case SEC_OID_PKIX_CA_ISSUERS:
                                method = PKIX_INFOACCESS_CA_ISSUERS;
                                break;
                        case SEC_OID_PKIX_OCSP:
                                method = PKIX_INFOACCESS_OCSP;
                                break;
                        case SEC_OID_PKIX_TIMESTAMPING:
                                method = PKIX_INFOACCESS_TIMESTAMPING;
                                break;
                        case SEC_OID_PKIX_CA_REPOSITORY:
                                method = PKIX_INFOACCESS_CA_REPOSITORY;
                                break;
                        default:
                                PKIX_ERROR(PKIX_UNKNOWNINFOACCESSMETHOD);
                }

                PKIX_CHECK(pkix_pl_InfoAccess_Create
                        (method, location, &infoAccess, plContext),
                        PKIX_INFOACCESSCREATEFAILED);

                PKIX_CHECK(PKIX_List_AppendItem
                            (infoAccessList,
                            (PKIX_PL_Object *)infoAccess,
                            plContext),
                            PKIX_LISTAPPENDITEMFAILED);
                PKIX_DECREF(infoAccess);
                PKIX_DECREF(location);
        }

        *pInfoAccessList = infoAccessList;
        infoAccessList = NULL;

cleanup:

        PKIX_DECREF(infoAccessList);
        PKIX_DECREF(infoAccess);
        PKIX_DECREF(location);

        PKIX_RETURN(INFOACCESS);
}

/* --Public-Functions------------------------------------------------------- */

/*
 * FUNCTION: PKIX_PL_InfoAccess_GetMethod (see comments in pkix_pl_pki.h)
 */
PKIX_Error *
PKIX_PL_InfoAccess_GetMethod(
        PKIX_PL_InfoAccess *infoAccess,
        PKIX_UInt32 *pMethod,
        void *plContext)
{
        PKIX_ENTER(INFOACCESS, "PKIX_PL_InfoAccess_GetMethod");
        PKIX_NULLCHECK_TWO(infoAccess, pMethod);

        *pMethod = infoAccess->method;

        PKIX_RETURN(INFOACCESS);
}

/*
 * FUNCTION: PKIX_PL_InfoAccess_GetLocation (see comments in pkix_pl_pki.h)
 */
PKIX_Error *
PKIX_PL_InfoAccess_GetLocation(
        PKIX_PL_InfoAccess *infoAccess,
        PKIX_PL_GeneralName **pLocation,
        void *plContext)
{
        PKIX_ENTER(INFOACCESS, "PKIX_PL_InfoAccess_GetLocation");
        PKIX_NULLCHECK_TWO(infoAccess, pLocation);

        PKIX_INCREF(infoAccess->location);

        *pLocation = infoAccess->location;

cleanup:
        PKIX_RETURN(INFOACCESS);
}

/*
 * FUNCTION: PKIX_PL_InfoAccess_GetLocationType (see comments in pkix_pl_pki.h)
 */
PKIX_Error *
PKIX_PL_InfoAccess_GetLocationType(
        PKIX_PL_InfoAccess *infoAccess,
        PKIX_UInt32 *pType,
        void *plContext)
{
        PKIX_PL_String *locationString = NULL;
        PKIX_UInt32 type = PKIX_INFOACCESS_LOCATION_UNKNOWN;
        PKIX_UInt32 len = 0;
        void *location = NULL;

        PKIX_ENTER(INFOACCESS, "PKIX_PL_InfoAccess_GetLocationType");
        PKIX_NULLCHECK_TWO(infoAccess, pType);

        if (infoAccess->location != NULL) {

                PKIX_TOSTRING(infoAccess->location, &locationString, plContext,
                    PKIX_GENERALNAMETOSTRINGFAILED);

                PKIX_CHECK(PKIX_PL_String_GetEncoded
                    (locationString, PKIX_ESCASCII, &location, &len, plContext),
                    PKIX_STRINGGETENCODEDFAILED);

                PKIX_OID_DEBUG("\tCalling PORT_Strcmp).\n");
                if (PORT_Strncmp(location, "ldap:", 5) == 0){
                        type = PKIX_INFOACCESS_LOCATION_LDAP;
                } else
                if (PORT_Strncmp(location, "http:", 5) == 0){
                        type = PKIX_INFOACCESS_LOCATION_HTTP;
                }
        }

        *pType = type;

cleanup:

        PKIX_PL_Free(location, plContext);
        PKIX_DECREF(locationString);

        PKIX_RETURN(INFOACCESS);
}

/*
 * FUNCTION: pkix_pl_InfoAccess_ParseTokens
 * DESCRIPTION:
 *
 *  This function parses the string beginning at "startPos" into tokens using
 *  the separator contained in "separator" and the terminator contained in
 *  "terminator", copying the tokens into space allocated from the arena
 *  pointed to by "arena". It stores in "tokens" a null-terminated array of
 *  pointers to those tokens.
 *
 * PARAMETERS
 *  "arena"
 *      Address of a PLArenaPool to be used in populating the LDAPLocation.
 *      Must be non-NULL.
 *  "startPos"
 *      The address of char string that contains a subset of ldap location.
 *  "tokens"
 *      The address of an array of char string for storing returned tokens.
 *      Must be non-NULL.
 *  "separator"
 *      The character that is taken as token separator. Must be non-NULL.
 *  "terminator"
 *      The character that is taken as parsing terminator. Must be non-NULL.
 *  "plContext"
 *      Platform-specific context pointer.
 * THREAD SAFETY:
 *  Thread Safe (see Thread Safety Definitions in Programmer's Guide)
 * RETURNS:
 *  Returns NULL if the function succeeds.
 *  Returns an InfoAccess Error if the function fails in a non-fatal way.
 *  Returns a Fatal Error if the function fails in an unrecoverable way.
 */
static PKIX_Error *
pkix_pl_InfoAccess_ParseTokens(
        PLArenaPool *arena,
        char **startPos, /* return update */
        char ***tokens,
        char separator,
        char terminator,
        void *plContext)
{
        PKIX_UInt32 numFilters = 0;
        char *endPos = NULL;
        char **filterP = NULL;

        PKIX_ENTER(INFOACCESS, "pkix_pl_InfoAccess_ParseTokens");
        PKIX_NULLCHECK_THREE(arena, startPos, tokens);

        endPos = *startPos;

        /* First pass: parse to <terminator> to count number of components */
        numFilters = 0;
        while (*endPos != terminator && *endPos != '\0') {
                endPos++;
                if (*endPos == separator) {
                        numFilters++;
                }
        }

        if (*endPos != terminator) {
                PKIX_ERROR(PKIX_LOCATIONSTRINGNOTPROPERLYTERMINATED);
        }

        /* Last component doesn't need a separator, although we allow it */
        if (endPos > *startPos && *(endPos-1) != separator) {
                numFilters++;
        }

        /*
         * If string is a=xx, b=yy, c=zz, etc., use a=xx for filter,
         * and everything else for the base
         */
        if (numFilters > 2) numFilters = 2;

        filterP = PORT_ArenaZNewArray(arena, char*, numFilters+1);
        if (filterP == NULL) {
            PKIX_ERROR(PKIX_PORTARENAALLOCFAILED);
        }

        /* Second pass: parse to fill in components in token array */
        *tokens = filterP;
        endPos = *startPos;

        while (numFilters) {
            if (*endPos == separator || *endPos == terminator) {
                    PKIX_UInt32 len = endPos - *startPos;
                    char *p = PORT_ArenaZAlloc(arena, len+1);
                    if (p == NULL) {
                        PKIX_ERROR(PKIX_PORTARENAALLOCFAILED);
                    }

                    PORT_Memcpy(p, *startPos, len);
                    p[len] = '\0';

                    *filterP = p;
                    filterP++;
                    numFilters--;

                    separator = terminator;

                    if (*endPos == '\0') {
                        *startPos = endPos;
                        break;
                    } else {
                        endPos++;
                        *startPos = endPos;
                        continue;
                    }
            }
            endPos++;
        }

        *filterP = NULL;

cleanup:

        PKIX_RETURN(INFOACCESS);
}

static int
pkix_pl_HexDigitToInt(
        int ch)
{
        if (isdigit(ch)) {
                ch = ch - '0';
        } else if (isupper(ch)) {
                ch = ch - 'A' + 10;
        } else {
                ch = ch - 'a' + 10;
        }
        return ch;
}

/*
 * Convert the "%" hex hex escape sequences in the URL 'location' in place.
 */
static void
pkix_pl_UnescapeURL(
        char *location)
{
        const char *src;
        char *dst;

        for (src = dst = location; *src != '\0'; src++, dst++) {
                if (*src == '%' && isxdigit((unsigned char)*(src+1)) &&
                    isxdigit((unsigned char)*(src+2))) {
                        *dst = pkix_pl_HexDigitToInt((unsigned char)*(src+1));
                        *dst *= 16;
                        *dst += pkix_pl_HexDigitToInt((unsigned char)*(src+2));
                        src += 2;
                } else {
                        *dst = *src;
                }
        }
        *dst = *src;  /* the terminating null */
}

/*
 * FUNCTION: pkix_pl_InfoAccess_ParseLocation
 * DESCRIPTION:
 *
 *  This function parses the GeneralName pointed to by "generalName" into the
 *  fields of the LDAPRequestParams pointed to by "request" and a domainName
 *  pointed to by "pDomainName", using the PLArenaPool pointed to by "arena" to
 *  allocate storage for the request components and for the domainName string.
 *
 *  The expected GeneralName string should be in the format described by the
 *  following BNF:
 *
 *  ldap://<ldap-server-site>/[cn=<cname>][,o=<org>][,c=<country>]?
 *  [caCertificate|crossCertificatPair|certificateRevocationList];
 *  [binary|<other-type>]
 *  [[,caCertificate|crossCertificatPair|certificateRevocationList]
 *   [binary|<other-type>]]*
 *
 * PARAMETERS
 *  "generalName"
 *      Address of the GeneralName whose LDAPLocation is to be parsed. Must be
 *      non-NULL.
 *  "arena"
 *      Address of PLArenaPool to be used for the domainName and for components
 *      of the LDAPRequest. Must be non-NULL.
 *  "request"
 *      Address of the LDAPRequestParams into which request components are
 *      stored. Must be non-NULL.
 *  *pDomainName"
 *      Address at which the domainName is stored. Must be non-NULL.
 *  "plContext"
 *      Platform-specific context pointer.
 * THREAD SAFETY:
 *  Thread Safe (see Thread Safety Definitions in Programmer's Guide)
 * RETURNS:
 *  Returns NULL if the function succeeds.
 *  Returns an InfoAccess Error if the function fails in a non-fatal way.
 *  Returns a Fatal Error if the function fails in an unrecoverable way.
 */
PKIX_Error *
pkix_pl_InfoAccess_ParseLocation(
        PKIX_PL_GeneralName *generalName,
        PLArenaPool *arena,
        LDAPRequestParams *request,
        char **pDomainName,
        void *plContext)
{
        PKIX_PL_String *locationString = NULL;
        PKIX_UInt32 len = 0;
        PKIX_UInt32 ncIndex = 0;
        char *domainName = NULL;
        char **avaArray = NULL;
        char **attrArray = NULL;
        char *attr = NULL;
        char *locationAscii = NULL;
        char *startPos = NULL;
        char *endPos = NULL;
        char *avaPtr = NULL;
        LdapAttrMask attrBit = 0;
        LDAPNameComponent **setOfNameComponent = NULL;
        LDAPNameComponent *nameComponent = NULL;

        PKIX_ENTER(INFOACCESS, "pkix_pl_InfoAccess_ParseLocation");
        PKIX_NULLCHECK_FOUR(generalName, arena, request, pDomainName);

        PKIX_TOSTRING(generalName, &locationString, plContext,
                PKIX_GENERALNAMETOSTRINGFAILED);

        PKIX_CHECK(PKIX_PL_String_GetEncoded
                (locationString,
                PKIX_ESCASCII,
                (void **)&locationAscii,
                &len,
                plContext),
                PKIX_STRINGGETENCODEDFAILED);

        pkix_pl_UnescapeURL(locationAscii);

        /* Skip "ldap:" */
        endPos = locationAscii;
        while (*endPos != ':' && *endPos != '\0') {
                endPos++;
        }
        if (*endPos == '\0') {
                PKIX_ERROR(PKIX_GENERALNAMESTRINGMISSINGLOCATIONTYPE);
        }

        /* Skip "//" */
        endPos++;
        if (*endPos != '\0' && *(endPos+1) != '0' &&
            *endPos == '/' && *(endPos+1) == '/') {
                endPos += 2;
        } else {
                PKIX_ERROR(PKIX_GENERALNAMESTRINGMISSINGDOUBLESLASH);
        }

        /* Get the server-site */
        startPos = endPos;
        while(*endPos != '/' && *(endPos) != '\0') {
                endPos++;
        }
        if (*endPos == '\0') {
                PKIX_ERROR(PKIX_GENERALNAMESTRINGMISSINGSERVERSITE);
        }

        len = endPos - startPos;
        endPos++;

        domainName = PORT_ArenaZAlloc(arena, len + 1);
        if (!domainName) {
            PKIX_ERROR(PKIX_PORTARENAALLOCFAILED);
        }

        PORT_Memcpy(domainName, startPos, len);

        domainName[len] = '\0';

        *pDomainName = domainName;

        /*
         * Get a list of AttrValueAssertions (such as
         * "cn=CommonName, o=Organization, c=US" into a null-terminated array
         */
        startPos = endPos;
        PKIX_CHECK(pkix_pl_InfoAccess_ParseTokens
                (arena,
                &startPos,
                (char ***) &avaArray,
                ',',
                '?',
                plContext),
                PKIX_INFOACCESSPARSETOKENSFAILED);

        /* Count how many AVAs we have */
        for (len = 0; avaArray[len] != NULL; len++) {}

        if (len < 2) {
                PKIX_ERROR(PKIX_NOTENOUGHNAMECOMPONENTSINGENERALNAME);
        }

        /* Use last name component for baseObject */
        request->baseObject = avaArray[len - 1];

        /* Use only one component for filter. LDAP servers aren't too smart. */
        len = 2;   /* Eliminate this when servers get smarter. */

        avaArray[len - 1] = NULL;

        /* Get room for null-terminated array of (LdapNameComponent *) */
        setOfNameComponent = PORT_ArenaZNewArray(arena, LDAPNameComponent *, len);
        if (setOfNameComponent == NULL) {
            PKIX_ERROR(PKIX_PORTARENAALLOCFAILED);
        }

        /* Get room for the remaining LdapNameComponents */
        nameComponent = PORT_ArenaZNewArray(arena, LDAPNameComponent, --len);
        if (nameComponent == NULL) {
            PKIX_ERROR(PKIX_PORTARENAALLOCFAILED);
        }

        /* Convert remaining AVAs to LDAPNameComponents */
        for (ncIndex = 0; ncIndex < len; ncIndex ++) {
                setOfNameComponent[ncIndex] = nameComponent;
                avaPtr = avaArray[ncIndex];
                nameComponent->attrType = (unsigned char *)avaPtr;
                while ((*avaPtr != '=') && (*avaPtr != '\0')) {
                        avaPtr++;
                        if (*avaPtr == '\0') {
                                PKIX_ERROR(PKIX_NAMECOMPONENTWITHNOEQ);
                        }
                }
                *(avaPtr++) = '\0';
                nameComponent->attrValue = (unsigned char *)avaPtr;
                nameComponent++;
        }

        setOfNameComponent[len] = NULL;
        request->nc = setOfNameComponent;

        /*
         * Get a list of AttrTypes (such as
         * "caCertificate;binary, crossCertificatePair;binary") into
         * a null-terminated array
         */

        PKIX_CHECK(pkix_pl_InfoAccess_ParseTokens
                (arena,
                (char **) &startPos,
                (char ***) &attrArray,
                ',',
                '\0',
                plContext),
                PKIX_INFOACCESSPARSETOKENSFAILED);

        /* Convert array of Attr Types into a bit mask */
        request->attributes = 0;
        attr = attrArray[0];
        while (attr != NULL) {
                PKIX_CHECK(pkix_pl_LdapRequest_AttrStringToBit
                        (attr, &attrBit, plContext),
                        PKIX_LDAPREQUESTATTRSTRINGTOBITFAILED);
                request->attributes |= attrBit;
                attr = *(++attrArray);
        }

cleanup:

        PKIX_PL_Free(locationAscii, plContext);
        PKIX_DECREF(locationString);

        PKIX_RETURN(INFOACCESS);
}


text:
namespace arrow {

class MemoryPool;

namespace py {

// A common interface to a Python file-like object. Must acquire GIL before
// calling any methods
class PythonFile {
 public:
  PythonFile(PyObject* file);
  ~PythonFile();

  Status Close();
  Status Seek(int64_t position, int whence);
  Status Read(int64_t nbytes, PyObject** out);
  Status Tell(int64_t* position);
  Status Write(const uint8_t* data, int64_t nbytes);

 private:
  PyObject* file_;
};

class ARROW_EXPORT PyReadableFile : public io::RandomAccessFile {
 public:
  explicit PyReadableFile(PyObject* file);
  virtual ~PyReadableFile();

  Status Close() override;

  Status Read(int64_t nbytes, int64_t* bytes_read, uint8_t* out) override;
  Status Read(int64_t nbytes, std::shared_ptr<Buffer>* out) override;

  Status GetSize(int64_t* size) override;

  Status Seek(int64_t position) override;

  Status Tell(int64_t* position) override;

  bool supports_zero_copy() const override;

 private:
  std::unique_ptr<PythonFile> file_;
};

class ARROW_EXPORT PyOutputStream : public io::OutputStream {
 public:
  explicit PyOutputStream(PyObject* file);
  virtual ~PyOutputStream();

  Status Close() override;
  Status Tell(int64_t* position) override;
  Status Write(const uint8_t* data, int64_t nbytes) override;

 private:
  std::unique_ptr<PythonFile> file_;
};

// A zero-copy reader backed by a PyBytes object
class ARROW_EXPORT PyBytesReader : public io::BufferReader {
 public:
  explicit PyBytesReader(PyObject* obj);
  virtual ~PyBytesReader();
};

// TODO(wesm): seekable output files

}  // namespace py
}  // namespace arrow

#endif  // PYARROW_IO_H


text:
<?xml version="1.0" encoding="UTF-8"?>
<MetaDataObject xmlns="http://v8.1c.ru/8.3/MDClasses" xmlns:app="http://v8.1c.ru/8.2/managed-application/core" xmlns:cfg="http://v8.1c.ru/8.1/data/enterprise/current-config" xmlns:cmi="http://v8.1c.ru/8.2/managed-application/cmi" xmlns:ent="http://v8.1c.ru/8.1/data/enterprise" xmlns:lf="http://v8.1c.ru/8.2/managed-application/logform" xmlns:style="http://v8.1c.ru/8.1/data/ui/style" xmlns:sys="http://v8.1c.ru/8.1/data/ui/fonts/system" xmlns:v8="http://v8.1c.ru/8.1/data/core" xmlns:v8ui="http://v8.1c.ru/8.1/data/ui" xmlns:web="http://v8.1c.ru/8.1/data/ui/colors/web" xmlns:win="http://v8.1c.ru/8.1/data/ui/colors/windows" xmlns:xen="http://v8.1c.ru/8.3/xcf/enums" xmlns:xpr="http://v8.1c.ru/8.3/xcf/predef" xmlns:xr="http://v8.1c.ru/8.3/xcf/readable" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	<AccumulationRegister uuid="1beaafd4-9e83-4fef-a24b-2ed1ba072beb">
		<InternalInfo>
			<xr:GeneratedType name="AccumulationRegisterRecord.ДвиженияСерийТоваров" category="Record">
				<xr:TypeId>4dc63413-d7fb-4b56-80de-f30b54d3a9fe</xr:TypeId>
				<xr:ValueId>e5a1f49d-14c7-473c-82d4-28fefae55ff0</xr:ValueId>
			</xr:GeneratedType>
			<xr:GeneratedType name="AccumulationRegisterManager.ДвиженияСерийТоваров" category="Manager">
				<xr:TypeId>470ebe14-804b-4a6b-8afd-ca3e64b6e782</xr:TypeId>
				<xr:ValueId>c6a94d9c-39be-4d57-a78d-6dfa9bc68340</xr:ValueId>
			</xr:GeneratedType>
			<xr:GeneratedType name="AccumulationRegisterSelection.ДвиженияСерийТоваров" category="Selection">
				<xr:TypeId>6b56376c-e899-4284-b0dd-cb5496e85b9c</xr:TypeId>
				<xr:ValueId>9a33eecc-a8cf-48da-aa37-9426b2ec6c21</xr:ValueId>
			</xr:GeneratedType>
			<xr:GeneratedType name="AccumulationRegisterList.ДвиженияСерийТоваров" category="List">
				<xr:TypeId>fe4340ac-a14b-4273-a4d9-4e951056e05d</xr:TypeId>
				<xr:ValueId>8a0358bf-ba0d-4361-afd9-ff6aa2f460f0</xr:ValueId>
			</xr:GeneratedType>
			<xr:GeneratedType name="AccumulationRegisterRecordSet.ДвиженияСерийТоваров" category="RecordSet">
				<xr:TypeId>bdd87194-60dc-4e85-bcba-a1d80702240b</xr:TypeId>
				<xr:ValueId>142b84b5-73df-4ed5-bc2c-377e243e7c74</xr:ValueId>
			</xr:GeneratedType>
			<xr:GeneratedType name="AccumulationRegisterRecordKey.ДвиженияСерийТоваров" category="RecordKey">
				<xr:TypeId>c21ff640-999a-44a1-88ea-2629ca4c1dc5</xr:TypeId>
				<xr:ValueId>a150dcd6-e007-4a30-ada5-af6d2ce28cfa</xr:ValueId>
			</xr:GeneratedType>
		</InternalInfo>
		<Properties>
			<Name>ДвиженияСерийТоваров</Name>
			<Synonym>
				<v8:item>
					<v8:lang>ru</v8:lang>
					<v8:content>Движения серий товаров</v8:content>
				</v8:item>
			</Synonym>
			<Comment/>
			<UseStandardCommands>true</UseStandardCommands>
			<DefaultListForm/>
			<AuxiliaryListForm/>
			<RegisterType>Turnovers</RegisterType>
			<IncludeHelpInContents>false</IncludeHelpInContents>
			<StandardAttributes>
				<xr:StandardAttribute name="Active">
					<xr:LinkByType/>
					<xr:FillChecking>DontCheck</xr:FillChecking>
					<xr:MultiLine>false</xr:MultiLine>
					<xr:FillFromFillingValue>false</xr:FillFromFillingValue>
					<xr:CreateOnInput>Auto</xr:CreateOnInput>
					<xr:MaxValue xsi:nil="true"/>
					<xr:ToolTip/>
					<xr:ExtendedEdit>false</xr:ExtendedEdit>
					<xr:Format/>
					<xr:ChoiceForm/>
					<xr:QuickChoice>Auto</xr:QuickChoice>
					<xr:ChoiceHistoryOnInput>Auto</xr:ChoiceHistoryOnInput>
					<xr:EditFormat/>
					<xr:PasswordMode>false</xr:PasswordMode>
					<xr:MarkNegatives>false</xr:MarkNegatives>
					<xr:MinValue xsi:nil="true"/>
					<xr:Synonym/>
					<xr:Comment/>
					<xr:FullTextSearch>Use</xr:FullTextSearch>
					<xr:ChoiceParameterLinks/>
					<xr:FillValue xsi:nil="true"/>
					<xr:Mask/>
					<xr:ChoiceParameters/>
				</xr:StandardAttribute>
				<xr:StandardAttribute name="LineNumber">
					<xr:LinkByType/>
					<xr:FillChecking>DontCheck</xr:FillChecking>
					<xr:MultiLine>false</xr:MultiLine>
					<xr:FillFromFillingValue>false</xr:FillFromFillingValue>
					<xr:CreateOnInput>Auto</xr:CreateOnInput>
					<xr:MaxValue xsi:nil="true"/>
					<xr:ToolTip/>
					<xr:ExtendedEdit>false</xr:ExtendedEdit>
					<xr:Format/>
					<xr:ChoiceForm/>
					<xr:QuickChoice>Auto</xr:QuickChoice>
					<xr:ChoiceHistoryOnInput>Auto</xr:ChoiceHistoryOnInput>
					<xr:EditFormat/>
					<xr:PasswordMode>false</xr:PasswordMode>
					<xr:MarkNegatives>false</xr:MarkNegatives>
					<xr:MinValue xsi:nil="true"/>
					<xr:Synonym/>
					<xr:Comment/>
					<xr:FullTextSearch>Use</xr:FullTextSearch>
					<xr:ChoiceParameterLinks/>
					<xr:FillValue xsi:nil="true"/>
					<xr:Mask/>
					<xr:ChoiceParameters/>
				</xr:StandardAttribute>
				<xr:StandardAttribute name="Recorder">
					<xr:LinkByType/>
					<xr:FillChecking>DontCheck</xr:FillChecking>
					<xr:MultiLine>false</xr:MultiLine>
					<xr:FillFromFillingValue>false</xr:FillFromFillingValue>
					<xr:CreateOnInput>Auto</xr:CreateOnInput>
					<xr:MaxValue xsi:nil="true"/>
					<xr:ToolTip/>
					<xr:ExtendedEdit>false</xr:ExtendedEdit>
					<xr:Format/>
					<xr:ChoiceForm/>
					<xr:QuickChoice>Auto</xr:QuickChoice>
					<xr:ChoiceHistoryOnInput>Auto</xr:ChoiceHistoryOnInput>
					<xr:EditFormat/>
					<xr:PasswordMode>false</xr:PasswordMode>
					<xr:MarkNegatives>false</xr:MarkNegatives>
					<xr:MinValue xsi:nil="true"/>
					<xr:Synonym/>
					<xr:Comment/>
					<xr:FullTextSearch>Use</xr:FullTextSearch>
					<xr:ChoiceParameterLinks/>
					<xr:FillValue xsi:nil="true"/>
					<xr:Mask/>
					<xr:ChoiceParameters/>
				</xr:StandardAttribute>
				<xr:StandardAttribute name="Period">
					<xr:LinkByType/>
					<xr:FillChecking>ShowError</xr:FillChecking>
					<xr:MultiLine>false</xr:MultiLine>
					<xr:FillFromFillingValue>false</xr:FillFromFillingValue>
					<xr:CreateOnInput>Auto</xr:CreateOnInput>
					<xr:MaxValue xsi:nil="true"/>
					<xr:ToolTip/>
					<xr:ExtendedEdit>false</xr:ExtendedEdit>
					<xr:Format/>
					<xr:ChoiceForm/>
					<xr:QuickChoice>Auto</xr:QuickChoice>
					<xr:ChoiceHistoryOnInput>Auto</xr:ChoiceHistoryOnInput>
					<xr:EditFormat/>
					<xr:PasswordMode>false</xr:PasswordMode>
					<xr:MarkNegatives>false</xr:MarkNegatives>
					<xr:MinValue xsi:nil="true"/>
					<xr:Synonym/>
					<xr:Comment/>
					<xr:FullTextSearch>Use</xr:FullTextSearch>
					<xr:ChoiceParameterLinks/>
					<xr:FillValue xsi:nil="true"/>
					<xr:Mask/>
					<xr:ChoiceParameters/>
				</xr:StandardAttribute>
			</StandardAttributes>
			<DataLockControlMode>Managed</DataLockControlMode>
			<FullTextSearch>DontUse</FullTextSearch>
			<EnableTotalsSplitting>false</EnableTotalsSplitting>
			<ListPresentation/>
			<ExtendedListPresentation/>
			<Explanation/>
		</Properties>
		<ChildObjects>
			<Resource uuid="3ac7b0d7-bb5e-4658-8f25-c6fcd64025ce">
				<Properties>
					<Name>Количество</Name>
					<Synonym>
						<v8:item>
							<v8:lang>ru</v8:lang>
							<v8:content>Количество</v8:content>
						</v8:item>
					</Synonym>
					<Comment/>
					<Type>
						<v8:Type>xs:decimal</v8:Type>
						<v8:NumberQualifiers>
							<v8:Digits>15</v8:Digits>
							<v8:FractionDigits>3</v8:FractionDigits>
							<v8:AllowedSign>Any</v8:AllowedSign>
						</v8:NumberQualifiers>
					</Type>
					<PasswordMode>false</PasswordMode>
					<Format/>
					<EditFormat/>
					<ToolTip/>
					<MarkNegatives>false</MarkNegatives>
					<Mask/>
					<MultiLine>false</MultiLine>
					<ExtendedEdit>false</ExtendedEdit>
					<MinValue xsi:nil="true"/>
					<MaxValue xsi:nil="true"/>
					<FillChecking>DontCheck</FillChecking>
					<ChoiceFoldersAndItems>Items</ChoiceFoldersAndItems>
					<ChoiceParameterLinks/>
					<ChoiceParameters/>
					<QuickChoice>Auto</QuickChoice>
					<CreateOnInput>Auto</CreateOnInput>
					<ChoiceForm/>
					<LinkByType/>
					<ChoiceHistoryOnInput>Auto</ChoiceHistoryOnInput>
					<FullTextSearch>Use</FullTextSearch>
				</Properties>
			</Resource>
			<Dimension uuid="c0d120e9-7ff3-481b-9744-9fcd3fefabfc">
				<Properties>
					<Name>Серия</Name>
					<Synonym>
						<v8:item>
							<v8:lang>ru</v8:lang>
							<v8:content>Серия</v8:content>
						</v8:item>
					</Synonym>
					<Comment/>
					<Type>
						<v8:Type>cfg:CatalogRef.СерииНоменклатуры</v8:Type>
					</Type>
					<PasswordMode>false</PasswordMode>
					<Format/>
					<EditFormat/>
					<ToolTip/>
					<MarkNegatives>false</MarkNegatives>
					<Mask/>
					<MultiLine>false</MultiLine>
					<ExtendedEdit>false</ExtendedEdit>
					<MinValue xsi:nil="true"/>
					<MaxValue xsi:nil="true"/>
					<FillChecking>DontCheck</FillChecking>
					<ChoiceFoldersAndItems>Items</ChoiceFoldersAndItems>
					<ChoiceParameterLinks>
						<xr:Link>
							<xr:Name>Номенклатура</xr:Name>
							<xr:DataPath xsi:type="xs:string">AccumulationRegister.ДвиженияСерийТоваров.Dimension.Номенклатура</xr:DataPath>
							<xr:ValueChange>Clear</xr:ValueChange>
						</xr:Link>
					</ChoiceParameterLinks>
					<ChoiceParameters/>
					<QuickChoice>Auto</QuickChoice>
					<CreateOnInput>Auto</CreateOnInput>
					<ChoiceForm/>
					<LinkByType/>
					<ChoiceHistoryOnInput>Auto</ChoiceHistoryOnInput>
					<DenyIncompleteValues>true</DenyIncompleteValues>
					<Indexing>DontIndex</Indexing>
					<FullTextSearch>Use</FullTextSearch>
					<UseInTotals>false</UseInTotals>
				</Properties>
			</Dimension>
			<Dimension uuid="dbc39670-ee82-4e26-844b-f35d4c1c5544">
				<Properties>
					<Name>Номенклатура</Name>
					<Synonym>
						<v8:item>
							<v8:lang>ru</v8:lang>
							<v8:content>Номенклатура</v8:content>
						</v8:item>
					</Synonym>
					<Comment/>
					<Type>
						<v8:Type>cfg:CatalogRef.Номенклатура</v8:Type>
					</Type>
					<PasswordMode>false</PasswordMode>
					<Format/>
					<EditFormat/>
					<ToolTip/>
					<MarkNegatives>false</MarkNegatives>
					<Mask/>
					<MultiLine>false</MultiLine>
					<ExtendedEdit>false</ExtendedEdit>
					<MinValue xsi:nil="true"/>
					<MaxValue xsi:nil="true"/>
					<FillChecking>DontCheck</FillChecking>
					<ChoiceFoldersAndItems>Items</ChoiceFoldersAndItems>
					<ChoiceParameterLinks/>
					<ChoiceParameters/>
					<QuickChoice>Auto</QuickChoice>
					<CreateOnInput>Auto</CreateOnInput>
					<ChoiceForm/>
					<LinkByType/>
					<ChoiceHistoryOnInput>Auto</ChoiceHistoryOnInput>
					<DenyIncompleteValues>true</DenyIncompleteValues>
					<Indexing>DontIndex</Indexing>
					<FullTextSearch>Use</FullTextSearch>
					<UseInTotals>false</UseInTotals>
				</Properties>
			</Dimension>
			<Dimension uuid="139b3d05-8733-431a-a4d7-5187579bfb8d">
				<Properties>
					<Name>Характеристика</Name>
					<Synonym>
						<v8:item>
							<v8:lang>ru</v8:lang>
							<v8:content>Характеристика</v8:content>
						</v8:item>
					</Synonym>
					<Comment/>
					<Type>
						<v8:Type>cfg:CatalogRef.ХарактеристикиНоменклатуры</v8:Type>
					</Type>
					<PasswordMode>false</PasswordMode>
					<Format/>
					<EditFormat/>
					<ToolTip/>
					<MarkNegatives>false</MarkNegatives>
					<Mask/>
					<MultiLine>false</MultiLine>
					<ExtendedEdit>false</ExtendedEdit>
					<MinValue xsi:nil="true"/>
					<MaxValue xsi:nil="true"/>
					<FillChecking>DontCheck</FillChecking>
					<ChoiceFoldersAndItems>Items</ChoiceFoldersAndItems>
					<ChoiceParameterLinks>
						<xr:Link>
							<xr:Name>Номенклатура</xr:Name>
							<xr:DataPath xsi:type="xs:string">AccumulationRegister.ДвиженияСерийТоваров.Dimension.Номенклатура</xr:DataPath>
							<xr:ValueChange>Clear</xr:ValueChange>
						</xr:Link>
					</ChoiceParameterLinks>
					<ChoiceParameters/>
					<QuickChoice>Auto</QuickChoice>
					<CreateOnInput>Auto</CreateOnInput>
					<ChoiceForm/>
					<LinkByType/>
					<ChoiceHistoryOnInput>Auto</ChoiceHistoryOnInput>
					<DenyIncompleteValues>false</DenyIncompleteValues>
					<Indexing>DontIndex</Indexing>
					<FullTextSearch>Use</FullTextSearch>
					<UseInTotals>false</UseInTotals>
				</Properties>
			</Dimension>
			<Dimension uuid="6efe3d1d-a930-4197-8190-e7d9cc757cb1">
				<Properties>
					<Name>Документ</Name>
					<Synonym>
						<v8:item>
							<v8:lang>ru</v8:lang>
							<v8:content>Документ</v8:content>
						</v8:item>
					</Synonym>
					<Comment/>
					<Type>
						<v8:Type>cfg:DocumentRef.ОрдерНаОтражениеРезультатовПересчетовТоваров</v8:Type>
						<v8:Type>cfg:DocumentRef.ВнутреннееПотреблениеТоваров</v8:Type>
						<v8:Type>cfg:DocumentRef.РасходныйОрдерНаТовары</v8:Type>
						<v8:Type>cfg:DocumentRef.ВозвратТоваровОтКлиента</v8:Type>
						<v8:Type>cfg:DocumentRef.ПоступлениеТоваровУслуг</v8:Type>
						<v8:Type>cfg:DocumentRef.ЧекККМВозврат</v8:Type>
						<v8:Type>cfg:DocumentRef.ЗаказПоставщику</v8:Type>
						<v8:Type>cfg:DocumentRef.ВозвратТоваровПоставщику</v8:Type>
						<v8:Type>cfg:DocumentRef.ВводОстатков</v8:Type>
						<v8:Type>cfg:DocumentRef.РаспоряжениеНаИнвентаризациюТоваров</v8:Type>
						<v8:Type>cfg:DocumentRef.ОрдерНаОтражениеИзлишковТоваров</v8:Type>
						<v8:Type>cfg:DocumentRef.ЗаявкаНаВозвратТоваровОтКлиента</v8:Type>
						<v8:Type>cfg:DocumentRef.СписаниеНедостачТоваров</v8:Type>
						<v8:Type>cfg:DocumentRef.ПеремещениеТоваров</v8:Type>
						<v8:Type>cfg:DocumentRef.ОрдерНаОтражениеНедостачТоваров</v8:Type>
						<v8:Type>cfg:DocumentRef.ОрдерНаОтражениеПорчиТоваров</v8:Type>
						<v8:Type>cfg:DocumentRef.ЗаказНаСборку</v8:Type>
						<v8:Type>cfg:DocumentRef.РеализацияТоваровУслуг</v8:Type>
						<v8:Type>cfg:DocumentRef.ОтражениеРезультатовПроверкиОрдераНаТовары</v8:Type>
						<v8:Type>cfg:DocumentRef.ПересортицаТоваров</v8:Type>
						<v8:Type>cfg:DocumentRef.ПересчетТоваров</v8:Type>
						<v8:Type>cfg:DocumentRef.ОтчетОРозничныхПродажах</v8:Type>
						<v8:Type>cfg:DocumentRef.ЗаказНаПеремещение</v8:Type>
						<v8:Type>cfg:DocumentRef.ОприходованиеИзлишковТоваров</v8:Type>
						<v8:Type>cfg:DocumentRef.ЧекККМ</v8:Type>
						<v8:Type>cfg:DocumentRef.СборкаТоваров</v8:Type>
						<v8:Type>cfg:DocumentRef.ОтборРазмещениеТоваров</v8:Type>
						<v8:Type>cfg:DocumentRef.ПриходныйОрдерНаТовары</v8:Type>
						<v8:Type>cfg:DocumentRef.ПрочееОприходованиеТоваров</v8:Type>
						<v8:Type>cfg:DocumentRef.ЗаказНаВнутреннееПотребление</v8:Type>
						<v8:Type>cfg:DocumentRef.ЗаказКлиента</v8:Type>
						<v8:Type>cfg:DocumentRef.ОрдерНаПеремещениеТоваров</v8:Type>
						<v8:Type>cfg:DocumentRef.ПорчаТоваров</v8:Type>
					</Type>
					<PasswordMode>false</PasswordMode>
					<Format/>
					<EditFormat/>
					<ToolTip/>
					<MarkNegatives>false</MarkNegatives>
					<Mask/>
					<MultiLine>false</MultiLine>
					<ExtendedEdit>false</ExtendedEdit>
					<MinValue xsi:nil="true"/>
					<MaxValue xsi:nil="true"/>
					<FillChecking>DontCheck</FillChecking>
					<ChoiceFoldersAndItems>Items</ChoiceFoldersAndItems>
					<ChoiceParameterLinks/>
					<ChoiceParameters/>
					<QuickChoice>Auto</QuickChoice>
					<CreateOnInput>Auto</CreateOnInput>
					<ChoiceForm/>
					<LinkByType/>
					<ChoiceHistoryOnInput>Auto</ChoiceHistoryOnInput>
					<DenyIncompleteValues>true</DenyIncompleteValues>
					<Indexing>DontIndex</Indexing>
					<FullTextSearch>Use</FullTextSearch>
					<UseInTotals>false</UseInTotals>
				</Properties>
			</Dimension>
			<Dimension uuid="d26b7a42-dbc1-442f-9a6d-8a7cc31b86a5">
				<Properties>
					<Name>Склад</Name>
					<Synonym>
						<v8:item>
							<v8:lang>ru</v8:lang>
							<v8:content>Склад</v8:content>
						</v8:item>
					</Synonym>
					<Comment/>
					<Type>
						<v8:Type>cfg:CatalogRef.Склады</v8:Type>
					</Type>
					<PasswordMode>false</PasswordMode>
					<Format/>
					<EditFormat/>
					<ToolTip/>
					<MarkNegatives>false</MarkNegatives>
					<Mask/>
					<MultiLine>false</MultiLine>
					<ExtendedEdit>false</ExtendedEdit>
					<MinValue xsi:nil="true"/>
					<MaxValue xsi:nil="true"/>
					<FillChecking>DontCheck</FillChecking>
					<ChoiceFoldersAndItems>Items</ChoiceFoldersAndItems>
					<ChoiceParameterLinks/>
					<ChoiceParameters/>
					<QuickChoice>Auto</QuickChoice>
					<CreateOnInput>Auto</CreateOnInput>
					<ChoiceForm/>
					<LinkByType/>
					<ChoiceHistoryOnInput>Auto</ChoiceHistoryOnInput>
					<DenyIncompleteValues>true</DenyIncompleteValues>
					<Indexing>DontIndex</Indexing>
					<FullTextSearch>Use</FullTextSearch>
					<UseInTotals>false</UseInTotals>
				</Properties>
			</Dimension>
			<Dimension uuid="f5bbe64b-6d52-4f8b-8a01-53a0745f1439">
				<Properties>
					<Name>Помещение</Name>
					<Synonym>
						<v8:item>
							<v8:lang>ru</v8:lang>
							<v8:content>Помещение</v8:content>
						</v8:item>
					</Synonym>
					<Comment/>
					<Type>
						<v8:Type>cfg:CatalogRef.СкладскиеПомещения</v8:Type>
					</Type>
					<PasswordMode>false</PasswordMode>
					<Format/>
					<EditFormat/>
					<ToolTip/>
					<MarkNegatives>false</MarkNegatives>
					<Mask/>
					<MultiLine>false</MultiLine>
					<ExtendedEdit>false</ExtendedEdit>
					<MinValue xsi:nil="true"/>
					<MaxValue xsi:nil="true"/>
					<FillChecking>DontCheck</FillChecking>
					<ChoiceFoldersAndItems>Items</ChoiceFoldersAndItems>
					<ChoiceParameterLinks>
						<xr:Link>
							<xr:Name>Отбор.Владелец</xr:Name>
							<xr:DataPath xsi:type="xs:string">AccumulationRegister.ДвиженияСерийТоваров.Dimension.Склад</xr:DataPath>
							<xr:ValueChange>Clear</xr:ValueChange>
						</xr:Link>
					</ChoiceParameterLinks>
					<ChoiceParameters/>
					<QuickChoice>Auto</QuickChoice>
					<CreateOnInput>Auto</CreateOnInput>
					<ChoiceForm/>
					<LinkByType/>
					<ChoiceHistoryOnInput>Auto</ChoiceHistoryOnInput>
					<DenyIncompleteValues>false</DenyIncompleteValues>
					<Indexing>DontIndex</Indexing>
					<FullTextSearch>Use</FullTextSearch>
					<UseInTotals>false</UseInTotals>
				</Properties>
			</Dimension>
			<Dimension uuid="c922f830-b615-456e-9f4d-adca3f0895f1">
				<Properties>
					<Name>СкладскаяОперация</Name>
					<Synonym>
						<v8:item>
							<v8:lang>ru</v8:lang>
							<v8:content>Складская операция</v8:content>
						</v8:item>
					</Synonym>
					<Comment/>
					<Type>
						<v8:Type>cfg:EnumRef.СкладскиеОперации</v8:Type>
					</Type>
					<PasswordMode>false</PasswordMode>
					<Format/>
					<EditFormat/>
					<ToolTip/>
					<MarkNegatives>false</MarkNegatives>
					<Mask/>
					<MultiLine>false</MultiLine>
					<ExtendedEdit>false</ExtendedEdit>
					<MinValue xsi:nil="true"/>
					<MaxValue xsi:nil="true"/>
					<FillChecking>DontCheck</FillChecking>
					<ChoiceFoldersAndItems>Items</ChoiceFoldersAndItems>
					<ChoiceParameterLinks/>
					<ChoiceParameters/>
					<QuickChoice>Auto</QuickChoice>
					<CreateOnInput>Auto</CreateOnInput>
					<ChoiceForm/>
					<LinkByType/>
					<ChoiceHistoryOnInput>Auto</ChoiceHistoryOnInput>
					<DenyIncompleteValues>true</DenyIncompleteValues>
					<Indexing>DontIndex</Indexing>
					<FullTextSearch>Use</FullTextSearch>
					<UseInTotals>false</UseInTotals>
				</Properties>
			</Dimension>
		</ChildObjects>
	</AccumulationRegister>
</MetaDataObject>


text:
.cross-fade {
    max-height: 400px;
}
.cross-fade img {
    float:left;
    margin-right: -100%;
    width: 300px;
    transition: opacity .25s ease-in-out;
    -moz-transition: opacity .25s ease-in-out;
    -webkit-transition: opacity .25s ease-in-out;
}


text:
/*
 *    GeoTools - The Open Source Java GIS Toolkit
 *    http://geotools.org
 *
 *    (C) 2011, Open Source Geospatial Foundation (OSGeo)
 *    (C) 2001-2007 TOPP - www.openplans.org.
 *
 *    This library is free software; you can redistribute it and/or
 *    modify it under the terms of the GNU Lesser General Public
 *    License as published by the Free Software Foundation;
 *    version 2.1 of the License.
 *
 *    This library is distributed in the hope that it will be useful,
 *    but WITHOUT ANY WARRANTY; without even the implied warranty of
 *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 *    Lesser General Public License for more details.
 */
package org.geoserver.wps.oskari.oskari;

import org.geotools.data.DataUtilities;
import org.geotools.feature.FeatureIterator;
import org.geotools.feature.collection.BaseFeatureCollection;
import org.geotools.geometry.jts.ReferencedEnvelope;
import org.opengis.feature.Feature;
import org.opengis.feature.type.FeatureType;
import org.opengis.filter.Filter;
import org.opengis.filter.sort.SortBy;

import java.util.List;
import java.util.UUID;

/**
 * Abstract base class to ease the implementation of a streaming processing collection, that is, one
 * that tries to compute the results on the fly as the iterator is traversed.
 *
 * Besides the few methods that the implementor actually needs to override it suggested to consider
 * overriding also the followings to get extra performance gains:
 * <ul>
 * {@link #subCollection(Filter)} {@link #sort(SortBy)}
 * </ul>
 *
 * @author Andrea Aime - GeoSolutions
 *
 * @param <T>
 * @param <F>
 */
public abstract class ProcessingCollection<T extends FeatureType, F extends Feature>
        extends BaseFeatureCollection<T, F> {

    public ProcessingCollection() {
        this.id = getClass().getSimpleName() + "-" + UUID.randomUUID().toString();
    }

    /**
     * Streams out the output features
     */
    @Override
    public abstract FeatureIterator<F> features();

    /**
     * The bounds of features in the output. If the bounds are not known in advance once can call the
     * getFeatureBounds() which will build it from the features as they are returned from the feature
     * iterator.
     */
    @Override
    public abstract ReferencedEnvelope getBounds();

    /**
     * Builds once and for all the target feature type. The results are available by calling getSchema()
     *
     * @return
     */
    protected abstract T buildTargetFeatureType();

    /**
     * The number of features in the output. If the size is not known in advance once can call the
     * getFeatureCount() which will count the features as they are returned from the feature
     * iterator.
     */
    @Override
    public abstract int size();

    /**
     * Convenience method that counts features by traversing the feature iterator.
     *
     * @return number of features using {@link #features()}
     * @deprecated Use {@link DataUtilities#count(org.geotools.feature.FeatureCollection)
     */
    protected int getFeatureCount() {
        return DataUtilities.count( this );
    }

    /**
     * Utility to get all the features to implement the toArray methods
     * @deprecated Use {@link DataUtilities#list(org.geotools.feature.FeatureCollection)}
     */
    protected List<F> toList() {
        return DataUtilities.list( this );
    }
    /**
     * Convenience method that computes the feature bounds by traversing the feature iterator.
     *
     * @return bounds calculated using {@link #features()}
     * @deprecated Use {@link DataUtilities#bounds(FeatureIterator)
     */
    protected ReferencedEnvelope getFeatureBounds() {
        return DataUtilities.bounds( features() );
    }

    @Override
    public T getSchema() {
        if(schema == null) {
            schema = buildTargetFeatureType();
        }
        return schema;
    }

}


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">

        <title>Setting Timeout for Ldap Operations (The Java™ Tutorials >
            Java Naming and Directory Interface(TM). > New features in JDK 5.0 and JDK 6)
</title>

     <meta name="description" content="This JNDI Java tutorial describes Java Naming and Directory Interface (JNDI) technology, naming and directory operations, and LDAP" />
     <meta name="keywords" content="java programming, learn java, java sample code, jndi, ldap, jndi service provider" />

A browser with JavaScript enabled is required for this page to operate properly.

                            Download
                                the JDK

                            Search the
                                Tutorials

                            Hide the TOC

        Trail: Java Naming and Directory Interface(TM).

Lesson: New features in JDK 5.0 and JDK 6

New features in JDK 5.0 and JDK 6

Retrieving Distinguished Name

Standard LDAP Controls

Paged Results Control

Sort Control

Manage Referral Control

Manipulating LdapName (Distinguished Name)

Manipulating Relative Distringuished Name (RDN)

Setting Timeout for Ldap Operations

                Home Page
                >
                Java Naming and Directory Interface(TM).
                >
                New features in JDK 5.0 and JDK 6

                « Previous • Trail • Next »

Setting Timeout for Ldap Operations

When an LDAP request is made by a client to a server and the server
does not respond for some reason, the client waits forever for the
server to respond until the TCP timeouts.
On the client-side what the user experiences is esentially a process
hang. In order to control the LDAP request in a timely manner, a read
timeout can be configured for the Sun JNDI/LDAP Service Provider
since Java SE 6.

The new environment property:

 com.sun.jndi.ldap.read.timeout

can be used to specify the read timeout for an LDAP operation.
The value of this property is the string
representation of an integer representing the read timeout in
milliseconds for LDAP operations.
If the LDAP provider doesn't get an LDAP response within the specified
 period, it aborts the read attempt. The integer should be greater than zero.
An integer less than or equal to zero means no read timeout is specified
which is equivalent to waiting for the response infinitely until it is
received which defaults to the original behavior.

If this property is not specified, the default is to wait for the
response until it is received.

For example,

    env.put("com.sun.jndi.ldap.read.timeout", "5000");

causes the LDAP service provider to abort the read attempt if the server
does not respond with a reply within 5 seconds.

Here is an example that uses
a dummy server which does not respond to
LDAP requests to show how this property behaves when set to a non-zero
value.

	env.put(Context.INITIAL_CONTEXT_FACTORY,
     		"com.sun.jndi.ldap.LdapCtxFactory");
	env.put("com.sun.jndi.ldap.read.timeout", "1000");
	env.put(Context.PROVIDER_URL, "ldap://localhost:2001");

	Server s = new Server();

	try {

     	    // start the server
     	    s.start();

           // Create initial context
           DirContext ctx = new InitialDirContext(env);
           System.out.println("LDAP Client: Connected to the Server");
		:
	        :
 	} catch (NamingException e) {
     	   e.printStackTrace();
	}

The above program prints the stack trace below, as the server does not even
respond to the LDAP bind request when an InitialDirContext is created.
The client times out waiting for the server's response.

	Server: Connection accepted
	javax.naming.NamingException: LDAP response read timed out, timeout used:1000ms.
	:
	:

        at javax.naming.directory.InitialDirContext.<init>(InitialDirContext.java:82)
        at ReadTimeoutTest.main(ReadTimeoutTest.java:32)

Note that this property is different from the another environment property <tt>com.sun.jndi.ldap.connect.timeout</tt> that sets the timeout for
connecting to the server. The read timeout applies to the LDAP response
from the server after the initial connection is established with the server.

            « Previous
            •
            Trail
            •
            Next »

Problems with the examples? Try Compiling and Running
        the Examples: FAQs.

    Complaints? Compliments? Suggestions? Give
    us your feedback.

Your use of this page and all the material on pages under "The Java Tutorials" banner,
and all the material on pages under "The Java Tutorials" banner is subject to the Java SE Tutorial Copyright
and License.
Additionally, any example code contained in any of these Java
Tutorials pages is licensed under the
Code
Sample License.

About Oracle | Oracle Technology Network | Terms of Service

Copyright © 1995, 2011 Oracle and/or its affiliates. All rights reserved.

        Previous page: Manipulating Relative Distringuished Name (RDN)

Next page: End of Trail

A browser with JavaScript enabled is required for this page to operate properly.